@hearsay-tools/squawk 0.18.0-dev.7509 → 0.18.0-dev.7516
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.
- package/dist/agent-config/service.d.ts +2 -1
- package/dist/agent-config/service.js +1 -1
- package/dist/agent-config/service.js.map +1 -1
- package/dist/automations/service.d.ts +14 -14
- package/dist/automations/service.js +2 -2
- package/dist/automations/service.js.map +1 -1
- package/dist/automations/store.js +6 -1
- package/dist/automations/store.js.map +1 -1
- package/dist/automations/task-template.js +2 -1
- package/dist/automations/task-template.js.map +1 -1
- package/dist/automations/tool-adapter.js +17 -8
- package/dist/automations/tool-adapter.js.map +1 -1
- package/dist/ci-wait/controller.d.ts +8 -8
- package/dist/ci-wait/controller.js +1 -1
- package/dist/ci-wait/controller.js.map +1 -1
- package/dist/ci-wait/tools.d.ts +2 -2
- package/dist/contract/activity.d.ts +7 -49
- package/dist/contract/agent-config.d.ts +2 -14
- package/dist/contract/agent-profiles.d.ts +13 -91
- package/dist/contract/automation-requests.d.ts +6 -42
- package/dist/contract/automation-storage.d.ts +6 -42
- package/dist/contract/automation-tool.d.ts +6 -42
- package/dist/contract/automations.d.ts +18 -126
- package/dist/contract/config-requests.d.ts +2 -14
- package/dist/contract/delegation.d.ts +8 -56
- package/dist/contract/discovery.d.ts +8 -56
- package/dist/contract/health.d.ts +3 -25
- package/dist/contract/index.d.ts +1 -1
- package/dist/contract/index.js +1937 -1985
- package/dist/contract/per-runner-optional-strings.d.ts +3 -8
- package/dist/contract/provider-requests.d.ts +5 -35
- package/dist/contract/query-requests.d.ts +4 -7
- package/dist/contract/run-requests.d.ts +1 -7
- package/dist/contract/runner-skills.d.ts +2 -14
- package/dist/contract/runner.d.ts +5 -9
- package/dist/contract/runners.d.ts +39 -0
- package/dist/contract/runs.d.ts +22 -154
- package/dist/contract/workflow-file.d.ts +1 -7
- package/dist/contract/workflows.d.ts +9 -44
- package/dist/contract/workspace-events.d.ts +4 -28
- package/dist/contract/workspace.d.ts +23 -151
- package/dist/core/backend-detect.d.ts +2 -1
- package/dist/core/backend-detect.js.map +1 -1
- package/dist/core/provider-availability.d.ts +3 -1
- package/dist/core/provider-availability.js +1 -0
- package/dist/core/provider-availability.js.map +1 -1
- package/dist/core/runner-definition.d.ts +5 -0
- package/dist/core/runner-definition.js.map +1 -1
- package/dist/core/runner-fields.d.ts +26 -0
- package/dist/core/runner-fields.js +49 -0
- package/dist/core/runner-fields.js.map +1 -0
- package/dist/core/runner-model-catalog.d.ts +2 -1
- package/dist/core/runner-model-catalog.js +2 -2
- package/dist/core/runner-model-catalog.js.map +1 -1
- package/dist/core/runner-registry.d.ts +22 -1
- package/dist/core/runner-registry.js +32 -1
- package/dist/core/runner-registry.js.map +1 -1
- package/dist/core/ui-events.d.ts +3 -4
- package/dist/core/ui-events.js.map +1 -1
- package/dist/delegation/cli.js +6 -0
- package/dist/delegation/cli.js.map +1 -1
- package/dist/delegation/routes.d.ts +19 -19
- package/dist/delegation/routes.js +2 -2
- package/dist/delegation/routes.js.map +1 -1
- package/dist/delegation/service.js +3 -2
- package/dist/delegation/service.js.map +1 -1
- package/dist/delegation/transport.d.ts +21 -21
- package/dist/discovery/choices.d.ts +3 -2
- package/dist/discovery/choices.js +2 -2
- package/dist/discovery/choices.js.map +1 -1
- package/dist/discovery/cli.js +4 -1
- package/dist/discovery/cli.js.map +1 -1
- package/dist/runners/claude/definition.js +2 -0
- package/dist/runners/claude/definition.js.map +1 -1
- package/dist/runners/claude/display.d.ts +6 -0
- package/dist/runners/claude/display.js +7 -0
- package/dist/runners/claude/display.js.map +1 -0
- package/dist/runners/codex/definition.js +2 -0
- package/dist/runners/codex/definition.js.map +1 -1
- package/dist/runners/codex/display.d.ts +6 -0
- package/dist/runners/codex/display.js +7 -0
- package/dist/runners/codex/display.js.map +1 -0
- package/dist/runners/omp/definition.js +2 -0
- package/dist/runners/omp/definition.js.map +1 -1
- package/dist/runners/omp/display.d.ts +6 -0
- package/dist/runners/omp/display.js +7 -0
- package/dist/runners/omp/display.js.map +1 -0
- package/dist/runners/opencode/definition.js +2 -0
- package/dist/runners/opencode/definition.js.map +1 -1
- package/dist/runners/opencode/display.d.ts +6 -0
- package/dist/runners/opencode/display.js +7 -0
- package/dist/runners/opencode/display.js.map +1 -0
- package/dist/runners/pi/definition.js +2 -0
- package/dist/runners/pi/definition.js.map +1 -1
- package/dist/runners/pi/display.d.ts +6 -0
- package/dist/runners/pi/display.js +7 -0
- package/dist/runners/pi/display.js.map +1 -0
- package/dist/runs/legacy-run-rows.d.ts +24 -4
- package/dist/runs/legacy-run-rows.js +104 -29
- package/dist/runs/legacy-run-rows.js.map +1 -1
- package/dist/runs/run-exits.d.ts +16 -16
- package/dist/runs/store.d.ts +8 -35
- package/dist/runs/store.js +20 -21
- package/dist/runs/store.js.map +1 -1
- package/dist/server/activity-routes.d.ts +2 -2
- package/dist/server/open-in-targets.js +2 -2
- package/dist/server/open-in-targets.js.map +1 -1
- package/dist/server/provider-action-gate.d.ts +5 -2
- package/dist/server/provider-action-gate.js +9 -6
- package/dist/server/provider-action-gate.js.map +1 -1
- package/dist/server/provider-auth-runtime.js +2 -2
- package/dist/server/provider-auth-runtime.js.map +1 -1
- package/dist/server/reports-api.d.ts +2 -2
- package/dist/server/runner-skills.js +3 -1
- package/dist/server/runner-skills.js.map +1 -1
- package/dist/server/runners-routes.d.ts +25 -0
- package/dist/server/runners-routes.js +15 -0
- package/dist/server/runners-routes.js.map +1 -0
- package/dist/server/server-deps.d.ts +2 -1
- package/dist/server/server-deps.js +1 -3
- package/dist/server/server-deps.js.map +1 -1
- package/dist/server/server.d.ts +410 -521
- package/dist/server/server.js +34 -31
- package/dist/server/server.js.map +1 -1
- package/dist/server/start-run-options.d.ts +3 -1
- package/dist/server/start-run-options.js +2 -1
- package/dist/server/start-run-options.js.map +1 -1
- package/dist/server/validators.d.ts +6 -3
- package/dist/server/validators.js +21 -12
- package/dist/server/validators.js.map +1 -1
- package/dist/server/workspace-config-patch.js +2 -1
- package/dist/server/workspace-config-patch.js.map +1 -1
- package/dist/server/workspace-live-routes.d.ts +6 -6
- package/dist/workflows/continuation-admission.d.ts +3 -3
- package/dist/workflows/continuation-admission.js +2 -2
- package/dist/workflows/continuation-admission.js.map +1 -1
- package/dist/workflows/load.js +8 -0
- package/dist/workflows/load.js.map +1 -1
- package/dist/workflows/run/launch-read-resolver.d.ts +8 -8
- package/dist/workflows/run/launch-read-resolver.js +6 -6
- package/dist/workflows/run/launch-read-resolver.js.map +1 -1
- package/dist/workflows/run/queued-revival.d.ts +1 -1
- package/dist/workflows/run/queued-revival.js +5 -0
- package/dist/workflows/run/queued-revival.js.map +1 -1
- package/dist/workflows/run/run-line.d.ts +3 -0
- package/dist/workflows/run/run-line.js +11 -7
- package/dist/workflows/run/run-line.js.map +1 -1
- package/dist/workflows/run/usage-accounting.js +2 -2
- package/dist/workflows/run/usage-accounting.js.map +1 -1
- package/dist/workflows/run/wait-engine.d.ts +3 -3
- package/dist/workflows/run-scheduling.js +3 -3
- package/dist/workflows/run-scheduling.js.map +1 -1
- package/dist/workflows/run.d.ts +1 -1
- package/package.json +4 -4
- package/web/dist/assets/activity-motion-DQwtapOI.js +2 -0
- package/web/dist/assets/{activity-route-CYetaRaf.js → activity-route-BwZiMGfK.js} +1 -1
- package/web/dist/assets/agent-accounts-C_UK6pPU.js +1 -0
- package/web/dist/assets/attention-BOjuMCaW.js +1 -0
- package/web/dist/assets/{commit-diff-panel-D5MXcWp1.js → commit-diff-panel-BVWKMptW.js} +1 -1
- package/web/dist/assets/{diff-CbzFxE4W.js → diff-CXCoZr3w.js} +2 -2
- package/web/dist/assets/{diff-view-De-FaJNL.js → diff-view-y7x-a5xQ.js} +1 -1
- package/web/dist/assets/{file-preview-XuT7ByQJ.js → file-preview-CEaNT3ht.js} +1 -1
- package/web/dist/assets/{git-toolbar-Cnxtcw27.js → git-toolbar-BvvAgmDO.js} +1 -1
- package/web/dist/assets/{github-4ugOBSSl.js → github-B3WekFy2.js} +1 -1
- package/web/dist/assets/{global-activity-route-B0RZF0VZ.js → global-activity-route-D3lMjvxF.js} +1 -1
- package/web/dist/assets/index-BvMEJ3Ux.js +14 -0
- package/web/dist/assets/{markdown-D9-0R3BD.js → markdown-BojHOSHX.js} +1 -1
- package/web/dist/assets/{picker-pill-CFcrs68V.js → picker-pill-ToL4uifX.js} +1 -1
- package/web/dist/assets/{preview-pane-connected-B1Eo_Q-v.js → preview-pane-connected-BmBOIaSo.js} +1 -1
- package/web/dist/assets/{project-router-D7rZ5E-b.js → project-router-lPPUPPDI.js} +1 -1
- package/web/dist/assets/project-scope-context-Xjbxntpg.js +4 -0
- package/web/dist/assets/{prompt-template-menu-DYoBkQJP.js → prompt-template-menu-D8RsDr0w.js} +1 -1
- package/web/dist/assets/queries-BpsLvjtu.js +1 -0
- package/web/dist/assets/{reference-chip-BEkQoiWt.js → reference-chip-HnvJLwQV.js} +1 -1
- package/web/dist/assets/{repo-git-CPKuF-zu.js → repo-git-jRvRtMVC.js} +1 -1
- package/web/dist/assets/{report-reader-Buf2_ONr.js → report-reader-B9tuKd1M.js} +1 -1
- package/web/dist/assets/{reports-bWP2ZBOP.js → reports-DX1Hw80D.js} +1 -1
- package/web/dist/assets/run-header-ClrfkoK4.js +2 -0
- package/web/dist/assets/runners-CIHj9D-C.js +1 -0
- package/web/dist/assets/skills-Y60pkNkG.js +1 -0
- package/web/dist/assets/{tab-link-C_n2wSwD.js → tab-link-rmg3phtM.js} +1 -1
- package/web/dist/assets/{task-changes-rmp95PMX.js → task-changes-D-No9noD.js} +1 -1
- package/web/dist/assets/{task-commits-4ClywWZW.js → task-commits-BtU9bGk7.js} +1 -1
- package/web/dist/assets/{task-files-DIQ_8hh_.js → task-files-B0n2qyBi.js} +1 -1
- package/web/dist/assets/{task-github-item-D4zs5cvm.js → task-github-item-Xr08h42p.js} +1 -1
- package/web/dist/assets/task-thread-B7lUY_dn.js +9 -0
- package/web/dist/assets/thread-state-DoSqzctg.js +4 -0
- package/web/dist/assets/{use-desktop-Dq3Z-pSO.js → use-desktop-Coqw26IL.js} +1 -1
- package/web/dist/assets/use-hand-to-agent-state-PL74uvoL.js +1 -0
- package/web/dist/assets/{useInfiniteQuery-BiIzSoTr.js → useInfiniteQuery-C05yR_S9.js} +1 -1
- package/web/dist/assets/useQuery-7jNqNIJb.js +1 -0
- package/web/dist/assets/{workflows-DX9Mpt9Q.js → workflows-BEniI_am.js} +1 -1
- package/web/dist/assets/{ws-B3I-G6Q4.js → ws-wEXmfalm.js} +1 -1
- package/web/dist/index.html +14 -14
- package/dist/contract/runner-facts.d.ts +0 -51
- package/web/dist/assets/activity-motion-mnPv6Dpn.js +0 -2
- package/web/dist/assets/agent-accounts-9EM12D_s.js +0 -1
- package/web/dist/assets/attention-DjHSGsbe.js +0 -1
- package/web/dist/assets/index-S6DMaCB8.js +0 -14
- package/web/dist/assets/project-scope-context-DYV7r53s.js +0 -4
- package/web/dist/assets/queries-Bp7cia4e.js +0 -1
- package/web/dist/assets/run-header-masTwuK9.js +0 -2
- package/web/dist/assets/runner-facts-BpvNgJqf.js +0 -1
- package/web/dist/assets/skills-BUL45j_L.js +0 -1
- package/web/dist/assets/task-thread-CdBfevnO.js +0 -9
- package/web/dist/assets/thread-state-3Um_4g0a.js +0 -4
- package/web/dist/assets/use-hand-to-agent-state-BxJSA8sR.js +0 -1
- package/web/dist/assets/useQuery-BfBOHv1O.js +0 -1
|
@@ -155,13 +155,7 @@ export declare const workspaceRunSummaryEventSchema: z.ZodObject<{
|
|
|
155
155
|
variant: z.ZodOptional<z.ZodString>;
|
|
156
156
|
pinned: z.ZodOptional<z.ZodBoolean>;
|
|
157
157
|
automationId: z.ZodOptional<z.ZodString>;
|
|
158
|
-
runner: z.ZodOptional<z.
|
|
159
|
-
claude: "claude";
|
|
160
|
-
codex: "codex";
|
|
161
|
-
omp: "omp";
|
|
162
|
-
opencode: "opencode";
|
|
163
|
-
pi: "pi";
|
|
164
|
-
}>>;
|
|
158
|
+
runner: z.ZodOptional<z.ZodString>;
|
|
165
159
|
removedRunner: z.ZodOptional<z.ZodString>;
|
|
166
160
|
model: z.ZodOptional<z.ZodString>;
|
|
167
161
|
notify: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -175,13 +169,7 @@ export declare const workspaceRunSummaryEventSchema: z.ZodObject<{
|
|
|
175
169
|
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
176
170
|
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
177
171
|
currentStepId: z.ZodOptional<z.ZodString>;
|
|
178
|
-
currentStepBackend: z.ZodOptional<z.
|
|
179
|
-
claude: "claude";
|
|
180
|
-
codex: "codex";
|
|
181
|
-
omp: "omp";
|
|
182
|
-
opencode: "opencode";
|
|
183
|
-
pi: "pi";
|
|
184
|
-
}>>;
|
|
172
|
+
currentStepBackend: z.ZodOptional<z.ZodString>;
|
|
185
173
|
error: z.ZodOptional<z.ZodString>;
|
|
186
174
|
worktreePath: z.ZodOptional<z.ZodString>;
|
|
187
175
|
}, z.core.$strip>;
|
|
@@ -351,13 +339,7 @@ export declare const runsIndexResponseSchema: z.ZodObject<{
|
|
|
351
339
|
variant: z.ZodOptional<z.ZodString>;
|
|
352
340
|
pinned: z.ZodOptional<z.ZodBoolean>;
|
|
353
341
|
automationId: z.ZodOptional<z.ZodString>;
|
|
354
|
-
runner: z.ZodOptional<z.
|
|
355
|
-
claude: "claude";
|
|
356
|
-
codex: "codex";
|
|
357
|
-
omp: "omp";
|
|
358
|
-
opencode: "opencode";
|
|
359
|
-
pi: "pi";
|
|
360
|
-
}>>;
|
|
342
|
+
runner: z.ZodOptional<z.ZodString>;
|
|
361
343
|
removedRunner: z.ZodOptional<z.ZodString>;
|
|
362
344
|
model: z.ZodOptional<z.ZodString>;
|
|
363
345
|
notify: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -371,13 +353,7 @@ export declare const runsIndexResponseSchema: z.ZodObject<{
|
|
|
371
353
|
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
372
354
|
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
373
355
|
currentStepId: z.ZodOptional<z.ZodString>;
|
|
374
|
-
currentStepBackend: z.ZodOptional<z.
|
|
375
|
-
claude: "claude";
|
|
376
|
-
codex: "codex";
|
|
377
|
-
omp: "omp";
|
|
378
|
-
opencode: "opencode";
|
|
379
|
-
pi: "pi";
|
|
380
|
-
}>>;
|
|
356
|
+
currentStepBackend: z.ZodOptional<z.ZodString>;
|
|
381
357
|
error: z.ZodOptional<z.ZodString>;
|
|
382
358
|
worktreePath: z.ZodOptional<z.ZodString>;
|
|
383
359
|
projectId: z.ZodString;
|
|
@@ -46,20 +46,8 @@ export declare const workspaceConfigResponseSchema: z.ZodObject<{
|
|
|
46
46
|
worktreeRetentionDefault: z.ZodNumber;
|
|
47
47
|
}, z.core.$strip>;
|
|
48
48
|
agentDefaults: z.ZodObject<{
|
|
49
|
-
runner: z.ZodOptional<z.
|
|
50
|
-
|
|
51
|
-
codex: "codex";
|
|
52
|
-
omp: "omp";
|
|
53
|
-
opencode: "opencode";
|
|
54
|
-
pi: "pi";
|
|
55
|
-
}>>;
|
|
56
|
-
models: z.ZodOptional<z.ZodObject<{
|
|
57
|
-
claude: z.ZodOptional<z.ZodString>;
|
|
58
|
-
codex: z.ZodOptional<z.ZodString>;
|
|
59
|
-
opencode: z.ZodOptional<z.ZodString>;
|
|
60
|
-
pi: z.ZodOptional<z.ZodString>;
|
|
61
|
-
omp: z.ZodOptional<z.ZodString>;
|
|
62
|
-
}, z.core.$strip>>;
|
|
49
|
+
runner: z.ZodOptional<z.ZodString>;
|
|
50
|
+
models: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>>;
|
|
63
51
|
}, z.core.$strip>;
|
|
64
52
|
}, z.core.$strip>;
|
|
65
53
|
export type WorkspaceConfigResponse = z.infer<typeof workspaceConfigResponseSchema>;
|
|
@@ -79,20 +67,8 @@ export declare const setWorkspaceConfigInputSchema: z.ZodObject<{
|
|
|
79
67
|
worktree: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
80
68
|
}, z.core.$strip>>;
|
|
81
69
|
agentDefaults: z.ZodOptional<z.ZodObject<{
|
|
82
|
-
runner: z.ZodOptional<z.ZodNullable<z.
|
|
83
|
-
|
|
84
|
-
codex: "codex";
|
|
85
|
-
omp: "omp";
|
|
86
|
-
opencode: "opencode";
|
|
87
|
-
pi: "pi";
|
|
88
|
-
}>>>;
|
|
89
|
-
models: z.ZodOptional<z.ZodObject<{
|
|
90
|
-
claude: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
91
|
-
codex: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
92
|
-
opencode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
93
|
-
pi: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
94
|
-
omp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
95
|
-
}, z.core.$strip>>;
|
|
70
|
+
runner: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
71
|
+
models: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodNullable<z.ZodString>>>>;
|
|
96
72
|
}, z.core.$strip>>;
|
|
97
73
|
resources: z.ZodOptional<z.ZodObject<{
|
|
98
74
|
maxParallel: z.ZodOptional<z.ZodNumber>;
|
|
@@ -206,13 +182,7 @@ export declare const workspaceUiStateSchema: z.ZodObject<{
|
|
|
206
182
|
collapsed: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
207
183
|
projectOrder: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
208
184
|
}, z.core.$loose>>;
|
|
209
|
-
dismissedProviderAuthFailures: z.ZodOptional<z.
|
|
210
|
-
claude: z.ZodOptional<z.ZodString>;
|
|
211
|
-
codex: z.ZodOptional<z.ZodString>;
|
|
212
|
-
opencode: z.ZodOptional<z.ZodString>;
|
|
213
|
-
pi: z.ZodOptional<z.ZodString>;
|
|
214
|
-
omp: z.ZodOptional<z.ZodString>;
|
|
215
|
-
}, z.core.$strip>>;
|
|
185
|
+
dismissedProviderAuthFailures: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>>;
|
|
216
186
|
appearance: z.ZodOptional<z.ZodObject<{
|
|
217
187
|
accent: z.ZodOptional<z.ZodEnum<{
|
|
218
188
|
cezarion: "cezarion";
|
|
@@ -278,30 +248,15 @@ export declare const setWorkspaceUiStateInputSchema: z.ZodObject<{
|
|
|
278
248
|
collapsed: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
279
249
|
projectOrder: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
280
250
|
}, z.core.$loose>>;
|
|
281
|
-
dismissedProviderAuthFailures: z.ZodOptional<z.
|
|
282
|
-
claude: z.ZodOptional<z.ZodString>;
|
|
283
|
-
codex: z.ZodOptional<z.ZodString>;
|
|
284
|
-
opencode: z.ZodOptional<z.ZodString>;
|
|
285
|
-
pi: z.ZodOptional<z.ZodString>;
|
|
286
|
-
cursor: z.ZodOptional<z.ZodString>;
|
|
287
|
-
omp: z.ZodOptional<z.ZodString>;
|
|
288
|
-
}, z.core.$strict>>;
|
|
251
|
+
dismissedProviderAuthFailures: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>>;
|
|
289
252
|
taskTable: z.ZodOptional<z.ZodObject<{
|
|
290
253
|
expandedColumns: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
291
254
|
}, z.core.$loose>>;
|
|
292
255
|
}, z.core.$loose>;
|
|
293
256
|
export type SetWorkspaceUiStateInput = z.infer<typeof setWorkspaceUiStateInputSchema>;
|
|
294
257
|
/** Per-runner default model preset (Settings → Agents): the composer preselects this model id for
|
|
295
|
-
* the runner. Absent = auto (the runner decides). Keyed by runner
|
|
296
|
-
|
|
297
|
-
* the same way — one key per runner, each independently optional. */
|
|
298
|
-
export declare const runnerModelsSchema: z.ZodObject<{
|
|
299
|
-
claude: z.ZodOptional<z.ZodString>;
|
|
300
|
-
codex: z.ZodOptional<z.ZodString>;
|
|
301
|
-
opencode: z.ZodOptional<z.ZodString>;
|
|
302
|
-
pi: z.ZodOptional<z.ZodString>;
|
|
303
|
-
omp: z.ZodOptional<z.ZodString>;
|
|
304
|
-
}, z.core.$strip>;
|
|
258
|
+
* the runner. Absent = auto (the runner decides). Keyed by runner id, each independently optional. */
|
|
259
|
+
export declare const runnerModelsSchema: z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>;
|
|
305
260
|
export type RunnerModels = z.infer<typeof runnerModelsSchema>;
|
|
306
261
|
/**
|
|
307
262
|
* `.ai/cezar/config.json` → `worktreeSetup` (#917, spec `.ai/specs/2026-10-07-worktree-setup.md`):
|
|
@@ -329,21 +284,9 @@ export declare const configResponseSchema: z.ZodObject<{
|
|
|
329
284
|
project: "project";
|
|
330
285
|
}>;
|
|
331
286
|
baseBranch: z.ZodNullable<z.ZodString>;
|
|
332
|
-
defaultRunner: z.
|
|
333
|
-
claude: "claude";
|
|
334
|
-
codex: "codex";
|
|
335
|
-
omp: "omp";
|
|
336
|
-
opencode: "opencode";
|
|
337
|
-
pi: "pi";
|
|
338
|
-
}>;
|
|
287
|
+
defaultRunner: z.ZodString;
|
|
339
288
|
systemPrompt: z.ZodNullable<z.ZodString>;
|
|
340
|
-
defaultModels: z.
|
|
341
|
-
claude: z.ZodOptional<z.ZodString>;
|
|
342
|
-
codex: z.ZodOptional<z.ZodString>;
|
|
343
|
-
opencode: z.ZodOptional<z.ZodString>;
|
|
344
|
-
pi: z.ZodOptional<z.ZodString>;
|
|
345
|
-
omp: z.ZodOptional<z.ZodString>;
|
|
346
|
-
}, z.core.$strip>;
|
|
289
|
+
defaultModels: z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>;
|
|
347
290
|
modelsLocked: z.ZodBoolean;
|
|
348
291
|
maxParallel: z.ZodNumber;
|
|
349
292
|
memoryLimitMb: z.ZodNullable<z.ZodNumber>;
|
|
@@ -373,21 +316,9 @@ export declare const setConfigResponseSchema: z.ZodObject<{
|
|
|
373
316
|
project: "project";
|
|
374
317
|
}>;
|
|
375
318
|
baseBranch: z.ZodNullable<z.ZodString>;
|
|
376
|
-
defaultRunner: z.
|
|
377
|
-
claude: "claude";
|
|
378
|
-
codex: "codex";
|
|
379
|
-
omp: "omp";
|
|
380
|
-
opencode: "opencode";
|
|
381
|
-
pi: "pi";
|
|
382
|
-
}>;
|
|
319
|
+
defaultRunner: z.ZodString;
|
|
383
320
|
systemPrompt: z.ZodNullable<z.ZodString>;
|
|
384
|
-
defaultModels: z.
|
|
385
|
-
claude: z.ZodOptional<z.ZodString>;
|
|
386
|
-
codex: z.ZodOptional<z.ZodString>;
|
|
387
|
-
opencode: z.ZodOptional<z.ZodString>;
|
|
388
|
-
pi: z.ZodOptional<z.ZodString>;
|
|
389
|
-
omp: z.ZodOptional<z.ZodString>;
|
|
390
|
-
}, z.core.$strip>;
|
|
321
|
+
defaultModels: z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>;
|
|
391
322
|
modelsLocked: z.ZodBoolean;
|
|
392
323
|
maxParallel: z.ZodNumber;
|
|
393
324
|
memoryLimitMb: z.ZodNullable<z.ZodNumber>;
|
|
@@ -416,21 +347,9 @@ export type SetConfigResponse = z.infer<typeof setConfigResponseSchema>;
|
|
|
416
347
|
export declare const setConfigInputSchema: z.ZodObject<{
|
|
417
348
|
archiveOnMerge: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
418
349
|
baseBranch: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
419
|
-
defaultRunner: z.ZodOptional<z.
|
|
420
|
-
claude: "claude";
|
|
421
|
-
codex: "codex";
|
|
422
|
-
omp: "omp";
|
|
423
|
-
opencode: "opencode";
|
|
424
|
-
pi: "pi";
|
|
425
|
-
}>>;
|
|
350
|
+
defaultRunner: z.ZodOptional<z.ZodString>;
|
|
426
351
|
systemPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
427
|
-
defaultModels: z.ZodOptional<z.
|
|
428
|
-
claude: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
429
|
-
codex: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
430
|
-
opencode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
431
|
-
pi: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
432
|
-
omp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
433
|
-
}, z.core.$strip>>;
|
|
352
|
+
defaultModels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodNullable<z.ZodString>>>>;
|
|
434
353
|
maxParallel: z.ZodOptional<z.ZodNumber>;
|
|
435
354
|
memoryLimitMb: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
436
355
|
worktreeRetention: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
@@ -447,13 +366,7 @@ export declare const setConfigInputSchema: z.ZodObject<{
|
|
|
447
366
|
}, z.core.$strip>;
|
|
448
367
|
export type SetConfigInput = z.infer<typeof setConfigInputSchema>;
|
|
449
368
|
/** The agent backends are the providers — one alias, never a second enum. */
|
|
450
|
-
export declare const providerIdSchema: z.
|
|
451
|
-
claude: "claude";
|
|
452
|
-
codex: "codex";
|
|
453
|
-
omp: "omp";
|
|
454
|
-
opencode: "opencode";
|
|
455
|
-
pi: "pi";
|
|
456
|
-
}>;
|
|
369
|
+
export declare const providerIdSchema: z.ZodString;
|
|
457
370
|
export type ProviderId = Runner;
|
|
458
371
|
/** Coarse host authentication state. Credentials, account identity, and raw CLI output never
|
|
459
372
|
* cross this boundary. */
|
|
@@ -472,13 +385,7 @@ export type ProviderConnectionState = z.infer<typeof providerConnectionStateSche
|
|
|
472
385
|
* the key optional. The hand-written DTO declared it required — narrower than the route.
|
|
473
386
|
*/
|
|
474
387
|
export declare const providerStatusSchema: z.ZodObject<{
|
|
475
|
-
provider: z.
|
|
476
|
-
claude: "claude";
|
|
477
|
-
codex: "codex";
|
|
478
|
-
omp: "omp";
|
|
479
|
-
opencode: "opencode";
|
|
480
|
-
pi: "pi";
|
|
481
|
-
}>;
|
|
388
|
+
provider: z.ZodString;
|
|
482
389
|
status: z.ZodEnum<{
|
|
483
390
|
connected: "connected";
|
|
484
391
|
disconnected: "disconnected";
|
|
@@ -494,13 +401,7 @@ export type ProviderStatus = z.infer<typeof providerStatusSchema>;
|
|
|
494
401
|
/** `GET /api/v1/providers/status`, and the answer of the enabled/retry mutators. */
|
|
495
402
|
export declare const providerStatusResponseSchema: z.ZodObject<{
|
|
496
403
|
providers: z.ZodArray<z.ZodObject<{
|
|
497
|
-
provider: z.
|
|
498
|
-
claude: "claude";
|
|
499
|
-
codex: "codex";
|
|
500
|
-
omp: "omp";
|
|
501
|
-
opencode: "opencode";
|
|
502
|
-
pi: "pi";
|
|
503
|
-
}>;
|
|
404
|
+
provider: z.ZodString;
|
|
504
405
|
status: z.ZodEnum<{
|
|
505
406
|
connected: "connected";
|
|
506
407
|
disconnected: "disconnected";
|
|
@@ -527,22 +428,11 @@ export declare const providerConnectResponseSchema: z.ZodDiscriminatedUnion<[z.Z
|
|
|
527
428
|
}, z.core.$strip>], "opened">;
|
|
528
429
|
export type ProviderConnectResponse = z.infer<typeof providerConnectResponseSchema>;
|
|
529
430
|
/**
|
|
530
|
-
*
|
|
531
|
-
*
|
|
532
|
-
* through `pi --list-models`, and Claude through
|
|
533
|
-
* stream-json `list_models`. One definition, used by the route's query validator and the picker.
|
|
431
|
+
* A runner whose model list is discovered from the host: every registered runner has a model
|
|
432
|
+
* catalog (its definition's `loadModelCatalog`). The route's query validator and the picker use it.
|
|
534
433
|
*/
|
|
535
|
-
export declare const modelDiscoveryRunnerSchema: z.
|
|
536
|
-
claude: "claude";
|
|
537
|
-
codex: "codex";
|
|
538
|
-
omp: "omp";
|
|
539
|
-
opencode: "opencode";
|
|
540
|
-
pi: "pi";
|
|
541
|
-
}>;
|
|
434
|
+
export declare const modelDiscoveryRunnerSchema: z.ZodString;
|
|
542
435
|
export type ModelDiscoveryRunner = z.infer<typeof modelDiscoveryRunnerSchema>;
|
|
543
|
-
export declare const MODEL_DISCOVERY_RUNNERS: readonly ModelDiscoveryRunner[];
|
|
544
|
-
/** True when `runner` has a host-discovered catalog (and therefore a `/models` answer). */
|
|
545
|
-
export declare function runnerDiscoversModels(runner: Runner): runner is ModelDiscoveryRunner;
|
|
546
436
|
export declare const runnerModelOptionSchema: z.ZodObject<{
|
|
547
437
|
id: z.ZodString;
|
|
548
438
|
label: z.ZodString;
|
|
@@ -560,13 +450,7 @@ export type RunnerModelOption = z.infer<typeof runnerModelOptionSchema>;
|
|
|
560
450
|
* host installation, plus how fresh the answer is. Never an error: an unavailable CLI degrades
|
|
561
451
|
* to `source: 'unavailable'` with a `reason`. Claude has no host-local catalog and is rejected. */
|
|
562
452
|
export declare const runnerModelCatalogResponseSchema: z.ZodObject<{
|
|
563
|
-
runner: z.
|
|
564
|
-
claude: "claude";
|
|
565
|
-
codex: "codex";
|
|
566
|
-
omp: "omp";
|
|
567
|
-
opencode: "opencode";
|
|
568
|
-
pi: "pi";
|
|
569
|
-
}>;
|
|
453
|
+
runner: z.ZodString;
|
|
570
454
|
models: z.ZodArray<z.ZodObject<{
|
|
571
455
|
id: z.ZodString;
|
|
572
456
|
label: z.ZodString;
|
|
@@ -592,13 +476,7 @@ export type RunnerModelCatalogResponse = z.infer<typeof runnerModelCatalogRespon
|
|
|
592
476
|
* beside its parts, so `delegation.ts` does not load `discovery.ts` (hearsay-tools/cezarion#3241);
|
|
593
477
|
* `discovery.ts` re-exports it. */
|
|
594
478
|
export declare const modelChoicesSchema: z.ZodObject<{
|
|
595
|
-
runner: z.
|
|
596
|
-
claude: "claude";
|
|
597
|
-
codex: "codex";
|
|
598
|
-
omp: "omp";
|
|
599
|
-
opencode: "opencode";
|
|
600
|
-
pi: "pi";
|
|
601
|
-
}>;
|
|
479
|
+
runner: z.ZodString;
|
|
602
480
|
requestedModel: z.ZodString;
|
|
603
481
|
availableModels: z.ZodArray<z.ZodObject<{
|
|
604
482
|
id: z.ZodString;
|
|
@@ -612,13 +490,7 @@ export declare const modelChoicesSchema: z.ZodObject<{
|
|
|
612
490
|
xhigh: "xhigh";
|
|
613
491
|
}>>>;
|
|
614
492
|
}, z.core.$strip>>;
|
|
615
|
-
otherRunners: z.ZodArray<z.
|
|
616
|
-
claude: "claude";
|
|
617
|
-
codex: "codex";
|
|
618
|
-
omp: "omp";
|
|
619
|
-
opencode: "opencode";
|
|
620
|
-
pi: "pi";
|
|
621
|
-
}>>;
|
|
493
|
+
otherRunners: z.ZodArray<z.ZodString>;
|
|
622
494
|
}, z.core.$strip>;
|
|
623
495
|
export type ModelChoices = z.infer<typeof modelChoicesSchema>;
|
|
624
496
|
/** A local app a worktree can be opened in (#open-in): editor, file manager, or terminal. */
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { RunnerId } from './agent-runner.ts';
|
|
2
2
|
import type { RunnerDetection } from './runner-definition.ts';
|
|
3
3
|
export interface BackendCheck {
|
|
4
|
-
|
|
4
|
+
/** A runner id, `gh` or `git`. */
|
|
5
|
+
name: string;
|
|
5
6
|
available: boolean;
|
|
6
7
|
version?: string;
|
|
7
8
|
hint?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backend-detect.js","sourceRoot":"","sources":["../../src/core/backend-detect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB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AM,CAAC;QACP,OAAO;YACL,IAAI,EAAE,IAAI;YACV,SAAS,EAAE,KAAK;YAChB,IAAI,EAAE,8EAA8E;SACrF,CAAC;IACJ,CAAC;AACH,CAAC;AAED,KAAK,UAAU,QAAQ;IACrB,IAAI,CAAC;QACH,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,CAAC,WAAW,CAAC,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;QACpE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC;IAClE,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;IAChE,CAAC;AACH,CAAC;AAED,8EAA8E;AAC9E,MAAM,CAAC,KAAK,UAAU,mBAAmB;IACvC,IAAI,CAAC;QACH,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;QAC5E,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;QAC5B,IAAI,KAAK;YAAE,OAAO,KAAK,CAAC;IAC1B,CAAC;IAAC,MAAM,CAAC;QACP,8BAA8B;IAChC,CAAC;IACD,OAAO,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,IAAI,EAAE,IAAI,IAAI,CAAC;AAClD,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import { type ProviderId, type ProviderStatus, type ProviderStatusResponse } from './provider-auth.ts';
|
|
2
|
-
|
|
2
|
+
import type { ProviderStatusResponse as WireProviderStatusResponse } from '../contract/index.js';
|
|
3
|
+
/** The discovered rows with each one's enablement, as the wire sends them: runner ids are strings. */
|
|
4
|
+
export declare function applyProviderEnablement(response: ProviderStatusResponse, disabledProviders: readonly ProviderId[]): WireProviderStatusResponse;
|
|
3
5
|
export declare function isProviderUsable(row: ProviderStatus): boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { providerAuthChecksDisabled, } from './provider-auth.js';
|
|
2
|
+
/** The discovered rows with each one's enablement, as the wire sends them: runner ids are strings. */
|
|
2
3
|
export function applyProviderEnablement(response, disabledProviders) {
|
|
3
4
|
const disabled = new Set(providerAuthChecksDisabled() ? [] : disabledProviders);
|
|
4
5
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-availability.js","sourceRoot":"","sources":["../../src/core/provider-availability.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,GAI3B,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"provider-availability.js","sourceRoot":"","sources":["../../src/core/provider-availability.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,GAI3B,MAAM,oBAAoB,CAAC;AAG5B,sGAAsG;AACtG,MAAM,UAAU,uBAAuB,CACrC,QAAgC,EAChC,iBAAwC;IAExC,MAAM,QAAQ,GAAG,IAAI,GAAG,CACtB,0BAA0B,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,iBAAiB,CACtD,CAAC;IACF,OAAO;QACL,SAAS,EAAE,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;YAC1C,GAAG,GAAG;YACN,OAAO,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC;SACrC,CAAC,CAAC;KACJ,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,GAAmB;IAClD,OAAO,GAAG,CAAC,OAAO,KAAK,KAAK,IAAI,GAAG,CAAC,MAAM,KAAK,WAAW,CAAC;AAC7D,CAAC"}
|
|
@@ -7,6 +7,7 @@ import type { SkillCatalog } from './runner-skill-catalog.ts';
|
|
|
7
7
|
import type { SkillDiscoveryOptions } from './skill-probe.ts';
|
|
8
8
|
import type { ConfigFileDef } from './runner-config-files.ts';
|
|
9
9
|
import type { ProviderCommandResult, ProviderConnectionState } from './provider-auth.ts';
|
|
10
|
+
import type { RunnerEntry } from '../contract/index.js';
|
|
10
11
|
/**
|
|
11
12
|
* Everything Squawk knows about one runner, in one object (spec 2026-11-18-runner-definitions).
|
|
12
13
|
* Each runner's `runners/<id>/definition.ts` exports one, made with `defineRunner`, and an entry
|
|
@@ -49,6 +50,8 @@ export interface RunnerDefinition {
|
|
|
49
50
|
readonly env: RunnerEnv;
|
|
50
51
|
/** The runner's native mock script and the prompts that drive it, for tests and lint (the `mock` part). */
|
|
51
52
|
readonly mock: RunnerMock;
|
|
53
|
+
/** How the cockpit and server messages name the runner. Plain JSON: `GET /api/v1/runners` sends it as it is. */
|
|
54
|
+
readonly display: RunnerDisplay;
|
|
52
55
|
}
|
|
53
56
|
/**
|
|
54
57
|
* A runner's native mock (the `mock` part): the script in `packages/cezar/scripts/`, the variable
|
|
@@ -83,6 +86,8 @@ export interface RunnerMock {
|
|
|
83
86
|
* `scenarios['approval-malformed']`. */
|
|
84
87
|
readonly malformedApprovalEcho?: string;
|
|
85
88
|
}
|
|
89
|
+
/** The `display` part: a `GET /api/v1/runners` entry without its id. */
|
|
90
|
+
export type RunnerDisplay = Omit<RunnerEntry, 'id'>;
|
|
86
91
|
/** A runner's model data: plain data in `runners/<id>/models.ts`. */
|
|
87
92
|
export interface RunnerModelData {
|
|
88
93
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner-definition.js","sourceRoot":"","sources":["../../src/core/runner-definition.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"runner-definition.js","sourceRoot":"","sources":["../../src/core/runner-definition.ts"],"names":[],"mappings":"AA4NA,0BAA0B;AAC1B,MAAM,UAAU,YAAY,CAAC,UAA4B;IACvD,OAAO,UAAU,CAAC;AACpB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Where a request or a saved file names runners (spec 2026-11-18-runner-definitions, decision 1).
|
|
4
|
+
* The contract takes any runner id; a route refuses one that no runner registered, and a saved
|
|
5
|
+
* file that names one stays unreadable, each with the issue the closed enum gave. A path is
|
|
6
|
+
* dot-separated; `*` stands for each element of an array.
|
|
7
|
+
*/
|
|
8
|
+
export interface RunnerFields {
|
|
9
|
+
/** Fields that hold one runner id. */
|
|
10
|
+
readonly ids?: readonly string[];
|
|
11
|
+
/** Objects keyed by runner id: a key that names no registered runner is dropped, as an object
|
|
12
|
+
* schema drops a key it does not know. */
|
|
13
|
+
readonly keys?: readonly string[];
|
|
14
|
+
/** An object keyed by runner id that refuses any other key, and the ids of removed runners it
|
|
15
|
+
* also keeps. */
|
|
16
|
+
readonly strictKeys?: {
|
|
17
|
+
readonly path: string;
|
|
18
|
+
readonly also: readonly string[];
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* The issues of the runner ids in `data` that `known` does not list, worded as the closed enum
|
|
23
|
+
* worded them. Drops the other keys of each `keys` object from `data`. `known` defaults to the
|
|
24
|
+
* registered runners, read only when `data` names a runner.
|
|
25
|
+
*/
|
|
26
|
+
export declare function runnerFieldIssues(data: unknown, fields: RunnerFields, known?: () => readonly string[]): z.core.$ZodIssue[];
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { registeredRunners } from './runner-registry.js';
|
|
3
|
+
/** Every value at `path` in `root`, with its concrete path. */
|
|
4
|
+
function locate(root, path) {
|
|
5
|
+
let found = [{ path: [], value: root }];
|
|
6
|
+
for (const part of path.split('.')) {
|
|
7
|
+
found = found.flatMap(({ path: at, value }) => {
|
|
8
|
+
if (part === '*')
|
|
9
|
+
return Array.isArray(value) ? value.map((item, index) => ({ path: [...at, index], value: item })) : [];
|
|
10
|
+
return value && typeof value === 'object' && !Array.isArray(value) ? [{ path: [...at, part], value: value[part] }] : [];
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
return found.filter(({ value }) => value !== undefined && value !== null);
|
|
14
|
+
}
|
|
15
|
+
function registeredIds() {
|
|
16
|
+
return registeredRunners().map(({ id }) => id);
|
|
17
|
+
}
|
|
18
|
+
function issuesAt(at, schema, value) {
|
|
19
|
+
const parsed = schema.safeParse(value);
|
|
20
|
+
return parsed.success ? [] : parsed.error.issues.map(issue => ({ ...issue, path: [...at, ...issue.path] }));
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The issues of the runner ids in `data` that `known` does not list, worded as the closed enum
|
|
24
|
+
* worded them. Drops the other keys of each `keys` object from `data`. `known` defaults to the
|
|
25
|
+
* registered runners, read only when `data` names a runner.
|
|
26
|
+
*/
|
|
27
|
+
export function runnerFieldIssues(data, fields, known = registeredIds) {
|
|
28
|
+
const issues = [];
|
|
29
|
+
for (const { path, value } of (fields.ids ?? []).flatMap(field => locate(data, field))) {
|
|
30
|
+
issues.push(...issuesAt(path, z.enum(known()), value));
|
|
31
|
+
}
|
|
32
|
+
for (const { value } of (fields.keys ?? []).flatMap(field => locate(data, field))) {
|
|
33
|
+
if (typeof value !== 'object')
|
|
34
|
+
continue;
|
|
35
|
+
const ids = new Set(known());
|
|
36
|
+
for (const key of Object.keys(value))
|
|
37
|
+
if (!ids.has(key))
|
|
38
|
+
delete value[key];
|
|
39
|
+
}
|
|
40
|
+
if (fields.strictKeys) {
|
|
41
|
+
const { path: field, also } = fields.strictKeys;
|
|
42
|
+
for (const { path, value } of locate(data, field)) {
|
|
43
|
+
const shape = Object.fromEntries([...known(), ...also].map(id => [id, z.unknown().optional()]));
|
|
44
|
+
issues.push(...issuesAt(path, z.strictObject(shape), value));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return issues;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMapp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AC,EAAE,CAAC;QAClF,IAAI,OAAO,KAAK,KAAK,QAAQ;YAAE,SAAS;QACxC,MAAM,GAAG,GAAG,IAAI,GAAG,CAAS,KAAK,EAAE,CAAC,CAAC;QACrC,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,KAAe,CAAC;YAAE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC;gBAAE,OAAQ,KAAiC,CAAC,GAAG,CAAC,CAAC;IACpH,CAAC;IACD,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;QACtB,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC,UAAU,CAAC;QAChD,KAAK,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC;YAClD,MAAM,KAAK,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC,GAAG,KAAK,EAAE,EAAE,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC;YAChG,MAAM,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;QAC/D,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -8,7 +8,8 @@ export interface ModelOption {
|
|
|
8
8
|
}
|
|
9
9
|
export type ModelCatalogSource = 'live' | 'cache' | 'unavailable';
|
|
10
10
|
export interface RunnerModelCatalogResult {
|
|
11
|
-
runner:
|
|
11
|
+
/** The runner id as the wire sends it: a string. */
|
|
12
|
+
runner: string;
|
|
12
13
|
models: ModelOption[];
|
|
13
14
|
source: ModelCatalogSource;
|
|
14
15
|
stale: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { runnerDefinition } from './runner-registry.js';
|
|
2
2
|
const DEFAULT_TTL_MS = 5 * 60 * 1_000;
|
|
3
3
|
/** Host-level, in-memory model discovery cache shared by every workspace. */
|
|
4
4
|
export class RunnerModelCatalog {
|
|
@@ -73,6 +73,6 @@ export class RunnerModelCatalog {
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
function unavailableReason(runner) {
|
|
76
|
-
return `${
|
|
76
|
+
return `${runnerDefinition(runner).display.modelListName} model discovery is temporarily unavailable`;
|
|
77
77
|
}
|
|
78
78
|
//# sourceMappingURL=runner-model-catalog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner-model-catalog.js","sourceRoot":"","sources":["../../src/core/runner-model-catalog.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"runner-model-catalog.js","sourceRoot":"","sources":["../../src/core/runner-model-catalog.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAqCxD,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC;AAEtC,6EAA6E;AAC7E,MAAM,OAAO,kBAAkB;IACpB,SAAS,CAAuD;IAChE,IAAI,CAAe;IACnB,MAAM,CAAS;IACf,MAAM,GAAG,IAAI,GAAG,EAA2B,CAAC;IAC5C,SAAS,GAAG,IAAI,GAAG,EAA+C,CAAC;IACnE,WAAW,GAAG,IAAI,GAAG,EAAoB,CAAC;IAEnD,YAAY,OAAkC;QAC5C,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,QAAQ,CAAC;QAClC,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC;QACpC,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,IAAI,cAAc,CAAC;IAChD,CAAC;IAED,UAAU,CA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K,EAAE,KAAK,EAAE,CAAC;QACxE,CAAC;QAAC,MAAM,CAAC;YACP,MAAM,MAAM,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;YACzC,IAAI,MAAM,EAAE,CAAC;gBACX,IAAI,OAAO,EAAE,EAAE,CAAC;oBACd,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,CAAC,CAAC;gBAClH,CAAC;gBACD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;YACjF,CAAC;YACD,IAAI,OAAO,EAAE,EAAE,CAAC;gBACd,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,CAAC,CAAC;YACvG,CAAC;YACD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;QAC7E,CAAC;IACH,CAAC;CACF;AAED,SAAS,iBAAiB,CAAC,MAAgB;IACzC,OAAO,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,aAAa,6CAA6C,CAAC;AACxG,CAAC"}
|
|
@@ -9,6 +9,9 @@ export declare const LEGACY_RUNNER_IDS: ReadonlyMap<string, RunnerId>;
|
|
|
9
9
|
* map to the default runner (`claude`), as `createRunner` does.
|
|
10
10
|
*/
|
|
11
11
|
export declare function runnerIdOf(backend: string | undefined): RunnerId;
|
|
12
|
+
/** A runner id read back from saved data (a run, a workflow file), mapped as `runnerIdOf` maps it.
|
|
13
|
+
* Undefined stays undefined. */
|
|
14
|
+
export declare function savedRunnerId(id: string | undefined): RunnerId | undefined;
|
|
12
15
|
/**
|
|
13
16
|
* Add one runner. Registering the same definition object again does nothing. A different
|
|
14
17
|
* definition with an id that is already registered is an error, and so is a legacy id: the legacy
|
|
@@ -18,7 +21,25 @@ export declare function registerRunner(definition: RunnerDefinition): void;
|
|
|
18
21
|
/** The registered runners, in registration order. */
|
|
19
22
|
export declare function registeredRunners(): RunnerDefinition[];
|
|
20
23
|
/** Whether a runner with this id is registered. */
|
|
21
|
-
export declare function isRegisteredRunner(id: string):
|
|
24
|
+
export declare function isRegisteredRunner(id: string): id is RunnerId;
|
|
25
|
+
/**
|
|
26
|
+
* A runner id that its source has checked: a request that the route's runner check
|
|
27
|
+
* (`server/runner-fields.ts`) admitted, or a saved setting. Throws when no runner registered it.
|
|
28
|
+
*/
|
|
29
|
+
export declare function registeredRunnerId(id: string): RunnerId;
|
|
30
|
+
/**
|
|
31
|
+
* Whether a runner with this id is registered, or undefined when no runner is registered. Only the
|
|
32
|
+
* read of saved runs uses it (`runs/legacy-run-rows.ts`): a process that registered no runner keeps
|
|
33
|
+
* the read it had before runner ids were open. Every other read throws on an empty registry.
|
|
34
|
+
*/
|
|
35
|
+
export declare function savedRunnerRegistration(id: string): boolean | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* The runner ids this process knows: the registered ids, or, in a process that registered no
|
|
38
|
+
* runner, the built-in ids, which is what such a process knew before runner ids were open. Saved
|
|
39
|
+
* data (runs, workflow files, automation definitions) and the CLI's own checks of a runner id read
|
|
40
|
+
* it. Never throws, like `savedRunnerRegistration`.
|
|
41
|
+
*/
|
|
42
|
+
export declare function knownRunnerIds(): readonly string[];
|
|
22
43
|
/** The registered definition of a runner. */
|
|
23
44
|
export declare function runnerDefinition(id: RunnerId): RunnerDefinition;
|
|
24
45
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isRunnerId } from './agent-runner.js';
|
|
1
|
+
import { isRunnerId, RUNNER_IDS } from './agent-runner.js';
|
|
2
2
|
/**
|
|
3
3
|
* The registered runners, in registration order (spec 2026-11-18-runner-definitions). An entry
|
|
4
4
|
* registers the built-in runners with `registerBuiltInRunners()` (`runners/built-in.ts`) before
|
|
@@ -20,6 +20,11 @@ export function runnerIdOf(backend) {
|
|
|
20
20
|
return DEFAULT_RUNNER_ID;
|
|
21
21
|
return isRunnerId(backend) ? backend : LEGACY_RUNNER_IDS.get(backend) ?? DEFAULT_RUNNER_ID;
|
|
22
22
|
}
|
|
23
|
+
/** A runner id read back from saved data (a run, a workflow file), mapped as `runnerIdOf` maps it.
|
|
24
|
+
* Undefined stays undefined. */
|
|
25
|
+
export function savedRunnerId(id) {
|
|
26
|
+
return id === undefined ? undefined : runnerIdOf(id);
|
|
27
|
+
}
|
|
23
28
|
/**
|
|
24
29
|
* Add one runner. Registering the same definition object again does nothing. A different
|
|
25
30
|
* definition with an id that is already registered is an error, and so is a legacy id: the legacy
|
|
@@ -52,6 +57,32 @@ export function isRegisteredRunner(id) {
|
|
|
52
57
|
assertRegistered();
|
|
53
58
|
return registry.has(id);
|
|
54
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* A runner id that its source has checked: a request that the route's runner check
|
|
62
|
+
* (`server/runner-fields.ts`) admitted, or a saved setting. Throws when no runner registered it.
|
|
63
|
+
*/
|
|
64
|
+
export function registeredRunnerId(id) {
|
|
65
|
+
if (!isRegisteredRunner(id))
|
|
66
|
+
throw new Error(`Runner ${id} is not registered.`);
|
|
67
|
+
return id;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Whether a runner with this id is registered, or undefined when no runner is registered. Only the
|
|
71
|
+
* read of saved runs uses it (`runs/legacy-run-rows.ts`): a process that registered no runner keeps
|
|
72
|
+
* the read it had before runner ids were open. Every other read throws on an empty registry.
|
|
73
|
+
*/
|
|
74
|
+
export function savedRunnerRegistration(id) {
|
|
75
|
+
return registry.size === 0 ? undefined : registry.has(id);
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* The runner ids this process knows: the registered ids, or, in a process that registered no
|
|
79
|
+
* runner, the built-in ids, which is what such a process knew before runner ids were open. Saved
|
|
80
|
+
* data (runs, workflow files, automation definitions) and the CLI's own checks of a runner id read
|
|
81
|
+
* it. Never throws, like `savedRunnerRegistration`.
|
|
82
|
+
*/
|
|
83
|
+
export function knownRunnerIds() {
|
|
84
|
+
return registry.size === 0 ? RUNNER_IDS : [...registry.keys()];
|
|
85
|
+
}
|
|
55
86
|
/** The registered definition of a runner. */
|
|
56
87
|
export function runnerDefinition(id) {
|
|
57
88
|
assertRegistered();
|