Skip to content

Commit 9d90dd8

Browse files
authored
Merge branch 'main' into ea-branch-117
2 parents fcb3813 + 59b6eb9 commit 9d90dd8

File tree

163 files changed

+12301
-3447
lines changed

Some content is hidden

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

163 files changed

+12301
-3447
lines changed

.changeset/afraid-gorillas-jump.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
"@trigger.dev/sdk": minor
3+
---
4+
5+
Added `query.execute()` which lets you query your Trigger.dev data using TRQL (Trigger Query Language) and returns results as typed JSON rows or CSV. It supports configurable scope (environment, project, or organization), time filtering via `period` or `from`/`to` ranges, and a `format` option for JSON or CSV output.
6+
7+
```typescript
8+
import { query } from "@trigger.dev/sdk";
9+
import type { QueryTable } from "@trigger.dev/sdk";
10+
11+
// Basic untyped query
12+
const result = await query.execute("SELECT run_id, status FROM runs LIMIT 10");
13+
14+
// Type-safe query using QueryTable to pick specific columns
15+
const typedResult = await query.execute<QueryTable<"runs", "run_id" | "status" | "triggered_at">>(
16+
"SELECT run_id, status, triggered_at FROM runs LIMIT 10"
17+
);
18+
typedResult.results.forEach(row => {
19+
console.log(row.run_id, row.status); // Fully typed
20+
});
21+
22+
// Aggregation query with inline types
23+
const stats = await query.execute<{ status: string; count: number }>(
24+
"SELECT status, COUNT(*) as count FROM runs GROUP BY status",
25+
{ scope: "project", period: "30d" }
26+
);
27+
28+
// CSV export
29+
const csv = await query.execute(
30+
"SELECT run_id, status FROM runs",
31+
{ format: "csv", period: "7d" }
32+
);
33+
console.log(csv.results); // Raw CSV string
34+
```

.changeset/mcp-wait-timeout.md

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+
Add optional `timeoutInSeconds` parameter to the `wait_for_run_to_complete` MCP tool. Defaults to 60 seconds. If the run doesn't complete within the timeout, the current state of the run is returned instead of waiting indefinitely.

.changeset/tricky-suits-design.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@trigger.dev/sdk": patch
3+
"trigger.dev": patch
4+
"@trigger.dev/core": patch
5+
---
6+
7+
Fixed a minor issue in the deployment command on distinguishing between local builds for the cloud vs local builds for self-hosting setups.

.github/VOUCHED.td

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,7 @@ mpcgrid
1010
myftija
1111
nicktrn
1212
samejr
13-
isshaddad
13+
isshaddad
14+
# Outside contributors
15+
gautamsi
16+
capaj

.vscode/launch.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,15 @@
3131
"cwd": "${workspaceFolder}/apps/webapp",
3232
"sourceMaps": true
3333
},
34+
{
35+
"type": "node-terminal",
36+
"request": "launch",
37+
"name": "Debug opened test file",
38+
"command": "pnpm run test -- ./${relativeFile}",
39+
"envFile": "${workspaceFolder}/.env",
40+
"cwd": "${workspaceFolder}",
41+
"sourceMaps": true
42+
},
3443
{
3544
"type": "chrome",
3645
"request": "launch",

.vscode/settings.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,5 @@
77
"packages/cli-v3/e2e": true
88
},
99
"vitest.disableWorkspaceWarning": true,
10-
"typescript.experimental.useTsgo": true,
1110
"chat.agent.maxRequests": 10000
1211
}

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Please take some time to read this guide to understand contributing best practic
66

77
Thank you for helping us make Trigger.dev even better! 🤩
88

9+
> **Important:** We only accept PRs that address a single issue. Please do not submit PRs containing multiple unrelated fixes or features. If you have multiple contributions, open a separate PR for each one.
10+
911
## Getting vouched (required before opening a PR)
1012

