@hearsay-tools/squawk 0.18.0-pr4083.7813 → 0.18.0-pr4088.7818

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 (111) hide show
  1. package/dist/activity/publisher.js +2 -2
  2. package/dist/activity/publisher.js.map +1 -1
  3. package/dist/activity/read-model.js +1 -1
  4. package/dist/activity/read-model.js.map +1 -1
  5. package/dist/activity/requests.d.ts +4 -2
  6. package/dist/activity/requests.js +1 -1
  7. package/dist/activity/requests.js.map +1 -1
  8. package/dist/artifacts/reports-index.d.ts +2 -1
  9. package/dist/artifacts/reports-index.js +1 -1
  10. package/dist/artifacts/reports-index.js.map +1 -1
  11. package/dist/ci-wait/controller.d.ts +46 -46
  12. package/dist/delegation/conversations.d.ts +6 -2
  13. package/dist/delegation/conversations.js +3 -2
  14. package/dist/delegation/conversations.js.map +1 -1
  15. package/dist/delegation/family-end.d.ts +4 -2
  16. package/dist/delegation/results.js +2 -2
  17. package/dist/delegation/results.js.map +1 -1
  18. package/dist/delegation/routes.d.ts +11 -11
  19. package/dist/delegation/routes.js +1 -1
  20. package/dist/delegation/routes.js.map +1 -1
  21. package/dist/delegation/scratch-cleanup.js +2 -2
  22. package/dist/delegation/scratch-cleanup.js.map +1 -1
  23. package/dist/delegation/service.js +2 -2
  24. package/dist/delegation/service.js.map +1 -1
  25. package/dist/delegation/transport.d.ts +10 -10
  26. package/dist/delegation/worker-cleanup.js +1 -1
  27. package/dist/delegation/worker-cleanup.js.map +1 -1
  28. package/dist/preview/host.d.ts +2 -1
  29. package/dist/preview/host.js +1 -1
  30. package/dist/preview/host.js.map +1 -1
  31. package/dist/project-migration/live.js +3 -3
  32. package/dist/project-migration/live.js.map +1 -1
  33. package/dist/runs/claim-families.d.ts +1 -1
  34. package/dist/runs/claim-families.js +1 -1
  35. package/dist/runs/live-tasks.js +1 -1
  36. package/dist/runs/live-tasks.js.map +1 -1
  37. package/dist/runs/loaded-run-exits.d.ts +23 -0
  38. package/dist/runs/loaded-run-exits.js +46 -1
  39. package/dist/runs/loaded-run-exits.js.map +1 -1
  40. package/dist/runs/ports.d.ts +67 -26
  41. package/dist/runs/retention.d.ts +3 -1
  42. package/dist/runs/retention.js +5 -5
  43. package/dist/runs/retention.js.map +1 -1
  44. package/dist/runs/run-archive.d.ts +1217 -0
  45. package/dist/runs/run-archive.js +332 -0
  46. package/dist/runs/run-archive.js.map +1 -0
  47. package/dist/runs/run-claims-topic.d.ts +130 -0
  48. package/dist/runs/run-claims-topic.js +258 -0
  49. package/dist/runs/run-claims-topic.js.map +1 -0
  50. package/dist/runs/run-claims.d.ts +1 -1
  51. package/dist/runs/run-claims.js +1 -1
  52. package/dist/runs/run-claims.js.map +1 -1
  53. package/dist/runs/run-database.d.ts +1 -1
  54. package/dist/runs/run-index.js +3 -1
  55. package/dist/runs/run-index.js.map +1 -1
  56. package/dist/runs/run-pins.d.ts +38 -0
  57. package/dist/runs/run-pins.js +45 -0
  58. package/dist/runs/run-pins.js.map +1 -0
  59. package/dist/runs/run-read-flags.d.ts +58 -0
  60. package/dist/runs/run-read-flags.js +87 -0
  61. package/dist/runs/run-read-flags.js.map +1 -0
  62. package/dist/runs/run-references.d.ts +1 -1
  63. package/dist/runs/run-references.js +1 -1
  64. package/dist/runs/run-references.js.map +1 -1
  65. package/dist/runs/store-open.d.ts +45 -0
  66. package/dist/runs/store-open.js +89 -0
  67. package/dist/runs/store-open.js.map +1 -0
  68. package/dist/runs/store.d.ts +13 -237
  69. package/dist/runs/store.js +78 -816
  70. package/dist/runs/store.js.map +1 -1
  71. package/dist/runs/webhook.d.ts +3 -1
  72. package/dist/runs/webhook.js +2 -2
  73. package/dist/runs/webhook.js.map +1 -1
  74. package/dist/serve-boot.d.ts +2 -2
  75. package/dist/serve-boot.js +1 -1
  76. package/dist/serve-boot.js.map +1 -1
  77. package/dist/server/archive-on-merge.js +10 -10
  78. package/dist/server/archive-on-merge.js.map +1 -1
  79. package/dist/server/completion-actions.js +8 -8
  80. package/dist/server/completion-actions.js.map +1 -1
  81. package/dist/server/models-routes.d.ts +13 -13
  82. package/dist/server/project-context.js +2 -2
  83. package/dist/server/project-context.js.map +1 -1
  84. package/dist/server/project-run-files.d.ts +3 -1
  85. package/dist/server/project-run-files.js +3 -3
  86. package/dist/server/project-run-files.js.map +1 -1
  87. package/dist/server/reports-api.d.ts +2 -2
  88. package/dist/server/run-checkout.d.ts +3 -1
  89. package/dist/server/run-checkout.js +3 -3
  90. package/dist/server/run-checkout.js.map +1 -1
  91. package/dist/server/run-event-feed.js +2 -2
  92. package/dist/server/run-event-feed.js.map +1 -1
  93. package/dist/server/server.d.ts +12123 -12123
  94. package/dist/server/server.js +15 -15
  95. package/dist/server/server.js.map +1 -1
  96. package/dist/workflows/run/continuation-acceptance.js +1 -1
  97. package/dist/workflows/run/continuation-acceptance.js.map +1 -1
  98. package/dist/workflows/run/family-reconciler.js +2 -2
  99. package/dist/workflows/run/family-reconciler.js.map +1 -1
  100. package/dist/workflows/run/maintenance-claims.js +6 -6
  101. package/dist/workflows/run/maintenance-claims.js.map +1 -1
  102. package/dist/workflows/run/run-cancel.js +1 -1
  103. package/dist/workflows/run/run-cancel.js.map +1 -1
  104. package/dist/workflows/run/run-recovery.js +3 -3
  105. package/dist/workflows/run/run-recovery.js.map +1 -1
  106. package/dist/workflows/run/run-settlement.js +1 -1
  107. package/dist/workflows/run/run-settlement.js.map +1 -1
  108. package/dist/workflows/run.js +7 -7
  109. package/dist/workflows/run.js.map +1 -1
  110. package/package.json +4 -4
  111. package/scripts/benchmark-run-store.ts +2 -2
