@hearsay-tools/squawk 0.18.0-dev.7381 → 0.18.0-dev.7384

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/dist/ci-wait/controller.d.ts +42 -42
  2. package/dist/contract/delegation.d.ts +2 -0
  3. package/dist/contract/index.js +1 -0
  4. package/dist/delegation/conversations.d.ts +144 -144
  5. package/dist/delegation/provision.js +1 -0
  6. package/dist/delegation/provision.js.map +1 -1
  7. package/dist/delegation/results.js +6 -6
  8. package/dist/delegation/results.js.map +1 -1
  9. package/dist/delegation/routes.d.ts +1 -0
  10. package/dist/delegation/service.js +6 -3
  11. package/dist/delegation/service.js.map +1 -1
  12. package/dist/delegation/transport.d.ts +1 -0
  13. package/dist/delegation/worker-cleanup.js +3 -2
  14. package/dist/delegation/worker-cleanup.js.map +1 -1
  15. package/dist/runs/delegation-state.d.ts +6 -0
  16. package/dist/runs/delegation-state.js +6 -0
  17. package/dist/runs/delegation-state.js.map +1 -1
  18. package/dist/runs/store.js +1 -1
  19. package/dist/runs/store.js.map +1 -1
  20. package/dist/runs/worker-execution.d.ts +4 -1
  21. package/dist/runs/worker-execution.js +11 -4
  22. package/dist/runs/worker-execution.js.map +1 -1
  23. package/dist/server/reports-api.d.ts +2 -2
  24. package/dist/server/server.d.ts +60 -58
  25. package/dist/server/server.js +6 -6
  26. package/dist/server/server.js.map +1 -1
  27. package/dist/workflows/run/worker-orphans.js +2 -3
  28. package/dist/workflows/run/worker-orphans.js.map +1 -1
  29. package/package.json +4 -4
  30. package/web/dist/assets/{activity-motion-BOQUCeCr.js → activity-motion-CgP40__E.js} +1 -1
  31. package/web/dist/assets/{activity-route-BHLXl8oV.js → activity-route-BtvFzWFR.js} +1 -1
  32. package/web/dist/assets/{agent-accounts-CrhI2D79.js → agent-accounts-Df00_4nt.js} +1 -1
  33. package/web/dist/assets/attention-DnkhRVYi.js +1 -0
  34. package/web/dist/assets/{cez-idle-Catc8I8F.js → cez-idle-C2a1bGFM.js} +1 -1
  35. package/web/dist/assets/{commit-diff-panel-BaxN0Drk.js → commit-diff-panel-CgHoJCd0.js} +1 -1
  36. package/web/dist/assets/{diff-DsC9nsup.js → diff-DAzJjwNi.js} +2 -2
  37. package/web/dist/assets/{diff-view-DrIsymRS.js → diff-view-B0gEEQRk.js} +1 -1
  38. package/web/dist/assets/{file-preview-Bg9lwYd3.js → file-preview-BJXNrl8A.js} +1 -1
  39. package/web/dist/assets/{git-toolbar-BIMZxkIR.js → git-toolbar-1GsxjDzi.js} +1 -1
  40. package/web/dist/assets/{github-DLMIlW2E.js → github-BgpxzetM.js} +1 -1
  41. package/web/dist/assets/{global-activity-route-DLAEr5L8.js → global-activity-route-DF0LJ4yy.js} +1 -1
  42. package/web/dist/assets/{index-8QnR_MBI.js → index-l9xNCoqa.js} +4 -4
  43. package/web/dist/assets/{live-protocol-B8HJ-VW8.js → live-protocol-DATMWlI4.js} +1 -1
  44. package/web/dist/assets/{markdown-C24Y3Ede.js → markdown-DF-pvq4A.js} +1 -1
  45. package/web/dist/assets/{picker-pill-Dl5RK9pn.js → picker-pill-p-VKz2MC.js} +1 -1
  46. package/web/dist/assets/{preview-pane-connected-BB6fiNz4.js → preview-pane-connected-BLOvS5Ae.js} +1 -1
  47. package/web/dist/assets/{project-router-4acCokGM.js → project-router-BC1rP-YL.js} +1 -1
  48. package/web/dist/assets/{project-scope-context-DhjdxoB5.js → project-scope-context-C8nBMvLL.js} +1 -1
  49. package/web/dist/assets/{prompt-template-menu-cd6UuIt4.js → prompt-template-menu-D8AmEuUD.js} +1 -1
  50. package/web/dist/assets/{queries-DQWq3QYH.js → queries-B9kcZt0T.js} +1 -1
  51. package/web/dist/assets/{reference-chip-S5_xQP1E.js → reference-chip-CqSRXBDz.js} +1 -1
  52. package/web/dist/assets/{repo-git-j1M9sjeL.js → repo-git-CvWZpHBx.js} +1 -1
  53. package/web/dist/assets/{report-reader-CH91jPJm.js → report-reader-CQ1WzJdV.js} +1 -1
  54. package/web/dist/assets/{reports-DJnKG8OO.js → reports-CJMZxPTJ.js} +1 -1
  55. package/web/dist/assets/{run-header-Bfg4NPUu.js → run-header-B6iuPEt1.js} +1 -1
  56. package/web/dist/assets/{skills-CdKwxQx-.js → skills-dp6fZ9Rx.js} +1 -1
  57. package/web/dist/assets/{tab-link-lLkoaQwJ.js → tab-link-GRSRI4GD.js} +1 -1
  58. package/web/dist/assets/{task-changes-jdt_D-1I.js → task-changes-Cr9nBTDb.js} +1 -1
  59. package/web/dist/assets/{task-commits-y2F7KSSy.js → task-commits-BVrixmRD.js} +1 -1
  60. package/web/dist/assets/{task-files-BgoBjf1S.js → task-files-C793KQkx.js} +1 -1
  61. package/web/dist/assets/{task-github-item-DRiO1MOT.js → task-github-item-hCSq4bHg.js} +1 -1
  62. package/web/dist/assets/{task-thread-DtmCMLAL.js → task-thread-CptBlW0g.js} +1 -1
  63. package/web/dist/assets/{thread-state-B4uGx4AQ.js → thread-state-deiplV_w.js} +1 -1
  64. package/web/dist/assets/{use-desktop-B27Z5VAz.js → use-desktop-BG9pRFWT.js} +1 -1
  65. package/web/dist/assets/{use-hand-to-agent-state-PIoC-vpx.js → use-hand-to-agent-state-CGSDi2SR.js} +1 -1
  66. package/web/dist/assets/{useInfiniteQuery-MTFj7KHp.js → useInfiniteQuery-BICP2NKv.js} +1 -1
  67. package/web/dist/assets/useQuery-s9cUNw6x.js +1 -0
  68. package/web/dist/assets/{workflows-DABi3xsS.js → workflows-CLl6Nvgl.js} +1 -1
  69. package/web/dist/assets/{ws-DSHRpUsm.js → ws-DMAJTDWo.js} +1 -1
  70. package/web/dist/index.html +15 -15
  71. package/web/dist/live-worker.js +1 -1
  72. package/web/dist/assets/attention-CJrUOS56.js +0 -1
  73. package/web/dist/assets/useQuery-pKaBf15T.js +0 -1
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { type WorkerProcessRecord } from '../delegation/process-liveness.ts';
2
3
  /** Terminal task intent survives loss/quarantine of the public run index. Starting a new
3
4
  * generation replaces this entire checkpoint, so an old cleanup cannot authorize reuse. */
