@dev.fast/whiteboard 0.4.0 → 0.4.1-preview.20261026.138

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 (78) hide show
  1. package/dist/{account-alias-2yTAxoBx.js → account-alias-BPlPnzQM.js} +7 -7
  2. package/dist/{agent-cli-CHNDd4Ga.js → agent-cli-BbCf9uid.js} +11 -11
  3. package/dist/agent-cli-ipN_JmzG.js +2 -0
  4. package/dist/{agent-client-Dc0vHFJt.js → agent-client-DfpM8F5N.js} +3 -3
  5. package/dist/{authoring-tools-D8EkIDjm.js → authoring-tools-bm39DRoV.js} +23 -10
  6. package/dist/{background-server-DyWnPJyZ.js → background-server--0EeCCeV.js} +1 -1
  7. package/dist/{background-server-DHWHzpo5.js → background-server-B--5p72o.js} +6 -6
  8. package/dist/build-info.json +1 -1
  9. package/dist/{cli-qZomwJmK.js → cli-DBTQIroM.js} +2 -2
  10. package/dist/{cli-runner-DFBaVGij.js → cli-runner-CRFCdb7G.js} +25 -25
  11. package/dist/cli.js +3 -3
  12. package/dist/{fuzzy-match-CfSxqzBF.js → fuzzy-match-l3mJZ1Ge.js} +5 -5
  13. package/dist/{headless-host-dwlqhqMY.js → headless-host-5ei3nHS8.js} +1 -1
  14. package/dist/{headless-host-DJhcab6r.js → headless-host-BkJ9OUQY.js} +131 -299
  15. package/dist/{client-p9WB8Sj0.js → import-Bwvf9Wos.js} +505 -390
  16. package/dist/{lens-selection-9byzEgvU.js → lens-selection-EuZdag4Q.js} +1 -1
  17. package/dist/{local-data-DHedfhxw.js → local-data-BCSeTyic.js} +98 -154
  18. package/dist/{mcp-Br-r_wwR.js → mcp-_Xg1gQuA.js} +17 -8
  19. package/dist/{package-paths-BeYHYjeR.js → package-paths-Bg731FHS.js} +2 -2
  20. package/dist/profile-C8zL4u3L.js +2 -0
  21. package/dist/{profile-D9wdlPgw.js → profile-xzrUFgbT.js} +4 -4
  22. package/dist/{remote-attach-DSGpTOJ4.js → remote-attach-DF25Epoa.js} +4 -4
  23. package/dist/{remote-extensions-WtJO7pkb.js → remote-extensions-BJamgsCe.js} +1 -1
  24. package/dist/{remote-extensions-CsI_BJ_f.js → remote-extensions-CeywZL-Z.js} +4 -4
  25. package/dist/{remote-language-server-Dx13Mg2m.js → remote-language-server-CH8sG_CU.js} +6 -6
  26. package/dist/{remote-uninstall-Dp2o3qz0.js → remote-uninstall-Cq-lkBY7.js} +7 -7
  27. package/dist/{request-origin-CNSLVn7x.js → request-origin-CargJFvH.js} +14 -3
  28. package/dist/{review-app-launcher-BZAnR8Vp.js → review-app-launcher-D8ApNDUV.js} +3 -3
  29. package/dist/{review-home-paths-CG-sb9Cw.js → review-home-paths-DcB4xLD-.js} +2 -2
  30. package/dist/{review-telemetry-BM-_KdLi.js → review-telemetry-BW7gJrSo.js} +7 -7
  31. package/dist/{runtime-C6_1K-3Z.js → runtime-DY6Ctyog.js} +1 -1
  32. package/dist/runtime.js +1 -1
  33. package/dist/{s3-CsG2EWED.js → s3-BIWv4h1J.js} +2 -2
  34. package/dist/{s3-config-zz4GWh2T.js → s3-config-Du3RBIvv.js} +1 -1
  35. package/dist/server/desktop-host.js +51 -17
  36. package/dist/{server-discovery-DKLIOgg3.js → server-discovery-aHK_1r3U.js} +5 -5
  37. package/dist/sharing/index.d.ts +209 -98
  38. package/dist/sharing/index.js +1 -1
  39. package/dist/{src-DYHVzX3b.js → src-DEOc8bvC.js} +63 -2
  40. package/dist/{src-Z1x4-Qmb.js → src-DjRaCctk.js} +6 -6
  41. package/dist/{stored-document-migration-DEt8iwem.js → stored-document-migration-CwmTwTb8.js} +139 -13
  42. package/dist/{thread-state-CO97FUqK.js → thread-state-CbLB0jUA.js} +1 -1
  43. package/dist/{tool-failure-C1L1vJyz.js → tool-failure-DZaQzi4f.js} +2 -2
  44. package/instructions/animation.md +345 -0
  45. package/instructions/authoring.md +2 -2
  46. package/package.json +6 -6
  47. package/src/fixtures/blocks/animation.json +19 -0
  48. package/src/review-api/authoring-tools.ts +17 -6
  49. package/src/review-api/blocks/animation.ts +98 -0
  50. package/src/review-api/blocks/index.ts +3 -0
  51. package/src/review-api/blocks/sequence.ts +3 -1
  52. package/src/review-api/comparison-coverage.ts +120 -89
  53. package/src/review-api/component-reference.ts +16 -0
  54. package/src/review-api/document-text.ts +11 -0
  55. package/src/review-api/document.ts +26 -5
  56. package/src/review-api/http.ts +31 -2
  57. package/src/review-api/instructions.ts +11 -2
  58. package/src/review-api/local-data.ts +21 -4
  59. package/src/review-api/mcp.ts +22 -14
  60. package/src/review-api/onboarding.ts +100 -26
  61. package/src/review-preferences.ts +43 -0
  62. package/src/server/desktop-server.ts +24 -0
  63. package/src/server/json-review-reporting.ts +1 -1
  64. package/src/server/review-server-core.ts +2 -0
  65. package/src/server/structural-comparisons.ts +5 -11
  66. package/src/server/structural-diff.ts +8 -2
  67. package/src/sharing/cli.ts +1 -1
  68. package/src/sharing/client.ts +54 -222
  69. package/src/sharing/export.ts +172 -114
  70. package/src/sharing/host.ts +32 -36
  71. package/src/sharing/import.ts +93 -147
  72. package/src/sharing/index.ts +1 -6
  73. package/src/sharing/routes.ts +18 -17
  74. package/src/ui-telemetry-events.ts +11 -0
  75. package/dist/agent-cli-Cn4-16XA.js +0 -2
  76. package/dist/profile-BopGMZUh.js +0 -2
  77. package/dist/{s3-config-CjcLyFV5.js → s3-config-D7Yt0VhS.js} +1 -1
  78. package/dist/{src-X9ZebeOD.js → src-DXnn7RrI.js} +1 -1
