harness-dispatch 0.5.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/CHANGELOG.md +177 -0
  2. package/README.md +5 -2
  3. package/config.default.yaml +10 -1
  4. package/dist/bin.d.ts.map +1 -1
  5. package/dist/bin.js +3 -176
  6. package/dist/bin.js.map +1 -1
  7. package/dist/config/protocol.d.ts.map +1 -1
  8. package/dist/config/protocol.js +10 -2
  9. package/dist/config/protocol.js.map +1 -1
  10. package/dist/config/route-fields.d.ts +72 -0
  11. package/dist/config/route-fields.d.ts.map +1 -0
  12. package/dist/config/route-fields.js +128 -0
  13. package/dist/config/route-fields.js.map +1 -0
  14. package/dist/config/validation.js +1 -1
  15. package/dist/config/validation.js.map +1 -1
  16. package/dist/config.d.ts.map +1 -1
  17. package/dist/config.js +92 -173
  18. package/dist/config.js.map +1 -1
  19. package/dist/configure-yaml.d.ts +23 -0
  20. package/dist/configure-yaml.d.ts.map +1 -0
  21. package/dist/configure-yaml.js +201 -0
  22. package/dist/configure-yaml.js.map +1 -0
  23. package/dist/dispatchers/base.d.ts +3 -0
  24. package/dist/dispatchers/base.d.ts.map +1 -1
  25. package/dist/dispatchers/base.js.map +1 -1
  26. package/dist/dispatchers/generic-cli.d.ts.map +1 -1
  27. package/dist/dispatchers/generic-cli.js +22 -2
  28. package/dist/dispatchers/generic-cli.js.map +1 -1
  29. package/dist/dispatchers/openai-compatible.d.ts.map +1 -1
  30. package/dist/dispatchers/openai-compatible.js +18 -0
  31. package/dist/dispatchers/openai-compatible.js.map +1 -1
  32. package/dist/dispatchers/shared/stream-subprocess.d.ts +11 -0
  33. package/dist/dispatchers/shared/stream-subprocess.d.ts.map +1 -1
  34. package/dist/dispatchers/shared/stream-subprocess.js +57 -35
  35. package/dist/dispatchers/shared/stream-subprocess.js.map +1 -1
  36. package/dist/http/parse.d.ts +64 -0
  37. package/dist/http/parse.d.ts.map +1 -0
  38. package/dist/http/parse.js +230 -0
  39. package/dist/http/parse.js.map +1 -0
  40. package/dist/http/server.d.ts +2 -11
  41. package/dist/http/server.d.ts.map +1 -1
  42. package/dist/http/server.js +26 -232
  43. package/dist/http/server.js.map +1 -1
  44. package/dist/index.d.ts +1 -1
  45. package/dist/index.d.ts.map +1 -1
  46. package/dist/index.js +3 -2
  47. package/dist/index.js.map +1 -1
  48. package/dist/jobs/context.d.ts +17 -0
  49. package/dist/jobs/context.d.ts.map +1 -0
  50. package/dist/jobs/context.js +84 -0
  51. package/dist/jobs/context.js.map +1 -0
  52. package/dist/jobs/store.d.ts +80 -0
  53. package/dist/jobs/store.d.ts.map +1 -0
  54. package/dist/jobs/store.js +279 -0
  55. package/dist/jobs/store.js.map +1 -0
  56. package/dist/jobs/types.d.ts +135 -0
  57. package/dist/jobs/types.d.ts.map +1 -0
  58. package/dist/jobs/types.js +11 -0
  59. package/dist/jobs/types.js.map +1 -0
  60. package/dist/jobs.d.ts +113 -123
  61. package/dist/jobs.d.ts.map +1 -1
  62. package/dist/jobs.js +314 -309
  63. package/dist/jobs.js.map +1 -1
  64. package/dist/mcp/tool-schemas.d.ts +194 -0
  65. package/dist/mcp/tool-schemas.d.ts.map +1 -0
  66. package/dist/mcp/tool-schemas.js +311 -0
  67. package/dist/mcp/tool-schemas.js.map +1 -0
  68. package/dist/mcp/tools.d.ts +15 -59
  69. package/dist/mcp/tools.d.ts.map +1 -1
  70. package/dist/mcp/tools.js +63 -239
  71. package/dist/mcp/tools.js.map +1 -1
  72. package/dist/quota.d.ts +19 -1
  73. package/dist/quota.d.ts.map +1 -1
  74. package/dist/quota.js +39 -4
  75. package/dist/quota.js.map +1 -1
  76. package/dist/router.d.ts +4 -0
  77. package/dist/router.d.ts.map +1 -1
  78. package/dist/router.js +8 -0
  79. package/dist/router.js.map +1 -1
  80. package/dist/status.d.ts +13 -0
  81. package/dist/status.d.ts.map +1 -1
  82. package/dist/status.js +6 -0
  83. package/dist/status.js.map +1 -1
  84. package/dist/types.d.ts +51 -0
  85. package/dist/types.d.ts.map +1 -1
  86. package/dist/workspace-resolve.d.ts +98 -0
  87. package/dist/workspace-resolve.d.ts.map +1 -0
  88. package/dist/workspace-resolve.js +382 -0
  89. package/dist/workspace-resolve.js.map +1 -0
  90. package/dist/workspaces.d.ts +1 -0
  91. package/dist/workspaces.d.ts.map +1 -1
  92. package/dist/workspaces.js +67 -15
  93. package/dist/workspaces.js.map +1 -1
  94. package/package.json +5 -4
  95. package/dist/dashboard/live.d.ts +0 -49
  96. package/dist/dashboard/live.d.ts.map +0 -1
  97. package/dist/dashboard/live.js +0 -149
  98. package/dist/dashboard/live.js.map +0 -1
