@ethisyscore/extension-runtime 1.136.0 → 1.137.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.
- package/README.md +2 -2
- package/dist/MockPluginStorage-BM3bq99B.d.cts +35 -0
- package/dist/MockPluginStorage-BndTX2RR.d.ts +35 -0
- package/dist/{bridge-client-RJOl8WlU.d.ts → bridge-client-CkxYcZcm.d.ts} +1 -1
- package/dist/{bridge-client-D9EYFq1l.d.cts → bridge-client-DkogtCvn.d.cts} +1 -1
- package/dist/{bridge-envelopes-M5a42rAy.d.cts → bridge-envelopes-BcKu-nQm.d.cts} +72 -1
- package/dist/{bridge-envelopes-M5a42rAy.d.ts → bridge-envelopes-BcKu-nQm.d.ts} +72 -1
- package/dist/host/index.cjs +57 -2
- package/dist/host/index.cjs.map +1 -1
- package/dist/host/index.d.cts +3 -3
- package/dist/host/index.d.ts +3 -3
- package/dist/host/index.js +57 -2
- package/dist/host/index.js.map +1 -1
- package/dist/mock-host/cli.cjs +273 -7
- package/dist/mock-host/cli.cjs.map +1 -1
- package/dist/mock-host/cli.d.cts +10 -3
- package/dist/mock-host/cli.d.ts +10 -3
- package/dist/mock-host/cli.js +272 -8
- package/dist/mock-host/cli.js.map +1 -1
- package/dist/mock-host/index.cjs +236 -1
- package/dist/mock-host/index.cjs.map +1 -1
- package/dist/mock-host/index.d.cts +14 -4
- package/dist/mock-host/index.d.ts +14 -4
- package/dist/mock-host/index.js +236 -2
- package/dist/mock-host/index.js.map +1 -1
- package/dist/plugin/index.cjs +378 -100
- package/dist/plugin/index.cjs.map +1 -1
- package/dist/plugin/index.d.cts +171 -6
- package/dist/plugin/index.d.ts +171 -6
- package/dist/plugin/index.js +366 -101
- package/dist/plugin/index.js.map +1 -1
- package/dist/{transport-UaoDRdm3.d.cts → transport-D1lE-5nt.d.cts} +30 -3
- package/dist/{transport-CFzJQiFG.d.ts → transport-INVtDo2s.d.ts} +30 -3
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { U as UploadDocumentMeta, d as BridgePushThemeEnvelope, c as BridgePushLocaleEnvelope, b as BridgePushDensityEnvelope, a as BridgePushA11yEnvelope, B as BridgeNavPushEnvelope } from './bridge-envelopes-
|
|
1
|
+
import { U as UploadDocumentMeta, g as UploadToStorageMeta, d as BridgePushThemeEnvelope, c as BridgePushLocaleEnvelope, b as BridgePushDensityEnvelope, a as BridgePushA11yEnvelope, B as BridgeNavPushEnvelope } from './bridge-envelopes-BcKu-nQm.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Version-skew detection for host-side MCP calls.
|
|
@@ -186,7 +186,7 @@ type McpHttpRequest = {
|
|
|
186
186
|
fallbackArgs?: unknown;
|
|
187
187
|
capabilityToken: string;
|
|
188
188
|
signal?: AbortSignal;
|
|
189
|
-
} | McpUploadRequest;
|
|
189
|
+
} | McpUploadRequest | McpUploadToStorageRequest;
|
|
190
190
|
/**
|
|
191
191
|
* Host-side document-upload request (a `kind` of {@link McpHttpRequest}).
|
|
192
192
|
* Carries the transferred bytes + advisory metadata plus the host-minted
|
|
@@ -203,12 +203,38 @@ interface McpUploadRequest {
|
|
|
203
203
|
capabilityToken: string;
|
|
204
204
|
signal?: AbortSignal;
|
|
205
205
|
}
|
|
206
|
+
/**
|
|
207
|
+
* Host-side plugin-storage upload request (a `kind` of {@link McpHttpRequest}): a browser file
|
|
208
|
+
* streamed into the calling app's OWN plugin storage, as opposed to {@link McpUploadRequest}'s
|
|
209
|
+
* legacy CORE `StoredDocument`.
|
|
210
|
+
*
|
|
211
|
+
* Implementations POST `buffer` as `application/octet-stream` (at most 30 MB) to the kernel's
|
|
212
|
+
* capability-token-authed `extensions/storage/upload-stream` route, with headers
|
|
213
|
+
* `x-cc-storage-prefix: meta.pathPrefix` (required), `x-cc-file-name: meta.fileName` and
|
|
214
|
+
* `x-cc-content-type: meta.contentType`. No module key is sent: the kernel derives the namespace
|
|
215
|
+
* from the token. `data` on success is the route's `{ path, fileName, contentType, sizeBytes }`
|
|
216
|
+
* (an {@link UploadToStorageResult}).
|
|
217
|
+
*
|
|
218
|
+
* On failure, return `{ ok: false, error: <the body's error>, status: <HTTP status> }` (or throw
|
|
219
|
+
* an error carrying `status`). The status is forwarded to the plugin for this kind, which is how
|
|
220
|
+
* it tells 413 (too large) from 507 (quota) from 503 (storage lock busy).
|
|
221
|
+
*/
|
|
222
|
+
interface McpUploadToStorageRequest {
|
|
223
|
+
kind: "uploadToStorage";
|
|
224
|
+
meta: UploadToStorageMeta;
|
|
225
|
+
buffer: ArrayBuffer;
|
|
226
|
+
capabilityToken: string;
|
|
227
|
+
signal?: AbortSignal;
|
|
228
|
+
}
|
|
206
229
|
/**
|
|
207
230
|
* Host-side HTTP client for MCP calls. Implementations are responsible for
|
|
208
231
|
* carrying the supplied `capabilityToken` on the outbound request (typically
|
|
209
232
|
* via `Authorization: Bearer` / `PluginCap`). The `uploadDocument` kind is
|
|
210
233
|
* additive — implementations that predate it fall through to their unknown-kind
|
|
211
234
|
* branch until updated (the FE upload hook is inert until the host handles it).
|
|
235
|
+
* The same holds for `uploadToStorage`; a host that switches exhaustively over
|
|
236
|
+
* `McpHttpRequest["kind"]` stops compiling until it routes the new kind, which
|
|
237
|
+
* is intended.
|
|
212
238
|
*/
|
|
213
239
|
interface McpHttpClient {
|
|
214
240
|
/**
|
|
@@ -532,7 +558,8 @@ declare class WorkerRemoteDomTransport {
|
|
|
532
558
|
private handleInvokeTool;
|
|
533
559
|
private handleGetResource;
|
|
534
560
|
private handleUploadDocument;
|
|
561
|
+
private handleUploadToStorage;
|
|
535
562
|
private replyError;
|
|
536
563
|
}
|
|
537
564
|
|
|
538
|
-
export { CAPABILITY_REJECTION_REASON_HEADER as C, DEFAULT_MAX_CONCURRENT_MCP_REQUESTS as D, EXTENSION_ACTIVE_VERSION_HEADER as E, type InputEventPayload as I, type McpHttpClient as M, VERSION_MISMATCH_REASON as V, WORKER_TRANSPORT_PROTOCOL as W, EXTENSION_VERSION_HEADER as a, type McpHttpRequest as b, type McpHttpResponse as c, type McpResponseMetadata as d, type McpUploadRequest as e, type
|
|
565
|
+
export { CAPABILITY_REJECTION_REASON_HEADER as C, DEFAULT_MAX_CONCURRENT_MCP_REQUESTS as D, EXTENSION_ACTIVE_VERSION_HEADER as E, type InputEventPayload as I, type McpHttpClient as M, VERSION_MISMATCH_REASON as V, WORKER_TRANSPORT_PROTOCOL as W, EXTENSION_VERSION_HEADER as a, type McpHttpRequest as b, type McpHttpResponse as c, type McpResponseMetadata as d, type McpUploadRequest as e, type McpUploadToStorageRequest as f, type VersionSkew as g, type VersionSkewSource as h, type WorkerCtor as i, type WorkerHandshakePayload as j, type WorkerLike as k, WorkerRemoteDomTransport as l, type WorkerRemoteDomTransportOptions as m, detectVersionSkew as n };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { U as UploadDocumentMeta, d as BridgePushThemeEnvelope, c as BridgePushLocaleEnvelope, b as BridgePushDensityEnvelope, a as BridgePushA11yEnvelope, B as BridgeNavPushEnvelope } from './bridge-envelopes-
|
|
1
|
+
import { U as UploadDocumentMeta, g as UploadToStorageMeta, d as BridgePushThemeEnvelope, c as BridgePushLocaleEnvelope, b as BridgePushDensityEnvelope, a as BridgePushA11yEnvelope, B as BridgeNavPushEnvelope } from './bridge-envelopes-BcKu-nQm.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Version-skew detection for host-side MCP calls.
|
|
@@ -186,7 +186,7 @@ type McpHttpRequest = {
|
|
|
186
186
|
fallbackArgs?: unknown;
|
|
187
187
|
capabilityToken: string;
|
|
188
188
|
signal?: AbortSignal;
|
|
189
|
-
} | McpUploadRequest;
|
|
189
|
+
} | McpUploadRequest | McpUploadToStorageRequest;
|
|
190
190
|
/**
|
|
191
191
|
* Host-side document-upload request (a `kind` of {@link McpHttpRequest}).
|
|
192
192
|
* Carries the transferred bytes + advisory metadata plus the host-minted
|
|
@@ -203,12 +203,38 @@ interface McpUploadRequest {
|
|
|
203
203
|
capabilityToken: string;
|
|
204
204
|
signal?: AbortSignal;
|
|
205
205
|
}
|
|
206
|
+
/**
|
|
207
|
+
* Host-side plugin-storage upload request (a `kind` of {@link McpHttpRequest}): a browser file
|
|
208
|
+
* streamed into the calling app's OWN plugin storage, as opposed to {@link McpUploadRequest}'s
|
|
209
|
+
* legacy CORE `StoredDocument`.
|
|
210
|
+
*
|
|
211
|
+
* Implementations POST `buffer` as `application/octet-stream` (at most 30 MB) to the kernel's
|
|
212
|
+
* capability-token-authed `extensions/storage/upload-stream` route, with headers
|
|
213
|
+
* `x-cc-storage-prefix: meta.pathPrefix` (required), `x-cc-file-name: meta.fileName` and
|
|
214
|
+
* `x-cc-content-type: meta.contentType`. No module key is sent: the kernel derives the namespace
|
|
215
|
+
* from the token. `data` on success is the route's `{ path, fileName, contentType, sizeBytes }`
|
|
216
|
+
* (an {@link UploadToStorageResult}).
|
|
217
|
+
*
|
|
218
|
+
* On failure, return `{ ok: false, error: <the body's error>, status: <HTTP status> }` (or throw
|
|
219
|
+
* an error carrying `status`). The status is forwarded to the plugin for this kind, which is how
|
|
220
|
+
* it tells 413 (too large) from 507 (quota) from 503 (storage lock busy).
|
|
221
|
+
*/
|
|
222
|
+
interface McpUploadToStorageRequest {
|
|
223
|
+
kind: "uploadToStorage";
|
|
224
|
+
meta: UploadToStorageMeta;
|
|
225
|
+
buffer: ArrayBuffer;
|
|
226
|
+
capabilityToken: string;
|
|
227
|
+
signal?: AbortSignal;
|
|
228
|
+
}
|
|
206
229
|
/**
|
|
207
230
|
* Host-side HTTP client for MCP calls. Implementations are responsible for
|
|
208
231
|
* carrying the supplied `capabilityToken` on the outbound request (typically
|
|
209
232
|
* via `Authorization: Bearer` / `PluginCap`). The `uploadDocument` kind is
|
|
210
233
|
* additive — implementations that predate it fall through to their unknown-kind
|
|
211
234
|
* branch until updated (the FE upload hook is inert until the host handles it).
|
|
235
|
+
* The same holds for `uploadToStorage`; a host that switches exhaustively over
|
|
236
|
+
* `McpHttpRequest["kind"]` stops compiling until it routes the new kind, which
|
|
237
|
+
* is intended.
|
|
212
238
|
*/
|
|
213
239
|
interface McpHttpClient {
|
|
214
240
|
/**
|
|
@@ -532,7 +558,8 @@ declare class WorkerRemoteDomTransport {
|
|
|
532
558
|
private handleInvokeTool;
|
|
533
559
|
private handleGetResource;
|
|
534
560
|
private handleUploadDocument;
|
|
561
|
+
private handleUploadToStorage;
|
|
535
562
|
private replyError;
|
|
536
563
|
}
|
|
537
564
|
|
|
538
|
-
export { CAPABILITY_REJECTION_REASON_HEADER as C, DEFAULT_MAX_CONCURRENT_MCP_REQUESTS as D, EXTENSION_ACTIVE_VERSION_HEADER as E, type InputEventPayload as I, type McpHttpClient as M, VERSION_MISMATCH_REASON as V, WORKER_TRANSPORT_PROTOCOL as W, EXTENSION_VERSION_HEADER as a, type McpHttpRequest as b, type McpHttpResponse as c, type McpResponseMetadata as d, type McpUploadRequest as e, type
|
|
565
|
+
export { CAPABILITY_REJECTION_REASON_HEADER as C, DEFAULT_MAX_CONCURRENT_MCP_REQUESTS as D, EXTENSION_ACTIVE_VERSION_HEADER as E, type InputEventPayload as I, type McpHttpClient as M, VERSION_MISMATCH_REASON as V, WORKER_TRANSPORT_PROTOCOL as W, EXTENSION_VERSION_HEADER as a, type McpHttpRequest as b, type McpHttpResponse as c, type McpResponseMetadata as d, type McpUploadRequest as e, type McpUploadToStorageRequest as f, type VersionSkew as g, type VersionSkewSource as h, type WorkerCtor as i, type WorkerHandshakePayload as j, type WorkerLike as k, WorkerRemoteDomTransport as l, type WorkerRemoteDomTransportOptions as m, detectVersionSkew as n };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ethisyscore/extension-runtime",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.137.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",
|