@dev.fast/whiteboard 0.5.1 → 0.5.2-preview.20261104.146
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.
- package/dist/{account-alias-Bw3PT3Qo.js → account-alias-BlYamXAG.js} +5 -5
- package/dist/{agent-cli-kHRrwO4n.js → agent-cli-D7fF5xmm.js} +9 -9
- package/dist/agent-cli-DLibAL4u.js +2 -0
- package/dist/{agent-client-CMacGbMp.js → agent-client-BCEbSPWU.js} +4 -4
- package/dist/{authoring-tools-CiLy46kh.js → authoring-tools-CkfxTVJm.js} +12 -8
- package/dist/{background-server-eZWXoVcI.js → background-server-BraP8pJ9.js} +4 -4
- package/dist/{background-server-BLNHbksB.js → background-server-CwToVN1g.js} +1 -1
- package/dist/build-info.json +1 -1
- package/dist/{cli-Bxmiqutp.js → cli-BpadBaGU.js} +1 -1
- package/dist/{cli-runner-DQPuu7kJ.js → cli-runner-BebYF50a.js} +22 -22
- package/dist/cli.js +2 -2
- package/dist/{fuzzy-match-DZjeOaPY.js → fuzzy-match-CxcsLQGx.js} +3 -3
- package/dist/{headless-host-Dl2KZ9IT.js → headless-host-FAlbekFD.js} +561 -415
- package/dist/{headless-host-B4r0s1ks.js → headless-host-cLipIufH.js} +1 -1
- package/dist/{import-YAIU6rB0.js → import-CZ1958L4.js} +234 -62
- package/dist/{local-data-C58vzLZR.js → local-data-DdFkxFK_.js} +41 -16
- package/dist/{mcp-COYWiGVn.js → mcp-Claiy9xE.js} +9 -6
- package/dist/{package-paths-Cg6fnaGp.js → package-paths-Dk7MOXxN.js} +1 -1
- package/dist/{profile--BYIjPkc.js → profile-Bsgzi9PA.js} +2 -2
- package/dist/profile-BxdzBxHW.js +2 -0
- package/dist/{remote-attach-C1prLjmj.js → remote-attach-LGTpwpUv.js} +4 -4
- package/dist/{remote-extensions-Bw029iIS.js → remote-extensions-BvV29_gk.js} +1 -1
- package/dist/{remote-extensions-MUUgbLJn.js → remote-extensions-L95HNwIH.js} +2 -2
- package/dist/{remote-language-server-z3rdHcLL.js → remote-language-server-BAznkpeu.js} +4 -4
- package/dist/{remote-uninstall-B3Slwor1.js → remote-uninstall-CLP79Cuk.js} +5 -5
- package/dist/{request-origin-B3_XI2VA.js → request-origin-D6B-zrL8.js} +27 -5
- package/dist/{review-app-launcher-BZEbDKuK.js → review-app-launcher-tTe8bTwg.js} +2 -2
- package/dist/{review-home-paths-LdGS4SpR.js → review-home-paths-BmZX2qiz.js} +1 -1
- package/dist/{review-telemetry-x8u-9EZb.js → review-telemetry-DACDMfqq.js} +4 -4
- package/dist/server/desktop-host.js +26 -38
- package/dist/{server-discovery-WmuFl2S3.js → server-discovery-CV5qf1J8.js} +2 -2
- package/dist/sharing/index.d.ts +137 -14
- package/dist/sharing/index.js +1 -1
- package/dist/{src-B2b8cCoI.js → src-BQDlJXkG.js} +44 -5
- package/dist/{src-DLWol7GZ.js → src-CrrW7lcY.js} +16 -1
- package/dist/{stored-document-migration-iwIQ4l5G.js → stored-document-migration-D1wK4yID.js} +3 -3
- package/dist/{thread-state-B7L1mpN_.js → thread-state-WTqSborE.js} +1 -1
- package/dist/{tool-failure-RLR8m9hq.js → tool-failure-YOFGHJCZ.js} +319 -55
- package/instructions/animation.md +69 -5
- package/instructions/animations/before-after-structure/README.md +27 -0
- package/instructions/animations/before-after-structure/animation.html +89 -0
- package/instructions/animations/before-after-structure/block.json +10 -0
- package/instructions/animations/before-after-structure/frames.json +313 -0
- package/instructions/animations/cache-fill-evict/README.md +24 -0
- package/instructions/animations/cache-fill-evict/animation.html +81 -0
- package/instructions/animations/cache-fill-evict/block.json +13 -0
- package/instructions/animations/cache-fill-evict/frames.json +79 -0
- package/instructions/animations/cache-fill-evict/scenarios.json +17 -0
- package/instructions/animations/log-replay/README.md +25 -0
- package/instructions/animations/log-replay/animation.html +86 -0
- package/instructions/animations/log-replay/block.json +10 -0
- package/instructions/animations/log-replay/frames.json +143 -0
- package/instructions/animations/log-replay/scenarios.json +18 -0
- package/instructions/animations/queue-workers/README.md +23 -0
- package/instructions/animations/queue-workers/animation.html +107 -0
- package/instructions/animations/queue-workers/block.json +13 -0
- package/instructions/animations/queue-workers/frames.json +119 -0
- package/instructions/animations/queue-workers/scenarios.json +18 -0
- package/instructions/animations/race-two-lanes/README.md +22 -0
- package/instructions/animations/race-two-lanes/animation.html +97 -0
- package/instructions/animations/race-two-lanes/block.json +1 -0
- package/instructions/animations/race-two-lanes/frames.json +234 -0
- package/instructions/animations/race-two-lanes/scenarios.json +19 -0
- package/instructions/animations/request-across-layers/README.md +24 -0
- package/instructions/animations/request-across-layers/animation.html +85 -0
- package/instructions/animations/request-across-layers/block.json +17 -0
- package/instructions/animations/request-across-layers/frames.json +58 -0
- package/instructions/animations/request-across-layers/scenarios.json +12 -0
- package/instructions/animations/request-timing/README.md +22 -0
- package/instructions/animations/request-timing/animation.html +120 -0
- package/instructions/animations/request-timing/block.json +21 -0
- package/instructions/animations/request-timing/markers.json +32 -0
- package/instructions/animations/request-timing/scenarios.json +4 -0
- package/instructions/animations/retry-backoff/README.md +22 -0
- package/instructions/animations/retry-backoff/animation.html +122 -0
- package/instructions/animations/retry-backoff/block.json +10 -0
- package/instructions/animations/retry-backoff/frames.json +65 -0
- package/instructions/animations/retry-backoff/scenarios.json +12 -0
- package/instructions/animations/state-machine/README.md +24 -0
- package/instructions/animations/state-machine/animation.html +95 -0
- package/instructions/animations/state-machine/block.json +9 -0
- package/instructions/animations/state-machine/frames.json +79 -0
- package/instructions/animations/state-machine/scenarios.json +12 -0
- package/instructions/animations/video-platform-architecture/README.md +24 -0
- package/instructions/animations/video-platform-architecture/animation.html +76 -0
- package/instructions/animations/video-platform-architecture/block.json +17 -0
- package/instructions/animations/video-platform-architecture/frames.json +97 -0
- package/instructions/animations/video-platform-architecture/scenarios.json +28 -0
- package/instructions/whiteboard.d.ts +168 -14
- package/package.json +4 -4
- package/src/animation-stage-kit.ts +150 -10
- package/src/cli-runner.ts +4 -1
- package/src/fixtures/blocks/clip.json +19 -0
- package/src/review-api/README.md +1 -0
- package/src/review-api/agent-cli.ts +3 -2
- package/src/review-api/animation-drafts.ts +151 -47
- package/src/review-api/animation-references.ts +92 -0
- package/src/review-api/animation-render.ts +106 -0
- package/src/review-api/authoring-tools.ts +10 -3
- package/src/review-api/document-text.ts +27 -12
- package/src/review-api/http.ts +52 -6
- package/src/review-api/instructions.ts +1 -1
- package/src/review-api/mcp.ts +10 -5
- package/src/review-api/public-tools.ts +71 -2
- package/src/review-api/store.ts +89 -12
- package/src/server/desktop-server.ts +17 -5
- package/src/server/headless-host.ts +4 -0
- package/src/server/review-gateway.ts +1 -0
- package/src/server/review-server-core.ts +71 -12
- package/src/sharing/client.ts +129 -32
- package/src/sharing/export.ts +42 -5
- package/src/sharing/file.ts +8 -0
- package/src/sharing/host.ts +202 -73
- package/src/sharing/import.ts +125 -33
- package/src/ui-telemetry-events.ts +25 -1
- package/dist/agent-cli-B8KBHuh_.js +0 -2
- package/dist/profile-BjcXi-oH.js +0 -2
|
@@ -298,6 +298,8 @@ const animationScenarioSchema = z.strictObject({
|
|
|
298
298
|
label: z.string().min(1).max(32).describe("What the reader picks above the animation, e.g. Retried request. Keep it short."),
|
|
299
299
|
frames: z.array(handle).min(1).max(60).describe("The frame keys this scenario plays, in order.")
|
|
300
300
|
});
|
|
301
|
+
/** One named source range of an animation or clip: an anchor, or one with
|
|
302
|
+
* the label it opens under. */
|
|
301
303
|
const animationCodeSchema = z.union([anchorSchema, z.strictObject({
|
|
302
304
|
source: anchorSchema,
|
|
303
305
|
label: z.string().min(1).max(48).describe("What the range is, e.g. checkoutAnimation.")
|
|
@@ -505,6 +507,40 @@ const callout = {
|
|
|
505
507
|
schema: calloutSchema
|
|
506
508
|
};
|
|
507
509
|
//#endregion
|
|
510
|
+
//#region ../whiteboard-document/src/blocks/clip.ts
|
|
511
|
+
const clipMarkerSchema = z.strictObject({
|
|
512
|
+
key: handle.describe("Names the marker for the html: clip.marker(key) places it in time, and whiteboard.on(key, ...) runs as the playhead reaches it."),
|
|
513
|
+
title: label$1.describe("What the step strip under the clip shows for this marker, e.g. Lock taken. Keep it to a few words."),
|
|
514
|
+
caption: text$1.optional().describe("One or two short sentences shown under the clip."),
|
|
515
|
+
code: z.array(handle).min(1).max(8).optional().describe("The code this moment shows, by name in the block's code. The tour stops here with it.")
|
|
516
|
+
});
|
|
517
|
+
const clipScenarioSchema = z.strictObject({
|
|
518
|
+
key: handle.describe("Names the scenario: whiteboard.clip(key) builds its timeline."),
|
|
519
|
+
label: z.string().min(1).max(32).describe("What the reader picks above the clip, e.g. Slow replica. Keep it short.")
|
|
520
|
+
});
|
|
521
|
+
const clip = {
|
|
522
|
+
type: "clip",
|
|
523
|
+
reference: ["- clip {title, html, markers: {key, title (a few words), caption?, code? ([names in code] this moment shows)}[] (1 to 60), scenarios?: {key, label}[] (2 to 8, each a timeline the script builds), code?: {name: anchor | {source: anchor, label}}, height?: \"auto\" (default) | number (120 to 1200 CSS px), pins?}; the script places every marker in time", "Use a clip for continuous motion where the timing itself is the point: a token crossing a system, a race, a queue draining. The reader plays it, pauses it and jumps between its markers. Use an animation instead when the reader needs to compare discrete states. Read session_get_instructions({topic:\"animation\"}) before writing one."],
|
|
524
|
+
schema: defineBlock("clip", {
|
|
525
|
+
title: label$1,
|
|
526
|
+
html: text$1.min(1).max(2e5).describe("The clip's body markup: elements, <style> and <script>. Its script builds the timeline with whiteboard.clip() in a sandboxed iframe; see session_get_instructions({topic:\"animation\"})."),
|
|
527
|
+
markers: z.array(clipMarkerSchema).min(1).max(60).describe("The named moments the reader jumps between, with unique, stable keys. The script places each one in time."),
|
|
528
|
+
scenarios: z.array(clipScenarioSchema).min(2).max(8).optional().describe("Alternate timelines the script builds, one per key. The whiteboard draws a labelled scenario picker above the clip and starts on the first one."),
|
|
529
|
+
code: z.record(handle, animationCodeSchema).default({}).describe("Source ranges by name, each an anchor or {source, label}: the label names the range where it opens. Elements with data-wb-open open them; data-wb-code shows one inline."),
|
|
530
|
+
height: z.union([z.literal("auto"), z.number().int().min(120).max(1200)]).default("auto").describe("Fit the clip to its content by default, or set a fixed height in CSS pixels."),
|
|
531
|
+
pins: elementPins
|
|
532
|
+
}),
|
|
533
|
+
check(block) {
|
|
534
|
+
if (new Set(block.markers.map((marker) => marker.key)).size !== block.markers.length) throw new ReviewInputError("Clip marker keys must be unique within the clip.");
|
|
535
|
+
for (const marker of block.markers) {
|
|
536
|
+
const unknown = marker.code?.find((name) => !(name in block.code));
|
|
537
|
+
if (unknown) throw new ReviewInputError(`Marker "${marker.key}" lists code "${unknown}", which the clip's code does not name.`);
|
|
538
|
+
}
|
|
539
|
+
const scenarios = block.scenarios ?? [];
|
|
540
|
+
if (new Set(scenarios.map((scenario) => scenario.key)).size !== scenarios.length) throw new ReviewInputError("Clip scenario keys must be unique within the clip.");
|
|
541
|
+
}
|
|
542
|
+
};
|
|
543
|
+
//#endregion
|
|
508
544
|
//#region ../whiteboard-document/src/blocks/code.ts
|
|
509
545
|
/** Shared with sequence steps. */
|
|
510
546
|
const codeFields = {
|
|
@@ -769,7 +805,8 @@ const leafSchema = z.discriminatedUnion("type", [
|
|
|
769
805
|
trace_quote.schema,
|
|
770
806
|
software_map.schema,
|
|
771
807
|
flow_diagram.schema,
|
|
772
|
-
animation.schema
|
|
808
|
+
animation.schema,
|
|
809
|
+
clip.schema
|
|
773
810
|
]);
|
|
774
811
|
/** Every block kind, keyed by type. A kind without a definition is a compile error. */
|
|
775
812
|
const blocks = {
|
|
@@ -785,6 +822,7 @@ const blocks = {
|
|
|
785
822
|
software_map,
|
|
786
823
|
flow_diagram,
|
|
787
824
|
animation,
|
|
825
|
+
clip,
|
|
788
826
|
section,
|
|
789
827
|
callout
|
|
790
828
|
};
|
|
@@ -804,7 +842,8 @@ const referenceOrder = [
|
|
|
804
842
|
"flow_diagram",
|
|
805
843
|
"call_stack_diff",
|
|
806
844
|
"database_lens",
|
|
807
|
-
"animation"
|
|
845
|
+
"animation",
|
|
846
|
+
"clip"
|
|
808
847
|
];
|
|
809
848
|
/** The selected blocks' fields, for agent guidance. */
|
|
810
849
|
function componentReference(types = writableBlockTypes) {
|
|
@@ -1736,8 +1775,8 @@ const unitTypes = /* @__PURE__ */ new Set([
|
|
|
1736
1775
|
"flow_edge"
|
|
1737
1776
|
]);
|
|
1738
1777
|
const isUnit = (element) => unitTypes.has(element.type);
|
|
1739
|
-
/** The reference id of a code peek an animation names: the canvas
|
|
1740
|
-
* peek's resolved anchor by it. */
|
|
1778
|
+
/** The reference id of a code peek an animation or clip names: the canvas
|
|
1779
|
+
* finds the peek's resolved anchor by it. */
|
|
1741
1780
|
const animationCodeId = (blockId, name) => `${blockId}:code:${name}`;
|
|
1742
1781
|
/** Rewrites old review-source: and review-trace: links to their whiteboard: form. */
|
|
1743
1782
|
function canonicalLink(href) {
|
|
@@ -1921,7 +1960,7 @@ function documentReferences(document, { tolerant = false, markdown = true, repos
|
|
|
1921
1960
|
label: attachment.label,
|
|
1922
1961
|
peek: true
|
|
1923
1962
|
})))));
|
|
1924
|
-
if (element.type === "animation") return Object.entries(element.code).flatMap(([name, entry]) => {
|
|
1963
|
+
if (element.type === "animation" || element.type === "clip") return Object.entries(element.code).flatMap(([name, entry]) => {
|
|
1925
1964
|
const code = animationCode(entry);
|
|
1926
1965
|
return select(code.source, element.pins).map((source) => ({
|
|
1927
1966
|
id: animationCodeId(element.id, name),
|
|
@@ -285,6 +285,13 @@ const loopbackOriginSchema = urlSchema("origin", (url) => url.protocol === "http
|
|
|
285
285
|
const REVIEW_DIFF_LAYOUTS = ["split", "unified"];
|
|
286
286
|
const REVIEW_DIFF_LAYOUT_SCOPES = ["diff", "peek"];
|
|
287
287
|
const REVIEW_COLOR_THEME_KINDS = ["dark", "light"];
|
|
288
|
+
const REVIEW_OPEN_FILES_IN_CHOICES = [
|
|
289
|
+
"whiteboard",
|
|
290
|
+
"vscode",
|
|
291
|
+
"cursor",
|
|
292
|
+
"zed",
|
|
293
|
+
"application"
|
|
294
|
+
];
|
|
288
295
|
const reviewDiffrLoginsSchema = z.record(z.string(), z.object({
|
|
289
296
|
ready: z.boolean(),
|
|
290
297
|
message: z.string().optional()
|
|
@@ -834,6 +841,14 @@ const ReviewVerbRequestSchema = z.discriminatedUnion("name", [
|
|
|
834
841
|
reviewId: apiReviewIdSchema,
|
|
835
842
|
version: z.number().int().nonnegative().optional()
|
|
836
843
|
})
|
|
844
|
+
}),
|
|
845
|
+
z.strictObject({
|
|
846
|
+
name: z.literal("renderAnimation"),
|
|
847
|
+
args: z.strictObject({
|
|
848
|
+
reviewId: apiReviewIdSchema,
|
|
849
|
+
targetId: requiredString$1,
|
|
850
|
+
frame: requiredString$1
|
|
851
|
+
})
|
|
837
852
|
})
|
|
838
853
|
]);
|
|
839
854
|
const ReviewVerbResponseSchema = z.discriminatedUnion("ok", [z.strictObject({
|
|
@@ -1189,4 +1204,4 @@ function formatIssuePath(path) {
|
|
|
1189
1204
|
return output;
|
|
1190
1205
|
}
|
|
1191
1206
|
//#endregion
|
|
1192
|
-
export {
|
|
1207
|
+
export { ReviewFeedbackSchema as A, REVIEW_REMOTE_ATTACH_END as C, ReviewCliInstallStampSchema as D, ReviewApiSelectionSourceSchema as E, reviewDiffrSummarizerInputSchema as F, applyStructuralUpdate as I, decodeStructuralDiffEvent as L, ReviewOnboardingRunRequestSchema as M, ReviewSelectedDiffSchema as N, ReviewConnectRequestSchema as O, reviewDiffrLoginsSchema as P, structuralChangeCounts as R, REVIEW_REMOTE_ATTACH_BEGIN as S, REVIEW_REMOTE_WRAPPER_MARK as T, REVIEW_DIFF_LAYOUTS as _, parseReviewVerbRequest as a, REVIEW_OPEN_FILES_IN_CHOICES 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, ReviewGatewayHostSchema as j, ReviewFeedbackContactSchema 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_INSTALL_LOCK as w, REVIEW_REMOTE_AGENT_IDS as x, REVIEW_HOST_HEADER as y };
|
package/dist/{stored-document-migration-iwIQ4l5G.js → stored-document-migration-D1wK4yID.js}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { C as renderVcsArgs, v as parseGitRemote, w as runVcs } from "./src-Y30gweiK.js";
|
|
2
2
|
import { d as isBooleanValue, f as isNumberValue, l as jsonValueSchema, m as isStringValue, n as isJsonObject } from "./src-X9phtB2j.js";
|
|
3
|
-
import { C as respellLinks, H as lensTargetsSchema, W as label, at as unionIntervals, et as formatAnchor, ot as ReviewInputError } from "./src-
|
|
4
|
-
import "./src-
|
|
5
|
-
import "./review-home-paths-
|
|
3
|
+
import { C as respellLinks, H as lensTargetsSchema, W as label, at as unionIntervals, et as formatAnchor, ot as ReviewInputError } from "./src-BQDlJXkG.js";
|
|
4
|
+
import "./src-CrrW7lcY.js";
|
|
5
|
+
import "./review-home-paths-BmZX2qiz.js";
|
|
6
6
|
import { t as errorMessage } from "./error-message-OtiDonty.js";
|
|
7
7
|
import { randomUUID } from "node:crypto";
|
|
8
8
|
import { z } from "zod";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { E as ReviewApiSelectionSourceSchema, N as ReviewSelectedDiffSchema } from "./src-CrrW7lcY.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { stat } from "node:fs/promises";
|
|
4
4
|
//#region src/fs-utils.ts
|