package/dist/runtime.js CHANGED
@@ -1,2 +1,2 @@
1
- import { t as resolveReviewRoot } from "./runtime-C6_1K-3Z.js";
1
+ import { t as resolveReviewRoot } from "./runtime-DY6Ctyog.js";
2
2
  export { resolveReviewRoot };
@@ -1,9 +1,9 @@
1
1
  import { a as jsonNumber, c as jsonString, o as jsonObject, r as jsonArray, u as parseJsonText } from "./src-X9phtB2j.js";
2
2
  import { S as sessionMetaSchema, b as commitShaSchema, y as byCommitSchema } from "./src-CGP5ytbV.js";
3
- import { i as isS3MockMode, l as s3CacheIdentity, s as resolveS3Credentials, u as s3MockRoot } from "./s3-config-CjcLyFV5.js";
3
+ import { i as isS3MockMode, l as s3CacheIdentity, s as resolveS3Credentials, u as s3MockRoot } from "./s3-config-D7Yt0VhS.js";
4
4
  import { t as errorMessage } from "./error-message-OtiDonty.js";
5
- import { existsSync, mkdirSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync } from "node:fs";
6
5
  import path from "node:path";
6
+ import { existsSync, mkdirSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync } from "node:fs";
7
7
  import { tmpdir } from "node:os";
8
8
  import { execFile } from "node:child_process";
9
9
  import { promisify } from "node:util";
@@ -1,2 +1,2 @@
1
- import { a as noTraceConfigurationMessage, c as resolveS3Setup, d as traceEnvPath, f as traceEnvValue, i as isS3MockMode, l as s3CacheIdentity, n as clearTraceEnvCache, o as readTraceEnvFile, p as traceSettingsPath, r as describeS3Setup, s as resolveS3Credentials, t as S3_DEFAULT_REGION, u as s3MockRoot } from "./s3-config-CjcLyFV5.js";
1
+ import { a as noTraceConfigurationMessage, c as resolveS3Setup, d as traceEnvPath, f as traceEnvValue, i as isS3MockMode, l as s3CacheIdentity, n as clearTraceEnvCache, o as readTraceEnvFile, p as traceSettingsPath, r as describeS3Setup, s as resolveS3Credentials, t as S3_DEFAULT_REGION, u as s3MockRoot } from "./s3-config-D7Yt0VhS.js";
2
2
  export { S3_DEFAULT_REGION, clearTraceEnvCache, describeS3Setup, isS3MockMode, noTraceConfigurationMessage, readTraceEnvFile, resolveS3Credentials, resolveS3Setup, s3CacheIdentity, s3MockRoot, traceEnvPath, traceEnvValue, traceSettingsPath };
@@ -1,27 +1,27 @@
1
1
  #!/usr/bin/env node
2
- import { S as splitGitPatchFiles, a as diff, o as diffFileSummaries } from "../src-X9ZebeOD.js";
2
+ import { S as splitGitPatchFiles, a as diff, o as diffFileSummaries } from "../src-DXnn7RrI.js";
3
3
  import { c as jsonString, i as jsonBoolean, n as isJsonObject, p as isObjectValue, s as jsonProperty, u as parseJsonText } from "../src-X9phtB2j.js";
