@dev.fast/whiteboard 0.3.4 → 0.3.5-preview.20261021.131

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 (120) hide show
  1. package/dist/{account-alias-CprZojXd.js → account-alias-CisiYUZT.js} +13 -8
  2. package/dist/agent-cli-BglNRDZN.js +2 -0
  3. package/dist/{agent-cli-CThN7Q59.js → agent-cli-TJ7_5_B3.js} +15 -10
  4. package/dist/{agent-client-BOOi7EUR.js → agent-client-H53ajvrm.js} +13 -3
  5. package/dist/{authoring-tools-BNwuMnz6.js → authoring-tools-BCquUsB3.js} +34 -27
  6. package/dist/{background-server-DLSDogkI.js → background-server-BSYXD9au.js} +1 -1
  7. package/dist/{background-server-CkvxA-6O.js → background-server-Xom8cA_u.js} +5 -5
  8. package/dist/build-info.json +1 -1
  9. package/dist/{cli-R4yfa5DT.js → cli-BOnV4cCh.js} +1 -1
  10. package/dist/{cli-runner-Cuc9FSzu.js → cli-runner-cRY5NOno.js} +70 -34
  11. package/dist/cli.js +4 -3
  12. package/dist/{client-BN_FDxFr.js → client-UH1bEG7Z.js} +260 -49
  13. package/dist/{fuzzy-match-BO9bK37N.js → fuzzy-match-D_x3wumC.js} +6 -4
  14. package/dist/{headless-host-CVBOQyRS.js → headless-host-BEe-aFtB.js} +1 -1
  15. package/dist/{headless-host-Cog6SpS9.js → headless-host-CEb5d-A0.js} +563 -175
  16. package/dist/lens-selection-BxPk53c8.js +214 -0
  17. package/dist/{local-data-D_9tvdsp.js → local-data-mbCb1HDH.js} +2448 -347
  18. package/dist/{mcp-D1hziANa.js → mcp-cBtzXsmN.js} +9 -12
  19. package/dist/{package-paths-C--__jEv.js → package-paths-BkeQsdaw.js} +1 -1
  20. package/dist/profile-Dbyidrcr.js +2 -0
  21. package/dist/{profile-DokFw782.js → profile-duqp5uPa.js} +20 -8
  22. package/dist/{remote-attach-CEJ-kvDY.js → remote-attach-BeKuMm_x.js} +4 -4
  23. package/dist/{remote-extensions-GN8Gf_qG.js → remote-extensions-CX2fAec1.js} +1 -1
  24. package/dist/{remote-extensions-Blcjr9Ze.js → remote-extensions-CYWNTVSf.js} +3 -3
  25. package/dist/{remote-language-server-BTKBQ7x4.js → remote-language-server-DLWluAeR.js} +5 -5
  26. package/dist/{remote-uninstall-DW7Gdryh.js → remote-uninstall-Y3S0YmJs.js} +6 -6
  27. package/dist/{request-origin-Zcn_CjX4.js → request-origin-icXPv6jh.js} +55 -18
  28. package/dist/{review-app-launcher-CkwLclzR.js → review-app-launcher-DZvG5ZAh.js} +2 -2
  29. package/dist/{review-home-paths-j2BRAaNv.js → review-home-paths-BwH08ihj.js} +19 -17
  30. package/dist/{review-telemetry-BLNwYnLV.js → review-telemetry-AZ0imsmJ.js} +6 -6
  31. package/dist/runtime-CF4JXdb8.js +27 -0
  32. package/dist/runtime.d.ts +1 -1
  33. package/dist/runtime.js +1 -1
  34. package/dist/{s3-DtJFWC0G.js → s3-CsG2EWED.js} +1 -1
  35. package/dist/{s3-config-BTO12tCC.js → s3-config-CjcLyFV5.js} +4 -2
  36. package/dist/{s3-config-CSy3fx8H.js → s3-config-zz4GWh2T.js} +1 -1
  37. package/dist/server/desktop-host.js +28 -104
  38. package/dist/{server-discovery-Bey8IqXH.js → server-discovery-DeVTdcqK.js} +3 -3
  39. package/dist/sharing/index.d.ts +484 -74
  40. package/dist/sharing/index.js +1 -1
  41. package/dist/{src-DsM3jO8G.js → src-DYZLCUP_.js} +98 -18
  42. package/dist/{src-BMPuxWv4.js → src-DtfSndqS.js} +269 -227
  43. package/dist/{stored-document-migration-CChxtFAy.js → stored-document-migration-B29lve9-.js} +318 -271
  44. package/dist/{thread-state-5pYr6_zM.js → thread-state-BPpvKFwQ.js} +12 -2
  45. package/dist/{tool-failure-C9MpbXJJ.js → tool-failure-CQhyLht3.js} +10 -3
  46. package/instructions/authoring.md +20 -5
  47. package/package.json +4 -4
  48. package/src/agent-selection.ts +6 -0
  49. package/src/ask/agents.ts +13 -1
  50. package/src/ask/checkout-files.ts +2 -5
  51. package/src/ask/thread-state.ts +4 -0
  52. package/src/ask/thread.ts +61 -31
  53. package/src/ask/threads.ts +24 -3
  54. package/src/cli-install.ts +13 -2
  55. package/src/cli-runner.ts +4 -1
  56. package/src/cli.ts +4 -1
  57. package/src/diff-selection-migration.ts +48 -34
  58. package/src/heading-anchors.ts +42 -0
  59. package/src/lens-selection.ts +38 -2
  60. package/src/markdown.ts +42 -0
  61. package/src/posthog-capture-client.ts +1 -1
  62. package/src/review-api/README.md +52 -13
  63. package/src/review-api/activity.ts +1 -4
  64. package/src/review-api/agent-cli.ts +9 -1
  65. package/src/review-api/anchor-quotes.ts +14 -7
  66. package/src/review-api/ask-history.ts +118 -51
  67. package/src/review-api/authoring-tools.ts +45 -30
  68. package/src/review-api/azure-devops-provider.ts +2 -20
  69. package/src/review-api/azure-remote.ts +21 -0
  70. package/src/review-api/blocks/definition.ts +1 -1
  71. package/src/review-api/blocks/markdown.ts +2 -2
  72. package/src/review-api/board-order.ts +144 -0
  73. package/src/review-api/checkout-groups.ts +586 -0
  74. package/src/review-api/document-headings.ts +58 -27
  75. package/src/review-api/document-text.ts +31 -2
  76. package/src/review-api/document.ts +362 -67
  77. package/src/review-api/foreign-references.ts +328 -0
  78. package/src/review-api/github-provider.ts +51 -13
  79. package/src/review-api/http.ts +734 -135
  80. package/src/review-api/instructions.ts +0 -19
  81. package/src/review-api/link-preview.ts +113 -0
  82. package/src/review-api/local-data.ts +310 -46
  83. package/src/review-api/mcp.ts +7 -13
  84. package/src/review-api/onboarding.ts +1 -1
  85. package/src/review-api/profile.ts +37 -6
  86. package/src/review-api/public-tools.ts +24 -2
  87. package/src/review-api/pull-request.ts +82 -49
  88. package/src/review-api/request-origin.ts +10 -0
  89. package/src/review-api/review-progress.ts +61 -27
  90. package/src/review-api/scratchpad-plan-upgrade.ts +250 -0
  91. package/src/review-api/store-migrations.ts +355 -0
  92. package/src/review-api/store-schema.ts +38 -29
  93. package/src/review-api/store.ts +2176 -495
  94. package/src/review-api/worktree-events.ts +3 -5
  95. package/src/review-api/worktree-source.ts +3 -7
  96. package/src/review-api/worktree-structural.integration.ts +72 -0
  97. package/src/review-stack.ts +15 -23
  98. package/src/runtime.ts +4 -30
  99. package/src/server/desktop-host.ts +6 -1
  100. package/src/server/desktop-server.ts +1 -36
  101. package/src/server/headless-host.ts +0 -2
  102. package/src/server/hono-http.ts +2 -1
  103. package/src/server/review-gateway-list.ts +3 -5
  104. package/src/server/review-gateway-memory.ts +1 -1
  105. package/src/server/review-lifecycle-telemetry.ts +2 -2
  106. package/src/server/review-server-core.ts +1 -5
  107. package/src/server/structural-comparisons.ts +47 -0
  108. package/src/sharing/export.ts +36 -7
  109. package/src/sharing/host.ts +34 -14
  110. package/src/sharing/import.ts +156 -24
  111. package/src/sharing/repository.ts +143 -24
  112. package/src/startup-trace.ts +3 -3
  113. package/src/stored-document-migration.ts +110 -19
  114. package/src/ui-telemetry-events.ts +44 -18
  115. package/dist/agent-cli-C6SPSII0.js +0 -2
  116. package/dist/profile-CYPmvBoA.js +0 -2
  117. package/dist/runtime-CKiWhGrf.js +0 -52
  118. package/instructions/scratchpad.md +0 -23
  119. package/src/review-preferences.ts +0 -88
  120. package/src/server/legacy-tutorial-cleanup.ts +0 -38
