Skip to content

Query API and SDK#3060

Open
matt-aitken wants to merge 15 commits intomainfrom
query-api
Open

Query API and SDK#3060
matt-aitken wants to merge 15 commits intomainfrom
query-api

Conversation

@matt-aitken
Copy link
Member

@matt-aitken matt-aitken commented Feb 14, 2026

Summary

  • Add API endpoint to run TRQL queries
  • Implement SDK function for executing queries

SDK

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.

import { query } from "@trigger.dev/sdk";
import type { QueryTable } from "@trigger.dev/sdk";

// Basic untyped query
const result = await query.execute("SELECT run_id, status FROM runs LIMIT 10");

// Type-safe query using QueryTable to pick specific columns
const typedResult = await query.execute<QueryTable<"runs", "run_id" | "status" | "triggered_at">>(
  "SELECT run_id, status, triggered_at FROM runs LIMIT 10"
);
typedResult.results.forEach(row => {
  console.log(row.run_id, row.status); // Fully typed
});

// Aggregation query with inline types
const stats = await query.execute<{ status: string; count: number }>(
  "SELECT status, COUNT(*) as count FROM runs GROUP BY status",
  { scope: "project", period: "30d" }
);

// CSV export
const csv = await query.execute(
  "SELECT run_id, status FROM runs",
  { format: "csv", period: "7d" }
);
console.log(csv.results); // Raw CSV string

@changeset-bot
Copy link

changeset-bot bot commented Feb 14, 2026

🦋 Changeset detected

Latest commit: ce9e37c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 28 packages
Name Type
@trigger.dev/sdk Minor
@trigger.dev/python Minor
@internal/sdk-compat-tests Patch
d3-chat Patch
references-d3-openai-agents Patch
references-nextjs-realtime Patch
references-realtime-hooks-test Patch
references-realtime-streams Patch
references-telemetry Patch
@trigger.dev/build Minor
@trigger.dev/core Minor
@trigger.dev/react-hooks Minor
@trigger.dev/redis-worker Minor
@trigger.dev/rsc Minor
@trigger.dev/schema-to-json Minor
@trigger.dev/database Minor
@trigger.dev/otlp-importer Minor
trigger.dev Minor
@internal/cache Patch
@internal/clickhouse Patch
@internal/redis Patch
@internal/replication Patch
@internal/run-engine Patch
@internal/schedule-engine Patch
@internal/testcontainers Patch
@internal/tracing Patch
@internal/tsql Patch
@internal/zod-worker Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 14, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds full query support: new query schemas and types in core (request/response shapes, RunsTableRow, RunFriendlyStatus) and re-exports; a new ApiClient.executeQuery method; SDK-level query.execute with JSON/CSV overloads and tracing metadata; a Remix action route to run queries and return JSON or CSV; a small UI change adding a "query" icon and re-exporting run-friendly status from core.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

🚥 Pre-merge checks | ✅ 1 | ❌ 3
❌ Failed checks (3 warnings)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Merge Conflict Detection ⚠️ Warning ❌ Merge conflicts detected (22 files):

⚔️ apps/webapp/app/components/Shortcuts.tsx (content)
⚔️ apps/webapp/app/components/code/ChartConfigPanel.tsx (content)
⚔️ apps/webapp/app/components/code/QueryResultsChart.tsx (content)
⚔️ apps/webapp/app/components/code/TSQLResultsTable.tsx (content)
⚔️ apps/webapp/app/components/metrics/QueryWidget.tsx (content)
⚔️ apps/webapp/app/components/metrics/SaveToDashboardDialog.tsx (content)
⚔️ apps/webapp/app/components/primitives/ClientTabs.tsx (content)
⚔️ apps/webapp/app/components/primitives/SegmentedControl.tsx (content)
⚔️ apps/webapp/app/components/primitives/ShortcutKey.tsx (content)
⚔️ apps/webapp/app/components/primitives/charts/BigNumberCard.tsx (content)
⚔️ apps/webapp/app/components/primitives/charts/Card.tsx (content)
⚔️ apps/webapp/app/components/primitives/charts/ChartBar.tsx (content)
⚔️ apps/webapp/app/components/primitives/charts/ChartLegendCompound.tsx (content)
⚔️ apps/webapp/app/components/query/QueryEditor.tsx (content)
⚔️ apps/webapp/app/components/runs/v3/RunIcon.tsx (content)
⚔️ apps/webapp/app/components/runs/v3/TaskRunStatus.tsx (content)
⚔️ apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.query/AITabContent.tsx (content)
⚔️ docs/realtime/react-hooks/subscribe.mdx (content)
⚔️ docs/troubleshooting.mdx (content)
⚔️ packages/core/src/v3/apiClient/index.ts (content)
⚔️ packages/core/src/v3/schemas/index.ts (content)
⚔️ packages/trigger-sdk/src/v3/index.ts (content)

