@dev.fast/whiteboard 0.2.3 → 0.2.4

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 (34) hide show
  1. package/dist/{account-alias-DLE9XZhi.js → account-alias-_1_7vROx.js} +1 -1
  2. package/dist/agent-cli-BR2j-2n5.js +2 -0
  3. package/dist/{agent-cli-DRRQfHQ-.js → agent-cli-BrFqhnzM.js} +6 -6
  4. package/dist/{agent-client-DoaODH6I.js → agent-client-B_b1GtUc.js} +2 -2
  5. package/dist/{authoring-tools-F_q8cC7J.js → authoring-tools-DvIO906l.js} +2 -2
  6. package/dist/build-info.json +1 -1
  7. package/dist/{cli-DtolttUF.js → cli-gRGxkwc0.js} +1 -1
  8. package/dist/{cli-runner-Cwg5PeH2.js → cli-runner-Cjl8h376.js} +11 -11
  9. package/dist/cli.js +2 -2
  10. package/dist/{client-D01H2KOV.js → client-BFClfQLO.js} +2 -2
  11. package/dist/{desktop-discovery-DK2HoBy5.js → desktop-discovery-C-Qz54wO.js} +1 -1
  12. package/dist/{headless-host-Dd_-zkC4.js → headless-host-DcWaxx9P.js} +2 -2
  13. package/dist/{local-data-D-EoJfPx.js → local-data-Bm84Xdck.js} +72 -78
  14. package/dist/{mcp-BAE5rMgB.js → mcp-BDy9Aybd.js} +3 -3
  15. package/dist/{process-error-telemetry-mzRG988B.js → process-error-telemetry-Dzh5a3s_.js} +23 -17
  16. package/dist/profile-BQGaX8aX.js +2 -0
  17. package/dist/{profile-WzZu7Spt.js → profile-RDEioF8b.js} +1 -1
  18. package/dist/{request-origin-DlHTFCrQ.js → request-origin-DA4K1qWY.js} +1 -1
  19. package/dist/{review-telemetry-Pp4ZsVrh.js → review-telemetry-DBy3eVCo.js} +2 -2
  20. package/dist/server/desktop-host.js +10 -10
  21. package/dist/sharing/index.d.ts +13 -12
  22. package/dist/sharing/index.js +1 -1
  23. package/dist/{src-DHiDJQDy.js → src-WCbabvdS.js} +3 -2
  24. package/dist/{stored-document-migration-T9Uj5MkN.js → stored-document-migration-BxZWQQjv.js} +1 -1
  25. package/dist/{tool-failure-Djeeax6q.js → tool-failure-DJmTieh5.js} +1 -1
  26. package/package.json +5 -5
  27. package/src/review-api/comparison-coverage.ts +192 -165
  28. package/src/review-api/http.ts +11 -0
  29. package/src/review-api/local-data.ts +9 -3
  30. package/src/review-api/review-progress.ts +19 -9
  31. package/src/server/diffr-config.ts +1 -1
  32. package/src/server/structural-diff.ts +10 -9
  33. package/dist/agent-cli-50KJgMKi.js +0 -2
  34. package/dist/profile-Cqztt-9-.js +0 -2