@@ -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,59 @@ 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
+ /** Forgets the threads that started on a board gone for good. */
1271
1338
  removeReview(reviewId: string): void;
1272
1339
  delete(id: string): void;
1273
1340
  }
1274
1341
  //#endregion
1342
+ //#region src/review-api/link-preview.d.ts
1343
+ /** What a board link's hover card shows of the board or block it links to. */
1344
+ interface BoardLinkPreview {
1345
+ /** A block link: the title of the section the block is in. */
1346
+ section?: string;
1347
+ /** Markdown paragraphs, opening the board or block. */
1348
+ prose?: string[];
1349
+ /** A block link to code: its language and first lines. */
1350
+ code?: {
1351
+ language: string;
1352
+ lines: string[];
1353
+ };
1354
+ /** A block link to a diagram or other figure: its kind and title. */
1355
+ figure?: {
1356
+ type: string;
1357
+ title: string;
1358
+ };
1359
+ }
1360
+ //#endregion
1275
1361
  //#region src/review-api/store.d.ts
1362
+ /** What a person's save wrote: the version, and the id each new block got
1363
+ * by its clientKey. */
1364
+ interface PersonEditResult {
1365
+ reviewId: string;
1366
+ version: number;
1367
+ ids: Record<string, string>;
1368
+ }
1369
+ /** One row of a board's history. */
1370
+ interface HistoryEntry {
1371
+ version: number;
1372
+ title: string;
1373
+ createdAt: string;
1374
+ /** "you" for a version a person saved from the canvas; absent for one
1375
+ * saved before Whiteboard recorded who wrote it. */
1376
+ author?: "you" | "agent";
1377
+ /** The Ask thread whose edit made this version, if any. */
1378
+ threadId?: string;
1379
+ }
1276
1380
  /** Source identity displayed in the review header and Home, alongside immutable pins. */