@@ -21,7 +21,7 @@ export declare function originatingIssue(run: RunRecord): number | undefined;
21
21
  export declare function resolveIssueReference(run: RunRecord, handle?: RepoHandle | null): string | undefined;
22
22
  export declare function restoreOriginatingIssue(run: RunRecord): void;
23
23
  /** Whether a stored summary names a referenced PR or issue, or a declared PR, outside `handle`'s
24
- * repository: a row `rescopeRun` may change once the handle is known (`LOAD_REPAIR_SQL`, store.ts). */
24
+ * repository: a row `rescopeRun` may change once the handle is known (`LOAD_REPAIR_SQL`, store-open.ts). */
25
25
  export declare function namesForeignReference(summary: Pick<RunRecord, 'referencedPullRequestUrl' | 'referencedIssueUrl' | 'pullRequests'>, handle: RepoHandle): boolean;
26
26
  /**
27
27
  * Drop this run's referenced PR/issue if the project's handle proves it foreign and the prompt
@@ -113,7 +113,7 @@ export function restoreOriginatingIssue(run) {
113
113
  }
114
114
  }
115
115
  /** Whether a stored summary names a referenced PR or issue, or a declared PR, outside `handle`'s
116
- * repository: a row `rescopeRun` may change once the handle is known (`LOAD_REPAIR_SQL`, store.ts). */
116
+ * repository: a row `rescopeRun` may change once the handle is known (`LOAD_REPAIR_SQL`, store-open.ts). */
117
117
  export function namesForeignReference(summary, handle) {
118
118
  const own = `${handle.owner}/${handle.name}`.toLowerCase();
119
119
  const declared = (summary.pullRequests ?? []).filter((entry) => entry.source === 'declared').map((entry) => entry.url);
@@ -1 +1 @@
1
- {"version":3,"file":"run-references.js","sourceRoot":"","sources":["../../src/runs/run-references.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAEzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGvF,MAAM,CAAC,MAAM,SAAS,GAAG,oDAAoD,CAAC;AAC9E,MAAM,CAAC,MAAM,YAAY,GAAG,sDAAsD,CAAC;AAEnF,+FAA+F;AAC/F,8FAA8F;AAC9F,kGAAkG;AAClG,MAAM,aAAa,GACjB,wJAAwJ,CAAC;AAE3J;0EAC0E;AAC1E,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAE5B;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAClC,UAA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store.ts`. */
3
+ type ParseRunRecords = typeof import('./store.ts').parseRunRecords;
4
+ /** The pauses between open attempts while the database is busy, when `open` may wait (a boot):
5
+ * about 3.5 s in all, with each attempt's own busy timeout. Long enough for another process to
6
+ * finish importing a large `runs.json`. */
7
+ export declare const OPEN_RETRY_DELAYS_MS: number[];
8
+ /** Block this thread for `ms`. Only `open` does, at boot, when there is nothing else to run. */
9
+ export declare function sleepSync(ms: number): void;
10
+ export declare function __setLegacyImportHookForTests(hook?: {
11
+ beforeTransaction?: () => void;
12
+ beforeCommit?: () => void;
13
+ }): void;
14
+ /**
15
+ * Import legacy rows and the completion marker atomically, once. Recheck live-writer evidence
16
+ * before commit and preserve exact input bytes in a synced backup. Leave runs.json untouched;
17
+ * invalid entries are skipped and reported.
18
+ */
19
+ export declare function importLegacyIndex(db: RunDatabase, dataDir: string, parseRunRecords: ParseRunRecords): void;
20
+ /**
21
+ * Finished rows whose stored summary an open-time normalization would still change: a referenced
22
+ * PR an older Squawk's created-PR declaration erased, or issue attribution displaced by a
23
+ * follow-up declaration (see `reconcileLoadedRun`), or a summary that is not JSON. Not live, so not
24
+ * in the `live` column; open decodes these few and keeps the ones it actually repaired.
25
+ */
26
+ export declare const LEGACY_REFERENCE_HEAL_SQL: string;
27
+ /**
28
+ * The rows whose stored summary reading their record can change, as SQL over `runs`: the rows
29
+ * `open` decodes to normalize (the `live` column it loads by, then `LEGACY_REFERENCE_HEAL_SQL`).
30
+ * With a repository handle, a row whose summary `namesForeignReference` is one too, as
31
+ * `setRepoHandle` reads it. The cold reader (run-index.ts) decodes exactly these rows and serves
32
+ * every other stored summary, so the two read paths cannot disagree about which rows to read.
33
+ * `AUTOMATION_ORIGIN_HEAL_SQL` is left out on purpose: no cross-project view reads
34
+ * `automationId`, and asking it scans `data`.
35
+ */
36
+ export declare const LOAD_REPAIR_SQL: string;
37
+ /**
38
+ * Rows whose record names the automation that launched it while the stored summary does not
39
+ * (hearsay-tools/cezarion#1332): summaries a Squawk wrote before `RunSummary.automationId`
40
+ * existed. Open rewrites each one's summary once, so the sidebar's Automations tab classifies a
41
+ * finished task nobody has opened since the upgrade. `instr` keeps the JSON parse off every
42
+ * other row.
43
+ */
44
+ export declare const AUTOMATION_ORIGIN_HEAL_SQL: string;
45
+ export {};
@@ -0,0 +1,89 @@
1
+ /**
2
+ * What `RunStore.open` does besides building the store (hearsay-tools/squawk#4042): the pauses
3
+ * between busy open attempts, the one-time import of a legacy `runs.json`, and the SQL that picks
4
+ * the rows open repairs. `open` and `openOnce` stay on `RunStore` as its constructors.
5
+ */
6
+ import { join } from 'node:path';
7
+ import { guardedJsonSql } from './guarded-json-sql.js';
8
+ import { assertNoLegacyCockpit, assertNoLegacyWriter, backUpLegacyIndex, LEGACY_INDEX_FILE, readLegacyIndex } from './legacy-index.js';
9
+ import { legacyIndexRows } from './legacy-run-rows.js';
10
+ import { RUNS_IMPORT_COMPLETE_KEY } from './run-database.js';
11
+ /** The pauses between open attempts while the database is busy, when `open` may wait (a boot):
12
+ * about 3.5 s in all, with each attempt's own busy timeout. Long enough for another process to
13
+ * finish importing a large `runs.json`. */
14
+ export const OPEN_RETRY_DELAYS_MS = [50, 100, 200, 400, 800, 1600];
15
+ /** Block this thread for `ms`. Only `open` does, at boot, when there is nothing else to run. */
16
+ export function sleepSync(ms) {
17
+ Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, ms);
18
+ }
19
+ /** Test seam (#779): `beforeTransaction` runs once `runs.json` is read and parsed, before the
20
+ * import asks for the write lock; `beforeCommit` runs inside the import transaction, after every
21
+ * row is written and before the last check that no older Squawk wrote `runs.json` meanwhile. */
22
+ let legacyImportHook;
23
+ export function __setLegacyImportHookForTests(hook) {
24
+ legacyImportHook = hook;
25
+ }
26
+ /**
27
+ * Import legacy rows and the completion marker atomically, once. Recheck live-writer evidence
28
+ * before commit and preserve exact input bytes in a synced backup. Leave runs.json untouched;
29
+ * invalid entries are skipped and reported.
30
+ */
31
+ export function importLegacyIndex(db, dataDir, parseRunRecords) {
32
+ assertNoLegacyCockpit(dataDir);
33
+ const snapshot = readLegacyIndex(join(dataDir, LEGACY_INDEX_FILE));
34
+ const parsed = snapshot ? legacyIndexRows(snapshot.bytes, parseRunRecords) : undefined;
35
+ const rows = parsed?.rows ?? [];
36
+ const skipped = parsed?.skipped ?? 0;
37
+ const source = !snapshot ? 'none' : parsed ? LEGACY_INDEX_FILE : `${LEGACY_INDEX_FILE} (unparseable)`;
38
+ assertNoLegacyWriter(dataDir, snapshot);
39
+ legacyImportHook?.beforeTransaction?.();
40
+ let backup;
41
+ const commit = db.transaction({
42
+ upserts: rows,
43
+ deletes: [],
44
+ onlyIfMetaAbsent: RUNS_IMPORT_COMPLETE_KEY,
45
+ beforeCommit: () => {
46
+ legacyImportHook?.beforeCommit?.();
47
+ assertNoLegacyWriter(dataDir, snapshot);
48
+ backup = snapshot ? backUpLegacyIndex(dataDir, snapshot) : undefined;
49
+ const read = snapshot ? { bytes: snapshot.bytes.length, sha256: snapshot.sha256, backup } : {};
50
+ return { [RUNS_IMPORT_COMPLETE_KEY]: JSON.stringify({ at: new Date().toISOString(), source, records: rows.length, ...(skipped > 0 ? { skipped } : {}), ...read }) };
51
+ },
52
+ });
53
+ // Told once, by the import that committed: the marker means no later open reads runs.json again.
54
+ if (commit.skipped || backup === undefined)
55
+ return;
56
+ const kept = `Its exact bytes are kept in ${join(dataDir, backup)}; https://github.com/hearsay-tools/squawk/blob/main/docs/run-history-recovery.md says how to import it after a repair.`;
57
+ if (!parsed)
58
+ console.warn(`[hsq] ${LEGACY_INDEX_FILE} could not be read; no run was imported, and this project starts with an empty history. ${kept}`);
59
+ else if (skipped > 0)
60
+ console.warn(`[hsq] ${skipped} of ${parsed.total} runs in ${LEGACY_INDEX_FILE} could not be read and were not imported. ${kept}`);
61
+ }
62
+ /**
63
+ * Finished rows whose stored summary an open-time normalization would still change: a referenced
64
+ * PR an older Squawk's created-PR declaration erased, or issue attribution displaced by a
65
+ * follow-up declaration (see `reconcileLoadedRun`), or a summary that is not JSON. Not live, so not
66
+ * in the `live` column; open decodes these few and keeps the ones it actually repaired.
67
+ */
68
+ export const LEGACY_REFERENCE_HEAL_SQL = guardedJsonSql("(json_extract(summary, '$.markerRefs.pr') IS NOT NULL AND json_extract(summary, '$.referencedPullRequestUrl') IS NULL)" +
69
+ " OR (NOT EXISTS (SELECT 1 FROM meta WHERE key = 'issue-attribution:' || runs.id AND value = CAST(runs.revision AS TEXT)) AND json_extract(summary, '$.markerRefs.issue') IS NOT NULL)", 1);
70
+ /**
71
+ * The rows whose stored summary reading their record can change, as SQL over `runs`: the rows
72
+ * `open` decodes to normalize (the `live` column it loads by, then `LEGACY_REFERENCE_HEAL_SQL`).
73
+ * With a repository handle, a row whose summary `namesForeignReference` is one too, as
74
+ * `setRepoHandle` reads it. The cold reader (run-index.ts) decodes exactly these rows and serves
75
+ * every other stored summary, so the two read paths cannot disagree about which rows to read.
76
+ * `AUTOMATION_ORIGIN_HEAL_SQL` is left out on purpose: no cross-project view reads
77
+ * `automationId`, and asking it scans `data`.
78
+ */
79
+ export const LOAD_REPAIR_SQL = `live = 1 OR ${LEGACY_REFERENCE_HEAL_SQL}`;
80
+ /**
81
+ * Rows whose record names the automation that launched it while the stored summary does not
82
+ * (hearsay-tools/cezarion#1332): summaries a Squawk wrote before `RunSummary.automationId`
83
+ * existed. Open rewrites each one's summary once, so the sidebar's Automations tab classifies a
84
+ * finished task nobody has opened since the upgrade. `instr` keeps the JSON parse off every
85
+ * other row.
86
+ */
87
+ export const AUTOMATION_ORIGIN_HEAL_SQL = `instr(data, '"automation') > 0 AND ${guardedJsonSql("json_extract(summary, '$.automationId') IS NULL" +
88
+ " AND (json_extract(data, '$.automation.automationId') IS NOT NULL OR json_extract(data, '$.automationTrigger.automationId') IS NOT NULL)", 0, ['summary', 'data'])}`;
89
+ //# sourceMappingURL=store-open.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store-open.js","sourceRoot":"","sources":["../../src/runs/store-open.ts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,MAAM,CAAC,OAAO,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO;IACnD,MAAM,IAAI,GAAG,+BAA+B,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,wHAAwH,CAAC;IAC1L,IAAI,CAAC,MAAM;QAAE,OAAO,CAAC,IAAI,CAAC,SAAS,iBAAiB,2FAA2F,IAAI,EAAE,CAAC,CAAC;SAClJ,IAAI,OAAO,GAAG,CAAC;QAAE,OAAO,CAAC,IAAI,CAAC,SAAS,OAAO,OAAO,MAAM,CAAC,KAAK,YAAY,iBAAiB,6CAA6C,IAAI,EAAE,CAAC,CAAC;AAC1J,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,cAAc,CACrD,wHAAwH;IACxH,uLAAuL,EAAE,CAAC,CAAC,CAAC;AAE9L;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,yBAAyB,EAAE,CAAC;AAE1E;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,sCAAsC,cAAc,CAAC,iDAAiD;IAC9I,0IAA0I,EAAE,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC"}
@@ -5,7 +5,7 @@ import type { WorkerExecutionRecords, WorkerExecutions } from './ports.ts';
5
5
  import { z } from 'zod';
6
6
  import { queuedMessageSchema } from '../contract/index.js';
7
7
  import { type WaitRegistrationReceipt } from '../contract/index.js';
8
- import type { ArchiveFinishedScope, ArchivedRunsResponse, ArchivePullRequestIdentity, ConversationState, AgentInput, InboxClaim, DelegationState, MergedPullRequest, RunSummary, Wait, WorkerDestroyRetry } from '../contract/index.js';
8
+ import type { ArchivedRunsResponse, ConversationState, AgentInput, InboxClaim, DelegationState, RunSummary, Wait, WorkerDestroyRetry } from '../contract/index.js';
9
9
  import { type AutomationNames } from '../contract/index.js';
10
10
  import { RunTranscriptFacts } from './transcript-facts-topic.ts';
11
11
  import { workflowDefSchema } from '../workflows/types.ts';
@@ -19,10 +19,14 @@ export { ciWaitEntry, holdsWorkerWait, upgradeLegacyWaits, workerWaitEntry } fro
19
19
  import { RunRetentionTopic } from './run-retention.ts';
20
20
  import { type RawExtras } from './raw-record.ts';
21
21
  import { RunStoreOpenError } from './store-open-error.ts';
22
+ import { RunClaimsTopic } from './run-claims-topic.ts';
23
+ import { RunPinsTopic } from './run-pins.ts';
22
24
  import { type SpawnCapacityRefusal } from './owned-run-create.ts';
23
25
  import { WorkerResultsTopic } from './worker-results.ts';
24
26
  import { RunEventLogTopic } from './event-log.ts';
25
27
  import { RunRedaction } from './run-redaction.ts';
28
+ import { RunArchiveTopic } from './run-archive.ts';
29
+ import { RunReadFlagsTopic } from './run-read-flags.ts';
26
30
  /** Per-store persistence adapter; the second argument is the normal fenced transaction. */
27
31
  export type RunStorePersistence = (changes: RunDatabaseChanges, transaction: RunDatabase['transaction']) => RunDatabaseCommit;
28
32
  export type RunStatus = 'queued' | 'running' | 'waiting' | 'review' | 'done' | 'failed' | 'cancelled';
@@ -3166,71 +3170,7 @@ export type RepoHandle = {
3166
3170
  owner: string;
3167
3171
  name: string;
3168
3172
  };
3169
- /**
3170
- * Reconcile one record just read off disk with the fact that whichever process wrote it is gone.
3171
- *
3172
- * Mutates and returns `run`. Extracted from `RunStore.open` so the read-only index reader
3173
- * (`./run-index.ts`) answers the SAME question about a `running` row on disk. Two parsers that
3174
- * disagree here is a visible bug, not an internal one: the cockpit would show a task as running
3175
- * in the ⌘K index and failed the moment you opened it.
3176
- *
3177
- * `keepLive` (#367): leave `queued`/`running`/`waiting` untouched so the caller can recover them
3178
- * (RunManager.recover re-queues queued runs, resumes interrupted ones). Without it — one-shot CLI
3179
- * paths that never recover, and the index reader, which has no manager at all — live-looking runs
3180
- * are marked failed so no ghost stays behind.
3181
- */
3182
- export declare function reconcileLoadedRun(run: RunRecord, opts?: {
3183
- keepLive?: boolean;
3184
- }): RunRecord;
3185
- /**
3186
- * Settle an adopted dead owner’s live run without starting work. Untouched runs cancel; started
3187
- * runs become interrupted. Stop explicitly cancels its target. Mutates run.
3188
- */
3189
- export declare function settleOrphanedRun(run: RunRecord, opts?: {
3190
- stop?: boolean | undefined;
3191
- }): RunRecord;
3192
- export declare function __setLegacyImportHookForTests(hook?: {
3193
- beforeTransaction?: () => void;
3194
- beforeCommit?: () => void;
3195
- }): void;
3196
- /**
3197
- * The rows whose stored summary reading their record can change, as SQL over `runs`: the rows
3198
- * `open` decodes to normalize (the `live` column it loads by, then `LEGACY_REFERENCE_HEAL_SQL`).
3199
- * With a repository handle, a row whose summary `namesForeignReference` is one too, as
3200
- * `setRepoHandle` reads it. The cold reader (run-index.ts) decodes exactly these rows and serves
3201
- * every other stored summary, so the two read paths cannot disagree about which rows to read.
3202
- * `AUTOMATION_ORIGIN_HEAL_SQL` is left out on purpose: no cross-project view reads
3203
- * `automationId`, and asking it scans `data`.
3204
- */
3205
- export declare const LOAD_REPAIR_SQL: string;
3206
3173
  export { branchOwnerOf, type BranchOwner } from './branch-owners.ts';
3207
- /** Who may hold a run in memory besides its own record (see `RunStore.pin`). `maintenance` is the
3208
- * RunManager's publish, worktree-reclaim and branch-cleanup claims, held across their async work. */
3209
- export type RunPinHolder = 'active' | 'continue' | 'cleanup' | 'maintenance';
3210
- /**
3211
- * Who may change a run, as this store sees it (#779, plan step 3; `RunStore.runOwnership`):
3212
- * - `held`: this store claims its delegation family;
3213
- * - `free`: no live process claims it and nothing in its family is live; a write takes it. A
3214
- * proven-dead owner's claim on such a family counts for nothing: there is nothing to recover;
3215
- * - `orphaned`: nobody alive owns a family that still has a live run (its owner died, or nobody
3216
- * claimed it): taking it means adopting it first (`RunStore.adoptFamily` settles it, then the
3217
- * manager recovers the family);
3218
- * - `foreign`: another process that is alive (or cannot be proven dead) holds it: read-only here;
3219
- * - `quarantined`: a write found it changed under this store; refused until Squawk restarts;
3220
- * - `fallback`: a family member is read from the fallback directory: refused as `foreign` until a control adopts it.
3221
- */
3222
- export type RunOwnership = 'held' | 'free' | 'orphaned' | 'foreign' | 'quarantined' | 'fallback';
3223
- /** The one answer every control gives for a run another Squawk process owns (`409 { error }`). */
3224
- export declare const RUN_IN_USE_ELSEWHERE = "run is in use by another Squawk process";
3225
- /** The answer for a run this process stopped writing after a conflicting write. */
3226
- export declare const RUN_QUARANTINED = "run changed under this Squawk process \u2014 restart Squawk to reload it";
3227
- /** A write this store must not make: another process owns the run, its owner died with work
3228
- * still live (adopt it first), or a conflict quarantined it. Nothing was changed. */
3229
- export declare class RunWriteRefusedError extends Error {
3230
- readonly runId: string;
3231
- readonly ownership: Exclude<RunOwnership, 'held' | 'free'>;
3232
- constructor(runId: string, ownership: Exclude<RunOwnership, 'held' | 'free'>, fallbackError?: string);
3233
- }
3234
3174
  /** Why a `run` event fired, when a delegation checkpoint caused it or nothing durable changed
3235
3175
  * (`republish`) (in-process only). */
3236
3176
  export type CommitSource = 'delegation-checkpoint' | 'delegation-destroy-progress' | 'live-release';
@@ -3302,8 +3242,10 @@ export declare class RunStore {
3302
3242
  /** Rows whose `data` this store tried to decode and could not: left in the database untouched,
3303
3243
  * and left out of the list rows from then on, as the cold reader leaves them out (run-index.ts). */
3304
3244
  private readonly unreadable;
3305
- /** Background one-at-a-time compressor for archived transcripts (#818). */
3306
- private readonly compressor;
3245
+ /** The archive flag, archive on merge, completion actions and the transcript compressor (hearsay-tools/squawk#4041). */
3246
+ readonly archive: RunArchiveTopic;
3247
+ /** The pinned and read flags (hearsay-tools/squawk#4041). */
3248
+ readonly readFlags: RunReadFlagsTopic;
3307
3249
  /** What the transcript says about a run (hearsay-tools/squawk#4036). */
3308
3250
  readonly transcriptFacts: RunTranscriptFacts;
3309
3251
  /** Whether a run may go, and its deletion; the count-based archive (hearsay-tools/squawk#4037). */
@@ -3314,6 +3256,10 @@ export declare class RunStore {
3314
3256
  readonly eventLog: RunEventLogTopic;
3315
3257
  /** The scrub of events and free text (hearsay-tools/squawk#4040). */
3316
3258
  readonly redaction: RunRedaction;
3259
+ /** Claims, ownership, sources and fallback (hearsay-tools/squawk#4042). */
3260
+ readonly claims: RunClaimsTopic;
3261
+ /** The holds that keep a run loaded (hearsay-tools/squawk#4042). */
3262
+ readonly runPins: RunPinsTopic;
3317
3263
  private executions;
3318
3264
  /** A worker's execution, process, identity and scope records (hearsay-tools/squawk#4039), built on
3319
3265
  * first use by the factory this process registered; throws when none is registered. */
@@ -3366,69 +3312,6 @@ export declare class RunStore {
3366
3312
  /** Why this store has no database, when it is `RunStore.unavailable`'s: its runs are unknown,
3367
3313
  * not absent. */
3368
3314
  get unavailable(): RunStoreOpenError | undefined;
3369
- /** Every sidecar for a run follows the winning record, never file-by-file fallback. */
3370
- sourceDataDir(id: string): string;
3371
- isFallbackRun(id: string): boolean;
3372
- hasFallbackRun(id: string): boolean;
3373
- /**
3374
- * Open-time load: the live rows, the finished rows a load normalization repairs, then the
3375
- * delegation families of the live ones. A row that does not parse is skipped and left in the
3376
- * database untouched; one warning says how many.
3377
- *
3378
- * Only rows this store can claim are loaded (#779, plan step 3). A live row whose family another
3379
- * live process claims — `serve`'s parked run, seen by a headless `cez run` — is that process's:
3380
- * it is not loaded, normalized or recovered here, and stays readable through `getRun` and the
3381
- * list rows. A live row nobody alive claims is taken over, as before: this open recovers it
3382
- * (`keepLive`) or settles it as interrupted.
3383
- */
3384
- private loadHeldRows;
3385
- /** Normalize a record just read from `row` (see `reconcileLoadedRun`) and hold it. Marks the row
3386
- * dirty only when normalization changed it, so the next save persists exactly the runs open()
3387
- * rewrote. A row read up from schema-3 wait fields counts as changed: its rewrite drops them
3388
- * and recomputes its summary and live column (`upgradeLegacyWaits`), as does a summary that does
3389
- * not parse (hearsay-tools/squawk#3530). The caller has claimed the row's family. */
3390
- private adoptLoadedRun;
3391
- /**
3392
- * Hold one delegation family: its root and every worker filed under it, read through the
3393
- * `parent_run_id` index. No recursion: a worker's own id never names a family. The caller has claimed it. `settle` settles its live rows instead of keeping
3394
- * them for recovery (`settleOrphanedRun`); `stopId` is the run a Stop settles as cancelled.
3395
- */
3396
- private holdFamily;
3397
- /** Make sure this store claims each of `families`; `claimStoreFamilies` takes the free ones. */
3398
- private claimFamilies;
3399
- /** Release the claim of every family with nothing left in memory, once nothing is pending: a
3400
- * failed save keeps its families claimed until it succeeds. A failed release retries at the
3401
- * next sweep; `close()` releases the rest. */
3402
- private releaseUnheldClaims;
3403
- /**
3404
- * Who may change this run right now (see `RunOwnership`), or undefined when there is no such
3405
- * run. Read-only: nothing is claimed. Controls ask this first, so a run another process owns is
3406
- * refused with `RUN_IN_USE_ELSEWHERE` and a dead process's run is adopted before it is changed.
3407
- */
3408
- runOwnership(id: string): RunOwnership | undefined;
3409
- /** Why a control on this run must be refused here, or undefined when this store may change it. */
3410
- writeRefusal(id: string): string | undefined;
3411
- /**
3412
- * Claim an orphaned family before a control, then settle its live rows.
3413
- * Stop cancels its target. Return the root id, or undefined for a live owner or missing run.
3414
- */
3415
- adoptFamily(id: string, opts?: {
3416
- stop?: boolean;
3417
- }): string | undefined;
3418
- /** Explicit controls only (`requireRunControl`): copy a fallback family in so it can be written. */
3419
- adoptFallbackFamily(id: string): boolean;
3420
- private fallbackRefusal;
3421
- /** Run files are written only for a family this store may write, never a fallback family. */
3422
- /** The error `appendEvent` throws for a run this store cannot write or does not know. */
3423
- private missingRunError;
3424
- private writeDir;
3425
- /** Every run whose family another process owns (`foreignClaimedRunIds`). */
3426
- listForeignClaimedRunIds(): string[];
3427
- /** Non-terminal rows in the database (both directories) and the runs of families another live store claims. */
3428
- persistedLiveRunIds(): {
3429
- live: string[];
3430
- foreign: string[];
3431
- };
3432
3315
  /**
3433
3316
  * Whether a held run anchors itself (and its family) in memory. Anything else held is a family
3434
3317
  * member or a settled write, and leaves at the next sweep (`evictSettled`).
@@ -3480,18 +3363,6 @@ export declare class RunStore {
3480
3363
  withReadCache<T>(fn: () => T): T;
3481
3364
  /** Whether the run exists, held or not, without decoding it. */
3482
3365
  private hasRun;
3483
- /**
3484
- * Keep a run in memory for `holder` until `unpin(id, holder)`: a RunManager pins the runs it is
3485
- * executing (`active`) and the run a Continue is admitting (`continue`). A finished run is
3486
- * loaded. Pins are per holder, so releasing one never releases another. Returns the held record.
3487
- */
3488
- pin(id: string, holder: RunPinHolder): RunRecord | undefined;
3489
- /** Publish a run's current record again without a write: something read beside the record
3490
- * changed, such as the run leaving the manager's live registries, which a detail's finish
3491
- * verdict reads (hearsay-tools/cezarion#1301). */
3492
- republish(id: string): void;
3493
- /** Release `holder`'s pin. The run leaves memory at the next sweep once nothing else holds it. */
3494
- unpin(id: string, holder: RunPinHolder): void;
3495
3366
  /**
3496
3367
  * Set discovered repository identity without blocking boot. Recompute conclusions from retained
3497
3368
  * evidence, including cold records; null retains unknown-handle behavior.
@@ -3762,18 +3633,6 @@ export declare class RunStore {
3762
3633
  * remains best-effort.
3763
3634
  */
3764
3635
  private commitIndex;
3765
- private completionArchiveBlocker;
3766
- /** One archive write for manual actions, merge observations, completion, and sweeps.
3767
- * Archiving files history away; it never stops a process or removes a worktree. */
3768
- private stageArchive;
3769
- /** A bounded persisted queue also covers projects without a live RunManager. */
3770
- listCompletionCandidates(afterSeq?: number, limit?: number): Array<{
3771
- id: string;
3772
- seq: number;
3773
- }>;
3774
- canCompleteAction(id: string, token: string): boolean;
3775
- claimCompletionAction(id: string, token: string): boolean;
3776
- completeAction(id: string, token: string, phase: 'blocked' | 'complete', message?: string): boolean;
3777
3636
  /**
3778
3637
  * Refuse (throwing, with nothing changed) a commit that stages a quarantined run, or a run whose
3779
3638
  * family this store does not claim and cannot take: another process owns it, or a dead process
@@ -3802,83 +3661,8 @@ export declare class RunStore {
3802
3661
  /** Append a step to an existing run (used by "Continue" — spec 003). */
3803
3662
  addStep(runId: string, step: Pick<StepState, 'id' | 'name' | 'kind' | 'synthetic' | 'continuesStepId'>): void;
3804
3663
  updateStep(runId: string, stepId: string, patch: Partial<Omit<StepState, 'id'>>): void;
3805
- listArchiveOnMergeCandidates(afterSeq?: number, limit?: number): Array<{
3806
- id: string;
3807
- seq: number;
3808
- }>;
3809
- /** Use unnormalized persisted evidence: cold reads must not turn interrupted work into safety. */
3810
- private archiveFamily;
3811
- /** Blockers are feedback, never archive authority or cleanup permission. */
3812
- setArchiveBlocker(id: string, blocker: RunRecord['archiveBlocker']): void;
3813
- archiveMergeBlocker(snapshot: ArchiveOnMergeSnapshot, missing: ArchivePullRequestIdentity, repoBase?: string): void;
3814
- hasArchiveOnMergeAssociations(id: string): boolean;
3815
- prepareArchiveOnMerge(id: string): Promise<void>;
3816
- archiveOnMergeSnapshot(id: string, repoBase?: string, isActive?: (id: string) => boolean): ArchiveOnMergeSnapshot | undefined;
3817
- private archiveSnapshot;
3818
- /** No await between final revalidation and the fenced, all-or-nothing cascade. */
3819
- archiveAfterMerge(snapshot: ArchiveOnMergeSnapshot, observations: readonly MergedPullRequest[], repoBase?: string, isActive?: (id: string) => boolean): boolean;
3820
- setArchived(id: string, archived: boolean): RunRecord | undefined;
3821
- /** Parent + owned workers; returns how many records flipped `archived`. */
3822
- private applyArchivedCascade;
3823
- private applyArchived;
3824
- /** Transcript form follows `archived`: enqueue compression, or restore the plain file now. */
3825
- private syncTranscriptForm;
3826
- /**
3827
- * Whether this store may compress `id`'s transcript: the run exists, is archived, is not in a
3828
- * live status (queued/running/waiting), and this process holds the family's claim in `claimed`
3829
- * (not merely `pendingClaims`). Two processes never both write a run (#779, #818 B1).
3830
- */
3831
- private isHistoryCompressEligible;
3832
- /** Take the family claim if free and require it to be in `this.claimed`, not only pending. */
3833
- private holdsCompressClaim;
3834
- /** Startup sweep: enqueue every archived non-live run that still has a plain transcript. */
3835
- compressArchivedHistory(): void;
3836
- /** Resolves when the transcript compressor is idle (tests, shutdown). */
3837
- historyIdle(): Promise<void>;
3838
- /** Pin one run to the top of this project's task list, or unpin it (#935). Mirrors
3839
- * `setArchived`: sets the fields, then persists + broadcasts via `touch`, so the updated
3840
- * record rides the existing `run` SSE with no new event. Idempotent — re-pinning a pinned
3841
- * run just re-stamps `pinnedAt`.
3842
- *
3843
- * Every active status is pinnable. Archived requests clear stale metadata instead, so a
3844
- * late click racing archive cannot leave a hidden pin that reappears on unarchive. */
3845
- setPinned(id: string, pinned: boolean): RunRecord | undefined;
3846
- /** Bulk-archive finished runs (#780). `isSweepable` decides which; `archived` counts every
3847
- * record that flipped (cascaded workers included), `ids` lists the top-level runs picked and
3848
- * `pinnedIds` the subset that carried a pin before `clearPin` dropped it. */
3849
- archiveFinished(scope?: ArchiveFinishedScope, automation?: boolean): {
3850
- archived: number;
3851
- ids: string[];
3852
- pinnedIds: string[];
3853
- };
3854
- /** Mark one run as read (#unread-done-items): stamp the read receipt now. Mirrors
3855
- * `setArchived` — sets the field then persists + broadcasts via `touch`, so the
3856
- * updated record rides the existing `run` SSE with no new event. Idempotent by
3857
- * design: opening an already-read thread just re-stamps a later `seenAt`. */
3858
- setRead(id: string): RunRecord | undefined;
3859
- /** Mark one run as UNread (#775): drop the read receipt so the run rejoins the unread
3860
- * list. The inverse of `setRead` and, like it, `touch`es so the updated record rides the
3861
- * existing `run` SSE.
3862
- *
3863
- * Deleting the field rather than adding a "manually unread" flag is the whole point:
3864
- * absent `seenAt` is ALREADY what every reader treats as unread (`isUnread` in the
3865
- * cockpit's read-state.ts, and `markAllRead`'s clause-for-clause copy of it below), so
3866
- * clearing needs no new state and writes a shape any older Squawk already parses.
3867
- *
3868
- * Deliberately unconditional: clearing a receipt is always a legal write, so this
3869
- * succeeds for an already-unread run (idempotent) and for statuses that can never wear
3870
- * the marker. WHETHER the action means anything for a given run is UI policy, and lives
3871
- * in the cockpit's `runActionFlags` — the same split the rest of the store keeps. */
3872
- setUnread(id: string): RunRecord | undefined;
3873
3664
  /** A debounced write of the held record `id`: `apply` changes it in place, then `touch` saves it. */
3874
3665
  private change;
3875
- /**
3876
- * Stamp unread finished runs in bulk and return the count. Keep the rule aligned with cockpit
3877
- * isUnread: done/failed, finished since seen, not archived; cancelled and usage-limit waiting
3878
- * runs are excluded. `automation` narrows it to one origin, as in `archiveFinished`
3879
- * (hearsay-tools/cezarion#1616); absent stamps both.
3880
- */
3881
- markAllRead(automation?: boolean): number;
3882
3666
  /** Indexed family enumeration, including members not yet flushed to SQLite. */
3883
3667
  listFamilyRunIds(rootId: string): string[];
3884
3668
  /** Write the pending rows out now (used on shutdown). */
@@ -3891,8 +3675,6 @@ export declare class RunStore {
3891
3675
  private imagesDir;
3892
3676
  /** Save `run` debounced and publish it; `before` is the record at the write's entry (none: created). */
3893
3677
  private touch;
3894
- /** Form follows archived: a terminal archived run with a plain transcript is queued again. */
3895
- private maybeEnqueueHistoryCompress;
3896
3678
  /** The held record is gone; the next save or commit deletes its row, fenced by `family`'s claim
3897
3679
  * and by the revision this store last saw (kept in `base` until the delete is written). */
3898
3680
  private markDeleted;
@@ -3930,9 +3712,3 @@ export declare class RunStore {
3930
3712
  */
3931
3713
  close(): void;
3932
3714
  }
3933
- export interface ArchiveOnMergeSnapshot {
3934
- rootId: string;
3935
- fingerprint: string;
3936
- pullRequests: ArchivePullRequestIdentity[];
3937
- token: string;
3938
- }