@hearsay-tools/squawk 0.19.0-dev.9239 → 0.19.0-dev.9242

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 (45) hide show
  1. package/dist/built-in-run-slots.d.ts +4 -4
  2. package/dist/built-in-run-slots.js +10 -6
  3. package/dist/built-in-run-slots.js.map +1 -1
  4. package/dist/ci-wait/controller.d.ts +7 -7
  5. package/dist/delegation/removal-slot.d.ts +6 -4
  6. package/dist/delegation/removal-slot.js +11 -18
  7. package/dist/delegation/removal-slot.js.map +1 -1
  8. package/dist/delegation/results.d.ts +9 -12
  9. package/dist/delegation/results.js +40 -167
  10. package/dist/delegation/results.js.map +1 -1
  11. package/dist/delegation/routes.d.ts +21 -21
  12. package/dist/delegation/transport.d.ts +10 -10
  13. package/dist/features/automations/automations-routes.d.ts +150 -150
  14. package/dist/features/automations/tools.d.ts +8 -8
  15. package/dist/features/reports/routes.d.ts +2 -2
  16. package/dist/runs/removal-slots.d.ts +4 -1
  17. package/dist/runs/removal-slots.js.map +1 -1
  18. package/dist/runs/retention.js +6 -1
  19. package/dist/runs/retention.js.map +1 -1
  20. package/dist/runs/task-result-builder.d.ts +117 -0
  21. package/dist/runs/task-result-builder.js +636 -0
  22. package/dist/runs/task-result-builder.js.map +1 -0
  23. package/dist/runs/task-result-preparation.d.ts +21 -0
  24. package/dist/runs/task-result-preparation.js +115 -0
  25. package/dist/runs/task-result-preparation.js.map +1 -0
  26. package/dist/runs/worker-workspace-evidence-registry.d.ts +31 -0
  27. package/dist/runs/worker-workspace-evidence-registry.js +24 -0
  28. package/dist/runs/worker-workspace-evidence-registry.js.map +1 -0
  29. package/dist/server/activity-routes.d.ts +23 -23
  30. package/dist/server/live-routes.d.ts +6 -6
  31. package/dist/server/project-settings-routes.d.ts +107 -107
  32. package/dist/server/projects-routes.d.ts +41 -41
  33. package/dist/server/provider-sign-in-routes.d.ts +2 -2
  34. package/dist/server/runner-install-routes.d.ts +10 -10
  35. package/dist/server/runs-routes.d.ts +308 -308
  36. package/dist/server/runs-routes.js +28 -3
  37. package/dist/server/runs-routes.js.map +1 -1
  38. package/dist/server/server.d.ts +2666 -2666
  39. package/dist/server/workspace-identity-routes.d.ts +5 -5
  40. package/dist/workflows/continuation-admission.d.ts +72 -72
  41. package/dist/workflows/input-acknowledgement.d.ts +24 -24
  42. package/dist/workflows/run/continuation-acceptance.d.ts +1 -0
  43. package/dist/workflows/run/continuation-acceptance.js +9 -2
  44. package/dist/workflows/run/continuation-acceptance.js.map +1 -1
  45. package/package.json +4 -4
@@ -2,10 +2,10 @@ import { type RunSlots } from './runs/removal-slots.ts';
2
2
  /** The removal slots that ship with Squawk, in the order each path asks them. */
3
3
  export declare const BUILT_IN_RUN_SLOTS: RunSlots;
4
4
  /**
5
- * Register the built-in task file kinds, removal slots and the worker executions
6
- * (`runs/worker-executions-registry.ts`). Each process entry calls it once, beside
7
- * the bundled runner load, before it can delete, reclaim or archive a run or start a worker. A
8
- * second call registers the same objects again, which the registries ignore.
5
+ * Register the built-in task file kinds, removal slots, worker workspace evidence adapter, and
6
+ * worker executions (`runs/worker-executions-registry.ts`). Each process entry calls it once,
7
+ * beside the bundled runner load, before it can delete, reclaim or archive a run or start a
8
+ * worker. A second call registers the same objects again, which the registries ignore.
9
9
  */
10
10
  export declare function registerBuiltInRunSlots(): void;
11
11
  /** Seal after every built-in and extension registration at the boot boundary. */
@@ -3,24 +3,27 @@ import { autosaveDeletionGate, autosaveRemovalCleanup } from './autosave-removal
3
3
  import { taskFilesRemovalCleanup } from './task-files/removal-slot.js';
