@hearsay-tools/squawk 0.18.0-pr3904.7353 → 0.18.0-pr3910.7358
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/ci-wait/controller.d.ts +4 -4
- package/dist/ci-wait/tools.d.ts +4 -4
- package/dist/contract/delegation.d.ts +200 -18
- package/dist/contract/index.js +70 -5
- package/dist/contract/runs.d.ts +27 -6
- package/dist/delegation/cli.js +14 -7
- package/dist/delegation/cli.js.map +1 -1
- package/dist/delegation/context.d.ts +40 -5
- package/dist/delegation/context.js +93 -75
- package/dist/delegation/context.js.map +1 -1
- package/dist/delegation/conversations.d.ts +158 -144
- package/dist/delegation/family-end.js +2 -2
- package/dist/delegation/family-end.js.map +1 -1
- package/dist/delegation/owned-workspace-release.d.ts +2 -2
- package/dist/delegation/owned-workspace-release.js.map +1 -1
- package/dist/delegation/provision.js +3 -1
- package/dist/delegation/provision.js.map +1 -1
- package/dist/delegation/results.js +14 -7
- package/dist/delegation/results.js.map +1 -1
- package/dist/delegation/routes.d.ts +42 -6
- package/dist/delegation/service.d.ts +1 -1
- package/dist/delegation/service.js +16 -12
- package/dist/delegation/service.js.map +1 -1
- package/dist/delegation/shared-workspace.d.ts +25 -0
- package/dist/delegation/shared-workspace.js +100 -0
- package/dist/delegation/shared-workspace.js.map +1 -0
- package/dist/delegation/transport.d.ts +55 -19
- package/dist/delegation/worker-cleanup.js +8 -7
- package/dist/delegation/worker-cleanup.js.map +1 -1
- package/dist/delegation/workspace-git.d.ts +3 -3
- package/dist/delegation/workspace-git.js.map +1 -1
- package/dist/delegation/workspace-kinds.d.ts +72 -0
- package/dist/delegation/workspace-kinds.js +119 -0
- package/dist/delegation/workspace-kinds.js.map +1 -0
- package/dist/delegation/workspace-record.d.ts +4 -4
- package/dist/delegation/workspace-record.js +4 -4
- package/dist/delegation/workspace-record.js.map +1 -1
- package/dist/delegation/workspace-removal.d.ts +3 -3
- package/dist/delegation/workspace-removal.js.map +1 -1
- package/dist/delegation/workspace-state.d.ts +65 -0
- package/dist/delegation/workspace-state.js +252 -0
- package/dist/delegation/workspace-state.js.map +1 -0
- package/dist/delegation/workspace.d.ts +5 -5
- package/dist/delegation/workspace.js +4 -4
- package/dist/delegation/workspace.js.map +1 -1
- package/dist/delegation/worktree-teardown.d.ts +2 -2
- package/dist/delegation/worktree-teardown.js.map +1 -1
- package/dist/git-worktree.js +2 -2
- package/dist/git-worktree.js.map +1 -1
- package/dist/runs/delegation-state.d.ts +9 -2
- package/dist/runs/owned-run-create.js +12 -4
- package/dist/runs/owned-run-create.js.map +1 -1
- package/dist/runs/retention.d.ts +2 -1
- package/dist/runs/retention.js +5 -3
- package/dist/runs/retention.js.map +1 -1
- package/dist/runs/run-exits.d.ts +42 -0
- package/dist/runs/run-row.js +2 -1
- package/dist/runs/run-row.js.map +1 -1
- package/dist/runs/shared-hosts.d.ts +13 -0
- package/dist/runs/shared-hosts.js +24 -0
- package/dist/runs/shared-hosts.js.map +1 -0
- package/dist/runs/store.d.ts +88 -74
- package/dist/server/live-routes.d.ts +6 -6
- package/dist/server/run-checkout.d.ts +1 -1
- package/dist/server/run-checkout.js +40 -12
- package/dist/server/run-checkout.js.map +1 -1
- package/dist/server/server.d.ts +258 -118
- package/dist/workflows/continuation-admission.d.ts +79 -72
- package/dist/workflows/input-acknowledgement.d.ts +24 -24
- package/dist/workflows/run/compose.d.ts +2 -0
- package/dist/workflows/run/compose.js +6 -6
- package/dist/workflows/run/compose.js.map +1 -1
- package/dist/workflows/run/continuation-acceptance.js +1 -1
- package/dist/workflows/run/continuation-acceptance.js.map +1 -1
- package/dist/workflows/run/continuation-session.d.ts +2 -0
- package/dist/workflows/run/continuation-session.js +3 -3
- package/dist/workflows/run/continuation-session.js.map +1 -1
- package/dist/workflows/run/maintenance-claims.d.ts +8 -0
- package/dist/workflows/run/maintenance-claims.js +26 -2
- package/dist/workflows/run/maintenance-claims.js.map +1 -1
- package/dist/workflows/run/run-workspace.d.ts +9 -7
- package/dist/workflows/run/run-workspace.js +22 -21
- package/dist/workflows/run/run-workspace.js.map +1 -1
- package/dist/workflows/run/step-loop.d.ts +6 -0
- package/dist/workflows/run/step-loop.js +25 -16
- package/dist/workflows/run/step-loop.js.map +1 -1
- package/dist/workflows/run/wait-engine.d.ts +7 -0
- package/dist/workflows/run/worker-executions.d.ts +4 -0
- package/dist/workflows/run/worker-executions.js +17 -0
- package/dist/workflows/run/worker-executions.js.map +1 -1
- package/dist/workflows/run/worker-orphans.d.ts +5 -0
- package/dist/workflows/run/worker-orphans.js +10 -0
- package/dist/workflows/run/worker-orphans.js.map +1 -1
- package/dist/workflows/run/worker-workspace-port.d.ts +35 -0
- package/dist/workflows/run/worker-workspace-port.js +7 -0
- package/dist/workflows/run/worker-workspace-port.js.map +1 -0
- package/dist/workflows/run/worktree-autosave.d.ts +2 -0
- package/dist/workflows/run/worktree-autosave.js +12 -2
- package/dist/workflows/run/worktree-autosave.js.map +1 -1
- package/dist/workflows/run.d.ts +3 -0
- package/dist/workflows/run.js +7 -2
- package/dist/workflows/run.js.map +1 -1
- package/package.json +4 -4
- package/web/dist/assets/activity-motion-B5x1v2Fu.js +2 -0
- package/web/dist/assets/{activity-route-CIrBgiGz.js → activity-route-CAUrcPHu.js} +1 -1
- package/web/dist/assets/{agent-accounts-Bxqcccek.js → agent-accounts-QrC5jz43.js} +1 -1
- package/web/dist/assets/attention-CsAcQa0H.js +1 -0
- package/web/dist/assets/{cez-idle-Catc8I8F.js → cez-idle-BvZ_gmxd.js} +1 -1
- package/web/dist/assets/{commit-diff-panel-OWVorWVw.js → commit-diff-panel-Crssaj5L.js} +1 -1
- package/web/dist/assets/{diff-BvBs4Gxp.js → diff-CEPhFiLV.js} +2 -2
- package/web/dist/assets/{diff-view-CSrp8jyv.js → diff-view-RCD2iOmH.js} +1 -1
- package/web/dist/assets/{file-preview-B6mM_dbK.js → file-preview-T85oMxsd.js} +1 -1
- package/web/dist/assets/{git-toolbar-CvG0gvVf.js → git-toolbar-ejICsCJb.js} +1 -1
- package/web/dist/assets/{github-Dra1J1Oi.js → github-BBHt0vrY.js} +1 -1
- package/web/dist/assets/{global-activity-route-8H2KkpXH.js → global-activity-route-DXW6YzJP.js} +1 -1
- package/web/dist/assets/{index-aCWAgBiE.js → index-D0jlfeQc.js} +8 -8
- package/web/dist/assets/live-protocol-BfJEBmoK.js +64 -0
- package/web/dist/assets/{markdown-D4ZGAuSC.js → markdown-CsTsw0vz.js} +1 -1
- package/web/dist/assets/picker-pill-C-9MatV_.js +15 -0
- package/web/dist/assets/{preview-pane-connected-Bhb5eJ5Z.js → preview-pane-connected-C8T8r8ms.js} +1 -1
- package/web/dist/assets/{project-router-0DHZ1s8l.js → project-router-BGIouZPF.js} +1 -1
- package/web/dist/assets/project-scope-context-DoVn_JsC.js +4 -0
- package/web/dist/assets/{prompt-template-menu-_WK10gNW.js → prompt-template-menu-Bxyeax09.js} +1 -1
- package/web/dist/assets/{queries-DFchmPfl.js → queries-Dd4lOB8Z.js} +1 -1
- package/web/dist/assets/{reference-chip-BJe4UIpL.js → reference-chip-70Rgnh7I.js} +1 -1
- package/web/dist/assets/{repo-git-DAhDX80l.js → repo-git-8Z5tRSUn.js} +1 -1
- package/web/dist/assets/{report-reader-DsYm5b9J.js → report-reader-BAVoy0Yl.js} +1 -1
- package/web/dist/assets/reports-BtneNHIz.js +1 -0
- package/web/dist/assets/run-header-Bj9yUATx.js +2 -0
- package/web/dist/assets/{skills-BHAGfLNq.js → skills-DXJYBDXR.js} +1 -1
- package/web/dist/assets/{tab-link-lVQ2eOeD.js → tab-link-C72bTLvz.js} +1 -1
- package/web/dist/assets/{task-changes-Jg7Xzrfa.js → task-changes-DfC7cyQy.js} +1 -1
- package/web/dist/assets/{task-commits-DecgF6zx.js → task-commits-BvvC8FJl.js} +1 -1
- package/web/dist/assets/{task-files-D7N-vFyz.js → task-files-BUvykkqX.js} +1 -1
- package/web/dist/assets/{task-github-item-C8fBdico.js → task-github-item-CAFyUSdB.js} +1 -1
- package/web/dist/assets/{task-thread-DifTEOeK.js → task-thread-BjfZoBwy.js} +3 -3
- package/web/dist/assets/{thread-state-i29D-4yN.js → thread-state-_ZNTkbgY.js} +1 -1
- package/web/dist/assets/{use-desktop-CdWXLHne.js → use-desktop-Do_nEc-y.js} +1 -1
- package/web/dist/assets/{use-hand-to-agent-state-CPxNdj4_.js → use-hand-to-agent-state-Dnvb96sj.js} +1 -1
- package/web/dist/assets/{useInfiniteQuery-Bn5hIzUm.js → useInfiniteQuery-DseIJXqT.js} +1 -1
- package/web/dist/assets/useQuery-zlfTwROI.js +1 -0
- package/web/dist/assets/{workflows-CflCv_rB.js → workflows-CASKWpGo.js} +1 -1
- package/web/dist/assets/{ws-DfKMAUWf.js → ws-ChC1I19z.js} +1 -1
- package/web/dist/index.html +15 -15
- package/web/dist/live-worker.js +1 -1
- package/web/dist/assets/activity-motion-Ctg50eXm.js +0 -2
- package/web/dist/assets/attention-D15PtJnc.js +0 -1
- package/web/dist/assets/live-protocol-B8HJ-VW8.js +0 -64
- package/web/dist/assets/picker-pill-B6QPSEUZ.js +0 -15
- package/web/dist/assets/project-scope-context-qMCI2vmR.js +0 -4
- package/web/dist/assets/reports-BosE8lj8.js +0 -1
- package/web/dist/assets/run-header-DBbM_xNy.js +0 -2
- package/web/dist/assets/useQuery-DjkTL27e.js +0 -1
|
@@ -1000,10 +1000,6 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
1000
1000
|
};
|
|
1001
1001
|
} | {
|
|
1002
1002
|
output: {
|
|
1003
|
-
ok: false;
|
|
1004
|
-
code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
|
|
1005
|
-
message: string;
|
|
1006
|
-
} | {
|
|
1007
1003
|
ok: true;
|
|
1008
1004
|
task: {
|
|
1009
1005
|
id: string;
|
|
@@ -1015,6 +1011,10 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
1015
1011
|
url?: string | undefined;
|
|
1016
1012
|
};
|
|
1017
1013
|
note: string;
|
|
1014
|
+
} | {
|
|
1015
|
+
ok: false;
|
|
1016
|
+
code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
|
|
1017
|
+
message: string;
|
|
1018
1018
|
};
|
|
1019
1019
|
outputFormat: "json";
|
|
1020
1020
|
status: import("hono/utils/http-status").ContentfulStatusCode;
|
package/dist/ci-wait/tools.d.ts
CHANGED
|
@@ -263,6 +263,10 @@ export declare function invokeScheduleTaskTool(input: unknown): Promise<{
|
|
|
263
263
|
}[];
|
|
264
264
|
isError: boolean;
|
|
265
265
|
details: {
|
|
266
|
+
ok: false;
|
|
267
|
+
code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
|
|
268
|
+
message: string;
|
|
269
|
+
} | {
|
|
266
270
|
ok: true;
|
|
267
271
|
task: {
|
|
268
272
|
id: string;
|
|
@@ -274,10 +278,6 @@ export declare function invokeScheduleTaskTool(input: unknown): Promise<{
|
|
|
274
278
|
url?: string | undefined;
|
|
275
279
|
};
|
|
276
280
|
note: string;
|
|
277
|
-
} | {
|
|
278
|
-
ok: false;
|
|
279
|
-
code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
|
|
280
|
-
message: string;
|
|
281
281
|
};
|
|
282
282
|
}>;
|
|
283
283
|
export declare function invokeScheduledTasksTool(input: unknown): Promise<{
|
|
@@ -12,7 +12,8 @@ export declare const workerOperationSchema: z.ZodEnum<{
|
|
|
12
12
|
export type WorkerOperation = z.infer<typeof workerOperationSchema>;
|
|
13
13
|
/** 1–32 unique ids; the worker wait entry and `cezar_wait` reuse it for worker and request ids. */
|
|
14
14
|
export declare const workerIdsSchema: z.ZodArray<z.ZodUUID>;
|
|
15
|
-
|
|
15
|
+
/** A worker's own worktree and branch, forked from the baseline commit. */
|
|
16
|
+
export declare const ownedWorkspaceSchema: z.ZodObject<{
|
|
16
17
|
ownerRunId: z.ZodUUID;
|
|
17
18
|
resourceId: z.ZodUUID;
|
|
18
19
|
kind: z.ZodLiteral<"owned-isolated">;
|
|
@@ -20,7 +21,38 @@ export declare const workerWorkspaceSchema: z.ZodObject<{
|
|
|
20
21
|
branch: z.ZodString;
|
|
21
22
|
baselineSha: z.ZodString;
|
|
22
23
|
}, z.core.$strict>;
|
|
24
|
+
export type OwnedWorkerWorkspace = z.infer<typeof ownedWorkspaceSchema>;
|
|
25
|
+
/** Another run's directory, which the worker works in. It has no worktree and no branch of its own. */
|
|
26
|
+
export declare const sharedWorkspaceSchema: z.ZodObject<{
|
|
27
|
+
ownerRunId: z.ZodUUID;
|
|
28
|
+
resourceId: z.ZodUUID;
|
|
29
|
+
kind: z.ZodLiteral<"shared">;
|
|
30
|
+
path: z.ZodString;
|
|
31
|
+
hostRunId: z.ZodUUID;
|
|
32
|
+
baselineSha: z.ZodString;
|
|
33
|
+
}, z.core.$strict>;
|
|
34
|
+
export type SharedWorkerWorkspace = z.infer<typeof sharedWorkspaceSchema>;
|
|
35
|
+
export declare const workerWorkspaceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
36
|
+
ownerRunId: z.ZodUUID;
|
|
37
|
+
resourceId: z.ZodUUID;
|
|
38
|
+
kind: z.ZodLiteral<"owned-isolated">;
|
|
39
|
+
path: z.ZodString;
|
|
40
|
+
branch: z.ZodString;
|
|
41
|
+
baselineSha: z.ZodString;
|
|
42
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
43
|
+
ownerRunId: z.ZodUUID;
|
|
44
|
+
resourceId: z.ZodUUID;
|
|
45
|
+
kind: z.ZodLiteral<"shared">;
|
|
46
|
+
path: z.ZodString;
|
|
47
|
+
hostRunId: z.ZodUUID;
|
|
48
|
+
baselineSha: z.ZodString;
|
|
49
|
+
}, z.core.$strict>], "kind">;
|
|
23
50
|
export type WorkerWorkspace = z.infer<typeof workerWorkspaceSchema>;
|
|
51
|
+
export declare function ownsDirectory(workspace: WorkerWorkspace): workspace is OwnedWorkerWorkspace;
|
|
52
|
+
/** The workspace of a worker that owns its directory. Throws for one that does not. */
|
|
53
|
+
export declare function ownedWorkspace(workspace: WorkerWorkspace): OwnedWorkerWorkspace;
|
|
54
|
+
/** The text every refused directory action of such a worker starts with. */
|
|
55
|
+
export declare const SHARED_WORKSPACE_REFUSAL = "this worker runs in its parent's worktree";
|
|
24
56
|
export declare const workerOutcomeSchema: z.ZodObject<{
|
|
25
57
|
workerId: z.ZodUUID;
|
|
26
58
|
status: z.ZodEnum<{
|
|
@@ -276,6 +308,28 @@ export declare const workerInputRecipeSchema: z.ZodObject<{
|
|
|
276
308
|
}, z.core.$strict>>;
|
|
277
309
|
}, z.core.$strict>;
|
|
278
310
|
export type WorkerInputRecipe = z.infer<typeof workerInputRecipeSchema>;
|
|
311
|
+
/** How many changed paths a change report names. */
|
|
312
|
+
export declare const WORKER_CHANGED_PATHS_CAP = 100;
|
|
313
|
+
/**
|
|
314
|
+
* Whether the host directory of a shared worker changed between the worker's first session start
|
|
315
|
+
* and its last settlement; a worker that still runs is compared with the directory as it is.
|
|
316
|
+
* The report covers HEAD, the checked-out branch, the index, tracked changes and untracked files;
|
|
317
|
+
* ignored files are out. It does not say who made a change.
|
|
318
|
+
*/
|
|
319
|
+
export declare const workerChangeReportSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
320
|
+
state: z.ZodLiteral<"unchanged">;
|
|
321
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
322
|
+
state: z.ZodLiteral<"changed">;
|
|
323
|
+
paths: z.ZodArray<z.ZodString>;
|
|
324
|
+
truncated: z.ZodBoolean;
|
|
325
|
+
headMoved: z.ZodBoolean;
|
|
326
|
+
branchMoved: z.ZodBoolean;
|
|
327
|
+
indexMoved: z.ZodBoolean;
|
|
328
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
329
|
+
state: z.ZodLiteral<"unavailable">;
|
|
330
|
+
reason: z.ZodString;
|
|
331
|
+
}, z.core.$strict>], "state">;
|
|
332
|
+
export type WorkerChangeReport = z.infer<typeof workerChangeReportSchema>;
|
|
279
333
|
export declare const workerCollectedResultSchema: z.ZodObject<{
|
|
280
334
|
workerId: z.ZodUUID;
|
|
281
335
|
parentRunId: z.ZodUUID;
|
|
@@ -317,7 +371,7 @@ export declare const workerCollectedResultSchema: z.ZodObject<{
|
|
|
317
371
|
}>>;
|
|
318
372
|
model: z.ZodOptional<z.ZodString>;
|
|
319
373
|
baselineSha: z.ZodString;
|
|
320
|
-
workspace: z.ZodObject<{
|
|
374
|
+
workspace: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
321
375
|
ownerRunId: z.ZodUUID;
|
|
322
376
|
resourceId: z.ZodUUID;
|
|
323
377
|
kind: z.ZodLiteral<"owned-isolated">;
|
|
@@ -329,7 +383,19 @@ export declare const workerCollectedResultSchema: z.ZodObject<{
|
|
|
329
383
|
deleted: "deleted";
|
|
330
384
|
unavailable: "unavailable";
|
|
331
385
|
}>>;
|
|
332
|
-
}, z.core.$strict
|
|
386
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
387
|
+
ownerRunId: z.ZodUUID;
|
|
388
|
+
resourceId: z.ZodUUID;
|
|
389
|
+
kind: z.ZodLiteral<"shared">;
|
|
390
|
+
path: z.ZodString;
|
|
391
|
+
hostRunId: z.ZodUUID;
|
|
392
|
+
baselineSha: z.ZodString;
|
|
393
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
394
|
+
available: "available";
|
|
395
|
+
deleted: "deleted";
|
|
396
|
+
unavailable: "unavailable";
|
|
397
|
+
}>>;
|
|
398
|
+
}, z.core.$strict>], "kind">;
|
|
333
399
|
cleanup: z.ZodEnum<{
|
|
334
400
|
cleaning: "cleaning";
|
|
335
401
|
complete: "complete";
|
|
@@ -353,6 +419,7 @@ export declare const workerCollectedResultSchema: z.ZodObject<{
|
|
|
353
419
|
missing: "missing";
|
|
354
420
|
"no-assistant-output": "no-assistant-output";
|
|
355
421
|
unreadable: "unreadable";
|
|
422
|
+
unsupported: "unsupported";
|
|
356
423
|
unverified: "unverified";
|
|
357
424
|
}>;
|
|
358
425
|
detail: z.ZodOptional<z.ZodString>;
|
|
@@ -369,6 +436,7 @@ export declare const workerCollectedResultSchema: z.ZodObject<{
|
|
|
369
436
|
missing: "missing";
|
|
370
437
|
"no-assistant-output": "no-assistant-output";
|
|
371
438
|
unreadable: "unreadable";
|
|
439
|
+
unsupported: "unsupported";
|
|
372
440
|
unverified: "unverified";
|
|
373
441
|
}>;
|
|
374
442
|
detail: z.ZodOptional<z.ZodString>;
|
|
@@ -389,6 +457,7 @@ export declare const workerCollectedResultSchema: z.ZodObject<{
|
|
|
389
457
|
missing: "missing";
|
|
390
458
|
"no-assistant-output": "no-assistant-output";
|
|
391
459
|
unreadable: "unreadable";
|
|
460
|
+
unsupported: "unsupported";
|
|
392
461
|
unverified: "unverified";
|
|
393
462
|
}>;
|
|
394
463
|
detail: z.ZodOptional<z.ZodString>;
|
|
@@ -396,6 +465,19 @@ export declare const workerCollectedResultSchema: z.ZodObject<{
|
|
|
396
465
|
state: z.ZodLiteral<"deleted">;
|
|
397
466
|
reason: z.ZodLiteral<"missing">;
|
|
398
467
|
}, z.core.$strict>], "state">;
|
|
468
|
+
changes: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
469
|
+
state: z.ZodLiteral<"unchanged">;
|
|
470
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
471
|
+
state: z.ZodLiteral<"changed">;
|
|
472
|
+
paths: z.ZodArray<z.ZodString>;
|
|
473
|
+
truncated: z.ZodBoolean;
|
|
474
|
+
headMoved: z.ZodBoolean;
|
|
475
|
+
branchMoved: z.ZodBoolean;
|
|
476
|
+
indexMoved: z.ZodBoolean;
|
|
477
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
478
|
+
state: z.ZodLiteral<"unavailable">;
|
|
479
|
+
reason: z.ZodString;
|
|
480
|
+
}, z.core.$strict>], "state">>;
|
|
399
481
|
artifacts: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
400
482
|
state: z.ZodLiteral<"available">;
|
|
401
483
|
items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -408,6 +490,7 @@ export declare const workerCollectedResultSchema: z.ZodObject<{
|
|
|
408
490
|
missing: "missing";
|
|
409
491
|
"no-assistant-output": "no-assistant-output";
|
|
410
492
|
unreadable: "unreadable";
|
|
493
|
+
unsupported: "unsupported";
|
|
411
494
|
unverified: "unverified";
|
|
412
495
|
}>;
|
|
413
496
|
detail: z.ZodOptional<z.ZodString>;
|
|
@@ -426,6 +509,7 @@ export declare const workerCollectedResultSchema: z.ZodObject<{
|
|
|
426
509
|
missing: "missing";
|
|
427
510
|
"no-assistant-output": "no-assistant-output";
|
|
428
511
|
unreadable: "unreadable";
|
|
512
|
+
unsupported: "unsupported";
|
|
429
513
|
unverified: "unverified";
|
|
430
514
|
}>;
|
|
431
515
|
detail: z.ZodOptional<z.ZodString>;
|
|
@@ -477,7 +561,7 @@ export declare const workerResultFileSchema: z.ZodObject<{
|
|
|
477
561
|
}>>;
|
|
478
562
|
model: z.ZodOptional<z.ZodString>;
|
|
479
563
|
baselineSha: z.ZodString;
|
|
480
|
-
workspace: z.ZodObject<{
|
|
564
|
+
workspace: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
481
565
|
ownerRunId: z.ZodUUID;
|
|
482
566
|
resourceId: z.ZodUUID;
|
|
483
567
|
kind: z.ZodLiteral<"owned-isolated">;
|
|
@@ -489,7 +573,19 @@ export declare const workerResultFileSchema: z.ZodObject<{
|
|
|
489
573
|
deleted: "deleted";
|
|
490
574
|
unavailable: "unavailable";
|
|
491
575
|
}>>;
|
|
492
|
-
}, z.core.$strict
|
|
576
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
577
|
+
ownerRunId: z.ZodUUID;
|
|
578
|
+
resourceId: z.ZodUUID;
|
|
579
|
+
kind: z.ZodLiteral<"shared">;
|
|
580
|
+
path: z.ZodString;
|
|
581
|
+
hostRunId: z.ZodUUID;
|
|
582
|
+
baselineSha: z.ZodString;
|
|
583
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
584
|
+
available: "available";
|
|
585
|
+
deleted: "deleted";
|
|
586
|
+
unavailable: "unavailable";
|
|
587
|
+
}>>;
|
|
588
|
+
}, z.core.$strict>], "kind">;
|
|
493
589
|
cleanup: z.ZodEnum<{
|
|
494
590
|
cleaning: "cleaning";
|
|
495
591
|
complete: "complete";
|
|
@@ -513,6 +609,7 @@ export declare const workerResultFileSchema: z.ZodObject<{
|
|
|
513
609
|
missing: "missing";
|
|
514
610
|
"no-assistant-output": "no-assistant-output";
|
|
515
611
|
unreadable: "unreadable";
|
|
612
|
+
unsupported: "unsupported";
|
|
516
613
|
unverified: "unverified";
|
|
517
614
|
}>;
|
|
518
615
|
detail: z.ZodOptional<z.ZodString>;
|
|
@@ -529,6 +626,7 @@ export declare const workerResultFileSchema: z.ZodObject<{
|
|
|
529
626
|
missing: "missing";
|
|
530
627
|
"no-assistant-output": "no-assistant-output";
|
|
531
628
|
unreadable: "unreadable";
|
|
629
|
+
unsupported: "unsupported";
|
|
532
630
|
unverified: "unverified";
|
|
533
631
|
}>;
|
|
534
632
|
detail: z.ZodOptional<z.ZodString>;
|
|
@@ -549,6 +647,7 @@ export declare const workerResultFileSchema: z.ZodObject<{
|
|
|
549
647
|
missing: "missing";
|
|
550
648
|
"no-assistant-output": "no-assistant-output";
|
|
551
649
|
unreadable: "unreadable";
|
|
650
|
+
unsupported: "unsupported";
|
|
552
651
|
unverified: "unverified";
|
|
553
652
|
}>;
|
|
554
653
|
detail: z.ZodOptional<z.ZodString>;
|
|
@@ -556,6 +655,19 @@ export declare const workerResultFileSchema: z.ZodObject<{
|
|
|
556
655
|
state: z.ZodLiteral<"deleted">;
|
|
557
656
|
reason: z.ZodLiteral<"missing">;
|
|
558
657
|
}, z.core.$strict>], "state">;
|
|
658
|
+
changes: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
659
|
+
state: z.ZodLiteral<"unchanged">;
|
|
660
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
661
|
+
state: z.ZodLiteral<"changed">;
|
|
662
|
+
paths: z.ZodArray<z.ZodString>;
|
|
663
|
+
truncated: z.ZodBoolean;
|
|
664
|
+
headMoved: z.ZodBoolean;
|
|
665
|
+
branchMoved: z.ZodBoolean;
|
|
666
|
+
indexMoved: z.ZodBoolean;
|
|
667
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
668
|
+
state: z.ZodLiteral<"unavailable">;
|
|
669
|
+
reason: z.ZodString;
|
|
670
|
+
}, z.core.$strict>], "state">>;
|
|
559
671
|
artifacts: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
560
672
|
state: z.ZodLiteral<"available">;
|
|
561
673
|
items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -568,6 +680,7 @@ export declare const workerResultFileSchema: z.ZodObject<{
|
|
|
568
680
|
missing: "missing";
|
|
569
681
|
"no-assistant-output": "no-assistant-output";
|
|
570
682
|
unreadable: "unreadable";
|
|
683
|
+
unsupported: "unsupported";
|
|
571
684
|
unverified: "unverified";
|
|
572
685
|
}>;
|
|
573
686
|
detail: z.ZodOptional<z.ZodString>;
|
|
@@ -586,6 +699,7 @@ export declare const workerResultFileSchema: z.ZodObject<{
|
|
|
586
699
|
missing: "missing";
|
|
587
700
|
"no-assistant-output": "no-assistant-output";
|
|
588
701
|
unreadable: "unreadable";
|
|
702
|
+
unsupported: "unsupported";
|
|
589
703
|
unverified: "unverified";
|
|
590
704
|
}>;
|
|
591
705
|
detail: z.ZodOptional<z.ZodString>;
|
|
@@ -974,14 +1088,21 @@ export declare const delegationStateSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
974
1088
|
wait: "wait";
|
|
975
1089
|
}>>;
|
|
976
1090
|
parentRunId: z.ZodUUID;
|
|
977
|
-
workspace: z.ZodObject<{
|
|
1091
|
+
workspace: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
978
1092
|
ownerRunId: z.ZodUUID;
|
|
979
1093
|
resourceId: z.ZodUUID;
|
|
980
1094
|
kind: z.ZodLiteral<"owned-isolated">;
|
|
981
1095
|
path: z.ZodString;
|
|
982
1096
|
branch: z.ZodString;
|
|
983
1097
|
baselineSha: z.ZodString;
|
|
984
|
-
}, z.core.$strict
|
|
1098
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1099
|
+
ownerRunId: z.ZodUUID;
|
|
1100
|
+
resourceId: z.ZodUUID;
|
|
1101
|
+
kind: z.ZodLiteral<"shared">;
|
|
1102
|
+
path: z.ZodString;
|
|
1103
|
+
hostRunId: z.ZodUUID;
|
|
1104
|
+
baselineSha: z.ZodString;
|
|
1105
|
+
}, z.core.$strict>], "kind">;
|
|
985
1106
|
destroy: z.ZodOptional<z.ZodObject<{
|
|
986
1107
|
requestedAt: z.ZodISODateTime;
|
|
987
1108
|
phase: z.ZodEnum<{
|
|
@@ -1052,9 +1173,35 @@ export declare const runDelegationSummarySchema: z.ZodDiscriminatedUnion<[z.ZodO
|
|
|
1052
1173
|
role: z.ZodLiteral<"invalid">;
|
|
1053
1174
|
}, z.core.$strip>], "role">;
|
|
1054
1175
|
export type RunDelegationSummary = z.infer<typeof runDelegationSummarySchema>;
|
|
1176
|
+
/** What `--workspace` takes, and the stored kind each choice plans. */
|
|
1177
|
+
export declare const WORKSPACE_CHOICES: {
|
|
1178
|
+
readonly isolated: 'owned-isolated';
|
|
1179
|
+
readonly shared: 'shared';
|
|
1180
|
+
};
|
|
1181
|
+
export declare const workerWorkspaceChoiceSchema: z.ZodEnum<{
|
|
1182
|
+
isolated: "isolated";
|
|
1183
|
+
shared: "shared";
|
|
1184
|
+
}>;
|
|
1185
|
+
export declare const SHARED_BASELINE_REFUSAL = "--baseline cannot be used with --workspace shared: a shared worker runs at its parent's HEAD";
|
|
1186
|
+
export declare const SHARED_ATTACH_REFUSAL = "--attach cannot be used with --workspace shared: the worker runs in your worktree, so the file is already there";
|
|
1187
|
+
/** Why a spawn into a shared workspace is refused, or undefined. The schema accepts the request, so
|
|
1188
|
+
* the service and the CLI answer with these words instead of a generic validation error. */
|
|
1189
|
+
export declare function sharedSpawnRefusal(request: {
|
|
1190
|
+
workspace?: string | undefined;
|
|
1191
|
+
baseline?: string | undefined;
|
|
1192
|
+
context?: {
|
|
1193
|
+
artifacts?: ReadonlyArray<{
|
|
1194
|
+
kind: string;
|
|
1195
|
+
}> | undefined;
|
|
1196
|
+
} | undefined;
|
|
1197
|
+
}): string | undefined;
|
|
1055
1198
|
export declare const workerSpawnRequestSchema: z.ZodObject<{
|
|
1056
1199
|
task: z.ZodString;
|
|
1057
|
-
baseline: z.ZodString
|
|
1200
|
+
baseline: z.ZodOptional<z.ZodString>;
|
|
1201
|
+
workspace: z.ZodOptional<z.ZodEnum<{
|
|
1202
|
+
isolated: "isolated";
|
|
1203
|
+
shared: "shared";
|
|
1204
|
+
}>>;
|
|
1058
1205
|
requestId: z.ZodUUID;
|
|
1059
1206
|
context: z.ZodOptional<z.ZodObject<{
|
|
1060
1207
|
text: z.ZodOptional<z.ZodString>;
|
|
@@ -1159,14 +1306,21 @@ export declare const workerInspectionSchema: z.ZodObject<{
|
|
|
1159
1306
|
waiting: "waiting";
|
|
1160
1307
|
}>;
|
|
1161
1308
|
currentStepId: z.ZodOptional<z.ZodString>;
|
|
1162
|
-
workspace: z.ZodObject<{
|
|
1309
|
+
workspace: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1163
1310
|
ownerRunId: z.ZodUUID;
|
|
1164
1311
|
resourceId: z.ZodUUID;
|
|
1165
1312
|
kind: z.ZodLiteral<"owned-isolated">;
|
|
1166
1313
|
path: z.ZodString;
|
|
1167
1314
|
branch: z.ZodString;
|
|
1168
1315
|
baselineSha: z.ZodString;
|
|
1169
|
-
}, z.core.$strict
|
|
1316
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1317
|
+
ownerRunId: z.ZodUUID;
|
|
1318
|
+
resourceId: z.ZodUUID;
|
|
1319
|
+
kind: z.ZodLiteral<"shared">;
|
|
1320
|
+
path: z.ZodString;
|
|
1321
|
+
hostRunId: z.ZodUUID;
|
|
1322
|
+
baselineSha: z.ZodString;
|
|
1323
|
+
}, z.core.$strict>], "kind">;
|
|
1170
1324
|
backend: z.ZodOptional<z.ZodEnum<{
|
|
1171
1325
|
claude: "claude";
|
|
1172
1326
|
codex: "codex";
|
|
@@ -1343,14 +1497,21 @@ export declare const workerListEntrySchema: z.ZodObject<{
|
|
|
1343
1497
|
running: "running";
|
|
1344
1498
|
waiting: "waiting";
|
|
1345
1499
|
}>;
|
|
1346
|
-
workspace: z.ZodObject<{
|
|
1500
|
+
workspace: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1347
1501
|
ownerRunId: z.ZodUUID;
|
|
1348
1502
|
resourceId: z.ZodUUID;
|
|
1349
1503
|
kind: z.ZodLiteral<"owned-isolated">;
|
|
1350
1504
|
path: z.ZodString;
|
|
1351
1505
|
branch: z.ZodString;
|
|
1352
1506
|
baselineSha: z.ZodString;
|
|
1353
|
-
}, z.core.$strict
|
|
1507
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1508
|
+
ownerRunId: z.ZodUUID;
|
|
1509
|
+
resourceId: z.ZodUUID;
|
|
1510
|
+
kind: z.ZodLiteral<"shared">;
|
|
1511
|
+
path: z.ZodString;
|
|
1512
|
+
hostRunId: z.ZodUUID;
|
|
1513
|
+
baselineSha: z.ZodString;
|
|
1514
|
+
}, z.core.$strict>], "kind">;
|
|
1354
1515
|
destroy: z.ZodOptional<z.ZodObject<{
|
|
1355
1516
|
requestedAt: z.ZodISODateTime;
|
|
1356
1517
|
phase: z.ZodEnum<{
|
|
@@ -1389,14 +1550,21 @@ export declare const workerListResultSchema: z.ZodObject<{
|
|
|
1389
1550
|
running: "running";
|
|
1390
1551
|
waiting: "waiting";
|
|
1391
1552
|
}>;
|
|
1392
|
-
workspace: z.ZodObject<{
|
|
1553
|
+
workspace: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1393
1554
|
ownerRunId: z.ZodUUID;
|
|
1394
1555
|
resourceId: z.ZodUUID;
|
|
1395
1556
|
kind: z.ZodLiteral<"owned-isolated">;
|
|
1396
1557
|
path: z.ZodString;
|
|
1397
1558
|
branch: z.ZodString;
|
|
1398
1559
|
baselineSha: z.ZodString;
|
|
1399
|
-
}, z.core.$strict
|
|
1560
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1561
|
+
ownerRunId: z.ZodUUID;
|
|
1562
|
+
resourceId: z.ZodUUID;
|
|
1563
|
+
kind: z.ZodLiteral<"shared">;
|
|
1564
|
+
path: z.ZodString;
|
|
1565
|
+
hostRunId: z.ZodUUID;
|
|
1566
|
+
baselineSha: z.ZodString;
|
|
1567
|
+
}, z.core.$strict>], "kind">;
|
|
1400
1568
|
destroy: z.ZodOptional<z.ZodObject<{
|
|
1401
1569
|
requestedAt: z.ZodISODateTime;
|
|
1402
1570
|
phase: z.ZodEnum<{
|
|
@@ -1442,14 +1610,21 @@ export declare const workerListPageSchema: z.ZodObject<{
|
|
|
1442
1610
|
running: "running";
|
|
1443
1611
|
waiting: "waiting";
|
|
1444
1612
|
}>;
|
|
1445
|
-
workspace: z.ZodObject<{
|
|
1613
|
+
workspace: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1446
1614
|
ownerRunId: z.ZodUUID;
|
|
1447
1615
|
resourceId: z.ZodUUID;
|
|
1448
1616
|
kind: z.ZodLiteral<"owned-isolated">;
|
|
1449
1617
|
path: z.ZodString;
|
|
1450
1618
|
branch: z.ZodString;
|
|
1451
1619
|
baselineSha: z.ZodString;
|
|
1452
|
-
}, z.core.$strict
|
|
1620
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1621
|
+
ownerRunId: z.ZodUUID;
|
|
1622
|
+
resourceId: z.ZodUUID;
|
|
1623
|
+
kind: z.ZodLiteral<"shared">;
|
|
1624
|
+
path: z.ZodString;
|
|
1625
|
+
hostRunId: z.ZodUUID;
|
|
1626
|
+
baselineSha: z.ZodString;
|
|
1627
|
+
}, z.core.$strict>], "kind">;
|
|
1453
1628
|
destroy: z.ZodOptional<z.ZodObject<{
|
|
1454
1629
|
requestedAt: z.ZodISODateTime;
|
|
1455
1630
|
phase: z.ZodEnum<{
|
|
@@ -1550,14 +1725,21 @@ export declare const runRelationshipsSchema: z.ZodObject<{
|
|
|
1550
1725
|
waiting: "waiting";
|
|
1551
1726
|
}>;
|
|
1552
1727
|
currentStepId: z.ZodOptional<z.ZodString>;
|
|
1553
|
-
workspace: z.ZodObject<{
|
|
1728
|
+
workspace: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1554
1729
|
ownerRunId: z.ZodUUID;
|
|
1555
1730
|
resourceId: z.ZodUUID;
|
|
1556
1731
|
kind: z.ZodLiteral<"owned-isolated">;
|
|
1557
1732
|
path: z.ZodString;
|
|
1558
1733
|
branch: z.ZodString;
|
|
1559
1734
|
baselineSha: z.ZodString;
|
|
1560
|
-
}, z.core.$strict
|
|
1735
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1736
|
+
ownerRunId: z.ZodUUID;
|
|
1737
|
+
resourceId: z.ZodUUID;
|
|
1738
|
+
kind: z.ZodLiteral<"shared">;
|
|
1739
|
+
path: z.ZodString;
|
|
1740
|
+
hostRunId: z.ZodUUID;
|
|
1741
|
+
baselineSha: z.ZodString;
|
|
1742
|
+
}, z.core.$strict>], "kind">;
|
|
1561
1743
|
backend: z.ZodOptional<z.ZodEnum<{
|
|
1562
1744
|
claude: "claude";
|
|
1563
1745
|
codex: "codex";
|
package/dist/contract/index.js
CHANGED
|
@@ -532,7 +532,7 @@ var workerIdsSchema = z8.array(z8.uuid()).min(1).max(32).refine((ids) => new Set
|
|
|
532
532
|
var permissionsSchema = z8.array(workerOperationSchema).max(7).refine((operations) => new Set(operations).size === operations.length);
|
|
533
533
|
var remainingSchema = z8.array(z8.enum(["process", "worktree", "branch"])).max(3).refine((resources) => new Set(resources).size === resources.length);
|
|
534
534
|
var errorSchema = z8.string().max(2e3);
|
|
535
|
-
var
|
|
535
|
+
var ownedWorkspaceSchema = z8.object({
|
|
536
536
|
ownerRunId: z8.uuid(),
|
|
537
537
|
resourceId: z8.uuid(),
|
|
538
538
|
kind: z8.literal("owned-isolated"),
|
|
@@ -541,6 +541,27 @@ var workerWorkspaceSchema = z8.object({
|
|
|
541
541
|
branch: z8.string().min(1),
|
|
542
542
|
baselineSha: commitShaSchema
|
|
543
543
|
}).strict();
|
|
544
|
+
var sharedWorkspaceSchema = z8.object({
|
|
545
|
+
ownerRunId: z8.uuid(),
|
|
546
|
+
resourceId: z8.uuid(),
|
|
547
|
+
kind: z8.literal("shared"),
|
|
548
|
+
/** The host run's directory when the worker was spawned. */
|
|
549
|
+
path: z8.string().min(1),
|
|
550
|
+
/** The run whose directory `path` is. */
|
|
551
|
+
hostRunId: z8.uuid(),
|
|
552
|
+
/** The host directory's HEAD when the worker was spawned. */
|
|
553
|
+
baselineSha: commitShaSchema
|
|
554
|
+
}).strict();
|
|
555
|
+
var workerWorkspaceSchema = z8.discriminatedUnion("kind", [ownedWorkspaceSchema, sharedWorkspaceSchema]);
|
|
556
|
+
var OWNS_DIRECTORY = { "owned-isolated": true, shared: false };
|
|
557
|
+
function ownsDirectory(workspace) {
|
|
558
|
+
return OWNS_DIRECTORY[workspace.kind];
|
|
559
|
+
}
|
|
560
|
+
function ownedWorkspace(workspace) {
|
|
561
|
+
if (!ownsDirectory(workspace)) throw new Error("The workspace owns no worktree");
|
|
562
|
+
return workspace;
|
|
563
|
+
}
|
|
564
|
+
var SHARED_WORKSPACE_REFUSAL = "this worker runs in its parent's worktree";
|
|
544
565
|
var workerOutcomeSchema = z8.object({
|
|
545
566
|
workerId: z8.uuid(),
|
|
546
567
|
status: z8.enum(["review", "done", "failed", "cancelled"]),
|
|
@@ -619,7 +640,7 @@ var workerInputRecipeSchema = z8.object({
|
|
|
619
640
|
text: z8.string().max(1e5).optional(),
|
|
620
641
|
inputs: z8.array(workerInputSchema).max(32)
|
|
621
642
|
}).strict();
|
|
622
|
-
var unavailableEvidenceSchema = z8.object({ state: z8.literal("unavailable"), reason: z8.enum(["no-assistant-output", "missing", "unreadable", "unverified"]), detail: errorSchema.optional() }).strict();
|
|
643
|
+
var unavailableEvidenceSchema = z8.object({ state: z8.literal("unavailable"), reason: z8.enum(["no-assistant-output", "missing", "unreadable", "unverified", "unsupported"]), detail: errorSchema.optional() }).strict();
|
|
623
644
|
var deletedEvidenceSchema = z8.object({ state: z8.literal("deleted"), reason: z8.literal("missing") }).strict();
|
|
624
645
|
var executionOutcomeSchema = z8.enum(["running", "review-ready", "completed", "failed", "cancelled"]);
|
|
625
646
|
var workerArtifactSchema = z8.discriminatedUnion("state", [
|
|
@@ -627,6 +648,21 @@ var workerArtifactSchema = z8.discriminatedUnion("state", [
|
|
|
627
648
|
unavailableEvidenceSchema.extend({ id: z8.string().max(255), path: z8.string().max(8192) }),
|
|
628
649
|
deletedEvidenceSchema.extend({ id: z8.string().max(255), path: z8.string().max(8192) })
|
|
629
650
|
]);
|
|
651
|
+
var workspaceStateSchema = z8.enum(["available", "unavailable", "deleted"]);
|
|
652
|
+
var WORKER_CHANGED_PATHS_CAP = 100;
|
|
653
|
+
var workerChangeReportSchema = z8.discriminatedUnion("state", [
|
|
654
|
+
z8.object({ state: z8.literal("unchanged") }).strict(),
|
|
655
|
+
z8.object({
|
|
656
|
+
state: z8.literal("changed"),
|
|
657
|
+
paths: z8.array(z8.string().max(8192)).max(WORKER_CHANGED_PATHS_CAP),
|
|
658
|
+
/** More paths changed than `paths` names. */
|
|
659
|
+
truncated: z8.boolean(),
|
|
660
|
+
headMoved: z8.boolean(),
|
|
661
|
+
branchMoved: z8.boolean(),
|
|
662
|
+
indexMoved: z8.boolean()
|
|
663
|
+
}).strict(),
|
|
664
|
+
z8.object({ state: z8.literal("unavailable"), reason: errorSchema }).strict()
|
|
665
|
+
]);
|
|
630
666
|
var workerCollectedResultSchema = z8.object({
|
|
631
667
|
workerId: z8.uuid(),
|
|
632
668
|
parentRunId: z8.uuid(),
|
|
@@ -641,7 +677,10 @@ var workerCollectedResultSchema = z8.object({
|
|
|
641
677
|
backend: workerBackendSchema.optional(),
|
|
642
678
|
model: z8.string().max(512).optional(),
|
|
643
679
|
baselineSha: commitShaSchema,
|
|
644
|
-
workspace:
|
|
680
|
+
workspace: z8.discriminatedUnion("kind", [
|
|
681
|
+
ownedWorkspaceSchema.extend({ state: workspaceStateSchema.optional() }),
|
|
682
|
+
sharedWorkspaceSchema.extend({ state: workspaceStateSchema.optional() })
|
|
683
|
+
]),
|
|
645
684
|
cleanup: z8.enum(["retained", "requested", "terminating", "cleaning", "complete", "incomplete"]),
|
|
646
685
|
summary: z8.discriminatedUnion("state", [
|
|
647
686
|
// `failure`: the worker failed, and the text names the runner's failure reason (hearsay-tools/squawk#3337).
|
|
@@ -660,6 +699,8 @@ var workerCollectedResultSchema = z8.object({
|
|
|
660
699
|
unavailableEvidenceSchema,
|
|
661
700
|
deletedEvidenceSchema
|
|
662
701
|
]),
|
|
702
|
+
/** Present for a worker that works in its host's directory. */
|
|
703
|
+
changes: workerChangeReportSchema.optional(),
|
|
663
704
|
artifacts: z8.discriminatedUnion("state", [
|
|
664
705
|
z8.object({ state: z8.literal("available"), items: z8.array(workerArtifactSchema).max(32), truncated: z8.boolean() }).strict(),
|
|
665
706
|
unavailableEvidenceSchema,
|
|
@@ -723,9 +764,21 @@ var runDelegationSummarySchema = z8.discriminatedUnion("role", [
|
|
|
723
764
|
}),
|
|
724
765
|
delegationStateSchema.options[2].strip()
|
|
725
766
|
]);
|
|
767
|
+
var WORKSPACE_CHOICES = { isolated: "owned-isolated", shared: "shared" };
|
|
768
|
+
var workerWorkspaceChoiceSchema = z8.enum(["isolated", "shared"]);
|
|
769
|
+
var SHARED_BASELINE_REFUSAL = "--baseline cannot be used with --workspace shared: a shared worker runs at its parent's HEAD";
|
|
770
|
+
var SHARED_ATTACH_REFUSAL = "--attach cannot be used with --workspace shared: the worker runs in your worktree, so the file is already there";
|
|
771
|
+
function sharedSpawnRefusal(request) {
|
|
772
|
+
if (request.workspace !== "shared") return void 0;
|
|
773
|
+
if (request.baseline !== void 0) return SHARED_BASELINE_REFUSAL;
|
|
774
|
+
return request.context?.artifacts?.some((artifact) => artifact.kind === "parent-file") ? SHARED_ATTACH_REFUSAL : void 0;
|
|
775
|
+
}
|
|
726
776
|
var workerSpawnRequestSchema = z8.object({
|
|
727
777
|
task: z8.string().min(1).max(1e5),
|
|
728
|
-
|
|
778
|
+
/** Required for an isolated workspace; refused for a shared one, which runs at its host's HEAD. */
|
|
779
|
+
baseline: z8.string().min(1).max(1024).optional(),
|
|
780
|
+
/** `isolated` when absent. */
|
|
781
|
+
workspace: workerWorkspaceChoiceSchema.optional(),
|
|
729
782
|
requestId: z8.uuid(),
|
|
730
783
|
context: workerContextSchema.optional(),
|
|
731
784
|
backend: workerBackendSchema.optional(),
|
|
@@ -735,7 +788,7 @@ var workerSpawnRequestSchema = z8.object({
|
|
|
735
788
|
workflow: z8.string().trim().min(1).max(200).optional(),
|
|
736
789
|
/** Discovered skill to run as a one-step task, mutually exclusive with workflow (#778). */
|
|
737
790
|
skill: z8.string().trim().min(1).max(200).optional()
|
|
738
|
-
}).strict().refine((request) => request.skill === void 0 || request.workflow === void 0, { message: "--skill and --workflow cannot be used together" }).refine((request) => request.task.length + (request.context?.text?.length ?? 0) <= 1e5, { message: "Combined task and context exceed 100000 characters" });
|
|
791
|
+
}).strict().refine((request) => request.skill === void 0 || request.workflow === void 0, { message: "--skill and --workflow cannot be used together" }).refine((request) => request.workspace === "shared" || request.baseline !== void 0, { path: ["baseline"], message: "--baseline is required" }).refine((request) => request.task.length + (request.context?.text?.length ?? 0) <= 1e5, { message: "Combined task and context exceed 100000 characters" });
|
|
739
792
|
var workerSteerRequestSchema = z8.object({
|
|
740
793
|
text: z8.string().max(1e5).refine((text) => text.trim().length > 0)
|
|
741
794
|
}).strict();
|
|
@@ -5947,6 +6000,9 @@ export {
|
|
|
5947
6000
|
SCHEDULED_TASK_NOTE,
|
|
5948
6001
|
SCHEDULE_HOURS_OPTIONS,
|
|
5949
6002
|
SCHEDULE_TYPES,
|
|
6003
|
+
SHARED_ATTACH_REFUSAL,
|
|
6004
|
+
SHARED_BASELINE_REFUSAL,
|
|
6005
|
+
SHARED_WORKSPACE_REFUSAL,
|
|
5950
6006
|
SUBAGENT_WAIT_CHILD_LIMIT,
|
|
5951
6007
|
SUBAGENT_WAIT_DEADLINE_SECONDS,
|
|
5952
6008
|
SUBAGENT_WAIT_GRACE_SECONDS,
|
|
@@ -5959,6 +6015,8 @@ export {
|
|
|
5959
6015
|
WAIT_MESSAGE_MAX,
|
|
5960
6016
|
WEBHOOK_TRIGGERS,
|
|
5961
6017
|
WEEKDAY_NAMES,
|
|
6018
|
+
WORKER_CHANGED_PATHS_CAP,
|
|
6019
|
+
WORKSPACE_CHOICES,
|
|
5962
6020
|
WORKTREE_SETUP_DEFAULT_TIMEOUT_SECONDS,
|
|
5963
6021
|
WORKTREE_SETUP_MAX_COMMANDS,
|
|
5964
6022
|
WORKTREE_SETUP_MAX_COMMAND_LENGTH,
|
|
@@ -6269,8 +6327,11 @@ export {
|
|
|
6269
6327
|
openTargetsResponseSchema,
|
|
6270
6328
|
openWaitSchema,
|
|
6271
6329
|
ownLookup,
|
|
6330
|
+
ownedWorkspace,
|
|
6331
|
+
ownedWorkspaceSchema,
|
|
6272
6332
|
ownerInputSchema,
|
|
6273
6333
|
ownerOutputSchema,
|
|
6334
|
+
ownsDirectory,
|
|
6274
6335
|
parentFileRefusal,
|
|
6275
6336
|
parseCron,
|
|
6276
6337
|
parseDurationMinutes,
|
|
@@ -6449,6 +6510,8 @@ export {
|
|
|
6449
6510
|
setConfigSchema,
|
|
6450
6511
|
setWorkspaceConfigInputSchema,
|
|
6451
6512
|
setWorkspaceUiStateInputSchema,
|
|
6513
|
+
sharedSpawnRefusal,
|
|
6514
|
+
sharedWorkspaceSchema,
|
|
6452
6515
|
sidebarLimitsSchema,
|
|
6453
6516
|
skillSchema,
|
|
6454
6517
|
sqlPrefilterTokens,
|
|
@@ -6517,6 +6580,7 @@ export {
|
|
|
6517
6580
|
workerCancelWaitRequestSchema,
|
|
6518
6581
|
workerCancelWaitResultSchema,
|
|
6519
6582
|
workerCapacitySchema,
|
|
6583
|
+
workerChangeReportSchema,
|
|
6520
6584
|
workerCollectedResultSchema,
|
|
6521
6585
|
workerCompletionWaitProjection,
|
|
6522
6586
|
workerCompletionWaitSchema,
|
|
@@ -6560,6 +6624,7 @@ export {
|
|
|
6560
6624
|
workerWaitSchema,
|
|
6561
6625
|
workerWaitTargets,
|
|
6562
6626
|
workerWaitView,
|
|
6627
|
+
workerWorkspaceChoiceSchema,
|
|
6563
6628
|
workerWorkspaceSchema,
|
|
6564
6629
|
workersAllowed,
|
|
6565
6630
|
workersWaitingLabel,
|