These conflicts must be resolved before merging into main.
Resolve conflicts locally and push changes to this branch.
Description check ⚠️ Warning The PR description provides a good overview of the changes with code examples, but is missing required template sections like issue reference, checklist, and testing details. Add the required template sections: issue reference (Closes #), checklist items, testing description, and changelog section to meet the repository's PR description standards.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Query API and SDK' is concise and directly reflects the main changes: adding a query API endpoint and SDK function for executing TRQL queries.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch query-api

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@apps/webapp/app/routes/api.v1.query.ts`:
- Around line 42-53: The handler currently returns status 400 for all
non-success queryResult cases; change it to return 400 only when
queryResult.error is an instance of QueryError and return 500 for all other
unexpected errors. In the block that checks !queryResult.success (using symbols
queryResult and QueryError), keep the existing message logic and logger.error
call, but set the response status passed to json(...) to 400 when
queryResult.error instanceof QueryError, otherwise 500.

In `@packages/core/src/v3/schemas/query.ts`:
- Line 28: The exported type QueryExecuteJSONResponseBody is incorrectly
inferred from the discriminated union QueryExecuteResponseBody; update the type
alias to infer from the JSON-only Zod schema (replace z.infer<typeof
QueryExecuteResponseBody> with z.infer<typeof <the JSON-only schema>), i.e.,
point QueryExecuteJSONResponseBody at the JSON-only schema (e.g.,
QueryExecuteJSONResponseBodySchema or the actual JSON variant schema name)
instead of QueryExecuteResponseBody so the alias represents only the JSON
variant.
🧹 Nitpick comments (7)
packages/core/src/v3/schemas/query.ts (2)

1-1: Unused import: TypeOf.

TypeOf is imported from zod but never used in this file.

🧹 Proposed fix
-import { TypeOf, z } from "zod";
+import { z } from "zod";

88-179: RunsTableRow uses interface instead of type.

Coding guidelines prefer types over interfaces for TypeScript. Consider converting to a type alias, though given the size this is a low-priority nit.

As per coding guidelines: "Use types over interfaces for TypeScript".

packages/core/src/v3/apiClient/index.ts (2)

33-35: Unused imports: QueryExecuteRequestBody and QueryExecuteCSVResponseBody.

Only QueryExecuteResponseBody is referenced in executeQuery. The other two are imported but never used.

🧹 Proposed fix
   QueryExecuteRequestBody,
   QueryExecuteResponseBody,
-  QueryExecuteCSVResponseBody,
+  // Remove unused: QueryExecuteCSVResponseBody

If QueryExecuteRequestBody is also unused:

-  QueryExecuteRequestBody,
   QueryExecuteResponseBody,

1432-1432: Dead code: format variable is assigned but never read.

This appears to be a leftover from a prior iteration. The format is already included in the body object on line 1429.

🧹 Proposed fix
-    const format = options?.format ?? "json";
-    // For JSON, use zodfetch
     return zodfetch(
apps/webapp/app/routes/api.v1.query.ts (1)

9-16: Schema duplicates QueryExecuteRequestBody from @trigger.dev/core/v3.

BodySchema is identical to the QueryExecuteRequestBody schema defined in packages/core/src/v3/schemas/query.ts. Consider importing and reusing it to keep the contract in sync.

♻️ Proposed fix
-const BodySchema = z.object({
-  query: z.string(),
-  scope: z.enum(["organization", "project", "environment"]).default("environment"),
-  period: z.string().nullish(),
-  from: z.string().nullish(),
-  to: z.string().nullish(),
-  format: z.enum(["json", "csv"]).default("json"),
-});
+import { QueryExecuteRequestBody } from "@trigger.dev/core/v3";
+
+// Use the shared schema from core
+const BodySchema = QueryExecuteRequestBody;
packages/trigger-sdk/src/v3/query.ts (2)

1-6: Unused import: QueryExecuteCSVResponseBody.

This type is imported but not referenced anywhere in the file.

🧹 Proposed fix
 import type {
   ApiRequestOptions,
   Prettify,
   QueryExecuteResponseBody,
-  QueryExecuteCSVResponseBody,
 } from "@trigger.dev/core/v3";

156-158: No-op .then() can be removed.

The .then((response) => { return response; }) is a passthrough that adds no value.

🧹 Proposed fix
-  return apiClient.executeQuery(tsql, options, $requestOptions).then((response) => {
-    return response;
-  }) as Promise<{ format: "json"; results: Array<TRow> } | { format: "csv"; results: string }>;
+  return apiClient.executeQuery(tsql, options, $requestOptions) as Promise<
+    { format: "json"; results: Array<TRow> } | { format: "csv"; results: string }
+  >;
📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1d744fa and 8c10ef8.

⛔ Files ignored due to path filters (1)
  • references/hello-world/src/trigger/query.ts is excluded by !references/**
📒 Files selected for processing (8)
  • apps/webapp/app/components/runs/v3/RunIcon.tsx
  • apps/webapp/app/components/runs/v3/TaskRunStatus.tsx
  • apps/webapp/app/routes/api.v1.query.ts
  • packages/core/src/v3/apiClient/index.ts
  • packages/core/src/v3/schemas/index.ts
  • packages/core/src/v3/schemas/query.ts
  • packages/trigger-sdk/src/v3/index.ts
  • packages/trigger-sdk/src/v3/query.ts
🧰 Additional context used
📓 Path-based instructions (9)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

**/*.{ts,tsx}: Use types over interfaces for TypeScript
Avoid using enums; prefer string unions or const objects instead

**/*.{ts,tsx}: Always import tasks from @trigger.dev/sdk, never use @trigger.dev/sdk/v3 or deprecated client.defineJob pattern
Every Trigger.dev task must be exported and have a unique id property with no timeouts in the run function

Files:

  • packages/core/src/v3/schemas/index.ts
  • apps/webapp/app/routes/api.v1.query.ts
  • packages/core/src/v3/apiClient/index.ts
  • apps/webapp/app/components/runs/v3/TaskRunStatus.tsx
  • packages/core/src/v3/schemas/query.ts
  • apps/webapp/app/components/runs/v3/RunIcon.tsx
  • packages/trigger-sdk/src/v3/query.ts
  • packages/trigger-sdk/src/v3/index.ts
{packages/core,apps/webapp}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use zod for validation in packages/core and apps/webapp

Files:

  • packages/core/src/v3/schemas/index.ts
  • apps/webapp/app/routes/api.v1.query.ts
  • packages/core/src/v3/apiClient/index.ts
  • apps/webapp/app/components/runs/v3/TaskRunStatus.tsx
  • packages/core/src/v3/schemas/query.ts
  • apps/webapp/app/components/runs/v3/RunIcon.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use function declarations instead of default exports

Import from @trigger.dev/core using subpaths only, never import from root

Files:

  • packages/core/src/v3/schemas/index.ts
  • apps/webapp/app/routes/api.v1.query.ts
  • packages/core/src/v3/apiClient/index.ts
  • apps/webapp/app/components/runs/v3/TaskRunStatus.tsx
  • packages/core/src/v3/schemas/query.ts
  • apps/webapp/app/components/runs/v3/RunIcon.tsx
  • packages/trigger-sdk/src/v3/query.ts
  • packages/trigger-sdk/src/v3/index.ts
**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/otel-metrics.mdc)

**/*.ts: When creating or editing OTEL metrics (counters, histograms, gauges), ensure metric attributes have low cardinality by using only enums, booleans, bounded error codes, or bounded shard IDs
Do not use high-cardinality attributes in OTEL metrics such as UUIDs/IDs (envId, userId, runId, projectId, organizationId), unbounded integers (itemCount, batchSize, retryCount), timestamps (createdAt, startTime), or free-form strings (errorMessage, taskName, queueName)
When exporting OTEL metrics via OTLP to Prometheus, be aware that the exporter automatically adds unit suffixes to metric names (e.g., 'my_duration_ms' becomes 'my_duration_ms_milliseconds', 'my_counter' becomes 'my_counter_total'). Account for these transformations when writing Grafana dashboards or Prometheus queries

Files:

  • packages/core/src/v3/schemas/index.ts
  • apps/webapp/app/routes/api.v1.query.ts
  • packages/core/src/v3/apiClient/index.ts
  • packages/core/src/v3/schemas/query.ts
  • packages/trigger-sdk/src/v3/query.ts
  • packages/trigger-sdk/src/v3/index.ts
**/*.{js,ts,jsx,tsx,json,md,yaml,yml}

📄 CodeRabbit inference engine (AGENTS.md)

Format code using Prettier before committing

Files:

  • packages/core/src/v3/schemas/index.ts
  • apps/webapp/app/routes/api.v1.query.ts
  • packages/core/src/v3/apiClient/index.ts
  • apps/webapp/app/components/runs/v3/TaskRunStatus.tsx
  • packages/core/src/v3/schemas/query.ts
  • apps/webapp/app/components/runs/v3/RunIcon.tsx
  • packages/trigger-sdk/src/v3/query.ts
  • packages/trigger-sdk/src/v3/index.ts
{packages,integrations}/**/*

📄 CodeRabbit inference engine (CLAUDE.md)

Add a changeset when modifying any public package in packages/* or integrations/* using pnpm run changeset:add

Files:

  • packages/core/src/v3/schemas/index.ts
  • packages/core/src/v3/apiClient/index.ts
  • packages/core/src/v3/schemas/query.ts
  • packages/trigger-sdk/src/v3/query.ts
  • packages/trigger-sdk/src/v3/index.ts
apps/webapp/app/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/webapp.mdc)

Access all environment variables through the env export of env.server.ts instead of directly accessing process.env in the Trigger.dev webapp

Files:

  • apps/webapp/app/routes/api.v1.query.ts
  • apps/webapp/app/components/runs/v3/TaskRunStatus.tsx
  • apps/webapp/app/components/runs/v3/RunIcon.tsx
apps/webapp/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/webapp.mdc)

apps/webapp/**/*.{ts,tsx}: When importing from @trigger.dev/core in the webapp, use subpath exports from the package.json instead of importing from the root path
Follow the Remix 2.1.0 and Express server conventions when updating the main trigger.dev webapp

Access environment variables via env export from apps/webapp/app/env.server.ts, never use process.env directly

Files:

  • apps/webapp/app/routes/api.v1.query.ts
  • apps/webapp/app/components/runs/v3/TaskRunStatus.tsx
  • apps/webapp/app/components/runs/v3/RunIcon.tsx
packages/trigger-sdk/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

In the Trigger.dev SDK (packages/trigger-sdk), prefer isomorphic code like fetch and ReadableStream instead of Node.js-specific code

Files:

  • packages/trigger-sdk/src/v3/query.ts
  • packages/trigger-sdk/src/v3/index.ts
🧠 Learnings (21)
📚 Learning: 2025-11-27T16:26:37.432Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T16:26:37.432Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Use function declarations instead of default exports

Applied to files:

  • packages/core/src/v3/schemas/index.ts
📚 Learning: 2025-11-27T16:26:58.661Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/webapp.mdc:0-0
Timestamp: 2025-11-27T16:26:58.661Z
Learning: Applies to apps/webapp/**/*.{ts,tsx} : Follow the Remix 2.1.0 and Express server conventions when updating the main trigger.dev webapp

Applied to files:

  • apps/webapp/app/routes/api.v1.query.ts
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Export tasks with unique IDs within the project to enable proper task discovery and execution

Applied to files:

  • apps/webapp/app/components/runs/v3/TaskRunStatus.tsx
  • packages/trigger-sdk/src/v3/index.ts
📚 Learning: 2026-01-15T11:50:06.067Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-15T11:50:06.067Z
Learning: Applies to **/*.{ts,tsx} : Every Trigger.dev task must be exported and have a unique `id` property with no timeouts in the run function

Applied to files:

  • apps/webapp/app/components/runs/v3/TaskRunStatus.tsx
📚 Learning: 2026-01-15T11:50:06.067Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-15T11:50:06.067Z
Learning: Applies to **/*.{ts,tsx} : Always import tasks from `trigger.dev/sdk`, never use `trigger.dev/sdk/v3` or deprecated `client.defineJob` pattern

Applied to files:

  • apps/webapp/app/components/runs/v3/TaskRunStatus.tsx
  • packages/trigger-sdk/src/v3/query.ts
  • packages/trigger-sdk/src/v3/index.ts
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `trigger.dev/sdk/v3` for all imports in Trigger.dev tasks

Applied to files:

  • apps/webapp/app/components/runs/v3/TaskRunStatus.tsx
  • packages/trigger-sdk/src/v3/query.ts
  • packages/trigger-sdk/src/v3/index.ts
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Export every task, including subtasks

Applied to files:

  • apps/webapp/app/components/runs/v3/TaskRunStatus.tsx
  • packages/trigger-sdk/src/v3/index.ts
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use the `task()` function from `trigger.dev/sdk/v3` to define tasks with id and run properties

Applied to files:

  • apps/webapp/app/components/runs/v3/TaskRunStatus.tsx
  • packages/trigger-sdk/src/v3/query.ts
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Subscribe to run updates using `runs.subscribeToRun()` for realtime monitoring of task execution

Applied to files:

  • apps/webapp/app/components/runs/v3/TaskRunStatus.tsx
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Attach metadata to task runs using the metadata option when triggering, and access/update it inside runs using metadata functions

Applied to files:

  • apps/webapp/app/components/runs/v3/TaskRunStatus.tsx
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `tasks.trigger()` with type-only imports to trigger tasks from backend code without importing the task implementation

Applied to files:

  • apps/webapp/app/components/runs/v3/TaskRunStatus.tsx
  • packages/trigger-sdk/src/v3/index.ts
📚 Learning: 2025-11-27T16:26:58.661Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/webapp.mdc:0-0
Timestamp: 2025-11-27T16:26:58.661Z
Learning: Applies to apps/webapp/**/*.{ts,tsx} : When importing from `trigger.dev/core` in the webapp, use subpath exports from the package.json instead of importing from the root path

Applied to files:

  • apps/webapp/app/components/runs/v3/TaskRunStatus.tsx
  • packages/trigger-sdk/src/v3/index.ts
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Use `useRun`, `useRealtimeRun` and other SWR/realtime hooks from `trigger.dev/react-hooks` for data fetching

Applied to files:

  • apps/webapp/app/components/runs/v3/TaskRunStatus.tsx
📚 Learning: 2024-10-18T15:41:52.352Z
Learnt from: nicktrn
Repo: triggerdotdev/trigger.dev PR: 1418
File: packages/core/src/v3/errors.ts:364-371
Timestamp: 2024-10-18T15:41:52.352Z
Learning: In `packages/core/src/v3/errors.ts`, within the `taskRunErrorEnhancer` function, `error.message` is always defined, so it's safe to directly call `error.message.includes("SIGTERM")` without additional checks.

Applied to files:

  • apps/webapp/app/components/runs/v3/TaskRunStatus.tsx
📚 Learning: 2026-02-11T16:37:32.429Z
Learnt from: matt-aitken
Repo: triggerdotdev/trigger.dev PR: 3019
File: apps/webapp/app/components/primitives/charts/Card.tsx:26-30
Timestamp: 2026-02-11T16:37:32.429Z
Learning: In projects using react-grid-layout, avoid relying on drag-handle class to imply draggability. Ensure drag-handle elements only affect dragging when the parent grid item is configured draggable in the layout; conditionally apply cursor styles based on the draggable prop. This improves correctness and accessibility.

Applied to files:

  • apps/webapp/app/components/runs/v3/TaskRunStatus.tsx
  • apps/webapp/app/components/runs/v3/RunIcon.tsx
📚 Learning: 2026-02-03T18:27:49.039Z
Learnt from: 0ski
Repo: triggerdotdev/trigger.dev PR: 2994
File: apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.environment-variables/route.tsx:553-555
Timestamp: 2026-02-03T18:27:49.039Z
Learning: In apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.environment-variables/route.tsx, the menu buttons (like the Edit button with PencilSquareIcon) intentionally have no text labels - only icons are shown in the TableCellMenu. This is a deliberate UI design pattern for compact icon-only menu items.

Applied to files:

  • apps/webapp/app/components/runs/v3/RunIcon.tsx
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `schemaTask()` from `trigger.dev/sdk/v3` with Zod schema for payload validation

Applied to files:

  • packages/trigger-sdk/src/v3/query.ts
  • packages/trigger-sdk/src/v3/index.ts
📚 Learning: 2025-11-27T16:26:37.432Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T16:26:37.432Z
Learning: Applies to packages/trigger-sdk/**/*.{ts,tsx} : In the Trigger.dev SDK (packages/trigger-sdk), prefer isomorphic code like fetch and ReadableStream instead of Node.js-specific code

Applied to files:

  • packages/trigger-sdk/src/v3/query.ts
  • packages/trigger-sdk/src/v3/index.ts
📚 Learning: 2025-11-27T16:26:37.432Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T16:26:37.432Z
Learning: The SDK at packages/trigger-sdk is an isomorphic TypeScript SDK

Applied to files:

  • packages/trigger-sdk/src/v3/index.ts
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger.config.ts : Configure OpenTelemetry instrumentations and exporters in trigger.config.ts for enhanced logging

Applied to files:

  • packages/trigger-sdk/src/v3/index.ts
📚 Learning: 2025-11-27T16:26:37.432Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T16:26:37.432Z
Learning: Applies to internal-packages/database/**/*.{ts,tsx} : Use Prisma for database interactions in internal-packages/database with PostgreSQL

Applied to files:

  • packages/trigger-sdk/src/v3/index.ts
🧬 Code graph analysis (3)
apps/webapp/app/routes/api.v1.query.ts (3)
packages/core/src/v3/apiClient/index.ts (1)
  • executeQuery (1412-1444)
packages/trigger-sdk/src/v3/query.ts (1)
  • QueryScope (12-12)
apps/webapp/app/utils/dataExport.ts (1)
  • rowsToCSV (36-50)
packages/core/src/v3/apiClient/index.ts (2)
packages/core/src/v3/apiClient/core.ts (2)
  • ZodFetchOptions (31-39)
  • zodfetch (71-78)
packages/core/src/v3/schemas/query.ts (2)
  • QueryExecuteResponseBody (40-43)
  • QueryExecuteResponseBody (44-44)
packages/core/src/v3/schemas/query.ts (2)
apps/webapp/app/components/runs/v3/TaskRunStatus.tsx (2)
  • runFriendlyStatus (254-254)
  • RunFriendlyStatus (254-254)
packages/trigger-sdk/src/v3/query.ts (3)
  • RunFriendlyStatus (10-10)
  • RunsTableRow (10-10)
  • QueryTable (10-10)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (26)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (1, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (7, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (6, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (4, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (8, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (2, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (3, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (5, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (8, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (1, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (7, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (4, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (2, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (5, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (3, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (6, 8)
  • GitHub Check: units / packages / 🧪 Unit Tests: Packages (1, 1)
  • GitHub Check: sdk-compat / Cloudflare Workers
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - npm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - pnpm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - pnpm)
  • GitHub Check: sdk-compat / Node.js 22.12 (ubuntu-latest)
  • GitHub Check: sdk-compat / Deno Runtime
  • GitHub Check: sdk-compat / Node.js 20.20 (ubuntu-latest)
  • GitHub Check: typecheck / typecheck
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (6)
apps/webapp/app/components/runs/v3/TaskRunStatus.tsx (1)

15-15: LGTM — re-export from core with local usage is clean.

The import on line 15 supplies runFriendlyStatus for local runtime use (e.g., isRunFriendlyStatus), and the re-export on line 254 preserves the public API for existing consumers. Subpath import from @trigger.dev/core/v3 aligns with the coding guidelines.

Also applies to: 252-254

apps/webapp/app/components/runs/v3/RunIcon.tsx (1)

7-7: LGTM — TableCellsIcon import and streams formatting.

The new import and the minor whitespace adjustment on the "streams" case are fine.

Also applies to: 116-116

packages/core/src/v3/schemas/index.ts (1)

18-18: LGTM!

Re-export of ./query.js is consistent with the existing pattern in this barrel file.

packages/core/src/v3/apiClient/index.ts (1)

1412-1444: LGTM on the executeQuery method structure.

The method correctly follows the existing zodfetch pattern used throughout the class, with proper header injection, body serialization, and request option merging.

packages/trigger-sdk/src/v3/query.ts (1)

60-158: Well-designed overloads and type-safe API surface.

The CSV/JSON overloads with discriminated return types provide excellent DX. The generic TRow parameter for JSON queries and the Prettify wrapper are nice touches.

packages/trigger-sdk/src/v3/index.ts (1)

20-20: LGTM!

Re-export of ./query.js follows the established pattern and surfaces the new query API from the SDK's public entry point.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@packages/trigger-sdk/src/v3/query.ts`:
- Around line 155-157: Add a changeset documenting the new public API export
`query.execute` so consumers are notified; run the changeset tool (e.g., `pnpm
run changeset:add`), select the appropriate package (`@trigger.dev/sdk` or
packages/trigger-sdk), describe the change as an addition to the public API for
`query.execute`, choose the correct release type (minor), and save the generated
changeset file to the repo so the bump is included in the next release.
🧹 Nitpick comments (1)
packages/trigger-sdk/src/v3/query.ts (1)

150-152: Remove the redundant .then() — it's an identity transform.

The .then((response) => { return response; }) doesn't transform anything. Cast the promise directly.

♻️ Suggested simplification
-  return apiClient.executeQuery(query, options, $requestOptions).then((response) => {
-    return response;
-  }) as Promise<{ format: "json"; results: Array<TRow> } | { format: "csv"; results: string }>;
+  return apiClient.executeQuery(query, options, $requestOptions) as Promise<
+    { format: "json"; results: Array<TRow> } | { format: "csv"; results: string }
+  >;
📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f105b8f and 885d17e.

📒 Files selected for processing (1)
  • packages/trigger-sdk/src/v3/query.ts
🧰 Additional context used
📓 Path-based instructions (6)
packages/trigger-sdk/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

In the Trigger.dev SDK (packages/trigger-sdk), prefer isomorphic code like fetch and ReadableStream instead of Node.js-specific code

Files:

  • packages/trigger-sdk/src/v3/query.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

**/*.{ts,tsx}: Use types over interfaces for TypeScript
Avoid using enums; prefer string unions or const objects instead

**/*.{ts,tsx}: Always import tasks from @trigger.dev/sdk, never use @trigger.dev/sdk/v3 or deprecated client.defineJob pattern
Every Trigger.dev task must be exported and have a unique id property with no timeouts in the run function

Files:

  • packages/trigger-sdk/src/v3/query.ts
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use function declarations instead of default exports

Import from @trigger.dev/core using subpaths only, never import from root

Files:

  • packages/trigger-sdk/src/v3/query.ts
**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/otel-metrics.mdc)

