@enhance-eng/enhance 0.1.165 → 0.1.167
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/{cli-output-identity.lib-Z9ISwnoo.mjs → cli-output-identity.lib-DbOpumEM.mjs} +253 -15
- package/dist/main.mjs +203 -89
- package/dist/{mcp-invocation.adapter-Cn7Cr0UH.mjs → mcp-invocation.adapter-CUyCBfrk.mjs} +3 -3
- package/dist/mcp-main.mjs +7 -7
- package/dist/{mcp-server.adapter-DJ2BZrIw.mjs → mcp-server.adapter-KDg3Ektd.mjs} +14 -10
- package/dist/mcp.mjs +2 -2
- package/dist/remote-mcp-main.mjs +5 -5
- package/dist/{zod-messages.lib-BrqCGdLn.mjs → zod-messages.lib-Cs57z-_f.mjs} +5 -5
- package/package.json +1 -1
|
@@ -2465,13 +2465,14 @@ const canvasSceneNodeSchema = z.looseObject({
|
|
|
2465
2465
|
props: z.record(z.string(), z.unknown()).optional(),
|
|
2466
2466
|
box: canvasSceneBoxSchema.optional()
|
|
2467
2467
|
});
|
|
2468
|
+
const canvasSceneRelationshipSchema = z.object({
|
|
2469
|
+
parentId: z.string().min(1),
|
|
2470
|
+
sortKey: z.string().min(1)
|
|
2471
|
+
});
|
|
2468
2472
|
const canvasSceneDocumentSchema = z.object({
|
|
2469
2473
|
version: z.literal(15),
|
|
2470
2474
|
nodes: z.record(z.string(), canvasSceneNodeSchema),
|
|
2471
|
-
relationships: z.record(z.string(),
|
|
2472
|
-
parentId: z.string().min(1),
|
|
2473
|
-
sortKey: z.string().min(1)
|
|
2474
|
-
})),
|
|
2475
|
+
relationships: z.record(z.string(), canvasSceneRelationshipSchema),
|
|
2475
2476
|
tombstones: z.record(z.string(), z.literal(true)).default({})
|
|
2476
2477
|
});
|
|
2477
2478
|
const legacyRecordSchema = z.record(z.string(), z.unknown());
|
|
@@ -2482,14 +2483,20 @@ const canvasReadableSceneDocumentSchema = z.preprocess((value) => {
|
|
|
2482
2483
|
if (Object.keys(blob).length === 0) return emptyCanvasSceneDocument();
|
|
2483
2484
|
return adaptCanvasDocumentFormat(blob);
|
|
2484
2485
|
}, canvasSceneDocumentSchema);
|
|
2485
|
-
|
|
2486
|
-
|
|
2486
|
+
/** A document's version, or the read result that refuses it before anything else is read. */
|
|
2487
|
+
const refusedVersionOf = (blob) => {
|
|
2487
2488
|
const version = blob["version"];
|
|
2488
2489
|
if (version !== void 0 && (typeof version !== "number" || !Number.isSafeInteger(version) || version < 1)) return { status: "invalid" };
|
|
2489
2490
|
if (version !== void 0 && version > 15) return {
|
|
2490
2491
|
status: "unsupported",
|
|
2491
2492
|
formatVersion: version
|
|
2492
2493
|
};
|
|
2494
|
+
return null;
|
|
2495
|
+
};
|
|
2496
|
+
const readCanvasSceneDocument = (blob) => {
|
|
2497
|
+
if (blob === void 0) return { status: "missing" };
|
|
2498
|
+
const refused = refusedVersionOf(blob);
|
|
2499
|
+
if (refused !== null) return refused;
|
|
2493
2500
|
const parsed = canvasReadableSceneDocumentSchema.safeParse(blob);
|
|
2494
2501
|
return parsed.success ? {
|
|
2495
2502
|
status: "current",
|
|
@@ -2510,6 +2517,10 @@ const emptyCanvasSceneDocument = () => ({
|
|
|
2510
2517
|
relationships: {},
|
|
2511
2518
|
tombstones: {}
|
|
2512
2519
|
});
|
|
2520
|
+
const shellSchema = canvasSceneDocumentSchema.extend({
|
|
2521
|
+
nodes: z.record(z.string(), z.unknown()),
|
|
2522
|
+
relationships: z.record(z.string(), z.unknown())
|
|
2523
|
+
});
|
|
2513
2524
|
|
|
2514
2525
|
//#endregion
|
|
2515
2526
|
//#region ../../packages/contract/src/canvas/canvas-conversion-draft.schema.ts
|
|
@@ -8981,10 +8992,16 @@ const recordingAssetPath = (assetBundleId, urlHash) => `${RECORDING_ASSET_PATH_P
|
|
|
8981
8992
|
|
|
8982
8993
|
//#endregion
|
|
8983
8994
|
//#region ../../packages/contract/src/recording/unsupported-surface-style.lib.ts
|
|
8995
|
+
const CROSS_LINE = "transparent calc(50% - 2px), rgba(255, 255, 255, 0.85) calc(50% - 1px), #a8a8b0 50%, rgba(255, 255, 255, 0.85) calc(50% + 1px), transparent calc(50% + 2px)";
|
|
8996
|
+
/**
|
|
8997
|
+
* The cross a placeholder draws, as a CSS background image. Each line is grey with a light edge:
|
|
8998
|
+
* a placeholder has no fill, so its cross must read over whatever the page shows behind it.
|
|
8999
|
+
*/
|
|
9000
|
+
const UNSUPPORTED_SURFACE_CROSS = `linear-gradient(to top right, ${CROSS_LINE}), linear-gradient(to bottom right, ${CROSS_LINE})`;
|
|
8984
9001
|
const SURFACE_RULE = `[data-enhance-unsupported]:not([data-enhance-unsupported-hidden]):not([style*="display: none"]) {
|
|
8985
9002
|
align-items: center !important;
|
|
8986
|
-
background-color:
|
|
8987
|
-
background-image:
|
|
9003
|
+
background-color: transparent !important;
|
|
9004
|
+
background-image: ${UNSUPPORTED_SURFACE_CROSS} !important;
|
|
8988
9005
|
border: 1px solid #c7c7cc !important;
|
|
8989
9006
|
box-sizing: border-box !important;
|
|
8990
9007
|
color: #4f4f55 !important;
|
|
@@ -9426,6 +9443,21 @@ const MAX_DURATION_MS$1 = 18e5;
|
|
|
9426
9443
|
const MAX_COUNT$1 = 1e6;
|
|
9427
9444
|
const MAX_BYTES = 1073741824;
|
|
9428
9445
|
const MAX_PROTOTYPE_OPEN_ATTEMPTS = 16;
|
|
9446
|
+
const MAX_SCRIPT_POSITION = 1e8;
|
|
9447
|
+
/** What the person was doing when a long frame ended; `idle` is nothing at all. */
|
|
9448
|
+
const longFrameActionSchema = z.enum([
|
|
9449
|
+
"pan",
|
|
9450
|
+
"zoom",
|
|
9451
|
+
"drag",
|
|
9452
|
+
"typing",
|
|
9453
|
+
"paste",
|
|
9454
|
+
"undo",
|
|
9455
|
+
"redo",
|
|
9456
|
+
"edit",
|
|
9457
|
+
"opening",
|
|
9458
|
+
"loading",
|
|
9459
|
+
"idle"
|
|
9460
|
+
]);
|
|
9429
9461
|
/** How the read of a canvas's unsaved browser copy ended when the canvas opened. */
|
|
9430
9462
|
const browserCopyCheckSchema = z.enum([
|
|
9431
9463
|
"answered",
|
|
@@ -9440,6 +9472,12 @@ const base$1 = {
|
|
|
9440
9472
|
releaseIdentity: z.string().min(1).max(100),
|
|
9441
9473
|
capabilityVersion: z.number().int().min(1).max(MAX_CAPABILITY_VERSION$1)
|
|
9442
9474
|
};
|
|
9475
|
+
const scriptSourceSchema = z.enum([
|
|
9476
|
+
"app",
|
|
9477
|
+
"extension",
|
|
9478
|
+
"third-party",
|
|
9479
|
+
"unknown"
|
|
9480
|
+
]);
|
|
9443
9481
|
const mainThreadWork = {
|
|
9444
9482
|
longTaskCount: countSchema,
|
|
9445
9483
|
longTaskTotalMs: durationSchema$1,
|
|
@@ -9449,12 +9487,7 @@ const mainThreadWork = {
|
|
|
9449
9487
|
loafLongestBlockingMs: durationSchema$1,
|
|
9450
9488
|
loafStyleAndLayoutMs: durationSchema$1,
|
|
9451
9489
|
loafTopScriptMs: durationSchema$1,
|
|
9452
|
-
loafTopScriptSource:
|
|
9453
|
-
"app",
|
|
9454
|
-
"extension",
|
|
9455
|
-
"third-party",
|
|
9456
|
-
"unknown"
|
|
9457
|
-
])
|
|
9490
|
+
loafTopScriptSource: scriptSourceSchema
|
|
9458
9491
|
};
|
|
9459
9492
|
const clientPerformanceInputSchema = z.discriminatedUnion("name", [
|
|
9460
9493
|
z.object({
|
|
@@ -9515,10 +9548,52 @@ const clientPerformanceInputSchema = z.discriminatedUnion("name", [
|
|
|
9515
9548
|
durationMs: durationSchema$1,
|
|
9516
9549
|
frameCount: countSchema,
|
|
9517
9550
|
slowFrameCount: countSchema,
|
|
9551
|
+
over16FrameCount: countSchema.optional(),
|
|
9552
|
+
over33FrameCount: countSchema.optional(),
|
|
9518
9553
|
worstFrameMs: durationSchema$1,
|
|
9519
9554
|
nodeCount: countSchema,
|
|
9520
9555
|
replayCount: countSchema
|
|
9521
9556
|
}),
|
|
9557
|
+
z.object({
|
|
9558
|
+
...base$1,
|
|
9559
|
+
name: z.literal("canvas_long_frame"),
|
|
9560
|
+
source: z.enum(["long-animation-frame", "longtask"]),
|
|
9561
|
+
action: longFrameActionSchema,
|
|
9562
|
+
durationMs: durationSchema$1,
|
|
9563
|
+
blockingMs: durationSchema$1,
|
|
9564
|
+
styleAndLayoutMs: durationSchema$1,
|
|
9565
|
+
topScriptMs: durationSchema$1,
|
|
9566
|
+
topScriptSource: scriptSourceSchema,
|
|
9567
|
+
topScriptInvoker: z.enum([
|
|
9568
|
+
"event-listener",
|
|
9569
|
+
"user-callback",
|
|
9570
|
+
"resolve-promise",
|
|
9571
|
+
"reject-promise",
|
|
9572
|
+
"classic-script",
|
|
9573
|
+
"module-script",
|
|
9574
|
+
"none"
|
|
9575
|
+
]),
|
|
9576
|
+
topScriptEvent: z.string().regex(/^[a-z]{1,32}$/u).optional(),
|
|
9577
|
+
topScriptFile: z.string().regex(/^[\w-][\w.-]{0,124}\.js$/u).optional(),
|
|
9578
|
+
topScriptFunction: z.string().regex(/^[\w$.]{1,80}$/u).optional(),
|
|
9579
|
+
topScriptPosition: z.number().int().min(0).max(MAX_SCRIPT_POSITION).optional(),
|
|
9580
|
+
layerCount: countSchema,
|
|
9581
|
+
topLayerCount: countSchema,
|
|
9582
|
+
builtLayerCount: countSchema,
|
|
9583
|
+
zoomPercent: countSchema,
|
|
9584
|
+
frameNumber: countSchema,
|
|
9585
|
+
skippedCount: countSchema,
|
|
9586
|
+
isPageFocused: z.boolean().optional()
|
|
9587
|
+
}),
|
|
9588
|
+
z.object({
|
|
9589
|
+
...base$1,
|
|
9590
|
+
name: z.literal("canvas_long_frames_skipped"),
|
|
9591
|
+
action: longFrameActionSchema,
|
|
9592
|
+
frameCount: countSchema,
|
|
9593
|
+
totalMs: durationSchema$1,
|
|
9594
|
+
worstMs: durationSchema$1,
|
|
9595
|
+
reason: z.enum(["bound", "not-blocking"]).optional()
|
|
9596
|
+
}),
|
|
9522
9597
|
z.object({
|
|
9523
9598
|
...base$1,
|
|
9524
9599
|
name: z.literal("canvas_measurement"),
|
|
@@ -10443,6 +10518,164 @@ var PartialBatchError = class extends CliError {
|
|
|
10443
10518
|
}
|
|
10444
10519
|
};
|
|
10445
10520
|
|
|
10521
|
+
//#endregion
|
|
10522
|
+
//#region src/application/skill-texts.use-case.ts
|
|
10523
|
+
/** The skills, by the short name each has before a surface names it. */
|
|
10524
|
+
const SKILL_NAMES = [
|
|
10525
|
+
"capture",
|
|
10526
|
+
"design-on-canvas",
|
|
10527
|
+
"publish-prototype",
|
|
10528
|
+
"respond-to-feedback",
|
|
10529
|
+
"apply-canvas-design"
|
|
10530
|
+
];
|
|
10531
|
+
/** A skill's name could not be written for a surface: the surface has no name for a capability. */
|
|
10532
|
+
var SkillTextError = class extends Error {
|
|
10533
|
+
constructor(skill, capability, surface) {
|
|
10534
|
+
super(`The ${skill} skill names ${capability}, which has no ${surface === "cli" ? "command" : "tool"}.`);
|
|
10535
|
+
this.name = "SkillTextError";
|
|
10536
|
+
}
|
|
10537
|
+
};
|
|
10538
|
+
const wordsOf = (skill, wording) => {
|
|
10539
|
+
const named = (capability) => {
|
|
10540
|
+
const name = wording.nameOf(capability);
|
|
10541
|
+
if (name === void 0) throw new SkillTextError(skill, capability, wording.surface);
|
|
10542
|
+
return wording.surface === "cli" ? `${wording.command} ${name}` : name;
|
|
10543
|
+
};
|
|
10544
|
+
const isTool = wording.surface === "cli";
|
|
10545
|
+
return {
|
|
10546
|
+
call: (capability) => `\`${named(capability)}\``,
|
|
10547
|
+
two: (words) => words[wording.surface],
|
|
10548
|
+
learn: (capability, what) => isTool ? `\`${named(capability)} --help\` shows how to ${what}.` : `The description of \`${named(capability)}\` shows how to ${what}.`,
|
|
10549
|
+
learnBoth: (first, second, what) => isTool ? `\`${named(first)} --help\` and \`${named(second)} --help\` show how to ${what}.` : `The descriptions of \`${named(first)}\` and \`${named(second)}\` show how to ${what}.`,
|
|
10550
|
+
command: isTool ? wording.command : ""
|
|
10551
|
+
};
|
|
10552
|
+
};
|
|
10553
|
+
/** The heading over a skill's list: the tool has commands, and the plugin has tools. */
|
|
10554
|
+
const listHeading = ({ two }) => two({
|
|
10555
|
+
cli: "## Commands",
|
|
10556
|
+
mcp: "## Tools"
|
|
10557
|
+
});
|
|
10558
|
+
/**
|
|
10559
|
+
* Each skill states its goal and names what the surface offers for it; the commands' own help
|
|
10560
|
+
* and the tools' own descriptions teach the rest. A line is added only when measured runs are
|
|
10561
|
+
* worse without it; `skill-evaluation` holds the cases and what the last runs found.
|
|
10562
|
+
*/
|
|
10563
|
+
const SKILLS = {
|
|
10564
|
+
capture: {
|
|
10565
|
+
job: "capturing screens",
|
|
10566
|
+
description: "Put the screens a thread is changing onto an Enhance canvas as editable frames and return the link. Use when asked to capture, share or review screens, or to put work on a canvas. Also applies whenever a thread has changed how a screen looks: when that work is done, offer once, in one line, to put the changed screens on an Enhance canvas for review, and capture only on a yes.",
|
|
10567
|
+
body: ({ call, two, command }) => `# Capture screens to Enhance
|
|
10568
|
+
|
|
10569
|
+
Put each screen this thread is changing onto one Enhance canvas as an editable frame, and return the canvas link.
|
|
10570
|
+
|
|
10571
|
+
${two({
|
|
10572
|
+
cli: `## Commands
|
|
10573
|
+
|
|
10574
|
+
- \`${command} canvas create --title "<what this thread is changing>"\` makes the canvas and answers with its id and its link.
|
|
10575
|
+
- \`${command} canvas capture-page --help\` shows the two calls one capture takes, with an example. Read it before the first capture.
|
|
10576
|
+
- \`${command} auth status\` says who is signed in. If nobody is, ask the person to run \`${command} setup\`.`,
|
|
10577
|
+
mcp: `## Tools
|
|
10578
|
+
|
|
10579
|
+
- ${call("canvas.create")} with a \`title\` of what this thread is changing makes the canvas and answers with its id and its link.
|
|
10580
|
+
- ${call("canvas.capturePage")} puts one page on the canvas. Its description gives the two calls one capture takes. Read it before the first capture.
|
|
10581
|
+
- ${call("auth.status")} says who is signed in. If nobody is, call ${call("auth.login")}.`
|
|
10582
|
+
})}
|
|
10583
|
+
`
|
|
10584
|
+
},
|
|
10585
|
+
"design-on-canvas": {
|
|
10586
|
+
job: "designing on a canvas",
|
|
10587
|
+
description: "Create or revise editable product designs on an Enhance canvas using the product's real screens, components, tokens, and visual language. Use for mocks, screen exploration, and canvas design iteration.",
|
|
10588
|
+
body: (words) => {
|
|
10589
|
+
const { call, two, learn } = words;
|
|
10590
|
+
return `# Design on the canvas
|
|
10591
|
+
|
|
10592
|
+
Create or change editable screens on an Enhance canvas, look at what you made, and give the canvas link.
|
|
10593
|
+
|
|
10594
|
+
${listHeading(words)}
|
|
10595
|
+
|
|
10596
|
+
- ${two({
|
|
10597
|
+
cli: `\`${words.command} canvas create --title "<what this is>"\``,
|
|
10598
|
+
mcp: `${call("canvas.create")} with a \`title\``
|
|
10599
|
+
})} makes a canvas and answers with its id and its link.
|
|
10600
|
+
- ${learn("canvas.read", "read what a canvas holds: its outline, or one screen as HTML")}
|
|
10601
|
+
- ${learn("canvas.insertHtml", "add a screen as HTML, with an example")} Read it before the first insert.
|
|
10602
|
+
- ${learn("canvas.updateHtml", "change a screen that is already there")}
|
|
10603
|
+
- ${learn("canvas.importAsset", "bring in an image or a font")}
|
|
10604
|
+
- ${learn("canvas.render", "get a picture of a screen")}
|
|
10605
|
+
`;
|
|
10606
|
+
}
|
|
10607
|
+
},
|
|
10608
|
+
"publish-prototype": {
|
|
10609
|
+
job: "publishing a prototype",
|
|
10610
|
+
description: "Publish a selected product build to an Enhance canvas and visually verify its prototype. Use for publishing, attaching, refreshing or validating a local build folder or an authorized uploaded build artifact.",
|
|
10611
|
+
body: (words) => {
|
|
10612
|
+
const { learn } = words;
|
|
10613
|
+
return `# Publish a prototype
|
|
10614
|
+
|
|
10615
|
+
Publish a built site to an Enhance canvas as a prototype people can click through, and give the canvas link.
|
|
10616
|
+
|
|
10617
|
+
${listHeading(words)}
|
|
10618
|
+
|
|
10619
|
+
- ${learn("prototype.publish", "publish a build folder to a canvas, and how to update a prototype that is already there")} Read it before the first publish.
|
|
10620
|
+
- ${learn("canvas.read", "read what the canvas holds, including a prototype already on it")}
|
|
10621
|
+
`;
|
|
10622
|
+
}
|
|
10623
|
+
},
|
|
10624
|
+
"respond-to-feedback": {
|
|
10625
|
+
job: "responding to feedback",
|
|
10626
|
+
description: "Act on clear Enhance canvas and prototype feedback, implement the underlying change, republish when needed, and verify the result. Use when a user asks to address, resolve, or work through review comments.",
|
|
10627
|
+
body: (words) => {
|
|
10628
|
+
const { learn, learnBoth } = words;
|
|
10629
|
+
return `# Respond to feedback
|
|
10630
|
+
|
|
10631
|
+
Do what each clear review comment on an Enhance canvas asks, on the canvas or in the source its prototype was published from. Reply to and resolve the ones you finished, and leave open the ones you could not act on.
|
|
10632
|
+
|
|
10633
|
+
${listHeading(words)}
|
|
10634
|
+
|
|
10635
|
+
- ${learn("comment.list", "read the comment threads on a canvas")}
|
|
10636
|
+
- ${learnBoth("comment.reply", "comment.resolve", "answer a thread and resolve it")}
|
|
10637
|
+
- ${learnBoth("canvas.read", "canvas.updateHtml", "read a screen and change it")}
|
|
10638
|
+
- ${learn("prototype.publish", "update a prototype from changed source")}
|
|
10639
|
+
`;
|
|
10640
|
+
}
|
|
10641
|
+
},
|
|
10642
|
+
"apply-canvas-design": {
|
|
10643
|
+
job: "applying a canvas design",
|
|
10644
|
+
description: "Implement an approved or edited Enhance canvas design in the owning product source, republish it, and verify source-to-design fidelity. Use for canvas-to-code or canvas-to-prototype handoff.",
|
|
10645
|
+
body: (words) => {
|
|
10646
|
+
const { learn } = words;
|
|
10647
|
+
return `# Apply a canvas design
|
|
10648
|
+
|
|
10649
|
+
Make the product's source match an approved design on an Enhance canvas, then update the prototype on that canvas from the new build.
|
|
10650
|
+
|
|
10651
|
+
${listHeading(words)}
|
|
10652
|
+
|
|
10653
|
+
- ${learn("canvas.read", "read the design: the canvas's outline, or one screen as HTML")}
|
|
10654
|
+
- ${learn("canvas.render", "get a picture of a screen")}
|
|
10655
|
+
- ${learn("prototype.publish", "update the prototype that is already on the canvas")} Read it before publishing.
|
|
10656
|
+
`;
|
|
10657
|
+
}
|
|
10658
|
+
}
|
|
10659
|
+
};
|
|
10660
|
+
/**
|
|
10661
|
+
* Every skill, written for one surface. The tool's are named after its command, so the production
|
|
10662
|
+
* and development tools never overwrite one another's; the plugin's host names them itself.
|
|
10663
|
+
*/
|
|
10664
|
+
const skillTextsFor = (wording) => SKILL_NAMES.map((skill) => {
|
|
10665
|
+
const source = SKILLS[skill];
|
|
10666
|
+
const name = wording.surface === "cli" ? `${wording.commandName}-${skill}` : skill;
|
|
10667
|
+
const body = source.body(wordsOf(skill, wording));
|
|
10668
|
+
return {
|
|
10669
|
+
skill,
|
|
10670
|
+
name,
|
|
10671
|
+
description: source.description,
|
|
10672
|
+
body,
|
|
10673
|
+
text: `---\nname: ${name}\ndescription: ${source.description}\n---\n\n${body}`
|
|
10674
|
+
};
|
|
10675
|
+
});
|
|
10676
|
+
/** The job each skill is for, in the order of the skills, for a sentence that lists them. */
|
|
10677
|
+
const SKILL_JOBS = SKILL_NAMES.map((skill) => SKILLS[skill].job);
|
|
10678
|
+
|
|
10446
10679
|
//#endregion
|
|
10447
10680
|
//#region src/infrastructure/mcp-tool-names.consts.ts
|
|
10448
10681
|
/** The tool a hosted assistant calls for each capability that has one of its own. */
|
|
@@ -10469,6 +10702,7 @@ const MCP_TOOL_BY_CAPABILITY = {
|
|
|
10469
10702
|
"comment.resolve": "feedback_set_resolved",
|
|
10470
10703
|
"comment.start": "feedback_create",
|
|
10471
10704
|
"operation.status": "operation_status",
|
|
10705
|
+
"prototype.publish": "prototype_publish",
|
|
10472
10706
|
"prototype.publishCanvas": "prototype_publish"
|
|
10473
10707
|
};
|
|
10474
10708
|
|
|
@@ -18790,6 +19024,8 @@ const clientConversionTelemetryRoute = () => baseProcedure.input(clientConversio
|
|
|
18790
19024
|
//#endregion
|
|
18791
19025
|
//#region ../api/src/shared/observability/client-performance-telemetry.router.ts
|
|
18792
19026
|
const SLOW_PROTOTYPE_OPEN_MS = 5e3;
|
|
19027
|
+
/** A number, like the other flags, so a query can filter and sum it; 1 unless the line says no. */
|
|
19028
|
+
const focusedPageFlagOf = (input) => input.name === "canvas_long_frame" && input.isPageFocused === false ? 0 : 1;
|
|
18793
19029
|
const fieldsOf$1 = (input) => {
|
|
18794
19030
|
const { name, ...fields } = input;
|
|
18795
19031
|
const isPrototypeOpen = input.name === "prototype_open" && (input.kind ?? "open") === "open";
|
|
@@ -18805,6 +19041,7 @@ const fieldsOf$1 = (input) => {
|
|
|
18805
19041
|
"unavailable"
|
|
18806
19042
|
].includes(input.outcome) ? 1 : 0,
|
|
18807
19043
|
isJanky: input.name === "canvas_interaction" && input.outcome === "janky" ? 1 : 0,
|
|
19044
|
+
isFocusedPage: focusedPageFlagOf(input),
|
|
18808
19045
|
isRealtimeFailure: input.name === "canvas_realtime" && input.outcome === "failed" ? 1 : 0,
|
|
18809
19046
|
isPrototypeOpen: Number(isPrototypeOpen),
|
|
18810
19047
|
isPrototypeOpenFailure: isPrototypeOpen && input.outcome !== "loaded" && input.reason !== "denied" ? 1 : 0,
|
|
@@ -18817,6 +19054,7 @@ const isFailure$1 = (input) => {
|
|
|
18817
19054
|
if (input.name === "canvas_interaction") return input.outcome !== "smooth";
|
|
18818
19055
|
if (input.name === "prototype_open") return input.outcome !== "loaded";
|
|
18819
19056
|
if (input.name === "canvas_measurement") return true;
|
|
19057
|
+
if (input.name === "canvas_long_frame" || input.name === "canvas_long_frames_skipped") return false;
|
|
18820
19058
|
return input.outcome !== "succeeded";
|
|
18821
19059
|
};
|
|
18822
19060
|
const clientPerformanceTelemetryRoute = () => baseProcedure.input(clientPerformanceInputSchema).output(clientPerformanceOutputSchema).mutation(({ input, ctx }) => {
|
|
@@ -19733,4 +19971,4 @@ const withCommandInFailure = (value, commandName) => ({
|
|
|
19733
19971
|
});
|
|
19734
19972
|
|
|
19735
19973
|
//#endregion
|
|
19736
|
-
export { canvasAssetImportInputSchema as $,
|
|
19974
|
+
export { canvasAssetImportInputSchema as $, applyCanvasTypographyPatch as $n, canvasAxisStyleProperties as $r, inSurfaceWords as $t, recordingSnapshotCapabilityInputSchema as A, createAgentTokenOutputSchema as An, textOf as Ar, canvasSnapshotToken as At, operationStatusImageSchema as B, domLocatorSchema as Bn, canvasRenderTargetSchema as Br, canvasResourcesCursorSchema as Bt, PROCEDURE_DESCRIPTIONS as C, getPrototypePublishStatusOutputSchema as Cn, RECTANGLE_KIND as Cr, ROOT_FIELD as Ct, canvasWriteHtmlCapabilityInputSchema as D, getMeOutputSchema as Dn, applyCanvasOperationsOutputSchema as Dr, objectFieldNames as Dt, canvasRenderCapabilityInputSchema as E, submitPrototypeArtifactOutputSchema as En, applyCanvasOperationsInputSchema as Er, isInputRecord as Et, canvasPrototypeCapabilityInputSchema as F, commentAuthorSchema as Fn, canvasNodeStylePatchSchema as Fr, canvasReadInputSchema as Ft, canvasCaptureOutputSchema as G, replyCommentInputSchema as Gn, getCanvasRenderOutputSchema as Gr, hasCanvasReferenceScope as Gt, operationStatusOutputSchema as H, getCommentOutputSchema as Hn, createCanvasRenderOutputSchema as Hr, canvasReferenceNodeIds as Ht, canvasPrototypeInputSchema as I, commentCanvasContextSchema as In, createCanvasConversionOutputSchema as Ir, canvasReadOutputSchema as It, canvasDuplicateCapabilityInputSchema as J, screenElementCommentTargetSchema as Jn, emptyCanvasSceneDocument as Jr, callOf as Jt, canvasArrangeCapabilityInputSchema as K, replyCommentOutputSchema as Kn, canvasReadableSceneDocumentSchema as Kr, parseCanvasReference as Kt, canvasPrototypeIntentSchema as L, commentMessageSchema as Ln, getCanvasConversionOutputSchema as Lr, canvasUpdateHtmlCapabilityInputSchema as Lt, canvasCapturePageCapabilityInputSchema as M, listOrganisationsOutputSchema as Mn, saveCanvasDocumentOutputSchema as Mr, encodeCanvasExchangeToken as Mt, canvasCapturePageInputSchema as N, emptyFixtureDocument as Nn, wholeCanvasDocumentOutputSchema as Nr, resolveCanvasSnapshot as Nt, commentAttentionCapabilityInputSchema as O, MCP_AUTH_SCOPE as On, getCanvasMutationOutputSchema as Or, quotedValue as Ot, canvasCapturePageOutputSchema as P, withFixtureScreen as Pn, canvasOperationSchema as Pr, canvasOutlineCursorSchema as Pt, canvasAssetImportCapabilityInputSchema as Q, createCapturePassOutputSchema as Qn, canvasAuthoredStyleDeclarations as Qr, diagnosisStep as Qt, canvasPrototypeOutputSchema as R, commentResolverSchema as Rn, canvasRenderSourceStateSchema as Rr, canvasUpdateHtmlInputSchema as Rt, PROTOTYPE_UPDATE_GUIDANCE as S, getPrototypeArtifactCapabilitiesOutputSchema as Sn, PAGE_KIND as Sr, canvasEditsSchema as St, canvasReadCapabilityInputSchema as T, prototypeArtifactPathSchema as Tn, TEXT_KIND as Tr, inputProblemSummary as Tt, canvasCaptureCapabilityInputSchema as U, listCommentsInputSchema as Un, createRecordingSnapshotOutputSchema as Ur, canvasReferenceRenderTarget as Ut, operationStatusInputSchema as V, elementAnchorSchema as Vn, canvasWorldBoundsSchema as Vr, assertCanvasReferenceNodes as Vt, canvasCaptureInputSchema as W, listCommentsOutputSchema as Wn, downloadCanvasRenderOutputSchema as Wr, fromCanvasReference as Wt, canvasPreparationOutputSchema as X, screenTextCommentTargetSchema as Xn, canvasRecordedBoxNoteFor as Xr, commandName as Xt, canvasDuplicateInputSchema as Y, screenElementsCommentTargetSchema as Yn, canvasBoxSourceOf as Yr, cliPathOf as Yt, canvasWriteReceiptSchema as Z, startCommentInputSchema as Zn, canvasAuthoredLayoutValueOf as Zr, currentNodeIdStep as Zt, CANVAS_UPDATE_HTML_INPUT_EXAMPLE as _, CANVAS_BLEND_MODES as _i, startRecordingOutputSchema as _n, createCanvasPreparationOutputSchema as _r, canvasInsertHtmlCapabilityInputSchema as _t, createRouterShapeAdapter as a, canvasCssValue as ai, SKILL_NAMES as an, canvasCaptureSchema as ar, canvasRenderScopedToolInputSchema as at, ProcessExitError as b, canvasSchema as bi, createPrototypeArtifactOutputSchema as bn, GROUP_KIND as br, canvasMakeEditableInputSchema as bt, toKebabCase as c, reserveCanvasAssetOutputSchema as ci, CliError as cn, canvasRecordingPropsSchema as cr, canvasRemoveCapabilityInputSchema as ct, createMcpCapabilityDiscoveryAdapter as d, signedDownloadSchema as di, appErrorSchema as dn, canvasReferencePageOf as dr, canvasCreateToolOutputSchema as dt, canvasCssPixelValue as ei, inputName as en, canvasCssTypographyOwners as er, canvasAssetImportOutputSchema as et, toExitCode as f, canvasRichTextOf as fi, completeScreenOutputSchema as fn, resolveCanvasReference as fr, canvasFindCursorSchema as ft, toRemoteError as g, canvasAdditionalStyleSchema as gi, getRecordingOutputSchema as gn, agentClientMetadata as gr, listedCanvasesAnswerSchema as gt, toPublishedExitTable as h, CANVAS_RICH_TEXT_STYLE_PROPERTIES as hi, completeRecordingOutputSchema as hn, AGENT_CLIENT_HEADER as hr, createdCanvasAnswerSchema as ht, createLazyCapabilityCatalogAdapter as i, canvasCssTokens as ii, SKILL_JOBS as in, CAPTURE_LANDING_CONVERTING as ir, canvasRenderScopedInputSchema as it, transcriptReadCapabilityInputSchema as j, createOrganisationOutputSchema as jn, mapCanvasFontSources as jr, decodeCanvasExchangeToken as jt, prototypePublishCapabilityInputSchema as k, cliAuthConfigurationSchema as kn, canvasLayoutWithoutCssProperties as kr, canvasExchangeDigest as kt, toPresentedCapabilities as l, canvasFontAssetIdentityFromPath as li, isFormatRefusalError as ln, captureLandingSchema as lr, canvasRemoveInputSchema as lt, toMcpFailurePayload as m, hasCanvasRichTextPaints as mi, appendRecordingChunkOutputSchema as mn, canvasAgentActivityPhaseSchema as mr, canvasFindOutputSchema as mt, withCommandName as n, canvasLayoutPositionOf as ni, onSurface as nn, canvasTextPropsWithContent as nr, canvasRenderBatchResultSchema as nt, CAPTURE_PAGE_CALLS as o, canvasAssetUploadOutputSchema as oi, skillTextsFor as on, canvasConversionMetadataSchema as or, canvasRenderRequestSchema as ot, toFailurePayload as p, canvasRichTextValueOf as pi, createScreenOutputSchema as pn, beginCanvasActivityOutputSchema as pr, canvasFindInputSchema as pt, canvasArrangeInputSchema as q, screenAreaCommentTargetSchema as qn, canvasSceneDocumentSchema as qr, readStoredCanvasScene as qt, toCanvasAuthoringResult as r, canvasLayoutPriorityDeclarations as ri, MCP_TOOL_BY_CAPABILITY as rn, canvasTextRunsOf as rr, canvasRenderPendingSchema as rt, toCapabilityDefinition as s, reserveCanvasAssetInputSchema as si, PartialBatchError as sn, canvasPrototypePropsSchema as sr, canvasRenderFileSchema as st, withCommandInFailure as t, canvasLayoutMainAxisOf as ti, layerListName as tn, canvasTextChangeBetween as tr, canvasRenderBatchRequestSchema as tt, toSharedCapabilities as u, canvasImageAssetIdentityFromPath as ui, transcriptOutputSchema as un, DEFAULT_CANVAS_REFERENCE_PAGE_ID as ur, canvasCreateToolInputSchema as ut, CAPABILITY_UUID_EXAMPLE as v, canvasBlendModeSchema as vi, PROTOTYPE_ARTIFACT_MANIFEST_PATH as vn, getCanvasPreparationOutputSchema as vr, canvasInsertHtmlInputSchema as vt, canvasApplyCapabilityInputSchema as w, prototypeArtifactManifestSchema as wn, SCREEN_KIND as wr, inputProblemFields as wt, OPTION_DESCRIPTIONS as x, foldPrototypeArtifactPath as xn, IMAGE_KIND as xr, canvasEditCapabilityInputSchema as xt, createCapabilityPolicyAdapter as y, canvasPaintSchema as yi, attachPrototypeArtifactOutputSchema as yn, FRAME_KIND as yr, canvasMakeEditableCapabilityInputSchema as yt, canvasConversionStatusSchema as z, commentThreadSchema as zn, canvasRenderStateSchema as zr, canvasTranscriptCursorSchema as zt };
|
package/dist/main.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
import { A as canvasAngularGradientSvg, C as assertCanvasReferenceOperations, D as canvasLinearGradientSvg, E as canvasRadialGradientSvg, M as compareCanvasSortKeys, O as canvasFilterListCss, S as createCanvasActivityComposite, T as createAuthUseCase, _ as readCanvasReferenceScene, b as createEditCanvasComposite, c as createOauthLoopbackAdapter, d as isJsonValued, f as createCapabilityInvocationAdapter, g as createRenderFileAdapter, i as readCliEnvironment, j as canvasColorCss, k as canvasDiamondGradientSvg, l as toInputHelp, n as createMutationKeyAdapter, r as createHttpRemoteAdapter, s as readToolMachine, t as installZodMessages, u as withCapabilityNames, v as createWriteHtmlCanvasComposite, w as createRenderCanvasComposite, x as sceneAtVersion } from "./zod-messages.lib-
|
|
2
|
+
import { $r as canvasAxisStyleProperties, C as PROCEDURE_DESCRIPTIONS, Ct as ROOT_FIELD, Dt as objectFieldNames, Et as isInputRecord, Ft as canvasReadInputSchema, Gt as hasCanvasReferenceScope, Jr as emptyCanvasSceneDocument$1, Kt as parseCanvasReference, Lt as canvasUpdateHtmlCapabilityInputSchema, Mr as saveCanvasDocumentOutputSchema, Nn as emptyFixtureDocument, Nr as wholeCanvasDocumentOutputSchema, Ot as quotedValue, Pn as withFixtureScreen, Pr as canvasOperationSchema$1, Qr as canvasAuthoredStyleDeclarations, St as canvasEditsSchema, Tt as inputProblemSummary, Ut as canvasReferenceRenderTarget, V as operationStatusInputSchema, Vr as canvasWorldBoundsSchema$1, Vt as assertCanvasReferenceNodes, Wt as fromCanvasReference, Yt as cliPathOf, Zr as canvasAuthoredLayoutValueOf, Zt as currentNodeIdStep, _ as CANVAS_UPDATE_HTML_INPUT_EXAMPLE, _n as startRecordingOutputSchema, a as createRouterShapeAdapter, b as ProcessExitError, bi as canvasSchema$1, c as toKebabCase, cn as CliError, ct as canvasRemoveCapabilityInputSchema, d as createMcpCapabilityDiscoveryAdapter, dn as appErrorSchema$1, f as toExitCode, fn as completeScreenOutputSchema, h as toPublishedExitTable, hn as completeRecordingOutputSchema, i as createLazyCapabilityCatalogAdapter, it as canvasRenderScopedInputSchema, jn as createOrganisationOutputSchema, mn as appendRecordingChunkOutputSchema, mr as canvasAgentActivityPhaseSchema$1, n as withCommandName, on as skillTextsFor, p as toFailurePayload, pn as createScreenOutputSchema, pr as beginCanvasActivityOutputSchema, pt as canvasFindInputSchema, qt as readStoredCanvasScene, r as toCanvasAuthoringResult, ri as canvasLayoutPriorityDeclarations, rr as canvasTextRunsOf, sn as PartialBatchError, t as withCommandInFailure, ti as canvasLayoutMainAxisOf, u as toSharedCapabilities, v as CAPABILITY_UUID_EXAMPLE, wt as inputProblemFields, x as OPTION_DESCRIPTIONS, y as createCapabilityPolicyAdapter } from "./cli-output-identity.lib-DbOpumEM.mjs";
|
|
3
|
+
import { A as canvasAngularGradientSvg, C as assertCanvasReferenceOperations, D as canvasLinearGradientSvg, E as canvasRadialGradientSvg, M as compareCanvasSortKeys, O as canvasFilterListCss, S as createCanvasActivityComposite, T as createAuthUseCase, _ as readCanvasReferenceScene, b as createEditCanvasComposite, c as createOauthLoopbackAdapter, d as isJsonValued, f as createCapabilityInvocationAdapter, g as createRenderFileAdapter, i as readCliEnvironment, j as canvasColorCss, k as canvasDiamondGradientSvg, l as toInputHelp, n as createMutationKeyAdapter, r as createHttpRemoteAdapter, s as readToolMachine, t as installZodMessages, u as withCapabilityNames, v as createWriteHtmlCanvasComposite, w as createRenderCanvasComposite, x as sceneAtVersion } from "./zod-messages.lib-Cs57z-_f.mjs";
|
|
4
4
|
import { t as toCapabilityInventory } from "./capability-inventory.mapper-DyYXyVBJ.mjs";
|
|
5
5
|
import { t as createFileCredentialAdapter } from "./file-credential.adapter-CShGZcd5.mjs";
|
|
6
6
|
import process from "node:process";
|
|
@@ -16,6 +16,7 @@ import { createHash, randomUUID } from "node:crypto";
|
|
|
16
16
|
import { chmodSync, createReadStream, existsSync, lstatSync, mkdirSync, openAsBlob, readFileSync, readdirSync, realpathSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
17
17
|
import { pipeline } from "node:stream/promises";
|
|
18
18
|
import { channel } from "node:diagnostics_channel";
|
|
19
|
+
import { execFile } from "node:child_process";
|
|
19
20
|
import { proxify } from "trpc-cli/dist/proxify.js";
|
|
20
21
|
|
|
21
22
|
//#region ../../packages/contract/src/canvas/canvas-font-family.lib.ts
|
|
@@ -275,10 +276,14 @@ const createScreenFixtureComposite = (remote) => async (input) => {
|
|
|
275
276
|
|
|
276
277
|
//#endregion
|
|
277
278
|
//#region src/application/setup.use-case.ts
|
|
279
|
+
/** The agent whose skills the Enhance plugin can provide, by the name the skills port gives it. */
|
|
280
|
+
const CLAUDE_CODE = "Claude Code";
|
|
278
281
|
const nextOf = (input) => [
|
|
279
282
|
...input.isSignedIn ? [] : ["The sign-in is not done. Run enhance auth login, then enhance setup again."],
|
|
280
|
-
...input.notWritten.map(({ agent,
|
|
281
|
-
...input.
|
|
283
|
+
...input.notWritten.map(({ agent, folder }) => `The skills for ${agent} could not be written to ${folder}.`),
|
|
284
|
+
...input.leftToPlugin.map(({ agent }) => `${agent} has the Enhance plugin switched on and uses the plugin's skills, so none was written for it.`),
|
|
285
|
+
...input.isClaudeCodeUnasked ? [`${CLAUDE_CODE} could not be asked which plugins it has, so the skills were written for it.`] : [],
|
|
286
|
+
...input.shared === null ? [] : [`No coding agent was found on this machine, so the skills are in ${input.shared.folder}, which several agents read.`],
|
|
282
287
|
`Open your coding agent in your project and run the ${input.skill} skill.`
|
|
283
288
|
];
|
|
284
289
|
const createSetupUseCase = (dependencies) => ({ run: async (input) => {
|
|
@@ -309,8 +314,12 @@ const createSetupUseCase = (dependencies) => ({ run: async (input) => {
|
|
|
309
314
|
};
|
|
310
315
|
}
|
|
311
316
|
})();
|
|
312
|
-
const
|
|
313
|
-
const
|
|
317
|
+
const texts = dependencies.skillTexts();
|
|
318
|
+
const plugin = await dependencies.plugins.enhancePluginInClaudeCode();
|
|
319
|
+
const copied = await skills.write({
|
|
320
|
+
skills: texts,
|
|
321
|
+
leftToPlugin: plugin === "on" ? [CLAUDE_CODE] : []
|
|
322
|
+
});
|
|
314
323
|
return {
|
|
315
324
|
status: signed.person !== null && copied.notWritten.length === 0 ? "ready" : "incomplete",
|
|
316
325
|
signedIn: signed.person === null ? null : {
|
|
@@ -318,16 +327,19 @@ const createSetupUseCase = (dependencies) => ({ run: async (input) => {
|
|
|
318
327
|
displayName: signed.person.displayName
|
|
319
328
|
},
|
|
320
329
|
signInProblem: signed.problem,
|
|
321
|
-
|
|
322
|
-
|
|
330
|
+
skills: {
|
|
331
|
+
names: texts.map(({ name }) => name),
|
|
323
332
|
written: copied.written,
|
|
324
|
-
notWritten: copied.notWritten
|
|
333
|
+
notWritten: copied.notWritten,
|
|
334
|
+
leftToPlugin: copied.leftToPlugin
|
|
325
335
|
},
|
|
326
336
|
next: nextOf({
|
|
327
|
-
skill:
|
|
337
|
+
skill: texts[0]?.name ?? "",
|
|
328
338
|
isSignedIn: signed.person !== null,
|
|
329
339
|
shared: copied.isShared ? copied.written[0] ?? null : null,
|
|
330
|
-
notWritten: copied.notWritten
|
|
340
|
+
notWritten: copied.notWritten,
|
|
341
|
+
leftToPlugin: copied.leftToPlugin,
|
|
342
|
+
isClaudeCodeUnasked: plugin === "unknown" && copied.written.some(({ agent }) => agent === CLAUDE_CODE)
|
|
331
343
|
})
|
|
332
344
|
};
|
|
333
345
|
} });
|
|
@@ -429,37 +441,66 @@ const isFolder = async (folder) => {
|
|
|
429
441
|
return false;
|
|
430
442
|
}
|
|
431
443
|
};
|
|
432
|
-
const
|
|
444
|
+
const errorText = (error) => error instanceof Error ? error.message : String(error);
|
|
445
|
+
const createAgentSkillFoldersAdapter = (homeDirectory) => ({ write: async ({ skills, leftToPlugin }) => {
|
|
433
446
|
const found = (await Promise.all(AGENTS.map(async (entry) => await isFolder(path.join(homeDirectory, entry.home)) ? entry : null))).filter((entry) => entry !== null);
|
|
434
|
-
const
|
|
435
|
-
const
|
|
436
|
-
|
|
447
|
+
const left = found.filter(({ agent }) => leftToPlugin.includes(agent));
|
|
448
|
+
const kept = found.filter(({ agent }) => !leftToPlugin.includes(agent));
|
|
449
|
+
const targets = found.length === 0 ? [SHARED] : kept;
|
|
450
|
+
const outcomes = await Promise.all(targets.map(async ({ agent, skills: skillsFolder }) => {
|
|
451
|
+
const folder = path.join(homeDirectory, skillsFolder);
|
|
437
452
|
try {
|
|
438
|
-
|
|
439
|
-
|
|
453
|
+
for (const skill of skills) {
|
|
454
|
+
await mkdir(path.join(folder, skill.name), { recursive: true });
|
|
455
|
+
await writeFile(path.join(folder, skill.name, "SKILL.md"), skill.text);
|
|
456
|
+
}
|
|
440
457
|
return {
|
|
441
458
|
agent,
|
|
442
|
-
|
|
459
|
+
folder,
|
|
443
460
|
reason: null
|
|
444
461
|
};
|
|
445
462
|
} catch (error) {
|
|
446
463
|
return {
|
|
447
464
|
agent,
|
|
448
|
-
|
|
449
|
-
reason:
|
|
465
|
+
folder,
|
|
466
|
+
reason: errorText(error)
|
|
467
|
+
};
|
|
468
|
+
}
|
|
469
|
+
}));
|
|
470
|
+
const removals = await Promise.all(left.map(async ({ agent, skills: skillsFolder }) => {
|
|
471
|
+
const folder = path.join(homeDirectory, skillsFolder);
|
|
472
|
+
try {
|
|
473
|
+
for (const skill of skills) await rm(path.join(folder, skill.name), {
|
|
474
|
+
recursive: true,
|
|
475
|
+
force: true
|
|
476
|
+
});
|
|
477
|
+
return {
|
|
478
|
+
agent,
|
|
479
|
+
folder,
|
|
480
|
+
reason: null
|
|
481
|
+
};
|
|
482
|
+
} catch (error) {
|
|
483
|
+
return {
|
|
484
|
+
agent,
|
|
485
|
+
folder,
|
|
486
|
+
reason: errorText(error)
|
|
450
487
|
};
|
|
451
488
|
}
|
|
452
489
|
}));
|
|
453
490
|
return {
|
|
454
|
-
written: outcomes.flatMap(({ agent,
|
|
491
|
+
written: outcomes.flatMap(({ agent, folder, reason }) => reason === null ? [{
|
|
455
492
|
agent,
|
|
456
|
-
|
|
493
|
+
folder
|
|
457
494
|
}] : []),
|
|
458
|
-
notWritten: outcomes.flatMap(({ agent,
|
|
495
|
+
notWritten: [...outcomes, ...removals].flatMap(({ agent, folder, reason }) => reason === null ? [] : [{
|
|
459
496
|
agent,
|
|
460
|
-
|
|
497
|
+
folder,
|
|
461
498
|
reason
|
|
462
499
|
}]),
|
|
500
|
+
leftToPlugin: removals.flatMap(({ agent, folder, reason }) => reason === null ? [{
|
|
501
|
+
agent,
|
|
502
|
+
folder
|
|
503
|
+
}] : []),
|
|
463
504
|
isShared: found.length === 0
|
|
464
505
|
};
|
|
465
506
|
} });
|
|
@@ -1869,42 +1910,7 @@ const registerCanvasProgram = (program, input) => {
|
|
|
1869
1910
|
};
|
|
1870
1911
|
|
|
1871
1912
|
//#endregion
|
|
1872
|
-
//#region
|
|
1873
|
-
/**
|
|
1874
|
-
* The skill `setup` copies to each coding agent. Its description says when it applies, and its body
|
|
1875
|
-
* names the commands; the tool's own help teaches the rest. A line is added only when measured
|
|
1876
|
-
* runs are worse without it; `skill-evaluation` holds the cases and what the last runs found.
|
|
1877
|
-
*/
|
|
1878
|
-
const skillText = (skill, command) => `---
|
|
1879
|
-
name: ${skill}
|
|
1880
|
-
description: Put the screens a thread is changing onto an Enhance canvas as editable frames and return the link. Use when asked to capture, share or review screens, or to put work on a canvas. Also applies whenever a thread has changed how a screen looks: when that work is done, offer once, in one line, to put the changed screens on an Enhance canvas for review, and capture only on a yes.
|
|
1881
|
-
---
|
|
1882
|
-
|
|
1883
|
-
# Capture screens to Enhance
|
|
1884
|
-
|
|
1885
|
-
Put each screen this thread is changing onto one Enhance canvas as an editable frame, and return the canvas link.
|
|
1886
|
-
|
|
1887
|
-
## Commands
|
|
1888
|
-
|
|
1889
|
-
- \`${command} canvas create --title "<what this thread is changing>"\` makes the canvas and answers with its id and its link.
|
|
1890
|
-
- \`${command} canvas capture-page --help\` shows the two calls one capture takes, with an example. Read it before the first capture.
|
|
1891
|
-
- \`${command} auth status\` says who is signed in. If nobody is, ask the person to run \`${command} setup\`.
|
|
1892
|
-
`;
|
|
1893
|
-
/**
|
|
1894
|
-
* The skill's name and file. `command` is how an agent's shell reaches the tool: its command name
|
|
1895
|
-
* when that is on the PATH, or its full path. Each release names its skill after its own command,
|
|
1896
|
-
* so the production and development tools never overwrite one another's.
|
|
1897
|
-
*/
|
|
1898
|
-
const captureSkillOf = (input) => {
|
|
1899
|
-
const name = `${input.commandName}-capture`;
|
|
1900
|
-
return {
|
|
1901
|
-
name,
|
|
1902
|
-
text: skillText(name, input.command)
|
|
1903
|
-
};
|
|
1904
|
-
};
|
|
1905
|
-
|
|
1906
|
-
//#endregion
|
|
1907
|
-
//#region ../../packages/sdk/dist/stall-watch.lib-JRTp4jPK.mjs
|
|
1913
|
+
//#region ../../packages/sdk/dist/stall-watch.lib-0UnfNs7X.mjs
|
|
1908
1914
|
const CAPTURE_METADATA_LENGTH = 200;
|
|
1909
1915
|
const CAPTURE_FAILURE_LENGTH = 1e3;
|
|
1910
1916
|
const CAPTURE_UPLOAD_BATCH_SIZE = 400;
|
|
@@ -2712,7 +2718,7 @@ const CANVAS_REFUSAL_CODES = [
|
|
|
2712
2718
|
"recording-aspect-not-preserved"
|
|
2713
2719
|
];
|
|
2714
2720
|
const isRecord$2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
2715
|
-
const listOf = (value) => Array.isArray(value) ? value : void 0;
|
|
2721
|
+
const listOf$1 = (value) => Array.isArray(value) ? value : void 0;
|
|
2716
2722
|
const without = (record, ...keys) => Object.fromEntries(Object.entries(record).filter(([key]) => !keys.includes(key)));
|
|
2717
2723
|
/** The one owner of a wrapped mask group's identity, shared by the format adapter and Figma paste. */
|
|
2718
2724
|
const canvasMaskWrapperId = (sourceId) => `${sourceId}~mask`;
|
|
@@ -2742,7 +2748,7 @@ const uniformBlur = (filter) => {
|
|
|
2742
2748
|
};
|
|
2743
2749
|
};
|
|
2744
2750
|
const imageWithoutAdjustments = (paint) => isRecord$2(paint) && paint["kind"] === "image" ? without(paint, "adjustments") : paint;
|
|
2745
|
-
const textShadows = (shadows) => listOf(shadows)?.filter((shadow) => !isRecord$2(shadow) || shadow["kind"] !== "inner").map((shadow) => isRecord$2(shadow) ? {
|
|
2751
|
+
const textShadows = (shadows) => listOf$1(shadows)?.filter((shadow) => !isRecord$2(shadow) || shadow["kind"] !== "inner").map((shadow) => isRecord$2(shadow) ? {
|
|
2746
2752
|
...shadow,
|
|
2747
2753
|
spread: 0
|
|
2748
2754
|
} : shadow) ?? shadows;
|
|
@@ -2760,16 +2766,16 @@ const textStroke = (stroke) => {
|
|
|
2760
2766
|
const richTextSpan = (child) => {
|
|
2761
2767
|
if (!isRecord$2(child) || child["kind"] !== "span") return child;
|
|
2762
2768
|
const next = without(child, "decorationBlendMode");
|
|
2763
|
-
const fills = listOf(child["fills"]);
|
|
2769
|
+
const fills = listOf$1(child["fills"]);
|
|
2764
2770
|
if (fills !== void 0) next["fills"] = fills.map((paint) => unblended(paint));
|
|
2765
2771
|
if (isRecord$2(child["stroke"])) next["stroke"] = textStroke(child["stroke"]);
|
|
2766
|
-
const children = listOf(child["children"]);
|
|
2772
|
+
const children = listOf$1(child["children"]);
|
|
2767
2773
|
if (children !== void 0) next["children"] = children.map((span) => richTextSpan(span));
|
|
2768
2774
|
return next;
|
|
2769
2775
|
};
|
|
2770
2776
|
/** Text paints cannot blend on their own: one fill under a Normal layer lends the layer its blend. */
|
|
2771
2777
|
const textFills = (appearance, next) => {
|
|
2772
|
-
const fills = listOf(next["fills"]);
|
|
2778
|
+
const fills = listOf$1(next["fills"]);
|
|
2773
2779
|
if (fills === void 0) return;
|
|
2774
2780
|
const [only] = fills;
|
|
2775
2781
|
const paintBlend = isRecord$2(only) ? only["blendMode"] : void 0;
|
|
@@ -2780,9 +2786,9 @@ const adaptAppearance = (appearance, isText) => {
|
|
|
2780
2786
|
const next = { ...appearance };
|
|
2781
2787
|
if ("border" in appearance) next["border"] = borderPaints(appearance["border"]);
|
|
2782
2788
|
if ("outline" in appearance) next["outline"] = borderPaints(appearance["outline"]);
|
|
2783
|
-
const fills = listOf(appearance["fills"]);
|
|
2789
|
+
const fills = listOf$1(appearance["fills"]);
|
|
2784
2790
|
if (fills !== void 0) next["fills"] = fills.map((paint) => imageWithoutAdjustments(paint));
|
|
2785
|
-
const filters = listOf(appearance["filters"]);
|
|
2791
|
+
const filters = listOf$1(appearance["filters"]);
|
|
2786
2792
|
if (filters !== void 0) next["filters"] = filters.map((filter) => uniformBlur(filter));
|
|
2787
2793
|
if (!isText) return next;
|
|
2788
2794
|
if ("shadows" in appearance) next["shadows"] = textShadows(appearance["shadows"]);
|
|
@@ -2829,7 +2835,7 @@ const adaptNode$1 = (node) => {
|
|
|
2829
2835
|
if (!isText) return next;
|
|
2830
2836
|
if (isRecord$2(node["typography"])) next["typography"] = adaptTypography(node["typography"]);
|
|
2831
2837
|
const props = next["props"];
|
|
2832
|
-
const richText = isRecord$2(props) ? listOf(props["richText"]) : void 0;
|
|
2838
|
+
const richText = isRecord$2(props) ? listOf$1(props["richText"]) : void 0;
|
|
2833
2839
|
if (richText !== void 0 && isRecord$2(props)) next["props"] = {
|
|
2834
2840
|
...props,
|
|
2835
2841
|
richText: richText.map((span) => richTextSpan(span))
|
|
@@ -4361,13 +4367,14 @@ const canvasSceneNodeSchema = z.looseObject({
|
|
|
4361
4367
|
props: z.record(z.string(), z.unknown()).optional(),
|
|
4362
4368
|
box: canvasSceneBoxSchema.optional()
|
|
4363
4369
|
});
|
|
4370
|
+
const canvasSceneRelationshipSchema = z.object({
|
|
4371
|
+
parentId: z.string().min(1),
|
|
4372
|
+
sortKey: z.string().min(1)
|
|
4373
|
+
});
|
|
4364
4374
|
const canvasSceneDocumentSchema = z.object({
|
|
4365
4375
|
version: z.literal(15),
|
|
4366
4376
|
nodes: z.record(z.string(), canvasSceneNodeSchema),
|
|
4367
|
-
relationships: z.record(z.string(),
|
|
4368
|
-
parentId: z.string().min(1),
|
|
4369
|
-
sortKey: z.string().min(1)
|
|
4370
|
-
})),
|
|
4377
|
+
relationships: z.record(z.string(), canvasSceneRelationshipSchema),
|
|
4371
4378
|
tombstones: z.record(z.string(), z.literal(true)).default({})
|
|
4372
4379
|
});
|
|
4373
4380
|
const legacyRecordSchema = z.record(z.string(), z.unknown());
|
|
@@ -4391,6 +4398,10 @@ const emptyCanvasSceneDocument = () => ({
|
|
|
4391
4398
|
relationships: {},
|
|
4392
4399
|
tombstones: {}
|
|
4393
4400
|
});
|
|
4401
|
+
canvasSceneDocumentSchema.extend({
|
|
4402
|
+
nodes: z.record(z.string(), z.unknown()),
|
|
4403
|
+
relationships: z.record(z.string(), z.unknown())
|
|
4404
|
+
});
|
|
4394
4405
|
const temporaryIdSchema = z.string().min(1);
|
|
4395
4406
|
const canvasConversionIssueSchema = z.object({
|
|
4396
4407
|
code: z.enum([
|
|
@@ -9038,10 +9049,11 @@ const HASH_SEEDS = [
|
|
|
9038
9049
|
FNV_OFFSET_BASIS ^ MURMUR_HASH_2,
|
|
9039
9050
|
FNV_OFFSET_BASIS ^ MURMUR_HASH_3
|
|
9040
9051
|
];
|
|
9052
|
+
const CROSS_LINE = "transparent calc(50% - 2px), rgba(255, 255, 255, 0.85) calc(50% - 1px), #a8a8b0 50%, rgba(255, 255, 255, 0.85) calc(50% + 1px), transparent calc(50% + 2px)";
|
|
9041
9053
|
[`[data-enhance-unsupported]:not([data-enhance-unsupported-hidden]):not([style*="display: none"]) {
|
|
9042
9054
|
align-items: center !important;
|
|
9043
|
-
background-color:
|
|
9044
|
-
background-image: linear-gradient(to top right,
|
|
9055
|
+
background-color: transparent !important;
|
|
9056
|
+
background-image: ${`linear-gradient(to top right, ${CROSS_LINE}), linear-gradient(to bottom right, ${CROSS_LINE})`} !important;
|
|
9045
9057
|
border: 1px solid #c7c7cc !important;
|
|
9046
9058
|
box-sizing: border-box !important;
|
|
9047
9059
|
color: #4f4f55 !important;
|
|
@@ -9413,6 +9425,21 @@ const MAX_DURATION_MS$1 = 18e5;
|
|
|
9413
9425
|
const MAX_COUNT$1 = 1e6;
|
|
9414
9426
|
const MAX_BYTES = 1073741824;
|
|
9415
9427
|
const MAX_PROTOTYPE_OPEN_ATTEMPTS = 16;
|
|
9428
|
+
const MAX_SCRIPT_POSITION = 1e8;
|
|
9429
|
+
/** What the person was doing when a long frame ended; `idle` is nothing at all. */
|
|
9430
|
+
const longFrameActionSchema = z.enum([
|
|
9431
|
+
"pan",
|
|
9432
|
+
"zoom",
|
|
9433
|
+
"drag",
|
|
9434
|
+
"typing",
|
|
9435
|
+
"paste",
|
|
9436
|
+
"undo",
|
|
9437
|
+
"redo",
|
|
9438
|
+
"edit",
|
|
9439
|
+
"opening",
|
|
9440
|
+
"loading",
|
|
9441
|
+
"idle"
|
|
9442
|
+
]);
|
|
9416
9443
|
/** How the read of a canvas's unsaved browser copy ended when the canvas opened. */
|
|
9417
9444
|
const browserCopyCheckSchema = z.enum([
|
|
9418
9445
|
"answered",
|
|
@@ -9427,6 +9454,12 @@ const base$1 = {
|
|
|
9427
9454
|
releaseIdentity: z.string().min(1).max(100),
|
|
9428
9455
|
capabilityVersion: z.number().int().min(1).max(MAX_CAPABILITY_VERSION$1)
|
|
9429
9456
|
};
|
|
9457
|
+
const scriptSourceSchema = z.enum([
|
|
9458
|
+
"app",
|
|
9459
|
+
"extension",
|
|
9460
|
+
"third-party",
|
|
9461
|
+
"unknown"
|
|
9462
|
+
]);
|
|
9430
9463
|
const mainThreadWork = {
|
|
9431
9464
|
longTaskCount: countSchema,
|
|
9432
9465
|
longTaskTotalMs: durationSchema$1,
|
|
@@ -9436,12 +9469,7 @@ const mainThreadWork = {
|
|
|
9436
9469
|
loafLongestBlockingMs: durationSchema$1,
|
|
9437
9470
|
loafStyleAndLayoutMs: durationSchema$1,
|
|
9438
9471
|
loafTopScriptMs: durationSchema$1,
|
|
9439
|
-
loafTopScriptSource:
|
|
9440
|
-
"app",
|
|
9441
|
-
"extension",
|
|
9442
|
-
"third-party",
|
|
9443
|
-
"unknown"
|
|
9444
|
-
])
|
|
9472
|
+
loafTopScriptSource: scriptSourceSchema
|
|
9445
9473
|
};
|
|
9446
9474
|
z.discriminatedUnion("name", [
|
|
9447
9475
|
z.object({
|
|
@@ -9502,10 +9530,52 @@ z.discriminatedUnion("name", [
|
|
|
9502
9530
|
durationMs: durationSchema$1,
|
|
9503
9531
|
frameCount: countSchema,
|
|
9504
9532
|
slowFrameCount: countSchema,
|
|
9533
|
+
over16FrameCount: countSchema.optional(),
|
|
9534
|
+
over33FrameCount: countSchema.optional(),
|
|
9505
9535
|
worstFrameMs: durationSchema$1,
|
|
9506
9536
|
nodeCount: countSchema,
|
|
9507
9537
|
replayCount: countSchema
|
|
9508
9538
|
}),
|
|
9539
|
+
z.object({
|
|
9540
|
+
...base$1,
|
|
9541
|
+
name: z.literal("canvas_long_frame"),
|
|
9542
|
+
source: z.enum(["long-animation-frame", "longtask"]),
|
|
9543
|
+
action: longFrameActionSchema,
|
|
9544
|
+
durationMs: durationSchema$1,
|
|
9545
|
+
blockingMs: durationSchema$1,
|
|
9546
|
+
styleAndLayoutMs: durationSchema$1,
|
|
9547
|
+
topScriptMs: durationSchema$1,
|
|
9548
|
+
topScriptSource: scriptSourceSchema,
|
|
9549
|
+
topScriptInvoker: z.enum([
|
|
9550
|
+
"event-listener",
|
|
9551
|
+
"user-callback",
|
|
9552
|
+
"resolve-promise",
|
|
9553
|
+
"reject-promise",
|
|
9554
|
+
"classic-script",
|
|
9555
|
+
"module-script",
|
|
9556
|
+
"none"
|
|
9557
|
+
]),
|
|
9558
|
+
topScriptEvent: z.string().regex(/^[a-z]{1,32}$/u).optional(),
|
|
9559
|
+
topScriptFile: z.string().regex(/^[\w-][\w.-]{0,124}\.js$/u).optional(),
|
|
9560
|
+
topScriptFunction: z.string().regex(/^[\w$.]{1,80}$/u).optional(),
|
|
9561
|
+
topScriptPosition: z.number().int().min(0).max(MAX_SCRIPT_POSITION).optional(),
|
|
9562
|
+
layerCount: countSchema,
|
|
9563
|
+
topLayerCount: countSchema,
|
|
9564
|
+
builtLayerCount: countSchema,
|
|
9565
|
+
zoomPercent: countSchema,
|
|
9566
|
+
frameNumber: countSchema,
|
|
9567
|
+
skippedCount: countSchema,
|
|
9568
|
+
isPageFocused: z.boolean().optional()
|
|
9569
|
+
}),
|
|
9570
|
+
z.object({
|
|
9571
|
+
...base$1,
|
|
9572
|
+
name: z.literal("canvas_long_frames_skipped"),
|
|
9573
|
+
action: longFrameActionSchema,
|
|
9574
|
+
frameCount: countSchema,
|
|
9575
|
+
totalMs: durationSchema$1,
|
|
9576
|
+
worstMs: durationSchema$1,
|
|
9577
|
+
reason: z.enum(["bound", "not-blocking"]).optional()
|
|
9578
|
+
}),
|
|
9509
9579
|
z.object({
|
|
9510
9580
|
...base$1,
|
|
9511
9581
|
name: z.literal("canvas_measurement"),
|
|
@@ -10462,7 +10532,7 @@ const startStallWatch = (caller, idleMs = STALL_MS) => {
|
|
|
10462
10532
|
};
|
|
10463
10533
|
|
|
10464
10534
|
//#endregion
|
|
10465
|
-
//#region ../../packages/sdk/dist/capture-client.client-
|
|
10535
|
+
//#region ../../packages/sdk/dist/capture-client.client-MxFryzJG.mjs
|
|
10466
10536
|
const line = (text) => `Enhance: ${text}\n`;
|
|
10467
10537
|
/** A left-out capture by its journey and step, or by its test when it could not be read at all. */
|
|
10468
10538
|
const leftOutName = (leftOut, attempts) => {
|
|
@@ -10992,6 +11062,45 @@ const registerCapturesProgram = (program, dependencies) => {
|
|
|
10992
11062
|
});
|
|
10993
11063
|
};
|
|
10994
11064
|
|
|
11065
|
+
//#endregion
|
|
11066
|
+
//#region src/infrastructure/claude-plugin-list.lib.ts
|
|
11067
|
+
const pluginListSchema = z.array(z.looseObject({
|
|
11068
|
+
id: z.string(),
|
|
11069
|
+
enabled: z.boolean()
|
|
11070
|
+
}));
|
|
11071
|
+
const listOf = (printed) => {
|
|
11072
|
+
try {
|
|
11073
|
+
return pluginListSchema.parse(JSON.parse(printed));
|
|
11074
|
+
} catch {
|
|
11075
|
+
return null;
|
|
11076
|
+
}
|
|
11077
|
+
};
|
|
11078
|
+
/**
|
|
11079
|
+
* Reads what `claude plugin list --json` printed. An answer that is not its list is `unknown`,
|
|
11080
|
+
* never `off`: setup must not take an answer it cannot read for "no plugin".
|
|
11081
|
+
*/
|
|
11082
|
+
const enhancePluginStateOf = (printed, pluginId) => {
|
|
11083
|
+
const list = listOf(printed);
|
|
11084
|
+
if (list === null) return "unknown";
|
|
11085
|
+
return list.some(({ id, enabled }) => id === pluginId && enabled) ? "on" : "off";
|
|
11086
|
+
};
|
|
11087
|
+
/** The plugin of the same release as the tool: `enhance@enhance`, or `enhance-dev@enhance-dev`. */
|
|
11088
|
+
const enhancePluginIdOf = (commandName) => `${commandName}@${commandName}`;
|
|
11089
|
+
|
|
11090
|
+
//#endregion
|
|
11091
|
+
//#region src/infrastructure/claude-plugins.adapter.ts
|
|
11092
|
+
const ASK_TIMEOUT_MS = 1e4;
|
|
11093
|
+
/** Asks Claude Code which plugins it has, with its own command and never by reading its files. */
|
|
11094
|
+
const createClaudePluginsAdapter = (commandName) => ({ enhancePluginInClaudeCode: async () => new Promise((resolve) => {
|
|
11095
|
+
execFile("claude", [
|
|
11096
|
+
"plugin",
|
|
11097
|
+
"list",
|
|
11098
|
+
"--json"
|
|
11099
|
+
], { timeout: ASK_TIMEOUT_MS }, (error, stdout) => {
|
|
11100
|
+
resolve(error === null ? enhancePluginStateOf(stdout, enhancePluginIdOf(commandName)) : "unknown");
|
|
11101
|
+
});
|
|
11102
|
+
}) });
|
|
11103
|
+
|
|
10995
11104
|
//#endregion
|
|
10996
11105
|
//#region src/infrastructure/command-summaries.consts.ts
|
|
10997
11106
|
const COMMAND_SUMMARIES = {
|
|
@@ -12103,7 +12212,7 @@ const createRemoteRouterAdapter = (source, remote) => {
|
|
|
12103
12212
|
//#region src/infrastructure/setup.program.ts
|
|
12104
12213
|
const MAX_TOKEN_LABEL_CHARACTERS = 120;
|
|
12105
12214
|
const registerSetupProgram = (program, setup, output) => {
|
|
12106
|
-
program.command("setup").description("Sign in if nobody is, give each coding agent on this machine the Enhance
|
|
12215
|
+
program.command("setup").description("Sign in if nobody is, give each coding agent on this machine the Enhance skills, and say what to do next.").option("--token <token>", "Sign in with an existing agent token instead of the browser.").option("--no-open", "Print the sign-in address without opening the browser.").action(async (options) => {
|
|
12107
12216
|
const answer = await setup.run({
|
|
12108
12217
|
token: await readOptionalToken(options.token),
|
|
12109
12218
|
label: `CLI on ${hostname()}`.slice(0, MAX_TOKEN_LABEL_CHARACTERS),
|
|
@@ -12118,7 +12227,7 @@ const registerSetupProgram = (program, setup, output) => {
|
|
|
12118
12227
|
});
|
|
12119
12228
|
output.result(answer);
|
|
12120
12229
|
if (answer.status === "ready") return;
|
|
12121
|
-
throw answer.signedIn === null ? new CliError("UNAUTHORIZED", `Setup is not finished: ${answer.signInProblem ?? "nobody is signed in."}`, "Run 'enhance auth login', then 'enhance setup' again.") : new CliError("INTERNAL", `Setup is not finished: the
|
|
12230
|
+
throw answer.signedIn === null ? new CliError("UNAUTHORIZED", `Setup is not finished: ${answer.signInProblem ?? "nobody is signed in."}`, "Run 'enhance auth login', then 'enhance setup' again.") : new CliError("INTERNAL", `Setup is not finished: the skills could not be written to ${answer.skills.notWritten.map(({ folder }) => folder).join(", ")}.`, "Make that folder writable, then run 'enhance setup' again.");
|
|
12122
12231
|
});
|
|
12123
12232
|
};
|
|
12124
12233
|
|
|
@@ -12197,17 +12306,22 @@ const cliMetadataFrom = (procedures) => {
|
|
|
12197
12306
|
mutationPaths: new Set(procedures.flatMap(([path, info]) => info.type === "mutation" ? [path] : []))
|
|
12198
12307
|
};
|
|
12199
12308
|
};
|
|
12200
|
-
/**
|
|
12309
|
+
/** The skills setup installs: every skill of the one source, worded for this tool's commands. */
|
|
12310
|
+
const toolSkillTextsOf = (commandName, machine) => skillTextsFor({
|
|
12311
|
+
surface: "cli",
|
|
12312
|
+
commandName,
|
|
12313
|
+
command: skillCommandOf(commandName, machine),
|
|
12314
|
+
nameOf: cliPathOf
|
|
12315
|
+
});
|
|
12316
|
+
/** Signing in, and the setup that signs in and gives each coding agent the skills. */
|
|
12201
12317
|
const registerSignInPrograms = (program, input) => {
|
|
12202
12318
|
const auth = createAuthUseCase(input.credentials, input.remote, createOauthLoopbackAdapter(input.remote));
|
|
12203
12319
|
registerAuthProgram(program, auth, input.output);
|
|
12204
12320
|
registerSetupProgram(program, createSetupUseCase({
|
|
12205
12321
|
auth,
|
|
12206
12322
|
skills: createAgentSkillFoldersAdapter(input.machine.homeDirectory),
|
|
12207
|
-
|
|
12208
|
-
|
|
12209
|
-
command: skillCommandOf(input.commandName, input.machine)
|
|
12210
|
-
})
|
|
12323
|
+
plugins: createClaudePluginsAdapter(input.commandName),
|
|
12324
|
+
skillTexts: () => toolSkillTextsOf(input.commandName, input.machine)
|
|
12211
12325
|
}), input.output);
|
|
12212
12326
|
};
|
|
12213
12327
|
const registerUtilityPrograms = (program, input, catalog) => {
|
|
@@ -12580,7 +12694,7 @@ const main = async () => {
|
|
|
12580
12694
|
const remote = createHttpRemoteAdapter(config.apiUrl, credentials, mutationKey);
|
|
12581
12695
|
const cli = createCliProgram({
|
|
12582
12696
|
apiUrl: config.apiUrl,
|
|
12583
|
-
version: "0.1.
|
|
12697
|
+
version: "0.1.167",
|
|
12584
12698
|
credentials,
|
|
12585
12699
|
remote,
|
|
12586
12700
|
mutationKey,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as canvasAssetImportInputSchema, B as operationStatusImageSchema, Bn as
|
|
3
|
-
import { T as createAuthUseCase, c as createOauthLoopbackAdapter, f as createCapabilityInvocationAdapter, n as createMutationKeyAdapter, r as createHttpRemoteAdapter, u as withCapabilityNames, y as boundedResultPage } from "./zod-messages.lib-
|
|
4
|
-
import { a as createMcpResultAdapter, i as mcpDispatchedResultSchema, n as createMcpWorkflowsAdapter, o as createMcpClientContextAdapter, r as createMcpClientInvocationAdapter, s as createCapabilityCatalogAdapter } from "./mcp-server.adapter-
|
|
2
|
+
import { $ as canvasAssetImportInputSchema, B as operationStatusImageSchema, Bn as domLocatorSchema, Fn as commentAuthorSchema, Ft as canvasReadInputSchema, G as canvasCaptureOutputSchema, Gn as replyCommentInputSchema, H as operationStatusOutputSchema, Hn as getCommentOutputSchema, I as canvasPrototypeInputSchema, In as commentCanvasContextSchema, It as canvasReadOutputSchema, Jn as screenElementCommentTargetSchema, Kn as replyCommentOutputSchema, Kt as parseCanvasReference, Ln as commentMessageSchema, Mt as encodeCanvasExchangeToken, N as canvasCapturePageInputSchema, P as canvasCapturePageOutputSchema, R as canvasPrototypeOutputSchema, Rn as commentResolverSchema, Rt as canvasUpdateHtmlInputSchema, S as PROTOTYPE_UPDATE_GUIDANCE, Un as listCommentsInputSchema, V as operationStatusInputSchema, Vn as elementAnchorSchema, W as canvasCaptureInputSchema, Wn as listCommentsOutputSchema, X as canvasPreparationOutputSchema, Xn as screenTextCommentTargetSchema, Y as canvasDuplicateInputSchema, Yn as screenElementsCommentTargetSchema, Z as canvasWriteReceiptSchema, Zn as startCommentInputSchema, at as canvasRenderScopedToolInputSchema, bt as canvasMakeEditableInputSchema, cn as CliError, dt as canvasCreateToolOutputSchema, et as canvasAssetImportOutputSchema, ht as createdCanvasAnswerSchema, jt as decodeCanvasExchangeToken, kt as canvasExchangeDigest, lt as canvasRemoveInputSchema, m as toMcpFailurePayload, mt as canvasFindOutputSchema, o as CAPTURE_PAGE_CALLS, pt as canvasFindInputSchema, q as canvasArrangeInputSchema, qn as screenAreaCommentTargetSchema, rn as MCP_TOOL_BY_CAPABILITY, ut as canvasCreateToolInputSchema, vt as canvasInsertHtmlInputSchema, z as canvasConversionStatusSchema, zn as commentThreadSchema } from "./cli-output-identity.lib-DbOpumEM.mjs";
|
|
3
|
+
import { T as createAuthUseCase, c as createOauthLoopbackAdapter, f as createCapabilityInvocationAdapter, n as createMutationKeyAdapter, r as createHttpRemoteAdapter, u as withCapabilityNames, y as boundedResultPage } from "./zod-messages.lib-Cs57z-_f.mjs";
|
|
4
|
+
import { a as createMcpResultAdapter, i as mcpDispatchedResultSchema, n as createMcpWorkflowsAdapter, o as createMcpClientContextAdapter, r as createMcpClientInvocationAdapter, s as createCapabilityCatalogAdapter } from "./mcp-server.adapter-KDg3Ektd.mjs";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
import { McpServer } from "@modelcontextprotocol/server";
|
|
7
7
|
|
package/dist/mcp-main.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { s as toCapabilityDefinition } from "./cli-output-identity.lib-
|
|
3
|
-
import { a as readLocalMcpEnvironment, t as installZodMessages } from "./zod-messages.lib-
|
|
2
|
+
import { s as toCapabilityDefinition } from "./cli-output-identity.lib-DbOpumEM.mjs";
|
|
3
|
+
import { a as readLocalMcpEnvironment, t as installZodMessages } from "./zod-messages.lib-Cs57z-_f.mjs";
|
|
4
4
|
import { t as createFileCredentialAdapter } from "./file-credential.adapter-CShGZcd5.mjs";
|
|
5
|
-
import { o as createMcpClientContextAdapter, s as createCapabilityCatalogAdapter, t as createMcpServerAdapter } from "./mcp-server.adapter-
|
|
6
|
-
import { n as createMcpCanvasProfileAdapter, t as createMcpInvocationAdapter } from "./mcp-invocation.adapter-
|
|
5
|
+
import { o as createMcpClientContextAdapter, s as createCapabilityCatalogAdapter, t as createMcpServerAdapter } from "./mcp-server.adapter-KDg3Ektd.mjs";
|
|
6
|
+
import { n as createMcpCanvasProfileAdapter, t as createMcpInvocationAdapter } from "./mcp-invocation.adapter-CUyCBfrk.mjs";
|
|
7
7
|
import process from "node:process";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
import { serveStdio } from "@modelcontextprotocol/server/stdio";
|
|
@@ -171,19 +171,19 @@ const clientContext = createMcpClientContextAdapter();
|
|
|
171
171
|
const main = () => {
|
|
172
172
|
const config = readLocalMcpEnvironment();
|
|
173
173
|
const credentials = createFileCredentialAdapter(config.configDirectory, config.earlierConfigDirectory);
|
|
174
|
-
const invocation = createMcpInvocationAdapter(config.apiUrl, credentials, config.configDirectory, { version: "0.1.
|
|
174
|
+
const invocation = createMcpInvocationAdapter(config.apiUrl, credentials, config.configDirectory, { version: "0.1.167" });
|
|
175
175
|
const catalog = [...createCapabilityCatalogAdapter(), ...createMcpTransportCapabilityAdapter()];
|
|
176
176
|
const client = clientContext.createStdio();
|
|
177
177
|
serveStdio(() => config.profile === "canvas" ? createMcpCanvasProfileAdapter({
|
|
178
178
|
readOnly: config.isReadOnly,
|
|
179
179
|
...config.workflowsDirectory !== void 0 && { workflowsDirectory: config.workflowsDirectory },
|
|
180
180
|
name: config.mcpServiceName,
|
|
181
|
-
version: "0.1.
|
|
181
|
+
version: "0.1.167",
|
|
182
182
|
invocation,
|
|
183
183
|
clientMetadata: client.metadata,
|
|
184
184
|
catalog
|
|
185
185
|
}) : createMcpServerAdapter({
|
|
186
|
-
version: "0.1.
|
|
186
|
+
version: "0.1.167",
|
|
187
187
|
name: config.mcpServiceName,
|
|
188
188
|
commandName: config.commandName,
|
|
189
189
|
invocation,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
2
|
+
import { Br as canvasRenderTargetSchema, D as canvasWriteHtmlCapabilityInputSchema, Gt as hasCanvasReferenceScope, Kt as parseCanvasReference, Nr as wholeCanvasDocumentOutputSchema, Rr as canvasRenderSourceStateSchema, Ut as canvasReferenceRenderTarget, an as SKILL_NAMES, cn as CliError, d as createMcpCapabilityDiscoveryAdapter, gr as agentClientMetadata, i as createLazyCapabilityCatalogAdapter, in as SKILL_JOBS, l as toPresentedCapabilities, m as toMcpFailurePayload, n as withCommandName, nn as onSurface, nt as canvasRenderBatchResultSchema, qt as readStoredCanvasScene, r as toCanvasAuthoringResult, st as canvasRenderFileSchema, t as withCommandInFailure, wt as inputProblemFields, xt as canvasEditCapabilityInputSchema } from "./cli-output-identity.lib-DbOpumEM.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
4
5
|
import { readFile, rm } from "node:fs/promises";
|
|
5
6
|
import path from "node:path";
|
|
6
|
-
import { AsyncLocalStorage } from "node:async_hooks";
|
|
7
7
|
import { createHash, randomUUID } from "node:crypto";
|
|
8
8
|
import { readFileSync } from "node:fs";
|
|
9
9
|
import { StdioServerTransport } from "@modelcontextprotocol/server/stdio";
|
|
@@ -490,21 +490,25 @@ const createMcpClientInvocationAdapter = (invocation, legacyClient) => ({ invoke
|
|
|
490
490
|
|
|
491
491
|
//#endregion
|
|
492
492
|
//#region src/infrastructure/mcp-workflows.adapter.ts
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
"design-on-canvas",
|
|
496
|
-
"publish-prototype",
|
|
497
|
-
"respond-to-feedback"
|
|
498
|
-
]);
|
|
493
|
+
/** The guide offers exactly the skills of the one source, by their short names. */
|
|
494
|
+
const workflowNameSchema = z.enum(SKILL_NAMES);
|
|
499
495
|
const workflowSchema = z.object({
|
|
500
496
|
name: workflowNameSchema,
|
|
501
497
|
description: z.string().min(1),
|
|
502
498
|
body: z.string().min(1)
|
|
503
499
|
});
|
|
504
|
-
const instructions =
|
|
500
|
+
const instructions = `Before ${SKILL_JOBS.slice(0, -1).join(", ")} or ${SKILL_JOBS.at(-1) ?? ""}, call workflow_guide with the matching workflow and follow its guidance.`;
|
|
501
|
+
/** A skill's file, or a failure that names the skill the folder lacks. */
|
|
502
|
+
const skillFileOf = (directory, name) => {
|
|
503
|
+
try {
|
|
504
|
+
return readFileSync(path.join(directory, name, "SKILL.md"), "utf8");
|
|
505
|
+
} catch (error) {
|
|
506
|
+
throw new Error(`The workflows folder holds no ${name} skill: ${directory}`, { cause: error });
|
|
507
|
+
}
|
|
508
|
+
};
|
|
505
509
|
const createMcpWorkflowsAdapter = (directory, authenticationInstructions) => {
|
|
506
510
|
const workflows = workflowNameSchema.options.map((name) => {
|
|
507
|
-
const source =
|
|
511
|
+
const source = skillFileOf(directory, name);
|
|
508
512
|
const match = /^---\r?\nname: ([^\r\n]+)\r?\ndescription: ([^\r\n]+)\r?\n---\r?\n([\s\S]+)$/u.exec(source);
|
|
509
513
|
const workflow = workflowSchema.parse({
|
|
510
514
|
name: match?.[1],
|
package/dist/mcp.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { u as toSharedCapabilities } from "./cli-output-identity.lib-
|
|
2
|
+
import { u as toSharedCapabilities } from "./cli-output-identity.lib-DbOpumEM.mjs";
|
|
3
3
|
import { t as toCapabilityInventory } from "./capability-inventory.mapper-DyYXyVBJ.mjs";
|
|
4
|
-
import { s as createCapabilityCatalogAdapter, t as createMcpServerAdapter } from "./mcp-server.adapter-
|
|
4
|
+
import { s as createCapabilityCatalogAdapter, t as createMcpServerAdapter } from "./mcp-server.adapter-KDg3Ektd.mjs";
|
|
5
5
|
|
|
6
6
|
export { createCapabilityCatalogAdapter, createMcpServerAdapter as createEnhanceMcpServer, toCapabilityInventory, toSharedCapabilities };
|
package/dist/remote-mcp-main.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as canvasAssetImportInputSchema, L as canvasPrototypeIntentSchema,
|
|
3
|
-
import { h as createImportCanvasAssetComposite, m as createPublishCanvasPrototypeComposite, n as createMutationKeyAdapter, o as readRemoteMcpEnvironment, p as createPrototypeArtifactAdapter, r as createHttpRemoteAdapter, t as installZodMessages } from "./zod-messages.lib-
|
|
4
|
-
import { a as createMcpResultAdapter, o as createMcpClientContextAdapter, s as createCapabilityCatalogAdapter, t as createMcpServerAdapter } from "./mcp-server.adapter-
|
|
5
|
-
import { n as createMcpCanvasProfileAdapter, t as createMcpInvocationAdapter } from "./mcp-invocation.adapter-
|
|
2
|
+
import { $ as canvasAssetImportInputSchema, Dn as getMeOutputSchema, L as canvasPrototypeIntentSchema, On as MCP_AUTH_SCOPE, R as canvasPrototypeOutputSchema, S as PROTOTYPE_UPDATE_GUIDANCE, Tn as prototypeArtifactPathSchema, cn as CliError, di as signedDownloadSchema, et as canvasAssetImportOutputSchema, xn as foldPrototypeArtifactPath } from "./cli-output-identity.lib-DbOpumEM.mjs";
|
|
3
|
+
import { h as createImportCanvasAssetComposite, m as createPublishCanvasPrototypeComposite, n as createMutationKeyAdapter, o as readRemoteMcpEnvironment, p as createPrototypeArtifactAdapter, r as createHttpRemoteAdapter, t as installZodMessages } from "./zod-messages.lib-Cs57z-_f.mjs";
|
|
4
|
+
import { a as createMcpResultAdapter, o as createMcpClientContextAdapter, s as createCapabilityCatalogAdapter, t as createMcpServerAdapter } from "./mcp-server.adapter-KDg3Ektd.mjs";
|
|
5
|
+
import { n as createMcpCanvasProfileAdapter, t as createMcpInvocationAdapter } from "./mcp-invocation.adapter-CUyCBfrk.mjs";
|
|
6
6
|
import process from "node:process";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
import { mkdir, mkdtemp, readFile, rm } from "node:fs/promises";
|
|
@@ -818,7 +818,7 @@ const server = await createRemoteMcpHttpAdapter({
|
|
|
818
818
|
...config.MCP_STAGED_UPLOAD_ORIGIN !== void 0 && { stagedUploadOrigin: config.MCP_STAGED_UPLOAD_ORIGIN },
|
|
819
819
|
allowedHosts: config.MCP_ALLOWED_HOSTS.split(",").map((value) => value.trim()),
|
|
820
820
|
allowedOrigins: config.MCP_ALLOWED_ORIGINS.split(",").map((value) => value.trim()),
|
|
821
|
-
version: "0.1.
|
|
821
|
+
version: "0.1.167",
|
|
822
822
|
...config.MCP_UI_URL !== void 0 && { uiUrl: config.MCP_UI_URL },
|
|
823
823
|
onerror: (error) => process.stderr.write(`${error.message}\n`)
|
|
824
824
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $n as
|
|
2
|
+
import { $n as applyCanvasTypographyPatch, $r as canvasAxisStyleProperties, $t as inSurfaceWords, A as recordingSnapshotCapabilityInputSchema, An as createAgentTokenOutputSchema, Ar as textOf, At as canvasSnapshotToken, Bt as canvasResourcesCursorSchema, Cn as getPrototypePublishStatusOutputSchema, Cr as RECTANGLE_KIND, D as canvasWriteHtmlCapabilityInputSchema, Dn as getMeOutputSchema, Dr as applyCanvasOperationsOutputSchema, E as canvasRenderCapabilityInputSchema, En as submitPrototypeArtifactOutputSchema, Er as applyCanvasOperationsInputSchema, F as canvasPrototypeCapabilityInputSchema, Fr as canvasNodeStylePatchSchema, Ft as canvasReadInputSchema, Gr as getCanvasRenderOutputSchema, Gt as hasCanvasReferenceScope, Hr as createCanvasRenderOutputSchema, Ht as canvasReferenceNodeIds, Ir as createCanvasConversionOutputSchema, J as canvasDuplicateCapabilityInputSchema, Jt as callOf, K as canvasArrangeCapabilityInputSchema, Kr as canvasReadableSceneDocumentSchema, Kt as parseCanvasReference, Lr as getCanvasConversionOutputSchema, Lt as canvasUpdateHtmlCapabilityInputSchema, M as canvasCapturePageCapabilityInputSchema, Mn as listOrganisationsOutputSchema, Mt as encodeCanvasExchangeToken, Nr as wholeCanvasDocumentOutputSchema, Nt as resolveCanvasSnapshot, O as commentAttentionCapabilityInputSchema, Or as getCanvasMutationOutputSchema, Pt as canvasOutlineCursorSchema, Q as canvasAssetImportCapabilityInputSchema, Qn as createCapturePassOutputSchema, Qr as canvasAuthoredStyleDeclarations, Qt as diagnosisStep, Rt as canvasUpdateHtmlInputSchema, Sn as getPrototypeArtifactCapabilitiesOutputSchema, Sr as PAGE_KIND, T as canvasReadCapabilityInputSchema, Tn as prototypeArtifactPathSchema, Tr as TEXT_KIND, Tt as inputProblemSummary, U as canvasCaptureCapabilityInputSchema, Ur as createRecordingSnapshotOutputSchema, V as operationStatusInputSchema, Vt as assertCanvasReferenceNodes, Wr as downloadCanvasRenderOutputSchema, Xr as canvasRecordedBoxNoteFor, Xt as commandName, Yr as canvasBoxSourceOf, Yt as cliPathOf, Zt as currentNodeIdStep, _i as CANVAS_BLEND_MODES, _r as createCanvasPreparationOutputSchema, _t as canvasInsertHtmlCapabilityInputSchema, ai as canvasCssValue, ar as canvasCaptureSchema, bn as createPrototypeArtifactOutputSchema, br as GROUP_KIND, ci as reserveCanvasAssetOutputSchema, cn as CliError, cr as canvasRecordingPropsSchema, ct as canvasRemoveCapabilityInputSchema, dr as canvasReferencePageOf, ei as canvasCssPixelValue, en as inputName, er as canvasCssTypographyOwners, et as canvasAssetImportOutputSchema, fi as canvasRichTextOf, fr as resolveCanvasReference, ft as canvasFindCursorSchema, g as toRemoteError, gi as canvasAdditionalStyleSchema, gn as getRecordingOutputSchema, gt as listedCanvasesAnswerSchema, hi as CANVAS_RICH_TEXT_STYLE_PROPERTIES, hr as AGENT_CLIENT_HEADER, ii as canvasCssTokens, ir as CAPTURE_LANDING_CONVERTING, j as transcriptReadCapabilityInputSchema, jr as mapCanvasFontSources, jt as decodeCanvasExchangeToken, k as prototypePublishCapabilityInputSchema, kn as cliAuthConfigurationSchema, kr as canvasLayoutWithoutCssProperties, kt as canvasExchangeDigest, li as canvasFontAssetIdentityFromPath, ln as isFormatRefusalError, lr as captureLandingSchema, mi as hasCanvasRichTextPaints, ni as canvasLayoutPositionOf, nr as canvasTextPropsWithContent, oi as canvasAssetUploadOutputSchema, or as canvasConversionMetadataSchema, ot as canvasRenderRequestSchema, pi as canvasRichTextValueOf, pr as beginCanvasActivityOutputSchema, pt as canvasFindInputSchema, qr as canvasSceneDocumentSchema, qt as readStoredCanvasScene, rt as canvasRenderPendingSchema, si as reserveCanvasAssetInputSchema, sn as PartialBatchError, sr as canvasPrototypePropsSchema, st as canvasRenderFileSchema, tn as layerListName, tr as canvasTextChangeBetween, tt as canvasRenderBatchRequestSchema, ui as canvasImageAssetIdentityFromPath, un as transcriptOutputSchema, ur as DEFAULT_CANVAS_REFERENCE_PAGE_ID, vi as canvasBlendModeSchema, vn as PROTOTYPE_ARTIFACT_MANIFEST_PATH, vr as getCanvasPreparationOutputSchema, w as canvasApplyCapabilityInputSchema, wn as prototypeArtifactManifestSchema, wr as SCREEN_KIND, wt as inputProblemFields, xn as foldPrototypeArtifactPath, xr as IMAGE_KIND, xt as canvasEditCapabilityInputSchema, yi as canvasPaintSchema, yn as attachPrototypeArtifactOutputSchema, yr as FRAME_KIND, yt as canvasMakeEditableCapabilityInputSchema, zr as canvasRenderStateSchema, zt as canvasTranscriptCursorSchema } from "./cli-output-identity.lib-DbOpumEM.mjs";
|
|
3
3
|
import process from "node:process";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { access, mkdtemp, open, readFile, realpath, rm, stat } from "node:fs/promises";
|
|
@@ -16,8 +16,8 @@ import { performance as performance$1 } from "node:perf_hooks";
|
|
|
16
16
|
import { Transform } from "node:stream";
|
|
17
17
|
import { pipeline } from "node:stream/promises";
|
|
18
18
|
import { ZipFile } from "yazl";
|
|
19
|
-
import { createTRPCUntypedClient, httpLink } from "@trpc/client";
|
|
20
19
|
import { spawn } from "node:child_process";
|
|
20
|
+
import { createTRPCUntypedClient, httpLink } from "@trpc/client";
|
|
21
21
|
import { createServer } from "node:http";
|
|
22
22
|
|
|
23
23
|
//#region ../../packages/canvas-format/src/canvas-sort-key.lib.ts
|
|
@@ -6011,7 +6011,7 @@ const placementInputs = (inputs) => inSurfaceWords({
|
|
|
6011
6011
|
* fields, never the page itself. The script is told when its pass ends and how to renew it.
|
|
6012
6012
|
*/
|
|
6013
6013
|
const captureSnippet = (pass, extent) => {
|
|
6014
|
-
const blocked = `The capture script did not load from ${new URL(pass.scriptUrl).origin}. If
|
|
6014
|
+
const blocked = `The capture script did not load from ${new URL(pass.scriptUrl).origin}. If a Content Security Policy blocked it, run this snippet from Playwright in a context with bypassCSP: true.`;
|
|
6015
6015
|
return [
|
|
6016
6016
|
"(async () => {",
|
|
6017
6017
|
" if (globalThis.__enhance_capture__ === undefined)",
|
|
@@ -6037,10 +6037,10 @@ const askForSnippet = async (remote, canvasId, extent) => {
|
|
|
6037
6037
|
return receipt("run-snippet", {
|
|
6038
6038
|
snippet: captureSnippet(pass, extent),
|
|
6039
6039
|
passExpiresAt: pass.expiresAt,
|
|
6040
|
-
warning: `Run snippet in the page you opened
|
|
6040
|
+
warning: `Run snippet in the page you opened (Playwright's page.evaluate or your browser's JavaScript tool). It answers with captureId; ${inSurfaceWords({
|
|
6041
6041
|
cli: "run",
|
|
6042
6042
|
mcp: "call"
|
|
6043
|
-
})} ${commandName("canvas.capturePage")} again with ${placementInputs("that captureId, at and baseVersion")}. The pass
|
|
6043
|
+
})} ${commandName("canvas.capturePage")} again with ${placementInputs("that captureId, at and baseVersion")}. The pass lasts 15 minutes for any number of pages, and the snippet holds it: keep the snippet out of what you print. To send this machine's installed fonts, first grant the page local-fonts: in Playwright, await context.grantPermissions(['local-fonts']).`
|
|
6044
6044
|
});
|
|
6045
6045
|
};
|
|
6046
6046
|
/**
|