toolroll 0.9.59 → 0.9.61

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 (152) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +8 -6
  3. package/dist/agent-board.d.ts +208 -0
  4. package/dist/agent-board.js +454 -0
  5. package/dist/agent-fence.d.ts +19 -0
  6. package/dist/agent-fence.js +100 -8
  7. package/dist/agent-pulse.d.ts +43 -0
  8. package/dist/agent-pulse.js +214 -0
  9. package/dist/agent-turns.d.ts +52 -0
  10. package/dist/agent-turns.js +137 -0
  11. package/dist/agents-board.d.ts +101 -0
  12. package/dist/agents-board.js +225 -0
  13. package/dist/assignment-adapters.d.ts +2 -1
  14. package/dist/assignment-adapters.js +1 -1
  15. package/dist/assignment-delivery.d.ts +16 -0
  16. package/dist/assignment-delivery.js +54 -28
  17. package/dist/assignment-status.d.ts +14 -5
  18. package/dist/assignment-status.js +70 -39
  19. package/dist/assignment.d.ts +10 -2
  20. package/dist/assignment.js +21 -14
  21. package/dist/bin.js +11 -2
  22. package/dist/brief-fence.d.ts +9 -0
  23. package/dist/brief-fence.js +22 -0
  24. package/dist/browser/workspace.css +2 -2
  25. package/dist/browser/workspace.js +29 -25
  26. package/dist/browser-crew.js +2 -0
  27. package/dist/browser-workspace.d.ts +79 -1
  28. package/dist/browser-workspace.js +1 -0
  29. package/dist/builder.d.ts +8 -0
  30. package/dist/builder.js +178 -29
  31. package/dist/chat-channel.js +10 -1
  32. package/dist/chat-core.d.ts +6 -0
  33. package/dist/chat-core.js +8 -0
  34. package/dist/chat-delivery.js +22 -0
  35. package/dist/chat-messages.js +8 -1
  36. package/dist/chat-quiet.js +1 -0
  37. package/dist/chat-voice.d.ts +2 -0
  38. package/dist/chat-voice.js +2 -0
  39. package/dist/checkout-cleanup.d.ts +3 -0
  40. package/dist/checkout-cleanup.js +11 -2
  41. package/dist/cli-fast.d.ts +8 -0
  42. package/dist/cli-fast.js +18 -0
  43. package/dist/cli-help.d.ts +5 -0
  44. package/dist/cli-help.js +91 -0
  45. package/dist/cli.d.ts +6 -5
  46. package/dist/cli.js +17 -96
  47. package/dist/contracts/console-api.d.ts +3 -1
  48. package/dist/contracts/console-api.js +5 -1
  49. package/dist/contracts/lead-tools.d.ts +16 -2
  50. package/dist/contracts/lead-tools.js +5 -1
  51. package/dist/design/tokens.css +234 -0
  52. package/dist/desktop-update.d.ts +1 -1
  53. package/dist/discord.js +2 -1
  54. package/dist/evidence-pack.js +1 -1
  55. package/dist/evidence.d.ts +28 -0
  56. package/dist/evidence.js +87 -17
  57. package/dist/exec.d.ts +32 -0
  58. package/dist/exec.js +229 -10
  59. package/dist/flow-actions.js +2 -1
  60. package/dist/guides.js +14 -11
  61. package/dist/invoke.js +110 -18
  62. package/dist/landed-cleanup.d.ts +157 -0
  63. package/dist/landed-cleanup.js +707 -0
  64. package/dist/lead-cli.js +22 -19
  65. package/dist/lead-contract.js +1 -1
  66. package/dist/lead-doors.js +49 -2
  67. package/dist/lead-follow.d.ts +2 -0
  68. package/dist/lead-follow.js +138 -88
  69. package/dist/lead-tools.js +48 -8
  70. package/dist/live-input.d.ts +68 -0
  71. package/dist/live-input.js +254 -0
  72. package/dist/live.d.ts +1 -1
  73. package/dist/live.js +4 -2
  74. package/dist/mailbox.js +3 -2
  75. package/dist/maintenance.d.ts +2 -0
  76. package/dist/maintenance.js +5 -2
  77. package/dist/mcp-core.js +1 -1
  78. package/dist/operate-remote-arguments.js +5 -1
  79. package/dist/operate-remote.js +1 -1
  80. package/dist/operate.d.ts +1 -1
  81. package/dist/operate.js +201 -19
  82. package/dist/orphan-sweep.d.ts +2 -0
  83. package/dist/orphan-sweep.js +5 -3
  84. package/dist/project-delete-ui.d.ts +11 -0
  85. package/dist/project-delete-ui.js +29 -2
  86. package/dist/project-tools.d.ts +7 -11
  87. package/dist/project-tools.js +13 -37
  88. package/dist/provider.d.ts +73 -8
  89. package/dist/provider.js +87 -17
  90. package/dist/result-completion.d.ts +7 -0
  91. package/dist/result-completion.js +9 -0
  92. package/dist/runner.d.ts +4 -2
  93. package/dist/runner.js +3 -3
  94. package/dist/serve.js +22 -3
  95. package/dist/server/chrome.d.ts +6 -3
  96. package/dist/server/chrome.js +8 -4
  97. package/dist/server/console.css +9 -64
  98. package/dist/server/live.d.ts +3 -0
  99. package/dist/server/live.js +35 -2
  100. package/dist/server/pages.js +59 -35
  101. package/dist/server/render-chat.js +14 -2
  102. package/dist/server/render-tasks.d.ts +14 -2
  103. package/dist/server/render-tasks.js +38 -20
  104. package/dist/server/route-table.js +4 -1
  105. package/dist/server/settings.js +2 -1
  106. package/dist/server/task-views.js +10 -0
  107. package/dist/server/tasks.js +63 -0
  108. package/dist/shared-deps.d.ts +9 -4
  109. package/dist/shared-deps.js +89 -13
  110. package/dist/slack-socket.d.ts +12 -0
  111. package/dist/slack-socket.js +29 -0
  112. package/dist/slack.d.ts +0 -7
  113. package/dist/slack.js +2 -24
  114. package/dist/staged-runtimes.d.ts +16 -4
  115. package/dist/staged-runtimes.js +160 -38
  116. package/dist/steer-live.d.ts +19 -0
  117. package/dist/steer-live.js +93 -0
  118. package/dist/steer-mailbox.d.ts +39 -0
  119. package/dist/steer-mailbox.js +207 -0
  120. package/dist/steer-status.d.ts +25 -0
  121. package/dist/steer-status.js +44 -0
  122. package/dist/storage-sweep-child.d.ts +1 -0
  123. package/dist/storage-sweep-child.js +76 -0
  124. package/dist/storage-sweep-process.d.ts +41 -0
  125. package/dist/storage-sweep-process.js +187 -0
  126. package/dist/storage-sweep.d.ts +30 -6
  127. package/dist/storage-sweep.js +214 -28
  128. package/dist/storage-ui.d.ts +2 -0
  129. package/dist/storage-ui.js +16 -4
  130. package/dist/storage.d.ts +6 -0
  131. package/dist/storage.js +35 -0
  132. package/dist/store.d.ts +202 -2
  133. package/dist/store.js +440 -13
  134. package/dist/surface.js +5 -3
  135. package/dist/sweep-gate.d.ts +10 -0
  136. package/dist/sweep-gate.js +18 -0
  137. package/dist/sweep-quarantine.d.ts +28 -0
  138. package/dist/sweep-quarantine.js +153 -0
  139. package/dist/task-status.d.ts +2 -0
  140. package/dist/task-status.js +5 -1
  141. package/dist/team-updates.js +3 -3
  142. package/dist/test-temp.d.ts +6 -3
  143. package/dist/test-temp.js +15 -9
  144. package/dist/toolroll-update.js +15 -2
  145. package/dist/work-index.d.ts +1 -0
  146. package/dist/work-index.js +32 -12
  147. package/dist/work-summary.d.ts +2 -2
  148. package/dist/workspace-revision.js +3 -1
  149. package/dist/worktree.d.ts +3 -1
  150. package/dist/worktree.js +93 -10
  151. package/package.json +21 -21
  152. package/scripts/provider-canary.mjs +235 -147