**/*.ts: When creating or editing OTEL metrics (counters, histograms, gauges), ensure metric attributes have low cardinality by using only enums, booleans, bounded error codes, or bounded shard IDs
Do not use high-cardinality attributes in OTEL metrics such as UUIDs/IDs (envId, userId, runId, projectId, organizationId), unbounded integers (itemCount, batchSize, retryCount), timestamps (createdAt, startTime), or free-form strings (errorMessage, taskName, queueName)
When exporting OTEL metrics via OTLP to Prometheus, be aware that the exporter automatically adds unit suffixes to metric names (e.g., 'my_duration_ms' becomes 'my_duration_ms_milliseconds', 'my_counter' becomes 'my_counter_total'). Account for these transformations when writing Grafana dashboards or Prometheus queries

Files:

  • packages/trigger-sdk/src/v3/query.ts
**/*.{js,ts,jsx,tsx,json,md,yaml,yml}

📄 CodeRabbit inference engine (AGENTS.md)

Format code using Prettier before committing

Files:

  • packages/trigger-sdk/src/v3/query.ts
{packages,integrations}/**/*

📄 CodeRabbit inference engine (CLAUDE.md)

Add a changeset when modifying any public package in packages/* or integrations/* using pnpm run changeset:add

Files:

  • packages/trigger-sdk/src/v3/query.ts
🧠 Learnings (11)
📓 Common learnings
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T16:26:37.432Z
Learning: The SDK at packages/trigger-sdk is an isomorphic TypeScript SDK
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `trigger.dev/sdk/v3` for all imports in Trigger.dev tasks

Applied to files:

  • packages/trigger-sdk/src/v3/query.ts
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `schemaTask()` from `trigger.dev/sdk/v3` with Zod schema for payload validation

Applied to files:

  • packages/trigger-sdk/src/v3/query.ts
📚 Learning: 2025-11-27T16:26:37.432Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T16:26:37.432Z
Learning: Applies to packages/trigger-sdk/**/*.{ts,tsx} : In the Trigger.dev SDK (packages/trigger-sdk), prefer isomorphic code like fetch and ReadableStream instead of Node.js-specific code

