@hearsay-tools/squawk 0.18.0-dev.8037 → 0.18.0-dev.8044
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/automations/service.d.ts +21 -0
- package/dist/built-in-cli-commands.d.ts +3 -0
- package/dist/built-in-cli-commands.js +152 -0
- package/dist/built-in-cli-commands.js.map +1 -0
- package/dist/ci-wait/controller.d.ts +14 -0
- package/dist/ci-wait/tools.d.ts +3 -0
- package/dist/cli-dispatch.js +13 -73
- package/dist/cli-dispatch.js.map +1 -1
- package/dist/contract/automation-requests.d.ts +9 -0
- package/dist/contract/automation-storage.d.ts +9 -0
- package/dist/contract/automation-tool.d.ts +9 -0
- package/dist/contract/automations.d.ts +27 -0
- package/dist/contract/create-run-input.d.ts +3 -0
- package/dist/contract/index.js +32 -7
- package/dist/contract/run-status.d.ts +1 -0
- package/dist/contract/runs.d.ts +20 -0
- package/dist/contract/workflow-file.d.ts +3 -0
- package/dist/contract/workflows.d.ts +19 -1
- package/dist/core/cli-registry.d.ts +50 -0
- package/dist/core/cli-registry.js +13 -0
- package/dist/core/cli-registry.js.map +1 -0
- package/dist/delegation/routes.d.ts +17 -17
- package/dist/delegation/service.js +2 -2
- package/dist/delegation/service.js.map +1 -1
- package/dist/delegation/transport.d.ts +15 -15
- package/dist/home/backup-args.d.ts +18 -0
- package/dist/home/backup-args.js +35 -0
- package/dist/home/backup-args.js.map +1 -0
- package/dist/home/entry.js +9 -6
- package/dist/home/entry.js.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/runs/run-archive.d.ts +77 -73
- package/dist/runs/run-decode.d.ts +12 -1
- package/dist/runs/run-exits.d.ts +26 -4
- package/dist/runs/store.d.ts +1 -1
- package/dist/server/server.d.ts +286 -18
- package/dist/subcommands.d.ts +2 -10
- package/dist/subcommands.js +14 -62
- package/dist/subcommands.js.map +1 -1
- package/dist/workflows/continuation-admission.d.ts +5 -1
- package/dist/workflows/load.js +7 -0
- package/dist/workflows/load.js.map +1 -1
- package/dist/workflows/run/launch-read-resolver.d.ts +21 -0
- package/dist/workflows/run/launch-read-resolver.js +1 -1
- package/dist/workflows/run/launch-read-resolver.js.map +1 -1
- package/dist/workflows/run/queued-revival.js +1 -1
- package/dist/workflows/run/step-decisions.js +4 -3
- package/dist/workflows/run/step-decisions.js.map +1 -1
- package/dist/workflows/run/step-loop.js +32 -16
- package/dist/workflows/run/step-loop.js.map +1 -1
- package/dist/workflows/run/wait-engine.d.ts +5 -1
- package/dist/workflows/step-kind-registry.d.ts +43 -0
- package/dist/workflows/step-kind-registry.js +43 -0
- package/dist/workflows/step-kind-registry.js.map +1 -0
- package/dist/workflows/types.d.ts +4 -1
- package/dist/workflows/types.js +1 -1
- package/dist/workflows/types.js.map +1 -1
- package/dist/workspace/backups.d.ts +1 -18
- package/dist/workspace/backups.js +2 -34
- package/dist/workspace/backups.js.map +1 -1
- package/package.json +4 -4
- package/scripts/benchmark-runtime.ts +3 -0
- package/scripts/measure-transcript-facts-health.mjs +3 -0
- package/web/dist/assets/{accounts-section-B-zlsH7k.js → accounts-section-D3P_Z-Nu.js} +1 -1
- package/web/dist/assets/{activity-motion-psm6jyeg.js → activity-motion-BW-0k8s7.js} +1 -1
- package/web/dist/assets/{activity-route-DeK0riM9.js → activity-route-Bpgblioe.js} +1 -1
- package/web/dist/assets/{agent-config-section-BvmWn_h-.js → agent-config-section-Cj3w7UIn.js} +1 -1
- package/web/dist/assets/{agent-defaults-section-DsuYOQpY.js → agent-defaults-section-BJ4poe9c.js} +1 -1
- package/web/dist/assets/{appearance-DNMXL1v0.js → appearance-BUsUTPF0.js} +1 -1
- package/web/dist/assets/{archive-on-merge-field-BovFB0t7.js → archive-on-merge-field-D_kgBFNv.js} +1 -1
- package/web/dist/assets/attention-lvUYNNvV.js +1 -0
- package/web/dist/assets/{automations-route-DyiKOd25.js → automations-route-CZaUrmDs.js} +1 -1
- package/web/dist/assets/{commit-diff-panel-DawdFJ6E.js → commit-diff-panel-xwLW6Ydr.js} +1 -1
- package/web/dist/assets/{diff-CfoXwmnl.js → diff-BB8SoL-s.js} +2 -2
- package/web/dist/assets/{diff-view-5xkdG47g.js → diff-view-O8lx1ztb.js} +1 -1
- package/web/dist/assets/{file-preview-DIVTxup4.js → file-preview-BS6M2tBo.js} +1 -1
- package/web/dist/assets/{folder-browser-BzVWaANT.js → folder-browser-Dsqz0Z1z.js} +1 -1
- package/web/dist/assets/{git-toolbar-BUViNmxj.js → git-toolbar-DoPFA36c.js} +1 -1
- package/web/dist/assets/{github-COe1nsmn.js → github-Bjy3WBvf.js} +1 -1
- package/web/dist/assets/{global-activity-route-B-cJo1pg.js → global-activity-route-BXBZKz_9.js} +1 -1
- package/web/dist/assets/{index-BZiixXpY.js → index-CmadQXcg.js} +5 -5
- package/web/dist/assets/{label-DVUPtyTI.js → label-CZp8t0zE.js} +1 -1
- package/web/dist/assets/{markdown-bvY77s5D.js → markdown-KHcncamw.js} +1 -1
- package/web/dist/assets/{notifications-section-Cet1mmEc.js → notifications-section-DD21Sd79.js} +1 -1
- package/web/dist/assets/{open-in-menu-BpSp2CJF.js → open-in-menu-DdKs6X5r.js} +1 -1
- package/web/dist/assets/{preview-pane-connected-BCrpsIIn.js → preview-pane-connected-BvTZv2SQ.js} +1 -1
- package/web/dist/assets/{project-location-ClZPnbBZ.js → project-location-B3LBvkz2.js} +1 -1
- package/web/dist/assets/{project-router-BYrAO9Ws.js → project-router-CIKODSHW.js} +1 -1
- package/web/dist/assets/project-scope-context-D1bpJixc.js +4 -0
- package/web/dist/assets/{projects-section-CdUdrEPd.js → projects-section-C0k8kyb-.js} +1 -1
- package/web/dist/assets/{prompt-templates-section-D3ojaPZw.js → prompt-templates-section-DNkosCni.js} +1 -1
- package/web/dist/assets/{queries--x5yVcip.js → queries-dHXhD3Hc.js} +1 -1
- package/web/dist/assets/{reference-chip-013dL8dQ.js → reference-chip-BWViAFIN.js} +1 -1
- package/web/dist/assets/{remote-settings-notice-BbBWWAm8.js → remote-settings-notice-DPCENbhz.js} +1 -1
- package/web/dist/assets/{repo-git-1hSBzyJQ.js → repo-git-jKOnO3ba.js} +1 -1
- package/web/dist/assets/{report-reader-BNtgxtSI.js → report-reader-DXYiKNcg.js} +1 -1
- package/web/dist/assets/{reports-C64cW2KP.js → reports-DEE0bHNv.js} +1 -1
- package/web/dist/assets/{resources-section-xAUouGNM.js → resources-section-lqXgYTrv.js} +1 -1
- package/web/dist/assets/{run-header-75eMWFhM.js → run-header-CXlUbvDO.js} +1 -1
- package/web/dist/assets/{runners-C4-xD5Cz.js → runners-CGQjSsir.js} +1 -1
- package/web/dist/assets/{settings-agent-picker-4P5j_ZP8.js → settings-agent-picker-BRvZn4kM.js} +1 -1
- package/web/dist/assets/{settings-shell-CME_R4D1.js → settings-shell-DTtd-vIa.js} +1 -1
- package/web/dist/assets/{sidebar-section-BQSB_KxK.js → sidebar-section-BFW4ZfBR.js} +1 -1
- package/web/dist/assets/{skills-RUJCWIve.js → skills-AImMlT1T.js} +1 -1
- package/web/dist/assets/{tab-link-DnbdjF4r.js → tab-link-CM6SDBtV.js} +1 -1
- package/web/dist/assets/{task-changes-Boec_UFj.js → task-changes-01Z_ppIw.js} +1 -1
- package/web/dist/assets/{task-commits-B6k-DdnE.js → task-commits-DRNIum3J.js} +1 -1
- package/web/dist/assets/{task-files-T731cz4q.js → task-files-Crz7Fo3C.js} +1 -1
- package/web/dist/assets/{task-github-item-iQd_C1Y4.js → task-github-item-psG2V47c.js} +1 -1
- package/web/dist/assets/{task-groups-BTMFLRHJ.js → task-groups-DF0XoB6U.js} +1 -1
- package/web/dist/assets/{task-thread-BaPz3rdA.js → task-thread-Bqg91ZVZ.js} +2 -2
- package/web/dist/assets/{tasks-table-BCuA9Kx7.js → tasks-table-DHTEGteC.js} +1 -1
- package/web/dist/assets/{thread-state-B3Ichxx9.js → thread-state-BWJ2YyXo.js} +1 -1
- package/web/dist/assets/{use-hand-to-agent-state-DIIBuX3r.js → use-hand-to-agent-state-DNROQerR.js} +1 -1
- package/web/dist/assets/{useInfiniteQuery-BxpPo6z-.js → useInfiniteQuery-qJeCNhM7.js} +1 -1
- package/web/dist/assets/useQuery-C3CQhXsT.js +1 -0
- package/web/dist/assets/{workflows-8HhOvPhw.js → workflows-Cx9lgrEo.js} +2 -2
- package/web/dist/assets/{workspace-tools-D6C2Yjat.js → workspace-tools-CVitt3kE.js} +1 -1
- package/web/dist/assets/{worktrees-section-Cm4JH128.js → worktrees-section-DxUg4l9n.js} +1 -1
- package/web/dist/assets/{ws-Iixb-QFR.js → ws-BisMp6U5.js} +1 -1
- package/web/dist/index.html +15 -15
- package/web/dist/assets/attention-DaLkUl4h.js +0 -1
- package/web/dist/assets/project-scope-context-BDU1qGx3.js +0 -4
- package/web/dist/assets/useQuery-DcVi2Spi.js +0 -1
|
@@ -38,6 +38,9 @@ export declare const createRunInputBaseSchema: z.ZodObject<{
|
|
|
38
38
|
agentProfile: z.ZodOptional<z.ZodString>;
|
|
39
39
|
allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
40
40
|
bashAllowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
41
|
+
kind: z.ZodOptional<z.ZodLiteral<"plugin">>;
|
|
42
|
+
pluginKind: z.ZodOptional<z.ZodString>;
|
|
43
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
41
44
|
command: z.ZodOptional<z.ZodString>;
|
|
42
45
|
onFail: z.ZodOptional<z.ZodObject<{
|
|
43
46
|
retry: z.ZodString;
|
package/dist/contract/index.js
CHANGED
|
@@ -333,7 +333,7 @@ var stepStatusSchema = z7.enum([
|
|
|
333
333
|
"cancelled",
|
|
334
334
|
"skipped"
|
|
335
335
|
]);
|
|
336
|
-
var stepKindSchema = z7.enum(["agent", "check"]);
|
|
336
|
+
var stepKindSchema = z7.enum(["agent", "check", "plugin"]);
|
|
337
337
|
|
|
338
338
|
// ../contract/src/runner.ts
|
|
339
339
|
import { z as z8 } from "zod";
|
|
@@ -1270,17 +1270,41 @@ var workflowStepDefSchema = z17.object({
|
|
|
1270
1270
|
agentProfile: z17.string().min(1).max(64).optional(),
|
|
1271
1271
|
allowedTools: z17.array(z17.string()).optional(),
|
|
1272
1272
|
bashAllowlist: z17.array(z17.string()).optional(),
|
|
1273
|
+
kind: z17.literal("plugin").optional(),
|
|
1274
|
+
pluginKind: z17.string().min(1).max(64).optional(),
|
|
1275
|
+
config: z17.record(z17.string(), z17.unknown()).optional(),
|
|
1273
1276
|
// check step
|
|
1274
1277
|
command: z17.string().optional(),
|
|
1275
1278
|
onFail: z17.object({
|
|
1276
1279
|
retry: z17.string().min(1),
|
|
1277
1280
|
max: z17.number().int().positive().default(2)
|
|
1278
1281
|
}).optional()
|
|
1279
|
-
}).
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1282
|
+
}).superRefine((s, ctx) => {
|
|
1283
|
+
const agent = Boolean(s.prompt ?? s.skill);
|
|
1284
|
+
const check = Boolean(s.command);
|
|
1285
|
+
const plugin = s.kind === "plugin";
|
|
1286
|
+
if (Number(agent) + Number(check) + Number(plugin) !== 1) {
|
|
1287
|
+
ctx.addIssue({ code: "custom", message: "a step is either an agent step (prompt/skill), a check step (command), or a plugin step, not more than one" });
|
|
1288
|
+
}
|
|
1289
|
+
if (plugin && [s.prompt, s.skill, s.command].some((value) => value !== void 0)) {
|
|
1290
|
+
ctx.addIssue({ code: "custom", message: "plugin steps cannot carry prompt, skill, or command" });
|
|
1291
|
+
}
|
|
1292
|
+
if (plugin && (s.pluginKind === "agent" || s.pluginKind === "check")) {
|
|
1293
|
+
ctx.addIssue({ code: "custom", path: ["pluginKind"], message: "pluginKind cannot name a built-in step kind" });
|
|
1294
|
+
}
|
|
1295
|
+
if (plugin && !s.pluginKind) {
|
|
1296
|
+
ctx.addIssue({ code: "custom", path: ["pluginKind"], message: "plugin steps require pluginKind" });
|
|
1297
|
+
}
|
|
1298
|
+
if (!plugin && (s.pluginKind !== void 0 || s.config !== void 0)) {
|
|
1299
|
+
ctx.addIssue({ code: "custom", message: "pluginKind and config apply only to plugin steps" });
|
|
1300
|
+
}
|
|
1301
|
+
if (plugin) {
|
|
1302
|
+
for (const key of ["timeoutMs", "model", "effort", "runner", "agentProfile", "allowedTools", "bashAllowlist"]) {
|
|
1303
|
+
if (s[key] !== void 0) ctx.addIssue({ code: "custom", path: [key], message: `${key} applies only to agent steps` });
|
|
1304
|
+
}
|
|
1305
|
+
} else if (check && s.timeoutMs !== void 0) {
|
|
1306
|
+
ctx.addIssue({ code: "custom", path: ["timeoutMs"], message: "timeoutMs applies only to agent steps" });
|
|
1307
|
+
}
|
|
1284
1308
|
});
|
|
1285
1309
|
var workflowDefSchema = z17.object({
|
|
1286
1310
|
name: z17.string(),
|
|
@@ -1293,7 +1317,7 @@ var workflowDefSchema = z17.object({
|
|
|
1293
1317
|
function providersRequiredByWorkflow(workflow, fallback, runners) {
|
|
1294
1318
|
const required = /* @__PURE__ */ new Set();
|
|
1295
1319
|
for (const step of workflow.steps) {
|
|
1296
|
-
if (!step.command) required.add(step.runner ?? fallback);
|
|
1320
|
+
if (!step.command && step.kind !== "plugin") required.add(step.runner ?? fallback);
|
|
1297
1321
|
}
|
|
1298
1322
|
return runners.filter((provider) => required.has(provider));
|
|
1299
1323
|
}
|
|
@@ -2016,6 +2040,7 @@ var stepStateSchema = z23.object({
|
|
|
2016
2040
|
id: z23.string(),
|
|
2017
2041
|
name: z23.string(),
|
|
2018
2042
|
kind: stepKindSchema,
|
|
2043
|
+
pluginKind: z23.string().min(1).max(64).optional(),
|
|
2019
2044
|
status: stepStatusSchema,
|
|
2020
2045
|
iterations: z23.number(),
|
|
2021
2046
|
/** Durable count of onFail retry loops consumed by this check. */
|
package/dist/contract/runs.d.ts
CHANGED
|
@@ -60,7 +60,9 @@ export declare const stepStateSchema: z.ZodObject<{
|
|
|
60
60
|
kind: z.ZodEnum<{
|
|
61
61
|
agent: "agent";
|
|
62
62
|
check: "check";
|
|
63
|
+
plugin: "plugin";
|
|
63
64
|
}>;
|
|
65
|
+
pluginKind: z.ZodOptional<z.ZodString>;
|
|
64
66
|
status: z.ZodEnum<{
|
|
65
67
|
cancelled: "cancelled";
|
|
66
68
|
done: "done";
|
|
@@ -2142,7 +2144,9 @@ export declare const runRecordSchema: z.ZodObject<{
|
|
|
2142
2144
|
kind: z.ZodEnum<{
|
|
2143
2145
|
agent: "agent";
|
|
2144
2146
|
check: "check";
|
|
2147
|
+
plugin: "plugin";
|
|
2145
2148
|
}>;
|
|
2149
|
+
pluginKind: z.ZodOptional<z.ZodString>;
|
|
2146
2150
|
status: z.ZodEnum<{
|
|
2147
2151
|
cancelled: "cancelled";
|
|
2148
2152
|
done: "done";
|
|
@@ -2190,6 +2194,9 @@ export declare const runRecordSchema: z.ZodObject<{
|
|
|
2190
2194
|
agentProfile: z.ZodOptional<z.ZodString>;
|
|
2191
2195
|
allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2192
2196
|
bashAllowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2197
|
+
kind: z.ZodOptional<z.ZodLiteral<"plugin">>;
|
|
2198
|
+
pluginKind: z.ZodOptional<z.ZodString>;
|
|
2199
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2193
2200
|
command: z.ZodOptional<z.ZodString>;
|
|
2194
2201
|
onFail: z.ZodOptional<z.ZodObject<{
|
|
2195
2202
|
retry: z.ZodString;
|
|
@@ -4190,7 +4197,9 @@ export declare const apiRunSchema: z.ZodObject<{
|
|
|
4190
4197
|
kind: z.ZodEnum<{
|
|
4191
4198
|
agent: "agent";
|
|
4192
4199
|
check: "check";
|
|
4200
|
+
plugin: "plugin";
|
|
4193
4201
|
}>;
|
|
4202
|
+
pluginKind: z.ZodOptional<z.ZodString>;
|
|
4194
4203
|
status: z.ZodEnum<{
|
|
4195
4204
|
cancelled: "cancelled";
|
|
4196
4205
|
done: "done";
|
|
@@ -4238,6 +4247,9 @@ export declare const apiRunSchema: z.ZodObject<{
|
|
|
4238
4247
|
agentProfile: z.ZodOptional<z.ZodString>;
|
|
4239
4248
|
allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4240
4249
|
bashAllowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4250
|
+
kind: z.ZodOptional<z.ZodLiteral<"plugin">>;
|
|
4251
|
+
pluginKind: z.ZodOptional<z.ZodString>;
|
|
4252
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
4241
4253
|
command: z.ZodOptional<z.ZodString>;
|
|
4242
4254
|
onFail: z.ZodOptional<z.ZodObject<{
|
|
4243
4255
|
retry: z.ZodString;
|
|
@@ -6990,7 +7002,9 @@ export declare const createRunResponseSchema: z.ZodObject<{
|
|
|
6990
7002
|
kind: z.ZodEnum<{
|
|
6991
7003
|
agent: "agent";
|
|
6992
7004
|
check: "check";
|
|
7005
|
+
plugin: "plugin";
|
|
6993
7006
|
}>;
|
|
7007
|
+
pluginKind: z.ZodOptional<z.ZodString>;
|
|
6994
7008
|
status: z.ZodEnum<{
|
|
6995
7009
|
cancelled: "cancelled";
|
|
6996
7010
|
done: "done";
|
|
@@ -7038,6 +7052,9 @@ export declare const createRunResponseSchema: z.ZodObject<{
|
|
|
7038
7052
|
agentProfile: z.ZodOptional<z.ZodString>;
|
|
7039
7053
|
allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7040
7054
|
bashAllowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7055
|
+
kind: z.ZodOptional<z.ZodLiteral<"plugin">>;
|
|
7056
|
+
pluginKind: z.ZodOptional<z.ZodString>;
|
|
7057
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
7041
7058
|
command: z.ZodOptional<z.ZodString>;
|
|
7042
7059
|
onFail: z.ZodOptional<z.ZodObject<{
|
|
7043
7060
|
retry: z.ZodString;
|
|
@@ -7284,6 +7301,9 @@ export declare const createRunInputSchema: z.ZodObject<{
|
|
|
7284
7301
|
agentProfile: z.ZodOptional<z.ZodString>;
|
|
7285
7302
|
allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7286
7303
|
bashAllowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7304
|
+
kind: z.ZodOptional<z.ZodLiteral<"plugin">>;
|
|
7305
|
+
pluginKind: z.ZodOptional<z.ZodString>;
|
|
7306
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
7287
7307
|
command: z.ZodOptional<z.ZodString>;
|
|
7288
7308
|
onFail: z.ZodOptional<z.ZodObject<{
|
|
7289
7309
|
retry: z.ZodString;
|
|
@@ -19,6 +19,9 @@ export declare const workflowFileSchema: z.ZodObject<{
|
|
|
19
19
|
agentProfile: z.ZodOptional<z.ZodString>;
|
|
20
20
|
allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
21
21
|
bashAllowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
22
|
+
kind: z.ZodOptional<z.ZodLiteral<"plugin">>;
|
|
23
|
+
pluginKind: z.ZodOptional<z.ZodString>;
|
|
24
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
22
25
|
command: z.ZodOptional<z.ZodString>;
|
|
23
26
|
onFail: z.ZodOptional<z.ZodObject<{
|
|
24
27
|
retry: z.ZodString;
|
|
@@ -9,7 +9,7 @@ import { type Runner } from './runner.ts';
|
|
|
9
9
|
* import time, not a type error.
|
|
10
10
|
*/
|
|
11
11
|
/**
|
|
12
|
-
* One step of a chain:
|
|
12
|
+
* One step of a chain: an agent (`prompt`/`skill`), check (`command`), or plugin step.
|
|
13
13
|
*
|
|
14
14
|
* `onFail.max` carries a `.default(2)`, exactly as `src/workflows/types.ts` declares it, so the
|
|
15
15
|
* OUTPUT shape the routes serve has `max` present whenever `onFail` is.
|
|
@@ -26,6 +26,9 @@ export declare const workflowStepDefSchema: z.ZodObject<{
|
|
|
26
26
|
agentProfile: z.ZodOptional<z.ZodString>;
|
|
27
27
|
allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
28
28
|
bashAllowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
29
|
+
kind: z.ZodOptional<z.ZodLiteral<"plugin">>;
|
|
30
|
+
pluginKind: z.ZodOptional<z.ZodString>;
|
|
31
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
29
32
|
command: z.ZodOptional<z.ZodString>;
|
|
30
33
|
onFail: z.ZodOptional<z.ZodObject<{
|
|
31
34
|
retry: z.ZodString;
|
|
@@ -49,6 +52,9 @@ export declare const workflowDefSchema: z.ZodObject<{
|
|
|
49
52
|
agentProfile: z.ZodOptional<z.ZodString>;
|
|
50
53
|
allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
51
54
|
bashAllowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
55
|
+
kind: z.ZodOptional<z.ZodLiteral<"plugin">>;
|
|
56
|
+
pluginKind: z.ZodOptional<z.ZodString>;
|
|
57
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
52
58
|
command: z.ZodOptional<z.ZodString>;
|
|
53
59
|
onFail: z.ZodOptional<z.ZodObject<{
|
|
54
60
|
retry: z.ZodString;
|
|
@@ -88,6 +94,9 @@ export declare const workflowsResponseSchema: z.ZodObject<{
|
|
|
88
94
|
agentProfile: z.ZodOptional<z.ZodString>;
|
|
89
95
|
allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
90
96
|
bashAllowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
97
|
+
kind: z.ZodOptional<z.ZodLiteral<"plugin">>;
|
|
98
|
+
pluginKind: z.ZodOptional<z.ZodString>;
|
|
99
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
91
100
|
command: z.ZodOptional<z.ZodString>;
|
|
92
101
|
onFail: z.ZodOptional<z.ZodObject<{
|
|
93
102
|
retry: z.ZodString;
|
|
@@ -127,6 +136,9 @@ export declare const saveWorkflowInputSchema: z.ZodObject<{
|
|
|
127
136
|
agentProfile: z.ZodOptional<z.ZodString>;
|
|
128
137
|
allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
129
138
|
bashAllowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
139
|
+
kind: z.ZodOptional<z.ZodLiteral<"plugin">>;
|
|
140
|
+
pluginKind: z.ZodOptional<z.ZodString>;
|
|
141
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
130
142
|
command: z.ZodOptional<z.ZodString>;
|
|
131
143
|
onFail: z.ZodOptional<z.ZodObject<{
|
|
132
144
|
retry: z.ZodString;
|
|
@@ -159,6 +171,9 @@ export declare const parsedWorkflowSchema: z.ZodObject<{
|
|
|
159
171
|
agentProfile: z.ZodOptional<z.ZodString>;
|
|
160
172
|
allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
161
173
|
bashAllowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
174
|
+
kind: z.ZodOptional<z.ZodLiteral<"plugin">>;
|
|
175
|
+
pluginKind: z.ZodOptional<z.ZodString>;
|
|
176
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
162
177
|
command: z.ZodOptional<z.ZodString>;
|
|
163
178
|
onFail: z.ZodOptional<z.ZodObject<{
|
|
164
179
|
retry: z.ZodString;
|
|
@@ -197,6 +212,9 @@ export declare const planResponseSchema: z.ZodObject<{
|
|
|
197
212
|
agentProfile: z.ZodOptional<z.ZodString>;
|
|
198
213
|
allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
199
214
|
bashAllowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
215
|
+
kind: z.ZodOptional<z.ZodLiteral<"plugin">>;
|
|
216
|
+
pluginKind: z.ZodOptional<z.ZodString>;
|
|
217
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
200
218
|
command: z.ZodOptional<z.ZodString>;
|
|
201
219
|
onFail: z.ZodOptional<z.ZodObject<{
|
|
202
220
|
retry: z.ZodString;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { CliDeps } from '../cli-dispatch.ts';
|
|
2
|
+
import type { Home } from '../home/home.ts';
|
|
3
|
+
export interface RootCommandContext {
|
|
4
|
+
deps: CliDeps;
|
|
5
|
+
home: () => Home;
|
|
6
|
+
repoRoot: string;
|
|
7
|
+
task: string;
|
|
8
|
+
positionals: string[];
|
|
9
|
+
values: {
|
|
10
|
+
port?: string;
|
|
11
|
+
repo?: string;
|
|
12
|
+
workflow?: string;
|
|
13
|
+
model?: string;
|
|
14
|
+
'no-open'?: boolean;
|
|
15
|
+
'no-workers'?: boolean;
|
|
16
|
+
'no-messaging'?: boolean;
|
|
17
|
+
platform?: string;
|
|
18
|
+
domain?: string;
|
|
19
|
+
'bind-host'?: string;
|
|
20
|
+
'external-proxy'?: boolean;
|
|
21
|
+
yes?: boolean;
|
|
22
|
+
reconfigure?: string;
|
|
23
|
+
reinstall?: boolean;
|
|
24
|
+
};
|
|
25
|
+
portExplicit: boolean;
|
|
26
|
+
}
|
|
27
|
+
export type SubcommandRunner = (argv: string[], env: NodeJS.ProcessEnv) => Promise<number>;
|
|
28
|
+
interface CommandMetadata {
|
|
29
|
+
name: string;
|
|
30
|
+
usage: readonly string[];
|
|
31
|
+
homeMode: 'none' | 'conditional' | 'unconditional';
|
|
32
|
+
homeEntry?: (argv: readonly string[]) => string;
|
|
33
|
+
runtimeMode: 'none' | 'always' | ((argv: readonly string[]) => boolean);
|
|
34
|
+
}
|
|
35
|
+
export type CliCommandDefinition = CommandMetadata & ({
|
|
36
|
+
parseMode: 'subcommand';
|
|
37
|
+
load: (home: (env: NodeJS.ProcessEnv) => Home) => Promise<SubcommandRunner>;
|
|
38
|
+
} | {
|
|
39
|
+
parseMode: 'root';
|
|
40
|
+
load: () => Promise<(context: RootCommandContext) => Promise<void>>;
|
|
41
|
+
});
|
|
42
|
+
export declare const registerCliCommand: (command: CliCommandDefinition) => void;
|
|
43
|
+
export declare const sealCliCommands: () => void;
|
|
44
|
+
export declare const cliCommandsSealed: () => boolean;
|
|
45
|
+
export declare const cliCommand: (key: string) => CliCommandDefinition | undefined;
|
|
46
|
+
export declare const registeredCliCommands: () => CliCommandDefinition[];
|
|
47
|
+
export declare const hasCliCommand: (key: string) => boolean;
|
|
48
|
+
/** Cold home helpers do not boot or inspect an unsealed registry. */
|
|
49
|
+
export declare const knownCliCommand: (name: string) => CliCommandDefinition | undefined;
|
|
50
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createKeyedRegistry } from './registry.js';
|
|
2
|
+
const commands = createKeyedRegistry({
|
|
3
|
+
name: 'CLI commands', bootHint: 'Register CLI commands, then call sealCliCommands() before dispatch.',
|
|
4
|
+
});
|
|
5
|
+
export const registerCliCommand = (command) => commands.register(command.name, command);
|
|
6
|
+
export const sealCliCommands = commands.seal;
|
|
7
|
+
export const cliCommandsSealed = commands.isSealed;
|
|
8
|
+
export const cliCommand = commands.get;
|
|
9
|
+
export const registeredCliCommands = commands.values;
|
|
10
|
+
export const hasCliCommand = commands.has;
|
|
11
|
+
/** Cold home helpers do not boot or inspect an unsealed registry. */
|
|
12
|
+
export const knownCliCommand = (name) => commands.isSealed() ? commands.get(name) : undefined;
|
|
13
|
+
//# sourceMappingURL=cli-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-registry.js","sourceRoot":"","sources":["../../src/core/cli-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AA8BpD,MAAM,QAAQ,GAAG,mBAAmB,CAA+B;IACjE,IAAI,EAAE,cAAc,EAAE,QAAQ,EAAE,qEAAqE;CACtG,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,OAA6B,EAAQ,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AACpH,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,CAAC,IAAI,CAAC;AAC7C,MAAM,CAAC,MAAM,iBAAiB,GAAG,QAAQ,CAAC,QAAQ,CAAC;AACnD,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,GAAG,CAAC;AACvC,MAAM,CAAC,MAAM,qBAAqB,GAAG,QAAQ,CAAC,MAAM,CAAC;AACrD,MAAM,CAAC,MAAM,aAAa,GAAG,QAAQ,CAAC,GAAG,CAAC;AAC1C,qEAAqE;AACrE,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,IAAY,EAAoC,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC"}
|
|
@@ -91,17 +91,16 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
91
91
|
"/discover": {
|
|
92
92
|
$post: {
|
|
93
93
|
output: {
|
|
94
|
-
|
|
94
|
+
runner: string;
|
|
95
|
+
models: {
|
|
95
96
|
id: string;
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
attention: "error" | "none" | "permission" | "running" | "unseen" | "waiting";
|
|
100
|
-
attentionLabel: string;
|
|
101
|
-
accepts: boolean;
|
|
102
|
-
reason?: string | undefined;
|
|
97
|
+
label: string;
|
|
98
|
+
description: string;
|
|
99
|
+
effortLevels?: ("high" | "low" | "max" | "medium" | "xhigh")[] | undefined;
|
|
103
100
|
}[];
|
|
104
|
-
|
|
101
|
+
source: "cache" | "live" | "unavailable";
|
|
102
|
+
stale: boolean;
|
|
103
|
+
reason?: string | undefined;
|
|
105
104
|
} | {
|
|
106
105
|
scope: "host-default-account";
|
|
107
106
|
runners: {
|
|
@@ -113,16 +112,17 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
113
112
|
runner: string;
|
|
114
113
|
}[];
|
|
115
114
|
} | {
|
|
116
|
-
|
|
117
|
-
models: {
|
|
115
|
+
tasks: {
|
|
118
116
|
id: string;
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
117
|
+
title: string;
|
|
118
|
+
runner?: string | undefined;
|
|
119
|
+
status: "cancelled" | "done" | "failed" | "queued" | "review" | "running" | "waiting";
|
|
120
|
+
attention: "error" | "none" | "permission" | "running" | "unseen" | "waiting";
|
|
121
|
+
attentionLabel: string;
|
|
122
|
+
accepts: boolean;
|
|
123
|
+
reason?: string | undefined;
|
|
122
124
|
}[];
|
|
123
|
-
|
|
124
|
-
stale: boolean;
|
|
125
|
-
reason?: string | undefined;
|
|
125
|
+
nextOffset?: number | undefined;
|
|
126
126
|
};
|
|
127
127
|
outputFormat: "json";
|
|
128
128
|
status: 200;
|
|
@@ -68,7 +68,7 @@ async function resolveSpawnSteps(manager, parentId, request, workflow, validateM
|
|
|
68
68
|
const cache = new Map();
|
|
69
69
|
const resolved = [];
|
|
70
70
|
for (const step of workflow.steps) {
|
|
71
|
-
if (stepKind(step)
|
|
71
|
+
if (stepKind(step) !== 'agent')
|
|
72
72
|
continue;
|
|
73
73
|
const selection = {
|
|
74
74
|
...(step.runner ?? request.backend) === undefined ? {} : { backend: registeredRunnerId((step.runner ?? request.backend)) },
|
|
@@ -149,7 +149,7 @@ async function acceptSpawnedWorker(args) {
|
|
|
149
149
|
runner: settings.runner, model: settings.model, effort: settings.effort, agentProfile: identity.account.profileId,
|
|
150
150
|
systemPrompt: settings.systemPrompt, workflowDef,
|
|
151
151
|
autonomous: parent.autonomous,
|
|
152
|
-
steps: workflowDef.steps.map(step => ({ id: step.id, name: step.name ?? step.id, kind: stepKind(step) })),
|
|
152
|
+
steps: workflowDef.steps.map(step => ({ id: step.id, name: step.name ?? step.id, kind: stepKind(step), ...(step.kind === 'plugin' ? { pluginKind: step.pluginKind } : {}) })),
|
|
153
153
|
}, family.id, request.requestId, { role: 'worker', permissions: [...DEFAULT_GRANTS.worker.operate], ...(spawnGrant ? { spawnGrant } : {}),
|
|
154
154
|
parentRunId: family.id, ...(parent.id === family.id ? {} : { supervisorRunId: parent.id }), workspace, ...(context ? { context } : {}) }, requestHash, spawnCapacityRefusal, {
|
|
155
155
|
...identity, ...(context ? { contextHash: workerContextHash(context) } : {}),
|