@dev.fast/whiteboard 0.3.3 → 0.3.4-preview.20261019.125

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 (115) hide show
  1. package/dist/{account-alias-xOdmMnDH.js → account-alias-ClRtWF_-.js} +8 -6
  2. package/dist/{agent-cli-DT7MdaqL.js → agent-cli-C6AM9dml.js} +15 -10
  3. package/dist/agent-cli-DKpWo-4F.js +2 -0
  4. package/dist/{agent-client-BRBzv3AV.js → agent-client-G4KxB8zB.js} +13 -3
  5. package/dist/{authoring-tools-DGSEag8y.js → authoring-tools-Dfo0uOSj.js} +34 -27
  6. package/dist/{background-server-WKzI_a98.js → background-server-BF_lLFxY.js} +5 -5
  7. package/dist/{background-server-C_REWFkG.js → background-server-DJfYWRoN.js} +1 -1
  8. package/dist/build-info.json +1 -1
  9. package/dist/{cli-BBSDi_dX.js → cli-CqOiiTW_.js} +1 -1
  10. package/dist/{cli-runner-DshTBske.js → cli-runner-D8CsXff4.js} +26 -26
  11. package/dist/cli.js +2 -2
  12. package/dist/{client-BN_FDxFr.js → client-lKVF_Elo.js} +253 -47
  13. package/dist/{fuzzy-match-bFX6wm8j.js → fuzzy-match-DH9lZivo.js} +42 -14
  14. package/dist/{headless-host-CS4Gv0c5.js → headless-host-C4bhVPZx.js} +513 -140
  15. package/dist/{headless-host-CzvYpKOX.js → headless-host-CeNnXxiL.js} +1 -1
  16. package/dist/lens-selection-CyJapcsl.js +214 -0
  17. package/dist/{local-data-DtQTIzHX.js → local-data-BdqqCYUD.js} +2434 -328
  18. package/dist/{mcp-DpKnnmHH.js → mcp-B2mvDEhC.js} +5 -9
  19. package/dist/{package-paths-jMg6JxDP.js → package-paths-Cm1tR8c4.js} +1 -1
  20. package/dist/{profile-DaqmODhc.js → profile-DcigfSms.js} +20 -8
  21. package/dist/profile-DthRnZ7x.js +2 -0
  22. package/dist/{remote-attach-DCngg8cl.js → remote-attach-DGwVRmY5.js} +4 -4
  23. package/dist/{remote-extensions-BCAbQZTv.js → remote-extensions-CferWwM9.js} +3 -3
  24. package/dist/{remote-extensions-Cf3L-ZGG.js → remote-extensions-D8W2IgKH.js} +1 -1
  25. package/dist/{remote-language-server-UWQgpoh-.js → remote-language-server-By-rEosC.js} +5 -5
  26. package/dist/{remote-uninstall-CcDOcGyi.js → remote-uninstall-DgHnDAFH.js} +6 -6
  27. package/dist/{request-origin-Zcn_CjX4.js → request-origin-DDmfnytX.js} +38 -10
  28. package/dist/{review-app-launcher-tqSQPlbu.js → review-app-launcher-CG3TFZEx.js} +2 -2
  29. package/dist/{review-home-paths-Lc02WFuX.js → review-home-paths-D1JVitqN.js} +19 -17
  30. package/dist/{review-telemetry-BHWJsnoD.js → review-telemetry-Myzm7o6-.js} +5 -5
  31. package/dist/runtime-Bj2tD33R.js +27 -0
  32. package/dist/runtime.d.ts +1 -1
  33. package/dist/runtime.js +1 -1
  34. package/dist/{s3-77-qkEhs.js → s3-DtJFWC0G.js} +1 -1
  35. package/dist/{s3-config-DDWWMh5x.js → s3-config-BTO12tCC.js} +1 -1
  36. package/dist/{s3-config-0xuCh-F_.js → s3-config-CSy3fx8H.js} +1 -1
  37. package/dist/server/desktop-host.js +29 -76
  38. package/dist/{server-discovery-BVqrE1_-.js → server-discovery-Bwa_6Tsj.js} +3 -3
  39. package/dist/sharing/index.d.ts +486 -70
  40. package/dist/sharing/index.js +1 -1
  41. package/dist/{src-DsM3jO8G.js → src-BiWNbcF_.js} +89 -12
  42. package/dist/{src-BMPuxWv4.js → src-WPaQn75m.js} +208 -73
  43. package/dist/{stored-document-migration-CChxtFAy.js → stored-document-migration-dFbewRTG.js} +270 -269
  44. package/dist/{thread-state-5pYr6_zM.js → thread-state-Do5LX10I.js} +7 -2
  45. package/dist/{tool-failure-BFt2xj9i.js → tool-failure-C9J3r7KD.js} +10 -3
  46. package/instructions/authoring.md +3 -2
  47. package/package.json +4 -4
  48. package/src/agent-connect.ts +8 -2
  49. package/src/ask/agents.ts +51 -9
  50. package/src/ask/checkout-files.ts +2 -5
  51. package/src/ask/thread-state.ts +4 -0
  52. package/src/ask/thread.ts +16 -0
  53. package/src/ask/threads.ts +24 -3
  54. package/src/cli-runner.ts +4 -1
  55. package/src/diff-selection-migration.ts +48 -34
  56. package/src/heading-anchors.ts +42 -0
  57. package/src/lens-selection.ts +38 -2
  58. package/src/review-api/README.md +52 -13
  59. package/src/review-api/activity.ts +1 -4
  60. package/src/review-api/agent-cli.ts +9 -1
  61. package/src/review-api/anchor-quotes.ts +14 -7
  62. package/src/review-api/ask-history.ts +137 -51
  63. package/src/review-api/authoring-tools.ts +45 -30
  64. package/src/review-api/blocks/definition.ts +1 -1
  65. package/src/review-api/blocks/markdown.ts +2 -2
  66. package/src/review-api/board-order.ts +144 -0
  67. package/src/review-api/checkout-groups.ts +560 -0
  68. package/src/review-api/document-headings.ts +58 -27
  69. package/src/review-api/document-text.ts +31 -2
  70. package/src/review-api/document.ts +281 -34
  71. package/src/review-api/foreign-references.ts +328 -0
  72. package/src/review-api/github-provider.ts +51 -13
  73. package/src/review-api/http.ts +702 -123
  74. package/src/review-api/instructions.ts +0 -19
  75. package/src/review-api/link-preview.ts +113 -0
  76. package/src/review-api/local-data.ts +310 -46
  77. package/src/review-api/mcp.ts +3 -11
  78. package/src/review-api/onboarding.ts +1 -1
  79. package/src/review-api/profile.ts +37 -6
  80. package/src/review-api/public-tools.ts +24 -2
  81. package/src/review-api/pull-request.ts +82 -49
  82. package/src/review-api/request-origin.ts +10 -0
  83. package/src/review-api/review-progress.ts +61 -27
  84. package/src/review-api/scratchpad-plan-upgrade.ts +250 -0
  85. package/src/review-api/store-migrations.ts +357 -0
  86. package/src/review-api/store-schema.ts +38 -29
  87. package/src/review-api/store.ts +2144 -480
  88. package/src/review-api/workspaces.ts +52 -13
  89. package/src/review-api/worktree-events.ts +3 -5
  90. package/src/review-api/worktree-source.ts +3 -7
  91. package/src/review-api/worktree-structural.integration.ts +72 -0
  92. package/src/review-stack.ts +15 -23
  93. package/src/runtime.ts +4 -30
  94. package/src/server/desktop-host.ts +6 -1
  95. package/src/server/desktop-server.ts +1 -31
  96. package/src/server/headless-host.ts +0 -2
  97. package/src/server/hono-http.ts +2 -1
  98. package/src/server/legacy-tutorial-cleanup.ts +2 -3
  99. package/src/server/review-gateway-list.ts +3 -5
  100. package/src/server/review-gateway-memory.ts +1 -1
  101. package/src/server/review-lifecycle-telemetry.ts +2 -2
  102. package/src/server/review-server-core.ts +1 -5
  103. package/src/server/structural-comparisons.ts +47 -0
  104. package/src/sharing/export.ts +36 -7
  105. package/src/sharing/host.ts +34 -14
  106. package/src/sharing/import.ts +156 -24
  107. package/src/sharing/repository.ts +128 -20
  108. package/src/startup-trace.ts +3 -3
  109. package/src/stored-document-migration.ts +110 -19
  110. package/src/ui-telemetry-events.ts +25 -9
  111. package/dist/agent-cli-DeCrUC2s.js +0 -2
  112. package/dist/profile-Cz7L781D.js +0 -2
  113. package/dist/runtime-CKiWhGrf.js +0 -52
  114. package/instructions/scratchpad.md +0 -23
  115. package/src/review-preferences.ts +0 -88
