[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-trigger-dev-trigger-authoring-tasks":3,"mdc--nq8fx8-key":47,"related-repo-trigger-dev-trigger-authoring-tasks":4999,"related-org-trigger-dev-trigger-authoring-tasks":5045},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":24,"repoUrl":25,"updatedAt":26,"license":27,"forks":28,"topics":29,"repo":42,"sourceUrl":45,"mdContent":46},"trigger-authoring-tasks","author backend Trigger.dev tasks","Covers writing backend Trigger.dev tasks with @trigger.dev\u002Fsdk: defining task() and schemaTask(), the run function and its ctx, retries, waits, queues and concurrency, idempotency keys, run metadata, logging, triggering other tasks (and the Result shape), scheduled\u002Fcron tasks, and the essentials of trigger.config.ts. Load this whenever you are authoring or editing code inside a \u002Ftrigger directory, defining a task, or writing backend code that triggers tasks. Realtime\u002FReact hooks and AI chat are covered by separate skills.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"trigger-dev","Trigger.dev","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Ftrigger-dev.jpg","triggerdotdev",[13,17,18,21],{"name":14,"slug":15,"type":16},"Backend","backend","tag",{"name":9,"slug":8,"type":16},{"name":19,"slug":20,"type":16},"SDK","sdk",{"name":22,"slug":23,"type":16},"Workflow Automation","workflow-automation",14401,"https:\u002F\u002Fgithub.com\u002Ftriggerdotdev\u002Ftrigger.dev","2026-07-02T17:12:48.396964",null,1131,[30,31,32,33,34,35,36,37,38,39,40,23,41],"ai","ai-agent-framework","ai-agents","automation","background-jobs","mcp","mcp-server","nextjs","orchestration","scheduler","serverless","workflows",{"repoUrl":25,"stars":24,"forks":28,"topics":43,"description":44},[30,31,32,33,34,35,36,37,38,39,40,23,41],"Trigger.dev – build and deploy fully‑managed AI agents and workflows","https:\u002F\u002Fgithub.com\u002Ftriggerdotdev\u002Ftrigger.dev\u002Ftree\u002FHEAD\u002Fpackages\u002Ftrigger-sdk\u002Fskills\u002Ftrigger-authoring-tasks","---\nname: trigger-authoring-tasks\ndescription: >\n  Covers writing backend Trigger.dev tasks with @trigger.dev\u002Fsdk: defining task() and\n  schemaTask(), the run function and its ctx, retries, waits, queues and concurrency,\n  idempotency keys, run metadata, logging, triggering other tasks (and the Result shape),\n  scheduled\u002Fcron tasks, and the essentials of trigger.config.ts. Load this whenever you are\n  authoring or editing code inside a \u002Ftrigger directory, defining a task, or writing backend\n  code that triggers tasks. Realtime\u002FReact hooks and AI chat are covered by separate skills.\ntype: core\nlibrary: trigger.dev\nsources:\n  - docs\u002Ftasks\u002Foverview.mdx\n  - docs\u002Ftasks\u002FschemaTask.mdx\n  - docs\u002Ftasks\u002Fscheduled.mdx\n  - docs\u002Ftriggering.mdx\n  - docs\u002Fqueue-concurrency.mdx\n  - docs\u002Fidempotency.mdx\n  - docs\u002Fruns\u002Fmetadata.mdx\n  - docs\u002Flogging.mdx\n  - docs\u002Ferrors-retrying.mdx\n  - docs\u002Fwait.mdx\n  - docs\u002Fwait-for.mdx\n  - docs\u002Fwait-until.mdx\n  - docs\u002Fwait-for-token.mdx\n  - docs\u002Fcontext.mdx\n  - docs\u002Fconfig\u002Fconfig-file.mdx\n---\n\n# Authoring Trigger.dev Tasks\n\nTasks are functions that can run for a long time with strong resilience to failure. Define them in files under your `\u002Ftrigger` directory. Always import from `@trigger.dev\u002Fsdk`. Never import from `@trigger.dev\u002Fsdk\u002Fv3` (deprecated alias) or `@trigger.dev\u002Fcore`.\n\n## Setup\n\n```ts\n\u002F\u002F \u002Ftrigger\u002Fhello-world.ts\nimport { task } from \"@trigger.dev\u002Fsdk\";\n\nexport const helloWorld = task({\n  id: \"hello-world\", \u002F\u002F unique within the project\n  run: async (payload: { message: string }, { ctx }) => {\n    console.log(payload.message, \"attempt\", ctx.attempt.number);\n    return { ok: true }; \u002F\u002F must be JSON serializable\n  },\n});\n```\n\nThe `run` function receives the payload and a second argument with `ctx` (run context), an abort `signal`, and a deprecated `init` output. The return value is the task output and must be JSON serializable.\n\n## Core patterns\n\n### 1. Validate the payload with `schemaTask`\n\n`schema` accepts a Zod \u002F Yup \u002F Superstruct \u002F ArkType \u002F valibot \u002F typebox parser or a custom `(data: unknown) => T` function. A validation failure throws `TaskPayloadParsedError` and skips retrying.\n\n```ts\nimport { schemaTask } from \"@trigger.dev\u002Fsdk\";\nimport { z } from \"zod\";\n\nexport const createUser = schemaTask({\n  id: \"create-user\",\n  schema: z.object({ name: z.string(), age: z.number() }),\n  run: async (payload) => ({ greeting: `Hi ${payload.name}` }),\n});\n```\n\n### 2. Configure retries and abort early\n\nThe default `maxAttempts` is 3. Throw `AbortTaskRunError` to stop retrying immediately. Task-level `retry` overrides the config-file defaults.\n\n```ts\nimport { task, AbortTaskRunError } from \"@trigger.dev\u002Fsdk\";\n\nexport const charge = task({\n  id: \"charge\",\n  retry: { maxAttempts: 5, factor: 1.8, minTimeoutInMs: 500, maxTimeoutInMs: 30_000, randomize: true },\n  run: async (payload: { amount: number }) => {\n    if (payload.amount \u003C= 0) throw new AbortTaskRunError(\"Invalid amount\"); \u002F\u002F no retry\n    \u002F\u002F work that may throw and retry\n  },\n});\n```\n\nFor finer control, `catchError: async ({ payload, error, ctx, retryAt }) => {...}` can return `{ skipRetrying: true }`, `{ retryAt: Date }`, or `undefined` (use normal logic). `retry.onThrow`, `retry.fetch`, also exist for in-task retrying.\n\n### 3. Trigger another task and handle the Result\n\nFrom inside a task use `yourTask.triggerAndWait(payload)`. The result is a Result object that you must check (`ok`), or `.unwrap()` to throw on failure.\n\n```ts\nexport const parentTask = task({\n  id: \"parent-task\",\n  run: async () => {\n    const result = await childTask.triggerAndWait({ data: \"x\" });\n    if (result.ok) return result.output; \u002F\u002F typed child output\n    console.error(\"child failed\", result.error);\n    \u002F\u002F or: const output = await childTask.triggerAndWait({ data: \"x\" }).unwrap();\n  },\n});\n```\n\n`SubtaskUnwrapError` carries `runId`, `taskId`, and `cause`. For fan-out use `childTask.batchTriggerAndWait([{ payload: a }, { payload: b }])`; the result has a `.runs` array, each entry `{ ok, id, output?, error?, taskIdentifier }`.\n\n### 4. Trigger from backend code with a type-only import\n\nOutside a task, import the task type only and trigger by id. Do not import the task instance into backend bundles.\n\n```ts\nimport { tasks } from \"@trigger.dev\u002Fsdk\";\nimport type { emailSequence } from \"~\u002Ftrigger\u002Femails\";\n\nconst handle = await tasks.trigger\u003Ctypeof emailSequence>(\n  \"email-sequence\",\n  { to: \"a@b.com\", name: \"Ada\" },\n  { delay: \"1h\" }\n);\n```\n\n`tasks.batchTrigger` and `batch.trigger([{ id, payload }])` cover batches. Trigger options include `delay`, `ttl`, `idempotencyKey`, `idempotencyKeyTTL`, `debounce`, `queue`, `concurrencyKey`, `maxAttempts`, `tags`, `metadata`, `priority`, `region`, and `machine`. Inspect runs with `runs.retrieve`, `runs.cancel`, and `runs.reschedule`.\n\n### 5. Idempotency keys\n\n`idempotencyKeys.create(key, { scope })` returns a 64-char hashed key. A raw string key defaults to `\"run\"` scope (v4.3.1+); for once-ever behavior use `scope: \"global\"`.\n\n```ts\nimport { idempotencyKeys, task } from \"@trigger.dev\u002Fsdk\";\n\nexport const processOrder = task({\n  id: \"process-order\",\n  run: async (payload: { orderId: string; email: string }) => {\n    const key = await idempotencyKeys.create(`confirm-${payload.orderId}`);\n    await sendEmail.trigger({ to: payload.email }, { idempotencyKey: key });\n  },\n});\n```\n\n### 6. Waits and run metadata\n\n`wait.for({ seconds })` and `wait.until({ date })` durably pause the run. `metadata.*` is readable and writable only inside `run()`; updates are synchronous and chainable (`set`, `del`, `replace`, `append`, `remove`, `increment`, `decrement`).\n\n```ts\nimport { task, metadata, wait } from \"@trigger.dev\u002Fsdk\";\n\nexport const importer = task({\n  id: \"importer\",\n  run: async (payload: { rows: unknown[] }) => {\n    metadata.set(\"status\", \"processing\").set(\"total\", payload.rows.length);\n    await wait.for({ seconds: 5 });\n    metadata.set(\"status\", \"complete\");\n  },\n});\n```\n\nFor human-in-the-loop, `wait.createToken({ timeout, tags })` returns `{ id, url, publicAccessToken, ... }`; resume with `wait.forToken\u003CT>(token: string | { id: string })` which returns `{ ok, output?, error? }` (or `.unwrap()`), and complete it elsewhere with `wait.completeToken(tokenId, output)`. Metadata max is 256KB and is not propagated to child tasks; push values to a parent with `metadata.parent.*` \u002F `metadata.root.*`. (`metadata.stream` is deprecated since 4.1.0 in favor of `streams.pipe()`.)\n\n### 7. Scheduled (cron) tasks\n\n```ts\nimport { schedules } from \"@trigger.dev\u002Fsdk\";\n\nexport const dailyReport = schedules.task({\n  id: \"daily-report\",\n  cron: { pattern: \"0 5 * * *\", timezone: \"Asia\u002FTokyo\" },\n  run: async (payload) => {\n    console.log(\"scheduled at\", payload.timestamp, \"next\", payload.upcoming);\n  },\n});\n```\n\nThe payload includes `timestamp`, `lastTimestamp`, `timezone`, `scheduleId`, `externalId`, and `upcoming`. Attach schedules dynamically with `schedules.create({ task, cron, timezone?, externalId?, deduplicationKey })` (the dedup key is required and per-project), plus `retrieve \u002F list \u002F update \u002F activate \u002F deactivate \u002F del \u002F timezones`.\n\n### 8. Queues and concurrency\n\nSet `queue: { concurrencyLimit }` on a task, or share a queue across tasks:\n\n```ts\nimport { queue, task } from \"@trigger.dev\u002Fsdk\";\n\nexport const emails = queue({ name: \"emails\", concurrencyLimit: 5 });\n\nexport const sendEmail = task({ id: \"send-email\", queue: emails, run: async () => {} });\n```\n\nAt trigger time override with `{ queue: \"queue-name\" }` and add `concurrencyKey` for per-tenant queues. Manage queues with `queues.list \u002F retrieve \u002F pause \u002F resume \u002F overrideConcurrencyLimit \u002F resetConcurrencyLimit`.\n\n### 9. `trigger.config.ts` essentials\n\n```ts\nimport { defineConfig } from \"@trigger.dev\u002Fsdk\";\n\nexport default defineConfig({\n  project: \"\u003Cproject ref>\",\n  dirs: [\".\u002Ftrigger\"],\n  machine: \"small-1x\",\n  retries: {\n    enabledInDev: false,\n    default: { maxAttempts: 3, factor: 2, minTimeoutInMs: 1000, maxTimeoutInMs: 10000, randomize: true },\n  },\n});\n```\n\n`build.external` controls which packages stay out of the bundle. Build extensions (`additionalFiles`, `prismaExtension`, `puppeteer`, `playwright`, `ffmpeg`, `pythonExtension`, `aptGet`, `syncEnvVars`, etc.) come from `@trigger.dev\u002Fbuild`. `telemetry` configures instrumentations and exporters. Each extension has its own setup doc, all bundled under `@trigger.dev\u002Fsdk\u002Fdocs\u002Fconfig\u002Fextensions\u002F` (start with `overview.mdx`); read the one you need before wiring it up rather than guessing the API.\n\n### Logging\n\n`logger.debug \u002F log \u002F info \u002F warn \u002F error(message, dataRecord?)` write structured logs; `logger.trace(name, async (span) => {...})` adds a span. Module-level metrics use `otel.metrics.getMeter(name)`.\n\n## Common mistakes\n\n1. **CRITICAL: Treating the wait result as the output.** `triggerAndWait` and `wait.forToken` return a Result object, not the raw output.\n   - Wrong: `const out = await childTask.triggerAndWait(p); use(out.foo);`\n   - Correct: `const r = await childTask.triggerAndWait(p); if (r.ok) use(r.output.foo);` (or `.unwrap()`).\n\n2. **Wrapping `triggerAndWait` \u002F `batchTriggerAndWait` \u002F `wait` in `Promise.all`.**\n   - Wrong: `await Promise.all([childTask.triggerAndWait(a), childTask.triggerAndWait(b)]);`\n   - Correct: `await childTask.batchTriggerAndWait([{ payload: a }, { payload: b }]);` (or a sequential for-loop).\n\n3. **Importing the task instance into backend code.**\n   - Wrong: `import { emailSequence } from \"~\u002Ftrigger\u002Femails\";` in a route handler.\n   - Correct: `import type { emailSequence }` plus `tasks.trigger\u003Ctypeof emailSequence>(\"email-sequence\", payload)`.\n\n4. **Calling `metadata.set\u002Fget` outside `run()`.**\n   - Wrong: setting metadata at module scope or in unrelated backend code (a no-op; `get` returns `undefined`).\n   - Correct: call inside `run()` or a task lifecycle hook.\n\n5. **Assuming child tasks inherit the parent's queue or metadata.**\n   - Wrong: expecting a subtask to share the parent's `concurrencyLimit` or see its metadata.\n   - Correct: subtasks run on their own queue; pass metadata explicitly via `{ metadata: metadata.current() }`, or push up with `metadata.parent.*`.\n\n6. **Bundling native\u002FWASM packages.**\n   - Wrong: leaving `sharp`, `re2`, `sqlite3`, or WASM packages in the default bundle.\n   - Correct: add them to `build.external` in `trigger.config.ts`.\n\n7. **Relying on a raw string idempotency key being global.**\n   - Wrong: `trigger(p, { idempotencyKey: \"welcome-email\" })` expecting once-ever (true only in v4.3.0 and earlier).\n   - Correct: `await idempotencyKeys.create(\"welcome-email\", { scope: \"global\" })`.\n\n## References\n\nSibling skills:\n\n- **trigger-realtime-and-frontend** for subscribing to runs and triggering from the frontend with React hooks.\n- **trigger-authoring-chat-agent** and **trigger-chat-agent-advanced** for building AI chat agents.\n\nReference docs ship beside this skill in the same package, read them locally (no network), pinned to your installed version. The `sources:` frontmatter above lists every doc this skill draws from, all under `@trigger.dev\u002Fsdk\u002Fdocs\u002F`. Start with:\n\n- `@trigger.dev\u002Fsdk\u002Fdocs\u002Ftasks\u002Foverview.mdx`\n- `@trigger.dev\u002Fsdk\u002Fdocs\u002Ftriggering.mdx`\n- `@trigger.dev\u002Fsdk\u002Fdocs\u002Fconfig\u002Fconfig-file.mdx`\n\n## Version\n\nThis skill is bundled inside `@trigger.dev\u002Fsdk` and read directly from `node_modules`, so it always matches your installed SDK version (see the adjacent `package.json`). The full documentation for these APIs ships alongside it under `@trigger.dev\u002Fsdk\u002Fdocs\u002F`.\n",{"data":48,"body":67},{"name":4,"description":6,"type":49,"library":50,"sources":51},"core","trigger.dev",[52,53,54,55,56,57,58,59,60,61,62,63,64,65,66],"docs\u002Ftasks\u002Foverview.mdx","docs\u002Ftasks\u002FschemaTask.mdx","docs\u002Ftasks\u002Fscheduled.mdx","docs\u002Ftriggering.mdx","docs\u002Fqueue-concurrency.mdx","docs\u002Fidempotency.mdx","docs\u002Fruns\u002Fmetadata.mdx","docs\u002Flogging.mdx","docs\u002Ferrors-retrying.mdx","docs\u002Fwait.mdx","docs\u002Fwait-for.mdx","docs\u002Fwait-until.mdx","docs\u002Fwait-for-token.mdx","docs\u002Fcontext.mdx","docs\u002Fconfig\u002Fconfig-file.mdx",{"type":68,"children":69},"root",[70,79,118,125,519,556,562,575,602,969,975,1004,1405,1457,1463,1492,1808,1865,1871,1876,2154,2285,2291,2317,2694,2700,2784,3222,3306,3312,3651,3712,3718,3731,3995,4022,4036,4371,4471,4477,4503,4509,4862,4868,4873,4902,4923,4953,4959,4993],{"type":71,"tag":72,"props":73,"children":75},"element","h1",{"id":74},"authoring-triggerdev-tasks",[76],{"type":77,"value":78},"text","Authoring Trigger.dev Tasks",{"type":71,"tag":80,"props":81,"children":82},"p",{},[83,85,92,94,100,102,108,110,116],{"type":77,"value":84},"Tasks are functions that can run for a long time with strong resilience to failure. Define them in files under your ",{"type":71,"tag":86,"props":87,"children":89},"code",{"className":88},[],[90],{"type":77,"value":91},"\u002Ftrigger",{"type":77,"value":93}," directory. Always import from ",{"type":71,"tag":86,"props":95,"children":97},{"className":96},[],[98],{"type":77,"value":99},"@trigger.dev\u002Fsdk",{"type":77,"value":101},". Never import from ",{"type":71,"tag":86,"props":103,"children":105},{"className":104},[],[106],{"type":77,"value":107},"@trigger.dev\u002Fsdk\u002Fv3",{"type":77,"value":109}," (deprecated alias) or ",{"type":71,"tag":86,"props":111,"children":113},{"className":112},[],[114],{"type":77,"value":115},"@trigger.dev\u002Fcore",{"type":77,"value":117},".",{"type":71,"tag":119,"props":120,"children":122},"h2",{"id":121},"setup",[123],{"type":77,"value":124},"Setup",{"type":71,"tag":126,"props":127,"children":132},"pre",{"className":128,"code":129,"language":130,"meta":131,"style":131},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F \u002Ftrigger\u002Fhello-world.ts\nimport { task } from \"@trigger.dev\u002Fsdk\";\n\nexport const helloWorld = task({\n  id: \"hello-world\", \u002F\u002F unique within the project\n  run: async (payload: { message: string }, { ctx }) => {\n    console.log(payload.message, \"attempt\", ctx.attempt.number);\n    return { ok: true }; \u002F\u002F must be JSON serializable\n  },\n});\n","ts","",[133],{"type":71,"tag":86,"props":134,"children":135},{"__ignoreMap":131},[136,148,200,210,250,288,369,455,493,502],{"type":71,"tag":137,"props":138,"children":141},"span",{"class":139,"line":140},"line",1,[142],{"type":71,"tag":137,"props":143,"children":145},{"style":144},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[146],{"type":77,"value":147},"\u002F\u002F \u002Ftrigger\u002Fhello-world.ts\n",{"type":71,"tag":137,"props":149,"children":151},{"class":139,"line":150},2,[152,158,164,170,175,180,185,190,195],{"type":71,"tag":137,"props":153,"children":155},{"style":154},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[156],{"type":77,"value":157},"import",{"type":71,"tag":137,"props":159,"children":161},{"style":160},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[162],{"type":77,"value":163}," {",{"type":71,"tag":137,"props":165,"children":167},{"style":166},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[168],{"type":77,"value":169}," task",{"type":71,"tag":137,"props":171,"children":172},{"style":160},[173],{"type":77,"value":174}," }",{"type":71,"tag":137,"props":176,"children":177},{"style":154},[178],{"type":77,"value":179}," from",{"type":71,"tag":137,"props":181,"children":182},{"style":160},[183],{"type":77,"value":184}," \"",{"type":71,"tag":137,"props":186,"children":188},{"style":187},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[189],{"type":77,"value":99},{"type":71,"tag":137,"props":191,"children":192},{"style":160},[193],{"type":77,"value":194},"\"",{"type":71,"tag":137,"props":196,"children":197},{"style":160},[198],{"type":77,"value":199},";\n",{"type":71,"tag":137,"props":201,"children":203},{"class":139,"line":202},3,[204],{"type":71,"tag":137,"props":205,"children":207},{"emptyLinePlaceholder":206},true,[208],{"type":77,"value":209},"\n",{"type":71,"tag":137,"props":211,"children":213},{"class":139,"line":212},4,[214,219,225,230,235,240,245],{"type":71,"tag":137,"props":215,"children":216},{"style":154},[217],{"type":77,"value":218},"export",{"type":71,"tag":137,"props":220,"children":222},{"style":221},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[223],{"type":77,"value":224}," const",{"type":71,"tag":137,"props":226,"children":227},{"style":166},[228],{"type":77,"value":229}," helloWorld ",{"type":71,"tag":137,"props":231,"children":232},{"style":160},[233],{"type":77,"value":234},"=",{"type":71,"tag":137,"props":236,"children":238},{"style":237},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[239],{"type":77,"value":169},{"type":71,"tag":137,"props":241,"children":242},{"style":166},[243],{"type":77,"value":244},"(",{"type":71,"tag":137,"props":246,"children":247},{"style":160},[248],{"type":77,"value":249},"{\n",{"type":71,"tag":137,"props":251,"children":253},{"class":139,"line":252},5,[254,260,265,269,274,278,283],{"type":71,"tag":137,"props":255,"children":257},{"style":256},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[258],{"type":77,"value":259},"  id",{"type":71,"tag":137,"props":261,"children":262},{"style":160},[263],{"type":77,"value":264},":",{"type":71,"tag":137,"props":266,"children":267},{"style":160},[268],{"type":77,"value":184},{"type":71,"tag":137,"props":270,"children":271},{"style":187},[272],{"type":77,"value":273},"hello-world",{"type":71,"tag":137,"props":275,"children":276},{"style":160},[277],{"type":77,"value":194},{"type":71,"tag":137,"props":279,"children":280},{"style":160},[281],{"type":77,"value":282},",",{"type":71,"tag":137,"props":284,"children":285},{"style":144},[286],{"type":77,"value":287}," \u002F\u002F unique within the project\n",{"type":71,"tag":137,"props":289,"children":291},{"class":139,"line":290},6,[292,297,301,306,311,317,321,325,330,334,340,345,349,354,359,364],{"type":71,"tag":137,"props":293,"children":294},{"style":237},[295],{"type":77,"value":296},"  run",{"type":71,"tag":137,"props":298,"children":299},{"style":160},[300],{"type":77,"value":264},{"type":71,"tag":137,"props":302,"children":303},{"style":221},[304],{"type":77,"value":305}," async",{"type":71,"tag":137,"props":307,"children":308},{"style":160},[309],{"type":77,"value":310}," (",{"type":71,"tag":137,"props":312,"children":314},{"style":313},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[315],{"type":77,"value":316},"payload",{"type":71,"tag":137,"props":318,"children":319},{"style":160},[320],{"type":77,"value":264},{"type":71,"tag":137,"props":322,"children":323},{"style":160},[324],{"type":77,"value":163},{"type":71,"tag":137,"props":326,"children":327},{"style":256},[328],{"type":77,"value":329}," message",{"type":71,"tag":137,"props":331,"children":332},{"style":160},[333],{"type":77,"value":264},{"type":71,"tag":137,"props":335,"children":337},{"style":336},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[338],{"type":77,"value":339}," string",{"type":71,"tag":137,"props":341,"children":342},{"style":160},[343],{"type":77,"value":344}," },",{"type":71,"tag":137,"props":346,"children":347},{"style":160},[348],{"type":77,"value":163},{"type":71,"tag":137,"props":350,"children":351},{"style":313},[352],{"type":77,"value":353}," ctx",{"type":71,"tag":137,"props":355,"children":356},{"style":160},[357],{"type":77,"value":358}," })",{"type":71,"tag":137,"props":360,"children":361},{"style":221},[362],{"type":77,"value":363}," =>",{"type":71,"tag":137,"props":365,"children":366},{"style":160},[367],{"type":77,"value":368}," {\n",{"type":71,"tag":137,"props":370,"children":372},{"class":139,"line":371},7,[373,378,382,387,391,395,399,404,408,412,417,421,425,429,433,437,441,446,451],{"type":71,"tag":137,"props":374,"children":375},{"style":166},[376],{"type":77,"value":377},"    console",{"type":71,"tag":137,"props":379,"children":380},{"style":160},[381],{"type":77,"value":117},{"type":71,"tag":137,"props":383,"children":384},{"style":237},[385],{"type":77,"value":386},"log",{"type":71,"tag":137,"props":388,"children":389},{"style":256},[390],{"type":77,"value":244},{"type":71,"tag":137,"props":392,"children":393},{"style":166},[394],{"type":77,"value":316},{"type":71,"tag":137,"props":396,"children":397},{"style":160},[398],{"type":77,"value":117},{"type":71,"tag":137,"props":400,"children":401},{"style":166},[402],{"type":77,"value":403},"message",{"type":71,"tag":137,"props":405,"children":406},{"style":160},[407],{"type":77,"value":282},{"type":71,"tag":137,"props":409,"children":410},{"style":160},[411],{"type":77,"value":184},{"type":71,"tag":137,"props":413,"children":414},{"style":187},[415],{"type":77,"value":416},"attempt",{"type":71,"tag":137,"props":418,"children":419},{"style":160},[420],{"type":77,"value":194},{"type":71,"tag":137,"props":422,"children":423},{"style":160},[424],{"type":77,"value":282},{"type":71,"tag":137,"props":426,"children":427},{"style":166},[428],{"type":77,"value":353},{"type":71,"tag":137,"props":430,"children":431},{"style":160},[432],{"type":77,"value":117},{"type":71,"tag":137,"props":434,"children":435},{"style":166},[436],{"type":77,"value":416},{"type":71,"tag":137,"props":438,"children":439},{"style":160},[440],{"type":77,"value":117},{"type":71,"tag":137,"props":442,"children":443},{"style":166},[444],{"type":77,"value":445},"number",{"type":71,"tag":137,"props":447,"children":448},{"style":256},[449],{"type":77,"value":450},")",{"type":71,"tag":137,"props":452,"children":453},{"style":160},[454],{"type":77,"value":199},{"type":71,"tag":137,"props":456,"children":458},{"class":139,"line":457},8,[459,464,468,473,477,483,488],{"type":71,"tag":137,"props":460,"children":461},{"style":154},[462],{"type":77,"value":463},"    return",{"type":71,"tag":137,"props":465,"children":466},{"style":160},[467],{"type":77,"value":163},{"type":71,"tag":137,"props":469,"children":470},{"style":256},[471],{"type":77,"value":472}," ok",{"type":71,"tag":137,"props":474,"children":475},{"style":160},[476],{"type":77,"value":264},{"type":71,"tag":137,"props":478,"children":480},{"style":479},"--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC",[481],{"type":77,"value":482}," true",{"type":71,"tag":137,"props":484,"children":485},{"style":160},[486],{"type":77,"value":487}," };",{"type":71,"tag":137,"props":489,"children":490},{"style":144},[491],{"type":77,"value":492}," \u002F\u002F must be JSON serializable\n",{"type":71,"tag":137,"props":494,"children":496},{"class":139,"line":495},9,[497],{"type":71,"tag":137,"props":498,"children":499},{"style":160},[500],{"type":77,"value":501},"  },\n",{"type":71,"tag":137,"props":503,"children":505},{"class":139,"line":504},10,[506,511,515],{"type":71,"tag":137,"props":507,"children":508},{"style":160},[509],{"type":77,"value":510},"}",{"type":71,"tag":137,"props":512,"children":513},{"style":166},[514],{"type":77,"value":450},{"type":71,"tag":137,"props":516,"children":517},{"style":160},[518],{"type":77,"value":199},{"type":71,"tag":80,"props":520,"children":521},{},[522,524,530,532,538,540,546,548,554],{"type":77,"value":523},"The ",{"type":71,"tag":86,"props":525,"children":527},{"className":526},[],[528],{"type":77,"value":529},"run",{"type":77,"value":531}," function receives the payload and a second argument with ",{"type":71,"tag":86,"props":533,"children":535},{"className":534},[],[536],{"type":77,"value":537},"ctx",{"type":77,"value":539}," (run context), an abort ",{"type":71,"tag":86,"props":541,"children":543},{"className":542},[],[544],{"type":77,"value":545},"signal",{"type":77,"value":547},", and a deprecated ",{"type":71,"tag":86,"props":549,"children":551},{"className":550},[],[552],{"type":77,"value":553},"init",{"type":77,"value":555}," output. The return value is the task output and must be JSON serializable.",{"type":71,"tag":119,"props":557,"children":559},{"id":558},"core-patterns",[560],{"type":77,"value":561},"Core patterns",{"type":71,"tag":563,"props":564,"children":566},"h3",{"id":565},"_1-validate-the-payload-with-schematask",[567,569],{"type":77,"value":568},"1. Validate the payload with ",{"type":71,"tag":86,"props":570,"children":572},{"className":571},[],[573],{"type":77,"value":574},"schemaTask",{"type":71,"tag":80,"props":576,"children":577},{},[578,584,586,592,594,600],{"type":71,"tag":86,"props":579,"children":581},{"className":580},[],[582],{"type":77,"value":583},"schema",{"type":77,"value":585}," accepts a Zod \u002F Yup \u002F Superstruct \u002F ArkType \u002F valibot \u002F typebox parser or a custom ",{"type":71,"tag":86,"props":587,"children":589},{"className":588},[],[590],{"type":77,"value":591},"(data: unknown) => T",{"type":77,"value":593}," function. A validation failure throws ",{"type":71,"tag":86,"props":595,"children":597},{"className":596},[],[598],{"type":77,"value":599},"TaskPayloadParsedError",{"type":77,"value":601}," and skips retrying.",{"type":71,"tag":126,"props":603,"children":605},{"className":128,"code":604,"language":130,"meta":131,"style":131},"import { schemaTask } from \"@trigger.dev\u002Fsdk\";\nimport { z } from \"zod\";\n\nexport const createUser = schemaTask({\n  id: \"create-user\",\n  schema: z.object({ name: z.string(), age: z.number() }),\n  run: async (payload) => ({ greeting: `Hi ${payload.name}` }),\n});\n",[606],{"type":71,"tag":86,"props":607,"children":608},{"__ignoreMap":131},[609,649,690,697,729,758,861,954],{"type":71,"tag":137,"props":610,"children":611},{"class":139,"line":140},[612,616,620,625,629,633,637,641,645],{"type":71,"tag":137,"props":613,"children":614},{"style":154},[615],{"type":77,"value":157},{"type":71,"tag":137,"props":617,"children":618},{"style":160},[619],{"type":77,"value":163},{"type":71,"tag":137,"props":621,"children":622},{"style":166},[623],{"type":77,"value":624}," schemaTask",{"type":71,"tag":137,"props":626,"children":627},{"style":160},[628],{"type":77,"value":174},{"type":71,"tag":137,"props":630,"children":631},{"style":154},[632],{"type":77,"value":179},{"type":71,"tag":137,"props":634,"children":635},{"style":160},[636],{"type":77,"value":184},{"type":71,"tag":137,"props":638,"children":639},{"style":187},[640],{"type":77,"value":99},{"type":71,"tag":137,"props":642,"children":643},{"style":160},[644],{"type":77,"value":194},{"type":71,"tag":137,"props":646,"children":647},{"style":160},[648],{"type":77,"value":199},{"type":71,"tag":137,"props":650,"children":651},{"class":139,"line":150},[652,656,660,665,669,673,677,682,686],{"type":71,"tag":137,"props":653,"children":654},{"style":154},[655],{"type":77,"value":157},{"type":71,"tag":137,"props":657,"children":658},{"style":160},[659],{"type":77,"value":163},{"type":71,"tag":137,"props":661,"children":662},{"style":166},[663],{"type":77,"value":664}," z",{"type":71,"tag":137,"props":666,"children":667},{"style":160},[668],{"type":77,"value":174},{"type":71,"tag":137,"props":670,"children":671},{"style":154},[672],{"type":77,"value":179},{"type":71,"tag":137,"props":674,"children":675},{"style":160},[676],{"type":77,"value":184},{"type":71,"tag":137,"props":678,"children":679},{"style":187},[680],{"type":77,"value":681},"zod",{"type":71,"tag":137,"props":683,"children":684},{"style":160},[685],{"type":77,"value":194},{"type":71,"tag":137,"props":687,"children":688},{"style":160},[689],{"type":77,"value":199},{"type":71,"tag":137,"props":691,"children":692},{"class":139,"line":202},[693],{"type":71,"tag":137,"props":694,"children":695},{"emptyLinePlaceholder":206},[696],{"type":77,"value":209},{"type":71,"tag":137,"props":698,"children":699},{"class":139,"line":212},[700,704,708,713,717,721,725],{"type":71,"tag":137,"props":701,"children":702},{"style":154},[703],{"type":77,"value":218},{"type":71,"tag":137,"props":705,"children":706},{"style":221},[707],{"type":77,"value":224},{"type":71,"tag":137,"props":709,"children":710},{"style":166},[711],{"type":77,"value":712}," createUser ",{"type":71,"tag":137,"props":714,"children":715},{"style":160},[716],{"type":77,"value":234},{"type":71,"tag":137,"props":718,"children":719},{"style":237},[720],{"type":77,"value":624},{"type":71,"tag":137,"props":722,"children":723},{"style":166},[724],{"type":77,"value":244},{"type":71,"tag":137,"props":726,"children":727},{"style":160},[728],{"type":77,"value":249},{"type":71,"tag":137,"props":730,"children":731},{"class":139,"line":252},[732,736,740,744,749,753],{"type":71,"tag":137,"props":733,"children":734},{"style":256},[735],{"type":77,"value":259},{"type":71,"tag":137,"props":737,"children":738},{"style":160},[739],{"type":77,"value":264},{"type":71,"tag":137,"props":741,"children":742},{"style":160},[743],{"type":77,"value":184},{"type":71,"tag":137,"props":745,"children":746},{"style":187},[747],{"type":77,"value":748},"create-user",{"type":71,"tag":137,"props":750,"children":751},{"style":160},[752],{"type":77,"value":194},{"type":71,"tag":137,"props":754,"children":755},{"style":160},[756],{"type":77,"value":757},",\n",{"type":71,"tag":137,"props":759,"children":760},{"class":139,"line":290},[761,766,770,774,778,783,787,792,797,801,805,809,814,819,823,828,832,836,840,844,849,853,857],{"type":71,"tag":137,"props":762,"children":763},{"style":256},[764],{"type":77,"value":765},"  schema",{"type":71,"tag":137,"props":767,"children":768},{"style":160},[769],{"type":77,"value":264},{"type":71,"tag":137,"props":771,"children":772},{"style":166},[773],{"type":77,"value":664},{"type":71,"tag":137,"props":775,"children":776},{"style":160},[777],{"type":77,"value":117},{"type":71,"tag":137,"props":779,"children":780},{"style":237},[781],{"type":77,"value":782},"object",{"type":71,"tag":137,"props":784,"children":785},{"style":166},[786],{"type":77,"value":244},{"type":71,"tag":137,"props":788,"children":789},{"style":160},[790],{"type":77,"value":791},"{",{"type":71,"tag":137,"props":793,"children":794},{"style":256},[795],{"type":77,"value":796}," name",{"type":71,"tag":137,"props":798,"children":799},{"style":160},[800],{"type":77,"value":264},{"type":71,"tag":137,"props":802,"children":803},{"style":166},[804],{"type":77,"value":664},{"type":71,"tag":137,"props":806,"children":807},{"style":160},[808],{"type":77,"value":117},{"type":71,"tag":137,"props":810,"children":811},{"style":237},[812],{"type":77,"value":813},"string",{"type":71,"tag":137,"props":815,"children":816},{"style":166},[817],{"type":77,"value":818},"()",{"type":71,"tag":137,"props":820,"children":821},{"style":160},[822],{"type":77,"value":282},{"type":71,"tag":137,"props":824,"children":825},{"style":256},[826],{"type":77,"value":827}," age",{"type":71,"tag":137,"props":829,"children":830},{"style":160},[831],{"type":77,"value":264},{"type":71,"tag":137,"props":833,"children":834},{"style":166},[835],{"type":77,"value":664},{"type":71,"tag":137,"props":837,"children":838},{"style":160},[839],{"type":77,"value":117},{"type":71,"tag":137,"props":841,"children":842},{"style":237},[843],{"type":77,"value":445},{"type":71,"tag":137,"props":845,"children":846},{"style":166},[847],{"type":77,"value":848},"() ",{"type":71,"tag":137,"props":850,"children":851},{"style":160},[852],{"type":77,"value":510},{"type":71,"tag":137,"props":854,"children":855},{"style":166},[856],{"type":77,"value":450},{"type":71,"tag":137,"props":858,"children":859},{"style":160},[860],{"type":77,"value":757},{"type":71,"tag":137,"props":862,"children":863},{"class":139,"line":371},[864,868,872,876,880,884,888,892,896,900,905,909,914,919,924,928,932,937,942,946,950],{"type":71,"tag":137,"props":865,"children":866},{"style":237},[867],{"type":77,"value":296},{"type":71,"tag":137,"props":869,"children":870},{"style":160},[871],{"type":77,"value":264},{"type":71,"tag":137,"props":873,"children":874},{"style":221},[875],{"type":77,"value":305},{"type":71,"tag":137,"props":877,"children":878},{"style":160},[879],{"type":77,"value":310},{"type":71,"tag":137,"props":881,"children":882},{"style":313},[883],{"type":77,"value":316},{"type":71,"tag":137,"props":885,"children":886},{"style":160},[887],{"type":77,"value":450},{"type":71,"tag":137,"props":889,"children":890},{"style":221},[891],{"type":77,"value":363},{"type":71,"tag":137,"props":893,"children":894},{"style":166},[895],{"type":77,"value":310},{"type":71,"tag":137,"props":897,"children":898},{"style":160},[899],{"type":77,"value":791},{"type":71,"tag":137,"props":901,"children":902},{"style":256},[903],{"type":77,"value":904}," greeting",{"type":71,"tag":137,"props":906,"children":907},{"style":160},[908],{"type":77,"value":264},{"type":71,"tag":137,"props":910,"children":911},{"style":160},[912],{"type":77,"value":913}," `",{"type":71,"tag":137,"props":915,"children":916},{"style":187},[917],{"type":77,"value":918},"Hi ",{"type":71,"tag":137,"props":920,"children":921},{"style":160},[922],{"type":77,"value":923},"${",{"type":71,"tag":137,"props":925,"children":926},{"style":166},[927],{"type":77,"value":316},{"type":71,"tag":137,"props":929,"children":930},{"style":160},[931],{"type":77,"value":117},{"type":71,"tag":137,"props":933,"children":934},{"style":166},[935],{"type":77,"value":936},"name",{"type":71,"tag":137,"props":938,"children":939},{"style":160},[940],{"type":77,"value":941},"}`",{"type":71,"tag":137,"props":943,"children":944},{"style":160},[945],{"type":77,"value":174},{"type":71,"tag":137,"props":947,"children":948},{"style":166},[949],{"type":77,"value":450},{"type":71,"tag":137,"props":951,"children":952},{"style":160},[953],{"type":77,"value":757},{"type":71,"tag":137,"props":955,"children":956},{"class":139,"line":457},[957,961,965],{"type":71,"tag":137,"props":958,"children":959},{"style":160},[960],{"type":77,"value":510},{"type":71,"tag":137,"props":962,"children":963},{"style":166},[964],{"type":77,"value":450},{"type":71,"tag":137,"props":966,"children":967},{"style":160},[968],{"type":77,"value":199},{"type":71,"tag":563,"props":970,"children":972},{"id":971},"_2-configure-retries-and-abort-early",[973],{"type":77,"value":974},"2. Configure retries and abort early",{"type":71,"tag":80,"props":976,"children":977},{},[978,980,986,988,994,996,1002],{"type":77,"value":979},"The default ",{"type":71,"tag":86,"props":981,"children":983},{"className":982},[],[984],{"type":77,"value":985},"maxAttempts",{"type":77,"value":987}," is 3. Throw ",{"type":71,"tag":86,"props":989,"children":991},{"className":990},[],[992],{"type":77,"value":993},"AbortTaskRunError",{"type":77,"value":995}," to stop retrying immediately. Task-level ",{"type":71,"tag":86,"props":997,"children":999},{"className":998},[],[1000],{"type":77,"value":1001},"retry",{"type":77,"value":1003}," overrides the config-file defaults.",{"type":71,"tag":126,"props":1005,"children":1007},{"className":128,"code":1006,"language":130,"meta":131,"style":131},"import { task, AbortTaskRunError } from \"@trigger.dev\u002Fsdk\";\n\nexport const charge = task({\n  id: \"charge\",\n  retry: { maxAttempts: 5, factor: 1.8, minTimeoutInMs: 500, maxTimeoutInMs: 30_000, randomize: true },\n  run: async (payload: { amount: number }) => {\n    if (payload.amount \u003C= 0) throw new AbortTaskRunError(\"Invalid amount\"); \u002F\u002F no retry\n    \u002F\u002F work that may throw and retry\n  },\n});\n",[1008],{"type":71,"tag":86,"props":1009,"children":1010},{"__ignoreMap":131},[1011,1059,1066,1098,1126,1233,1290,1375,1383,1390],{"type":71,"tag":137,"props":1012,"children":1013},{"class":139,"line":140},[1014,1018,1022,1026,1030,1035,1039,1043,1047,1051,1055],{"type":71,"tag":137,"props":1015,"children":1016},{"style":154},[1017],{"type":77,"value":157},{"type":71,"tag":137,"props":1019,"children":1020},{"style":160},[1021],{"type":77,"value":163},{"type":71,"tag":137,"props":1023,"children":1024},{"style":166},[1025],{"type":77,"value":169},{"type":71,"tag":137,"props":1027,"children":1028},{"style":160},[1029],{"type":77,"value":282},{"type":71,"tag":137,"props":1031,"children":1032},{"style":166},[1033],{"type":77,"value":1034}," AbortTaskRunError",{"type":71,"tag":137,"props":1036,"children":1037},{"style":160},[1038],{"type":77,"value":174},{"type":71,"tag":137,"props":1040,"children":1041},{"style":154},[1042],{"type":77,"value":179},{"type":71,"tag":137,"props":1044,"children":1045},{"style":160},[1046],{"type":77,"value":184},{"type":71,"tag":137,"props":1048,"children":1049},{"style":187},[1050],{"type":77,"value":99},{"type":71,"tag":137,"props":1052,"children":1053},{"style":160},[1054],{"type":77,"value":194},{"type":71,"tag":137,"props":1056,"children":1057},{"style":160},[1058],{"type":77,"value":199},{"type":71,"tag":137,"props":1060,"children":1061},{"class":139,"line":150},[1062],{"type":71,"tag":137,"props":1063,"children":1064},{"emptyLinePlaceholder":206},[1065],{"type":77,"value":209},{"type":71,"tag":137,"props":1067,"children":1068},{"class":139,"line":202},[1069,1073,1077,1082,1086,1090,1094],{"type":71,"tag":137,"props":1070,"children":1071},{"style":154},[1072],{"type":77,"value":218},{"type":71,"tag":137,"props":1074,"children":1075},{"style":221},[1076],{"type":77,"value":224},{"type":71,"tag":137,"props":1078,"children":1079},{"style":166},[1080],{"type":77,"value":1081}," charge ",{"type":71,"tag":137,"props":1083,"children":1084},{"style":160},[1085],{"type":77,"value":234},{"type":71,"tag":137,"props":1087,"children":1088},{"style":237},[1089],{"type":77,"value":169},{"type":71,"tag":137,"props":1091,"children":1092},{"style":166},[1093],{"type":77,"value":244},{"type":71,"tag":137,"props":1095,"children":1096},{"style":160},[1097],{"type":77,"value":249},{"type":71,"tag":137,"props":1099,"children":1100},{"class":139,"line":212},[1101,1105,1109,1113,1118,1122],{"type":71,"tag":137,"props":1102,"children":1103},{"style":256},[1104],{"type":77,"value":259},{"type":71,"tag":137,"props":1106,"children":1107},{"style":160},[1108],{"type":77,"value":264},{"type":71,"tag":137,"props":1110,"children":1111},{"style":160},[1112],{"type":77,"value":184},{"type":71,"tag":137,"props":1114,"children":1115},{"style":187},[1116],{"type":77,"value":1117},"charge",{"type":71,"tag":137,"props":1119,"children":1120},{"style":160},[1121],{"type":77,"value":194},{"type":71,"tag":137,"props":1123,"children":1124},{"style":160},[1125],{"type":77,"value":757},{"type":71,"tag":137,"props":1127,"children":1128},{"class":139,"line":252},[1129,1134,1138,1142,1147,1151,1157,1161,1166,1170,1175,1179,1184,1188,1193,1197,1202,1206,1211,1215,1220,1224,1228],{"type":71,"tag":137,"props":1130,"children":1131},{"style":256},[1132],{"type":77,"value":1133},"  retry",{"type":71,"tag":137,"props":1135,"children":1136},{"style":160},[1137],{"type":77,"value":264},{"type":71,"tag":137,"props":1139,"children":1140},{"style":160},[1141],{"type":77,"value":163},{"type":71,"tag":137,"props":1143,"children":1144},{"style":256},[1145],{"type":77,"value":1146}," maxAttempts",{"type":71,"tag":137,"props":1148,"children":1149},{"style":160},[1150],{"type":77,"value":264},{"type":71,"tag":137,"props":1152,"children":1154},{"style":1153},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[1155],{"type":77,"value":1156}," 5",{"type":71,"tag":137,"props":1158,"children":1159},{"style":160},[1160],{"type":77,"value":282},{"type":71,"tag":137,"props":1162,"children":1163},{"style":256},[1164],{"type":77,"value":1165}," factor",{"type":71,"tag":137,"props":1167,"children":1168},{"style":160},[1169],{"type":77,"value":264},{"type":71,"tag":137,"props":1171,"children":1172},{"style":1153},[1173],{"type":77,"value":1174}," 1.8",{"type":71,"tag":137,"props":1176,"children":1177},{"style":160},[1178],{"type":77,"value":282},{"type":71,"tag":137,"props":1180,"children":1181},{"style":256},[1182],{"type":77,"value":1183}," minTimeoutInMs",{"type":71,"tag":137,"props":1185,"children":1186},{"style":160},[1187],{"type":77,"value":264},{"type":71,"tag":137,"props":1189,"children":1190},{"style":1153},[1191],{"type":77,"value":1192}," 500",{"type":71,"tag":137,"props":1194,"children":1195},{"style":160},[1196],{"type":77,"value":282},{"type":71,"tag":137,"props":1198,"children":1199},{"style":256},[1200],{"type":77,"value":1201}," maxTimeoutInMs",{"type":71,"tag":137,"props":1203,"children":1204},{"style":160},[1205],{"type":77,"value":264},{"type":71,"tag":137,"props":1207,"children":1208},{"style":1153},[1209],{"type":77,"value":1210}," 30_000",{"type":71,"tag":137,"props":1212,"children":1213},{"style":160},[1214],{"type":77,"value":282},{"type":71,"tag":137,"props":1216,"children":1217},{"style":256},[1218],{"type":77,"value":1219}," randomize",{"type":71,"tag":137,"props":1221,"children":1222},{"style":160},[1223],{"type":77,"value":264},{"type":71,"tag":137,"props":1225,"children":1226},{"style":479},[1227],{"type":77,"value":482},{"type":71,"tag":137,"props":1229,"children":1230},{"style":160},[1231],{"type":77,"value":1232}," },\n",{"type":71,"tag":137,"props":1234,"children":1235},{"class":139,"line":290},[1236,1240,1244,1248,1252,1256,1260,1264,1269,1273,1278,1282,1286],{"type":71,"tag":137,"props":1237,"children":1238},{"style":237},[1239],{"type":77,"value":296},{"type":71,"tag":137,"props":1241,"children":1242},{"style":160},[1243],{"type":77,"value":264},{"type":71,"tag":137,"props":1245,"children":1246},{"style":221},[1247],{"type":77,"value":305},{"type":71,"tag":137,"props":1249,"children":1250},{"style":160},[1251],{"type":77,"value":310},{"type":71,"tag":137,"props":1253,"children":1254},{"style":313},[1255],{"type":77,"value":316},{"type":71,"tag":137,"props":1257,"children":1258},{"style":160},[1259],{"type":77,"value":264},{"type":71,"tag":137,"props":1261,"children":1262},{"style":160},[1263],{"type":77,"value":163},{"type":71,"tag":137,"props":1265,"children":1266},{"style":256},[1267],{"type":77,"value":1268}," amount",{"type":71,"tag":137,"props":1270,"children":1271},{"style":160},[1272],{"type":77,"value":264},{"type":71,"tag":137,"props":1274,"children":1275},{"style":336},[1276],{"type":77,"value":1277}," number",{"type":71,"tag":137,"props":1279,"children":1280},{"style":160},[1281],{"type":77,"value":358},{"type":71,"tag":137,"props":1283,"children":1284},{"style":221},[1285],{"type":77,"value":363},{"type":71,"tag":137,"props":1287,"children":1288},{"style":160},[1289],{"type":77,"value":368},{"type":71,"tag":137,"props":1291,"children":1292},{"class":139,"line":371},[1293,1298,1302,1306,1310,1315,1320,1325,1330,1335,1340,1344,1348,1352,1357,1361,1365,1370],{"type":71,"tag":137,"props":1294,"children":1295},{"style":154},[1296],{"type":77,"value":1297},"    if",{"type":71,"tag":137,"props":1299,"children":1300},{"style":256},[1301],{"type":77,"value":310},{"type":71,"tag":137,"props":1303,"children":1304},{"style":166},[1305],{"type":77,"value":316},{"type":71,"tag":137,"props":1307,"children":1308},{"style":160},[1309],{"type":77,"value":117},{"type":71,"tag":137,"props":1311,"children":1312},{"style":166},[1313],{"type":77,"value":1314},"amount",{"type":71,"tag":137,"props":1316,"children":1317},{"style":160},[1318],{"type":77,"value":1319}," \u003C=",{"type":71,"tag":137,"props":1321,"children":1322},{"style":1153},[1323],{"type":77,"value":1324}," 0",{"type":71,"tag":137,"props":1326,"children":1327},{"style":256},[1328],{"type":77,"value":1329},") ",{"type":71,"tag":137,"props":1331,"children":1332},{"style":154},[1333],{"type":77,"value":1334},"throw",{"type":71,"tag":137,"props":1336,"children":1337},{"style":160},[1338],{"type":77,"value":1339}," new",{"type":71,"tag":137,"props":1341,"children":1342},{"style":237},[1343],{"type":77,"value":1034},{"type":71,"tag":137,"props":1345,"children":1346},{"style":256},[1347],{"type":77,"value":244},{"type":71,"tag":137,"props":1349,"children":1350},{"style":160},[1351],{"type":77,"value":194},{"type":71,"tag":137,"props":1353,"children":1354},{"style":187},[1355],{"type":77,"value":1356},"Invalid amount",{"type":71,"tag":137,"props":1358,"children":1359},{"style":160},[1360],{"type":77,"value":194},{"type":71,"tag":137,"props":1362,"children":1363},{"style":256},[1364],{"type":77,"value":450},{"type":71,"tag":137,"props":1366,"children":1367},{"style":160},[1368],{"type":77,"value":1369},";",{"type":71,"tag":137,"props":1371,"children":1372},{"style":144},[1373],{"type":77,"value":1374}," \u002F\u002F no retry\n",{"type":71,"tag":137,"props":1376,"children":1377},{"class":139,"line":457},[1378],{"type":71,"tag":137,"props":1379,"children":1380},{"style":144},[1381],{"type":77,"value":1382},"    \u002F\u002F work that may throw and retry\n",{"type":71,"tag":137,"props":1384,"children":1385},{"class":139,"line":495},[1386],{"type":71,"tag":137,"props":1387,"children":1388},{"style":160},[1389],{"type":77,"value":501},{"type":71,"tag":137,"props":1391,"children":1392},{"class":139,"line":504},[1393,1397,1401],{"type":71,"tag":137,"props":1394,"children":1395},{"style":160},[1396],{"type":77,"value":510},{"type":71,"tag":137,"props":1398,"children":1399},{"style":166},[1400],{"type":77,"value":450},{"type":71,"tag":137,"props":1402,"children":1403},{"style":160},[1404],{"type":77,"value":199},{"type":71,"tag":80,"props":1406,"children":1407},{},[1408,1410,1416,1418,1424,1426,1432,1434,1440,1442,1448,1449,1455],{"type":77,"value":1409},"For finer control, ",{"type":71,"tag":86,"props":1411,"children":1413},{"className":1412},[],[1414],{"type":77,"value":1415},"catchError: async ({ payload, error, ctx, retryAt }) => {...}",{"type":77,"value":1417}," can return ",{"type":71,"tag":86,"props":1419,"children":1421},{"className":1420},[],[1422],{"type":77,"value":1423},"{ skipRetrying: true }",{"type":77,"value":1425},", ",{"type":71,"tag":86,"props":1427,"children":1429},{"className":1428},[],[1430],{"type":77,"value":1431},"{ retryAt: Date }",{"type":77,"value":1433},", or ",{"type":71,"tag":86,"props":1435,"children":1437},{"className":1436},[],[1438],{"type":77,"value":1439},"undefined",{"type":77,"value":1441}," (use normal logic). ",{"type":71,"tag":86,"props":1443,"children":1445},{"className":1444},[],[1446],{"type":77,"value":1447},"retry.onThrow",{"type":77,"value":1425},{"type":71,"tag":86,"props":1450,"children":1452},{"className":1451},[],[1453],{"type":77,"value":1454},"retry.fetch",{"type":77,"value":1456},", also exist for in-task retrying.",{"type":71,"tag":563,"props":1458,"children":1460},{"id":1459},"_3-trigger-another-task-and-handle-the-result",[1461],{"type":77,"value":1462},"3. Trigger another task and handle the Result",{"type":71,"tag":80,"props":1464,"children":1465},{},[1466,1468,1474,1476,1482,1484,1490],{"type":77,"value":1467},"From inside a task use ",{"type":71,"tag":86,"props":1469,"children":1471},{"className":1470},[],[1472],{"type":77,"value":1473},"yourTask.triggerAndWait(payload)",{"type":77,"value":1475},". The result is a Result object that you must check (",{"type":71,"tag":86,"props":1477,"children":1479},{"className":1478},[],[1480],{"type":77,"value":1481},"ok",{"type":77,"value":1483},"), or ",{"type":71,"tag":86,"props":1485,"children":1487},{"className":1486},[],[1488],{"type":77,"value":1489},".unwrap()",{"type":77,"value":1491}," to throw on failure.",{"type":71,"tag":126,"props":1493,"children":1495},{"className":128,"code":1494,"language":130,"meta":131,"style":131},"export const parentTask = task({\n  id: \"parent-task\",\n  run: async () => {\n    const result = await childTask.triggerAndWait({ data: \"x\" });\n    if (result.ok) return result.output; \u002F\u002F typed child output\n    console.error(\"child failed\", result.error);\n    \u002F\u002F or: const output = await childTask.triggerAndWait({ data: \"x\" }).unwrap();\n  },\n});\n",[1496],{"type":71,"tag":86,"props":1497,"children":1498},{"__ignoreMap":131},[1499,1531,1559,1587,1666,1721,1778,1786,1793],{"type":71,"tag":137,"props":1500,"children":1501},{"class":139,"line":140},[1502,1506,1510,1515,1519,1523,1527],{"type":71,"tag":137,"props":1503,"children":1504},{"style":154},[1505],{"type":77,"value":218},{"type":71,"tag":137,"props":1507,"children":1508},{"style":221},[1509],{"type":77,"value":224},{"type":71,"tag":137,"props":1511,"children":1512},{"style":166},[1513],{"type":77,"value":1514}," parentTask ",{"type":71,"tag":137,"props":1516,"children":1517},{"style":160},[1518],{"type":77,"value":234},{"type":71,"tag":137,"props":1520,"children":1521},{"style":237},[1522],{"type":77,"value":169},{"type":71,"tag":137,"props":1524,"children":1525},{"style":166},[1526],{"type":77,"value":244},{"type":71,"tag":137,"props":1528,"children":1529},{"style":160},[1530],{"type":77,"value":249},{"type":71,"tag":137,"props":1532,"children":1533},{"class":139,"line":150},[1534,1538,1542,1546,1551,1555],{"type":71,"tag":137,"props":1535,"children":1536},{"style":256},[1537],{"type":77,"value":259},{"type":71,"tag":137,"props":1539,"children":1540},{"style":160},[1541],{"type":77,"value":264},{"type":71,"tag":137,"props":1543,"children":1544},{"style":160},[1545],{"type":77,"value":184},{"type":71,"tag":137,"props":1547,"children":1548},{"style":187},[1549],{"type":77,"value":1550},"parent-task",{"type":71,"tag":137,"props":1552,"children":1553},{"style":160},[1554],{"type":77,"value":194},{"type":71,"tag":137,"props":1556,"children":1557},{"style":160},[1558],{"type":77,"value":757},{"type":71,"tag":137,"props":1560,"children":1561},{"class":139,"line":202},[1562,1566,1570,1574,1579,1583],{"type":71,"tag":137,"props":1563,"children":1564},{"style":237},[1565],{"type":77,"value":296},{"type":71,"tag":137,"props":1567,"children":1568},{"style":160},[1569],{"type":77,"value":264},{"type":71,"tag":137,"props":1571,"children":1572},{"style":221},[1573],{"type":77,"value":305},{"type":71,"tag":137,"props":1575,"children":1576},{"style":160},[1577],{"type":77,"value":1578}," ()",{"type":71,"tag":137,"props":1580,"children":1581},{"style":221},[1582],{"type":77,"value":363},{"type":71,"tag":137,"props":1584,"children":1585},{"style":160},[1586],{"type":77,"value":368},{"type":71,"tag":137,"props":1588,"children":1589},{"class":139,"line":212},[1590,1595,1600,1605,1610,1615,1619,1624,1628,1632,1637,1641,1645,1650,1654,1658,1662],{"type":71,"tag":137,"props":1591,"children":1592},{"style":221},[1593],{"type":77,"value":1594},"    const",{"type":71,"tag":137,"props":1596,"children":1597},{"style":166},[1598],{"type":77,"value":1599}," result",{"type":71,"tag":137,"props":1601,"children":1602},{"style":160},[1603],{"type":77,"value":1604}," =",{"type":71,"tag":137,"props":1606,"children":1607},{"style":154},[1608],{"type":77,"value":1609}," await",{"type":71,"tag":137,"props":1611,"children":1612},{"style":166},[1613],{"type":77,"value":1614}," childTask",{"type":71,"tag":137,"props":1616,"children":1617},{"style":160},[1618],{"type":77,"value":117},{"type":71,"tag":137,"props":1620,"children":1621},{"style":237},[1622],{"type":77,"value":1623},"triggerAndWait",{"type":71,"tag":137,"props":1625,"children":1626},{"style":256},[1627],{"type":77,"value":244},{"type":71,"tag":137,"props":1629,"children":1630},{"style":160},[1631],{"type":77,"value":791},{"type":71,"tag":137,"props":1633,"children":1634},{"style":256},[1635],{"type":77,"value":1636}," data",{"type":71,"tag":137,"props":1638,"children":1639},{"style":160},[1640],{"type":77,"value":264},{"type":71,"tag":137,"props":1642,"children":1643},{"style":160},[1644],{"type":77,"value":184},{"type":71,"tag":137,"props":1646,"children":1647},{"style":187},[1648],{"type":77,"value":1649},"x",{"type":71,"tag":137,"props":1651,"children":1652},{"style":160},[1653],{"type":77,"value":194},{"type":71,"tag":137,"props":1655,"children":1656},{"style":160},[1657],{"type":77,"value":174},{"type":71,"tag":137,"props":1659,"children":1660},{"style":256},[1661],{"type":77,"value":450},{"type":71,"tag":137,"props":1663,"children":1664},{"style":160},[1665],{"type":77,"value":199},{"type":71,"tag":137,"props":1667,"children":1668},{"class":139,"line":252},[1669,1673,1677,1682,1686,1690,1694,1699,1703,1707,1712,1716],{"type":71,"tag":137,"props":1670,"children":1671},{"style":154},[1672],{"type":77,"value":1297},{"type":71,"tag":137,"props":1674,"children":1675},{"style":256},[1676],{"type":77,"value":310},{"type":71,"tag":137,"props":1678,"children":1679},{"style":166},[1680],{"type":77,"value":1681},"result",{"type":71,"tag":137,"props":1683,"children":1684},{"style":160},[1685],{"type":77,"value":117},{"type":71,"tag":137,"props":1687,"children":1688},{"style":166},[1689],{"type":77,"value":1481},{"type":71,"tag":137,"props":1691,"children":1692},{"style":256},[1693],{"type":77,"value":1329},{"type":71,"tag":137,"props":1695,"children":1696},{"style":154},[1697],{"type":77,"value":1698},"return",{"type":71,"tag":137,"props":1700,"children":1701},{"style":166},[1702],{"type":77,"value":1599},{"type":71,"tag":137,"props":1704,"children":1705},{"style":160},[1706],{"type":77,"value":117},{"type":71,"tag":137,"props":1708,"children":1709},{"style":166},[1710],{"type":77,"value":1711},"output",{"type":71,"tag":137,"props":1713,"children":1714},{"style":160},[1715],{"type":77,"value":1369},{"type":71,"tag":137,"props":1717,"children":1718},{"style":144},[1719],{"type":77,"value":1720}," \u002F\u002F typed child output\n",{"type":71,"tag":137,"props":1722,"children":1723},{"class":139,"line":290},[1724,1728,1732,1737,1741,1745,1750,1754,1758,1762,1766,1770,1774],{"type":71,"tag":137,"props":1725,"children":1726},{"style":166},[1727],{"type":77,"value":377},{"type":71,"tag":137,"props":1729,"children":1730},{"style":160},[1731],{"type":77,"value":117},{"type":71,"tag":137,"props":1733,"children":1734},{"style":237},[1735],{"type":77,"value":1736},"error",{"type":71,"tag":137,"props":1738,"children":1739},{"style":256},[1740],{"type":77,"value":244},{"type":71,"tag":137,"props":1742,"children":1743},{"style":160},[1744],{"type":77,"value":194},{"type":71,"tag":137,"props":1746,"children":1747},{"style":187},[1748],{"type":77,"value":1749},"child failed",{"type":71,"tag":137,"props":1751,"children":1752},{"style":160},[1753],{"type":77,"value":194},{"type":71,"tag":137,"props":1755,"children":1756},{"style":160},[1757],{"type":77,"value":282},{"type":71,"tag":137,"props":1759,"children":1760},{"style":166},[1761],{"type":77,"value":1599},{"type":71,"tag":137,"props":1763,"children":1764},{"style":160},[1765],{"type":77,"value":117},{"type":71,"tag":137,"props":1767,"children":1768},{"style":166},[1769],{"type":77,"value":1736},{"type":71,"tag":137,"props":1771,"children":1772},{"style":256},[1773],{"type":77,"value":450},{"type":71,"tag":137,"props":1775,"children":1776},{"style":160},[1777],{"type":77,"value":199},{"type":71,"tag":137,"props":1779,"children":1780},{"class":139,"line":371},[1781],{"type":71,"tag":137,"props":1782,"children":1783},{"style":144},[1784],{"type":77,"value":1785},"    \u002F\u002F or: const output = await childTask.triggerAndWait({ data: \"x\" }).unwrap();\n",{"type":71,"tag":137,"props":1787,"children":1788},{"class":139,"line":457},[1789],{"type":71,"tag":137,"props":1790,"children":1791},{"style":160},[1792],{"type":77,"value":501},{"type":71,"tag":137,"props":1794,"children":1795},{"class":139,"line":495},[1796,1800,1804],{"type":71,"tag":137,"props":1797,"children":1798},{"style":160},[1799],{"type":77,"value":510},{"type":71,"tag":137,"props":1801,"children":1802},{"style":166},[1803],{"type":77,"value":450},{"type":71,"tag":137,"props":1805,"children":1806},{"style":160},[1807],{"type":77,"value":199},{"type":71,"tag":80,"props":1809,"children":1810},{},[1811,1817,1819,1825,1826,1832,1834,1840,1842,1848,1850,1856,1858,1864],{"type":71,"tag":86,"props":1812,"children":1814},{"className":1813},[],[1815],{"type":77,"value":1816},"SubtaskUnwrapError",{"type":77,"value":1818}," carries ",{"type":71,"tag":86,"props":1820,"children":1822},{"className":1821},[],[1823],{"type":77,"value":1824},"runId",{"type":77,"value":1425},{"type":71,"tag":86,"props":1827,"children":1829},{"className":1828},[],[1830],{"type":77,"value":1831},"taskId",{"type":77,"value":1833},", and ",{"type":71,"tag":86,"props":1835,"children":1837},{"className":1836},[],[1838],{"type":77,"value":1839},"cause",{"type":77,"value":1841},". For fan-out use ",{"type":71,"tag":86,"props":1843,"children":1845},{"className":1844},[],[1846],{"type":77,"value":1847},"childTask.batchTriggerAndWait([{ payload: a }, { payload: b }])",{"type":77,"value":1849},"; the result has a ",{"type":71,"tag":86,"props":1851,"children":1853},{"className":1852},[],[1854],{"type":77,"value":1855},".runs",{"type":77,"value":1857}," array, each entry ",{"type":71,"tag":86,"props":1859,"children":1861},{"className":1860},[],[1862],{"type":77,"value":1863},"{ ok, id, output?, error?, taskIdentifier }",{"type":77,"value":117},{"type":71,"tag":563,"props":1866,"children":1868},{"id":1867},"_4-trigger-from-backend-code-with-a-type-only-import",[1869],{"type":77,"value":1870},"4. Trigger from backend code with a type-only import",{"type":71,"tag":80,"props":1872,"children":1873},{},[1874],{"type":77,"value":1875},"Outside a task, import the task type only and trigger by id. Do not import the task instance into backend bundles.",{"type":71,"tag":126,"props":1877,"children":1879},{"className":128,"code":1878,"language":130,"meta":131,"style":131},"import { tasks } from \"@trigger.dev\u002Fsdk\";\nimport type { emailSequence } from \"~\u002Ftrigger\u002Femails\";\n\nconst handle = await tasks.trigger\u003Ctypeof emailSequence>(\n  \"email-sequence\",\n  { to: \"a@b.com\", name: \"Ada\" },\n  { delay: \"1h\" }\n);\n",[1880],{"type":71,"tag":86,"props":1881,"children":1882},{"__ignoreMap":131},[1883,1923,1969,1976,2029,2050,2109,2143],{"type":71,"tag":137,"props":1884,"children":1885},{"class":139,"line":140},[1886,1890,1894,1899,1903,1907,1911,1915,1919],{"type":71,"tag":137,"props":1887,"children":1888},{"style":154},[1889],{"type":77,"value":157},{"type":71,"tag":137,"props":1891,"children":1892},{"style":160},[1893],{"type":77,"value":163},{"type":71,"tag":137,"props":1895,"children":1896},{"style":166},[1897],{"type":77,"value":1898}," tasks",{"type":71,"tag":137,"props":1900,"children":1901},{"style":160},[1902],{"type":77,"value":174},{"type":71,"tag":137,"props":1904,"children":1905},{"style":154},[1906],{"type":77,"value":179},{"type":71,"tag":137,"props":1908,"children":1909},{"style":160},[1910],{"type":77,"value":184},{"type":71,"tag":137,"props":1912,"children":1913},{"style":187},[1914],{"type":77,"value":99},{"type":71,"tag":137,"props":1916,"children":1917},{"style":160},[1918],{"type":77,"value":194},{"type":71,"tag":137,"props":1920,"children":1921},{"style":160},[1922],{"type":77,"value":199},{"type":71,"tag":137,"props":1924,"children":1925},{"class":139,"line":150},[1926,1930,1935,1939,1944,1948,1952,1956,1961,1965],{"type":71,"tag":137,"props":1927,"children":1928},{"style":154},[1929],{"type":77,"value":157},{"type":71,"tag":137,"props":1931,"children":1932},{"style":154},[1933],{"type":77,"value":1934}," type",{"type":71,"tag":137,"props":1936,"children":1937},{"style":160},[1938],{"type":77,"value":163},{"type":71,"tag":137,"props":1940,"children":1941},{"style":166},[1942],{"type":77,"value":1943}," emailSequence",{"type":71,"tag":137,"props":1945,"children":1946},{"style":160},[1947],{"type":77,"value":174},{"type":71,"tag":137,"props":1949,"children":1950},{"style":154},[1951],{"type":77,"value":179},{"type":71,"tag":137,"props":1953,"children":1954},{"style":160},[1955],{"type":77,"value":184},{"type":71,"tag":137,"props":1957,"children":1958},{"style":187},[1959],{"type":77,"value":1960},"~\u002Ftrigger\u002Femails",{"type":71,"tag":137,"props":1962,"children":1963},{"style":160},[1964],{"type":77,"value":194},{"type":71,"tag":137,"props":1966,"children":1967},{"style":160},[1968],{"type":77,"value":199},{"type":71,"tag":137,"props":1970,"children":1971},{"class":139,"line":202},[1972],{"type":71,"tag":137,"props":1973,"children":1974},{"emptyLinePlaceholder":206},[1975],{"type":77,"value":209},{"type":71,"tag":137,"props":1977,"children":1978},{"class":139,"line":212},[1979,1984,1989,1993,1997,2001,2005,2010,2015,2019,2024],{"type":71,"tag":137,"props":1980,"children":1981},{"style":221},[1982],{"type":77,"value":1983},"const",{"type":71,"tag":137,"props":1985,"children":1986},{"style":166},[1987],{"type":77,"value":1988}," handle ",{"type":71,"tag":137,"props":1990,"children":1991},{"style":160},[1992],{"type":77,"value":234},{"type":71,"tag":137,"props":1994,"children":1995},{"style":154},[1996],{"type":77,"value":1609},{"type":71,"tag":137,"props":1998,"children":1999},{"style":166},[2000],{"type":77,"value":1898},{"type":71,"tag":137,"props":2002,"children":2003},{"style":160},[2004],{"type":77,"value":117},{"type":71,"tag":137,"props":2006,"children":2007},{"style":237},[2008],{"type":77,"value":2009},"trigger",{"type":71,"tag":137,"props":2011,"children":2012},{"style":160},[2013],{"type":77,"value":2014},"\u003Ctypeof",{"type":71,"tag":137,"props":2016,"children":2017},{"style":166},[2018],{"type":77,"value":1943},{"type":71,"tag":137,"props":2020,"children":2021},{"style":160},[2022],{"type":77,"value":2023},">",{"type":71,"tag":137,"props":2025,"children":2026},{"style":166},[2027],{"type":77,"value":2028},"(\n",{"type":71,"tag":137,"props":2030,"children":2031},{"class":139,"line":252},[2032,2037,2042,2046],{"type":71,"tag":137,"props":2033,"children":2034},{"style":160},[2035],{"type":77,"value":2036},"  \"",{"type":71,"tag":137,"props":2038,"children":2039},{"style":187},[2040],{"type":77,"value":2041},"email-sequence",{"type":71,"tag":137,"props":2043,"children":2044},{"style":160},[2045],{"type":77,"value":194},{"type":71,"tag":137,"props":2047,"children":2048},{"style":160},[2049],{"type":77,"value":757},{"type":71,"tag":137,"props":2051,"children":2052},{"class":139,"line":290},[2053,2058,2063,2067,2071,2076,2080,2084,2088,2092,2096,2101,2105],{"type":71,"tag":137,"props":2054,"children":2055},{"style":160},[2056],{"type":77,"value":2057},"  {",{"type":71,"tag":137,"props":2059,"children":2060},{"style":256},[2061],{"type":77,"value":2062}," to",{"type":71,"tag":137,"props":2064,"children":2065},{"style":160},[2066],{"type":77,"value":264},{"type":71,"tag":137,"props":2068,"children":2069},{"style":160},[2070],{"type":77,"value":184},{"type":71,"tag":137,"props":2072,"children":2073},{"style":187},[2074],{"type":77,"value":2075},"a@b.com",{"type":71,"tag":137,"props":2077,"children":2078},{"style":160},[2079],{"type":77,"value":194},{"type":71,"tag":137,"props":2081,"children":2082},{"style":160},[2083],{"type":77,"value":282},{"type":71,"tag":137,"props":2085,"children":2086},{"style":256},[2087],{"type":77,"value":796},{"type":71,"tag":137,"props":2089,"children":2090},{"style":160},[2091],{"type":77,"value":264},{"type":71,"tag":137,"props":2093,"children":2094},{"style":160},[2095],{"type":77,"value":184},{"type":71,"tag":137,"props":2097,"children":2098},{"style":187},[2099],{"type":77,"value":2100},"Ada",{"type":71,"tag":137,"props":2102,"children":2103},{"style":160},[2104],{"type":77,"value":194},{"type":71,"tag":137,"props":2106,"children":2107},{"style":160},[2108],{"type":77,"value":1232},{"type":71,"tag":137,"props":2110,"children":2111},{"class":139,"line":371},[2112,2116,2121,2125,2129,2134,2138],{"type":71,"tag":137,"props":2113,"children":2114},{"style":160},[2115],{"type":77,"value":2057},{"type":71,"tag":137,"props":2117,"children":2118},{"style":256},[2119],{"type":77,"value":2120}," delay",{"type":71,"tag":137,"props":2122,"children":2123},{"style":160},[2124],{"type":77,"value":264},{"type":71,"tag":137,"props":2126,"children":2127},{"style":160},[2128],{"type":77,"value":184},{"type":71,"tag":137,"props":2130,"children":2131},{"style":187},[2132],{"type":77,"value":2133},"1h",{"type":71,"tag":137,"props":2135,"children":2136},{"style":160},[2137],{"type":77,"value":194},{"type":71,"tag":137,"props":2139,"children":2140},{"style":160},[2141],{"type":77,"value":2142}," }\n",{"type":71,"tag":137,"props":2144,"children":2145},{"class":139,"line":457},[2146,2150],{"type":71,"tag":137,"props":2147,"children":2148},{"style":166},[2149],{"type":77,"value":450},{"type":71,"tag":137,"props":2151,"children":2152},{"style":160},[2153],{"type":77,"value":199},{"type":71,"tag":80,"props":2155,"children":2156},{},[2157,2163,2165,2171,2173,2179,2180,2186,2187,2193,2194,2200,2201,2207,2208,2214,2215,2221,2222,2227,2228,2234,2235,2241,2242,2248,2249,2255,2256,2262,2264,2270,2271,2277,2278,2284],{"type":71,"tag":86,"props":2158,"children":2160},{"className":2159},[],[2161],{"type":77,"value":2162},"tasks.batchTrigger",{"type":77,"value":2164}," and ",{"type":71,"tag":86,"props":2166,"children":2168},{"className":2167},[],[2169],{"type":77,"value":2170},"batch.trigger([{ id, payload }])",{"type":77,"value":2172}," cover batches. Trigger options include ",{"type":71,"tag":86,"props":2174,"children":2176},{"className":2175},[],[2177],{"type":77,"value":2178},"delay",{"type":77,"value":1425},{"type":71,"tag":86,"props":2181,"children":2183},{"className":2182},[],[2184],{"type":77,"value":2185},"ttl",{"type":77,"value":1425},{"type":71,"tag":86,"props":2188,"children":2190},{"className":2189},[],[2191],{"type":77,"value":2192},"idempotencyKey",{"type":77,"value":1425},{"type":71,"tag":86,"props":2195,"children":2197},{"className":2196},[],[2198],{"type":77,"value":2199},"idempotencyKeyTTL",{"type":77,"value":1425},{"type":71,"tag":86,"props":2202,"children":2204},{"className":2203},[],[2205],{"type":77,"value":2206},"debounce",{"type":77,"value":1425},{"type":71,"tag":86,"props":2209,"children":2211},{"className":2210},[],[2212],{"type":77,"value":2213},"queue",{"type":77,"value":1425},{"type":71,"tag":86,"props":2216,"children":2218},{"className":2217},[],[2219],{"type":77,"value":2220},"concurrencyKey",{"type":77,"value":1425},{"type":71,"tag":86,"props":2223,"children":2225},{"className":2224},[],[2226],{"type":77,"value":985},{"type":77,"value":1425},{"type":71,"tag":86,"props":2229,"children":2231},{"className":2230},[],[2232],{"type":77,"value":2233},"tags",{"type":77,"value":1425},{"type":71,"tag":86,"props":2236,"children":2238},{"className":2237},[],[2239],{"type":77,"value":2240},"metadata",{"type":77,"value":1425},{"type":71,"tag":86,"props":2243,"children":2245},{"className":2244},[],[2246],{"type":77,"value":2247},"priority",{"type":77,"value":1425},{"type":71,"tag":86,"props":2250,"children":2252},{"className":2251},[],[2253],{"type":77,"value":2254},"region",{"type":77,"value":1833},{"type":71,"tag":86,"props":2257,"children":2259},{"className":2258},[],[2260],{"type":77,"value":2261},"machine",{"type":77,"value":2263},". Inspect runs with ",{"type":71,"tag":86,"props":2265,"children":2267},{"className":2266},[],[2268],{"type":77,"value":2269},"runs.retrieve",{"type":77,"value":1425},{"type":71,"tag":86,"props":2272,"children":2274},{"className":2273},[],[2275],{"type":77,"value":2276},"runs.cancel",{"type":77,"value":1833},{"type":71,"tag":86,"props":2279,"children":2281},{"className":2280},[],[2282],{"type":77,"value":2283},"runs.reschedule",{"type":77,"value":117},{"type":71,"tag":563,"props":2286,"children":2288},{"id":2287},"_5-idempotency-keys",[2289],{"type":77,"value":2290},"5. Idempotency keys",{"type":71,"tag":80,"props":2292,"children":2293},{},[2294,2300,2302,2308,2310,2316],{"type":71,"tag":86,"props":2295,"children":2297},{"className":2296},[],[2298],{"type":77,"value":2299},"idempotencyKeys.create(key, { scope })",{"type":77,"value":2301}," returns a 64-char hashed key. A raw string key defaults to ",{"type":71,"tag":86,"props":2303,"children":2305},{"className":2304},[],[2306],{"type":77,"value":2307},"\"run\"",{"type":77,"value":2309}," scope (v4.3.1+); for once-ever behavior use ",{"type":71,"tag":86,"props":2311,"children":2313},{"className":2312},[],[2314],{"type":77,"value":2315},"scope: \"global\"",{"type":77,"value":117},{"type":71,"tag":126,"props":2318,"children":2320},{"className":128,"code":2319,"language":130,"meta":131,"style":131},"import { idempotencyKeys, task } from \"@trigger.dev\u002Fsdk\";\n\nexport const processOrder = task({\n  id: \"process-order\",\n  run: async (payload: { orderId: string; email: string }) => {\n    const key = await idempotencyKeys.create(`confirm-${payload.orderId}`);\n    await sendEmail.trigger({ to: payload.email }, { idempotencyKey: key });\n  },\n});\n",[2321],{"type":71,"tag":86,"props":2322,"children":2323},{"__ignoreMap":131},[2324,2372,2379,2411,2439,2512,2588,2672,2679],{"type":71,"tag":137,"props":2325,"children":2326},{"class":139,"line":140},[2327,2331,2335,2340,2344,2348,2352,2356,2360,2364,2368],{"type":71,"tag":137,"props":2328,"children":2329},{"style":154},[2330],{"type":77,"value":157},{"type":71,"tag":137,"props":2332,"children":2333},{"style":160},[2334],{"type":77,"value":163},{"type":71,"tag":137,"props":2336,"children":2337},{"style":166},[2338],{"type":77,"value":2339}," idempotencyKeys",{"type":71,"tag":137,"props":2341,"children":2342},{"style":160},[2343],{"type":77,"value":282},{"type":71,"tag":137,"props":2345,"children":2346},{"style":166},[2347],{"type":77,"value":169},{"type":71,"tag":137,"props":2349,"children":2350},{"style":160},[2351],{"type":77,"value":174},{"type":71,"tag":137,"props":2353,"children":2354},{"style":154},[2355],{"type":77,"value":179},{"type":71,"tag":137,"props":2357,"children":2358},{"style":160},[2359],{"type":77,"value":184},{"type":71,"tag":137,"props":2361,"children":2362},{"style":187},[2363],{"type":77,"value":99},{"type":71,"tag":137,"props":2365,"children":2366},{"style":160},[2367],{"type":77,"value":194},{"type":71,"tag":137,"props":2369,"children":2370},{"style":160},[2371],{"type":77,"value":199},{"type":71,"tag":137,"props":2373,"children":2374},{"class":139,"line":150},[2375],{"type":71,"tag":137,"props":2376,"children":2377},{"emptyLinePlaceholder":206},[2378],{"type":77,"value":209},{"type":71,"tag":137,"props":2380,"children":2381},{"class":139,"line":202},[2382,2386,2390,2395,2399,2403,2407],{"type":71,"tag":137,"props":2383,"children":2384},{"style":154},[2385],{"type":77,"value":218},{"type":71,"tag":137,"props":2387,"children":2388},{"style":221},[2389],{"type":77,"value":224},{"type":71,"tag":137,"props":2391,"children":2392},{"style":166},[2393],{"type":77,"value":2394}," processOrder ",{"type":71,"tag":137,"props":2396,"children":2397},{"style":160},[2398],{"type":77,"value":234},{"type":71,"tag":137,"props":2400,"children":2401},{"style":237},[2402],{"type":77,"value":169},{"type":71,"tag":137,"props":2404,"children":2405},{"style":166},[2406],{"type":77,"value":244},{"type":71,"tag":137,"props":2408,"children":2409},{"style":160},[2410],{"type":77,"value":249},{"type":71,"tag":137,"props":2412,"children":2413},{"class":139,"line":212},[2414,2418,2422,2426,2431,2435],{"type":71,"tag":137,"props":2415,"children":2416},{"style":256},[2417],{"type":77,"value":259},{"type":71,"tag":137,"props":2419,"children":2420},{"style":160},[2421],{"type":77,"value":264},{"type":71,"tag":137,"props":2423,"children":2424},{"style":160},[2425],{"type":77,"value":184},{"type":71,"tag":137,"props":2427,"children":2428},{"style":187},[2429],{"type":77,"value":2430},"process-order",{"type":71,"tag":137,"props":2432,"children":2433},{"style":160},[2434],{"type":77,"value":194},{"type":71,"tag":137,"props":2436,"children":2437},{"style":160},[2438],{"type":77,"value":757},{"type":71,"tag":137,"props":2440,"children":2441},{"class":139,"line":252},[2442,2446,2450,2454,2458,2462,2466,2470,2475,2479,2483,2487,2492,2496,2500,2504,2508],{"type":71,"tag":137,"props":2443,"children":2444},{"style":237},[2445],{"type":77,"value":296},{"type":71,"tag":137,"props":2447,"children":2448},{"style":160},[2449],{"type":77,"value":264},{"type":71,"tag":137,"props":2451,"children":2452},{"style":221},[2453],{"type":77,"value":305},{"type":71,"tag":137,"props":2455,"children":2456},{"style":160},[2457],{"type":77,"value":310},{"type":71,"tag":137,"props":2459,"children":2460},{"style":313},[2461],{"type":77,"value":316},{"type":71,"tag":137,"props":2463,"children":2464},{"style":160},[2465],{"type":77,"value":264},{"type":71,"tag":137,"props":2467,"children":2468},{"style":160},[2469],{"type":77,"value":163},{"type":71,"tag":137,"props":2471,"children":2472},{"style":256},[2473],{"type":77,"value":2474}," orderId",{"type":71,"tag":137,"props":2476,"children":2477},{"style":160},[2478],{"type":77,"value":264},{"type":71,"tag":137,"props":2480,"children":2481},{"style":336},[2482],{"type":77,"value":339},{"type":71,"tag":137,"props":2484,"children":2485},{"style":160},[2486],{"type":77,"value":1369},{"type":71,"tag":137,"props":2488,"children":2489},{"style":256},[2490],{"type":77,"value":2491}," email",{"type":71,"tag":137,"props":2493,"children":2494},{"style":160},[2495],{"type":77,"value":264},{"type":71,"tag":137,"props":2497,"children":2498},{"style":336},[2499],{"type":77,"value":339},{"type":71,"tag":137,"props":2501,"children":2502},{"style":160},[2503],{"type":77,"value":358},{"type":71,"tag":137,"props":2505,"children":2506},{"style":221},[2507],{"type":77,"value":363},{"type":71,"tag":137,"props":2509,"children":2510},{"style":160},[2511],{"type":77,"value":368},{"type":71,"tag":137,"props":2513,"children":2514},{"class":139,"line":290},[2515,2519,2524,2528,2532,2536,2540,2545,2549,2554,2559,2563,2567,2571,2576,2580,2584],{"type":71,"tag":137,"props":2516,"children":2517},{"style":221},[2518],{"type":77,"value":1594},{"type":71,"tag":137,"props":2520,"children":2521},{"style":166},[2522],{"type":77,"value":2523}," key",{"type":71,"tag":137,"props":2525,"children":2526},{"style":160},[2527],{"type":77,"value":1604},{"type":71,"tag":137,"props":2529,"children":2530},{"style":154},[2531],{"type":77,"value":1609},{"type":71,"tag":137,"props":2533,"children":2534},{"style":166},[2535],{"type":77,"value":2339},{"type":71,"tag":137,"props":2537,"children":2538},{"style":160},[2539],{"type":77,"value":117},{"type":71,"tag":137,"props":2541,"children":2542},{"style":237},[2543],{"type":77,"value":2544},"create",{"type":71,"tag":137,"props":2546,"children":2547},{"style":256},[2548],{"type":77,"value":244},{"type":71,"tag":137,"props":2550,"children":2551},{"style":160},[2552],{"type":77,"value":2553},"`",{"type":71,"tag":137,"props":2555,"children":2556},{"style":187},[2557],{"type":77,"value":2558},"confirm-",{"type":71,"tag":137,"props":2560,"children":2561},{"style":160},[2562],{"type":77,"value":923},{"type":71,"tag":137,"props":2564,"children":2565},{"style":166},[2566],{"type":77,"value":316},{"type":71,"tag":137,"props":2568,"children":2569},{"style":160},[2570],{"type":77,"value":117},{"type":71,"tag":137,"props":2572,"children":2573},{"style":166},[2574],{"type":77,"value":2575},"orderId",{"type":71,"tag":137,"props":2577,"children":2578},{"style":160},[2579],{"type":77,"value":941},{"type":71,"tag":137,"props":2581,"children":2582},{"style":256},[2583],{"type":77,"value":450},{"type":71,"tag":137,"props":2585,"children":2586},{"style":160},[2587],{"type":77,"value":199},{"type":71,"tag":137,"props":2589,"children":2590},{"class":139,"line":371},[2591,2596,2601,2605,2609,2613,2617,2621,2625,2630,2634,2639,2643,2647,2652,2656,2660,2664,2668],{"type":71,"tag":137,"props":2592,"children":2593},{"style":154},[2594],{"type":77,"value":2595},"    await",{"type":71,"tag":137,"props":2597,"children":2598},{"style":166},[2599],{"type":77,"value":2600}," sendEmail",{"type":71,"tag":137,"props":2602,"children":2603},{"style":160},[2604],{"type":77,"value":117},{"type":71,"tag":137,"props":2606,"children":2607},{"style":237},[2608],{"type":77,"value":2009},{"type":71,"tag":137,"props":2610,"children":2611},{"style":256},[2612],{"type":77,"value":244},{"type":71,"tag":137,"props":2614,"children":2615},{"style":160},[2616],{"type":77,"value":791},{"type":71,"tag":137,"props":2618,"children":2619},{"style":256},[2620],{"type":77,"value":2062},{"type":71,"tag":137,"props":2622,"children":2623},{"style":160},[2624],{"type":77,"value":264},{"type":71,"tag":137,"props":2626,"children":2627},{"style":166},[2628],{"type":77,"value":2629}," payload",{"type":71,"tag":137,"props":2631,"children":2632},{"style":160},[2633],{"type":77,"value":117},{"type":71,"tag":137,"props":2635,"children":2636},{"style":166},[2637],{"type":77,"value":2638},"email",{"type":71,"tag":137,"props":2640,"children":2641},{"style":160},[2642],{"type":77,"value":344},{"type":71,"tag":137,"props":2644,"children":2645},{"style":160},[2646],{"type":77,"value":163},{"type":71,"tag":137,"props":2648,"children":2649},{"style":256},[2650],{"type":77,"value":2651}," idempotencyKey",{"type":71,"tag":137,"props":2653,"children":2654},{"style":160},[2655],{"type":77,"value":264},{"type":71,"tag":137,"props":2657,"children":2658},{"style":166},[2659],{"type":77,"value":2523},{"type":71,"tag":137,"props":2661,"children":2662},{"style":160},[2663],{"type":77,"value":174},{"type":71,"tag":137,"props":2665,"children":2666},{"style":256},[2667],{"type":77,"value":450},{"type":71,"tag":137,"props":2669,"children":2670},{"style":160},[2671],{"type":77,"value":199},{"type":71,"tag":137,"props":2673,"children":2674},{"class":139,"line":457},[2675],{"type":71,"tag":137,"props":2676,"children":2677},{"style":160},[2678],{"type":77,"value":501},{"type":71,"tag":137,"props":2680,"children":2681},{"class":139,"line":495},[2682,2686,2690],{"type":71,"tag":137,"props":2683,"children":2684},{"style":160},[2685],{"type":77,"value":510},{"type":71,"tag":137,"props":2687,"children":2688},{"style":166},[2689],{"type":77,"value":450},{"type":71,"tag":137,"props":2691,"children":2692},{"style":160},[2693],{"type":77,"value":199},{"type":71,"tag":563,"props":2695,"children":2697},{"id":2696},"_6-waits-and-run-metadata",[2698],{"type":77,"value":2699},"6. Waits and run metadata",{"type":71,"tag":80,"props":2701,"children":2702},{},[2703,2709,2710,2716,2718,2724,2726,2732,2734,2740,2741,2747,2748,2754,2755,2761,2762,2768,2769,2775,2776,2782],{"type":71,"tag":86,"props":2704,"children":2706},{"className":2705},[],[2707],{"type":77,"value":2708},"wait.for({ seconds })",{"type":77,"value":2164},{"type":71,"tag":86,"props":2711,"children":2713},{"className":2712},[],[2714],{"type":77,"value":2715},"wait.until({ date })",{"type":77,"value":2717}," durably pause the run. ",{"type":71,"tag":86,"props":2719,"children":2721},{"className":2720},[],[2722],{"type":77,"value":2723},"metadata.*",{"type":77,"value":2725}," is readable and writable only inside ",{"type":71,"tag":86,"props":2727,"children":2729},{"className":2728},[],[2730],{"type":77,"value":2731},"run()",{"type":77,"value":2733},"; updates are synchronous and chainable (",{"type":71,"tag":86,"props":2735,"children":2737},{"className":2736},[],[2738],{"type":77,"value":2739},"set",{"type":77,"value":1425},{"type":71,"tag":86,"props":2742,"children":2744},{"className":2743},[],[2745],{"type":77,"value":2746},"del",{"type":77,"value":1425},{"type":71,"tag":86,"props":2749,"children":2751},{"className":2750},[],[2752],{"type":77,"value":2753},"replace",{"type":77,"value":1425},{"type":71,"tag":86,"props":2756,"children":2758},{"className":2757},[],[2759],{"type":77,"value":2760},"append",{"type":77,"value":1425},{"type":71,"tag":86,"props":2763,"children":2765},{"className":2764},[],[2766],{"type":77,"value":2767},"remove",{"type":77,"value":1425},{"type":71,"tag":86,"props":2770,"children":2772},{"className":2771},[],[2773],{"type":77,"value":2774},"increment",{"type":77,"value":1425},{"type":71,"tag":86,"props":2777,"children":2779},{"className":2778},[],[2780],{"type":77,"value":2781},"decrement",{"type":77,"value":2783},").",{"type":71,"tag":126,"props":2785,"children":2787},{"className":128,"code":2786,"language":130,"meta":131,"style":131},"import { task, metadata, wait } from \"@trigger.dev\u002Fsdk\";\n\nexport const importer = task({\n  id: \"importer\",\n  run: async (payload: { rows: unknown[] }) => {\n    metadata.set(\"status\", \"processing\").set(\"total\", payload.rows.length);\n    await wait.for({ seconds: 5 });\n    metadata.set(\"status\", \"complete\");\n  },\n});\n",[2788],{"type":71,"tag":86,"props":2789,"children":2790},{"__ignoreMap":131},[2791,2848,2855,2887,2915,2978,3091,3144,3200,3207],{"type":71,"tag":137,"props":2792,"children":2793},{"class":139,"line":140},[2794,2798,2802,2806,2810,2815,2819,2824,2828,2832,2836,2840,2844],{"type":71,"tag":137,"props":2795,"children":2796},{"style":154},[2797],{"type":77,"value":157},{"type":71,"tag":137,"props":2799,"children":2800},{"style":160},[2801],{"type":77,"value":163},{"type":71,"tag":137,"props":2803,"children":2804},{"style":166},[2805],{"type":77,"value":169},{"type":71,"tag":137,"props":2807,"children":2808},{"style":160},[2809],{"type":77,"value":282},{"type":71,"tag":137,"props":2811,"children":2812},{"style":166},[2813],{"type":77,"value":2814}," metadata",{"type":71,"tag":137,"props":2816,"children":2817},{"style":160},[2818],{"type":77,"value":282},{"type":71,"tag":137,"props":2820,"children":2821},{"style":166},[2822],{"type":77,"value":2823}," wait",{"type":71,"tag":137,"props":2825,"children":2826},{"style":160},[2827],{"type":77,"value":174},{"type":71,"tag":137,"props":2829,"children":2830},{"style":154},[2831],{"type":77,"value":179},{"type":71,"tag":137,"props":2833,"children":2834},{"style":160},[2835],{"type":77,"value":184},{"type":71,"tag":137,"props":2837,"children":2838},{"style":187},[2839],{"type":77,"value":99},{"type":71,"tag":137,"props":2841,"children":2842},{"style":160},[2843],{"type":77,"value":194},{"type":71,"tag":137,"props":2845,"children":2846},{"style":160},[2847],{"type":77,"value":199},{"type":71,"tag":137,"props":2849,"children":2850},{"class":139,"line":150},[2851],{"type":71,"tag":137,"props":2852,"children":2853},{"emptyLinePlaceholder":206},[2854],{"type":77,"value":209},{"type":71,"tag":137,"props":2856,"children":2857},{"class":139,"line":202},[2858,2862,2866,2871,2875,2879,2883],{"type":71,"tag":137,"props":2859,"children":2860},{"style":154},[2861],{"type":77,"value":218},{"type":71,"tag":137,"props":2863,"children":2864},{"style":221},[2865],{"type":77,"value":224},{"type":71,"tag":137,"props":2867,"children":2868},{"style":166},[2869],{"type":77,"value":2870}," importer ",{"type":71,"tag":137,"props":2872,"children":2873},{"style":160},[2874],{"type":77,"value":234},{"type":71,"tag":137,"props":2876,"children":2877},{"style":237},[2878],{"type":77,"value":169},{"type":71,"tag":137,"props":2880,"children":2881},{"style":166},[2882],{"type":77,"value":244},{"type":71,"tag":137,"props":2884,"children":2885},{"style":160},[2886],{"type":77,"value":249},{"type":71,"tag":137,"props":2888,"children":2889},{"class":139,"line":212},[2890,2894,2898,2902,2907,2911],{"type":71,"tag":137,"props":2891,"children":2892},{"style":256},[2893],{"type":77,"value":259},{"type":71,"tag":137,"props":2895,"children":2896},{"style":160},[2897],{"type":77,"value":264},{"type":71,"tag":137,"props":2899,"children":2900},{"style":160},[2901],{"type":77,"value":184},{"type":71,"tag":137,"props":2903,"children":2904},{"style":187},[2905],{"type":77,"value":2906},"importer",{"type":71,"tag":137,"props":2908,"children":2909},{"style":160},[2910],{"type":77,"value":194},{"type":71,"tag":137,"props":2912,"children":2913},{"style":160},[2914],{"type":77,"value":757},{"type":71,"tag":137,"props":2916,"children":2917},{"class":139,"line":252},[2918,2922,2926,2930,2934,2938,2942,2946,2951,2955,2960,2965,2970,2974],{"type":71,"tag":137,"props":2919,"children":2920},{"style":237},[2921],{"type":77,"value":296},{"type":71,"tag":137,"props":2923,"children":2924},{"style":160},[2925],{"type":77,"value":264},{"type":71,"tag":137,"props":2927,"children":2928},{"style":221},[2929],{"type":77,"value":305},{"type":71,"tag":137,"props":2931,"children":2932},{"style":160},[2933],{"type":77,"value":310},{"type":71,"tag":137,"props":2935,"children":2936},{"style":313},[2937],{"type":77,"value":316},{"type":71,"tag":137,"props":2939,"children":2940},{"style":160},[2941],{"type":77,"value":264},{"type":71,"tag":137,"props":2943,"children":2944},{"style":160},[2945],{"type":77,"value":163},{"type":71,"tag":137,"props":2947,"children":2948},{"style":256},[2949],{"type":77,"value":2950}," rows",{"type":71,"tag":137,"props":2952,"children":2953},{"style":160},[2954],{"type":77,"value":264},{"type":71,"tag":137,"props":2956,"children":2957},{"style":336},[2958],{"type":77,"value":2959}," unknown",{"type":71,"tag":137,"props":2961,"children":2962},{"style":166},[2963],{"type":77,"value":2964},"[] ",{"type":71,"tag":137,"props":2966,"children":2967},{"style":160},[2968],{"type":77,"value":2969},"})",{"type":71,"tag":137,"props":2971,"children":2972},{"style":221},[2973],{"type":77,"value":363},{"type":71,"tag":137,"props":2975,"children":2976},{"style":160},[2977],{"type":77,"value":368},{"type":71,"tag":137,"props":2979,"children":2980},{"class":139,"line":290},[2981,2986,2990,2994,2998,3002,3007,3011,3015,3019,3024,3028,3032,3036,3040,3044,3048,3053,3057,3061,3065,3069,3074,3078,3083,3087],{"type":71,"tag":137,"props":2982,"children":2983},{"style":166},[2984],{"type":77,"value":2985},"    metadata",{"type":71,"tag":137,"props":2987,"children":2988},{"style":160},[2989],{"type":77,"value":117},{"type":71,"tag":137,"props":2991,"children":2992},{"style":237},[2993],{"type":77,"value":2739},{"type":71,"tag":137,"props":2995,"children":2996},{"style":256},[2997],{"type":77,"value":244},{"type":71,"tag":137,"props":2999,"children":3000},{"style":160},[3001],{"type":77,"value":194},{"type":71,"tag":137,"props":3003,"children":3004},{"style":187},[3005],{"type":77,"value":3006},"status",{"type":71,"tag":137,"props":3008,"children":3009},{"style":160},[3010],{"type":77,"value":194},{"type":71,"tag":137,"props":3012,"children":3013},{"style":160},[3014],{"type":77,"value":282},{"type":71,"tag":137,"props":3016,"children":3017},{"style":160},[3018],{"type":77,"value":184},{"type":71,"tag":137,"props":3020,"children":3021},{"style":187},[3022],{"type":77,"value":3023},"processing",{"type":71,"tag":137,"props":3025,"children":3026},{"style":160},[3027],{"type":77,"value":194},{"type":71,"tag":137,"props":3029,"children":3030},{"style":256},[3031],{"type":77,"value":450},{"type":71,"tag":137,"props":3033,"children":3034},{"style":160},[3035],{"type":77,"value":117},{"type":71,"tag":137,"props":3037,"children":3038},{"style":237},[3039],{"type":77,"value":2739},{"type":71,"tag":137,"props":3041,"children":3042},{"style":256},[3043],{"type":77,"value":244},{"type":71,"tag":137,"props":3045,"children":3046},{"style":160},[3047],{"type":77,"value":194},{"type":71,"tag":137,"props":3049,"children":3050},{"style":187},[3051],{"type":77,"value":3052},"total",{"type":71,"tag":137,"props":3054,"children":3055},{"style":160},[3056],{"type":77,"value":194},{"type":71,"tag":137,"props":3058,"children":3059},{"style":160},[3060],{"type":77,"value":282},{"type":71,"tag":137,"props":3062,"children":3063},{"style":166},[3064],{"type":77,"value":2629},{"type":71,"tag":137,"props":3066,"children":3067},{"style":160},[3068],{"type":77,"value":117},{"type":71,"tag":137,"props":3070,"children":3071},{"style":166},[3072],{"type":77,"value":3073},"rows",{"type":71,"tag":137,"props":3075,"children":3076},{"style":160},[3077],{"type":77,"value":117},{"type":71,"tag":137,"props":3079,"children":3080},{"style":166},[3081],{"type":77,"value":3082},"length",{"type":71,"tag":137,"props":3084,"children":3085},{"style":256},[3086],{"type":77,"value":450},{"type":71,"tag":137,"props":3088,"children":3089},{"style":160},[3090],{"type":77,"value":199},{"type":71,"tag":137,"props":3092,"children":3093},{"class":139,"line":371},[3094,3098,3102,3106,3111,3115,3119,3124,3128,3132,3136,3140],{"type":71,"tag":137,"props":3095,"children":3096},{"style":154},[3097],{"type":77,"value":2595},{"type":71,"tag":137,"props":3099,"children":3100},{"style":166},[3101],{"type":77,"value":2823},{"type":71,"tag":137,"props":3103,"children":3104},{"style":160},[3105],{"type":77,"value":117},{"type":71,"tag":137,"props":3107,"children":3108},{"style":237},[3109],{"type":77,"value":3110},"for",{"type":71,"tag":137,"props":3112,"children":3113},{"style":256},[3114],{"type":77,"value":244},{"type":71,"tag":137,"props":3116,"children":3117},{"style":160},[3118],{"type":77,"value":791},{"type":71,"tag":137,"props":3120,"children":3121},{"style":256},[3122],{"type":77,"value":3123}," seconds",{"type":71,"tag":137,"props":3125,"children":3126},{"style":160},[3127],{"type":77,"value":264},{"type":71,"tag":137,"props":3129,"children":3130},{"style":1153},[3131],{"type":77,"value":1156},{"type":71,"tag":137,"props":3133,"children":3134},{"style":160},[3135],{"type":77,"value":174},{"type":71,"tag":137,"props":3137,"children":3138},{"style":256},[3139],{"type":77,"value":450},{"type":71,"tag":137,"props":3141,"children":3142},{"style":160},[3143],{"type":77,"value":199},{"type":71,"tag":137,"props":3145,"children":3146},{"class":139,"line":457},[3147,3151,3155,3159,3163,3167,3171,3175,3179,3183,3188,3192,3196],{"type":71,"tag":137,"props":3148,"children":3149},{"style":166},[3150],{"type":77,"value":2985},{"type":71,"tag":137,"props":3152,"children":3153},{"style":160},[3154],{"type":77,"value":117},{"type":71,"tag":137,"props":3156,"children":3157},{"style":237},[3158],{"type":77,"value":2739},{"type":71,"tag":137,"props":3160,"children":3161},{"style":256},[3162],{"type":77,"value":244},{"type":71,"tag":137,"props":3164,"children":3165},{"style":160},[3166],{"type":77,"value":194},{"type":71,"tag":137,"props":3168,"children":3169},{"style":187},[3170],{"type":77,"value":3006},{"type":71,"tag":137,"props":3172,"children":3173},{"style":160},[3174],{"type":77,"value":194},{"type":71,"tag":137,"props":3176,"children":3177},{"style":160},[3178],{"type":77,"value":282},{"type":71,"tag":137,"props":3180,"children":3181},{"style":160},[3182],{"type":77,"value":184},{"type":71,"tag":137,"props":3184,"children":3185},{"style":187},[3186],{"type":77,"value":3187},"complete",{"type":71,"tag":137,"props":3189,"children":3190},{"style":160},[3191],{"type":77,"value":194},{"type":71,"tag":137,"props":3193,"children":3194},{"style":256},[3195],{"type":77,"value":450},{"type":71,"tag":137,"props":3197,"children":3198},{"style":160},[3199],{"type":77,"value":199},{"type":71,"tag":137,"props":3201,"children":3202},{"class":139,"line":495},[3203],{"type":71,"tag":137,"props":3204,"children":3205},{"style":160},[3206],{"type":77,"value":501},{"type":71,"tag":137,"props":3208,"children":3209},{"class":139,"line":504},[3210,3214,3218],{"type":71,"tag":137,"props":3211,"children":3212},{"style":160},[3213],{"type":77,"value":510},{"type":71,"tag":137,"props":3215,"children":3216},{"style":166},[3217],{"type":77,"value":450},{"type":71,"tag":137,"props":3219,"children":3220},{"style":160},[3221],{"type":77,"value":199},{"type":71,"tag":80,"props":3223,"children":3224},{},[3225,3227,3233,3235,3241,3243,3249,3251,3257,3259,3264,3266,3272,3274,3280,3282,3288,3290,3296,3298,3304],{"type":77,"value":3226},"For human-in-the-loop, ",{"type":71,"tag":86,"props":3228,"children":3230},{"className":3229},[],[3231],{"type":77,"value":3232},"wait.createToken({ timeout, tags })",{"type":77,"value":3234}," returns ",{"type":71,"tag":86,"props":3236,"children":3238},{"className":3237},[],[3239],{"type":77,"value":3240},"{ id, url, publicAccessToken, ... }",{"type":77,"value":3242},"; resume with ",{"type":71,"tag":86,"props":3244,"children":3246},{"className":3245},[],[3247],{"type":77,"value":3248},"wait.forToken\u003CT>(token: string | { id: string })",{"type":77,"value":3250}," which returns ",{"type":71,"tag":86,"props":3252,"children":3254},{"className":3253},[],[3255],{"type":77,"value":3256},"{ ok, output?, error? }",{"type":77,"value":3258}," (or ",{"type":71,"tag":86,"props":3260,"children":3262},{"className":3261},[],[3263],{"type":77,"value":1489},{"type":77,"value":3265},"), and complete it elsewhere with ",{"type":71,"tag":86,"props":3267,"children":3269},{"className":3268},[],[3270],{"type":77,"value":3271},"wait.completeToken(tokenId, output)",{"type":77,"value":3273},". Metadata max is 256KB and is not propagated to child tasks; push values to a parent with ",{"type":71,"tag":86,"props":3275,"children":3277},{"className":3276},[],[3278],{"type":77,"value":3279},"metadata.parent.*",{"type":77,"value":3281}," \u002F ",{"type":71,"tag":86,"props":3283,"children":3285},{"className":3284},[],[3286],{"type":77,"value":3287},"metadata.root.*",{"type":77,"value":3289},". (",{"type":71,"tag":86,"props":3291,"children":3293},{"className":3292},[],[3294],{"type":77,"value":3295},"metadata.stream",{"type":77,"value":3297}," is deprecated since 4.1.0 in favor of ",{"type":71,"tag":86,"props":3299,"children":3301},{"className":3300},[],[3302],{"type":77,"value":3303},"streams.pipe()",{"type":77,"value":3305},".)",{"type":71,"tag":563,"props":3307,"children":3309},{"id":3308},"_7-scheduled-cron-tasks",[3310],{"type":77,"value":3311},"7. Scheduled (cron) tasks",{"type":71,"tag":126,"props":3313,"children":3315},{"className":128,"code":3314,"language":130,"meta":131,"style":131},"import { schedules } from \"@trigger.dev\u002Fsdk\";\n\nexport const dailyReport = schedules.task({\n  id: \"daily-report\",\n  cron: { pattern: \"0 5 * * *\", timezone: \"Asia\u002FTokyo\" },\n  run: async (payload) => {\n    console.log(\"scheduled at\", payload.timestamp, \"next\", payload.upcoming);\n  },\n});\n",[3316],{"type":71,"tag":86,"props":3317,"children":3318},{"__ignoreMap":131},[3319,3359,3366,3407,3435,3503,3538,3629,3636],{"type":71,"tag":137,"props":3320,"children":3321},{"class":139,"line":140},[3322,3326,3330,3335,3339,3343,3347,3351,3355],{"type":71,"tag":137,"props":3323,"children":3324},{"style":154},[3325],{"type":77,"value":157},{"type":71,"tag":137,"props":3327,"children":3328},{"style":160},[3329],{"type":77,"value":163},{"type":71,"tag":137,"props":3331,"children":3332},{"style":166},[3333],{"type":77,"value":3334}," schedules",{"type":71,"tag":137,"props":3336,"children":3337},{"style":160},[3338],{"type":77,"value":174},{"type":71,"tag":137,"props":3340,"children":3341},{"style":154},[3342],{"type":77,"value":179},{"type":71,"tag":137,"props":3344,"children":3345},{"style":160},[3346],{"type":77,"value":184},{"type":71,"tag":137,"props":3348,"children":3349},{"style":187},[3350],{"type":77,"value":99},{"type":71,"tag":137,"props":3352,"children":3353},{"style":160},[3354],{"type":77,"value":194},{"type":71,"tag":137,"props":3356,"children":3357},{"style":160},[3358],{"type":77,"value":199},{"type":71,"tag":137,"props":3360,"children":3361},{"class":139,"line":150},[3362],{"type":71,"tag":137,"props":3363,"children":3364},{"emptyLinePlaceholder":206},[3365],{"type":77,"value":209},{"type":71,"tag":137,"props":3367,"children":3368},{"class":139,"line":202},[3369,3373,3377,3382,3386,3390,3394,3399,3403],{"type":71,"tag":137,"props":3370,"children":3371},{"style":154},[3372],{"type":77,"value":218},{"type":71,"tag":137,"props":3374,"children":3375},{"style":221},[3376],{"type":77,"value":224},{"type":71,"tag":137,"props":3378,"children":3379},{"style":166},[3380],{"type":77,"value":3381}," dailyReport ",{"type":71,"tag":137,"props":3383,"children":3384},{"style":160},[3385],{"type":77,"value":234},{"type":71,"tag":137,"props":3387,"children":3388},{"style":166},[3389],{"type":77,"value":3334},{"type":71,"tag":137,"props":3391,"children":3392},{"style":160},[3393],{"type":77,"value":117},{"type":71,"tag":137,"props":3395,"children":3396},{"style":237},[3397],{"type":77,"value":3398},"task",{"type":71,"tag":137,"props":3400,"children":3401},{"style":166},[3402],{"type":77,"value":244},{"type":71,"tag":137,"props":3404,"children":3405},{"style":160},[3406],{"type":77,"value":249},{"type":71,"tag":137,"props":3408,"children":3409},{"class":139,"line":212},[3410,3414,3418,3422,3427,3431],{"type":71,"tag":137,"props":3411,"children":3412},{"style":256},[3413],{"type":77,"value":259},{"type":71,"tag":137,"props":3415,"children":3416},{"style":160},[3417],{"type":77,"value":264},{"type":71,"tag":137,"props":3419,"children":3420},{"style":160},[3421],{"type":77,"value":184},{"type":71,"tag":137,"props":3423,"children":3424},{"style":187},[3425],{"type":77,"value":3426},"daily-report",{"type":71,"tag":137,"props":3428,"children":3429},{"style":160},[3430],{"type":77,"value":194},{"type":71,"tag":137,"props":3432,"children":3433},{"style":160},[3434],{"type":77,"value":757},{"type":71,"tag":137,"props":3436,"children":3437},{"class":139,"line":252},[3438,3443,3447,3451,3456,3460,3464,3469,3473,3477,3482,3486,3490,3495,3499],{"type":71,"tag":137,"props":3439,"children":3440},{"style":256},[3441],{"type":77,"value":3442},"  cron",{"type":71,"tag":137,"props":3444,"children":3445},{"style":160},[3446],{"type":77,"value":264},{"type":71,"tag":137,"props":3448,"children":3449},{"style":160},[3450],{"type":77,"value":163},{"type":71,"tag":137,"props":3452,"children":3453},{"style":256},[3454],{"type":77,"value":3455}," pattern",{"type":71,"tag":137,"props":3457,"children":3458},{"style":160},[3459],{"type":77,"value":264},{"type":71,"tag":137,"props":3461,"children":3462},{"style":160},[3463],{"type":77,"value":184},{"type":71,"tag":137,"props":3465,"children":3466},{"style":187},[3467],{"type":77,"value":3468},"0 5 * * *",{"type":71,"tag":137,"props":3470,"children":3471},{"style":160},[3472],{"type":77,"value":194},{"type":71,"tag":137,"props":3474,"children":3475},{"style":160},[3476],{"type":77,"value":282},{"type":71,"tag":137,"props":3478,"children":3479},{"style":256},[3480],{"type":77,"value":3481}," timezone",{"type":71,"tag":137,"props":3483,"children":3484},{"style":160},[3485],{"type":77,"value":264},{"type":71,"tag":137,"props":3487,"children":3488},{"style":160},[3489],{"type":77,"value":184},{"type":71,"tag":137,"props":3491,"children":3492},{"style":187},[3493],{"type":77,"value":3494},"Asia\u002FTokyo",{"type":71,"tag":137,"props":3496,"children":3497},{"style":160},[3498],{"type":77,"value":194},{"type":71,"tag":137,"props":3500,"children":3501},{"style":160},[3502],{"type":77,"value":1232},{"type":71,"tag":137,"props":3504,"children":3505},{"class":139,"line":290},[3506,3510,3514,3518,3522,3526,3530,3534],{"type":71,"tag":137,"props":3507,"children":3508},{"style":237},[3509],{"type":77,"value":296},{"type":71,"tag":137,"props":3511,"children":3512},{"style":160},[3513],{"type":77,"value":264},{"type":71,"tag":137,"props":3515,"children":3516},{"style":221},[3517],{"type":77,"value":305},{"type":71,"tag":137,"props":3519,"children":3520},{"style":160},[3521],{"type":77,"value":310},{"type":71,"tag":137,"props":3523,"children":3524},{"style":313},[3525],{"type":77,"value":316},{"type":71,"tag":137,"props":3527,"children":3528},{"style":160},[3529],{"type":77,"value":450},{"type":71,"tag":137,"props":3531,"children":3532},{"style":221},[3533],{"type":77,"value":363},{"type":71,"tag":137,"props":3535,"children":3536},{"style":160},[3537],{"type":77,"value":368},{"type":71,"tag":137,"props":3539,"children":3540},{"class":139,"line":371},[3541,3545,3549,3553,3557,3561,3566,3570,3574,3578,3582,3587,3591,3595,3600,3604,3608,3612,3616,3621,3625],{"type":71,"tag":137,"props":3542,"children":3543},{"style":166},[3544],{"type":77,"value":377},{"type":71,"tag":137,"props":3546,"children":3547},{"style":160},[3548],{"type":77,"value":117},{"type":71,"tag":137,"props":3550,"children":3551},{"style":237},[3552],{"type":77,"value":386},{"type":71,"tag":137,"props":3554,"children":3555},{"style":256},[3556],{"type":77,"value":244},{"type":71,"tag":137,"props":3558,"children":3559},{"style":160},[3560],{"type":77,"value":194},{"type":71,"tag":137,"props":3562,"children":3563},{"style":187},[3564],{"type":77,"value":3565},"scheduled at",{"type":71,"tag":137,"props":3567,"children":3568},{"style":160},[3569],{"type":77,"value":194},{"type":71,"tag":137,"props":3571,"children":3572},{"style":160},[3573],{"type":77,"value":282},{"type":71,"tag":137,"props":3575,"children":3576},{"style":166},[3577],{"type":77,"value":2629},{"type":71,"tag":137,"props":3579,"children":3580},{"style":160},[3581],{"type":77,"value":117},{"type":71,"tag":137,"props":3583,"children":3584},{"style":166},[3585],{"type":77,"value":3586},"timestamp",{"type":71,"tag":137,"props":3588,"children":3589},{"style":160},[3590],{"type":77,"value":282},{"type":71,"tag":137,"props":3592,"children":3593},{"style":160},[3594],{"type":77,"value":184},{"type":71,"tag":137,"props":3596,"children":3597},{"style":187},[3598],{"type":77,"value":3599},"next",{"type":71,"tag":137,"props":3601,"children":3602},{"style":160},[3603],{"type":77,"value":194},{"type":71,"tag":137,"props":3605,"children":3606},{"style":160},[3607],{"type":77,"value":282},{"type":71,"tag":137,"props":3609,"children":3610},{"style":166},[3611],{"type":77,"value":2629},{"type":71,"tag":137,"props":3613,"children":3614},{"style":160},[3615],{"type":77,"value":117},{"type":71,"tag":137,"props":3617,"children":3618},{"style":166},[3619],{"type":77,"value":3620},"upcoming",{"type":71,"tag":137,"props":3622,"children":3623},{"style":256},[3624],{"type":77,"value":450},{"type":71,"tag":137,"props":3626,"children":3627},{"style":160},[3628],{"type":77,"value":199},{"type":71,"tag":137,"props":3630,"children":3631},{"class":139,"line":457},[3632],{"type":71,"tag":137,"props":3633,"children":3634},{"style":160},[3635],{"type":77,"value":501},{"type":71,"tag":137,"props":3637,"children":3638},{"class":139,"line":495},[3639,3643,3647],{"type":71,"tag":137,"props":3640,"children":3641},{"style":160},[3642],{"type":77,"value":510},{"type":71,"tag":137,"props":3644,"children":3645},{"style":166},[3646],{"type":77,"value":450},{"type":71,"tag":137,"props":3648,"children":3649},{"style":160},[3650],{"type":77,"value":199},{"type":71,"tag":80,"props":3652,"children":3653},{},[3654,3656,3661,3662,3668,3669,3675,3676,3682,3683,3689,3690,3695,3697,3703,3705,3711],{"type":77,"value":3655},"The payload includes ",{"type":71,"tag":86,"props":3657,"children":3659},{"className":3658},[],[3660],{"type":77,"value":3586},{"type":77,"value":1425},{"type":71,"tag":86,"props":3663,"children":3665},{"className":3664},[],[3666],{"type":77,"value":3667},"lastTimestamp",{"type":77,"value":1425},{"type":71,"tag":86,"props":3670,"children":3672},{"className":3671},[],[3673],{"type":77,"value":3674},"timezone",{"type":77,"value":1425},{"type":71,"tag":86,"props":3677,"children":3679},{"className":3678},[],[3680],{"type":77,"value":3681},"scheduleId",{"type":77,"value":1425},{"type":71,"tag":86,"props":3684,"children":3686},{"className":3685},[],[3687],{"type":77,"value":3688},"externalId",{"type":77,"value":1833},{"type":71,"tag":86,"props":3691,"children":3693},{"className":3692},[],[3694],{"type":77,"value":3620},{"type":77,"value":3696},". Attach schedules dynamically with ",{"type":71,"tag":86,"props":3698,"children":3700},{"className":3699},[],[3701],{"type":77,"value":3702},"schedules.create({ task, cron, timezone?, externalId?, deduplicationKey })",{"type":77,"value":3704}," (the dedup key is required and per-project), plus ",{"type":71,"tag":86,"props":3706,"children":3708},{"className":3707},[],[3709],{"type":77,"value":3710},"retrieve \u002F list \u002F update \u002F activate \u002F deactivate \u002F del \u002F timezones",{"type":77,"value":117},{"type":71,"tag":563,"props":3713,"children":3715},{"id":3714},"_8-queues-and-concurrency",[3716],{"type":77,"value":3717},"8. Queues and concurrency",{"type":71,"tag":80,"props":3719,"children":3720},{},[3721,3723,3729],{"type":77,"value":3722},"Set ",{"type":71,"tag":86,"props":3724,"children":3726},{"className":3725},[],[3727],{"type":77,"value":3728},"queue: { concurrencyLimit }",{"type":77,"value":3730}," on a task, or share a queue across tasks:",{"type":71,"tag":126,"props":3732,"children":3734},{"className":128,"code":3733,"language":130,"meta":131,"style":131},"import { queue, task } from \"@trigger.dev\u002Fsdk\";\n\nexport const emails = queue({ name: \"emails\", concurrencyLimit: 5 });\n\nexport const sendEmail = task({ id: \"send-email\", queue: emails, run: async () => {} });\n",[3735],{"type":71,"tag":86,"props":3736,"children":3737},{"__ignoreMap":131},[3738,3786,3793,3875,3882],{"type":71,"tag":137,"props":3739,"children":3740},{"class":139,"line":140},[3741,3745,3749,3754,3758,3762,3766,3770,3774,3778,3782],{"type":71,"tag":137,"props":3742,"children":3743},{"style":154},[3744],{"type":77,"value":157},{"type":71,"tag":137,"props":3746,"children":3747},{"style":160},[3748],{"type":77,"value":163},{"type":71,"tag":137,"props":3750,"children":3751},{"style":166},[3752],{"type":77,"value":3753}," queue",{"type":71,"tag":137,"props":3755,"children":3756},{"style":160},[3757],{"type":77,"value":282},{"type":71,"tag":137,"props":3759,"children":3760},{"style":166},[3761],{"type":77,"value":169},{"type":71,"tag":137,"props":3763,"children":3764},{"style":160},[3765],{"type":77,"value":174},{"type":71,"tag":137,"props":3767,"children":3768},{"style":154},[3769],{"type":77,"value":179},{"type":71,"tag":137,"props":3771,"children":3772},{"style":160},[3773],{"type":77,"value":184},{"type":71,"tag":137,"props":3775,"children":3776},{"style":187},[3777],{"type":77,"value":99},{"type":71,"tag":137,"props":3779,"children":3780},{"style":160},[3781],{"type":77,"value":194},{"type":71,"tag":137,"props":3783,"children":3784},{"style":160},[3785],{"type":77,"value":199},{"type":71,"tag":137,"props":3787,"children":3788},{"class":139,"line":150},[3789],{"type":71,"tag":137,"props":3790,"children":3791},{"emptyLinePlaceholder":206},[3792],{"type":77,"value":209},{"type":71,"tag":137,"props":3794,"children":3795},{"class":139,"line":202},[3796,3800,3804,3809,3813,3817,3821,3825,3829,3833,3837,3842,3846,3850,3855,3859,3863,3867,3871],{"type":71,"tag":137,"props":3797,"children":3798},{"style":154},[3799],{"type":77,"value":218},{"type":71,"tag":137,"props":3801,"children":3802},{"style":221},[3803],{"type":77,"value":224},{"type":71,"tag":137,"props":3805,"children":3806},{"style":166},[3807],{"type":77,"value":3808}," emails ",{"type":71,"tag":137,"props":3810,"children":3811},{"style":160},[3812],{"type":77,"value":234},{"type":71,"tag":137,"props":3814,"children":3815},{"style":237},[3816],{"type":77,"value":3753},{"type":71,"tag":137,"props":3818,"children":3819},{"style":166},[3820],{"type":77,"value":244},{"type":71,"tag":137,"props":3822,"children":3823},{"style":160},[3824],{"type":77,"value":791},{"type":71,"tag":137,"props":3826,"children":3827},{"style":256},[3828],{"type":77,"value":796},{"type":71,"tag":137,"props":3830,"children":3831},{"style":160},[3832],{"type":77,"value":264},{"type":71,"tag":137,"props":3834,"children":3835},{"style":160},[3836],{"type":77,"value":184},{"type":71,"tag":137,"props":3838,"children":3839},{"style":187},[3840],{"type":77,"value":3841},"emails",{"type":71,"tag":137,"props":3843,"children":3844},{"style":160},[3845],{"type":77,"value":194},{"type":71,"tag":137,"props":3847,"children":3848},{"style":160},[3849],{"type":77,"value":282},{"type":71,"tag":137,"props":3851,"children":3852},{"style":256},[3853],{"type":77,"value":3854}," concurrencyLimit",{"type":71,"tag":137,"props":3856,"children":3857},{"style":160},[3858],{"type":77,"value":264},{"type":71,"tag":137,"props":3860,"children":3861},{"style":1153},[3862],{"type":77,"value":1156},{"type":71,"tag":137,"props":3864,"children":3865},{"style":160},[3866],{"type":77,"value":174},{"type":71,"tag":137,"props":3868,"children":3869},{"style":166},[3870],{"type":77,"value":450},{"type":71,"tag":137,"props":3872,"children":3873},{"style":160},[3874],{"type":77,"value":199},{"type":71,"tag":137,"props":3876,"children":3877},{"class":139,"line":212},[3878],{"type":71,"tag":137,"props":3879,"children":3880},{"emptyLinePlaceholder":206},[3881],{"type":77,"value":209},{"type":71,"tag":137,"props":3883,"children":3884},{"class":139,"line":252},[3885,3889,3893,3898,3902,3906,3910,3914,3919,3923,3927,3932,3936,3940,3944,3948,3953,3957,3962,3966,3970,3974,3978,3983,3987,3991],{"type":71,"tag":137,"props":3886,"children":3887},{"style":154},[3888],{"type":77,"value":218},{"type":71,"tag":137,"props":3890,"children":3891},{"style":221},[3892],{"type":77,"value":224},{"type":71,"tag":137,"props":3894,"children":3895},{"style":166},[3896],{"type":77,"value":3897}," sendEmail ",{"type":71,"tag":137,"props":3899,"children":3900},{"style":160},[3901],{"type":77,"value":234},{"type":71,"tag":137,"props":3903,"children":3904},{"style":237},[3905],{"type":77,"value":169},{"type":71,"tag":137,"props":3907,"children":3908},{"style":166},[3909],{"type":77,"value":244},{"type":71,"tag":137,"props":3911,"children":3912},{"style":160},[3913],{"type":77,"value":791},{"type":71,"tag":137,"props":3915,"children":3916},{"style":256},[3917],{"type":77,"value":3918}," id",{"type":71,"tag":137,"props":3920,"children":3921},{"style":160},[3922],{"type":77,"value":264},{"type":71,"tag":137,"props":3924,"children":3925},{"style":160},[3926],{"type":77,"value":184},{"type":71,"tag":137,"props":3928,"children":3929},{"style":187},[3930],{"type":77,"value":3931},"send-email",{"type":71,"tag":137,"props":3933,"children":3934},{"style":160},[3935],{"type":77,"value":194},{"type":71,"tag":137,"props":3937,"children":3938},{"style":160},[3939],{"type":77,"value":282},{"type":71,"tag":137,"props":3941,"children":3942},{"style":256},[3943],{"type":77,"value":3753},{"type":71,"tag":137,"props":3945,"children":3946},{"style":160},[3947],{"type":77,"value":264},{"type":71,"tag":137,"props":3949,"children":3950},{"style":166},[3951],{"type":77,"value":3952}," emails",{"type":71,"tag":137,"props":3954,"children":3955},{"style":160},[3956],{"type":77,"value":282},{"type":71,"tag":137,"props":3958,"children":3959},{"style":237},[3960],{"type":77,"value":3961}," run",{"type":71,"tag":137,"props":3963,"children":3964},{"style":160},[3965],{"type":77,"value":264},{"type":71,"tag":137,"props":3967,"children":3968},{"style":221},[3969],{"type":77,"value":305},{"type":71,"tag":137,"props":3971,"children":3972},{"style":160},[3973],{"type":77,"value":1578},{"type":71,"tag":137,"props":3975,"children":3976},{"style":221},[3977],{"type":77,"value":363},{"type":71,"tag":137,"props":3979,"children":3980},{"style":160},[3981],{"type":77,"value":3982}," {}",{"type":71,"tag":137,"props":3984,"children":3985},{"style":160},[3986],{"type":77,"value":174},{"type":71,"tag":137,"props":3988,"children":3989},{"style":166},[3990],{"type":77,"value":450},{"type":71,"tag":137,"props":3992,"children":3993},{"style":160},[3994],{"type":77,"value":199},{"type":71,"tag":80,"props":3996,"children":3997},{},[3998,4000,4006,4008,4013,4015,4021],{"type":77,"value":3999},"At trigger time override with ",{"type":71,"tag":86,"props":4001,"children":4003},{"className":4002},[],[4004],{"type":77,"value":4005},"{ queue: \"queue-name\" }",{"type":77,"value":4007}," and add ",{"type":71,"tag":86,"props":4009,"children":4011},{"className":4010},[],[4012],{"type":77,"value":2220},{"type":77,"value":4014}," for per-tenant queues. Manage queues with ",{"type":71,"tag":86,"props":4016,"children":4018},{"className":4017},[],[4019],{"type":77,"value":4020},"queues.list \u002F retrieve \u002F pause \u002F resume \u002F overrideConcurrencyLimit \u002F resetConcurrencyLimit",{"type":77,"value":117},{"type":71,"tag":563,"props":4023,"children":4025},{"id":4024},"_9-triggerconfigts-essentials",[4026,4028,4034],{"type":77,"value":4027},"9. ",{"type":71,"tag":86,"props":4029,"children":4031},{"className":4030},[],[4032],{"type":77,"value":4033},"trigger.config.ts",{"type":77,"value":4035}," essentials",{"type":71,"tag":126,"props":4037,"children":4039},{"className":128,"code":4038,"language":130,"meta":131,"style":131},"import { defineConfig } from \"@trigger.dev\u002Fsdk\";\n\nexport default defineConfig({\n  project: \"\u003Cproject ref>\",\n  dirs: [\".\u002Ftrigger\"],\n  machine: \"small-1x\",\n  retries: {\n    enabledInDev: false,\n    default: { maxAttempts: 3, factor: 2, minTimeoutInMs: 1000, maxTimeoutInMs: 10000, randomize: true },\n  },\n});\n",[4040],{"type":71,"tag":86,"props":4041,"children":4042},{"__ignoreMap":131},[4043,4083,4090,4114,4143,4182,4211,4227,4248,4348,4355],{"type":71,"tag":137,"props":4044,"children":4045},{"class":139,"line":140},[4046,4050,4054,4059,4063,4067,4071,4075,4079],{"type":71,"tag":137,"props":4047,"children":4048},{"style":154},[4049],{"type":77,"value":157},{"type":71,"tag":137,"props":4051,"children":4052},{"style":160},[4053],{"type":77,"value":163},{"type":71,"tag":137,"props":4055,"children":4056},{"style":166},[4057],{"type":77,"value":4058}," defineConfig",{"type":71,"tag":137,"props":4060,"children":4061},{"style":160},[4062],{"type":77,"value":174},{"type":71,"tag":137,"props":4064,"children":4065},{"style":154},[4066],{"type":77,"value":179},{"type":71,"tag":137,"props":4068,"children":4069},{"style":160},[4070],{"type":77,"value":184},{"type":71,"tag":137,"props":4072,"children":4073},{"style":187},[4074],{"type":77,"value":99},{"type":71,"tag":137,"props":4076,"children":4077},{"style":160},[4078],{"type":77,"value":194},{"type":71,"tag":137,"props":4080,"children":4081},{"style":160},[4082],{"type":77,"value":199},{"type":71,"tag":137,"props":4084,"children":4085},{"class":139,"line":150},[4086],{"type":71,"tag":137,"props":4087,"children":4088},{"emptyLinePlaceholder":206},[4089],{"type":77,"value":209},{"type":71,"tag":137,"props":4091,"children":4092},{"class":139,"line":202},[4093,4097,4102,4106,4110],{"type":71,"tag":137,"props":4094,"children":4095},{"style":154},[4096],{"type":77,"value":218},{"type":71,"tag":137,"props":4098,"children":4099},{"style":154},[4100],{"type":77,"value":4101}," default",{"type":71,"tag":137,"props":4103,"children":4104},{"style":237},[4105],{"type":77,"value":4058},{"type":71,"tag":137,"props":4107,"children":4108},{"style":166},[4109],{"type":77,"value":244},{"type":71,"tag":137,"props":4111,"children":4112},{"style":160},[4113],{"type":77,"value":249},{"type":71,"tag":137,"props":4115,"children":4116},{"class":139,"line":212},[4117,4122,4126,4130,4135,4139],{"type":71,"tag":137,"props":4118,"children":4119},{"style":256},[4120],{"type":77,"value":4121},"  project",{"type":71,"tag":137,"props":4123,"children":4124},{"style":160},[4125],{"type":77,"value":264},{"type":71,"tag":137,"props":4127,"children":4128},{"style":160},[4129],{"type":77,"value":184},{"type":71,"tag":137,"props":4131,"children":4132},{"style":187},[4133],{"type":77,"value":4134},"\u003Cproject ref>",{"type":71,"tag":137,"props":4136,"children":4137},{"style":160},[4138],{"type":77,"value":194},{"type":71,"tag":137,"props":4140,"children":4141},{"style":160},[4142],{"type":77,"value":757},{"type":71,"tag":137,"props":4144,"children":4145},{"class":139,"line":252},[4146,4151,4155,4160,4164,4169,4173,4178],{"type":71,"tag":137,"props":4147,"children":4148},{"style":256},[4149],{"type":77,"value":4150},"  dirs",{"type":71,"tag":137,"props":4152,"children":4153},{"style":160},[4154],{"type":77,"value":264},{"type":71,"tag":137,"props":4156,"children":4157},{"style":166},[4158],{"type":77,"value":4159}," [",{"type":71,"tag":137,"props":4161,"children":4162},{"style":160},[4163],{"type":77,"value":194},{"type":71,"tag":137,"props":4165,"children":4166},{"style":187},[4167],{"type":77,"value":4168},".\u002Ftrigger",{"type":71,"tag":137,"props":4170,"children":4171},{"style":160},[4172],{"type":77,"value":194},{"type":71,"tag":137,"props":4174,"children":4175},{"style":166},[4176],{"type":77,"value":4177},"]",{"type":71,"tag":137,"props":4179,"children":4180},{"style":160},[4181],{"type":77,"value":757},{"type":71,"tag":137,"props":4183,"children":4184},{"class":139,"line":290},[4185,4190,4194,4198,4203,4207],{"type":71,"tag":137,"props":4186,"children":4187},{"style":256},[4188],{"type":77,"value":4189},"  machine",{"type":71,"tag":137,"props":4191,"children":4192},{"style":160},[4193],{"type":77,"value":264},{"type":71,"tag":137,"props":4195,"children":4196},{"style":160},[4197],{"type":77,"value":184},{"type":71,"tag":137,"props":4199,"children":4200},{"style":187},[4201],{"type":77,"value":4202},"small-1x",{"type":71,"tag":137,"props":4204,"children":4205},{"style":160},[4206],{"type":77,"value":194},{"type":71,"tag":137,"props":4208,"children":4209},{"style":160},[4210],{"type":77,"value":757},{"type":71,"tag":137,"props":4212,"children":4213},{"class":139,"line":371},[4214,4219,4223],{"type":71,"tag":137,"props":4215,"children":4216},{"style":256},[4217],{"type":77,"value":4218},"  retries",{"type":71,"tag":137,"props":4220,"children":4221},{"style":160},[4222],{"type":77,"value":264},{"type":71,"tag":137,"props":4224,"children":4225},{"style":160},[4226],{"type":77,"value":368},{"type":71,"tag":137,"props":4228,"children":4229},{"class":139,"line":457},[4230,4235,4239,4244],{"type":71,"tag":137,"props":4231,"children":4232},{"style":256},[4233],{"type":77,"value":4234},"    enabledInDev",{"type":71,"tag":137,"props":4236,"children":4237},{"style":160},[4238],{"type":77,"value":264},{"type":71,"tag":137,"props":4240,"children":4241},{"style":479},[4242],{"type":77,"value":4243}," false",{"type":71,"tag":137,"props":4245,"children":4246},{"style":160},[4247],{"type":77,"value":757},{"type":71,"tag":137,"props":4249,"children":4250},{"class":139,"line":495},[4251,4256,4260,4264,4268,4272,4277,4281,4285,4289,4294,4298,4302,4306,4311,4315,4319,4323,4328,4332,4336,4340,4344],{"type":71,"tag":137,"props":4252,"children":4253},{"style":256},[4254],{"type":77,"value":4255},"    default",{"type":71,"tag":137,"props":4257,"children":4258},{"style":160},[4259],{"type":77,"value":264},{"type":71,"tag":137,"props":4261,"children":4262},{"style":160},[4263],{"type":77,"value":163},{"type":71,"tag":137,"props":4265,"children":4266},{"style":256},[4267],{"type":77,"value":1146},{"type":71,"tag":137,"props":4269,"children":4270},{"style":160},[4271],{"type":77,"value":264},{"type":71,"tag":137,"props":4273,"children":4274},{"style":1153},[4275],{"type":77,"value":4276}," 3",{"type":71,"tag":137,"props":4278,"children":4279},{"style":160},[4280],{"type":77,"value":282},{"type":71,"tag":137,"props":4282,"children":4283},{"style":256},[4284],{"type":77,"value":1165},{"type":71,"tag":137,"props":4286,"children":4287},{"style":160},[4288],{"type":77,"value":264},{"type":71,"tag":137,"props":4290,"children":4291},{"style":1153},[4292],{"type":77,"value":4293}," 2",{"type":71,"tag":137,"props":4295,"children":4296},{"style":160},[4297],{"type":77,"value":282},{"type":71,"tag":137,"props":4299,"children":4300},{"style":256},[4301],{"type":77,"value":1183},{"type":71,"tag":137,"props":4303,"children":4304},{"style":160},[4305],{"type":77,"value":264},{"type":71,"tag":137,"props":4307,"children":4308},{"style":1153},[4309],{"type":77,"value":4310}," 1000",{"type":71,"tag":137,"props":4312,"children":4313},{"style":160},[4314],{"type":77,"value":282},{"type":71,"tag":137,"props":4316,"children":4317},{"style":256},[4318],{"type":77,"value":1201},{"type":71,"tag":137,"props":4320,"children":4321},{"style":160},[4322],{"type":77,"value":264},{"type":71,"tag":137,"props":4324,"children":4325},{"style":1153},[4326],{"type":77,"value":4327}," 10000",{"type":71,"tag":137,"props":4329,"children":4330},{"style":160},[4331],{"type":77,"value":282},{"type":71,"tag":137,"props":4333,"children":4334},{"style":256},[4335],{"type":77,"value":1219},{"type":71,"tag":137,"props":4337,"children":4338},{"style":160},[4339],{"type":77,"value":264},{"type":71,"tag":137,"props":4341,"children":4342},{"style":479},[4343],{"type":77,"value":482},{"type":71,"tag":137,"props":4345,"children":4346},{"style":160},[4347],{"type":77,"value":1232},{"type":71,"tag":137,"props":4349,"children":4350},{"class":139,"line":504},[4351],{"type":71,"tag":137,"props":4352,"children":4353},{"style":160},[4354],{"type":77,"value":501},{"type":71,"tag":137,"props":4356,"children":4358},{"class":139,"line":4357},11,[4359,4363,4367],{"type":71,"tag":137,"props":4360,"children":4361},{"style":160},[4362],{"type":77,"value":510},{"type":71,"tag":137,"props":4364,"children":4365},{"style":166},[4366],{"type":77,"value":450},{"type":71,"tag":137,"props":4368,"children":4369},{"style":160},[4370],{"type":77,"value":199},{"type":71,"tag":80,"props":4372,"children":4373},{},[4374,4380,4382,4388,4389,4395,4396,4402,4403,4409,4410,4416,4417,4423,4424,4430,4431,4437,4439,4445,4447,4453,4455,4461,4463,4469],{"type":71,"tag":86,"props":4375,"children":4377},{"className":4376},[],[4378],{"type":77,"value":4379},"build.external",{"type":77,"value":4381}," controls which packages stay out of the bundle. Build extensions (",{"type":71,"tag":86,"props":4383,"children":4385},{"className":4384},[],[4386],{"type":77,"value":4387},"additionalFiles",{"type":77,"value":1425},{"type":71,"tag":86,"props":4390,"children":4392},{"className":4391},[],[4393],{"type":77,"value":4394},"prismaExtension",{"type":77,"value":1425},{"type":71,"tag":86,"props":4397,"children":4399},{"className":4398},[],[4400],{"type":77,"value":4401},"puppeteer",{"type":77,"value":1425},{"type":71,"tag":86,"props":4404,"children":4406},{"className":4405},[],[4407],{"type":77,"value":4408},"playwright",{"type":77,"value":1425},{"type":71,"tag":86,"props":4411,"children":4413},{"className":4412},[],[4414],{"type":77,"value":4415},"ffmpeg",{"type":77,"value":1425},{"type":71,"tag":86,"props":4418,"children":4420},{"className":4419},[],[4421],{"type":77,"value":4422},"pythonExtension",{"type":77,"value":1425},{"type":71,"tag":86,"props":4425,"children":4427},{"className":4426},[],[4428],{"type":77,"value":4429},"aptGet",{"type":77,"value":1425},{"type":71,"tag":86,"props":4432,"children":4434},{"className":4433},[],[4435],{"type":77,"value":4436},"syncEnvVars",{"type":77,"value":4438},", etc.) come from ",{"type":71,"tag":86,"props":4440,"children":4442},{"className":4441},[],[4443],{"type":77,"value":4444},"@trigger.dev\u002Fbuild",{"type":77,"value":4446},". ",{"type":71,"tag":86,"props":4448,"children":4450},{"className":4449},[],[4451],{"type":77,"value":4452},"telemetry",{"type":77,"value":4454}," configures instrumentations and exporters. Each extension has its own setup doc, all bundled under ",{"type":71,"tag":86,"props":4456,"children":4458},{"className":4457},[],[4459],{"type":77,"value":4460},"@trigger.dev\u002Fsdk\u002Fdocs\u002Fconfig\u002Fextensions\u002F",{"type":77,"value":4462}," (start with ",{"type":71,"tag":86,"props":4464,"children":4466},{"className":4465},[],[4467],{"type":77,"value":4468},"overview.mdx",{"type":77,"value":4470},"); read the one you need before wiring it up rather than guessing the API.",{"type":71,"tag":563,"props":4472,"children":4474},{"id":4473},"logging",[4475],{"type":77,"value":4476},"Logging",{"type":71,"tag":80,"props":4478,"children":4479},{},[4480,4486,4488,4494,4496,4502],{"type":71,"tag":86,"props":4481,"children":4483},{"className":4482},[],[4484],{"type":77,"value":4485},"logger.debug \u002F log \u002F info \u002F warn \u002F error(message, dataRecord?)",{"type":77,"value":4487}," write structured logs; ",{"type":71,"tag":86,"props":4489,"children":4491},{"className":4490},[],[4492],{"type":77,"value":4493},"logger.trace(name, async (span) => {...})",{"type":77,"value":4495}," adds a span. Module-level metrics use ",{"type":71,"tag":86,"props":4497,"children":4499},{"className":4498},[],[4500],{"type":77,"value":4501},"otel.metrics.getMeter(name)",{"type":77,"value":117},{"type":71,"tag":119,"props":4504,"children":4506},{"id":4505},"common-mistakes",[4507],{"type":77,"value":4508},"Common mistakes",{"type":71,"tag":4510,"props":4511,"children":4512},"ol",{},[4513,4572,4633,4675,4730,4773,4828],{"type":71,"tag":4514,"props":4515,"children":4516},"li",{},[4517,4523,4525,4530,4531,4537,4539],{"type":71,"tag":4518,"props":4519,"children":4520},"strong",{},[4521],{"type":77,"value":4522},"CRITICAL: Treating the wait result as the output.",{"type":77,"value":4524}," ",{"type":71,"tag":86,"props":4526,"children":4528},{"className":4527},[],[4529],{"type":77,"value":1623},{"type":77,"value":2164},{"type":71,"tag":86,"props":4532,"children":4534},{"className":4533},[],[4535],{"type":77,"value":4536},"wait.forToken",{"type":77,"value":4538}," return a Result object, not the raw output.",{"type":71,"tag":4540,"props":4541,"children":4542},"ul",{},[4543,4554],{"type":71,"tag":4514,"props":4544,"children":4545},{},[4546,4548],{"type":77,"value":4547},"Wrong: ",{"type":71,"tag":86,"props":4549,"children":4551},{"className":4550},[],[4552],{"type":77,"value":4553},"const out = await childTask.triggerAndWait(p); use(out.foo);",{"type":71,"tag":4514,"props":4555,"children":4556},{},[4557,4559,4565,4566,4571],{"type":77,"value":4558},"Correct: ",{"type":71,"tag":86,"props":4560,"children":4562},{"className":4561},[],[4563],{"type":77,"value":4564},"const r = await childTask.triggerAndWait(p); if (r.ok) use(r.output.foo);",{"type":77,"value":3258},{"type":71,"tag":86,"props":4567,"children":4569},{"className":4568},[],[4570],{"type":77,"value":1489},{"type":77,"value":2783},{"type":71,"tag":4514,"props":4573,"children":4574},{},[4575,4608],{"type":71,"tag":4518,"props":4576,"children":4577},{},[4578,4580,4585,4586,4592,4593,4599,4601,4607],{"type":77,"value":4579},"Wrapping ",{"type":71,"tag":86,"props":4581,"children":4583},{"className":4582},[],[4584],{"type":77,"value":1623},{"type":77,"value":3281},{"type":71,"tag":86,"props":4587,"children":4589},{"className":4588},[],[4590],{"type":77,"value":4591},"batchTriggerAndWait",{"type":77,"value":3281},{"type":71,"tag":86,"props":4594,"children":4596},{"className":4595},[],[4597],{"type":77,"value":4598},"wait",{"type":77,"value":4600}," in ",{"type":71,"tag":86,"props":4602,"children":4604},{"className":4603},[],[4605],{"type":77,"value":4606},"Promise.all",{"type":77,"value":117},{"type":71,"tag":4540,"props":4609,"children":4610},{},[4611,4621],{"type":71,"tag":4514,"props":4612,"children":4613},{},[4614,4615],{"type":77,"value":4547},{"type":71,"tag":86,"props":4616,"children":4618},{"className":4617},[],[4619],{"type":77,"value":4620},"await Promise.all([childTask.triggerAndWait(a), childTask.triggerAndWait(b)]);",{"type":71,"tag":4514,"props":4622,"children":4623},{},[4624,4625,4631],{"type":77,"value":4558},{"type":71,"tag":86,"props":4626,"children":4628},{"className":4627},[],[4629],{"type":77,"value":4630},"await childTask.batchTriggerAndWait([{ payload: a }, { payload: b }]);",{"type":77,"value":4632}," (or a sequential for-loop).",{"type":71,"tag":4514,"props":4634,"children":4635},{},[4636,4641],{"type":71,"tag":4518,"props":4637,"children":4638},{},[4639],{"type":77,"value":4640},"Importing the task instance into backend code.",{"type":71,"tag":4540,"props":4642,"children":4643},{},[4644,4656],{"type":71,"tag":4514,"props":4645,"children":4646},{},[4647,4648,4654],{"type":77,"value":4547},{"type":71,"tag":86,"props":4649,"children":4651},{"className":4650},[],[4652],{"type":77,"value":4653},"import { emailSequence } from \"~\u002Ftrigger\u002Femails\";",{"type":77,"value":4655}," in a route handler.",{"type":71,"tag":4514,"props":4657,"children":4658},{},[4659,4660,4666,4668,4674],{"type":77,"value":4558},{"type":71,"tag":86,"props":4661,"children":4663},{"className":4662},[],[4664],{"type":77,"value":4665},"import type { emailSequence }",{"type":77,"value":4667}," plus ",{"type":71,"tag":86,"props":4669,"children":4671},{"className":4670},[],[4672],{"type":77,"value":4673},"tasks.trigger\u003Ctypeof emailSequence>(\"email-sequence\", payload)",{"type":77,"value":117},{"type":71,"tag":4514,"props":4676,"children":4677},{},[4678,4697],{"type":71,"tag":4518,"props":4679,"children":4680},{},[4681,4683,4689,4691,4696],{"type":77,"value":4682},"Calling ",{"type":71,"tag":86,"props":4684,"children":4686},{"className":4685},[],[4687],{"type":77,"value":4688},"metadata.set\u002Fget",{"type":77,"value":4690}," outside ",{"type":71,"tag":86,"props":4692,"children":4694},{"className":4693},[],[4695],{"type":77,"value":2731},{"type":77,"value":117},{"type":71,"tag":4540,"props":4698,"children":4699},{},[4700,4718],{"type":71,"tag":4514,"props":4701,"children":4702},{},[4703,4705,4711,4712,4717],{"type":77,"value":4704},"Wrong: setting metadata at module scope or in unrelated backend code (a no-op; ",{"type":71,"tag":86,"props":4706,"children":4708},{"className":4707},[],[4709],{"type":77,"value":4710},"get",{"type":77,"value":3234},{"type":71,"tag":86,"props":4713,"children":4715},{"className":4714},[],[4716],{"type":77,"value":1439},{"type":77,"value":2783},{"type":71,"tag":4514,"props":4719,"children":4720},{},[4721,4723,4728],{"type":77,"value":4722},"Correct: call inside ",{"type":71,"tag":86,"props":4724,"children":4726},{"className":4725},[],[4727],{"type":77,"value":2731},{"type":77,"value":4729}," or a task lifecycle hook.",{"type":71,"tag":4514,"props":4731,"children":4732},{},[4733,4738],{"type":71,"tag":4518,"props":4734,"children":4735},{},[4736],{"type":77,"value":4737},"Assuming child tasks inherit the parent's queue or metadata.",{"type":71,"tag":4540,"props":4739,"children":4740},{},[4741,4754],{"type":71,"tag":4514,"props":4742,"children":4743},{},[4744,4746,4752],{"type":77,"value":4745},"Wrong: expecting a subtask to share the parent's ",{"type":71,"tag":86,"props":4747,"children":4749},{"className":4748},[],[4750],{"type":77,"value":4751},"concurrencyLimit",{"type":77,"value":4753}," or see its metadata.",{"type":71,"tag":4514,"props":4755,"children":4756},{},[4757,4759,4765,4767,4772],{"type":77,"value":4758},"Correct: subtasks run on their own queue; pass metadata explicitly via ",{"type":71,"tag":86,"props":4760,"children":4762},{"className":4761},[],[4763],{"type":77,"value":4764},"{ metadata: metadata.current() }",{"type":77,"value":4766},", or push up with ",{"type":71,"tag":86,"props":4768,"children":4770},{"className":4769},[],[4771],{"type":77,"value":3279},{"type":77,"value":117},{"type":71,"tag":4514,"props":4774,"children":4775},{},[4776,4781],{"type":71,"tag":4518,"props":4777,"children":4778},{},[4779],{"type":77,"value":4780},"Bundling native\u002FWASM packages.",{"type":71,"tag":4540,"props":4782,"children":4783},{},[4784,4811],{"type":71,"tag":4514,"props":4785,"children":4786},{},[4787,4789,4795,4796,4802,4803,4809],{"type":77,"value":4788},"Wrong: leaving ",{"type":71,"tag":86,"props":4790,"children":4792},{"className":4791},[],[4793],{"type":77,"value":4794},"sharp",{"type":77,"value":1425},{"type":71,"tag":86,"props":4797,"children":4799},{"className":4798},[],[4800],{"type":77,"value":4801},"re2",{"type":77,"value":1425},{"type":71,"tag":86,"props":4804,"children":4806},{"className":4805},[],[4807],{"type":77,"value":4808},"sqlite3",{"type":77,"value":4810},", or WASM packages in the default bundle.",{"type":71,"tag":4514,"props":4812,"children":4813},{},[4814,4816,4821,4822,4827],{"type":77,"value":4815},"Correct: add them to ",{"type":71,"tag":86,"props":4817,"children":4819},{"className":4818},[],[4820],{"type":77,"value":4379},{"type":77,"value":4600},{"type":71,"tag":86,"props":4823,"children":4825},{"className":4824},[],[4826],{"type":77,"value":4033},{"type":77,"value":117},{"type":71,"tag":4514,"props":4829,"children":4830},{},[4831,4836],{"type":71,"tag":4518,"props":4832,"children":4833},{},[4834],{"type":77,"value":4835},"Relying on a raw string idempotency key being global.",{"type":71,"tag":4540,"props":4837,"children":4838},{},[4839,4851],{"type":71,"tag":4514,"props":4840,"children":4841},{},[4842,4843,4849],{"type":77,"value":4547},{"type":71,"tag":86,"props":4844,"children":4846},{"className":4845},[],[4847],{"type":77,"value":4848},"trigger(p, { idempotencyKey: \"welcome-email\" })",{"type":77,"value":4850}," expecting once-ever (true only in v4.3.0 and earlier).",{"type":71,"tag":4514,"props":4852,"children":4853},{},[4854,4855,4861],{"type":77,"value":4558},{"type":71,"tag":86,"props":4856,"children":4858},{"className":4857},[],[4859],{"type":77,"value":4860},"await idempotencyKeys.create(\"welcome-email\", { scope: \"global\" })",{"type":77,"value":117},{"type":71,"tag":119,"props":4863,"children":4865},{"id":4864},"references",[4866],{"type":77,"value":4867},"References",{"type":71,"tag":80,"props":4869,"children":4870},{},[4871],{"type":77,"value":4872},"Sibling skills:",{"type":71,"tag":4540,"props":4874,"children":4875},{},[4876,4886],{"type":71,"tag":4514,"props":4877,"children":4878},{},[4879,4884],{"type":71,"tag":4518,"props":4880,"children":4881},{},[4882],{"type":77,"value":4883},"trigger-realtime-and-frontend",{"type":77,"value":4885}," for subscribing to runs and triggering from the frontend with React hooks.",{"type":71,"tag":4514,"props":4887,"children":4888},{},[4889,4894,4895,4900],{"type":71,"tag":4518,"props":4890,"children":4891},{},[4892],{"type":77,"value":4893},"trigger-authoring-chat-agent",{"type":77,"value":2164},{"type":71,"tag":4518,"props":4896,"children":4897},{},[4898],{"type":77,"value":4899},"trigger-chat-agent-advanced",{"type":77,"value":4901}," for building AI chat agents.",{"type":71,"tag":80,"props":4903,"children":4904},{},[4905,4907,4913,4915,4921],{"type":77,"value":4906},"Reference docs ship beside this skill in the same package, read them locally (no network), pinned to your installed version. The ",{"type":71,"tag":86,"props":4908,"children":4910},{"className":4909},[],[4911],{"type":77,"value":4912},"sources:",{"type":77,"value":4914}," frontmatter above lists every doc this skill draws from, all under ",{"type":71,"tag":86,"props":4916,"children":4918},{"className":4917},[],[4919],{"type":77,"value":4920},"@trigger.dev\u002Fsdk\u002Fdocs\u002F",{"type":77,"value":4922},". Start with:",{"type":71,"tag":4540,"props":4924,"children":4925},{},[4926,4935,4944],{"type":71,"tag":4514,"props":4927,"children":4928},{},[4929],{"type":71,"tag":86,"props":4930,"children":4932},{"className":4931},[],[4933],{"type":77,"value":4934},"@trigger.dev\u002Fsdk\u002Fdocs\u002Ftasks\u002Foverview.mdx",{"type":71,"tag":4514,"props":4936,"children":4937},{},[4938],{"type":71,"tag":86,"props":4939,"children":4941},{"className":4940},[],[4942],{"type":77,"value":4943},"@trigger.dev\u002Fsdk\u002Fdocs\u002Ftriggering.mdx",{"type":71,"tag":4514,"props":4945,"children":4946},{},[4947],{"type":71,"tag":86,"props":4948,"children":4950},{"className":4949},[],[4951],{"type":77,"value":4952},"@trigger.dev\u002Fsdk\u002Fdocs\u002Fconfig\u002Fconfig-file.mdx",{"type":71,"tag":119,"props":4954,"children":4956},{"id":4955},"version",[4957],{"type":77,"value":4958},"Version",{"type":71,"tag":80,"props":4960,"children":4961},{},[4962,4964,4969,4971,4977,4979,4985,4987,4992],{"type":77,"value":4963},"This skill is bundled inside ",{"type":71,"tag":86,"props":4965,"children":4967},{"className":4966},[],[4968],{"type":77,"value":99},{"type":77,"value":4970}," and read directly from ",{"type":71,"tag":86,"props":4972,"children":4974},{"className":4973},[],[4975],{"type":77,"value":4976},"node_modules",{"type":77,"value":4978},", so it always matches your installed SDK version (see the adjacent ",{"type":71,"tag":86,"props":4980,"children":4982},{"className":4981},[],[4983],{"type":77,"value":4984},"package.json",{"type":77,"value":4986},"). The full documentation for these APIs ships alongside it under ",{"type":71,"tag":86,"props":4988,"children":4990},{"className":4989},[],[4991],{"type":77,"value":4920},{"type":77,"value":117},{"type":71,"tag":4994,"props":4995,"children":4996},"style",{},[4997],{"type":77,"value":4998},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":5000,"total":212},[5001,5013,5020,5029],{"slug":4893,"name":4893,"fn":5002,"description":5003,"org":5004,"tags":5005,"stars":24,"repoUrl":25,"updatedAt":5012},"author durable AI chat agents with Trigger.dev","Author and run a durable AI chat agent with chat.agent from @trigger.dev\u002Fsdk\u002Fai: the per-turn run loop, why you MUST spread ...chat.toStreamTextOptions() first, returning a StreamTextResult vs calling chat.pipe(), the two server actions (chat.createStartSessionAction + auth.createPublicToken), and wiring useChat to useTriggerChatTransport. Load this when building, modifying, or debugging a chat backend (the agent task or its lifecycle hooks) or its React transport, when declaring typed tools or custom data parts, or when migrating a plain AI SDK streamText route to chat.agent.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[5006,5009,5010,5011],{"name":5007,"slug":5008,"type":16},"Agents","agents",{"name":19,"slug":20,"type":16},{"name":9,"slug":8,"type":16},{"name":22,"slug":23,"type":16},"2026-07-02T17:12:52.307135",{"slug":4,"name":4,"fn":5,"description":6,"org":5014,"tags":5015,"stars":24,"repoUrl":25,"updatedAt":26},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[5016,5017,5018,5019],{"name":14,"slug":15,"type":16},{"name":19,"slug":20,"type":16},{"name":9,"slug":8,"type":16},{"name":22,"slug":23,"type":16},{"slug":4899,"name":4899,"fn":5021,"description":5022,"org":5023,"tags":5024,"stars":24,"repoUrl":25,"updatedAt":5028},"manage Trigger.dev chat sessions and transports","Advanced and operational chat.agent capabilities for Trigger.dev, loaded on demand. Load this when working on the raw Sessions primitive (sessions \u002F SessionHandle), a custom chat transport or the realtime wire protocol, durable sub-agents (AgentChat, chat.stream.writer), human-in-the-loop, steering, actions, background injection (chat.defer \u002F chat.inject), fast starts (preload, Head Start via @trigger.dev\u002Fsdk\u002Fchat-server), context resilience (compaction, recovery boot, OOM, large payloads), chat.local run-scoped state, offline testing with mockChatAgent, or prerelease\u002Fversion upgrades. For the everyday chat.agent({...}) definition and the useTriggerChatTransport happy path, use the trigger-authoring-chat-agent skill instead.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[5025,5026,5027],{"name":5007,"slug":5008,"type":16},{"name":9,"slug":8,"type":16},{"name":22,"slug":23,"type":16},"2026-07-02T17:12:51.03018",{"slug":4883,"name":4883,"fn":5030,"description":5031,"org":5032,"tags":5033,"stars":24,"repoUrl":25,"updatedAt":5044},"subscribe to Trigger.dev runs in realtime","Trigger.dev client\u002Ffrontend surface: subscribe to runs in realtime (runs.subscribeToRun and the @trigger.dev\u002Freact-hooks hook useRealtimeRun), consume metadata and AI\u002Ftext streams in React (useRealtimeStream), trigger tasks from the browser (useTaskTrigger, useRealtimeTaskTrigger), and mint scoped frontend credentials with auth.createPublicToken \u002F auth.createTriggerPublicToken. Load when wiring a frontend (React\u002FNext.js\u002FRemix) or backend-for-frontend to show live run progress, status badges, token streams, trigger buttons, or wait-token approval UIs. NOT for writing the backend task itself (streams.define \u002F metadata.set is trigger-authoring-tasks territory); this is the consumer side.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[5034,5037,5040,5043],{"name":5035,"slug":5036,"type":16},"Frontend","frontend",{"name":5038,"slug":5039,"type":16},"React","react",{"name":5041,"slug":5042,"type":16},"Real-time","real-time",{"name":9,"slug":8,"type":16},"2026-07-02T17:12:49.717706",{"items":5046,"total":5185},[5047,5054,5061,5067,5074,5089,5103,5120,5133,5145,5156,5170],{"slug":4893,"name":4893,"fn":5002,"description":5003,"org":5048,"tags":5049,"stars":24,"repoUrl":25,"updatedAt":5012},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[5050,5051,5052,5053],{"name":5007,"slug":5008,"type":16},{"name":19,"slug":20,"type":16},{"name":9,"slug":8,"type":16},{"name":22,"slug":23,"type":16},{"slug":4,"name":4,"fn":5,"description":6,"org":5055,"tags":5056,"stars":24,"repoUrl":25,"updatedAt":26},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[5057,5058,5059,5060],{"name":14,"slug":15,"type":16},{"name":19,"slug":20,"type":16},{"name":9,"slug":8,"type":16},{"name":22,"slug":23,"type":16},{"slug":4899,"name":4899,"fn":5021,"description":5022,"org":5062,"tags":5063,"stars":24,"repoUrl":25,"updatedAt":5028},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[5064,5065,5066],{"name":5007,"slug":5008,"type":16},{"name":9,"slug":8,"type":16},{"name":22,"slug":23,"type":16},{"slug":4883,"name":4883,"fn":5030,"description":5031,"org":5068,"tags":5069,"stars":24,"repoUrl":25,"updatedAt":5044},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[5070,5071,5072,5073],{"name":5035,"slug":5036,"type":16},{"name":5038,"slug":5039,"type":16},{"name":5041,"slug":5042,"type":16},{"name":9,"slug":8,"type":16},{"slug":5075,"name":5075,"fn":5076,"description":5077,"org":5078,"tags":5079,"stars":5086,"repoUrl":5087,"updatedAt":5088},"trigger-agents","orchestrate AI agents with Trigger.dev","AI agent patterns with Trigger.dev - orchestration, parallelization, routing, evaluator-optimizer, and human-in-the-loop. Use when building LLM-powered tasks that need parallel workers, approval gates, tool calling, or multi-step agent workflows.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[5080,5081,5084,5085],{"name":5007,"slug":5008,"type":16},{"name":5082,"slug":5083,"type":16},"Multi-Agent","multi-agent",{"name":9,"slug":8,"type":16},{"name":22,"slug":23,"type":16},30,"https:\u002F\u002Fgithub.com\u002Ftriggerdotdev\u002Fskills","2026-04-06T18:54:46.023553",{"slug":5090,"name":5090,"fn":5091,"description":5092,"org":5093,"tags":5094,"stars":5086,"repoUrl":5087,"updatedAt":5102},"trigger-config","configure Trigger.dev project settings","Configure Trigger.dev projects with trigger.config.ts. Use when setting up build extensions for Prisma, Playwright, FFmpeg, Python, or customizing deployment settings.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[5095,5098,5101],{"name":5096,"slug":5097,"type":16},"Configuration","configuration",{"name":5099,"slug":5100,"type":16},"Deployment","deployment",{"name":9,"slug":8,"type":16},"2026-04-06T18:54:44.764258",{"slug":5104,"name":5104,"fn":5105,"description":5106,"org":5107,"tags":5108,"stars":5086,"repoUrl":5087,"updatedAt":5119},"trigger-cost-savings","optimize Trigger.dev task costs","Analyze Trigger.dev tasks, schedules, and runs for cost optimization opportunities. Use when asked to reduce spend, optimize costs, audit usage, right-size machines, or review task efficiency. Requires Trigger.dev MCP tools for run analysis.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[5109,5112,5115,5118],{"name":5110,"slug":5111,"type":16},"Analytics","analytics",{"name":5113,"slug":5114,"type":16},"Cost Optimization","cost-optimization",{"name":5116,"slug":5117,"type":16},"Operations","operations",{"name":9,"slug":8,"type":16},"2026-04-06T18:54:48.555552",{"slug":5121,"name":5121,"fn":5122,"description":5123,"org":5124,"tags":5125,"stars":5086,"repoUrl":5087,"updatedAt":5132},"trigger-realtime","monitor Trigger.dev tasks in real-time","Subscribe to Trigger.dev task runs in real-time from frontend and backend. Use when building progress indicators, live dashboards, streaming AI\u002FLLM responses, or React components that display task status.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[5126,5127,5130,5131],{"name":5035,"slug":5036,"type":16},{"name":5128,"slug":5129,"type":16},"Observability","observability",{"name":5041,"slug":5042,"type":16},{"name":9,"slug":8,"type":16},"2026-04-06T18:54:47.293822",{"slug":5134,"name":5134,"fn":5135,"description":5136,"org":5137,"tags":5138,"stars":5086,"repoUrl":5087,"updatedAt":5144},"trigger-setup","set up Trigger.dev in projects","Set up Trigger.dev in your project. Use when adding Trigger.dev for the first time, creating trigger.config.ts, or initializing the trigger directory.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[5139,5140,5143],{"name":5096,"slug":5097,"type":16},{"name":5141,"slug":5142,"type":16},"Local Development","local-development",{"name":9,"slug":8,"type":16},"2026-04-06T18:54:42.280816",{"slug":5146,"name":5146,"fn":5147,"description":5148,"org":5149,"tags":5150,"stars":5086,"repoUrl":5087,"updatedAt":5155},"trigger-tasks","build durable background tasks with Trigger.dev","Build AI agents, workflows and durable background tasks with Trigger.dev. Use when creating tasks, triggering jobs, handling retries, scheduling cron jobs, or implementing queues and concurrency control.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[5151,5152,5153,5154],{"name":5007,"slug":5008,"type":16},{"name":14,"slug":15,"type":16},{"name":9,"slug":8,"type":16},{"name":22,"slug":23,"type":16},"2026-04-06T18:54:43.514369",{"slug":5157,"name":5157,"fn":5158,"description":5159,"org":5160,"tags":5161,"stars":202,"repoUrl":5168,"updatedAt":5169},"staff-engineering-skills-backpressure","implement backpressure in streaming pipelines","Prevent unbounded resource growth when producers outpace consumers. Use when writing producer-consumer code, queue processing, batch operations, fan-out patterns, streaming pipelines, or any code where work is generated faster than it can be processed. Activates on patterns like Promise.all on dynamic-sized arrays, unbounded in-memory queues, producer loops without depth checks, fire-and-forget async calls in loops, or any buffer between a producer and consumer without a size limit.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[5162,5165],{"name":5163,"slug":5164,"type":16},"Architecture","architecture",{"name":5166,"slug":5167,"type":16},"Performance","performance","https:\u002F\u002Fgithub.com\u002Ftriggerdotdev\u002Fstaff-engineering-skills","2026-06-17T08:40:42.723559",{"slug":5171,"name":5171,"fn":5172,"description":5173,"org":5174,"tags":5175,"stars":202,"repoUrl":5168,"updatedAt":5184},"staff-engineering-skills-cache-invalidation","implement cache invalidation strategies","Prevent stale data bugs caused by missing or incomplete cache invalidation. Use when adding caching layers (Redis, in-memory Map, CDN, HTTP cache headers), optimizing read performance, or reviewing code that caches query results, API responses, or computed values. Activates on patterns like cache.set without cache.delete on write paths, unbounded Map\u002Fobject caches, TTL-only invalidation on security-sensitive data, Cache-Control headers on mutable content, or any caching where the write path doesn't invalidate the read cache.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[5176,5177,5180,5183],{"name":5163,"slug":5164,"type":16},{"name":5178,"slug":5179,"type":16},"Caching","caching",{"name":5181,"slug":5182,"type":16},"Engineering","engineering",{"name":5166,"slug":5167,"type":16},"2026-06-17T08:40:45.194583",26]