@pixerate/editor 0.139.1 → 0.140.1

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 (152) hide show
  1. package/README.md +25 -4
  2. package/dist/agent/formatTools.d.cts +15 -0
  3. package/dist/agent/formatTools.d.ts +15 -0
  4. package/dist/agent/index.cjs +408 -49
  5. package/dist/agent/index.js +375 -16
  6. package/dist/agent/providers.d.cts +5 -3
  7. package/dist/agent/providers.d.ts +5 -3
  8. package/dist/animation-editor/effect-tools.d.cts +1 -1
  9. package/dist/animation-editor/effect-tools.d.ts +1 -1
  10. package/dist/animation-editor/index.cjs +250 -116
  11. package/dist/animation-editor/index.js +228 -94
  12. package/dist/animation-editor/instructions.d.cts +1 -1
  13. package/dist/animation-editor/instructions.d.ts +1 -1
  14. package/dist/animation-editor/parse.d.cts +3 -1
  15. package/dist/animation-editor/parse.d.ts +3 -1
  16. package/dist/animation-editor/tools.d.cts +8 -3
  17. package/dist/animation-editor/tools.d.ts +8 -3
  18. package/dist/bridge/cli.cjs +4 -3
  19. package/dist/bridge/cli.js +3 -2
  20. package/dist/bridge/index.cjs +8 -3
  21. package/dist/bridge/index.d.cts +7 -0
  22. package/dist/bridge/index.d.ts +7 -0
  23. package/dist/bridge/index.js +9 -4
  24. package/dist/bridge/skills.d.cts +9 -0
  25. package/dist/bridge/skills.d.ts +9 -0
  26. package/dist/canvas/effect-tools.d.cts +1 -1
  27. package/dist/canvas/effect-tools.d.ts +1 -1
  28. package/dist/canvas/index.cjs +22 -17
  29. package/dist/canvas/index.js +8 -3
  30. package/dist/chart/file-tools.d.cts +1 -1
  31. package/dist/chart/file-tools.d.ts +1 -1
  32. package/dist/chart/index.cjs +7 -1
  33. package/dist/chart/index.js +7 -1
  34. package/dist/chart/tools.d.cts +1 -1
  35. package/dist/chart/tools.d.ts +1 -1
  36. package/dist/chunk-2BSBFBOA.cjs +46 -0
  37. package/dist/{chunk-SWZTQWY7.js → chunk-2INPJDNY.js} +1 -1
  38. package/dist/{chunk-CCKP4XAN.cjs → chunk-34RQAGWI.cjs} +27 -7
  39. package/dist/{chunk-HXCBQ7A6.cjs → chunk-3AJMR7EG.cjs} +7 -4
  40. package/dist/{chunk-BKMU3V6K.js → chunk-5ED73EC6.js} +8 -1
  41. package/dist/{chunk-NKBUVQJW.cjs → chunk-5WOY52O6.cjs} +15 -15
  42. package/dist/{chunk-VRIR53SW.js → chunk-6GAYGQDC.js} +10 -8
  43. package/dist/{chunk-HZZXBTLB.js → chunk-6IN474P4.js} +25 -5
  44. package/dist/{chunk-KHMVB3SJ.js → chunk-7KWJEYIK.js} +4 -1
  45. package/dist/{chunk-R47NQICB.cjs → chunk-AGCD3EHB.cjs} +47 -10
  46. package/dist/{chunk-6I63VZ45.js → chunk-CXXKJBQZ.js} +5 -1
  47. package/dist/{chunk-6NXVDJDR.cjs → chunk-G43MNQ4C.cjs} +5 -5
  48. package/dist/chunk-HDK3T2QS.cjs +1159 -0
  49. package/dist/chunk-HF5QZS7Z.js +46 -0
  50. package/dist/{chunk-S7I3RI5Z.cjs → chunk-HMGWFXEC.cjs} +27 -24
  51. package/dist/{chunk-6NCBFBXA.js → chunk-IQ6KKXOU.js} +1 -1
  52. package/dist/{chunk-T6Y5FV7G.cjs → chunk-L434J57V.cjs} +10 -8
  53. package/dist/{chunk-UCRL6JEV.cjs → chunk-L5OWG2NA.cjs} +8 -3
  54. package/dist/{chunk-CZRWP6IW.cjs → chunk-N2FGYZ4Q.cjs} +8 -1
  55. package/dist/{chunk-GUPQ5BNA.cjs → chunk-PUR6BZFA.cjs} +112 -111
  56. package/dist/chunk-RB62U6MS.js +1159 -0
  57. package/dist/{chunk-3V746PF4.cjs → chunk-RUZQMYXH.cjs} +4 -1
  58. package/dist/{chunk-HGHXGCKG.cjs → chunk-SVFEVKLF.cjs} +1 -1
  59. package/dist/{chunk-PCNCT4ZY.js → chunk-UMS6YFA6.js} +40 -3
  60. package/dist/{chunk-4LGWAJDI.js → chunk-V5OOP74P.js} +5 -2
  61. package/dist/{chunk-BWT4IWLK.cjs → chunk-VKF3PWKR.cjs} +7 -7
  62. package/dist/{chunk-PQMADRCI.js → chunk-WBJ6BG4R.js} +23 -22
  63. package/dist/{chunk-WIYAOZZU.js → chunk-WHKNYFM2.js} +7 -2
  64. package/dist/{chunk-TBSPPVTT.js → chunk-XCK7QK5D.js} +1 -1
  65. package/dist/{chunk-F652BKMS.cjs → chunk-YN6JKAUE.cjs} +6 -2
  66. package/dist/{chunk-YTGF4TJR.js → chunk-ZLZKGHSZ.js} +5 -2
  67. package/dist/{chunk-USU2FL3N.js → chunk-ZNHB5RG6.js} +1 -1
  68. package/dist/commands/agentTools.d.cts +1 -1
  69. package/dist/commands/agentTools.d.ts +1 -1
  70. package/dist/commands/index.cjs +3 -0
  71. package/dist/commands/index.js +3 -0
  72. package/dist/compare/index.cjs +4 -3
  73. package/dist/compare/index.js +3 -2
  74. package/dist/diagram/index.cjs +3 -0
  75. package/dist/diagram/index.js +3 -0
  76. package/dist/diagram/tools.d.cts +1 -1
  77. package/dist/diagram/tools.d.ts +1 -1
  78. package/dist/effects/index.cjs +32 -32
  79. package/dist/effects/index.js +1 -1
  80. package/dist/effects/tools.d.cts +5 -1
  81. package/dist/effects/tools.d.ts +5 -1
  82. package/dist/export/index.cjs +4 -3
  83. package/dist/export/index.js +3 -2
  84. package/dist/extensions/index.cjs +11 -8
  85. package/dist/extensions/index.d.cts +1 -0
  86. package/dist/extensions/index.d.ts +1 -0
  87. package/dist/extensions/index.js +10 -7
  88. package/dist/extensions/safe-merge-attributes.d.cts +10 -0
  89. package/dist/extensions/safe-merge-attributes.d.ts +10 -0
  90. package/dist/generation/index.cjs +7 -1
  91. package/dist/generation/index.js +7 -1
  92. package/dist/image-editor/index.cjs +25 -18
  93. package/dist/image-editor/index.js +10 -3
  94. package/dist/image-editor/provider-effect-tools.d.cts +1 -1
  95. package/dist/image-editor/provider-effect-tools.d.ts +1 -1
  96. package/dist/image-editor/tools.d.cts +1 -1
  97. package/dist/image-editor/tools.d.ts +1 -1
  98. package/dist/index.cjs +42 -29
  99. package/dist/index.d.cts +1 -0
  100. package/dist/index.d.ts +1 -0
  101. package/dist/index.js +22 -9
  102. package/dist/paint-editor/effect-tools.d.cts +1 -1
  103. package/dist/paint-editor/effect-tools.d.ts +1 -1
  104. package/dist/paint-editor/index.cjs +18 -8
  105. package/dist/paint-editor/index.js +13 -3
  106. package/dist/paint-editor/tools.d.cts +1 -1
  107. package/dist/paint-editor/tools.d.ts +1 -1
  108. package/dist/persistence/index.cjs +3 -2
  109. package/dist/persistence/index.js +2 -1
  110. package/dist/serializers/index.cjs +5 -4
  111. package/dist/serializers/index.js +4 -3
  112. package/dist/tools/bridge-client.d.cts +3 -3
  113. package/dist/tools/bridge-client.d.ts +3 -3
  114. package/dist/tools/capture.d.cts +5 -1
  115. package/dist/tools/capture.d.ts +5 -1
  116. package/dist/tools/definitions.d.cts +2 -2
  117. package/dist/tools/definitions.d.ts +2 -2
  118. package/dist/tools/index.cjs +39 -5
  119. package/dist/tools/index.d.cts +4 -0
  120. package/dist/tools/index.d.ts +4 -0
  121. package/dist/tools/index.js +39 -5
  122. package/dist/tools/mcp-server.d.cts +24 -6
  123. package/dist/tools/mcp-server.d.ts +24 -6
  124. package/dist/tools/registry.d.cts +81 -6
  125. package/dist/tools/registry.d.ts +81 -6
  126. package/dist/tools/safe-json.d.cts +27 -0
  127. package/dist/tools/safe-json.d.ts +27 -0
  128. package/dist/tools/search.d.cts +30 -0
  129. package/dist/tools/search.d.ts +30 -0
  130. package/dist/tools/skills.d.cts +26 -0
  131. package/dist/tools/skills.d.ts +26 -0
  132. package/dist/tools/view.d.cts +95 -0
  133. package/dist/tools/view.d.ts +95 -0
  134. package/dist/vector/effect-tools.d.cts +1 -1
  135. package/dist/vector/effect-tools.d.ts +1 -1
  136. package/dist/vector/index.cjs +13 -7
  137. package/dist/vector/index.js +8 -2
  138. package/dist/video-editor/effect-tools.d.cts +1 -1
  139. package/dist/video-editor/effect-tools.d.ts +1 -1
  140. package/dist/video-editor/index.cjs +275 -269
  141. package/dist/video-editor/index.js +8 -2
  142. package/dist/video-editor/tools.d.cts +1 -1
  143. package/dist/video-editor/tools.d.ts +1 -1
  144. package/package.json +31 -29
  145. package/skills/README.md +8 -3
  146. package/skills/pixerate-agent-tools/SKILL.md +33 -7
  147. package/skills/pixerate-animation-editor/SKILL.md +7 -0
  148. package/skills/pixerate-rich-text/SKILL.md +18 -4
  149. package/dist/chunk-5RRYDFU2.js +0 -466
  150. package/dist/chunk-SPVIXXIB.cjs +0 -466
  151. /package/dist/{chunk-SMJK5HBJ.js → chunk-K73HMKQP.js} +0 -0
  152. /package/dist/{chunk-DDF6WQ62.cjs → chunk-LACYURUW.cjs} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  toVideoFfmpeg