1277
1381
  interface SnapshotOrigin {
1278
1382
  branch?: string;
@@ -1297,8 +1401,6 @@ interface Snapshot {
1297
1401
  reviewId: string;
1298
1402
  version: number;
1299
1403
  title: string;
1300
- /** Absent for a review. The scratchpad has no pins, target or lifecycle. */
1301
- kind?: "scratchpad";
1302
1404
  /** The default pins for references that name none. A document whose
1303
1405
  * references all carry their own pins has neither pins nor target. */
1304
1406
  pins?: Pins;
@@ -1314,7 +1416,28 @@ interface Snapshot {
1314
1416
  /** The edit that produced this version, when one did; absent for a
1315
1417
  * rename, set_target, restore or import, which the canvas does not draw. */
1316
1418
  lastEdit?: EditSummary;
1419
+ /** The Ask thread that caused this version when it made no edit to
1420
+ * name it on: a create, rename, retarget or restore. */
1421
+ threadId?: string;
1422
+ /** A person saved this version from the canvas: the blocks they added,
1423
+ * removed or changed. Absent on every other version. */
1424
+ personEdit?: {
1425
+ changed: string[];
1426
+ ids?: Record<string, string>;
1427
+ };
1317
1428
  }
1429
+ /** Who is writing: the rules a write keeps depend on it. */
1430
+ type Author =
1431
+ /** An agent, through the API; a thread's agent stamps its versions
1432
+ * with the thread. */
1433
+ {
1434
+ kind: "agent";
1435
+ threadId?: string;
1436
+ } |
1437
+ /** A person, from Desktop or the canvas. */
1438
+ {
1439
+ kind: "person";
1440
+ };
1318
1441
  interface Result {
1319
1442
  /** Create only: false when an existing review for the same PR came back. */
1320
1443
  created?: boolean;
@@ -1338,8 +1461,32 @@ interface Result {
1338
1461
  attention?: true;
1339
1462
  lifecycle?: true;
1340
1463
  deleted?: true;
1464
+ /** After set_parent or set_dependencies: the board's relations. */
1465
+ relations?: BoardRelations;
1341
1466
  warnings?: string[];
1342
1467
  }
1468
+ interface StoreChange extends Result {
1469
+ titleChanged?: true;
1470
+ /** Project, repository or kind (icon) changed. */
1471
+ placeChanged?: true;
1472
+ threadId?: string;
1473
+ /** Saved by another process; changes unknown. */
1474
+ external?: true;
1475
+ }
1476
+ /** A board as its place in a project shows it. */
1477
+ interface PlacedBoard {
1478
+ reviewId: string;
1479
+ title: string;
1480
+ target?: ReviewTarget;
1481
+ origin?: SnapshotOrigin;
1482
+ }
1483
+ /** Where a board sits among its project's boards. Kept outside its versions. */
1484
+ interface BoardRelations {
1485
+ parentId: string | null;
1486
+ /** In sibling order. */
1487
+ children: string[];
1488
+ dependsOn: string[];
1489
+ }
1343
1490
  /** A PR's current comparison: GitHub's head and diff base, fetched locally. */
1344
1491
  interface ResolvedPullRequest {
1345
1492
  target: ReviewTarget;
@@ -1352,11 +1499,9 @@ interface ResolvedPullRequest {
1352
1499
  interface ReviewProviders {
1353
1500
  headBranch?(pins: Pins, headRef?: string): Promise<string | undefined>;
1354
1501
  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. */
1502
+ /** Fetch a PR into the registered checkout the caller names. */
1357
1503
  resolvePullRequest?(url: string, repository: {
1358
- id?: string;
1359
- preferred?: string;
1504
+ id: string;
1360
1505
  }): Promise<ResolvedPullRequest>;
1361
1506
  /** Undefined when the forge can't be read. */
1362
1507
  pullRequestTitle?(url: string): Promise<string | undefined>;
@@ -1370,6 +1515,8 @@ interface ReviewProviders {
1370
1515
  /** Ids of references whose own pins no longer name a usable checkout. */
1371
1516
  unavailableAnchors?(snapshot: Snapshot): Promise<string[]>;
1372
1517
  validatePins(pins: Pins): Promise<void>;
1518
+ /** The full commit a commit ID or its prefix names, if any. */
1519
+ resolveCommit?(repositoryId: string, commit: string): Promise<string | undefined>;
1373
1520
  /** The files each side's commit changed from one set of pins to another,
1374
1521
  * or undefined when they can't be diffed commit to commit. */
1375
1522
  filesChangedBetween?(from: Pins, to: Pins): Promise<{
@@ -1380,6 +1527,8 @@ interface ReviewProviders {
1380
1527
  peek: boolean;
1381
1528
  }): Promise<void>;
1382
1529
  validateResource(pins: Pins | undefined, block: Block): Promise<void>;
1530
+ /** A PR's base branch, as last read from GitHub; undefined until read. */
1531
+ pullRequestBaseBranch?(url: string): string | undefined;
1383
1532
  }
1384
1533
  /** One instance owned by the desktop server. All writers go through execute().
1385
1534
  * The queue includes async validation; SQLite transactions contain only writes.
@@ -1387,6 +1536,8 @@ interface ReviewProviders {
1387
1536
  */
1388
1537
  declare class ReviewStore {
1389
1538
  private readonly providers;
1539
+ /** How the checkouts group, if `groupCheckoutsAhead` worked it out. */
1540
+ private readonly checkoutOwners?;
1390
1541
  readonly activity: ReviewActivity;
1391
1542
  readonly askHistory: AskHistory;
1392
1543
  private readonly db;
@@ -1416,10 +1567,26 @@ declare class ReviewStore {
1416
1567
  private observedVersions;
1417
1568
  private observedDeletions;
1418
1569
  subscribeCatalog(listener: () => void): () => void;
1419
- /** For a host whose listing changed without the store: a preference flip. */
1420
- invalidateCatalog(): void;
1421
- subscribe(listener: (result: Result) => void): () => void;
1422
- constructor(databasePath: string, providers: ReviewProviders);
1570
+ subscribe(listener: (change: StoreChange) => void): () => void;
1571
+ constructor(databasePath: string, providers: ReviewProviders,
1572
+ /** How the checkouts group, if `groupCheckoutsAhead` worked it out. */
1573
+ checkoutOwners?: ReadonlyMap<string, string> | undefined);
1574
+ /** Saves a version over what it was; the current one re-indexes its
1575
+ * board's links, as every written version does. */
1576
+ private rewriteVersion;
1577
+ /** The project of a registered checkout, made on first use. Checkouts of
1578
+ * one repository (worktrees, or clones with one origin) share it. */
1579
+ projectOfRepository(repositoryId: string): string;
1580
+ private fallbackProject;
1581
+ /** A checkout's project, as the catalog lists it; undefined once the
1582
+ * checkout is unregistered. */
1583
+ checkoutProject(repositoryId: string): ReviewApiSummary["project"] | undefined;
1584
+ /** Undefined when the file can't be read. */
1585
+ private fileAtCommit;
1586
+ /** A checkout's name as its project labels it, else its folder. */
1587
+ private repositoryName;
1588
+ /** A board's project. */
1589
+ projectOf(id: string): string;
1423
1590
  private dataVersion;
1424
1591
  private currentVersions;
1425
1592
  private currentDeletions;
@@ -1434,13 +1601,19 @@ declare class ReviewStore {
1434
1601
  fingerprint: string;
1435
1602
  scope: Coverage;
1436
1603
  }[], viewed: boolean): void;
1437
- private readonly repositoryGroups;
1604
+ private checkoutGroups;
1605
+ /** How the store's checkouts group into projects, kept for the open. */
1606
+ private get checkouts();
1438
1607
  private repositoryGroup;
1439
1608
  registerRepository(root: string): {
1440
1609
  id: string;
1441
1610
  name: string;
1442
1611
  };
1443
- unregisterRepository(id: string): void;
1612
+ /** Forgets a checkout no board uses, after every write queued before it,
1613
+ * so a board being made with it keeps it. */
1614
+ unregisterRepository(id: string): Promise<void>;
1615
+ /** Checkouts whose remote is cloneUrl, most recently used first. */
1616
+ checkoutsOf(cloneUrl: string): string[];
1444
1617
  /** Registered checkouts, oldest registration first. */
1445
1618
  repositories(): {
1446
1619
  id: string;
@@ -1465,32 +1638,29 @@ declare class ReviewStore {
1465
1638
  resetServerId(): string;
1466
1639
  /** The 404 check alone, without loading a snapshot. */
1467
1640
  assertExists(id: string): void;
1641
+ /** A board that exists and isn't in Trash: the one rule every write
1642
+ * about a board keeps. */
1468
1643
  assertWritable(id: string): void;
1644
+ /** Refuses a board in Trash, which is read-only until it is restored. */
1645
+ assertOutOfTrash(id: string): void;
1469
1646
  private trashTime;
1647
+ /** Removes a board for good, from Delete… or Trash's purge. Links into
1648
+ * it stay, and show it as deleted. */
1470
1649
  private removePermanently;
1650
+ /** Deletes the boards 30 days in Trash, each as Delete… would. */
1471
1651
  private purgeExpired;
1472
1652
  read(id: string, version?: number): Snapshot;
1473
1653
  setDiffStats(pins: Pins, stats: NonNullable<ReviewApiSummary["diffStats"]>): void;
1474
- /** Reviews of the tutorial earlier versions shipped, for their removal. */
1475
- legacyTutorialIds(): string[];
1476
1654
  list(): ReviewApiSummary[];
1655
+ listProject(projectId: string): 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,190 @@ 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
+ /** A create's named project, else its repository's; an edit keeps its
1690
+ * project unless it moves repository. */
1691
+ private projectFor;
1692
+ private currentVersion;
1693
+ /** Runs one write after every write queued before it. */
1694
+ private enqueue;
1695
+ /** Respells a document's links and resolves its commit links, as every
1696
+ * save does. A changed reference is no longer stale. */
1697
+ private normalizeDocument;
1698
+ /** Checks a candidate version and numbers it. A worktree board's version
1699
+ * may come back with its live source projected. */
1700
+ private prepareVersion;
1701
+ /** Writes a version; call inside commitCommand. */
1702
+ private saveVersion;
1703
+ /** Deletes a board and its history, if it is still at the version read
1704
+ * and passes `guard`: Delete… from Trash, Trash's purge and a discarded
1705
+ * empty board all end here. An agent can't delete a board while a person
1706
+ * holds a block in it. */
1707
+ private deleteBoard;
1708
+ /** Writes what a board is outside its versions: its parent or what it
1709
+ * depends on, Trash or back, or that it was viewed. No version is saved,
1710
+ * but the rules are a version's: a board in Trash takes nothing but a
1711
+ * restore, and an agent can't put a board a person is in to Trash. */
1712
+ private commitBoardFacts;
1713
+ /** Deletes a board the person made and left as it was: with no title
1714
+ * (it reads "Untitled"), no blocks and no child boards. A title typed as
1715
+ * "Untitled" is a title. A board still open on a canvas, or
1716
+ * one an agent is working on, is kept. A closing canvas saves, then lets
1717
+ * go of the board, so the discard waits for that first. */
1718
+ discard(reviewId: string): Promise<{
1719
+ deleted: boolean;
1720
+ }>;
1721
+ /** Each board's canvas leases by client: the board is open there, and
1722
+ * `blockId` is the block the person is in, if any. In memory: a lease
1723
+ * outlives neither its renewals nor the host. */
1724
+ private readonly leases;
1725
+ /** Whether a canvas still holds the board open. */
1726
+ private leased;
1727
+ /** Records the block a person's canvas has focus in (null for none), or
1728
+ * with `open: false` that the canvas closed the board. */
1729
+ focus(reviewId: string, input: unknown): {
1730
+ ok: true;
1731
+ };
1732
+ /** Refuses an agent's change to a board while a person holds any block
1733
+ * in it. */
1734
+ private assertUnheld;
1735
+ /** Refuses an agent's edit to a block a person is editing. */
1736
+ private assertUnleased;
1737
+ /** Saves a person's whole board as their own version, against the version
1738
+ * they started from. Blocks without ids get fresh ones. */
1739
+ personEdit(reviewId: string, input: unknown): Promise<PersonEditResult>;
1740
+ /** Where a board sits: its parent, and the parent's children in order,
1741
+ * each with what its header shows. */
1742
+ place(id: string): {
1743
+ children?: PlacedBoard[] | undefined;
1744
+ siblings: PlacedBoard[];
1745
+ parent?: PlacedBoard | undefined;
1746
+ board: PlacedBoard;
1747
+ };
1748
+ /** The siblings Home and the sidebar list, which a board's place counts
1749
+ * among: all but those in Trash, and the board itself. */
1750
+ private listedSiblings;
1751
+ /** A board's parent, its children in sibling order, and what it depends on. */
1752
+ relations(id: string): BoardRelations;
1753
+ /** Parents, children and dependencies. A board in Trash is out of them
1754
+ * until it is restored, its rows kept; only its own place sees it. */
1755
+ private relationGraph;
1756
+ /** Drops a board's parent, children and dependencies in other projects,
1757
+ * after it moved to `projectId`. Whether it dropped any. */
1758
+ private dropRelationsOutside;
1759
+ private orderChildren;
1760
+ private siblingFacts;
1761
+ /** Commits never change, so a definite answer is kept. */
1762
+ private readonly ancestry;
1763
+ /** When git was last asked, for questions with no answer yet. */
1764
+ private readonly ancestryAsked;
1765
+ /** Whether `ancestor` is an ancestor of `of`, as far as is known. git is
1766
+ * asked in the background, never on the server thread: until it answers,
1767
+ * or when it fails, the answer is no, and a yes re-sorts the catalog. */
1768
+ private isAncestor;
1769
+ private readonly ancestryQueue;
1770
+ private ancestryRunning;
1771
+ private askNextAncestry;
1772
+ private knowAncestry;
1773
+ private catalogChanged;
1774
+ private boardName;
1775
+ /** Exists, out of Trash, same project. */
1776
+ private checkRelated;
1777
+ /** One parent, one level: a parent is top-level and a child has no
1778
+ * children, Trash included. Null makes the board top-level. */
1779
+ private setParent;
1780
+ private setDependencies;
1781
+ /** New links must point at a board and block that exist. Saved links are
1782
+ * not rechecked, since their target may have been deleted. */
1783
+ private checkBoardLinks;
1784
+ private wasDeleted;
1785
+ /** The boards that link to a board or its blocks. */
1786
+ linkingBoards(id: string): string[];
1787
+ /** Rebuilds the board_links rows for one board. */
1788
+ private indexBoardLinks;
1789
+ /** Link previews by board, version and block; a version never changes. */
1790
+ private readonly linkPreviews;
1791
+ private linkPreview;
1792
+ /** What a link's hover card shows of the board or block it links to,
1793
+ * read when the card opens rather than with every link. Only for a link
1794
+ * the version has. */
1795
+ linkPeek(id: string, to: {
1796
+ board: string;
1797
+ block?: string;
1798
+ }, version?: number): BoardLinkPreview;
1799
+ /** "owner / repo" for a board whose origin names one, else its folder. */
1800
+ private repositoryLabel;
1801
+ /** A version's outgoing links and the board's current backlinks. Links to a
1802
+ * deleted board or block are marked missing. */
1803
+ links(id: string, version?: number): {
1804
+ outgoing: {
1805
+ title?: string | undefined;
1806
+ deletedAt?: string | undefined;
1807
+ missing: boolean;
1808
+ updatedAt?: string | undefined;
1809
+ pullRequestNumber?: number | undefined;
1810
+ pullRequestUrl?: string | undefined;
1811
+ repository?: string | undefined;
1812
+ icon?: BoardIconKind | undefined;
1813
+ from: BlockRef;
1814
+ to: BoardRef;
1815
+ }[];
1816
+ backlinks: {
1817
+ pullRequestNumber?: number | undefined;
1818
+ pullRequestUrl?: string | undefined;
1819
+ icon?: BoardIconKind | undefined;
1820
+ from: {
1821
+ board: string;
1822
+ block: string;
1823
+ };
1824
+ to: {
1825
+ board: string;
1826
+ block?: undefined;
1827
+ } | {
1828
+ board: string;
1829
+ block: string;
1830
+ };
1831
+ title: string;
1832
+ }[];
1833
+ };
1834
+ /** Boards edited by an Ask thread, most recent first. */
1835
+ boardsChangedBy(threadId: string): {
1836
+ reviewId: string;
1837
+ title: string;
1838
+ icon: BoardIconKind;
1839
+ blockId?: string;
1840
+ }[];
1841
+ /** The boards each thread changed, newest first, for many threads in one
1842
+ * query. */
1843
+ /** A board's title and icon, read without its document. */
1844
+ /** Where a board lives, as Recent names it: its checkout's folder, else
1845
+ * its project's name. */
1846
+ boardPlace(reviewId: string): string;
1847
+ boardFace(reviewId: string): {
1848
+ reviewId: string;
1849
+ title: string;
1850
+ icon: BoardIconKind;
1851
+ };
1852
+ boardsChangedByThreads(threadIds: readonly string[]): Map<string, {
1853
+ reviewId: string;
1854
+ title: string;
1855
+ icon: BoardIconKind;
1856
+ }[]>;
1504
1857
  /** Resolve a target-less PR create before it queues, when it will need it. */
1505
1858
  private startPullRequest;
1506
1859
  private startPullRequestTitle;
@@ -1516,6 +1869,10 @@ declare class ReviewStore {
1516
1869
  /** Viewing a review in Trash does not restore it. */
1517
1870
  trashedIds(): string[];
1518
1871
  has(reviewId: string): boolean;
1872
+ /** Saves each new commit link's commit in full, resolved in the board's
1873
+ * repository; one it does not have rejects the edit, as pins do. A link the
1874
+ * board already had stays as it was saved, even if its commit is gone. */
1875
+ private resolveCommitLinks;
1519
1876
  private validateExternal;
1520
1877
  }
1521
1878
  //#endregion
@@ -1650,8 +2007,11 @@ declare class LocalReviewData {
1650
2007
  filePath?: string;
1651
2008
  rootPath: string;
1652
2009
  }>;
1653
- /** A document read that needs default pins; 409 when the document has none. */
2010
+ /** A document read that needs default pins: its own, or for a plan its
2011
+ * repository's live checkout with base at head; 409 when it has neither. */
1654
2012
  documentPins(snapshot: Snapshot): Promise<Pins>;
2013
+ /** A checkout's current state, base at head: what a plan reads. */
2014
+ private livePins;
1655
2015
  /** Pins a reference names itself, checked against the registered checkout. */
1656
2016
  anchorSourcePins(anchor: SourcePins): Promise<Pins>;
1657
2017
  /** References whose own repository is unregistered or gone from disk.
@@ -1669,6 +2029,8 @@ declare class LocalReviewData {
1669
2029
  subscribe?: typeof subscribe;
1670
2030
  /** gh, git and GitHub API access for pull request targets. */
1671
2031
  pullRequests?: PullRequestDeps;
2032
+ /** Read PR states from GitHub for the catalog. */
2033
+ pullRequestStates?: boolean;
1672
2034
  });
1673
2035
  structuralChanges({ reviewId, pins, signal, file }: {
1674
2036
  reviewId: string;
@@ -1707,10 +2069,33 @@ declare class LocalReviewData {
1707
2069
  }>;
1708
2070
  /** The fork point from `ref`, by default the repository's default branch. */
1709
2071
  private worktreeBase;
2072
+ /** Each PR's state, by URL, as last read. */
2073
+ private readonly pullRequestStates;
2074
+ private readonly pullRequestStateListeners;
2075
+ private pullRequestStateTimer;
2076
+ private readonly pullRequestStateQueue;
2077
+ private pullRequestStateReads;
2078
+ /** While GitHub rate-limits, no state is read. */
2079
+ private pullRequestStatesPausedUntil;
2080
+ /** Calls back when a PR's state changes. While anyone listens, every PR
2081
+ * still shown is read again once its state is a few minutes old. */
2082
+ subscribePullRequestStates(listener: () => void): () => void;
2083
+ /** A PR's state as last read from GitHub; a read older than a few minutes
2084
+ * queues another in the background. Undefined until the first read lands,
2085
+ * and a failed read keeps the last state. A merged or closed PR is not
2086
+ * read again. */
2087
+ pullRequestState(url: string | undefined, { seen }?: {
2088
+ seen?: boolean;
2089
+ }): PullRequestState | undefined;
2090
+ /** Reads queued PR states a few at a time. */
2091
+ private readPullRequestStates;
2092
+ /** The branch a PR merges into, as last read with its state. */
2093
+ pullRequestBaseBranch(url: string): string | undefined;
2094
+ /** A PR's own branch, as last read with its state. */
2095
+ pullRequestHeadBranch(url: string): string | undefined;
1710
2096
  /** The PR's current comparison, fetched into a registered checkout of its repository. */
1711
2097
  resolvePullRequest(url: string, repository: {
1712
- id?: string;
1713
- preferred?: string;
2098
+ id: string;
1714
2099
  }): Promise<ResolvedPullRequest>;
1715
2100
  pullRequestTitle(url: string): Promise<string | undefined>;
1716
2101
  /** A registered checkout with a remote for host/owner/repo, and that remote. */
@@ -1722,6 +2107,22 @@ declare class LocalReviewData {
1722
2107
  base: Set<string>;
1723
2108
  head: Set<string>;
1724
2109
  } | undefined>;
2110
+ /** What a commit is, for a quote read at it: its subject, author and
2111
+ * date, and how far behind the default branch's tip it is when both are
2112
+ * known. */
2113
+ commitInfo(repositoryId: string, commit: string): Promise<{
2114
+ commit: string;
2115
+ subject: string;
2116
+ author: string;
2117
+ authoredAt: string;
2118
+ behind?: {
2119
+ count: number;
2120
+ branch: string;
2121
+ };
2122
+ }>;
2123
+ /** The full commit a commit ID or its prefix names in the repository,
2124
+ * or undefined when it names none. */
2125
+ resolveCommit(repositoryId: string, commit: string): Promise<string | undefined>;
1725
2126
  validatePins(pins: Pins): Promise<void>;
1726
2127
  file(pins: Pins, side: "base" | "head", file: string, allowBinary?: boolean): Promise<{
1727
2128
  file: string;
@@ -1828,13 +2229,15 @@ declare class ShareClient {
1828
2229
  }
1829
2230
  //#endregion
1830
2231
  //#region src/sharing/repository.d.ts
1831
- /** Recipients need complete history; publication only checks that the commits exist. */
1832
- declare function fetchPinnedRepository(root: string, url: string, pins: Pick<Pins, "base" | "head">, publishing?: boolean): Promise<void>;
1833
- declare function verifyShareRepository(root: string, pins: Pins, repository?: {
1834
- cloneUrl: string;
1835
- }): Promise<{
1836
- cloneUrl: string;
1837
- }>;
2232
+ /** Recipients need complete history; publication only checks that the commits exist.
2233
+ * `commits` are other commits the board's references read at; a plan has
2234
+ * only those. */
2235
+ declare function fetchPinnedRepository(root: string, url: string, pins: Pick<Pins, "base" | "head"> | undefined, publishing?: boolean, commits?: readonly string[]): Promise<void>;
2236
+ /** A managed clone of a repository's default branch, for a shared board
2237
+ * with no pins whose repository the receiver has no checkout of. */
2238
+ declare function cloneSharedRepository(root: string, url: string): Promise<void>;
2239
+ /** Fetches through origin itself, so its transport and credentials apply. */
2240
+ declare function verifyShareRepository(root: string, pins: Pins | undefined, commits?: readonly string[]): Promise<void>;
1838
2241
  //#endregion
1839
2242
  //#region src/sharing/import.d.ts
1840
2243
  declare function validateShareBundle(bundle: ShareBundle): {
@@ -1912,6 +2315,7 @@ declare function sharedReviewId(origin: string, shareId: string): string;
1912
2315
  declare class SharedReviewStore {
1913
2316
  readonly root: string;
1914
2317
  private readonly fetchRepository;
2318
+ private readonly cloneRepository;
1915
2319
  private readonly loaded;
1916
2320
  private readonly validated;
1917
2321
  private readonly attention;
@@ -1926,7 +2330,7 @@ declare class SharedReviewStore {
1926
2330
  private readonly repositories;
1927
2331
  private readonly jobs;
1928
2332
  private readonly states;
1929
- constructor(root: string, fetchRepository?: typeof fetchPinnedRepository);
2333
+ constructor(root: string, fetchRepository?: typeof fetchPinnedRepository, cloneRepository?: typeof cloneSharedRepository);
1930
2334
  private purgeExpired;
1931
2335
  connect(store: ReviewStore, data: LocalReviewData): void;
1932
2336
  has(id: string): boolean;
@@ -1938,6 +2342,12 @@ declare class SharedReviewStore {
1938
2342
  repositoryRoot(id: string): string;
1939
2343
  prepare(id: string): Promise<void>;
1940
2344
  private prepareRepository;
2345
+ /** Reads each of a shared board's references at its own commits, in the
2346
+ * checkout of its repository. */
2347
+ private validateReferences;
2348
+ /** Files an unpinned board under a local checkout of its repository,
2349
+ * else a managed clone. */
2350
+ private prepareUnpinned;
1941
2351
  assertReady(id: string): Promise<void>;
1942
2352
  subscribe(listener: () => void): () => void;
1943
2353
  load(): Promise<void>;