4
- import { f as StreamLimitError, i as SharedReviewStore, p as readBoundedStream } from "../client-p9WB8Sj0.js";
5
- import { A as ReviewGatewayHostSchema, D as ReviewConnectRequestSchema, N as reviewDiffrSummarizerInputSchema, d as ReviewBugReportRequestSchema, f as parseReviewBugReportResponse, m as REVIEW_CLIENT_REMOTE, p as REVIEW_CLIENT_HEADER, r as parseReviewDesktopVerbFrame, s as parseZod, t as parseReviewCliInstallApplyRequest, u as ReviewBugReportMetaV2Schema, y as REVIEW_HOST_HEADER } from "../src-DYHVzX3b.js";
6
- import "../src-Z1x4-Qmb.js";
7
- import { B as resourceReferences, p as pullRequestProvider } from "../stored-document-migration-DEt8iwem.js";
4
+ import { _ as readBoundedStream, d as legacyModeSchema, g as StreamLimitError, t as SharedReviewStore } from "../import-Bwvf9Wos.js";
5
+ import { A as ReviewGatewayHostSchema, D as ReviewConnectRequestSchema, N as reviewDiffrSummarizerInputSchema, d as ReviewBugReportRequestSchema, f as parseReviewBugReportResponse, m as REVIEW_CLIENT_REMOTE, p as REVIEW_CLIENT_HEADER, r as parseReviewDesktopVerbFrame, s as parseZod, t as parseReviewCliInstallApplyRequest, u as ReviewBugReportMetaV2Schema, y as REVIEW_HOST_HEADER } from "../src-DEOc8bvC.js";
6
+ import "../src-DjRaCctk.js";
7
+ import { H as resourceReferences, p as pullRequestProvider } from "../stored-document-migration-CwmTwTb8.js";
8
8
  import { t as ReviewInputError } from "../input-error-OLgB_h31.js";
9
- import { L as writePrivateJsonAtomic, N as devReviewHome } from "../s3-config-CjcLyFV5.js";
9
+ import { L as writePrivateJsonAtomic, N as devReviewHome } from "../s3-config-D7Yt0VhS.js";
10
10
  import { t as errorMessage } from "../error-message-OtiDonty.js";
11
- import { i as readReviewPackageVersion, t as findReviewPackageRoot } from "../package-paths-BeYHYjeR.js";
12
- import { i as reviewInstanceDiscoveryPath, o as reviewLegacyDiscoveryPath } from "../review-home-paths-CG-sb9Cw.js";
13
- import { _ as reviewInstanceIdentity, u as REVIEW_INSTANCE_ENV } from "../server-discovery-DKLIOgg3.js";
14
- import { t as openReviewProfile } from "../profile-D9wdlPgw.js";
15
- import { r as reviewTelemetryChannel, t as ReviewTelemetry } from "../review-telemetry-BM-_KdLi.js";
16
- import { l as REVIEW_TELEMETRY_TABS } from "../request-origin-CNSLVn7x.js";
17
- import { c as removeLegacyReviewSkills, d as skipCliInstall, h as detectConnectAgents, i as finishCliInstallUpdate, l as resetCliInstall, m as connectAgent, n as applyCliInstall, o as pathShimPath, r as declineCliInstall, s as removeCliInstall, t as aliasInstallationToAccount, u as resolveCliInstallStatus } from "../account-alias-2yTAxoBx.js";
18
- import { C as saveDiffrSummarizer, E as cliAskTools, S as readDiffrConfig, T as testDiffrSummarizer, _ as DEFAULT_MAX_REQUEST_BYTES, a as drainServerCrashReport, b as GlobalReviewDesktopVerbRelay, c as answerErrorsAsJson, d as legacyModeSchema, f as captureSanitizedUiTelemetry, g as readBoundedRequestJson, h as createNodeRequestListener, l as createWhiteboardCore, m as recordClientError, o as installProcessErrorTelemetry, p as clientErrorsForSession, r as takeOverServerHome, s as serverCrashReportPath, u as serverJson, v as HttpJsonError, w as setDiffrConfigValue, x as migrateDiffrConfig, y as ReviewServerError } from "../headless-host-DJhcab6r.js";
19
- import { s as readQuerySchemas } from "../authoring-tools-D8EkIDjm.js";
11
+ import { i as readReviewPackageVersion, t as findReviewPackageRoot } from "../package-paths-Bg731FHS.js";
12
+ import { i as reviewInstanceDiscoveryPath, o as reviewLegacyDiscoveryPath } from "../review-home-paths-DcB4xLD-.js";
13
+ import { _ as reviewInstanceIdentity, u as REVIEW_INSTANCE_ENV } from "../server-discovery-aHK_1r3U.js";
14
+ import { t as openReviewProfile } from "../profile-xzrUFgbT.js";
15
+ import { r as reviewTelemetryChannel, t as ReviewTelemetry } from "../review-telemetry-BW7gJrSo.js";
16
+ import { l as REVIEW_TELEMETRY_TABS } from "../request-origin-CargJFvH.js";
17
+ import { c as removeLegacyReviewSkills, d as skipCliInstall, h as detectConnectAgents, i as finishCliInstallUpdate, l as resetCliInstall, m as connectAgent, n as applyCliInstall, o as pathShimPath, r as declineCliInstall, s as removeCliInstall, t as aliasInstallationToAccount, u as resolveCliInstallStatus } from "../account-alias-BPlPnzQM.js";
18
+ import { C as setDiffrConfigValue, S as saveDiffrSummarizer, T as cliAskTools, _ as HttpJsonError, a as drainServerCrashReport, b as migrateDiffrConfig, c as answerErrorsAsJson, d as captureSanitizedUiTelemetry, f as clientErrorsForSession, g as DEFAULT_MAX_REQUEST_BYTES, h as readBoundedRequestJson, l as createWhiteboardCore, m as createNodeRequestListener, o as installProcessErrorTelemetry, p as recordClientError, r as takeOverServerHome, s as serverCrashReportPath, u as serverJson, v as ReviewServerError, w as testDiffrSummarizer, x as readDiffrConfig, y as GlobalReviewDesktopVerbRelay } from "../headless-host-BkJ9OUQY.js";
19
+ import { s as readQuerySchemas } from "../authoring-tools-bm39DRoV.js";
20
20
  import crypto, { createHash, randomBytes } from "node:crypto";