@@ -0,0 +1,311 @@
1
+ /**
2
+ * The MCP input contract: what the three tools accept, and what they refuse.
3
+ *
4
+ * Split out of tools.ts, which had grown to 1040 lines mixing the contract
5
+ * with the handlers that run after it. This half earns its own file rather
6
+ * than merely being long: these schemas ARE the safety boundary. The SDK
7
+ * validates arguments against them BEFORE any handler runs, so a key absent
8
+ * here is a key silently stripped — which is exactly how a top-level
9
+ * `safetyProfile` once ran a dispatch with more access than the caller
10
+ * asked for. Being able to read the whole accepted surface, and every
11
+ * deliberate refusal, in one place is the point.
12
+ */
13
+ import { z } from "zod";
14
+ export const taskTypeSchema = z.enum(["execute", "plan", "review", "local"]);
15
+ export const safetyProfileSchema = z.enum(["read_only", "workspace_edit", "full_auto"]);
16
+ export const workspacePolicySchema = z.enum(["shared", "shared_locked", "copy", "git_worktree"]);
17
+ export const routePolicySchema = z.enum(["standard", "local_only", "approval_required", "blocked"]);
18
+ export const publicHintsSchema = z
19
+ .object({
20
+ model: z
21
+ .string()
22
+ .optional()
23
+ .describe("Preferred route or model name (e.g. a route id like 'codex' or a model like " +
24
+ "'gpt-5.6-sol'). Routes that statically declare this model get a scoring " +
25
+ "boost; the model is ALWAYS passed to the harness as an override either way, " +
26
+ "even on a route that doesn't recognize it — NOT validated, so an unfamiliar " +
27
+ "or misspelled name can still fail at dispatch time if the harness doesn't " +
28
+ "support it. Check the response's routing.modelHintMatched: true means the " +
29
+ "picked route actually declares this model; false means it was forwarded " +
30
+ "blind and you should treat the result with more suspicion (or check why). " +
31
+ "Call the `usage` tool first to see valid route ids, their default models, " +
32
+ "and a modelHint per route pointing to where that harness's real model " +
33
+ "catalog is documented (or how to list it) — use it to pick correctly up " +
34
+ "front or self-correct after an unfamiliar-model failure. In fanout mode " +
35
+ "this field is ignored entirely — use `models` (top-level, not under " +
36
+ "hints) to select fanout candidates instead."),
37
+ taskType: taskTypeSchema
38
+ .optional()
39
+ .describe("Kind of work: 'execute' (write/modify code, run commands), 'plan' " +
40
+ "(architecture/design, no edits), 'review' (critique code, no edits), 'local' " +
41
+ "(trivial/mechanical — prefers free local endpoints). ALWAYS set this: when " +
42
+ "omitted, per-task capability weighting and model escalation are disabled and " +
43
+ "routing quality degrades."),
44
+ preferLargeContext: z
45
+ .boolean()
46
+ .optional()
47
+ .describe("Boost routes with very large context windows (for huge-codebase reads)."),
48
+ safetyProfile: safetyProfileSchema
49
+ .optional()
50
+ .describe("Maximum permission the routed harness may use: 'read_only' (inspect only — use " +
51
+ "for review/plan), 'workspace_edit' (default; may edit files in workingDir), " +
52
+ "'full_auto' (unrestricted shell — only when explicitly needed). Routes that " +
53
+ "cannot honor the requested profile are skipped."),
54
+ workspacePolicy: workspacePolicySchema.optional().describe("Workspace execution policy."),
55
+ routePolicy: routePolicySchema
56
+ .optional()
57
+ .describe("Operational routing policy: 'standard' (default), 'local_only' (never leave the " +
58
+ "machine), 'approval_required' (BLOCKS non-local routes — it is a restriction, " +
59
+ "not an approval grant), 'blocked' (dry-run: block everything)."),
60
+ timeoutMs: z
61
+ .number()
62
+ .int()
63
+ .positive()
64
+ .optional()
65
+ .describe("Override the background run's hard ceiling (milliseconds). Every dispatch " +
66
+ "runs as a background job with a generous 60-minute default meant to catch a " +
67
+ "genuinely hung process, not to cap a slow-but-healthy run — raise this for " +
68
+ "a task you expect to run past an hour. This changes when the harness itself " +
69
+ "gives up, not how long the inline grace window waits (that's `graceSeconds`)."),
70
+ })
71
+ // STRICT, and this is a safety control, not tidiness.
72
+ //
73
+ // zod drops unknown keys by default. The same setting is spelled
74
+ // `safety_profile` in config.yaml and `safetyProfile` here, so the obvious
75
+ // slip was silently discarded — `hints: { safety_profile: "read_only" }` ran
76
+ // a full_auto route at full_auto, while the correctly-spelled key refused
77
+ // it. A caller asking to be restricted got no restriction and no warning.
78
+ //
79
+ // config.ts already treats this class as a root cause (it warns on ANY
80
+ // unrecognised route key). This is the same fix at the MCP boundary, which
81
+ // PRODUCT.md calls the actual product surface.
82
+ .strict()
83
+ .describe("Public routing hints.");
84
+ export const workingDirDescription = "Absolute path to the project the task is about. EFFECTIVELY REQUIRED: when omitted, " +
85
+ "the task runs in the router server's own working directory — almost never the " +
86
+ "project you mean. Always pass the caller's project root.";
87
+ /** Inline grace window: how long `dispatch` waits for the background run before returning a pollable jobId instead of the full result. */
88
+ export const DEFAULT_GRACE_SECONDS = 25;
89
+ /**
90
+ * Cap on `files` per dispatch.
91
+ *
92
+ * Not a performance limit — each entry's parent directory becomes an
93
+ * `--add-dir` grant on CLI routes (generic-cli.ts includedDirectories ->
94
+ * {{file_dirs}}), so an unbounded list is an unbounded set of directories
95
+ * handed to a coding agent. 64 is far above any real prompt and low enough
96
+ * that a runaway caller is stopped at the boundary rather than at the CLI.
97
+ */
98
+ /** The only jobId shape jobs.ts produces; shared by both tools. */
99
+ export const JOB_ID_RE = /^job-\d+-[0-9a-f]{8}$/;
100
+ export const MAX_CONTEXT_FILES = 64;
101
+ /**
102
+ * Cap on prior jobs referenced by one dispatch.
103
+ *
104
+ * Each one costs a disk read and a slice of the delegate's context window.
105
+ * jobs.ts caps the rendered TEXT as well; this bounds the work done to produce
106
+ * it, so a caller naming hundreds of jobs is stopped at the boundary rather
107
+ * than after the reads.
108
+ */
109
+ export const MAX_CONTEXT_JOBS = 16;
110
+ /**
111
+ * Keys that mean nothing at the top level, trapped IN THE SCHEMA.
112
+ *
113
+ * `hints` is .strict(), so `hints: { safety_profile: ... }` is rejected — but
114
+ * the OUTER object was still permissive, so moving the same key up one level
115
+ * made it vanish silently instead:
116
+ *
117
+ * hints.safetyProfile = read_only -> honoured
118
+ * TOP-LEVEL safetyProfile = read_only -> dropped, ran with write access
119
+ *
120
+ * WHY SCHEMA FIELDS AND NOT A GUARD FUNCTION. The MCP SDK validates arguments
121
+ * against this shape in strip mode BEFORE the registered handler runs, so no
122
+ * code inside a handler can ever see a misplaced key — it is already gone. A
123
+ * previous version of this trap was a guard function, and it guarded a path
124
+ * nothing shipped: the registered tools stripped the key silently while only
125
+ * the test-only entry point rejected it. z.never() fields make the SDK's own
126
+ * validation throw the guidance message on every surface that parses this
127
+ * shape, and advertise as {"not":{}} in the tool's JSON schema, so a client
128
+ * reading the schema sees the key as unacceptable rather than merely absent.
129
+ *
130
+ * Full .strict() on the outer object is deliberately NOT used: MCP clients may
131
+ * attach their own fields (_meta and similar) and rejecting those would break
132
+ * legitimate callers. Naming the specific misplaced keys closes the trap
133
+ * without guessing at what else may legitimately arrive.
134
+ */
135
+ function misplacedKeyTrap(message) {
136
+ return z.never({ error: message }).optional().describe(message);
137
+ }
138
+ function hintKeyTrap(key) {
139
+ return misplacedKeyTrap(`${key} belongs inside \`hints\`, not at the top level — e.g. hints: { ${key}: ... }. ` +
140
+ `At the top level it does nothing, which for a safety setting means the dispatch ` +
141
+ `runs with MORE access than you asked for.`);
142
+ }
143
+ export const misplacedTopLevelKeys = {
144
+ safetyProfile: hintKeyTrap("safetyProfile"),
145
+ routePolicy: hintKeyTrap("routePolicy"),
146
+ taskType: hintKeyTrap("taskType"),
147
+ preferLargeContext: hintKeyTrap("preferLargeContext"),
148
+ timeoutMs: hintKeyTrap("timeoutMs"),
149
+ model: misplacedKeyTrap("model belongs inside `hints` for single mode — hints: { model: ... }. " +
150
+ "In fanout mode use the top-level `models` array instead. At the top " +
151
+ "level it does nothing."),
152
+ escalate: misplacedKeyTrap("escalate is not a dispatch field — escalation is configured per route in " +
153
+ "config.yaml (escalate_model / escalate_on), not per call."),
154
+ };
155
+ export const dispatchInputShape = {
156
+ prompt: z
157
+ .string()
158
+ // Rejected here rather than at the harness. An empty prompt used to reach
159
+ // a real CLI, which spawned, failed with its own usage message, and left a
160
+ // consumed route call behind — a wasted dispatch for something the schema
161
+ // can refuse for free.
162
+ .min(1, "prompt must not be empty")
163
+ // A NUL byte passed the schema and failed deep inside cross-spawn with
164
+ // "The argument 'args[2]' must be a string without null bytes" — caught,
165
+ // never a crash, and correctly not charged to the route's failure count,
166
+ // but a raw Node internal message where a boundary rejection belongs.
167
+ .refine((v) => !v.includes("\u0000"), "prompt must not contain NUL bytes")
168
+ .describe("The coding task or question. Every dispatch starts as a background job " +
169
+ "immediately; if it finishes within the grace window you get the full result " +
170
+ "inline, otherwise you get a jobId — check on it with the `job_status` tool. " +
171
+ "Either way nothing is ever lost to a timeout."),
172
+ mode: z
173
+ .enum(["single", "fanout"])
174
+ .optional()
175
+ .default("single")
176
+ .describe("'single' routes to the one best-fit harness. 'fanout' runs the prompt on " +
177
+ "MULTIPLE routes in parallel for independent perspectives — without `models` it " +
178
+ "hits every eligible route and consumes quota on each; prefer passing an " +
179
+ "explicit `models` list. Write-capable fanout requires workspacePolicy 'copy' " +
180
+ "or 'git_worktree'. Fanout results that outlive the grace window each return " +
181
+ "their own jobId to poll individually."),
182
+ contextJobs: z
183
+ .array(z.string().regex(JOB_ID_RE, "must look like job-<timestamp>-<8 hex chars>"))
184
+ .max(MAX_CONTEXT_JOBS)
185
+ .optional()
186
+ .describe("jobIds of earlier dispatches whose results this one should build on. Their " +
187
+ "prompts and outputs are rendered into this prompt directly, so a follow-up " +
188
+ "step can see what came before WITHOUT you reading it into your own context " +
189
+ "and re-summarising it. Use this to chain delegated work."),
190
+ files: z
191
+ .array(z.string())
192
+ .max(MAX_CONTEXT_FILES)
193
+ .optional()
194
+ .describe(`Absolute file paths to snapshot and include as context (max ` +
195
+ `${MAX_CONTEXT_FILES}). A path outside workingDir is still sent, but ` +
196
+ `for CLI routes its PARENT DIRECTORY is also granted to the agent via ` +
197
+ `--add-dir, so it escapes an isolated workspace — the response carries ` +
198
+ `a warning naming the directories when that happens.`),
199
+ workingDir: z.string().optional().describe(workingDirDescription),
200
+ workspacePolicy: workspacePolicySchema.optional().describe("Workspace execution policy."),
201
+ hints: publicHintsSchema.optional(),
202
+ ...misplacedTopLevelKeys,
203
+ models: z
204
+ .array(z.string())
205
+ .optional()
206
+ .describe("Route ids or model names to fan out to (fanout mode only). This is the ONLY " +
207
+ "field that narrows which routes fanout hits — `hints.model` is ignored " +
208
+ "entirely in fanout mode (not used for selection, not forwarded to any " +
209
+ "dispatch); it only does anything in single mode. Get valid ids from the " +
210
+ "`usage` tool."),
211
+ service: z
212
+ .string()
213
+ .optional()
214
+ .describe("Optional explicit route id to run (e.g. 'codex', 'cursor', 'local_inference' — " +
215
+ "see the `usage` tool for valid ids). Omit to let the router pick. Single " +
216
+ "mode only — incompatible with mode='fanout' (use `models` there)."),
217
+ graceSeconds: z
218
+ .number()
219
+ .int()
220
+ .min(0)
221
+ .max(600)
222
+ .optional()
223
+ .describe(`Seconds to wait for the run inline before returning a pollable jobId (default ` +
224
+ `${DEFAULT_GRACE_SECONDS}). 0 returns the jobId immediately (pure async). ` +
225
+ `Raising it past your MCP client's own request timeout buys nothing — the run ` +
226
+ `continues in the background either way and the result stays collectible via ` +
227
+ `\`job_status\`, so a client timeout on this call loses nothing but the inline reply.`),
228
+ };
229
+ export const jobStatusInputShape = {
230
+ jobId: z
231
+ .string()
232
+ .regex(JOB_ID_RE, "jobId must look like job-<timestamp>-<8 hex chars>")
233
+ .optional()
234
+ .describe("Check a previously started dispatch: returns partialOutput while running and " +
235
+ "the full result once completed or failed. Omit to list every known background " +
236
+ "dispatch instead."),
237
+ };
238
+ export const usageInputShape = {
239
+ listModels: z
240
+ .string()
241
+ .optional()
242
+ .describe("Route id of an OpenAI-compatible endpoint (e.g. an entry from `endpoints:` " +
243
+ "like nvidia_nim or ollama). If the route declares a `models:` list in " +
244
+ "config, that operator-curated list is returned as-is — declaring it is " +
245
+ "how you override live discovery (e.g. to pin specific ids, or the " +
246
+ "endpoint's /models listing is noisy/untrustworthy). Otherwise fetches the " +
247
+ "endpoint's live GET /models catalog server-side — the API key never " +
248
+ "leaves the router. Either way, results come back under `liveModels`. CLI " +
249
+ "harness routes don't support this; use their modelHint instead."),
250
+ };
251
+ /**
252
+ * `cancel_job` takes the jobId and, optionally, why.
253
+ *
254
+ * The reason is not decoration: a cancelled run's status carries it, so
255
+ * whoever finds the job later — often a different agent, or the same one
256
+ * after a restart — learns it was stopped on purpose rather than that it
257
+ * mysteriously died.
258
+ */
259
+ export const cancelJobInputShape = {
260
+ jobId: z
261
+ .string()
262
+ .regex(JOB_ID_RE, "must look like job-<timestamp>-<8 hex chars>")
263
+ .describe("The jobId returned by `dispatch`."),
264
+ reason: z
265
+ .string()
266
+ .max(500)
267
+ .optional()
268
+ .describe("Why it is being cancelled, recorded on the job so a later reader knows " +
269
+ "it was stopped deliberately (e.g. 'superseded by job-...', 'wrong directory')."),
270
+ };
271
+ /**
272
+ * `workspace` — inspect or resolve the isolated result of a finished job.
273
+ *
274
+ * One tool with an action rather than three tools, because all three operate
275
+ * on the SAME object (one job's workspace) with the same parameters. That is
276
+ * the opposite of the dispatch/job_status split, where one tool covering both
277
+ * "start work" and "check work" needed runtime guards against
278
+ * mutually-exclusive params — a sign the boundary was wrong. Here the actions
279
+ * are three verbs on one noun, and nothing is mutually exclusive.
280
+ */
281
+ export const workspaceInputShape = {
282
+ jobId: z
283
+ .string()
284
+ .regex(JOB_ID_RE, "must look like job-<timestamp>-<8 hex chars>")
285
+ .describe("A finished job that ran with workspacePolicy 'copy' or 'git_worktree'."),
286
+ action: z
287
+ .enum(["diff", "apply", "discard"])
288
+ .describe("'diff' returns the actual patch of what the agent changed (and writes it to " +
289
+ "the job directory). 'apply' applies that patch to the ORIGINAL project. " +
290
+ "'discard' deletes the isolated workspace, leaving the project untouched."),
291
+ force: z
292
+ .boolean()
293
+ .optional()
294
+ .describe("apply only: apply even when the target project has uncommitted changes. " +
295
+ "Off by default because the patch was built against a clean base, so " +
296
+ "applying over newer work can conflict with or overwrite it."),
297
+ };
298
+ /** `retry_job` — run a finished job's task again, optionally on another route. */
299
+ export const retryJobInputShape = {
300
+ jobId: z
301
+ .string()
302
+ .regex(JOB_ID_RE, "must look like job-<timestamp>-<8 hex chars>")
303
+ .describe("The finished job whose task should be attempted again."),
304
+ service: z
305
+ .string()
306
+ .optional()
307
+ .describe("Route the retry somewhere else (e.g. the original hit its usage limit). " +
308
+ "Omit to reuse the original route, or to let the router pick again if it " +
309
+ "had none. Get valid ids from `usage`."),
310
+ };
311
+ //# sourceMappingURL=tool-schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-schemas.js","sourceRoot":"","sources":["../../src/mcp/tool-schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;AAC7E,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,gBAAgB,EAAE,WAAW,CAAC,CAAC,CAAC;AACxF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,eAAe,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC;AACjG,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,YAAY,EAAE,mBAAmB,EAAE,SAAS,CAAC,CAAC,CAAC;AAEpG,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC;KAC/B,MAAM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mC,CAAC;IAChD,MAAM,EAAE,CAAC;SACN,MAAM,EAAE;SACR,GAAG,CAAC,GAAG,CAAC;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,yEAAyE;QACvE,gFAAgF,CACnF;CACK,CAAC;AAEX;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,KAAK,EAAE,CAAC;SACL,MAAM,EAAE;SACR,KAAK,CAAC,SAAS,EAAE,8CAA8C,CAAC;SAChE,QAAQ,CAAC,wEAAwE,CAAC;IACrF,MAAM,EAAE,CAAC;SACN,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;SAClC,QAAQ,CACP,8EAA8E;QAC5E,0EAA0E;QAC1E,0EAA0E,CAC7E;IACH,KAAK,EAAE,CAAC;SACL,OAAO,EAAE;SACT,QAAQ,EAAE;SACV,QAAQ,CACP,0EAA0E;QACxE,sEAAsE;QACtE,6DAA6D,CAChE;CACK,CAAC;AAEX,kFAAkF;AAClF,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,KAAK,EAAE,CAAC;SACL,MAAM,EAAE;SACR,KAAK,CAAC,SAAS,EAAE,8CAA8C,CAAC;SAChE,QAAQ,CAAC,wDAAwD,CAAC;IACrE,OAAO,EAAE,CAAC;SACP,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,0EAA0E;QACxE,0EAA0E;QAC1E,uCAAuC,CAC1C;CACK,CAAC"}
@@ -17,60 +17,7 @@ import { z } from "zod";
17
17
  import type { RouteSkip, TaskType, WorkspaceRun } from "../types.js";