package/dist/store.d.ts CHANGED
@@ -78,6 +78,15 @@ export declare const FLOW_SEND_SCHEMA = "\nCREATE TABLE IF NOT EXISTS flow_send
78
78
  * vocabulary and when — never text, tool names or arguments. Display state, not evidence;
79
79
  * a finished run's row goes with the live log's own retention (sweepRunActivity). */
80
80
  export declare const RUN_ACTIVITY_SCHEMA = "\nCREATE TABLE IF NOT EXISTS run_activity (\n run INTEGER PRIMARY KEY REFERENCES run(id) ON DELETE CASCADE,\n kind TEXT NOT NULL CHECK (kind IN ('session','message','edit','command','read','search','lookup','plan','delegate','tool')),\n at TEXT NOT NULL\n);\n";
81
+ /** Pausing a running Claude build (live steering, v121: additive only). A person's Pause asks the build to
82
+ * stop its current turn and keep its session: one row per request, bound to the exact run it was asked of, under the
83
+ * request id the asker chose (a repeated request is the same request). `note` is the steering note a Pause and steer
84
+ * sends right after the interrupt. The builder's dispatcher stamps sent_at when the interrupt is written, paused_at when
85
+ * the turn stopped, resumed_at when a later note continued the session, and ended_at when the run stopped taking input
86
+ * first. Never a stop: nothing here ends, holds or reclaims an attempt (run_stop does that). A person's Resume (run_resume)
87
+ * continues a paused build with a short continue frame and no note: one row per request, bound to the exact paused run;
88
+ * sent_at when the frame was written, ended_at when the run was no longer paused to take it. */
89
+ export declare const LIVE_STEER_SCHEMA = "\nCREATE TABLE IF NOT EXISTS run_pause (\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n run INTEGER NOT NULL REFERENCES run(id) ON DELETE CASCADE,\n task_ref INTEGER NOT NULL REFERENCES task_ref(id) ON DELETE CASCADE,\n request_id TEXT NOT NULL UNIQUE,\n requested_by TEXT NOT NULL,\n requested_via TEXT NOT NULL CHECK (requested_via IN ('cli','web','chat')),\n requested_at TEXT NOT NULL,\n note INTEGER REFERENCES task_steer(id) ON DELETE SET NULL,\n sent_at TEXT,\n paused_at TEXT,\n resumed_at TEXT,\n ended_at TEXT\n);\nCREATE INDEX IF NOT EXISTS run_pause_by_run ON run_pause (run, id);\nCREATE TABLE IF NOT EXISTS run_resume (\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n run INTEGER NOT NULL REFERENCES run(id) ON DELETE CASCADE,\n task_ref INTEGER NOT NULL REFERENCES task_ref(id) ON DELETE CASCADE,\n request_id TEXT NOT NULL UNIQUE,\n requested_by TEXT NOT NULL,\n requested_via TEXT NOT NULL CHECK (requested_via IN ('cli','web','chat')),\n requested_at TEXT NOT NULL,\n sent_at TEXT,\n ended_at TEXT\n);\nCREATE INDEX IF NOT EXISTS run_resume_by_run ON run_resume (run, id);\n";
81
90
  export declare const CHAT_APPROVAL_SCHEMA = "\nCREATE TABLE IF NOT EXISTS chat_approval_setting (\n approver TEXT NOT NULL,\n scope TEXT NOT NULL,\n enabled INTEGER NOT NULL CHECK (enabled IN (0,1)),\n full_access INTEGER NOT NULL DEFAULT 0 CHECK (full_access IN (0,1)),\n attempt_cap_microusd INTEGER CHECK (attempt_cap_microusd IS NULL OR attempt_cap_microusd >= 0),\n generation INTEGER NOT NULL,\n digest TEXT NOT NULL,\n updated_by TEXT NOT NULL,\n updated_at TEXT NOT NULL,\n PRIMARY KEY (approver, scope)\n);\n";