4
4
  import { registerTaskFileKind, sealTaskFileKinds } from './task-files/kind.js';
5
5
  import { artifactKind } from './task-files/artifact-kind.js';
6
- import { workerEvidencePreparation } from './delegation/removal-slot.js';
6
+ import { taskResultPreparation } from './runs/task-result-preparation.js';
7
+ import { registerWorkerWorkspaceEvidence, sealWorkerWorkspaceEvidence } from './runs/worker-workspace-evidence-registry.js';
8
+ import { workerWorkspaceEvidence } from './delegation/removal-slot.js';
7
9
  import { registerWorkerExecutions, sealWorkerExecutions } from './runs/worker-executions-registry.js';
8
10
  import { createWorkerExecutions } from './delegation/worker-executions.js';
9
11
  /** The removal slots that ship with Squawk, in the order each path asks them. */
10
12
  export const BUILT_IN_RUN_SLOTS = {
11
13
  gates: [autosaveDeletionGate],
12
- preparations: [workerEvidencePreparation],
14
+ preparations: [taskResultPreparation],
13
15
  cleanups: [taskFilesRemovalCleanup, autosaveRemovalCleanup],
14
16
  };
15
17
  /**
16
- * Register the built-in task file kinds, removal slots and the worker executions
17
- * (`runs/worker-executions-registry.ts`). Each process entry calls it once, beside
18
- * the bundled runner load, before it can delete, reclaim or archive a run or start a worker. A
19
- * second call registers the same objects again, which the registries ignore.
18
+ * Register the built-in task file kinds, removal slots, worker workspace evidence adapter, and
19
+ * worker executions (`runs/worker-executions-registry.ts`). Each process entry calls it once,
20
+ * beside the bundled runner load, before it can delete, reclaim or archive a run or start a
21
+ * worker. A second call registers the same objects again, which the registries ignore.
20
22
  */
21
23
  export function registerBuiltInRunSlots() {
22
24
  registerTaskFileKind(artifactKind);
23
25
  registerWorkerExecutions(createWorkerExecutions);
26
+ registerWorkerWorkspaceEvidence(workerWorkspaceEvidence);
24
27
  registerRunSlots(BUILT_IN_RUN_SLOTS);
25
28
  }
26
29
  /** Seal after every built-in and extension registration at the boot boundary. */
@@ -28,5 +31,6 @@ export function sealBuiltInRunSlots() {
28
31
  sealTaskFileKinds();
29
32
  sealRunSlots();
30
33
  sealWorkerExecutions();
34
+ sealWorkerWorkspaceEvidence();
31
35
  }
32
36
  //# sourceMappingURL=built-in-run-slots.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"built-in-run-slots.js","sourceRoot":"","sources":["../src/built-in-run-slots.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAiB,MAAM,yBAAyB,CAAC;AACxF,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAA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E,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,+BAA+B,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AAC5H,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AACtG,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAE3E,iFAAiF;AACjF,MAAM,CAAC,MAAM,kBAAkB,GAAa;IAC1C,KAAK,EAAE,CAAC,oBAAoB,CAAC;IAC7B,YAAY,EAAE,CAAC,qBAAqB,CAAC;IACrC,QAAQ,EAAE,CAAC,uBAAuB,EAAE,sBAAsB,CAAC;CAC5D,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,uBAAuB;IACrC,oBAAoB,CAAC,YAAY,CAAC,CAAC;IACnC,wBAAwB,CAAC,sBAAsB,CAAC,CAAC;IACjD,+BAA+B,CAAC,uBAAuB,CAAC,CAAC;IACzD,gBAAgB,CAAC,kBAAkB,CAAC,CAAC;AACvC,CAAC;AAED,iFAAiF;AACjF,MAAM,UAAU,mBAAmB;IACjC,iBAAiB,EAAE,CAAC;IACpB,YAAY,EAAE,CAAC;IACf,oBAAoB,EAAE,CAAC;IACvB,2BAA2B,EAAE,CAAC;AAChC,CAAC"}
