proofdeck 0.0.0-stage → 0.1.1

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 (139) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +23 -0
  3. package/README.md +152 -2
  4. package/README.zh-CN.md +152 -0
  5. package/bin/proofdeck.js +191 -0
  6. package/board/LICENSE +201 -0
  7. package/board/README.md +473 -0
  8. package/board/README.zh-CN.md +424 -0
  9. package/board/dist/_chk.db-shm +0 -0
  10. package/board/dist/_chk.db-wal +0 -0
  11. package/board/dist/adapters.d.ts +40 -0
  12. package/board/dist/adapters.d.ts.map +1 -0
  13. package/board/dist/adapters.js +124 -0
  14. package/board/dist/adapters.js.map +1 -0
  15. package/board/dist/board.d.ts +628 -0
  16. package/board/dist/board.d.ts.map +1 -0
  17. package/board/dist/board.js +2767 -0
  18. package/board/dist/board.js.map +1 -0
  19. package/board/dist/cli.d.ts +3 -0
  20. package/board/dist/cli.d.ts.map +1 -0
  21. package/board/dist/cli.js +1663 -0
  22. package/board/dist/cli.js.map +1 -0
  23. package/board/dist/config.d.ts +57 -0
  24. package/board/dist/config.d.ts.map +1 -0
  25. package/board/dist/config.js +99 -0
  26. package/board/dist/config.js.map +1 -0
  27. package/board/dist/db.d.ts +9 -0
  28. package/board/dist/db.d.ts.map +1 -0
  29. package/board/dist/db.js +506 -0
  30. package/board/dist/db.js.map +1 -0
  31. package/board/dist/git.d.ts +35 -0
  32. package/board/dist/git.d.ts.map +1 -0
  33. package/board/dist/git.js +147 -0
  34. package/board/dist/git.js.map +1 -0
  35. package/board/dist/index.d.ts +18 -0
  36. package/board/dist/index.d.ts.map +1 -0
  37. package/board/dist/index.js +13 -0
  38. package/board/dist/index.js.map +1 -0
  39. package/board/dist/mcp-config.d.ts +26 -0
  40. package/board/dist/mcp-config.d.ts.map +1 -0
  41. package/board/dist/mcp-config.js +88 -0
  42. package/board/dist/mcp-config.js.map +1 -0
  43. package/board/dist/mcp.d.ts +3 -0
  44. package/board/dist/mcp.d.ts.map +1 -0
  45. package/board/dist/mcp.js +949 -0
  46. package/board/dist/mcp.js.map +1 -0
  47. package/board/dist/quickstart.d.ts +75 -0
  48. package/board/dist/quickstart.d.ts.map +1 -0
  49. package/board/dist/quickstart.js +156 -0
  50. package/board/dist/quickstart.js.map +1 -0
  51. package/board/dist/serve.d.ts +10 -0
  52. package/board/dist/serve.d.ts.map +1 -0
  53. package/board/dist/serve.js +445 -0
  54. package/board/dist/serve.js.map +1 -0
  55. package/board/dist/signing.d.ts +18 -0
  56. package/board/dist/signing.d.ts.map +1 -0
  57. package/board/dist/signing.js +26 -0
  58. package/board/dist/signing.js.map +1 -0
  59. package/board/dist/sync.d.ts +49 -0
  60. package/board/dist/sync.d.ts.map +1 -0
  61. package/board/dist/sync.js +158 -0
  62. package/board/dist/sync.js.map +1 -0
  63. package/board/dist/types.d.ts +359 -0
  64. package/board/dist/types.d.ts.map +1 -0
  65. package/board/dist/types.js +20 -0
  66. package/board/dist/types.js.map +1 -0
  67. package/board/docs/adr/0001-shared-worktree-collision.md +102 -0
  68. package/board/docs/adr/0001-shared-worktree-collision.zh-CN.md +90 -0
  69. package/board/docs/attribution.md +123 -0
  70. package/board/docs/attribution.zh-CN.md +104 -0
  71. package/board/docs/development-workflow.md +81 -0
  72. package/board/docs/development-workflow.zh-CN.md +75 -0
  73. package/board/docs/diagrams/banner.png +0 -0
  74. package/board/docs/diagrams/banner.svg +1 -0
  75. package/board/docs/diagrams/before-after.png +0 -0
  76. package/board/docs/diagrams/before-after.svg +1 -0
  77. package/board/docs/diagrams/governance-chain.png +0 -0
  78. package/board/docs/diagrams/governance-chain.svg +1 -0
  79. package/board/docs/diagrams/value-flow.png +0 -0
  80. package/board/docs/diagrams/value-flow.svg +1 -0
  81. package/board/docs/entry-point.md +81 -0
  82. package/board/docs/entry-point.zh-CN.md +65 -0
  83. package/board/docs/kanban.png +0 -0
  84. package/board/docs/octoryn-mark.png +0 -0
  85. package/board/docs/registry-metadata.md +34 -0
  86. package/board/docs/registry-metadata.zh-CN.md +30 -0
  87. package/board/package.json +87 -0
  88. package/config.example.json +72 -0
  89. package/daemon.js +1148 -0
  90. package/docs/assets/demo.gif +0 -0
  91. package/docs/assets/logo-512.png +0 -0
  92. package/docs/assets/logo.svg +31 -0
  93. package/docs/assets/social-preview.png +0 -0
  94. package/docs/demo-run.mjs +61 -0
  95. package/docs/render-demo.py +94 -0
  96. package/docs/render-logo.py +101 -0
  97. package/docs/task-book.md +58 -0
  98. package/e2e/verify-acceptance.mjs +150 -0
  99. package/e2e/verify-antifraud.mjs +128 -0
  100. package/e2e/verify-caps.mjs +46 -0
  101. package/e2e/verify-checkpoint.mjs +208 -0
  102. package/e2e/verify-firstclass.mjs +110 -0
  103. package/e2e/verify-judge.mjs +52 -0
  104. package/e2e/verify-lease.mjs +95 -0
  105. package/e2e/verify-replay.mjs +92 -0
  106. package/e2e/verify-resilience.mjs +323 -0
  107. package/e2e/verify-review.mjs +86 -0
  108. package/e2e/verify-scheduling.mjs +110 -0
  109. package/e2e/verify-schema-evolution.mjs +107 -0
  110. package/e2e/verify-sla-digest.mjs +105 -0
  111. package/guard.js +97 -0
  112. package/lib/adapters/codex.js +206 -0
  113. package/lib/billing-convert.js +57 -0
  114. package/lib/board.js +46 -0
  115. package/lib/caps.js +35 -0
  116. package/lib/checkpoint.js +130 -0
  117. package/lib/gating.js +218 -0
  118. package/lib/guard-core.mjs +108 -0
  119. package/lib/http.js +161 -0
  120. package/lib/judge.js +89 -0
  121. package/lib/lease.js +93 -0
  122. package/lib/notify.js +56 -0
  123. package/lib/platform.js +120 -0
  124. package/lib/replay.js +68 -0
  125. package/lib/review.js +40 -0
  126. package/lib/runner.js +152 -0
  127. package/lib/schedule.js +59 -0
  128. package/lib/sla.js +42 -0
  129. package/lib/spans.js +36 -0
  130. package/lib/starve.js +43 -0
  131. package/lib/store.js +109 -0
  132. package/lib/supply.js +101 -0
  133. package/lib/usage.js +103 -0
  134. package/lib/verify.js +223 -0
  135. package/lib/watchdog-core.mjs +68 -0
  136. package/lib/watchdog-worker.mjs +75 -0
  137. package/package.json +55 -4
  138. package/scripts/run-daemon.sh +18 -0
  139. package/scripts/run-e2e.mjs +39 -0