21
21
  import { z } from "zod";
22
+ import path from "node:path";
22
23
  import fs, { existsSync, readFileSync } from "node:fs";
23
24
  import { chmod, copyFile, mkdir, readFile, realpath, rename, rm, stat, writeFile } from "node:fs/promises";
24
- import path from "node:path";
25
25
  import { Readable, Writable } from "node:stream";
26
26
  import { setTimeout as setTimeout$1 } from "node:timers/promises";
27
27
  import { promisify } from "node:util";
@@ -265,6 +265,30 @@ function listenForDesktopHostShutdown(hostProcess, onShutdown, onTelemetrySettin
265
265
  return () => hostProcess.off("message", handleMessage);
266
266
  }
267
267
  //#endregion
268
+ //#region src/review-preferences.ts
269
+ /**
270
+ * Machine-wide Review preferences the server itself needs. Workbench settings
271
+ * do not work here: the review server never reads the workbench
272
+ * configuration.
273
+ */
274
+ function reviewPreferencesPath(devHome = devReviewHome()) {
275
+ return path.join(devHome, "preferences.json");
276
+ }
277
+ /** Whether agents are offered animation authoring; existing animations
278
+ * always render. A missing or unreadable file means off; it never throws. */
279
+ async function readAnimationsEnabled(devHome) {
280
+ try {
281
+ const raw = parseJsonText(await readFile(reviewPreferencesPath(devHome), "utf8"));
282
+ return isJsonObject(raw) && raw.animationsEnabled === true;
283
+ } catch {
284
+ return false;
285
+ }
286
+ }
287
+ async function writeAnimationsEnabled(enabled, devHome) {
288
+ await writePrivateJsonAtomic(reviewPreferencesPath(devHome), { animationsEnabled: enabled });
289
+ return enabled;
290
+ }
291
+ //#endregion
268
292
  //#region src/server/crash-report.ts
269
293
  const CRASH_REPORT_URL = "https://bug.dev.fast/api/v2/crashes";
270
294
  const gzipAsync = promisify(gzip);
@@ -759,7 +783,7 @@ function createJsonReviewReporting(store, telemetry, options = {}) {
759
783
  files: { "review.json": JSON.stringify(snapshot) },
760
784
  omitted: []
761
785
  }),
762
- map: async () => JSON.stringify(imported.presentation.maps),
786
+ map: async () => JSON.stringify(imported.maps),
763
787
  diff: () => jsonReviewBugReportSource(store, snapshot).diff()
764
788
  } : jsonReviewBugReportSource(store, snapshot),
765
789
  clientErrorNames: clientErrorsForSession(report.app_session_id),