18
18
  import type { RuntimeHolder, ConfigHotReloader } from "./config-hot-reload.js";
19
19
  import { type JobStatus } from "../jobs.js";
20
- declare const dispatchInputShape: {
21
- readonly models: z.ZodOptional<z.ZodArray<z.ZodString>>;
22
- readonly service: z.ZodOptional<z.ZodString>;
23
- readonly graceSeconds: z.ZodOptional<z.ZodNumber>;
24
- readonly safetyProfile: z.ZodOptional<z.ZodNever>;
25
- readonly routePolicy: z.ZodOptional<z.ZodNever>;
26
- readonly taskType: z.ZodOptional<z.ZodNever>;
27
- readonly preferLargeContext: z.ZodOptional<z.ZodNever>;
28
- readonly timeoutMs: z.ZodOptional<z.ZodNever>;
29
- readonly model: z.ZodOptional<z.ZodNever>;
30
- readonly escalate: z.ZodOptional<z.ZodNever>;
31
- readonly prompt: z.ZodString;
32
- readonly mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
33
- single: "single";
34
- fanout: "fanout";
35
- }>>>;
36
- readonly contextJobs: z.ZodOptional<z.ZodArray<z.ZodString>>;
37
- readonly files: z.ZodOptional<z.ZodArray<z.ZodString>>;
38
- readonly workingDir: z.ZodOptional<z.ZodString>;
39
- readonly workspacePolicy: z.ZodOptional<z.ZodEnum<{
40
- shared: "shared";
41
- shared_locked: "shared_locked";
42
- git_worktree: "git_worktree";
43
- copy: "copy";
44
- }>>;
45
- readonly hints: z.ZodOptional<z.ZodObject<{
46
- model: z.ZodOptional<z.ZodString>;
47
- taskType: z.ZodOptional<z.ZodEnum<{
48
- execute: "execute";
49
- plan: "plan";
50
- review: "review";
51
- local: "local";
52
- }>>;
53
- preferLargeContext: z.ZodOptional<z.ZodBoolean>;
54
- safetyProfile: z.ZodOptional<z.ZodEnum<{
55
- read_only: "read_only";
56
- workspace_edit: "workspace_edit";
57
- full_auto: "full_auto";
58
- }>>;
59
- workspacePolicy: z.ZodOptional<z.ZodEnum<{
60
- shared: "shared";
61
- shared_locked: "shared_locked";
62
- git_worktree: "git_worktree";
63
- copy: "copy";
64
- }>>;
65
- routePolicy: z.ZodOptional<z.ZodEnum<{
66
- standard: "standard";
67
- local_only: "local_only";
68
- approval_required: "approval_required";
69
- blocked: "blocked";
70
- }>>;
71
- timeoutMs: z.ZodOptional<z.ZodNumber>;
72
- }, z.core.$strict>>;
73
- };
20
+ import { dispatchInputShape, jobStatusInputShape } from "./tool-schemas.js";
74
21
  /**
75
22
  * Exactly the shape jobs.ts:679 generates: `job-${Date.now()}-${8 hex}`.
76
23
  *
@@ -82,10 +29,7 @@ declare const dispatchInputShape: {
82
29
  * is trustworthy" — validating the format is a one-liner and removes the
83
30
  * question entirely.
84
31
  */
