@pixerate/editor 0.140.4 → 0.142.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.
- package/dist/agent/canvasPlayback.d.cts +15 -0
- package/dist/agent/canvasPlayback.d.ts +15 -0
- package/dist/agent/index.cjs +173 -33
- package/dist/agent/index.d.cts +1 -0
- package/dist/agent/index.d.ts +1 -0
- package/dist/agent/index.js +147 -7
- package/dist/agent/providers.d.cts +12 -1
- package/dist/agent/providers.d.ts +12 -1
- package/dist/agent/types.d.cts +3 -0
- package/dist/agent/types.d.ts +3 -0
- package/dist/animation/index.cjs +2 -2
- package/dist/animation/index.js +1 -1
- package/dist/animation/presence.d.cts +1 -75
- package/dist/animation/presence.d.ts +1 -75
- package/dist/animation-editor/index.cjs +69 -19
- package/dist/animation-editor/index.d.cts +1 -0
- package/dist/animation-editor/index.d.ts +1 -0
- package/dist/animation-editor/index.js +54 -4
- package/dist/animation-editor/playback.d.cts +10 -0
- package/dist/animation-editor/playback.d.ts +10 -0
- package/dist/bridge/cli.cjs +3 -3
- package/dist/bridge/cli.js +2 -2
- package/dist/bridge/index.cjs +3 -3
- package/dist/bridge/index.js +2 -2
- package/dist/canvas/index.cjs +336 -646
- package/dist/canvas/index.d.cts +1 -0
- package/dist/canvas/index.d.ts +1 -0
- package/dist/canvas/index.js +44 -354
- package/dist/canvas/playback.d.cts +14 -0
- package/dist/canvas/playback.d.ts +14 -0
- package/dist/chart/index.cjs +255 -171
- package/dist/chart/index.d.cts +1 -0
- package/dist/chart/index.d.ts +1 -0
- package/dist/chart/index.js +244 -160
- package/dist/chart/playback.d.cts +22 -0
- package/dist/chart/playback.d.ts +22 -0
- package/dist/chunk-54GVEVXS.js +408 -0
- package/dist/{chunk-E747F3D5.js → chunk-CC6WKVIH.js} +86 -5
- package/dist/chunk-DW4CV5H4.js +591 -0
- package/dist/{chunk-UMS6YFA6.js → chunk-EAQ4BGNS.js} +1 -1
- package/dist/{chunk-AGCD3EHB.cjs → chunk-ENIZYNEF.cjs} +7 -7
- package/dist/{chunk-BSGPXPTW.js → chunk-PEEP2YR7.js} +1 -1
- package/dist/{chunk-VTY64I6H.cjs → chunk-QSM3MDDJ.cjs} +85 -85
- package/dist/{chunk-2RUNJYOX.cjs → chunk-QZFEX2N4.cjs} +86 -5
- package/dist/{chunk-RB62U6MS.js → chunk-RFBFTLVN.js} +27 -5
- package/dist/chunk-UBRYHNRU.cjs +591 -0
- package/dist/{chunk-GEY73RUW.cjs → chunk-UJGAA6AK.cjs} +1 -1
- package/dist/{chunk-LMSFXRAJ.js → chunk-VGJTUCWM.js} +1 -1
- package/dist/chunk-X2HQP7DF.cjs +408 -0
- package/dist/chunk-XH32BATE.cjs +68 -0
- package/dist/{chunk-HDK3T2QS.cjs → chunk-Y4BWZB6J.cjs} +29 -7
- package/dist/chunk-Y6SGC6KO.js +68 -0
- package/dist/commands/index.cjs +37 -1
- package/dist/commands/index.js +36 -0
- package/dist/commands/registry.d.cts +11 -0
- package/dist/commands/registry.d.ts +11 -0
- package/dist/diagram/index.cjs +7 -7
- package/dist/diagram/index.js +1 -1
- package/dist/image-editor/index.cjs +108 -16
- package/dist/image-editor/index.d.cts +1 -0
- package/dist/image-editor/index.d.ts +1 -0
- package/dist/image-editor/index.js +107 -15
- package/dist/image-editor/playback.d.cts +22 -0
- package/dist/image-editor/playback.d.ts +22 -0
- package/dist/index.cjs +7 -3
- package/dist/index.js +6 -2
- package/dist/paint-editor/index.cjs +73 -25
- package/dist/paint-editor/index.d.cts +1 -0
- package/dist/paint-editor/index.d.ts +1 -0
- package/dist/paint-editor/index.js +68 -20
- package/dist/paint-editor/playback.d.cts +16 -0
- package/dist/paint-editor/playback.d.ts +16 -0
- package/dist/parameters/index.cjs +32 -8
- package/dist/parameters/index.d.cts +1 -0
- package/dist/parameters/index.d.ts +1 -0
- package/dist/parameters/index.js +28 -4
- package/dist/parameters/playback.d.cts +10 -0
- package/dist/parameters/playback.d.ts +10 -0
- package/dist/spreadsheet/index.cjs +7 -3
- package/dist/spreadsheet/index.d.cts +1 -0
- package/dist/spreadsheet/index.d.ts +1 -0
- package/dist/spreadsheet/index.js +6 -2
- package/dist/spreadsheet/playback.d.cts +15 -0
- package/dist/spreadsheet/playback.d.ts +15 -0
- package/dist/tools/index.cjs +40 -3
- package/dist/tools/index.d.cts +3 -0
- package/dist/tools/index.d.ts +3 -0
- package/dist/tools/index.js +39 -2
- package/dist/tools/playback.d.cts +205 -0
- package/dist/tools/playback.d.ts +205 -0
- package/dist/tools/presence.d.cts +82 -0
- package/dist/tools/presence.d.ts +82 -0
- package/dist/tools/registry.d.cts +45 -6
- package/dist/tools/registry.d.ts +45 -6
- package/dist/tools/script.d.cts +77 -0
- package/dist/tools/script.d.ts +77 -0
- package/dist/tools/view.d.cts +2 -4
- package/dist/tools/view.d.ts +2 -4
- package/dist/vector/index.cjs +217 -100
- package/dist/vector/index.d.cts +1 -0
- package/dist/vector/index.d.ts +1 -0
- package/dist/vector/index.js +140 -23
- package/dist/vector/playback.d.cts +13 -0
- package/dist/vector/playback.d.ts +13 -0
- package/dist/video-editor/index.cjs +81 -28
- package/dist/video-editor/index.d.cts +1 -0
- package/dist/video-editor/index.d.ts +1 -0
- package/dist/video-editor/index.js +58 -5
- package/dist/video-editor/playback.d.cts +20 -0
- package/dist/video-editor/playback.d.ts +20 -0
- package/package.json +1 -1
- package/skills/pixerate-agent-tools/SKILL.md +13 -0
- package/skills/pixerate-animation-editor/SKILL.md +1 -0
- package/skills/pixerate-canvas/SKILL.md +3 -0
- package/skills/pixerate-chart/SKILL.md +1 -0
- package/skills/pixerate-image-editor/SKILL.md +2 -2
- package/skills/pixerate-paint-editor/SKILL.md +1 -0
- package/skills/pixerate-parameters/SKILL.md +1 -0
- package/skills/pixerate-spreadsheet/SKILL.md +1 -0
- package/skills/pixerate-vector/SKILL.md +5 -0
- package/skills/pixerate-video-editor/SKILL.md +1 -0
- package/dist/chunk-BTZS3KZY.js +0 -221
- package/dist/chunk-K73HMKQP.js +0 -0
- package/dist/chunk-LACYURUW.cjs +0 -1
- package/dist/chunk-MRD3NXKR.cjs +0 -221
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
+
|
|
28
29
|
|
|
29
30
|
|
|
30
31
|
var _chunk55AKPTLMcjs = require('./chunk-55AKPTLM.cjs');
|
|
@@ -2947,16 +2948,16 @@ var FormulaEvaluator = (_class2 = class {
|
|
|
2947
2948
|
const value = this.evaluateNode(argument);
|
|
2948
2949
|
if (!Array.isArray(value)) return value;
|
|
2949
2950
|
if (value.length <= 1) return firstValue(value);
|
|
2950
|
-
const
|
|
2951
|
-
if (argument.type === "Range" &&
|
|
2951
|
+
const cell2 = _optionalChain([this, 'access', _5 => _5.context, 'access', _6 => _6.getFormulaCell, 'optionalCall', _7 => _7()]);
|
|
2952
|
+
if (argument.type === "Range" && cell2) {
|
|
2952
2953
|
const range = _chunk55AKPTLMcjs.toFormulaRange.call(void 0, value);
|
|
2953
2954
|
const top = Math.min(argument.startRow, argument.endRow);
|
|
2954
2955
|
const left = Math.min(_chunk55AKPTLMcjs.colNameToIndex.call(void 0, argument.startCol), _chunk55AKPTLMcjs.colNameToIndex.call(void 0, argument.endCol));
|
|
2955
2956
|
if (range.cols === 1) {
|
|
2956
|
-
const r =
|
|
2957
|
+
const r = cell2.row - top;
|
|
2957
2958
|
if (r >= 0 && r < range.rows) return range.values[r];
|
|
2958
2959
|
} else if (range.rows === 1) {
|
|
2959
|
-
const c = _chunk55AKPTLMcjs.colNameToIndex.call(void 0,
|
|
2960
|
+
const c = _chunk55AKPTLMcjs.colNameToIndex.call(void 0, cell2.col) - left;
|
|
2960
2961
|
if (c >= 0 && c < range.cols) return range.values[c];
|
|
2961
2962
|
}
|
|
2962
2963
|
return this.fail("#VALUE!", `The @ operator found no cell of ${argument.raw} in the formula's row or column.`);
|
|
@@ -3757,6 +3758,86 @@ function getFillDirection(source, target) {
|
|
|
3757
3758
|
return null;
|
|
3758
3759
|
}
|
|
3759
3760
|
|
|
3761
|
+
// src/spreadsheet/playback.ts
|
|
3762
|
+
var CELL = /^\s*\$?([A-Za-z]{1,3})\$?(\d+)\s*$/;
|
|
3763
|
+
var COL = /^\s*([A-Za-z]{1,3})\s*$/;
|
|
3764
|
+
var ROW = /^\s*(\d+)\s*$/;
|
|
3765
|
+
function parseSpreadsheetPlaybackRef(ref) {
|
|
3766
|
+
const [a, b = a] = ref.id.split(":");
|
|
3767
|
+
if (!a) return null;
|
|
3768
|
+
if (ref.kind === "cell") {
|
|
3769
|
+
const s = CELL.exec(a);
|
|
3770
|
+
const e = CELL.exec(b);
|
|
3771
|
+
if (!s || !e) return null;
|
|
3772
|
+
const r = [Number(s[2]) - 1, Number(e[2]) - 1];
|
|
3773
|
+
const c = [_chunk55AKPTLMcjs.colNameToIndex.call(void 0, s[1].toUpperCase()), _chunk55AKPTLMcjs.colNameToIndex.call(void 0, e[1].toUpperCase())];
|
|
3774
|
+
return { startRow: Math.min(r[0], r[1]), endRow: Math.max(r[0], r[1]), startCol: Math.min(c[0], c[1]), endCol: Math.max(c[0], c[1]) };
|
|
3775
|
+
}
|
|
3776
|
+
if (ref.kind === "row") {
|
|
3777
|
+
const s = ROW.exec(a);
|
|
3778
|
+
const e = ROW.exec(b);
|
|
3779
|
+
if (!s || !e) return null;
|
|
3780
|
+
return { startRow: Math.min(+s[1], +e[1]) - 1, endRow: Math.max(+s[1], +e[1]) - 1, startCol: null, endCol: null };
|
|
3781
|
+
}
|
|
3782
|
+
if (ref.kind === "column") {
|
|
3783
|
+
const s = COL.exec(a);
|
|
3784
|
+
const e = COL.exec(b);
|
|
3785
|
+
if (!s || !e) return null;
|
|
3786
|
+
const c = [_chunk55AKPTLMcjs.colNameToIndex.call(void 0, s[1].toUpperCase()), _chunk55AKPTLMcjs.colNameToIndex.call(void 0, e[1].toUpperCase())];
|
|
3787
|
+
return { startRow: null, endRow: null, startCol: Math.min(c[0], c[1]), endCol: Math.max(c[0], c[1]) };
|
|
3788
|
+
}
|
|
3789
|
+
return null;
|
|
3790
|
+
}
|
|
3791
|
+
var cell = (id) => ({ kind: "cell", id });
|
|
3792
|
+
var shown = (v) => {
|
|
3793
|
+
if (v === null || v === void 0 || v === "") return null;
|
|
3794
|
+
const text = String(v);
|
|
3795
|
+
return text.length > 40 ? `${text.slice(0, 39)}\u2026` : text;
|
|
3796
|
+
};
|
|
3797
|
+
function planSpreadsheetToolPlayback(tool, args) {
|
|
3798
|
+
const count = Number.isInteger(args.count) && args.count > 0 ? args.count : 1;
|
|
3799
|
+
switch (tool) {
|
|
3800
|
+
case "set_cell": {
|
|
3801
|
+
if (typeof args.cell !== "string") return null;
|
|
3802
|
+
const value = shown(args.value);
|
|
3803
|
+
return [{ type: "target", ref: cell(args.cell) }, { type: "press" }, { type: "release" }, ...value ? [{ type: "type", text: value }] : []];
|
|
3804
|
+
}
|
|
3805
|
+
case "set_range": {
|
|
3806
|
+
const start = typeof args.start === "string" ? CELL.exec(args.start) : null;
|
|
3807
|
+
const rows = Array.isArray(args.values) ? args.values : [];
|
|
3808
|
+
if (!start || !rows.length) return null;
|
|
3809
|
+
const width = Math.max(1, ...rows.map((r) => Array.isArray(r) ? r.length : 1));
|
|
3810
|
+
const col = _chunk55AKPTLMcjs.colNameToIndex.call(void 0, start[1].toUpperCase());
|
|
3811
|
+
const end = `${_chunk55AKPTLMcjs.indexToColName.call(void 0, col + width - 1)}${Number(start[2]) + rows.length - 1}`;
|
|
3812
|
+
const first = shown(rows.flat().find((v) => v !== null && v !== void 0 && v !== ""));
|
|
3813
|
+
return [
|
|
3814
|
+
{ type: "target", ref: cell(args.start) },
|
|
3815
|
+
{ type: "press" },
|
|
3816
|
+
{ type: "target", ref: cell(`${args.start}:${end}`) },
|
|
3817
|
+
{ type: "release" },
|
|
3818
|
+
...first ? [{ type: "type", text: first }] : []
|
|
3819
|
+
];
|
|
3820
|
+
}
|
|
3821
|
+
case "insert_rows":
|
|
3822
|
+
case "delete_rows": {
|
|
3823
|
+
const from = Number(tool === "insert_rows" ? args.before : args.start);
|
|
3824
|
+
if (!Number.isInteger(from) || from < 1) return null;
|
|
3825
|
+
return [{ type: "target", ref: { kind: "row", id: `${from}:${from + count - 1}` } }, { type: "press" }, { type: "release" }];
|
|
3826
|
+
}
|
|
3827
|
+
case "insert_columns":
|
|
3828
|
+
case "delete_columns": {
|
|
3829
|
+
const from = String(tool === "insert_columns" ? args.before : _nullishCoalesce(args.start, () => ( "")));
|
|
3830
|
+
if (!COL.test(from)) return null;
|
|
3831
|
+
const index = _chunk55AKPTLMcjs.colNameToIndex.call(void 0, from.trim().toUpperCase());
|
|
3832
|
+
return [{ type: "target", ref: { kind: "column", id: `${_chunk55AKPTLMcjs.indexToColName.call(void 0, index)}:${_chunk55AKPTLMcjs.indexToColName.call(void 0, index + count - 1)}` } }, { type: "press" }, { type: "release" }];
|
|
3833
|
+
}
|
|
3834
|
+
default:
|
|
3835
|
+
return null;
|
|
3836
|
+
}
|
|
3837
|
+
}
|
|
3838
|
+
|
|
3839
|
+
|
|
3840
|
+
|
|
3760
3841
|
|
|
3761
3842
|
|
|
3762
3843
|
|
|
@@ -3795,4 +3876,4 @@ function getFillDirection(source, target) {
|
|
|
3795
3876
|
|
|
3796
3877
|
|
|
3797
3878
|
|
|
3798
|
-
exports.tokenizeFormula = tokenizeFormula; exports.WHOLE_COLUMN_END_ROW = WHOLE_COLUMN_END_ROW; exports.parseCellReference = parseCellReference; exports.parseRange = parseRange; exports.FormulaParser = FormulaParser; exports.parseFormula = parseFormula; exports.FormulaLambda = FormulaLambda; exports.isFormulaLambda = isFormulaLambda; exports.MAX_LAMBDA_DEPTH = MAX_LAMBDA_DEPTH; exports.wildcardToRegExp = wildcardToRegExp; exports.parseCriteria = parseCriteria; exports.registerFormulaFunction = registerFormulaFunction; exports.unregisterFormulaFunction = unregisterFormulaFunction; exports.getFormulaFunction = getFormulaFunction; exports.listFormulaFunctions = listFormulaFunctions; exports.searchFormulaFunctions = searchFormulaFunctions; exports.getFormulaArgumentSpecIndex = getFormulaArgumentSpecIndex; exports.checkFormulaArgumentCount = checkFormulaArgumentCount; exports.getFormulaSignatureParts = getFormulaSignatureParts; exports.getFormulaSignature = getFormulaSignature; exports.describeFormulaError = describeFormulaError; exports.MAX_FORMULA_ARRAY_SIZE = MAX_FORMULA_ARRAY_SIZE; exports.FormulaEvaluator = FormulaEvaluator; exports.normalizeRange = normalizeRange; exports.rangeContains = rangeContains; exports.rangesIntersect = rangesIntersect; exports.rangeContainsRange = rangeContainsRange; exports.isSingleCellRange = isSingleCellRange; exports.isBlankValue = isBlankValue; exports.toNumber = toNumber2; exports.compareCellValues = compareCellValues; exports.matchesFilterRule = matchesFilterRule; exports.aggregateValues = aggregateValues; exports.roundFloat = roundFloat; exports.fillSeries = fillSeries; exports.computeFillTarget = computeFillTarget; exports.getFillDirection = getFillDirection;
|
|
3879
|
+
exports.tokenizeFormula = tokenizeFormula; exports.WHOLE_COLUMN_END_ROW = WHOLE_COLUMN_END_ROW; exports.parseCellReference = parseCellReference; exports.parseRange = parseRange; exports.FormulaParser = FormulaParser; exports.parseFormula = parseFormula; exports.FormulaLambda = FormulaLambda; exports.isFormulaLambda = isFormulaLambda; exports.MAX_LAMBDA_DEPTH = MAX_LAMBDA_DEPTH; exports.wildcardToRegExp = wildcardToRegExp; exports.parseCriteria = parseCriteria; exports.registerFormulaFunction = registerFormulaFunction; exports.unregisterFormulaFunction = unregisterFormulaFunction; exports.getFormulaFunction = getFormulaFunction; exports.listFormulaFunctions = listFormulaFunctions; exports.searchFormulaFunctions = searchFormulaFunctions; exports.getFormulaArgumentSpecIndex = getFormulaArgumentSpecIndex; exports.checkFormulaArgumentCount = checkFormulaArgumentCount; exports.getFormulaSignatureParts = getFormulaSignatureParts; exports.getFormulaSignature = getFormulaSignature; exports.describeFormulaError = describeFormulaError; exports.MAX_FORMULA_ARRAY_SIZE = MAX_FORMULA_ARRAY_SIZE; exports.FormulaEvaluator = FormulaEvaluator; exports.normalizeRange = normalizeRange; exports.rangeContains = rangeContains; exports.rangesIntersect = rangesIntersect; exports.rangeContainsRange = rangeContainsRange; exports.isSingleCellRange = isSingleCellRange; exports.isBlankValue = isBlankValue; exports.toNumber = toNumber2; exports.compareCellValues = compareCellValues; exports.matchesFilterRule = matchesFilterRule; exports.aggregateValues = aggregateValues; exports.roundFloat = roundFloat; exports.fillSeries = fillSeries; exports.computeFillTarget = computeFillTarget; exports.getFillDirection = getFillDirection; exports.parseSpreadsheetPlaybackRef = parseSpreadsheetPlaybackRef; exports.planSpreadsheetToolPlayback = planSpreadsheetToolPlayback;
|
|
@@ -413,7 +413,7 @@ function readTools(provider) {
|
|
|
413
413
|
return typeof provider.tools === "function" ? provider.tools() : provider.tools;
|
|
414
414
|
}
|
|
415
415
|
function toDefinition2(name, tool) {
|
|
416
|
-
const { handler: _handler, name: _name, ...rest } = tool;
|
|
416
|
+
const { handler: _handler, name: _name, plan: _plan, playback: _playback, ...rest } = tool;
|
|
417
417
|
return { name, ...rest };
|
|
418
418
|
}
|
|
419
419
|
function errorResult(error) {
|
|
@@ -442,6 +442,7 @@ var ToolRegistry = class {
|
|
|
442
442
|
capabilities = { tools: { listChanged: true } };
|
|
443
443
|
entries = [];
|
|
444
444
|
listeners = /* @__PURE__ */ new Set();
|
|
445
|
+
middleware = [];
|
|
445
446
|
options;
|
|
446
447
|
timer = null;
|
|
447
448
|
lastSignature;
|
|
@@ -502,6 +503,17 @@ var ToolRegistry = class {
|
|
|
502
503
|
this.notifyListChanged();
|
|
503
504
|
return true;
|
|
504
505
|
}
|
|
506
|
+
/**
|
|
507
|
+
* Adds a middleware that wraps every tool call (first added runs outermost), e.g. agent
|
|
508
|
+
* playback's `playback.middleware`. Returns a function that removes it.
|
|
509
|
+
*/
|
|
510
|
+
use(middleware) {
|
|
511
|
+
this.middleware.push(middleware);
|
|
512
|
+
return () => {
|
|
513
|
+
const index = this.middleware.indexOf(middleware);
|
|
514
|
+
if (index !== -1) this.middleware.splice(index, 1);
|
|
515
|
+
};
|
|
516
|
+
}
|
|
505
517
|
/** Registered provider ids in registration order. */
|
|
506
518
|
providerIds() {
|
|
507
519
|
return this.entries.map((e) => e.provider.id);
|
|
@@ -609,11 +621,16 @@ var ToolRegistry = class {
|
|
|
609
621
|
}
|
|
610
622
|
}
|
|
611
623
|
try {
|
|
612
|
-
const
|
|
624
|
+
const context = {
|
|
613
625
|
name,
|
|
614
626
|
providerId: found.provider.id,
|
|
615
|
-
signal: options.signal
|
|
616
|
-
|
|
627
|
+
signal: options.signal,
|
|
628
|
+
...options.actor ? { actor: options.actor } : {}
|
|
629
|
+
};
|
|
630
|
+
const call = { name, tool: found.tool, provider: found.provider, args: input, context };
|
|
631
|
+
const chain = [...this.middleware];
|
|
632
|
+
const run = async (i) => i < chain.length ? chain[i](call, () => run(i + 1)) : found.tool.handler(call.args, context);
|
|
633
|
+
const value = await run(0);
|
|
617
634
|
return toToolResult(value);
|
|
618
635
|
} catch (error) {
|
|
619
636
|
return errorResult({
|
|
@@ -896,6 +913,7 @@ function createMcpServer(registry, options) {
|
|
|
896
913
|
};
|
|
897
914
|
const readSkillPath = (path) => skillFiles?.[path] ?? skillFiles?.[`./${path}`];
|
|
898
915
|
let initialized = false;
|
|
916
|
+
let actor;
|
|
899
917
|
let unsubscribe = null;
|
|
900
918
|
const running = /* @__PURE__ */ new Map();
|
|
901
919
|
const startNotifications = () => {
|
|
@@ -909,6 +927,10 @@ function createMcpServer(registry, options) {
|
|
|
909
927
|
const params = request.params ?? {};
|
|
910
928
|
switch (request.method) {
|
|
911
929
|
case "initialize": {
|
|
930
|
+
const client = params.clientInfo;
|
|
931
|
+
if (client && typeof client.name === "string" && client.name) {
|
|
932
|
+
actor = { id: `mcp:${client.name}`, name: typeof client.title === "string" && client.title ? client.title : client.name };
|
|
933
|
+
}
|
|
912
934
|
const instructions = typeof options.instructions === "function" ? options.instructions(registry) : options.instructions;
|
|
913
935
|
const requested = String(params.protocolVersion ?? "");
|
|
914
936
|
const protocolVersion = MCP_PROTOCOL_VERSIONS.includes(requested) ? requested : MCP_PROTOCOL_VERSIONS[0];
|
|
@@ -951,7 +973,7 @@ function createMcpServer(registry, options) {
|
|
|
951
973
|
const controller = new AbortController();
|
|
952
974
|
if (!isNotification) running.set(id, controller);
|
|
953
975
|
try {
|
|
954
|
-
const result = await registry.callTool(name, args ?? {}, { signal: controller.signal });
|
|
976
|
+
const result = await registry.callTool(name, args ?? {}, { signal: controller.signal, ...actor ? { actor } : {} });
|
|
955
977
|
if (controller.signal.aborted) return null;
|
|
956
978
|
return { jsonrpc: "2.0", id, result };
|
|
957
979
|
} finally {
|