@@ -79,7 +79,14 @@ export async function reviewProgress(
79
79
  // each resolve against the comparison their own pins name.
80
80
  const comparison: ComparisonCoverage = pins
81
81
  ? (partial ?? (await data.coverage(snapshot.reviewId, pins, mode)))
82
- : { files: [], fileSources: new Map(), alignments: new Map() };
82
+ : {
83
+ counted: true,
84
+ files: [],
85
+ fileSources: new Map(),
86
+ alignments: new Map(),
87
+ };
88
+
89
+ const counting = !comparison.counted;
83
90
 
84
91
  signal.throwIfAborted();
85
92
 
@@ -98,7 +105,10 @@ export async function reviewProgress(
98
105
  if (partial) {
99
106
  const state = data.coverageSnapshot(snapshot.reviewId, own, mode);
100
107
 
101
- if (state.pending) return undefined;
108
+ if (state.pending)
109
+ return state.comparison.counted
110
+ ? Promise.resolve(state.comparison)
111
+ : undefined;
102
112
  }
103
113
 
104
114
  loading = data.coverage(snapshot.reviewId, own, mode);
@@ -162,7 +172,7 @@ export async function reviewProgress(
162
172
 
163
173
  // Context-only files are absent from the changed-file stream. Read both pins
164
174
  // and require equality rather than inventing correspondence for missing diffs.
165
- if (!file && partial && !own) {
175
+ if (!file && counting && !own) {
166
176
  pendingSources.add(key);
167
177
 
168
178
  return [];
@@ -228,9 +238,9 @@ export async function reviewProgress(
228
238
  return {
229
239
  ...lens,
230
240
  ...resolved,
231
- pending: !!partial,
241
+ pending: counting,
232
242
  unavailable:
233
- partial || resolved.fileCount
243
+ counting || resolved.fileCount
234
244
  ? undefined
235
245
  : "No files match these targets",
236
246
  };
@@ -257,7 +267,7 @@ export async function reviewProgress(
257
267
  ),
258
268
  );
259
269
 
260
- const uncategorized = partial
270
+ const uncategorized = counting
261
271
  ? []
262
272
  : uncategorizedSources(
263
273
  files,
@@ -283,15 +293,15 @@ export async function reviewProgress(
283
293
  )?.path ?? source.file,
284
294
  ),
285
295
  ).size,
286
- pending: !!partial,
296
+ pending: counting,
287
297
  unavailable:
288
- partial || uncategorized.length
298
+ counting || uncategorized.length
289
299
  ? undefined
290
300
  : "All changed lines are covered by lenses",
291
301
  });
292
302
 
293
303
  const progress: ReviewProgress = {
294
- complete: !partial,
304
+ complete: !counting,
295
305
  files,
296
306
  referenceFiles,
297
307
  lenses,
@@ -51,7 +51,7 @@ function diffrArgv(args: DiffrArguments): string[] {
51
51
  case "show":
52
52
  return ["config", "show", "--json", ...(args.reveal ? ["--reveal"] : [])];
53
53
  case "set":
54
- return ["config", "set", "--stdin", "--json"];
54
+ return ["config", "set", "-", "--json"];
55
55
  case "migrate":
56
56
  return ["config", "migrate", "--json"];
57
57
  case "diff":
@@ -63,9 +63,11 @@ export async function* structuralDiff(
63
63
 
64
64
  args.push("--", ...(input.paths ?? []));
65
65
 
66
- const idleAbort = new AbortController();
67
- const idle = setTimeout(() => idleAbort.abort(), 120_000);
68
- const signal = AbortSignal.any([idleAbort.signal, input.signal]);
66
+ // Plugins can exceed two minutes between records. Apply this timeout only
67
+ // until the manifest arrives; plugins enforce their own request timeouts.
68
+ const startupAbort = new AbortController();
69
+ const startup = setTimeout(() => startupAbort.abort(), 120_000);
70
+ const signal = AbortSignal.any([startupAbort.signal, input.signal]);
69
71
 
70
72
  // The host inherits its own environment and runs from the repository, so
71
73
  // diffr reads the user's config and keys exactly as it would from a shell.
@@ -103,13 +105,11 @@ export async function* structuralDiff(
103
105
 
104
106
  try {
105
107
  for await (const line of lines) {
106
- // Large comparisons may take minutes while continuing to make progress.
107
- idle.refresh();
108
-
109
108
  // Bound individual records, not the entire streamed comparison: a
110
109
  // directory move can legitimately contain thousands of small files.
111
- if (Buffer.byteLength(line) > 64 * 1024 * 1024)
112
- throw new Error("Structural diff record exceeded 64 MiB.");
110
+ // Generated parsers in diffr can exceed 64 MiB after JSON encoding.
111
+ if (Buffer.byteLength(line) > 96 * 1024 * 1024)
112
+ throw new Error("Structural diff record exceeded 96 MiB.");
113
113
 
114
114
  if (!line.trim()) continue;
115
115
  const event = decodeStructuralDiffEvent(line);
@@ -125,6 +125,7 @@ export async function* structuralDiff(
125
125
  }
126
126
 
127
127
  started = true;
128
+ clearTimeout(startup);
128
129
  } else if (event.type === "complete") {
129
130
  completed = true;
130
131
 
@@ -150,7 +151,7 @@ export async function* structuralDiff(
150
151
  if (code !== 0 && !(code === 2 && (failed > 0 || aborted !== undefined)))
151
152
  throw exitError(code);
152
153
  } finally {
153
- clearTimeout(idle);
154
+ clearTimeout(startup);
154
155
  lines.close();
155
156
 
156
157
  if (child.exitCode === null) child.kill();
@@ -1,2 +0,0 @@
1
- import { n as runReviewAgentCli } from "./agent-cli-DRRQfHQ-.js";
2
- export { runReviewAgentCli };
@@ -1,2 +0,0 @@
1
- import { t as openReviewProfile } from "./profile-WzZu7Spt.js";
2
- export { openReviewProfile };