@enhance-eng/enhance 0.1.13 → 0.1.15
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-DAJiBMGX.mjs → cli-output-identity.lib-F9-nlguI.mjs} +517 -95
- package/dist/main.mjs +132 -512
- package/dist/{mcp-invocation.adapter-BG-WBGEr.mjs → mcp-invocation.adapter-fYfIiCYu.mjs} +2 -2
- package/dist/mcp-main.mjs +7 -7
- package/dist/{mcp-server.adapter-BgUZCdl4.mjs → mcp-server.adapter-DsjLVY2s.mjs} +317 -147
- package/dist/mcp.mjs +2 -2
- package/dist/{mutation-key.adapter-BffKsNR-.mjs → mutation-key.adapter-Bc4p5ff4.mjs} +720 -24
- package/dist/remote-mcp-main.mjs +5 -5
- package/package.json +2 -1
|
@@ -4,6 +4,7 @@ import { z } from "zod";
|
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
5
5
|
import { TRPCError, initTRPC } from "@trpc/server";
|
|
6
6
|
import { middlewareMarker } from "@trpc/server/unstable-core-do-not-import";
|
|
7
|
+
import { Buffer as Buffer$1 } from "node:buffer";
|
|
7
8
|
import { TRPCClientError } from "@trpc/client";
|
|
8
9
|
|
|
9
10
|
//#region \0rolldown/runtime.js
|
|
@@ -1168,7 +1169,7 @@ const RENDER_MAX_OUTPUT_BYTES = RENDER_MAX_OUTPUT_MIB * BYTES_PER_MIB$2;
|
|
|
1168
1169
|
const RENDER_MAX_SNAPSHOT_BYTES = RENDER_MAX_SNAPSHOT_MIB * BYTES_PER_MIB$2;
|
|
1169
1170
|
const RENDER_MAX_WORLD_EDGE = 1e5;
|
|
1170
1171
|
const RENDER_MIN_SCALE = .1;
|
|
1171
|
-
const MAX_NODE_ID_LENGTH$
|
|
1172
|
+
const MAX_NODE_ID_LENGTH$6 = 200;
|
|
1172
1173
|
const MAX_RENDER_MESSAGE_LENGTH$1 = 500;
|
|
1173
1174
|
const canvasWorldBoundsSchema = z.object({
|
|
1174
1175
|
x: z.number(),
|
|
@@ -1180,7 +1181,7 @@ const canvasRenderTargetSchema = z.discriminatedUnion("kind", [
|
|
|
1180
1181
|
z.object({ kind: z.literal("content") }),
|
|
1181
1182
|
z.object({
|
|
1182
1183
|
kind: z.literal("node"),
|
|
1183
|
-
nodeId: z.string().min(1).max(MAX_NODE_ID_LENGTH$
|
|
1184
|
+
nodeId: z.string().min(1).max(MAX_NODE_ID_LENGTH$6)
|
|
1184
1185
|
}),
|
|
1185
1186
|
z.object({
|
|
1186
1187
|
kind: z.literal("bounds"),
|
|
@@ -1202,7 +1203,7 @@ const canvasRenderSnapshotResultSchema = z.object({
|
|
|
1202
1203
|
recordingId: z.uuid(),
|
|
1203
1204
|
atMs: z.number().int().nonnegative(),
|
|
1204
1205
|
screenId: z.uuid(),
|
|
1205
|
-
screenNodeId: z.string().min(1).max(MAX_NODE_ID_LENGTH$
|
|
1206
|
+
screenNodeId: z.string().min(1).max(MAX_NODE_ID_LENGTH$6),
|
|
1206
1207
|
viewport: z.object({
|
|
1207
1208
|
width: z.number().int().positive(),
|
|
1208
1209
|
height: z.number().int().positive()
|
|
@@ -1229,20 +1230,20 @@ const canvasRenderWarningCodeSchema = z.enum(RENDER_WARNING_CODES);
|
|
|
1229
1230
|
const canvasRenderWarningSchema = z.object({
|
|
1230
1231
|
code: canvasRenderWarningCodeSchema,
|
|
1231
1232
|
message: z.string().min(1).max(MAX_RENDER_MESSAGE_LENGTH$1),
|
|
1232
|
-
sourceId: z.string().min(1).max(MAX_NODE_ID_LENGTH$
|
|
1233
|
+
sourceId: z.string().min(1).max(MAX_NODE_ID_LENGTH$6).nullable()
|
|
1233
1234
|
});
|
|
1234
1235
|
const canvasRenderFailureSchema = z.object({
|
|
1235
1236
|
reason: canvasRenderFailureReasonSchema,
|
|
1236
1237
|
phase: canvasRenderPhaseSchema,
|
|
1237
1238
|
message: z.string().min(1).max(MAX_RENDER_MESSAGE_LENGTH$1),
|
|
1238
1239
|
retryable: z.boolean(),
|
|
1239
|
-
sourceId: z.string().min(1).max(MAX_NODE_ID_LENGTH$
|
|
1240
|
+
sourceId: z.string().min(1).max(MAX_NODE_ID_LENGTH$6).nullable()
|
|
1240
1241
|
});
|
|
1241
1242
|
const canvasRenderTimingSchema = z.object({
|
|
1242
1243
|
phase: canvasRenderPhaseSchema,
|
|
1243
1244
|
durationMs: z.number().int().min(0)
|
|
1244
1245
|
});
|
|
1245
|
-
const canvasRenderResultSchema = z.object({
|
|
1246
|
+
const canvasRenderResultSchema$1 = z.object({
|
|
1246
1247
|
canvasId: z.uuid(),
|
|
1247
1248
|
requestedVersion: z.number().int().positive(),
|
|
1248
1249
|
loadedVersion: z.number().int().positive(),
|
|
@@ -1294,7 +1295,7 @@ const canvasRenderJobSchema = z.discriminatedUnion("state", [
|
|
|
1294
1295
|
canvasRenderJobBaseSchema.extend({
|
|
1295
1296
|
state: z.literal("succeeded"),
|
|
1296
1297
|
phase: z.literal("complete"),
|
|
1297
|
-
result: canvasRenderResultSchema,
|
|
1298
|
+
result: canvasRenderResultSchema$1,
|
|
1298
1299
|
failure: z.null()
|
|
1299
1300
|
}),
|
|
1300
1301
|
canvasRenderJobBaseSchema.extend({
|
|
@@ -1566,14 +1567,14 @@ const canvasPropertySectionSchema = z.enum(CANVAS_PROPERTY_SECTIONS);
|
|
|
1566
1567
|
|
|
1567
1568
|
//#endregion
|
|
1568
1569
|
//#region ../../packages/contract/src/canvas/canvas-inspection.schema.ts
|
|
1569
|
-
const MAX_NODE_ID_LENGTH$
|
|
1570
|
+
const MAX_NODE_ID_LENGTH$5 = 200;
|
|
1570
1571
|
const MAX_RENDER_MESSAGE_LENGTH = 500;
|
|
1571
1572
|
const MAX_RENDER_KIND_LENGTH = 100;
|
|
1572
1573
|
const canvasInspectNodeSummarySchema = z.object({
|
|
1573
|
-
id: z.string().min(1).max(MAX_NODE_ID_LENGTH$
|
|
1574
|
+
id: z.string().min(1).max(MAX_NODE_ID_LENGTH$5),
|
|
1574
1575
|
label: z.string().max(MAX_RENDER_MESSAGE_LENGTH),
|
|
1575
1576
|
kind: z.string().min(1).max(MAX_RENDER_KIND_LENGTH),
|
|
1576
|
-
parentId: z.string().min(1).max(MAX_NODE_ID_LENGTH$
|
|
1577
|
+
parentId: z.string().min(1).max(MAX_NODE_ID_LENGTH$5).nullable(),
|
|
1577
1578
|
childCount: z.number().int().min(0),
|
|
1578
1579
|
box: canvasWorldBoundsSchema.nullable(),
|
|
1579
1580
|
propertySections: z.array(canvasPropertySectionSchema)
|
|
@@ -1598,7 +1599,7 @@ const inspectCanvasTreeOutputSchema = z.object({
|
|
|
1598
1599
|
});
|
|
1599
1600
|
const inspectCanvasNodeInputSchema = z.object({
|
|
1600
1601
|
canvasId: z.uuid(),
|
|
1601
|
-
nodeId: z.string().min(1).max(MAX_NODE_ID_LENGTH$
|
|
1602
|
+
nodeId: z.string().min(1).max(MAX_NODE_ID_LENGTH$5)
|
|
1602
1603
|
});
|
|
1603
1604
|
const inspectCanvasNodeOutputSchema = z.object({
|
|
1604
1605
|
canvasId: z.uuid(),
|
|
@@ -1610,7 +1611,7 @@ const inspectCanvasNodeOutputSchema = z.object({
|
|
|
1610
1611
|
typography: canvasTypographySchema.optional(),
|
|
1611
1612
|
additionalStyles: canvasAdditionalStylesSchema.optional(),
|
|
1612
1613
|
props: z.record(z.string(), z.unknown()),
|
|
1613
|
-
children: z.array(z.string().min(1).max(MAX_NODE_ID_LENGTH$
|
|
1614
|
+
children: z.array(z.string().min(1).max(MAX_NODE_ID_LENGTH$5))
|
|
1614
1615
|
}),
|
|
1615
1616
|
next: z.array(z.string().min(1))
|
|
1616
1617
|
});
|
|
@@ -1757,7 +1758,7 @@ const DESCRIPTOR_BY_KIND = Object.fromEntries([
|
|
|
1757
1758
|
resizeBehavior: {
|
|
1758
1759
|
mode: "reflow",
|
|
1759
1760
|
preservesAspect: false,
|
|
1760
|
-
|
|
1761
|
+
canLockAspectRatio: true
|
|
1761
1762
|
},
|
|
1762
1763
|
propertySections: ["position", "layout"]
|
|
1763
1764
|
},
|
|
@@ -1800,7 +1801,7 @@ const DESCRIPTOR_BY_KIND = Object.fromEntries([
|
|
|
1800
1801
|
resizeBehavior: {
|
|
1801
1802
|
mode: "reflow",
|
|
1802
1803
|
preservesAspect: false,
|
|
1803
|
-
|
|
1804
|
+
canLockAspectRatio: true
|
|
1804
1805
|
},
|
|
1805
1806
|
propertySections: [
|
|
1806
1807
|
"position",
|
|
@@ -1822,7 +1823,7 @@ const DESCRIPTOR_BY_KIND = Object.fromEntries([
|
|
|
1822
1823
|
resizeBehavior: {
|
|
1823
1824
|
mode: "reflow",
|
|
1824
1825
|
preservesAspect: false,
|
|
1825
|
-
|
|
1826
|
+
canLockAspectRatio: true
|
|
1826
1827
|
},
|
|
1827
1828
|
propertySections: FRAME_PROPERTY_SECTIONS
|
|
1828
1829
|
},
|
|
@@ -1840,7 +1841,7 @@ const DESCRIPTOR_BY_KIND = Object.fromEntries([
|
|
|
1840
1841
|
resizeBehavior: {
|
|
1841
1842
|
mode: "reflow",
|
|
1842
1843
|
preservesAspect: false,
|
|
1843
|
-
|
|
1844
|
+
canLockAspectRatio: true
|
|
1844
1845
|
},
|
|
1845
1846
|
propertySections: [
|
|
1846
1847
|
"position",
|
|
@@ -1864,7 +1865,7 @@ const DESCRIPTOR_BY_KIND = Object.fromEntries([
|
|
|
1864
1865
|
resizeBehavior: {
|
|
1865
1866
|
mode: "reflow",
|
|
1866
1867
|
preservesAspect: false,
|
|
1867
|
-
|
|
1868
|
+
canLockAspectRatio: true
|
|
1868
1869
|
},
|
|
1869
1870
|
propertySections: SHAPE_PROPERTY_SECTIONS
|
|
1870
1871
|
},
|
|
@@ -1882,7 +1883,7 @@ const DESCRIPTOR_BY_KIND = Object.fromEntries([
|
|
|
1882
1883
|
resizeBehavior: {
|
|
1883
1884
|
mode: "scale",
|
|
1884
1885
|
preservesAspect: true,
|
|
1885
|
-
|
|
1886
|
+
canLockAspectRatio: true
|
|
1886
1887
|
},
|
|
1887
1888
|
propertySections: SHAPE_PROPERTY_SECTIONS
|
|
1888
1889
|
},
|
|
@@ -1901,7 +1902,7 @@ const DESCRIPTOR_BY_KIND = Object.fromEntries([
|
|
|
1901
1902
|
resizeBehavior: {
|
|
1902
1903
|
mode: "scale",
|
|
1903
1904
|
preservesAspect: true,
|
|
1904
|
-
|
|
1905
|
+
canLockAspectRatio: true
|
|
1905
1906
|
},
|
|
1906
1907
|
propertySections: SVG_PROPERTY_SECTIONS
|
|
1907
1908
|
},
|
|
@@ -1919,7 +1920,7 @@ const DESCRIPTOR_BY_KIND = Object.fromEntries([
|
|
|
1919
1920
|
resizeBehavior: {
|
|
1920
1921
|
mode: "scale",
|
|
1921
1922
|
preservesAspect: true,
|
|
1922
|
-
|
|
1923
|
+
canLockAspectRatio: true
|
|
1923
1924
|
},
|
|
1924
1925
|
propertySections: []
|
|
1925
1926
|
},
|
|
@@ -1937,7 +1938,7 @@ const DESCRIPTOR_BY_KIND = Object.fromEntries([
|
|
|
1937
1938
|
resizeBehavior: {
|
|
1938
1939
|
mode: "reflow",
|
|
1939
1940
|
preservesAspect: false,
|
|
1940
|
-
|
|
1941
|
+
canLockAspectRatio: false
|
|
1941
1942
|
},
|
|
1942
1943
|
propertySections: [
|
|
1943
1944
|
"position",
|
|
@@ -2166,12 +2167,12 @@ const insertConvertedSubtreeOperationSchema = z.object({
|
|
|
2166
2167
|
nodes: z.record(z.string().min(1).max(200), canvasSceneNodeSchema).refine((nodes) => Object.keys(nodes).length <= MAX_CANVAS_CONVERSION_NODES),
|
|
2167
2168
|
relationships: z.record(z.string().min(1).max(200), convertedSubtreeRelationshipSchema).refine((relationships) => Object.keys(relationships).length < MAX_CANVAS_CONVERSION_NODES)
|
|
2168
2169
|
});
|
|
2169
|
-
const MAX_NODE_ID_LENGTH$
|
|
2170
|
-
const MAX_LABEL_LENGTH = 500;
|
|
2171
|
-
const MAX_TEXT_LENGTH = 1e5;
|
|
2170
|
+
const MAX_NODE_ID_LENGTH$4 = 200;
|
|
2171
|
+
const MAX_LABEL_LENGTH$1 = 500;
|
|
2172
|
+
const MAX_TEXT_LENGTH$1 = 1e5;
|
|
2172
2173
|
const MAX_CANVAS_OPERATIONS = 1e3;
|
|
2173
|
-
const nodeIdSchema$1 = z.string().min(1).max(MAX_NODE_ID_LENGTH$
|
|
2174
|
-
const sortKeySchema = z.string().min(1).max(MAX_LABEL_LENGTH);
|
|
2174
|
+
const nodeIdSchema$1 = z.string().min(1).max(MAX_NODE_ID_LENGTH$4);
|
|
2175
|
+
const sortKeySchema = z.string().min(1).max(MAX_LABEL_LENGTH$1);
|
|
2175
2176
|
const writableBoxSchema = canvasSceneBoxSchema.extend({
|
|
2176
2177
|
width: z.number().positive(),
|
|
2177
2178
|
height: z.number().positive()
|
|
@@ -2200,15 +2201,15 @@ const canvasOperationSchema = z.discriminatedUnion("op", [
|
|
|
2200
2201
|
placementSchema.extend({
|
|
2201
2202
|
op: z.literal("insertText"),
|
|
2202
2203
|
nodeId: nodeIdSchema$1,
|
|
2203
|
-
label: z.string().max(MAX_LABEL_LENGTH).default("Text"),
|
|
2204
|
-
text: z.string().max(MAX_TEXT_LENGTH),
|
|
2204
|
+
label: z.string().max(MAX_LABEL_LENGTH$1).default("Text"),
|
|
2205
|
+
text: z.string().max(MAX_TEXT_LENGTH$1),
|
|
2205
2206
|
box: writableBoxSchema,
|
|
2206
2207
|
styles: canvasTextStylesSchema.default({})
|
|
2207
2208
|
}),
|
|
2208
2209
|
placementSchema.extend({
|
|
2209
2210
|
op: z.literal("insertPrototype"),
|
|
2210
2211
|
nodeId: nodeIdSchema$1,
|
|
2211
|
-
label: z.string().max(MAX_LABEL_LENGTH).default("Prototype"),
|
|
2212
|
+
label: z.string().max(MAX_LABEL_LENGTH$1).default("Prototype"),
|
|
2212
2213
|
prototypeId: z.uuid(),
|
|
2213
2214
|
deploymentId: z.uuid(),
|
|
2214
2215
|
box: writableBoxSchema,
|
|
@@ -2223,7 +2224,7 @@ const canvasOperationSchema = z.discriminatedUnion("op", [
|
|
|
2223
2224
|
z.object({
|
|
2224
2225
|
op: z.literal("setText"),
|
|
2225
2226
|
nodeId: nodeIdSchema$1,
|
|
2226
|
-
text: z.string().max(MAX_TEXT_LENGTH)
|
|
2227
|
+
text: z.string().max(MAX_TEXT_LENGTH$1)
|
|
2227
2228
|
}),
|
|
2228
2229
|
z.object({
|
|
2229
2230
|
op: z.literal("setBox"),
|
|
@@ -2233,7 +2234,7 @@ const canvasOperationSchema = z.discriminatedUnion("op", [
|
|
|
2233
2234
|
z.object({
|
|
2234
2235
|
op: z.literal("setLabel"),
|
|
2235
2236
|
nodeId: nodeIdSchema$1,
|
|
2236
|
-
label: z.string().trim().min(1).max(MAX_LABEL_LENGTH),
|
|
2237
|
+
label: z.string().trim().min(1).max(MAX_LABEL_LENGTH$1),
|
|
2237
2238
|
labelOrigin: canvasNodeLabelOriginSchema.nullable().optional()
|
|
2238
2239
|
}),
|
|
2239
2240
|
z.object({
|
|
@@ -2325,7 +2326,7 @@ const createEditableFrameOutputSchema = createEditableFrameResultSchema.extend({
|
|
|
2325
2326
|
const CANVAS_REALTIME_PROTOCOL = "enhance3.canvas.v1";
|
|
2326
2327
|
const MAX_DISPLAY_NAME_LENGTH = 100;
|
|
2327
2328
|
const MAX_INITIALS_LENGTH = 8;
|
|
2328
|
-
const MAX_NODE_ID_LENGTH$
|
|
2329
|
+
const MAX_NODE_ID_LENGTH$3 = 200;
|
|
2329
2330
|
const MAX_SELECTION_SIZE = 100;
|
|
2330
2331
|
const MAX_ACTIVITY_TARGETS = 100;
|
|
2331
2332
|
const MAX_REALTIME_TICKET_LENGTH = 4096;
|
|
@@ -2377,7 +2378,7 @@ const visibleWorldBoxSchema = canvasSceneBoxSchema.extend({
|
|
|
2377
2378
|
const gesturePreviewSchema = z.object({
|
|
2378
2379
|
kind: z.enum(["drag", "resize"]),
|
|
2379
2380
|
baseVersion: z.number().int().positive(),
|
|
2380
|
-
boxes: z.record(z.string().min(1).max(MAX_NODE_ID_LENGTH$
|
|
2381
|
+
boxes: z.record(z.string().min(1).max(MAX_NODE_ID_LENGTH$3), visibleWorldBoxSchema)
|
|
2381
2382
|
});
|
|
2382
2383
|
const canvasPresencePatchSchema = z.object({
|
|
2383
2384
|
cursor: cursorSchema.nullable().optional(),
|
|
@@ -2387,7 +2388,7 @@ const canvasPresencePatchSchema = z.object({
|
|
|
2387
2388
|
"keyboard"
|
|
2388
2389
|
]).optional(),
|
|
2389
2390
|
focused: z.boolean().optional(),
|
|
2390
|
-
selectedNodeIds: z.array(z.string().min(1).max(MAX_NODE_ID_LENGTH$
|
|
2391
|
+
selectedNodeIds: z.array(z.string().min(1).max(MAX_NODE_ID_LENGTH$3)).max(MAX_SELECTION_SIZE).optional(),
|
|
2391
2392
|
visibleWorldBox: visibleWorldBoxSchema.optional(),
|
|
2392
2393
|
gesture: gesturePreviewSchema.nullable().optional(),
|
|
2393
2394
|
cursorChat: z.string().max(140).nullable().optional()
|
|
@@ -2402,7 +2403,7 @@ const canvasPresenceSchema = z.object({
|
|
|
2402
2403
|
"keyboard"
|
|
2403
2404
|
]),
|
|
2404
2405
|
focused: z.boolean(),
|
|
2405
|
-
selectedNodeIds: z.array(z.string().min(1).max(MAX_NODE_ID_LENGTH$
|
|
2406
|
+
selectedNodeIds: z.array(z.string().min(1).max(MAX_NODE_ID_LENGTH$3)).max(MAX_SELECTION_SIZE),
|
|
2406
2407
|
visibleWorldBox: visibleWorldBoxSchema.nullable(),
|
|
2407
2408
|
gesture: gesturePreviewSchema.nullable(),
|
|
2408
2409
|
cursorChat: z.string().max(140).nullable().default(null),
|
|
@@ -2420,7 +2421,7 @@ const canvasAgentActivitySchema = z.object({
|
|
|
2420
2421
|
canvasId: z.uuid(),
|
|
2421
2422
|
actor: agentMutationActorSchema,
|
|
2422
2423
|
phase: canvasAgentActivityPhaseSchema,
|
|
2423
|
-
nodeIds: z.array(z.string().min(1).max(MAX_NODE_ID_LENGTH$
|
|
2424
|
+
nodeIds: z.array(z.string().min(1).max(MAX_NODE_ID_LENGTH$3)).max(MAX_ACTIVITY_TARGETS),
|
|
2424
2425
|
bounds: visibleWorldBoxSchema.nullable(),
|
|
2425
2426
|
expiresAt: z.iso.datetime()
|
|
2426
2427
|
});
|
|
@@ -2437,7 +2438,7 @@ const canvasRealtimeTicketOutputSchema = z.object({
|
|
|
2437
2438
|
const beginCanvasActivityInputSchema = z.object({
|
|
2438
2439
|
canvasId: z.uuid(),
|
|
2439
2440
|
phase: canvasAgentActivityPhaseSchema,
|
|
2440
|
-
nodeIds: z.array(z.string().min(1).max(MAX_NODE_ID_LENGTH$
|
|
2441
|
+
nodeIds: z.array(z.string().min(1).max(MAX_NODE_ID_LENGTH$3)).max(MAX_ACTIVITY_TARGETS).default([]),
|
|
2441
2442
|
bounds: visibleWorldBoxSchema.nullable().default(null)
|
|
2442
2443
|
});
|
|
2443
2444
|
const beginCanvasActivityOutputSchema = z.object({
|
|
@@ -2546,7 +2547,7 @@ const canvasRealtimeServerEnvelopeSchema = z.discriminatedUnion("type", [
|
|
|
2546
2547
|
|
|
2547
2548
|
//#endregion
|
|
2548
2549
|
//#region ../../packages/contract/src/canvas/canvas-render-exposure.schema.ts
|
|
2549
|
-
const MAX_NODE_ID_LENGTH$
|
|
2550
|
+
const MAX_NODE_ID_LENGTH$2 = 200;
|
|
2550
2551
|
/** The only job metadata exposed to the browser carrying a one-job render grant. */
|
|
2551
2552
|
const exposeCanvasRenderInputSchema = z.object({ jobId: z.uuid() });
|
|
2552
2553
|
const exposeCanvasRenderBaseSchema = z.object({
|
|
@@ -2568,7 +2569,7 @@ const exposeCanvasRenderOutputSchema = z.discriminatedUnion("purpose", [exposeCa
|
|
|
2568
2569
|
purpose: z.literal("conversion"),
|
|
2569
2570
|
target: z.object({
|
|
2570
2571
|
kind: z.literal("node"),
|
|
2571
|
-
nodeId: z.string().min(1).max(MAX_NODE_ID_LENGTH$
|
|
2572
|
+
nodeId: z.string().min(1).max(MAX_NODE_ID_LENGTH$2)
|
|
2572
2573
|
}),
|
|
2573
2574
|
sourceState: z.undefined().optional(),
|
|
2574
2575
|
conversion: canvasConversionRequestSchema,
|
|
@@ -4110,7 +4111,8 @@ const getRecordingOutputSchema = z.object({
|
|
|
4110
4111
|
path: z.string().startsWith("/v1/recording-assets/")
|
|
4111
4112
|
})),
|
|
4112
4113
|
/** How much of the page we could not fetch. A replay says so rather than rendering short. */
|
|
4113
|
-
missingAssetCount: z.number().int().min(0)
|
|
4114
|
+
missingAssetCount: z.number().int().min(0),
|
|
4115
|
+
missingAssetUrls: z.array(z.string()).optional()
|
|
4114
4116
|
});
|
|
4115
4117
|
const refreshRecordingUploadInputSchema = z.object({
|
|
4116
4118
|
recordingId: z.uuid(),
|
|
@@ -4633,6 +4635,189 @@ var PartialBatchError = class extends CliError {
|
|
|
4633
4635
|
}
|
|
4634
4636
|
};
|
|
4635
4637
|
|
|
4638
|
+
//#endregion
|
|
4639
|
+
//#region src/application/canvas-reference.use-case.ts
|
|
4640
|
+
const canvasIdSchema = z.uuid();
|
|
4641
|
+
const selectedIdsSchema = z.array(z.string().min(1).max(200)).min(1);
|
|
4642
|
+
const CANVAS_PATH = /^\/c\/([^/]+)\/?$/u;
|
|
4643
|
+
const urlFrom = (candidate) => {
|
|
4644
|
+
try {
|
|
4645
|
+
return new URL(candidate);
|
|
4646
|
+
} catch {
|
|
4647
|
+
return null;
|
|
4648
|
+
}
|
|
4649
|
+
};
|
|
4650
|
+
const parseCanvasReference = (reference) => {
|
|
4651
|
+
const candidate = reference.trim();
|
|
4652
|
+
const direct = canvasIdSchema.safeParse(candidate);
|
|
4653
|
+
if (direct.success) return {
|
|
4654
|
+
canvasId: direct.data,
|
|
4655
|
+
nodeIds: []
|
|
4656
|
+
};
|
|
4657
|
+
const url = urlFrom(candidate);
|
|
4658
|
+
if (url !== null && (url.protocol === "http:" || url.protocol === "https:")) {
|
|
4659
|
+
const id = canvasIdSchema.safeParse(CANVAS_PATH.exec(url.pathname.toLowerCase())?.[1]);
|
|
4660
|
+
if (id.success) {
|
|
4661
|
+
const selection = new URLSearchParams(url.hash.slice(1)).getAll("selection");
|
|
4662
|
+
if (selection.length === 0) return {
|
|
4663
|
+
canvasId: id.data,
|
|
4664
|
+
nodeIds: []
|
|
4665
|
+
};
|
|
4666
|
+
const parsed = selectedIdsSchema.safeParse(selection);
|
|
4667
|
+
if (!parsed.success) throw new CliError("BAD_REQUEST", "The link contains an invalid selection.", "Copy the selection link again from the canvas.");
|
|
4668
|
+
return {
|
|
4669
|
+
canvasId: id.data,
|
|
4670
|
+
nodeIds: [...new Set(parsed.data)]
|
|
4671
|
+
};
|
|
4672
|
+
}
|
|
4673
|
+
}
|
|
4674
|
+
throw new CliError("BAD_REQUEST", "The canvas reference is neither a canvas URL nor a UUID.", "Paste an HTTP(S) URL shaped https://app.example/c/<UUID>, or pass the bare canvas UUID.");
|
|
4675
|
+
};
|
|
4676
|
+
const fromCanvasReference = (reference) => {
|
|
4677
|
+
const parsed = parseCanvasReference(reference);
|
|
4678
|
+
if (parsed.nodeIds.length > 0) throw new CliError("BAD_REQUEST", `This command cannot discard the link selection: ${parsed.nodeIds.join(", ")}.`, "Inspect the selection with canvas tree and use a targeted edit. Use a canvas URL without a selection only when the request covers the whole canvas.");
|
|
4679
|
+
return parsed.canvasId;
|
|
4680
|
+
};
|
|
4681
|
+
const canvasReferenceNodeIds = (reference, document) => {
|
|
4682
|
+
const missing = reference.nodeIds.filter((id) => document.nodes[id] === void 0);
|
|
4683
|
+
if (missing.length > 0) throw new CliError("NOT_FOUND", `The link selection no longer exists: ${missing.join(", ")}.`, "Copy a current selection link; do not substitute other canvas content.");
|
|
4684
|
+
const selected = new Set(reference.nodeIds);
|
|
4685
|
+
const descendants = (parentId) => {
|
|
4686
|
+
for (const [id, relationship] of Object.entries(document.relationships)) {
|
|
4687
|
+
if (relationship.parentId !== parentId || selected.has(id)) continue;
|
|
4688
|
+
selected.add(id);
|
|
4689
|
+
descendants(id);
|
|
4690
|
+
}
|
|
4691
|
+
};
|
|
4692
|
+
for (const id of reference.nodeIds) descendants(id);
|
|
4693
|
+
return selected;
|
|
4694
|
+
};
|
|
4695
|
+
const assertCanvasReferenceNodes = (reference, document, nodeIds) => {
|
|
4696
|
+
if (reference.nodeIds.length === 0) return;
|
|
4697
|
+
const scope = canvasReferenceNodeIds(reference, document);
|
|
4698
|
+
assertNodesInScope(scope, nodeIds);
|
|
4699
|
+
};
|
|
4700
|
+
const assertNodesInScope = (scope, nodeIds) => {
|
|
4701
|
+
const outside = nodeIds.filter((id) => !scope.has(id));
|
|
4702
|
+
if (outside.length > 0) throw new CliError("BAD_REQUEST", `These nodes are outside the link selection: ${outside.join(", ")}.`, "Limit the edit to the selected nodes and their descendants. Request a wider selection only when the person wants a wider change.");
|
|
4703
|
+
};
|
|
4704
|
+
const conversionScope = (operation) => {
|
|
4705
|
+
if (operation.destination.kind === "adjacent") throw new CliError("BAD_REQUEST", "Adjacent conversion would insert outside the link selection.", "Use insert-children or replace with a selected target.");
|
|
4706
|
+
return {
|
|
4707
|
+
required: [operation.destination.targetNodeId],
|
|
4708
|
+
inserted: Object.keys(operation.nodes)
|
|
4709
|
+
};
|
|
4710
|
+
};
|
|
4711
|
+
const operationScope = (operation, document) => {
|
|
4712
|
+
switch (operation.op) {
|
|
4713
|
+
case "insertNode": return {
|
|
4714
|
+
required: [operation.parentage.parentId],
|
|
4715
|
+
inserted: [operation.node.id]
|
|
4716
|
+
};
|
|
4717
|
+
case "insertText":
|
|
4718
|
+
case "insertPrototype": return {
|
|
4719
|
+
required: [operation.parentId, ...operation.afterId === void 0 ? [] : [operation.afterId]],
|
|
4720
|
+
inserted: [operation.nodeId]
|
|
4721
|
+
};
|
|
4722
|
+
case "insertConvertedSubtree": return conversionScope(operation);
|
|
4723
|
+
case "move":
|
|
4724
|
+
case "setParentage": {
|
|
4725
|
+
const parentId = operation.op === "move" ? operation.parentId : operation.parentage.parentId;
|
|
4726
|
+
return {
|
|
4727
|
+
required: [operation.nodeId, ...parentId === document.relationships[operation.nodeId]?.parentId ? [] : [parentId]],
|
|
4728
|
+
inserted: []
|
|
4729
|
+
};
|
|
4730
|
+
}
|
|
4731
|
+
case "setPrototypeDeployment":
|
|
4732
|
+
case "setText":
|
|
4733
|
+
case "setBox":
|
|
4734
|
+
case "setLabel":
|
|
4735
|
+
case "setContainerKind":
|
|
4736
|
+
case "setVisibility":
|
|
4737
|
+
case "setLocked":
|
|
4738
|
+
case "setConstraints":
|
|
4739
|
+
case "setStyles":
|
|
4740
|
+
case "setAppearance":
|
|
4741
|
+
case "setLayout":
|
|
4742
|
+
case "setTypography":
|
|
4743
|
+
case "setAdditionalStyles":
|
|
4744
|
+
case "setProps":
|
|
4745
|
+
case "remove": return {
|
|
4746
|
+
required: [operation.nodeId],
|
|
4747
|
+
inserted: []
|
|
4748
|
+
};
|
|
4749
|
+
}
|
|
4750
|
+
};
|
|
4751
|
+
const assertCanvasReferenceOperations = (reference, document, operations) => {
|
|
4752
|
+
if (reference.nodeIds.length === 0) return;
|
|
4753
|
+
const scope = new Set(canvasReferenceNodeIds(reference, document));
|
|
4754
|
+
for (const operation of operations) {
|
|
4755
|
+
const { required, inserted } = operationScope(operation, document);
|
|
4756
|
+
assertNodesInScope(scope, [...required, ...inserted.filter((id) => document.nodes[id] !== void 0)]);
|
|
4757
|
+
for (const id of inserted) scope.add(id);
|
|
4758
|
+
}
|
|
4759
|
+
};
|
|
4760
|
+
|
|
4761
|
+
//#endregion
|
|
4762
|
+
//#region src/infrastructure/canvas-edit-input.schema.ts
|
|
4763
|
+
const MAX_NODE_ID_LENGTH$1 = 200;
|
|
4764
|
+
const MAX_NODE_IDS = 1e3;
|
|
4765
|
+
const MAX_TEXT_LENGTH = 1e5;
|
|
4766
|
+
const MAX_LABEL_LENGTH = 500;
|
|
4767
|
+
const MAX_EDITS = 100;
|
|
4768
|
+
const nodeId = z.string().min(1).max(MAX_NODE_ID_LENGTH$1);
|
|
4769
|
+
const nodeIds = z.array(nodeId).min(1).max(MAX_NODE_IDS);
|
|
4770
|
+
const canvasEditsSchema = z.array(z.discriminatedUnion("kind", [
|
|
4771
|
+
z.object({
|
|
4772
|
+
kind: z.literal("set_text"),
|
|
4773
|
+
nodeId,
|
|
4774
|
+
text: z.string().max(MAX_TEXT_LENGTH)
|
|
4775
|
+
}),
|
|
4776
|
+
z.object({
|
|
4777
|
+
kind: z.literal("set_styles"),
|
|
4778
|
+
nodeIds,
|
|
4779
|
+
styles: z.record(z.string(), z.union([
|
|
4780
|
+
z.string(),
|
|
4781
|
+
z.number(),
|
|
4782
|
+
z.null()
|
|
4783
|
+
]))
|
|
4784
|
+
}),
|
|
4785
|
+
z.object({
|
|
4786
|
+
kind: z.literal("rename"),
|
|
4787
|
+
nodeId,
|
|
4788
|
+
name: z.string().trim().min(1).max(MAX_LABEL_LENGTH)
|
|
4789
|
+
}),
|
|
4790
|
+
z.object({
|
|
4791
|
+
kind: z.literal("duplicate"),
|
|
4792
|
+
nodeIds,
|
|
4793
|
+
parentId: nodeId.optional()
|
|
4794
|
+
}),
|
|
4795
|
+
z.object({
|
|
4796
|
+
kind: z.literal("move"),
|
|
4797
|
+
nodeId,
|
|
4798
|
+
destination: z.discriminatedUnion("kind", [
|
|
4799
|
+
z.object({
|
|
4800
|
+
kind: z.literal("before"),
|
|
4801
|
+
nodeId
|
|
4802
|
+
}),
|
|
4803
|
+
z.object({
|
|
4804
|
+
kind: z.literal("after"),
|
|
4805
|
+
nodeId
|
|
4806
|
+
}),
|
|
4807
|
+
z.object({
|
|
4808
|
+
kind: z.literal("parent"),
|
|
4809
|
+
parentId: nodeId,
|
|
4810
|
+
index: z.number().int().nonnegative().optional()
|
|
4811
|
+
})
|
|
4812
|
+
])
|
|
4813
|
+
})
|
|
4814
|
+
])).min(1).max(MAX_EDITS);
|
|
4815
|
+
const canvasEditCapabilityInputSchema = z.object({
|
|
4816
|
+
canvas: z.string().min(1).describe("Canvas UUID or full canvas/selection URL; selection limits the entire edit batch."),
|
|
4817
|
+
baseVersion: z.number().int().positive().describe("Exact version to edit, including the version returned by a previous successful write."),
|
|
4818
|
+
edits: canvasEditsSchema.describe("One to 100 sequential text, style, rename, duplicate or move edits, committed atomically. Target existing node IDs.")
|
|
4819
|
+
});
|
|
4820
|
+
|
|
4636
4821
|
//#endregion
|
|
4637
4822
|
//#region src/application/capability-example.consts.ts
|
|
4638
4823
|
const CAPABILITY_UUID_EXAMPLE = "00000000-0000-4000-8000-000000000010";
|
|
@@ -4660,11 +4845,13 @@ const canvasRenderCapabilityInputSchema = z.object({
|
|
|
4660
4845
|
});
|
|
4661
4846
|
const canvasWriteHtmlCapabilityInputSchema = z.object({
|
|
4662
4847
|
canvasId: z.uuid(),
|
|
4848
|
+
selectionNodeIds: z.array(z.string().min(1).max(MAX_NODE_ID_LENGTH)).optional().describe("Selected node IDs from the canvas URL; restrict the destination to this selection."),
|
|
4663
4849
|
targetNodeId: z.string().min(1).max(MAX_NODE_ID_LENGTH).describe("Stable container id for insert-children, or subtree root id for replace."),
|
|
4664
4850
|
mode: z.enum(["insert-children", "replace"]).describe("Insert the compiled group inside the target, or replace the target subtree."),
|
|
4665
4851
|
html: z.string().min(1).max(MAX_HTML_LENGTH).describe("Exactly one safe top-level HTML/CSS visual group to compile into editable nodes."),
|
|
4666
|
-
idPrefix: z.string().min(1).max(MAX_ID_PREFIX_LENGTH).optional().describe("Optional
|
|
4852
|
+
idPrefix: z.string().min(1).max(MAX_ID_PREFIX_LENGTH).optional().describe("Optional namespace for generated IDs. Choose a fresh prefix for each new import or replacement; reuse only for an identical retry."),
|
|
4667
4853
|
baseVersion: z.number().int().positive(),
|
|
4854
|
+
review: z.enum(["none", "render"]).optional().describe("Use none to return the committed edit without rendering; omission preserves combined review."),
|
|
4668
4855
|
renderOutputPath: z.string().min(1).nullable().describe("Local review PNG path, or null for a protected temporary artifact."),
|
|
4669
4856
|
overwriteRender: z.boolean().describe("Whether an existing renderOutputPath may be replaced."),
|
|
4670
4857
|
renderScale: z.number().min(MIN_RENDER_SCALE).max(MAX_RENDER_SCALE).describe("Review PNG pixels per canvas unit, from 0.1 through 4."),
|
|
@@ -4700,6 +4887,44 @@ const transcriptReadCapabilityInputSchema = z.object({
|
|
|
4700
4887
|
//#endregion
|
|
4701
4888
|
//#region src/infrastructure/canvas-capability.consts.ts
|
|
4702
4889
|
const CANVAS_CAPABILITY_SPECS = [
|
|
4890
|
+
{
|
|
4891
|
+
id: "canvas.edit",
|
|
4892
|
+
cliPath: "canvas edit",
|
|
4893
|
+
operation: "mutation",
|
|
4894
|
+
effect: "write",
|
|
4895
|
+
idempotency: "single",
|
|
4896
|
+
inputSchema: canvasEditCapabilityInputSchema,
|
|
4897
|
+
outputSchema: applyCanvasOperationsOutputSchema,
|
|
4898
|
+
summary: "Change selected text, styles, names, duplicates, or positions in one atomic design edit.",
|
|
4899
|
+
procedures: [
|
|
4900
|
+
"canvas.document.get",
|
|
4901
|
+
"canvas.realtime.activity.begin",
|
|
4902
|
+
"canvas.realtime.activity.renew",
|
|
4903
|
+
"canvas.realtime.activity.end",
|
|
4904
|
+
"canvas.applyOperations"
|
|
4905
|
+
],
|
|
4906
|
+
inputExample: {
|
|
4907
|
+
canvas: CAPABILITY_UUID_EXAMPLE,
|
|
4908
|
+
baseVersion: 1,
|
|
4909
|
+
edits: [{
|
|
4910
|
+
kind: "set_text",
|
|
4911
|
+
nodeId: "text_title",
|
|
4912
|
+
text: "Today"
|
|
4913
|
+
}]
|
|
4914
|
+
},
|
|
4915
|
+
outputExample: {
|
|
4916
|
+
canvasId: CAPABILITY_UUID_EXAMPLE,
|
|
4917
|
+
mutationId: CAPABILITY_UUID_EXAMPLE,
|
|
4918
|
+
previousVersion: 1,
|
|
4919
|
+
version: 2,
|
|
4920
|
+
insertedNodeIds: [],
|
|
4921
|
+
changedNodeIds: ["text_title"],
|
|
4922
|
+
removedNodeIds: [],
|
|
4923
|
+
boxes: {},
|
|
4924
|
+
affectedBounds: null,
|
|
4925
|
+
next: []
|
|
4926
|
+
}
|
|
4927
|
+
},
|
|
4703
4928
|
{
|
|
4704
4929
|
id: "canvas.apply",
|
|
4705
4930
|
cliPath: "canvas apply",
|
|
@@ -4788,20 +5013,39 @@ const CANVAS_CAPABILITY_SPECS = [
|
|
|
4788
5013
|
effect: "write",
|
|
4789
5014
|
idempotency: "composite",
|
|
4790
5015
|
inputSchema: canvasWriteHtmlCapabilityInputSchema,
|
|
4791
|
-
outputSchema: z.looseObject({
|
|
5016
|
+
outputSchema: z.union([z.looseObject({
|
|
4792
5017
|
canvasId: z.uuid(),
|
|
4793
5018
|
mutationCommitted: z.literal(true),
|
|
4794
5019
|
previousVersion: z.number().int().positive(),
|
|
4795
5020
|
version: z.number().int().positive(),
|
|
5021
|
+
rootNodeId: z.string().optional(),
|
|
5022
|
+
jobId: z.uuid().optional(),
|
|
5023
|
+
affected: z.object({
|
|
5024
|
+
inserted: z.number(),
|
|
5025
|
+
changed: z.number(),
|
|
5026
|
+
removed: z.number()
|
|
5027
|
+
}).optional(),
|
|
4796
5028
|
createdNodes: z.array(z.object({
|
|
4797
5029
|
id: z.string(),
|
|
4798
5030
|
name: z.string(),
|
|
4799
5031
|
component: z.string()
|
|
4800
|
-
})),
|
|
5032
|
+
})).optional(),
|
|
4801
5033
|
removedNodeIds: z.array(z.string()),
|
|
4802
|
-
next: z.array(z.string())
|
|
4803
|
-
}),
|
|
4804
|
-
|
|
5034
|
+
next: z.array(z.string()).optional()
|
|
5035
|
+
}), z.object({
|
|
5036
|
+
state: z.literal("pending"),
|
|
5037
|
+
canvasId: z.uuid(),
|
|
5038
|
+
jobId: z.uuid(),
|
|
5039
|
+
phase: z.string(),
|
|
5040
|
+
status: z.object({
|
|
5041
|
+
tool: z.literal("capability_query"),
|
|
5042
|
+
arguments: z.object({
|
|
5043
|
+
capability: z.literal("canvas.render.getImport"),
|
|
5044
|
+
input: z.object({ jobId: z.uuid() })
|
|
5045
|
+
})
|
|
5046
|
+
})
|
|
5047
|
+
})]),
|
|
5048
|
+
summary: "Design an editable screen or visual group from HTML and CSS. Use review none for a fast commit, then render after the intended edits.",
|
|
4805
5049
|
procedures: [
|
|
4806
5050
|
"canvas.realtime.activity.begin",
|
|
4807
5051
|
"canvas.realtime.activity.renew",
|
|
@@ -4817,7 +5061,8 @@ const CANVAS_CAPABILITY_SPECS = [
|
|
|
4817
5061
|
canvasId: CAPABILITY_UUID_EXAMPLE,
|
|
4818
5062
|
targetNodeId: "root",
|
|
4819
5063
|
mode: "insert-children",
|
|
4820
|
-
html: "<div layer-name=\"Ready\" style=\"display:flex;width:
|
|
5064
|
+
html: "<div layer-name=\"Ready\" style=\"display:flex;flex-direction:column;gap:16px;padding:24px;width:360px;background:#fff\"><h1 style=\"font-size:24px\">Today</h1><p>Three tasks ready to start</p><div style=\"padding:16px;background:#eef2ff\">Review the design</div></div>",
|
|
5065
|
+
review: "none",
|
|
4821
5066
|
idPrefix: "example",
|
|
4822
5067
|
baseVersion: 1,
|
|
4823
5068
|
renderOutputPath: null,
|
|
@@ -4830,13 +5075,26 @@ const CANVAS_CAPABILITY_SPECS = [
|
|
|
4830
5075
|
mutationCommitted: true,
|
|
4831
5076
|
previousVersion: 1,
|
|
4832
5077
|
version: 2,
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
5078
|
+
rootNodeId: "example_ready_0001",
|
|
5079
|
+
jobId: CAPABILITY_UUID_EXAMPLE,
|
|
5080
|
+
affected: {
|
|
5081
|
+
inserted: 4,
|
|
5082
|
+
changed: 0,
|
|
5083
|
+
removed: 0
|
|
5084
|
+
},
|
|
5085
|
+
insertedNodeIds: [
|
|
5086
|
+
"example_ready_0001",
|
|
5087
|
+
"example_text_0002",
|
|
5088
|
+
"example_text_0003",
|
|
5089
|
+
"example_text_0004"
|
|
5090
|
+
],
|
|
5091
|
+
affectedBounds: {
|
|
5092
|
+
x: 0,
|
|
5093
|
+
y: 0,
|
|
5094
|
+
width: 360,
|
|
5095
|
+
height: 180
|
|
5096
|
+
},
|
|
5097
|
+
removedNodeIds: []
|
|
4840
5098
|
}
|
|
4841
5099
|
}
|
|
4842
5100
|
];
|
|
@@ -4844,7 +5102,7 @@ const CANVAS_CAPABILITY_SPECS = [
|
|
|
4844
5102
|
//#endregion
|
|
4845
5103
|
//#region src/infrastructure/capability-example.mapper.ts
|
|
4846
5104
|
const jsonRecordSchema$2 = z.record(z.string(), z.unknown());
|
|
4847
|
-
const recordFrom$
|
|
5105
|
+
const recordFrom$3 = (value) => {
|
|
4848
5106
|
const parsed = jsonRecordSchema$2.safeParse(value);
|
|
4849
5107
|
return parsed.success ? parsed.data : null;
|
|
4850
5108
|
};
|
|
@@ -4864,7 +5122,7 @@ const alternativeExample = (schema) => {
|
|
|
4864
5122
|
return alternatives === null ? void 0 : toCapabilityExample(alternatives[0]);
|
|
4865
5123
|
};
|
|
4866
5124
|
const objectExample = (schema) => {
|
|
4867
|
-
const properties = recordFrom$
|
|
5125
|
+
const properties = recordFrom$3(schema["properties"]) ?? {};
|
|
4868
5126
|
const required = Array.isArray(schema["required"]) ? schema["required"] : [];
|
|
4869
5127
|
const entries = [];
|
|
4870
5128
|
for (const name of required) if (typeof name === "string") entries.push([name, toCapabilityExample(properties[name])]);
|
|
@@ -4876,7 +5134,7 @@ const numberExample = (schema) => {
|
|
|
4876
5134
|
return 0;
|
|
4877
5135
|
};
|
|
4878
5136
|
const toCapabilityExample = (schemaValue) => {
|
|
4879
|
-
const schema = recordFrom$
|
|
5137
|
+
const schema = recordFrom$3(schemaValue);
|
|
4880
5138
|
if (schema === null) return {};
|
|
4881
5139
|
if ("default" in schema) return schema["default"];
|
|
4882
5140
|
if ("const" in schema) return schema["const"];
|
|
@@ -5114,25 +5372,25 @@ const OPTION_DESCRIPTIONS = {
|
|
|
5114
5372
|
//#endregion
|
|
5115
5373
|
//#region src/infrastructure/capability-definition.mapper.ts
|
|
5116
5374
|
const jsonRecordSchema$1 = z.record(z.string(), z.unknown());
|
|
5117
|
-
const recordFrom$
|
|
5375
|
+
const recordFrom$2 = (value) => {
|
|
5118
5376
|
const parsed = jsonRecordSchema$1.safeParse(value);
|
|
5119
5377
|
return parsed.success ? parsed.data : null;
|
|
5120
5378
|
};
|
|
5121
5379
|
const ordered = (value) => {
|
|
5122
5380
|
if (Array.isArray(value)) return value.map((entry) => ordered(entry));
|
|
5123
|
-
const record = recordFrom$
|
|
5381
|
+
const record = recordFrom$2(value);
|
|
5124
5382
|
if (record === null) return value;
|
|
5125
5383
|
return Object.fromEntries(Object.entries(record).toSorted(([left], [right]) => left.localeCompare(right)).map(([key, held]) => [key, ordered(held)]));
|
|
5126
5384
|
};
|
|
5127
5385
|
const digest = (value) => createHash("sha256").update(JSON.stringify(ordered(value))).digest("hex");
|
|
5128
5386
|
const kebab = (value) => value.replaceAll(/[A-Z]/gu, (letter) => `-${letter.toLowerCase()}`);
|
|
5129
5387
|
const fieldsFrom = (schemaValue, procedure, direction) => {
|
|
5130
|
-
const schema = recordFrom$
|
|
5131
|
-
const properties = recordFrom$
|
|
5388
|
+
const schema = recordFrom$2(schemaValue);
|
|
5389
|
+
const properties = recordFrom$2(schema?.["properties"]);
|
|
5132
5390
|
if (properties === null) return [];
|
|
5133
5391
|
const required = new Set(Array.isArray(schema?.["required"]) ? schema["required"] : []);
|
|
5134
5392
|
return Object.entries(properties).map(([name, property]) => {
|
|
5135
|
-
const detail = recordFrom$
|
|
5393
|
+
const detail = recordFrom$2(property);
|
|
5136
5394
|
const option = `--${kebab(name)}`;
|
|
5137
5395
|
const meaning = direction === "input" ? OPTION_DESCRIPTIONS[`${procedure} ${option}`] ?? OPTION_DESCRIPTIONS[option] : void 0;
|
|
5138
5396
|
return {
|
|
@@ -5143,18 +5401,24 @@ const fieldsFrom = (schemaValue, procedure, direction) => {
|
|
|
5143
5401
|
});
|
|
5144
5402
|
};
|
|
5145
5403
|
const summaryFor = (id, meta) => {
|
|
5146
|
-
const description = recordFrom$
|
|
5404
|
+
const description = recordFrom$2(meta)?.["description"];
|
|
5147
5405
|
return PROCEDURE_DESCRIPTIONS[id] ?? (typeof description === "string" && description !== "" ? description : `Run the ${id} product operation.`);
|
|
5148
5406
|
};
|
|
5149
5407
|
const nextFor = (id, operation) => {
|
|
5150
5408
|
const namespace = id.split(".", 1)[0] ?? id;
|
|
5151
5409
|
if (id.endsWith(".list")) return [`Choose an id from the result before another ${namespace} operation.`];
|
|
5410
|
+
if ([
|
|
5411
|
+
"canvas.apply",
|
|
5412
|
+
"canvas.edit",
|
|
5413
|
+
"canvas.writeHtml"
|
|
5414
|
+
].includes(id)) return ["Reuse the committed version for the next edit. Render the affected screen when the requested visual change is ready to review."];
|
|
5415
|
+
if (id === "canvas.render") return ["Inspect the returned image; read more structure only if the pixels reveal a discrepancy."];
|
|
5152
5416
|
if (operation === "mutation") return [`Read the affected ${namespace} resource to confirm the result.`];
|
|
5153
5417
|
return [`Use the returned identifiers and version in the next ${namespace} operation.`];
|
|
5154
5418
|
};
|
|
5155
5419
|
const guideFor = (input) => ({
|
|
5156
5420
|
summary: summaryFor(input.id, input.meta),
|
|
5157
|
-
useWhen: input.operation === "query" ? `Use when current ${input.id.split(".", 1)[0] ?? "product"} state is
|
|
5421
|
+
useWhen: input.operation === "query" ? `Use when current ${input.id.split(".", 1)[0] ?? "product"} state is missing from the task context.` : `Use when the requested change exactly matches ${input.id}; read the current state first when a version or identifier may have changed.`,
|
|
5158
5422
|
preconditions: [
|
|
5159
5423
|
"Authenticate as the accountable Enhance person.",
|
|
5160
5424
|
"Use only resource identifiers returned by an earlier capability result or supplied by the person.",
|
|
@@ -5166,7 +5430,7 @@ const guideFor = (input) => ({
|
|
|
5166
5430
|
recovery: [
|
|
5167
5431
|
"BAD_REQUEST: correct the named fields and call again.",
|
|
5168
5432
|
"UNAUTHORIZED: restore Enhance authentication, then retry once.",
|
|
5169
|
-
"FORBIDDEN or NOT_FOUND:
|
|
5433
|
+
"FORBIDDEN or NOT_FOUND: check the supplied resource and selection; do not substitute unrelated content. Ask for corrected access or scope if needed.",
|
|
5170
5434
|
"CONFLICT: read the current resource, merge the intended change, and retry with its version.",
|
|
5171
5435
|
"INTERNAL: run Enhance diagnostics, report the failure, and stop repeating the call."
|
|
5172
5436
|
],
|
|
@@ -5404,6 +5668,11 @@ const PROCEDURE_CAPABILITY_POLICIES = {
|
|
|
5404
5668
|
}
|
|
5405
5669
|
};
|
|
5406
5670
|
const UTILITY_CAPABILITY_POLICIES = {
|
|
5671
|
+
"canvas.edit": {
|
|
5672
|
+
exposure: "shared",
|
|
5673
|
+
reason: "Small scoped design edits share one atomic authoring path.",
|
|
5674
|
+
owner: "product"
|
|
5675
|
+
},
|
|
5407
5676
|
"canvas.apply": {
|
|
5408
5677
|
exposure: "shared",
|
|
5409
5678
|
reason: "Bounded canvas operation batches are a product authoring capability.",
|
|
@@ -8806,7 +9075,8 @@ const get = (handlers) => canvasReaderProcedure.input(getRecordingInputSchema).o
|
|
|
8806
9075
|
path: recordingAssetPath(entry.assetBundleId, entry.urlHash)
|
|
8807
9076
|
})),
|
|
8808
9077
|
sourceUrl: result.recording.sourceUrl,
|
|
8809
|
-
missingAssetCount: result.missingAssetCount
|
|
9078
|
+
missingAssetCount: result.missingAssetCount,
|
|
9079
|
+
missingAssetUrls: [...result.missingAssetUrls]
|
|
8810
9080
|
};
|
|
8811
9081
|
});
|
|
8812
9082
|
/**
|
|
@@ -9284,7 +9554,7 @@ const IMPORT_SOURCE_EXAMPLE = {
|
|
|
9284
9554
|
targetNodeId: "root"
|
|
9285
9555
|
}
|
|
9286
9556
|
};
|
|
9287
|
-
const recordFrom = (value, label) => {
|
|
9557
|
+
const recordFrom$1 = (value, label) => {
|
|
9288
9558
|
const parsed = jsonRecordSchema.safeParse(value);
|
|
9289
9559
|
if (!parsed.success) throw new TypeError(`${label} is not an object`);
|
|
9290
9560
|
return parsed.data;
|
|
@@ -9313,8 +9583,8 @@ const procedureSchemas = (definitions, id) => {
|
|
|
9313
9583
|
};
|
|
9314
9584
|
const createCapabilityCatalogAdapter = () => {
|
|
9315
9585
|
const router = createRouterShapeAdapter();
|
|
9316
|
-
const routerInternals = recordFrom(Reflect.get(router, "_def"), "router internals");
|
|
9317
|
-
const definitions = recordFrom(routerInternals["procedures"], "router procedures");
|
|
9586
|
+
const routerInternals = recordFrom$1(Reflect.get(router, "_def"), "router internals");
|
|
9587
|
+
const definitions = recordFrom$1(routerInternals["procedures"], "router procedures");
|
|
9318
9588
|
const parsedProcedures = parseRouter({ router });
|
|
9319
9589
|
const policy = createCapabilityPolicyAdapter();
|
|
9320
9590
|
policy.assertProcedureInventory(parsedProcedures.map(([id]) => id));
|
|
@@ -9383,33 +9653,53 @@ var ProcessExitError = class extends FailedToExitError {
|
|
|
9383
9653
|
|
|
9384
9654
|
//#endregion
|
|
9385
9655
|
//#region src/infrastructure/mcp-capability-discovery.adapter.ts
|
|
9386
|
-
const EXACT_ID_SCORE = 1e4;
|
|
9387
|
-
const ID_PREFIX_SCORE = 1e3;
|
|
9388
|
-
const ID_SEGMENT_SCORE = 100;
|
|
9389
|
-
const ID_SUBSTRING_SCORE = 40;
|
|
9390
|
-
const GUIDE_MATCH_SCORE = 10;
|
|
9391
9656
|
const NO_MATCH_SCORE = 0;
|
|
9392
|
-
const
|
|
9657
|
+
const EXACT_ID_SCORE = 1e5;
|
|
9658
|
+
const EXACT_ALIAS_SCORE = 9e4;
|
|
9659
|
+
const ALIAS_TERM_SCORE = 1100;
|
|
9660
|
+
const ID_TERM_SCORE = 1050;
|
|
9661
|
+
const PURPOSE_TERM_SCORE = 1e3;
|
|
9662
|
+
const CONTRACT_BUDGET_BYTES = 2e4;
|
|
9663
|
+
const STOP_WORDS = new Set("a an and are as at be before by can do for from how i in into is it me my of on or our the then this to use with".split(" "));
|
|
9664
|
+
const INTENT_ALIASES = {
|
|
9665
|
+
"canvas.writeHtml": [
|
|
9666
|
+
"design editable screen",
|
|
9667
|
+
"create screen",
|
|
9668
|
+
"new screen",
|
|
9669
|
+
"mockup",
|
|
9670
|
+
"html css",
|
|
9671
|
+
"build layout"
|
|
9672
|
+
],
|
|
9673
|
+
"canvas.edit": [
|
|
9674
|
+
"change selected text",
|
|
9675
|
+
"edit text",
|
|
9676
|
+
"change styles",
|
|
9677
|
+
"duplicate card",
|
|
9678
|
+
"move node",
|
|
9679
|
+
"rename layer",
|
|
9680
|
+
"update selected design"
|
|
9681
|
+
],
|
|
9682
|
+
"canvas.render": [
|
|
9683
|
+
"render canvas",
|
|
9684
|
+
"preview design",
|
|
9685
|
+
"inspect pixels",
|
|
9686
|
+
"screenshot design"
|
|
9687
|
+
]
|
|
9688
|
+
};
|
|
9689
|
+
const normalized = (value) => value.replaceAll(/([a-z])([A-Z])/gu, "$1 $2").toLocaleLowerCase("en-AU").replaceAll(/[^a-z0-9]+/gu, " ").trim();
|
|
9690
|
+
const termsFor = (value) => [...new Set(normalized(value).split(" ").filter((term) => term !== "" && !STOP_WORDS.has(term)))];
|
|
9393
9691
|
const scoreFor = (capability, offered) => {
|
|
9394
9692
|
const query = normalized(offered);
|
|
9395
|
-
|
|
9396
|
-
|
|
9397
|
-
|
|
9398
|
-
const
|
|
9399
|
-
|
|
9400
|
-
|
|
9401
|
-
|
|
9402
|
-
|
|
9403
|
-
|
|
9404
|
-
|
|
9405
|
-
].join(" "));
|
|
9406
|
-
const terms = query.split(" ").filter((term) => term !== "");
|
|
9407
|
-
let score = id.startsWith(query) ? ID_PREFIX_SCORE : NO_MATCH_SCORE;
|
|
9408
|
-
for (const term of terms) {
|
|
9409
|
-
if (idSegments.has(term)) score += ID_SEGMENT_SCORE;
|
|
9410
|
-
else if (id.includes(term)) score += ID_SUBSTRING_SCORE;
|
|
9411
|
-
if (guide.includes(term)) score += GUIDE_MATCH_SCORE;
|
|
9412
|
-
}
|
|
9693
|
+
if (query === normalized(capability.id)) return EXACT_ID_SCORE;
|
|
9694
|
+
const aliases = INTENT_ALIASES[capability.id] ?? [];
|
|
9695
|
+
if (aliases.some((alias) => normalized(alias) === query)) return EXACT_ALIAS_SCORE;
|
|
9696
|
+
const aliasTerms = new Set(aliases.flatMap((alias) => termsFor(alias)));
|
|
9697
|
+
const idTerms = new Set(termsFor(capability.id));
|
|
9698
|
+
const purposeTerms = new Set(termsFor(capability.guide.summary));
|
|
9699
|
+
let score = NO_MATCH_SCORE;
|
|
9700
|
+
for (const term of termsFor(offered)) if (aliasTerms.has(term)) score += ALIAS_TERM_SCORE;
|
|
9701
|
+
else if (idTerms.has(term)) score += ID_TERM_SCORE;
|
|
9702
|
+
else if (purposeTerms.has(term)) score += PURPOSE_TERM_SCORE;
|
|
9413
9703
|
return score;
|
|
9414
9704
|
};
|
|
9415
9705
|
const exampleFor = (capability) => {
|
|
@@ -9451,11 +9741,24 @@ const createMcpCapabilityDiscoveryAdapter = (catalog) => ({
|
|
|
9451
9741
|
const scoreDifference = right.score - left.score;
|
|
9452
9742
|
return scoreDifference === NO_MATCH_SCORE ? left.capability.id.localeCompare(right.capability.id) : scoreDifference;
|
|
9453
9743
|
});
|
|
9454
|
-
|
|
9744
|
+
const summary = {
|
|
9455
9745
|
matches: ranked.slice(0, input.limit).map(({ capability }) => toBrief(capability)),
|
|
9456
9746
|
totalMatches: ranked.length,
|
|
9457
9747
|
truncated: ranked.length > input.limit
|
|
9458
9748
|
};
|
|
9749
|
+
const best = ranked[0];
|
|
9750
|
+
if (best === void 0) return summary;
|
|
9751
|
+
const withContract = {
|
|
9752
|
+
...summary,
|
|
9753
|
+
bestContract: toContract(best.capability)
|
|
9754
|
+
};
|
|
9755
|
+
return Buffer$1.byteLength(JSON.stringify({
|
|
9756
|
+
ok: true,
|
|
9757
|
+
result: withContract
|
|
9758
|
+
}), "utf8") <= CONTRACT_BUDGET_BYTES ? withContract : {
|
|
9759
|
+
...summary,
|
|
9760
|
+
detailRequired: { capability: best.capability.id }
|
|
9761
|
+
};
|
|
9459
9762
|
},
|
|
9460
9763
|
describe: (id) => {
|
|
9461
9764
|
const capability = catalog.find((candidate) => candidate.id === id);
|
|
@@ -9541,6 +9844,125 @@ const toExitCode = (failure, isMalformed, error) => {
|
|
|
9541
9844
|
return 1;
|
|
9542
9845
|
};
|
|
9543
9846
|
|
|
9847
|
+
//#endregion
|
|
9848
|
+
//#region src/infrastructure/canvas-authoring-result.mapper.ts
|
|
9849
|
+
const MAX_RECEIPT_BYTES = 4096;
|
|
9850
|
+
const DETAIL_REFERENCE_ALLOWANCE = 512;
|
|
9851
|
+
const MAX_CONTINUATION_IDS = 20;
|
|
9852
|
+
const receiptSchema = z.object({
|
|
9853
|
+
canvasId: z.uuid(),
|
|
9854
|
+
mutationCommitted: z.literal(true),
|
|
9855
|
+
previousVersion: z.number().int().positive(),
|
|
9856
|
+
version: z.number().int().positive(),
|
|
9857
|
+
rootNodeId: z.string().max(200).optional(),
|
|
9858
|
+
mutationId: z.uuid().optional(),
|
|
9859
|
+
jobId: z.uuid().optional(),
|
|
9860
|
+
affected: z.object({
|
|
9861
|
+
inserted: z.number(),
|
|
9862
|
+
changed: z.number(),
|
|
9863
|
+
removed: z.number()
|
|
9864
|
+
}),
|
|
9865
|
+
affectedBounds: canvasSceneBoxSchema.nullable()
|
|
9866
|
+
});
|
|
9867
|
+
const canvasRenderResultSchema = z.object({
|
|
9868
|
+
jobId: z.uuid(),
|
|
9869
|
+
canvasId: z.uuid(),
|
|
9870
|
+
requestedVersion: z.number().nullable(),
|
|
9871
|
+
loadedVersion: z.number(),
|
|
9872
|
+
target: canvasRenderTargetSchema,
|
|
9873
|
+
sourceState: canvasRenderSourceStateEvidenceSchema.nullable(),
|
|
9874
|
+
bounds: canvasSceneBoxSchema,
|
|
9875
|
+
width: z.number(),
|
|
9876
|
+
height: z.number(),
|
|
9877
|
+
scale: z.number(),
|
|
9878
|
+
contentType: z.literal("image/png"),
|
|
9879
|
+
bytes: z.number(),
|
|
9880
|
+
warnings: z.array(canvasRenderWarningSchema),
|
|
9881
|
+
path: z.string().min(1),
|
|
9882
|
+
sensitive: z.literal(true),
|
|
9883
|
+
cleanup: z.enum(["unlink-after-use", "caller-owned"]),
|
|
9884
|
+
deleteAfter: z.string().optional()
|
|
9885
|
+
});
|
|
9886
|
+
const recordFrom = (value) => typeof value === "object" && value !== null && !Array.isArray(value) ? Object.fromEntries(Object.entries(value)) : null;
|
|
9887
|
+
const receiptFrom = (value) => {
|
|
9888
|
+
const receipt = receiptSchema.safeParse(value);
|
|
9889
|
+
if (receipt.success) return receipt.data;
|
|
9890
|
+
const applied = applyCanvasOperationsOutputSchema.safeParse(value);
|
|
9891
|
+
if (!applied.success) return null;
|
|
9892
|
+
return {
|
|
9893
|
+
canvasId: applied.data.canvasId,
|
|
9894
|
+
mutationCommitted: true,
|
|
9895
|
+
mutationId: applied.data.mutationId,
|
|
9896
|
+
previousVersion: applied.data.previousVersion,
|
|
9897
|
+
version: applied.data.version,
|
|
9898
|
+
affected: {
|
|
9899
|
+
inserted: applied.data.insertedNodeIds.length,
|
|
9900
|
+
changed: applied.data.changedNodeIds.length,
|
|
9901
|
+
removed: applied.data.removedNodeIds.length
|
|
9902
|
+
},
|
|
9903
|
+
affectedBounds: applied.data.affectedBounds
|
|
9904
|
+
};
|
|
9905
|
+
};
|
|
9906
|
+
const canFitReceipt = (value) => Buffer.byteLength(JSON.stringify(value)) <= MAX_RECEIPT_BYTES - DETAIL_REFERENCE_ALLOWANCE;
|
|
9907
|
+
const boundedEntries = (compact, key, entries) => {
|
|
9908
|
+
const kept = [];
|
|
9909
|
+
for (const entry of entries.slice(0, MAX_CONTINUATION_IDS)) {
|
|
9910
|
+
if (!canFitReceipt({
|
|
9911
|
+
...compact,
|
|
9912
|
+
[key]: [...kept, entry]
|
|
9913
|
+
})) break;
|
|
9914
|
+
kept.push(entry);
|
|
9915
|
+
}
|
|
9916
|
+
return kept;
|
|
9917
|
+
};
|
|
9918
|
+
const toCanvasAuthoringResult = (value) => {
|
|
9919
|
+
const original = recordFrom(value);
|
|
9920
|
+
if (original === null) return null;
|
|
9921
|
+
const receipt = receiptFrom(value);
|
|
9922
|
+
if (receipt === null) return null;
|
|
9923
|
+
const complete = {
|
|
9924
|
+
...original,
|
|
9925
|
+
...receipt
|
|
9926
|
+
};
|
|
9927
|
+
if (canFitReceipt(complete)) return {
|
|
9928
|
+
value: complete,
|
|
9929
|
+
detail: null
|
|
9930
|
+
};
|
|
9931
|
+
const compact = {
|
|
9932
|
+
...receipt,
|
|
9933
|
+
detailTruncated: true
|
|
9934
|
+
};
|
|
9935
|
+
for (const key of [
|
|
9936
|
+
"mode",
|
|
9937
|
+
"targetNodeId",
|
|
9938
|
+
"review"
|
|
9939
|
+
]) {
|
|
9940
|
+
const entry = original[key];
|
|
9941
|
+
if (entry !== void 0 && canFitReceipt({
|
|
9942
|
+
...compact,
|
|
9943
|
+
[key]: entry
|
|
9944
|
+
})) compact[key] = entry;
|
|
9945
|
+
}
|
|
9946
|
+
for (const key of [
|
|
9947
|
+
"insertedNodeIds",
|
|
9948
|
+
"changedNodeIds",
|
|
9949
|
+
"removedNodeIds",
|
|
9950
|
+
"createdNodes",
|
|
9951
|
+
"duplicatedNodes",
|
|
9952
|
+
"moves",
|
|
9953
|
+
"affectedParents"
|
|
9954
|
+
]) {
|
|
9955
|
+
const entries = original[key];
|
|
9956
|
+
if (!Array.isArray(entries)) continue;
|
|
9957
|
+
const kept = boundedEntries(compact, key, entries);
|
|
9958
|
+
if (kept.length > 0) compact[key] = kept;
|
|
9959
|
+
}
|
|
9960
|
+
return {
|
|
9961
|
+
value: compact,
|
|
9962
|
+
detail: complete
|
|
9963
|
+
};
|
|
9964
|
+
};
|
|
9965
|
+
|
|
9544
9966
|
//#endregion
|
|
9545
9967
|
//#region src/infrastructure/cli-output-identity.lib.ts
|
|
9546
9968
|
const commandReferencePattern = /(?<![-\w@])enhance(?=(?:-mcp)?(?:[^-\w]|$))/gu;
|
|
@@ -9568,4 +9990,4 @@ const withCommandInFailure = (value, commandName) => ({
|
|
|
9568
9990
|
});
|
|
9569
9991
|
|
|
9570
9992
|
//#endregion
|
|
9571
|
-
export {
|
|
9993
|
+
export { createOrganisationOutputSchema as $, parseCanvasReference as A, canvasSchema as At, PROTOTYPE_ARTIFACT_MANIFEST_PATH as B, transcriptReadCapabilityInputSchema as C, canvasAdditionalStyleSchema as Ct, assertCanvasReferenceOperations as D, canvasAxisStyleProperties as Dt, assertCanvasReferenceNodes as E, canvasAuthoredStyleDeclarations as Et, completeScreenOutputSchema as F, getPrototypePublishStatusOutputSchema as G, createPrototypeArtifactOutputSchema as H, createScreenOutputSchema as I, submitPrototypeArtifactOutputSchema as J, prototypeArtifactManifestSchema as K, appendRecordingChunkOutputSchema as L, CliError as M, transcriptOutputSchema as N, canvasReferenceNodeIds as O, canvasLayoutMainAxisOf as Ot, appErrorSchema as P, createAgentTokenOutputSchema as Q, completeRecordingOutputSchema as R, recordingSnapshotCapabilityInputSchema as S, canvasReadableSceneDocumentSchema as St, canvasEditsSchema as T, canvasAuthoredLayoutValueOf as Tt, foldPrototypeArtifactPath as U, attachPrototypeArtifactOutputSchema as V, getPrototypeArtifactCapabilitiesOutputSchema as W, MCP_AUTH_SCOPE as X, getMeOutputSchema as Y, cliAuthConfigurationSchema as Z, canvasApplyCapabilityInputSchema as _, canvasWorldBoundsSchema as _t, toExitCode as a, applyCanvasOperationsInputSchema as at, commentAttentionCapabilityInputSchema as b, downloadCanvasRenderOutputSchema as bt, toSharedCapabilities as c, canvasNodeStylePatchSchema as ct, createCapabilityCatalogAdapter as d, saveCanvasDocumentOutputSchema as dt, emptyFixtureDocument as et, createRouterShapeAdapter as f, createCanvasConversionOutputSchema as ft, PROCEDURE_DESCRIPTIONS as g, canvasRenderTargetSchema as gt, OPTION_DESCRIPTIONS as h, canvasRenderSourceStateSchema as ht, toCanvasAuthoringResult as i, MAX_CANVAS_OPERATIONS as it, PartialBatchError as j, fromCanvasReference as k, canvasLayoutPriorityDeclarations as kt, createMcpCapabilityDiscoveryAdapter as l, canvasLayoutWithoutCssProperties as lt, toCapabilityDefinition as m, RENDER_MIN_SCALE as mt, withCommandName as n, beginCanvasActivityOutputSchema as nt, toFailurePayload as o, applyCanvasOperationsOutputSchema as ot, createCapabilityPolicyAdapter as p, getCanvasConversionOutputSchema as pt, prototypeArtifactPathSchema as q, canvasRenderResultSchema as r, canvasAgentActivityPhaseSchema as rt, toPresentedCapabilities as s, canvasOperationSchema as st, withCommandInFailure as t, withFixtureScreen as tt, ProcessExitError as u, getCanvasDocumentOutputSchema as ut, canvasRenderCapabilityInputSchema as v, createCanvasRenderOutputSchema as vt, canvasEditCapabilityInputSchema as w, canvasTypographySchema as wt, prototypePublishCapabilityInputSchema as x, getCanvasRenderOutputSchema as xt, canvasWriteHtmlCapabilityInputSchema as y, createRecordingSnapshotOutputSchema as yt, startRecordingOutputSchema as z };
|