82
91
  export declare const CHAT_DECIDE_SCHEMA = "\nCREATE TABLE IF NOT EXISTS chat_decide_action (\n token TEXT PRIMARY KEY,\n channel TEXT NOT NULL,\n binding INTEGER NOT NULL,\n chat TEXT NOT NULL,\n message TEXT,\n act TEXT NOT NULL CHECK (act IN ('accept','changes','retry','approve','not-now','merge')),\n phase TEXT NOT NULL CHECK (phase IN ('offer','yes','cancel')),\n task_id TEXT NOT NULL,\n run INTEGER,\n digest TEXT NOT NULL,\n created_at TEXT NOT NULL,\n expires_at TEXT NOT NULL,\n consumed_at TEXT\n);\nCREATE INDEX IF NOT EXISTS chat_decide_action_message ON chat_decide_action (channel, chat, message);\nCREATE TABLE IF NOT EXISTS chat_decide_prompt (\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n channel TEXT NOT NULL,\n binding INTEGER NOT NULL,\n chat TEXT NOT NULL,\n task_id TEXT NOT NULL,\n run INTEGER NOT NULL,\n digest TEXT NOT NULL,\n message TEXT,\n created_at TEXT NOT NULL,\n expires_at TEXT NOT NULL,\n consumed_at TEXT\n);\nCREATE INDEX IF NOT EXISTS chat_decide_prompt_open ON chat_decide_prompt (channel, binding, consumed_at);\n";
