@pixerate/editor 0.243.0 → 0.245.0

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.
Files changed (113) hide show
  1. package/dist/agent/index.cjs +34 -32
  2. package/dist/agent/index.js +6 -4
  3. package/dist/animation-editor/index.cjs +61 -61
  4. package/dist/animation-editor/index.js +4 -4
  5. package/dist/{brushstrokeRender-274HGNZR.js → brushstrokeRender-4542T5HP.js} +2 -2
  6. package/dist/{brushstrokeRender-C7RJZPMC.cjs → brushstrokeRender-QA5WVIDT.cjs} +5 -5
  7. package/dist/canvas/changeFeed.d.cts +71 -0
  8. package/dist/canvas/changeFeed.d.ts +71 -0
  9. package/dist/canvas/index.cjs +490 -34
  10. package/dist/canvas/index.d.cts +3 -0
  11. package/dist/canvas/index.d.ts +3 -0
  12. package/dist/canvas/index.js +483 -27
  13. package/dist/canvas/proposal-tools.d.cts +21 -0
  14. package/dist/canvas/proposal-tools.d.ts +21 -0
  15. package/dist/canvas/proposals.d.cts +112 -0
  16. package/dist/canvas/proposals.d.ts +112 -0
  17. package/dist/chart/index.cjs +21 -21
  18. package/dist/chart/index.js +2 -2
  19. package/dist/{chunk-6L3WWIDW.js → chunk-4EQY4TZJ.js} +1 -1
  20. package/dist/{chunk-5FZS7J7C.cjs → chunk-4T47Z4J3.cjs} +18 -2
  21. package/dist/{chunk-4I76OCVD.cjs → chunk-5DLCOQOQ.cjs} +16 -1
  22. package/dist/{chunk-4ZHXLFXS.js → chunk-5RFENYO5.js} +1 -1
  23. package/dist/{chunk-SRXWDOUI.js → chunk-7YQNKSQ7.js} +1 -1
  24. package/dist/{chunk-WGN7AUKB.js → chunk-7YW7T5TJ.js} +1 -1
  25. package/dist/{chunk-X3ZINLIP.js → chunk-AU6MWQKZ.js} +1 -1
  26. package/dist/{chunk-OONFIFEU.cjs → chunk-BDIH4DYR.cjs} +23 -23
  27. package/dist/{chunk-AIS56JOO.js → chunk-BVRRIW7F.js} +1 -1
  28. package/dist/{chunk-KK2FWMA2.cjs → chunk-HZ547SGQ.cjs} +1 -1
  29. package/dist/{chunk-3WOZEBXZ.cjs → chunk-IZL5V5RK.cjs} +2 -2
  30. package/dist/{chunk-IXI5KATU.js → chunk-L5PB7EG3.js} +1 -1
  31. package/dist/{chunk-R2FVAKFH.cjs → chunk-M6JORA5Z.cjs} +86 -86
  32. package/dist/{chunk-RNSANXPT.js → chunk-NS62CQ2B.js} +112 -14
  33. package/dist/{chunk-UZU6DIZA.cjs → chunk-NUTMINJZ.cjs} +45 -45
  34. package/dist/{chunk-H4Z72Z4Z.js → chunk-OSTKS3YN.js} +1 -1
  35. package/dist/{chunk-HLBTRSQJ.js → chunk-P3NIPIKS.js} +263 -63
  36. package/dist/{chunk-7V7QMFTI.cjs → chunk-QOBCBGGI.cjs} +2 -2
  37. package/dist/{chunk-UV7OOZJQ.cjs → chunk-SD23XMVJ.cjs} +35 -35
  38. package/dist/{chunk-FQVVO5YA.js → chunk-SGPIVHJB.js} +1 -1
  39. package/dist/{chunk-HQZHOPNE.js → chunk-TBJEMELS.js} +18 -2
  40. package/dist/{chunk-QTMQ5TGA.js → chunk-UCYW4M66.js} +16 -1
  41. package/dist/{chunk-XFYLA3ZO.cjs → chunk-VMROIWLL.cjs} +290 -90
  42. package/dist/{chunk-W7GRGGBH.cjs → chunk-W7L4HUT2.cjs} +8 -8
  43. package/dist/{chunk-FJ2MSI43.cjs → chunk-WKPXOGZZ.cjs} +124 -26
  44. package/dist/{chunk-D2SGV525.cjs → chunk-XZNU4DUX.cjs} +2 -2
  45. package/dist/diagram/index.cjs +2 -2
  46. package/dist/diagram/index.js +1 -1
  47. package/dist/effects/index.cjs +4 -4
  48. package/dist/effects/index.js +2 -2
  49. package/dist/extensions/index.cjs +5 -5
  50. package/dist/extensions/index.js +4 -4
  51. package/dist/gradient/index.cjs +2 -2
  52. package/dist/gradient/index.js +1 -1
  53. package/dist/history/HistoryManager.d.cts +20 -1
  54. package/dist/history/HistoryManager.d.ts +20 -1
  55. package/dist/history/index.cjs +8 -2
  56. package/dist/history/index.js +8 -2
  57. package/dist/history/types.d.cts +31 -0
  58. package/dist/history/types.d.ts +31 -0
  59. package/dist/image-editor/index.cjs +785 -777
  60. package/dist/image-editor/index.js +13 -5
  61. package/dist/index.cjs +16 -10
  62. package/dist/index.js +11 -5
  63. package/dist/kernel-wasm-4KVONDAU.js +9 -0
  64. package/dist/kernel-wasm-TTYRBGAK.cjs +9 -0
  65. package/dist/paint/index.cjs +10 -2
  66. package/dist/paint/index.js +9 -1
  67. package/dist/paint/wet/film.d.cts +19 -1
  68. package/dist/paint/wet/film.d.ts +19 -1
  69. package/dist/paint/wet/gpu-kernels.d.cts +2 -2
  70. package/dist/paint/wet/gpu-kernels.d.ts +2 -2
  71. package/dist/paint/wet/kernel-wasm.d.cts +5 -5
  72. package/dist/paint/wet/kernel-wasm.d.ts +5 -5
  73. package/dist/paint/wet/kernel.d.cts +1 -1
  74. package/dist/paint/wet/kernel.d.ts +1 -1
  75. package/dist/paint/wet/medium.d.cts +3 -1
  76. package/dist/paint/wet/medium.d.ts +3 -1
  77. package/dist/paint/wet/model.d.cts +19 -4
  78. package/dist/paint/wet/model.d.ts +19 -4
  79. package/dist/paint/wet/world.d.cts +34 -8
  80. package/dist/paint/wet/world.d.ts +34 -8
  81. package/dist/paint-editor/backlight.d.cts +77 -0
  82. package/dist/paint-editor/backlight.d.ts +77 -0
  83. package/dist/paint-editor/controller.d.cts +11 -0
  84. package/dist/paint-editor/controller.d.ts +11 -0
  85. package/dist/paint-editor/index.cjs +685 -397
  86. package/dist/paint-editor/index.d.cts +1 -0
  87. package/dist/paint-editor/index.d.ts +1 -0
  88. package/dist/paint-editor/index.js +308 -20
  89. package/dist/paint-editor/paper.d.cts +7 -0
  90. package/dist/paint-editor/paper.d.ts +7 -0
  91. package/dist/paint-editor/wet.d.cts +9 -0
  92. package/dist/paint-editor/wet.d.ts +9 -0
  93. package/dist/parameters/index.cjs +2 -2
  94. package/dist/parameters/index.js +1 -1
  95. package/dist/tools/index.cjs +4 -2
  96. package/dist/tools/index.d.cts +1 -0
  97. package/dist/tools/index.d.ts +1 -0
  98. package/dist/tools/index.js +3 -1
  99. package/dist/tools/origin.d.cts +22 -0
  100. package/dist/tools/origin.d.ts +22 -0
  101. package/dist/vector/index.cjs +964 -964
  102. package/dist/vector/index.js +5 -5
  103. package/dist/video-editor/index.cjs +4 -4
  104. package/dist/video-editor/index.js +2 -2
  105. package/package.json +1 -1
  106. package/skills/pixerate-canvas/SKILL.md +25 -0
  107. package/skills/pixerate-paint-editor/SKILL.md +3 -3
  108. package/skills/pixerate-paint-editor/references/light-paint.md +30 -7
  109. package/skills/pixerate-paint-watercolour/SKILL.md +10 -1
  110. package/skills/pixerate-paint-watercolour/evals/glowing-wash.json +22 -0
  111. package/skills/pixerate-paint-watercolour/evals/stained-glass.json +16 -0
  112. package/dist/kernel-wasm-6FPOLVUZ.cjs +0 -9
  113. package/dist/kernel-wasm-WIMMJUF2.js +0 -9
