@hearsay-tools/squawk 0.18.0-dev.7820 → 0.18.0-dev.7830

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 (129) hide show
  1. package/dist/activity/read-model.d.ts +3 -1
  2. package/dist/activity/read-model.js +17 -15
  3. package/dist/activity/read-model.js.map +1 -1
  4. package/dist/activity/requests.d.ts +3 -1
  5. package/dist/activity/requests.js +1 -1
  6. package/dist/activity/requests.js.map +1 -1
  7. package/dist/artifacts/reports-index.d.ts +3 -7
  8. package/dist/artifacts/reports-index.js +6 -6
  9. package/dist/artifacts/reports-index.js.map +1 -1
  10. package/dist/automations/service.js +1 -1
  11. package/dist/automations/service.js.map +1 -1
  12. package/dist/automations/task-template.js +3 -3
  13. package/dist/automations/task-template.js.map +1 -1
  14. package/dist/ci-wait/controller.d.ts +42 -42
  15. package/dist/delegation/conversations.d.ts +6 -2
  16. package/dist/delegation/conversations.js +1 -1
  17. package/dist/delegation/conversations.js.map +1 -1
  18. package/dist/delegation/family-end.d.ts +4 -2
  19. package/dist/delegation/family-end.js +1 -1
  20. package/dist/delegation/family-end.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/task-discovery.js +1 -1
  24. package/dist/delegation/task-discovery.js.map +1 -1
  25. package/dist/delegation/worker-cleanup.js +4 -4
  26. package/dist/delegation/worker-cleanup.js.map +1 -1
  27. package/dist/project-commands.js +1 -1
  28. package/dist/project-commands.js.map +1 -1
  29. package/dist/project-migration/live.js +1 -1
  30. package/dist/project-migration/live.js.map +1 -1
  31. package/dist/runs/branch-owners.d.ts +2 -2
  32. package/dist/runs/cold-reads.d.ts +1 -1
  33. package/dist/runs/cold-reads.js +1 -1
  34. package/dist/runs/lifecycle.d.ts +2 -1
  35. package/dist/runs/lifecycle.js.map +1 -1
  36. package/dist/runs/live-tasks.js +1 -1
  37. package/dist/runs/live-tasks.js.map +1 -1
  38. package/dist/runs/ports.d.ts +63 -31
  39. package/dist/runs/retention.d.ts +4 -3
  40. package/dist/runs/retention.js +2 -2
  41. package/dist/runs/retention.js.map +1 -1
  42. package/dist/runs/run-cold-reads.d.ts +98 -0
  43. package/dist/runs/run-cold-reads.js +194 -0
  44. package/dist/runs/run-cold-reads.js.map +1 -0
  45. package/dist/runs/run-persistence.d.ts +150 -0
  46. package/dist/runs/run-persistence.js +396 -0
  47. package/dist/runs/run-persistence.js.map +1 -0
  48. package/dist/runs/run-queries.d.ts +190 -0
  49. package/dist/runs/run-queries.js +480 -0
  50. package/dist/runs/run-queries.js.map +1 -0
  51. package/dist/runs/run-repo-scope.d.ts +38 -0
  52. package/dist/runs/run-repo-scope.js +78 -0
  53. package/dist/runs/run-repo-scope.js.map +1 -0
  54. package/dist/runs/run-retention.d.ts +6 -2
  55. package/dist/runs/run-retention.js +11 -2
  56. package/dist/runs/run-retention.js.map +1 -1
  57. package/dist/runs/store.d.ts +12 -292
  58. package/dist/runs/store.js +122 -1119
  59. package/dist/runs/store.js.map +1 -1
  60. package/dist/serve-boot.d.ts +3 -1
  61. package/dist/serve-boot.js +2 -2
  62. package/dist/serve-boot.js.map +1 -1
  63. package/dist/server/models-routes.d.ts +13 -13
  64. package/dist/server/project-context.js +3 -3
  65. package/dist/server/project-context.js.map +1 -1
  66. package/dist/server/repo-branches.d.ts +5 -3
  67. package/dist/server/repo-branches.js +1 -1
  68. package/dist/server/repo-branches.js.map +1 -1
  69. package/dist/server/reports-api.d.ts +2 -2
  70. package/dist/server/run-checkout.d.ts +3 -1
  71. package/dist/server/run-checkout.js +2 -2
  72. package/dist/server/run-checkout.js.map +1 -1
  73. package/dist/server/run-relationships.d.ts +3 -1
  74. package/dist/server/run-relationships.js +1 -1
  75. package/dist/server/run-relationships.js.map +1 -1
  76. package/dist/server/server.d.ts +58 -58
  77. package/dist/server/server.js +12 -12
  78. package/dist/server/server.js.map +1 -1
  79. package/dist/server/start-server.js +1 -1
  80. package/dist/server/start-server.js.map +1 -1
  81. package/dist/workflows/run/auto-resume.js +2 -2
  82. package/dist/workflows/run/auto-resume.js.map +1 -1
  83. package/dist/workflows/run/completion-gate.js +1 -1
  84. package/dist/workflows/run/completion-gate.js.map +1 -1
  85. package/dist/workflows/run/continuation-acceptance.js +2 -2
  86. package/dist/workflows/run/continuation-acceptance.js.map +1 -1
  87. package/dist/workflows/run/family-reconciler.d.ts +2 -1
  88. package/dist/workflows/run/family-reconciler.js +8 -8
  89. package/dist/workflows/run/family-reconciler.js.map +1 -1
  90. package/dist/workflows/run/maintenance-claims.js +2 -2
  91. package/dist/workflows/run/maintenance-claims.js.map +1 -1
  92. package/dist/workflows/run/native-skill-input-queue.js +1 -1
  93. package/dist/workflows/run/native-skill-input-queue.js.map +1 -1
  94. package/dist/workflows/run/queued-revival.js +3 -3
  95. package/dist/workflows/run/queued-revival.js.map +1 -1
  96. package/dist/workflows/run/run-cancel.js +5 -5
  97. package/dist/workflows/run/run-cancel.js.map +1 -1
  98. package/dist/workflows/run/run-finish.js +1 -1
  99. package/dist/workflows/run/run-finish.js.map +1 -1
  100. package/dist/workflows/run/run-line.js +2 -2
  101. package/dist/workflows/run/run-line.js.map +1 -1
  102. package/dist/workflows/run/run-recovery.js +6 -6
  103. package/dist/workflows/run/run-recovery.js.map +1 -1
  104. package/dist/workflows/run/run-settlement.js +4 -4
  105. package/dist/workflows/run/run-settlement.js.map +1 -1
  106. package/dist/workflows/run/run-start.js +1 -1
  107. package/dist/workflows/run/run-start.js.map +1 -1
  108. package/dist/workflows/run/step-loop.js +4 -4
  109. package/dist/workflows/run/step-loop.js.map +1 -1
  110. package/dist/workflows/run/turn-nudges.js +1 -1
  111. package/dist/workflows/run/turn-nudges.js.map +1 -1
  112. package/dist/workflows/run/turn-settler.js +1 -1
  113. package/dist/workflows/run/turn-settler.js.map +1 -1
  114. package/dist/workflows/run/usage-accounting.js +1 -1
  115. package/dist/workflows/run/usage-accounting.js.map +1 -1
  116. package/dist/workflows/run/wake-admission.js +1 -1
  117. package/dist/workflows/run/wake-admission.js.map +1 -1
  118. package/dist/workflows/run/worker-questions.js +3 -3
  119. package/dist/workflows/run/worker-questions.js.map +1 -1
  120. package/dist/workflows/run.js +1 -1
  121. package/dist/workflows/run.js.map +1 -1
  122. package/package.json +4 -4
  123. package/scripts/benchmark-automation-lookups.ts +2 -2
  124. package/scripts/benchmark-conversation-lookup.ts +2 -2
  125. package/scripts/benchmark-family-reconcile.ts +2 -2
  126. package/scripts/benchmark-run-store.ts +3 -3
  127. package/scripts/benchmark-workspace-events.ts +2 -2
  128. package/scripts/benchmark-worktree-retention.ts +1 -1
  129. package/scripts/seed-archive-profile.ts +2 -2