@@ -121,12 +121,9 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
121
121
  } & {
122
122
  "/api/v1/tools/:name": {
123
123
  $post: {
124
- output: {
125
- code: string;
126
- message: string;
127
- };
124
+ output: never;
128
125
  outputFormat: "json";
129
- status: 401;
126
+ status: import("hono/utils/http-status").ContentfulStatusCode;
130
127
  input: {
131
128
  json: unknown;
132
129
  } & {
@@ -149,9 +146,12 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
149
146
  };
150
147
  };
151
148
  } | {
152
- output: never;
149
+ output: {
150
+ code: string;
151
+ message: string;
152
+ };
153
153
  outputFormat: "json";
154
- status: import("hono/utils/http-status").ContentfulStatusCode;
154
+ status: 401;
155
155
  input: {
156
156
  json: unknown;
157
157
  } & {
@@ -1,4 +1,6 @@
1
- import type { ReclaimPreparation } from '../runs/removal-slots.ts';
2
- /** The reclaim preparation of workers: an owned worker's evidence is saved before its worktree goes.
3
- * A worker whose evidence could not be saved keeps its worktree until the next pass. */
4
- export declare const workerEvidencePreparation: ReclaimPreparation;
1
+ import type { WorkerWorkspaceEvidenceAdapter } from '../runs/worker-workspace-evidence-registry.ts';
2
+ /**
3
+ * Worker-specific workspace evidence adapter registered at boot (`built-in-run-slots.ts`) so core
4
+ * task result building and reclaim preparation read worker workspaces without importing `delegation/`.
5
+ */
6
+ export declare const workerWorkspaceEvidence: WorkerWorkspaceEvidenceAdapter;
@@ -1,20 +1,13 @@
1
- import { collectWorkerEvidence } from './results.js';
2
- /** Snapshot parent-owned worker evidence before the checkout goes. A collect/commit failure
3
- * returns false so the directory is left for the next pass. */
4
- async function preserveWorkerResult(repoRoot, store, run) {
5
- if (run.delegation?.role !== 'worker')
6
- return true;
7
- const evidence = await collectWorkerEvidence(repoRoot, store, run);
8
- store.workerResults.commitWorkerResult(run.delegation.parentRunId, evidence.result, evidence.diffSnapshot);
9
- return evidence.diffSnapshot !== undefined || evidence.result.diff.state === 'available';
10
- }
11
- /** The reclaim preparation of workers: an owned worker's evidence is saved before its worktree goes.
12
- * A worker whose evidence could not be saved keeps its worktree until the next pass. */
13
- export const workerEvidencePreparation = {
14
- name: 'worker evidence',
15
- async prepare(run, { repoRoot, store }) {
16
- if (!(await preserveWorkerResult(repoRoot, store, run)))
17
- throw new Error('Worker evidence was not saved');
18
- },
1
+ import { workspaceDirectoryRemoved, workspaceKindOf } from './workspace-kinds.js';
2
+ /**
3
+ * Worker-specific workspace evidence adapter registered at boot (`built-in-run-slots.ts`) so core
4
+ * task result building and reclaim preparation read worker workspaces without importing `delegation/`.
5
+ */
6
+ export const workerWorkspaceEvidence = {
7
+ workspaceDirectoryRemoved,
8
+ noDiff: (run) => workspaceKindOf(run).noDiff,
9
+ readHead: (repoRoot, run) => workspaceKindOf(run).readHead(repoRoot, run),
10
+ readDiff: (repoRoot, run) => workspaceKindOf(run).readDiff(repoRoot, run),
11
+ changeReport: (dataDir, run, target) => workspaceKindOf(run).changeReport(dataDir, run, target),
19
12
  };
20
13
  //# sourceMappingURL=removal-slot.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"removal-slot.js","sourceRoot":"","sources":["../../src/delegation/removal-slot.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAErD;gEACgE;AAChE,KAAK,UAAU,oBAAoB,CAAC,QAAgB,EAAE,KAA8B,EAAE,GAAc;IAClG,IAAI,GAAG,CAAC,UAAU,EAAE,IAAI,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IACnD,MAAM,QAAQ,GAAG,MAAM,qBAAqB,CAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;IACnE,KAAK,CAAC,aAAa,CAAC,kBAAkB,CAAC,GAAG,CAAC,UAAU,CAAC,WAAW,EAAE,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,YAAY,CAAC,CAAC;IAC3G,OAAO,QAAQ,CAAC,YAAY,KAAK,SAAS,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,KAAK,WAAW,CAAC;AAC3F,CAAC;AAED;yFACyF;AACzF,MAAM,CAAC,MAAM,yBAAyB,GAAuB;IAC3D,IAAI,EAAE,iBAAiB;IACvB,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE;QACpC,IAAI,CAAC,CAAC,MAAM,oBAAoB,CAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;IAC5G,CAAC;CACF,CAAC"}
1
+ {"version":3,"file":"removal-slot.js","sourceRoot":"","sources":["../../src/delegation/removal-slot.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAElF;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAmC;IACrE,yBAAyB;IACzB,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,MAAM;IAC5C,QAAQ,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,QAAQ,EAAE,GAAG,CAAC;IACzE,QAAQ,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,QAAQ,EAAE,GAAG,CAAC;IACzE,YAAY,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,YAAY,CAAC,OAAO,EAAE,GAAG,EAAE,MAAM,CAAC;CAChG,CAAC"}
@@ -1,10 +1,9 @@
1
1
  import type { WorkerCollectedResult } from '../contract/index.js';
2
2
  import type { RunAccess, RunEventLog, WorkerExecutions, WorkerResults } from '../runs/ports.ts';
3
3
  import type { RunEvent, RunRecord } from '../runs/store.ts';
4
+ import { topLevelAssistantText, type FinalTaskMessage } from '../runs/task-result-builder.ts';
5
+ export { topLevelAssistantText };
4
6
  export declare const workerRevision: (run: RunRecord) => number;
5
- /** The text of a top-level assistant message event, v1 `text` or v2 `item.completed`; the newest
6
- * one is what `collect` reports and what a park notice quotes (hearsay-tools/cezarion#1327). */
7
- export declare function topLevelAssistantText(event: RunEvent): string | undefined;
8
7
  /** The store topics worker evidence collection reads. */
9
8
  export interface WorkerEvidenceStore {
10
9
  readonly workerResults: Pick<WorkerResults, 'readWorkerResult' | 'readWorkerResultDiff' | 'workerResultSnapshotPath'>;
@@ -17,15 +16,13 @@ export declare function collectWorkerEvidence(repoRoot: string, store: WorkerEvi
17
16
  result: WorkerCollectedResult;
18
17
  diffSnapshot?: string;
19
18
  }>;
20
- export interface FinalWorkerMessage {
21
- text: string;
22
- source: 'assistant' | 'failure';
23
- seq: number;
24
- }
25
- /** The message `collect` and `worker summary` report for this execution. A failed worker's message
26
- * names the runner's failure reason, so its parent can act on it without reading the transcript
27
- * (hearsay-tools/squawk#3337); it takes precedence over the last assistant text. Otherwise it is the
28
- * newest non-blank top-level assistant text of this execution. */
19
+ export type FinalWorkerMessage = FinalTaskMessage;
20
+ /**
21
+ * The message `collect` and `worker summary` report for this execution. A failed worker's message
22
+ * names the runner's failure reason, so its parent can act on it without reading the transcript
23
+ * (hearsay-tools/squawk#3337); it takes precedence over the last assistant text. Otherwise it is the
24
+ * newest non-blank top-level assistant text of this execution.
25
+ */
29
26
  export declare function finalWorkerMessage(run: RunRecord, allEvents: RunEvent[]): FinalWorkerMessage | undefined;
30
27
  /** History deletion retains observation bytes, not attachment files or live Git refs. */
31
28
  export declare function revalidateRetainedWorkerResult(repoRoot: string, previous: WorkerCollectedResult, dataDir?: string): Promise<WorkerCollectedResult>;
@@ -1,183 +1,56 @@
1
- import { runDataDir } from '../legacy-runs.js';
2
- import { projectPaths } from '../project-paths.js';
3
1
  import { randomUUID } from 'node:crypto';
4
2
  import { existsSync } from 'node:fs';
5
3
  import { join } from 'node:path';
6
- import { isLiveStatus } from '../contract/index.js';
7
- import { isAttachmentFileName, resolveAttachmentPath } from '../workflows/attachment-path.js';
8
- import { workspaceDirectoryRemoved, workspaceKindOf } from './workspace-kinds.js';
9
- import { artifactContentPath, artifactDirectory, listArtifacts, readArtifact } from '../task-files/artifact-kind.js';
10
- import { workerObservation } from '../runs/delegation-state.js';
11
- import { commandText } from '../home/command.js';
12
- import { messageLineCount } from './worker-summary.js';
13
- const SUMMARY_CHARS = 4000;
4
+ import { runDataDir } from '../legacy-runs.js';
5
+ import { projectPaths } from '../project-paths.js';
6
+ import { buildWorkerTaskResult, finalTaskMessage, topLevelAssistantText, } from '../runs/task-result-builder.js';
7
+ import { artifactDirectory, readArtifact } from '../task-files/artifact-kind.js';
8
+ import { resolveAttachmentPath } from '../workflows/attachment-path.js';
9
+ import { workerWorkspaceEvidence } from './removal-slot.js';
10
+ export { topLevelAssistantText };
14
11
  export const workerRevision = (run) => run.delegation?.role === 'worker' ? run.delegation.executionRevision ?? 0 : 0;
15
- /** The text of a top-level assistant message event, v1 `text` or v2 `item.completed`; the newest
16
- * one is what `collect` reports and what a park notice quotes (hearsay-tools/cezarion#1327). */
17
- export function topLevelAssistantText(event) {
18
- const item = event.item;
19
- const text = event.type === 'text' && !event.parentItemId ? event.text
20
- : event.type === 'item.completed' && item?.kind === 'message' && item.role === 'assistant' && item.parentItemId === undefined ? item.text : undefined;
21
- return typeof text === 'string' ? text : undefined;
22
- }
23
12
  /** Snapshot collection is deliberately read-only until the service rechecks lifecycle identity. */
24
13
  export async function collectWorkerEvidence(repoRoot, store, run) {
25
- if (run.delegation?.role !== 'worker')
26
- throw Error('missing worker ownership');
27
- const delegation = run.delegation;
28
- const previous = store.workerResults.readWorkerResult(delegation.parentRunId, run.id);
29
- // One async read (#880): an archived transcript decodes with the async brotli API.
30
- const allEvents = await store.eventLog.readEventsAsync(run.id);
31
- const summary = boundedSummary(run, finalWorkerMessage(run, allEvents));
32
- const destroyed = delegation.destroy?.phase === 'complete';
33
- const workspaceRemoved = !!delegation.destroy && workspaceDirectoryRemoved(delegation.workspace, delegation.destroy.remaining);
34
- const { lastExecutionOutcome } = executionOutcome(run);
35
- const observation = workerObservation(run, store.workerExecutions.readWorkerExecution(run.id));
36
- const head = await readWorkerHead(repoRoot, run, previous, workspaceRemoved);
37
- const { diff, diffSnapshot } = await readWorkerDiff(repoRoot, store, run, delegation, { destroyed, workspaceRemoved });
38
- const changes = await readWorkspaceChanges(store, run);
39
- const artifacts = await listWorkerArtifacts(store.claims.sourceDataDir(run.id), run, delegation, allEvents);
40
- return { result: {
41
- workerId: run.id, parentRunId: delegation.parentRunId, revision: workerRevision(run), observedAt: new Date().toISOString(),
42
- status: run.status, outcome: destroyed ? 'destroyed' : lastExecutionOutcome, lastExecutionOutcome,
43
- ...observation,
44
- ...(run.error ? { error: run.error.slice(0, 2000) } : {}),
45
- ...(run.runner ? { backend: run.runner } : {}), ...(run.model ? { model: run.model } : {}),
46
- baselineSha: delegation.workspace.baselineSha, workspace: { ...delegation.workspace, state: workspaceRemoved ? 'deleted' : head.state === 'available' ? 'available' : 'unavailable' }, cleanup: delegation.destroy?.phase ?? 'retained',
47
- summary, head, diff, ...changes, artifacts,
48
- }, ...(diffSnapshot === undefined ? {} : { diffSnapshot }) };
49
- }
50
- /** The kind's report of what changed in the workspace's directory, for the worker's current execution.
51
- * Only a worker that is queued, running or waiting counts as still running: one that stopped in any
52
- * other way, with or without a complete execution record, is never compared with the directory as it is. */
53
- async function readWorkspaceChanges(store, run) {
54
- const changes = await workspaceKindOf(run).changeReport(store.claims.sourceDataDir(run.id), run, { generation: store.workerExecutions.readWorkerExecution(run.id)?.generation, settled: !isLiveStatus(run.status) });
55
- return changes ? { changes } : {};
14
+ const built = await buildWorkerTaskResult(repoRoot, store, run, { workerWorkspace: workerWorkspaceEvidence });
15
+ return {
16
+ result: built.result,
17
+ ...(built.diffSnapshot === undefined ? {} : { diffSnapshot: built.diffSnapshot }),
18
+ };
56
19
  }
57
- /** The message `collect` and `worker summary` report for this execution. A failed worker's message
58
- * names the runner's failure reason, so its parent can act on it without reading the transcript
59
- * (hearsay-tools/squawk#3337); it takes precedence over the last assistant text. Otherwise it is the
60
- * newest non-blank top-level assistant text of this execution. */
20
+ /**
21
+ * The message `collect` and `worker summary` report for this execution. A failed worker's message
22
+ * names the runner's failure reason, so its parent can act on it without reading the transcript
23
+ * (hearsay-tools/squawk#3337); it takes precedence over the last assistant text. Otherwise it is the
24
+ * newest non-blank top-level assistant text of this execution.
25
+ */
61
26
  export function finalWorkerMessage(run, allEvents) {
62
- const startSeq = run.delegation?.role === 'worker' ? run.delegation.executionStartSeq ?? -1 : -1;
63
- const events = allEvents.filter(event => event.seq > startSeq);
64
- if (run.status === 'failed' && run.error?.trim())
65
- return { text: `Runner failure: ${run.error.trim()}`, source: 'failure', seq: events.at(-1)?.seq ?? 0 };
66
- let message;
67
- for (const event of events) {
68
- const text = topLevelAssistantText(event);
69
- if (text?.trim())
70
- message = { text, source: 'assistant', seq: event.seq };
71
- }
72
- return message;
73
- }
74
- /** The final message bounded to 4000 characters. A cut message names the command that reads all of it by line ranges (hearsay-tools/squawk#4556). */
75
- function boundedSummary(run, message) {
76
- if (!message)
77
- return { state: 'unavailable', reason: 'no-assistant-output' };
78
- const truncated = message.text.length > SUMMARY_CHARS;
79
- return { state: 'available', text: message.text.slice(0, SUMMARY_CHARS), source: message.source, seq: message.seq, truncated,
80
- totalLines: messageLineCount(message.text), ...(truncated ? { fullCommand: commandText(`cez worker summary ${run.id}`) } : {}) };
81
- }
82
- /** The public status as an execution outcome. Settlement also needs private termination proof. */
83
- function executionOutcome(run) {
84
- const lastExecutionOutcome = run.status === 'review' ? 'review-ready' : run.status === 'done' ? 'completed'
85
- : run.status === 'failed' ? 'failed' : run.status === 'cancelled' ? 'cancelled' : 'running';
86
- return { lastExecutionOutcome };
87
- }
88
- /** The owned workspace's verified HEAD. A failed read keeps the last collected SHA: `unverified`, or `deleted` once the worktree is removed. */
89
- async function readWorkerHead(repoRoot, run, previous, workspaceRemoved) {
90
- const historicalSha = previous?.head && 'sha' in previous.head ? previous.head.sha : undefined;
91
- let head = { state: workspaceRemoved ? 'deleted' : 'unavailable', reason: 'missing', ...(historicalSha ? { sha: historicalSha } : {}) };
92
- try {
93
- const sha = await workspaceKindOf(run).readHead(repoRoot, run);
94
- if (!/^(?:[0-9a-f]{40}|[0-9a-f]{64})$/.test(sha))
95
- throw Error('invalid HEAD');
96
- head = { state: 'available', sha };
97
- }
98
- catch {
99
- if (!workspaceRemoved)
100
- head = { state: 'unavailable', reason: 'unverified', ...(historicalSha ? { sha: historicalSha } : {}) };
101
- }
102
- return head;
103
- }
104
- /** The owned workspace's diff, or this revision's retained snapshot when the live read fails. */
105
- async function readWorkerDiff(repoRoot, store, run, delegation, cleanup) {
106
- const noDiff = workspaceKindOf(run).noDiff;
107
- if (noDiff)
108
- return { diff: { state: 'unavailable', reason: 'unsupported', detail: noDiff }, diffSnapshot: undefined };
109
- let diff = { state: cleanup.workspaceRemoved ? 'deleted' : 'unavailable', reason: 'missing' };
110
- let diffSnapshot;
111
- try {
112
- const observation = await workspaceKindOf(run).readDiff(repoRoot, run);
113
- diffSnapshot = observation.diff;
114
- const snapshotId = randomUUID();
115
- diff = { state: 'available', snapshotId, path: store.workerResults.workerResultSnapshotPath(delegation.parentRunId, run.id, snapshotId), truncated: observation.truncated };
116
- }
117
- catch {
118
- if (!cleanup.destroyed)
119
- diff = { state: 'unavailable', reason: 'unverified' };
120
- }
121
- // Re-read after the live workspace checks. A concurrent reclaim can commit a
122
- // snapshot while this collect still holds a `previous` captured as undefined.
123
- if (diffSnapshot === undefined) {
124
- const stored = store.workerResults.readWorkerResult(delegation.parentRunId, run.id);
125
- if (stored?.revision === workerRevision(run) && stored.diff.state === 'available') {
126
- const retained = store.workerResults.readWorkerResultDiff(delegation.parentRunId, run.id);
127
- if (retained !== undefined) {
128
- diffSnapshot = retained;
129
- diff = { ...stored.diff, snapshotId: randomUUID() };
130
- }
131
- }
132
- }
133
- return { diff, diffSnapshot };
134
- }
135
- /** Published artifacts, newest first, then image and parent-attachment descriptors; at most 32. */
136
- async function listWorkerArtifacts(dataDir, run, delegation, allEvents) {
137
- const ids = new Set();
138
- for (const event of allEvents) {
139
- if (event.type !== 'image' || typeof event.url !== 'string')
140
- continue;
141
- const match = event.url.match(new RegExp(`^/api/(?:v1/)?runs/${run.id}/images/([^/]+)$`));
142
- if (match && isAttachmentFileName(match[1]) && match[1].length <= 255)
143
- ids.add(match[1]);
144
- }
145
- for (const input of delegation.context?.inputs ?? [])
146
- if (input.source.kind === 'parent-attachment') {
147
- const name = input.path.split('/').at(-1);
148
- if (isAttachmentFileName(name))
149
- ids.add(name);
150
- }
151
- const dir = artifactDirectory(dataDir, run.id);
152
- const published = await listArtifacts(dir, run.id);
153
- const publishedItems = published.slice().reverse().map(item => ({ state: 'available', id: `published:${item.id}`, path: artifactContentPath(dir, item.id) }));
154
- const items = [...publishedItems, ...[...ids].map((id) => {
155
- const path = join(runDataDir(dataDir, run.id), 'runs', `${run.id}-images`, id);
156
- if (resolveAttachmentPath(dataDir, run.id, id))
157
- return { state: 'available', id, path };
158
- return existsSync(path) ? { state: 'unavailable', reason: 'unreadable', id, path } : { state: 'deleted', reason: 'missing', id, path };
159
- })].slice(0, 32);
160
- return { state: 'available', items, truncated: ids.size + published.length > 32 };
27
+ return finalTaskMessage(run, allEvents, { strictScope: true });
161
28
  }
162
29
  /** History deletion retains observation bytes, not attachment files or live Git refs. */
163
30
  export async function revalidateRetainedWorkerResult(repoRoot, previous, dataDir = projectPaths(repoRoot).write) {
164
- return { ...previous, observedAt: new Date().toISOString(),
31
+ return {
32
+ ...previous,
33
+ observedAt: new Date().toISOString(),
165
34
  head: previous.head.state === 'available' ? { state: 'unavailable', reason: 'unverified', sha: previous.head.sha } : previous.head,
166
35
  diff: previous.diff.state === 'available' ? { ...previous.diff, snapshotId: randomUUID() } : previous.diff,
167
- artifacts: previous.artifacts.state !== 'available' ? previous.artifacts : { ...previous.artifacts,
168
- items: await Promise.all(previous.artifacts.items.map(async (item) => {
169
- if (item.id.startsWith('published:')) {
170
- const available = await readArtifact(artifactDirectory(dataDir, previous.workerId), previous.workerId, item.id.slice('published:'.length));
171
- return available ? { state: 'available', id: item.id, path: item.path }
172
- : { state: 'deleted', reason: 'missing', id: item.id, path: item.path };
173
- }
174
- return resolveAttachmentPath(dataDir, previous.workerId, item.id)
175
- ? { state: 'available', id: item.id, path: item.path }
176
- : existsSync(join(runDataDir(dataDir, previous.workerId), 'runs', `${previous.workerId}-images`, item.id))
177
- ? { state: 'unavailable', reason: 'unreadable', id: item.id, path: item.path }
178
- : { state: 'deleted', reason: 'missing', id: item.id, path: item.path };
179
- })),
180
- },
36
+ artifacts: previous.artifacts.state !== 'available'
37
+ ? previous.artifacts
38
+ : {
39
+ ...previous.artifacts,
40
+ items: await Promise.all(previous.artifacts.items.map(async (item) => {
41
+ if (item.id.startsWith('published:')) {
42
+ const available = await readArtifact(artifactDirectory(dataDir, previous.workerId), previous.workerId, item.id.slice('published:'.length));
43
+ return available
44
+ ? { state: 'available', id: item.id, path: item.path }
45
+ : { state: 'deleted', reason: 'missing', id: item.id, path: item.path };
46
+ }
47
+ return resolveAttachmentPath(dataDir, previous.workerId, item.id)
48
+ ? { state: 'available', id: item.id, path: item.path }
49
+ : existsSync(join(runDataDir(dataDir, previous.workerId), 'runs', `${previous.workerId}-images`, item.id))
50
+ ? { state: 'unavailable', reason: 'unreadable', id: item.id, path: item.path }
51
+ : { state: 'deleted', reason: 'missing', id: item.id, path: item.path };
52
+ })),
53
+ },
181
54
  };
182
55
  }
183
56
  //# sourceMappingURL=results.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"results.js","sourceRoot":"","sources":["../../src/delegation/results.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAG3E,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAC9F,OAAO,EAAE,yBAAyB,EAAE,eAAe,EAAE,MAA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E,SAAkB,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;gBAChG,CAAC,CAAC,CAAC;aACJ;KACN,CAAC;AACJ,CAAC"}
@@ -97,27 +97,6 @@ export declare function createDelegationRoutes(service: DelegationService, crede
97
97
  "/discover": {
98
98
  $post: {
99
99
  output: {
100
- scope: "host-default-account";
101
- runners: {
102
- requiresAccountHome?: boolean | undefined;
103
- status: "connected" | "disconnected" | "not-installed" | "unknown";
104
- enabled?: boolean | undefined;
105
- hint?: string | undefined;
106
- authFailureId?: string | undefined;
107
- runner: string;
108
- }[];
109
- } | {
110
- runner: string;
111
- models: {
112
- id: string;
113
- label: string;
114
- description: string;
115
- effortLevels?: ("high" | "low" | "max" | "medium" | "xhigh")[] | undefined;
116
- }[];
117
- source: "cache" | "live" | "unavailable";
118
- stale: boolean;
119
- reason?: string | undefined;
120
- } | {
121
100
  tasks: {
122
101
  id: string;
123
102
  title: string;
@@ -138,6 +117,27 @@ export declare function createDelegationRoutes(service: DelegationService, crede
138
117
  inboxLimit: number;
139
118
  warning?: string | undefined;
140
119
  } | undefined;
120
+ } | {
121
+ scope: "host-default-account";
122
+ runners: {
123
+ requiresAccountHome?: boolean | undefined;
124
+ status: "connected" | "disconnected" | "not-installed" | "unknown";
125
+ enabled?: boolean | undefined;
126
+ hint?: string | undefined;
127
+ authFailureId?: string | undefined;
128
+ runner: string;
129
+ }[];
130
+ } | {
131
+ runner: string;
132
+ models: {
133
+ id: string;
134
+ label: string;
135
+ description: string;
136
+ effortLevels?: ("high" | "low" | "max" | "medium" | "xhigh")[] | undefined;
137
+ }[];
138
+ source: "cache" | "live" | "unavailable";
139
+ stale: boolean;
140
+ reason?: string | undefined;
141
141
  };
142
142
  outputFormat: "json";
143
143
  status: 200;
@@ -82,6 +82,16 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
82
82
  source: "cache" | "live" | "unavailable";
83
83
  stale: boolean;
84
84
  reason?: string | undefined;
85
+ } | {
86
+ scope: "host-default-account";
87
+ runners: {
88
+ requiresAccountHome?: boolean | undefined;
89
+ status: "connected" | "disconnected" | "not-installed" | "unknown";
90
+ enabled?: boolean | undefined;
91
+ hint?: string | undefined;
92
+ authFailureId?: string | undefined;
93
+ runner: string;
94
+ }[];
85
95
  } | {
86
96
  tasks: {
87
97
  id: string;
@@ -103,16 +113,6 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
103
113
  inboxLimit: number;
104
114
  warning?: string | undefined;
105
115
  } | undefined;
106
- } | {
107
- scope: "host-default-account";
108
- runners: {
109
- requiresAccountHome?: boolean | undefined;
110
- status: "connected" | "disconnected" | "not-installed" | "unknown";
111
- enabled?: boolean | undefined;
112
- hint?: string | undefined;
113
- authFailureId?: string | undefined;
114
- runner: string;
115
- }[];
116
116
  };
117
117
  outputFormat: "json";
118
118
  status: 200;