@hearsay-tools/squawk 0.18.0-pr3919.7387 → 0.18.0-pr3922.7395
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/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.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 +17 -4
- package/dist/delegation/results.js.map +1 -1
- package/dist/delegation/routes.d.ts +53 -17
- package/dist/delegation/service.js +9 -5
- 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 +42 -6
- package/dist/delegation/worker-cleanup.js +2 -2
- 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 +28 -5
- package/dist/delegation/workspace-kinds.js +58 -6
- package/dist/delegation/workspace-kinds.js.map +1 -1
- 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 +270 -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/project-run-connection.js +9 -5
- package/dist/runs/project-run-connection.js.map +1 -1
- package/dist/runs/retention.d.ts +5 -3
- package/dist/runs/retention.js +10 -5
- package/dist/runs/retention.js.map +1 -1
- package/dist/runs/run-database.js +8 -3
- package/dist/runs/run-database.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 +16 -2
- 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 +1521 -1381
- package/dist/server/server.js +2 -2
- package/dist/server/server.js.map +1 -1
- package/dist/server/workspace-live-routes.d.ts +6 -6
- package/dist/workflows/continuation-admission.d.ts +79 -72
- package/dist/workflows/input-acknowledgement.d.ts +24 -24
- package/dist/workflows/run/compose.js +3 -3
- package/dist/workflows/run/compose.js.map +1 -1
- package/dist/workflows/run/continuation-acceptance.js +2 -2
- package/dist/workflows/run/continuation-acceptance.js.map +1 -1
- package/dist/workflows/run/continuation-session.js +1 -1
- package/dist/workflows/run/continuation-session.js.map +1 -1
- package/dist/workflows/run/live-session-state.d.ts +5 -0
- package/dist/workflows/run/live-session-state.js +6 -0
- package/dist/workflows/run/live-session-state.js.map +1 -1
- package/dist/workflows/run/maintenance-claims.d.ts +12 -0
- package/dist/workflows/run/maintenance-claims.js +42 -2
- package/dist/workflows/run/maintenance-claims.js.map +1 -1
- package/dist/workflows/run/run-workspace.d.ts +6 -0
- package/dist/workflows/run/run-workspace.js +9 -0
- package/dist/workflows/run/run-workspace.js.map +1 -1
- package/dist/workflows/run/step-loop.d.ts +4 -0
- package/dist/workflows/run/step-loop.js +25 -14
- package/dist/workflows/run/step-loop.js.map +1 -1
- package/dist/workflows/run/wait-engine.d.ts +79 -72
- 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-workspace-port.d.ts +9 -0
- package/dist/workflows/run/worker-workspace-port.js.map +1 -1
- package/dist/workflows/run/worktree-autosave.js +2 -2
- package/dist/workflows/run/worktree-autosave.js.map +1 -1
- package/dist/workflows/run.js +4 -2
- package/dist/workflows/run.js.map +1 -1
- package/package.json +4 -4
- package/web/dist/assets/activity-motion-W7LQQzqR.js +2 -0
- package/web/dist/assets/{activity-route-DORgO1AV.js → activity-route-b-zH6KX6.js} +1 -1
- package/web/dist/assets/{agent-accounts--CSZxnob.js → agent-accounts-0EKsrgdJ.js} +1 -1
- package/web/dist/assets/attention-CvRtkmnP.js +1 -0
- package/web/dist/assets/{cez-idle-C2a1bGFM.js → cez-idle-DreV5r0B.js} +1 -1
- package/web/dist/assets/{commit-diff-panel-BPo0nWFN.js → commit-diff-panel-BBZZbVgE.js} +1 -1
- package/web/dist/assets/{diff-Aj2SZJZM.js → diff-CkqVFsT7.js} +2 -2
- package/web/dist/assets/{diff-view-BGUh3v9V.js → diff-view-Ch_cdfcV.js} +1 -1
- package/web/dist/assets/{file-preview-66mSwryC.js → file-preview-0T9fzXJY.js} +1 -1
- package/web/dist/assets/{git-toolbar-LISA40Bx.js → git-toolbar-Ccpg_TKe.js} +1 -1
- package/web/dist/assets/{github-DBY1WE_f.js → github-CPJXTYE-.js} +1 -1
- package/web/dist/assets/{global-activity-route-CTHrQSts.js → global-activity-route-DVSxx-ha.js} +1 -1
- package/web/dist/assets/{index-Cp-ezSqE.js → index-FZIxXka9.js} +8 -8
- package/web/dist/assets/live-protocol-kUxhOnN1.js +64 -0
- package/web/dist/assets/{markdown-ASJCHR3o.js → markdown-BldkAL5N.js} +1 -1
- package/web/dist/assets/picker-pill-DN0WFWoS.js +15 -0
- package/web/dist/assets/{preview-pane-connected-Bl_hZeYa.js → preview-pane-connected-xrHDiOdF.js} +1 -1
- package/web/dist/assets/{project-router-Bf4J43Ga.js → project-router-BVp1TVVP.js} +1 -1
- package/web/dist/assets/project-scope-context-DSlnqjT3.js +4 -0
- package/web/dist/assets/{prompt-template-menu-BAySvlvh.js → prompt-template-menu-i7FXpDOj.js} +1 -1
- package/web/dist/assets/{queries-BGUyUd4-.js → queries-B4jd0jVr.js} +1 -1
- package/web/dist/assets/{reference-chip-CJzpvEa5.js → reference-chip-DeYsiLdM.js} +1 -1
- package/web/dist/assets/{repo-git-h7WWx0jd.js → repo-git-BzPaI8dr.js} +1 -1
- package/web/dist/assets/{report-reader-B065yJZH.js → report-reader-B1yQJCNt.js} +1 -1
- package/web/dist/assets/reports-DeRPb5Oo.js +1 -0
- package/web/dist/assets/run-header-DGZHSrbt.js +2 -0
- package/web/dist/assets/{skills-DGFBZt0-.js → skills-2ng-kCCS.js} +1 -1
- package/web/dist/assets/{tab-link-Cl3hgWd9.js → tab-link-Bc-CvRBn.js} +1 -1
- package/web/dist/assets/{task-changes-h49jwGms.js → task-changes-DIU2Co-H.js} +1 -1
- package/web/dist/assets/{task-commits-BLI7EWpv.js → task-commits-Cccn7xrR.js} +1 -1
- package/web/dist/assets/{task-files-GHiSUx9E.js → task-files-C-66-xPc.js} +1 -1
- package/web/dist/assets/{task-github-item-DQOOAzbC.js → task-github-item-5mF5DxKm.js} +1 -1
- package/web/dist/assets/{task-thread-DhInyYtH.js → task-thread-B_AnobAW.js} +3 -3
- package/web/dist/assets/{thread-state-1xRwoDNq.js → thread-state-DQJxLYUo.js} +1 -1
- package/web/dist/assets/{use-desktop-CKg6hpQ_.js → use-desktop-CPzO9ufG.js} +1 -1
- package/web/dist/assets/{use-hand-to-agent-state-Cxdu52IB.js → use-hand-to-agent-state-ClzuNnhO.js} +1 -1
- package/web/dist/assets/{useInfiniteQuery-C_MhqwND.js → useInfiniteQuery-DBV7oz3w.js} +1 -1
- package/web/dist/assets/useQuery-DqWzagrg.js +1 -0
- package/web/dist/assets/{workflows-DC-YoIrq.js → workflows-C1kx7nsU.js} +1 -1
- package/web/dist/assets/{ws-D5qu0xrN.js → ws-D6M4b5Tw.js} +1 -1
- package/web/dist/index.html +15 -15
- package/web/dist/live-worker.js +1 -1
- package/web/dist/assets/activity-motion-DW9Uw5oA.js +0 -2
- package/web/dist/assets/attention-C8xGqYfS.js +0 -1
- package/web/dist/assets/live-protocol-DATMWlI4.js +0 -64
- package/web/dist/assets/picker-pill-Cz_cV7Fp.js +0 -15
- package/web/dist/assets/project-scope-context-CWMEewWV.js +0 -4
- package/web/dist/assets/reports-CrB_OEux.js +0 -1
- package/web/dist/assets/run-header-CIWwn8Tt.js +0 -2
- package/web/dist/assets/useQuery-C53R8k3s.js +0 -1
package/dist/ci-wait/tools.d.ts
CHANGED
|
@@ -263,10 +263,6 @@ 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
|
-
} | {
|
|
270
266
|
ok: true;
|
|
271
267
|
task: {
|
|
272
268
|
id: string;
|
|
@@ -278,6 +274,10 @@ export declare function invokeScheduleTaskTool(input: unknown): Promise<{
|
|
|
278
274
|
url?: string | undefined;
|
|
279
275
|
};
|
|
280
276
|
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>;
|
|
@@ -1160,14 +1307,21 @@ export declare const workerInspectionSchema: z.ZodObject<{
|
|
|
1160
1307
|
waiting: "waiting";
|
|
1161
1308
|
}>;
|
|
1162
1309
|
currentStepId: z.ZodOptional<z.ZodString>;
|
|
1163
|
-
workspace: z.ZodObject<{
|
|
1310
|
+
workspace: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1164
1311
|
ownerRunId: z.ZodUUID;
|
|
1165
1312
|
resourceId: z.ZodUUID;
|
|
1166
1313
|
kind: z.ZodLiteral<"owned-isolated">;
|
|
1167
1314
|
path: z.ZodString;
|
|
1168
1315
|
branch: z.ZodString;
|
|
1169
1316
|
baselineSha: z.ZodString;
|
|
1170
|
-
}, z.core.$strict
|
|
1317
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1318
|
+
ownerRunId: z.ZodUUID;
|
|
1319
|
+
resourceId: z.ZodUUID;
|
|
1320
|
+
kind: z.ZodLiteral<"shared">;
|
|
1321
|
+
path: z.ZodString;
|
|
1322
|
+
hostRunId: z.ZodUUID;
|
|
1323
|
+
baselineSha: z.ZodString;
|
|
1324
|
+
}, z.core.$strict>], "kind">;
|
|
1171
1325
|
backend: z.ZodOptional<z.ZodEnum<{
|
|
1172
1326
|
claude: "claude";
|
|
1173
1327
|
codex: "codex";
|
|
@@ -1344,14 +1498,21 @@ export declare const workerListEntrySchema: z.ZodObject<{
|
|
|
1344
1498
|
running: "running";
|
|
1345
1499
|
waiting: "waiting";
|
|
1346
1500
|
}>;
|
|
1347
|
-
workspace: z.ZodObject<{
|
|
1501
|
+
workspace: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1348
1502
|
ownerRunId: z.ZodUUID;
|
|
1349
1503
|
resourceId: z.ZodUUID;
|
|
1350
1504
|
kind: z.ZodLiteral<"owned-isolated">;
|
|
1351
1505
|
path: z.ZodString;
|
|
1352
1506
|
branch: z.ZodString;
|
|
1353
1507
|
baselineSha: z.ZodString;
|
|
1354
|
-
}, z.core.$strict
|
|
1508
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1509
|
+
ownerRunId: z.ZodUUID;
|
|
1510
|
+
resourceId: z.ZodUUID;
|
|
1511
|
+
kind: z.ZodLiteral<"shared">;
|
|
1512
|
+
path: z.ZodString;
|
|
1513
|
+
hostRunId: z.ZodUUID;
|
|
1514
|
+
baselineSha: z.ZodString;
|
|
1515
|
+
}, z.core.$strict>], "kind">;
|
|
1355
1516
|
destroy: z.ZodOptional<z.ZodObject<{
|
|
1356
1517
|
requestedAt: z.ZodISODateTime;
|
|
1357
1518
|
phase: z.ZodEnum<{
|
|
@@ -1390,14 +1551,21 @@ export declare const workerListResultSchema: z.ZodObject<{
|
|
|
1390
1551
|
running: "running";
|
|
1391
1552
|
waiting: "waiting";
|
|
1392
1553
|
}>;
|
|
1393
|
-
workspace: z.ZodObject<{
|
|
1554
|
+
workspace: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1394
1555
|
ownerRunId: z.ZodUUID;
|
|
1395
1556
|
resourceId: z.ZodUUID;
|
|
1396
1557
|
kind: z.ZodLiteral<"owned-isolated">;
|
|
1397
1558
|
path: z.ZodString;
|
|
1398
1559
|
branch: z.ZodString;
|
|
1399
1560
|
baselineSha: z.ZodString;
|
|
1400
|
-
}, z.core.$strict
|
|
1561
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1562
|
+
ownerRunId: z.ZodUUID;
|
|
1563
|
+
resourceId: z.ZodUUID;
|
|
1564
|
+
kind: z.ZodLiteral<"shared">;
|
|
1565
|
+
path: z.ZodString;
|
|
1566
|
+
hostRunId: z.ZodUUID;
|
|
1567
|
+
baselineSha: z.ZodString;
|
|
1568
|
+
}, z.core.$strict>], "kind">;
|
|
1401
1569
|
destroy: z.ZodOptional<z.ZodObject<{
|
|
1402
1570
|
requestedAt: z.ZodISODateTime;
|
|
1403
1571
|
phase: z.ZodEnum<{
|
|
@@ -1443,14 +1611,21 @@ export declare const workerListPageSchema: z.ZodObject<{
|
|
|
1443
1611
|
running: "running";
|
|
1444
1612
|
waiting: "waiting";
|
|
1445
1613
|
}>;
|
|
1446
|
-
workspace: z.ZodObject<{
|
|
1614
|
+
workspace: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1447
1615
|
ownerRunId: z.ZodUUID;
|
|
1448
1616
|
resourceId: z.ZodUUID;
|
|
1449
1617
|
kind: z.ZodLiteral<"owned-isolated">;
|
|
1450
1618
|
path: z.ZodString;
|
|
1451
1619
|
branch: z.ZodString;
|
|
1452
1620
|
baselineSha: z.ZodString;
|
|
1453
|
-
}, z.core.$strict
|
|
1621
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1622
|
+
ownerRunId: z.ZodUUID;
|
|
1623
|
+
resourceId: z.ZodUUID;
|
|
1624
|
+
kind: z.ZodLiteral<"shared">;
|
|
1625
|
+
path: z.ZodString;
|
|
1626
|
+
hostRunId: z.ZodUUID;
|
|
1627
|
+
baselineSha: z.ZodString;
|
|
1628
|
+
}, z.core.$strict>], "kind">;
|
|
1454
1629
|
destroy: z.ZodOptional<z.ZodObject<{
|
|
1455
1630
|
requestedAt: z.ZodISODateTime;
|
|
1456
1631
|
phase: z.ZodEnum<{
|
|
@@ -1552,14 +1727,21 @@ export declare const runRelationshipsSchema: z.ZodObject<{
|
|
|
1552
1727
|
waiting: "waiting";
|
|
1553
1728
|
}>;
|
|
1554
1729
|
currentStepId: z.ZodOptional<z.ZodString>;
|
|
1555
|
-
workspace: z.ZodObject<{
|
|
1730
|
+
workspace: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1556
1731
|
ownerRunId: z.ZodUUID;
|
|
1557
1732
|
resourceId: z.ZodUUID;
|
|
1558
1733
|
kind: z.ZodLiteral<"owned-isolated">;
|
|
1559
1734
|
path: z.ZodString;
|
|
1560
1735
|
branch: z.ZodString;
|
|
1561
1736
|
baselineSha: z.ZodString;
|
|
1562
|
-
}, z.core.$strict
|
|
1737
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1738
|
+
ownerRunId: z.ZodUUID;
|
|
1739
|
+
resourceId: z.ZodUUID;
|
|
1740
|
+
kind: z.ZodLiteral<"shared">;
|
|
1741
|
+
path: z.ZodString;
|
|
1742
|
+
hostRunId: z.ZodUUID;
|
|
1743
|
+
baselineSha: z.ZodString;
|
|
1744
|
+
}, z.core.$strict>], "kind">;
|
|
1563
1745
|
backend: z.ZodOptional<z.ZodEnum<{
|
|
1564
1746
|
claude: "claude";
|
|
1565
1747
|
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();
|
|
@@ -5953,6 +6006,9 @@ export {
|
|
|
5953
6006
|
SCHEDULED_TASK_NOTE,
|
|
5954
6007
|
SCHEDULE_HOURS_OPTIONS,
|
|
5955
6008
|
SCHEDULE_TYPES,
|
|
6009
|
+
SHARED_ATTACH_REFUSAL,
|
|
6010
|
+
SHARED_BASELINE_REFUSAL,
|
|
6011
|
+
SHARED_WORKSPACE_REFUSAL,
|
|
5956
6012
|
SUBAGENT_WAIT_CHILD_LIMIT,
|
|
5957
6013
|
SUBAGENT_WAIT_DEADLINE_SECONDS,
|
|
5958
6014
|
SUBAGENT_WAIT_GRACE_SECONDS,
|
|
@@ -5965,6 +6021,8 @@ export {
|
|
|
5965
6021
|
WAIT_MESSAGE_MAX,
|
|
5966
6022
|
WEBHOOK_TRIGGERS,
|
|
5967
6023
|
WEEKDAY_NAMES,
|
|
6024
|
+
WORKER_CHANGED_PATHS_CAP,
|
|
6025
|
+
WORKSPACE_CHOICES,
|
|
5968
6026
|
WORKTREE_SETUP_DEFAULT_TIMEOUT_SECONDS,
|
|
5969
6027
|
WORKTREE_SETUP_MAX_COMMANDS,
|
|
5970
6028
|
WORKTREE_SETUP_MAX_COMMAND_LENGTH,
|
|
@@ -6275,8 +6333,11 @@ export {
|
|
|
6275
6333
|
openTargetsResponseSchema,
|
|
6276
6334
|
openWaitSchema,
|
|
6277
6335
|
ownLookup,
|
|
6336
|
+
ownedWorkspace,
|
|
6337
|
+
ownedWorkspaceSchema,
|
|
6278
6338
|
ownerInputSchema,
|
|
6279
6339
|
ownerOutputSchema,
|
|
6340
|
+
ownsDirectory,
|
|
6280
6341
|
parentFileRefusal,
|
|
6281
6342
|
parseCron,
|
|
6282
6343
|
parseDurationMinutes,
|
|
@@ -6455,6 +6516,8 @@ export {
|
|
|
6455
6516
|
setConfigSchema,
|
|
6456
6517
|
setWorkspaceConfigInputSchema,
|
|
6457
6518
|
setWorkspaceUiStateInputSchema,
|
|
6519
|
+
sharedSpawnRefusal,
|
|
6520
|
+
sharedWorkspaceSchema,
|
|
6458
6521
|
sidebarLimitsSchema,
|
|
6459
6522
|
skillSchema,
|
|
6460
6523
|
sqlPrefilterTokens,
|
|
@@ -6523,6 +6586,7 @@ export {
|
|
|
6523
6586
|
workerCancelWaitRequestSchema,
|
|
6524
6587
|
workerCancelWaitResultSchema,
|
|
6525
6588
|
workerCapacitySchema,
|
|
6589
|
+
workerChangeReportSchema,
|
|
6526
6590
|
workerCollectedResultSchema,
|
|
6527
6591
|
workerCompletionWaitProjection,
|
|
6528
6592
|
workerCompletionWaitSchema,
|
|
@@ -6566,6 +6630,7 @@ export {
|
|
|
6566
6630
|
workerWaitSchema,
|
|
6567
6631
|
workerWaitTargets,
|
|
6568
6632
|
workerWaitView,
|
|
6633
|
+
workerWorkspaceChoiceSchema,
|
|
6569
6634
|
workerWorkspaceSchema,
|
|
6570
6635
|
workersAllowed,
|
|
6571
6636
|
workersWaitingLabel,
|