@ethisyscore/extension-runtime 1.117.0 → 1.118.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.
@@ -655,6 +655,8 @@ function classifyHostError(err) {
655
655
  // src/plugin/createPortMcpTransport.ts
656
656
  var WIRE_INVOKE_TOOL_REQUEST = "ethisys:mcp:invokeTool";
657
657
  var WIRE_INVOKE_TOOL_RESULT = "ethisys:mcp:invokeTool:result";
658
+ var WIRE_INVOKE_OPERATION_REQUEST = "ethisys:mcp:invokeOperation";
659
+ var WIRE_INVOKE_OPERATION_RESULT = "ethisys:mcp:invokeOperation:result";
658
660
  var WIRE_GET_RESOURCE_REQUEST = "ethisys:mcp:getResource";
659
661
  var WIRE_GET_RESOURCE_RESULT = "ethisys:mcp:getResource:result";
660
662
  var WIRE_UPLOAD_DOCUMENT_REQUEST = "ethisys:mcp:uploadDocument";
@@ -665,7 +667,7 @@ function isMcpResultEnvelope(value) {
665
667
  return false;
666
668
  }
667
669
  const v = value;
668
- return (v.type === WIRE_INVOKE_TOOL_RESULT || v.type === WIRE_GET_RESOURCE_RESULT || v.type === WIRE_UPLOAD_DOCUMENT_RESULT) && typeof v.id === "string";
670
+ return (v.type === WIRE_INVOKE_TOOL_RESULT || v.type === WIRE_INVOKE_OPERATION_RESULT || v.type === WIRE_GET_RESOURCE_RESULT || v.type === WIRE_UPLOAD_DOCUMENT_RESULT) && typeof v.id === "string";
669
671
  }
670
672
  function createPortMcpTransport(port, options = {}) {
671
673
  if (port === void 0 || port === null) {
@@ -729,6 +731,14 @@ function createPortMcpTransport(port, options = {}) {
729
731
  const data = await send(WIRE_INVOKE_TOOL_REQUEST, { name, args }, signal);
730
732
  return data;
731
733
  },
734
+ async invokeOperation(moduleKey, operationKey, fallbackToolName, args, signal) {
735
+ const data = await send(
736
+ WIRE_INVOKE_OPERATION_REQUEST,
737
+ { moduleKey, operationKey, fallbackToolName, args },
738
+ signal
739
+ );
740
+ return data;
741
+ },
732
742
  async uploadDocument(meta, buffer, signal) {
733
743
  const data = await send(
734
744
  WIRE_UPLOAD_DOCUMENT_REQUEST,