@@ -47,8 +47,7 @@ export interface RetentionState {
47
47
  processesPath(id: string): string;
48
48
  scopePath(id: string): string;
49
49
  executionPath(id: string): string;
50
- handoffPath(runId: string): string;
51
- imagesDir(runId: string): string;
50
+ sourceDataDir(id: string): string;
52
51
  }
53
52
  export declare class RunRetentionTopic implements RunRetention {
54
53
  private readonly dataDir;
@@ -78,4 +77,9 @@ export declare class RunRetentionTopic implements RunRetention {
78
77
  /** Archive a root with its workers unless a member is live, mid-destroy or pinned, or a history
79
78
  * deletion is under way. Each member is marked dirty: the next save writes the family at once. */
80
79
  private archiveSettledFamily;
80
+ /** Same location `handoffPath()` in handoff.ts produces — inlined to keep
81
+ * the store free of upward imports. */
82
+ private handoffPath;
83
+ /** Agent screenshots persisted by the run manager (see persistImage). */
84
+ private imagesDir;
81
85
  }
@@ -124,8 +124,8 @@ export class RunRetentionTopic {
124
124
  removeHistoryFiles(id) {
125
125
  this.state.transcriptFacts.index.forget(id);
126
126
  removeHistory(this.dataDir, id);
127
- rmSync(this.state.handoffPath(id), { force: true });
128
- rmSync(this.state.imagesDir(id), { recursive: true, force: true });
127
+ rmSync(this.handoffPath(id), { force: true });
128
+ rmSync(this.imagesDir(id), { recursive: true, force: true });
129
129
  runRemovalCleanups(id, this.dataDir);
130
130
  }
131
131
  deleteRun(id) {
@@ -220,5 +220,14 @@ export class RunRetentionTopic {
220
220
  removeAgentTmpDir(this.dataDir, member.id);
221
221
  }
222
222
  }
223
+ /** Same location `handoffPath()` in handoff.ts produces — inlined to keep
224
+ * the store free of upward imports. */
225
+ handoffPath(runId) {
226
+ return join(this.state.sourceDataDir(runId), 'runs', `${runId}.handoff.md`);
227
+ }
228
+ /** Agent screenshots persisted by the run manager (see persistImage). */
229
+ imagesDir(runId) {
230
+ return join(this.state.sourceDataDir(runId), 'runs', `${runId}-images`);
231
+ }
223
232
  }
224
233
  //# sourceMappingURL=run-retention.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"run-retention.js","sourceRoot":"","sources":["../../src/runs/run-retention.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AACjF,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGlD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC/F,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAE,WAAW,EAAkB,MAAM,cAAc,CAAC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ary } from './run-summary-page.ts';
4
2
  import type { WorkerExecutionRecords, WorkerExecutions } from './ports.ts';
5
3
  import { z } from 'zod';
6
4
  import { queuedMessageSchema } from '../contract/index.js';
7
5
  import { type WaitRegistrationReceipt } from '../contract/index.js';
8
- import type { ArchivedRunsResponse, ConversationState, AgentInput, InboxClaim, DelegationState, RunSummary, Wait, WorkerDestroyRetry } from '../contract/index.js';
9
- import { type AutomationNames } from '../contract/index.js';
6
+ import type { ConversationState, AgentInput, InboxClaim, DelegationState, Wait, WorkerDestroyRetry } from '../contract/index.js';
10
7
  import { RunTranscriptFacts } from './transcript-facts-topic.ts';
11
8
  import { workflowDefSchema } from '../workflows/types.ts';
12
9
  import { type OutcomeDependencies, type OutcomeReceipt, type RunOutcome } from './outcome-commit.ts';
13
10
  import { type ExitCall, type RunExitId, type RunPatch } from './run-exits.ts';
14
11
  import { type ConversationIdentity } from './conversation-identity.ts';
15
12
  export { ConversationIdInUseError } from './conversation-identity.ts';
16
- import { RunDatabase, type RunDatabaseChanges, type RunDatabaseCommit } from './run-database.ts';
17
- import { type BranchOwner } from './branch-owners.ts';
18
13
  export { ciWaitEntry, holdsWorkerWait, upgradeLegacyWaits, workerWaitEntry } from './legacy-waits.ts';
19
14
  import { RunRetentionTopic } from './run-retention.ts';
20
15
  import { type RawExtras } from './raw-record.ts';
@@ -27,8 +22,9 @@ import { RunEventLogTopic } from './event-log.ts';
27
22
  import { RunRedaction } from './run-redaction.ts';
28
23
  import { RunArchiveTopic } from './run-archive.ts';
29
24
  import { RunReadFlagsTopic } from './run-read-flags.ts';
30
- /** Per-store persistence adapter; the second argument is the normal fenced transaction. */
31
- export type RunStorePersistence = (changes: RunDatabaseChanges, transaction: RunDatabase['transaction']) => RunDatabaseCommit;
25
+ import { RunPersistenceTopic, type RunStorePersistence } from './run-persistence.ts';
26
+ import { RunQueriesTopic } from './run-queries.ts';
27
+ import { RunRepoScopeTopic } from './run-repo-scope.ts';
32
28
  export type RunStatus = 'queued' | 'running' | 'waiting' | 'review' | 'done' | 'failed' | 'cancelled';
33
29
  export type StepStatus = 'pending' | 'running' | 'waiting' | 'review' | 'done' | 'failed' | 'cancelled' | 'skipped';
34
30
  declare const stepStateSchema: z.ZodObject<{
@@ -3170,10 +3166,6 @@ export type RepoHandle = {
3170
3166
  owner: string;
3171
3167
  name: string;
3172
3168
  };
3173
- export { branchOwnerOf, type BranchOwner } from './branch-owners.ts';
3174
- /** Why a `run` event fired, when a delegation checkpoint caused it or nothing durable changed
3175
- * (`republish`) (in-process only). */
3176
- export type CommitSource = 'delegation-checkpoint' | 'delegation-destroy-progress' | 'live-release';
3177
3169
  /**
3178
3170
  * Run rows in runs.db plus append-only NDJSON events and an in-process event bus. Hold live,
3179
3171
  * pinned, related and unsettled records only. Optimistic writes debounce; durable commits
@@ -3187,19 +3179,11 @@ export declare class RunStore {
3187
3179
  private readonly pins;
3188
3180
  /** Staged ids while a durable commit installs and announces them: never evicted mid-commit. */
3189
3181
  private readonly committing;
3190
- private saveTimer;
3191
3182
  /** `null` once the store is closed, and in a `RunStore.unavailable` store (nothing is written,
3192
3183
  * nothing is evicted). */
3193
3184
  private db;
3194
- /** Persistence source for consumers that build the reports index. No index is created here. */
3195
- reportSource(): {
3196
- db: RunDatabase | null;
3197
- dataDir: string;
3198
- openFailure: RunStoreOpenError | undefined;
3199
- };
3200
3185
  /** Why `open` failed, in a `RunStore.unavailable` store. */
3201
3186
  private openFailure;
3202
- private persistence;
3203
3187
  /** Runs whose held record is ahead of its row; the next save or commit writes them. */
3204
3188
  private readonly dirty;
3205
3189
  /** The typed lifecycle events the store publishes after each write (lifecycle.ts). */
@@ -3212,10 +3196,6 @@ export declare class RunStore {
3212
3196
  /** Deleted runs whose history files (events, handoff, images, artifacts) go once the delete of
3213
3197
  * their row commits: until then a conflict can undo the delete and bring the row back. */
3214
3198
  private readonly historyOwed;
3215
- /** The repository this project IS (#945), armed after `open()` by `setRepoHandle`. Undefined
3216
- * until it arrives and `null` when it cannot be known — both mean "unscoped", which is
3217
- * exactly the pre-#945 behavior. */
3218
- private repoHandle;
3219
3199
  /** `open()`'s `keepLive`, which a run read later from `runs.db` is reconciled with too. */
3220
3200
  private keepLive;
3221
3201
  /** This store's identity in `run_claims`; undefined without a database. */
@@ -3230,18 +3210,8 @@ export declare class RunStore {
3230
3210
  * created the row and has not written it yet. `extras` is what that `data` holds beyond the
3231
3211
  * schema, which the next write of the row puts back (raw-record.ts). */
3232
3212
  private readonly base;
3233
- /** Rows read cold in the current synchronous turn, so a commit staged from one is fenced against
3234
- * the version it was computed from. `owned`: its family was already this store's when read.
3235
- * Cleared at the next microtask: no commit spans a turn. */
3236
- private readonly coldBase;
3237
- private readonly coldReads;
3238
- /** The family of each pending deletion, whose claim the deleting write is fenced against. */
3239
- private readonly deletedFamilies;
3240
3213
  /** Rows a conflicting write excluded: this store refuses to write them until it is reopened. */
3241
3214
  private readonly quarantined;
3242
- /** Rows whose `data` this store tried to decode and could not: left in the database untouched,
3243
- * and left out of the list rows from then on, as the cold reader leaves them out (run-index.ts). */
3244
- private readonly unreadable;
3245
3215
  /** The archive flag, archive on merge, completion actions and the transcript compressor (hearsay-tools/squawk#4041). */
3246
3216
  readonly archive: RunArchiveTopic;
3247
3217
  /** The pinned and read flags (hearsay-tools/squawk#4041). */
@@ -3260,6 +3230,14 @@ export declare class RunStore {
3260
3230
  readonly claims: RunClaimsTopic;
3261
3231
  /** The holds that keep a run loaded (hearsay-tools/squawk#4042). */
3262
3232
  readonly runPins: RunPinsTopic;
3233
+ /** Flush, persist, the fence, conflicts and the save debounce (hearsay-tools/squawk#4043). */
3234
+ readonly persistence: RunPersistenceTopic;
3235
+ /** The held set's cold reads, holds and eviction (hearsay-tools/squawk#4044). */
3236
+ private readonly rows;
3237
+ /** The list and find queries (hearsay-tools/squawk#4044). */
3238
+ readonly queries: RunQueriesTopic;
3239
+ /** The repository this project is, and the repair of the runs it rescopes (hearsay-tools/squawk#4044). */
3240
+ readonly repoScope: RunRepoScopeTopic;
3263
3241
  private executions;
3264
3242
  /** A worker's execution, process, identity and scope records (hearsay-tools/squawk#4039), built on
3265
3243
  * first use by the factory this process registered; throws when none is registered. */
@@ -3312,153 +3290,6 @@ export declare class RunStore {
3312
3290
  /** Why this store has no database, when it is `RunStore.unavailable`'s: its runs are unknown,
3313
3291
  * not absent. */
3314
3292
  get unavailable(): RunStoreOpenError | undefined;
3315
- /**
3316
- * Whether a held run anchors itself (and its family) in memory. Anything else held is a family
3317
- * member or a settled write, and leaves at the next sweep (`evictSettled`).
3318
- *
3319
- * The held set is: every run that is live (`isLiveRecord`), pinned by a RunManager (`pin`),
3320
- * dirty, or inside a durable commit; plus the whole delegation family (root and direct
3321
- * workers) of any such run. Families are held because the RunManager reads a live run's family
3322
- * on every run event — `GET /runs/:id/relationships`, the global `reconcileWorkerWaits` pass
3323
- * (about twenty call sites), completion blockers and conversations — and decoding a cold
3324
- * record costs about 200 µs (JSON.parse plus the schema). Measured on a copy of a real
3325
- * cockpit's `runs.json` (958 runs, 957 of them delegated): a running root with 26 workers
3326
- * paid about 5 ms per family read, and the live families together about 10 ms per global
3327
- * pass, all on the event loop. Holding them costs memory in proportion to active work, not to
3328
- * history.
3329
- */
3330
- private isAnchor;
3331
- /** The family roots with an anchoring member in memory. */
3332
- private anchoredFamilies;
3333
- /** Drop every held run that is neither an anchor nor in an anchored family. A store without a
3334
- * database keeps everything: memory is the only copy it has. */
3335
- private evictSettled;
3336
- /** A run read from `runs.db`, normalized like a loaded one (`reconcileLoadedRun`, then the
3337
- * repository scope) but held by nobody. Undefined when absent, deleted or unreadable. */
3338
- private loadCold;
3339
- /** `loaded` sees the record once the load has normalized it, before it is scoped: a heal's `before`. */
3340
- private decodeCold;
3341
- /** Hold a writable row. A fallback family's reads stay detached (the cold-read contract). */
3342
- private holdDecoded;
3343
- /**
3344
- * Hold a claimed run for a write; leave after settlement unless anchored.
3345
- * Take the family claim before reading its row. Return undefined for a live foreign owner
3346
- * or a fallback family: neither claim is granted.
3347
- */
3348
- private hold;
3349
- /** The record a store write changes in place: held, or loaded to be. Undefined for a run this
3350
- * store may not write (another process's, or quarantined), so the write changes nothing. */
3351
- private record;
3352
- /** Read held legacy family members, or a detached cold record. */
3353
- private peek;
3354
- /**
3355
- * A run just read off its row, as reads answer it: held when its family is in memory (a live
3356
- * family's members are read on every run event), else a copy nobody holds — frozen under
3357
- * vitest when it leaves the store (`freeze`).
3358
- */
3359
- private answerCold;
3360
- /** `getRun` for a row a query already read: the held object, else decoded from `row`. */
3361
- private fromRow;
3362
- /** Run `fn` reading each run that is not held at most once (`ColdReadCache`, hearsay-tools/cezarion#2378). */
3363
- withReadCache<T>(fn: () => T): T;
3364
- /** Whether the run exists, held or not, without decoding it. */
3365
- private hasRun;
3366
- /**
3367
- * Set discovered repository identity without blocking boot. Recompute conclusions from retained
3368
- * evidence, including cold records; null retains unknown-handle behavior.
3369
- */
3370
- setRepoHandle(handle: RepoHandle | null): void;
3371
- /** Whether the stored summary still names a reference the scoped record no longer has. */
3372
- private storedScopeDiffers;
3373
- /**
3374
- * The live set, newest first: runs whose record is live (`isLiveRecord`) or that a RunManager
3375
- * pins. Finished runs are not here — read one by id (`getRun`), by an indexed query
3376
- * (`listWorkersOf`, `findRunByClientRequestId`, `listRunsWithWorktree`,
3377
- * `listBranchOwners`), or as list rows (`listRunSummaries`).
3378
- */
3379
- listRuns(): RunRecord[];
3380
- /** Where a held run lists: its row's insertion order, or after every row while this store has
3381
- * not written it yet. The held set keeps such runs in creation order, and so does every list
3382
- * that sorts them in held-set order (`sortNewestFirst` is stable). */
3383
- private listOrder;
3384
- /**
3385
- * EVERY run as a full record, newest first — decoded row by row. Only the legacy `GET /runs`
3386
- * (older clients; the cockpit reads `GET /run-summaries`) may call this: it is exactly the
3387
- * whole-history parse #779 exists to remove from everything else.
3388
- */
3389
- listAllRunsForLegacyRoute(): RunRecord[];
3390
- /** A bounded page of discoverable peer roots, including the current held overlay. */
3391
- listPeerTaskSummaries(options: PeerTaskPageOptions): {
3392
- runs: RunSummary[];
3393
- nextOffset?: number;
3394
- };
3395
- /**
3396
- * Every run as its list row, newest first: the stored `summary` column, with each held run's
3397
- * own projection laid over it — a debounced save keeps memory up to 300 ms ahead of the row,
3398
- * and a run created since the last save has no row yet. `usage` is the caller's to attach.
3399
- *
3400
- * With `archivedWindow` (#864), the window the cockpit's lists read: every unarchived run, plus
3401
- * the newest `archivedWindow` archived ROOT runs, and whether older archived roots were left
3402
- * out. Archived workers are never in it (see `RunDatabase.listWindowSummaries`); with `roots`,
3403
- * no worker is — the runs index, whose readers list no workers. A held run
3404
- * lists by its record, so one archived or unarchived since the last save is ranked as it is now.
3405
- *
3406
- * A row this store found unreadable is left out, as the cold reader leaves out a row it had to
3407
- * decode and could not. A finished row nobody has decoded is served from its summary by both,
3408
- * which decodes nothing; reading it is what finds out (`isUnreadable`).
3409
- */
3410
- listRunSummaries(options?: {
3411
- archivedWindow?: number | undefined;
3412
- roots?: boolean;
3413
- }): {
3414
- runs: RunSummary[];
3415
- truncated: boolean;
3416
- };
3417
- /**
3418
- * One page of archived ROOT runs, newest first (#864): `GET /run-summaries/archived`, the
3419
- * archived runs past the window. Held runs list by their record, as in `listRunSummaries`.
3420
- * `before` is the previous page's `nextCursor`; with `q`, only runs `matchesRunSearch` keeps, and
3421
- * `total` counts those. `automationNames` lets `q` match a task by its automation's name, as the
3422
- * list's origin line shows it (hearsay-tools/cezarion#1616). A cursor this store did not write
3423
- * answers `{ error }`.
3424
- *
3425
- * Ranking reads every archived root's key (id, created_at, seq: no record, no summary), so the
3426
- * page and `total` agree with the held overlay; only the page's own rows are read in full.
3427
- */
3428
- listArchivedRuns(options: {
3429
- before?: string;
3430
- limit: number;
3431
- q?: string;
3432
- automationNames?: AutomationNames;
3433
- }): ArchivedRunsResponse | {
3434
- error: string;
3435
- };
3436
- /** The archived roots in `runs.db`, each by its key: every one without `q` (no record, no
3437
- * summary read), and with `q` the searched rows `matchesRunSearch` keeps, which carry the summary
3438
- * the search read. A deleted, held or unreadable run's row is left out; a held run joins in
3439
- * `overlayHeldArchived`. */
3440
- private rankArchivedRows;
3441
- /** Lay the held archived roots over `ranked`, each by its record: it replaces its stored row
3442
- * (already left out of `ranked`), and with `q` it must match. A held worker never lists. */
3443
- private overlayHeldArchived;
3444
- /** The page of `ordered` after the cursor `after`: its summaries, the cursor of the next page,
3445
- * and `total`, the count of all of `ordered`. */
3446
- private archivedPage;
3447
- /** The page's summaries: a ranked key's own, else its stored one, read for the rows that have
3448
- * none in a single query. A row whose stored summary does not fit the contract is projected from
3449
- * its record; a row that cannot be read at all is left out. */
3450
- private hydrateArchivedPage;
3451
- /**
3452
- * The ROOT runs, archived or not, that match `query` (`matchesRunSearch`), newest first: at most
3453
- * `limit`, and whether more matched. The owned half of the workspace search (#864); held runs
3454
- * match by their record.
3455
- */
3456
- searchRunSummaries(query: string, limit: number): {
3457
- runs: RunSummary[];
3458
- truncated: boolean;
3459
- };
3460
- /** A row whose stored summary does not fit the contract any more, projected from its record. */
3461
- private coldSummary;
3462
3293
  /**
3463
3294
  * The run, or undefined. A held run is the held object (writes install into it). Any other run
3464
3295
  * is a fresh copy of its row each call, normalized like a loaded record — frozen under vitest —
@@ -3468,61 +3299,6 @@ export declare class RunStore {
3468
3299
  /** Whether the run's row is in `runs.db` but its record could not be read here: what tells a
3469
3300
  * run that cannot open from one that does not exist. Known once something tried to read it. */
3470
3301
  isUnreadable(id: string): boolean;
3471
- /** The ids in memory right now: the held set, for diagnostics and the benchmark's heap pass. */
3472
- heldIds(): string[];
3473
- /**
3474
- * The workers a root run owns, newest first, read off its own `receipts` (#659). Every
3475
- * `createOwnedRun` writes the receipt and the worker record in one transaction, and the
3476
- * receipt list is capped at 1,024 creations (#816), so this is a bounded lookup rather than a walk of the whole
3477
- * project index. An ordinary or worker run owns nothing and costs one map read; a receipt
3478
- * whose record has been deleted is skipped, never invented. A parent quarantined to
3479
- * `invalid` has no readable receipts and reports none, which is also what the cockpit
3480
- * assumes for that role.
3481
- */
3482
- listOwnedWorkers(parentId: string): RunRecord[];
3483
- /** Every worker filed under `parentId` (the `parent_run_id` index plus memory), newest first:
3484
- * receipts or not, which is what the reconcile and deletion checks ask. */
3485
- listWorkersOf(parentId: string): RunRecord[];
3486
- /** The id of every worker, held or stored, without decoding any (recovery's worker passes). */
3487
- listWorkerIds(): string[];
3488
- /** The id of every run whose delegation is quarantined (`invalid`), held or stored: its stored
3489
- * summary says so, so nothing is decoded (scratch cleanup). */
3490
- listQuarantinedRunIds(): string[];
3491
- /** All retained tasks this automation started, including variants, finished and archived runs.
3492
- * Logs and receipts may compact independently. Read only matching keys in SQLite and overlay
3493
- * held records so a debounced provenance update or deletion is reflected immediately. */
3494
- countAutomationRuns(automationId: string): number;
3495
- /** First non-archived task referencing a project issue, including secondary references. */
3496
- findNonArchivedRunByIssue(repo: string, number: number): string | undefined;
3497
- /**
3498
- * The runs automation receipts launched, by receipt id (`automation.receiptId` or
3499
- * `automationTrigger.receiptId`). Memory answers first; a receipt it does not know costs one
3500
- * pass over `runs.db` that reads the records' JSON in SQLite — only a crash leftover (a
3501
- * receipt still `reserved` at startup) ever asks.
3502
- */
3503
- findRunIdsByAutomationReceipt(receiptIds: readonly string[]): Map<string, string>;
3504
- /** The id of every root whose delegation carries a conversation, held or stored: recovery's full
3505
- * reconcile pass (#661). `naming` keeps the ledgers whose messages name that run id as sender or
3506
- * recipient. Stored roots come from the `conversation_members` index, so no record is read. */
3507
- listConversationRootIds(naming?: string): string[];
3508
- /** The id of every run, held or stored, without decoding any (orphan-worktree sweeps). */
3509
- listRunIds(): string[];
3510
- /** Runs with a materialized worktree directory (`worktreePath`, not reclaimed), most recently
3511
- * finished first, then newest first: worktree retention and the worktrees panel. */
3512
- listRunsWithWorktree(): RunRecord[];
3513
- /**
3514
- * Every run that owns a branch or names the PR it created, as the few fields branch cleanup and
3515
- * git-log attribution read (issue 08 §B3, §B5; a squash commit is attributed by its PR number):
3516
- * the stored summary plus the `branch` and `base_branch` columns, so a Git-tab request decodes
3517
- * no record. Held runs answer from memory.
3518
- */
3519
- listBranchOwners(): BranchOwner[];
3520
- /** The rows a column query returned, as records, with memory laid over them: a held run
3521
- * answers from memory (matching `matches` there, not on its maybe-older row). */
3522
- private queryRuns;
3523
- /** The run an idempotent start already created (#504), archived or not. A deleted run is gone
3524
- * with its record, so a retry after deletion honestly creates a fresh one. */
3525
- findRunByClientRequestId(clientRequestId: string): RunRecord | undefined;
3526
3302
  createRun(input: Pick<RunRecord, 'allowWorkers' | 'allowMessaging'> & {
3527
3303
  title: string;
3528
3304
  systemPrompt?: string | undefined;
@@ -3627,22 +3403,6 @@ export declare class RunStore {
3627
3403
  }): void;
3628
3404
  /** Create an owned worker run and its parent receipt; `createStoreOwnedRun` holds the checks. */
3629
3405
  createOwnedRun(input: Parameters<RunStore['createRun']>[0], parentId: string, requestId: string, worker: DelegationState, requestHash: string, spawnCapacityRefusal: SpawnCapacityRefusal, executionIdentity?: unknown): RunRecord;
3630
- /**
3631
- * Durably replace or delete staged rows together with pending dirty rows. Persist before
3632
- * changing held objects or notifying subscribers. On failure retain all pending state; flush()
3633
- * remains best-effort.
3634
- */
3635
- private commitIndex;
3636
- /**
3637
- * Refuse (throwing, with nothing changed) a commit that stages a quarantined run, or a run whose
3638
- * family this store does not claim and cannot take: another process owns it, or a dead process
3639
- * left it live and it has not been adopted.
3640
- */
3641
- private assertWritable;
3642
- /** The family of a run this store knows: held, else its row; a run nowhere is its own. */
3643
- private familyOf;
3644
- /** Schedule the sweep that lets any of `ids` leave memory, when one of them now can. */
3645
- private sweepIfSettled;
3646
3406
  /** Move run `id` by `exit` (ADR 0056): its status and `extras` in one write, checked against the
3647
3407
  * record that write changes. A run this store cannot write is neither checked nor written. The
3648
3408
  * exit decides how the write persists (`exitDurability`), never the extras. A guarded exit (one
@@ -3663,47 +3423,7 @@ export declare class RunStore {
3663
3423
  updateStep(runId: string, stepId: string, patch: Partial<Omit<StepState, 'id'>>): void;
3664
3424
  /** A debounced write of the held record `id`: `apply` changes it in place, then `touch` saves it. */
3665
3425
  private change;
3666
- /** Indexed family enumeration, including members not yet flushed to SQLite. */
3667
- listFamilyRunIds(rootId: string): string[];
3668
- /** Write the pending rows out now (used on shutdown). */
3669
- flush(): void;
3670
3426
  private seqs;
3671
- /** Same location `handoffPath()` in handoff.ts produces — inlined to keep
3672
- * the store free of upward imports. */
3673
- private handoffPath;
3674
- /** Agent screenshots persisted by the run manager (see persistImage). */
3675
- private imagesDir;
3676
- /** Save `run` debounced and publish it; `before` is the record at the write's entry (none: created). */
3677
- private touch;
3678
- /** The held record is gone; the next save or commit deletes its row, fenced by `family`'s claim
3679
- * and by the revision this store last saw (kept in `base` until the delete is written). */
3680
- private markDeleted;
3681
- /** Debounced so token-usage updates don't rewrite a row per event. Nothing to schedule without
3682
- * a database: a `RunStore.unavailable` store, or a closed one, writes nothing. */
3683
- private scheduleSave;
3684
- /** The single database write, so a test can fail it the way a full disk would. */
3685
- private writeIndex;
3686
- /**
3687
- * Write `staged` plus everything still pending — dirty rows from memory, deletions — in one
3688
- * transaction, then clear the pending marks. Throws with nothing cleared when it fails.
3689
- * Never copies or sorts the whole store: the cost is the rows that changed.
3690
- *
3691
- * Fenced (#779, plan step 3): the transaction commits only if every family it writes still
3692
- * carries this store's claim and every row is at the revision this store last saw. Otherwise
3693
- * nothing is written and `handleConflicts` deals with the rows that changed under it.
3694
- */
3695
- private persist;
3696
- /** What a write of these rows (id → family) must still find: this store's claims, at the
3697
- * generations it took them, and each row at the revision it last saw (none for a new row). */
3698
- private fence;
3699
- /**
3700
- * Handle a fenced-write conflict. Save unexpected conflict evidence before clearing pending
3701
- * state or quarantining the row. If evidence persistence fails, retain pending writes. Other
3702
- * rows remain writable; stale unclaimed reads only fail their write.
3703
- */
3704
- private handleConflicts;
3705
- /** Write what is pending, then (unless closing) let every run whose write settled leave memory. */
3706
- private saveNow;
3707
3427
  /**
3708
3428
  * Write what is pending and release the database (store disposal, process shutdown).
3709
3429
  * Idempotent. A closed store keeps answering reads for what it holds — the final save evicts