@lamplitisles/dsh-nanocodex 0.1.0-beta.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/LICENSE +65 -0
- package/NOTICE +2 -0
- package/README.md +182 -0
- package/THIRD_PARTY_NOTICES.md +29 -0
- package/cordis.patch.yml +52 -0
- package/dist/index.d.ts +435 -0
- package/dist/index.js +3405 -0
- package/dist/standard-preset.d.ts +7 -0
- package/dist/standard-preset.js +25 -0
- package/engine-release.json +14 -0
- package/package.json +119 -0
- package/presets/standard/agent.cordis.yml +6 -0
- package/presets/standard/preset.yml +2 -0
- package/vendor/nanocodex/README.md +1344 -0
- package/vendor/nanocodex/actions/events.d.mts +10 -0
- package/vendor/nanocodex/actions/events.mjs +163 -0
- package/vendor/nanocodex/actions/index.d.mts +13 -0
- package/vendor/nanocodex/actions/index.mjs +35 -0
- package/vendor/nanocodex/actions/session.d.mts +66 -0
- package/vendor/nanocodex/actions/session.mjs +59 -0
- package/vendor/nanocodex/actions/turn.d.mts +59 -0
- package/vendor/nanocodex/actions/turn.mjs +37 -0
- package/vendor/nanocodex/actions/voice.d.mts +22 -0
- package/vendor/nanocodex/actions/voice.mjs +50 -0
- package/vendor/nanocodex/browser/Agent.d.mts +55 -0
- package/vendor/nanocodex/browser/Agent.mjs +11 -0
- package/vendor/nanocodex/browser/ChatGptSubscription.d.mts +7 -0
- package/vendor/nanocodex/browser/ChatGptSubscription.mjs +19 -0
- package/vendor/nanocodex/browser/InlineAgent.mjs +266 -0
- package/vendor/nanocodex/browser/Transport.d.mts +74 -0
- package/vendor/nanocodex/browser/Transport.mjs +61 -0
- package/vendor/nanocodex/browser/Voice.d.mts +71 -0
- package/vendor/nanocodex/browser/Voice.mjs +291 -0
- package/vendor/nanocodex/browser/VoiceSession.mjs +688 -0
- package/vendor/nanocodex/browser/WorkerAgent.d.mts +65 -0
- package/vendor/nanocodex/browser/WorkerAgent.mjs +1472 -0
- package/vendor/nanocodex/browser/agent.worker.mjs +3 -0
- package/vendor/nanocodex/browser/config.d.mts +36 -0
- package/vendor/nanocodex/browser/config.mjs +439 -0
- package/vendor/nanocodex/browser/engine.mjs +13 -0
- package/vendor/nanocodex/browser/harness.mjs +55 -0
- package/vendor/nanocodex/browser/host.d.mts +83 -0
- package/vendor/nanocodex/browser/host.mjs +555 -0
- package/vendor/nanocodex/browser/hostManagedWebSocket.d.mts +14 -0
- package/vendor/nanocodex/browser/hostManagedWebSocket.mjs +110 -0
- package/vendor/nanocodex/browser/index.d.mts +92 -0
- package/vendor/nanocodex/browser/index.mjs +23 -0
- package/vendor/nanocodex/browser/indexeddb-durability-store.mjs +197 -0
- package/vendor/nanocodex/browser/workspace.d.mts +16 -0
- package/vendor/nanocodex/browser/workspace.mjs +107 -0
- package/vendor/nanocodex/cloud/Client.d.mts +83 -0
- package/vendor/nanocodex/cloud/Client.mjs +231 -0
- package/vendor/nanocodex/cloud/Decorator.d.mts +31 -0
- package/vendor/nanocodex/cloud/Decorator.mjs +37 -0
- package/vendor/nanocodex/cloud/Dialog.d.mts +113 -0
- package/vendor/nanocodex/cloud/Dialog.mjs +366 -0
- package/vendor/nanocodex/cloud/Errors.d.mts +22 -0
- package/vendor/nanocodex/cloud/Errors.mjs +39 -0
- package/vendor/nanocodex/cloud/Principal.d.mts +26 -0
- package/vendor/nanocodex/cloud/Principal.mjs +88 -0
- package/vendor/nanocodex/cloud/RemoteProvider.mjs +88 -0
- package/vendor/nanocodex/cloud/Transport.d.mts +47 -0
- package/vendor/nanocodex/cloud/Transport.mjs +454 -0
- package/vendor/nanocodex/cloud/actions/account.d.mts +9 -0
- package/vendor/nanocodex/cloud/actions/account.mjs +19 -0
- package/vendor/nanocodex/cloud/actions/agent.d.mts +18 -0
- package/vendor/nanocodex/cloud/actions/agent.mjs +428 -0
- package/vendor/nanocodex/cloud/actions/connection.d.mts +133 -0
- package/vendor/nanocodex/cloud/actions/connection.mjs +580 -0
- package/vendor/nanocodex/cloud/actions/grant.d.mts +10 -0
- package/vendor/nanocodex/cloud/actions/grant.mjs +12 -0
- package/vendor/nanocodex/cloud/actions/index.d.mts +7 -0
- package/vendor/nanocodex/cloud/actions/index.mjs +7 -0
- package/vendor/nanocodex/cloud/actions/machineUsd.d.mts +23 -0
- package/vendor/nanocodex/cloud/actions/machineUsd.mjs +37 -0
- package/vendor/nanocodex/cloud/actions/model.d.mts +12 -0
- package/vendor/nanocodex/cloud/actions/model.mjs +50 -0
- package/vendor/nanocodex/cloud/actions/mpp.d.mts +28 -0
- package/vendor/nanocodex/cloud/actions/mpp.mjs +39 -0
- package/vendor/nanocodex/cloud/index.d.mts +30 -0
- package/vendor/nanocodex/cloud/index.mjs +9 -0
- package/vendor/nanocodex/cloud/internal.mjs +533 -0
- package/vendor/nanocodex/cloud/mercator.mjs +108 -0
- package/vendor/nanocodex/cloud/server/HostPrincipal.d.mts +34 -0
- package/vendor/nanocodex/cloud/server/HostPrincipal.mjs +202 -0
- package/vendor/nanocodex/cloud/server/index.d.mts +1 -0
- package/vendor/nanocodex/cloud/server/index.mjs +1 -0
- package/vendor/nanocodex/cloud/types.d.mts +211 -0
- package/vendor/nanocodex/cloudflare/Agent.d.mts +133 -0
- package/vendor/nanocodex/cloudflare/Agent.mjs +811 -0
- package/vendor/nanocodex/cloudflare/egress-subject.mjs +19 -0
- package/vendor/nanocodex/cloudflare/egress.d.mts +41 -0
- package/vendor/nanocodex/cloudflare/egress.mjs +119 -0
- package/vendor/nanocodex/cloudflare/event-socket.mjs +316 -0
- package/vendor/nanocodex/cloudflare/index.d.mts +7 -0
- package/vendor/nanocodex/cloudflare/index.mjs +6 -0
- package/vendor/nanocodex/host/Agent.d.mts +55 -0
- package/vendor/nanocodex/host/Agent.mjs +1 -0
- package/vendor/nanocodex/host/index.d.mts +82 -0
- package/vendor/nanocodex/host/index.mjs +10 -0
- package/vendor/nanocodex/index.d.mts +81 -0
- package/vendor/nanocodex/index.mjs +12 -0
- package/vendor/nanocodex/internal.mjs +1275 -0
- package/vendor/nanocodex/managed/Agent.d.mts +380 -0
- package/vendor/nanocodex/managed/Agent.mjs +1694 -0
- package/vendor/nanocodex/managed/ManagedError.d.mts +9 -0
- package/vendor/nanocodex/managed/ManagedError.mjs +8 -0
- package/vendor/nanocodex/managed/README.md +241 -0
- package/vendor/nanocodex/managed/Voice.mjs +202 -0
- package/vendor/nanocodex/managed/index.d.mts +20 -0
- package/vendor/nanocodex/managed/index.mjs +2 -0
- package/vendor/nanocodex/managed/internal.mjs +119 -0
- package/vendor/nanocodex/node/Agent.d.mts +50 -0
- package/vendor/nanocodex/node/Agent.mjs +203 -0
- package/vendor/nanocodex/node/ChatGptSubscription.d.mts +9 -0
- package/vendor/nanocodex/node/ChatGptSubscription.mjs +17 -0
- package/vendor/nanocodex/node/Transport.d.mts +44 -0
- package/vendor/nanocodex/node/Transport.mjs +46 -0
- package/vendor/nanocodex/node/host.mjs +731 -0
- package/vendor/nanocodex/node/index.d.mts +73 -0
- package/vendor/nanocodex/node/index.mjs +17 -0
- package/vendor/nanocodex/node/workspace.d.mts +10 -0
- package/vendor/nanocodex/node/workspace.mjs +198 -0
- package/vendor/nanocodex/package.json +200 -0
- package/vendor/nanocodex/pkg-node/nanocodex.d.ts +675 -0
- package/vendor/nanocodex/pkg-node/nanocodex.js +2628 -0
- package/vendor/nanocodex/pkg-node/nanocodex_bg.wasm.d.ts +105 -0
- package/vendor/nanocodex/pkg-node/package.json +1 -0
- package/vendor/nanocodex/pkg-web/.nanocodex-bindgen-stamp +6 -0
- package/vendor/nanocodex/pkg-web/nanocodex-build.json +1 -0
- package/vendor/nanocodex/pkg-web/nanocodex.d.ts +805 -0
- package/vendor/nanocodex/pkg-web/nanocodex.js +2714 -0
- package/vendor/nanocodex/pkg-web/nanocodex_bg.js +2615 -0
- package/vendor/nanocodex/pkg-web/nanocodex_bg.wasm +0 -0
- package/vendor/nanocodex/pkg-web/nanocodex_bg.wasm.d.ts +105 -0
- package/vendor/nanocodex/pkg-web/nanocodex_worker.js +9 -0
- package/vendor/nanocodex/pkg-web/package.json +1 -0
- package/vendor/nanocodex/runtime/chatgpt-subscription.mjs +212 -0
- package/vendor/nanocodex/runtime/cloudflare-durability-store.d.mts +26 -0
- package/vendor/nanocodex/runtime/cloudflare-durability-store.mjs +168 -0
- package/vendor/nanocodex/runtime/code-evaluator.worker.mjs +137 -0
- package/vendor/nanocodex/runtime/code-runtime.mjs +1 -0
- package/vendor/nanocodex/runtime/durability-store.d.mts +85 -0
- package/vendor/nanocodex/runtime/durability-store.mjs +631 -0
- package/vendor/nanocodex/runtime/durability.mjs +153 -0
- package/vendor/nanocodex/runtime/managed-transport.mjs +460 -0
- package/vendor/nanocodex/runtime/mcp-runtime.mjs +534 -0
- package/vendor/nanocodex/runtime/postgres-durability-store.d.mts +64 -0
- package/vendor/nanocodex/runtime/postgres-durability-store.mjs +532 -0
- package/vendor/nanocodex/runtime/quickjs-evaluator.d.mts +17 -0
- package/vendor/nanocodex/runtime/quickjs-evaluator.mjs +236 -0
- package/vendor/nanocodex/runtime/responses-transport.mjs +22 -0
- package/vendor/nanocodex/runtime/subagents.d.mts +107 -0
- package/vendor/nanocodex/runtime/subagents.mjs +54 -0
- package/vendor/nanocodex/runtime/subscription-store.d.mts +8 -0
- package/vendor/nanocodex/runtime/subscription-store.mjs +42 -0
- package/vendor/nanocodex/runtime/tempo-provider.d.mts +125 -0
- package/vendor/nanocodex/runtime/tempo-provider.mjs +264 -0
- package/vendor/nanocodex/runtime/tool-configuration.mjs +1 -0
- package/vendor/nanocodex/runtime/tool-router.mjs +1 -0
- package/vendor/nanocodex/runtime/utf8.mjs +1 -0
- package/vendor/nanocodex/runtime/worker-evaluator.mjs +162 -0
- package/vendor/nanocodex/runtime/workspace.d.mts +1 -0
- package/vendor/nanocodex/runtime/workspace.mjs +1 -0
- package/vendor/nanocodex/tools/Tools.d.mts +56 -0
- package/vendor/nanocodex/tools/Tools.mjs +136 -0
- package/vendor/nanocodex/tools/artifact.d.mts +1 -0
- package/vendor/nanocodex/tools/artifact.mjs +1 -0
- package/vendor/nanocodex/tools/attachment.mjs +1 -0
- package/vendor/nanocodex/tools/bash.d.mts +1 -0
- package/vendor/nanocodex/tools/bash.mjs +1 -0
- package/vendor/nanocodex/tools/browser/accountInfo.mjs +795 -0
- package/vendor/nanocodex/tools/browser/browserBuffer.mjs +18 -0
- package/vendor/nanocodex/tools/browser/browserCompiler.mjs +155 -0
- package/vendor/nanocodex/tools/browser/browserEgress.mjs +161 -0
- package/vendor/nanocodex/tools/browser/browserPython.mjs +133 -0
- package/vendor/nanocodex/tools/browser/browserShell.mjs +1075 -0
- package/vendor/nanocodex/tools/browser/browserSprintf.mjs +4 -0
- package/vendor/nanocodex/tools/browser/browserSsh.mjs +201 -0
- package/vendor/nanocodex/tools/browser/browserZlib.mjs +136 -0
- package/vendor/nanocodex/tools/browser/compiler.worker.mjs +160 -0
- package/vendor/nanocodex/tools/browser/devTunnelsSshBrowser.mjs +13 -0
- package/vendor/nanocodex/tools/browser/index.d.mts +209 -0
- package/vendor/nanocodex/tools/browser/index.mjs +174 -0
- package/vendor/nanocodex/tools/browser/opfsGit.mjs +248 -0
- package/vendor/nanocodex/tools/browser/python.worker.mjs +114 -0
- package/vendor/nanocodex/tools/browser/threadGit.mjs +197 -0
- package/vendor/nanocodex/tools/browser/unsupportedNodeRsa.mjs +5 -0
- package/vendor/nanocodex/tools/browser/workspace.mjs +83 -0
- package/vendor/nanocodex/tools/dataset.d.mts +1 -0
- package/vendor/nanocodex/tools/dataset.mjs +1 -0
- package/vendor/nanocodex/tools/datasetContract.mjs +1 -0
- package/vendor/nanocodex/tools/datasetEngine.mjs +1 -0
- package/vendor/nanocodex/tools/hostedCatalog.d.mts +1 -0
- package/vendor/nanocodex/tools/hostedCatalog.mjs +1 -0
- package/vendor/nanocodex/tools/index.d.mts +49 -0
- package/vendor/nanocodex/tools/index.mjs +19 -0
- package/vendor/nanocodex/tools/namedTool.mjs +1 -0
- package/vendor/nanocodex/tools/repository-workspace.d.mts +1 -0
- package/vendor/nanocodex/tools/repository-workspace.mjs +1 -0
- package/vendor/nanocodex/tools/ssh.d.mts +1 -0
- package/vendor/nanocodex/tools/ssh.mjs +1 -0
- package/vendor/nanocodex/tools/standard.mjs +1 -0
- package/vendor/nanocodex/tools/standardDescriptions.mjs +1 -0
- package/vendor/nanocodex/types.d.mts +663 -0
- package/vendor/nanocodex/wasm.d.mts +4 -0
- package/vendor/nanocodex/worker/ChatGptSubscription.d.mts +9 -0
- package/vendor/nanocodex/worker/ChatGptSubscription.mjs +29 -0
- package/vendor/nanocodex/worker/index.d.mts +18 -0
- package/vendor/nanocodex/worker/index.mjs +5 -0
- package/vendor/nanocodex-tools/README.md +65 -0
- package/vendor/nanocodex-tools/dist/hosted/app-tool-catalog.d.ts +7 -0
- package/vendor/nanocodex-tools/dist/hosted/app-tool-catalog.js +14 -0
- package/vendor/nanocodex-tools/dist/hosted/broker-core.d.ts +172 -0
- package/vendor/nanocodex-tools/dist/hosted/broker-core.js +1278 -0
- package/vendor/nanocodex-tools/dist/hosted/index.d.ts +3 -0
- package/vendor/nanocodex-tools/dist/hosted/index.js +3 -0
- package/vendor/nanocodex-tools/dist/hosted/protocol.d.ts +120 -0
- package/vendor/nanocodex-tools/dist/hosted/protocol.js +415 -0
- package/vendor/nanocodex-tools/dist/index.d.ts +19 -0
- package/vendor/nanocodex-tools/dist/index.js +14 -0
- package/vendor/nanocodex-tools/dist/memory.d.ts +204 -0
- package/vendor/nanocodex-tools/dist/memory.js +411 -0
- package/vendor/nanocodex-tools/dist/namespace.d.ts +87 -0
- package/vendor/nanocodex-tools/dist/namespace.js +338 -0
- package/vendor/nanocodex-tools/dist/repository-archive.d.ts +4 -0
- package/vendor/nanocodex-tools/dist/repository-archive.js +104 -0
- package/vendor/nanocodex-tools/dist/runtime.d.ts +30 -0
- package/vendor/nanocodex-tools/dist/runtime.js +37 -0
- package/vendor/nanocodex-tools/dist/session.d.ts +167 -0
- package/vendor/nanocodex-tools/dist/session.js +286 -0
- package/vendor/nanocodex-tools/dist/shell.d.ts +51 -0
- package/vendor/nanocodex-tools/dist/shell.js +553 -0
- package/vendor/nanocodex-tools/dist/ssh.d.ts +29 -0
- package/vendor/nanocodex-tools/dist/ssh.js +66 -0
- package/vendor/nanocodex-tools/dist/workspace.d.ts +45 -0
- package/vendor/nanocodex-tools/dist/workspace.js +237 -0
- package/vendor/nanocodex-tools/package.json +122 -0
- package/vendor/nanocodex-tools/runtime/code-runtime.mjs +817 -0
- package/vendor/nanocodex-tools/runtime/tool-configuration.mjs +50 -0
- package/vendor/nanocodex-tools/runtime/tool-router.mjs +730 -0
- package/vendor/nanocodex-tools/runtime/utf8.d.mts +2 -0
- package/vendor/nanocodex-tools/runtime/utf8.mjs +25 -0
- package/vendor/nanocodex-tools/tools/artifact.d.mts +69 -0
- package/vendor/nanocodex-tools/tools/artifact.mjs +270 -0
- package/vendor/nanocodex-tools/tools/attachment.mjs +603 -0
- package/vendor/nanocodex-tools/tools/bash.d.mts +90 -0
- package/vendor/nanocodex-tools/tools/bash.mjs +742 -0
- package/vendor/nanocodex-tools/tools/dataset.d.mts +9 -0
- package/vendor/nanocodex-tools/tools/dataset.mjs +47 -0
- package/vendor/nanocodex-tools/tools/datasetContract.mjs +54 -0
- package/vendor/nanocodex-tools/tools/datasetEngine.mjs +1167 -0
- package/vendor/nanocodex-tools/tools/execution-contract.d.mts +5 -0
- package/vendor/nanocodex-tools/tools/execution-contract.mjs +63 -0
- package/vendor/nanocodex-tools/tools/hostedCatalog.d.mts +20 -0
- package/vendor/nanocodex-tools/tools/hostedCatalog.mjs +67 -0
- package/vendor/nanocodex-tools/tools/hostedMachine.d.mts +10 -0
- package/vendor/nanocodex-tools/tools/hostedMachine.mjs +56 -0
- package/vendor/nanocodex-tools/tools/just-bash-browser.d.mts +1 -0
- package/vendor/nanocodex-tools/tools/just-bash-browser.mjs +1 -0
- package/vendor/nanocodex-tools/tools/namedTool.d.mts +3 -0
- package/vendor/nanocodex-tools/tools/namedTool.mjs +3 -0
- package/vendor/nanocodex-tools/tools/nodeProcess.d.mts +10 -0
- package/vendor/nanocodex-tools/tools/nodeProcess.mjs +314 -0
- package/vendor/nanocodex-tools/tools/processOutput.mjs +56 -0
- package/vendor/nanocodex-tools/tools/repository-workspace.d.mts +55 -0
- package/vendor/nanocodex-tools/tools/repository-workspace.mjs +397 -0
- package/vendor/nanocodex-tools/tools/ssh.d.mts +56 -0
- package/vendor/nanocodex-tools/tools/ssh.mjs +503 -0
- package/vendor/nanocodex-tools/tools/standard.mjs +458 -0
- package/vendor/nanocodex-tools/tools/standardDescriptions.mjs +3 -0
- package/vendor/nanocodex-tools/tools/types.d.mts +83 -0
- package/vendor/nanocodex-tools/tools/workspace.d.mts +25 -0
- package/vendor/nanocodex-tools/tools/workspace.mjs +282 -0
- package/vendor/nanocodex-tools/tools/x.d.mts +30 -0
- package/vendor/nanocodex-tools/tools/x.mjs +91 -0
|
@@ -0,0 +1,675 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Rust-owned Codex browser voice protocol and Agent bridge.
|
|
6
|
+
*/
|
|
7
|
+
export class BrowserVoice {
|
|
8
|
+
private constructor();
|
|
9
|
+
free(): void;
|
|
10
|
+
[Symbol.dispose](): void;
|
|
11
|
+
/**
|
|
12
|
+
* Applies one typed Agent event to the Rust-owned handoff stream.
|
|
13
|
+
*
|
|
14
|
+
* # Errors
|
|
15
|
+
*
|
|
16
|
+
* Rejects only when effects cannot be serialized.
|
|
17
|
+
*/
|
|
18
|
+
agentEvent(envelope: string): string;
|
|
19
|
+
/**
|
|
20
|
+
* Adds background context without requesting speech or consuming a delegation.
|
|
21
|
+
*
|
|
22
|
+
* # Errors
|
|
23
|
+
* Rejects an inactive session or invalid text.
|
|
24
|
+
*/
|
|
25
|
+
appendContext(text: string): string;
|
|
26
|
+
/**
|
|
27
|
+
* Queues explicitly speakable text in the current conversation.
|
|
28
|
+
*
|
|
29
|
+
* # Errors
|
|
30
|
+
* Rejects inactive sessions, invalid text, or a full output queue.
|
|
31
|
+
*/
|
|
32
|
+
appendSpeech(text: string): string;
|
|
33
|
+
/**
|
|
34
|
+
* Appends text through Codex's subscription context adapter.
|
|
35
|
+
*
|
|
36
|
+
* # Errors
|
|
37
|
+
* Rejects inactive sessions, invalid roles/text, or a full output queue.
|
|
38
|
+
*/
|
|
39
|
+
appendText(role: string, text: string): string;
|
|
40
|
+
/**
|
|
41
|
+
* Encodes the complete same-origin call request after the browser creates its SDP offer.
|
|
42
|
+
*
|
|
43
|
+
* # Errors
|
|
44
|
+
*
|
|
45
|
+
* Rejects calls made before [`Self::start`] or an empty SDP offer.
|
|
46
|
+
*/
|
|
47
|
+
callBody(sdp: string): string;
|
|
48
|
+
/**
|
|
49
|
+
* Cancels only the active coding turn, never merely the voice transport.
|
|
50
|
+
*
|
|
51
|
+
* # Errors
|
|
52
|
+
*
|
|
53
|
+
* Rejects when the active turn cannot be cancelled.
|
|
54
|
+
*/
|
|
55
|
+
cancel(): Promise<boolean>;
|
|
56
|
+
/**
|
|
57
|
+
* Decodes Codex's provider response body and Location header in Rust.
|
|
58
|
+
*
|
|
59
|
+
* # Errors
|
|
60
|
+
*
|
|
61
|
+
* Rejects an empty SDP answer or a Location without a Codex call identity.
|
|
62
|
+
*/
|
|
63
|
+
completeCall(response_body: string, location: string): string;
|
|
64
|
+
/**
|
|
65
|
+
* Sets subscription voice preferences before starting a call.
|
|
66
|
+
*
|
|
67
|
+
* # Errors
|
|
68
|
+
* Rejects invalid settings or changes to an active call.
|
|
69
|
+
*/
|
|
70
|
+
configure(settings_json: string): void;
|
|
71
|
+
/**
|
|
72
|
+
* Drains one Codex-paced streamed or final Agent handoff chunk.
|
|
73
|
+
*
|
|
74
|
+
* # Errors
|
|
75
|
+
*
|
|
76
|
+
* Rejects only when effects cannot be serialized.
|
|
77
|
+
*/
|
|
78
|
+
flush(final_chunk: boolean): string;
|
|
79
|
+
/**
|
|
80
|
+
* Acknowledges frames written by the browser WebSocket effect executor.
|
|
81
|
+
*/
|
|
82
|
+
framesSent(count: number): void;
|
|
83
|
+
/**
|
|
84
|
+
* Selects Codex's preferred physical input from browser device labels.
|
|
85
|
+
*
|
|
86
|
+
* # Errors
|
|
87
|
+
*
|
|
88
|
+
* Rejects malformed label JSON.
|
|
89
|
+
*/
|
|
90
|
+
preferredPhysicalInput(current_label: string, labels_json: string): number | undefined;
|
|
91
|
+
/**
|
|
92
|
+
* Applies one Frameless sideband event and routes any delegation through the Rust Agent.
|
|
93
|
+
*
|
|
94
|
+
* # Errors
|
|
95
|
+
*
|
|
96
|
+
* Rejects when delegated Agent work cannot be accepted or steered.
|
|
97
|
+
*/
|
|
98
|
+
realtimeMessage(payload: string): Promise<string>;
|
|
99
|
+
/**
|
|
100
|
+
* Reports whether one Rust-decoded sideband event can admit Agent work.
|
|
101
|
+
*/
|
|
102
|
+
requiresAgentAdmission(payload: string): boolean;
|
|
103
|
+
/**
|
|
104
|
+
* Applies Codex's Rust-owned Frameless reconnect policy after transport loss.
|
|
105
|
+
*
|
|
106
|
+
* # Errors
|
|
107
|
+
*
|
|
108
|
+
* Rejects only when effects cannot be serialized.
|
|
109
|
+
*/
|
|
110
|
+
sidebandClosed(connected_ms: number): string;
|
|
111
|
+
/**
|
|
112
|
+
* Replays Rust-retained outbound frames after a sideband connects.
|
|
113
|
+
*
|
|
114
|
+
* # Errors
|
|
115
|
+
*
|
|
116
|
+
* Rejects only when effects cannot be serialized.
|
|
117
|
+
*/
|
|
118
|
+
sidebandOpened(): string;
|
|
119
|
+
/**
|
|
120
|
+
* Builds the same-origin sideband URL with Codex's Rust-owned request identity.
|
|
121
|
+
*
|
|
122
|
+
* # Errors
|
|
123
|
+
*
|
|
124
|
+
* Rejects a malformed provider call identity.
|
|
125
|
+
*/
|
|
126
|
+
sidebandUrl(call_id: string): string;
|
|
127
|
+
/**
|
|
128
|
+
* Begins Codex's Realtime lifecycle and builds bounded browser startup context in Rust.
|
|
129
|
+
*
|
|
130
|
+
* # Errors
|
|
131
|
+
*
|
|
132
|
+
* Rejects when the Agent driver has stopped.
|
|
133
|
+
*/
|
|
134
|
+
start(): Promise<void>;
|
|
135
|
+
/**
|
|
136
|
+
* Flushes any final transcript tail and ends Codex's Realtime lifecycle.
|
|
137
|
+
*
|
|
138
|
+
* # Errors
|
|
139
|
+
*
|
|
140
|
+
* Rejects when the Agent driver stops.
|
|
141
|
+
*/
|
|
142
|
+
stop(): Promise<string>;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* JavaScript binding over the Rust-owned hosted ChatGPT credential lifecycle.
|
|
147
|
+
*/
|
|
148
|
+
export class ChatGptSubscription {
|
|
149
|
+
private constructor();
|
|
150
|
+
free(): void;
|
|
151
|
+
[Symbol.dispose](): void;
|
|
152
|
+
/**
|
|
153
|
+
* Resolves one credential generation for a host-owned outbound request.
|
|
154
|
+
*/
|
|
155
|
+
credential(): Promise<string>;
|
|
156
|
+
/**
|
|
157
|
+
* Clears the persisted credential and pending login.
|
|
158
|
+
*/
|
|
159
|
+
logout(): Promise<void>;
|
|
160
|
+
/**
|
|
161
|
+
* Opens a subscription over the currently registered generic host capabilities.
|
|
162
|
+
*/
|
|
163
|
+
static open(config_json: string): Promise<ChatGptSubscription>;
|
|
164
|
+
/**
|
|
165
|
+
* Refreshes a rejected generation and returns the credential now current.
|
|
166
|
+
*/
|
|
167
|
+
recover(rejected_revision: string): Promise<string>;
|
|
168
|
+
/**
|
|
169
|
+
* Starts a ChatGPT device login and returns public pending state as JSON.
|
|
170
|
+
*/
|
|
171
|
+
startLogin(): Promise<string>;
|
|
172
|
+
/**
|
|
173
|
+
* Polls device login and returns public state as JSON.
|
|
174
|
+
*/
|
|
175
|
+
status(): Promise<string>;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Standalone Rust-owned browser voice protocol for a remote managed Agent.
|
|
180
|
+
*
|
|
181
|
+
* This core owns only Realtime protocol state. The caller owns media,
|
|
182
|
+
* transports, the managed Agent lifecycle, and routing returned delegations.
|
|
183
|
+
*/
|
|
184
|
+
export class ManagedBrowserVoice {
|
|
185
|
+
free(): void;
|
|
186
|
+
[Symbol.dispose](): void;
|
|
187
|
+
/**
|
|
188
|
+
* Applies one canonical raw `AgentEvent` JSON value to the handoff stream.
|
|
189
|
+
*
|
|
190
|
+
* # Errors
|
|
191
|
+
*
|
|
192
|
+
* Rejects only when effects cannot be serialized.
|
|
193
|
+
*/
|
|
194
|
+
agentEvent(event_json: string): string;
|
|
195
|
+
/**
|
|
196
|
+
* Adds background context without requesting speech or consuming a delegation.
|
|
197
|
+
*
|
|
198
|
+
* # Errors
|
|
199
|
+
* Rejects an inactive session or invalid text.
|
|
200
|
+
*/
|
|
201
|
+
appendContext(text: string): string;
|
|
202
|
+
/**
|
|
203
|
+
* Queues explicitly speakable text in the current conversation.
|
|
204
|
+
*
|
|
205
|
+
* # Errors
|
|
206
|
+
* Rejects inactive sessions, invalid text, or a full output queue.
|
|
207
|
+
*/
|
|
208
|
+
appendSpeech(text: string): string;
|
|
209
|
+
/**
|
|
210
|
+
* Appends text through Codex's subscription context adapter.
|
|
211
|
+
*
|
|
212
|
+
* # Errors
|
|
213
|
+
* Rejects inactive sessions, invalid roles/text, or a full output queue.
|
|
214
|
+
*/
|
|
215
|
+
appendText(role: string, text: string): string;
|
|
216
|
+
/**
|
|
217
|
+
* Encodes the managed same-origin call request after the browser creates its SDP offer.
|
|
218
|
+
*
|
|
219
|
+
* # Errors
|
|
220
|
+
*
|
|
221
|
+
* Rejects invalid session IDs or empty SDP offers. Admission can complete
|
|
222
|
+
* after this request; its context is then sent over the control channel.
|
|
223
|
+
*/
|
|
224
|
+
callBody(sdp: string, managed_session_id: string): string;
|
|
225
|
+
/**
|
|
226
|
+
* Decodes Codex's provider response body and Location header in Rust.
|
|
227
|
+
*
|
|
228
|
+
* # Errors
|
|
229
|
+
*
|
|
230
|
+
* Rejects an empty SDP answer or a Location without a Codex call identity.
|
|
231
|
+
*/
|
|
232
|
+
completeCall(response_body: string, location: string): string;
|
|
233
|
+
/**
|
|
234
|
+
* Sets subscription voice preferences before starting a call.
|
|
235
|
+
*
|
|
236
|
+
* # Errors
|
|
237
|
+
* Rejects invalid settings or changes to an active call.
|
|
238
|
+
*/
|
|
239
|
+
configure(settings_json: string): void;
|
|
240
|
+
/**
|
|
241
|
+
* Drains one Codex-paced streamed or final managed Agent handoff chunk.
|
|
242
|
+
*
|
|
243
|
+
* # Errors
|
|
244
|
+
*
|
|
245
|
+
* Rejects only when effects cannot be serialized.
|
|
246
|
+
*/
|
|
247
|
+
flush(final_chunk: boolean): string;
|
|
248
|
+
/**
|
|
249
|
+
* Acknowledges frames written by the caller's WebSocket effect executor.
|
|
250
|
+
*/
|
|
251
|
+
framesSent(count: number): void;
|
|
252
|
+
/**
|
|
253
|
+
* Applies a scoped managed context envelope using the shared Rust queue.
|
|
254
|
+
*
|
|
255
|
+
* # Errors
|
|
256
|
+
* Rejects malformed JSON or effects that cannot be serialized.
|
|
257
|
+
*/
|
|
258
|
+
managedEvent(envelope_json: string): string;
|
|
259
|
+
/**
|
|
260
|
+
* Creates an idle managed browser voice protocol core.
|
|
261
|
+
*
|
|
262
|
+
* # Errors
|
|
263
|
+
*
|
|
264
|
+
* Rejects voices outside Codex's ChatGPT V3 catalog.
|
|
265
|
+
*/
|
|
266
|
+
constructor(voice: string);
|
|
267
|
+
/**
|
|
268
|
+
* Selects Codex's preferred physical input from browser device labels.
|
|
269
|
+
*
|
|
270
|
+
* # Errors
|
|
271
|
+
*
|
|
272
|
+
* Rejects malformed label JSON.
|
|
273
|
+
*/
|
|
274
|
+
preferredPhysicalInput(current_label: string, labels_json: string): number | undefined;
|
|
275
|
+
/**
|
|
276
|
+
* Applies one sideband event and returns effects plus canonical delegation text.
|
|
277
|
+
*
|
|
278
|
+
* The caller must route returned delegation text through its remote managed Agent.
|
|
279
|
+
*
|
|
280
|
+
* # Errors
|
|
281
|
+
*
|
|
282
|
+
* Rejects only when the update cannot be serialized.
|
|
283
|
+
*/
|
|
284
|
+
realtimeMessage(payload: string): string;
|
|
285
|
+
/**
|
|
286
|
+
* Reports whether one sideband event may produce a managed Agent delegation.
|
|
287
|
+
*/
|
|
288
|
+
requiresAgentAdmission(payload: string): boolean;
|
|
289
|
+
/**
|
|
290
|
+
* Applies Codex's bounded reconnect policy after sideband transport loss.
|
|
291
|
+
*
|
|
292
|
+
* # Errors
|
|
293
|
+
*
|
|
294
|
+
* Rejects only when effects cannot be serialized.
|
|
295
|
+
*/
|
|
296
|
+
sidebandClosed(connected_ms: number): string;
|
|
297
|
+
/**
|
|
298
|
+
* Replays Rust-retained outbound frames after a sideband connects.
|
|
299
|
+
*
|
|
300
|
+
* # Errors
|
|
301
|
+
*
|
|
302
|
+
* Rejects only when effects cannot be serialized.
|
|
303
|
+
*/
|
|
304
|
+
sidebandOpened(): string;
|
|
305
|
+
/**
|
|
306
|
+
* Builds the managed same-origin sideband URL for a provider call identity.
|
|
307
|
+
*
|
|
308
|
+
* # Errors
|
|
309
|
+
*
|
|
310
|
+
* Rejects malformed provider call or managed session identities.
|
|
311
|
+
*/
|
|
312
|
+
sidebandUrl(call_id: string, managed_session_id: string): string;
|
|
313
|
+
/**
|
|
314
|
+
* Starts the protocol from the managed Agent's authoritative serialized context.
|
|
315
|
+
*
|
|
316
|
+
* # Errors
|
|
317
|
+
*
|
|
318
|
+
* Rejects malformed `AgentSessionContext` JSON.
|
|
319
|
+
*/
|
|
320
|
+
start(context_json: string): void;
|
|
321
|
+
/**
|
|
322
|
+
* Stops the protocol and returns final transcript delegation plus close effects.
|
|
323
|
+
*
|
|
324
|
+
* # Errors
|
|
325
|
+
*
|
|
326
|
+
* Rejects only when the update cannot be serialized.
|
|
327
|
+
*/
|
|
328
|
+
stop(): string;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* JavaScript binding over the shared Rust agent lifecycle.
|
|
333
|
+
*/
|
|
334
|
+
export class Nanocodex {
|
|
335
|
+
private constructor();
|
|
336
|
+
free(): void;
|
|
337
|
+
[Symbol.dispose](): void;
|
|
338
|
+
/**
|
|
339
|
+
* Appends adapter-owned developer context at the next safe model boundary.
|
|
340
|
+
*
|
|
341
|
+
* Returns the complete read-only session context captured at that boundary.
|
|
342
|
+
*
|
|
343
|
+
* # Errors
|
|
344
|
+
*
|
|
345
|
+
* Rejects empty text or a stopped driver.
|
|
346
|
+
*/
|
|
347
|
+
appendDeveloperMessage(text: string): Promise<string>;
|
|
348
|
+
/**
|
|
349
|
+
* Creates the Rust-owned Codex browser voice controller for this agent.
|
|
350
|
+
*
|
|
351
|
+
* # Errors
|
|
352
|
+
*
|
|
353
|
+
* Rejects voices outside Codex's ChatGPT V3 catalog.
|
|
354
|
+
*/
|
|
355
|
+
browserVoice(voice: string): BrowserVoice;
|
|
356
|
+
/**
|
|
357
|
+
* Closes one canonical task-tree child and its descendants.
|
|
358
|
+
*/
|
|
359
|
+
closeSubagent(task: string): Promise<string>;
|
|
360
|
+
/**
|
|
361
|
+
* Compacts retained history immediately without fabricating a user prompt.
|
|
362
|
+
*
|
|
363
|
+
* # Errors
|
|
364
|
+
*
|
|
365
|
+
* Throws when compaction or the agent driver fails.
|
|
366
|
+
*/
|
|
367
|
+
compact(): Promise<void>;
|
|
368
|
+
/**
|
|
369
|
+
* Compacts retained history and returns the private replacement mapping.
|
|
370
|
+
*
|
|
371
|
+
* The serialized result includes the generated summary, the replaced
|
|
372
|
+
* pre-compaction range, retained tail identities, and the complete
|
|
373
|
+
* post-compaction session context for custom host compaction. It is
|
|
374
|
+
* `null` when provider-default compaction is active.
|
|
375
|
+
*/
|
|
376
|
+
compactOutcome(): Promise<string>;
|
|
377
|
+
/**
|
|
378
|
+
* Returns complete read-only session context at the latest safe boundary.
|
|
379
|
+
*
|
|
380
|
+
* # Errors
|
|
381
|
+
*
|
|
382
|
+
* Rejects after the driver stops or when context serialization fails.
|
|
383
|
+
*/
|
|
384
|
+
context(): Promise<string>;
|
|
385
|
+
/**
|
|
386
|
+
* Builds an agent from its JavaScript JSON configuration.
|
|
387
|
+
*
|
|
388
|
+
* # Errors
|
|
389
|
+
*
|
|
390
|
+
* Throws when the JSON or agent policy is invalid.
|
|
391
|
+
*/
|
|
392
|
+
static create(config_json: string): Promise<Nanocodex>;
|
|
393
|
+
/**
|
|
394
|
+
* Builds an agent whose ChatGPT credential lifecycle is owned by Rust.
|
|
395
|
+
*/
|
|
396
|
+
static createWithChatGpt(config_json: string, subscription: ChatGptSubscription): Promise<Nanocodex>;
|
|
397
|
+
/**
|
|
398
|
+
* Ends the canonical Codex Realtime adapter lifecycle.
|
|
399
|
+
*
|
|
400
|
+
* # Errors
|
|
401
|
+
*
|
|
402
|
+
* Rejects when the agent driver has stopped or context serialization fails.
|
|
403
|
+
*/
|
|
404
|
+
endRealtimeConversation(): Promise<string>;
|
|
405
|
+
/**
|
|
406
|
+
* Forks the latest safe committed model boundary.
|
|
407
|
+
*
|
|
408
|
+
* # Errors
|
|
409
|
+
*
|
|
410
|
+
* Rejects before the first safe boundary or after the driver stops.
|
|
411
|
+
*/
|
|
412
|
+
fork(): Promise<Nanocodex>;
|
|
413
|
+
/**
|
|
414
|
+
* Forks from an exact completed historical turn.
|
|
415
|
+
*
|
|
416
|
+
* # Errors
|
|
417
|
+
*
|
|
418
|
+
* Rejects if the result belongs to another agent or the driver stopped.
|
|
419
|
+
*/
|
|
420
|
+
forkFrom(result: TurnResult): Promise<Nanocodex>;
|
|
421
|
+
/**
|
|
422
|
+
* Interrupts one canonical task-tree child while keeping it reusable.
|
|
423
|
+
*/
|
|
424
|
+
interruptSubagent(task: string): Promise<string>;
|
|
425
|
+
/**
|
|
426
|
+
* Lists the canonical task-tree directory visible to the owning root.
|
|
427
|
+
*/
|
|
428
|
+
listSubagents(task: string): Promise<string>;
|
|
429
|
+
/**
|
|
430
|
+
* Accepts a text prompt and returns its independently awaitable turn.
|
|
431
|
+
*
|
|
432
|
+
* # Errors
|
|
433
|
+
*
|
|
434
|
+
* Throws when the prompt is empty.
|
|
435
|
+
*/
|
|
436
|
+
prompt(instruction: string, operation_id?: string | null, cancel_on_admission?: boolean | null, supplementary_context?: string | null): Turn;
|
|
437
|
+
/**
|
|
438
|
+
* Accepts browser-safe multimodal input encoded as JSON.
|
|
439
|
+
*
|
|
440
|
+
* # Errors
|
|
441
|
+
*
|
|
442
|
+
* Throws for malformed, empty, or local-filesystem input.
|
|
443
|
+
*/
|
|
444
|
+
promptContent(content_json: string, operation_id?: string | null, cancel_on_admission?: boolean | null, supplementary_context?: string | null): Turn;
|
|
445
|
+
/**
|
|
446
|
+
* Formats one structured Realtime delegation using canonical Codex markers.
|
|
447
|
+
*
|
|
448
|
+
* # Errors
|
|
449
|
+
*
|
|
450
|
+
* Rejects malformed transcript JSON.
|
|
451
|
+
*/
|
|
452
|
+
realtimeDelegation(input: string, transcript: string): string;
|
|
453
|
+
/**
|
|
454
|
+
* Formats an unconsumed Realtime transcript tail using canonical Codex markers.
|
|
455
|
+
*
|
|
456
|
+
* # Errors
|
|
457
|
+
*
|
|
458
|
+
* Rejects malformed transcript JSON.
|
|
459
|
+
*/
|
|
460
|
+
realtimeTailDelegation(transcript: string): string | undefined;
|
|
461
|
+
/**
|
|
462
|
+
* Restores persisted logical children after the JavaScript owner acquires
|
|
463
|
+
* its durability generation and activates the replacement host.
|
|
464
|
+
*
|
|
465
|
+
* # Errors
|
|
466
|
+
*
|
|
467
|
+
* Rejects malformed descriptors, disabled subagents, duplicate restoration,
|
|
468
|
+
* or an invalid persisted topology.
|
|
469
|
+
*/
|
|
470
|
+
restoreSubagents(descriptors_json: string, host_contexts_json?: string | null): Promise<void>;
|
|
471
|
+
/**
|
|
472
|
+
* Atomically steers the active turn or starts a new independently awaitable turn.
|
|
473
|
+
*
|
|
474
|
+
* Returns `undefined` when the input was steered into an active turn.
|
|
475
|
+
*
|
|
476
|
+
* # Errors
|
|
477
|
+
*
|
|
478
|
+
* Rejects empty input, a full steering queue, or a stopped driver.
|
|
479
|
+
*/
|
|
480
|
+
routePrompt(instruction: string): Promise<Turn | undefined>;
|
|
481
|
+
/**
|
|
482
|
+
* Sends one canonical directed task-tree message from the owning root.
|
|
483
|
+
*/
|
|
484
|
+
sendSubagentMessage(task: string): Promise<string>;
|
|
485
|
+
/**
|
|
486
|
+
* Enables or disables the optional JavaScript event crossing for this handle.
|
|
487
|
+
*/
|
|
488
|
+
setEventForwarding(enabled: boolean): void;
|
|
489
|
+
/**
|
|
490
|
+
* Enables or disables priority processing for subsequently accepted turns.
|
|
491
|
+
*
|
|
492
|
+
* # Errors
|
|
493
|
+
*
|
|
494
|
+
* Rejects after the driver stops.
|
|
495
|
+
*/
|
|
496
|
+
setFastMode(enabled: boolean): Promise<void>;
|
|
497
|
+
/**
|
|
498
|
+
* Changes the model before the first turn is accepted.
|
|
499
|
+
*
|
|
500
|
+
* # Errors
|
|
501
|
+
*
|
|
502
|
+
* Rejects an invalid model, an incompatible thinking level, conversation
|
|
503
|
+
* activity, or a stopped driver.
|
|
504
|
+
*/
|
|
505
|
+
setModel(model: string): Promise<void>;
|
|
506
|
+
/**
|
|
507
|
+
* Changes the reasoning effort for subsequently accepted turns.
|
|
508
|
+
*
|
|
509
|
+
* # Errors
|
|
510
|
+
*
|
|
511
|
+
* Rejects an invalid effort or a stopped driver.
|
|
512
|
+
*/
|
|
513
|
+
setThinking(thinking: string): Promise<void>;
|
|
514
|
+
/**
|
|
515
|
+
* Gracefully stops the driver and joins every resource owned by this agent.
|
|
516
|
+
*
|
|
517
|
+
* # Errors
|
|
518
|
+
*
|
|
519
|
+
* Rejects when the driver had already stopped or cleanup fails.
|
|
520
|
+
*/
|
|
521
|
+
shutdown(): Promise<void>;
|
|
522
|
+
/**
|
|
523
|
+
* Serializes the latest committed, resumable session snapshot.
|
|
524
|
+
*
|
|
525
|
+
* This is the engine-owned checkpoint at the latest completed safe
|
|
526
|
+
* boundary. After manual compaction, it therefore captures the exact
|
|
527
|
+
* post-install history that can be supplied to a fresh Agent instance.
|
|
528
|
+
*
|
|
529
|
+
* # Errors
|
|
530
|
+
*
|
|
531
|
+
* Rejects before the first committed boundary, after the driver stops,
|
|
532
|
+
* or when serialization fails.
|
|
533
|
+
*/
|
|
534
|
+
snapshot(): Promise<string>;
|
|
535
|
+
/**
|
|
536
|
+
* Starts a clean sibling with the same private agent policy.
|
|
537
|
+
*
|
|
538
|
+
* # Errors
|
|
539
|
+
*
|
|
540
|
+
* Rejects after the driver stops.
|
|
541
|
+
*/
|
|
542
|
+
spawn(): Promise<Nanocodex>;
|
|
543
|
+
/**
|
|
544
|
+
* Starts one canonical Rust task-tree child and returns its descriptor.
|
|
545
|
+
*/
|
|
546
|
+
spawnSubagent(task: string): Promise<string>;
|
|
547
|
+
/**
|
|
548
|
+
* Starts an ordered batch of canonical subagents in the same task tree.
|
|
549
|
+
*
|
|
550
|
+
* # Errors
|
|
551
|
+
*
|
|
552
|
+
* Rejects malformed tasks, agents without subagent tools, a stopped
|
|
553
|
+
* parent, or a batch that cannot be reserved in full.
|
|
554
|
+
*/
|
|
555
|
+
spawnSubagents(tasks_json: string): Promise<string>;
|
|
556
|
+
/**
|
|
557
|
+
* Starts the canonical Codex Realtime adapter lifecycle.
|
|
558
|
+
*
|
|
559
|
+
* # Errors
|
|
560
|
+
*
|
|
561
|
+
* Rejects when the agent driver has stopped or context serialization fails.
|
|
562
|
+
*/
|
|
563
|
+
startRealtimeConversation(): Promise<string>;
|
|
564
|
+
/**
|
|
565
|
+
* Waits for any selected canonical task-tree child to become terminal.
|
|
566
|
+
*/
|
|
567
|
+
waitSubagents(task: string): Promise<string>;
|
|
568
|
+
/**
|
|
569
|
+
* Returns the stable Agent identity.
|
|
570
|
+
*/
|
|
571
|
+
readonly agentId: string;
|
|
572
|
+
/**
|
|
573
|
+
* Returns the stable UUID session identity (`UUIDv7` by default).
|
|
574
|
+
*/
|
|
575
|
+
readonly sessionId: string;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
/**
|
|
579
|
+
* JavaScript binding over one shared Rust turn.
|
|
580
|
+
*/
|
|
581
|
+
export class Turn {
|
|
582
|
+
private constructor();
|
|
583
|
+
free(): void;
|
|
584
|
+
[Symbol.dispose](): void;
|
|
585
|
+
/**
|
|
586
|
+
* Waits until the Rust driver has durably admitted this turn.
|
|
587
|
+
*
|
|
588
|
+
* Returns the durable request identity selected during admission, or
|
|
589
|
+
* `undefined` when the agent has no execution policy.
|
|
590
|
+
*
|
|
591
|
+
* # Errors
|
|
592
|
+
*
|
|
593
|
+
* Rejects with a stable `code` describing an admission failure.
|
|
594
|
+
*/
|
|
595
|
+
accepted(): Promise<string | undefined>;
|
|
596
|
+
/**
|
|
597
|
+
* Cancels this exact active or queued turn.
|
|
598
|
+
*
|
|
599
|
+
* # Errors
|
|
600
|
+
*
|
|
601
|
+
* Rejects if the turn is already terminal or its driver stopped.
|
|
602
|
+
*/
|
|
603
|
+
cancel(): Promise<void>;
|
|
604
|
+
/**
|
|
605
|
+
* Waits for the final assistant message.
|
|
606
|
+
*
|
|
607
|
+
* # Errors
|
|
608
|
+
*
|
|
609
|
+
* Rejects with a stable `code` when the model run or driver fails.
|
|
610
|
+
*/
|
|
611
|
+
result(): Promise<TurnResult>;
|
|
612
|
+
/**
|
|
613
|
+
* Injects text input at the active turn's next safe model boundary.
|
|
614
|
+
*
|
|
615
|
+
* # Errors
|
|
616
|
+
*
|
|
617
|
+
* Rejects if the turn is not active or its driver stopped.
|
|
618
|
+
*/
|
|
619
|
+
steer(instruction: string): Promise<void>;
|
|
620
|
+
/**
|
|
621
|
+
* Injects browser-safe multimodal input at the active turn's next boundary.
|
|
622
|
+
*
|
|
623
|
+
* # Errors
|
|
624
|
+
*
|
|
625
|
+
* Rejects malformed input or a turn that is no longer active.
|
|
626
|
+
*/
|
|
627
|
+
steerContent(content_json: string): Promise<void>;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
/**
|
|
631
|
+
* JavaScript binding over one completed Rust turn result.
|
|
632
|
+
*/
|
|
633
|
+
export class TurnResult {
|
|
634
|
+
private constructor();
|
|
635
|
+
free(): void;
|
|
636
|
+
[Symbol.dispose](): void;
|
|
637
|
+
/**
|
|
638
|
+
* Serializes this completed boundary's resumable session snapshot.
|
|
639
|
+
*
|
|
640
|
+
* # Errors
|
|
641
|
+
*
|
|
642
|
+
* Throws when serialization fails.
|
|
643
|
+
*/
|
|
644
|
+
snapshot(): string;
|
|
645
|
+
/**
|
|
646
|
+
* Serializes exact aggregate usage for this completed logical turn.
|
|
647
|
+
*
|
|
648
|
+
* # Errors
|
|
649
|
+
*
|
|
650
|
+
* Throws when serialization fails.
|
|
651
|
+
*/
|
|
652
|
+
usage(): string;
|
|
653
|
+
/**
|
|
654
|
+
* Returns the final assistant message.
|
|
655
|
+
*/
|
|
656
|
+
readonly finalMessage: string;
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
/**
|
|
660
|
+
* Applies a browser-workspace patch through the canonical Rust planner.
|
|
661
|
+
*
|
|
662
|
+
* The browser host uses this internal binding for nested Code Mode calls so
|
|
663
|
+
* they share the direct `apply_patch` tool's verification and mutation path.
|
|
664
|
+
*/
|
|
665
|
+
export function applyBrowserPatch(patch: string, session_id: string): Promise<string>;
|
|
666
|
+
|
|
667
|
+
/**
|
|
668
|
+
* Returns the shared bounded first-prompt retrieval plan for a managed host.
|
|
669
|
+
*/
|
|
670
|
+
export function managedBootstrapPlan(input: string): string;
|
|
671
|
+
|
|
672
|
+
/**
|
|
673
|
+
* Prunes old replay receipts before the full Agent runtime is constructed.
|
|
674
|
+
*/
|
|
675
|
+
export function pruneDurableReceipts(durability_host_id: string, durability_id: string, terminal_receipt_limit: number): Promise<void>;
|