Applied to files:

  • packages/trigger-sdk/src/v3/query.ts
📚 Learning: 2026-01-15T11:50:06.067Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-15T11:50:06.067Z
Learning: Applies to **/*.{ts,tsx} : Always import tasks from `trigger.dev/sdk`, never use `trigger.dev/sdk/v3` or deprecated `client.defineJob` pattern

Applied to files:

  • packages/trigger-sdk/src/v3/query.ts
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use the `task()` function from `trigger.dev/sdk/v3` to define tasks with id and run properties

Applied to files:

  • packages/trigger-sdk/src/v3/query.ts
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Export tasks with unique IDs within the project to enable proper task discovery and execution

Applied to files:

  • packages/trigger-sdk/src/v3/query.ts
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger.config.ts : Use build extensions in trigger.config.ts (additionalFiles, additionalPackages, aptGet, prismaExtension, etc.) to customize the build

Applied to files:

  • packages/trigger-sdk/src/v3/query.ts
📚 Learning: 2025-11-27T16:26:37.432Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T16:26:37.432Z
Learning: The SDK at packages/trigger-sdk is an isomorphic TypeScript SDK

Applied to files:

  • packages/trigger-sdk/src/v3/query.ts
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger.config.ts : Configure OpenTelemetry instrumentations and exporters in trigger.config.ts for enhanced logging

Applied to files:

  • packages/trigger-sdk/src/v3/query.ts
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use logger methods (debug, log, info, warn, error) from `trigger.dev/sdk/v3` for structured logging in tasks

Applied to files:

  • packages/trigger-sdk/src/v3/query.ts
🧬 Code graph analysis (1)
packages/trigger-sdk/src/v3/query.ts (2)
packages/core/src/v3/apiClient/index.ts (2)
  • ApiRequestOptions (158-158)
  • mergeRequestOptions (1840-1856)
apps/webapp/app/lib.es5.d.ts (1)
  • Prettify (13-15)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (27)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (7, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (6, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (5, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (4, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (8, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (3, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (5, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (6, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (1, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (1, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (7, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (4, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (2, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (8, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (3, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (2, 8)
  • GitHub Check: units / packages / 🧪 Unit Tests: Packages (1, 1)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - pnpm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - npm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - pnpm)
  • GitHub Check: sdk-compat / Deno Runtime
  • GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - npm)
  • GitHub Check: sdk-compat / Bun Runtime
  • GitHub Check: sdk-compat / Cloudflare Workers
  • GitHub Check: typecheck / typecheck
  • GitHub Check: sdk-compat / Node.js 22.12 (ubuntu-latest)
  • GitHub Check: sdk-compat / Node.js 20.20 (ubuntu-latest)
🔇 Additional comments (2)
packages/trigger-sdk/src/v3/query.ts (2)

1-55: Clean type definitions and imports.

Types, string unions, subpath imports, and documentation all look good.


57-123: Well-structured overloads with good documentation.

The CSV/JSON overload pattern provides clean type narrowing for consumers. The Prettify<TRow> wrapper on the JSON return type is a nice touch for IDE readability.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @.changeset/afraid-gorillas-jump.md:
- Around line 1-3: Update the changeset so the package bump for
"@trigger.dev/sdk" is "minor" instead of "patch": locate the .changeset entry
that currently reads "@trigger.dev/sdk": patch and change the version kind to
"minor" to reflect the new public API function query.execute().
📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 885d17e and 00a7fa7.

📒 Files selected for processing (1)
  • .changeset/afraid-gorillas-jump.md
🧰 Additional context used
🧠 Learnings (6)
📚 Learning: 2025-11-27T16:26:37.432Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T16:26:37.432Z
Learning: Applies to packages/trigger-sdk/**/*.{ts,tsx} : In the Trigger.dev SDK (packages/trigger-sdk), prefer isomorphic code like fetch and ReadableStream instead of Node.js-specific code

