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

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-CprZojXd.js → account-alias-CMyXCuuq.js} +13 -8
  2. package/dist/{agent-cli-CThN7Q59.js → agent-cli-CahKfDT0.js} +15 -10
  3. package/dist/agent-cli-CvYV2R6c.js +2 -0
  4. package/dist/{agent-client-BOOi7EUR.js → agent-client-D2RmE9NL.js} +13 -3
  5. package/dist/{authoring-tools-BNwuMnz6.js → authoring-tools-BLhYKrNN.js} +34 -27
  6. package/dist/{background-server-DLSDogkI.js → background-server-CFUU4VtN.js} +1 -1
  7. package/dist/{background-server-CkvxA-6O.js → background-server-k4K_Hvh1.js} +5 -5
  8. package/dist/build-info.json +1 -1
  9. package/dist/{cli-R4yfa5DT.js → cli-BUVSMGud.js} +1 -1
  10. package/dist/{cli-runner-Cuc9FSzu.js → cli-runner-C7W6VA94.js} +26 -26
  11. package/dist/cli.js +4 -3
  12. package/dist/{client-BN_FDxFr.js → client-B0f4EJ7v.js} +253 -47
  13. package/dist/{fuzzy-match-BO9bK37N.js → fuzzy-match-BbaX-dGh.js} +6 -4
  14. package/dist/{headless-host-Cog6SpS9.js → headless-host-C7xYMe74.js} +513 -140
  15. package/dist/{headless-host-CVBOQyRS.js → headless-host-cYdlRYPB.js} +1 -1
  16. package/dist/lens-selection-CAtsGaym.js +214 -0
  17. package/dist/{local-data-D_9tvdsp.js → local-data-DrNSaiS5.js} +2416 -320
  18. package/dist/{mcp-D1hziANa.js → mcp-yXnjUkOV.js} +6 -10
  19. package/dist/{package-paths-C--__jEv.js → package-paths-BWxO-UEL.js} +1 -1
  20. package/dist/{profile-DokFw782.js → profile-BlqZlCPZ.js} +20 -8
  21. package/dist/profile-CGxNfeYQ.js +2 -0
  22. package/dist/{remote-attach-CEJ-kvDY.js → remote-attach-CZTrtWIk.js} +4 -4
  23. package/dist/{remote-extensions-Blcjr9Ze.js → remote-extensions-CNXwqK0D.js} +3 -3
  24. package/dist/{remote-extensions-GN8Gf_qG.js → remote-extensions-VP-kfq0C.js} +1 -1
  25. package/dist/{remote-language-server-BTKBQ7x4.js → remote-language-server-BiPzol99.js} +5 -5
  26. package/dist/{remote-uninstall-DW7Gdryh.js → remote-uninstall-CFTkoioA.js} +6 -6
  27. package/dist/{request-origin-Zcn_CjX4.js → request-origin--8lLCclv.js} +55 -14
  28. package/dist/{review-app-launcher-CkwLclzR.js → review-app-launcher-KA2_mOeo.js} +2 -2
  29. package/dist/{review-home-paths-j2BRAaNv.js → review-home-paths-D8AoCdd2.js} +19 -17
  30. package/dist/{review-telemetry-BLNwYnLV.js → review-telemetry-B2JniTIs.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-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 +29 -76
  38. package/dist/{server-discovery-Bey8IqXH.js → server-discovery-CRXG48Uz.js} +3 -3
  39. package/dist/sharing/index.d.ts +484 -70
  40. package/dist/sharing/index.js +1 -1
  41. package/dist/{src-DsM3jO8G.js → src-CyYCvVHx.js} +90 -17
  42. package/dist/{src-BMPuxWv4.js → src-WPaQn75m.js} +208 -73
  43. package/dist/{stored-document-migration-CChxtFAy.js → stored-document-migration-B_BijGHF.js} +270 -269
  44. package/dist/{thread-state-5pYr6_zM.js → thread-state-D6MlnGv7.js} +7 -2
  45. package/dist/{tool-failure-C9MpbXJJ.js → tool-failure-_makh_Sr.js} +10 -3
  46. package/instructions/authoring.md +18 -5
  47. package/package.json +6 -6
  48. package/src/ask/agents.ts +13 -1
  49. package/src/ask/checkout-files.ts +2 -5
  50. package/src/ask/thread-state.ts +4 -0
  51. package/src/ask/thread.ts +16 -0
  52. package/src/ask/threads.ts +24 -3
  53. package/src/cli-install.ts +13 -2
  54. package/src/cli-runner.ts +4 -1
  55. package/src/cli.ts +4 -1
  56. package/src/diff-selection-migration.ts +48 -34
  57. package/src/heading-anchors.ts +42 -0
  58. package/src/lens-selection.ts +38 -2
  59. package/src/review-api/README.md +52 -13
  60. package/src/review-api/activity.ts +1 -4
  61. package/src/review-api/agent-cli.ts +9 -1
  62. package/src/review-api/anchor-quotes.ts +14 -7
  63. package/src/review-api/ask-history.ts +137 -51
  64. package/src/review-api/authoring-tools.ts +45 -30
  65. package/src/review-api/blocks/definition.ts +1 -1
  66. package/src/review-api/blocks/markdown.ts +2 -2
  67. package/src/review-api/board-order.ts +144 -0
  68. package/src/review-api/checkout-groups.ts +560 -0
  69. package/src/review-api/document-headings.ts +58 -27
  70. package/src/review-api/document-text.ts +31 -2
  71. package/src/review-api/document.ts +281 -34
  72. package/src/review-api/foreign-references.ts +328 -0
  73. package/src/review-api/github-provider.ts +51 -13
  74. package/src/review-api/http.ts +702 -123
  75. package/src/review-api/instructions.ts +0 -19
  76. package/src/review-api/link-preview.ts +113 -0
  77. package/src/review-api/local-data.ts +310 -46
  78. package/src/review-api/mcp.ts +4 -12
  79. package/src/review-api/onboarding.ts +1 -1
  80. package/src/review-api/profile.ts +37 -6
  81. package/src/review-api/public-tools.ts +24 -2
  82. package/src/review-api/pull-request.ts +82 -49
  83. package/src/review-api/request-origin.ts +10 -0
  84. package/src/review-api/review-progress.ts +61 -27
  85. package/src/review-api/scratchpad-plan-upgrade.ts +250 -0
  86. package/src/review-api/store-migrations.ts +357 -0
  87. package/src/review-api/store-schema.ts +38 -29
  88. package/src/review-api/store.ts +2144 -480
  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 +44 -14
  111. package/dist/agent-cli-C6SPSII0.js +0 -2
  112. package/dist/profile-CYPmvBoA.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
@@ -1,2 +1,2 @@
1
- import { a as sharedReviewId, c as verifyShareRepository, i as SharedReviewStore, l as exportShare, n as ShareClient, o as validateShareBundle } from "../client-BN_FDxFr.js";
1
+ import { a as sharedReviewId, c as verifyShareRepository, i as SharedReviewStore, l as exportShare, n as ShareClient, o as validateShareBundle } from "../client-B0f4EJ7v.js";
2
2
  export { ShareClient, SharedReviewStore, exportShare, sharedReviewId, validateShareBundle, verifyShareRepository };
@@ -177,6 +177,12 @@ z.union([StructuralDiffEventSchema, ReviewStructuralDiffErrorSchema]);
177
177
  const REVIEW_CLIENT_HEADER = "x-review-client";
178
178
  const REVIEW_CLIENT_REMOTE = "remote";
179
179
  const REVIEW_HOST_HEADER = "x-review-host";
180
+ const PULL_REQUEST_STATES = [
181
+ "open",
182
+ "draft",
183
+ "merged",
184
+ "closed"
185
+ ];
180
186
  const requiredString$1 = z.string({ error: "must be a string" }).refine((value) => value.trim().length > 0, "must be a string");
181
187
  const stringAllowEmpty = z.string({ error: "must be a string" });
182
188
  const positiveInteger = z.number({ error: "must be a positive integer" }).int("must be a positive integer").positive("must be a positive integer");
@@ -227,11 +233,7 @@ z.strictObject({
227
233
  /** How embedded diffs lay out: base and head side by side, or one column. */
228
234
  const REVIEW_DIFF_LAYOUTS = ["split", "unified"];
229
235
  const REVIEW_DIFF_LAYOUT_SCOPES = ["diff", "peek"];
230
- const REVIEW_THEME_CHOICES = [
231
- "dark",
232
- "light",
233
- "system"
234
- ];
236
+ const REVIEW_COLOR_THEME_KINDS = ["dark", "light"];
235
237
  const reviewDiffrSummarizerInputSchema = z.object({
236
238
  enabled: z.boolean(),
237
239
  provider: z.string().min(1),
@@ -405,9 +407,38 @@ const ReviewStackLayerSchema = z.strictObject({
405
407
  "earlier",
406
408
  "current",
407
409
  "later"
408
- ])
410
+ ]),
411
+ /** The layer's PR state, as last read from GitHub. */
412
+ pullRequestState: z.enum(PULL_REQUEST_STATES).optional()
413
+ });
414
+ z.strictObject({
415
+ /** Bottom first. */
416
+ layers: z.array(ReviewStackLayerSchema),
417
+ /** The branch the stack sits on, as `main`. */
418
+ base: requiredString$1.optional()
419
+ });
420
+ const ReviewPlaceBoardSchema = z.strictObject({
421
+ reviewId: requiredString$1,
422
+ title: stringAllowEmpty,
423
+ icon: z.enum(["board", "code"])
424
+ });
425
+ const ReviewPlaceSiblingSchema = ReviewPlaceBoardSchema.extend({
426
+ pullRequestNumber: positiveInteger.optional(),
427
+ pullRequestState: z.enum(PULL_REQUEST_STATES).optional()
428
+ });
429
+ z.strictObject({
430
+ /** The board's PR state and branches, as last read from GitHub. */
431
+ pullRequestState: z.enum(PULL_REQUEST_STATES).optional(),
432
+ baseBranch: requiredString$1.optional(),
433
+ headBranch: requiredString$1.optional(),
434
+ /** The board itself. */
435
+ board: ReviewPlaceBoardSchema.optional(),
436
+ parent: ReviewPlaceBoardSchema.optional(),
437
+ /** Empty for a top-level board. */
438
+ siblings: z.array(ReviewPlaceSiblingSchema),
439
+ /** A top-level board's children in sibling order; absent for a child. */
440
+ children: z.array(ReviewPlaceSiblingSchema).optional()
409
441
  });
410
- z.strictObject({ layers: z.array(ReviewStackLayerSchema) });
411
442
  const ReviewCliInstallTargetSchema = z.enum([
412
443
  "claude",
413
444
  "codex",
@@ -673,13 +704,7 @@ const revealArgsSchema = z.strictObject({
673
704
  path: ["endLine"]
674
705
  });
675
706
  });
676
- /** The one scratchpad's fixed review id. */
677
- const SCRATCHPAD_REVIEW_ID = "scratchpad";
678
- const apiReviewIdSchema = z.union([
679
- z.uuid(),
680
- z.string().regex(/^shared-[a-f0-9]{64}$/),
681
- z.literal(SCRATCHPAD_REVIEW_ID)
682
- ]);
707
+ const apiReviewIdSchema = z.union([z.uuid(), z.string().regex(/^shared-[a-f0-9]{64}$/)]);
683
708
  const ReviewVerbRequestSchema = z.discriminatedUnion("name", [
684
709
  z.strictObject({
685
710
  name: z.literal("authoringCapabilities"),
@@ -727,7 +752,9 @@ const ReviewVerbRequestSchema = z.discriminatedUnion("name", [
727
752
  name: z.literal("openReview"),
728
753
  args: z.strictObject({
729
754
  reviewUuid: apiReviewIdSchema,
730
- active: z.boolean()
755
+ active: z.boolean(),
756
+ /** Block to scroll to after opening. */
757
+ blockId: requiredString$1.optional()
731
758
  })
732
759
  }),
733
760
  z.strictObject({
@@ -797,7 +824,38 @@ z.discriminatedUnion("event", [
797
824
  }),
798
825
  z.strictObject({
799
826
  event: z.literal("showReviewView"),
800
- view: reviewViewSchema
827
+ view: reviewViewSchema,
828
+ /** The board to switch, from its sidebar; else the one asking. */
829
+ reviewId: requiredString$1.optional()
830
+ }),
831
+ z.strictObject({
832
+ event: z.literal("revealBlock"),
833
+ reviewId: requiredString$1,
834
+ blockId: requiredString$1
835
+ }),
836
+ z.strictObject({
837
+ event: z.literal("selectLens"),
838
+ reviewId: requiredString$1,
839
+ lensId: requiredString$1.nullable()
840
+ }),
841
+ z.strictObject({
842
+ event: z.literal("markLens"),
843
+ reviewId: requiredString$1,
844
+ lensId: requiredString$1
845
+ }),
846
+ z.strictObject({
847
+ event: z.literal("pickCommit"),
848
+ reviewId: requiredString$1,
849
+ commit: requiredString$1.nullable()
850
+ }),
851
+ z.strictObject({
852
+ event: z.literal("openAskThread"),
853
+ reviewId: requiredString$1,
854
+ threadId: requiredString$1
855
+ }),
856
+ z.strictObject({
857
+ event: z.literal("toggleAskColumn"),
858
+ reviewId: requiredString$1
801
859
  })
802
860
  ]);
803
861
  z.discriminatedUnion("ok", [z.strictObject({
@@ -1005,6 +1063,21 @@ function parseReviewBugReportResponse(value) {
1005
1063
  return ReviewBugReportResponseSchema.parse(value);
1006
1064
  }
1007
1065
  //#endregion
1066
+ //#region ../review-protocol/src/board-icons.ts
1067
+ /** A board has code attached when its target is commits, a PR or a working
1068
+ * tree, even one with nothing to compare. A plan's target is its project. */
1069
+ const boardIconKind = (target) => target && target.kind !== "project" ? "code" : "board";
1070
+ /** What a board with no title is called wherever its title shows. */
1071
+ const UNTITLED_BOARD = "Untitled";
1072
+ /**
1073
+ * A board's title as every surface shows it. A person's new board keeps an
1074
+ * empty title until they name it; it reads "Untitled" everywhere. A title
1075
+ * someone typed, "Untitled" included, shows as typed.
1076
+ */
1077
+ function boardTitle(title) {
1078
+ return title?.trim() ? title : UNTITLED_BOARD;
1079
+ }
1080
+ //#endregion
1008
1081
  //#region ../review-protocol/src/index.ts
1009
1082
  function parseReviewDesktopDiscovery(value) {
1010
1083
  return parseZod(ReviewDesktopDiscoverySchema, value);
@@ -1039,4 +1112,4 @@ function formatIssuePath(path) {
1039
1112
  return output;
1040
1113
  }
1041
1114
  //#endregion
1042
- export { ReviewSelectedDiffSchema as A, ReviewApiSelectionSourceSchema as C, ReviewFeedbackSchema as D, ReviewFeedbackContactSchema as E, reviewDiffrSummarizerInputSchema as M, decodeStructuralDiffEvent as N, ReviewGatewayHostSchema as O, structuralChangeCounts as P, REVIEW_THEME_CHOICES as S, ReviewConnectRequestSchema as T, REVIEW_REMOTE_AGENT_IDS as _, parseReviewVerbRequest as a, REVIEW_REMOTE_INSTALL_LOCK as b, ReviewBugReportMetaV2Schema as c, REVIEW_CLIENT_HEADER as d, REVIEW_CLIENT_REMOTE as f, REVIEW_HOST_HEADER as g, REVIEW_DIFF_LAYOUT_SCOPES as h, parseReviewDesktopVerbResult as i, SCRATCHPAD_REVIEW_ID as j, ReviewOnboardingRunRequestSchema as k, ReviewBugReportRequestSchema as l, REVIEW_DIFF_LAYOUTS as m, parseReviewDesktopDiscovery as n, parseReviewVerbResponse as o, REVIEW_CLI_INSTALL_TARGET_LABELS as p, parseReviewDesktopVerbFrame as r, parseZod as s, parseReviewCliInstallApplyRequest as t, parseReviewBugReportResponse as u, REVIEW_REMOTE_ATTACH_BEGIN as v, ReviewCliInstallStampSchema as w, REVIEW_REMOTE_WRAPPER_MARK as x, REVIEW_REMOTE_ATTACH_END as y };
1115
+ export { ReviewGatewayHostSchema as A, REVIEW_REMOTE_INSTALL_LOCK as C, ReviewConnectRequestSchema as D, ReviewCliInstallStampSchema as E, structuralChangeCounts as F, ReviewSelectedDiffSchema as M, reviewDiffrSummarizerInputSchema as N, ReviewFeedbackContactSchema as O, decodeStructuralDiffEvent as P, REVIEW_REMOTE_ATTACH_END as S, ReviewApiSelectionSourceSchema as T, REVIEW_DIFF_LAYOUTS as _, parseReviewVerbRequest as a, REVIEW_REMOTE_AGENT_IDS as b, boardIconKind as c, ReviewBugReportRequestSchema as d, parseReviewBugReportResponse as f, REVIEW_COLOR_THEME_KINDS as g, REVIEW_CLI_INSTALL_TARGET_LABELS as h, parseReviewDesktopVerbResult as i, ReviewOnboardingRunRequestSchema as j, ReviewFeedbackSchema as k, boardTitle as l, REVIEW_CLIENT_REMOTE as m, parseReviewDesktopDiscovery as n, parseReviewVerbResponse as o, REVIEW_CLIENT_HEADER as p, parseReviewDesktopVerbFrame as r, parseZod as s, parseReviewCliInstallApplyRequest as t, ReviewBugReportMetaV2Schema as u, REVIEW_DIFF_LAYOUT_SCOPES as v, REVIEW_REMOTE_WRAPPER_MARK as w, REVIEW_REMOTE_ATTACH_BEGIN as x, REVIEW_HOST_HEADER as y };