@@ -46,6 +46,44 @@ declare const shareManifestSchema: z.ZodObject<{
46
46
  }, z.core.$strict>;
47
47
  type ShareManifest = z.infer<typeof shareManifestSchema>;
48
48
  //#endregion
49
+ //#region ../local-vcs/src/exec.d.ts
50
+ /** A value from outside the code, given to git, jj or gh as an operand. */
51
+ type Operand =
52
+ /** A full commit id. */
53
+ {
54
+ commit: string;
55
+ } |
56
+ /** A revision expression: a commit, ref, `HEAD~1`, `a..b`. */
57
+ {
58
+ rev: string;
59
+ } |
60
+ /** A ref or branch name. */
61
+ {
62
+ ref: string;
63
+ } |
64
+ /** `[+]<from>:<to>`, each a commit id or ref. */
65
+ {
66
+ refspec: {
67
+ from: string;
68
+ to: string;
69
+ force?: boolean;
70
+ };
71
+ } |
72
+ /** A path in a checkout; always after `--`. */
73
+ {
74
+ path: string;
75
+ } |
76
+ /** A remote's name or URL. */
77
+ {
78
+ remote: string;
79
+ } |
80
+ /** Any other value: a message, a search, a PR number. */
81
+ {
82
+ value: string;
83
+ };
84
+ /** An argument: a flag or subcommand written in the code, or an operand. */
85
+ type VcsArg = string | Operand;
86
+ //#endregion
49
87
  //#region ../local-vcs/src/vcs.d.ts
