@enhance-eng/enhance 0.1.166 → 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-DTdmAFNC.mjs → cli-output-identity.lib-DbOpumEM.mjs} +175 -3
- package/dist/main.mjs +138 -78
- package/dist/{mcp-invocation.adapter-C8vXAND1.mjs → mcp-invocation.adapter-CUyCBfrk.mjs} +3 -3
- package/dist/mcp-main.mjs +7 -7
- package/dist/{mcp-server.adapter-BgNggWKN.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-CH-SDeX_.mjs → zod-messages.lib-Cs57z-_f.mjs} +2 -2
- package/package.json +1 -1
|
@@ -9582,7 +9582,17 @@ const clientPerformanceInputSchema = z.discriminatedUnion("name", [
|
|
|
9582
9582
|
builtLayerCount: countSchema,
|
|
9583
9583
|
zoomPercent: countSchema,
|
|
9584
9584
|
frameNumber: countSchema,
|
|
9585
|
-
skippedCount: 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()
|
|
9586
9596
|
}),
|
|
9587
9597
|
z.object({
|
|
9588
9598
|
...base$1,
|
|
@@ -10508,6 +10518,164 @@ var PartialBatchError = class extends CliError {
|
|
|
10508
10518
|
}
|
|
10509
10519
|
};
|
|
10510
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
|
+
|
|
10511
10679
|
//#endregion
|
|
10512
10680
|
//#region src/infrastructure/mcp-tool-names.consts.ts
|
|
10513
10681
|
/** The tool a hosted assistant calls for each capability that has one of its own. */
|
|
@@ -10534,6 +10702,7 @@ const MCP_TOOL_BY_CAPABILITY = {
|
|
|
10534
10702
|
"comment.resolve": "feedback_set_resolved",
|
|
10535
10703
|
"comment.start": "feedback_create",
|
|
10536
10704
|
"operation.status": "operation_status",
|
|
10705
|
+
"prototype.publish": "prototype_publish",
|
|
10537
10706
|
"prototype.publishCanvas": "prototype_publish"
|
|
10538
10707
|
};
|
|
10539
10708
|
|
|
@@ -18855,6 +19024,8 @@ const clientConversionTelemetryRoute = () => baseProcedure.input(clientConversio
|
|
|
18855
19024
|
//#endregion
|
|
18856
19025
|
//#region ../api/src/shared/observability/client-performance-telemetry.router.ts
|
|
18857
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;
|
|
18858
19029
|
const fieldsOf$1 = (input) => {
|
|
18859
19030
|
const { name, ...fields } = input;
|
|
18860
19031
|
const isPrototypeOpen = input.name === "prototype_open" && (input.kind ?? "open") === "open";
|
|
@@ -18870,6 +19041,7 @@ const fieldsOf$1 = (input) => {
|
|
|
18870
19041
|
"unavailable"
|
|
18871
19042
|
].includes(input.outcome) ? 1 : 0,
|
|
18872
19043
|
isJanky: input.name === "canvas_interaction" && input.outcome === "janky" ? 1 : 0,
|
|
19044
|
+
isFocusedPage: focusedPageFlagOf(input),
|
|
18873
19045
|
isRealtimeFailure: input.name === "canvas_realtime" && input.outcome === "failed" ? 1 : 0,
|
|
18874
19046
|
isPrototypeOpen: Number(isPrototypeOpen),
|
|
18875
19047
|
isPrototypeOpenFailure: isPrototypeOpen && input.outcome !== "loaded" && input.reason !== "denied" ? 1 : 0,
|
|
@@ -18882,7 +19054,7 @@ const isFailure$1 = (input) => {
|
|
|
18882
19054
|
if (input.name === "canvas_interaction") return input.outcome !== "smooth";
|
|
18883
19055
|
if (input.name === "prototype_open") return input.outcome !== "loaded";
|
|
18884
19056
|
if (input.name === "canvas_measurement") return true;
|
|
18885
|
-
if (input.name === "canvas_long_frame") return false;
|
|
19057
|
+
if (input.name === "canvas_long_frame" || input.name === "canvas_long_frames_skipped") return false;
|
|
18886
19058
|
return input.outcome !== "succeeded";
|
|
18887
19059
|
};
|
|
18888
19060
|
const clientPerformanceTelemetryRoute = () => baseProcedure.input(clientPerformanceInputSchema).output(clientPerformanceOutputSchema).mutation(({ input, ctx }) => {
|
|
@@ -19799,4 +19971,4 @@ const withCommandInFailure = (value, commandName) => ({
|
|
|
19799
19971
|
});
|
|
19800
19972
|
|
|
19801
19973
|
//#endregion
|
|
19802
|
-
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);
|
|
452
|
+
try {
|
|
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
|
+
}
|
|
457
|
+
return {
|
|
458
|
+
agent,
|
|
459
|
+
folder,
|
|
460
|
+
reason: null
|
|
461
|
+
};
|
|
462
|
+
} catch (error) {
|
|
463
|
+
return {
|
|
464
|
+
agent,
|
|
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);
|
|
437
472
|
try {
|
|
438
|
-
await
|
|
439
|
-
|
|
473
|
+
for (const skill of skills) await rm(path.join(folder, skill.name), {
|
|
474
|
+
recursive: true,
|
|
475
|
+
force: true
|
|
476
|
+
});
|
|
440
477
|
return {
|
|
441
478
|
agent,
|
|
442
|
-
|
|
479
|
+
folder,
|
|
443
480
|
reason: null
|
|
444
481
|
};
|
|
445
482
|
} catch (error) {
|
|
446
483
|
return {
|
|
447
484
|
agent,
|
|
448
|
-
|
|
449
|
-
reason:
|
|
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-DL_Gnxep.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))
|
|
@@ -9558,7 +9564,17 @@ z.discriminatedUnion("name", [
|
|
|
9558
9564
|
builtLayerCount: countSchema,
|
|
9559
9565
|
zoomPercent: countSchema,
|
|
9560
9566
|
frameNumber: countSchema,
|
|
9561
|
-
skippedCount: 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()
|
|
9562
9578
|
}),
|
|
9563
9579
|
z.object({
|
|
9564
9580
|
...base$1,
|
|
@@ -10516,7 +10532,7 @@ const startStallWatch = (caller, idleMs = STALL_MS) => {
|
|
|
10516
10532
|
};
|
|
10517
10533
|
|
|
10518
10534
|
//#endregion
|
|
10519
|
-
//#region ../../packages/sdk/dist/capture-client.client-
|
|
10535
|
+
//#region ../../packages/sdk/dist/capture-client.client-MxFryzJG.mjs
|
|
10520
10536
|
const line = (text) => `Enhance: ${text}\n`;
|
|
10521
10537
|
/** A left-out capture by its journey and step, or by its test when it could not be read at all. */
|
|
10522
10538
|
const leftOutName = (leftOut, attempts) => {
|
|
@@ -11046,6 +11062,45 @@ const registerCapturesProgram = (program, dependencies) => {
|
|
|
11046
11062
|
});
|
|
11047
11063
|
};
|
|
11048
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
|
+
|
|
11049
11104
|
//#endregion
|
|
11050
11105
|
//#region src/infrastructure/command-summaries.consts.ts
|
|
11051
11106
|
const COMMAND_SUMMARIES = {
|
|
@@ -12157,7 +12212,7 @@ const createRemoteRouterAdapter = (source, remote) => {
|
|
|
12157
12212
|
//#region src/infrastructure/setup.program.ts
|
|
12158
12213
|
const MAX_TOKEN_LABEL_CHARACTERS = 120;
|
|
12159
12214
|
const registerSetupProgram = (program, setup, output) => {
|
|
12160
|
-
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) => {
|
|
12161
12216
|
const answer = await setup.run({
|
|
12162
12217
|
token: await readOptionalToken(options.token),
|
|
12163
12218
|
label: `CLI on ${hostname()}`.slice(0, MAX_TOKEN_LABEL_CHARACTERS),
|
|
@@ -12172,7 +12227,7 @@ const registerSetupProgram = (program, setup, output) => {
|
|
|
12172
12227
|
});
|
|
12173
12228
|
output.result(answer);
|
|
12174
12229
|
if (answer.status === "ready") return;
|
|
12175
|
-
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.");
|
|
12176
12231
|
});
|
|
12177
12232
|
};
|
|
12178
12233
|
|
|
@@ -12251,17 +12306,22 @@ const cliMetadataFrom = (procedures) => {
|
|
|
12251
12306
|
mutationPaths: new Set(procedures.flatMap(([path, info]) => info.type === "mutation" ? [path] : []))
|
|
12252
12307
|
};
|
|
12253
12308
|
};
|
|
12254
|
-
/**
|
|
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. */
|
|
12255
12317
|
const registerSignInPrograms = (program, input) => {
|
|
12256
12318
|
const auth = createAuthUseCase(input.credentials, input.remote, createOauthLoopbackAdapter(input.remote));
|
|
12257
12319
|
registerAuthProgram(program, auth, input.output);
|
|
12258
12320
|
registerSetupProgram(program, createSetupUseCase({
|
|
12259
12321
|
auth,
|
|
12260
12322
|
skills: createAgentSkillFoldersAdapter(input.machine.homeDirectory),
|
|
12261
|
-
|
|
12262
|
-
|
|
12263
|
-
command: skillCommandOf(input.commandName, input.machine)
|
|
12264
|
-
})
|
|
12323
|
+
plugins: createClaudePluginsAdapter(input.commandName),
|
|
12324
|
+
skillTexts: () => toolSkillTextsOf(input.commandName, input.machine)
|
|
12265
12325
|
}), input.output);
|
|
12266
12326
|
};
|
|
12267
12327
|
const registerUtilityPrograms = (program, input, catalog) => {
|
|
@@ -12634,7 +12694,7 @@ const main = async () => {
|
|
|
12634
12694
|
const remote = createHttpRemoteAdapter(config.apiUrl, credentials, mutationKey);
|
|
12635
12695
|
const cli = createCliProgram({
|
|
12636
12696
|
apiUrl: config.apiUrl,
|
|
12637
|
-
version: "0.1.
|
|
12697
|
+
version: "0.1.167",
|
|
12638
12698
|
credentials,
|
|
12639
12699
|
remote,
|
|
12640
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
|