@@ -2099,6 +2123,7 @@ function createGlobalReviewServer(input) {
2099
2123
  const openWatchdog = new ReviewOpenWatchdog({ onTimeout: (context, elapsedMs) => void telemetry.captureEvent("review_open_timeout", { elapsed_ms: elapsedMs }, context) });
2100
2124
  let closing = false;
2101
2125
  const cliPath = path.join(input.packageRoot, "dist", "cli.js");
2126
+ let animationsEnabled = false;
2102
2127
  const discovery = {
2103
2128
  version: 3,
2104
2129
  instanceId,
@@ -2123,6 +2148,7 @@ function createGlobalReviewServer(input) {
2123
2148
  relay,
2124
2149
  token,
2125
2150
  instanceId,
2151
+ animations: () => animationsEnabled,
2126
2152
  status: () => {
2127
2153
  const { key, channel, checkout, appVersion, cliVersion, instanceId } = discovery;
2128
2154
  return {
@@ -2157,6 +2183,13 @@ function createGlobalReviewServer(input) {
2157
2183
  app.all("/reviews-api", (context) => gateway.fetch(context.req.raw));
2158
2184
  app.all("/reviews-api/*", (context) => gateway.fetch(context.req.raw));
2159
2185
  app.get("/remote-hosts", () => serverJson(200, gateway.hosts()));
2186
+ app.get("/preferences/animations", () => serverJson(200, { enabled: animationsEnabled }));
2187
+ app.put("/preferences/animations", async (context) => {
2188
+ const request = z.object({ enabled: z.boolean() }).safeParse(await readBoundedRequestJson(context.req.raw));
2189
+ if (!request.success) throw new ReviewServerError("enabled must be a boolean.", 400);
2190
+ animationsEnabled = await writeAnimationsEnabled(request.data.enabled);
2191
+ return serverJson(200, { enabled: animationsEnabled });
2192
+ });
2160
2193
  app.post("/app/focus", async () => {
2161
2194
  const result = await relay.dispatch({
2162
2195
  name: "focusWindow",
@@ -2282,6 +2315,7 @@ function createGlobalReviewServer(input) {
2282
2315
  },
2283
2316
  listen: async () => {
2284
2317
  await migrateDiffrConfig();
2318
+ animationsEnabled = await readAnimationsEnabled();
2285
2319
  boundPort = await listen(loopback.server, input.port);
2286
2320
  discovery.url = urlForBoundPort();
2287
2321
  for (const discoveryPath of discoveryPaths) await writePrivateJsonAtomic(discoveryPath, discovery);
@@ -1,11 +1,11 @@
1
1
  import { a as jsonNumber, n as isJsonObject, s as jsonProperty, u as parseJsonText } from "./src-X9phtB2j.js";
2
- import { n as parseReviewDesktopDiscovery } from "./src-DYHVzX3b.js";
3
- import "./src-Z1x4-Qmb.js";
4
- import { M as DEV_REVIEW_HOME_ENV, N as devReviewHome, k as processIsAlive } from "./s3-config-CjcLyFV5.js";
5
- import { a as reviewInstancesDir, o as reviewLegacyDiscoveryPath, r as reviewDevInstanceKey, t as reviewDefaultInstancePath } from "./review-home-paths-CG-sb9Cw.js";
2
+ import { n as parseReviewDesktopDiscovery } from "./src-DEOc8bvC.js";
3
+ import "./src-DjRaCctk.js";
4
+ import { M as DEV_REVIEW_HOME_ENV, N as devReviewHome, k as processIsAlive } from "./s3-config-D7Yt0VhS.js";
5
+ import { a as reviewInstancesDir, o as reviewLegacyDiscoveryPath, r as reviewDevInstanceKey, t as reviewDefaultInstancePath } from "./review-home-paths-DcB4xLD-.js";
6
6
  import { z } from "zod";
7
- import { mkdir, readFile, readdir, rm, writeFile } from "node:fs/promises";
8
7
  import path from "node:path";
8
+ import { mkdir, readFile, readdir, rm, writeFile } from "node:fs/promises";
9
9
  //#region src/desktop-discovery.ts
10
10
  var ReviewDesktopProtocolMismatchError = class extends Error {
11
11
  actualVersion;
@@ -15,36 +15,106 @@ type JsonObject = {
15
15
  };
16
16
  //#endregion
17
17
  //#region ../review-share-protocol/src/index.d.ts
18
- declare const shareManifestSchema: z.ZodObject<{
19
- format: z.ZodLiteral<"review-share/1">;
18
+ declare const shareBundleSchema: z.ZodObject<{
19
+ format: z.ZodLiteral<"review-share/2">;
20
20
  reviewId: z.ZodString;
21
21
  version: z.ZodNumber;
22
22
  title: z.ZodString;
23
- snapshot: z.ZodString;
24
- presentation: z.ZodString;
25
- objects: z.ZodArray<z.ZodObject<{
26
- id: z.ZodString;
27
- size: z.ZodNumber;
28
- sha256: z.ZodString;
23
+ snapshot: z.ZodRecord<z.ZodString, z.ZodUnknown>;
24
+ images: z.ZodRecord<z.ZodString, z.ZodObject<{
25
+ png: z.ZodBase64;
29
26
  }, z.core.$strict>>;
30
- resources: z.ZodArray<z.ZodObject<{
31
- id: z.ZodString;
32
- kind: z.ZodEnum<{
33
- map: "map";
34
- image: "image";
35
- trace: "trace";
36
- }>;
37
- mimeType: z.ZodEnum<{
38
- "image/png": "image/png";
39
- "application/json": "application/json";
27
+ traces: z.ZodRecord<z.ZodString, z.ZodUnknown>;
28
+ maps: z.ZodRecord<z.ZodString, z.ZodUnknown>;
29
+ commits: z.ZodArray<z.ZodUnknown>;
30
+ selections: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
31
+ side: z.ZodEnum<{
32
+ base: "base";
33
+ head: "head";
40
34
  }>;
41
- object: z.ZodString;
42
- }, z.core.$strict>>;
35
+ file: z.ZodString;
36
+ fromLine: z.ZodNumber;
37
+ toLine: z.ZodNumber;
38
+ pins: z.ZodOptional<z.ZodObject<{
39
+ repositoryId: z.ZodString;
40
+ head: z.ZodString;
41
+ base: z.ZodOptional<z.ZodString>;
42
+ }, z.core.$strict>>;
43
+ }, z.core.$strict>>>;
44
+ sources: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
45
+ kind: z.ZodLiteral<"excerpt">;
46
+ file: z.ZodString;
47
+ commit: z.ZodString;
48
+ fromLine: z.ZodNumber;
49
+ lines: z.ZodArray<z.ZodString>;
50
+ }, z.core.$strict>], "kind">>;
43
51
  repository: z.ZodOptional<z.ZodObject<{
44
52
  cloneUrl: z.ZodString;
45
53
  }, z.core.$strict>>;
46
54
  }, z.core.$strict>;
47
- type ShareManifest = z.infer<typeof shareManifestSchema>;
55
+ type ShareBundle = z.infer<typeof shareBundleSchema>;
56
+ //#endregion
57
+ //#region src/sharing/client.d.ts
58
+ /** Account tokens go only to the configured API origin. */
59
+ declare class ShareClient {
60
+ private readonly token?;
61
+ private readonly send;
62
+ private readonly origin;
63
+ constructor(origin: string, token?: string | undefined, send?: typeof fetch);
64
+ private api;
65
+ private request;
66
+ create(bundle: ShareBundle, requestId?: string): Promise<{
67
+ shareId: string;
68
+ url: string;
69
+ }>;
70
+ list(cursor?: string): Promise<JsonValue>;
71
+ recoverLink(shareId: string): Promise<{
72
+ shareId: string;
73
+ url: string;
74
+ }>;
75
+ revoke(shareId: string): Promise<JsonValue>;
76
+ /** The bundle and who shared it, read with the link's capability. */
77
+ download(capability: string): Promise<{
78
+ bundle: {
79
+ format: "review-share/2";
80
+ reviewId: string;
81
+ version: number;
82
+ title: string;
83
+ snapshot: Record<string, unknown>;
84
+ images: Record<string, {
85
+ png: string;
86
+ }>;
87
+ traces: Record<string, unknown>;
88
+ maps: Record<string, unknown>;
89
+ commits: unknown[];
90
+ selections: Record<string, {
91
+ side: "base" | "head";
92
+ file: string;
93
+ fromLine: number;
94
+ toLine: number;
95
+ pins?: {
96
+ repositoryId: string;
97
+ head: string;
98
+ base?: string | undefined;
99
+ } | undefined;
100
+ }[]>;
101
+ sources: {
102
+ kind: "excerpt";
103
+ file: string;
104
+ commit: string;
105
+ fromLine: number;
106
+ lines: string[];
107
+ }[];
108
+ repository?: {
109
+ cloneUrl: string;
110
+ } | undefined;
111
+ };
112
+ attribution: {
113
+ login: string;
114
+ sharedAt: number;
115
+ };
116
+ }>;
117
+ }
48
118
  //#endregion
49
119
  //#region ../local-vcs/src/exec.d.ts
50
120
  /** A value from outside the code, given to git, jj or gh as an operand. */
@@ -126,7 +196,10 @@ type StructuralDiffEvent = {
126
196
  } | ({
127
197
  type: "file";
128
198
  file: StructuralPairing<StructuralFileRef>;
129
- } & StructuralOutcome) | {
199
+ } & StructuralOutcome) | ({
200
+ type: "update";
201
+ file: StructuralPairing<StructuralFileRef>;
202
+ } & StructuralUpdate) | {
130
203
  type: "complete";
131
204
  succeeded: number;
132
205
  failed: number;
@@ -140,6 +213,23 @@ type StructuralOutcome = {
140
213
  error: StructuralProblem;
141
214
  diff?: never;
142
215
  };
216
+ /**
217
+ * An update record carries the regions whose visibility deferred plugins
218
+ * changed, by region `id`, and the file's new `stats.visible`; or their error.
219
+ */
220
+ type StructuralUpdate = {
221
+ regions: StructuralRegionVisibility[];
222
+ visible: StructuralLineCounts;
223
+ error?: never;
224
+ } | {
225
+ error: StructuralProblem;
226
+ regions?: never;
227
+ visible?: never;
228
+ };
229
+ /** A region's new visibility; absent fields are open and unlabelled. */
230
+ type StructuralRegionVisibility = {
231
+ id: number;
232
+ } & StructuralVisibility;
143
233
  type StructuralSnapshot = {
144
234
  type: "revision";
145
235
  rev: string;
@@ -741,6 +831,21 @@ declare const leafSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
741
831
  id: z.ZodOptional<z.ZodString>;
742
832
  }, z.core.$strict>>;
743
833
  pins: any;
834
+ }, z.core.$strict>, z.ZodObject<{
835
+ type: z.ZodLiteral<"animation">;
836
+ id: z.ZodOptional<z.ZodString>;
837
+ title: z.ZodString;
838
+ html: z.ZodString;
839
+ frames: z.ZodArray<z.ZodObject<{
840
+ key: z.ZodString;
841
+ title: z.ZodString;
842
+ label: z.ZodOptional<z.ZodString>;
843
+ caption: z.ZodOptional<z.ZodString>;
844
+ duration: z.ZodOptional<z.ZodNumber>;
845
+ }, z.core.$strict>>;
846
+ code: z.ZodDefault<z.ZodRecord<z.ZodString, any>>;
847
+ height: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodNumber]>>;
848
+ pins: any;
744
849
  }, z.core.$strict>], "type">;
745
850
  type LeafBlock = z.infer<typeof leafSchema>;
746
851
  type Block = LeafBlock | SectionBlock | CalloutBlock;
@@ -994,6 +1099,21 @@ declare const editSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
994
1099
  id: z.ZodOptional<z.ZodString>;
995
1100
  }, z.core.$strict>>;
996
1101
  pins: any;
1102
+ }, z.core.$strict>, z.ZodObject<{
1103
+ type: z.ZodLiteral<"animation">;
1104
+ id: z.ZodOptional<z.ZodString>;
1105
+ title: z.ZodString;
1106
+ html: z.ZodString;
1107
+ frames: z.ZodArray<z.ZodObject<{
1108
+ key: z.ZodString;
1109
+ title: z.ZodString;
1110
+ label: z.ZodOptional<z.ZodString>;
1111
+ caption: z.ZodOptional<z.ZodString>;
1112
+ duration: z.ZodOptional<z.ZodNumber>;
1113
+ }, z.core.$strict>>;
1114
+ code: z.ZodDefault<z.ZodRecord<z.ZodString, any>>;
1115
+ height: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodNumber]>>;
1116
+ pins: any;
997
1117
  }, z.core.$strict>], "type">, z.ZodObject<{
998
1118
  type: z.ZodLiteral<"section">;
999
1119
  id: z.ZodOptional<z.ZodString>;
@@ -1287,8 +1407,8 @@ type AskOffer = z.infer<typeof askOfferSchema>;
1287
1407
  /** What an agent may do without asking: nothing that changes the checkout,
1288
1408
  * what its own judgment calls safe, or everything. */
1289
1409
  declare const askPermissionsSchema: z.ZodEnum<{
1290
- "read-only": "read-only";
1291
1410
  auto: "auto";
1411
+ "read-only": "read-only";
1292
1412
  bypass: "bypass";
1293
1413
  }>;
1294
1414
  type AskPermissions = z.infer<typeof askPermissionsSchema>;
@@ -1679,7 +1799,7 @@ declare class ReviewStore {
1679
1799
  history(id: string): HistoryEntry[];
1680
1800
  inspect(id: string, targetId?: string, version?: number): Element | {
1681
1801
  id: string | undefined;
1682
- 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";
1802
+ type: "code" | "markdown" | "divider" | "code_peek" | "sequence" | "step" | "call_stack_diff" | "database_lens" | "image" | "trace_quote" | "software_map" | "flow_diagram" | "flow_node" | "flow_edge" | "animation" | "section" | "callout";
1683
1803
  label: any;
1684
1804
  }[];
1685
1805
  /** The host can seed a document; transport callers only supply a command. */
@@ -2213,47 +2333,15 @@ declare class LocalReviewData {
2213
2333
  }
2214
2334
  //#endregion
2215
2335
  //#region src/sharing/export.d.ts
2216
- interface ShareBundle {
2217
- manifest: ShareManifest;
2218
- objects: Map<string, Uint8Array>;
2219
- attribution?: {
2220
- login: string;
2221
- sharedAt: number;
2222
- };
2223
- }
2224
- type ShareExportStore = Pick<ReviewStore, "read" | "resource">;
2225
- type ShareExportData = Pick<LocalReviewData, "map" | "validateResource" | "validateSource">;
2226
2336
  /** Freeze one stored version before any asynchronous source reads. */
2227
2337
  declare function exportShare(input: {
2228
- store: ShareExportStore;
2229
- data: ShareExportData;
2338
+ store: ReviewStore;
2339
+ data: LocalReviewData;
2230
2340
  reviewId: string;
2231
2341
  version?: number;
2232
- repository?: ShareManifest["repository"];
2342
+ repository?: ShareBundle["repository"];
2233
2343
  }): Promise<ShareBundle>;
2234
2344
  //#endregion
2235
- //#region src/sharing/client.d.ts
2236
- /** Account tokens go only to the configured API origin, never to object storage. */
2237
- declare class ShareClient {
2238
- private readonly token?;
2239
- private readonly send;
2240
- private readonly origin;
2241
- constructor(origin: string, token?: string | undefined, send?: typeof fetch);
2242
- private api;
2243
- private upload;
2244
- create(bundle: ShareBundle, requestId?: string, beforeUpload?: () => Promise<void>): Promise<{
2245
- shareId: string;
2246
- url: string;
2247
- }>;
2248
- list(cursor?: string): Promise<JsonValue>;
2249
- recoverLink(shareId: string): Promise<{
2250
- shareId: string;
2251
- url: string;
2252
- }>;
2253
- revoke(shareId: string): Promise<JsonValue>;
2254
- download(shareId: string, capability: string): Promise<ShareBundle>;
2255
- }
2256
- //#endregion
2257
2345
  //#region src/sharing/repository.d.ts
2258
2346
  /** Recipients need complete history; publication only checks that the commits exist.
2259
2347
  * `commits` are other commits the board's references read at; a plan has
@@ -2266,24 +2354,40 @@ declare function cloneSharedRepository(root: string, url: string): Promise<void>
2266
2354
  declare function verifyShareRepository(root: string, pins: Pins | undefined, commits?: readonly string[]): Promise<void>;
2267
2355
  //#endregion
2268
2356
  //#region src/sharing/import.d.ts
2269
- declare function validateShareBundle(bundle: ShareBundle): {
2270
- manifest: {
2271
- format: "review-share/1";
2357
+ interface ShareAttribution {
2358
+ login: string;
2359
+ sharedAt: number;
2360
+ }
2361
+ declare function validateShareBundle(input: ShareBundle): {
2362
+ bundle: {
2363
+ format: "review-share/2";
2272
2364
  reviewId: string;
2273
2365
  version: number;
2274
2366
  title: string;
2275
- snapshot: string;
2276
- presentation: string;
2277
- objects: {
2278
- id: string;
2279
- size: number;
2280
- sha256: string;
2281
- }[];
2282
- resources: {
2283
- id: string;
2284
- kind: "map" | "image" | "trace";
2285
- mimeType: "application/json" | "image/png";
2286
- object: string;
2367
+ snapshot: Record<string, unknown>;
2368
+ images: Record<string, {
2369
+ png: string;
2370
+ }>;
2371
+ traces: Record<string, unknown>;
2372
+ maps: Record<string, unknown>;
2373
+ commits: unknown[];
2374
+ selections: Record<string, {
2375
+ side: "base" | "head";
2376
+ file: string;
2377
+ fromLine: number;
2378
+ toLine: number;
2379
+ pins?: {
2380
+ repositoryId: string;
2381
+ head: string;
2382
+ base?: string | undefined;
2383
+ } | undefined;
2384
+ }[]>;
2385
+ sources: {
2386
+ kind: "excerpt";
2387
+ file: string;
2388
+ commit: string;
2389
+ fromLine: number;
2390
+ lines: string[];
2287
2391
  }[];
2288
2392
  repository?: {
2289
2393
  cloneUrl: string;
@@ -2307,11 +2411,9 @@ declare function validateShareBundle(bundle: ShareBundle): {
2307
2411
  revision?: string | undefined;
2308
2412
  } | undefined;
2309
2413
  };
2310
- presentation: {
2311
- maps: Record<string, any>;
2312
- };
2414
+ maps: Record<string, any>;
2313
2415
  };
2314
- declare function sharedReviewId(origin: string, shareId: string): string;
2416
+ declare function sharedReviewId(origin: string, capability: string): string;
2315
2417
  /** Separate immutable directory tree; authoring mutation handlers cannot write it. */
2316
2418
  declare class SharedReviewStore {
2317
2419
  readonly root: string;
@@ -2379,41 +2481,50 @@ declare class SharedReviewStore {
2379
2481
  revision?: string | undefined;
2380
2482
  } | undefined;
2381
2483
  };
2382
- manifest: {
2383
- format: "review-share/1";
2484
+ bundle: {
2485
+ format: "review-share/2";
2384
2486
  reviewId: string;
2385
2487
  version: number;
2386
2488
  title: string;
2387
- snapshot: string;
2388
- presentation: string;
2389
- objects: {
2390
- id: string;
2391
- size: number;
2392
- sha256: string;
2393
- }[];
2394
- resources: {
2395
- id: string;
2396
- kind: "map" | "image" | "trace";
2397
- mimeType: "application/json" | "image/png";
2398
- object: string;
2489
+ snapshot: Record<string, unknown>;
2490
+ images: Record<string, {
2491
+ png: string;
2492
+ }>;
2493
+ traces: Record<string, unknown>;
2494
+ maps: Record<string, unknown>;
2495
+ commits: unknown[];
2496
+ selections: Record<string, {
2497
+ side: "base" | "head";
2498
+ file: string;
2499
+ fromLine: number;
2500
+ toLine: number;
2501
+ pins?: {
2502
+ repositoryId: string;
2503
+ head: string;
2504
+ base?: string | undefined;
2505
+ } | undefined;
2506
+ }[]>;
2507
+ sources: {
2508
+ kind: "excerpt";
2509
+ file: string;
2510
+ commit: string;
2511
+ fromLine: number;
2512
+ lines: string[];
2399
2513
  }[];
2400
2514
  repository?: {
2401
2515
  cloneUrl: string;
2402
2516
  } | undefined;
2403
2517
  };
2404
- presentation: {
2405
- maps: Record<string, any>;
2406
- };
2518
+ maps: Record<string, any>;
2407
2519
  };
2408
2520
  list(): any;
2409
- readObject(id: string, objectId: string): Promise<NonSharedBuffer>;
2410
2521
  removeLocal(id: string): Promise<void>;
2411
2522
  setAttention(id: string): Promise<void>;
2412
2523
  setLifecycle(id: string, state: "active" | "trash"): Promise<void>;
2413
2524
  private updateAttention;
2414
- import(origin: string, shareId: string, bundle: ShareBundle): Promise<string>;
2525
+ import(origin: string, capability: string, bundle: ShareBundle, attribution?: ShareAttribution): Promise<string>;
2415
2526
  read(id: string): Promise<ShareBundle>;
2416
2527
  private readValidated;
2417
2528
  }
2418
2529
  //#endregion
2419
- export { type ShareBundle, ShareClient, type ShareExportData, type ShareExportStore, SharedReviewStore, exportShare, sharedReviewId, validateShareBundle, verifyShareRepository };
2530
+ export { ShareClient, SharedReviewStore, exportShare, sharedReviewId, validateShareBundle, verifyShareRepository };
@@ -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-p9WB8Sj0.js";
1
+ import { a as verifyShareRepository, c as exportShare, n as sharedReviewId, r as validateShareBundle, s as ShareClient, t as SharedReviewStore } from "../import-Bwvf9Wos.js";
2
2
  export { ShareClient, SharedReviewStore, exportShare, sharedReviewId, validateShareBundle, verifyShareRepository };