Applied to files:

  • .changeset/afraid-gorillas-jump.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `trigger.dev/sdk/v3` for all imports in Trigger.dev tasks

Applied to files:

  • .changeset/afraid-gorillas-jump.md
📚 Learning: 2025-11-27T16:26:37.432Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T16:26:37.432Z
Learning: The SDK at packages/trigger-sdk is an isomorphic TypeScript SDK

Applied to files:

  • .changeset/afraid-gorillas-jump.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `schemaTask()` from `trigger.dev/sdk/v3` with Zod schema for payload validation

Applied to files:

  • .changeset/afraid-gorillas-jump.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use the `task()` function from `trigger.dev/sdk/v3` to define tasks with id and run properties

Applied to files:

  • .changeset/afraid-gorillas-jump.md
📚 Learning: 2025-11-26T14:40:07.146Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 2710
File: packages/schema-to-json/package.json:0-0
Timestamp: 2025-11-26T14:40:07.146Z
Learning: Node.js 24+ has native TypeScript support and can execute .ts files directly without tsx or ts-node for scripts that use only erasable TypeScript syntax (type annotations, interfaces, etc.). The trigger.dev repository uses Node.js 24.11.1+ and scripts like updateVersion.ts can be run with `node` instead of `tsx`.

Applied to files:

  • .changeset/afraid-gorillas-jump.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (27)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (2, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (6, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (7, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (5, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (1, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (3, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (4, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (8, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (2, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (7, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (8, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (5, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (6, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (1, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (3, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (4, 8)
  • GitHub Check: sdk-compat / Bun Runtime
  • GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - pnpm)
  • GitHub Check: units / packages / 🧪 Unit Tests: Packages (1, 1)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - pnpm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - npm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - npm)
  • GitHub Check: sdk-compat / Node.js 20.20 (ubuntu-latest)
  • GitHub Check: sdk-compat / Deno Runtime
  • GitHub Check: sdk-compat / Cloudflare Workers
  • GitHub Check: sdk-compat / Node.js 22.12 (ubuntu-latest)
  • GitHub Check: typecheck / typecheck
🔇 Additional comments (1)
.changeset/afraid-gorillas-jump.md (1)

5-34: Excellent documentation with comprehensive examples.

The feature description and code examples clearly demonstrate the API's capabilities, covering basic queries, type-safe queries, aggregations, and CSV export. The progressive examples help users understand different use cases effectively.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

@matt-aitken matt-aitken marked this pull request as ready for review February 15, 2026 13:55
Copy link

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

View 4 additional findings in Devin Review.

Open in Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants