@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.
@@ -151,6 +151,26 @@ type McpHttpRequest = {
151
151
  uri: string;
152
152
  capabilityToken: string;
153
153
  signal?: AbortSignal;
154
+ } | {
155
+ /**
156
+ * Invoke a canonical OPERATION by module address, letting the host resolve which
157
+ * application answers it from the operator's provider selection.
158
+ *
159
+ * A surface cannot reach another extension's tool: the router refuses a surface
160
+ * capability token for cross-extension tools (EXT_MCP_008). Naming the operation instead
161
+ * makes the operator's selection the thing that decides, and `fallbackToolName` is what
162
+ * answers while nobody has chosen - so a converted call site is a no-op until someone does.
163
+ *
164
+ * Implementations POST to `mcp/modules/{moduleKey}/operations/{operationKey}/invoke` with
165
+ * `{ argumentsJson, fallbackToolName }`, which answers the same shape the tool route does.
166
+ */
167
+ kind: "invokeOperation";
168
+ moduleKey: string;
169
+ operationKey: string;
170
+ fallbackToolName: string;
171
+ args: unknown;
172
+ capabilityToken: string;
173
+ signal?: AbortSignal;
154
174
  } | McpUploadRequest;
155
175
  /**
156
176
  * Host-side document-upload request (a `kind` of {@link McpHttpRequest}).
@@ -486,6 +506,14 @@ declare class WorkerRemoteDomTransport {
486
506
  * surface with no response AND no further chance of being told to remount).
487
507
  */
488
508
  private reportVersionSkew;
509
+ /**
510
+ * The module-address twin of {@link handleInvokeTool}. Identical in every respect a reader
511
+ * should care about - same token mint, same disposed-before-token short circuit, same
512
+ * token-never-crosses-the-port rule - and deliberately NOT folded into one method with a
513
+ * branch: the two differ only in the request kind they build, and a shared method would put
514
+ * that branch inside the one place where getting the token handling wrong is unrecoverable.
515
+ */
516
+ private handleInvokeOperation;
489
517
  private handleInvokeTool;
490
518
  private handleGetResource;
491
519
  private handleUploadDocument;
@@ -151,6 +151,26 @@ type McpHttpRequest = {
151
151
  uri: string;
152
152
  capabilityToken: string;
153
153
  signal?: AbortSignal;
154
+ } | {
155
+ /**
156
+ * Invoke a canonical OPERATION by module address, letting the host resolve which
157
+ * application answers it from the operator's provider selection.
158
+ *
159
+ * A surface cannot reach another extension's tool: the router refuses a surface
160
+ * capability token for cross-extension tools (EXT_MCP_008). Naming the operation instead
161
+ * makes the operator's selection the thing that decides, and `fallbackToolName` is what
162
+ * answers while nobody has chosen - so a converted call site is a no-op until someone does.
163
+ *
164
+ * Implementations POST to `mcp/modules/{moduleKey}/operations/{operationKey}/invoke` with
165
+ * `{ argumentsJson, fallbackToolName }`, which answers the same shape the tool route does.
166
+ */
167
+ kind: "invokeOperation";
168
+ moduleKey: string;
169
+ operationKey: string;
170
+ fallbackToolName: string;
171
+ args: unknown;
172
+ capabilityToken: string;
173
+ signal?: AbortSignal;
154
174
  } | McpUploadRequest;
155
175
  /**
156
176
  * Host-side document-upload request (a `kind` of {@link McpHttpRequest}).
@@ -486,6 +506,14 @@ declare class WorkerRemoteDomTransport {
486
506
  * surface with no response AND no further chance of being told to remount).
487
507
  */
488
508
  private reportVersionSkew;
509
+ /**
510
+ * The module-address twin of {@link handleInvokeTool}. Identical in every respect a reader
511
+ * should care about - same token mint, same disposed-before-token short circuit, same
512
+ * token-never-crosses-the-port rule - and deliberately NOT folded into one method with a
513
+ * branch: the two differ only in the request kind they build, and a shared method would put
514
+ * that branch inside the one place where getting the token handling wrong is unrecoverable.
515
+ */
516
+ private handleInvokeOperation;
489
517
  private handleInvokeTool;
490
518
  private handleGetResource;
491
519
  private handleUploadDocument;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ethisyscore/extension-runtime",
3
- "version": "1.117.0",
3
+ "version": "1.118.0",
4
4
  "description": "Host + plugin runtime for EthisysCore Contract A (host-rendered) and Contract B (worker remote-runtime) extensions.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",