You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(jobs): surface optional callback_url on job submit
Mirror the gateway add-job-completion-callback change across the consumer
surfaces: @run402/sdk ManagedJobSubmitRequest.callback_url, the MCP
submit_managed_job tool input, and the CLI `jobs submit` help. Optional
HTTPS URL pushed once on terminal job state (durable, unsigned, dedupe on
Run402-Webhook-Id, re-fetch via get before acting).
- sdk: callback_url on ManagedJobSubmitRequest, forwarded by submit()
- mcp tool: callback_url in managedJobSubmitRequestSchema + handler
- cli: documented in `jobs submit` help/example (flows via --file/--stdin body)
- tests: sdk (2) + mcp tool (1) forward-through cases
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: src/tools/jobs.ts
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,13 @@ const managedJobSubmitRequestSchema = z
21
21
.int()
22
22
.nonnegative()
23
23
.describe("Hard customer charge ceiling in micro-USD"),
24
+
callback_url: z
25
+
.string()
26
+
.url()
27
+
.optional()
28
+
.describe(
29
+
"Optional HTTPS URL pushed once on terminal state (completed/failed/cancelled), so you need not poll. Durable at-least-once + unsigned: dedupe on the Run402-Webhook-Id header and re-fetch with get_managed_job before acting.",
30
+
),
24
31
})
25
32
.strict();
26
33
@@ -63,6 +70,7 @@ export async function handleJobsSubmit(args: {
0 commit comments