@@ -0,0 +1,628 @@
1
+ import { type AgentIdentity, type BoardConfig, type ConfigOverrides } from "./config.js";
2
+ import * as git from "./git.js";
3
+ import type { IngestEvent } from "./adapters.js";
4
+ import type { Agent, ActorType, Attribution, BoardStatus, Decision, Evidence, EvidenceCheck, EvidenceSkipped, FileChange, FileChangeKind, Handoff, Message, Project, ProjectReport, ProjectSummary, ProjectStatus, Review, ReviewerType, ReviewOutcome, Risk, RiskSeverity, RiskStatus, RiskLevel, Session, Task, TaskCard, TaskFilters, TaskStatus, TaskTrace, TimelineEvent } from "./types.js";
5
+ /** Result of claiming a task — `conflict` is set if another agent holds it. */
6
+ export interface ClaimResult {
7
+ task: Task;
8
+ /** The agent currently holding the key, if it was already claimed. */
9
+ conflict: string | null;
10
+ }
11
+ /** Result of verifying the timeline hash chain. */
12
+ export interface ChainVerification {
13
+ ok: boolean;
14
+ length: number;
15
+ /** Seq of the first entry whose hash does not validate, if any. */
16
+ brokenAtSeq: number | null;
17
+ /**
18
+ * Whether a head anchor was present. When false on a non-empty timeline, tail
19
+ * truncation is undetectable from the DB alone (the anchor may be absent
20
+ * because the board predates anchoring, or because it was deleted) — callers
21
+ * should present this as "links intact but unanchored", not a clean pass.
22
+ */
23
+ anchored: boolean;
24
+ }
25
+ export type PolicyViolationKind = "unreviewed" | "unattributed" | "chain-broken";
26
+ export interface PolicyViolation {
27
+ kind: PolicyViolationKind;
28
+ commit: string | null;
29
+ detail: string;
30
+ }
31
+ /** Outcome of a governance check — the basis for a CI gate. */
32
+ export interface PolicyResult {
33
+ ok: boolean;
34
+ violations: PolicyViolation[];
35
+ chain: ChainVerification | null;
36
+ /** How many commits were in scope for review checks. */
37
+ checked: number;
38
+ }
39
+ export interface PolicyOptions {
40
+ /** Explicit commit scope (e.g. a PR's `main..HEAD` shas). */
41
+ commits?: string[];
42
+ /** Fail if any AI-produced commit in scope lacks a human review. */
43
+ requireHumanReview?: boolean;
44
+ /** Fail if any explicitly-scoped commit has no attribution at all. */
45
+ requireAttribution?: boolean;
46
+ /** Fail if the timeline hash chain does not verify. */
47
+ verifyChain?: boolean;
48
+ }
49
+ /** Schema tag for the portable attribution bundle. Bump on breaking changes. */
50
+ export declare const BUNDLE_VERSION = "octopus-blackboard/attribution-bundle@1";
51
+ /** A portable bundle of attribution that travels with (but outside) Git. */
52
+ export interface AttributionBundle {
53
+ version: string;
54
+ exportedAt: string;
55
+ attributions: Attribution[];
56
+ reviews: Review[];
57
+ sessions: Session[];
58
+ decisions: Decision[];
59
+ /** Ed25519 signature (base64) over the bundle's records, if signed on export. */
60
+ signature?: string | null;
61
+ /** PEM public key that produced `signature`. */
62
+ signedBy?: string | null;
63
+ /** Session id that signed the bundle. */
64
+ signedSession?: string | null;
65
+ }
66
+ /** Aggregate scorecard for a board — the `report` view. */
67
+ export interface Report {
68
+ attributions: {
69
+ total: number;
70
+ ai: number;
71
+ human: number;
72
+ };
73
+ commits: {
74
+ total: number;
75
+ aiProduced: number;
76
+ humanReviewed: number;
77
+ unreviewed: number;
78
+ };
79
+ /**
80
+ * Fraction (0..1) of AI-produced commits with an approved human review, or
81
+ * `null` when there is no AI work to review (N/A — not 100%).
82
+ */
83
+ reviewCoverage: number | null;
84
+ aiHumanRatio: {
85
+ ai: number;
86
+ human: number;
87
+ };
88
+ perAgent: {
89
+ agent: string;
90
+ actorType: string;
91
+ attributions: number;
92
+ commits: number;
93
+ files: number;
94
+ }[];
95
+ sessions: {
96
+ total: number;
97
+ open: number;
98
+ };
99
+ risks: {
100
+ open: number;
101
+ mitigated: number;
102
+ closed: number;
103
+ };
104
+ }
105
+ /**
106
+ * The blackboard. A thin, synchronous wrapper over a SQLite database. Every
107
+ * mutation also appends one tamper-evident entry to the timeline within the
108
+ * same transaction, so the board and its audit log can never diverge.
109
+ *
110
+ * The board is deliberately passive: it records and reports. It never triggers
111
+ * an agent, schedules work, or decides anything on an agent's behalf.
112
+ */
113
+ export declare class Board {
114
+ readonly config: BoardConfig;
115
+ private readonly db;
116
+ /** Active session id for the acting agent; stamped onto every write. */
117
+ private activeSession;
118
+ constructor(config: BoardConfig);
119
+ private currentSessionFromDb;
120
+ /** The active session id for this board's agent (null if none). */
121
+ activeSessionId(): string | null;
122
+ static open(overrides?: ConfigOverrides & { sessionId?: string | null }): Board;
123
+ close(): void;
124
+ private headHash;
125
+ private static computeHash;
126
+ /** Append one entry to the timeline. Must run inside a transaction. */
127
+ private append;
128
+ /** The current timeline head (seq + hash). Record this OUTSIDE the DB — in a
129
+ * commit, a log, a second machine — to anchor against tail truncation. */
130
+ head(): {
131
+ seq: number;
132
+ hash: string;
133
+ };
134
+ /**
135
+ * Check the chain against an anchor recorded earlier (e.g. committed to git).
136
+ * `ok` = the anchored row still exists with that hash and history through it
137
+ * is intact; `truncated` = rows at/below the anchor were deleted; `altered` =
138
+ * history at/below the anchor was edited. This is what closes the "attacker
139
+ * drops the trigger and truncates" gap — an external anchor makes truncation
140
+ * provable.
141
+ */
142
+ verifyAnchor(seq: number, hash: string): {
143
+ status: "ok" | "truncated" | "altered";
144
+ headSeq: number;
145
+ };
146
+ private headAnchor;
147
+ /** Re-walk the chain and confirm every hash links to its predecessor. */
148
+ verifyChain(): ChainVerification;
149
+ timeline(limit?: number): TimelineEvent[];
150
+ /** The current head sequence number (0 if the board is empty). */
151
+ headSeq(): number;
152
+ /** Timeline events after `afterSeq`, oldest first — the polling primitive
153
+ * behind `watch`/`subscribe`. Passive: callers poll; the board never pushes. */
154
+ since(afterSeq: number): TimelineEvent[];
155
+ /**
156
+ * Filter events down to those an agent should be notified about: messages to
157
+ * it (or broadcast), handoffs to it, and claim conflicts on keys it holds. An
158
+ * agent's own actions are excluded. This is what makes `watch --for <agent>`
159
+ * a useful inbox rather than a firehose.
160
+ */
161
+ notable(events: TimelineEvent[], agent: string): TimelineEvent[];
162
+ /**
163
+ * Register the agent if new and stamp `last_seen`. Idempotent by name. When
164
+ * registering the acting agent, its full provider-independent identity
165
+ * (provider/model/cli/version) is merged in; non-null fields never overwrite
166
+ * with null, so a later bare touch cannot erase identity.
167
+ */
168
+ ensureAgent(name: string, identity?: Partial<AgentIdentity>): Agent;
169
+ getAgent(name: string): Agent | undefined;
170
+ /**
171
+ * Open a new session for the acting agent and make it current (persisted in
172
+ * the DB, so later CLI invocations attribute to it). Captures the machine and
173
+ * repository context the session runs in.
174
+ */
175
+ startSession(label?: string | null, options?: { project?: string | null; taskKey?: string | null; detached?: boolean }): Session;
176
+ private keyPath;
177
+ private saveSessionKey;
178
+ private loadSessionKey;
179
+ /**
180
+ * Sign the current timeline head hash with a session's private key. The
181
+ * signature attests "this session vouches for board state through seq N".
182
+ * Recorded in the `signatures` table (not the chain, so the head stays put).
183
+ */
184
+ signHead(sessionId?: string): {
185
+ headSeq: number;
186
+ headHash: string;
187
+ } | undefined;
188
+ /**
189
+ * Verify every recorded signature. `valid` = the signature checks out against
190
+ * its public key. `current` = the signed head hash still matches the timeline
191
+ * row at that seq (i.e. history below it was not altered/truncated since).
192
+ */
193
+ verifySignatures(chain?: ChainVerification): {
194
+ sessionId: string;
195
+ agent: string | null;
196
+ headSeq: number;
197
+ valid: boolean;
198
+ current: boolean;
199
+ at: string;
200
+ }[];
201
+ /** Highest seq that a valid, still-current signature vouches for (0 = none). */
202
+ signedThrough(chain?: ChainVerification): number;
203
+ /** Close a session (the active one by default) and clear the pointer. */
204
+ stopSession(sessionId?: string): Session | undefined;
205
+ getSession(sessionId: string): Session | undefined;
206
+ listSessions(limit?: number): Session[];
207
+ /** All timeline events belonging to a session, oldest first. */
208
+ sessionTimeline(sessionId: string): TimelineEvent[];
209
+ listAgents(): Agent[];
210
+ /** A free-form status note broadcast to the board. */
211
+ note(actor: string, text: string, opts?: {
212
+ project?: string | null;
213
+ taskKey?: string | null;
214
+ }): TimelineEvent;
215
+ /**
216
+ * Claim a task by key, creating it if absent. If another agent already holds
217
+ * an unreleased claim, the claim still records but `conflict` names the
218
+ * holder — the board surfaces the collision rather than blocking it.
219
+ */
220
+ claim(actor: string, key: string, title?: string | null): ClaimResult;
221
+ /** Release a claim the actor holds. */
222
+ release(actor: string, key: string): Task | undefined;
223
+ /** Mark a task done. */
224
+ complete(actor: string, key: string): Task | undefined;
225
+ listTasks(status?: string, filters?: TaskFilters): Task[];
226
+ // --- projects (four-layer: board -> project -> task -> trace) --------------
227
+ /** Does a project with this key exist on the board? */
228
+ projectExists(key: string): boolean;
229
+ getProject(key: string): Project | undefined;
230
+ /**
231
+ * Create or update a project. `created_by` is stamped on first insert and never
232
+ * rewritten. The board never auto-creates a project as a side effect of
233
+ * anything else — this is always an explicit, attributed action.
234
+ */
235
+ createProject(actor: string, key: string, opts?: {
236
+ name?: string | null;
237
+ description?: string | null;
238
+ status?: ProjectStatus;
239
+ streams?: string[] | string | null;
240
+ }): Project;
241
+ /** Set a project's lifecycle status. Undefined for an unknown key; throws on a bad status. */
242
+ setProjectStatus(actor: string, key: string, status: ProjectStatus): Project | undefined;
243
+ /** All projects, each with its live task count and per-status breakdown. */
244
+ listProjects(): ProjectSummary[];
245
+ /** Three-level aggregation: project -> tasks -> trace. */
246
+ projectReport(key: string): ProjectReport | undefined;
247
+ /**
248
+ * The trace entries for ONE task (task -> trace, the fourth drilldown level).
249
+ * A row belongs to the task by either exact link it uses: `task_key` equals
250
+ * the task's key, or `ref_table='tasks'` with `ref_id` = the task's UUID.
251
+ * Returns undefined for an unknown task.
252
+ */
253
+ taskTrace(ref: string, limit?: number): TaskTrace | undefined;
254
+ /**
255
+ * Derived project membership (union of project-scoped timeline writes, task
256
+ * assignees under the project, and sessions bound to it). NOT tamper-proof.
257
+ */
258
+ isProjectMember(agent: string, project: string): boolean;
259
+ projectMembers(project: string): string[];
260
+ /** The sedimentation register: evidence filtered by project / task / kind. */
261
+ listEvidence(filters?: {
262
+ project?: string | null;
263
+ taskKey?: string | null;
264
+ kind?: string | null;
265
+ }): Evidence[];
266
+ private nextTaskNumber;
267
+ getTask(key: string): Task | undefined;
268
+ /** Resolve a task by key OR by its human number (`"145"` / `"#145"`). */
269
+ resolveTask(ref: string): Task | undefined;
270
+ /**
271
+ * Create or update a task's kanban fields (title, description, project,
272
+ * impact/blast-radius, risk level). Creates the task (with a fresh number) if
273
+ * the key is new; otherwise updates only the provided fields.
274
+ */
275
+ defineTask(actor: string, key: string, opts?: {
276
+ title?: string | null;
277
+ description?: string | null;
278
+ /** Project key. Must be null/omitted, or an existing `projects.key` — a
279
+ non-existent key is rejected (fail-closed, step8). */
280
+ project?: string | null;
281
+ /** Sub-line within a project (step 2). */
282
+ stream?: string | null;
283
+ impact?: string | null;
284
+ riskLevel?: RiskLevel | null;
285
+ /** Machine-checkable acceptance spec; stored canonical-JSON on the task row. */
286
+ acceptance?: Record<string, unknown> | null;
287
+ }): Task;
288
+ /**
289
+ * Assign a task to an agent and notify them — records the assignee AND drops a
290
+ * message in that agent's inbox ("please look at task #145 …"). This is the
291
+ * passive form of "notify Claude to look at 145": the board records the ask;
292
+ * the agent reads its inbox and decides to act. The board never launches it.
293
+ */
294
+ assign(actor: string, key: string, toAgent: string): Task | undefined;
295
+ /** Report progress (0–100). Moves status to in-progress, or done at 100. */
296
+ setProgress(actor: string, key: string, progress: number): Task | undefined;
297
+ /** Set a task's status directly (e.g. blocked). */
298
+ setTaskStatus(actor: string, key: string, status: TaskStatus): Task | undefined;
299
+ assigneesFor(key: string): string[];
300
+ private risksForTask;
301
+ /**
302
+ * How many agents are actively working the task right now: assignees (or the
303
+ * claimer) that have an active (heartbeating) session.
304
+ */
305
+ private activeAgentsOnTask;
306
+ /** Full kanban card for one task. */
307
+ taskCard(key: string): TaskCard | undefined;
308
+ /** Every task as a kanban card, newest-updated first. */
309
+ listTaskCards(filters?: TaskFilters): TaskCard[];
310
+ /**
311
+ * Record a verification outcome for a task as a first-class timeline event
312
+ * (kind "verify"). `verdict` is fail-closed: only "pass"/"fail" accepted.
313
+ */
314
+ verify(actor: string, key: string, verdict: "pass" | "fail", opts?: {
315
+ /** Verification level label, e.g. "V1" (mechanical), "V2", "V3". */
316
+ level?: string;
317
+ summary?: string;
318
+ checks?: Array<Record<string, unknown>>;
319
+ evidence?: unknown;
320
+ }): TimelineEvent | undefined;
321
+ /** Verification events recorded for a task, newest first. */
322
+ verificationsFor(key: string): Array<Record<string, unknown> & {
323
+ seq: number;
324
+ at: string;
325
+ actor: string;
326
+ summary: string;
327
+ }>;
328
+ /** Leave a message for another agent, or broadcast (to = null). */
329
+ message(actor: string, to: string | null, body: string, opts?: {
330
+ project?: string | null;
331
+ taskKey?: string | null;
332
+ }): Message;
333
+ /** Messages addressed to `agent` (or broadcast) that it has not acked yet. */
334
+ inbox(agent: string, includeRead?: boolean): Message[];
335
+ markRead(messageId: string, agent?: string | null): boolean;
336
+ /** Ack everything currently in `agent`'s unread inbox. Returns the ids acked. */
337
+ markInboxRead(agent: string): string[];
338
+ /** Who has acked a message, oldest ack first. */
339
+ readers(messageId: string): Array<{
340
+ agent: string;
341
+ read_at: string;
342
+ }>;
343
+ /** Direct messages `agent` sent that the intended recipient has not acked. */
344
+ pendingAcks(agent: string): Array<{
345
+ id: string;
346
+ toAgent: string | null;
347
+ createdAt: string;
348
+ acks: number;
349
+ }>;
350
+ decision(actor: string, title: string, opts?: {
351
+ /** Four-layer ownership (step 2). */
352
+ project?: string | null;
353
+ taskKey?: string | null;
354
+ rationale?: string | null;
355
+ evidence?: string | null;
356
+ relatedCommits?: string[];
357
+ relatedTasks?: string[];
358
+ }): Decision;
359
+ decisionsForCommit(commitSha: string): Decision[];
360
+ evidence(actor: string, ref: string, note?: string | null, target?: string | null, project?: string | null, opts?: {
361
+ /** Scope the register entry to a task. */
362
+ taskKey?: string | null;
363
+ /** One of EVIDENCE_KINDS: memory | skill | hook | lesson | playbook. */
364
+ kind?: string | null;
365
+ }): Evidence | EvidenceSkipped;
366
+ /** SHA-256 of a local file's content, or null if `ref` is not a readable file. */
367
+ private static hashFileIfLocal;
368
+ /**
369
+ * Re-check every content-hashed evidence file against its attach-time hash.
370
+ * `ok` = unchanged, `changed` = content differs (tampered/edited), `missing`
371
+ * = the file is gone, `unhashed` = a URL / non-file (never hashed).
372
+ */
373
+ verifyEvidence(): EvidenceCheck[];
374
+ fileChanged(actor: string, path: string, change: FileChangeKind, taskKey?: string | null, project?: string | null): FileChange;
375
+ /** Files another agent reports touching for a task — conflict awareness. */
376
+ filesForTask(taskKey: string): FileChange[];
377
+ risk(actor: string, title: string, severity?: RiskSeverity, taskKey?: string | null, project?: string | null): Risk;
378
+ listRisks(status?: string | null): Risk[];
379
+ /** Look up by full id, unique id prefix, or exact title. */
380
+ getRisk(ref: string): Risk | undefined;
381
+ /**
382
+ * Close the loop on a risk card. Settled statuses stamp resolved_at/resolved_by;
383
+ * back to "open" clears them. The note lands on the append-only timeline.
384
+ */
385
+ resolveRisk(actor: string, ref: string, status?: RiskStatus, note?: string | null): Risk | undefined;
386
+ handoff(actor: string, to: string, summary: string, opts?: {
387
+ /** Four-layer ownership (step 2). */
388
+ project?: string | null;
389
+ context?: string | null;
390
+ relatedFiles?: string[];
391
+ openQuestions?: string[];
392
+ taskKey?: string | null;
393
+ }): Handoff;
394
+ /** Resolve the AI identity (agent + provider/model/cli) for a session. */
395
+ private identityForSession;
396
+ /** Record a single attribution — who actually produced a change. */
397
+ attribute(commit: string, opts?: {
398
+ file?: string | null;
399
+ hunk?: string | null;
400
+ actorType?: ActorType;
401
+ actor?: string;
402
+ provider?: string | null;
403
+ model?: string | null;
404
+ cli?: string | null;
405
+ sessionId?: string | null;
406
+ }): Attribution;
407
+ private insertAttribution;
408
+ /**
409
+ * Associate a Git commit with the work that produced it. Resolves the rev to
410
+ * a full sha, reads the files it touched from Git, and records one AI
411
+ * attribution per file for the given (or active) session. Optionally writes
412
+ * an additive `git notes` entry — Git history is never rewritten.
413
+ */
414
+ link(rev: string, opts?: {
415
+ sessionId?: string | null;
416
+ actorType?: ActorType;
417
+ actor?: string;
418
+ writeNote?: boolean;
419
+ }): {
420
+ sha: string;
421
+ files: string[];
422
+ count: number;
423
+ } | undefined;
424
+ attributionsForCommit(commitSha: string): Attribution[];
425
+ attributionsForFile(file: string): Attribution[];
426
+ /**
427
+ * Attributions on a commit that concern a specific file — the rows whose
428
+ * `file` matches (or is null, i.e. whole-commit). Falls back to all of the
429
+ * commit's attributions if none name the file. Used by `blame`, so tracing a
430
+ * line doesn't surface attributions for the commit's other files.
431
+ */
432
+ private attributionsForCommitFile;
433
+ /** Record who reviewed a commit and the outcome. */
434
+ review(commit: string, opts?: {
435
+ reviewerType?: ReviewerType;
436
+ reviewer?: string;
437
+ outcome?: ReviewOutcome;
438
+ note?: string | null;
439
+ sessionId?: string | null;
440
+ }): Review;
441
+ reviewsForCommit(commitSha: string): Review[];
442
+ /** Handoffs left FOR an agent — "what was passed to me", newest first. */
443
+ handoffsFor(toAgent: string): Handoff[];
444
+ /**
445
+ * Who touched a file: Git authors, distinct (session, agent) pairs that
446
+ * recorded a change, and commit attributions. The `agent` is the actor name
447
+ * recorded on the change; one entry per distinct (session, agent), collapsing
448
+ * repeated edits within a session to a single row (its latest timestamp).
449
+ */
450
+ whoTouched(file: string): {
451
+ gitAuthors: string[];
452
+ attributions: Attribution[];
453
+ sessions: {
454
+ sessionId: string | null;
455
+ agent: string;
456
+ at: string;
457
+ }[];
458
+ };
459
+ /**
460
+ * Commits attributed to an actor, CLI, provider, or model (matched broadly
461
+ * across those columns). Returns the actual matching attribution rows, so the
462
+ * reported `actor`/`cli` always reflect a row that matched the query — never
463
+ * an unrelated attribution on the same commit.
464
+ */
465
+ commitsByActor(query: string): {
466
+ commit: string;
467
+ actor: string;
468
+ cli: string | null;
469
+ at: string;
470
+ }[];
471
+ /**
472
+ * AI-attributed commits with no APPROVED human review — the accountability
473
+ * gap. A commit reviewed but rejected/changes-requested is still unreviewed
474
+ * for this purpose (sign-off was withheld), so it appears here.
475
+ */
476
+ unreviewedCommits(): {
477
+ commit: string;
478
+ actor: string;
479
+ at: string;
480
+ }[];
481
+ /**
482
+ * Files touched by BOTH agents — joint-modification / collision surface.
483
+ * Paths are normalized (leading `./` stripped) so a CLI-relative form and
484
+ * git's repo-root form for the same file reconcile. Case and deeper path
485
+ * differences are not reconciled.
486
+ */
487
+ jointFiles(agentA: string, agentB: string): string[];
488
+ private distinctAttributedCommits;
489
+ private hasAttribution;
490
+ /**
491
+ * Evaluate governance policy over a set of commits — the read-only basis for
492
+ * a CI gate. The board only reports pass/fail and the specific violations; it
493
+ * never blocks anything itself (the CI system decides what to do with a
494
+ * non-zero result). This keeps the blackboard passive while still enabling
495
+ * "no unreviewed AI work reaches main".
496
+ */
497
+ check(opts: PolicyOptions): PolicyResult;
498
+ private allAttributions;
499
+ private allReviews;
500
+ /**
501
+ * Bundle attribution for a set of commits into a portable, version-stamped
502
+ * object. This is how local-first attribution survives `git push`: export on
503
+ * the machine that did the work, import into a team board (or CI) on the
504
+ * other side. Git carries the code; the bundle carries the accountability.
505
+ */
506
+ exportBundle(commits?: string[]): AttributionBundle;
507
+ /** Canonical SHA-256 over a bundle's records (excludes the signature fields). */
508
+ private static bundleDigest;
509
+ /** Verify a bundle's signature, if any: true/false, or null when unsigned. */
510
+ static verifyBundle(bundle: AttributionBundle): boolean | null;
511
+ /**
512
+ * Merge a bundle into this board. Idempotent: rows already present (by id)
513
+ * are left untouched, so re-importing is safe. One `import` event is appended
514
+ * to the local timeline; the imported rows keep their original ids/times.
515
+ */
516
+ importBundle(bundle: AttributionBundle, opts?: {
517
+ requireSigned?: boolean;
518
+ }): {
519
+ attributions: number;
520
+ reviews: number;
521
+ sessions: number;
522
+ decisions: number;
523
+ verified: boolean | null;
524
+ };
525
+ /**
526
+ * Git trailer lines encoding a commit's attribution, for embedding in a
527
+ * commit message so it travels with the commit itself (a lightweight
528
+ * alternative to a bundle). Blackboard-namespaced — it does not hijack
529
+ * `Co-Authored-By`.
530
+ */
531
+ trailersFor(rev: string): string[];
532
+ /** Everything the board knows about a commit — the `explain` view. */
533
+ explain(rev: string): {
534
+ commit: git.CommitInfo | {
535
+ sha: string;
536
+ };
537
+ attributions: Attribution[];
538
+ reviews: Review[];
539
+ decisions: Decision[];
540
+ note: string | null;
541
+ } | undefined;
542
+ /** Which session introduced a line — Git blame → attribution. */
543
+ blame(file: string, line: number): {
544
+ sha: string;
545
+ gitAuthor: string;
546
+ attributions: Attribution[];
547
+ } | undefined;
548
+ /**
549
+ * Blame → narrative: from a single line, trace back to the session that
550
+ * introduced it and surface that session's whole story — what else it did,
551
+ * the decisions it made, and the handoffs it left. Turns `git blame` into
552
+ * "why does this line exist".
553
+ */
554
+ blameNarrative(file: string, line: number): {
555
+ sha: string;
556
+ gitAuthor: string;
557
+ attributions: Attribution[];
558
+ session: Session | null;
559
+ sessionTimeline: TimelineEvent[];
560
+ decisions: Decision[];
561
+ handoffs: Handoff[];
562
+ } | undefined;
563
+ /** Aggregate metrics for a scorecard: coverage, AI/human ratio, per-agent. */
564
+ /** With a project key, returns the three-level aggregation instead (a DIFFERENT shape). */
565
+ report(projectKey?: string | null): Report | ProjectReport | undefined;
566
+ private reportSnapshot;
567
+ /** Stamp a session's liveness. Cheap; not recorded on the timeline. */
568
+ heartbeat(sessionId?: string): Session | undefined;
569
+ /** Open sessions whose heartbeat is within `withinMs` — genuinely active. */
570
+ activeSessions(withinMs?: number): Session[];
571
+ /**
572
+ * Other active sessions that recorded a change to the same file — real-time
573
+ * collision awareness (two live agents editing one file), a step beyond the
574
+ * same-task conflict surfaced by `fileChanged`.
575
+ */
576
+ activeEditorsOfFile(file: string, excludeSession: string | null, withinMs?: number): {
577
+ sessionId: string;
578
+ agent: string;
579
+ }[];
580
+ /**
581
+ * Delete potentially-sensitive, bulky rows (messages, evidence, file-change
582
+ * records) created before a horizon. The append-only timeline is NEVER pruned
583
+ * — it is the audit trail — so pruning is recorded as one `prune` event.
584
+ */
585
+ prune(beforeIso: string): {
586
+ messages: number;
587
+ evidence: number;
588
+ filesChanged: number;
589
+ };
590
+ /**
591
+ * Redact a timeline entry's content across ALL read paths. Two things happen:
592
+ * (1) the timeline row's displayed summary/payload is overlaid with a
593
+ * tombstone (`timeline`/`since`/`sessionTimeline`), and (2) the underlying
594
+ * source row that the entry points at (a message body, evidence note, handoff
595
+ * text, decision rationale, risk title) is blanked in its own table — because
596
+ * those tables are read directly by `inbox`/`status`/the dashboard and would
597
+ * otherwise leak the content the overlay only hid on the timeline.
598
+ *
599
+ * The timeline row's stored hash input is left intact so the chain still
600
+ * verifies. NOTE: this hides content at the read layer — it is not
601
+ * cryptographic erasure (the original summary remains in the timeline row to
602
+ * keep the chain valid). Don't store secrets you must be able to destroy.
603
+ */
604
+ redact(seq: number, reason?: string | null): boolean;
605
+ /** Seqs that have been redacted, with their reason. */
606
+ private redactionMap;
607
+ /** Apply the redaction overlay to a set of events (content → tombstone). */
608
+ private applyRedactions;
609
+ /**
610
+ * Record a batch of normalized ingest events (from a transcript adapter)
611
+ * under the acting agent and active session, then append one `ingest`
612
+ * summary event. Each file/decision/note is attributed like any other write.
613
+ */
614
+ ingest(events: IngestEvent[]): {
615
+ files: number;
616
+ decisions: number;
617
+ notes: number;
618
+ };
619
+ status(forAgent?: string): BoardStatus;
620
+ /**
621
+ * Run a read-only function inside a single SQLite snapshot so every query it
622
+ * makes sees a consistent point-in-time view of the board. Nested calls (a
623
+ * snapshot within a snapshot) reuse the outer one.
624
+ */
625
+ private readSnapshot;
626
+ private allUnread;
627
+ }
628
+ //# sourceMappingURL=board.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"board.d.ts","sourceRoot":"","sources":["../src/board.ts"],"names":[],"mappings":"AAYA,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,eAAe,EACrB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAEhC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,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