toolroll 0.9.54 → 0.9.55

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 (199) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +5 -4
  3. package/dist/agent-onboard.js +4 -1
  4. package/dist/approval-rules-ui.d.ts +3 -2
  5. package/dist/approval-rules-ui.js +15 -20
  6. package/dist/assignment-ui.d.ts +3 -2
  7. package/dist/assignment-ui.js +4 -11
  8. package/dist/backup-ui.d.ts +2 -1
  9. package/dist/backup-ui.js +16 -27
  10. package/dist/brand-mark.d.ts +3 -2
  11. package/dist/brand-mark.js +4 -4
  12. package/dist/browser/workspace.css +1 -1
  13. package/dist/browser/workspace.js +25 -25
  14. package/dist/browser-shell.d.ts +2 -1
  15. package/dist/browser-shell.js +9 -9
  16. package/dist/browser-workspace.d.ts +2 -3
  17. package/dist/browser-workspace.js +0 -3
  18. package/dist/chat-polish.d.ts +5 -4
  19. package/dist/chat-polish.js +9 -10
  20. package/dist/check-levels-ui.d.ts +2 -1
  21. package/dist/check-levels-ui.js +26 -53
  22. package/dist/cli.d.ts +3 -1
  23. package/dist/cli.js +9 -3
  24. package/dist/coding-shipping-ui.d.ts +2 -1
  25. package/dist/coding-shipping-ui.js +6 -6
  26. package/dist/coding-ui.d.ts +3 -1
  27. package/dist/coding-ui.js +30 -29
  28. package/dist/contracts/cli.d.ts +1 -3
  29. package/dist/contracts/console-api.d.ts +1 -1
  30. package/dist/contracts/console-api.js +6 -5
  31. package/dist/contracts/health.d.ts +1 -3
  32. package/dist/control-ui.d.ts +5 -4
  33. package/dist/control-ui.js +9 -34
  34. package/dist/credentials-ui.d.ts +5 -4
  35. package/dist/credentials-ui.js +23 -24
  36. package/dist/demo-chat.d.ts +3 -3
  37. package/dist/demo-chat.js +29 -76
  38. package/dist/discord-settings.d.ts +3 -2
  39. package/dist/discord-settings.js +17 -42
  40. package/dist/envelope.js +10 -0
  41. package/dist/evidence-pack.d.ts +2 -1
  42. package/dist/evidence-pack.js +45 -49
  43. package/dist/export-ui.d.ts +7 -2
  44. package/dist/export-ui.js +4 -10
  45. package/dist/flow-gallery-ui.d.ts +4 -3
  46. package/dist/flow-gallery-ui.js +28 -43
  47. package/dist/flow-starters-ui.d.ts +2 -1
  48. package/dist/flow-starters-ui.js +12 -15
  49. package/dist/flow-triggers.d.ts +1 -0
  50. package/dist/flow-triggers.js +16 -14
  51. package/dist/flows-ui.d.ts +4 -3
  52. package/dist/flows-ui.js +19 -30
  53. package/dist/flows.js +2 -1
  54. package/dist/guides.js +108 -3
  55. package/dist/html.d.ts +76 -0
  56. package/dist/html.js +173 -0
  57. package/dist/integrations-ui.d.ts +2 -1
  58. package/dist/integrations-ui.js +19 -23
  59. package/dist/kits-ui.d.ts +5 -4
  60. package/dist/kits-ui.js +18 -20
  61. package/dist/knowledge-ui.d.ts +6 -5
  62. package/dist/knowledge-ui.js +26 -25
  63. package/dist/lead-context.d.ts +11 -1
  64. package/dist/lead-context.js +6 -8
  65. package/dist/ledger-view.d.ts +2 -1
  66. package/dist/ledger-view.js +27 -29
  67. package/dist/limits-ui.d.ts +2 -1
  68. package/dist/limits-ui.js +7 -7
  69. package/dist/live-bus.d.ts +50 -8
  70. package/dist/live-bus.js +133 -50
  71. package/dist/mcp-oauth.js +35 -36
  72. package/dist/models-ui.d.ts +2 -1
  73. package/dist/models-ui.js +25 -35
  74. package/dist/monitoring-ui.d.ts +4 -3
  75. package/dist/monitoring-ui.js +13 -26
  76. package/dist/openrouter-models.d.ts +2 -1
  77. package/dist/openrouter-models.js +5 -9
  78. package/dist/operate.js +11 -7
  79. package/dist/people-audit-ui.d.ts +2 -1
  80. package/dist/people-audit-ui.js +13 -13
  81. package/dist/policy-ui.d.ts +3 -2
  82. package/dist/policy-ui.js +17 -23
  83. package/dist/project-delete-ui.d.ts +4 -3
  84. package/dist/project-delete-ui.js +15 -27
  85. package/dist/pull-request-ui.d.ts +2 -1
  86. package/dist/pull-request-ui.js +17 -32
  87. package/dist/recipe-ui.d.ts +8 -7
  88. package/dist/recipe-ui.js +39 -32
  89. package/dist/release-adapters.d.ts +60 -0
  90. package/dist/release-adapters.js +435 -0
  91. package/dist/release-cli.d.ts +24 -0
  92. package/dist/release-cli.js +181 -0
  93. package/dist/release-gate.d.ts +80 -0
  94. package/dist/release-gate.js +150 -0
  95. package/dist/release-links.d.ts +29 -0
  96. package/dist/release-links.js +102 -0
  97. package/dist/release.d.ts +331 -0
  98. package/dist/release.js +550 -0
  99. package/dist/reply-shape.d.ts +2 -1
  100. package/dist/reply-shape.js +5 -5
  101. package/dist/repository-context-ui.d.ts +2 -1
  102. package/dist/repository-context-ui.js +2 -7
  103. package/dist/request-budget-ui.d.ts +2 -1
  104. package/dist/request-budget-ui.js +16 -16
  105. package/dist/result-review.d.ts +2 -3
  106. package/dist/result-review.js +3 -9
  107. package/dist/retention-ui.d.ts +7 -1
  108. package/dist/retention-ui.js +7 -11
  109. package/dist/serve.d.ts +11 -2
  110. package/dist/serve.js +69 -58
  111. package/dist/server/chat.d.ts +3 -6
  112. package/dist/server/chat.js +969 -1006
  113. package/dist/server/chrome.d.ts +291 -0
  114. package/dist/server/chrome.js +747 -0
  115. package/dist/server/console.css +2819 -0
  116. package/dist/server/flows.d.ts +2 -6
  117. package/dist/server/flows.js +840 -766
  118. package/dist/server/guards.d.ts +1 -1
  119. package/dist/server/guards.js +5 -2
  120. package/dist/server/handler-context.d.ts +1 -1
  121. package/dist/server/handler-context.js +1 -1
  122. package/dist/server/handler-registry.d.ts +8 -6
  123. package/dist/server/handler-registry.js +14 -2
  124. package/dist/server/http.d.ts +274 -0
  125. package/dist/server/http.js +239 -0
  126. package/dist/server/live.d.ts +34 -0
  127. package/dist/server/live.js +309 -0
  128. package/dist/server/pages.d.ts +2 -6
  129. package/dist/server/pages.js +808 -789
  130. package/dist/server/people-tokens.d.ts +1 -6
  131. package/dist/server/people-tokens.js +580 -572
  132. package/dist/server/remote.d.ts +4 -7
  133. package/dist/server/remote.js +37 -70
  134. package/dist/server/render-chat.d.ts +402 -0
  135. package/dist/server/render-chat.js +927 -0
  136. package/dist/server/render-pages.d.ts +535 -0
  137. package/dist/server/render-pages.js +1277 -0
  138. package/dist/server/render-people.d.ts +32 -0
  139. package/dist/server/render-people.js +121 -0
  140. package/dist/server/render-results.d.ts +744 -0
  141. package/dist/server/render-results.js +2237 -0
  142. package/dist/server/render-settings.d.ts +147 -0
  143. package/dist/server/render-settings.js +577 -0
  144. package/dist/server/render-tasks.d.ts +632 -0
  145. package/dist/server/render-tasks.js +2345 -0
  146. package/dist/server/request-context.d.ts +46 -0
  147. package/dist/server/request-context.js +17 -0
  148. package/dist/server/route-table.d.ts +25 -3
  149. package/dist/server/route-table.js +163 -75
  150. package/dist/server/runtime.d.ts +15 -7
  151. package/dist/server/runtime.js +7 -1
  152. package/dist/server/session.d.ts +138 -0
  153. package/dist/server/session.js +94 -0
  154. package/dist/server/settings.d.ts +1 -5
  155. package/dist/server/settings.js +2181 -2117
  156. package/dist/server/task-views.d.ts +11 -4
  157. package/dist/server/task-views.js +26 -22
  158. package/dist/server/tasks.d.ts +9 -9
  159. package/dist/server/tasks.js +1486 -1418
  160. package/dist/server-telemetry.d.ts +4 -3
  161. package/dist/server-telemetry.js +4 -8
  162. package/dist/skills-ui.d.ts +4 -3
  163. package/dist/skills-ui.js +14 -17
  164. package/dist/skills.d.ts +1 -1
  165. package/dist/skills.js +2 -1
  166. package/dist/slack-settings.d.ts +3 -2
  167. package/dist/slack-settings.js +17 -42
  168. package/dist/spend-ui.d.ts +2 -1
  169. package/dist/spend-ui.js +9 -32
  170. package/dist/sso-ui.d.ts +3 -2
  171. package/dist/sso-ui.js +26 -27
  172. package/dist/storage-ui.d.ts +2 -1
  173. package/dist/storage-ui.js +14 -33
  174. package/dist/surface.js +14 -3
  175. package/dist/task-composer.d.ts +2 -1
  176. package/dist/task-composer.js +7 -7
  177. package/dist/task-status.d.ts +4 -3
  178. package/dist/task-status.js +15 -16
  179. package/dist/team-http.d.ts +5 -9
  180. package/dist/team-http.js +5 -63
  181. package/dist/team-ui.d.ts +2 -1
  182. package/dist/team-ui.js +2 -5
  183. package/dist/teammates-ui.d.ts +5 -4
  184. package/dist/teammates-ui.js +61 -90
  185. package/dist/teams-settings.d.ts +3 -2
  186. package/dist/teams-settings.js +20 -31
  187. package/dist/telegram-settings.d.ts +3 -2
  188. package/dist/telegram-settings.js +14 -25
  189. package/dist/toolroll-update-ui.d.ts +3 -2
  190. package/dist/toolroll-update-ui.js +35 -39
  191. package/dist/tools-ui.d.ts +5 -2
  192. package/dist/tools-ui.js +31 -31
  193. package/dist/when-html.d.ts +11 -3
  194. package/dist/when-html.js +5 -6
  195. package/dist/workspace-ui.d.ts +4 -2
  196. package/dist/workspace-ui.js +10 -10
  197. package/package.json +1 -1
  198. package/dist/server/shared.d.ts +0 -3151
  199. package/dist/server/shared.js +0 -12001