1113
We use [vouch](https://github.com/mitchellh/vouch) to manage contributor trust. **PRs from unvouched users are automatically closed.**

apps/webapp/app/components/AlphaBadge.tsx

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,32 @@ export function AlphaTitle({ children }: { children: React.ReactNode }) {
3030
</>
3131
);
3232
}
33+
34+
export function BetaBadge({
35+
inline = false,
36+
className,
37+
}: {
38+
inline?: boolean;
39+
className?: string;
40+
}) {
41+
return (
42+
<SimpleTooltip
43+
button={
44+
<Badge variant="extra-small" className={cn(inline ? "inline-grid" : "", className)}>
45+
Beta
46+
</Badge>
47+
}
48+
content="This feature is in Beta."
49+
disableHoverableContent
50+
/>
51+
);
52+
}
53+
54+
export function BetaTitle({ children }: { children: React.ReactNode }) {
55+
return (
56+
<>
57+
<span>{children}</span>
58+
<BetaBadge />
59+
</>
60+
);
61+
}
Lines changed: 17 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import { BookOpenIcon } from "@heroicons/react/20/solid";
2-
import { LinkButton } from "./primitives/Buttons";
31
import { Header3 } from "./primitives/Headers";
42
import { Paragraph } from "./primitives/Paragraph";
3+
import { LogLevel } from "./logs/LogLevel";
54

65
export function LogLevelTooltipInfo() {
76
return (
@@ -13,51 +12,45 @@ export function LogLevelTooltipInfo() {
1312
</Paragraph>
1413
</div>
1514
<div>
16-
<div className="mb-0.5">
17-
<Header3 className="text-blue-400">Info</Header3>
15+
<div className="mb-1">
16+
<LogLevel level="TRACE" />
17+
</div>
18+
<Paragraph variant="small" className="text-text-dimmed">
19+
Traces and spans representing the execution flow of your tasks.
20+
</Paragraph>
21+
</div>
22+
<div>
23+
<div className="mb-1">
24+
<LogLevel level="INFO" />
1825
</div>
1926
<Paragraph variant="small" className="text-text-dimmed">
2027
General informational messages about task execution.
2128
</Paragraph>
2229
</div>
2330
<div>
24-
<div className="mb-0.5">
25-
<Header3 className="text-warning">Warn</Header3>
31+
<div className="mb-1">
32+
<LogLevel level="WARN" />
2633
</div>
2734
<Paragraph variant="small" className="text-text-dimmed">
2835
Warning messages indicating potential issues that don't prevent execution.
2936
</Paragraph>
3037
</div>
3138
<div>
32-
<div className="mb-0.5">
33-
<Header3 className="text-error">Error</Header3>
39+
<div className="mb-1">
40+
<LogLevel level="ERROR" />
3441
</div>
3542
<Paragraph variant="small" className="text-text-dimmed">
3643
Error messages for failures and exceptions during task execution.
3744
</Paragraph>
3845
</div>
3946
<div>
40-
<div className="mb-0.5">
41-
<Header3 className="text-charcoal-400">Debug</Header3>
47+
<div className="mb-1">
48+
<LogLevel level="DEBUG" />
4249
</div>
4350
<Paragraph variant="small" className="text-text-dimmed">
4451
Detailed diagnostic information for development and debugging.
4552
</Paragraph>
4653
</div>
47-
<div className="border-t border-charcoal-700 pt-4">
48-
<Header3>Tracing & Spans</Header3>
49-
<Paragraph variant="small" className="text-text-dimmed">
50-
Automatically track the flow of your code through task triggers, attempts, and HTTP
51-
requests. Create custom traces to monitor specific operations.
52-
</Paragraph>
53-
</div>
54-
<LinkButton
55-
to="https://trigger.dev/docs/logging#tracing-and-spans"
56-
variant="docs/small"
57-
LeadingIcon={BookOpenIcon}
58-
>
59-
Read docs
60-
</LinkButton>
6154
</div>
6255
);
6356
}

apps/webapp/app/components/Shortcuts.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,12 @@ function ShortcutContent() {
193193
<ShortcutKey shortcut={{ key: "v" }} variant="medium/bright" />
194194
</Shortcut>
195195
</div>
196+
<div className="space-y-3">
197+
<Header3>Metrics page</Header3>
198+
<Shortcut name="Toggle fullscreen chart">
199+
<ShortcutKey shortcut={{ key: "v" }} variant="medium/bright" />
200+
</Shortcut>
201+
</div>
196202
<div className="space-y-3">
197203
<Header3>Schedules page</Header3>
198204
<Shortcut name="New schedule">

0 commit comments

Comments
 (0)