83
92
  export type LeadAsk = {
@@ -152,7 +161,7 @@ export type SealedLedgerEntry = LedgerEntry & {
152
161
  hash: string;
153
162
  } | null;
154
163
  };
155
- export declare const SCHEMA_VERSION = 119;
164
+ export declare const SCHEMA_VERSION = 121;
156
165
  /** v118: the tables merged into `credential`, in the order they move (a person's API tokens keep their ids first). */
157
166
  export declare const V118_MERGED_TABLES: Readonly<Record<string, CredentialKind>>;
158
167
  /**
@@ -209,7 +218,9 @@ export declare const V115_DROPPED_TABLES: readonly string[];
209
218
  * coordinator_credential and lead_credential moves into credential under its kind in one transaction that counts them
210
219
  * before the old tables drop, and the references that named them name credential in place, their rows untouched. v119 only adds four columns
211
220
  * (planning_generation on task_ref, run and plan_revision, defaulting to 0, and decision.superseded_reason, null);
212
- * the rehearsal checks every saved row reads the declared default (HISTORY_RULES' added columns).
221
+ * the rehearsal checks every saved row reads the declared default (HISTORY_RULES' added columns). v120 only adds
222
+ * three nullable task_steer columns (the running build's steering folder), checked the same way. v121 only adds
223
+ * new tables and the columns in V121_ADDED_COLUMNS (null, or no sends), checked the same way.
213
224
  */
214
225
  export declare const UPDATE_SAFE_MIGRATIONS: readonly number[];
215
226
  /** v119: the columns it adds, by table, with the value every row saved before it reads (toolroll-update's HISTORY_RULES). */
@@ -217,6 +228,28 @@ export declare const V119_ADDED_COLUMNS: Readonly<Record<string, Readonly<Record
217
228
  definition: string;
218
229
  saved: string;
219
230
  }>>>>;
231
+ /** v120: the columns it adds, by table, with the value every row saved before it reads. */
232
+ export declare const V120_ADDED_COLUMNS: Readonly<Record<string, Readonly<Record<string, {
233
+ definition: string;
234
+ saved: string;
235
+ }>>>>;
236
+ /**
237
+ * Live steering's added columns (v121), with the value every row saved before them reads. A note carries the identity
238
+ * its stdin copy is sent under (live_uuid, minted when it is filed), how many times it was sent to the running build
239
+ * and when last, and when it was given up on as not picked up.
240
+ * A run says when its stdin session opened and closed: only then can a note reach it in seconds, or a Pause stop a turn;
241
+ * and how long a paused session may wait before it ends (the idle limit; none under a wall-clock limit).
242
+ */
243
+ export declare const LIVE_STEER_COLUMNS: Readonly<Record<string, Readonly<Record<string, {
244
+ definition: string;
245
+ saved: string;
246
+ }>>>>;
247
+ /** v121: the columns it adds, by table, with the value every row saved before it reads: live steering's, and a run's
248
+ * attempt key (the Agents board; runs admitted before it read none). Its new tables carry no saved rows. */
249
+ export declare const V121_ADDED_COLUMNS: Readonly<Record<string, Readonly<Record<string, {
250
+ definition: string;
251
+ saved: string;
252
+ }>>>>;
220
253
  /** Whether a database settled at `version` reaches this build's schema through update-safe migrations alone. */
