@enhance-eng/enhance 0.1.172 → 0.1.175
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-BsDqFLVA.mjs → cli-output-identity.lib-G_YH4nyt.mjs} +129 -56
- package/dist/main.mjs +80 -12
- package/dist/{mcp-invocation.adapter-DGgt79VT.mjs → mcp-invocation.adapter-COoROuob.mjs} +48 -41
- package/dist/mcp-main.mjs +7 -7
- package/dist/{mcp-server.adapter-CbObvH7Y.mjs → mcp-server.adapter-Du3nYNyJ.mjs} +122 -27
- package/dist/mcp.mjs +2 -2
- package/dist/remote-mcp-main.mjs +10 -13
- package/dist/{zod-messages.lib-B8yowT7b.mjs → zod-messages.lib-B3YsMYh-.mjs} +1 -1
- package/package.json +1 -1
|
@@ -1031,6 +1031,12 @@ const canvasFlowOffsetSchema = z.object({
|
|
|
1031
1031
|
x: canvasNumberSchema,
|
|
1032
1032
|
y: canvasNumberSchema
|
|
1033
1033
|
});
|
|
1034
|
+
/**
|
|
1035
|
+
* What an alignment does when its content overflows the box it aligns in: `safe` falls back to the
|
|
1036
|
+
* start, `unsafe` keeps the alignment and lets the content overflow both sides, as CSS's overflow
|
|
1037
|
+
* position keywords do. Without one an alignment keeps CSS's default for that property.
|
|
1038
|
+
*/
|
|
1039
|
+
const canvasOverflowPositionSchema = z.enum(["safe", "unsafe"]);
|
|
1034
1040
|
const canvasFlexLayoutSchema = z.object({
|
|
1035
1041
|
direction: z.enum(["row", "column"]),
|
|
1036
1042
|
alignItems: z.enum([
|
|
@@ -1063,7 +1069,13 @@ const canvasFlexLayoutSchema = z.object({
|
|
|
1063
1069
|
wrap: z.enum(["nowrap", "wrap"]).optional(),
|
|
1064
1070
|
gridColumns: z.number().int().positive().optional(),
|
|
1065
1071
|
gridAutoRepeat: canvasGridAutoRepeatSchema.optional(),
|
|
1066
|
-
padding: canvasFlexPaddingSchema
|
|
1072
|
+
padding: canvasFlexPaddingSchema,
|
|
1073
|
+
/** The overflow position of each alignment that names one, by the alignment it qualifies. */
|
|
1074
|
+
overflowPositions: z.object({
|
|
1075
|
+
justifyContent: canvasOverflowPositionSchema.optional(),
|
|
1076
|
+
alignItems: canvasOverflowPositionSchema.optional(),
|
|
1077
|
+
alignContent: canvasOverflowPositionSchema.optional()
|
|
1078
|
+
}).strict().optional()
|
|
1067
1079
|
}).strict();
|
|
1068
1080
|
/**
|
|
1069
1081
|
* What conversion recorded about the source box of an inline-level frame that the frame itself
|
|
@@ -1083,10 +1095,15 @@ const canvasScrollbarGutterSchema = z.object({
|
|
|
1083
1095
|
bottom: nonNegativeCanvasNumberSchema.optional(),
|
|
1084
1096
|
left: nonNegativeCanvasNumberSchema.optional()
|
|
1085
1097
|
}).strict();
|
|
1086
|
-
/**
|
|
1098
|
+
/**
|
|
1099
|
+
* A percentage of the containing block plus pixels; unlike a size limit, either may be negative.
|
|
1100
|
+
* The position may be held between pixel bounds, as a browser holds a scroll inside its range.
|
|
1101
|
+
*/
|
|
1087
1102
|
const canvasParentRelativeCoordinateSchema = z.object({
|
|
1088
1103
|
ratio: canvasNumberSchema,
|
|
1089
|
-
offset: canvasNumberSchema.optional()
|
|
1104
|
+
offset: canvasNumberSchema.optional(),
|
|
1105
|
+
min: canvasNumberSchema.optional(),
|
|
1106
|
+
max: canvasNumberSchema.optional()
|
|
1090
1107
|
}).strict();
|
|
1091
1108
|
const canvasPositionParentSchema = z.object({
|
|
1092
1109
|
x: canvasParentRelativeCoordinateSchema.optional(),
|
|
@@ -1120,6 +1137,8 @@ const canvasNodeLayoutSchema = z.object({
|
|
|
1120
1137
|
"end",
|
|
1121
1138
|
"stretch"
|
|
1122
1139
|
]).optional(),
|
|
1140
|
+
/** The overflow position `alignSelf` names, when it names one. */
|
|
1141
|
+
alignSelfOverflowPosition: canvasOverflowPositionSchema.optional(),
|
|
1123
1142
|
flexGrow: nonNegativeCanvasNumberSchema.optional(),
|
|
1124
1143
|
flexShrink: nonNegativeCanvasNumberSchema.optional(),
|
|
1125
1144
|
flexBasis: z.union([
|
|
@@ -3417,6 +3436,7 @@ const CANVAS_RICH_TEXT_STYLE_PROPERTIES = /* @__PURE__ */ new Set([
|
|
|
3417
3436
|
"flexDirection",
|
|
3418
3437
|
"fontFamily",
|
|
3419
3438
|
"fontFeatureSettings",
|
|
3439
|
+
"fontLanguageOverride",
|
|
3420
3440
|
"fontOpticalSizing",
|
|
3421
3441
|
"fontSize",
|
|
3422
3442
|
"fontStretch",
|
|
@@ -4250,12 +4270,22 @@ const CANVAS_FIRST_LETTER_PROPERTIES = {
|
|
|
4250
4270
|
"font-stretch",
|
|
4251
4271
|
"font-style",
|
|
4252
4272
|
"font-weight",
|
|
4273
|
+
"font-variant-alternates",
|
|
4253
4274
|
"font-variant-caps",
|
|
4275
|
+
"font-variant-east-asian",
|
|
4276
|
+
"font-variant-emoji",
|
|
4254
4277
|
"font-variant-ligatures",
|
|
4255
4278
|
"font-variant-numeric",
|
|
4279
|
+
"font-variant-position",
|
|
4256
4280
|
"font-feature-settings",
|
|
4257
4281
|
"font-variation-settings",
|
|
4282
|
+
"font-optical-sizing",
|
|
4283
|
+
"font-size-adjust",
|
|
4258
4284
|
"font-kerning",
|
|
4285
|
+
"font-language-override",
|
|
4286
|
+
"font-synthesis-weight",
|
|
4287
|
+
"font-synthesis-style",
|
|
4288
|
+
"font-synthesis-small-caps",
|
|
4259
4289
|
"letter-spacing",
|
|
4260
4290
|
"line-height",
|
|
4261
4291
|
"text-shadow",
|
|
@@ -9967,6 +9997,10 @@ const clientRenderFailureDetailsSchema = z.strictObject({
|
|
|
9967
9997
|
"export-image-unreachable",
|
|
9968
9998
|
"export-image-not-an-image",
|
|
9969
9999
|
"export-font-unread",
|
|
10000
|
+
"export-drawn-by-server",
|
|
10001
|
+
"export-picture-refused",
|
|
10002
|
+
"export-picture-blank",
|
|
10003
|
+
"export-text-unaligned",
|
|
9970
10004
|
"clipboard-unavailable",
|
|
9971
10005
|
"clipboard-image-pending",
|
|
9972
10006
|
"clipboard-image-unavailable",
|
|
@@ -10016,6 +10050,23 @@ const clientRenderFailureDetailsSchema = z.strictObject({
|
|
|
10016
10050
|
resourceCount: count$1.optional(),
|
|
10017
10051
|
/** The status a refused export read answered with. */
|
|
10018
10052
|
httpStatus: z.number().int().min(HTTP_STATUS_LOWEST).max(HTTP_STATUS_HIGHEST).optional(),
|
|
10053
|
+
/** The browser engine that drew, or could not draw, an image export. */
|
|
10054
|
+
browser: z.strictObject({
|
|
10055
|
+
engine: z.enum([
|
|
10056
|
+
"chromium",
|
|
10057
|
+
"firefox",
|
|
10058
|
+
"webkit",
|
|
10059
|
+
"unknown"
|
|
10060
|
+
]),
|
|
10061
|
+
version: z.number().int().min(0).max(MAX_COUNT)
|
|
10062
|
+
}).optional(),
|
|
10063
|
+
/** Why the browser gave no picture back for `export-picture-refused`. */
|
|
10064
|
+
refusal: z.enum([
|
|
10065
|
+
"read-back",
|
|
10066
|
+
"load",
|
|
10067
|
+
"memory",
|
|
10068
|
+
"encode"
|
|
10069
|
+
]).optional(),
|
|
10019
10070
|
deliveryGap: z.strictObject({
|
|
10020
10071
|
refused: count$1,
|
|
10021
10072
|
expired: count$1,
|
|
@@ -10775,6 +10826,8 @@ const SKILL_NAMES = [
|
|
|
10775
10826
|
"respond-to-feedback",
|
|
10776
10827
|
"apply-canvas-design"
|
|
10777
10828
|
];
|
|
10829
|
+
/** A line named a capability the server cannot reach, so the line is left out. */
|
|
10830
|
+
var Unreachable = class extends Error {};
|
|
10778
10831
|
/** A skill's name could not be written for a surface: the surface has no name for a capability. */
|
|
10779
10832
|
var SkillTextError = class extends Error {
|
|
10780
10833
|
constructor(skill, capability, surface) {
|
|
@@ -10782,19 +10835,56 @@ var SkillTextError = class extends Error {
|
|
|
10782
10835
|
this.name = "SkillTextError";
|
|
10783
10836
|
}
|
|
10784
10837
|
};
|
|
10838
|
+
const upper = (text) => `${text.charAt(0).toUpperCase()}${text.slice(1)}`;
|
|
10839
|
+
/** The text, or undefined when it names a capability the server cannot reach. */
|
|
10840
|
+
const whenReached = (text) => {
|
|
10841
|
+
try {
|
|
10842
|
+
return text();
|
|
10843
|
+
} catch (error) {
|
|
10844
|
+
if (error instanceof Unreachable) return void 0;
|
|
10845
|
+
throw error;
|
|
10846
|
+
}
|
|
10847
|
+
};
|
|
10848
|
+
/** A list line, or nothing when it names a capability the server cannot reach. */
|
|
10849
|
+
const lineOf = (text) => {
|
|
10850
|
+
const held = whenReached(text);
|
|
10851
|
+
return held === void 0 ? "" : `- ${held}\n`;
|
|
10852
|
+
};
|
|
10785
10853
|
const wordsOf = (skill, wording) => {
|
|
10786
|
-
const
|
|
10854
|
+
const reached = (capability) => {
|
|
10855
|
+
const reach = wording.surface === "mcp" ? wording.reach?.(capability) : void 0;
|
|
10856
|
+
if (reach?.kind === "none") throw new Unreachable(capability);
|
|
10857
|
+
if (reach !== void 0) return reach;
|
|
10787
10858
|
const name = wording.nameOf(capability);
|
|
10788
10859
|
if (name === void 0) throw new SkillTextError(skill, capability, wording.surface);
|
|
10789
|
-
return
|
|
10860
|
+
return {
|
|
10861
|
+
kind: "tool",
|
|
10862
|
+
tool: wording.surface === "cli" ? `${wording.command} ${name}` : name
|
|
10863
|
+
};
|
|
10864
|
+
};
|
|
10865
|
+
const teacher = (capability) => {
|
|
10866
|
+
const reach = reached(capability);
|
|
10867
|
+
if (reach.kind === "through") return `\`${reach.describe}\` with \`${reach.capability}\``;
|
|
10868
|
+
return wording.surface === "cli" ? `\`${reach.tool} --help\`` : `the description of \`${reach.tool}\``;
|
|
10869
|
+
};
|
|
10870
|
+
const toolOf = (capability) => {
|
|
10871
|
+
const reach = reached(capability);
|
|
10872
|
+
return wording.surface === "mcp" && reach.kind === "tool" ? reach.tool : void 0;
|
|
10790
10873
|
};
|
|
10791
|
-
const isTool = wording.surface === "cli";
|
|
10792
10874
|
return {
|
|
10793
|
-
call: (capability) =>
|
|
10875
|
+
call: (capability) => {
|
|
10876
|
+
const reach = reached(capability);
|
|
10877
|
+
return reach.kind === "tool" ? `\`${reach.tool}\`` : `\`${reach.tool}\` with \`${reach.capability}\``;
|
|
10878
|
+
},
|
|
10794
10879
|
two: (words) => words[wording.surface],
|
|
10795
|
-
learn: (capability, what) =>
|
|
10796
|
-
learnBoth: (first, second, what) =>
|
|
10797
|
-
|
|
10880
|
+
learn: (capability, what) => `${upper(teacher(capability))} shows how to ${what}.`,
|
|
10881
|
+
learnBoth: (first, second, what) => {
|
|
10882
|
+
const [one, other] = [toolOf(first), toolOf(second)];
|
|
10883
|
+
if (one === void 0 || other === void 0) return `${upper(teacher(first))} and ${teacher(second)} show how to ${what}.`;
|
|
10884
|
+
return one === other ? `The description of \`${one}\` shows how to ${what}.` : `The descriptions of \`${one}\` and \`${other}\` show how to ${what}.`;
|
|
10885
|
+
},
|
|
10886
|
+
command: wording.surface === "cli" ? wording.command : "",
|
|
10887
|
+
line: lineOf
|
|
10798
10888
|
};
|
|
10799
10889
|
};
|
|
10800
10890
|
/**
|
|
@@ -10895,8 +10985,9 @@ ${DESIGN_RULES.finish} Then give the canvas link. ${DESIGN_RULES.ids}
|
|
|
10895
10985
|
const SKILLS = {
|
|
10896
10986
|
capture: {
|
|
10897
10987
|
job: "capturing screens",
|
|
10988
|
+
main: "canvas.capturePage",
|
|
10898
10989
|
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.",
|
|
10899
|
-
body: ({ call, two, command }) => `# Capture screens to Enhance
|
|
10990
|
+
body: ({ call, two, command, line }) => `# Capture screens to Enhance
|
|
10900
10991
|
|
|
10901
10992
|
Put each screen this thread is changing onto one Enhance canvas as an editable frame, and return the canvas link.
|
|
10902
10993
|
|
|
@@ -10908,75 +10999,57 @@ ${two({
|
|
|
10908
10999
|
- \`${command} auth status\` says who is signed in. If nobody is, ask the person to run \`${command} setup\`.`,
|
|
10909
11000
|
mcp: `## Tools
|
|
10910
11001
|
|
|
10911
|
-
|
|
10912
|
-
- ${call("canvas.capturePage")} puts one page on the canvas. Its description gives the two calls one capture takes. Read it before the first capture.
|
|
10913
|
-
- ${call("auth.status")} says who is signed in. If nobody is, call ${call("auth.login")}.`
|
|
11002
|
+
${line(() => `${call("canvas.create")} with a \`title\` of what this thread is changing makes the canvas and answers with its id and its link.`)}${line(() => `${call("canvas.capturePage")} puts one page on the canvas. Its description gives the two calls one capture takes. Read it before the first capture.`)}${line(() => `${call("auth.status")} says who is signed in. If nobody is, call ${call("auth.login")}.`)}`.trimEnd()
|
|
10914
11003
|
})}
|
|
10915
11004
|
`
|
|
10916
11005
|
},
|
|
10917
11006
|
"design-on-canvas": {
|
|
10918
11007
|
job: "designing on a canvas",
|
|
11008
|
+
main: "canvas.insertHtml",
|
|
10919
11009
|
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.",
|
|
10920
11010
|
body: (words) => {
|
|
10921
|
-
const { call, two, learn } = words;
|
|
11011
|
+
const { call, two, learn, line } = words;
|
|
10922
11012
|
return `# Design on the canvas
|
|
10923
11013
|
|
|
10924
11014
|
Create or change editable screens on an Enhance canvas, look at what you made, and give the canvas link.
|
|
10925
11015
|
|
|
10926
11016
|
${listHeading(words)}
|
|
10927
11017
|
|
|
10928
|
-
|
|
11018
|
+
${line(() => `${two({
|
|
10929
11019
|
cli: `\`${words.command} canvas create --title "<what this is>"\``,
|
|
10930
11020
|
mcp: `${call("canvas.create")} with a \`title\``
|
|
10931
|
-
})} makes a canvas and answers with its id and its link.
|
|
10932
|
-
|
|
10933
|
-
- ${learn("canvas.insertHtml", "add a screen as HTML, with an example")} Read it before the first insert.
|
|
10934
|
-
- Give a new top-level screen \`"placement": {"kind": "auto"}\` so Enhance puts it in free space, unless the person gave coordinates. Place the next screen of a sequence with \`{"kind": "near", "anchorNodeId": "<the previous screen's id from its answer>", "side": "right"}\`.
|
|
10935
|
-
- ${learn("canvas.edit", "change text, styles, names and order on layers that are already there, and copy a layer, many in one call")} Use it for any change to existing work.
|
|
10936
|
-
- ${learn("canvas.updateHtml", "rebuild the inside of a layer")} Use it only when the structure itself changes.
|
|
10937
|
-
- ${learn("canvas.importAsset", "bring in an image or a font")}
|
|
10938
|
-
- ${learn("canvas.render", "get a picture of a screen")}
|
|
10939
|
-
- ${learn("canvas.finishWorkingOnNodes", "say that you have finished, so your mark leaves the canvas")}
|
|
10940
|
-
|
|
11021
|
+
})} makes a canvas and answers with its id and its link.`)}${line(() => learn("canvas.read", "read what a canvas holds: its outline, or one screen as HTML"))}${line(() => `${learn("canvas.insertHtml", "add a screen as HTML, with an example")} Read it before the first insert.`)}- Give a new top-level screen \`"placement": {"kind": "auto"}\` so Enhance puts it in free space, unless the person gave coordinates. Place the next screen of a sequence with \`{"kind": "near", "anchorNodeId": "<the previous screen's id from its answer>", "side": "right"}\`.
|
|
11022
|
+
${line(() => `${learn("canvas.edit", "change text, styles, names and order on layers that are already there, and copy a layer, many in one call")} Use it for any change to existing work.`)}${line(() => `${learn("canvas.updateHtml", "rebuild the inside of a layer")} Use it only when the structure itself changes.`)}${line(() => learn("canvas.importAsset", "bring in an image or a font"))}${line(() => learn("canvas.render", "get a picture of a screen"))}${line(() => learn("canvas.finishWorkingOnNodes", "say that you have finished, so your mark leaves the canvas"))}
|
|
10941
11023
|
${designSections(words)}`;
|
|
10942
11024
|
}
|
|
10943
11025
|
},
|
|
10944
11026
|
"publish-prototype": {
|
|
10945
11027
|
job: "publishing a prototype",
|
|
11028
|
+
main: "prototype.publish",
|
|
10946
11029
|
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.",
|
|
10947
|
-
body: (
|
|
10948
|
-
const { learn } = words;
|
|
10949
|
-
return `# Publish a prototype
|
|
11030
|
+
body: ({ learn, line, two }) => `# Publish a prototype
|
|
10950
11031
|
|
|
10951
11032
|
Publish a built site to an Enhance canvas as a prototype people can click through, and give the canvas link.
|
|
10952
11033
|
|
|
10953
|
-
${listHeading(
|
|
11034
|
+
${listHeading({ two })}
|
|
10954
11035
|
|
|
10955
|
-
|
|
10956
|
-
- ${learn("canvas.read", "read what the canvas holds, including a prototype already on it")}
|
|
10957
|
-
`;
|
|
10958
|
-
}
|
|
11036
|
+
${line(() => `${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.`)}${line(() => learn("canvas.read", "read what the canvas holds, including a prototype already on it"))}`
|
|
10959
11037
|
},
|
|
10960
11038
|
"respond-to-feedback": {
|
|
10961
11039
|
job: "responding to feedback",
|
|
11040
|
+
main: "comment.reply",
|
|
10962
11041
|
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.",
|
|
10963
|
-
body: (
|
|
10964
|
-
const { learn, learnBoth } = words;
|
|
10965
|
-
return `# Respond to feedback
|
|
11042
|
+
body: ({ learn, learnBoth, line, two }) => `# Respond to feedback
|
|
10966
11043
|
|
|
10967
11044
|
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.
|
|
10968
11045
|
|
|
10969
|
-
${listHeading(
|
|
11046
|
+
${listHeading({ two })}
|
|
10970
11047
|
|
|
10971
|
-
|
|
10972
|
-
- ${learnBoth("comment.reply", "comment.resolve", "answer a thread and resolve it")}
|
|
10973
|
-
- ${learnBoth("canvas.read", "canvas.updateHtml", "read a screen and change it")}
|
|
10974
|
-
- ${learn("prototype.publish", "update a prototype from changed source")}
|
|
10975
|
-
`;
|
|
10976
|
-
}
|
|
11048
|
+
${line(() => learn("comment.list", "read the comment threads on a canvas"))}${line(() => learnBoth("comment.reply", "comment.resolve", "answer a thread and resolve it"))}${line(() => learnBoth("canvas.read", "canvas.updateHtml", "read a screen and change it"))}${line(() => learn("prototype.publish", "update a prototype from changed source"))}`
|
|
10977
11049
|
},
|
|
10978
11050
|
"apply-canvas-design": {
|
|
10979
11051
|
job: "applying a canvas design",
|
|
11052
|
+
main: "canvas.read",
|
|
10980
11053
|
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.",
|
|
10981
11054
|
body: (words) => `# Apply a canvas design
|
|
10982
11055
|
|
|
@@ -10984,30 +11057,29 @@ Make the product's source match an approved design on an Enhance canvas, then up
|
|
|
10984
11057
|
|
|
10985
11058
|
${listHeading(words)}
|
|
10986
11059
|
|
|
10987
|
-
|
|
10988
|
-
- ${words.learn("canvas.render", "get a picture of a screen")}
|
|
10989
|
-
- ${words.learn("prototype.publish", "update the prototype that is already on the canvas")} Read it before publishing.
|
|
10990
|
-
`
|
|
11060
|
+
${words.line(() => `${words.learn("canvas.read", "read the design: the canvas's outline, or one screen as HTML")} ${DESIGN_RULES.code}`)}${words.line(() => words.learn("canvas.render", "get a picture of a screen"))}${words.line(() => `${words.learn("prototype.publish", "update the prototype that is already on the canvas")} Read it before publishing.`)}`
|
|
10991
11061
|
}
|
|
10992
11062
|
};
|
|
10993
11063
|
/**
|
|
10994
11064
|
* Every skill, written for one surface. The tool's are named after its command, so the production
|
|
10995
11065
|
* and development tools never overwrite one another's; the plugin's host names them itself.
|
|
10996
11066
|
*/
|
|
10997
|
-
const skillTextsFor = (wording) => SKILL_NAMES.
|
|
10998
|
-
const { body: write, description } = SKILLS[skill];
|
|
11067
|
+
const skillTextsFor = (wording) => SKILL_NAMES.flatMap((skill) => {
|
|
11068
|
+
const { body: write, description, main } = SKILLS[skill];
|
|
10999
11069
|
const name = wording.surface === "cli" ? `${wording.commandName}-${skill}` : skill;
|
|
11000
|
-
const
|
|
11001
|
-
|
|
11070
|
+
const words = wordsOf(skill, wording);
|
|
11071
|
+
const body = whenReached(() => words.call(main) === "" ? "" : write(words));
|
|
11072
|
+
if (body === void 0) return [];
|
|
11073
|
+
return [{
|
|
11002
11074
|
skill,
|
|
11003
11075
|
name,
|
|
11004
11076
|
description,
|
|
11005
11077
|
body,
|
|
11006
11078
|
text: `---\nname: ${name}\ndescription: ${description}\n---\n\n${body}`
|
|
11007
|
-
};
|
|
11079
|
+
}];
|
|
11008
11080
|
});
|
|
11009
|
-
/** The job
|
|
11010
|
-
const
|
|
11081
|
+
/** The job a skill is for, for the sentence that lists the skills a server offers. */
|
|
11082
|
+
const jobOf = (skill) => SKILLS[skill].job;
|
|
11011
11083
|
|
|
11012
11084
|
//#endregion
|
|
11013
11085
|
//#region src/application/design-guidance.use-case.ts
|
|
@@ -12730,6 +12802,7 @@ const canvasWriteHtmlCapabilityInputSchema = z.object({
|
|
|
12730
12802
|
selectionNodeIds: z.array(z.string().min(1)).optional().describe("Selected node IDs from the canvas URL; restrict the destination to this selection."),
|
|
12731
12803
|
targetNodeId: z.string().min(1).describe("Stable container id for insert-children, or subtree root id for replace."),
|
|
12732
12804
|
mode: z.enum(["insert-children", "replace"]).describe("Insert the compiled group inside the target, or replace the target subtree."),
|
|
12805
|
+
placement: canvasInsertHtmlInputSchema.shape.placement,
|
|
12733
12806
|
html: z.string().min(1).describe("Exactly one safe top-level HTML/CSS visual group to compile into editable nodes."),
|
|
12734
12807
|
idPrefix: z.string().min(1).optional().describe("Optional namespace for generated IDs. Choose a fresh prefix for each new import or replacement; reuse only for an identical retry."),
|
|
12735
12808
|
baseVersion: z.number().int().positive(),
|
|
@@ -20636,4 +20709,4 @@ const withCommandInFailure = (value, commandName) => ({
|
|
|
20636
20709
|
});
|
|
20637
20710
|
|
|
20638
20711
|
//#endregion
|
|
20639
|
-
export { canvasWriteReceiptSchema as $, listCommentsOutputSchema as $n, reserveCanvasAssetOutputSchema as $r, callingSurface as $t, commentAttentionCapabilityInputSchema as A, endCanvasActivityOutputSchema as Ai, foldPrototypeArtifactPath as An, IMAGE_KIND as Ar, quotedValue as At, canvasPrototypeOutputSchema as B, createOrganisationOutputSchema as Bn, canvasBoxSourceOf as Br, encodeCanvasExchangeToken as Bt, OPTION_DESCRIPTIONS as C, emptyCanvasSceneDocument as Ci, appendRecordingChunkOutputSchema as Cn, canvasAgentActivityPhaseSchema as Cr, canvasEditCapabilityInputSchema as Ct, canvasReadCapabilityInputSchema as D, CANVAS_BLEND_MODES as Di, PROTOTYPE_ARTIFACT_MANIFEST_PATH as Dn, getCanvasPreparationOutputSchema as Dr, inputProblemSummary as Dt, canvasApplyCapabilityInputSchema as E, canvasAdditionalStyleSchema as Ei, startRecordingOutputSchema as En, createCanvasPreparationOutputSchema as Er, inputProblemFields as Et, canvasCapturePageInputSchema as F, submitPrototypeArtifactOutputSchema as Fn, canvasLayoutWithoutCssProperties as Fr, hasCanvasReferenceScope as Ft, canvasCaptureCapabilityInputSchema as G, commentCanvasContextSchema as Gn, canvasCssPixelValue as Gr, canvasUpdateHtmlCapabilityInputSchema as Gt, operationStatusImageSchema as H, emptyFixtureDocument as Hn, canvasAuthoredLayoutValueOf as Hr, canvasOutlineCursorSchema as Ht, canvasCapturePageOutputSchema as I, getMeOutputSchema as In, textOf as Ir, parseCanvasReference as It, canvasArrangeCapabilityInputSchema as J, commentThreadSchema as Jn, canvasLayoutPriorityDeclarations as Jr, canvasTranscriptCursorSchema as Jt, canvasCaptureInputSchema as K, commentMessageSchema as Kn, canvasLayoutMainAxisOf as Kr, canvasUpdateHtmlInputSchema as Kt, canvasPrototypeCapabilityInputSchema as L, MCP_AUTH_SCOPE as Ln, mapCanvasFontSources as Lr, canvasExchangeDigest as Lt, recordingSnapshotCapabilityInputSchema as M, getPrototypePublishStatusOutputSchema as Mn, RECTANGLE_KIND as Mr, canvasReferenceNodeIds as Mt, transcriptReadCapabilityInputSchema as N, prototypeArtifactManifestSchema as Nn, SCREEN_KIND as Nr, canvasReferenceRenderTarget as Nt, canvasRenderCapabilityInputSchema as O, canvasBlendModeSchema as Oi, attachPrototypeArtifactOutputSchema as On, FRAME_KIND as Or, isInputRecord as Ot, canvasCapturePageCapabilityInputSchema as P, prototypeArtifactPathSchema as Pn, TEXT_KIND as Pr, fromCanvasReference as Pt, canvasPreparationOutputSchema as Q, listCommentsInputSchema as Qn, reserveCanvasAssetInputSchema as Qr, callOf as Qt, canvasPrototypeInputSchema as R, cliAuthConfigurationSchema as Rn, saveCanvasDocumentOutputSchema as Rr, canvasSnapshotToken as Rt, ProcessExitError as S, canvasSceneDocumentSchema as Si, createScreenOutputSchema as Sn, beginCanvasActivityOutputSchema as Sr, canvasMakeEditableInputSchema as St, PROCEDURE_DESCRIPTIONS as T, signedDownloadSchema as Ti, getRecordingOutputSchema as Tn, agentClientMetadata as Tr, ROOT_FIELD as Tt, operationStatusInputSchema as U, withFixtureScreen as Un, canvasAuthoredStyleDeclarations as Ur, canvasReadInputSchema as Ut, canvasConversionStatusSchema as V, listOrganisationsOutputSchema as Vn, canvasRecordedBoxNoteFor as Vr, resolveCanvasSnapshot as Vt, operationStatusOutputSchema as W, commentAuthorSchema as Wn, canvasAxisStyleProperties as Wr, canvasReadOutputSchema as Wt, canvasDuplicateCapabilityInputSchema as X, elementAnchorSchema as Xn, canvasCssValue as Xr, tallyCanvasWork as Xt, canvasArrangeInputSchema as Y, domLocatorSchema as Yn, canvasCssTokens as Yr, canvasResourcesCursorSchema as Yt, canvasDuplicateInputSchema as Z, getCommentOutputSchema as Zn, canvasAssetUploadOutputSchema as Zr, readStoredCanvasScene as Zt, toPublishedExitTable as _, createCanvasRenderOutputSchema as _i, CliError as _n, canvasRecordingPropsSchema as _r, createdCanvasAnswerSchema as _t, createRouterShapeAdapter as a, editCanvasOutputSchema as ai, inputName as an, screenTextCommentTargetSchema as ar, canvasRenderPendingSchema as at, CAPABILITY_UUID_EXAMPLE as b, getCanvasRenderOutputSchema as bi, appErrorSchema as bn, canvasReferencePageOf as br, canvasInsertHtmlInputSchema as bt, toKebabCase as c, getCanvasMutationOutputSchema as ci, CANVAS_EDIT_WORDS as cn, applyCanvasTypographyPatch as cr, canvasRenderRequestSchema as ct, toPresentedCapabilities as d, createCanvasConversionOutputSchema as di, pointOfUseText as dn, canvasTextPropsWithContent as dr, canvasRemoveInputSchema as dt, canvasFontAssetIdentityFromPath as ei, cliPathOf as en, replyCommentInputSchema as er, canvasAssetImportCapabilityInputSchema as et, toSharedCapabilities as f, getCanvasConversionOutputSchema as fi, startUpListFor as fn, canvasTextRunsOf as fr, canvasCreateToolInputSchema as ft, toMcpFailurePayload as g, canvasWorldBoundsSchema as gi, skillTextsFor as gn, canvasPrototypePropsSchema as gr, canvasFindOutputSchema as gt, toFailurePayload as h, canvasRenderTargetSchema as hi,
|
|
20712
|
+
export { canvasWriteReceiptSchema as $, listCommentsOutputSchema as $n, reserveCanvasAssetOutputSchema as $r, callingSurface as $t, commentAttentionCapabilityInputSchema as A, endCanvasActivityOutputSchema as Ai, foldPrototypeArtifactPath as An, IMAGE_KIND as Ar, quotedValue as At, canvasPrototypeOutputSchema as B, createOrganisationOutputSchema as Bn, canvasBoxSourceOf as Br, encodeCanvasExchangeToken as Bt, OPTION_DESCRIPTIONS as C, emptyCanvasSceneDocument as Ci, appendRecordingChunkOutputSchema as Cn, canvasAgentActivityPhaseSchema as Cr, canvasEditCapabilityInputSchema as Ct, canvasReadCapabilityInputSchema as D, CANVAS_BLEND_MODES as Di, PROTOTYPE_ARTIFACT_MANIFEST_PATH as Dn, getCanvasPreparationOutputSchema as Dr, inputProblemSummary as Dt, canvasApplyCapabilityInputSchema as E, canvasAdditionalStyleSchema as Ei, startRecordingOutputSchema as En, createCanvasPreparationOutputSchema as Er, inputProblemFields as Et, canvasCapturePageInputSchema as F, submitPrototypeArtifactOutputSchema as Fn, canvasLayoutWithoutCssProperties as Fr, hasCanvasReferenceScope as Ft, canvasCaptureCapabilityInputSchema as G, commentCanvasContextSchema as Gn, canvasCssPixelValue as Gr, canvasUpdateHtmlCapabilityInputSchema as Gt, operationStatusImageSchema as H, emptyFixtureDocument as Hn, canvasAuthoredLayoutValueOf as Hr, canvasOutlineCursorSchema as Ht, canvasCapturePageOutputSchema as I, getMeOutputSchema as In, textOf as Ir, parseCanvasReference as It, canvasArrangeCapabilityInputSchema as J, commentThreadSchema as Jn, canvasLayoutPriorityDeclarations as Jr, canvasTranscriptCursorSchema as Jt, canvasCaptureInputSchema as K, commentMessageSchema as Kn, canvasLayoutMainAxisOf as Kr, canvasUpdateHtmlInputSchema as Kt, canvasPrototypeCapabilityInputSchema as L, MCP_AUTH_SCOPE as Ln, mapCanvasFontSources as Lr, canvasExchangeDigest as Lt, recordingSnapshotCapabilityInputSchema as M, getPrototypePublishStatusOutputSchema as Mn, RECTANGLE_KIND as Mr, canvasReferenceNodeIds as Mt, transcriptReadCapabilityInputSchema as N, prototypeArtifactManifestSchema as Nn, SCREEN_KIND as Nr, canvasReferenceRenderTarget as Nt, canvasRenderCapabilityInputSchema as O, canvasBlendModeSchema as Oi, attachPrototypeArtifactOutputSchema as On, FRAME_KIND as Or, isInputRecord as Ot, canvasCapturePageCapabilityInputSchema as P, prototypeArtifactPathSchema as Pn, TEXT_KIND as Pr, fromCanvasReference as Pt, canvasPreparationOutputSchema as Q, listCommentsInputSchema as Qn, reserveCanvasAssetInputSchema as Qr, callOf as Qt, canvasPrototypeInputSchema as R, cliAuthConfigurationSchema as Rn, saveCanvasDocumentOutputSchema as Rr, canvasSnapshotToken as Rt, ProcessExitError as S, canvasSceneDocumentSchema as Si, createScreenOutputSchema as Sn, beginCanvasActivityOutputSchema as Sr, canvasMakeEditableInputSchema as St, PROCEDURE_DESCRIPTIONS as T, signedDownloadSchema as Ti, getRecordingOutputSchema as Tn, agentClientMetadata as Tr, ROOT_FIELD as Tt, operationStatusInputSchema as U, withFixtureScreen as Un, canvasAuthoredStyleDeclarations as Ur, canvasReadInputSchema as Ut, canvasConversionStatusSchema as V, listOrganisationsOutputSchema as Vn, canvasRecordedBoxNoteFor as Vr, resolveCanvasSnapshot as Vt, operationStatusOutputSchema as W, commentAuthorSchema as Wn, canvasAxisStyleProperties as Wr, canvasReadOutputSchema as Wt, canvasDuplicateCapabilityInputSchema as X, elementAnchorSchema as Xn, canvasCssValue as Xr, tallyCanvasWork as Xt, canvasArrangeInputSchema as Y, domLocatorSchema as Yn, canvasCssTokens as Yr, canvasResourcesCursorSchema as Yt, canvasDuplicateInputSchema as Z, getCommentOutputSchema as Zn, canvasAssetUploadOutputSchema as Zr, readStoredCanvasScene as Zt, toPublishedExitTable as _, createCanvasRenderOutputSchema as _i, CliError as _n, canvasRecordingPropsSchema as _r, createdCanvasAnswerSchema as _t, createRouterShapeAdapter as a, editCanvasOutputSchema as ai, inputName as an, screenTextCommentTargetSchema as ar, canvasRenderPendingSchema as at, CAPABILITY_UUID_EXAMPLE as b, getCanvasRenderOutputSchema as bi, appErrorSchema as bn, canvasReferencePageOf as br, canvasInsertHtmlInputSchema as bt, toKebabCase as c, getCanvasMutationOutputSchema as ci, CANVAS_EDIT_WORDS as cn, applyCanvasTypographyPatch as cr, canvasRenderRequestSchema as ct, toPresentedCapabilities as d, createCanvasConversionOutputSchema as di, pointOfUseText as dn, canvasTextPropsWithContent as dr, canvasRemoveInputSchema as dt, canvasFontAssetIdentityFromPath as ei, cliPathOf as en, replyCommentInputSchema as er, canvasAssetImportCapabilityInputSchema as et, toSharedCapabilities as f, getCanvasConversionOutputSchema as fi, startUpListFor as fn, canvasTextRunsOf as fr, canvasCreateToolInputSchema as ft, toMcpFailurePayload as g, canvasWorldBoundsSchema as gi, skillTextsFor as gn, canvasPrototypePropsSchema as gr, canvasFindOutputSchema as gt, toFailurePayload as h, canvasRenderTargetSchema as hi, jobOf as hn, canvasConversionMetadataSchema as hr, canvasFindInputSchema as ht, createLazyCapabilityCatalogAdapter as i, CANVAS_RICH_TEXT_STYLE_PROPERTIES as ii, inSurfaceWords as in, screenElementsCommentTargetSchema as ir, canvasRenderBatchResultSchema as it, prototypePublishCapabilityInputSchema as j, canvasSchema as ji, getPrototypeArtifactCapabilitiesOutputSchema as jn, PAGE_KIND as jr, assertCanvasReferenceNodes as jt, canvasWriteHtmlCapabilityInputSchema as k, canvasPaintSchema as ki, createPrototypeArtifactOutputSchema as kn, GROUP_KIND as kr, objectFieldNames as kt, GUIDE_TOPICS as l, canvasOperationSchema as li, PartialBatchError as ln, canvasCssTypographyOwners as lr, canvasRenderFileSchema as lt, toExitCode as m, canvasRenderStateSchema as mi, SKILL_NAMES as mn, canvasCaptureSchema as mr, canvasFindCursorSchema as mt, withCommandName as n, canvasRichTextValueOf as ni, currentNodeIdStep as nn, screenAreaCommentTargetSchema as nr, canvasAssetImportOutputSchema as nt, CAPTURE_PAGE_CALLS as o, applyCanvasOperationsInputSchema as oi, onSurface as on, startCommentInputSchema as or, canvasRenderScopedInputSchema as ot, createMcpCapabilityDiscoveryAdapter as p, canvasRenderSourceStateSchema as pi, DESIGN_RULES as pn, CAPTURE_LANDING_CONVERTING as pr, canvasCreateToolOutputSchema as pt, canvasCaptureOutputSchema as q, commentResolverSchema as qn, canvasLayoutPositionOf as qr, retryClientTokenSchema as qt, toCanvasAuthoringResult as r, hasCanvasRichTextPaints as ri, diagnosisStep as rn, screenElementCommentTargetSchema as rr, canvasRenderBatchRequestSchema as rt, toCapabilityDefinition as s, applyCanvasOperationsOutputSchema as si, MCP_TOOL_BY_CAPABILITY as sn, createCapturePassOutputSchema as sr, canvasRenderScopedToolInputSchema as st, withCommandInFailure as t, canvasRichTextOf as ti, commandName as tn, replyCommentOutputSchema as tr, canvasAssetImportInputSchema as tt, GUIDE_TOPIC_NAMES as u, canvasNodeStylePatchSchema as ui, loadGuideLineFor as un, canvasTextChangeBetween as ur, canvasRemoveCapabilityInputSchema as ut, toRemoteError as v, createRecordingSnapshotOutputSchema as vi, isFormatRefusalError as vn, captureLandingSchema as vr, listedCanvasesAnswerSchema as vt, PROTOTYPE_UPDATE_GUIDANCE as w, canvasImageAssetIdentityFromPath as wi, completeRecordingOutputSchema as wn, AGENT_CLIENT_HEADER as wr, canvasEditsSchema as wt, createCapabilityPolicyAdapter as x, canvasReadableSceneDocumentSchema as xi, completeScreenOutputSchema as xn, resolveCanvasReference as xr, canvasMakeEditableCapabilityInputSchema as xt, CANVAS_UPDATE_HTML_INPUT_EXAMPLE as y, downloadCanvasRenderOutputSchema as yi, transcriptOutputSchema as yn, DEFAULT_CANVAS_REFERENCE_PAGE_ID as yr, canvasInsertHtmlCapabilityInputSchema as yt, canvasPrototypeIntentSchema as z, createAgentTokenOutputSchema as zn, wholeCanvasDocumentOutputSchema as zr, decodeCanvasExchangeToken as zt };
|
package/dist/main.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { At as quotedValue, Bn as createOrganisationOutputSchema, C as OPTION_DESCRIPTIONS, Ci as emptyCanvasSceneDocument$1, Cn as appendRecordingChunkOutputSchema, Cr as canvasAgentActivityPhaseSchema$1, Dt as inputProblemSummary, En as startRecordingOutputSchema, Et as inputProblemFields, Ft as hasCanvasReferenceScope, Gt as canvasUpdateHtmlCapabilityInputSchema, Hn as emptyFixtureDocument, Hr as canvasAuthoredLayoutValueOf, It as parseCanvasReference, Jr as canvasLayoutPriorityDeclarations, Kr as canvasLayoutMainAxisOf, Nt as canvasReferenceRenderTarget, Ot as isInputRecord, Pt as fromCanvasReference, Rr as saveCanvasDocumentOutputSchema, S as ProcessExitError, Sn as createScreenOutputSchema, Sr as beginCanvasActivityOutputSchema, T as PROCEDURE_DESCRIPTIONS, Tt as ROOT_FIELD, U as operationStatusInputSchema, Un as withFixtureScreen, Ur as canvasAuthoredStyleDeclarations, Ut as canvasReadInputSchema, Wr as canvasAxisStyleProperties, Zt as readStoredCanvasScene, _ as toPublishedExitTable, _n as CliError, a as createRouterShapeAdapter, b as CAPABILITY_UUID_EXAMPLE, bn as appErrorSchema$1, c as toKebabCase, dn as pointOfUseText, en as cliPathOf, f as toSharedCapabilities, fr as canvasTextRunsOf, gi as canvasWorldBoundsSchema$1, gn as skillTextsFor, h as toFailurePayload, ht as canvasFindInputSchema, i as createLazyCapabilityCatalogAdapter, ji as canvasSchema$1, jt as assertCanvasReferenceNodes, kt as objectFieldNames, l as GUIDE_TOPICS, li as canvasOperationSchema$1, ln as PartialBatchError, m as toExitCode, n as withCommandName, nn as currentNodeIdStep, ot as canvasRenderScopedInputSchema, p as createMcpCapabilityDiscoveryAdapter, r as toCanvasAuthoringResult, t as withCommandInFailure, u as GUIDE_TOPIC_NAMES, un as loadGuideLineFor, ut as canvasRemoveCapabilityInputSchema, wn as completeRecordingOutputSchema, wt as canvasEditsSchema, x as createCapabilityPolicyAdapter, xn as completeScreenOutputSchema, y as CANVAS_UPDATE_HTML_INPUT_EXAMPLE, zr as wholeCanvasDocumentOutputSchema } from "./cli-output-identity.lib-
|
|
3
|
-
import { A as canvasAngularGradientSvg, C as sceneAtVersion, D as canvasLinearGradientSvg, E as canvasRadialGradientSvg, 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 assertCanvasReferenceOperations } from "./zod-messages.lib-
|
|
2
|
+
import { At as quotedValue, Bn as createOrganisationOutputSchema, C as OPTION_DESCRIPTIONS, Ci as emptyCanvasSceneDocument$1, Cn as appendRecordingChunkOutputSchema, Cr as canvasAgentActivityPhaseSchema$1, Dt as inputProblemSummary, En as startRecordingOutputSchema, Et as inputProblemFields, Ft as hasCanvasReferenceScope, Gt as canvasUpdateHtmlCapabilityInputSchema, Hn as emptyFixtureDocument, Hr as canvasAuthoredLayoutValueOf, It as parseCanvasReference, Jr as canvasLayoutPriorityDeclarations, Kr as canvasLayoutMainAxisOf, Nt as canvasReferenceRenderTarget, Ot as isInputRecord, Pt as fromCanvasReference, Rr as saveCanvasDocumentOutputSchema, S as ProcessExitError, Sn as createScreenOutputSchema, Sr as beginCanvasActivityOutputSchema, T as PROCEDURE_DESCRIPTIONS, Tt as ROOT_FIELD, U as operationStatusInputSchema, Un as withFixtureScreen, Ur as canvasAuthoredStyleDeclarations, Ut as canvasReadInputSchema, Wr as canvasAxisStyleProperties, Zt as readStoredCanvasScene, _ as toPublishedExitTable, _n as CliError, a as createRouterShapeAdapter, b as CAPABILITY_UUID_EXAMPLE, bn as appErrorSchema$1, c as toKebabCase, dn as pointOfUseText, en as cliPathOf, f as toSharedCapabilities, fr as canvasTextRunsOf, gi as canvasWorldBoundsSchema$1, gn as skillTextsFor, h as toFailurePayload, ht as canvasFindInputSchema, i as createLazyCapabilityCatalogAdapter, ji as canvasSchema$1, jt as assertCanvasReferenceNodes, kt as objectFieldNames, l as GUIDE_TOPICS, li as canvasOperationSchema$1, ln as PartialBatchError, m as toExitCode, n as withCommandName, nn as currentNodeIdStep, ot as canvasRenderScopedInputSchema, p as createMcpCapabilityDiscoveryAdapter, r as toCanvasAuthoringResult, t as withCommandInFailure, u as GUIDE_TOPIC_NAMES, un as loadGuideLineFor, ut as canvasRemoveCapabilityInputSchema, wn as completeRecordingOutputSchema, wt as canvasEditsSchema, x as createCapabilityPolicyAdapter, xn as completeScreenOutputSchema, y as CANVAS_UPDATE_HTML_INPUT_EXAMPLE, zr as wholeCanvasDocumentOutputSchema } from "./cli-output-identity.lib-G_YH4nyt.mjs";
|
|
3
|
+
import { A as canvasAngularGradientSvg, C as sceneAtVersion, D as canvasLinearGradientSvg, E as canvasRadialGradientSvg, 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 assertCanvasReferenceOperations } from "./zod-messages.lib-B3YsMYh-.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";
|
|
@@ -120,6 +120,24 @@ const canvasTextDecorationDeclarations = (decoration) => ({
|
|
|
120
120
|
"text-decoration-skip-ink": decoration.skipInk ?? "auto"
|
|
121
121
|
});
|
|
122
122
|
|
|
123
|
+
//#endregion
|
|
124
|
+
//#region ../../packages/contract/src/canvas/canvas-overflow-position.lib.ts
|
|
125
|
+
/** CSS takes an overflow position only on an alignment that places content at a position. */
|
|
126
|
+
const POSITIONAL_ALIGNMENTS = /* @__PURE__ */ new Set([
|
|
127
|
+
"start",
|
|
128
|
+
"end",
|
|
129
|
+
"center",
|
|
130
|
+
"flex-start",
|
|
131
|
+
"flex-end",
|
|
132
|
+
"self-start",
|
|
133
|
+
"self-end"
|
|
134
|
+
]);
|
|
135
|
+
/**
|
|
136
|
+
* An alignment's CSS value with the overflow position its layout names, such as `safe center`. A
|
|
137
|
+
* distribution, `stretch` or a baseline takes none, so it keeps its value.
|
|
138
|
+
*/
|
|
139
|
+
const canvasAlignmentCss = (value, position) => position !== void 0 && POSITIONAL_ALIGNMENTS.has(value) ? `${position} ${value}` : value;
|
|
140
|
+
|
|
123
141
|
//#endregion
|
|
124
142
|
//#region ../../packages/contract/src/recording/event-stream.lib.ts
|
|
125
143
|
/**
|
|
@@ -1030,9 +1048,9 @@ const containerCss = (node) => {
|
|
|
1030
1048
|
...columns !== void 0 && { "grid-template-columns": columns },
|
|
1031
1049
|
...container.direction !== void 0 && { "flex-direction": container.direction },
|
|
1032
1050
|
...container.wrap !== void 0 && { "flex-wrap": container.wrap },
|
|
1033
|
-
...container.alignItems !== void 0 && { "align-items": aligned(container.alignItems) },
|
|
1034
|
-
...container.alignContent !== void 0 && { "align-content": aligned(container.alignContent) },
|
|
1035
|
-
...container.justifyContent !== void 0 && { "justify-content": aligned(container.justifyContent) },
|
|
1051
|
+
...container.alignItems !== void 0 && { "align-items": canvasAlignmentCss(aligned(container.alignItems), container.overflowPositions?.alignItems) },
|
|
1052
|
+
...container.alignContent !== void 0 && { "align-content": canvasAlignmentCss(aligned(container.alignContent), container.overflowPositions?.alignContent) },
|
|
1053
|
+
...container.justifyContent !== void 0 && { "justify-content": canvasAlignmentCss(aligned(container.justifyContent), container.overflowPositions?.justifyContent) },
|
|
1036
1054
|
...rowGap !== void 0 && { "row-gap": rowGap },
|
|
1037
1055
|
...columnGap !== void 0 && { "column-gap": columnGap },
|
|
1038
1056
|
...Object.fromEntries(Object.entries(container.padding ?? {}).map(([side, value]) => [`padding-${side}`, value]))
|
|
@@ -1085,7 +1103,7 @@ const placementCss = (node, document) => {
|
|
|
1085
1103
|
...sizeCss("width", layout.horizontal, isFlow && (main === "horizontal" || alignment === "stretch")),
|
|
1086
1104
|
...sizeCss("height", layout.vertical, isFlow && (main === "vertical" || alignment === "stretch")),
|
|
1087
1105
|
...isFlow && main !== void 0 && flowCss(node, primary),
|
|
1088
|
-
...isFlow && alignment !== void 0 && { "align-self": alignment },
|
|
1106
|
+
...isFlow && alignment !== void 0 && { "align-self": canvasAlignmentCss(alignment, layout.alignSelfOverflowPosition) },
|
|
1089
1107
|
...isFlow && fillMinimumCss(node, main),
|
|
1090
1108
|
...alignment === "stretch" && cross?.mode === "hug" && main !== void 0 && { [main === "horizontal" ? "height" : "width"]: "auto" },
|
|
1091
1109
|
...layout.aspectRatio !== void 0 && { "aspect-ratio": layout.aspectRatio },
|
|
@@ -1891,7 +1909,7 @@ const registerCanvasProgram = (program, input) => {
|
|
|
1891
1909
|
};
|
|
1892
1910
|
|
|
1893
1911
|
//#endregion
|
|
1894
|
-
//#region ../../packages/sdk/dist/stall-watch.lib-
|
|
1912
|
+
//#region ../../packages/sdk/dist/stall-watch.lib-BuEofb7k.mjs
|
|
1895
1913
|
const CAPTURE_METADATA_LENGTH = 200;
|
|
1896
1914
|
const CAPTURE_FAILURE_LENGTH = 1e3;
|
|
1897
1915
|
const CAPTURE_UPLOAD_BATCH_SIZE = 400;
|
|
@@ -3572,6 +3590,12 @@ const canvasFlowOffsetSchema = z.object({
|
|
|
3572
3590
|
x: canvasNumberSchema,
|
|
3573
3591
|
y: canvasNumberSchema
|
|
3574
3592
|
});
|
|
3593
|
+
/**
|
|
3594
|
+
* What an alignment does when its content overflows the box it aligns in: `safe` falls back to the
|
|
3595
|
+
* start, `unsafe` keeps the alignment and lets the content overflow both sides, as CSS's overflow
|
|
3596
|
+
* position keywords do. Without one an alignment keeps CSS's default for that property.
|
|
3597
|
+
*/
|
|
3598
|
+
const canvasOverflowPositionSchema = z.enum(["safe", "unsafe"]);
|
|
3575
3599
|
const canvasFlexLayoutSchema = z.object({
|
|
3576
3600
|
direction: z.enum(["row", "column"]),
|
|
3577
3601
|
alignItems: z.enum([
|
|
@@ -3604,7 +3628,13 @@ const canvasFlexLayoutSchema = z.object({
|
|
|
3604
3628
|
wrap: z.enum(["nowrap", "wrap"]).optional(),
|
|
3605
3629
|
gridColumns: z.number().int().positive().optional(),
|
|
3606
3630
|
gridAutoRepeat: canvasGridAutoRepeatSchema.optional(),
|
|
3607
|
-
padding: canvasFlexPaddingSchema
|
|
3631
|
+
padding: canvasFlexPaddingSchema,
|
|
3632
|
+
/** The overflow position of each alignment that names one, by the alignment it qualifies. */
|
|
3633
|
+
overflowPositions: z.object({
|
|
3634
|
+
justifyContent: canvasOverflowPositionSchema.optional(),
|
|
3635
|
+
alignItems: canvasOverflowPositionSchema.optional(),
|
|
3636
|
+
alignContent: canvasOverflowPositionSchema.optional()
|
|
3637
|
+
}).strict().optional()
|
|
3608
3638
|
}).strict();
|
|
3609
3639
|
/**
|
|
3610
3640
|
* What conversion recorded about the source box of an inline-level frame that the frame itself
|
|
@@ -3624,10 +3654,15 @@ const canvasScrollbarGutterSchema = z.object({
|
|
|
3624
3654
|
bottom: nonNegativeCanvasNumberSchema.optional(),
|
|
3625
3655
|
left: nonNegativeCanvasNumberSchema.optional()
|
|
3626
3656
|
}).strict();
|
|
3627
|
-
/**
|
|
3657
|
+
/**
|
|
3658
|
+
* A percentage of the containing block plus pixels; unlike a size limit, either may be negative.
|
|
3659
|
+
* The position may be held between pixel bounds, as a browser holds a scroll inside its range.
|
|
3660
|
+
*/
|
|
3628
3661
|
const canvasParentRelativeCoordinateSchema = z.object({
|
|
3629
3662
|
ratio: canvasNumberSchema,
|
|
3630
|
-
offset: canvasNumberSchema.optional()
|
|
3663
|
+
offset: canvasNumberSchema.optional(),
|
|
3664
|
+
min: canvasNumberSchema.optional(),
|
|
3665
|
+
max: canvasNumberSchema.optional()
|
|
3631
3666
|
}).strict();
|
|
3632
3667
|
const canvasPositionParentSchema = z.object({
|
|
3633
3668
|
x: canvasParentRelativeCoordinateSchema.optional(),
|
|
@@ -3661,6 +3696,8 @@ const canvasNodeLayoutSchema = z.object({
|
|
|
3661
3696
|
"end",
|
|
3662
3697
|
"stretch"
|
|
3663
3698
|
]).optional(),
|
|
3699
|
+
/** The overflow position `alignSelf` names, when it names one. */
|
|
3700
|
+
alignSelfOverflowPosition: canvasOverflowPositionSchema.optional(),
|
|
3664
3701
|
flexGrow: nonNegativeCanvasNumberSchema.optional(),
|
|
3665
3702
|
flexShrink: nonNegativeCanvasNumberSchema.optional(),
|
|
3666
3703
|
flexBasis: z.union([
|
|
@@ -6007,12 +6044,22 @@ const CANVAS_FIRST_LETTER_PROPERTIES = {
|
|
|
6007
6044
|
"font-stretch",
|
|
6008
6045
|
"font-style",
|
|
6009
6046
|
"font-weight",
|
|
6047
|
+
"font-variant-alternates",
|
|
6010
6048
|
"font-variant-caps",
|
|
6049
|
+
"font-variant-east-asian",
|
|
6050
|
+
"font-variant-emoji",
|
|
6011
6051
|
"font-variant-ligatures",
|
|
6012
6052
|
"font-variant-numeric",
|
|
6053
|
+
"font-variant-position",
|
|
6013
6054
|
"font-feature-settings",
|
|
6014
6055
|
"font-variation-settings",
|
|
6056
|
+
"font-optical-sizing",
|
|
6057
|
+
"font-size-adjust",
|
|
6015
6058
|
"font-kerning",
|
|
6059
|
+
"font-language-override",
|
|
6060
|
+
"font-synthesis-weight",
|
|
6061
|
+
"font-synthesis-style",
|
|
6062
|
+
"font-synthesis-small-caps",
|
|
6016
6063
|
"letter-spacing",
|
|
6017
6064
|
"line-height",
|
|
6018
6065
|
"text-shadow",
|
|
@@ -9890,6 +9937,10 @@ const clientRenderFailureDetailsSchema = z.strictObject({
|
|
|
9890
9937
|
"export-image-unreachable",
|
|
9891
9938
|
"export-image-not-an-image",
|
|
9892
9939
|
"export-font-unread",
|
|
9940
|
+
"export-drawn-by-server",
|
|
9941
|
+
"export-picture-refused",
|
|
9942
|
+
"export-picture-blank",
|
|
9943
|
+
"export-text-unaligned",
|
|
9893
9944
|
"clipboard-unavailable",
|
|
9894
9945
|
"clipboard-image-pending",
|
|
9895
9946
|
"clipboard-image-unavailable",
|
|
@@ -9939,6 +9990,23 @@ const clientRenderFailureDetailsSchema = z.strictObject({
|
|
|
9939
9990
|
resourceCount: count$1.optional(),
|
|
9940
9991
|
/** The status a refused export read answered with. */
|
|
9941
9992
|
httpStatus: z.number().int().min(HTTP_STATUS_LOWEST).max(HTTP_STATUS_HIGHEST).optional(),
|
|
9993
|
+
/** The browser engine that drew, or could not draw, an image export. */
|
|
9994
|
+
browser: z.strictObject({
|
|
9995
|
+
engine: z.enum([
|
|
9996
|
+
"chromium",
|
|
9997
|
+
"firefox",
|
|
9998
|
+
"webkit",
|
|
9999
|
+
"unknown"
|
|
10000
|
+
]),
|
|
10001
|
+
version: z.number().int().min(0).max(MAX_COUNT)
|
|
10002
|
+
}).optional(),
|
|
10003
|
+
/** Why the browser gave no picture back for `export-picture-refused`. */
|
|
10004
|
+
refusal: z.enum([
|
|
10005
|
+
"read-back",
|
|
10006
|
+
"load",
|
|
10007
|
+
"memory",
|
|
10008
|
+
"encode"
|
|
10009
|
+
]).optional(),
|
|
9942
10010
|
deliveryGap: z.strictObject({
|
|
9943
10011
|
refused: count$1,
|
|
9944
10012
|
expired: count$1,
|
|
@@ -10732,7 +10800,7 @@ const startStallWatch = (caller, idleMs = STALL_MS) => {
|
|
|
10732
10800
|
};
|
|
10733
10801
|
|
|
10734
10802
|
//#endregion
|
|
10735
|
-
//#region ../../packages/sdk/dist/capture-client.client-
|
|
10803
|
+
//#region ../../packages/sdk/dist/capture-client.client-D5I-J6jl.mjs
|
|
10736
10804
|
const line = (text) => `Enhance: ${text}\n`;
|
|
10737
10805
|
/** A left-out capture by its journey and step, or by its test when it could not be read at all. */
|
|
10738
10806
|
const leftOutName = (leftOut, attempts) => {
|
|
@@ -12960,7 +13028,7 @@ const main = async () => {
|
|
|
12960
13028
|
const remote = createHttpRemoteAdapter(config.apiUrl, credentials, mutationKey);
|
|
12961
13029
|
const cli = createCliProgram({
|
|
12962
13030
|
apiUrl: config.apiUrl,
|
|
12963
|
-
version: "0.1.
|
|
13031
|
+
version: "0.1.175",
|
|
12964
13032
|
credentials,
|
|
12965
13033
|
remote,
|
|
12966
13034
|
mutationKey,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as canvasWriteReceiptSchema, $n as listCommentsOutputSchema, B as canvasPrototypeOutputSchema, Bt as encodeCanvasExchangeToken, F as canvasCapturePageInputSchema, Gn as commentCanvasContextSchema, H as operationStatusImageSchema, I as canvasCapturePageOutputSchema, It as parseCanvasReference, Jn as commentThreadSchema, K as canvasCaptureInputSchema, Kn as commentMessageSchema, Kt as canvasUpdateHtmlInputSchema, Lt as canvasExchangeDigest, Q as canvasPreparationOutputSchema, Qn as listCommentsInputSchema, R as canvasPrototypeInputSchema, St as canvasMakeEditableInputSchema, U as operationStatusInputSchema, Ut as canvasReadInputSchema, V as canvasConversionStatusSchema, W as operationStatusOutputSchema, Wn as commentAuthorSchema, Wt as canvasReadOutputSchema, Xn as elementAnchorSchema, Y as canvasArrangeInputSchema, Yn as domLocatorSchema, Z as canvasDuplicateInputSchema, Zn as getCommentOutputSchema, _n as CliError, _t as createdCanvasAnswerSchema, ar as screenTextCommentTargetSchema, bt as canvasInsertHtmlInputSchema, dn as pointOfUseText, dt as canvasRemoveInputSchema, er as replyCommentInputSchema, ft as canvasCreateToolInputSchema, g as toMcpFailurePayload, gt as canvasFindOutputSchema, ht as canvasFindInputSchema, ir as screenElementsCommentTargetSchema, nr as screenAreaCommentTargetSchema, nt as canvasAssetImportOutputSchema, o as CAPTURE_PAGE_CALLS, or as startCommentInputSchema, pt as canvasCreateToolOutputSchema, q as canvasCaptureOutputSchema, qn as commentResolverSchema, rr as screenElementCommentTargetSchema, sn as MCP_TOOL_BY_CAPABILITY, st as canvasRenderScopedToolInputSchema, tr as replyCommentOutputSchema, tt as canvasAssetImportInputSchema, w as PROTOTYPE_UPDATE_GUIDANCE, zt as decodeCanvasExchangeToken } from "./cli-output-identity.lib-
|
|
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
|
|
2
|
+
import { $ as canvasWriteReceiptSchema, $n as listCommentsOutputSchema, B as canvasPrototypeOutputSchema, Bt as encodeCanvasExchangeToken, F as canvasCapturePageInputSchema, Gn as commentCanvasContextSchema, H as operationStatusImageSchema, I as canvasCapturePageOutputSchema, It as parseCanvasReference, Jn as commentThreadSchema, K as canvasCaptureInputSchema, Kn as commentMessageSchema, Kt as canvasUpdateHtmlInputSchema, Lt as canvasExchangeDigest, Q as canvasPreparationOutputSchema, Qn as listCommentsInputSchema, R as canvasPrototypeInputSchema, St as canvasMakeEditableInputSchema, U as operationStatusInputSchema, Ut as canvasReadInputSchema, V as canvasConversionStatusSchema, W as operationStatusOutputSchema, Wn as commentAuthorSchema, Wt as canvasReadOutputSchema, Xn as elementAnchorSchema, Y as canvasArrangeInputSchema, Yn as domLocatorSchema, Z as canvasDuplicateInputSchema, Zn as getCommentOutputSchema, _n as CliError, _t as createdCanvasAnswerSchema, ar as screenTextCommentTargetSchema, bt as canvasInsertHtmlInputSchema, dn as pointOfUseText, dt as canvasRemoveInputSchema, er as replyCommentInputSchema, ft as canvasCreateToolInputSchema, g as toMcpFailurePayload, gt as canvasFindOutputSchema, ht as canvasFindInputSchema, ir as screenElementsCommentTargetSchema, nr as screenAreaCommentTargetSchema, nt as canvasAssetImportOutputSchema, o as CAPTURE_PAGE_CALLS, or as startCommentInputSchema, pt as canvasCreateToolOutputSchema, q as canvasCaptureOutputSchema, qn as commentResolverSchema, rr as screenElementCommentTargetSchema, sn as MCP_TOOL_BY_CAPABILITY, st as canvasRenderScopedToolInputSchema, tr as replyCommentOutputSchema, tt as canvasAssetImportInputSchema, w as PROTOTYPE_UPDATE_GUIDANCE, zt as decodeCanvasExchangeToken } from "./cli-output-identity.lib-G_YH4nyt.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-B3YsMYh-.mjs";
|
|
4
|
+
import { a as createMcpCanvasToolsAdapter, c as toolClientToken, d as createCapabilityCatalogAdapter, i as createMcpClientInvocationAdapter, l as withClientTokenNamed, o as mcpDispatchedResultSchema, r as workflowsFor, s as createMcpResultAdapter, u as createMcpClientContextAdapter } from "./mcp-server.adapter-Du3nYNyJ.mjs";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
import { McpServer } from "@modelcontextprotocol/server";
|
|
7
7
|
|
|
@@ -1220,15 +1220,6 @@ const editToolsFor = (input, catalog, invocation) => createMcpCanvasToolsAdapter
|
|
|
1220
1220
|
delivery: input.delivery ?? "linked"
|
|
1221
1221
|
});
|
|
1222
1222
|
const createMcpCanvasProfileAdapter = (input) => {
|
|
1223
|
-
const workflows = input.workflows === void 0 ? void 0 : createMcpWorkflowsAdapter(input.workflows);
|
|
1224
|
-
const server = new McpServer({
|
|
1225
|
-
name: input.name ?? "enhance-canvas",
|
|
1226
|
-
version: input.version
|
|
1227
|
-
}, {
|
|
1228
|
-
capabilities: { tools: { listChanged: false } },
|
|
1229
|
-
instructions: profileInstructions(input, workflows?.instructions)
|
|
1230
|
-
});
|
|
1231
|
-
workflows?.register(server);
|
|
1232
1223
|
const catalog = input.catalog ?? createCapabilityCatalogAdapter();
|
|
1233
1224
|
const isReadOnly = input.readOnly ?? false;
|
|
1234
1225
|
const authentication = input.authentication ?? "local";
|
|
@@ -1244,35 +1235,51 @@ const createMcpCanvasProfileAdapter = (input) => {
|
|
|
1244
1235
|
arguments: args,
|
|
1245
1236
|
clientToken
|
|
1246
1237
|
});
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1238
|
+
const registerTools = (server) => {
|
|
1239
|
+
createMcpCanvasDiscoveryAdapter({
|
|
1240
|
+
catalog,
|
|
1241
|
+
invocation,
|
|
1242
|
+
readOnly: isReadOnly
|
|
1243
|
+
}).register(server);
|
|
1244
|
+
createMcpCanvasContentAdapter(invoke, isReadOnly).register(server);
|
|
1245
|
+
if (!isReadOnly) {
|
|
1246
|
+
editToolsFor(input, catalog, invocation).register(server);
|
|
1247
|
+
createMcpCanvasPreparationAdapter(invoke).register(server);
|
|
1248
|
+
if (authentication === "local") createMcpPrototypePublishAdapter(invoke).register(server);
|
|
1249
|
+
if (authentication === "local") createMcpAssetImportAdapter(invoke).register(server);
|
|
1250
|
+
else input.hostedFiles?.register(server);
|
|
1251
|
+
}
|
|
1252
|
+
createMcpFeedbackAdapter(invoke, isReadOnly).register(server);
|
|
1253
|
+
if (authentication === "local") createMcpConnectionToolsAdapter({
|
|
1254
|
+
catalog,
|
|
1255
|
+
invocation,
|
|
1256
|
+
readOnly: isReadOnly
|
|
1257
|
+
}).register(server);
|
|
1258
|
+
createMcpOperationStatusAdapter({
|
|
1259
|
+
catalog,
|
|
1260
|
+
invocation
|
|
1261
|
+
}).register(server);
|
|
1262
|
+
input.ui?.register(server, isReadOnly);
|
|
1263
|
+
if (!isReadOnly) createMcpCanvasRenderAdapter({
|
|
1264
|
+
catalog,
|
|
1265
|
+
invocation,
|
|
1266
|
+
...input.ui !== void 0 && { ui: input.ui }
|
|
1267
|
+
}).register(server);
|
|
1268
|
+
};
|
|
1269
|
+
const workflows = workflowsFor({
|
|
1270
|
+
workflows: input.workflows,
|
|
1271
|
+
register: registerTools,
|
|
1272
|
+
catalog
|
|
1273
|
+
});
|
|
1274
|
+
const server = new McpServer({
|
|
1275
|
+
name: input.name ?? "enhance-canvas",
|
|
1276
|
+
version: input.version
|
|
1277
|
+
}, {
|
|
1278
|
+
capabilities: { tools: { listChanged: false } },
|
|
1279
|
+
instructions: profileInstructions(input, workflows?.instructions)
|
|
1280
|
+
});
|
|
1281
|
+
workflows?.register(server);
|
|
1282
|
+
registerTools(server);
|
|
1276
1283
|
return server;
|
|
1277
1284
|
};
|
|
1278
1285
|
|
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-G_YH4nyt.mjs";
|
|
3
|
+
import { a as readLocalMcpEnvironment, t as installZodMessages } from "./zod-messages.lib-B3YsMYh-.mjs";
|
|
4
4
|
import { t as createFileCredentialAdapter } from "./file-credential.adapter-CShGZcd5.mjs";
|
|
5
|
-
import {
|
|
6
|
-
import { n as createMcpCanvasProfileAdapter, t as createMcpInvocationAdapter } from "./mcp-invocation.adapter-
|
|
5
|
+
import { d as createCapabilityCatalogAdapter, t as createMcpServerAdapter, u as createMcpClientContextAdapter } from "./mcp-server.adapter-Du3nYNyJ.mjs";
|
|
6
|
+
import { n as createMcpCanvasProfileAdapter, t as createMcpInvocationAdapter } from "./mcp-invocation.adapter-COoROuob.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.175" });
|
|
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 && { workflows: config.workflowsDirectory },
|
|
180
180
|
name: config.mcpServiceName,
|
|
181
|
-
version: "0.1.
|
|
181
|
+
version: "0.1.175",
|
|
182
182
|
invocation,
|
|
183
183
|
clientMetadata: client.metadata,
|
|
184
184
|
catalog
|
|
185
185
|
}) : createMcpServerAdapter({
|
|
186
|
-
version: "0.1.
|
|
186
|
+
version: "0.1.175",
|
|
187
187
|
name: config.mcpServiceName,
|
|
188
188
|
commandName: config.commandName,
|
|
189
189
|
invocation,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { Ct as canvasEditCapabilityInputSchema, Et as inputProblemFields, Ft as hasCanvasReferenceScope, It as parseCanvasReference, Nt as canvasReferenceRenderTarget, Tr as agentClientMetadata, Zt as readStoredCanvasScene, _n as CliError, d as toPresentedCapabilities, dn as pointOfUseText, fn as startUpListFor, g as toMcpFailurePayload, hi as canvasRenderTargetSchema, hn as
|
|
2
|
+
import { Ct as canvasEditCapabilityInputSchema, Et as inputProblemFields, Ft as hasCanvasReferenceScope, It as parseCanvasReference, Nt as canvasReferenceRenderTarget, Tr as agentClientMetadata, Zt as readStoredCanvasScene, _n as CliError, d as toPresentedCapabilities, dn as pointOfUseText, fn as startUpListFor, g as toMcpFailurePayload, gn as skillTextsFor, hi as canvasRenderTargetSchema, hn as jobOf, i as createLazyCapabilityCatalogAdapter, it as canvasRenderBatchResultSchema, k as canvasWriteHtmlCapabilityInputSchema, l as GUIDE_TOPICS, lt as canvasRenderFileSchema, mn as SKILL_NAMES, n as withCommandName, on as onSurface, p as createMcpCapabilityDiscoveryAdapter, pi as canvasRenderSourceStateSchema, pn as DESIGN_RULES, qt as retryClientTokenSchema, r as toCanvasAuthoringResult, sn as MCP_TOOL_BY_CAPABILITY, t as withCommandInFailure, u as GUIDE_TOPIC_NAMES, zr as wholeCanvasDocumentOutputSchema } from "./cli-output-identity.lib-G_YH4nyt.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
5
5
|
import { readFile, rm } from "node:fs/promises";
|
|
@@ -547,6 +547,7 @@ const writeSchema = canvasWriteHtmlCapabilityInputSchema.pick({
|
|
|
547
547
|
}).extend({
|
|
548
548
|
canvas: z.string().min(1).describe("Canvas UUID or complete canvas/page/selection URL. Preserve every supplied page and selection."),
|
|
549
549
|
mode: z.enum(["insert-children", "replace"]).default("insert-children"),
|
|
550
|
+
placement: canvasWriteHtmlCapabilityInputSchema.shape.placement.describe("Where a new top-level screen (targetNodeId root) goes: auto finds free space, near puts it beside or below a screen, explicit sets page coordinates. Omit to keep the authored position."),
|
|
550
551
|
clientToken: clientTokenSchema
|
|
551
552
|
});
|
|
552
553
|
const editSchema = canvasEditCapabilityInputSchema.extend({ clientToken: clientTokenSchema });
|
|
@@ -676,15 +677,20 @@ const createMcpClientInvocationAdapter = (invocation, legacyClient) => ({ invoke
|
|
|
676
677
|
|
|
677
678
|
//#endregion
|
|
678
679
|
//#region src/infrastructure/mcp-workflows.adapter.ts
|
|
679
|
-
/** The guide offers
|
|
680
|
+
/** The guide offers the skills a server can carry out and every topic, by their short names. */
|
|
680
681
|
const workflowNameSchema = z.enum(SKILL_NAMES);
|
|
681
|
-
const guideNameSchema = z.enum([...SKILL_NAMES, ...GUIDE_TOPIC_NAMES]);
|
|
682
682
|
const workflowSchema = z.object({
|
|
683
683
|
name: workflowNameSchema,
|
|
684
684
|
description: z.string().min(1),
|
|
685
685
|
body: z.string().min(1)
|
|
686
686
|
});
|
|
687
|
-
|
|
687
|
+
/** The sentence that names the job of each skill a server offers, or none when it offers none. */
|
|
688
|
+
const jobsOf = (skills) => {
|
|
689
|
+
const jobs = skills.map((skill) => jobOf(skill));
|
|
690
|
+
const last = jobs.at(-1);
|
|
691
|
+
if (last === void 0) return void 0;
|
|
692
|
+
return `Before ${jobs.length === 1 ? last : `${jobs.slice(0, -1).join(", ")} or ${last}`}, call workflow_guide with the matching workflow and follow its guidance.`;
|
|
693
|
+
};
|
|
688
694
|
const topics = `Topics: ${GUIDE_TOPIC_NAMES.map((name) => `${name} (${GUIDE_TOPICS[name].description})`).join("; ")}.`;
|
|
689
695
|
/** The start-up list names tools, which every MCP server words the same. */
|
|
690
696
|
const startUp = startUpListFor({
|
|
@@ -713,14 +719,18 @@ const workflowIn = (directory, name) => {
|
|
|
713
719
|
};
|
|
714
720
|
/** The guide tool over a folder of skills, or over skills already written for tools. */
|
|
715
721
|
const createMcpWorkflowsAdapter = (skills, authenticationInstructions) => {
|
|
716
|
-
const
|
|
722
|
+
const offered = typeof skills === "string" ? workflowNameSchema.options.map((name) => workflowIn(skills, name)) : skills.map(({ skill, description, body }) => ({
|
|
717
723
|
name: skill,
|
|
718
724
|
description,
|
|
719
725
|
body
|
|
720
|
-
}))
|
|
726
|
+
}));
|
|
727
|
+
const workflows = [...offered, ...GUIDE_TOPIC_NAMES.map((name) => ({
|
|
721
728
|
name,
|
|
722
729
|
...GUIDE_TOPICS[name]
|
|
723
730
|
}))];
|
|
731
|
+
const [first, ...rest] = workflows.map(({ name }) => name);
|
|
732
|
+
const guideNameSchema = z.enum([first ?? GUIDE_TOPIC_NAMES[0], ...rest]);
|
|
733
|
+
const jobs = jobsOf(offered.map(({ name }) => name));
|
|
724
734
|
return {
|
|
725
735
|
instructions: [
|
|
726
736
|
startUp,
|
|
@@ -737,7 +747,7 @@ const createMcpWorkflowsAdapter = (skills, authenticationInstructions) => {
|
|
|
737
747
|
}] }));
|
|
738
748
|
server.registerTool("workflow_guide", {
|
|
739
749
|
title: "Load an Enhance workflow",
|
|
740
|
-
description:
|
|
750
|
+
description: [jobs, topics].filter(Boolean).join(" "),
|
|
741
751
|
inputSchema: z.strictObject({ workflow: guideNameSchema }),
|
|
742
752
|
annotations: {
|
|
743
753
|
readOnlyHint: true,
|
|
@@ -753,6 +763,83 @@ const createMcpWorkflowsAdapter = (skills, authenticationInstructions) => {
|
|
|
753
763
|
};
|
|
754
764
|
};
|
|
755
765
|
|
|
766
|
+
//#endregion
|
|
767
|
+
//#region src/infrastructure/mcp-served-skills.lib.ts
|
|
768
|
+
/**
|
|
769
|
+
* A capability whose job another capability's tool also does. `canvas_write_html` inserts a
|
|
770
|
+
* screen or group (`insert-children`) and rebuilds a layer's inside (`replace`), so a server
|
|
771
|
+
* that has it and lacks the insert or update tool names it for those jobs.
|
|
772
|
+
*/
|
|
773
|
+
const DONE_ALSO_BY = {
|
|
774
|
+
"canvas.insertHtml": ["canvas.writeHtml"],
|
|
775
|
+
"canvas.updateHtml": ["canvas.writeHtml"]
|
|
776
|
+
};
|
|
777
|
+
/**
|
|
778
|
+
* How a server reaches a capability, in this order: a tool of its own for the capability, a
|
|
779
|
+
* tool of its own for a capability that does the same job, the generic tool that runs it by name
|
|
780
|
+
* (with the tool that describes it), or not at all.
|
|
781
|
+
*/
|
|
782
|
+
const reachIn = ({ tools, catalog }) => (capability) => {
|
|
783
|
+
for (const id of [capability, ...DONE_ALSO_BY[capability] ?? []]) {
|
|
784
|
+
const tool = MCP_TOOL_BY_CAPABILITY[id];
|
|
785
|
+
if (tool !== void 0 && tools.has(tool)) return {
|
|
786
|
+
kind: "tool",
|
|
787
|
+
tool
|
|
788
|
+
};
|
|
789
|
+
}
|
|
790
|
+
const operation = catalog.find(({ id }) => id === capability)?.operation;
|
|
791
|
+
const generic = operation === "query" ? "capability_query" : "capability_mutate";
|
|
792
|
+
if (operation !== void 0 && tools.has(generic) && tools.has("capability_describe")) return {
|
|
793
|
+
kind: "through",
|
|
794
|
+
tool: generic,
|
|
795
|
+
describe: "capability_describe",
|
|
796
|
+
capability
|
|
797
|
+
};
|
|
798
|
+
return { kind: "none" };
|
|
799
|
+
};
|
|
800
|
+
const createServedSkills = () => {
|
|
801
|
+
const kept = {};
|
|
802
|
+
return { textsFor: (probe) => {
|
|
803
|
+
kept.written ??= skillTextsFor({
|
|
804
|
+
surface: "mcp",
|
|
805
|
+
nameOf: (capability) => MCP_TOOL_BY_CAPABILITY[capability],
|
|
806
|
+
reach: reachIn(probe())
|
|
807
|
+
});
|
|
808
|
+
return kept.written;
|
|
809
|
+
} };
|
|
810
|
+
};
|
|
811
|
+
/**
|
|
812
|
+
* The names of the tools a set of registrations makes. They are registered on a server nobody
|
|
813
|
+
* connects to, because the SDK's server has no public way to list its own tools.
|
|
814
|
+
*/
|
|
815
|
+
const toolNamesOf = (register) => {
|
|
816
|
+
const server = new McpServer({
|
|
817
|
+
name: "tool-names",
|
|
818
|
+
version: "0"
|
|
819
|
+
});
|
|
820
|
+
const names = /* @__PURE__ */ new Set();
|
|
821
|
+
const registerTool = Reflect.get(server, "registerTool");
|
|
822
|
+
if (typeof registerTool !== "function") throw new TypeError("The MCP server registers no tools.");
|
|
823
|
+
Object.assign(server, { registerTool: (name, ...rest) => {
|
|
824
|
+
names.add(name);
|
|
825
|
+
return Reflect.apply(registerTool, server, [name, ...rest]);
|
|
826
|
+
} });
|
|
827
|
+
register(server);
|
|
828
|
+
return names;
|
|
829
|
+
};
|
|
830
|
+
/**
|
|
831
|
+
* A server's guide, over a folder or skills it was given, or over the skills worded for the tools
|
|
832
|
+
* `register` makes, which are read only when the route has not written its skills yet.
|
|
833
|
+
*/
|
|
834
|
+
const workflowsFor = (served, authenticationInstructions) => {
|
|
835
|
+
const { workflows, register, catalog } = served;
|
|
836
|
+
const skills = typeof workflows === "object" && "textsFor" in workflows ? workflows.textsFor(() => ({
|
|
837
|
+
tools: toolNamesOf(register),
|
|
838
|
+
catalog
|
|
839
|
+
})) : workflows;
|
|
840
|
+
return skills === void 0 ? void 0 : createMcpWorkflowsAdapter(skills, authenticationInstructions);
|
|
841
|
+
};
|
|
842
|
+
|
|
756
843
|
//#endregion
|
|
757
844
|
//#region src/infrastructure/capability-catalogue-text.mapper.ts
|
|
758
845
|
const MAX_LINE_CHARACTERS = 180;
|
|
@@ -934,8 +1021,32 @@ const registerMutation = (server, catalog, invocation, execution) => {
|
|
|
934
1021
|
}));
|
|
935
1022
|
};
|
|
936
1023
|
const createMcpServerAdapter = (input) => {
|
|
937
|
-
const
|
|
938
|
-
const
|
|
1024
|
+
const isLocal = input.exposures?.includes("mcp-transport") === true;
|
|
1025
|
+
const authenticationInstructions = isLocal ? AUTHENTICATION_INSTRUCTIONS : void 0;
|
|
1026
|
+
const catalog = toPresentedCapabilities(input.catalog ?? createCapabilityCatalogAdapter(), input.exposures ?? ["shared"]);
|
|
1027
|
+
const discovery = createMcpCapabilityDiscoveryAdapter(catalog);
|
|
1028
|
+
const mcpResults = createMcpResultAdapter(isLocal ? LOCAL_AUTHENTICATION_REMEDY : HOSTED_AUTHENTICATION_REMEDY, input.commandName);
|
|
1029
|
+
const execution = {
|
|
1030
|
+
delivery: input.delivery ?? "linked",
|
|
1031
|
+
results: mcpResults,
|
|
1032
|
+
invocation: createMcpClientInvocationAdapter(input.invocation, input.clientMetadata)
|
|
1033
|
+
};
|
|
1034
|
+
const registerTools = (server) => {
|
|
1035
|
+
createMcpCatalogueToolAdapter(catalog, input.version, input.commandName).register(server);
|
|
1036
|
+
registerSearch(server, catalog, discovery, mcpResults);
|
|
1037
|
+
createMcpDescribeToolAdapter(discovery, mcpResults).register(server);
|
|
1038
|
+
registerQuery(server, catalog, execution.invocation, execution);
|
|
1039
|
+
registerMutation(server, catalog, execution.invocation, execution);
|
|
1040
|
+
createMcpCanvasToolsAdapter({
|
|
1041
|
+
catalog,
|
|
1042
|
+
...execution
|
|
1043
|
+
}).register(server);
|
|
1044
|
+
};
|
|
1045
|
+
const workflows = workflowsFor({
|
|
1046
|
+
workflows: input.workflows,
|
|
1047
|
+
register: registerTools,
|
|
1048
|
+
catalog
|
|
1049
|
+
}, authenticationInstructions);
|
|
939
1050
|
const instructions = workflows?.instructions ?? authenticationInstructions;
|
|
940
1051
|
const server = new McpServer({
|
|
941
1052
|
name: input.name ?? "enhance-mcp",
|
|
@@ -947,26 +1058,10 @@ const createMcpServerAdapter = (input) => {
|
|
|
947
1058
|
},
|
|
948
1059
|
...instructions !== void 0 && { instructions }
|
|
949
1060
|
});
|
|
950
|
-
|
|
951
|
-
const discovery = createMcpCapabilityDiscoveryAdapter(catalog);
|
|
952
|
-
const mcpResults = createMcpResultAdapter(input.exposures?.includes("mcp-transport") === true ? LOCAL_AUTHENTICATION_REMEDY : HOSTED_AUTHENTICATION_REMEDY, input.commandName);
|
|
953
|
-
createMcpCatalogueToolAdapter(catalog, input.version, input.commandName).register(server);
|
|
954
|
-
registerSearch(server, catalog, discovery, mcpResults);
|
|
955
|
-
createMcpDescribeToolAdapter(discovery, mcpResults).register(server);
|
|
956
|
-
const execution = {
|
|
957
|
-
delivery: input.delivery ?? "linked",
|
|
958
|
-
results: mcpResults,
|
|
959
|
-
invocation: createMcpClientInvocationAdapter(input.invocation, input.clientMetadata)
|
|
960
|
-
};
|
|
961
|
-
registerQuery(server, catalog, execution.invocation, execution);
|
|
962
|
-
registerMutation(server, catalog, execution.invocation, execution);
|
|
963
|
-
createMcpCanvasToolsAdapter({
|
|
964
|
-
catalog,
|
|
965
|
-
...execution
|
|
966
|
-
}).register(server);
|
|
1061
|
+
registerTools(server);
|
|
967
1062
|
workflows?.register(server);
|
|
968
1063
|
return server;
|
|
969
1064
|
};
|
|
970
1065
|
|
|
971
1066
|
//#endregion
|
|
972
|
-
export {
|
|
1067
|
+
export { createMcpCanvasToolsAdapter as a, toolClientToken as c, createCapabilityCatalogAdapter as d, createMcpClientInvocationAdapter as i, withClientTokenNamed as l, createServedSkills as n, mcpDispatchedResultSchema as o, workflowsFor as r, createMcpResultAdapter as s, createMcpServerAdapter as t, createMcpClientContextAdapter as u };
|
package/dist/mcp.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { f as toSharedCapabilities } from "./cli-output-identity.lib-
|
|
2
|
+
import { f as toSharedCapabilities } from "./cli-output-identity.lib-G_YH4nyt.mjs";
|
|
3
3
|
import { t as toCapabilityInventory } from "./capability-inventory.mapper-DyYXyVBJ.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { d as createCapabilityCatalogAdapter, t as createMcpServerAdapter } from "./mcp-server.adapter-Du3nYNyJ.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 { An as foldPrototypeArtifactPath, B as canvasPrototypeOutputSchema, In as getMeOutputSchema, Ln as MCP_AUTH_SCOPE, Pn as prototypeArtifactPathSchema, Ti as signedDownloadSchema, _n as CliError, dn as pointOfUseText,
|
|
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 { c as
|
|
5
|
-
import { n as createMcpCanvasProfileAdapter, t as createMcpInvocationAdapter } from "./mcp-invocation.adapter-
|
|
2
|
+
import { An as foldPrototypeArtifactPath, B as canvasPrototypeOutputSchema, In as getMeOutputSchema, Ln as MCP_AUTH_SCOPE, Pn as prototypeArtifactPathSchema, Ti as signedDownloadSchema, _n as CliError, dn as pointOfUseText, nt as canvasAssetImportOutputSchema, tt as canvasAssetImportInputSchema, w as PROTOTYPE_UPDATE_GUIDANCE, z as canvasPrototypeIntentSchema } from "./cli-output-identity.lib-G_YH4nyt.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-B3YsMYh-.mjs";
|
|
4
|
+
import { c as toolClientToken, d as createCapabilityCatalogAdapter, l as withClientTokenNamed, n as createServedSkills, s as createMcpResultAdapter, t as createMcpServerAdapter, u as createMcpClientContextAdapter } from "./mcp-server.adapter-Du3nYNyJ.mjs";
|
|
5
|
+
import { n as createMcpCanvasProfileAdapter, t as createMcpInvocationAdapter } from "./mcp-invocation.adapter-COoROuob.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";
|
|
@@ -618,14 +618,6 @@ const createMcpHostedFilesAdapter = (input) => ({ register: (server) => {
|
|
|
618
618
|
//#endregion
|
|
619
619
|
//#region src/infrastructure/mcp-http-profile.adapter.ts
|
|
620
620
|
const clientContext = createMcpClientContextAdapter();
|
|
621
|
-
/**
|
|
622
|
-
* What `workflow_guide` answers with on a hosted connection: the skills of the one source, worded
|
|
623
|
-
* for tools, where the plugin's own server reads the folder its build wrote from that source.
|
|
624
|
-
*/
|
|
625
|
-
const workflows = skillTextsFor({
|
|
626
|
-
surface: "mcp",
|
|
627
|
-
nameOf: (capability) => MCP_TOOL_BY_CAPABILITY[capability]
|
|
628
|
-
});
|
|
629
621
|
/** The tools that import a file, fetching only from the origins `files` allows. */
|
|
630
622
|
const hostedFilesFor = (files, apiUrl, credentials) => createMcpHostedFilesAdapter({
|
|
631
623
|
files,
|
|
@@ -642,10 +634,15 @@ const createMcpHttpProfileAdapter = (config, catalog, credentialFor, profile) =>
|
|
|
642
634
|
const hostFiles = config.fileOrigins !== void 0 && config.fileOrigins.length > 0 ? createMcpFileDownloadAdapter(config.fileOrigins) : void 0;
|
|
643
635
|
const stagedFiles = config.stagedUploadOrigin === void 0 ? void 0 : createMcpFileDownloadAdapter([config.stagedUploadOrigin]);
|
|
644
636
|
const ui = config.uiUrl === void 0 ? void 0 : createMcpCanvasUiAdapter(config.uiUrl);
|
|
637
|
+
const skills = {
|
|
638
|
+
withFiles: createServedSkills(),
|
|
639
|
+
withoutFiles: createServedSkills()
|
|
640
|
+
};
|
|
645
641
|
return createMcpHandler(({ authInfo }) => {
|
|
646
642
|
if (authInfo === void 0) throw new Error("authenticated MCP request held no identity");
|
|
647
643
|
const credentials = credentialFor(authInfo.token);
|
|
648
644
|
const files = authInfo.extra?.["savedLogin"] === true ? stagedFiles : hostFiles;
|
|
645
|
+
const workflows = files === void 0 ? skills.withoutFiles : skills.withFiles;
|
|
649
646
|
const hosted = createMcpHostedCapabilitiesAdapter(catalog, createMcpInvocationAdapter(config.apiUrl, credentials, config.configDirectory, {
|
|
650
647
|
version: config.version,
|
|
651
648
|
connectionPath: "hosted_mcp"
|
|
@@ -850,7 +847,7 @@ const server = await createRemoteMcpHttpAdapter({
|
|
|
850
847
|
...config.MCP_STAGED_UPLOAD_ORIGIN !== void 0 && { stagedUploadOrigin: config.MCP_STAGED_UPLOAD_ORIGIN },
|
|
851
848
|
allowedHosts: config.MCP_ALLOWED_HOSTS.split(",").map((value) => value.trim()),
|
|
852
849
|
allowedOrigins: config.MCP_ALLOWED_ORIGINS.split(",").map((value) => value.trim()),
|
|
853
|
-
version: "0.1.
|
|
850
|
+
version: "0.1.175",
|
|
854
851
|
...config.MCP_UI_URL !== void 0 && { uiUrl: config.MCP_UI_URL },
|
|
855
852
|
onerror: (error) => process.stderr.write(`${error.message}\n`)
|
|
856
853
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $r as reserveCanvasAssetOutputSchema, $t as callingSurface, A as commentAttentionCapabilityInputSchema, Ai as endCanvasActivityOutputSchema, An as foldPrototypeArtifactPath, Ar as IMAGE_KIND, Br as canvasBoxSourceOf, Bt as encodeCanvasExchangeToken, Ct as canvasEditCapabilityInputSchema, D as canvasReadCapabilityInputSchema, Di as CANVAS_BLEND_MODES, Dn as PROTOTYPE_ARTIFACT_MANIFEST_PATH, Dr as getCanvasPreparationOutputSchema, Dt as inputProblemSummary, E as canvasApplyCapabilityInputSchema, Ei as canvasAdditionalStyleSchema, Er as createCanvasPreparationOutputSchema, Et as inputProblemFields, Fn as submitPrototypeArtifactOutputSchema, Fr as canvasLayoutWithoutCssProperties, Ft as hasCanvasReferenceScope, G as canvasCaptureCapabilityInputSchema, Gr as canvasCssPixelValue, Gt as canvasUpdateHtmlCapabilityInputSchema, Ht as canvasOutlineCursorSchema, In as getMeOutputSchema, Ir as textOf, It as parseCanvasReference, J as canvasArrangeCapabilityInputSchema, Jt as canvasTranscriptCursorSchema, Kt as canvasUpdateHtmlInputSchema, L as canvasPrototypeCapabilityInputSchema, Lr as mapCanvasFontSources, Lt as canvasExchangeDigest, M as recordingSnapshotCapabilityInputSchema, Mn as getPrototypePublishStatusOutputSchema, Mr as RECTANGLE_KIND, Mt as canvasReferenceNodeIds, N as transcriptReadCapabilityInputSchema, Nn as prototypeArtifactManifestSchema, Nr as SCREEN_KIND, O as canvasRenderCapabilityInputSchema, Oi as canvasBlendModeSchema, On as attachPrototypeArtifactOutputSchema, Or as FRAME_KIND, P as canvasCapturePageCapabilityInputSchema, Pn as prototypeArtifactPathSchema, Pr as TEXT_KIND, Qr as reserveCanvasAssetInputSchema, Qt as callOf, Rn as cliAuthConfigurationSchema, Rt as canvasSnapshotToken, Si as canvasSceneDocumentSchema, Sr as beginCanvasActivityOutputSchema, Tn as getRecordingOutputSchema, U as operationStatusInputSchema, Ur as canvasAuthoredStyleDeclarations, Ut as canvasReadInputSchema, Vn as listOrganisationsOutputSchema, Vr as canvasRecordedBoxNoteFor, Vt as resolveCanvasSnapshot, Wr as canvasAxisStyleProperties, X as canvasDuplicateCapabilityInputSchema, Xr as canvasCssValue, Xt as tallyCanvasWork, Yr as canvasCssTokens, Yt as canvasResourcesCursorSchema, Zr as canvasAssetUploadOutputSchema, Zt as readStoredCanvasScene, _i as createCanvasRenderOutputSchema, _n as CliError, _r as canvasRecordingPropsSchema, ai as editCanvasOutputSchema, an as inputName, at as canvasRenderPendingSchema, bi as getCanvasRenderOutputSchema, br as canvasReferencePageOf, ci as getCanvasMutationOutputSchema, cn as CANVAS_EDIT_WORDS, cr as applyCanvasTypographyPatch, ct as canvasRenderRequestSchema, di as createCanvasConversionOutputSchema, dr as canvasTextPropsWithContent, ei as canvasFontAssetIdentityFromPath, en as cliPathOf, et as canvasAssetImportCapabilityInputSchema, fi as getCanvasConversionOutputSchema, gr as canvasPrototypePropsSchema, hr as canvasConversionMetadataSchema, ht as canvasFindInputSchema, ii as CANVAS_RICH_TEXT_STYLE_PROPERTIES, in as inSurfaceWords, j as prototypePublishCapabilityInputSchema, jn as getPrototypeArtifactCapabilitiesOutputSchema, jr as PAGE_KIND, jt as assertCanvasReferenceNodes, k as canvasWriteHtmlCapabilityInputSchema, ki as canvasPaintSchema, kn as createPrototypeArtifactOutputSchema, kr as GROUP_KIND, ln as PartialBatchError, lr as canvasCssTypographyOwners, lt as canvasRenderFileSchema, mi as canvasRenderStateSchema, mr as canvasCaptureSchema, mt as canvasFindCursorSchema, ni as canvasRichTextValueOf, nn as currentNodeIdStep, nt as canvasAssetImportOutputSchema, oi as applyCanvasOperationsInputSchema, pr as CAPTURE_LANDING_CONVERTING, qr as canvasLayoutPositionOf, ri as hasCanvasRichTextPaints, rn as diagnosisStep, rt as canvasRenderBatchRequestSchema, si as applyCanvasOperationsOutputSchema, sr as createCapturePassOutputSchema, ti as canvasRichTextOf, tn as commandName, ui as canvasNodeStylePatchSchema, ur as canvasTextChangeBetween, ut as canvasRemoveCapabilityInputSchema, v as toRemoteError, vi as createRecordingSnapshotOutputSchema, vn as isFormatRefusalError, vr as captureLandingSchema, vt as listedCanvasesAnswerSchema, wi as canvasImageAssetIdentityFromPath, wr as AGENT_CLIENT_HEADER, xi as canvasReadableSceneDocumentSchema, xr as resolveCanvasReference, xt as canvasMakeEditableCapabilityInputSchema, yi as downloadCanvasRenderOutputSchema, yn as transcriptOutputSchema, yr as DEFAULT_CANVAS_REFERENCE_PAGE_ID, yt as canvasInsertHtmlCapabilityInputSchema, zn as createAgentTokenOutputSchema, zr as wholeCanvasDocumentOutputSchema, zt as decodeCanvasExchangeToken } from "./cli-output-identity.lib-
|
|
2
|
+
import { $r as reserveCanvasAssetOutputSchema, $t as callingSurface, A as commentAttentionCapabilityInputSchema, Ai as endCanvasActivityOutputSchema, An as foldPrototypeArtifactPath, Ar as IMAGE_KIND, Br as canvasBoxSourceOf, Bt as encodeCanvasExchangeToken, Ct as canvasEditCapabilityInputSchema, D as canvasReadCapabilityInputSchema, Di as CANVAS_BLEND_MODES, Dn as PROTOTYPE_ARTIFACT_MANIFEST_PATH, Dr as getCanvasPreparationOutputSchema, Dt as inputProblemSummary, E as canvasApplyCapabilityInputSchema, Ei as canvasAdditionalStyleSchema, Er as createCanvasPreparationOutputSchema, Et as inputProblemFields, Fn as submitPrototypeArtifactOutputSchema, Fr as canvasLayoutWithoutCssProperties, Ft as hasCanvasReferenceScope, G as canvasCaptureCapabilityInputSchema, Gr as canvasCssPixelValue, Gt as canvasUpdateHtmlCapabilityInputSchema, Ht as canvasOutlineCursorSchema, In as getMeOutputSchema, Ir as textOf, It as parseCanvasReference, J as canvasArrangeCapabilityInputSchema, Jt as canvasTranscriptCursorSchema, Kt as canvasUpdateHtmlInputSchema, L as canvasPrototypeCapabilityInputSchema, Lr as mapCanvasFontSources, Lt as canvasExchangeDigest, M as recordingSnapshotCapabilityInputSchema, Mn as getPrototypePublishStatusOutputSchema, Mr as RECTANGLE_KIND, Mt as canvasReferenceNodeIds, N as transcriptReadCapabilityInputSchema, Nn as prototypeArtifactManifestSchema, Nr as SCREEN_KIND, O as canvasRenderCapabilityInputSchema, Oi as canvasBlendModeSchema, On as attachPrototypeArtifactOutputSchema, Or as FRAME_KIND, P as canvasCapturePageCapabilityInputSchema, Pn as prototypeArtifactPathSchema, Pr as TEXT_KIND, Qr as reserveCanvasAssetInputSchema, Qt as callOf, Rn as cliAuthConfigurationSchema, Rt as canvasSnapshotToken, Si as canvasSceneDocumentSchema, Sr as beginCanvasActivityOutputSchema, Tn as getRecordingOutputSchema, U as operationStatusInputSchema, Ur as canvasAuthoredStyleDeclarations, Ut as canvasReadInputSchema, Vn as listOrganisationsOutputSchema, Vr as canvasRecordedBoxNoteFor, Vt as resolveCanvasSnapshot, Wr as canvasAxisStyleProperties, X as canvasDuplicateCapabilityInputSchema, Xr as canvasCssValue, Xt as tallyCanvasWork, Yr as canvasCssTokens, Yt as canvasResourcesCursorSchema, Zr as canvasAssetUploadOutputSchema, Zt as readStoredCanvasScene, _i as createCanvasRenderOutputSchema, _n as CliError, _r as canvasRecordingPropsSchema, ai as editCanvasOutputSchema, an as inputName, at as canvasRenderPendingSchema, bi as getCanvasRenderOutputSchema, br as canvasReferencePageOf, ci as getCanvasMutationOutputSchema, cn as CANVAS_EDIT_WORDS, cr as applyCanvasTypographyPatch, ct as canvasRenderRequestSchema, di as createCanvasConversionOutputSchema, dr as canvasTextPropsWithContent, ei as canvasFontAssetIdentityFromPath, en as cliPathOf, et as canvasAssetImportCapabilityInputSchema, fi as getCanvasConversionOutputSchema, gr as canvasPrototypePropsSchema, hr as canvasConversionMetadataSchema, ht as canvasFindInputSchema, ii as CANVAS_RICH_TEXT_STYLE_PROPERTIES, in as inSurfaceWords, j as prototypePublishCapabilityInputSchema, jn as getPrototypeArtifactCapabilitiesOutputSchema, jr as PAGE_KIND, jt as assertCanvasReferenceNodes, k as canvasWriteHtmlCapabilityInputSchema, ki as canvasPaintSchema, kn as createPrototypeArtifactOutputSchema, kr as GROUP_KIND, ln as PartialBatchError, lr as canvasCssTypographyOwners, lt as canvasRenderFileSchema, mi as canvasRenderStateSchema, mr as canvasCaptureSchema, mt as canvasFindCursorSchema, ni as canvasRichTextValueOf, nn as currentNodeIdStep, nt as canvasAssetImportOutputSchema, oi as applyCanvasOperationsInputSchema, pr as CAPTURE_LANDING_CONVERTING, qr as canvasLayoutPositionOf, ri as hasCanvasRichTextPaints, rn as diagnosisStep, rt as canvasRenderBatchRequestSchema, si as applyCanvasOperationsOutputSchema, sr as createCapturePassOutputSchema, ti as canvasRichTextOf, tn as commandName, ui as canvasNodeStylePatchSchema, ur as canvasTextChangeBetween, ut as canvasRemoveCapabilityInputSchema, v as toRemoteError, vi as createRecordingSnapshotOutputSchema, vn as isFormatRefusalError, vr as captureLandingSchema, vt as listedCanvasesAnswerSchema, wi as canvasImageAssetIdentityFromPath, wr as AGENT_CLIENT_HEADER, xi as canvasReadableSceneDocumentSchema, xr as resolveCanvasReference, xt as canvasMakeEditableCapabilityInputSchema, yi as downloadCanvasRenderOutputSchema, yn as transcriptOutputSchema, yr as DEFAULT_CANVAS_REFERENCE_PAGE_ID, yt as canvasInsertHtmlCapabilityInputSchema, zn as createAgentTokenOutputSchema, zr as wholeCanvasDocumentOutputSchema, zt as decodeCanvasExchangeToken } from "./cli-output-identity.lib-G_YH4nyt.mjs";
|
|
3
3
|
import process from "node:process";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { generateKeyBetween, generateNKeysBetween } from "fractional-indexing";
|