3
- } from "../chunk-6NCBFBXA.js";
3
+ } from "../chunk-IQ6KKXOU.js";
4
4
  import {
5
5
  deserializeLayers,
6
6
  exportPsd,
@@ -128,7 +128,7 @@ import {
128
128
  EffectsSlot,
129
129
  createEffectToolProvider,
130
130
  resolveEffectValues
131
- } from "../chunk-KHMVB3SJ.js";
131
+ } from "../chunk-7KWJEYIK.js";
132
132
  import "../chunk-V2ZCJRDM.js";
133
133
  import {
134
134
  CoverageMap,
@@ -7829,7 +7829,14 @@ function createPaintEditorToolProvider(controller, options = {}) {
7829
7829
  tools.push(...createPaintReplayTools(c));
7830
7830
  tools.push(...createPaintStickerTools(c));
7831
7831
  tools.push(...createPigmentTools());
7832
- return { id: options.id ?? "paint-editor", namespace: options.namespace, tools };
7832
+ return {
7833
+ id: options.id ?? "paint-editor",
7834
+ namespace: options.namespace,
7835
+ title: "Paint editor",
7836
+ description: "Natural-media painting: paper and grain, dry and wet brushes, the brush library, strokes as data, pigment mixing, stencils, guides, layers and export.",
7837
+ skill: "pixerate-paint-editor",
7838
+ tools
7839
+ };
7833
7840
  }
7834
7841
 
7835
7842
  // src/paint-editor/ui.ts
@@ -8420,6 +8427,9 @@ function createPaintEffectsToolProvider(controller, options = {}) {
8420
8427
  return createEffectToolProvider({
8421
8428
  id: options.id ?? "paint-effects",
8422
8429
  namespace: options.namespace,
8430
+ title: "Paint effects",
8431
+ description: "Provider effects on paint layers and on the effect paper.",
8432
+ skill: "pixerate-paint-editor",
8423
8433
  target: { noun: "layer", id: `A pixel layer id from list_layers ("${PAPER_TARGET}" is the effect paper, for list, update and remove).` },
8424
8434
  applyUses: ["filter"],
8425
8435
  applyDetails: "Light on dried paint: the filter (search_effects with use filter, e.g. a light, glow or grade) runs on the layer's paint at the canvas size and is baked into its pixels; transparent areas stay transparent, and thick paint keeps its relief (an effect with a height input gets it). opacity is the strength (default 1). Wet paint is refused: dry it first (dry_paint). It is one undo step and is not listed afterwards (it is part of the pixels). Generators go on the paper (set_paper_effect), on their own layer (add_effect_layer) or into a layer (fill_layer_with_effect).",
@@ -11,7 +11,7 @@ import type { PresenceActorInfo } from '../animation/presence.cjs';
11
11
  export interface PaintEditorToolProviderOptions {
12
12
  /** Provider id (unique per registry). Default `paint-editor`. */
13
13
  id?: string;
14
- /** Always prefix tool names with `<namespace>__`. */
14
+ /** Tool-name prefix (`<namespace>__<name>`); defaults to the provider id, `''` for bare names. */
15
15
  namespace?: string;
16
16
  /**
17
17
  * Acts out strokes, fills and replays with an agent cursor on the canvas (see `PaintDirector`):
@@ -11,7 +11,7 @@ import type { PresenceActorInfo } from '../animation/presence.js';
11
11
  export interface PaintEditorToolProviderOptions {
12
12
  /** Provider id (unique per registry). Default `paint-editor`. */
13
13
  id?: string;
14
- /** Always prefix tool names with `<namespace>__`. */
14
+ /** Tool-name prefix (`<namespace>__<name>`); defaults to the provider id, `''` for bare names. */
15
15
  namespace?: string;
16
16
  /**
17
17
  * Acts out strokes, fills and replays with an agent cursor on the canvas (see `PaintDirector`):
@@ -4,7 +4,8 @@
4
4
 
5
5
 
6
6
 
7
- var _chunkUCRL6JEVcjs = require('../chunk-UCRL6JEV.cjs');
7
+ var _chunkL5OWG2NAcjs = require('../chunk-L5OWG2NA.cjs');
8
+ require('../chunk-2BSBFBOA.cjs');
8
9
 
9
10
  // src/persistence/recoveryPolicy.ts
10
11
  function exponentialBackoff(failures, base = 1e3, max = 3e4) {
@@ -672,4 +673,4 @@ function createRevisionTracker(options = {}) {
672
673
 
673
674
 
674
675
 
675
- exports.InjectedStorageError = InjectedStorageError; exports.StorageUnavailableError = StorageUnavailableError; exports.createAutosaveController = createAutosaveController; exports.createIndexedDbAdapter = createIndexedDbAdapter; exports.createLoadReport = _chunkUCRL6JEVcjs.createLoadReport; exports.createLocalStorageAdapter = createLocalStorageAdapter; exports.createMemoryStorage = createMemoryStorage; exports.createOpfsAdapter = createOpfsAdapter; exports.createRecoveryPolicy = createRecoveryPolicy; exports.createRevisionTracker = createRevisionTracker; exports.exponentialBackoff = exponentialBackoff; exports.formatRecoveryMessage = formatRecoveryMessage; exports.hasLoadProblems = _chunkUCRL6JEVcjs.hasLoadProblems; exports.isIndexedDbAvailable = isIndexedDbAvailable; exports.isLocalStorageAvailable = isLocalStorageAvailable; exports.isOpfsAvailable = isOpfsAvailable; exports.loadDocument = _chunkUCRL6JEVcjs.loadDocument; exports.loadSections = _chunkUCRL6JEVcjs.loadSections; exports.migrateDocument = _chunkUCRL6JEVcjs.migrateDocument; exports.recoveryMetaKey = recoveryMetaKey; exports.withStorageFailures = withStorageFailures;
676
+ exports.InjectedStorageError = InjectedStorageError; exports.StorageUnavailableError = StorageUnavailableError; exports.createAutosaveController = createAutosaveController; exports.createIndexedDbAdapter = createIndexedDbAdapter; exports.createLoadReport = _chunkL5OWG2NAcjs.createLoadReport; exports.createLocalStorageAdapter = createLocalStorageAdapter; exports.createMemoryStorage = createMemoryStorage; exports.createOpfsAdapter = createOpfsAdapter; exports.createRecoveryPolicy = createRecoveryPolicy; exports.createRevisionTracker = createRevisionTracker; exports.exponentialBackoff = exponentialBackoff; exports.formatRecoveryMessage = formatRecoveryMessage; exports.hasLoadProblems = _chunkL5OWG2NAcjs.hasLoadProblems; exports.isIndexedDbAvailable = isIndexedDbAvailable; exports.isLocalStorageAvailable = isLocalStorageAvailable; exports.isOpfsAvailable = isOpfsAvailable; exports.loadDocument = _chunkL5OWG2NAcjs.loadDocument; exports.loadSections = _chunkL5OWG2NAcjs.loadSections; exports.migrateDocument = _chunkL5OWG2NAcjs.migrateDocument; exports.recoveryMetaKey = recoveryMetaKey; exports.withStorageFailures = withStorageFailures;
@@ -4,7 +4,8 @@ import {
4
4
  loadDocument,
5
5
  loadSections,
6
6
  migrateDocument
7
- } from "../chunk-WIYAOZZU.js";
7
+ } from "../chunk-WHKNYFM2.js";
8
+ import "../chunk-HF5QZS7Z.js";
8
9
 
9
10
  // src/persistence/recoveryPolicy.ts
10
11
  function exponentialBackoff(failures, base = 1e3, max = 3e4) {
@@ -9,7 +9,7 @@
9
9
 
10
10
 
11
11
 
12
- var _chunkHXCBQ7A6cjs = require('../chunk-HXCBQ7A6.cjs');
12
+ var _chunk3AJMR7EGcjs = require('../chunk-3AJMR7EG.cjs');
13
13
 
14
14
 
15
15
 
@@ -27,14 +27,15 @@ var _chunkHXCBQ7A6cjs = require('../chunk-HXCBQ7A6.cjs');
27
27
 
28
28
 
29
29
 
30
- var _chunk6NXVDJDRcjs = require('../chunk-6NXVDJDR.cjs');
30
+ var _chunkG43MNQ4Ccjs = require('../chunk-G43MNQ4C.cjs');
31
31
 
32
32
 
33
33
 
34
34
 
35
35
 
36
36
  var _chunkJG5VGCKPcjs = require('../chunk-JG5VGCKP.cjs');
37
- require('../chunk-CCKP4XAN.cjs');
37
+ require('../chunk-34RQAGWI.cjs');
38
+ require('../chunk-2BSBFBOA.cjs');
38
39
 
39
40
 
40
41
 
@@ -65,4 +66,4 @@ require('../chunk-CCKP4XAN.cjs');
65
66
 
66
67
 
67
68
 
68
- exports.MARKDOWN_MENTION_SPLIT_REGEX = _chunk6NXVDJDRcjs.MARKDOWN_MENTION_SPLIT_REGEX; exports.MENTION_REGEX = _chunkJG5VGCKPcjs.MENTION_REGEX; exports.PIXERATE_DOCUMENT_MIME = _chunkHXCBQ7A6cjs.PIXERATE_DOCUMENT_MIME; exports.escapeHtml = _chunk6NXVDJDRcjs.escapeHtml; exports.extractMentions = _chunk6NXVDJDRcjs.extractMentions; exports.extractMentionsFromDoc = _chunk6NXVDJDRcjs.extractMentionsFromDoc; exports.findTextMentions = _chunkJG5VGCKPcjs.findTextMentions; exports.formatMentionText = _chunkJG5VGCKPcjs.formatMentionText; exports.getClipboardData = _chunkHXCBQ7A6cjs.getClipboardData; exports.getEditorMarkdown = _chunk6NXVDJDRcjs.getEditorMarkdown; exports.getEditorText = _chunk6NXVDJDRcjs.getEditorText; exports.getSchemaSignature = _chunkHXCBQ7A6cjs.getSchemaSignature; exports.htmlToPlainText = _chunk6NXVDJDRcjs.htmlToPlainText; exports.markdownToTipTapHtml = _chunk6NXVDJDRcjs.markdownToTipTapHtml; exports.parseMentionSegments = _chunk6NXVDJDRcjs.parseMentionSegments; exports.parseRichClipboardPayload = _chunkHXCBQ7A6cjs.parseRichClipboardPayload; exports.plainTextToParagraphHtml = _chunkHXCBQ7A6cjs.plainTextToParagraphHtml; exports.plainTextToSlice = _chunk6NXVDJDRcjs.plainTextToSlice; exports.plainTextToTipTapHtml = _chunk6NXVDJDRcjs.plainTextToTipTapHtml; exports.preprocessMarkdownFileLinks = _chunk6NXVDJDRcjs.preprocessMarkdownFileLinks; exports.preprocessMarkdownMentions = _chunk6NXVDJDRcjs.preprocessMarkdownMentions; exports.readRichClipboard = _chunkHXCBQ7A6cjs.readRichClipboard; exports.rtfToPlainText = _chunkHXCBQ7A6cjs.rtfToPlainText; exports.sanitizeHtml = _chunk6NXVDJDRcjs.sanitizeHtml; exports.sanitizeImportedHtml = _chunkHXCBQ7A6cjs.sanitizeImportedHtml; exports.serializeRichClipboardPayload = _chunkHXCBQ7A6cjs.serializeRichClipboardPayload; exports.setMentionRoleInText = _chunkJG5VGCKPcjs.setMentionRoleInText; exports.splitMarkdownMentionParts = _chunk6NXVDJDRcjs.splitMarkdownMentionParts; exports.stripMarkdownCode = _chunk6NXVDJDRcjs.stripMarkdownCode;
69
+ exports.MARKDOWN_MENTION_SPLIT_REGEX = _chunkG43MNQ4Ccjs.MARKDOWN_MENTION_SPLIT_REGEX; exports.MENTION_REGEX = _chunkJG5VGCKPcjs.MENTION_REGEX; exports.PIXERATE_DOCUMENT_MIME = _chunk3AJMR7EGcjs.PIXERATE_DOCUMENT_MIME; exports.escapeHtml = _chunkG43MNQ4Ccjs.escapeHtml; exports.extractMentions = _chunkG43MNQ4Ccjs.extractMentions; exports.extractMentionsFromDoc = _chunkG43MNQ4Ccjs.extractMentionsFromDoc; exports.findTextMentions = _chunkJG5VGCKPcjs.findTextMentions; exports.formatMentionText = _chunkJG5VGCKPcjs.formatMentionText; exports.getClipboardData = _chunk3AJMR7EGcjs.getClipboardData; exports.getEditorMarkdown = _chunkG43MNQ4Ccjs.getEditorMarkdown; exports.getEditorText = _chunkG43MNQ4Ccjs.getEditorText; exports.getSchemaSignature = _chunk3AJMR7EGcjs.getSchemaSignature; exports.htmlToPlainText = _chunkG43MNQ4Ccjs.htmlToPlainText; exports.markdownToTipTapHtml = _chunkG43MNQ4Ccjs.markdownToTipTapHtml; exports.parseMentionSegments = _chunkG43MNQ4Ccjs.parseMentionSegments; exports.parseRichClipboardPayload = _chunk3AJMR7EGcjs.parseRichClipboardPayload; exports.plainTextToParagraphHtml = _chunk3AJMR7EGcjs.plainTextToParagraphHtml; exports.plainTextToSlice = _chunkG43MNQ4Ccjs.plainTextToSlice; exports.plainTextToTipTapHtml = _chunkG43MNQ4Ccjs.plainTextToTipTapHtml; exports.preprocessMarkdownFileLinks = _chunkG43MNQ4Ccjs.preprocessMarkdownFileLinks; exports.preprocessMarkdownMentions = _chunkG43MNQ4Ccjs.preprocessMarkdownMentions; exports.readRichClipboard = _chunk3AJMR7EGcjs.readRichClipboard; exports.rtfToPlainText = _chunk3AJMR7EGcjs.rtfToPlainText; exports.sanitizeHtml = _chunkG43MNQ4Ccjs.sanitizeHtml; exports.sanitizeImportedHtml = _chunk3AJMR7EGcjs.sanitizeImportedHtml; exports.serializeRichClipboardPayload = _chunk3AJMR7EGcjs.serializeRichClipboardPayload; exports.setMentionRoleInText = _chunkJG5VGCKPcjs.setMentionRoleInText; exports.splitMarkdownMentionParts = _chunkG43MNQ4Ccjs.splitMarkdownMentionParts; exports.stripMarkdownCode = _chunkG43MNQ4Ccjs.stripMarkdownCode;
@@ -9,7 +9,7 @@ import {
9
9
  rtfToPlainText,
10
10
  sanitizeImportedHtml,
11
11
  serializeRichClipboardPayload
12
- } from "../chunk-YTGF4TJR.js";
12
+ } from "../chunk-ZLZKGHSZ.js";
13
13
  import {
14
14
  MARKDOWN_MENTION_SPLIT_REGEX,
15
15
  escapeHtml,
@@ -27,14 +27,15 @@ import {
27
27
  sanitizeHtml,
28
28
  splitMarkdownMentionParts,
29
29
  stripMarkdownCode
30
- } from "../chunk-SWZTQWY7.js";
30
+ } from "../chunk-2INPJDNY.js";
31
31
  import {
32
32
  MENTION_REGEX,
33
33
  findTextMentions,
34
34
  formatMentionText,
35
35
  setMentionRoleInText
36
36
  } from "../chunk-RTRQ7XFI.js";
37
- import "../chunk-HZZXBTLB.js";
37
+ import "../chunk-6IN474P4.js";
38
+ import "../chunk-HF5QZS7Z.js";
38
39
  export {
39
40
  MARKDOWN_MENTION_SPLIT_REGEX,
40
41
  MENTION_REGEX,
@@ -1,4 +1,4 @@
1
- import type { McpToolDefinition, McpToolResult, ToolRegistry } from './registry.cjs';
1
+ import type { McpToolDefinition, McpToolResult, ToolSource } from './registry.cjs';
2
2
  /** Protocol version spoken between `connectToolBridge` and `createToolBridge`. */
3
3
  export declare const TOOL_BRIDGE_PROTOCOL = 1;
4
4
  /** Default port the bridge listens on (127.0.0.1 only). */
@@ -65,10 +65,10 @@ export interface ToolBridgeConnection {
65
65
  close(): void;
66
66
  }
67
67
  /**
68
- * Connects a `ToolRegistry` to a local MCP bridge (`createToolBridge` /
68
+ * Connects a `ToolRegistry` (or a `registry.view()` of it) to a local MCP bridge (`createToolBridge` /
69
69
  * `pixerate-mcp-bridge`), so an MCP client (Claude Desktop, Claude Code, an IDE) can call
70
70
  * the page's tools: the registry's tool list is sent on connect and whenever it changes,
71
71
  * calls run through `registry.callTool` with an `AbortSignal` the bridge cancels, and the
72
72
  * connection comes back after the bridge restarts.
73
73
  */
74
- export declare function connectToolBridge(registry: ToolRegistry, options: ConnectToolBridgeOptions): ToolBridgeConnection;
74
+ export declare function connectToolBridge(registry: ToolSource, options: ConnectToolBridgeOptions): ToolBridgeConnection;
@@ -1,4 +1,4 @@
1
- import type { McpToolDefinition, McpToolResult, ToolRegistry } from './registry.js';
1
+ import type { McpToolDefinition, McpToolResult, ToolSource } from './registry.js';
2
2
  /** Protocol version spoken between `connectToolBridge` and `createToolBridge`. */
3
3
  export declare const TOOL_BRIDGE_PROTOCOL = 1;
4
4
  /** Default port the bridge listens on (127.0.0.1 only). */
@@ -65,10 +65,10 @@ export interface ToolBridgeConnection {
65
65
  close(): void;
66
66
  }
67
67
  /**
68
- * Connects a `ToolRegistry` to a local MCP bridge (`createToolBridge` /
68
+ * Connects a `ToolRegistry` (or a `registry.view()` of it) to a local MCP bridge (`createToolBridge` /
69
69
  * `pixerate-mcp-bridge`), so an MCP client (Claude Desktop, Claude Code, an IDE) can call
70
70
  * the page's tools: the registry's tool list is sent on connect and whenever it changes,
71
71
  * calls run through `registry.callTool` with an `AbortSignal` the bridge cancels, and the
72
72
  * connection comes back after the bridge restarts.
73
73
  */
74
- export declare function connectToolBridge(registry: ToolRegistry, options: ConnectToolBridgeOptions): ToolBridgeConnection;
74
+ export declare function connectToolBridge(registry: ToolSource, options: ConnectToolBridgeOptions): ToolBridgeConnection;
@@ -88,8 +88,12 @@ export interface CaptureToolOptions {
88
88
  export interface CaptureToolProviderOptions extends CaptureToolOptions {
89
89
  /** Provider id (unique per registry, default `capture`). */
90
90
  id?: string;
91
- /** Always prefix tool names with `<namespace>__`. */
91
+ /** Tool-name prefix (`<namespace>__<name>`); defaults to the provider id, `''` for bare names. */
92
92
  namespace?: string;
93
+ /** Toolset title (default "Screen capture"), description and skill (see `AgentToolProvider`). */
94
+ title?: string;
95
+ description?: string;
96
+ skill?: string;
93
97
  }
94
98
  /** Bounds of the capture: union of rects, `null` for none. */
95
99
  export declare function unionCaptureRects(rects: readonly (CaptureRect | null | undefined)[]): CaptureRect | null;
@@ -88,8 +88,12 @@ export interface CaptureToolOptions {
88
88
  export interface CaptureToolProviderOptions extends CaptureToolOptions {
89
89
  /** Provider id (unique per registry, default `capture`). */
90
90
  id?: string;
91
- /** Always prefix tool names with `<namespace>__`. */
91
+ /** Tool-name prefix (`<namespace>__<name>`); defaults to the provider id, `''` for bare names. */
92
92
  namespace?: string;
93
+ /** Toolset title (default "Screen capture"), description and skill (see `AgentToolProvider`). */
94
+ title?: string;
95
+ description?: string;
96
+ skill?: string;
93
97
  }
94
98
  /** Bounds of the capture: union of rects, `null` for none. */
95
99
  export declare function unionCaptureRects(rects: readonly (CaptureRect | null | undefined)[]): CaptureRect | null;
@@ -361,7 +361,7 @@ export declare const MCP_TOOL_CANVAS_LAYOUT: {
361
361
  readonly openWorldHint: false;
362
362
  readonly title: "Lay out the canvas";
363
363
  };
364
- readonly description: "Arranges the canvas graph automatically.";
364
+ readonly description: "Arranges the canvas nodes automatically in a layered graph layout that follows the edges, so nodes line up and do not overlap. Nodes that already have a position stay put unless incremental is false.";
365
365
  readonly inputSchema: {
366
366
  readonly type: "object";
367
367
  readonly properties: {
@@ -733,7 +733,7 @@ export declare const EDITOR_CANVAS_TOOLS: readonly [{
733
733
  readonly openWorldHint: false;
734
734
  readonly title: "Lay out the canvas";
735
735
  };
736
- readonly description: "Arranges the canvas graph automatically.";
736
+ readonly description: "Arranges the canvas nodes automatically in a layered graph layout that follows the edges, so nodes line up and do not overlap. Nodes that already have a position stay put unless incremental is false.";
737
737
  readonly inputSchema: {
738
738
  readonly type: "object";
739
739
  readonly properties: {
@@ -361,7 +361,7 @@ export declare const MCP_TOOL_CANVAS_LAYOUT: {
361
361
  readonly openWorldHint: false;
362
362
  readonly title: "Lay out the canvas";
363
363
  };
364
- readonly description: "Arranges the canvas graph automatically.";
364
+ readonly description: "Arranges the canvas nodes automatically in a layered graph layout that follows the edges, so nodes line up and do not overlap. Nodes that already have a position stay put unless incremental is false.";
365
365
  readonly inputSchema: {
366
366
  readonly type: "object";
367
367
  readonly properties: {
@@ -733,7 +733,7 @@ export declare const EDITOR_CANVAS_TOOLS: readonly [{
733
733
  readonly openWorldHint: false;
734
734
  readonly title: "Lay out the canvas";
735
735
  };
736
- readonly description: "Arranges the canvas graph automatically.";
736
+ readonly description: "Arranges the canvas nodes automatically in a layered graph layout that follows the edges, so nodes line up and do not overlap. Nodes that already have a position stay put unless incremental is false.";
737
737
  readonly inputSchema: {
738
738
  readonly type: "object";
739
739
  readonly properties: {
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-DDF6WQ62.cjs');
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-LACYURUW.cjs');
2
2
 
3
3
 
4
4
 
@@ -11,7 +11,6 @@
11
11
 
12
12
 
13
13
 
14
- var _chunkSPVIXXIBcjs = require('../chunk-SPVIXXIB.cjs');
15
14
 
16
15
 
17
16
 
@@ -25,6 +24,7 @@ var _chunkSPVIXXIBcjs = require('../chunk-SPVIXXIB.cjs');
25
24
 
26
25
 
27
26
 
27
+ var _chunkHDK3T2QScjs = require('../chunk-HDK3T2QS.cjs');
28
28
 
29
29
 
30
30
 
@@ -39,7 +39,6 @@ var _chunkSPVIXXIBcjs = require('../chunk-SPVIXXIB.cjs');
39
39
 
40
40
 
41
41
 
42
- var _chunkHGHXGCKGcjs = require('../chunk-HGHXGCKG.cjs');
43
42
 
44
43
 
45
44
 
@@ -48,7 +47,26 @@ var _chunkHGHXGCKGcjs = require('../chunk-HGHXGCKG.cjs');
48
47
 
49
48
 
50
49
 
51
- var _chunkCZRWP6IWcjs = require('../chunk-CZRWP6IW.cjs');
50
+
51
+
52
+
53
+
54
+
55
+ var _chunkSVFEVKLFcjs = require('../chunk-SVFEVKLF.cjs');
56
+
57
+
58
+
59
+
60
+
61
+
62
+
63
+
64
+ var _chunkN2FGYZ4Qcjs = require('../chunk-N2FGYZ4Q.cjs');
65
+
66
+
67
+
68
+
69
+ var _chunk2BSBFBOAcjs = require('../chunk-2BSBFBOA.cjs');
52
70
 
53
71
 
54
72
  var _chunkWOFXZ3XUcjs = require('../chunk-WOFXZ3XU.cjs');
@@ -98,4 +116,20 @@ var _chunkWOFXZ3XUcjs = require('../chunk-WOFXZ3XU.cjs');
98
116
 
99
117
 
100
118
 
101
- exports.CAPTURE_EXCLUDE_SELECTOR = _chunkHGHXGCKGcjs.CAPTURE_EXCLUDE_SELECTOR; exports.CAPTURE_OVERLAY_SELECTORS = _chunkHGHXGCKGcjs.CAPTURE_OVERLAY_SELECTORS; exports.EDITOR_CANVAS_TOOLS = _chunkHGHXGCKGcjs.EDITOR_CANVAS_TOOLS; exports.EDITOR_MCP_TOOLS = _chunkHGHXGCKGcjs.EDITOR_MCP_TOOLS; exports.EDITOR_PROMPT_TOOLS = _chunkHGHXGCKGcjs.EDITOR_PROMPT_TOOLS; exports.EDIT_OPERATION_REQUIRED_ARGUMENTS = _chunkHGHXGCKGcjs.EDIT_OPERATION_REQUIRED_ARGUMENTS; exports.EXPORT_EXCLUDED_SELECTORS = _chunkHGHXGCKGcjs.EXPORT_EXCLUDED_SELECTORS; exports.JSON_RPC_ERRORS = _chunkSPVIXXIBcjs.JSON_RPC_ERRORS; exports.MCP_PROTOCOL_VERSIONS = _chunkSPVIXXIBcjs.MCP_PROTOCOL_VERSIONS; exports.MCP_TOOL_CANVAS_ADD_NODE = _chunkHGHXGCKGcjs.MCP_TOOL_CANVAS_ADD_NODE; exports.MCP_TOOL_CANVAS_CONNECT = _chunkHGHXGCKGcjs.MCP_TOOL_CANVAS_CONNECT; exports.MCP_TOOL_CANVAS_HIGHLIGHT = _chunkHGHXGCKGcjs.MCP_TOOL_CANVAS_HIGHLIGHT; exports.MCP_TOOL_CANVAS_LAYOUT = _chunkHGHXGCKGcjs.MCP_TOOL_CANVAS_LAYOUT; exports.MCP_TOOL_CANVAS_REMOVE_NODES = _chunkHGHXGCKGcjs.MCP_TOOL_CANVAS_REMOVE_NODES; exports.MCP_TOOL_CANVAS_SELECT = _chunkHGHXGCKGcjs.MCP_TOOL_CANVAS_SELECT; exports.MCP_TOOL_CANVAS_UPDATE_NODE = _chunkHGHXGCKGcjs.MCP_TOOL_CANVAS_UPDATE_NODE; exports.MCP_TOOL_EDIT_CANVAS = _chunkHGHXGCKGcjs.MCP_TOOL_EDIT_CANVAS; exports.MCP_TOOL_EDIT_PROMPT = _chunkHGHXGCKGcjs.MCP_TOOL_EDIT_PROMPT; exports.MCP_TOOL_GET_EDITOR_STATE = _chunkHGHXGCKGcjs.MCP_TOOL_GET_EDITOR_STATE; exports.MCP_TOOL_PROMPT_INSERT_TEXT = _chunkHGHXGCKGcjs.MCP_TOOL_PROMPT_INSERT_TEXT; exports.MCP_TOOL_PROMPT_REPLACE_RANGE = _chunkHGHXGCKGcjs.MCP_TOOL_PROMPT_REPLACE_RANGE; exports.MCP_TOOL_PROMPT_SELECT = _chunkHGHXGCKGcjs.MCP_TOOL_PROMPT_SELECT; exports.MCP_TOOL_PROMPT_SET_VARIABLE = _chunkHGHXGCKGcjs.MCP_TOOL_PROMPT_SET_VARIABLE; exports.MCP_TOOL_VIEW_EDITOR = _chunkHGHXGCKGcjs.MCP_TOOL_VIEW_EDITOR; exports.TOOL_BRIDGE_DEFAULT_PORT = _chunkSPVIXXIBcjs.TOOL_BRIDGE_DEFAULT_PORT; exports.TOOL_BRIDGE_PROTOCOL = _chunkSPVIXXIBcjs.TOOL_BRIDGE_PROTOCOL; exports.TOOL_NAMESPACE_SEPARATOR = _chunkSPVIXXIBcjs.TOOL_NAMESPACE_SEPARATOR; exports.ToolRegistry = _chunkSPVIXXIBcjs.ToolRegistry; exports.ToolRegistryError = _chunkSPVIXXIBcjs.ToolRegistryError; exports.captureInputSchema = _chunkCZRWP6IWcjs.captureInputSchema; exports.captureOutputSize = _chunkCZRWP6IWcjs.captureOutputSize; exports.cloneElementWithStyles = _chunkHGHXGCKGcjs.cloneElementWithStyles; exports.connectToolBridge = _chunkSPVIXXIBcjs.connectToolBridge; exports.createCaptureTool = _chunkCZRWP6IWcjs.createCaptureTool; exports.createCaptureToolProvider = _chunkCZRWP6IWcjs.createCaptureToolProvider; exports.createElementCaptureSurface = _chunkHGHXGCKGcjs.createElementCaptureSurface; exports.createMcpServer = _chunkSPVIXXIBcjs.createMcpServer; exports.createToolRegistry = _chunkSPVIXXIBcjs.createToolRegistry; exports.elementToSvg = _chunkHGHXGCKGcjs.elementToSvg; exports.rasterizeElement = _chunkHGHXGCKGcjs.rasterizeElement; exports.resolveCaptureRequest = _chunkCZRWP6IWcjs.resolveCaptureRequest; exports.toCapturedImageData = _chunkCZRWP6IWcjs.toCapturedImageData; exports.toToolResult = _chunkSPVIXXIBcjs.toToolResult; exports.unionCaptureRects = _chunkCZRWP6IWcjs.unionCaptureRects; exports.validateJsonSchema = _chunkWOFXZ3XUcjs.validateJsonSchema;
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+ 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 = _chunkHDK3T2QScjs.JSON_RPC_ERRORS; exports.MCP_PROTOCOL_VERSIONS = _chunkHDK3T2QScjs.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.TOOL_BRIDGE_DEFAULT_PORT = _chunkHDK3T2QScjs.TOOL_BRIDGE_DEFAULT_PORT; exports.TOOL_BRIDGE_PROTOCOL = _chunkHDK3T2QScjs.TOOL_BRIDGE_PROTOCOL; exports.TOOL_DISCOVERY_TOOLS = _chunkHDK3T2QScjs.TOOL_DISCOVERY_TOOLS; exports.TOOL_NAMESPACE_SEPARATOR = _chunkHDK3T2QScjs.TOOL_NAMESPACE_SEPARATOR; exports.ToolRegistry = _chunkHDK3T2QScjs.ToolRegistry; exports.ToolRegistryError = _chunkHDK3T2QScjs.ToolRegistryError; exports.ToolRegistryView = _chunkHDK3T2QScjs.ToolRegistryView; exports.UNSAFE_JSON_KEYS = _chunk2BSBFBOAcjs.UNSAFE_JSON_KEYS; exports.baseToolName = _chunkHDK3T2QScjs.baseToolName; exports.captureInputSchema = _chunkN2FGYZ4Qcjs.captureInputSchema; exports.captureOutputSize = _chunkN2FGYZ4Qcjs.captureOutputSize; exports.cloneElementWithStyles = _chunkSVFEVKLFcjs.cloneElementWithStyles; exports.connectToolBridge = _chunkHDK3T2QScjs.connectToolBridge; exports.createCaptureTool = _chunkN2FGYZ4Qcjs.createCaptureTool; exports.createCaptureToolProvider = _chunkN2FGYZ4Qcjs.createCaptureToolProvider; exports.createElementCaptureSurface = _chunkSVFEVKLFcjs.createElementCaptureSurface; exports.createMcpServer = _chunkHDK3T2QScjs.createMcpServer; exports.createToolRegistry = _chunkHDK3T2QScjs.createToolRegistry; exports.elementToSvg = _chunkSVFEVKLFcjs.elementToSvg; exports.errorResult = _chunkHDK3T2QScjs.errorResult; exports.isUnsafeJsonKey = _chunk2BSBFBOAcjs.isUnsafeJsonKey; exports.listSkills = _chunkHDK3T2QScjs.listSkills; exports.parseSkillFrontmatter = _chunkHDK3T2QScjs.parseSkillFrontmatter; exports.rasterizeElement = _chunkSVFEVKLFcjs.rasterizeElement; exports.readSkillFile = _chunkHDK3T2QScjs.readSkillFile; exports.resolveCaptureRequest = _chunkN2FGYZ4Qcjs.resolveCaptureRequest; exports.searchTokens = _chunkHDK3T2QScjs.searchTokens; exports.searchTools = _chunkHDK3T2QScjs.searchTools; exports.stripPrototypeKeys = _chunk2BSBFBOAcjs.stripPrototypeKeys; exports.summarize = _chunkHDK3T2QScjs.summarize; exports.toCapturedImageData = _chunkN2FGYZ4Qcjs.toCapturedImageData; exports.toToolResult = _chunkHDK3T2QScjs.toToolResult; exports.toolsetInstructions = _chunkHDK3T2QScjs.toolsetInstructions; exports.toolsetName = _chunkHDK3T2QScjs.toolsetName; exports.unionCaptureRects = _chunkN2FGYZ4Qcjs.unionCaptureRects; exports.unknownToolMessage = _chunkHDK3T2QScjs.unknownToolMessage; exports.validateJsonSchema = _chunkWOFXZ3XUcjs.validateJsonSchema;
@@ -14,3 +14,7 @@ export * from './mcp-server.cjs';
14
14
  export * from './bridge-client.cjs';
15
15
  export * from './capture.cjs';
16
16
  export * from './dom-capture.cjs';
17
+ export * from './view.cjs';
18
+ export * from './search.cjs';
19
+ export * from './skills.cjs';
20
+ export * from './safe-json.cjs';
@@ -14,3 +14,7 @@ export * from './mcp-server.js';
14
14
  export * from './bridge-client.js';
15
15
  export * from './capture.js';
16
16
  export * from './dom-capture.js';
17
+ export * from './view.js';
18
+ export * from './search.js';
19
+ export * from './skills.js';
20
+ export * from './safe-json.js';
@@ -1,17 +1,30 @@
1
- import "../chunk-SMJK5HBJ.js";
1
+ import "../chunk-K73HMKQP.js";
2
2
  import {
3
3
  JSON_RPC_ERRORS,
4
4
  MCP_PROTOCOL_VERSIONS,
5
5
  TOOL_BRIDGE_DEFAULT_PORT,
6
6
  TOOL_BRIDGE_PROTOCOL,
7
+ TOOL_DISCOVERY_TOOLS,
7
8
  TOOL_NAMESPACE_SEPARATOR,
8
9
  ToolRegistry,
9
10
  ToolRegistryError,
11
+ ToolRegistryView,
12
+ baseToolName,
10
13
  connectToolBridge,
11
14
  createMcpServer,
12
15
  createToolRegistry,
13
- toToolResult
14
- } from "../chunk-5RRYDFU2.js";
16
+ errorResult,
17
+ listSkills,
18
+ parseSkillFrontmatter,
19
+ readSkillFile,
20
+ searchTokens,
21
+ searchTools,
22
+ summarize,
23
+ toToolResult,
24
+ toolsetInstructions,
25
+ toolsetName,
26
+ unknownToolMessage
27
+ } from "../chunk-RB62U6MS.js";
15
28
  import {
16
29
  CAPTURE_EXCLUDE_SELECTOR,
17
30
  CAPTURE_OVERLAY_SELECTORS,
@@ -39,7 +52,7 @@ import {
39
52
  createElementCaptureSurface,
40
53
  elementToSvg,
41
54
  rasterizeElement
42
- } from "../chunk-TBSPPVTT.js";
55
+ } from "../chunk-XCK7QK5D.js";
43
56
  import {
44
57
  captureInputSchema,
45
58
  captureOutputSize,
@@ -48,7 +61,12 @@ import {
48
61
  resolveCaptureRequest,
49
62
  toCapturedImageData,
50
63
  unionCaptureRects
51
- } from "../chunk-BKMU3V6K.js";
64
+ } from "../chunk-5ED73EC6.js";
65
+ import {
66
+ UNSAFE_JSON_KEYS,
67
+ isUnsafeJsonKey,
68
+ stripPrototypeKeys
69
+ } from "../chunk-HF5QZS7Z.js";
52
70
  import {
53
71
  validateJsonSchema
54
72
  } from "../chunk-V2ZCJRDM.js";
@@ -79,9 +97,13 @@ export {
79
97
  MCP_TOOL_VIEW_EDITOR,
80
98
  TOOL_BRIDGE_DEFAULT_PORT,
81
99
  TOOL_BRIDGE_PROTOCOL,
100
+ TOOL_DISCOVERY_TOOLS,
82
101
  TOOL_NAMESPACE_SEPARATOR,
83
102
  ToolRegistry,
84
103
  ToolRegistryError,
104
+ ToolRegistryView,
105
+ UNSAFE_JSON_KEYS,
106
+ baseToolName,
85
107
  captureInputSchema,
86
108
  captureOutputSize,
87
109
  cloneElementWithStyles,
@@ -92,10 +114,22 @@ export {
92
114
  createMcpServer,
93
115
  createToolRegistry,
94
116
  elementToSvg,
117
+ errorResult,
118
+ isUnsafeJsonKey,
119
+ listSkills,
120
+ parseSkillFrontmatter,
95
121
  rasterizeElement,
122
+ readSkillFile,
96
123
  resolveCaptureRequest,
124
+ searchTokens,
125
+ searchTools,
126
+ stripPrototypeKeys,
127
+ summarize,
97
128
  toCapturedImageData,
98
129
  toToolResult,
130
+ toolsetInstructions,
131
+ toolsetName,
99
132
  unionCaptureRects,
133
+ unknownToolMessage,
100
134
  validateJsonSchema
101
135
  };
@@ -1,4 +1,5 @@
1
- import type { ToolRegistry } from './registry.cjs';
1
+ import type { ToolSource } from './registry.cjs';
2
+ import { type SkillFiles } from './skills.cjs';
2
3
  /** MCP protocol revisions this server speaks, newest first. */
3
4
  export declare const MCP_PROTOCOL_VERSIONS: readonly ["2025-06-18", "2025-03-26", "2024-11-05"];
4
5
  export type JsonRpcId = string | number;
@@ -36,8 +37,18 @@ export interface McpServerOptions {
36
37
  name: string;
37
38
  version: string;
38
39
  title?: string;
39
- /** Usage hints for the client's model, sent in the `initialize` result. */
40
- instructions?: string;
40
+ /**
41
+ * Usage hints for the client's model, sent in the `initialize` result. Pass
42
+ * `toolsetInstructions` (or your own function) to describe the toolsets
43
+ * registered when the client connects.
44
+ */
45
+ instructions?: string | ((source: ToolSource) => string);
46
+ /**
47
+ * Agent skill files to serve as MCP resources (`skill://<name>/SKILL.md` and
48
+ * its reference files) and prompts (one per skill), so a client can load the
49
+ * guide for the tools it uses. See {@link SkillFiles}.
50
+ */
51
+ skills?: SkillFiles;
41
52
  /**
42
53
  * Sends server → client messages (`notifications/tools/list_changed`).
43
54
  * Without it the server still answers requests but announces nothing.
@@ -57,15 +68,22 @@ export interface McpServer {
57
68
  close(): void;
58
69
  }
59
70
  /**
60
- * A transport-agnostic MCP server for a {@link ToolRegistry}: wire `handle`
71
+ * Instructions describing the toolsets of a tool source: what each covers, how
72
+ * tools are named, and which skill documents it. Pass it as
73
+ * `createMcpServer(source, { instructions: toolsetInstructions })`.
74
+ */
75
+ export declare function toolsetInstructions(source: ToolSource): string;
76
+ /**
77
+ * A transport-agnostic MCP server for a {@link ToolRegistry} (or any {@link ToolSource}): wire `handle`
61
78
  * to any transport (stdio lines, a WebSocket, `postMessage`, an HTTP POST
62
79
  * handler) and pass `send` for server → client notifications.
63
80
  *
64
81
  * Supports `initialize` (with protocol version negotiation), `ping`,
65
- * `tools/list`, `tools/call` and `notifications/cancelled` (aborts the
82
+ * `tools/list`, `tools/call`, with `skills` `resources/list`, `resources/read`,
83
+ * `prompts/list` and `prompts/get`, and `notifications/cancelled` (aborts the
66
84
  * call's `signal`), and announces `notifications/tools/list_changed` after
67
85
  * the client sends `notifications/initialized`. An unknown tool is a
68
86
  * JSON-RPC `-32602` error, as the MCP spec asks; invalid arguments and
69
87
  * handler failures are `isError` tool results the model can read and fix.
70
88
  */
71
- export declare function createMcpServer(registry: ToolRegistry, options: McpServerOptions): McpServer;
89
+ export declare function createMcpServer(registry: ToolSource, options: McpServerOptions): McpServer;
@@ -1,4 +1,5 @@
1
- import type { ToolRegistry } from './registry.js';
1
+ import type { ToolSource } from './registry.js';
2
+ import { type SkillFiles } from './skills.js';
2
3
  /** MCP protocol revisions this server speaks, newest first. */
3
4
  export declare const MCP_PROTOCOL_VERSIONS: readonly ["2025-06-18", "2025-03-26", "2024-11-05"];
4
5
  export type JsonRpcId = string | number;
@@ -36,8 +37,18 @@ export interface McpServerOptions {
36
37
  name: string;
37
38
  version: string;
38
39
  title?: string;
39
- /** Usage hints for the client's model, sent in the `initialize` result. */
40
- instructions?: string;
40
+ /**
41
+ * Usage hints for the client's model, sent in the `initialize` result. Pass
42
+ * `toolsetInstructions` (or your own function) to describe the toolsets
43
+ * registered when the client connects.
44
+ */
45
+ instructions?: string | ((source: ToolSource) => string);
46
+ /**
47
+ * Agent skill files to serve as MCP resources (`skill://<name>/SKILL.md` and
48
+ * its reference files) and prompts (one per skill), so a client can load the
49
+ * guide for the tools it uses. See {@link SkillFiles}.
50
+ */
51
+ skills?: SkillFiles;
41
52
  /**
42
53
  * Sends server → client messages (`notifications/tools/list_changed`).
43
54
  * Without it the server still answers requests but announces nothing.
@@ -57,15 +68,22 @@ export interface McpServer {
57
68
  close(): void;
58
69
  }
59
70
  /**
60
- * A transport-agnostic MCP server for a {@link ToolRegistry}: wire `handle`
71
+ * Instructions describing the toolsets of a tool source: what each covers, how
72
+ * tools are named, and which skill documents it. Pass it as
73
+ * `createMcpServer(source, { instructions: toolsetInstructions })`.
74
+ */
75
+ export declare function toolsetInstructions(source: ToolSource): string;
76
+ /**
77
+ * A transport-agnostic MCP server for a {@link ToolRegistry} (or any {@link ToolSource}): wire `handle`
61
78
  * to any transport (stdio lines, a WebSocket, `postMessage`, an HTTP POST
62
79
  * handler) and pass `send` for server → client notifications.
63
80
  *
64
81
  * Supports `initialize` (with protocol version negotiation), `ping`,
65
- * `tools/list`, `tools/call` and `notifications/cancelled` (aborts the
82
+ * `tools/list`, `tools/call`, with `skills` `resources/list`, `resources/read`,
83
+ * `prompts/list` and `prompts/get`, and `notifications/cancelled` (aborts the
66
84
  * call's `signal`), and announces `notifications/tools/list_changed` after
67
85
  * the client sends `notifications/initialized`. An unknown tool is a
68
86
  * JSON-RPC `-32602` error, as the MCP spec asks; invalid arguments and
69
87
  * handler failures are `isError` tool results the model can read and fix.
70
88
  */
71
- export declare function createMcpServer(registry: ToolRegistry, options: McpServerOptions): McpServer;
89
+ export declare function createMcpServer(registry: ToolSource, options: McpServerOptions): McpServer;