85
- declare const jobStatusInputShape: {
86
- readonly jobId: z.ZodOptional<z.ZodString>;
87
- };
88
- export declare const TOOL_NAMES: readonly ["dispatch", "job_status", "usage"];
32
+ export declare const TOOL_NAMES: readonly ["dispatch", "job_status", "cancel_job", "retry_job", "workspace", "usage"];
89
33
  export interface RouteResponse {
90
34
  success: boolean;
91
35
  output: string;
@@ -179,6 +123,19 @@ export interface ToolExtra {
179
123
  sendNotification?: (notification: ServerNotification) => Promise<void>;
180
124
  }
181
125
  export declare function handleDispatch(deps: ToolDeps, input: z.infer<z.ZodObject<typeof dispatchInputShape>>, extra?: ToolExtra): Promise<unknown>;
126
+ export declare function handleCancelJob(args: {
127
+ jobId: string;
128
+ reason?: string | undefined;
129
+ }): Promise<import("../jobs.js").CancelOutcome>;
130
+ export declare function handleRetryJob(deps: ToolDeps, args: {
131
+ jobId: string;
132
+ service?: string | undefined;
133
+ }): Promise<import("../jobs.js").RetryOutcome>;
134
+ export declare function handleWorkspace(args: {
135
+ jobId: string;
136
+ action: "diff" | "apply" | "discard";
137
+ force?: boolean | undefined;
138
+ }): Promise<unknown>;
182
139
  export declare function handleJobStatus(input: z.infer<z.ZodObject<typeof jobStatusInputShape>>): Promise<unknown>;
183
140
  export declare function registerTools(server: McpServer, deps: ToolDeps): void;
184
141
  export type InvokeResult = {
@@ -186,5 +143,4 @@ export type InvokeResult = {
186
143
  data: unknown;
187
144
  };
188
145
  export declare function invokeTool(name: string, args: unknown, deps: ToolDeps): Promise<InvokeResult>;
189
- export {};
190
146
  //# sourceMappingURL=tools.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/mcp/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE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