@pixerate/editor 0.269.0 → 0.269.2
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/agent/index.cjs +2 -2
- package/dist/agent/index.js +1 -1
- package/dist/{chunk-QCLY5SFS.js → chunk-IBXEQOGI.js} +4 -0
- package/dist/{chunk-ZGXJ7BTR.cjs → chunk-NRBGAEFI.cjs} +4 -0
- package/dist/tools/conformance.d.cts +13 -0
- package/dist/tools/conformance.d.ts +13 -0
- package/dist/tools/index.cjs +2 -2
- package/dist/tools/index.js +1 -1
- package/dist/vector/contract.d.cts +2 -1
- package/dist/vector/contract.d.ts +2 -1
- package/dist/vector/index.cjs +8 -4
- package/dist/vector/index.js +8 -4
- package/package.json +1 -1
- package/skills/pixerate-image-selection-masking/SKILL.md +8 -8
package/dist/agent/index.cjs
CHANGED
|
@@ -41,7 +41,7 @@ require('../chunk-QJVOJUTD.cjs');
|
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
var
|
|
44
|
+
var _chunkNRBGAEFIcjs = require('../chunk-NRBGAEFI.cjs');
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
|
|
@@ -2565,4 +2565,4 @@ function createReviewToolProvider(target, options) {
|
|
|
2565
2565
|
|
|
2566
2566
|
|
|
2567
2567
|
|
|
2568
|
-
exports.AgentPlayback = _chunk3SLBXKAWcjs.AgentPlayback; exports.CAPTURE_EXCLUDE_SELECTOR = _chunkSVFEVKLFcjs.CAPTURE_EXCLUDE_SELECTOR; exports.CAPTURE_OVERLAY_SELECTORS = _chunkSVFEVKLFcjs.CAPTURE_OVERLAY_SELECTORS; exports.CONFORMANCE_BINARY_MIN_LENGTH =
|
|
2568
|
+
exports.AgentPlayback = _chunk3SLBXKAWcjs.AgentPlayback; exports.CAPTURE_EXCLUDE_SELECTOR = _chunkSVFEVKLFcjs.CAPTURE_EXCLUDE_SELECTOR; exports.CAPTURE_OVERLAY_SELECTORS = _chunkSVFEVKLFcjs.CAPTURE_OVERLAY_SELECTORS; exports.CONFORMANCE_BINARY_MIN_LENGTH = _chunkNRBGAEFIcjs.CONFORMANCE_BINARY_MIN_LENGTH; exports.CONFORMANCE_NUMBER_TOLERANCE = _chunkNRBGAEFIcjs.CONFORMANCE_NUMBER_TOLERANCE; exports.ConformanceIds = _chunkNRBGAEFIcjs.ConformanceIds; exports.EDITOR_CANVAS_TOOLS = _chunkSVFEVKLFcjs.EDITOR_CANVAS_TOOLS; exports.EDITOR_MCP_TOOLS = _chunkSVFEVKLFcjs.EDITOR_MCP_TOOLS; exports.EDITOR_PROMPT_TOOLS = _chunkSVFEVKLFcjs.EDITOR_PROMPT_TOOLS; exports.EDIT_OPERATION_REQUIRED_ARGUMENTS = _chunkSVFEVKLFcjs.EDIT_OPERATION_REQUIRED_ARGUMENTS; exports.EXPORT_EXCLUDED_SELECTORS = _chunkSVFEVKLFcjs.EXPORT_EXCLUDED_SELECTORS; exports.JSON_RPC_ERRORS = _chunkZEKI6EPIcjs.JSON_RPC_ERRORS; exports.MCP_PROTOCOL_VERSIONS = _chunkZEKI6EPIcjs.MCP_PROTOCOL_VERSIONS; exports.MCP_TOOL_CANVAS_ADD_NODE = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_ADD_NODE; exports.MCP_TOOL_CANVAS_CONNECT = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_CONNECT; exports.MCP_TOOL_CANVAS_HIGHLIGHT = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_HIGHLIGHT; exports.MCP_TOOL_CANVAS_LAYOUT = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_LAYOUT; exports.MCP_TOOL_CANVAS_REMOVE_NODES = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_REMOVE_NODES; exports.MCP_TOOL_CANVAS_SELECT = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_SELECT; exports.MCP_TOOL_CANVAS_UPDATE_NODE = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_UPDATE_NODE; exports.MCP_TOOL_EDIT_CANVAS = _chunkSVFEVKLFcjs.MCP_TOOL_EDIT_CANVAS; exports.MCP_TOOL_EDIT_PROMPT = _chunkSVFEVKLFcjs.MCP_TOOL_EDIT_PROMPT; exports.MCP_TOOL_GET_EDITOR_STATE = _chunkSVFEVKLFcjs.MCP_TOOL_GET_EDITOR_STATE; exports.MCP_TOOL_PROMPT_INSERT_TEXT = _chunkSVFEVKLFcjs.MCP_TOOL_PROMPT_INSERT_TEXT; exports.MCP_TOOL_PROMPT_REPLACE_RANGE = _chunkSVFEVKLFcjs.MCP_TOOL_PROMPT_REPLACE_RANGE; exports.MCP_TOOL_PROMPT_SELECT = _chunkSVFEVKLFcjs.MCP_TOOL_PROMPT_SELECT; exports.MCP_TOOL_PROMPT_SET_VARIABLE = _chunkSVFEVKLFcjs.MCP_TOOL_PROMPT_SET_VARIABLE; exports.MCP_TOOL_VIEW_EDITOR = _chunkSVFEVKLFcjs.MCP_TOOL_VIEW_EDITOR; exports.PRESENCE_COLORS = _chunkK7ENM55Pcjs.PRESENCE_COLORS; exports.PerformanceQueue = _chunkK7ENM55Pcjs.PerformanceQueue; exports.PresenceStore = _chunkK7ENM55Pcjs.PresenceStore; exports.TOOL_BRIDGE_DEFAULT_PORT = _chunkZEKI6EPIcjs.TOOL_BRIDGE_DEFAULT_PORT; exports.TOOL_BRIDGE_PROTOCOL = _chunkZEKI6EPIcjs.TOOL_BRIDGE_PROTOCOL; exports.TOOL_DISCOVERY_TOOLS = _chunk7TD63DZPcjs.TOOL_DISCOVERY_TOOLS; exports.TOOL_NAMESPACE_SEPARATOR = _chunk7TD63DZPcjs.TOOL_NAMESPACE_SEPARATOR; exports.ToolRegistry = _chunk7TD63DZPcjs.ToolRegistry; exports.ToolRegistryError = _chunk7TD63DZPcjs.ToolRegistryError; exports.ToolRegistryView = _chunk7TD63DZPcjs.ToolRegistryView; exports.UNSAFE_JSON_KEYS = _chunk2BSBFBOAcjs.UNSAFE_JSON_KEYS; exports.baseToolName = _chunk7TD63DZPcjs.baseToolName; exports.callEvalTool = _chunkNRBGAEFIcjs.callEvalTool; exports.captureInputSchema = _chunkN2FGYZ4Qcjs.captureInputSchema; exports.captureOutputSize = _chunkN2FGYZ4Qcjs.captureOutputSize; exports.cloneElementWithStyles = _chunkSVFEVKLFcjs.cloneElementWithStyles; exports.conformanceResult = _chunkNRBGAEFIcjs.conformanceResult; exports.conformanceValuesMatch = _chunkNRBGAEFIcjs.conformanceValuesMatch; exports.connectToolBridge = _chunkZEKI6EPIcjs.connectToolBridge; exports.createAgentPlayback = _chunk3SLBXKAWcjs.createAgentPlayback; exports.createCanvasComponentToolProvider = createCanvasComponentToolProvider; exports.createCaptureTool = _chunkN2FGYZ4Qcjs.createCaptureTool; exports.createCaptureToolProvider = _chunkN2FGYZ4Qcjs.createCaptureToolProvider; exports.createDocumentChartTools = createDocumentChartTools; exports.createEditorMcpToolProvider = createEditorMcpToolProvider; exports.createElementCaptureSurface = _chunkSVFEVKLFcjs.createElementCaptureSurface; exports.createInstantPresenceClock = _chunkK7ENM55Pcjs.createInstantPresenceClock; exports.createMcpServer = _chunkZEKI6EPIcjs.createMcpServer; exports.createOriginMiddleware = _chunkNRBGAEFIcjs.createOriginMiddleware; exports.createPlaybackToolProvider = _chunk3SLBXKAWcjs.createPlaybackToolProvider; exports.createReviewToolProvider = createReviewToolProvider; exports.createRichTextToolProvider = createRichTextToolProvider; exports.createSpreadsheetToolProvider = createSpreadsheetToolProvider; exports.createStyleResolver = _chunkNRBGAEFIcjs.createStyleResolver; exports.createStyleToolProvider = _chunkNRBGAEFIcjs.createStyleToolProvider; exports.createToolRegistry = _chunk7TD63DZPcjs.createToolRegistry; exports.derivePlaybackSteps = _chunk3SLBXKAWcjs.derivePlaybackSteps; exports.elementToSvg = _chunkSVFEVKLFcjs.elementToSvg; exports.errorResult = _chunk7TD63DZPcjs.errorResult; exports.failedEvalChecks = _chunkNRBGAEFIcjs.failedEvalChecks; exports.imageEvalFixturePixels = _chunkNRBGAEFIcjs.imageEvalFixturePixels; exports.isUnsafeJsonKey = _chunk2BSBFBOAcjs.isUnsafeJsonKey; exports.listSkillEvals = _chunkNRBGAEFIcjs.listSkillEvals; exports.listSkills = _chunk7TD63DZPcjs.listSkills; exports.locatePlaybackChrome = _chunk3SLBXKAWcjs.locatePlaybackChrome; exports.matchesEvalExpectation = _chunkNRBGAEFIcjs.matchesEvalExpectation; exports.memoryStyleStore = _chunkNRBGAEFIcjs.memoryStyleStore; exports.normalizeConformanceValue = _chunkNRBGAEFIcjs.normalizeConformanceValue; exports.normalizeSide = normalizeSide; exports.omitConformancePaths = _chunkNRBGAEFIcjs.omitConformancePaths; exports.parseSkillFrontmatter = _chunk7TD63DZPcjs.parseSkillFrontmatter; exports.parseStyleDomains = _chunkNRBGAEFIcjs.parseStyleDomains; exports.planAgentCommand = planAgentCommand; exports.planCanvasPlaybackSteps = planCanvasPlaybackSteps; exports.planCanvasToolPlayback = planCanvasToolPlayback; exports.planToolCall = planToolCall; exports.playbackRectFromClient = _chunk3SLBXKAWcjs.playbackRectFromClient; exports.playbackRefsFromArgs = _chunk3SLBXKAWcjs.playbackRefsFromArgs; exports.playbackRefsFromResult = _chunk3SLBXKAWcjs.playbackRefsFromResult; exports.rasterizeElement = _chunkSVFEVKLFcjs.rasterizeElement; exports.readSkillFile = _chunk7TD63DZPcjs.readSkillFile; exports.readingTime = _chunk3SLBXKAWcjs.readingTime; exports.realPresenceClock = _chunkK7ENM55Pcjs.realPresenceClock; exports.renderStyle = _chunkNRBGAEFIcjs.renderStyle; exports.resolveCaptureRequest = _chunkN2FGYZ4Qcjs.resolveCaptureRequest; exports.resolveConformanceArguments = _chunkNRBGAEFIcjs.resolveConformanceArguments; exports.runConformanceScenario = _chunkNRBGAEFIcjs.runConformanceScenario; exports.runStyleChecks = _chunkNRBGAEFIcjs.runStyleChecks; exports.runToolScript = _chunkNRBGAEFIcjs.runToolScript; exports.searchTokens = _chunk7TD63DZPcjs.searchTokens; exports.searchTools = _chunk7TD63DZPcjs.searchTools; exports.stripPrototypeKeys = _chunk2BSBFBOAcjs.stripPrototypeKeys; exports.summarize = _chunk7TD63DZPcjs.summarize; exports.toCapturedImageData = _chunkN2FGYZ4Qcjs.toCapturedImageData; exports.toToolResult = _chunk7TD63DZPcjs.toToolResult; exports.toolCallToAgentCommand = toolCallToAgentCommand; exports.toolResultError = _chunkNRBGAEFIcjs.toolResultError; exports.toolResultValue = _chunkNRBGAEFIcjs.toolResultValue; exports.toolsetInstructions = _chunkZEKI6EPIcjs.toolsetInstructions; exports.toolsetName = _chunk7TD63DZPcjs.toolsetName; exports.trackPresenceDrag = _chunkK7ENM55Pcjs.trackPresenceDrag; exports.tweenPresenceCursor = _chunkK7ENM55Pcjs.tweenPresenceCursor; exports.unionCaptureRects = _chunkN2FGYZ4Qcjs.unionCaptureRects; exports.unionRects = _chunk3SLBXKAWcjs.unionRects; exports.unknownToolMessage = _chunk7TD63DZPcjs.unknownToolMessage; exports.validateAgentCommand = validateAgentCommand; exports.validateJsonSchema = _chunkWOFXZ3XUcjs.validateJsonSchema;
|
package/dist/agent/index.js
CHANGED
|
@@ -748,6 +748,10 @@ async function runConformanceScenario(scenario, host) {
|
|
|
748
748
|
const result = normalizeConformanceValue(value, ids, isId);
|
|
749
749
|
const output = { result: step.ignore ? omitConformancePaths(result, step.ignore) : result, isError };
|
|
750
750
|
if (step.document) output.document = normalizeConformanceValue(host.document(), ids, isId);
|
|
751
|
+
if (step.render) {
|
|
752
|
+
if (!host.render) throw new Error(`Step ${outputs.length + 1} (${step.tool}) asks for render data, which this host does not have.`);
|
|
753
|
+
output.render = normalizeConformanceValue(host.render(), ids, isId);
|
|
754
|
+
}
|
|
751
755
|
if (step.pixels) {
|
|
752
756
|
const image = host.pixels({ paper: typeof step.pixels === "object" ? step.pixels.paper : void 0 });
|
|
753
757
|
output.pixels = { width: image.width, height: image.height, data: new Uint8Array(image.data.buffer, image.data.byteOffset, image.data.byteLength) };
|
|
@@ -748,6 +748,10 @@ async function runConformanceScenario(scenario, host) {
|
|
|
748
748
|
const result = normalizeConformanceValue(value, ids, isId);
|
|
749
749
|
const output = { result: step.ignore ? omitConformancePaths(result, step.ignore) : result, isError };
|
|
750
750
|
if (step.document) output.document = normalizeConformanceValue(host.document(), ids, isId);
|
|
751
|
+
if (step.render) {
|
|
752
|
+
if (!host.render) throw new Error(`Step ${outputs.length + 1} (${step.tool}) asks for render data, which this host does not have.`);
|
|
753
|
+
output.render = normalizeConformanceValue(host.render(), ids, isId);
|
|
754
|
+
}
|
|
751
755
|
if (step.pixels) {
|
|
752
756
|
const image = host.pixels({ paper: typeof step.pixels === "object" ? step.pixels.paper : void 0 });
|
|
753
757
|
output.pixels = { width: image.width, height: image.height, data: new Uint8Array(image.data.buffer, image.data.byteOffset, image.data.byteLength) };
|
|
@@ -31,6 +31,11 @@ export interface ConformanceStep {
|
|
|
31
31
|
meanDelta?: number;
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
|
+
/**
|
|
35
|
+
* Also compare the render data after this call: what the canvases draw, for editors whose
|
|
36
|
+
* picture is data rather than pixels (the vector editor's scene). Normalized like a result.
|
|
37
|
+
*/
|
|
38
|
+
render?: boolean;
|
|
34
39
|
/**
|
|
35
40
|
* Parts of the result left out of the comparison because they describe this implementation
|
|
36
41
|
* rather than the contract (the wet engine's backend): JSON pointers like `/backend`, where a
|
|
@@ -45,6 +50,8 @@ export interface ConformanceExpectation {
|
|
|
45
50
|
result: unknown;
|
|
46
51
|
isError?: true;
|
|
47
52
|
document?: unknown;
|
|
53
|
+
/** The normalized render data (steps with `render: true`). */
|
|
54
|
+
render?: unknown;
|
|
48
55
|
pixels?: ConformancePixels;
|
|
49
56
|
}
|
|
50
57
|
/** A pixel snapshot: the PNG next to the scenario plus how close another implementation must be. */
|
|
@@ -82,6 +89,11 @@ export interface ConformanceHost {
|
|
|
82
89
|
height: number;
|
|
83
90
|
data: Uint8Array | Uint8ClampedArray;
|
|
84
91
|
};
|
|
92
|
+
/**
|
|
93
|
+
* What the canvases draw, as plain data (the vector editor's scene render data), for steps with
|
|
94
|
+
* `render: true`. Editors without render data leave it out.
|
|
95
|
+
*/
|
|
96
|
+
render?(): unknown;
|
|
85
97
|
/** Whether a string is an id this implementation generated in its own format (default: none). */
|
|
86
98
|
isGeneratedId?(value: string): boolean;
|
|
87
99
|
dispose?(): void;
|
|
@@ -91,6 +103,7 @@ export interface ConformanceStepOutput {
|
|
|
91
103
|
result: unknown;
|
|
92
104
|
isError: boolean;
|
|
93
105
|
document?: unknown;
|
|
106
|
+
render?: unknown;
|
|
94
107
|
pixels?: {
|
|
95
108
|
width: number;
|
|
96
109
|
height: number;
|
|
@@ -31,6 +31,11 @@ export interface ConformanceStep {
|
|
|
31
31
|
meanDelta?: number;
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
|
+
/**
|
|
35
|
+
* Also compare the render data after this call: what the canvases draw, for editors whose
|
|
36
|
+
* picture is data rather than pixels (the vector editor's scene). Normalized like a result.
|
|
37
|
+
*/
|
|
38
|
+
render?: boolean;
|
|
34
39
|
/**
|
|
35
40
|
* Parts of the result left out of the comparison because they describe this implementation
|
|
36
41
|
* rather than the contract (the wet engine's backend): JSON pointers like `/backend`, where a
|
|
@@ -45,6 +50,8 @@ export interface ConformanceExpectation {
|
|
|
45
50
|
result: unknown;
|
|
46
51
|
isError?: true;
|
|
47
52
|
document?: unknown;
|
|
53
|
+
/** The normalized render data (steps with `render: true`). */
|
|
54
|
+
render?: unknown;
|
|
48
55
|
pixels?: ConformancePixels;
|
|
49
56
|
}
|
|
50
57
|
/** A pixel snapshot: the PNG next to the scenario plus how close another implementation must be. */
|
|
@@ -82,6 +89,11 @@ export interface ConformanceHost {
|
|
|
82
89
|
height: number;
|
|
83
90
|
data: Uint8Array | Uint8ClampedArray;
|
|
84
91
|
};
|
|
92
|
+
/**
|
|
93
|
+
* What the canvases draw, as plain data (the vector editor's scene render data), for steps with
|
|
94
|
+
* `render: true`. Editors without render data leave it out.
|
|
95
|
+
*/
|
|
96
|
+
render?(): unknown;
|
|
85
97
|
/** Whether a string is an id this implementation generated in its own format (default: none). */
|
|
86
98
|
isGeneratedId?(value: string): boolean;
|
|
87
99
|
dispose?(): void;
|
|
@@ -91,6 +103,7 @@ export interface ConformanceStepOutput {
|
|
|
91
103
|
result: unknown;
|
|
92
104
|
isError: boolean;
|
|
93
105
|
document?: unknown;
|
|
106
|
+
render?: unknown;
|
|
94
107
|
pixels?: {
|
|
95
108
|
width: number;
|
|
96
109
|
height: number;
|
package/dist/tools/index.cjs
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _chunkNRBGAEFIcjs = require('../chunk-NRBGAEFI.cjs');
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
@@ -221,4 +221,4 @@ var _chunk2BSBFBOAcjs = require('../chunk-2BSBFBOA.cjs');
|
|
|
221
221
|
|
|
222
222
|
|
|
223
223
|
|
|
224
|
-
exports.AgentPlayback = _chunk3SLBXKAWcjs.AgentPlayback; exports.CAPTURE_EXCLUDE_SELECTOR = _chunkSVFEVKLFcjs.CAPTURE_EXCLUDE_SELECTOR; exports.CAPTURE_OVERLAY_SELECTORS = _chunkSVFEVKLFcjs.CAPTURE_OVERLAY_SELECTORS; exports.CONFORMANCE_BINARY_MIN_LENGTH =
|
|
224
|
+
exports.AgentPlayback = _chunk3SLBXKAWcjs.AgentPlayback; exports.CAPTURE_EXCLUDE_SELECTOR = _chunkSVFEVKLFcjs.CAPTURE_EXCLUDE_SELECTOR; exports.CAPTURE_OVERLAY_SELECTORS = _chunkSVFEVKLFcjs.CAPTURE_OVERLAY_SELECTORS; exports.CONFORMANCE_BINARY_MIN_LENGTH = _chunkNRBGAEFIcjs.CONFORMANCE_BINARY_MIN_LENGTH; exports.CONFORMANCE_NUMBER_TOLERANCE = _chunkNRBGAEFIcjs.CONFORMANCE_NUMBER_TOLERANCE; exports.ConformanceIds = _chunkNRBGAEFIcjs.ConformanceIds; exports.EDITOR_CANVAS_TOOLS = _chunkSVFEVKLFcjs.EDITOR_CANVAS_TOOLS; exports.EDITOR_MCP_TOOLS = _chunkSVFEVKLFcjs.EDITOR_MCP_TOOLS; exports.EDITOR_PROMPT_TOOLS = _chunkSVFEVKLFcjs.EDITOR_PROMPT_TOOLS; exports.EDIT_OPERATION_REQUIRED_ARGUMENTS = _chunkSVFEVKLFcjs.EDIT_OPERATION_REQUIRED_ARGUMENTS; exports.EXPORT_EXCLUDED_SELECTORS = _chunkSVFEVKLFcjs.EXPORT_EXCLUDED_SELECTORS; exports.JSON_RPC_ERRORS = _chunkZEKI6EPIcjs.JSON_RPC_ERRORS; exports.MCP_PROTOCOL_VERSIONS = _chunkZEKI6EPIcjs.MCP_PROTOCOL_VERSIONS; exports.MCP_TOOL_CANVAS_ADD_NODE = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_ADD_NODE; exports.MCP_TOOL_CANVAS_CONNECT = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_CONNECT; exports.MCP_TOOL_CANVAS_HIGHLIGHT = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_HIGHLIGHT; exports.MCP_TOOL_CANVAS_LAYOUT = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_LAYOUT; exports.MCP_TOOL_CANVAS_REMOVE_NODES = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_REMOVE_NODES; exports.MCP_TOOL_CANVAS_SELECT = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_SELECT; exports.MCP_TOOL_CANVAS_UPDATE_NODE = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_UPDATE_NODE; exports.MCP_TOOL_EDIT_CANVAS = _chunkSVFEVKLFcjs.MCP_TOOL_EDIT_CANVAS; exports.MCP_TOOL_EDIT_PROMPT = _chunkSVFEVKLFcjs.MCP_TOOL_EDIT_PROMPT; exports.MCP_TOOL_GET_EDITOR_STATE = _chunkSVFEVKLFcjs.MCP_TOOL_GET_EDITOR_STATE; exports.MCP_TOOL_PROMPT_INSERT_TEXT = _chunkSVFEVKLFcjs.MCP_TOOL_PROMPT_INSERT_TEXT; exports.MCP_TOOL_PROMPT_REPLACE_RANGE = _chunkSVFEVKLFcjs.MCP_TOOL_PROMPT_REPLACE_RANGE; exports.MCP_TOOL_PROMPT_SELECT = _chunkSVFEVKLFcjs.MCP_TOOL_PROMPT_SELECT; exports.MCP_TOOL_PROMPT_SET_VARIABLE = _chunkSVFEVKLFcjs.MCP_TOOL_PROMPT_SET_VARIABLE; exports.MCP_TOOL_VIEW_EDITOR = _chunkSVFEVKLFcjs.MCP_TOOL_VIEW_EDITOR; exports.PRESENCE_COLORS = _chunkK7ENM55Pcjs.PRESENCE_COLORS; exports.PerformanceQueue = _chunkK7ENM55Pcjs.PerformanceQueue; exports.PresenceStore = _chunkK7ENM55Pcjs.PresenceStore; exports.TOOL_BRIDGE_DEFAULT_PORT = _chunkZEKI6EPIcjs.TOOL_BRIDGE_DEFAULT_PORT; exports.TOOL_BRIDGE_PROTOCOL = _chunkZEKI6EPIcjs.TOOL_BRIDGE_PROTOCOL; exports.TOOL_DISCOVERY_TOOLS = _chunk7TD63DZPcjs.TOOL_DISCOVERY_TOOLS; exports.TOOL_NAMESPACE_SEPARATOR = _chunk7TD63DZPcjs.TOOL_NAMESPACE_SEPARATOR; exports.ToolRegistry = _chunk7TD63DZPcjs.ToolRegistry; exports.ToolRegistryError = _chunk7TD63DZPcjs.ToolRegistryError; exports.ToolRegistryView = _chunk7TD63DZPcjs.ToolRegistryView; exports.UNSAFE_JSON_KEYS = _chunk2BSBFBOAcjs.UNSAFE_JSON_KEYS; exports.baseToolName = _chunk7TD63DZPcjs.baseToolName; exports.callEvalTool = _chunkNRBGAEFIcjs.callEvalTool; exports.captureInputSchema = _chunkN2FGYZ4Qcjs.captureInputSchema; exports.captureOutputSize = _chunkN2FGYZ4Qcjs.captureOutputSize; exports.cloneElementWithStyles = _chunkSVFEVKLFcjs.cloneElementWithStyles; exports.conformanceResult = _chunkNRBGAEFIcjs.conformanceResult; exports.conformanceValuesMatch = _chunkNRBGAEFIcjs.conformanceValuesMatch; exports.connectToolBridge = _chunkZEKI6EPIcjs.connectToolBridge; exports.createAgentPlayback = _chunk3SLBXKAWcjs.createAgentPlayback; exports.createCaptureTool = _chunkN2FGYZ4Qcjs.createCaptureTool; exports.createCaptureToolProvider = _chunkN2FGYZ4Qcjs.createCaptureToolProvider; exports.createElementCaptureSurface = _chunkSVFEVKLFcjs.createElementCaptureSurface; exports.createInstantPresenceClock = _chunkK7ENM55Pcjs.createInstantPresenceClock; exports.createMcpServer = _chunkZEKI6EPIcjs.createMcpServer; exports.createOriginMiddleware = _chunkNRBGAEFIcjs.createOriginMiddleware; exports.createPlaybackToolProvider = _chunk3SLBXKAWcjs.createPlaybackToolProvider; exports.createStyleResolver = _chunkNRBGAEFIcjs.createStyleResolver; exports.createStyleToolProvider = _chunkNRBGAEFIcjs.createStyleToolProvider; exports.createToolRegistry = _chunk7TD63DZPcjs.createToolRegistry; exports.derivePlaybackSteps = _chunk3SLBXKAWcjs.derivePlaybackSteps; exports.elementToSvg = _chunkSVFEVKLFcjs.elementToSvg; exports.errorResult = _chunk7TD63DZPcjs.errorResult; exports.failedEvalChecks = _chunkNRBGAEFIcjs.failedEvalChecks; exports.imageEvalFixturePixels = _chunkNRBGAEFIcjs.imageEvalFixturePixels; exports.isUnsafeJsonKey = _chunk2BSBFBOAcjs.isUnsafeJsonKey; exports.listSkillEvals = _chunkNRBGAEFIcjs.listSkillEvals; exports.listSkills = _chunk7TD63DZPcjs.listSkills; exports.locatePlaybackChrome = _chunk3SLBXKAWcjs.locatePlaybackChrome; exports.matchesEvalExpectation = _chunkNRBGAEFIcjs.matchesEvalExpectation; exports.memoryStyleStore = _chunkNRBGAEFIcjs.memoryStyleStore; exports.normalizeConformanceValue = _chunkNRBGAEFIcjs.normalizeConformanceValue; exports.omitConformancePaths = _chunkNRBGAEFIcjs.omitConformancePaths; exports.parseSkillFrontmatter = _chunk7TD63DZPcjs.parseSkillFrontmatter; exports.parseStyleDomains = _chunkNRBGAEFIcjs.parseStyleDomains; exports.playbackRectFromClient = _chunk3SLBXKAWcjs.playbackRectFromClient; exports.playbackRefsFromArgs = _chunk3SLBXKAWcjs.playbackRefsFromArgs; exports.playbackRefsFromResult = _chunk3SLBXKAWcjs.playbackRefsFromResult; exports.rasterizeElement = _chunkSVFEVKLFcjs.rasterizeElement; exports.readSkillFile = _chunk7TD63DZPcjs.readSkillFile; exports.readingTime = _chunk3SLBXKAWcjs.readingTime; exports.realPresenceClock = _chunkK7ENM55Pcjs.realPresenceClock; exports.renderStyle = _chunkNRBGAEFIcjs.renderStyle; exports.resolveCaptureRequest = _chunkN2FGYZ4Qcjs.resolveCaptureRequest; exports.resolveConformanceArguments = _chunkNRBGAEFIcjs.resolveConformanceArguments; exports.runConformanceScenario = _chunkNRBGAEFIcjs.runConformanceScenario; exports.runStyleChecks = _chunkNRBGAEFIcjs.runStyleChecks; exports.runToolScript = _chunkNRBGAEFIcjs.runToolScript; exports.searchTokens = _chunk7TD63DZPcjs.searchTokens; exports.searchTools = _chunk7TD63DZPcjs.searchTools; exports.stripPrototypeKeys = _chunk2BSBFBOAcjs.stripPrototypeKeys; exports.summarize = _chunk7TD63DZPcjs.summarize; exports.toCapturedImageData = _chunkN2FGYZ4Qcjs.toCapturedImageData; exports.toToolResult = _chunk7TD63DZPcjs.toToolResult; exports.toolResultError = _chunkNRBGAEFIcjs.toolResultError; exports.toolResultValue = _chunkNRBGAEFIcjs.toolResultValue; exports.toolsetInstructions = _chunkZEKI6EPIcjs.toolsetInstructions; exports.toolsetName = _chunk7TD63DZPcjs.toolsetName; exports.trackPresenceDrag = _chunkK7ENM55Pcjs.trackPresenceDrag; exports.tweenPresenceCursor = _chunkK7ENM55Pcjs.tweenPresenceCursor; exports.unionCaptureRects = _chunkN2FGYZ4Qcjs.unionCaptureRects; exports.unionRects = _chunk3SLBXKAWcjs.unionRects; exports.unknownToolMessage = _chunk7TD63DZPcjs.unknownToolMessage; exports.validateJsonSchema = _chunkWOFXZ3XUcjs.validateJsonSchema;
|
package/dist/tools/index.js
CHANGED
|
@@ -41,7 +41,8 @@ export declare function vectorContracts(options: {
|
|
|
41
41
|
* A fresh vector editor for replaying a conformance scenario (`domains/vector/fixtures`): every
|
|
42
42
|
* vector tool provider in one registry that validates arguments, and the saved document. Node ids
|
|
43
43
|
* come from a counter (`n1`, `n2`, …), so they are part of the contract; text uses the metric
|
|
44
|
-
* shaper, the one every implementation can match. `
|
|
44
|
+
* shaper, the one every implementation can match. `render` is the scene the canvases draw
|
|
45
|
+
* (`getVectorSceneRenderData` with its defaults). `setup` is the scenario's artboard size
|
|
45
46
|
* (`{ width, height }`, default the editor's); `effects` is the effect provider the effect tools use.
|
|
46
47
|
*/
|
|
47
48
|
export declare function createVectorConformanceHost(setup: {
|
|
@@ -41,7 +41,8 @@ export declare function vectorContracts(options: {
|
|
|
41
41
|
* A fresh vector editor for replaying a conformance scenario (`domains/vector/fixtures`): every
|
|
42
42
|
* vector tool provider in one registry that validates arguments, and the saved document. Node ids
|
|
43
43
|
* come from a counter (`n1`, `n2`, …), so they are part of the contract; text uses the metric
|
|
44
|
-
* shaper, the one every implementation can match. `
|
|
44
|
+
* shaper, the one every implementation can match. `render` is the scene the canvases draw
|
|
45
|
+
* (`getVectorSceneRenderData` with its defaults). `setup` is the scenario's artboard size
|
|
45
46
|
* (`{ width, height }`, default the editor's); `effects` is the effect provider the effect tools use.
|
|
46
47
|
*/
|
|
47
48
|
export declare function createVectorConformanceHost(setup: {
|
package/dist/vector/index.cjs
CHANGED
|
@@ -18984,17 +18984,19 @@ function vectorContracts(options) {
|
|
|
18984
18984
|
const files = {
|
|
18985
18985
|
"document.schema.json": { $schema: "https://json-schema.org/draft/2020-12/schema", $id: "document.schema.json", ...VECTOR_DOCUMENT_JSON_SCHEMA },
|
|
18986
18986
|
"tools.json": { providers },
|
|
18987
|
-
// The commands agents run with run_command: `shortcut` is as written (`Mod` is ⌘ / Ctrl).
|
|
18987
|
+
// The commands agents run with run_command: `shortcut` is as written (`Mod` is ⌘ / Ctrl). A
|
|
18988
|
+
// command without `params` takes none (run_command refuses any); `undoable` and `readOnly`
|
|
18989
|
+
// are the spec's own flags (unset is false), as the registry reads them.
|
|
18988
18990
|
"commands.json": specs.map((s) => ({
|
|
18989
18991
|
id: s.id,
|
|
18990
18992
|
label: s.label,
|
|
18991
18993
|
...s.group ? { group: s.group } : {},
|
|
18992
18994
|
..._optionalChain([s, 'access', _783 => _783.keywords, 'optionalAccess', _784 => _784.length]) ? { keywords: s.keywords } : {},
|
|
18993
18995
|
...s.description ? { description: s.description } : {},
|
|
18994
|
-
|
|
18996
|
+
...s.params ? { params: s.params } : {},
|
|
18995
18997
|
...s.shortcut !== void 0 ? { shortcut: s.shortcut } : {},
|
|
18996
18998
|
...s.scope ? { scope: s.scope } : {},
|
|
18997
|
-
undoable: s.undoable
|
|
18999
|
+
undoable: !!s.undoable,
|
|
18998
19000
|
readOnly: !!s.readOnly,
|
|
18999
19001
|
...s.hidden ? { hidden: true } : {}
|
|
19000
19002
|
})),
|
|
@@ -19024,8 +19026,10 @@ function createVectorConformanceHost(setup, options) {
|
|
|
19024
19026
|
callTool: (name, args) => registry.callTool(name, args),
|
|
19025
19027
|
document: () => _chunkSJ2CPTQCcjs.toEditorDocumentFile.call(void 0, document),
|
|
19026
19028
|
pixels: () => {
|
|
19027
|
-
throw new Error("The vector editor has no pixels; compare its document, results and SVG export.");
|
|
19029
|
+
throw new Error("The vector editor has no pixels; compare its document, results, render data and SVG export.");
|
|
19028
19030
|
},
|
|
19031
|
+
// What the React and Svelte canvases draw, with the default options (no viewport culling).
|
|
19032
|
+
render: () => getVectorSceneRenderData(controller.getState()),
|
|
19029
19033
|
dispose: () => {
|
|
19030
19034
|
_optionalChain([document, 'access', _787 => _787.destroy, 'optionalCall', _788 => _788()]);
|
|
19031
19035
|
_chunk56RHCIJVcjs.setVectorTextShaper.call(void 0, shaper);
|
package/dist/vector/index.js
CHANGED
|
@@ -18984,17 +18984,19 @@ function vectorContracts(options) {
|
|
|
18984
18984
|
const files = {
|
|
18985
18985
|
"document.schema.json": { $schema: "https://json-schema.org/draft/2020-12/schema", $id: "document.schema.json", ...VECTOR_DOCUMENT_JSON_SCHEMA },
|
|
18986
18986
|
"tools.json": { providers },
|
|
18987
|
-
// The commands agents run with run_command: `shortcut` is as written (`Mod` is ⌘ / Ctrl).
|
|
18987
|
+
// The commands agents run with run_command: `shortcut` is as written (`Mod` is ⌘ / Ctrl). A
|
|
18988
|
+
// command without `params` takes none (run_command refuses any); `undoable` and `readOnly`
|
|
18989
|
+
// are the spec's own flags (unset is false), as the registry reads them.
|
|
18988
18990
|
"commands.json": specs.map((s) => ({
|
|
18989
18991
|
id: s.id,
|
|
18990
18992
|
label: s.label,
|
|
18991
18993
|
...s.group ? { group: s.group } : {},
|
|
18992
18994
|
...s.keywords?.length ? { keywords: s.keywords } : {},
|
|
18993
18995
|
...s.description ? { description: s.description } : {},
|
|
18994
|
-
|
|
18996
|
+
...s.params ? { params: s.params } : {},
|
|
18995
18997
|
...s.shortcut !== void 0 ? { shortcut: s.shortcut } : {},
|
|
18996
18998
|
...s.scope ? { scope: s.scope } : {},
|
|
18997
|
-
undoable: s.undoable
|
|
18999
|
+
undoable: !!s.undoable,
|
|
18998
19000
|
readOnly: !!s.readOnly,
|
|
18999
19001
|
...s.hidden ? { hidden: true } : {}
|
|
19000
19002
|
})),
|
|
@@ -19024,8 +19026,10 @@ function createVectorConformanceHost(setup, options) {
|
|
|
19024
19026
|
callTool: (name, args) => registry.callTool(name, args),
|
|
19025
19027
|
document: () => toEditorDocumentFile(document),
|
|
19026
19028
|
pixels: () => {
|
|
19027
|
-
throw new Error("The vector editor has no pixels; compare its document, results and SVG export.");
|
|
19029
|
+
throw new Error("The vector editor has no pixels; compare its document, results, render data and SVG export.");
|
|
19028
19030
|
},
|
|
19031
|
+
// What the React and Svelte canvases draw, with the default options (no viewport culling).
|
|
19032
|
+
render: () => getVectorSceneRenderData(controller.getState()),
|
|
19029
19033
|
dispose: () => {
|
|
19030
19034
|
document.destroy?.();
|
|
19031
19035
|
setVectorTextShaper(shaper);
|
package/package.json
CHANGED
|
@@ -36,6 +36,10 @@ This skill is the method. `pixerate-image-editor` has the full tool reference.
|
|
|
36
36
|
|
|
37
37
|
## Working method
|
|
38
38
|
|
|
39
|
+
Apply early: an unapplied selection changes nothing if the run stops. Once it's roughly right, do
|
|
40
|
+
step 5, then refine. For a layer mask, `load_selection_from_mask`, refine, then `add_layer_mask`
|
|
41
|
+
`from: "selection"` replaces it. Stop and report once step 7 passes.
|
|
42
|
+
|
|
39
43
|
1. **Choose the method by subject** (see the decision table).
|
|
40
44
|
**Check:** `get_selection` → `empty: false` and a plausible `percent` (for a person in a
|
|
41
45
|
portrait, typically 15–50 %). A wand or range above about 80 % has flooded: undo, then lower
|
|
@@ -216,14 +220,11 @@ This skill is the method. `pixerate-image-editor` has the full tool reference.
|
|
|
216
220
|
- `select_polygon`: the lasso, along a contour; with `snapToEdges`, the Magnetic Lasso
|
|
217
221
|
- `quick_select`: brush strokes that grow out to the region's edges
|
|
218
222
|
- `select_object`: the object in a box or under a point
|
|
219
|
-
- `select_focus_area`: what is in focus
|
|
220
|
-
- `select_sky`: the sky
|
|
223
|
+
- `select_focus_area`, `select_sky`: what is in focus; the sky
|
|
221
224
|
- `select_layer_transparency`: a layer's own pixels
|
|
222
225
|
- `grow_selection`, `select_similar`: add similar colour, connected or anywhere
|
|
223
|
-
- `reselect`: undo a deselect
|
|
224
226
|
- `save_selection`, `load_selection_from_channel`, `list_channels`, `set_channel_properties`, `duplicate_channel`, `delete_channel`: keep and manage selections as alpha channels
|
|
225
|
-
- `export_mask_image`: a
|
|
226
|
-
- `load_channel_from_image`: a mask image into a new channel
|
|
227
|
+
- `export_mask_image`, `load_channel_from_image`: a mask out to a greyscale PNG, and back into a channel
|
|
227
228
|
- `set_quick_mask`: paint the selection
|
|
228
229
|
- `fill_pixels`, `blur_stroke`: fill or soften the selection in Quick Mask mode
|
|
229
230
|
- `magic_wand`: similar colour from a seed
|
|
@@ -231,8 +232,7 @@ This skill is the method. `pixerate-image-editor` has the full tool reference.
|
|
|
231
232
|
- `select_subject`: a subject by description with a host model; without one, the most salient subject
|
|
232
233
|
- `load_selection_from_image`: AI or saved mattes
|
|
233
234
|
- `load_selection_from_mask`: a layer mask back to a selection
|
|
234
|
-
- `set_selection_display`:
|
|
235
|
-
- `set_mask_view`: a layer mask alone in grey or as a red overlay, to check it
|
|
235
|
+
- `set_selection_display`, `set_mask_view`: how a selection shows; a layer mask alone in grey or as a red overlay
|
|
236
236
|
- `add_vector_mask`, `set_vector_mask_path`, `set_vector_mask_properties`, `get_vector_mask`: sharp, editable path masks
|
|
237
237
|
- `rasterize_vector_mask`, `remove_vector_mask`: turn a vector mask into pixels, or drop it
|
|
238
238
|
- `selection_to_path`, `path_to_selection`: a selection's outline as Bézier paths, and a path back into a selection
|
|
@@ -252,5 +252,5 @@ This skill is the method. `pixerate-image-editor` has the full tool reference.
|
|
|
252
252
|
- `copy_pixels`, `cut_pixels`, `paste_pixels`: the editor clipboard
|
|
253
253
|
- `add_adjustment_layer`, `apply_effect`, `add_smart_filter`: masked by an active selection
|
|
254
254
|
- `paint_stroke`: paint on a mask with `channel: "mask"`
|
|
255
|
-
- `undo_image`: take back a step
|
|
255
|
+
- `undo_image`, `reselect`: take back a step or a deselect
|
|
256
256
|
- `set_layer_properties`, `add_effect_layer`: clipping
|