@enhance-eng/enhance 0.1.38 → 0.1.39
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-C3i0q8cd.mjs → cli-output-identity.lib-DgHRuXTI.mjs} +354 -28
- package/dist/main.mjs +3 -3
- package/dist/{mcp-invocation.adapter-taWD_Gn7.mjs → mcp-invocation.adapter-CjZnnMCd.mjs} +3 -3
- package/dist/mcp-main.mjs +7 -7
- package/dist/{mcp-server.adapter-bUMHR5ct.mjs → mcp-server.adapter-DOHJxL6l.mjs} +1 -1
- package/dist/mcp.mjs +2 -2
- package/dist/{mutation-key.adapter-BVKXAugo.mjs → mutation-key.adapter-BWkNj5jp.mjs} +9 -6
- package/dist/remote-mcp-main.mjs +5 -5
- package/package.json +1 -1
|
@@ -13,6 +13,16 @@ import { TRPCClientError } from "@trpc/client";
|
|
|
13
13
|
//#region \0rolldown/runtime.js
|
|
14
14
|
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
15
15
|
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region ../../packages/canvas-format/src/canvas-edit-support.lib.ts
|
|
18
|
+
/** Why the API refused an operation, as a fixed value. Never the words of the refusal. */
|
|
19
|
+
const CANVAS_REFUSAL_CODES = [
|
|
20
|
+
"appearance-unsupported-component",
|
|
21
|
+
"styles-unsupported-component",
|
|
22
|
+
"text-shadow-blend-unsupported",
|
|
23
|
+
"recording-aspect-not-preserved"
|
|
24
|
+
];
|
|
25
|
+
|
|
16
26
|
//#endregion
|
|
17
27
|
//#region ../../packages/canvas-format/src/canvas-format.consts.ts
|
|
18
28
|
/** Historical formats stay pinned; an ordinary writer always uses CANVAS_SCENE_VERSION. */
|
|
@@ -63,7 +73,7 @@ const maskModeOf = (node) => {
|
|
|
63
73
|
const mask = node["compositing"]["mask"];
|
|
64
74
|
return typeof mask === "string" ? MASK_MODES[mask] : void 0;
|
|
65
75
|
};
|
|
66
|
-
const unblended
|
|
76
|
+
const unblended = (paint) => isRecord$3(paint) ? without(paint, "blendMode", "blendSource") : paint;
|
|
67
77
|
/** An older border's alignment is a retired mode that never painted; absent means inside. */
|
|
68
78
|
const borderPaints = (stroke) => isRecord$3(stroke) && "paint" in stroke ? {
|
|
69
79
|
...without(stroke, "paint", "alignment"),
|
|
@@ -87,7 +97,7 @@ const textStroke = (stroke) => {
|
|
|
87
97
|
if (!isRecord$3(stroke)) return stroke;
|
|
88
98
|
const next = {
|
|
89
99
|
...stroke,
|
|
90
|
-
paint: unblended
|
|
100
|
+
paint: unblended(stroke["paint"])
|
|
91
101
|
};
|
|
92
102
|
return stroke["alignment"] === "inside" ? {
|
|
93
103
|
...next,
|
|
@@ -98,7 +108,7 @@ const richTextSpan = (child) => {
|
|
|
98
108
|
if (!isRecord$3(child) || child["kind"] !== "span") return child;
|
|
99
109
|
const next = without(child, "decorationBlendMode");
|
|
100
110
|
const fills = listOf(child["fills"]);
|
|
101
|
-
if (fills !== void 0) next["fills"] = fills.map((paint) => unblended
|
|
111
|
+
if (fills !== void 0) next["fills"] = fills.map((paint) => unblended(paint));
|
|
102
112
|
if (isRecord$3(child["stroke"])) next["stroke"] = textStroke(child["stroke"]);
|
|
103
113
|
const children = listOf(child["children"]);
|
|
104
114
|
if (children !== void 0) next["children"] = children.map((span) => richTextSpan(span));
|
|
@@ -111,7 +121,7 @@ const textFills = (appearance, next) => {
|
|
|
111
121
|
const [only] = fills;
|
|
112
122
|
const paintBlend = isRecord$3(only) ? only["blendMode"] : void 0;
|
|
113
123
|
if (typeof paintBlend === "string" && fills.length === 1 && (appearance["blendMode"] ?? "normal") === "normal") next["blendMode"] = paintBlend;
|
|
114
|
-
next["fills"] = fills.map((paint) => unblended
|
|
124
|
+
next["fills"] = fills.map((paint) => unblended(paint));
|
|
115
125
|
};
|
|
116
126
|
const adaptAppearance = (appearance, isText) => {
|
|
117
127
|
const next = { ...appearance };
|
|
@@ -259,16 +269,24 @@ const adaptCanvasCss = (document) => {
|
|
|
259
269
|
//#endregion
|
|
260
270
|
//#region ../../packages/canvas-format/src/canvas-text-shadow-adaptation.lib.ts
|
|
261
271
|
const isRecord$2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
262
|
-
const
|
|
272
|
+
const isList = (value) => Array.isArray(value);
|
|
273
|
+
/** A text shadow is drawn as part of the text, so it holds no blend and no source for one. */
|
|
274
|
+
const withoutCanvasShadowBlend = (shadow) => {
|
|
275
|
+
if (!isRecord$2(shadow)) return shadow;
|
|
276
|
+
const copy = { ...shadow };
|
|
277
|
+
Reflect.deleteProperty(copy, "blendMode");
|
|
278
|
+
Reflect.deleteProperty(copy, "blendSource");
|
|
279
|
+
return copy;
|
|
280
|
+
};
|
|
263
281
|
const adaptNode = (node) => {
|
|
264
282
|
if (!isRecord$2(node) || node["component"] !== "text" || !isRecord$2(node["appearance"])) return node;
|
|
265
283
|
const shadows = node["appearance"]["shadows"];
|
|
266
|
-
if (!
|
|
284
|
+
if (!isList(shadows)) return node;
|
|
267
285
|
return {
|
|
268
286
|
...node,
|
|
269
287
|
appearance: {
|
|
270
288
|
...node["appearance"],
|
|
271
|
-
shadows: shadows.map((shadow) =>
|
|
289
|
+
shadows: shadows.map((shadow) => withoutCanvasShadowBlend(shadow))
|
|
272
290
|
}
|
|
273
291
|
};
|
|
274
292
|
};
|
|
@@ -954,6 +972,8 @@ const canvasBorderSchema = z.object({
|
|
|
954
972
|
paints: z.array(canvasPaintSchema),
|
|
955
973
|
dashPattern: canvasDashPatternSchema.optional(),
|
|
956
974
|
dashCap: canvasDashCapSchema.optional(),
|
|
975
|
+
/** Captured CSS dashes, which the browser draws: the editor's own dashes have other lengths. */
|
|
976
|
+
dashOrigin: z.literal("css").optional(),
|
|
957
977
|
/** Absent paints inside the layer box, as CSS borders do. */
|
|
958
978
|
alignment: z.enum([
|
|
959
979
|
"inside",
|
|
@@ -2042,7 +2062,7 @@ const coordinate = z.number();
|
|
|
2042
2062
|
const dimension$1 = coordinate.nonnegative();
|
|
2043
2063
|
const MAX_ID_LENGTH = 200;
|
|
2044
2064
|
const MIN_POLYGON_POINTS = 3;
|
|
2045
|
-
const identity = z.string().min(1).max(MAX_ID_LENGTH);
|
|
2065
|
+
const identity$1 = z.string().min(1).max(MAX_ID_LENGTH);
|
|
2046
2066
|
const path = z.string().regex(/^[MmLlHhVvCcSsQqTtAaZzEe\d\s.,+-]*$/u);
|
|
2047
2067
|
const canvasGeometryBoundsSchema = z.strictObject({
|
|
2048
2068
|
x: coordinate,
|
|
@@ -2075,7 +2095,7 @@ const canvasBooleanOperationSchema = z.enum([
|
|
|
2075
2095
|
const canvasBooleanGeometrySchema = z.strictObject({
|
|
2076
2096
|
kind: z.literal("boolean"),
|
|
2077
2097
|
operation: canvasBooleanOperationSchema,
|
|
2078
|
-
operandIds: z.array(identity).min(1).refine((ids) => new Set(ids).size === ids.length),
|
|
2098
|
+
operandIds: z.array(identity$1).min(1).refine((ids) => new Set(ids).size === ids.length),
|
|
2079
2099
|
result: z.strictObject({
|
|
2080
2100
|
path,
|
|
2081
2101
|
fillRule: z.literal("nonzero"),
|
|
@@ -2089,7 +2109,7 @@ const canvasGeometrySchema = z.discriminatedUnion("kind", [
|
|
|
2089
2109
|
canvasPolygonGeometrySchema,
|
|
2090
2110
|
z.strictObject({
|
|
2091
2111
|
kind: z.literal("mask"),
|
|
2092
|
-
maskId: identity,
|
|
2112
|
+
maskId: identity$1,
|
|
2093
2113
|
/** Absent paints as alpha. An outline mask clips to the source's shape only. */
|
|
2094
2114
|
mode: z.enum([
|
|
2095
2115
|
"alpha",
|
|
@@ -3293,6 +3313,8 @@ const currentCanvasOperationSchema = z.discriminatedUnion("op", [
|
|
|
3293
3313
|
})
|
|
3294
3314
|
]);
|
|
3295
3315
|
/** An older client's compositing write is refused with the CSS that replaces it. */
|
|
3316
|
+
/** Each operation's name, for records that may state which kind failed and nothing else. */
|
|
3317
|
+
const CANVAS_OPERATION_NAMES = currentCanvasOperationSchema.options.map((option) => option.shape.op.value);
|
|
3296
3318
|
const canvasOperationSchema = z.preprocess((value, context) => {
|
|
3297
3319
|
if (typeof value !== "object" || value === null || Reflect.get(value, "op") !== "setCompositing") return value;
|
|
3298
3320
|
context.issues.push({
|
|
@@ -4875,6 +4897,8 @@ const renderRouteStateBaseSchema = z.object({
|
|
|
4875
4897
|
const renderRouteCaptureSchema = z.object({
|
|
4876
4898
|
selector: z.string().min(1).max(MAX_RENDER_CAPTURE_SELECTOR_LENGTH),
|
|
4877
4899
|
contentSelector: z.string().min(1).max(MAX_RENDER_CAPTURE_SELECTOR_LENGTH).optional(),
|
|
4900
|
+
/** An export's layer draws something, so a picture with no pixel in it went wrong. */
|
|
4901
|
+
expectsPaint: z.boolean().optional(),
|
|
4878
4902
|
bounds: canvasWorldBoundsSchema,
|
|
4879
4903
|
width: z.number().int().positive(),
|
|
4880
4904
|
height: z.number().int().positive(),
|
|
@@ -8513,7 +8537,9 @@ const refreshRecordingUploadOutputSchema = z.object({ upload: signedUploadSchema
|
|
|
8513
8537
|
const confirmRecordingUploadInputSchema = refreshRecordingUploadInputSchema.extend({ etag: z.string().min(1).max(200) });
|
|
8514
8538
|
const confirmRecordingUploadOutputSchema = z.object({ integrity: recordingIntegritySchema });
|
|
8515
8539
|
const listRecordingsInputSchema = z.object({ canvasId: z.uuid() });
|
|
8516
|
-
const listRecordingsOutputSchema = cappedSchema(recordingSummarySchema)
|
|
8540
|
+
const listRecordingsOutputSchema = cappedSchema(recordingSummarySchema).extend({
|
|
8541
|
+
/** Completed recordings left out because their facts are missing; the API logs each by ID. */
|
|
8542
|
+
unreadableCount: z.number().int().min(0) });
|
|
8517
8543
|
const discardRecordingInputSchema = z.object({ recordingId: z.uuid() });
|
|
8518
8544
|
const discardRecordingOutputSchema = z.object({
|
|
8519
8545
|
recordingId: z.uuid(),
|
|
@@ -8709,10 +8735,15 @@ const clientPerformanceInputSchema = z.discriminatedUnion("name", [
|
|
|
8709
8735
|
"ready",
|
|
8710
8736
|
"slow",
|
|
8711
8737
|
"degraded",
|
|
8712
|
-
"timed-out"
|
|
8738
|
+
"timed-out",
|
|
8739
|
+
"unavailable"
|
|
8713
8740
|
]),
|
|
8714
8741
|
bottleneck: z.enum([
|
|
8715
8742
|
"metadata",
|
|
8743
|
+
"details",
|
|
8744
|
+
"document",
|
|
8745
|
+
"walkthrough-list",
|
|
8746
|
+
"restore",
|
|
8716
8747
|
"projection",
|
|
8717
8748
|
"sources",
|
|
8718
8749
|
"replays"
|
|
@@ -8758,6 +8789,12 @@ const clientPerformanceInputSchema = z.discriminatedUnion("name", [
|
|
|
8758
8789
|
nodeCount: countSchema,
|
|
8759
8790
|
replayCount: countSchema
|
|
8760
8791
|
}),
|
|
8792
|
+
z.object({
|
|
8793
|
+
...base$1,
|
|
8794
|
+
name: z.literal("canvas_measurement"),
|
|
8795
|
+
outcome: z.literal("drift"),
|
|
8796
|
+
layerCount: countSchema
|
|
8797
|
+
}),
|
|
8761
8798
|
z.object({
|
|
8762
8799
|
...base$1,
|
|
8763
8800
|
name: z.literal("prototype_open"),
|
|
@@ -8826,6 +8863,7 @@ const clientPerformanceOutputSchema = z.object({ accepted: z.literal(true) });
|
|
|
8826
8863
|
const MAX_ASSET_LENGTH = 128;
|
|
8827
8864
|
const MAX_FRAME_COORDINATE = 1e7;
|
|
8828
8865
|
const MAX_FRAMES = 8;
|
|
8866
|
+
const count$1 = z.number().int().min(0).max(1e3);
|
|
8829
8867
|
const clientRenderFailureDetailsSchema = z.strictObject({
|
|
8830
8868
|
version: z.literal(1),
|
|
8831
8869
|
severity: z.enum([
|
|
@@ -8858,7 +8896,10 @@ const clientRenderFailureDetailsSchema = z.strictObject({
|
|
|
8858
8896
|
"export-incomplete",
|
|
8859
8897
|
"clipboard-unavailable",
|
|
8860
8898
|
"clipboard-image-pending",
|
|
8861
|
-
"clipboard-image-unavailable"
|
|
8899
|
+
"clipboard-image-unavailable",
|
|
8900
|
+
"edit-target-unsupported",
|
|
8901
|
+
"react-hook-order",
|
|
8902
|
+
"menu-rows-unsupported"
|
|
8862
8903
|
]),
|
|
8863
8904
|
controlId: z.enum([
|
|
8864
8905
|
"canvas-stacking",
|
|
@@ -8870,6 +8911,7 @@ const clientRenderFailureDetailsSchema = z.strictObject({
|
|
|
8870
8911
|
outcome: z.enum([
|
|
8871
8912
|
"failed",
|
|
8872
8913
|
"displayed",
|
|
8914
|
+
"shown",
|
|
8873
8915
|
"retried",
|
|
8874
8916
|
"recovered"
|
|
8875
8917
|
]),
|
|
@@ -8877,7 +8919,25 @@ const clientRenderFailureDetailsSchema = z.strictObject({
|
|
|
8877
8919
|
asset: z.string().max(MAX_ASSET_LENGTH).regex(/^[\w-][\w.-]*\.js$/u),
|
|
8878
8920
|
line: z.number().int().min(1).max(MAX_FRAME_COORDINATE),
|
|
8879
8921
|
column: z.number().int().min(1).max(MAX_FRAME_COORDINATE)
|
|
8880
|
-
})).max(MAX_FRAMES)
|
|
8922
|
+
})).max(MAX_FRAMES),
|
|
8923
|
+
occurredAt: z.iso.datetime().optional(),
|
|
8924
|
+
clientBuild: z.string().regex(/^[\w-]{1,64}$/u).optional(),
|
|
8925
|
+
frameStatus: z.enum([
|
|
8926
|
+
"recorded",
|
|
8927
|
+
"no-stack",
|
|
8928
|
+
"no-application-frames",
|
|
8929
|
+
"malformed-stack",
|
|
8930
|
+
"no-asset-list",
|
|
8931
|
+
"kept-local"
|
|
8932
|
+
]).optional(),
|
|
8933
|
+
subsystem: z.enum(["menu", "unknown"]).optional(),
|
|
8934
|
+
repeats: count$1.optional(),
|
|
8935
|
+
deliveryGap: z.strictObject({
|
|
8936
|
+
refused: count$1,
|
|
8937
|
+
expired: count$1,
|
|
8938
|
+
evicted: count$1,
|
|
8939
|
+
exhausted: count$1
|
|
8940
|
+
}).optional()
|
|
8881
8941
|
});
|
|
8882
8942
|
const incidentFields = {
|
|
8883
8943
|
incidentId: z.uuid(),
|
|
@@ -8895,6 +8955,24 @@ const clientRenderFailureInputSchema = z.discriminatedUnion("surface", [z.object
|
|
|
8895
8955
|
})]);
|
|
8896
8956
|
const clientRenderFailureOutputSchema = z.object({ accepted: z.literal(true) });
|
|
8897
8957
|
|
|
8958
|
+
//#endregion
|
|
8959
|
+
//#region ../../packages/contract/src/canvas/canvas-object-kinds.consts.ts
|
|
8960
|
+
/** Each object kind by name, for records that may state which kind and nothing else. */
|
|
8961
|
+
const CANVAS_OBJECT_KINDS = [
|
|
8962
|
+
"root",
|
|
8963
|
+
"page",
|
|
8964
|
+
"screen",
|
|
8965
|
+
"frame",
|
|
8966
|
+
"group",
|
|
8967
|
+
"rectangle",
|
|
8968
|
+
"image",
|
|
8969
|
+
"svg",
|
|
8970
|
+
"boolean",
|
|
8971
|
+
"recording",
|
|
8972
|
+
"prototype",
|
|
8973
|
+
"text"
|
|
8974
|
+
];
|
|
8975
|
+
|
|
8898
8976
|
//#endregion
|
|
8899
8977
|
//#region ../../packages/contract/src/shared/client-save.schema.ts
|
|
8900
8978
|
/** Why the sync owner could not merge pending text the ordinary way. Never document content. */
|
|
@@ -8922,7 +9000,8 @@ const CANVAS_SYNC_REPORTS = [
|
|
|
8922
9000
|
"deleted-target",
|
|
8923
9001
|
"whole-value-text",
|
|
8924
9002
|
"retrying",
|
|
8925
|
-
"recovery"
|
|
9003
|
+
"recovery",
|
|
9004
|
+
"trace"
|
|
8926
9005
|
];
|
|
8927
9006
|
const CANVAS_SYNC_DETAILS = [
|
|
8928
9007
|
...CLIENT_SAVE_ISSUES,
|
|
@@ -8963,6 +9042,135 @@ const CANVAS_SYNC_REPORT_STATUSES = [
|
|
|
8963
9042
|
];
|
|
8964
9043
|
/** Whether a recovery state began in this visit or was reopened from the browser copy. */
|
|
8965
9044
|
const CANVAS_SYNC_EPISODES = ["new", "reopened"];
|
|
9045
|
+
/** The transition a traced record states. `reported` marks a report with no step of its own. */
|
|
9046
|
+
const CANVAS_SAVE_TRACE_KINDS = [
|
|
9047
|
+
"started",
|
|
9048
|
+
"resolved",
|
|
9049
|
+
"superseded",
|
|
9050
|
+
"shown",
|
|
9051
|
+
"held-back",
|
|
9052
|
+
"dismissed",
|
|
9053
|
+
"action-started",
|
|
9054
|
+
"action-outcome",
|
|
9055
|
+
"long-wait",
|
|
9056
|
+
"long-wait-ended",
|
|
9057
|
+
"reported"
|
|
9058
|
+
];
|
|
9059
|
+
/** Why a notice appearance happened, from facts held at that moment. Never guessed from timing. */
|
|
9060
|
+
const CANVAS_SAVE_TRIGGERS = [
|
|
9061
|
+
"departure-protection",
|
|
9062
|
+
"retained-copy-review",
|
|
9063
|
+
"host-priority",
|
|
9064
|
+
"owner-reentry",
|
|
9065
|
+
"new-edit-while-blocked",
|
|
9066
|
+
"restored-work",
|
|
9067
|
+
"new-blocker",
|
|
9068
|
+
"unknown"
|
|
9069
|
+
];
|
|
9070
|
+
const CANVAS_SAVE_NOTICE_CAUSES = [
|
|
9071
|
+
"offline",
|
|
9072
|
+
"retrying",
|
|
9073
|
+
"upload",
|
|
9074
|
+
"review",
|
|
9075
|
+
"view-only",
|
|
9076
|
+
"unknown"
|
|
9077
|
+
];
|
|
9078
|
+
const CANVAS_SAVE_SEVERITIES = [
|
|
9079
|
+
"critical",
|
|
9080
|
+
"warning",
|
|
9081
|
+
"info"
|
|
9082
|
+
];
|
|
9083
|
+
const CANVAS_SAVE_DEVICE_PROTECTIONS = [
|
|
9084
|
+
"kept",
|
|
9085
|
+
"writing",
|
|
9086
|
+
"unprotected"
|
|
9087
|
+
];
|
|
9088
|
+
const CANVAS_SAVE_ACTIONS = [
|
|
9089
|
+
"try-again",
|
|
9090
|
+
"sync",
|
|
9091
|
+
"overwrite"
|
|
9092
|
+
];
|
|
9093
|
+
const CANVAS_SAVE_OUTCOMES = [
|
|
9094
|
+
"saved",
|
|
9095
|
+
"kept-copy",
|
|
9096
|
+
"still-blocked"
|
|
9097
|
+
];
|
|
9098
|
+
const CANVAS_SAVE_REPLAY_STATES = [
|
|
9099
|
+
"active",
|
|
9100
|
+
"disabled",
|
|
9101
|
+
"unavailable"
|
|
9102
|
+
];
|
|
9103
|
+
/** Why the first waiting change has not been answered. */
|
|
9104
|
+
const CANVAS_SAVE_HOLDS = [
|
|
9105
|
+
"in-flight",
|
|
9106
|
+
"retry-wait",
|
|
9107
|
+
"device-write",
|
|
9108
|
+
"upload",
|
|
9109
|
+
"read",
|
|
9110
|
+
"recovery",
|
|
9111
|
+
"decision",
|
|
9112
|
+
"offline",
|
|
9113
|
+
"paused",
|
|
9114
|
+
"not-held"
|
|
9115
|
+
];
|
|
9116
|
+
/** Why Sync or Overwrite cannot run now, as a fixed value. */
|
|
9117
|
+
const CANVAS_SYNC_BLOCKS = [
|
|
9118
|
+
"current-changes-unresolved",
|
|
9119
|
+
"checking-saved-canvas",
|
|
9120
|
+
"offline",
|
|
9121
|
+
"saved-canvas-unavailable",
|
|
9122
|
+
"sign-in",
|
|
9123
|
+
"request-unsettled",
|
|
9124
|
+
"no-edit-access",
|
|
9125
|
+
"missing-file",
|
|
9126
|
+
"local-copy-unsaved",
|
|
9127
|
+
"file-unavailable",
|
|
9128
|
+
"invalid-review",
|
|
9129
|
+
"too-large"
|
|
9130
|
+
];
|
|
9131
|
+
const CANVAS_SAVE_REFUSAL_CODES = [
|
|
9132
|
+
"unknown",
|
|
9133
|
+
"unclassified",
|
|
9134
|
+
...CANVAS_REFUSAL_CODES
|
|
9135
|
+
];
|
|
9136
|
+
const OPAQUE_IDENTITY_LENGTH = 256;
|
|
9137
|
+
const MAX_OPERATION_KINDS = 64;
|
|
9138
|
+
const identity = z.string().max(OPAQUE_IDENTITY_LENGTH).regex(/^[\w:.-]*$/u);
|
|
9139
|
+
const count = z.number().int().nonnegative();
|
|
9140
|
+
const listedName = (names) => z.string().refine((name) => name === "unknown" || names.includes(name));
|
|
9141
|
+
const operationName = listedName(CANVAS_OPERATION_NAMES);
|
|
9142
|
+
/**
|
|
9143
|
+
* The lifecycle fields of a save record: counts, listed values and opaque identities, so no field
|
|
9144
|
+
* can carry canvas content, names, addresses or the words of an error.
|
|
9145
|
+
*/
|
|
9146
|
+
const canvasSaveTraceSchema = z.strictObject({
|
|
9147
|
+
schema: z.literal(1),
|
|
9148
|
+
eventId: z.uuid(),
|
|
9149
|
+
occurredAt: z.number().int().nonnegative(),
|
|
9150
|
+
kind: z.enum(CANVAS_SAVE_TRACE_KINDS),
|
|
9151
|
+
episodeKey: identity.optional(),
|
|
9152
|
+
nextEpisodeKey: identity.optional(),
|
|
9153
|
+
appearanceId: z.uuid().optional(),
|
|
9154
|
+
trigger: z.enum(CANVAS_SAVE_TRIGGERS).optional(),
|
|
9155
|
+
cause: z.enum(CANVAS_SAVE_NOTICE_CAUSES).optional(),
|
|
9156
|
+
severity: z.enum(CANVAS_SAVE_SEVERITIES),
|
|
9157
|
+
command: z.literal("unknown"),
|
|
9158
|
+
operationKinds: z.array(operationName).max(MAX_OPERATION_KINDS),
|
|
9159
|
+
refusalCode: z.enum(CANVAS_SAVE_REFUSAL_CODES).optional(),
|
|
9160
|
+
operation: operationName.optional(),
|
|
9161
|
+
component: listedName(CANVAS_OBJECT_KINDS).optional(),
|
|
9162
|
+
deviceProtection: z.enum(CANVAS_SAVE_DEVICE_PROTECTIONS),
|
|
9163
|
+
uploadsWaiting: count,
|
|
9164
|
+
uploadsBlocked: count,
|
|
9165
|
+
saveHold: z.enum(CANVAS_SAVE_HOLDS).optional(),
|
|
9166
|
+
actions: z.array(z.enum(CANVAS_SAVE_ACTIONS)).max(CANVAS_SAVE_ACTIONS.length),
|
|
9167
|
+
syncBlock: z.enum(CANVAS_SYNC_BLOCKS).optional(),
|
|
9168
|
+
overwriteBlock: z.enum(CANVAS_SYNC_BLOCKS).optional(),
|
|
9169
|
+
outcome: z.enum(CANVAS_SAVE_OUTCOMES).optional(),
|
|
9170
|
+
action: z.enum(CANVAS_SAVE_ACTIONS).optional(),
|
|
9171
|
+
replay: z.enum(CANVAS_SAVE_REPLAY_STATES),
|
|
9172
|
+
lostRecords: count
|
|
9173
|
+
});
|
|
8966
9174
|
const clientSaveIncidentInputSchema = z.strictObject({
|
|
8967
9175
|
canvasId: z.uuid(),
|
|
8968
9176
|
releaseIdentity: z.string().min(1).max(100),
|
|
@@ -8975,9 +9183,20 @@ const clientSaveIncidentInputSchema = z.strictObject({
|
|
|
8975
9183
|
pendingChanges: z.number().int().nonnegative(),
|
|
8976
9184
|
reason: z.enum(CANVAS_SYNC_DETAILS).optional(),
|
|
8977
9185
|
status: z.enum(CANVAS_SYNC_REPORT_STATUSES).optional(),
|
|
8978
|
-
episode: z.enum(CANVAS_SYNC_EPISODES).optional()
|
|
9186
|
+
episode: z.enum(CANVAS_SYNC_EPISODES).optional(),
|
|
9187
|
+
trace: canvasSaveTraceSchema.optional()
|
|
9188
|
+
});
|
|
9189
|
+
/** Whether the API's analytics destination took the record. Older clients ignore it. */
|
|
9190
|
+
const CANVAS_SAVE_ANALYTICS_STATES = [
|
|
9191
|
+
"delivered",
|
|
9192
|
+
"failed",
|
|
9193
|
+
"disabled",
|
|
9194
|
+
"no-identity"
|
|
9195
|
+
];
|
|
9196
|
+
const clientSaveIncidentOutputSchema = z.object({
|
|
9197
|
+
accepted: z.literal(true),
|
|
9198
|
+
analytics: z.enum(CANVAS_SAVE_ANALYTICS_STATES).optional()
|
|
8979
9199
|
});
|
|
8980
|
-
const clientSaveIncidentOutputSchema = z.object({ accepted: z.literal(true) });
|
|
8981
9200
|
|
|
8982
9201
|
//#endregion
|
|
8983
9202
|
//#region ../../packages/contract/src/shared/extension-bridge.schema.ts
|
|
@@ -9189,6 +9408,17 @@ const extensionTelemetryOutputSchema = z.object({ accepted: z.literal(true) });
|
|
|
9189
9408
|
|
|
9190
9409
|
//#endregion
|
|
9191
9410
|
//#region ../../packages/contract/src/shared/request-outcome.lib.ts
|
|
9411
|
+
const listed = (allowed, value) => typeof value === "string" && allowed.includes(value) ? value : null;
|
|
9412
|
+
const refusalOf = (error) => {
|
|
9413
|
+
const { refusalCode, operation, component } = error.fields ?? {};
|
|
9414
|
+
if (refusalCode === void 0 && operation === void 0 && component === void 0) return void 0;
|
|
9415
|
+
const code = CANVAS_SAVE_REFUSAL_CODES.find((value) => value === refusalCode);
|
|
9416
|
+
return {
|
|
9417
|
+
refusalCode: refusalCode === void 0 ? "unclassified" : code ?? "unknown",
|
|
9418
|
+
operation: listed(CANVAS_OPERATION_NAMES, operation) ?? "unknown",
|
|
9419
|
+
component: listed(CANVAS_OBJECT_KINDS, component) ?? "unknown"
|
|
9420
|
+
};
|
|
9421
|
+
};
|
|
9192
9422
|
/** `fields.retry` on a CONFLICT the server expects to clear by itself. */
|
|
9193
9423
|
const RETRY_LATER = "later";
|
|
9194
9424
|
/** `fields.reason` on a CONFLICT that only a client defect can cause. */
|
|
@@ -9242,9 +9472,11 @@ const badRequestOutcome = (error) => {
|
|
|
9242
9472
|
kind: "refused",
|
|
9243
9473
|
reason: REQUEST_TOO_LARGE
|
|
9244
9474
|
};
|
|
9475
|
+
const refusal = refusalOf(error);
|
|
9245
9476
|
return {
|
|
9246
9477
|
kind: "refused",
|
|
9247
|
-
reason: error.message
|
|
9478
|
+
reason: error.message,
|
|
9479
|
+
...refusal !== void 0 && { refusal }
|
|
9248
9480
|
};
|
|
9249
9481
|
};
|
|
9250
9482
|
const appErrorOutcome = (error, retryAfterMs) => {
|
|
@@ -16124,8 +16356,9 @@ const createRecordingRouter = (handlers) => trpcRouter({
|
|
|
16124
16356
|
};
|
|
16125
16357
|
}),
|
|
16126
16358
|
list: canvasReaderProcedure.input(listRecordingsInputSchema).output(listRecordingsOutputSchema).query(async ({ input }) => {
|
|
16359
|
+
const { recordings, unreadableCount } = orThrow(await handlers.list.execute(input));
|
|
16127
16360
|
return {
|
|
16128
|
-
items:
|
|
16361
|
+
items: recordings.map((recording) => ({
|
|
16129
16362
|
recordingId: recording.id,
|
|
16130
16363
|
durationMs: recording.durationMs,
|
|
16131
16364
|
viewport: recording.viewport,
|
|
@@ -16133,7 +16366,8 @@ const createRecordingRouter = (handlers) => trpcRouter({
|
|
|
16133
16366
|
chunkCount: recording.chunkCount,
|
|
16134
16367
|
startedAt: recording.startedAt.toISOString()
|
|
16135
16368
|
})),
|
|
16136
|
-
truncated: false
|
|
16369
|
+
truncated: false,
|
|
16370
|
+
unreadableCount
|
|
16137
16371
|
};
|
|
16138
16372
|
}),
|
|
16139
16373
|
delete: canvasOwnerProcedure.input(deleteRecordingInputSchema).output(deleteRecordingOutputSchema).mutation(async ({ input, ctx }) => orThrow(await handlers.remove.execute({
|
|
@@ -16296,7 +16530,11 @@ const fieldsOf$1 = (input) => {
|
|
|
16296
16530
|
signal: name,
|
|
16297
16531
|
supportedClient: input.capabilityVersion === 2 ? 1 : 0,
|
|
16298
16532
|
isSlow: input.name === "canvas_load" && ["slow", "timed-out"].includes(input.outcome) ? 1 : 0,
|
|
16299
|
-
isDegraded: input.name === "canvas_load" && [
|
|
16533
|
+
isDegraded: input.name === "canvas_load" && [
|
|
16534
|
+
"degraded",
|
|
16535
|
+
"timed-out",
|
|
16536
|
+
"unavailable"
|
|
16537
|
+
].includes(input.outcome) ? 1 : 0,
|
|
16300
16538
|
isJanky: input.name === "canvas_interaction" && input.outcome === "janky" ? 1 : 0,
|
|
16301
16539
|
isRealtimeFailure: input.name === "canvas_realtime" && input.outcome === "failed" ? 1 : 0,
|
|
16302
16540
|
isPrototypeOpen: Number(isPrototypeOpen),
|
|
@@ -16309,6 +16547,7 @@ const isFailure$1 = (input) => {
|
|
|
16309
16547
|
if (input.name === "canvas_load") return input.outcome !== "ready";
|
|
16310
16548
|
if (input.name === "canvas_interaction") return input.outcome !== "smooth";
|
|
16311
16549
|
if (input.name === "prototype_open") return input.outcome !== "loaded";
|
|
16550
|
+
if (input.name === "canvas_measurement") return true;
|
|
16312
16551
|
return input.outcome !== "succeeded";
|
|
16313
16552
|
};
|
|
16314
16553
|
const clientPerformanceTelemetryRoute = () => baseProcedure.input(clientPerformanceInputSchema).output(clientPerformanceOutputSchema).mutation(({ input, ctx }) => {
|
|
@@ -16323,7 +16562,7 @@ const clientPerformanceTelemetryRoute = () => baseProcedure.input(clientPerforma
|
|
|
16323
16562
|
const FINGERPRINT_LENGTH = 24;
|
|
16324
16563
|
const clientRenderFailureRoute = () => baseProcedure.input(clientRenderFailureInputSchema).output(clientRenderFailureOutputSchema).mutation(({ input, ctx }) => {
|
|
16325
16564
|
const { details, ...identity } = input;
|
|
16326
|
-
const { frames, ...classification } = details ?? {
|
|
16565
|
+
const { frames, deliveryGap, ...classification } = details ?? {
|
|
16327
16566
|
version: 1,
|
|
16328
16567
|
severity: "fatal",
|
|
16329
16568
|
boundary: "application",
|
|
@@ -16342,10 +16581,18 @@ const clientRenderFailureRoute = () => baseProcedure.input(clientRenderFailureIn
|
|
|
16342
16581
|
const event = classification.outcome === "failed" ? "EditorRenderFailed" : "EditorRecoveryReported";
|
|
16343
16582
|
const fields = {
|
|
16344
16583
|
...identity,
|
|
16345
|
-
...classification,
|
|
16584
|
+
...Object.fromEntries(Object.entries(classification).filter(([key]) => key !== "version")),
|
|
16346
16585
|
fingerprint,
|
|
16347
16586
|
frames: JSON.stringify(frames),
|
|
16348
|
-
event
|
|
16587
|
+
event,
|
|
16588
|
+
...classification.errorCode === "unexpected-error" && frames.length === 0 && { lowInformation: true },
|
|
16589
|
+
...deliveryGap !== void 0 && {
|
|
16590
|
+
deliveryGapRefused: deliveryGap.refused,
|
|
16591
|
+
deliveryGapExpired: deliveryGap.expired,
|
|
16592
|
+
deliveryGapEvicted: deliveryGap.evicted,
|
|
16593
|
+
deliveryGapExhausted: deliveryGap.exhausted
|
|
16594
|
+
},
|
|
16595
|
+
...ctx.testRun !== null && { testRun: ctx.testRun }
|
|
16349
16596
|
};
|
|
16350
16597
|
if (classification.outcome !== "failed" || classification.severity === "recovered") ctx.logger.info(fields, "event");
|
|
16351
16598
|
else ctx.logger.error(fields, "event");
|
|
@@ -16354,12 +16601,86 @@ const clientRenderFailureRoute = () => baseProcedure.input(clientRenderFailureIn
|
|
|
16354
16601
|
|
|
16355
16602
|
//#endregion
|
|
16356
16603
|
//#region ../api/src/shared/observability/client-save-telemetry.router.ts
|
|
16357
|
-
|
|
16604
|
+
/** A deployed release names itself by its image tag; `dev` or an instance label is not that. */
|
|
16605
|
+
const isExactBuild = (build) => /^[0-9a-f]{12}$/u.test(build);
|
|
16606
|
+
const eventPropertiesOf = (input, trace, apiBuild, environment) => ({
|
|
16607
|
+
schema_version: trace.schema,
|
|
16608
|
+
event_id: trace.eventId,
|
|
16609
|
+
kind: trace.kind,
|
|
16610
|
+
episode_key: trace.episodeKey ?? null,
|
|
16611
|
+
next_episode_key: trace.nextEpisodeKey ?? null,
|
|
16612
|
+
appearance_id: trace.appearanceId ?? null,
|
|
16613
|
+
trigger: trace.trigger ?? null,
|
|
16614
|
+
notice_cause: trace.cause ?? null,
|
|
16615
|
+
severity: trace.severity,
|
|
16616
|
+
command: trace.command,
|
|
16617
|
+
operation_kinds: trace.operationKinds,
|
|
16618
|
+
refusal_code: trace.refusalCode ?? null,
|
|
16619
|
+
refused_operation: trace.operation ?? null,
|
|
16620
|
+
refused_component: trace.component ?? null,
|
|
16621
|
+
device_protection: trace.deviceProtection,
|
|
16622
|
+
uploads_waiting: trace.uploadsWaiting,
|
|
16623
|
+
uploads_blocked: trace.uploadsBlocked,
|
|
16624
|
+
save_hold: trace.saveHold ?? null,
|
|
16625
|
+
available_actions: trace.actions,
|
|
16626
|
+
sync_block: trace.syncBlock ?? null,
|
|
16627
|
+
overwrite_block: trace.overwriteBlock ?? null,
|
|
16628
|
+
outcome: trace.outcome ?? null,
|
|
16629
|
+
action: trace.action ?? null,
|
|
16630
|
+
replay: trace.replay,
|
|
16631
|
+
lost_records: trace.lostRecords,
|
|
16632
|
+
canvas_id: input.canvasId,
|
|
16633
|
+
mutation_id: input.mutationId ?? null,
|
|
16634
|
+
document_version: input.version,
|
|
16635
|
+
retry_count: input.attempts,
|
|
16636
|
+
duration_ms: input.durationMs,
|
|
16637
|
+
pending_changes: input.pendingChanges,
|
|
16638
|
+
client_build: input.releaseIdentity,
|
|
16639
|
+
client_build_exact: isExactBuild(input.releaseIdentity),
|
|
16640
|
+
api_build: apiBuild,
|
|
16641
|
+
api_build_exact: isExactBuild(apiBuild),
|
|
16642
|
+
environment
|
|
16643
|
+
});
|
|
16644
|
+
/**
|
|
16645
|
+
* Sends one traced record and says what became of it. Only the API sends these events, because the
|
|
16646
|
+
* browser's library can be blocked and turns itself off under automation.
|
|
16647
|
+
*/
|
|
16648
|
+
const deliverCanvasSaveRecord = async (analytics, input, personId, build) => {
|
|
16649
|
+
const { trace } = input;
|
|
16650
|
+
if (trace === void 0) return void 0;
|
|
16651
|
+
if (analytics.isEnabled !== true || analytics.deliver === void 0) return "disabled";
|
|
16652
|
+
if (personId === null) return "no-identity";
|
|
16653
|
+
return (await analytics.deliver({
|
|
16654
|
+
distinctId: personId,
|
|
16655
|
+
event: trace.kind === "shown" ? "canvas_save_notice_shown" : "canvas_save_recovery_transition",
|
|
16656
|
+
properties: eventPropertiesOf(input, trace, build.apiBuild, build.environment),
|
|
16657
|
+
insertId: trace.eventId,
|
|
16658
|
+
occurredAt: new Date(trace.occurredAt)
|
|
16659
|
+
})).unwrapOr(false) ? "delivered" : "failed";
|
|
16660
|
+
};
|
|
16661
|
+
const clientSaveTelemetryRoute = (deps) => baseProcedure.input(clientSaveIncidentInputSchema).output(clientSaveIncidentOutputSchema).mutation(async ({ input, ctx }) => {
|
|
16662
|
+
const { analytics, apiBuild, environment } = deps;
|
|
16663
|
+
const { trace, ...report } = input;
|
|
16358
16664
|
ctx.logger.warn({
|
|
16359
|
-
...
|
|
16665
|
+
...report,
|
|
16666
|
+
...trace !== void 0 && {
|
|
16667
|
+
...trace,
|
|
16668
|
+
operationKinds: trace.operationKinds.join(","),
|
|
16669
|
+
actions: trace.actions.join(","),
|
|
16670
|
+
apiBuild,
|
|
16671
|
+
apiBuildExact: isExactBuild(apiBuild),
|
|
16672
|
+
environment
|
|
16673
|
+
},
|
|
16360
16674
|
event: "CanvasSyncOutcome"
|
|
16361
16675
|
}, "event");
|
|
16362
|
-
|
|
16676
|
+
const state = await deliverCanvasSaveRecord(analytics, input, ctx.viewer.kind === "person" ? ctx.viewer.personId : null, {
|
|
16677
|
+
apiBuild,
|
|
16678
|
+
environment
|
|
16679
|
+
});
|
|
16680
|
+
return {
|
|
16681
|
+
accepted: true,
|
|
16682
|
+
...state !== void 0 && { analytics: state }
|
|
16683
|
+
};
|
|
16363
16684
|
});
|
|
16364
16685
|
|
|
16365
16686
|
//#endregion
|
|
@@ -16525,7 +16846,7 @@ const createAppRouter = (handlers, options = DEFAULT_ROUTER_OPTIONS) => trpcRout
|
|
|
16525
16846
|
performance: clientPerformanceTelemetryRoute(),
|
|
16526
16847
|
conversion: clientConversionTelemetryRoute(),
|
|
16527
16848
|
renderFailure: clientRenderFailureRoute(),
|
|
16528
|
-
save: clientSaveTelemetryRoute()
|
|
16849
|
+
save: clientSaveTelemetryRoute(handlers.saveTelemetry)
|
|
16529
16850
|
})
|
|
16530
16851
|
});
|
|
16531
16852
|
|
|
@@ -16732,6 +17053,11 @@ const handlers = {
|
|
|
16732
17053
|
transcript: {
|
|
16733
17054
|
get: unavailable,
|
|
16734
17055
|
retry: unavailable
|
|
17056
|
+
},
|
|
17057
|
+
saveTelemetry: {
|
|
17058
|
+
analytics: { track: () => {} },
|
|
17059
|
+
apiBuild: "cli",
|
|
17060
|
+
environment: "test"
|
|
16735
17061
|
}
|
|
16736
17062
|
};
|
|
16737
17063
|
const createRouterShapeAdapter = () => createAppRouter(handlers);
|
package/dist/main.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $t as createOrganisationOutputSchema, At as PartialBatchError, Ct as canvasEditsSchema, Dt as fromCanvasReference, Et as canvasReferenceRenderTarget, Ft as createScreenOutputSchema, It as appendRecordingChunkOutputSchema, Lt as completeRecordingOutputSchema, Mn as beginCanvasActivityOutputSchema, Mr as canvasSchema, Nn as canvasAgentActivityPhaseSchema, Nt as appErrorSchema, Ot as hasCanvasReferenceScope, Pt as completeScreenOutputSchema, Qn as canvasOperationSchema, Xn as getCanvasDocumentOutputSchema, Zn as saveCanvasDocumentOutputSchema, _ as PROCEDURE_DESCRIPTIONS, a as toFailurePayload, ar as canvasWorldBoundsSchema, d as ProcessExitError, et as canvasRenderScopedInputSchema, f as createCapabilityCatalogAdapter, fr as canvasAuthoredLayoutValueOf, g as OPTION_DESCRIPTIONS, gr as canvasLayoutPriorityDeclarations, gt as canvasFindInputSchema, hr as canvasLayoutMainAxisOf, i as toExitCode, it as canvasRemoveCapabilityInputSchema, jt as CliError, k as operationStatusInputSchema, kt as parseCanvasReference, l as toSharedCapabilities, lt as canvasUpdateHtmlCapabilityInputSchema, m as createCapabilityPolicyAdapter, mr as canvasAxisStyleProperties, n as withCommandName, nn as withFixtureScreen, p as createRouterShapeAdapter, pr as canvasAuthoredStyleDeclarations, r as toCanvasAuthoringResult, st as canvasReadInputSchema, t as withCommandInFailure, tn as emptyFixtureDocument, u as createMcpCapabilityDiscoveryAdapter, ur as canvasReadableSceneDocumentSchema, wn as canvasTextRunsOf, wt as assertCanvasReferenceNodes, zt as startRecordingOutputSchema } from "./cli-output-identity.lib-
|
|
3
|
-
import { C as canvasRadialGradientSvg, D as canvasAngularGradientSvg, E as canvasDiamondGradientSvg, O as canvasColorCss, S as createAuthUseCase, T as canvasFilterListCss, _ as assertCanvasReferenceOperations, b as createCanvasActivityComposite, d as createRenderFileAdapter, f as readCanvasReferenceScene, g as createEditCanvasComposite, h as fromCapabilityReference, k as compareCanvasSortKeys, n as createHttpRemoteAdapter, o as createOauthLoopbackAdapter, p as createWriteHtmlCanvasComposite, r as readCliEnvironment, s as createCapabilityInvocationAdapter, t as createMutationKeyAdapter, v as sceneAtVersion, w as canvasLinearGradientSvg, x as createRenderCanvasComposite, y as createApplyCanvasComposite } from "./mutation-key.adapter-
|
|
2
|
+
import { $t as createOrganisationOutputSchema, At as PartialBatchError, Ct as canvasEditsSchema, Dt as fromCanvasReference, Et as canvasReferenceRenderTarget, Ft as createScreenOutputSchema, It as appendRecordingChunkOutputSchema, Lt as completeRecordingOutputSchema, Mn as beginCanvasActivityOutputSchema, Mr as canvasSchema, Nn as canvasAgentActivityPhaseSchema, Nt as appErrorSchema, Ot as hasCanvasReferenceScope, Pt as completeScreenOutputSchema, Qn as canvasOperationSchema, Xn as getCanvasDocumentOutputSchema, Zn as saveCanvasDocumentOutputSchema, _ as PROCEDURE_DESCRIPTIONS, a as toFailurePayload, ar as canvasWorldBoundsSchema, d as ProcessExitError, et as canvasRenderScopedInputSchema, f as createCapabilityCatalogAdapter, fr as canvasAuthoredLayoutValueOf, g as OPTION_DESCRIPTIONS, gr as canvasLayoutPriorityDeclarations, gt as canvasFindInputSchema, hr as canvasLayoutMainAxisOf, i as toExitCode, it as canvasRemoveCapabilityInputSchema, jt as CliError, k as operationStatusInputSchema, kt as parseCanvasReference, l as toSharedCapabilities, lt as canvasUpdateHtmlCapabilityInputSchema, m as createCapabilityPolicyAdapter, mr as canvasAxisStyleProperties, n as withCommandName, nn as withFixtureScreen, p as createRouterShapeAdapter, pr as canvasAuthoredStyleDeclarations, r as toCanvasAuthoringResult, st as canvasReadInputSchema, t as withCommandInFailure, tn as emptyFixtureDocument, u as createMcpCapabilityDiscoveryAdapter, ur as canvasReadableSceneDocumentSchema, wn as canvasTextRunsOf, wt as assertCanvasReferenceNodes, zt as startRecordingOutputSchema } from "./cli-output-identity.lib-DgHRuXTI.mjs";
|
|
3
|
+
import { C as canvasRadialGradientSvg, D as canvasAngularGradientSvg, E as canvasDiamondGradientSvg, O as canvasColorCss, S as createAuthUseCase, T as canvasFilterListCss, _ as assertCanvasReferenceOperations, b as createCanvasActivityComposite, d as createRenderFileAdapter, f as readCanvasReferenceScene, g as createEditCanvasComposite, h as fromCapabilityReference, k as compareCanvasSortKeys, n as createHttpRemoteAdapter, o as createOauthLoopbackAdapter, p as createWriteHtmlCanvasComposite, r as readCliEnvironment, s as createCapabilityInvocationAdapter, t as createMutationKeyAdapter, v as sceneAtVersion, w as canvasLinearGradientSvg, x as createRenderCanvasComposite, y as createApplyCanvasComposite } from "./mutation-key.adapter-BWkNj5jp.mjs";
|
|
4
4
|
import { t as toCapabilityInventory } from "./capability-inventory.mapper-DyYXyVBJ.mjs";
|
|
5
5
|
import { t as createFileCredentialAdapter } from "./file-credential.adapter-C78gc9OK.mjs";
|
|
6
6
|
import process from "node:process";
|
|
@@ -3424,7 +3424,7 @@ const main = async () => {
|
|
|
3424
3424
|
const remote = createHttpRemoteAdapter(config.apiUrl, credentials, mutationKey);
|
|
3425
3425
|
const cli = createCliProgram({
|
|
3426
3426
|
apiUrl: config.apiUrl,
|
|
3427
|
-
version: "0.1.
|
|
3427
|
+
version: "0.1.39",
|
|
3428
3428
|
credentials,
|
|
3429
3429
|
remote,
|
|
3430
3430
|
mutationKey,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { A as operationStatusOutputSchema, D as canvasConversionStatusSchema, F as canvasArrangeInputSchema, H as canvasCaptureOutputSchema, L as canvasDuplicateInputSchema, M as canvasAssetImportInputSchema, N as canvasAssetImportOutputSchema, Nr as createCanvasOutputSchema, O as operationStatusImageSchema, R as canvasPreparationOutputSchema, S as canvasExchangeDigest, T as encodeCanvasExchangeToken, V as canvasCaptureInputSchema, _n as screenElementsCommentTargetSchema, _t as canvasFindOutputSchema, an as commentMessageSchema, at as canvasRemoveInputSchema, cn as domLocatorSchema, ct as canvasReadOutputSchema, dn as listCommentsInputSchema, f as createCapabilityCatalogAdapter, fn as listCommentsOutputSchema, gn as screenElementCommentTargetSchema, gt as canvasFindInputSchema, hn as screenAreaCommentTargetSchema, in as commentCanvasContextSchema, jt as CliError, k as operationStatusInputSchema, kt as parseCanvasReference, ln as elementAnchorSchema, mn as replyCommentOutputSchema, mt as canvasCreateToolOutputSchema, o as toMcpFailurePayload, on as commentResolverSchema, pn as replyCommentInputSchema, pt as canvasCreateToolInputSchema, rn as commentAuthorSchema, sn as commentThreadSchema, st as canvasReadInputSchema, tt as canvasRenderScopedToolInputSchema, un as getCommentOutputSchema, ut as canvasUpdateHtmlInputSchema, vn as screenTextCommentTargetSchema, w as decodeCanvasExchangeToken, x as canvasPrototypeOutputSchema, xt as canvasMakeEditableInputSchema, y as canvasPrototypeInputSchema, yn as startCommentInputSchema, yt as canvasInsertHtmlInputSchema, z as canvasWriteReceiptSchema } from "./cli-output-identity.lib-
|
|
3
|
-
import { S as createAuthUseCase, h as fromCapabilityReference, m as boundedResultPage, n as createHttpRemoteAdapter, o as createOauthLoopbackAdapter, s as createCapabilityInvocationAdapter, t as createMutationKeyAdapter } from "./mutation-key.adapter-
|
|
4
|
-
import { a as createMcpResultAdapter, i as mcpDispatchedResultSchema, n as createMcpWorkflowsAdapter, o as createMcpClientContextAdapter, r as createMcpClientInvocationAdapter } from "./mcp-server.adapter-
|
|
2
|
+
import { A as operationStatusOutputSchema, D as canvasConversionStatusSchema, F as canvasArrangeInputSchema, H as canvasCaptureOutputSchema, L as canvasDuplicateInputSchema, M as canvasAssetImportInputSchema, N as canvasAssetImportOutputSchema, Nr as createCanvasOutputSchema, O as operationStatusImageSchema, R as canvasPreparationOutputSchema, S as canvasExchangeDigest, T as encodeCanvasExchangeToken, V as canvasCaptureInputSchema, _n as screenElementsCommentTargetSchema, _t as canvasFindOutputSchema, an as commentMessageSchema, at as canvasRemoveInputSchema, cn as domLocatorSchema, ct as canvasReadOutputSchema, dn as listCommentsInputSchema, f as createCapabilityCatalogAdapter, fn as listCommentsOutputSchema, gn as screenElementCommentTargetSchema, gt as canvasFindInputSchema, hn as screenAreaCommentTargetSchema, in as commentCanvasContextSchema, jt as CliError, k as operationStatusInputSchema, kt as parseCanvasReference, ln as elementAnchorSchema, mn as replyCommentOutputSchema, mt as canvasCreateToolOutputSchema, o as toMcpFailurePayload, on as commentResolverSchema, pn as replyCommentInputSchema, pt as canvasCreateToolInputSchema, rn as commentAuthorSchema, sn as commentThreadSchema, st as canvasReadInputSchema, tt as canvasRenderScopedToolInputSchema, un as getCommentOutputSchema, ut as canvasUpdateHtmlInputSchema, vn as screenTextCommentTargetSchema, w as decodeCanvasExchangeToken, x as canvasPrototypeOutputSchema, xt as canvasMakeEditableInputSchema, y as canvasPrototypeInputSchema, yn as startCommentInputSchema, yt as canvasInsertHtmlInputSchema, z as canvasWriteReceiptSchema } from "./cli-output-identity.lib-DgHRuXTI.mjs";
|
|
3
|
+
import { S as createAuthUseCase, h as fromCapabilityReference, m as boundedResultPage, n as createHttpRemoteAdapter, o as createOauthLoopbackAdapter, s as createCapabilityInvocationAdapter, t as createMutationKeyAdapter } from "./mutation-key.adapter-BWkNj5jp.mjs";
|
|
4
|
+
import { a as createMcpResultAdapter, i as mcpDispatchedResultSchema, n as createMcpWorkflowsAdapter, o as createMcpClientContextAdapter, r as createMcpClientInvocationAdapter } from "./mcp-server.adapter-DOHJxL6l.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 { f as createCapabilityCatalogAdapter, h as toCapabilityDefinition } from "./cli-output-identity.lib-
|
|
3
|
-
import { i as readLocalMcpEnvironment } from "./mutation-key.adapter-
|
|
2
|
+
import { f as createCapabilityCatalogAdapter, h as toCapabilityDefinition } from "./cli-output-identity.lib-DgHRuXTI.mjs";
|
|
3
|
+
import { i as readLocalMcpEnvironment } from "./mutation-key.adapter-BWkNj5jp.mjs";
|
|
4
4
|
import { t as createFileCredentialAdapter } from "./file-credential.adapter-C78gc9OK.mjs";
|
|
5
|
-
import { n as createMcpCanvasProfileAdapter, t as createMcpInvocationAdapter } from "./mcp-invocation.adapter-
|
|
6
|
-
import { o as createMcpClientContextAdapter, t as createMcpServerAdapter } from "./mcp-server.adapter-
|
|
5
|
+
import { n as createMcpCanvasProfileAdapter, t as createMcpInvocationAdapter } from "./mcp-invocation.adapter-CjZnnMCd.mjs";
|
|
6
|
+
import { o as createMcpClientContextAdapter, t as createMcpServerAdapter } from "./mcp-server.adapter-DOHJxL6l.mjs";
|
|
7
7
|
import process from "node:process";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
import { serveStdio } from "@modelcontextprotocol/server/stdio";
|
|
@@ -170,19 +170,19 @@ const clientContext = createMcpClientContextAdapter();
|
|
|
170
170
|
const main = () => {
|
|
171
171
|
const config = readLocalMcpEnvironment();
|
|
172
172
|
const credentials = createFileCredentialAdapter(config.configDirectory);
|
|
173
|
-
const invocation = createMcpInvocationAdapter(config.apiUrl, credentials, config.configDirectory, { version: "0.1.
|
|
173
|
+
const invocation = createMcpInvocationAdapter(config.apiUrl, credentials, config.configDirectory, { version: "0.1.39" });
|
|
174
174
|
const catalog = [...createCapabilityCatalogAdapter(), ...createMcpTransportCapabilityAdapter()];
|
|
175
175
|
const client = clientContext.createStdio();
|
|
176
176
|
serveStdio(() => config.profile === "canvas" ? createMcpCanvasProfileAdapter({
|
|
177
177
|
readOnly: config.isReadOnly,
|
|
178
178
|
...config.workflowsDirectory !== void 0 && { workflowsDirectory: config.workflowsDirectory },
|
|
179
179
|
name: config.mcpServiceName,
|
|
180
|
-
version: "0.1.
|
|
180
|
+
version: "0.1.39",
|
|
181
181
|
invocation,
|
|
182
182
|
clientMetadata: client.metadata,
|
|
183
183
|
catalog
|
|
184
184
|
}) : createMcpServerAdapter({
|
|
185
|
-
version: "0.1.
|
|
185
|
+
version: "0.1.39",
|
|
186
186
|
name: config.mcpServiceName,
|
|
187
187
|
commandName: config.commandName,
|
|
188
188
|
invocation,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { Et as canvasReferenceRenderTarget, Fn as agentClientMetadata, K as canvasWriteHtmlCapabilityInputSchema, Ot as hasCanvasReferenceScope, Q as canvasRenderBatchResultSchema, St as canvasEditCapabilityInputSchema, Xn as getCanvasDocumentOutputSchema, c as toPresentedCapabilities, f as createCapabilityCatalogAdapter, ir as canvasRenderTargetSchema, jt as CliError, kt as parseCanvasReference, n as withCommandName, nr as canvasRenderSourceStateSchema, o as toMcpFailurePayload, r as toCanvasAuthoringResult, rt as canvasRenderFileSchema, t as withCommandInFailure, u as createMcpCapabilityDiscoveryAdapter, ur as canvasReadableSceneDocumentSchema } from "./cli-output-identity.lib-
|
|
2
|
+
import { Et as canvasReferenceRenderTarget, Fn as agentClientMetadata, K as canvasWriteHtmlCapabilityInputSchema, Ot as hasCanvasReferenceScope, Q as canvasRenderBatchResultSchema, St as canvasEditCapabilityInputSchema, Xn as getCanvasDocumentOutputSchema, c as toPresentedCapabilities, f as createCapabilityCatalogAdapter, ir as canvasRenderTargetSchema, jt as CliError, kt as parseCanvasReference, n as withCommandName, nr as canvasRenderSourceStateSchema, o as toMcpFailurePayload, r as toCanvasAuthoringResult, rt as canvasRenderFileSchema, t as withCommandInFailure, u as createMcpCapabilityDiscoveryAdapter, ur as canvasReadableSceneDocumentSchema } from "./cli-output-identity.lib-DgHRuXTI.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { readFileSync } from "node:fs";
|
|
5
5
|
import path from "node:path";
|
package/dist/mcp.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { f as createCapabilityCatalogAdapter, l as toSharedCapabilities } from "./cli-output-identity.lib-
|
|
2
|
+
import { f as createCapabilityCatalogAdapter, l as toSharedCapabilities } from "./cli-output-identity.lib-DgHRuXTI.mjs";
|
|
3
3
|
import { t as toCapabilityInventory } from "./capability-inventory.mapper-DyYXyVBJ.mjs";
|
|
4
|
-
import { t as createMcpServerAdapter } from "./mcp-server.adapter-
|
|
4
|
+
import { t as createMcpServerAdapter } from "./mcp-server.adapter-DOHJxL6l.mjs";
|
|
5
5
|
|
|
6
6
|
export { createCapabilityCatalogAdapter, createMcpServerAdapter as createEnhanceMcpServer, toCapabilityInventory, toSharedCapabilities };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as canvasRenderPendingSchema, $n as canvasNodeStylePatchSchema, An as canvasReferencePageOf, Ar as canvasBlendModeSchema, At as PartialBatchError, B as canvasCaptureCapabilityInputSchema, Bn as IMAGE_KIND, Bt as PROTOTYPE_ARTIFACT_MANIFEST_PATH, C as canvasSnapshotToken, Cn as canvasTextPropsWithContent, Cr as canvasImageAssetIdentityFromPath, Dn as canvasPrototypePropsSchema, Dr as CANVAS_RICH_TEXT_STYLE_PROPERTIES, E as resolveCanvasSnapshot, En as canvasConversionMetadataSchema, Er as hasCanvasRichTextPaints, G as canvasRenderCapabilityInputSchema, Gn as applyCanvasOperationsOutputSchema, Gt as getPrototypePublishStatusOutputSchema, Hn as RECTANGLE_KIND, Ht as createPrototypeArtifactOutputSchema, I as canvasDuplicateCapabilityInputSchema, In as createCanvasPreparationOutputSchema, J as prototypePublishCapabilityInputSchema, Jn as textOf, Jt as submitPrototypeArtifactOutputSchema, K as canvasWriteHtmlCapabilityInputSchema, Kn as getCanvasMutationOutputSchema, Kt as prototypeArtifactManifestSchema, Ln as getCanvasPreparationOutputSchema, Mn as beginCanvasActivityOutputSchema, Mt as transcriptOutputSchema, N as canvasAssetImportOutputSchema, On as canvasRecordingPropsSchema, Or as canvasAdditionalStyleSchema, Ot as hasCanvasReferenceScope, P as canvasArrangeCapabilityInputSchema, Pn as AGENT_CLIENT_HEADER, Pr as listCanvasesOutputSchema, Qt as createAgentTokenOutputSchema, Rn as FRAME_KIND, Rt as getRecordingOutputSchema, S as canvasExchangeDigest, Sn as canvasTextChangeBetween, Sr as canvasFontAssetIdentityFromPath, St as canvasEditCapabilityInputSchema, T as encodeCanvasExchangeToken, Tn as canvasCaptureSchema, Tr as canvasRichTextValueOf, Tt as canvasReferenceNodeIds, U as canvasApplyCapabilityInputSchema, Un as TEXT_KIND, Ut as foldPrototypeArtifactPath, Vn as PAGE_KIND, Vt as attachPrototypeArtifactOutputSchema, W as canvasReadCapabilityInputSchema, Wn as applyCanvasOperationsInputSchema, Wt as getPrototypeArtifactCapabilitiesOutputSchema, X as transcriptReadCapabilityInputSchema, Xn as getCanvasDocumentOutputSchema, Y as recordingSnapshotCapabilityInputSchema, Yn as mapCanvasFontSources, Yt as getMeOutputSchema, Z as canvasRenderBatchRequestSchema, Zt as cliAuthConfigurationSchema, _r as canvasCssTokens, bn as applyCanvasTypographyPatch, br as reserveCanvasAssetInputSchema, bt as canvasMakeEditableCapabilityInputSchema, cr as downloadCanvasRenderOutputSchema, dr as canvasSceneDocumentSchema, dt as canvasTranscriptCursorSchema, en as listOrganisationsOutputSchema, er as createCanvasConversionOutputSchema, ft as canvasResourcesCursorSchema, gt as canvasFindInputSchema, ht as canvasFindCursorSchema, it as canvasRemoveCapabilityInputSchema, j as canvasAssetImportCapabilityInputSchema, jn as resolveCanvasReference, jr as canvasPaintSchema, jt as CliError, k as operationStatusInputSchema, kn as DEFAULT_CANVAS_REFERENCE_PAGE_ID, kr as CANVAS_BLEND_MODES, kt as parseCanvasReference, lr as getCanvasRenderOutputSchema, lt as canvasUpdateHtmlCapabilityInputSchema, mr as canvasAxisStyleProperties, nt as canvasRenderRequestSchema, or as createCanvasRenderOutputSchema, ot as canvasOutlineCursorSchema, pr as canvasAuthoredStyleDeclarations, q as commentAttentionCapabilityInputSchema, qn as canvasLayoutWithoutCssProperties, qt as prototypeArtifactPathSchema, rr as canvasRenderStateSchema, rt as canvasRenderFileSchema, s as toRemoteError, sr as createRecordingSnapshotOutputSchema, st as canvasReadInputSchema, tr as getCanvasConversionOutputSchema, ur as canvasReadableSceneDocumentSchema, ut as canvasUpdateHtmlInputSchema, v as canvasPrototypeCapabilityInputSchema, vr as canvasCssValue, vt as canvasInsertHtmlCapabilityInputSchema, w as decodeCanvasExchangeToken, wr as canvasRichTextOf, wt as assertCanvasReferenceNodes, xn as canvasCssTypographyOwners, xr as reserveCanvasAssetOutputSchema, yr as canvasAssetUploadOutputSchema, zn as GROUP_KIND } from "./cli-output-identity.lib-
|
|
2
|
+
import { $ as canvasRenderPendingSchema, $n as canvasNodeStylePatchSchema, An as canvasReferencePageOf, Ar as canvasBlendModeSchema, At as PartialBatchError, B as canvasCaptureCapabilityInputSchema, Bn as IMAGE_KIND, Bt as PROTOTYPE_ARTIFACT_MANIFEST_PATH, C as canvasSnapshotToken, Cn as canvasTextPropsWithContent, Cr as canvasImageAssetIdentityFromPath, Dn as canvasPrototypePropsSchema, Dr as CANVAS_RICH_TEXT_STYLE_PROPERTIES, E as resolveCanvasSnapshot, En as canvasConversionMetadataSchema, Er as hasCanvasRichTextPaints, G as canvasRenderCapabilityInputSchema, Gn as applyCanvasOperationsOutputSchema, Gt as getPrototypePublishStatusOutputSchema, Hn as RECTANGLE_KIND, Ht as createPrototypeArtifactOutputSchema, I as canvasDuplicateCapabilityInputSchema, In as createCanvasPreparationOutputSchema, J as prototypePublishCapabilityInputSchema, Jn as textOf, Jt as submitPrototypeArtifactOutputSchema, K as canvasWriteHtmlCapabilityInputSchema, Kn as getCanvasMutationOutputSchema, Kt as prototypeArtifactManifestSchema, Ln as getCanvasPreparationOutputSchema, Mn as beginCanvasActivityOutputSchema, Mt as transcriptOutputSchema, N as canvasAssetImportOutputSchema, On as canvasRecordingPropsSchema, Or as canvasAdditionalStyleSchema, Ot as hasCanvasReferenceScope, P as canvasArrangeCapabilityInputSchema, Pn as AGENT_CLIENT_HEADER, Pr as listCanvasesOutputSchema, Qt as createAgentTokenOutputSchema, Rn as FRAME_KIND, Rt as getRecordingOutputSchema, S as canvasExchangeDigest, Sn as canvasTextChangeBetween, Sr as canvasFontAssetIdentityFromPath, St as canvasEditCapabilityInputSchema, T as encodeCanvasExchangeToken, Tn as canvasCaptureSchema, Tr as canvasRichTextValueOf, Tt as canvasReferenceNodeIds, U as canvasApplyCapabilityInputSchema, Un as TEXT_KIND, Ut as foldPrototypeArtifactPath, Vn as PAGE_KIND, Vt as attachPrototypeArtifactOutputSchema, W as canvasReadCapabilityInputSchema, Wn as applyCanvasOperationsInputSchema, Wt as getPrototypeArtifactCapabilitiesOutputSchema, X as transcriptReadCapabilityInputSchema, Xn as getCanvasDocumentOutputSchema, Y as recordingSnapshotCapabilityInputSchema, Yn as mapCanvasFontSources, Yt as getMeOutputSchema, Z as canvasRenderBatchRequestSchema, Zt as cliAuthConfigurationSchema, _r as canvasCssTokens, bn as applyCanvasTypographyPatch, br as reserveCanvasAssetInputSchema, bt as canvasMakeEditableCapabilityInputSchema, cr as downloadCanvasRenderOutputSchema, dr as canvasSceneDocumentSchema, dt as canvasTranscriptCursorSchema, en as listOrganisationsOutputSchema, er as createCanvasConversionOutputSchema, ft as canvasResourcesCursorSchema, gt as canvasFindInputSchema, ht as canvasFindCursorSchema, it as canvasRemoveCapabilityInputSchema, j as canvasAssetImportCapabilityInputSchema, jn as resolveCanvasReference, jr as canvasPaintSchema, jt as CliError, k as operationStatusInputSchema, kn as DEFAULT_CANVAS_REFERENCE_PAGE_ID, kr as CANVAS_BLEND_MODES, kt as parseCanvasReference, lr as getCanvasRenderOutputSchema, lt as canvasUpdateHtmlCapabilityInputSchema, mr as canvasAxisStyleProperties, nt as canvasRenderRequestSchema, or as createCanvasRenderOutputSchema, ot as canvasOutlineCursorSchema, pr as canvasAuthoredStyleDeclarations, q as commentAttentionCapabilityInputSchema, qn as canvasLayoutWithoutCssProperties, qt as prototypeArtifactPathSchema, rr as canvasRenderStateSchema, rt as canvasRenderFileSchema, s as toRemoteError, sr as createRecordingSnapshotOutputSchema, st as canvasReadInputSchema, tr as getCanvasConversionOutputSchema, ur as canvasReadableSceneDocumentSchema, ut as canvasUpdateHtmlInputSchema, v as canvasPrototypeCapabilityInputSchema, vr as canvasCssValue, vt as canvasInsertHtmlCapabilityInputSchema, w as decodeCanvasExchangeToken, wr as canvasRichTextOf, wt as assertCanvasReferenceNodes, xn as canvasCssTypographyOwners, xr as reserveCanvasAssetOutputSchema, yr as canvasAssetUploadOutputSchema, zn as GROUP_KIND } from "./cli-output-identity.lib-DgHRuXTI.mjs";
|
|
3
3
|
import process from "node:process";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { homedir, tmpdir } from "node:os";
|
|
@@ -2781,6 +2781,7 @@ const hasCanvasRoundedBorderFallback = (node) => {
|
|
|
2781
2781
|
const canvasCornerShapeDeclarations = (node, size = node.box) => {
|
|
2782
2782
|
const radius = node.appearance?.radius;
|
|
2783
2783
|
if (radius === void 0 || size === void 0 || node.geometry?.kind === "path" || node.geometry?.kind === "boolean") return {};
|
|
2784
|
+
if ((radius.smoothing ?? 0) <= 0 && radius.topLeft === radius.topRight && radius.topLeft === radius.bottomRight && radius.topLeft === radius.bottomLeft) return canvasCornerRadiusDeclarations(radius);
|
|
2784
2785
|
const effective = constrainedCornerRadii(radius, size);
|
|
2785
2786
|
const declarations = canvasCornerRadiusDeclarations(effective);
|
|
2786
2787
|
if ((radius.smoothing ?? 0) <= 0) return declarations;
|
|
@@ -2882,13 +2883,15 @@ const fillElementsOf = (node) => {
|
|
|
2882
2883
|
const fills = (node.appearance?.fills ?? []).filter((paint) => paint.visible);
|
|
2883
2884
|
return fills.some((paint) => fillNeedsElement(paint)) || fills.length > 0 && canvasProgressiveBlurOf(node) !== null ? fills : [];
|
|
2884
2885
|
};
|
|
2886
|
+
/** A captured dashed border with no edited pattern stays CSS's, which the browser draws exactly. */
|
|
2887
|
+
const canvasBorderDrawsWithCssStyle = (border) => border.style === "solid" || border.dashOrigin === "css" && border.dashPattern === void 0 && border.dashCap === void 0;
|
|
2885
2888
|
/**
|
|
2886
|
-
* One solid paint on an
|
|
2887
|
-
* is #469's border element: its paints stacked as backgrounds clipped to the border area.
|
|
2889
|
+
* One solid paint on an inside border with a CSS style stays CSS border-color on the layer. Anything
|
|
2890
|
+
* else is #469's border element: its paints stacked as backgrounds clipped to the border area.
|
|
2888
2891
|
*/
|
|
2889
2892
|
const borderNeedsElement = (border) => {
|
|
2890
2893
|
const paints = visibleStrokePaints(border);
|
|
2891
|
-
return paints.length > 0 && ((border.alignment ?? "inside") !== "inside" || border
|
|
2894
|
+
return paints.length > 0 && ((border.alignment ?? "inside") !== "inside" || !canvasBorderDrawsWithCssStyle(border) || paints.length > 1 || paints.some((paint) => paint.kind !== "solid"));
|
|
2892
2895
|
};
|
|
2893
2896
|
/** The border's ring elements: one per paint when a paint blends, so each blends on its own. */
|
|
2894
2897
|
const borderElementsOf = (node, hasFillElements) => {
|
|
@@ -3136,7 +3139,7 @@ const canvasBoxStrokeDeclarations = (node, size = node.box, ringPaints) => {
|
|
|
3136
3139
|
radius: node.appearance?.radius
|
|
3137
3140
|
};
|
|
3138
3141
|
const [only] = paints;
|
|
3139
|
-
const isBorderColor = paints.length === 1 && only?.kind === "solid" && (only.blendMode ?? "normal") === "normal" && border
|
|
3142
|
+
const isBorderColor = paints.length === 1 && only?.kind === "solid" && (only.blendMode ?? "normal") === "normal" && canvasBorderDrawsWithCssStyle(border) && share === 0;
|
|
3140
3143
|
return {
|
|
3141
3144
|
position: "absolute",
|
|
3142
3145
|
inset: 0,
|
|
@@ -3167,7 +3170,7 @@ const canvasBoxStrokeDeclarations = (node, size = node.box, ringPaints) => {
|
|
|
3167
3170
|
additionalStyles: void 0,
|
|
3168
3171
|
appearance
|
|
3169
3172
|
}, size),
|
|
3170
|
-
|
|
3173
|
+
...!isBorderColor && borderDashMaskDeclarations(node, border, size, share === 0 ? NO_OUTSET : outset)
|
|
3171
3174
|
};
|
|
3172
3175
|
};
|
|
3173
3176
|
|
package/dist/remote-mcp-main.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { M as canvasAssetImportInputSchema, N as canvasAssetImportOutputSchema, Ut as foldPrototypeArtifactPath, Xt as MCP_AUTH_SCOPE, Yt as getMeOutputSchema, b as canvasPrototypeIntentSchema, f as createCapabilityCatalogAdapter, jt as CliError, qt as prototypeArtifactPathSchema, x as canvasPrototypeOutputSchema } from "./cli-output-identity.lib-
|
|
3
|
-
import { a as readRemoteMcpEnvironment, c as createPrototypeArtifactAdapter, l as createPublishCanvasPrototypeComposite, n as createHttpRemoteAdapter, t as createMutationKeyAdapter, u as createImportCanvasAssetComposite } from "./mutation-key.adapter-
|
|
4
|
-
import { n as createMcpCanvasProfileAdapter, t as createMcpInvocationAdapter } from "./mcp-invocation.adapter-
|
|
5
|
-
import { a as createMcpResultAdapter, o as createMcpClientContextAdapter, t as createMcpServerAdapter } from "./mcp-server.adapter-
|
|
2
|
+
import { M as canvasAssetImportInputSchema, N as canvasAssetImportOutputSchema, Ut as foldPrototypeArtifactPath, Xt as MCP_AUTH_SCOPE, Yt as getMeOutputSchema, b as canvasPrototypeIntentSchema, f as createCapabilityCatalogAdapter, jt as CliError, qt as prototypeArtifactPathSchema, x as canvasPrototypeOutputSchema } from "./cli-output-identity.lib-DgHRuXTI.mjs";
|
|
3
|
+
import { a as readRemoteMcpEnvironment, c as createPrototypeArtifactAdapter, l as createPublishCanvasPrototypeComposite, n as createHttpRemoteAdapter, t as createMutationKeyAdapter, u as createImportCanvasAssetComposite } from "./mutation-key.adapter-BWkNj5jp.mjs";
|
|
4
|
+
import { n as createMcpCanvasProfileAdapter, t as createMcpInvocationAdapter } from "./mcp-invocation.adapter-CjZnnMCd.mjs";
|
|
5
|
+
import { a as createMcpResultAdapter, o as createMcpClientContextAdapter, t as createMcpServerAdapter } from "./mcp-server.adapter-DOHJxL6l.mjs";
|
|
6
6
|
import process from "node:process";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
import os, { tmpdir } from "node:os";
|
|
@@ -729,7 +729,7 @@ const server = await createRemoteMcpHttpAdapter({
|
|
|
729
729
|
fileOrigins: config.MCP_FILE_ORIGINS.split(",").map((value) => value.trim()).filter(Boolean),
|
|
730
730
|
allowedHosts: config.MCP_ALLOWED_HOSTS.split(",").map((value) => value.trim()),
|
|
731
731
|
allowedOrigins: config.MCP_ALLOWED_ORIGINS.split(",").map((value) => value.trim()),
|
|
732
|
-
version: "0.1.
|
|
732
|
+
version: "0.1.39",
|
|
733
733
|
...config.MCP_UI_URL !== void 0 && { uiUrl: config.MCP_UI_URL },
|
|
734
734
|
onerror: (error) => process.stderr.write(`${error.message}\n`)
|
|
735
735
|
});
|