@mcp-b/do-runtime 0.5.0 → 0.6.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/CHANGELOG.md +12 -0
- package/README.md +24 -3
- package/dist/chunks/{io-context-RmmjNtwm.js → io-context-BBgKEsdR.js} +12 -3
- package/dist/chunks/{io-context-RmmjNtwm.js.map → io-context-BBgKEsdR.js.map} +1 -1
- package/dist/conformance/host.d.ts +16 -2
- package/dist/conformance.js.map +1 -1
- package/dist/gate.js +1 -1
- package/dist/index.js +586 -191
- package/dist/index.js.map +1 -1
- package/dist/src/api/actor-state.d.ts +30 -21
- package/dist/src/api/global-scope.d.ts +12 -3
- package/dist/src/api/web-socket.d.ts +88 -73
- package/dist/src/index.d.ts +4 -4
- package/dist/src/io/io-context.d.ts +1 -0
- package/dist/src/server/actor-container.d.ts +16 -2
- package/package.json +1 -1
package/dist/conformance.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conformance.js","names":[],"sources":["../conformance/host.ts"],"sourcesContent":["/**\n * The conformance harness the suite writes against.\n *\n * The workerd lane is the ORACLE, not a third implementation — this package is\n * deliberately absent from it. So a test has exactly one meaning: \"workerd does\n * X\" and \"our runtime does X\" are the same assertion, executed twice.\n *\n * Probe classes are dependency-free (see fixtures/probe.ts), which is why the\n * workerd lane needs no vendored-source aliases and CI's filtered vendor\n * install never bites. Anything that would need vendored `think` or `agents`\n * to express is agent-logic testing and belongs in the extension's integration\n * lanes instead.\n */\n\nexport type Capability =\n /** Deterministic clock. Node lane only — a 30s ladder is not assertable on wall time. */\n | \"fake-time\"\n /** Kill without cleanup: worker.terminate() or dropping the container. */\n | \"real-crash\"\n /** Substrate boundary:
|
|
1
|
+
{"version":3,"file":"conformance.js","names":[],"sources":["../conformance/host.ts"],"sourcesContent":["/**\n * The conformance harness the suite writes against.\n *\n * The workerd lane is the ORACLE, not a third implementation — this package is\n * deliberately absent from it. So a test has exactly one meaning: \"workerd does\n * X\" and \"our runtime does X\" are the same assertion, executed twice.\n *\n * Probe classes are dependency-free (see fixtures/probe.ts), which is why the\n * workerd lane needs no vendored-source aliases and CI's filtered vendor\n * install never bites. Anything that would need vendored `think` or `agents`\n * to express is agent-logic testing and belongs in the extension's integration\n * lanes instead.\n */\n\nexport type Capability =\n /** Deterministic clock. Node lane only — a 30s ladder is not assertable on wall time. */\n | \"fake-time\"\n /** Kill without cleanup: worker.terminate() or dropping the container. */\n | \"real-crash\"\n /** Substrate boundary: sqlite-wasm lacks the storage capability. */\n | \"bookmarks\";\n\nexport type LaneName = \"workerd\" | \"node\" | \"browser\";\n\nexport interface ProbeActor {\n /** Durable identity. `respawn` reopens this same actor. */\n readonly name: string;\n call<T = unknown>(method: string, ...args: readonly unknown[]): Promise<T>;\n /** Launch without awaiting — the gate rows need two overlapping entries. */\n post(method: string, ...args: readonly unknown[]): { settled: Promise<unknown> };\n}\n\nexport type LaneSocketMessage = string | ArrayBuffer;\n\nexport interface LaneClientSocket {\n readonly readyState: number;\n send(data: string | ArrayBuffer | ArrayBufferView): Promise<void>;\n close(code?: number, reason?: string): Promise<void>;\n nextMessage(): Promise<LaneSocketMessage>;\n nextClose(): Promise<{ code: number; reason: string; wasClean: boolean }>;\n}\n\nexport interface ConformanceHost {\n readonly lane: LaneName;\n readonly capabilities: ReadonlySet<Capability>;\n spawn(name?: string): Promise<ProbeActor>;\n /** Same identity, fresh instance. Durable state must survive. */\n respawn(actor: ProbeActor): Promise<ProbeActor>;\n /** Open a WebSocket through the actor's fetch handler. */\n connect(actor: ProbeActor, tags?: readonly string[]): Promise<LaneClientSocket>;\n /** Rebuild the actor while preserving its hibernatable sockets. */\n evict(actor: ProbeActor): Promise<void>;\n /** Only where \"real-crash\". */\n crash?(actor: ProbeActor): Promise<void>;\n /** Only where \"fake-time\". */\n time?: { advance(ms: number): Promise<void> };\n}\n\n/**\n * Substrate boundaries are ASSERTED, never skipped.\n *\n * Where the capability exists, run `native`. Where it does not, run `absent` —\n * which asserts the exact named throwing-stub message. Under the fail-closed\n * tenet the throw IS the specified behaviour for that lane, and asserting it is\n * what stops the stubs regressing to the silent `[]` no-ops the design record\n * orders replaced.\n */\nexport async function substrate(\n host: ConformanceHost,\n capability: Capability,\n branches: { native: () => Promise<void>; absent: () => Promise<void> },\n): Promise<void> {\n if (host.capabilities.has(capability)) await branches.native();\n else await branches.absent();\n}\n"],"mappings":";;;;;;;;;;AAmEA,eAAsB,UACpB,MACA,YACA,UACe;CACf,IAAI,KAAK,aAAa,IAAI,UAAU,GAAG,MAAM,SAAS,OAAO;MACxD,MAAM,SAAS,OAAO;AAC7B"}
|
package/dist/gate.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as tryCurrentContinuation, r as atCheckpointEnd, u as tryCurrentIoContext } from "./chunks/io-context-
|
|
1
|
+
import { l as tryCurrentContinuation, r as atCheckpointEnd, u as tryCurrentIoContext } from "./chunks/io-context-BBgKEsdR.js";
|
|
2
2
|
//#region src/gate.ts
|
|
3
3
|
var TRANSFORMED_AWAIT = Symbol("@mcp-b/do-runtime/transformed-await");
|
|
4
4
|
/**
|