50
88
  interface LocalVcsDiffFileSummary {
51
89
  path: string;
@@ -205,19 +243,16 @@ type StructuralLineCounts = {
205
243
  removed: number;
206
244
  };
207
245
  //#endregion
246
+ //#region ../review-protocol/src/board-icons.d.ts
247
+ /** "code" for a board with code attached, "board" for one without. */
248
+ type BoardIconKind = "board" | "code";
249
+ //#endregion
208
250
  //#region ../review-protocol/src/review-api-client.d.ts
209
251
  /** List metadata for the authenticated local catalog; document contents stay in snapshots. */
210
252
  interface ReviewApiSummary {
211
253
  reviewId: string;
212
254
  version: number;
213
255
  title: string;
214
- /** Absent for a review. The one scratchpad has no pins or lifecycle. */
215
- kind?: "scratchpad";
216
- /** What is on the scratchpad, for its Home card; absent for a review. */
217
- contents?: {
218
- blocks: number;
219
- diagrams: number;
220
- };
221
256
  /** Absent for a document whose references all carry their own pins. */
222
257
  pins?: {
223
258
  repositoryId: string;
@@ -226,6 +261,9 @@ interface ReviewApiSummary {
226
261
  worktreeRevision?: string;
227
262
  };
228
263
  target?: {
264
+ kind: "project";
265
+ repositoryId: string;
266
+ } | {
229
267
  kind: "worktree";
230
268
  repositoryId: string;
231
269
  base?: string;
@@ -248,14 +286,17 @@ interface ReviewApiSummary {
248
286
  pullRequestTitle?: string;
249
287
  revision?: string;
250
288
  };
289
+ /** The PR's state on GitHub, when the host has read it. */
290
+ pullRequestState?: PullRequestState;
251
291
  /** Shared imports have separate local checkouts but retain their remote identity. */
252
292
  shared?: {
253
293
  cloneUrl?: string;
254
294
  };
255
- /** Display grouping only; source pins remain bound to their own checkout. */
256
- repositoryGroup?: {
257
- key: string;
258
- label: string;
295
+ /** The project the board belongs to; absent for a share with no
296
+ * repository here. */
297
+ project?: {
298
+ id: string;
299
+ name: string;
259
300
  };
260
301
  repositoryName: string;
261
302
  repositoryPath?: string;
@@ -266,6 +307,8 @@ interface ReviewApiSummary {
266
307
  } | null;
267
308
  viewedAt: string | null;
268
309
  trashedAt: string | null;
310
+ /** A version was saved after viewedAt, or the board was never viewed. */
311
+ changed?: boolean;
269
312
  /** An agent holds a live lease; absent on shared reviews. */
270
313
  working?: boolean;
271
314
  host?: string;
@@ -276,6 +319,12 @@ interface ReviewApiSummary {
276
319
  reason?: string;
277
320
  pending?: true;
278
321
  };
322
+ /** The board this one is nested under; absent at top level. */
323
+ parentId?: string;
324
+ /** The boards nested under this one, in sibling order. */
325
+ children?: string[];
326
+ /** The boards in its project this one builds on. */
327
+ dependsOn?: string[];
279
328
  }
280
329
  interface ReviewSourceEntry {
281
330
  path: string;
@@ -283,6 +332,8 @@ interface ReviewSourceEntry {
283
332
  }
284
333
  //#endregion
285
334
  //#region ../review-protocol/src/contracts.d.ts
335
+ declare const PULL_REQUEST_STATES: readonly ["open", "draft", "merged", "closed"];
336
+ type PullRequestState = (typeof PULL_REQUEST_STATES)[number];
286
337
  /** Workspace attachment identity is independent of the displayed source generation. */
287
338
  interface ReviewLanguageEnvironment {
288
339
  /** Absent for a caller on another machine. */
@@ -356,8 +407,8 @@ type SourcePins = z.infer<typeof sourcePinsSchema>;
356
407
  * Authored document attachments use DiffSelection instead. */
357
408
  declare const fileLineRangeSchema: z.ZodObject<{
358
409
  side: z.ZodDefault<z.ZodEnum<{
359
- head: "head";
360
410
  base: "base";
411
+ head: "head";
361
412
  }>>;
362
413
  file: z.ZodString;
363
414
  fromLine: z.ZodNumber;
@@ -709,6 +760,9 @@ type Pins = z.infer<typeof pinsSchema> & {
709
760
  worktreeRevision?: string;
710
761
  };
711
762
  declare const reviewTargetSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
763
+ kind: z.ZodLiteral<"project">;
764
+ repositoryId: z.ZodString;
765
+ }, z.core.$strict>, z.ZodObject<{
712
766
  kind: z.ZodLiteral<"worktree">;
713
767
  repositoryId: z.ZodString;
714
768
  base: z.ZodOptional<z.ZodString>;
@@ -723,6 +777,15 @@ type ReviewTarget = z.infer<typeof reviewTargetSchema>;
723
777
  type Element = Block | Step | FlowDiagramNode | FlowDiagramEdge;
724
778
  /** A diagram unit: addressed on its own, but only ever inside its diagram. */
725
779
  type Unit = Step | FlowDiagramNode | FlowDiagramEdge;
780
+ /** Names a block from outside its board. Block ids are unique only within a board. */
781
+ type BlockRef = {
782
+ board: string;
783
+ block: string;
784
+ };
785
+ type BoardRef = BlockRef | {
786
+ board: string;
787
+ block?: undefined;
788
+ };
726
789
  declare const editSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
727
790
  parentId: z.ZodOptional<z.ZodString>;
728
791
  afterId: z.ZodOptional<z.ZodString>;
@@ -1031,6 +1094,8 @@ interface EditSummary {
1031
1094
  units?: string[];
1032
1095
  /** The agent whose courier draws this edit, when the host could tell. */
1033
1096
  activityId?: string;
1097
+ /** The Ask thread that made this edit, if any. */
1098
+ threadId?: string;
1034
1099
  }
1035
1100
  /** A component an edit wrote, named so the author can address it. */
1036
1101
  interface WrittenComponent {
@@ -1048,8 +1113,10 @@ interface ComparisonCoverage {
1048
1113
  }
1049
1114
  //#endregion
1050
1115
  //#region src/review-api/pull-request.d.ts
1051
- /** Runs one subprocess and resolves its stdout; rejects on failure or timeout. */
1052
- type RunCommand = (file: string, args: string[], options: {
1116
+ /** Runs one subprocess and resolves its stdout; rejects on failure or
1117
+ * timeout. git, jj and gh go through the VCS runner; Azure DevOps's az (by
1118
+ * way of cmd.exe on Windows) gets its operands checked the same way. */
1119
+ type RunCommand = (file: "git" | "jj" | "gh" | "az" | "cmd.exe", args: VcsArg[], options: {
1053
1120
  cwd?: string;
1054
1121
  timeoutMs: number;
1055
1122
  }) => Promise<string>;
@@ -1215,37 +1282,29 @@ declare const askPermissionsSchema: z.ZodEnum<{
1215
1282
  }>;
1216
1283
  type AskPermissions = z.infer<typeof askPermissionsSchema>;
1217
1284
  type AskEntry = z.infer<typeof askEntrySchema>;
1218
- /** A saved conversation, as the history list shows it. The transcript stays
1219
- * with the agent; Whiteboard keeps what it needs to find and reopen it. */
1220
- declare const askHistoryEntrySchema: z.ZodObject<{
1221
- id: z.ZodString;
1222
- agent: z.ZodEnum<{
1223
- claude: "claude";
1224
- codex: "codex";
1225
- cursor: "cursor";
1226
- opencode: "opencode";
1227
- pi: "pi";
1228
- }>;
1229
- title: z.ZodString;
1230
- question: z.ZodOptional<z.ZodString>;
1231
- selection: any;
1232
- head: z.ZodString;
1233
- createdAt: z.ZodString;
1234
- updatedAt: z.ZodString;
1235
- }, z.core.$strip>;
1236
- type AskHistoryEntry = z.infer<typeof askHistoryEntrySchema>;
1237
1285
  //#endregion
1238
1286
  //#region src/review-api/ask-history.d.ts
1239
1287
  /** A saved Ask conversation: its history entry, and how to reopen it. */
1240
1288
  declare const askRecordSchema: any;
1241
1289
  type AskRecord = z.infer<typeof askRecordSchema>;
1242
- /** Saved Ask conversations, per review. Shared reviews are not in
1243
- * `reviews`, so there is no foreign key; deleting a review deletes its rows. */
1290
+ /** Saved Ask conversations by project, each anchored on the board it started
1291
+ * on. No foreign key on the anchor: shared reviews are not in `reviews`.
1292
+ * So deleting a board removes its threads by hand (removeReview). */
1244
1293
  declare class AskHistory {
1245
1294
  private readonly db;
1295
+ /** The store's rule for writing about a board: one in Trash is
1296
+ * read-only. */
1297
+ private readonly writable;
1298
+ private readonly listeners;
1246
1299
  private externalWriteGuard?;
1247
1300
  setExternalWriteGuard(guard: (reviewId: string) => void): void;
1248
- constructor(db: DatabaseSync);
1301
+ constructor(db: DatabaseSync,
1302
+ /** The store's rule for writing about a board: one in Trash is
1303
+ * read-only. */
1304
+ writable?: (reviewId: string) => void);
1305
+ /** Calls back when a conversation is saved, renamed, used or deleted. */
1306
+ subscribe(listener: () => void): () => void;
1307
+ private changed;
1249
1308
  private assertWritable;
1250
1309
  private assertThreadWritable;
1251
1310
  save(record: AskRecord): void;
@@ -1265,14 +1324,62 @@ declare class AskHistory {
1265
1324
  /** What the agent offered last, or last with the model given. */
1266
1325
  offer(agent: AskAgentId, model?: string): AskOffer | undefined;
1267
1326
  touch(id: string, at?: string): void;
1268
- /** Newest first. */
1269
- list(reviewId: string): AskHistoryEntry[];
1327
+ /** Conversations in a board's project, or started on the board when it
1328
+ * has none. Newest first. */
1329
+ list(board: string, projectId?: string): any[];
1330
+ /** Every project's conversations, newest first. */
1331
+ listAll(): any[];
1332
+ private entries;
1270
1333
  get(id: string): AskRecord | undefined;
1334
+ /** The reviewer saw the thread, on screen with the app focused. Only
1335
+ * when it was seen changes: not its order, nor when it was used. */
1336
+ markViewed(id: string, at?: string): void;
1337
+ /** When each of these threads was last viewed, where it ever was.
1338
+ * Threads from before views were kept have none, and none is unread. */
1339
+ viewedAt(ids: readonly string[]): Map<string, string>;
1340
+ /** Forgets the threads that started on a board gone for good. */
1271
1341
  removeReview(reviewId: string): void;
1272
1342
  delete(id: string): void;
1273
1343
  }
1274
1344
  //#endregion
1345
+ //#region src/review-api/link-preview.d.ts
1346
+ /** What a board link's hover card shows of the board or block it links to. */
1347
+ interface BoardLinkPreview {
1348
+ /** A block link: the title of the section the block is in. */
1349
+ section?: string;
1350
+ /** Markdown paragraphs, opening the board or block. */
1351
+ prose?: string[];
1352
+ /** A block link to code: its language and first lines. */
1353
+ code?: {
1354
+ language: string;
1355
+ lines: string[];
1356
+ };
1357
+ /** A block link to a diagram or other figure: its kind and title. */
1358
+ figure?: {
1359
+ type: string;
1360
+ title: string;
1361
+ };
1362
+ }
1363
+ //#endregion
1275
1364
  //#region src/review-api/store.d.ts
1365
+ /** What a person's save wrote: the version, and the id each new block got
1366
+ * by its clientKey. */
1367
+ interface PersonEditResult {
1368
+ reviewId: string;
1369
+ version: number;
1370
+ ids: Record<string, string>;
1371
+ }
1372
+ /** One row of a board's history. */
1373
+ interface HistoryEntry {
1374
+ version: number;
1375
+ title: string;
1376
+ createdAt: string;
1377
+ /** "you" for a version a person saved from the canvas; absent for one
1378
+ * saved before Whiteboard recorded who wrote it. */
1379
+ author?: "you" | "agent";
1380
+ /** The Ask thread whose edit made this version, if any. */
1381
+ threadId?: string;
1382
+ }
1276
1383
  /** Source identity displayed in the review header and Home, alongside immutable pins. */
1277
1384
  interface SnapshotOrigin {
1278
1385
  branch?: string;
@@ -1297,8 +1404,6 @@ interface Snapshot {
1297
1404
  reviewId: string;
1298
1405
  version: number;
1299
1406
  title: string;
1300
- /** Absent for a review. The scratchpad has no pins, target or lifecycle. */
1301
- kind?: "scratchpad";
1302
1407
  /** The default pins for references that name none. A document whose
1303
1408
  * references all carry their own pins has neither pins nor target. */
1304
1409
  pins?: Pins;
@@ -1314,7 +1419,28 @@ interface Snapshot {
1314
1419
  /** The edit that produced this version, when one did; absent for a
1315
1420
  * rename, set_target, restore or import, which the canvas does not draw. */
1316
1421
  lastEdit?: EditSummary;
1422
+ /** The Ask thread that caused this version when it made no edit to
1423
+ * name it on: a create, rename, retarget or restore. */
1424
+ threadId?: string;
1425
+ /** A person saved this version from the canvas: the blocks they added,
1426
+ * removed or changed. Absent on every other version. */
1427
+ personEdit?: {
1428
+ changed: string[];
1429
+ ids?: Record<string, string>;
1430
+ };
1317
1431
  }
1432
+ /** Who is writing: the rules a write keeps depend on it. */
1433
+ type Author =
1434
+ /** An agent, through the API; a thread's agent stamps its versions
1435
+ * with the thread. */
1436
+ {
1437
+ kind: "agent";
1438
+ threadId?: string;
1439
+ } |
1440
+ /** A person, from Desktop or the canvas. */
1441
+ {
1442
+ kind: "person";
1443
+ };
1318
1444
  interface Result {
1319
1445
  /** Create only: false when an existing review for the same PR came back. */
1320
1446
  created?: boolean;
@@ -1338,8 +1464,24 @@ interface Result {
1338
1464
  attention?: true;
1339
1465
  lifecycle?: true;
1340
1466
  deleted?: true;
1467
+ /** After set_parent or set_dependencies: the board's relations. */
1468
+ relations?: BoardRelations;
1341
1469
  warnings?: string[];
1342
1470
  }
1471
+ /** A board as its place in a project shows it. */
1472
+ interface PlacedBoard {
1473
+ reviewId: string;
1474
+ title: string;
1475
+ target?: ReviewTarget;
1476
+ origin?: SnapshotOrigin;
1477
+ }
1478
+ /** Where a board sits among its project's boards. Kept outside its versions. */
1479
+ interface BoardRelations {
1480
+ parentId: string | null;
1481
+ /** In sibling order. */
1482
+ children: string[];
1483
+ dependsOn: string[];
1484
+ }
1343
1485
  /** A PR's current comparison: GitHub's head and diff base, fetched locally. */
1344
1486
  interface ResolvedPullRequest {
1345
1487
  target: ReviewTarget;
@@ -1352,11 +1494,9 @@ interface ResolvedPullRequest {
1352
1494
  interface ReviewProviders {
1353
1495
  headBranch?(pins: Pins, headRef?: string): Promise<string | undefined>;
1354
1496
  projectSource?(snapshot: Snapshot, pins: Pins): Promise<Snapshot>;
1355
- /** Fetch a PR into a registered checkout: the named one, else the first
1356
- * preferred one that still matches, else any whose remote is the PR's. */
1497
+ /** Fetch a PR into the registered checkout the caller names. */
1357
1498
  resolvePullRequest?(url: string, repository: {
1358
- id?: string;
1359
- preferred?: string;
1499
+ id: string;
1360
1500
  }): Promise<ResolvedPullRequest>;
1361
1501
  /** Undefined when the forge can't be read. */
1362
1502
  pullRequestTitle?(url: string): Promise<string | undefined>;
@@ -1370,6 +1510,8 @@ interface ReviewProviders {
1370
1510
  /** Ids of references whose own pins no longer name a usable checkout. */
1371
1511
  unavailableAnchors?(snapshot: Snapshot): Promise<string[]>;
1372
1512
  validatePins(pins: Pins): Promise<void>;
1513
+ /** The full commit a commit ID or its prefix names, if any. */
1514
+ resolveCommit?(repositoryId: string, commit: string): Promise<string | undefined>;
1373
1515
  /** The files each side's commit changed from one set of pins to another,
1374
1516
  * or undefined when they can't be diffed commit to commit. */
1375
1517
  filesChangedBetween?(from: Pins, to: Pins): Promise<{
@@ -1380,6 +1522,8 @@ interface ReviewProviders {
1380
1522
  peek: boolean;
1381
1523
  }): Promise<void>;
1382
1524
  validateResource(pins: Pins | undefined, block: Block): Promise<void>;
1525
+ /** A PR's base branch, as last read from GitHub; undefined until read. */
1526
+ pullRequestBaseBranch?(url: string): string | undefined;
1383
1527
  }
1384
1528
  /** One instance owned by the desktop server. All writers go through execute().
1385
1529
  * The queue includes async validation; SQLite transactions contain only writes.
@@ -1387,6 +1531,8 @@ interface ReviewProviders {
1387
1531
  */
1388
1532
  declare class ReviewStore {
1389
1533
  private readonly providers;
1534
+ /** How the checkouts group, if `groupCheckoutsAhead` worked it out. */
1535
+ private readonly checkoutOwners?;
1390
1536
  readonly activity: ReviewActivity;
1391
1537
  readonly askHistory: AskHistory;
1392
1538
  private readonly db;
@@ -1416,10 +1562,29 @@ declare class ReviewStore {
1416
1562
  private observedVersions;
1417
1563
  private observedDeletions;
1418
1564
  subscribeCatalog(listener: () => void): () => void;
1419
- /** For a host whose listing changed without the store: a preference flip. */
1420
- invalidateCatalog(): void;
1421
1565
  subscribe(listener: (result: Result) => void): () => void;
1422
- constructor(databasePath: string, providers: ReviewProviders);
1566
+ constructor(databasePath: string, providers: ReviewProviders,
1567
+ /** How the checkouts group, if `groupCheckoutsAhead` worked it out. */
1568
+ checkoutOwners?: ReadonlyMap<string, string> | undefined);
1569
+ /** Saves a version over what it was; the current one re-indexes its
1570
+ * board's links, as every written version does. */
1571
+ private rewriteVersion;
1572
+ /** The project of a registered checkout, made on first use. Checkouts of
1573
+ * one repository (worktrees, or clones of one GitHub repository) share it. */
1574
+ projectOfRepository(repositoryId: string): string;
1575
+ /** For a board with no repository: the project of the board opened last,
1576
+ * else of the first registered checkout, else one with no repository. */
1577
+ private fallbackProject;
1578
+ private firstRepositoryProject;
1579
+ /** A checkout's project, as the catalog lists it; undefined once the
1580
+ * checkout is unregistered. */
1581
+ checkoutProject(repositoryId: string): ReviewApiSummary["project"] | undefined;
1582
+ /** Undefined when the file can't be read. */
1583
+ private fileAtCommit;
1584
+ /** A checkout's name as its project labels it, else its folder. */
1585
+ private repositoryName;
1586
+ /** A board's project. */
1587
+ projectOf(id: string): string;
1423
1588
  private dataVersion;
1424
1589
  private currentVersions;
1425
1590
  private currentDeletions;
@@ -1434,13 +1599,19 @@ declare class ReviewStore {
1434
1599
  fingerprint: string;
1435
1600
  scope: Coverage;
1436
1601
  }[], viewed: boolean): void;
1437
- private readonly repositoryGroups;
1602
+ private checkoutGroups;
1603
+ /** How the store's checkouts group into projects, kept for the open. */
1604
+ private get checkouts();
1438
1605
  private repositoryGroup;
1439
1606
  registerRepository(root: string): {
1440
1607
  id: string;
1441
1608
  name: string;
1442
1609
  };
1443
- unregisterRepository(id: string): void;
1610
+ /** Forgets a checkout no board uses, after every write queued before it,
1611
+ * so a board being made with it keeps it. */
1612
+ unregisterRepository(id: string): Promise<void>;
1613
+ /** Checkouts whose remote is cloneUrl, most recently used first. */
1614
+ checkoutsOf(cloneUrl: string): string[];
1444
1615
  /** Registered checkouts, oldest registration first. */
1445
1616
  repositories(): {
1446
1617
  id: string;
@@ -1465,32 +1636,31 @@ declare class ReviewStore {
1465
1636
  resetServerId(): string;
1466
1637
  /** The 404 check alone, without loading a snapshot. */
1467
1638
  assertExists(id: string): void;
1639
+ /** A board that exists and isn't in Trash: the one rule every write
1640
+ * about a board keeps. */
1468
1641
  assertWritable(id: string): void;
1642
+ /** Refuses a board in Trash, which is read-only until it is restored. */
1643
+ assertOutOfTrash(id: string): void;
1469
1644
  private trashTime;
1645
+ /** Removes a board for good, from Delete… or Trash's purge. Links into
1646
+ * it stay, and show it as deleted. */
1470
1647
  private removePermanently;
1648
+ /** Deletes the boards 30 days in Trash, each as Delete… would. */
1471
1649
  private purgeExpired;
1472
1650
  read(id: string, version?: number): Snapshot;
1473
1651
  setDiffStats(pins: Pins, stats: NonNullable<ReviewApiSummary["diffStats"]>): void;
1474
- /** Reviews of the tutorial earlier versions shipped, for their removal. */
1475
- legacyTutorialIds(): string[];
1652
+ /** Deletes the tutorial earlier versions shipped. Like any board, each
1653
+ * goes to Trash first, then is deleted from there. */
1654
+ removeLegacyTutorials(): Promise<void>;
1476
1655
  list(): ReviewApiSummary[];
1477
1656
  /** One review's catalog entry, as review_list shows it. */
1478
1657
  summary(id: string): ReviewApiSummary | undefined;
1479
1658
  private summaries;
1480
1659
  /** Local and imported summaries use the same persisted counts. */
1481
1660
  withDiffStats<T extends ReviewApiSummary>(reviews: T[]): T[];
1482
- /** What the pad holds, for its Home card: blocks, and the diagrams among them. */
1483
- private scratchpadContents;
1484
- /** The one scratchpad, made on first use. A host that loses the race to
1485
- * another on the same home finds it made. */
1486
- ensureScratchpad(): Promise<void>;
1487
1661
  /** Two saved board/day pairs in the last fourteen days. */
1488
1662
  feedbackEligible(now?: number): boolean;
1489
- history(id: string): {
1490
- version: number;
1491
- title: string;
1492
- createdAt: string;
1493
- }[];
1663
+ history(id: string): HistoryEntry[];
1494
1664
  inspect(id: string, targetId?: string, version?: number): Element | {
1495
1665
  id: string | undefined;
1496
1666
  type: "image" | "code" | "markdown" | "divider" | "code_peek" | "sequence" | "step" | "call_stack_diff" | "database_lens" | "trace_quote" | "software_map" | "flow_diagram" | "flow_node" | "flow_edge" | "section" | "callout";
@@ -1500,7 +1670,191 @@ declare class ReviewStore {
1500
1670
  execute(input: unknown, initial?: {
1501
1671
  document: Block[];
1502
1672
  origin: SnapshotOrigin;
1503
- }): Promise<Result>;
1673
+ }, author?: Author): Promise<Result>;
1674
+ /**
1675
+ * Commits a board's next version: the one place a version is written.
1676
+ * Whoever writes it, it keeps the same rules:
1677
+ * - an agent may not change a block a person holds;
1678
+ * - the version names its author: a thread's names the thread, a
1679
+ * person's is theirs and never inherits a thread;
1680
+ * - only a change of repository moves a board to another project, and an
1681
+ * existing board never takes the project of the board opened last;
1682
+ * - only links the change adds are checked;
1683
+ * - the version, its link index, the board's project and its relations
1684
+ * are written together, and only if the board is still at the version
1685
+ * read and the rules still hold.
1686
+ * Runs inside the write queue.
1687
+ */
1688
+ private commitVersion;
1689
+ /** The project a version puts its board in: a new board's repository's,
1690
+ * or, for a board that has one, its own unless the version moves it to
1691
+ * another registered repository. */
1692
+ private projectFor;
1693
+ private currentVersion;
1694
+ /** Runs one write after every write queued before it. */
1695
+ private enqueue;
1696
+ /** Respells a document's links and resolves its commit links, as every
1697
+ * save does. A changed reference is no longer stale. */
1698
+ private normalizeDocument;
1699
+ /** Checks a candidate version and numbers it. A worktree board's version
1700
+ * may come back with its live source projected. */
1701
+ private prepareVersion;
1702
+ /** Writes a version; call inside commitCommand. */
1703
+ private saveVersion;
1704
+ /** Deletes a board and its history, if it is still at the version read
1705
+ * and passes `guard`: Delete… from Trash, Trash's purge and a discarded
1706
+ * empty board all end here. An agent can't delete a board while a person
1707
+ * holds a block in it. */
1708
+ private deleteBoard;
1709
+ /** Writes what a board is outside its versions: its parent or what it
1710
+ * depends on, Trash or back, or that it was viewed. No version is saved,
1711
+ * but the rules are a version's: a board in Trash takes nothing but a
1712
+ * restore, and an agent can't put a board a person is in to Trash. */
1713
+ private commitBoardFacts;
1714
+ /** Deletes a board the person made and left as it was: with no title
1715
+ * (it reads "Untitled"), no blocks and no child boards. A title typed as
1716
+ * "Untitled" is a title. A board still open on a canvas, or
1717
+ * one an agent is working on, is kept. A closing canvas saves, then lets
1718
+ * go of the board, so the discard waits for that first. */
1719
+ discard(reviewId: string): Promise<{
1720
+ deleted: boolean;
1721
+ }>;
1722
+ /** Each board's canvas leases by client: the board is open there, and
1723
+ * `blockId` is the block the person is in, if any. In memory: a lease
1724
+ * outlives neither its renewals nor the host. */
1725
+ private readonly leases;
1726
+ /** Whether a canvas still holds the board open. */
1727
+ private leased;
1728
+ /** Records the block a person's canvas has focus in (null for none), or
1729
+ * with `open: false` that the canvas closed the board. */
1730
+ focus(reviewId: string, input: unknown): {
1731
+ ok: true;
1732
+ };
1733
+ /** Refuses an agent's change to a board while a person holds any block
1734
+ * in it. */
1735
+ private assertUnheld;
1736
+ /** Refuses an agent's edit to a block a person is editing. */
1737
+ private assertUnleased;
1738
+ /** Saves a person's whole board as their own version, against the version
1739
+ * they started from. Blocks without ids get fresh ones. */
1740
+ personEdit(reviewId: string, input: unknown): Promise<PersonEditResult>;
1741
+ /** Where a board sits: its parent, and the parent's children in order,
1742
+ * each with what its header shows. */
1743
+ place(id: string): {
1744
+ children?: PlacedBoard[] | undefined;
1745
+ siblings: PlacedBoard[];
1746
+ parent?: PlacedBoard | undefined;
1747
+ board: PlacedBoard;
1748
+ };
1749
+ /** The siblings Home and the sidebar list, which a board's place counts
1750
+ * among: all but those in Trash, and the board itself. */
1751
+ private listedSiblings;
1752
+ /** A board's parent, its children in sibling order, and what it depends on. */
1753
+ relations(id: string): BoardRelations;
1754
+ /** Parents, children and dependencies. A board in Trash is out of them
1755
+ * until it is restored, its rows kept; only its own place sees it. */
1756
+ private relationGraph;
1757
+ /** Drops a board's parent, children and dependencies in other projects,
1758
+ * after it moved to `projectId`. Whether it dropped any. */
1759
+ private dropRelationsOutside;
1760
+ private orderChildren;
1761
+ private siblingFacts;
1762
+ /** Commits never change, so a definite answer is kept. */
1763
+ private readonly ancestry;
1764
+ /** When git was last asked, for questions with no answer yet. */
1765
+ private readonly ancestryAsked;
1766
+ /** Whether `ancestor` is an ancestor of `of`, as far as is known. git is
1767
+ * asked in the background, never on the server thread: until it answers,
1768
+ * or when it fails, the answer is no, and a yes re-sorts the catalog. */
1769
+ private isAncestor;
1770
+ private readonly ancestryQueue;
1771
+ private ancestryRunning;
1772
+ private askNextAncestry;
1773
+ private knowAncestry;
1774
+ private catalogChanged;
1775
+ private boardName;
1776
+ /** The other board exists and is in the same project. */
1777
+ private checkRelated;
1778
+ /** One parent, one level: a parent is top-level and a child has no
1779
+ * children. Null makes the board top-level. */
1780
+ private setParent;
1781
+ private setDependencies;
1782
+ /** New links must point at a board and block that exist. Saved links are
1783
+ * not rechecked, since their target may have been deleted. */
1784
+ private checkBoardLinks;
1785
+ private wasDeleted;
1786
+ /** The boards that link to a board or its blocks. */
1787
+ linkingBoards(id: string): string[];
1788
+ /** Rebuilds the board_links rows for one board. */
1789
+ private indexBoardLinks;
1790
+ /** Link previews by board, version and block; a version never changes. */
1791
+ private readonly linkPreviews;
1792
+ private linkPreview;
1793
+ /** What a link's hover card shows of the board or block it links to,
1794
+ * read when the card opens rather than with every link. Only for a link
1795
+ * the version has. */
1796
+ linkPeek(id: string, to: {
1797
+ board: string;
1798
+ block?: string;
1799
+ }, version?: number): BoardLinkPreview;
1800
+ /** "owner / repo" for a board in a GitHub repository, else its folder. */
1801
+ private repositoryLabel;
1802
+ /** A version's outgoing links and the board's current backlinks. Links to a
1803
+ * deleted board or block are marked missing. */
1804
+ links(id: string, version?: number): {
1805
+ outgoing: {
1806
+ title?: string | undefined;
1807
+ deletedAt?: string | undefined;
1808
+ missing: boolean;
1809
+ updatedAt?: string | undefined;
1810
+ pullRequestNumber?: number | undefined;
1811
+ pullRequestUrl?: string | undefined;
1812
+ repository?: string | undefined;
1813
+ icon?: BoardIconKind | undefined;
1814
+ from: BlockRef;
1815
+ to: BoardRef;
1816
+ }[];
1817
+ backlinks: {
1818
+ pullRequestNumber?: number | undefined;
1819
+ pullRequestUrl?: string | undefined;
1820
+ icon?: BoardIconKind | undefined;
1821
+ from: {
1822
+ board: string;
1823
+ block: string;
1824
+ };
1825
+ to: {
1826
+ board: string;
1827
+ block?: undefined;
1828
+ } | {
1829
+ board: string;
1830
+ block: string;
1831
+ };
1832
+ title: string;
1833
+ }[];
1834
+ };
1835
+ /** Boards edited by an Ask thread, most recent first. */
1836
+ boardsChangedBy(threadId: string): {
1837
+ reviewId: string;
1838
+ title: string;
1839
+ icon: BoardIconKind;
1840
+ blockId?: string;
1841
+ }[];
1842
+ /** The boards each thread changed, newest first, for many threads in one
1843
+ * query. */
1844
+ /** A board's title and icon, read without its document. */
1845
+ /** Where a board lives, as Recent names it: its checkout's folder, else
1846
+ * its project's name. */
1847
+ boardPlace(reviewId: string): string;
1848
+ boardFace(reviewId: string): {
1849
+ reviewId: string;
1850
+ title: string;
1851
+ icon: BoardIconKind;
1852
+ };
1853
+ boardsChangedByThreads(threadIds: readonly string[]): Map<string, {
1854
+ reviewId: string;
1855
+ title: string;
1856
+ icon: BoardIconKind;
1857
+ }[]>;
1504
1858
  /** Resolve a target-less PR create before it queues, when it will need it. */
1505
1859
  private startPullRequest;
1506
1860
  private startPullRequestTitle;
@@ -1516,6 +1870,10 @@ declare class ReviewStore {
1516
1870
  /** Viewing a review in Trash does not restore it. */
1517
1871
  trashedIds(): string[];
1518
1872
  has(reviewId: string): boolean;
1873
+ /** Saves each new commit link's commit in full, resolved in the board's
1874
+ * repository; one it does not have rejects the edit, as pins do. A link the
1875
+ * board already had stays as it was saved, even if its commit is gone. */
1876
+ private resolveCommitLinks;
1519
1877
  private validateExternal;
1520
1878
  }
1521
1879
  //#endregion
@@ -1571,6 +1929,8 @@ declare class ReviewWorkspaces {
1571
1929
  remove(reviewId: string): Promise<void>;
1572
1930
  private lease;
1573
1931
  private leasedElsewhere;
1932
+ /** The holder may release its lease after `claim` fails. */
1933
+ private ownedElsewhere;
1574
1934
  /** Takes the review's lease unless another live Desktop holds it. */
1575
1935
  private claim;
1576
1936
  private all;
@@ -1648,8 +2008,11 @@ declare class LocalReviewData {
1648
2008
  filePath?: string;
1649
2009
  rootPath: string;
1650
2010
  }>;
1651
- /** A document read that needs default pins; 409 when the document has none. */
2011
+ /** A document read that needs default pins: its own, or for a plan its
2012
+ * repository's live checkout with base at head; 409 when it has neither. */
1652
2013
  documentPins(snapshot: Snapshot): Promise<Pins>;
2014
+ /** A checkout's current state, base at head: what a plan reads. */
2015
+ private livePins;
1653
2016
  /** Pins a reference names itself, checked against the registered checkout. */
1654
2017
  anchorSourcePins(anchor: SourcePins): Promise<Pins>;
1655
2018
  /** References whose own repository is unregistered or gone from disk.
@@ -1667,6 +2030,8 @@ declare class LocalReviewData {
1667
2030
  subscribe?: typeof subscribe;
1668
2031
  /** gh, git and GitHub API access for pull request targets. */
1669
2032
  pullRequests?: PullRequestDeps;
2033
+ /** Read PR states from GitHub for the catalog. */
2034
+ pullRequestStates?: boolean;
1670
2035
  });
1671
2036
  structuralChanges({ reviewId, pins, signal, file }: {
1672
2037
  reviewId: string;
@@ -1705,10 +2070,33 @@ declare class LocalReviewData {
1705
2070
  }>;
1706
2071
  /** The fork point from `ref`, by default the repository's default branch. */
1707
2072
  private worktreeBase;
2073
+ /** Each PR's state, by URL, as last read. */
2074
+ private readonly pullRequestStates;
2075
+ private readonly pullRequestStateListeners;
2076
+ private pullRequestStateTimer;
2077
+ private readonly pullRequestStateQueue;
2078
+ private pullRequestStateReads;
2079
+ /** While GitHub rate-limits, no state is read. */
2080
+ private pullRequestStatesPausedUntil;
2081
+ /** Calls back when a PR's state changes. While anyone listens, every PR
2082
+ * still shown is read again once its state is a few minutes old. */
2083
+ subscribePullRequestStates(listener: () => void): () => void;
2084
+ /** A PR's state as last read from GitHub; a read older than a few minutes
2085
+ * queues another in the background. Undefined until the first read lands,
2086
+ * and a failed read keeps the last state. A merged or closed PR is not
2087
+ * read again. */
2088
+ pullRequestState(url: string | undefined, { seen }?: {
2089
+ seen?: boolean;
2090
+ }): PullRequestState | undefined;
2091
+ /** Reads queued PR states a few at a time. */
2092
+ private readPullRequestStates;
2093
+ /** The branch a PR merges into, as last read with its state. */
2094
+ pullRequestBaseBranch(url: string): string | undefined;
2095
+ /** A PR's own branch, as last read with its state. */
2096
+ pullRequestHeadBranch(url: string): string | undefined;
1708
2097
  /** The PR's current comparison, fetched into a registered checkout of its repository. */
1709
2098
  resolvePullRequest(url: string, repository: {
1710
- id?: string;
1711
- preferred?: string;
2099
+ id: string;
1712
2100
  }): Promise<ResolvedPullRequest>;
1713
2101
  pullRequestTitle(url: string): Promise<string | undefined>;
1714
2102
  /** A registered checkout with a remote for host/owner/repo, and that remote. */
@@ -1720,6 +2108,22 @@ declare class LocalReviewData {
1720
2108
  base: Set<string>;
1721
2109
  head: Set<string>;
1722
2110
  } | undefined>;
2111
+ /** What a commit is, for a quote read at it: its subject, author and
2112
+ * date, and how far behind the default branch's tip it is when both are
2113
+ * known. */
2114
+ commitInfo(repositoryId: string, commit: string): Promise<{
2115
+ commit: string;
2116
+ subject: string;
2117
+ author: string;
2118
+ authoredAt: string;
2119
+ behind?: {
2120
+ count: number;
2121
+ branch: string;
2122
+ };
2123
+ }>;
2124
+ /** The full commit a commit ID or its prefix names in the repository,
2125
+ * or undefined when it names none. */
2126
+ resolveCommit(repositoryId: string, commit: string): Promise<string | undefined>;
1723
2127
  validatePins(pins: Pins): Promise<void>;
1724
2128
  file(pins: Pins, side: "base" | "head", file: string, allowBinary?: boolean): Promise<{
1725
2129
  file: string;
@@ -1826,11 +2230,16 @@ declare class ShareClient {
1826
2230
  }
1827
2231
  //#endregion
1828
2232
  //#region src/sharing/repository.d.ts
1829
- /** Recipients need complete history; publication only checks that the commits exist. */
1830
- declare function fetchPinnedRepository(root: string, url: string, pins: Pick<Pins, "base" | "head">, publishing?: boolean): Promise<void>;
1831
- declare function verifyShareRepository(root: string, pins: Pins, repository?: {
2233
+ /** Recipients need complete history; publication only checks that the commits exist.
2234
+ * `commits` are other commits the board's references read at; a plan has
2235
+ * only those. */
2236
+ declare function fetchPinnedRepository(root: string, url: string, pins: Pick<Pins, "base" | "head"> | undefined, publishing?: boolean, commits?: readonly string[]): Promise<void>;
2237
+ /** A managed clone of a repository's default branch, for a shared board
2238
+ * with no pins whose repository the receiver has no checkout of. */
2239
+ declare function cloneSharedRepository(root: string, url: string): Promise<void>;
2240
+ declare function verifyShareRepository(root: string, pins: Pins | undefined, repository?: {
1832
2241
  cloneUrl: string;
1833
- }): Promise<{
2242
+ }, commits?: readonly string[]): Promise<{
1834
2243
  cloneUrl: string;
1835
2244
  }>;
1836
2245
  //#endregion
@@ -1910,6 +2319,7 @@ declare function sharedReviewId(origin: string, shareId: string): string;
1910
2319
  declare class SharedReviewStore {
1911
2320
  readonly root: string;
1912
2321
  private readonly fetchRepository;
2322
+ private readonly cloneRepository;
1913
2323
  private readonly loaded;
1914
2324
  private readonly validated;
1915
2325
  private readonly attention;
@@ -1924,7 +2334,7 @@ declare class SharedReviewStore {
1924
2334
  private readonly repositories;
1925
2335
  private readonly jobs;
1926
2336
  private readonly states;
1927
- constructor(root: string, fetchRepository?: typeof fetchPinnedRepository);
2337
+ constructor(root: string, fetchRepository?: typeof fetchPinnedRepository, cloneRepository?: typeof cloneSharedRepository);
1928
2338
  private purgeExpired;
1929
2339
  connect(store: ReviewStore, data: LocalReviewData): void;
1930
2340
  has(id: string): boolean;
@@ -1936,6 +2346,12 @@ declare class SharedReviewStore {
1936
2346
  repositoryRoot(id: string): string;
1937
2347
  prepare(id: string): Promise<void>;
1938
2348
  private prepareRepository;
2349
+ /** Reads each of a shared board's references at its own commits, in the
2350
+ * checkout of its repository. */
2351
+ private validateReferences;
2352
+ /** Files an unpinned board under a local checkout of its repository,
2353
+ * else a managed clone. */
2354
+ private prepareUnpinned;
1939
2355
  assertReady(id: string): Promise<void>;
1940
2356
  subscribe(listener: () => void): () => void;
1941
2357
  load(): Promise<void>;