@@ -84,6 +84,7 @@ export declare class WetStrokeDriver {
84
84
  private readonly paint;
85
85
  private readonly centre;
86
86
  private readonly depth;
87
+ private readonly lightBase;
87
88
  constructor(init: WetStrokeInit);
88
89
  private readonly sampler;
89
90
  private readonly sample;
@@ -143,6 +144,10 @@ export interface PaintWetHost {
143
144
  layerSurface(id: string): TiledSurface | null;
144
145
  /** Shows new pixels for wet layers (not an undo step); `rects` are where they changed. */
145
146
  updateSurfaces(surfaces: ReadonlyMap<string, TiledSurface>, rects: RasterRect[]): void;
147
+ /** The layer's light paint (one channel), or `null` without any. */
148
+ layerLight(id: string): TiledSurface | null;
149
+ /** Shows new light paint for wet layers (not an undo step); the next `updateSurfaces` redraws. */
150
+ updateLights(lights: ReadonlyMap<string, TiledSurface>): void;
146
151
  /** The paint dried while time passed (the editor records nothing, it just redraws). */
147
152
  changed(): void;
148
153
  }
@@ -259,6 +264,8 @@ export declare class PaintWetLayers {
259
264
  syncDisplays(maxTiles?: number): RasterRect[];
260
265
  /** Like `syncDisplays`, shading on the GPU when Engine B is active (all stale tiles at once). */
261
266
  syncDisplaysGpu(maxCpuTiles: number, lead?: boolean): Promise<RasterRect[]>;
267
+ /** Shows each wet layer's live light paint (the light under it with the wet light shaded in). */
268
+ private syncLights;
262
269
  /** Drops the wet layers whose paint has all dried (they become ordinary pixel layers). */
263
270
  private retireDry;
264
271
  /**
@@ -282,6 +289,8 @@ export declare class PaintWetLayers {
282
289
  layerId: string;
283
290
  bounds: RasterRect | null;
284
291
  }>;
292
+ /** The layer's light paint with all its wet paint dried (`null` without a wet layer or light), without changing anything. */
293
+ bakedLight(layerId: string): TiledSurface | null;
285
294
  /** The layer's pixels with all its wet paint dried (deterministic), without changing anything. */
286
295
  bakedSurface(layerId: string): TiledSurface | null;
287
296
  /** A snapshot of the world for undo (`null` when there is none). */
@@ -84,6 +84,7 @@ export declare class WetStrokeDriver {
84
84
  private readonly paint;
85
85
  private readonly centre;
86
86
  private readonly depth;
87
+ private readonly lightBase;
87
88
  constructor(init: WetStrokeInit);
88
89
  private readonly sampler;
89
90
  private readonly sample;
@@ -143,6 +144,10 @@ export interface PaintWetHost {
143
144
  layerSurface(id: string): TiledSurface | null;
144
145
  /** Shows new pixels for wet layers (not an undo step); `rects` are where they changed. */
145
146
  updateSurfaces(surfaces: ReadonlyMap<string, TiledSurface>, rects: RasterRect[]): void;
147
+ /** The layer's light paint (one channel), or `null` without any. */
148
+ layerLight(id: string): TiledSurface | null;
149
+ /** Shows new light paint for wet layers (not an undo step); the next `updateSurfaces` redraws. */
150
+ updateLights(lights: ReadonlyMap<string, TiledSurface>): void;
146
151
  /** The paint dried while time passed (the editor records nothing, it just redraws). */
147
152
  changed(): void;
148
153
  }
@@ -259,6 +264,8 @@ export declare class PaintWetLayers {
259
264
  syncDisplays(maxTiles?: number): RasterRect[];
260
265
  /** Like `syncDisplays`, shading on the GPU when Engine B is active (all stale tiles at once). */
261
266
  syncDisplaysGpu(maxCpuTiles: number, lead?: boolean): Promise<RasterRect[]>;
267
+ /** Shows each wet layer's live light paint (the light under it with the wet light shaded in). */
268
+ private syncLights;
262
269
  /** Drops the wet layers whose paint has all dried (they become ordinary pixel layers). */
263
270
  private retireDry;
264
271
  /**
@@ -282,6 +289,8 @@ export declare class PaintWetLayers {
282
289
  layerId: string;
283
290
  bounds: RasterRect | null;
284
291
  }>;
292
+ /** The layer's light paint with all its wet paint dried (`null` without a wet layer or light), without changing anything. */
293
+ bakedLight(layerId: string): TiledSurface | null;
285
294
  /** The layer's pixels with all its wet paint dried (deterministic), without changing anything. */
286
295
  bakedSurface(layerId: string): TiledSurface | null;
287
296
  /** A snapshot of the world for undo (`null` when there is none). */
@@ -4,7 +4,7 @@ var _chunkSJ2CPTQCcjs = require('../chunk-SJ2CPTQC.cjs');
4
4
  require('../chunk-2BSBFBOA.cjs');
5
5
 
6
6
 
7
- var _chunkFJ2MSI43cjs = require('../chunk-FJ2MSI43.cjs');
7
+ var _chunkWKPXOGZZcjs = require('../chunk-WKPXOGZZ.cjs');
8
8
 
9
9
 
10
10
  var _chunkDWJJI6RTcjs = require('../chunk-DWJJI6RT.cjs');
@@ -461,7 +461,7 @@ var ParametersController = (_class = class {
461
461
  __init12() {this.applying = false}
462
462
 
463
463
  constructor(options) {;_class.prototype.__init.call(this);_class.prototype.__init2.call(this);_class.prototype.__init3.call(this);_class.prototype.__init4.call(this);_class.prototype.__init5.call(this);_class.prototype.__init6.call(this);_class.prototype.__init7.call(this);_class.prototype.__init8.call(this);_class.prototype.__init9.call(this);_class.prototype.__init10.call(this);_class.prototype.__init11.call(this);_class.prototype.__init12.call(this);_class.prototype.__init13.call(this);_class.prototype.__init14.call(this);
464
- this.history = _nullishCoalesce(options.history, () => ( new (0, _chunkFJ2MSI43cjs.HistoryManager)()));
464
+ this.history = _nullishCoalesce(options.history, () => ( new (0, _chunkWKPXOGZZcjs.HistoryManager)()));
465
465
  this.schema = options.schema;
466
466
  this.userPresets = (_nullishCoalesce(options.presets, () => ( []))).map((p) => ({ ...p, values: { ...p.values }, builtIn: false }));
467
467
  this.time = _nullishCoalesce(options.time, () => ( 0));
@@ -4,7 +4,7 @@ import {
4
4
  import "../chunk-HF5QZS7Z.js";
5
5
  import {
6
6
  HistoryManager
7
- } from "../chunk-RNSANXPT.js";
7
+ } from "../chunk-NS62CQ2B.js";
8
8
  import {
9
9
  evaluateEasing
10
10
  } from "../chunk-5UJHB3BW.js";
@@ -13,7 +13,8 @@
13
13
 
14
14
 
15
15
 
16
- var _chunk4I76OCVDcjs = require('../chunk-4I76OCVD.cjs');
16
+
17
+ var _chunk5DLCOQOQcjs = require('../chunk-5DLCOQOQ.cjs');
17
18
 
18
19
 
19
20
 
@@ -199,4 +200,5 @@ var _chunk2BSBFBOAcjs = require('../chunk-2BSBFBOA.cjs');
199
200
 
200
201
 
201
202
 
202
- exports.AgentPlayback = _chunk3SLBXKAWcjs.AgentPlayback; exports.CAPTURE_EXCLUDE_SELECTOR = _chunkSVFEVKLFcjs.CAPTURE_EXCLUDE_SELECTOR; exports.CAPTURE_OVERLAY_SELECTORS = _chunkSVFEVKLFcjs.CAPTURE_OVERLAY_SELECTORS; 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 = _chunkRTPBM46Fcjs.JSON_RPC_ERRORS; exports.MCP_PROTOCOL_VERSIONS = _chunkRTPBM46Fcjs.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 = _chunkRTPBM46Fcjs.TOOL_BRIDGE_DEFAULT_PORT; exports.TOOL_BRIDGE_PROTOCOL = _chunkRTPBM46Fcjs.TOOL_BRIDGE_PROTOCOL; exports.TOOL_DISCOVERY_TOOLS = _chunkRTPBM46Fcjs.TOOL_DISCOVERY_TOOLS; exports.TOOL_NAMESPACE_SEPARATOR = _chunkRTPBM46Fcjs.TOOL_NAMESPACE_SEPARATOR; exports.ToolRegistry = _chunkRTPBM46Fcjs.ToolRegistry; exports.ToolRegistryError = _chunkRTPBM46Fcjs.ToolRegistryError; exports.ToolRegistryView = _chunkRTPBM46Fcjs.ToolRegistryView; exports.UNSAFE_JSON_KEYS = _chunk2BSBFBOAcjs.UNSAFE_JSON_KEYS; exports.baseToolName = _chunkRTPBM46Fcjs.baseToolName; exports.callEvalTool = _chunk4I76OCVDcjs.callEvalTool; exports.captureInputSchema = _chunkN2FGYZ4Qcjs.captureInputSchema; exports.captureOutputSize = _chunkN2FGYZ4Qcjs.captureOutputSize; exports.cloneElementWithStyles = _chunkSVFEVKLFcjs.cloneElementWithStyles; exports.connectToolBridge = _chunkRTPBM46Fcjs.connectToolBridge; exports.createAgentPlayback = _chunk3SLBXKAWcjs.createAgentPlayback; exports.createCaptureTool = _chunkN2FGYZ4Qcjs.createCaptureTool; exports.createCaptureToolProvider = _chunkN2FGYZ4Qcjs.createCaptureToolProvider; exports.createElementCaptureSurface = _chunkSVFEVKLFcjs.createElementCaptureSurface; exports.createInstantPresenceClock = _chunkK7ENM55Pcjs.createInstantPresenceClock; exports.createMcpServer = _chunkRTPBM46Fcjs.createMcpServer; exports.createPlaybackToolProvider = _chunk3SLBXKAWcjs.createPlaybackToolProvider; exports.createStyleResolver = _chunk4I76OCVDcjs.createStyleResolver; exports.createStyleToolProvider = _chunk4I76OCVDcjs.createStyleToolProvider; exports.createToolRegistry = _chunkRTPBM46Fcjs.createToolRegistry; exports.derivePlaybackSteps = _chunk3SLBXKAWcjs.derivePlaybackSteps; exports.elementToSvg = _chunkSVFEVKLFcjs.elementToSvg; exports.errorResult = _chunkRTPBM46Fcjs.errorResult; exports.failedEvalChecks = _chunk4I76OCVDcjs.failedEvalChecks; exports.imageEvalFixturePixels = _chunk4I76OCVDcjs.imageEvalFixturePixels; exports.isUnsafeJsonKey = _chunk2BSBFBOAcjs.isUnsafeJsonKey; exports.listSkillEvals = _chunk4I76OCVDcjs.listSkillEvals; exports.listSkills = _chunkRTPBM46Fcjs.listSkills; exports.locatePlaybackChrome = _chunk3SLBXKAWcjs.locatePlaybackChrome; exports.matchesEvalExpectation = _chunk4I76OCVDcjs.matchesEvalExpectation; exports.memoryStyleStore = _chunk4I76OCVDcjs.memoryStyleStore; exports.parseSkillFrontmatter = _chunkRTPBM46Fcjs.parseSkillFrontmatter; exports.parseStyleDomains = _chunk4I76OCVDcjs.parseStyleDomains; exports.playbackRectFromClient = _chunk3SLBXKAWcjs.playbackRectFromClient; exports.playbackRefsFromArgs = _chunk3SLBXKAWcjs.playbackRefsFromArgs; exports.playbackRefsFromResult = _chunk3SLBXKAWcjs.playbackRefsFromResult; exports.rasterizeElement = _chunkSVFEVKLFcjs.rasterizeElement; exports.readSkillFile = _chunkRTPBM46Fcjs.readSkillFile; exports.readingTime = _chunk3SLBXKAWcjs.readingTime; exports.realPresenceClock = _chunkK7ENM55Pcjs.realPresenceClock; exports.renderStyle = _chunk4I76OCVDcjs.renderStyle; exports.resolveCaptureRequest = _chunkN2FGYZ4Qcjs.resolveCaptureRequest; exports.runStyleChecks = _chunk4I76OCVDcjs.runStyleChecks; exports.runToolScript = _chunk4I76OCVDcjs.runToolScript; exports.searchTokens = _chunkRTPBM46Fcjs.searchTokens; exports.searchTools = _chunkRTPBM46Fcjs.searchTools; exports.stripPrototypeKeys = _chunk2BSBFBOAcjs.stripPrototypeKeys; exports.summarize = _chunkRTPBM46Fcjs.summarize; exports.toCapturedImageData = _chunkN2FGYZ4Qcjs.toCapturedImageData; exports.toToolResult = _chunkRTPBM46Fcjs.toToolResult; exports.toolResultError = _chunk4I76OCVDcjs.toolResultError; exports.toolResultValue = _chunk4I76OCVDcjs.toolResultValue; exports.toolsetInstructions = _chunkRTPBM46Fcjs.toolsetInstructions; exports.toolsetName = _chunkRTPBM46Fcjs.toolsetName; exports.trackPresenceDrag = _chunkK7ENM55Pcjs.trackPresenceDrag; exports.tweenPresenceCursor = _chunkK7ENM55Pcjs.tweenPresenceCursor; exports.unionCaptureRects = _chunkN2FGYZ4Qcjs.unionCaptureRects; exports.unionRects = _chunk3SLBXKAWcjs.unionRects; exports.unknownToolMessage = _chunkRTPBM46Fcjs.unknownToolMessage; exports.validateJsonSchema = _chunkWOFXZ3XUcjs.validateJsonSchema;
203
+
204
+ exports.AgentPlayback = _chunk3SLBXKAWcjs.AgentPlayback; exports.CAPTURE_EXCLUDE_SELECTOR = _chunkSVFEVKLFcjs.CAPTURE_EXCLUDE_SELECTOR; exports.CAPTURE_OVERLAY_SELECTORS = _chunkSVFEVKLFcjs.CAPTURE_OVERLAY_SELECTORS; 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 = _chunkRTPBM46Fcjs.JSON_RPC_ERRORS; exports.MCP_PROTOCOL_VERSIONS = _chunkRTPBM46Fcjs.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 = _chunkRTPBM46Fcjs.TOOL_BRIDGE_DEFAULT_PORT; exports.TOOL_BRIDGE_PROTOCOL = _chunkRTPBM46Fcjs.TOOL_BRIDGE_PROTOCOL; exports.TOOL_DISCOVERY_TOOLS = _chunkRTPBM46Fcjs.TOOL_DISCOVERY_TOOLS; exports.TOOL_NAMESPACE_SEPARATOR = _chunkRTPBM46Fcjs.TOOL_NAMESPACE_SEPARATOR; exports.ToolRegistry = _chunkRTPBM46Fcjs.ToolRegistry; exports.ToolRegistryError = _chunkRTPBM46Fcjs.ToolRegistryError; exports.ToolRegistryView = _chunkRTPBM46Fcjs.ToolRegistryView; exports.UNSAFE_JSON_KEYS = _chunk2BSBFBOAcjs.UNSAFE_JSON_KEYS; exports.baseToolName = _chunkRTPBM46Fcjs.baseToolName; exports.callEvalTool = _chunk5DLCOQOQcjs.callEvalTool; exports.captureInputSchema = _chunkN2FGYZ4Qcjs.captureInputSchema; exports.captureOutputSize = _chunkN2FGYZ4Qcjs.captureOutputSize; exports.cloneElementWithStyles = _chunkSVFEVKLFcjs.cloneElementWithStyles; exports.connectToolBridge = _chunkRTPBM46Fcjs.connectToolBridge; exports.createAgentPlayback = _chunk3SLBXKAWcjs.createAgentPlayback; exports.createCaptureTool = _chunkN2FGYZ4Qcjs.createCaptureTool; exports.createCaptureToolProvider = _chunkN2FGYZ4Qcjs.createCaptureToolProvider; exports.createElementCaptureSurface = _chunkSVFEVKLFcjs.createElementCaptureSurface; exports.createInstantPresenceClock = _chunkK7ENM55Pcjs.createInstantPresenceClock; exports.createMcpServer = _chunkRTPBM46Fcjs.createMcpServer; exports.createOriginMiddleware = _chunk5DLCOQOQcjs.createOriginMiddleware; exports.createPlaybackToolProvider = _chunk3SLBXKAWcjs.createPlaybackToolProvider; exports.createStyleResolver = _chunk5DLCOQOQcjs.createStyleResolver; exports.createStyleToolProvider = _chunk5DLCOQOQcjs.createStyleToolProvider; exports.createToolRegistry = _chunkRTPBM46Fcjs.createToolRegistry; exports.derivePlaybackSteps = _chunk3SLBXKAWcjs.derivePlaybackSteps; exports.elementToSvg = _chunkSVFEVKLFcjs.elementToSvg; exports.errorResult = _chunkRTPBM46Fcjs.errorResult; exports.failedEvalChecks = _chunk5DLCOQOQcjs.failedEvalChecks; exports.imageEvalFixturePixels = _chunk5DLCOQOQcjs.imageEvalFixturePixels; exports.isUnsafeJsonKey = _chunk2BSBFBOAcjs.isUnsafeJsonKey; exports.listSkillEvals = _chunk5DLCOQOQcjs.listSkillEvals; exports.listSkills = _chunkRTPBM46Fcjs.listSkills; exports.locatePlaybackChrome = _chunk3SLBXKAWcjs.locatePlaybackChrome; exports.matchesEvalExpectation = _chunk5DLCOQOQcjs.matchesEvalExpectation; exports.memoryStyleStore = _chunk5DLCOQOQcjs.memoryStyleStore; exports.parseSkillFrontmatter = _chunkRTPBM46Fcjs.parseSkillFrontmatter; exports.parseStyleDomains = _chunk5DLCOQOQcjs.parseStyleDomains; exports.playbackRectFromClient = _chunk3SLBXKAWcjs.playbackRectFromClient; exports.playbackRefsFromArgs = _chunk3SLBXKAWcjs.playbackRefsFromArgs; exports.playbackRefsFromResult = _chunk3SLBXKAWcjs.playbackRefsFromResult; exports.rasterizeElement = _chunkSVFEVKLFcjs.rasterizeElement; exports.readSkillFile = _chunkRTPBM46Fcjs.readSkillFile; exports.readingTime = _chunk3SLBXKAWcjs.readingTime; exports.realPresenceClock = _chunkK7ENM55Pcjs.realPresenceClock; exports.renderStyle = _chunk5DLCOQOQcjs.renderStyle; exports.resolveCaptureRequest = _chunkN2FGYZ4Qcjs.resolveCaptureRequest; exports.runStyleChecks = _chunk5DLCOQOQcjs.runStyleChecks; exports.runToolScript = _chunk5DLCOQOQcjs.runToolScript; exports.searchTokens = _chunkRTPBM46Fcjs.searchTokens; exports.searchTools = _chunkRTPBM46Fcjs.searchTools; exports.stripPrototypeKeys = _chunk2BSBFBOAcjs.stripPrototypeKeys; exports.summarize = _chunkRTPBM46Fcjs.summarize; exports.toCapturedImageData = _chunkN2FGYZ4Qcjs.toCapturedImageData; exports.toToolResult = _chunkRTPBM46Fcjs.toToolResult; exports.toolResultError = _chunk5DLCOQOQcjs.toolResultError; exports.toolResultValue = _chunk5DLCOQOQcjs.toolResultValue; exports.toolsetInstructions = _chunkRTPBM46Fcjs.toolsetInstructions; exports.toolsetName = _chunkRTPBM46Fcjs.toolsetName; exports.trackPresenceDrag = _chunkK7ENM55Pcjs.trackPresenceDrag; exports.tweenPresenceCursor = _chunkK7ENM55Pcjs.tweenPresenceCursor; exports.unionCaptureRects = _chunkN2FGYZ4Qcjs.unionCaptureRects; exports.unionRects = _chunk3SLBXKAWcjs.unionRects; exports.unknownToolMessage = _chunkRTPBM46Fcjs.unknownToolMessage; exports.validateJsonSchema = _chunkWOFXZ3XUcjs.validateJsonSchema;
@@ -24,3 +24,4 @@ export * from './playback.cjs';
24
24
  export * from './script.cjs';
25
25
  export * from './style.cjs';
26
26
  export * from './style-tools.cjs';
27
+ export * from './origin.cjs';
@@ -24,3 +24,4 @@ export * from './playback.js';
24
24
  export * from './script.js';
25
25
  export * from './style.js';
26
26
  export * from './style-tools.js';
27
+ export * from './origin.js';
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  callEvalTool,
3
+ createOriginMiddleware,
3
4
  createStyleResolver,
4
5
  createStyleToolProvider,
5
6
  failedEvalChecks,
@@ -13,7 +14,7 @@ import {
13
14
  runToolScript,
14
15
  toolResultError,
15
16
  toolResultValue
16
- } from "../chunk-QTMQ5TGA.js";
17
+ } from "../chunk-UCYW4M66.js";
17
18
  import {
18
19
  JSON_RPC_ERRORS,
19
20
  MCP_PROTOCOL_VERSIONS,
@@ -155,6 +156,7 @@ export {
155
156
  createElementCaptureSurface,
156
157
  createInstantPresenceClock,
157
158
  createMcpServer,
159
+ createOriginMiddleware,
158
160
  createPlaybackToolProvider,
159
161
  createStyleResolver,
160
162
  createStyleToolProvider,
@@ -0,0 +1,22 @@
1
+ import type { ToolMiddleware, ToolMiddlewareCall } from './registry.cjs';
2
+ /** What the origin middleware needs of a history (`HistoryManager` satisfies it). */
3
+ export interface OriginHistoryTarget {
4
+ withOrigin<T>(origin: string, fn: () => T): T;
5
+ }
6
+ export interface OriginMiddlewareOptions {
7
+ /**
8
+ * The histories a call's changes land in: one, several, or a function of the call (e.g. by
9
+ * `call.provider.id`) returning them or nothing to leave the call alone.
10
+ */
11
+ histories: OriginHistoryTarget | readonly OriginHistoryTarget[] | ((call: ToolMiddlewareCall) => OriginHistoryTarget | readonly OriginHistoryTarget[] | undefined);
12
+ /** Origin for calls that name no actor (default `agent:anonymous`). */
13
+ fallbackOrigin?: string;
14
+ }
15
+ /**
16
+ * A `ToolRegistry` middleware that records the changes a tool call makes as the calling agent's
17
+ * (`agent:<actor.id>`), so history steps, change feeds and proposals can tell them from the user's.
18
+ * Read-only tools pass straight through. Add it after agent playback (`registry.use` order), so
19
+ * it wraps only the handler and not the time a call waits in an actor's queue: while a handler
20
+ * runs, other changes recorded on the same history are stamped with the agent's origin too.
21
+ */
22
+ export declare function createOriginMiddleware(options: OriginMiddlewareOptions): ToolMiddleware;
@@ -0,0 +1,22 @@
1
+ import type { ToolMiddleware, ToolMiddlewareCall } from './registry.js';
2
+ /** What the origin middleware needs of a history (`HistoryManager` satisfies it). */
3
+ export interface OriginHistoryTarget {
4
+ withOrigin<T>(origin: string, fn: () => T): T;
5
+ }
6
+ export interface OriginMiddlewareOptions {
7
+ /**
8
+ * The histories a call's changes land in: one, several, or a function of the call (e.g. by
9
+ * `call.provider.id`) returning them or nothing to leave the call alone.
10
+ */
11
+ histories: OriginHistoryTarget | readonly OriginHistoryTarget[] | ((call: ToolMiddlewareCall) => OriginHistoryTarget | readonly OriginHistoryTarget[] | undefined);
12
+ /** Origin for calls that name no actor (default `agent:anonymous`). */
13
+ fallbackOrigin?: string;
14
+ }
15
+ /**
16
+ * A `ToolRegistry` middleware that records the changes a tool call makes as the calling agent's
17
+ * (`agent:<actor.id>`), so history steps, change feeds and proposals can tell them from the user's.
18
+ * Read-only tools pass straight through. Add it after agent playback (`registry.use` order), so
19
+ * it wraps only the handler and not the time a call waits in an actor's queue: while a handler
20
+ * runs, other changes recorded on the same history are stamped with the agent's origin too.
21
+ */
22
+ export declare function createOriginMiddleware(options: OriginMiddlewareOptions): ToolMiddleware;