@@ -0,0 +1,744 @@
1
+ import { type AssignmentSnapshot } from "../assignment.js";
2
+ import { type BrowserCheckItem, type BrowserNeedAction, type BrowserResultPanel, type BrowserResultView } from "../browser-workspace.js";
3
+ import { type ReportShot } from "../evidence.js";
4
+ import { type FailureExplanation } from "../needs-you.js";
5
+ import { type RouteStamp } from "../phase-routing.js";
6
+ import { type CriterionMatrixRow, type ProofVerdict } from "../proof.js";
7
+ import { type PullRequestView } from "../pull-request-flow.js";
8
+ import { type StructuredHandoffView, type TerminalDiffView } from "../result-evidence-readers.js";
9
+ import { type FollowUpCheck } from "../result-follow-ups.js";
10
+ import { type ResultScreenshot, type ResultTab, type SharedResultFacts } from "../result-review.js";
11
+ import { type BuildReviewView } from "../review-switch.js";
12
+ import { type AcceptanceCriterion, type approvalOf } from "../scope.js";
13
+ import { type ReportItem } from "../scout-report.js";
14
+ import { type Artifact, type DiffComment, type Publication, type RepairChainRow, type ReviewRetryState, type Run, type Store, type TaskState } from "../store.js";
15
+ import { type PullRequestFact, type TaskStatus } from "../task-status.js";
16
+ import { type DisplayStatus, type PublicationFacts, type ReviewFacts } from "../workspace-ui.js";
17
+ import { type Chrome, type Screen } from "./chrome.js";
18
+ import { type Html } from "../html.js";
19
+ export declare const RUNS_PAGE = 50;
20
+ /**
21
+ * A vscode://file href, or null (arc 6, finding 2): the link exists only
22
+ * when every part is provably tame — an absolute, control-free worktree;
23
+ * a relative, single-line path whose segments contain no empty, dot,
24
+ * dot-dot, or backslash components (so lexical resolution stays below the
25
+ * worktree); a line inside the same 1..1,000,000 range the comment form
26
+ * enforces. Encoding failures return null — a file row degrades to plain
27
+ * text, never to a 500. The scheme is a constant, never data.
28
+ */
29
+ export declare function editorFileHref(worktree: string, path: string, line?: number | null): string | null;
30
+ /** The execution profile in plain words (v24): what the password signs
31
+ * says WHAT RUNS — provider, exact model, permissions, and the real
32
+ * bounds — or says honestly that it cannot yet. */
33
+ /** The state badges the criterion-to-evidence matrix renders with — one
34
+ * shared vocabulary, so a "failed" row reads the same shade of trouble on
35
+ * the task page, the run page, the board, done, builds, the inbox, and
36
+ * chat (v39, extending Priority 2's "one surface, six places" rule from
37
+ * the verdict word to the per-criterion state). */
38
+ export declare function matrixStateBadge(state: CriterionMatrixRow["state"]): Html;
39
+ /** v40: the bounded repair chain's own line — presented as the user-facing
40
+ * recovery it represents, without exposing the internal workflow name.
41
+ * Renders on the task page and the run page identically. */
42
+ export declare function repairChainHtml(chain: RepairChainRow | null): Html;
43
+ /**
44
+ * The bounded review-retry panel (v50), shared by the task page and the
45
+ * result cockpit so both say the same thing: which attempt is running or
46
+ * queued, how the latest one ended, every root attempt on record, and the
47
+ * ONE explicit act — a Retry review form — rendered only while the store's
48
+ * allowance admits it and this session may ask (an approver's cookie
49
+ * session). Every other state shows the same control disabled, in words,
50
+ * so a person always sees why nothing more will happen by itself. Empty
51
+ * when no review was ever asked for.
52
+ */
53
+ export declare function reviewRetryPanel(_taskId: string, _sourceRun: number, retry: ReviewRetryState | null, _options: {
54
+ csrf: string;
55
+ canAct: boolean;
56
+ returnTo: string | null;
57
+ }): Html;
58
+ /** A one-line summary of the matrix for list rows too dense for the full
59
+ * table (done, builds, board, inbox) — "2/3 criteria", plus a worst-state
60
+ * badge so trouble is visible without opening the row. `[]` renders
61
+ * nothing. */
62
+ export declare function criterionMatrixSummary(matrix: readonly CriterionMatrixRow[]): Html;
63
+ /** Where a criterion's own typed evidence ref resolves to a stored
64
+ * artifact, keyed `${kind}:${ref}` — built once per run from its
65
+ * artifacts (v39 review finding: "link artifacts where possible"). A
66
+ * `changed-path` ref never gets its own per-file artifact, so every one of
67
+ * those shares the single terminal-diff patch, under the wildcard key. A
68
+ * `manual-review` ref never resolves — it names nothing machine-checkable. */
69
+ export type EvidenceLinkMap = ReadonlyMap<string, number>;
70
+ export declare const CHECK_LOG_CAPTURE: RegExp;
71
+ export declare function evidenceLinksFor(artifacts: readonly Artifact[]): EvidenceLinkMap;
72
+ /** Read the approved requirement first; inspect its saved evidence on demand.
73
+ * Machine results, reviewer judgements and missing context remain separate.
74
+ * Warnings stay outside the disclosure, including on compact surfaces. */
75
+ export declare function criterionMatrixHtml(matrix: readonly CriterionMatrixRow[], options?: {
76
+ compact?: boolean;
77
+ runId?: number;
78
+ links?: EvidenceLinkMap;
79
+ fileAnchors?: ReadonlyMap<string, string>;
80
+ verdict?: string | null;
81
+ }): Html;
82
+ /** One policy summary beneath the requirements. Per-requirement concerns
83
+ * are already visible in the matrix; do not repeat their full text here. */
84
+ export declare function semanticCoverageHtml(matrix: readonly CriterionMatrixRow[], qualityMode: "default" | "strict"): Html;
85
+ /** A same-site path or "/": never a scheme, a host, or a protocol-relative road. */
86
+ /** The words a result page shows for a refusal its own form led to, by the fixed code a redirect carries. */
87
+ export declare const ACCEPT_ANYWAY_NEEDS_REASON = "Accepting anyway needs a reason.";
88
+ export declare const RESULT_REFUSALS: Record<string, string>;
89
+ /** A same-site page address with a refusal code added, before any fragment. */
90
+ export declare function withRefusal(href: string, code: keyof typeof RESULT_REFUSALS): string;
91
+ /** The queue reads at most this many completed tasks — the store's own
92
+ * page ceiling, admission bound before it. */
93
+ export declare const REVIEW_QUEUE_CAP = 100;
94
+ /** The one return road the comment endpoint honors besides its own run
95
+ * page: the cockpit's selected-result link, exactly. */
96
+ export declare const REVIEW_RETURN: RegExp;
97
+ /** Review priority: a deterministic, LABELED presentation aid over facts
98
+ * the done list already carries. Band 0 goes first; the words name why.
99
+ * It is never a verdict — the stored proof verdict stays the authority,
100
+ * and an operator's acceptance lowers a band without touching it. */
101
+ export type ReviewPriority = {
102
+ band: 0 | 1 | 2;
103
+ label: "needs action" | "review" | "no flags";
104
+ reasons: string[];
105
+ };
106
+ export type ReviewQueueFacts = {
107
+ /** Only an exact current task/run match carries the assignment status. */
108
+ assignment?: AssignmentSnapshot | null;
109
+ proofReasons?: readonly string[];
110
+ runId: number | null;
111
+ outcome: string | null;
112
+ proofVerdict: ProofVerdict | null;
113
+ proofAccepted: boolean;
114
+ proofMatrix: readonly CriterionMatrixRow[];
115
+ ciFailing: boolean;
116
+ publicationState: string | null;
117
+ };
118
+ export declare const PRIORITY_LABELS: Record<ReviewPriority["band"], ReviewPriority["label"]>;
119
+ export declare function reviewPriorityOf(row: ReviewQueueFacts): ReviewPriority;
120
+ /** Ranked, stable: band first, then newest completion, then task id — the
121
+ * same input always yields the same queue, whoever loads it. */
122
+ export declare function rankReviewQueue<T extends ReviewQueueFacts & {
123
+ completedAt: string;
124
+ taskId: string;
125
+ }>(rows: readonly T[]): (T & {
126
+ priority: ReviewPriority;
127
+ })[];
128
+ /** Whether a changed path sits inside the scope's signed "touches" — an
129
+ * exact file, a directory prefix (with or without its slash), or a plain
130
+ * `*` / `**` glob. Touches are advisory in the scope; here they only
131
+ * decide which files wear the "outside the signed touches" flag. */
132
+ export declare function withinSignedTouches(path: string, touches: readonly string[]): boolean;
133
+ /** A signed touch's glob as a regular expression, gitignore-style: `*`
134
+ * stays inside one segment; `**` followed by `/` spans zero or more
135
+ * directories, so `src/**` followed by `/*.ts` matches `src/a.ts` as well
136
+ * as `src/nested/a.ts` (v2 review, comment 2); a bare `**` spans anything.
137
+ * Whatever the glob names, its contents are inside it too. */
138
+ export declare function touchGlob(raw: string): RegExp;
139
+ /** A stable, attribute-safe anchor for one file of the sealed patch —
140
+ * derived from the path's bytes, never from the path's characters, so a
141
+ * hostile file name can neither break the id nor escape the attribute. */
142
+ export declare function diffFileAnchor(path: string): string;
143
+ export type ReviewFileRow = {
144
+ path: string;
145
+ additions: number | null;
146
+ deletions: number | null;
147
+ renamedFrom: string | null;
148
+ anchor: string | null;
149
+ outsideTouches: boolean;
150
+ cited: boolean;
151
+ };
152
+ /** Paths whose churn a reviewer reads first — dependency manifests and
153
+ * locks, CI workflows, container and schema definitions, migrations, the
154
+ * environment files secrets live in, and files NAMED for credentials.
155
+ * The credential words match only as whole `-`/`_`/`.`-delimited pieces
156
+ * of the file name (v2 review, comment 4): `auth.ts`, `api-token.ts`,
157
+ * `secrets.json` count; `author.ts`, `tokenizer.ts`, and `.envelope.ts`
158
+ * are ordinary names and do not. `permission` is not a credential word
159
+ * at all — `permissions-ui.tsx` is a screen, not a secret. */
160
+ export declare const SENSITIVE_PATH: RegExp;
161
+ export declare const LARGE_CHANGE_LINES = 200;
162
+ /** The changed-file list's own review priority: outside the signed
163
+ * touches first, then files a machine cannot diff or a criterion never
164
+ * cited, then the rest by churn. Presentation only — the sealed patch
165
+ * keeps its own order beneath, byte for byte. */
166
+ export declare function reviewFilePriority(file: ReviewFileRow, proofCitesPaths: boolean): ReviewPriority;
167
+ export declare function orderChangedFiles(files: readonly ReviewFileRow[], proofCitesPaths: boolean): (ReviewFileRow & {
168
+ priority: ReviewPriority;
169
+ })[];
170
+ export type CompletedWorkRow = ReturnType<Store["listCompletedWorkScoped"]>[number] & {
171
+ historyProblem?: string | null;
172
+ };
173
+ export type RankedReviewRow = CompletedWorkRow & {
174
+ ciFailing: boolean;
175
+ priority: ReviewPriority;
176
+ assignment?: AssignmentSnapshot | null;
177
+ };
178
+ /** What the cockpit shows of one selected result — a projection of the
179
+ * scope, plan, run, artifact, verdict, and publication records,
180
+ * each read through the verifier the run page already uses. */
181
+ export type ReviewCockpitView = {
182
+ taskId: string;
183
+ title: string;
184
+ repo: string | null;
185
+ completedAt: string;
186
+ historyProblem: string | null;
187
+ priority: ReviewPriority;
188
+ assignment: AssignmentSnapshot | null;
189
+ /** null = no scope was ever filed (a task marked done by hand). */
190
+ intent: {
191
+ goal: string;
192
+ outOfScope: string | null;
193
+ touches: string[];
194
+ acceptance: AcceptanceCriterion[];
195
+ approval: ReturnType<typeof approvalOf>;
196
+ approvedBy: string | null;
197
+ } | null;
198
+ plan: {
199
+ revision: number;
200
+ sha256: string;
201
+ approach: string | null;
202
+ } | null;
203
+ /** null = the task is done with no finished build attempt on record. */
204
+ run: {
205
+ id: number;
206
+ role: string;
207
+ outcome: string | null;
208
+ runner: string;
209
+ provider: string;
210
+ model: string | null;
211
+ finishedAt: string | null;
212
+ branch: string | null;
213
+ headRevision: string | null;
214
+ ranMinutes: number | null;
215
+ cost: string;
216
+ summary: string | null;
217
+ } | null;
218
+ /** The shared result detail (package 3) — the same records, the same
219
+ * panel, as the run page and the chat's result view. */
220
+ detail: ResultDetail | null;
221
+ /** v50: the result's bounded review-retry history, null when never asked. */
222
+ reviewRetry: ReviewRetryState | null;
223
+ /** The same history as the shared projection's facts (review fixes). */
224
+ review: ReviewFacts | null;
225
+ notes: {
226
+ id: number;
227
+ author: string;
228
+ note: string;
229
+ createdAt: string;
230
+ }[];
231
+ /** The demo database: no check runs here, and the Checks row says so. */
232
+ demo?: boolean;
233
+ /** A build that didn't deliver a result: what it missed, the suggestion, and Retry when the task can be retried here. */
234
+ failure?: (FailureExplanation & {
235
+ retry: {
236
+ action: string;
237
+ note: string;
238
+ } | null;
239
+ acceptAnyway?: {
240
+ action: string;
241
+ run: number;
242
+ } | null;
243
+ }) | null;
244
+ };
245
+ /** The receipt's own proof-state word, so the cockpit and the task page
246
+ * never disagree on the state's name or its precedence: the stored
247
+ * verdict decides, whatever the run's outcome — a no-change run with a
248
+ * refuted proof reads as refuted, never as "no change needed". The one
249
+ * word the receipt never needs is "No build record": a manual completion
250
+ * has no receipt to share it with. */
251
+ /** The cockpit's headline status: the shared projection over the same
252
+ * verdict, acceptance, and publication rows the task page reads. */
253
+ export declare function cockpitStatusOf(view: ReviewCockpitView): DisplayStatus;
254
+ /** Turn verifier records into one sentence a project owner can act on.
255
+ * A command-not-found result means the check could not start, not that the
256
+ * product itself failed. The stored record remains unchanged. */
257
+ export declare function verificationExplanation(verdict: ProofVerdict | null, reasons: readonly string[]): string;
258
+ export declare function verificationRecovered(reasons: readonly string[]): boolean;
259
+ /** Whether a reviewer can annotate this result's diff here: the shared
260
+ * detail's own answer (a verified, non-empty sealed patch read by a
261
+ * session that holds a CSRF token) — decided once, in `resultDetailOf`. */
262
+ export declare function canAnnotateDiff(view: ReviewCockpitView | null, csrf: string): boolean;
263
+ export declare function reviewCockpitPage(chrome: Chrome, data: {
264
+ queue: readonly RankedReviewRow[];
265
+ /** The queue's ceiling — printed when the queue reaches it. */
266
+ queueCap: number;
267
+ selected: ReviewCockpitView | null;
268
+ /** The deep link resolved a completion older than the queue shows. */
269
+ beyondQueue: boolean;
270
+ missing: string | null;
271
+ csrf: string;
272
+ /** v50: an approver's session may ask for a review retry here. */
273
+ canRetryReview: boolean;
274
+ noted: boolean;
275
+ /** What this person's last post from this page was refused for, in words (`refused=` on the address). */
276
+ refusal?: string | null;
277
+ /** Package 3: the selected local result view and the panel's draft keys. */
278
+ tab: ResultTab;
279
+ user: string;
280
+ now: Date;
281
+ }): Screen;
282
+ /** The selected result: intent → proof → changes → publication → acts,
283
+ * one scan path, every fact labeled by its source. */
284
+ export declare function reviewCockpitDetail(view: ReviewCockpitView, csrf: string, noted: boolean, canRetryReview?: boolean, tab?: ResultTab, user?: string): Html;
285
+ /** The selected result's HTML and, for the rebuilt page, the same result
286
+ * as data: every form and panel body is the one the HTML carries. */
287
+ export declare function reviewCockpitDetailParts(view: ReviewCockpitView, csrf: string, noted: boolean, canRetryReview: boolean, tab: ResultTab, user: string): {
288
+ html: Html;
289
+ selected: NonNullable<BrowserResultView["selected"]>;
290
+ };
291
+ /** What Accept and finish owes before it completes, as the form asks for it: the server's own rule
292
+ * (owedAcceptance), so the form asks for exactly what the completion requires. */
293
+ export declare function owedAcceptanceOf(receipt: AssignmentSnapshot["receipt"]): {
294
+ note: string | null;
295
+ } | null;
296
+ export declare function completionForm(taskId: string, runId: number, digest: string, pullRequestTo?: string | null, accept?: {
297
+ note: string | null;
298
+ } | null): Html;
299
+ /** What the task page shows about a result's pull request: the view, or the offer to open one. */
300
+ export type TaskPullRequest = {
301
+ taskId: string;
302
+ view: PullRequestView | null;
303
+ offer: {
304
+ taskId: string;
305
+ runId: number;
306
+ digest: string;
307
+ } | null;
308
+ target: string | null;
309
+ /** The same pull request as the shared status's detail row reads it. */
310
+ fact?: PullRequestFact | null;
311
+ };
312
+ /** The pull request, in one card: its state and link, one line of detail, and the one action it needs — Merge
313
+ * behind the password when checks passed, or Open a pull request for a result completed without one. */
314
+ export declare function pullRequestCardHtml(pr: TaskPullRequest, csrf: string): Html;
315
+ /** Exactly one primary road per result, chosen from its state; the
316
+ * others stay reachable from their own sections. Every form posts to the
317
+ * endpoint that already owns the act, with the session's CSRF token; a
318
+ * bearer session (no token) sees the road named, never a form. */
319
+ export declare function reviewNextAction(view: ReviewCockpitView, csrf: string, _accepted: boolean, _canAnnotate: boolean): Html;
320
+ /** The next action for the browser workspace's JSON: its control as markup text. */
321
+ export declare function reviewNextActionOf(view: ReviewCockpitView, csrf: string): {
322
+ kind: string;
323
+ title: string;
324
+ detail: string;
325
+ control: string;
326
+ } | null;
327
+ /**
328
+ * Plain words for the machine's own vocabulary — no internal token ever
329
+ * reaches a page. Every map here has a generic fallback: a kind a newer
330
+ * daemon invents degrades to honest generic prose, never to its raw name.
331
+ */
332
+ export declare const PHASE_WORDS: Record<string, string>;
333
+ /** An agent's phase on the home card, from the machine's own vocabulary. */
334
+ export declare function homePhaseWords(run: Pick<Run, "role" | "phase">): string;
335
+ export declare function phaseWords(phase: string): string;
336
+ /** A recorded reason in one plain line; machine output (a stack trace, a path, "Error:" text) waits on the run record. */
337
+ export declare function reasonWords(reason: string): string;
338
+ export declare const INCIDENT_WORDS: Record<string, string>;
339
+ export declare function incidentWords(kind: string): string;
340
+ export declare const EVIDENCE_WORDS: Record<string, string>;
341
+ /** Byte counts as people read them. */
342
+ export declare function humanBytes(bytes: number): string;
343
+ export declare function evidenceWords(kind: string): string;
344
+ /** The badge for a run's outcome. A null outcome reads "running" ONLY when
345
+ * the caller proved the run's lease is the task's current live claim — an
346
+ * orphaned run keeps saying what actually became of it. */
347
+ export declare function runOutcomeBadge(run: Run, live: boolean): Html;
348
+ export declare const runNoun: (run: Pick<Run, "role">) => string;
349
+ export declare function runsPage(chrome: Chrome, rows: (Run & {
350
+ taskId: string;
351
+ })[], liveIds: ReadonlySet<number>, nextCursor: number | null, verdicts?: Map<number, {
352
+ verdict: ProofVerdict;
353
+ matrix?: CriterionMatrixRow[];
354
+ }>, accepted?: ReadonlySet<number>): Screen;
355
+ /** The evidence bundle (Priority 2): the closed machine-authored verdict,
356
+ * the agent's proof (or why it cannot be shown), the plane's own re-run
357
+ * check, and every validated screenshot — each row labeled by source so
358
+ * "the agent said" and "the machine proved" never blur together. */
359
+ export type ProofBundleView = {
360
+ verdict: ProofVerdict | null;
361
+ reasons: string[];
362
+ accepted: {
363
+ by: string;
364
+ note: string | null;
365
+ at: string;
366
+ } | null;
367
+ proof: {
368
+ criteria: {
369
+ statement: string;
370
+ verdict: string;
371
+ how: string;
372
+ }[];
373
+ checks: {
374
+ command: string;
375
+ exitCode: number;
376
+ summary: string;
377
+ }[];
378
+ caveats: string[];
379
+ } | null;
380
+ proofProblem: string | null;
381
+ /** The check log as stored: its text when the bytes verify, else the
382
+ * `problem` (repair 2026-09-14) — a log that no longer verifies shows no
383
+ * text and offers no download. `bytesOriginal`/`bytesStored` let a
384
+ * shortened log's download be described as the stored part only. */
385
+ checkLog: {
386
+ text: string;
387
+ artifactId: number;
388
+ truncated: boolean;
389
+ problem: string | null;
390
+ bytesOriginal: number;
391
+ bytesStored: number;
392
+ } | null;
393
+ /** Every stored screenshot artifact; one whose bytes no longer verify
394
+ * carries its `problem` and is never rendered or called validated
395
+ * (workspace package 3). */
396
+ screenshots: ResultScreenshot[];
397
+ /** Screenshot paths the proof cites that no stored artifact answers. */
398
+ uncapturedScreenshots: string[];
399
+ /** v39: the criterion-to-evidence matrix, one row per signed criterion —
400
+ * `[]` when the scope this run built against signed no rubric. */
401
+ matrix: CriterionMatrixRow[];
402
+ /** v39 review finding: where a row's answered evidence ref resolves to a
403
+ * stored artifact, for `criterionMatrixHtml` to link. */
404
+ matrixLinks: EvidenceLinkMap;
405
+ /** v40: the verdict BEFORE an independent reviewer's judgements were
406
+ * folded in — null when no review has folded. */
407
+ machineVerdict: ProofVerdict | null;
408
+ /** v40: this run's own place in a bounded repair chain, if any. */
409
+ repairChain: RepairChainRow | null;
410
+ /** v51: the policy semantic coverage is read under. */
411
+ qualityMode: "default" | "strict";
412
+ };
413
+ /** The smallest complete answer to "what did this task deliver?". It is a
414
+ * projection of the same sealed handoff, proof, screenshot, and diff records
415
+ * used by the run page—not a new persistence layer or another verdict. */
416
+ export type CompletionReceiptView = {
417
+ runId: number;
418
+ /** The run's role — a scout's receipt is a report, not a diff. */
419
+ role: string;
420
+ outcome: string | null;
421
+ summary: string | null;
422
+ verdict: ProofVerdict | null;
423
+ /** The verdict's recorded reasons — what tells a failed check from
424
+ * mismatched evidence (package 1). */
425
+ reasons: string[];
426
+ accepted: boolean;
427
+ /** A no-change conclusion's two records — handoff and sealed diff. */
428
+ recordComplete: boolean;
429
+ /** The run's own publication record, when one exists: the heading names
430
+ * a PR or a merge only from this, never from the outcome. */
431
+ publication: PublicationFacts;
432
+ /** This run's independent review, when one was asked (review fixes). */
433
+ review: ReviewFacts | null;
434
+ matrix: CriterionMatrixRow[];
435
+ /** v51: the semantic-coverage lines (`coverageWords`) — independent
436
+ * review standing under the run's policy, plus every named context gap.
437
+ * Rendered beside the machine verdict on the task and chat receipts. */
438
+ coverage: string[];
439
+ /** Concise pass (2026-09-13): the coverage lines are secondary — behind a
440
+ * disclosure — only while nothing is owed: review optional and not yet
441
+ * settled, or satisfied. A strict-quality shortfall, a strict review
442
+ * still pending, or a named context gap stays in the open. */
443
+ coverageSecondary: boolean;
444
+ diff: {
445
+ fileCount: number;
446
+ additions: number;
447
+ deletions: number;
448
+ binaryCount: number;
449
+ filesTruncated: boolean;
450
+ } | {
451
+ problem: string;
452
+ } | null;
453
+ screenshots: ResultScreenshot[];
454
+ caveats: string[];
455
+ /** The run's own report artifact (a scout's deliverable), verified at
456
+ * render — the investigation's result leads with it (package 3). */
457
+ report: RunReportView | null;
458
+ /** The facts every result surface prints identically (package 3). */
459
+ facts: SharedResultFacts;
460
+ };
461
+ /** A scout run's report as this run stored it: verified and parsed, or
462
+ * the reason it cannot be shown. The download link serves the exact
463
+ * stored bytes as text — never as a page. */
464
+ export type RunReportView = {
465
+ ok: true;
466
+ artifactId: number;
467
+ title: string;
468
+ summary: string;
469
+ document: string;
470
+ followUps: number;
471
+ truncated: boolean;
472
+ items: ReportItem[];
473
+ shots: ReportShot[];
474
+ } | {
475
+ ok: false;
476
+ artifactId: number;
477
+ problem: string;
478
+ };
479
+ /** What a scout found, each with its link and picture, then any screenshot no item shows. Every link is the cited
480
+ * http(s) address the report parser admitted; every picture is served from verified evidence. */
481
+ export declare function reportItemsHtml(items: readonly ReportItem[], shots: readonly ReportShot[], runId: number): Html;
482
+ export declare function runReportView(artifacts: Artifact[], root: string): RunReportView | null;
483
+ /** The shared facts (package 3), computed ONCE from the same verified
484
+ * records every surface reads: the head from the sealed diff summary when
485
+ * it verifies (else the run record, and the source is named), the signed
486
+ * criteria passed from the machine's matrix, the proof's caveats, every
487
+ * evidence problem in words, and the observed publication state. */
488
+ export declare function sharedResultFactsOf(run: Run, proof: ProofBundleView | null, terminal: TerminalDiffView | null, handoff: StructuredHandoffView | null, report: RunReportView | null, publication: PublicationFacts): SharedResultFacts;
489
+ export declare function proofBundleView(store: Store, run: Run, artifacts: Artifact[], root: string): ProofBundleView | null;
490
+ export declare function completionReceiptView(store: Store, run: Run, artifacts: Artifact[], root: string, review?: ReviewFacts | null): CompletionReceiptView;
491
+ export type ReviewDiffLine = {
492
+ kind: "context" | "addition" | "deletion" | "meta";
493
+ text: string;
494
+ oldLine: number | null;
495
+ newLine: number | null;
496
+ };
497
+ export type ReviewDiffHunk = {
498
+ header: string;
499
+ lines: ReviewDiffLine[];
500
+ };
501
+ export type ReviewDiffFile = {
502
+ path: string;
503
+ oldPath: string | null;
504
+ meta: string[];
505
+ hunks: ReviewDiffHunk[];
506
+ };
507
+ export type ReviewDiff = {
508
+ files: ReviewDiffFile[];
509
+ linesTruncated: boolean;
510
+ };
511
+ export declare const REVIEW_DIFF_LINE_CAP = 4000;
512
+ /** Parse only the stable structure Git's unified patch format guarantees.
513
+ * Unknown metadata remains visible, and a patch that cannot be structured
514
+ * falls back to the sealed raw record—presentation never becomes proof. */
515
+ export declare function parseReviewDiff(text: string): ReviewDiff;
516
+ export declare function reviewDiffHtml(patch: {
517
+ text: string;
518
+ truncated: boolean;
519
+ artifactId: number;
520
+ }, stat: TerminalDiffView["stat"], runId: number, commentable: boolean, anchors?: ReadonlyMap<string, string>): Html;
521
+ /** The check log as stored (repair 2026-09-14): its output behind a
522
+ * disclosure when the bytes verify — a shortened log says so in the
523
+ * summary and its download is the stored part; a log that no longer
524
+ * verifies is a named problem with no output and no download. */
525
+ export declare function checkLogHtml(log: NonNullable<ProofBundleView["checkLog"]>, runId: number, extra: Html): Html;
526
+ /** The download link for a stored record (repair 2026-09-14): a shortened
527
+ * record's link says it holds the stored part only — never "the full"
528
+ * bytes that were cut at storage and exist nowhere. */
529
+ export declare function storedDownloadLink(runId: number, artifactId: number, what: string, truncated: boolean): Html;
530
+ /** Render the terminal diff card: stat and capture health first, the bounded
531
+ * patch beneath a fold. `editor` (arc 6) links file rows to vscode:// on the
532
+ * reviewing device; `commentable` adds a per-file "comment" button the
533
+ * page's prefill script reads — a real button, keyboard-reachable, separate
534
+ * from the link so the two never fight over one click (finding 4). */
535
+ export declare function terminalDiffCard(view: TerminalDiffView, runId: number, editor?: {
536
+ worktree: string;
537
+ } | null, commentable?: boolean): Html;
538
+ /**
539
+ * The evidence bundle (Priority 2): the closed verdict first — the one
540
+ * sentence every other surface agrees with — then criteria, the agent's
541
+ * declared checks, the plane's own re-run (labeled "re-run here", never
542
+ * confused with the agent's own claim), caveats, and every validated
543
+ * screenshot as a thumbnail linking to the full image. Renders nothing
544
+ * when the run predates the proof system.
545
+ */
546
+ export declare function evidenceBundleCard(view: ProofBundleView | null, run: Pick<Run, "id" | "role" | "outcome">, publication?: PublicationFacts, review?: ReviewFacts | null): Html;
547
+ /** A calm, scan-first result receipt for the task and its focused chat.
548
+ * The full ledger remains one click away; this card carries only the facts
549
+ * needed to decide whether to inspect, discuss, or move on. */
550
+ /** The receipt's proof-state word and tone, from the stored verdict and
551
+ * the operator's acceptance alone — shared with the review cockpit's
552
+ * header chip so the two surfaces never name one state differently. */
553
+ /** The receipt's facts as the shared projection reads them. */
554
+ /** A result's follow-ups: checks run on its commit since it finished, and its tests task. */
555
+ export declare function followUpsFor(store: Store, evidenceRoot: string, run: Run, now: Date): NonNullable<ResultDetail["followUps"]> | null;
556
+ export declare const FOLLOW_UP_WORDS: Record<FollowUpCheck["state"], string>;
557
+ /** Run checks and Add tests, under the result's Checks: what ran since, then the two acts. */
558
+ export declare function followUpsHtml(followUps: NonNullable<ResultDetail["followUps"]>, runId: number, o: ResultPanelOptions): Html;
559
+ export declare function receiptStatusOf(view: CompletionReceiptView, review?: ReviewFacts | null): DisplayStatus;
560
+ export declare function completionReceiptCard(view: CompletionReceiptView, taskId: string, place: "task" | "chat", standing?: DisplayStatus, assignment?: AssignmentSnapshot | null, headline?: boolean): Html;
561
+ /**
562
+ * ONE result presentation (workspace package 3) for the run page, the
563
+ * review cockpit, and the chat's result detail. Every fact here comes
564
+ * from the same verified records the receipt reads; the surfaces differ
565
+ * only in where the panel sits and which links lead away from it.
566
+ */
567
+ export type ResultDetail = {
568
+ /** Where "Complete and open a pull request" opens one; null when only "Mark complete" is offered. */
569
+ pullRequestTo?: string | null;
570
+ /** Where publishing stands: a pull request can be opened, publishing isn't set up, or neither said. Accept never publishes. */
571
+ publishing?: "pull-request" | "off" | "other";
572
+ learning?: Html;
573
+ skillTest?: boolean;
574
+ rootId?: string;
575
+ history?: Html;
576
+ taskId: string;
577
+ run: Run;
578
+ receipt: CompletionReceiptView;
579
+ assignment?: AssignmentSnapshot | null;
580
+ handoff: StructuredHandoffView | null;
581
+ proof: ProofBundleView | null;
582
+ terminal: TerminalDiffView | null;
583
+ publication: Publication | null;
584
+ ciFailing: boolean;
585
+ files: (ReviewFileRow & {
586
+ priority: ReviewPriority;
587
+ })[];
588
+ outsideTouches: string[];
589
+ fileAnchors: ReadonlyMap<string, string>;
590
+ comments: DiffComment[];
591
+ pastComments?: DiffComment[];
592
+ reviewerFindings: DiffComment[];
593
+ /** The build's one automatic review, when its project had review on. */
594
+ automaticReview?: BuildReviewView | null;
595
+ /** Revisions already sealed from this run — the forward link. Each
596
+ * carries the shared status projection's own words for the child
597
+ * (repair 2026-09-14): CURRENT exact approval and actual activity, so
598
+ * held or paused work is never called building because it was once
599
+ * approved, and a rescoped child reads as needing approval again. */
600
+ revisions: {
601
+ id: string;
602
+ title: string;
603
+ state: TaskState;
604
+ approved: boolean;
605
+ standing: string;
606
+ tone: string;
607
+ }[];
608
+ /** The source scope digest the panel was rendered against (null = no
609
+ * scope) — the revision form's source binding. */
610
+ sourceDigest: string | null;
611
+ route: RouteStamp | null;
612
+ editor: {
613
+ worktree: string;
614
+ } | null;
615
+ /** Signed criteria on the scope this run built against. */
616
+ signedCriteria: number;
617
+ /** Whether a reviewer can annotate here (sealed non-empty patch verifies, cookie session). */
618
+ canAnnotate: boolean;
619
+ /** Follow-ups on this result (result-follow-ups.ts): checks run since, the tests task, and what can run. */
620
+ followUps?: {
621
+ repo: string | null;
622
+ checks: FollowUpCheck[];
623
+ testsTask: string | null;
624
+ quick: boolean;
625
+ full: boolean;
626
+ } | null;
627
+ };
628
+ export type ResultPanelOptions = {
629
+ place: "run" | "review" | "chat";
630
+ tab: ResultTab;
631
+ csrf: string;
632
+ /** The server-named account, for the browser's bounded draft keys. */
633
+ user: string;
634
+ /** The page carries a receipt for a just-posted note: focus the box. */
635
+ noted: boolean;
636
+ /** This render's request token for the note form (replay dedupe). */
637
+ requestToken: string;
638
+ hrefFor: (tab: ResultTab) => string;
639
+ /** Where the forms send the reader back (validated server-side too). */
640
+ returnTo: string;
641
+ back: {
642
+ href: string;
643
+ label: string;
644
+ } | null;
645
+ /** Surface-specific acts that belong under Checks (the cockpit's review
646
+ * retry panel and its accept-with-exception form). */
647
+ extraChecks?: Html;
648
+ /** The cockpit's header already carries the status chip: said once. */
649
+ headStatus?: boolean;
650
+ /** The cockpit renders its own next-action card: no panel action. */
651
+ action?: boolean;
652
+ /** Accept and finish sits beside the panel: it records the person's own checks too, so the panel offers no separate Accept. */
653
+ finishes?: boolean;
654
+ };
655
+ /** The revision form's binding (repair 2026-09-14): the exact ids of the
656
+ * notes this page displays and the source terms it was rendered against.
657
+ * The server seals these ids and no others. */
658
+ export declare function revisionSealFields(comments: readonly {
659
+ id: number;
660
+ }[], sourceDigest: string | null): Html;
661
+ /** Older machine-checked results saved a mechanical sentence; say the same
662
+ * facts in plain words (the version id stays, shortened). */
663
+ export declare function plainConclusionOf(conclusion: string): string;
664
+ export declare function resultPanelHtml(detail: ResultDetail, o: ResultPanelOptions): Html;
665
+ /** The panel's HTML and the same panel in parts, for the rebuilt result page. */
666
+ export declare function resultPanelParts(detail: ResultDetail, o: ResultPanelOptions): {
667
+ html: Html;
668
+ panel: BrowserResultPanel;
669
+ };
670
+ /** Changed lines shown beside one "You check this one" item: at most this many per file, three files. */
671
+ export declare const CHECK_EXCERPT_LINES = 12;
672
+ /** Each requirement only a person can confirm, with the evidence to judge
673
+ * it by, inline: the changed lines in the files it cites (citing none, the
674
+ * change's first file, labelled as not cited), the screenshots it cites
675
+ * (none cited: every validated one), and the agent's own note. */
676
+ export declare function personCheckItems(proof: ProofBundleView, patchText: string | null, shots: readonly ResultScreenshot[], runId: number): BrowserCheckItem[];
677
+ /** A Needs you result's one action (needs-you.ts): a link to the act that resolves it, or Confirm it
678
+ * stopped behind the password. Null under every other headline. */
679
+ export declare function needActionOf(assignment: AssignmentSnapshot | null, status: TaskStatus | null, csrf: string, returnTo: string, result?: {
680
+ accepted: boolean;
681
+ humanReview: boolean;
682
+ run: number;
683
+ action: string;
684
+ rebuildable?: boolean;
685
+ refuted?: boolean;
686
+ }): BrowserNeedAction | null;
687
+ /** A build Toolroll can't check at all: the approver ticks that they checked before confirming. */
688
+ export declare const needsCheck: (assignment: AssignmentSnapshot) => boolean;
689
+ /** The server page's form of the same: the need's action first, Request changes as the quiet second. */
690
+ export declare function resultNeedAction(need: BrowserNeedAction, o: ResultPanelOptions, canRequest: boolean): Html;
691
+ /** The outcome in one bounded sentence (repair 2026-09-14): the handoff's
692
+ * first sentence, cut at a word when it runs past 180 characters. The
693
+ * full conclusion stays available behind the Summary's disclosure. */
694
+ export declare function conciseOutcomeOf(conclusion: string): string;
695
+ /** Exactly one primary act for the result (repair 2026-09-14), chosen from
696
+ * its state: draft the CI repair, create the revision the notes are
697
+ * waiting for, open the pull request, or request changes. A bearer session
698
+ * (no token) gets no control; the cockpit renders its own next-action
699
+ * card instead (`action: false`). */
700
+ export declare function resultPrimaryAction(detail: ResultDetail, o: ResultPanelOptions, prUrl: string | null): Html;
701
+ /** The run's facts as rows — one renderer for the page and its live
702
+ * fragment (A4). Elapsed ticks client-side while the run is open. */
703
+ /** The run's route provenance in plain words (v47): the exact agent it
704
+ * spent as, in which role, and how that agent was chosen. */
705
+ export declare function runAgentWords(route: RouteStamp | null | undefined): string | null;
706
+ export declare function runFactsRows(run: Run, taskId: string, live: boolean, route?: RouteStamp | null): Html;
707
+ export declare function runPage(chrome: Chrome, run: Run, taskId: string, artifacts: Artifact[], terminal?: TerminalDiffView | null, notes?: {
708
+ id: number;
709
+ author: string;
710
+ note: string;
711
+ createdAt: string;
712
+ }[], csrf?: string, comments?: DiffComment[], ciRepair?: {
713
+ pr: number;
714
+ } | null, liveScript?: string, peekable?: boolean, running?: boolean, editor?: {
715
+ worktree: string;
716
+ } | null, editorToggle?: {
717
+ on: boolean;
718
+ } | null, noted?: boolean, structuredHandoff?: StructuredHandoffView | null, proofBundle?: ProofBundleView | null, route?: RouteStamp | null, publicationRow?: Publication | null, review?: ReviewFacts | null, result?: {
719
+ detail: ResultDetail;
720
+ tab: ResultTab;
721
+ user: string;
722
+ requestToken: string;
723
+ } | null, sourceDigest?: string | null): Screen;
724
+ /**
725
+ * Click-to-prefill (arc 6, finding 4): client-side FORM mutation, named as
726
+ * such — normal viewing stays the default; "Annotate" reveals line pins.
727
+ * A pin or file button copies its target into the comment form and focuses
728
+ * the note field. No fetch, endpoint, or submit: comments still leave
729
+ * through the same CSRF'd form POST. Reads data attributes, writes input
730
+ * values, and flips presentational state — never markup. The note counter
731
+ * (follow-up on build 1540) reads the textarea's own maxlength — the
732
+ * server's LIMITS.note — into the helper text, so the two cannot drift.
733
+ */
734
+ export declare function prefillScript(): string;
735
+ /** The primary review act opens the Checks view it names. The anchor
736
+ * still lands on the result without JavaScript (the server honours
737
+ * `?tab=checks`); this only removes the reload. */
738
+ export declare function reviewEvidenceScript(): string;
739
+ /** The facts region alone, for the open-run poll (A4). A finished run's
740
+ * fragment says so instead of quietly growing forms (finding 5), and a run
741
+ * that stopped being the task's live claim says so too — both carry the
742
+ * stop marker, so an open tab quits refetching a dead build (round-4
743
+ * finding 15). */
744
+ export declare function runFactsFragment(run: Run, taskId: string, live: boolean, route?: RouteStamp | null): Html;