4
5
  export declare const workerExecutionSchema: z.ZodObject<{
@@ -32,7 +33,9 @@ export declare const SPAWN_NEXT = "spawn a new worker with the instruction";
32
33
  /** The previous execution when it lets a new one start: complete, or queued and never started. */
33
34
  export declare function admissibleExecution(prior: WorkerExecution | undefined): WorkerExecution;
34
35
  /** The refusal for live holders of the worker's paths; no PID means the holder proof was unreadable. */
35
- export declare function holderRefusal(holders: readonly number[]): WorkerAdmissionRefusal;
36
+ export declare function holderRefusal(holders: readonly number[], record?: WorkerProcessRecord | 'absent' | 'unknown'): WorkerAdmissionRefusal;
37
+ /** Both orphan recovery and normal admission explain the same controller ownership rule. */
38
+ export declare function controllerRefusal(pid: number): WorkerAdmissionRefusal;
36
39
  /** The refusal a failed admission returns: its own cause and next step. Only an error without
37
40
  * a message falls back to `fallback`. */
38
41
  export declare function admissionRefusal(error: unknown, fallback: string): {
@@ -2,7 +2,7 @@ import { legacyRunsBeside, runDataDir } from '../legacy-runs.js';
2
2
  import { lstatSync, readdirSync, realpathSync } from 'node:fs';
3
3
  import { isAbsolute, join, resolve } from 'node:path';
4
4
  import { z } from 'zod';
5
- import { describeProcesses } from '../delegation/process-liveness.js';
5
+ import { describeProcesses, isCurrentProcess } from '../delegation/process-liveness.js';
6
6
  /** Terminal task intent survives loss/quarantine of the public run index. Starting a new
7
7
  * generation replaces this entire checkpoint, so an old cleanup cannot authorize reuse. */
8
8
  export const workerExecutionSchema = z.object({
@@ -67,10 +67,17 @@ export function admissibleExecution(prior) {
67
67
  return prior;
68
68
  }
69
69
  /** The refusal for live holders of the worker's paths; no PID means the holder proof was unreadable. */
70
- export function holderRefusal(holders) {
70
+ export function holderRefusal(holders, record) {
71
+ const controller = typeof record === 'object' ? record.controller : undefined;
72
+ if (controller && !isCurrentProcess(controller) && holders.includes(controller.pid))
73
+ return controllerRefusal(controller.pid);
71
74
  return holders.length
72
- ? new WorkerAdmissionRefusal(`processes ${describeProcesses(holders)} still hold the worker's worktree or scratch`, 'end them, then retry the same command')
73
- : new WorkerAdmissionRefusal("the worker's worktree or scratch is not proven free of processes", `retry the same command; if this repeats, ${SPAWN_NEXT}`);
75
+ ? new WorkerAdmissionRefusal(`live processes of the previous session ${describeProcesses(holders)} prevent a new execution`, 'wait for those session processes to end, then retry the same command')
76
+ : new WorkerAdmissionRefusal("ownership or termination of the worker's previous session is not proven", `retry the same command; if this repeats, ${SPAWN_NEXT}`);
77
+ }
78
+ /** Both orphan recovery and normal admission explain the same controller ownership rule. */
79
+ export function controllerRefusal(pid) {
80
+ return new WorkerAdmissionRefusal(`another live controller ${describeProcesses([pid])} still owns the worker's execution`, 'wait for that controller to end the worker execution, then retry the same command');
74
81
  }
75
82
  /** The refusal a failed admission returns: its own cause and next step. Only an error without
76
83
  * a message falls back to `fallback`. */
@@ -1 +1 @@
1
- {"version":3,"file":"worker-execution.js","sourceRoot":"","sources":["../../src/runs/worker-execution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE;2FAC2F;AAC3F,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC,EAAE,iBAAiB,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAA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error: string;
41
41
  };
42
42
  outputFormat: "json";
43
- status: 400;
43
+ status: 409;
44
44
  input: {
45
45
  query: {
46
46
  q?: string | undefined;
@@ -53,7 +53,7 @@ export declare const reportsRoutes: import("hono/hono-base").HonoBase<ProjectApi
53
53
  error: string;
54
54
  };
55
55
  outputFormat: "json";
56
- status: 409;
56
+ status: 400;
57
57
  input: {
58
58
  query: {
59
59
  q?: string | undefined;
@@ -4326,19 +4326,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
4326
4326
  } & {
4327
4327
  "/repo/commit/:sha": {
4328
4328
  $get: {
4329
- output: string;
4330
- outputFormat: "text";
4331
- status: import("hono/utils/http-status").ContentfulStatusCode;
4332
- input: {
4333
- query: {
4334
- structured?: string | undefined;
4335
- };
4336
- } & {
4337
- param: {
4338
- sha: string;
4339
- };
4340
- };
4341
- } | {
4342
4329
  output: {
4343
4330
  error: string;
4344
4331
  code?: "invalid_input" | undefined;
@@ -4402,6 +4389,19 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
4402
4389
  sha: string;
4403
4390
  };
4404
4391
  };
4392
+ } | {
4393
+ output: string;
4394
+ outputFormat: "text";
4395
+ status: import("hono/utils/http-status").ContentfulStatusCode;
4396
+ input: {
4397
+ query: {
4398
+ structured?: string | undefined;
4399
+ };
4400
+ } & {
4401
+ param: {
4402
+ sha: string;
4403
+ };
4404
+ };
4405
4405
  };
4406
4406
  };
4407
4407
  } & {
@@ -8006,6 +8006,7 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
8006
8006
  parentRunId?: string | undefined;
8007
8007
  workers: {
8008
8008
  workerId: string;
8009
+ settled: boolean;
8009
8010
  parentRunId: string;
8010
8011
  status: "cancelled" | "done" | "failed" | "queued" | "review" | "running" | "waiting";
8011
8012
  currentStepId?: string | undefined;
@@ -17929,20 +17930,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
17929
17930
  } & {
17930
17931
  "/runs/:id/handoff": {
17931
17932
  $get: {
17932
- output: string;
17933
- outputFormat: "text";
17934
- status: 200;
17933
+ output: {
17934
+ error: string;
17935
+ };
17936
+ outputFormat: "json";
17937
+ status: 404;
17935
17938
  input: {
17936
17939
  param: {
17937
17940
  id: string;
17938
17941
  };
17939
17942
  };
17940
17943
  } | {
17941
- output: {
17942
- error: string;
17943
- };
17944
- outputFormat: "json";
17945
- status: 404;
17944
+ output: string;
17945
+ outputFormat: "text";
17946
+ status: 200;
17946
17947
  input: {
17947
17948
  param: {
17948
17949
  id: string;
@@ -17980,20 +17981,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
17980
17981
  } & {
17981
17982
  "/runs/:id/diff": {
17982
17983
  $get: {
17983
- output: string;
17984
- outputFormat: "text";
17985
- status: import("hono/utils/http-status").ContentfulStatusCode;
17984
+ output: {
17985
+ error: string;
17986
+ };
17987
+ outputFormat: "json";
17988
+ status: 404 | 409;
17986
17989
  input: {
17987
17990
  param: {
17988
17991
  id: string;
17989
17992
  };
17990
17993
  };
17991
17994
  } | {
17992
- output: {
17993
- error: string;
17994
- };
17995
- outputFormat: "json";
17996
- status: 404 | 409;
17995
+ output: string;
17996
+ outputFormat: "text";
17997
+ status: import("hono/utils/http-status").ContentfulStatusCode;
17997
17998
  input: {
17998
17999
  param: {
17999
18000
  id: string;
@@ -20037,19 +20038,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
20037
20038
  } & {
20038
20039
  "/repo/commit/:sha": {
20039
20040
  $get: {
20040
- output: string;
20041
- outputFormat: "text";
20042
- status: import("hono/utils/http-status").ContentfulStatusCode;
20043
- input: {
20044
- query: {
20045
- structured?: string | undefined;
20046
- };
20047
- } & {
20048
- param: {
20049
- sha: string;
20050
- };
20051
- };
20052
- } | {
20053
20041
  output: {
20054
20042
  error: string;
20055
20043
  code?: "invalid_input" | undefined;
@@ -20113,6 +20101,19 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
20113
20101
  sha: string;
20114
20102
  };
20115
20103
  };
20104
+ } | {
20105
+ output: string;
20106
+ outputFormat: "text";
20107
+ status: import("hono/utils/http-status").ContentfulStatusCode;
20108
+ input: {
20109
+ query: {
20110
+ structured?: string | undefined;
20111
+ };
20112
+ } & {
20113
+ param: {
20114
+ sha: string;
20115
+ };
20116
+ };
20116
20117
  };
20117
20118
  };
20118
20119
  } & {
@@ -23717,6 +23718,7 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
23717
23718
  parentRunId?: string | undefined;
23718
23719
  workers: {
23719
23720
  workerId: string;
23721
+ settled: boolean;
23720
23722
  parentRunId: string;
23721
23723
  status: "cancelled" | "done" | "failed" | "queued" | "review" | "running" | "waiting";
23722
23724
  currentStepId?: string | undefined;
@@ -33640,20 +33642,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
33640
33642
  } & {
33641
33643
  "/runs/:id/handoff": {
33642
33644
  $get: {
33643
- output: string;
33644
- outputFormat: "text";
33645
- status: 200;
33645
+ output: {
33646
+ error: string;
33647
+ };
33648
+ outputFormat: "json";
33649
+ status: 404;
33646
33650
  input: {
33647
33651
  param: {
33648
33652
  id: string;
33649
33653
  };
33650
33654
  };
33651
33655
  } | {
33652
- output: {
33653
- error: string;
33654
- };
33655
- outputFormat: "json";
33656
- status: 404;
33656
+ output: string;
33657
+ outputFormat: "text";
33658
+ status: 200;
33657
33659
  input: {
33658
33660
  param: {
33659
33661
  id: string;
@@ -33691,20 +33693,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
33691
33693
  } & {
33692
33694
  "/runs/:id/diff": {
33693
33695
  $get: {
33694
- output: string;
33695
- outputFormat: "text";
33696
- status: import("hono/utils/http-status").ContentfulStatusCode;
33696
+ output: {
33697
+ error: string;
33698
+ };
33699
+ outputFormat: "json";
33700
+ status: 404 | 409;
33697
33701
  input: {
33698
33702
  param: {
33699
33703
  id: string;
33700
33704
  };
33701
33705
  };
33702
33706
  } | {
33703
- output: {
33704
- error: string;
33705
- };
33706
- outputFormat: "json";
33707
- status: 404 | 409;
33707
+ output: string;
33708
+ outputFormat: "text";
33709
+ status: import("hono/utils/http-status").ContentfulStatusCode;
33708
33710
  input: {
33709
33711
  param: {
33710
33712
  id: string;
@@ -95,7 +95,7 @@ import { readHandoff, renderHandoffRecords } from '../handoff.js';
95
95
  import { ARCHIVED_WINDOW } from '../runs/store.js';
96
96
  import { HistoryCursorError, deriveRunContextEvents, readRunHistoryPage, validateLiveCursor, } from '../runs/event-history.js';
97
97
  import { readRunIndexFromDisk, searchRunIndexFromDisk } from '../runs/run-index.js';
98
- import { workerDestroyView } from '../runs/delegation-state.js';
98
+ import { workerDestroyView, workerObservation } from '../runs/delegation-state.js';
99
99
  import { searchTokens } from '../contract/index.js';
100
100
  import { ownPullRequestNumbers } from '../runs/pull-requests.js';
101
101
  import { ColdRepoHandles } from './cold-repo-handles.js';
@@ -2444,17 +2444,17 @@ export function createApp(deps) {
2444
2444
  const run = store.getRun(c.req.valid('param').id);
2445
2445
  if (!run)
2446
2446
  return c.json({ error: 'not found' }, 404);
2447
- // Off the parent's receipts, not a scan of the project index (#659): archived/off-page
2448
- // workers still belong to this parent, and the cockpit asks on every run event, so the
2449
- // read has to cost O(workers) whatever the store holds — and nothing at all for the
2450
- // ordinary run that owns none, delegation on or off.
2451
- // Human reads use the bound project, never agent credentials or private evidence.
2447
+ // Read the parent's receipts, not the project index (#659), including archived workers.
2448
+ // The cockpit asks on every run event: cost stays O(workers), whatever the store holds.
2449
+ // An ordinary run that owns none reads none, delegation on or off.
2450
+ // Human reads use the bound project, never agent credentials.
2452
2451
  const ownedWorkers = store.listOwnedWorkers(run.id);
2453
2452
  const workers = ownedWorkers.flatMap(worker => {
2454
2453
  const owned = worker.delegation;
2455
2454
  if (owned?.role !== 'worker')
2456
2455
  return [];
2457
2456
  return [{ workerId: worker.id, parentRunId: run.id, status: worker.status, workspace: owned.workspace,
2457
+ settled: workerObservation(worker, store.readWorkerExecution(worker.id)).settled,
2458
2458
  ...(worker.currentStepId === undefined ? {} : { currentStepId: worker.currentStepId }),
2459
2459
  ...(owned.destroy ? { destroy: workerDestroyView(worker) } : {}),
2460
2460
  }];