221
254
  export declare function updateSafeSchema(version: number | null): boolean;
222
255
  export type OAuthClientRow = {
@@ -1137,6 +1170,9 @@ export type RunPhase = (typeof RUN_PHASES)[number];
1137
1170
  * One operator steering note (arc 1, v22). Attached ≠ delivered: attachment
1138
1171
  * says which build the note rode toward; delivery settles only on the
1139
1172
  * stream's own receipt. Superseded = the task ended with it still pending.
1173
+ * v120: a note filed while a build runs is mailed into that build's steering
1174
+ * folder (mailed), and is read only when the agent moves it to handled/
1175
+ * (acked, which also settles it delivered to that build).
1140
1176
  */
1141
1177
  export type SteerNote = {
1142
1178
  /** v24 (ruling 11): "verified" = credentialed authorship; anything else is history, never brief-bound. */
@@ -1151,6 +1187,57 @@ export type SteerNote = {
1151
1187
  attachedAt: string | null;
1152
1188
  deliveredAt: string | null;
1153
1189
  supersededAt: string | null;
1190
+ mailedRun: number | null;
1191
+ mailedAt: string | null;
1192
+ ackedAt: string | null;
1193
+ /** Live steering: the identity its stdin copy is sent under, how often and when last it was sent to the running
1194
+ * build, and when it was given up on as not picked up. Null/0 on notes filed before live steering. */
1195
+ liveUuid: string | null;
1196
+ liveSends: number;
1197
+ liveSentAt: string | null;
1198
+ liveMissedAt: string | null;
1199
+ };
1200
+ /** Who asked for a pause, and through which door. */
1201
+ export type PauseVia = "cli" | "web" | "chat";
1202
+ /** One Pause (or Pause and steer) asked of an exact running build (LIVE_STEER_SCHEMA). */
1203
+ export type RunPause = {
1204
+ id: number;
1205
+ run: number;
1206
+ taskRef: number;
1207
+ requestId: string;
1208
+ requestedBy: string;
1209
+ requestedVia: PauseVia;
1210
+ requestedAt: string;
1211
+ note: number | null;
1212
+ sentAt: string | null;
1213
+ pausedAt: string | null;
1214
+ resumedAt: string | null;
1215
+ endedAt: string | null;
1216
+ };
1217
+ /** Where a run's latest pause stands, and how long a paused build may wait before it ends (null: no idle limit). */
1218
+ export type LivePauseState = {
1219
+ state: "pausing" | "paused";
1220
+ pausedAt: string | null;
1221
+ limitMs: number | null;
1222
+ };
1223
+ export type ResumeRequestResult = {
1224
+ ok: true;
1225
+ resume: number;
1226
+ duplicate: boolean;
1227
+ } | {
1228
+ ok: false;
1229
+ reason: "invalid-request" | "duplicate" | "unknown-task" | "task-finished" | "stale" | "not-paused";
1230
+ detail: string;
1231
+ };
1232
+ export type PauseRequestResult = {
1233
+ ok: true;
1234
+ pause: number;
1235
+ note: number | null;
1236
+ duplicate: boolean;
1237
+ } | {
1238
+ ok: false;
1239
+ reason: "invalid-request" | "duplicate" | "unknown-task" | "task-finished" | "stale" | "invalid-note";
1240
+ detail: string;
1154
1241
  };
1155
1242
  /** One phone enrollment for web push (arc 3, v23). A row per ACTIVATION —
1156
1243
  * retirement is history, never deletion. */
@@ -4654,6 +4741,9 @@ export declare class Store {
4654
4741
  reason: "unknown-task" | "task-finished" | "invalid-note";
4655
4742
  problem?: string;
4656
4743
  };
4744
+ /** One verified note, with the identity a running build's stdin copy is sent under: filing it is also what queues
4745
+ * its live delivery, in the same transaction (the builder's dispatcher sends whatever is filed and unsent). */
4746
+ private insertSteerNote;
4657
4747
  /** Every steering note of a task, filing order, delivery state included. */
4658
4748
  listSteerNotes(taskRef: number): SteerNote[];
4659
4749
  /** Undelivered, unsuperseded notes. */
@@ -4676,6 +4766,113 @@ export declare class Store {
4676
4766
  * first receipt wins, and a replay changes nothing.
4677
4767
  */
4678
4768
  settleSteerDelivered(runId: number, now: Date): number;
4769
+ /**
4770
+ * The task's build whose agent is running right now and reads its steering
4771
+ * folder (v120): the current live lease's open builder run, in its
4772
+ * agent-running phase, whose steering folder is open. Null otherwise — a
4773
+ * note then waits for the next attempt. Display state, never evidence.
4774
+ */
4775
+ steeringLiveBuild(taskRef: number, now: Date): number | null;
4776
+ /** This run made its steering folder (v120): its agent can read a note filed now. */
4777
+ markSteerFolderOpened(runId: number, now: Date): void;
4778
+ /** This run's steering folder is gone (v120): a note filed now reaches the next attempt. */
4779
+ markSteerFolderClosed(runId: number, now: Date): void;
4780
+ /**
4781
+ * The notes a RUNNING build may still read (v120): verified, pending, not
4782
+ * already quoted in this run's brief, and not already in its folder. The
4783
+ * pulse mails exactly these, in filing order.
4784
+ */
4785
+ mailableSteerNotes(taskRef: number, runId: number): SteerNote[];
4786
+ /** The pulse wrote this note into the run's steering folder. Mailing is not
4787
+ * reading: delivery settles only on the agent's own acknowledgement. */
4788
+ markSteerMailed(noteId: number, runId: number, now: Date): boolean;
4789
+ /**
4790
+ * The agent moved this note to handled/ (v120): it was read, by THIS run.
4791
+ * Acknowledgement is the only road from mailed to delivered — a hook firing
4792
+ * or a file written proves nothing. First acknowledgement wins; a note the
4793
+ * task already ended, or mailed to another run since, is left alone.
4794
+ */
4795
+ ackSteerNote(noteId: number, runId: number, now: Date): boolean;
4796
+ /**
4797
+ * The task's build that takes live input right now (live steering): the steering build (steeringLiveBuild) whose
4798
+ * Claude session reads stdin. Only this run can take a note in seconds, or a Pause. Null otherwise.
4799
+ */
4800
+ liveInputRun(taskRef: number, now: Date): number | null;
4801
+ /** This run's Claude session reads stdin now (live steering), and how long a paused session may wait (null: no idle limit). */
4802
+ markLiveInputOpened(runId: number, now: Date, pauseLimitMs?: number | null): void;
4803
+ /** This run's stdin is closed (live steering): notes reach it only through its folder, and a Pause is over. */
4804
+ markLiveInputClosed(runId: number, now: Date): void;
4805
+ /** One steering note by id. */
4806
+ steerNote(noteId: number): SteerNote | null;
4807
+ /**
4808
+ * The note's copy was written to this run's stdin (live steering): one more send, stamped. Sending is not reading —
4809
+ * only the agent moving its file to handled/ is (ackSteerNote). Refused once the note is read, ended, given up on,
4810
+ * or mailed to another run.
4811
+ */
4812
+ recordLiveSend(noteId: number, runId: number, now: Date): boolean;
4813
+ /** The running build was sent this note every time it is owed and never moved it to handled/: Not picked up. A later
4814
+ * acknowledgement still reads it (ackSteerNote ignores this), and an attempt that ends returns it to the next brief. */
4815
+ markLiveMissed(noteId: number, runId: number, now: Date): boolean;
4816
+ /**
4817
+ * Pause a running Claude build, or Pause and steer it (live steering): asked of the exact run the person saw, under
4818
+ * their request id. In one transaction the note (when there is one) is filed — Ruling 11's verified author — and the
4819
+ * pause is queued ahead of it, so the dispatcher writes the interrupt before the note. A repeated request id is the
4820
+ * same request; a run that no longer takes live input is stale. Pause never stops, holds or reclaims the attempt.
4821
+ */
4822
+ requestPause(request: {
4823
+ taskId: string;
4824
+ runId: number;
4825
+ by: VerifiedAuthor;
4826
+ via: PauseVia;
4827
+ requestId: string;
4828
+ note?: string;
4829
+ }, now: Date): PauseRequestResult;
4830
+ /** The pauses this run has not yet written to stdin, in request order (the dispatcher writes these first). */
4831
+ unsentPauses(runId: number): RunPause[];
4832
+ /** The interrupt for this pause was written to the run's stdin. */
4833
+ markPauseSent(pauseId: number, now: Date): void;
4834
+ /** The run's current turn stopped: every pause sent and still waiting reads paused. */
4835
+ markRunPaused(runId: number, now: Date): void;
4836
+ /** A note continued the paused session: its pauses are over. */
4837
+ markRunResumed(runId: number, now: Date): void;
4838
+ /** The run could not take this pause (its stdin closed first). */
4839
+ endPause(pauseId: number, now: Date): void;
4840
+ /** Where this run's latest pause stands: asked and not yet stopped (pausing), stopped (paused), or none. */
4841
+ pauseStateOf(runId: number): "pausing" | "paused" | null;
4842
+ /** This run's latest pause, when it paused, and how long a paused build may wait before it ends; null with none. */
4843
+ livePauseOf(runId: number): LivePauseState | null;
4844
+ /**
4845
+ * Resume a paused Claude build (live steering): asked of the exact run the person saw, under their request id, and
4846
+ * only while that run is paused. The dispatcher sends a short continue frame — never a note, so nothing is filed.
4847
+ * A repeated request id is the same request; a run that no longer takes live input is stale.
4848
+ */
4849
+ requestResume(request: {
4850
+ taskId: string;
4851
+ runId: number;
4852
+ by: VerifiedAuthor;
4853
+ via: PauseVia;
4854
+ requestId: string;
4855
+ }, now: Date): ResumeRequestResult;
4856
+ /** The resumes this run has not yet sent, in request order. */
4857
+ unsentResumes(runId: number): {
4858
+ id: number;
4859
+ requestId: string;
4860
+ }[];
4861
+ /** The continue frame was written: the resume is sent, and the run's pauses are over. */
4862
+ markResumeSent(resumeId: number, runId: number, now: Date): void;
4863
+ /** The run was no longer paused (a note continued it first) or stopped taking input: nothing to send. */
4864
+ endResume(resumeId: number, now: Date): void;
4865
+ /** Every resume of a task, newest first (history and tests). */
4866
+ resumesForTask(taskRef: number): {
4867
+ id: number;
4868
+ run: number;
4869
+ requestId: string;
4870
+ requestedVia: PauseVia;
4871
+ sentAt: string | null;
4872
+ endedAt: string | null;
4873
+ }[];
4874
+ /** Every pause of a task, newest first (history and tests). */
4875
+ pausesForTask(taskRef: number): RunPause[];
4679
4876
  /** A finished task's pending notes settle superseded — shown, typed, done. */
4680
4877
  supersedeSteerNotes(taskRef: number, now: Date): number;
4681
4878
  /** The answers a run was given, exactly as it was given them. */
@@ -6496,6 +6693,9 @@ export declare class Store {
6496
6693
  * mark. The outbox's delivered_at is deliberately not consulted.
6497
6694
  */
6498
6695
  seedPushPairs(now: Date): number;
6696
+ /** A pending pair about a run its person is watching waits for the watch to lapse; one about a finished run they have
6697
+ * since seen retires unsent (agent-board.ts watchedPing). False when the pair must not be sent now. */
6698
+ private settleWatchedPush;
6499
6699
  /**
6500
6700
  * Claim due pairs: pending (respecting next_attempt_at) or claimed-but-
6501
6701
  * expired (reclaim bumps the generation — the old owner loses every