Skip to content

Commit 05024a2

Browse files
Merge branch 'main' into fix/run-event-schema-v3
2 parents 838be18 + 35298ac commit 05024a2

File tree

122 files changed

+22904
-208
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+22904
-208
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"trigger.dev": patch
3+
---
4+
5+
Fix dev CLI leaking build directories on rebuild, causing disk space accumulation. Deprecated workers are now pruned (capped at 2 retained) when no active runs reference them. The watchdog process also cleans up `.trigger/tmp/` when the dev CLI is killed ungracefully (e.g. SIGKILL from pnpm).
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@trigger.dev/core": patch
3+
---
4+
5+
Fix `list_deploys` MCP tool failing when deployments have null `runtime` or `runtimeVersion` fields.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@trigger.dev/core": patch
3+
---
4+
5+
Propagate run tags to span attributes so they can be extracted server-side for LLM cost attribution metadata.

.changeset/mcp-query-tools.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
"@trigger.dev/core": patch
3+
"trigger.dev": patch
4+
---
5+
6+
MCP server improvements: new tools, bug fixes, and new flags.
7+
8+
**New tools:**
9+
- `get_query_schema` — discover available TRQL tables and columns
10+
- `query` — execute TRQL queries against your data
11+
- `list_dashboards` — list built-in dashboards and their widgets
12+
- `run_dashboard_query` — execute a single dashboard widget query
13+
- `whoami` — show current profile, user, and API URL
14+
- `list_profiles` — list all configured CLI profiles
15+
- `switch_profile` — switch active profile for the MCP session
16+
- `start_dev_server` — start `trigger dev` in the background and stream output
17+
- `stop_dev_server` — stop the running dev server
18+
- `dev_server_status` — check dev server status and view recent logs
19+
20+
**New API endpoints:**
21+
- `GET /api/v1/query/schema` — query table schema discovery
22+
- `GET /api/v1/query/dashboards` — list built-in dashboards
23+
24+
**New features:**
25+
- `--readonly` flag hides write tools (`deploy`, `trigger_task`, `cancel_run`) so the AI cannot make changes
26+
- `read:query` JWT scope for query endpoint authorization
27+
- `get_run_details` trace output is now paginated with cursor support
28+
- MCP tool annotations (`readOnlyHint`, `destructiveHint`) for all tools
29+
30+
**Bug fixes:**
31+
- Fixed `search_docs` tool failing due to renamed upstream Mintlify tool (`SearchTriggerDev``search_trigger_dev`)
32+
- Fixed `list_deploys` failing when deployments have null `runtime`/`runtimeVersion` fields (#3139)
33+
- Fixed `list_preview_branches` crashing due to incorrect response shape access
34+
- Fixed `metrics` table column documented as `value` instead of `metric_value` in query docs
35+
- Fixed dev CLI leaking build directories on rebuild — deprecated workers now clean up their build dirs when their last run completes
36+
37+
**Context optimizations:**
38+
- `get_query_schema` now requires a table name and returns only one table's schema (was returning all tables)
39+
- `get_current_worker` no longer inlines payload schemas; use new `get_task_schema` tool instead
40+
- Query results formatted as text tables instead of JSON (~50% fewer tokens)
41+
- `cancel_run`, `list_deploys`, `list_preview_branches` formatted as text instead of raw JSON
42+
- Schema and dashboard API responses cached to avoid redundant fetches

.github/VOUCHED.td

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ isshaddad
1515
gautamsi
1616
capaj
1717
chengzp
18-
bharathkumar39293
18+
bharathkumar39293
19+
bhekanik
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
area: webapp
3+
type: feature
4+
---
5+
6+
Add allowRollbacks query param to the promote deployment API to enable version downgrades
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
area: webapp
3+
type: fix
4+
---
5+
6+
Reduce lock contention when processing large `batchTriggerAndWait` batches. Previously, each batch item acquired a Redis lock on the parent run to insert a `TaskRunWaitpoint` row, causing `LockAcquisitionTimeoutError` with high concurrency (880 errors/24h in prod). Since `blockRunWithCreatedBatch` already transitions the parent to `EXECUTING_WITH_WAITPOINTS` before items are processed, the per-item lock is unnecessary. The new `blockRunWithWaitpointLockless` method performs only the idempotent CTE insert without acquiring the lock.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
area: webapp
3+
type: feature
4+
---
5+
6+
Add automatic LLM cost calculation for spans with GenAI semantic conventions. When a span arrives with `gen_ai.response.model` and token usage data, costs are calculated from an in-memory pricing registry backed by Postgres and dual-written to both span attributes (`trigger.llm.*`) and a new `llm_metrics_v1` ClickHouse table that captures usage, cost, performance (TTFC, tokens/sec), and behavioral (finish reason, operation type) metrics.

apps/webapp/app/assets/icons/AiProviderIcons.tsx

Lines changed: 177 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
export function AnthropicLogoIcon({ className }: { className?: string }) {
2+
return (
3+
<svg
4+
className={className}
5+
viewBox="0 0 24 24"
6+
fill="currentColor"
7+
xmlns="http://www.w3.org/2000/svg"
8+
>
9+
<path d="M17.3041 3.541h-3.6718l6.696 16.918H24Zm-10.6082 0L0 20.459h3.7442l1.3693-3.5527h7.0052l1.3693 3.5528h3.7442L10.5363 3.5409Zm-.3712 10.2232 2.2914-5.9456 2.2914 5.9456Z" />
10+
</svg>
11+
);
12+
}

0 commit comments

Comments
 (0)