@tangle-network/sandbox 0.30.1 → 0.30.2-develop.20260820122029.869ebfa

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.
Files changed (37) hide show
  1. package/README.md +1 -0
  2. package/dist/abort-signal-si1WMfJb.js +31 -0
  3. package/dist/agent/index.d.ts +3 -3
  4. package/dist/agent/index.js +3 -3
  5. package/dist/agent-run-outcome-CM7xD7Mg.d.ts +27 -0
  6. package/dist/auth/index.d.ts +1 -1
  7. package/dist/browser-interactive-control-controller-B476gcui.d.ts +96 -0
  8. package/dist/browser-interactive-control-controller-wXQ7W5pT.js +276 -0
  9. package/dist/{client-Bg9vBEfL.js → client-BfnJ44gF.js} +29 -6
  10. package/dist/{client-DRV5bzRc.d.ts → client-Do_HS671.d.ts} +28 -3
  11. package/dist/collaboration/index.d.ts +1 -1
  12. package/dist/collaboration/index.js +1 -1
  13. package/dist/core.d.ts +4 -4
  14. package/dist/core.js +2 -2
  15. package/dist/{index-ldDRk8Jh.d.ts → index-ebsVOlUc.d.ts} +2 -2
  16. package/dist/index.d.ts +11 -8
  17. package/dist/index.js +7 -6
  18. package/dist/interactive-control.d.ts +2 -0
  19. package/dist/interactive-control.js +2 -0
  20. package/dist/openai/index.d.ts +24 -2
  21. package/dist/openai/index.js +147 -67
  22. package/dist/{runtime-api-CK-4S7oA.js → runtime-api-B0tx7NJM.js} +389 -7
  23. package/dist/runtime.d.ts +4 -3
  24. package/dist/runtime.js +3 -2
  25. package/dist/{sandbox-4F9CNqdR.js → sandbox-AUHcCJe1.js} +1435 -784
  26. package/dist/{sandbox-B49ZGQv7.d.ts → sandbox-Cr-4qzaA.d.ts} +139 -194
  27. package/dist/tangle/index.d.ts +1 -1
  28. package/dist/tangle/index.js +1 -1
  29. package/dist/{tangle-CHpXtqlI.js → tangle-iDk_s8vt.js} +1 -1
  30. package/dist/terminal-stream-4KNJ6SmL.d.ts +256 -0
  31. package/dist/{types-Qn3x7R8O.d.ts → types-BwYLVqxX.d.ts} +24 -256
  32. package/package.json +9 -4
  33. /package/dist/{collaboration-COCXdRrk.js → collaboration-DQD9kCdN.js} +0 -0
  34. /package/dist/{errors-Bdy5jXzc.d.ts → errors-CQOvGddH.d.ts} +0 -0
  35. /package/dist/{index-DtRFVx5U.d.ts → index-Bq_z_u6A.d.ts} +0 -0
  36. /package/dist/{index-Cp1KYanB.d.ts → index-CMLW3u5K.d.ts} +0 -0
  37. /package/dist/{local-cli-auth-D4u7fsnH.js → local-cli-auth-CJmSpTjk.js} +0 -0
@@ -0,0 +1,256 @@
1
+ import { AgentInteractiveSessionControlClaim, AgentInteractiveSessionRef } from "@tangle-network/agent-interface";
2
+ import { z } from "zod";
3
+
4
+ //#region ../../../packages/runtime-contracts/dist/terminal-websocket.d.ts
5
+ /** Non-credential protocol selected during a successful terminal handshake. */
6
+ declare const TERMINAL_WS_ECHO_SUBPROTOCOL = "tangle.terminal.v1";
7
+ declare const terminalReadyMessageSchema: z.ZodObject<{
8
+ type: z.ZodLiteral<"ready">;
9
+ connectionId: z.ZodString;
10
+ sessionId: z.ZodString;
11
+ restored: z.ZodBoolean;
12
+ detachTimeoutMs: z.ZodNumber;
13
+ }, z.core.$strip>;
14
+ type TerminalReadyMessage = z.infer<typeof terminalReadyMessageSchema>;
15
+ type TerminalReadyInfo = Omit<TerminalReadyMessage, "type">;
16
+ declare const terminalExitMessageSchema: z.ZodObject<{
17
+ type: z.ZodLiteral<"exit">;
18
+ exitCode: z.ZodOptional<z.ZodNumber>;
19
+ exitSignal: z.ZodOptional<z.ZodString>;
20
+ }, z.core.$strip>;
21
+ type TerminalExitMessage = z.infer<typeof terminalExitMessageSchema>;
22
+ type TerminalExitInfo = Omit<TerminalExitMessage, "type">;
23
+ type TerminalStreamAuthFormat = "edge" | "sidecar-direct";
24
+ interface TerminalInteractiveSessionIdentity {
25
+ incarnationId: AgentInteractiveSessionRef["incarnationId"];
26
+ control: AgentInteractiveSessionControlClaim;
27
+ }
28
+ //#endregion
29
+ //#region src/scoped-token-types.d.ts
30
+ /**
31
+ * Public types for scoped consumer-side tokens.
32
+ *
33
+ * This module intentionally has no SDK implementation imports. Terminal
34
+ * streams and token requests share these contracts without depending on the
35
+ * SDK's aggregate types module.
36
+ */
37
+ /**
38
+ * Scope of a `box.mintScopedToken()` request. `session` and `project` mint
39
+ * SessionGateway read tokens. `session-runtime` and `read-only` mint sidecar
40
+ * capability tokens for browser-safe runtime access.
41
+ */
42
+ type ScopedTokenScope = "session" | "session-runtime" | "project" | "read-only";
43
+ interface MintScopedTokenBase {
44
+ /** TTL in minutes. Default 5; clamped to [1, 15]. */
45
+ ttlMinutes?: number;
46
+ /** Cancel the token request before it reaches the terminal dial. */
47
+ signal?: AbortSignal;
48
+ }
49
+ /** Options for `box.mintScopedToken()`, narrowed by consumer scope. */
50
+ type MintScopedTokenOptions = (MintScopedTokenBase & {
51
+ scope: "session"; /** Client-facing browser session ID. */
52
+ sessionId: string; /** Actual runtime session ID used to filter the sandbox event stream. */
53
+ runtimeSessionId: string;
54
+ }) | (MintScopedTokenBase & {
55
+ scope: "session-runtime";
56
+ sessionId: string;
57
+ runtimeSessionId?: never;
58
+ }) | (MintScopedTokenBase & {
59
+ scope: "project" | "read-only";
60
+ sessionId?: never;
61
+ runtimeSessionId?: never;
62
+ });
63
+ /** Options for the server-side exact interactive-session token request. */
64
+ type MintInteractiveSessionTokenOptions = Pick<MintScopedTokenBase, "ttlMinutes" | "signal">;
65
+ /**
66
+ * Returned by `box.mintScopedToken()`. Use session/project tokens with
67
+ * `SessionGatewayClient`; use session-runtime/read-only tokens with
68
+ * `SandboxRuntimeClient`.
69
+ */
70
+ interface ScopedToken {
71
+ /** Bearer token (JWT) for the consumer selected by `scope`. */
72
+ token: string;
73
+ /** When the token expires. */
74
+ expiresAt: Date;
75
+ /** The runtime's direct edge URL. Use with runtime scopes; session/project
76
+ * tokens instead connect to the Sandbox API's `/session` WebSocket. */
77
+ runtimeUrl: string;
78
+ /** Browser-safe Sandbox API proxy base for terminal and runtime requests. */
79
+ sidecarProxyUrl: string;
80
+ /** Echo of the requested scope. */
81
+ scope: ScopedTokenScope;
82
+ }
83
+ //#endregion
84
+ //#region src/terminal-stream.d.ts
85
+ /** A protocol `error` control frame or a transport failure. */
86
+ declare class TerminalStreamError extends Error {
87
+ /** Protocol error code (e.g. `INIT_FAILED`) or `TRANSPORT` for socket faults. */
88
+ readonly code: string;
89
+ constructor(message: string, code: string);
90
+ }
91
+ /**
92
+ * Event callbacks, passed at construction (the same idiom as
93
+ * `SessionGatewayClient`'s `handlers` config). Registering them up front is
94
+ * load-bearing: the server replays PTY history immediately after `ready`, so
95
+ * a handler attached after connect would miss the replayed screen.
96
+ */
97
+ interface TerminalStreamHandlers {
98
+ /** Raw PTY output bytes (both live output and reattach history replay). */
99
+ onData?: (data: Uint8Array) => void;
100
+ onReady?: (info: TerminalReadyInfo) => void;
101
+ onExit?: (info: TerminalExitInfo) => void;
102
+ /** Protocol `error` frames and post-connect transport failures. */
103
+ onError?: (error: TerminalStreamError) => void;
104
+ /** Socket closed — by the server, the network, or a local `close()`. */
105
+ onClose?: (code: number, reason: string) => void;
106
+ }
107
+ /**
108
+ * Which WebSocket-subprotocol auth envelope to offer. A WebSocket client
109
+ * cannot set an Authorization header, so the bearer rides the
110
+ * `Sec-WebSocket-Protocol` offer — and the two dialable endpoints expect
111
+ * DIFFERENT envelopes:
112
+ *
113
+ * - `"edge"` (default): the public API proxy
114
+ * (`wss://<api>/v1/sidecar-proxy/{sidecarId}/terminals/{id}/ws`) expects
115
+ * `bearer.<base64url(token)>` — see `parseTerminalWsSubprotocolToken` in
116
+ * `products/sandbox/api/src/lib/terminal-websocket.ts`. The fixed
117
+ * `tangle.terminal.v1` marker is offered alongside the credential (see
118
+ * {@link TERMINAL_WS_ECHO_SUBPROTOCOL}).
119
+ * - `"sidecar-direct"`: the sidecar's own `/terminals/{id}/ws` route expects
120
+ * `tangle.bearer.<token>` plus the same `tangle.terminal.v1` echo marker —
121
+ * see `apps/sidecar/src/routes/ws-subprotocol-auth.ts`. Only
122
+ * platform-internal callers (and the composed integration tests) dial the
123
+ * sidecar directly.
124
+ */
125
+ /**
126
+ * Bearer credential for the dial: a token string, or a provider invoked on
127
+ * EVERY dial (including {@link TerminalStream.reconnect}). The provider
128
+ * receives that dial's AbortSignal so token minting observes cancellation.
129
+ * Scoped terminal tokens are short-lived (the platform clamps them to <= 15
130
+ * minutes), so a provider lets the SDK re-mint a fresh token per dial.
131
+ */
132
+ type TerminalStreamToken = string | ScopedToken | ((signal?: AbortSignal) => Promise<string | ScopedToken> | string | ScopedToken);
133
+ /** Authority refreshed before an interactive stream reconnects. */
134
+ interface TerminalStreamReconnectBinding {
135
+ incarnationId: TerminalInteractiveSessionIdentity["incarnationId"];
136
+ control: TerminalInteractiveSessionIdentity["control"];
137
+ /** Release a claim if the new socket cannot be opened. */
138
+ onFailure?: () => Promise<void> | void;
139
+ }
140
+ /** Internal SDK hook that reclaims interactive authority before reconnect. */
141
+ interface TerminalStreamReconnectAuthority {
142
+ acquire(signal?: AbortSignal): Promise<TerminalStreamReconnectBinding>;
143
+ }
144
+ interface TerminalStreamOptions {
145
+ /**
146
+ * Absolute URL of the terminal WebSocket endpoint. `http(s)` URLs are
147
+ * converted to `ws(s)` automatically.
148
+ */
149
+ url: string;
150
+ /**
151
+ * Bearer token carried in the auth subprotocol (see `authFormat`) — a
152
+ * string, or a provider re-invoked on every dial so short-lived scoped
153
+ * tokens stay fresh across reconnects.
154
+ */
155
+ token: TerminalStreamToken;
156
+ /**
157
+ * PTY connection id — also sent in the `init` frame; the server rejects a
158
+ * mismatch with the URL's id. Reusing an id reattaches the existing PTY.
159
+ */
160
+ connectionId: string;
161
+ cols?: number;
162
+ rows?: number;
163
+ /** Command to run when the id has no live PTY (defaults to the shell). */
164
+ command?: string;
165
+ cwd?: string;
166
+ env?: Record<string, string>;
167
+ /**
168
+ * Exact interactive-agent incarnation. Ordinary terminal consumers omit
169
+ * both interactive fields and retain the existing wire contract.
170
+ */
171
+ incarnationId?: TerminalInteractiveSessionIdentity["incarnationId"];
172
+ /** Exact active control claim for the interactive-agent incarnation. */
173
+ control?: TerminalInteractiveSessionIdentity["control"];
174
+ /** Auth subprotocol envelope. Default `"edge"`. */
175
+ authFormat?: TerminalStreamAuthFormat;
176
+ handlers?: TerminalStreamHandlers;
177
+ /** Reject `connect()` if `ready` has not arrived within this window. */
178
+ connectTimeoutMs?: number;
179
+ /** Cancel token resolution or an in-progress WebSocket handshake. */
180
+ signal?: AbortSignal;
181
+ /** Reclaim interactive authority before a reconnecting dial. */
182
+ reconnectAuthority?: TerminalStreamReconnectAuthority;
183
+ }
184
+ /**
185
+ * Client for one terminal WebSocket connection. Construct via
186
+ * {@link TerminalStream.connect}, which resolves once the server
187
+ * acknowledges the attach with `ready` (history replay then streams through
188
+ * `handlers.onData`).
189
+ */
190
+ declare class TerminalStream {
191
+ private readonly ws;
192
+ private readonly options;
193
+ private readonly interactiveIdentity;
194
+ private readonly initMessage;
195
+ private readonly handlers;
196
+ private readyInfo;
197
+ private closed;
198
+ private closeWaiters;
199
+ private readonly textDecoder;
200
+ private reconnectInFlight?;
201
+ /**
202
+ * Dial the endpoint, send `init` as the first frame, and resolve once the
203
+ * server responds `ready`. Rejects on a protocol `error` frame, a socket
204
+ * close/failure before `ready`, or the connect timeout — always with the
205
+ * reason the server gave. A token PROVIDER is awaited here, before the
206
+ * socket opens, so every dial (first connect and each reconnect) carries a
207
+ * fresh credential.
208
+ */
209
+ static connect(options: TerminalStreamOptions): Promise<TerminalStream>;
210
+ private constructor();
211
+ private establish;
212
+ private handleMessage;
213
+ /** PTY connection id this stream is attached to. */
214
+ get connectionId(): string;
215
+ /** The server's `ready` acknowledgement. Set once `connect()` resolves. */
216
+ get ready(): TerminalReadyInfo;
217
+ /** True while the socket is open. */
218
+ get isOpen(): boolean;
219
+ /**
220
+ * Send input keystrokes to the PTY. `Uint8Array` input is decoded as
221
+ * UTF-8 (the wire protocol carries input as JSON text). Input larger than
222
+ * the server's 1 MiB frame cap is split across multiple `input` frames in
223
+ * order on the same socket, so delivery order is preserved.
224
+ */
225
+ write(data: string | Uint8Array): void;
226
+ /** Resize the PTY. */
227
+ resize(cols: number, rows: number): void;
228
+ /**
229
+ * Detach cleanly: close the socket and resolve once the close completes.
230
+ * The PTY survives server-side for `ready.detachTimeoutMs` (5 minutes
231
+ * today) — reattach within that window via {@link reconnect} (or a fresh
232
+ * `connect()` with the same connectionId) to replay history and continue.
233
+ */
234
+ close(): Promise<void>;
235
+ /**
236
+ * Re-dial the same endpoint with the same connectionId on a fresh socket
237
+ * — the server reattaches the PTY and replays its buffered history. When
238
+ * the stream was constructed with a token PROVIDER, it is re-invoked for
239
+ * the new dial (scoped terminal tokens expire within minutes, so the
240
+ * original credential may be dead by reconnect time); with a plain string
241
+ * token, pass a fresh `token` override yourself when it may have expired.
242
+ * `handlers` rebinds callbacks for the new stream.
243
+ */
244
+ reconnect(overrides?: {
245
+ token?: TerminalStreamToken;
246
+ handlers?: TerminalStreamHandlers;
247
+ cols?: number;
248
+ rows?: number;
249
+ signal?: AbortSignal;
250
+ }): Promise<TerminalStream>;
251
+ private reconnectOnce;
252
+ private handlersForReconnect;
253
+ private assertOpen;
254
+ }
255
+ //#endregion
256
+ export { TerminalStreamReconnectAuthority as a, MintScopedTokenOptions as c, TERMINAL_WS_ECHO_SUBPROTOCOL as d, TerminalExitInfo as f, TerminalStreamAuthFormat as h, TerminalStreamOptions as i, ScopedToken as l, TerminalReadyInfo as m, TerminalStreamError as n, TerminalStreamToken as o, TerminalInteractiveSessionIdentity as p, TerminalStreamHandlers as r, MintInteractiveSessionTokenOptions as s, TerminalStream as t, ScopedTokenScope as u };
@@ -1,213 +1,8 @@
1
+ import { r as TerminalStreamHandlers, t as TerminalStream } from "./terminal-stream-4KNJ6SmL.js";
2
+ import * as _$_tangle_network_agent_interface0 from "@tangle-network/agent-interface";
1
3
  import { AgentExactRunControlRef, AgentProfile, AgentProfileCapabilities, AgentProfileConfidential, AgentProfileValidationResult, HarnessType, ReasoningEffort } from "@tangle-network/agent-interface";
2
4
  import { z } from "zod";
3
5
 
4
- //#region src/terminal-stream.d.ts
5
- /**
6
- * TerminalStream — typed client for the sandbox terminal WebSocket protocol.
7
- *
8
- * Drives a live PTY session (an interactive harness TUI or a plain shell)
9
- * from the caller's own program: binary frames stream raw PTY output bytes,
10
- * TEXT JSON frames carry the control protocol. The wire contract is defined
11
- * by the sidecar in `apps/sidecar/src/terminal/websocket-protocol.ts` (the
12
- * source of truth for these message shapes — its zod schemas cannot be
13
- * imported here without pulling sidecar dependencies into the SDK bundle,
14
- * so the types are mirrored locally):
15
- *
16
- * client → server (TEXT JSON):
17
- * init {connectionId?, cols, rows, command?, cwd?, env?} — MUST be first
18
- * input {data}
19
- * resize {cols, rows}
20
- * server → client (TEXT JSON):
21
- * ready {connectionId, sessionId, restored, detachTimeoutMs}
22
- * exit {exitCode?, exitSignal?}
23
- * error {code, message}
24
- * rec / rec.done — recording tee frames for the platform's session
25
- * capture consumer; not part of the client surface
26
- * server → client (BINARY): raw PTY output bytes
27
- *
28
- * Detach/reconnect: the server keeps the PTY alive for `detachTimeoutMs`
29
- * (5 minutes today) after the socket closes; re-dialing with the SAME
30
- * connectionId reattaches and replays the buffered output history, so a
31
- * fresh client repaints the current screen.
32
- *
33
- * Browser-safe: uses the global `WebSocket` (browsers, Workers, Node >= 22)
34
- * and never imports `ws` — the same environment contract as
35
- * `session-gateway/client.ts`.
36
- */
37
- /** Ready acknowledgement — the PTY is attached and history replay follows. */
38
- interface TerminalReadyInfo {
39
- connectionId: string;
40
- sessionId: string;
41
- /** True when an existing PTY was reattached (its history is replayed). */
42
- restored: boolean;
43
- /** How long (ms) the server keeps the PTY alive after this socket closes. */
44
- detachTimeoutMs: number;
45
- }
46
- /** Terminal process exit notification. */
47
- interface TerminalExitInfo {
48
- exitCode?: number;
49
- exitSignal?: string;
50
- }
51
- /** A protocol `error` control frame or a transport failure. */
52
- declare class TerminalStreamError extends Error {
53
- /** Protocol error code (e.g. `INIT_FAILED`) or `TRANSPORT` for socket faults. */
54
- readonly code: string;
55
- constructor(message: string, code: string);
56
- }
57
- /**
58
- * Event callbacks, passed at construction (the same idiom as
59
- * `SessionGatewayClient`'s `handlers` config). Registering them up front is
60
- * load-bearing: the server replays PTY history immediately after `ready`, so
61
- * a handler attached after connect would miss the replayed screen.
62
- */
63
- interface TerminalStreamHandlers {
64
- /** Raw PTY output bytes (both live output and reattach history replay). */
65
- onData?: (data: Uint8Array) => void;
66
- onReady?: (info: TerminalReadyInfo) => void;
67
- onExit?: (info: TerminalExitInfo) => void;
68
- /** Protocol `error` frames and post-connect transport failures. */
69
- onError?: (error: TerminalStreamError) => void;
70
- /** Socket closed — by the server, the network, or a local `close()`. */
71
- onClose?: (code: number, reason: string) => void;
72
- }
73
- /**
74
- * Which WebSocket-subprotocol auth envelope to offer. A WebSocket client
75
- * cannot set an Authorization header, so the bearer rides the
76
- * `Sec-WebSocket-Protocol` offer — and the two dialable endpoints expect
77
- * DIFFERENT envelopes:
78
- *
79
- * - `"edge"` (default): the public API proxy
80
- * (`wss://<api>/v1/sidecar-proxy/{sidecarId}/terminals/{id}/ws`) expects
81
- * `bearer.<base64url(token)>` — see `parseTerminalWsSubprotocolToken` in
82
- * `products/sandbox/api/src/lib/terminal-websocket.ts`. The fixed
83
- * `tangle.terminal.v1` marker is offered alongside the credential (see
84
- * {@link TERMINAL_WS_ECHO_SUBPROTOCOL}).
85
- * - `"sidecar-direct"`: the sidecar's own `/terminals/{id}/ws` route expects
86
- * `tangle.bearer.<token>` plus the same `tangle.terminal.v1` echo marker —
87
- * see `apps/sidecar/src/routes/ws-subprotocol-auth.ts`. Only
88
- * platform-internal callers (and the composed integration tests) dial the
89
- * sidecar directly.
90
- */
91
- type TerminalStreamAuthFormat = "edge" | "sidecar-direct";
92
- /**
93
- * Bearer credential for the dial: a token string, or a provider invoked on
94
- * EVERY dial (including {@link TerminalStream.reconnect}). Scoped terminal
95
- * tokens are short-lived (the platform clamps them to <= 15 minutes), so a
96
- * reconnect after the detach window with the original string would be
97
- * rejected — a provider lets the SDK re-mint a fresh token per dial.
98
- */
99
- type TerminalStreamToken = string | (() => Promise<string> | string);
100
- interface TerminalStreamOptions {
101
- /**
102
- * Absolute URL of the terminal WebSocket endpoint. `http(s)` URLs are
103
- * converted to `ws(s)` automatically.
104
- */
105
- url: string;
106
- /**
107
- * Bearer token carried in the auth subprotocol (see `authFormat`) — a
108
- * string, or a provider re-invoked on every dial so short-lived scoped
109
- * tokens stay fresh across reconnects.
110
- */
111
- token: TerminalStreamToken;
112
- /**
113
- * PTY connection id — also sent in the `init` frame; the server rejects a
114
- * mismatch with the URL's id. Reusing an id reattaches the existing PTY.
115
- */
116
- connectionId: string;
117
- cols?: number;
118
- rows?: number;
119
- /** Command to run when the id has no live PTY (defaults to the shell). */
120
- command?: string;
121
- cwd?: string;
122
- env?: Record<string, string>;
123
- /** Auth subprotocol envelope. Default `"edge"`. */
124
- authFormat?: TerminalStreamAuthFormat;
125
- handlers?: TerminalStreamHandlers;
126
- /** Reject `connect()` if `ready` has not arrived within this window. */
127
- connectTimeoutMs?: number;
128
- }
129
- /**
130
- * Fixed non-credential marker offered on EVERY dial (both auth formats),
131
- * giving a spec-compliant server something safe to select into the 101's
132
- * `Sec-WebSocket-Protocol`. Two reasons it exists:
133
- *
134
- * 1. RFC 6455 §4.1 says a client that offered subprotocols MUST fail the
135
- * connection when the server selects none. Node's WebSocket (undici,
136
- * per the WHATWG spec) enforces this strictly; browsers are lenient and
137
- * tolerate a 101 with no selected subprotocol — which is why the
138
- * browser-only reference client got away with offering just the
139
- * credential.
140
- * 2. The server must never echo the token-bearing offer back (that would
141
- * leak the live credential into a response header) — so it needs a
142
- * non-credential protocol it CAN select.
143
- */
144
- declare const TERMINAL_WS_ECHO_SUBPROTOCOL = "tangle.terminal.v1";
145
- /**
146
- * Client for one terminal WebSocket connection. Construct via
147
- * {@link TerminalStream.connect}, which resolves once the server
148
- * acknowledges the attach with `ready` (history replay then streams through
149
- * `handlers.onData`).
150
- */
151
- declare class TerminalStream {
152
- private readonly ws;
153
- private readonly options;
154
- private readonly handlers;
155
- private readyInfo;
156
- private closed;
157
- private closeWaiters;
158
- private readonly textDecoder;
159
- /**
160
- * Dial the endpoint, send `init` as the first frame, and resolve once the
161
- * server responds `ready`. Rejects on a protocol `error` frame, a socket
162
- * close/failure before `ready`, or the connect timeout — always with the
163
- * reason the server gave. A token PROVIDER is awaited here, before the
164
- * socket opens, so every dial (first connect and each reconnect) carries a
165
- * fresh credential.
166
- */
167
- static connect(options: TerminalStreamOptions): Promise<TerminalStream>;
168
- private constructor();
169
- private establish;
170
- private handleMessage;
171
- /** PTY connection id this stream is attached to. */
172
- get connectionId(): string;
173
- /** The server's `ready` acknowledgement. Set once `connect()` resolves. */
174
- get ready(): TerminalReadyInfo;
175
- /** True while the socket is open. */
176
- get isOpen(): boolean;
177
- /**
178
- * Send input keystrokes to the PTY. `Uint8Array` input is decoded as
179
- * UTF-8 (the wire protocol carries input as JSON text). Input larger than
180
- * the server's 1 MiB frame cap is split across multiple `input` frames in
181
- * order on the same socket, so delivery order is preserved.
182
- */
183
- write(data: string | Uint8Array): void;
184
- /** Resize the PTY. */
185
- resize(cols: number, rows: number): void;
186
- /**
187
- * Detach cleanly: close the socket and resolve once the close completes.
188
- * The PTY survives server-side for `ready.detachTimeoutMs` (5 minutes
189
- * today) — reattach within that window via {@link reconnect} (or a fresh
190
- * `connect()` with the same connectionId) to replay history and continue.
191
- */
192
- close(): Promise<void>;
193
- /**
194
- * Re-dial the same endpoint with the same connectionId on a fresh socket
195
- * — the server reattaches the PTY and replays its buffered history. When
196
- * the stream was constructed with a token PROVIDER, it is re-invoked for
197
- * the new dial (scoped terminal tokens expire within minutes, so the
198
- * original credential may be dead by reconnect time); with a plain string
199
- * token, pass a fresh `token` override yourself when it may have expired.
200
- * `handlers` rebinds callbacks for the new stream.
201
- */
202
- reconnect(overrides?: {
203
- token?: TerminalStreamToken;
204
- handlers?: TerminalStreamHandlers;
205
- cols?: number;
206
- rows?: number;
207
- }): Promise<TerminalStream>;
208
- private assertOpen;
209
- }
210
- //#endregion
211
6
  //#region ../../../packages/runtime-contracts/dist/backend-types.d.ts
212
7
  /**
213
8
  * Canonical harnesses this repo ships no provider adapter for.
@@ -2510,17 +2305,18 @@ interface InstalledTool {
2510
2305
  */
2511
2306
  /**
2512
2307
  * Granular outcome of an agent run.
2513
- * - `success` — reached a terminal event with no run-level error and no failed
2514
- * tool. A tool-only turn succeeds unless the caller opts into visible-output
2515
- * enforcement.
2516
- * - `failed` — a run-level error event, or any failed (`isError`) tool, or the
2517
- * stream ended with no terminal event.
2308
+ * - `success` — reached a successful terminal event. Failed tool calls remain
2309
+ * available in `toolInvocations` because an agent can recover from them.
2310
+ * - `failed` — a run-level error, a failed terminal, a malformed terminal, or
2311
+ * a stream that ended with no terminal event.
2518
2312
  * - `blocked_on_approval` — a tool hit a hub approval gate; resolve it, then
2519
2313
  * re-run. See {@link AgentApprovalRequirement}.
2520
2314
  * - `awaiting_question` — the agent asked a question and the turn ended without
2521
2315
  * an answer. See {@link AgentQuestionRequest}.
2316
+ * - `awaiting_interaction` — the agent emitted another canonical interaction
2317
+ * request and the turn ended without a response.
2522
2318
  */
2523
- type AgentRunStatus = "success" | "failed" | "blocked_on_approval" | "awaiting_question" | "awaiting_plan_decision";
2319
+ type AgentRunStatus = "success" | "failed" | "blocked_on_approval" | "awaiting_question" | "awaiting_interaction" | "awaiting_plan_decision";
2524
2320
  interface DurablePlanSnapshot {
2525
2321
  id: string;
2526
2322
  revision: number;
@@ -2650,6 +2446,8 @@ interface PromptResult {
2650
2446
  approval?: AgentApprovalRequirement;
2651
2447
  /** Set when `status === "awaiting_question"`. */
2652
2448
  question?: AgentQuestionRequest;
2449
+ /** Canonical request for any interaction that still needs a response. */
2450
+ interaction?: _$_tangle_network_agent_interface0.InteractionRequest;
2653
2451
  /** Set when `status === "awaiting_plan_decision"`. */
2654
2452
  plan?: DurablePlanSnapshot;
2655
2453
  /** Trace ID for debugging */
@@ -3194,6 +2992,18 @@ interface SandboxRuntimeCapabilities {
3194
2992
  * record. Absent on an image that predates the flag. */
3195
2993
  responseDedupe?: boolean;
3196
2994
  };
2995
+ /** Native TUI lifecycle and control operations exposed by the deployment. */
2996
+ interactiveAgent?: {
2997
+ /** Start one native TUI for the requested session. */start: boolean; /** Read durable TUI state. */
2998
+ status: boolean; /** Attach to the existing native TUI. */
2999
+ attach: boolean; /** Fence concurrent TUI writers with an exact control claim. */
3000
+ control: boolean; /** Reattach after a client disconnect. */
3001
+ reattach: boolean; /** Send a prompt to the existing TUI. */
3002
+ sendPrompt: boolean; /** Send terminal input to the existing TUI. */
3003
+ input: boolean; /** Resize the existing TUI. */
3004
+ resize: boolean; /** Stop the exact TUI session. */
3005
+ stop: boolean;
3006
+ };
3197
3007
  }
3198
3008
  /**
3199
3009
  * Lifecycle state of an agent session inside a sandbox.
@@ -3650,48 +3460,6 @@ type FleetDriveTurnOutcome = {
3650
3460
  outcome: "error";
3651
3461
  error: string;
3652
3462
  };
3653
- /**
3654
- * Scope of a `box.mintScopedToken()` request. `session` and `project` mint
3655
- * SessionGateway read tokens. `session-runtime` and `read-only` mint sidecar
3656
- * capability tokens for browser-safe runtime access.
3657
- */
3658
- type ScopedTokenScope = "session" | "session-runtime" | "project" | "read-only";
3659
- interface MintScopedTokenBase {
3660
- /** TTL in minutes. Default 5; clamped to [1, 15]. */
3661
- ttlMinutes?: number;
3662
- }
3663
- /** Options for `box.mintScopedToken()`, narrowed by consumer scope. */
3664
- type MintScopedTokenOptions = (MintScopedTokenBase & {
3665
- scope: "session"; /** Client-facing browser session ID. */
3666
- sessionId: string; /** Actual runtime session ID used to filter the sandbox event stream. */
3667
- runtimeSessionId: string;
3668
- }) | (MintScopedTokenBase & {
3669
- scope: "session-runtime";
3670
- sessionId: string;
3671
- runtimeSessionId?: never;
3672
- }) | (MintScopedTokenBase & {
3673
- scope: "project" | "read-only";
3674
- sessionId?: never;
3675
- runtimeSessionId?: never;
3676
- });
3677
- /**
3678
- * Returned by `box.mintScopedToken()`. Use session/project tokens with
3679
- * `SessionGatewayClient`; use session-runtime/read-only tokens with
3680
- * `SandboxRuntimeClient`.
3681
- */
3682
- interface ScopedToken {
3683
- /** Bearer token (JWT) for the consumer selected by `scope`. */
3684
- token: string;
3685
- /** When the token expires. */
3686
- expiresAt: Date;
3687
- /** The runtime's direct edge URL. Use with runtime scopes; session/project
3688
- * tokens instead connect to the Sandbox API's `/session` WebSocket. */
3689
- runtimeUrl: string;
3690
- /** Browser-safe Sandbox API proxy base for terminal and runtime requests. */
3691
- sidecarProxyUrl: string;
3692
- /** Echo of the requested scope. */
3693
- scope: ScopedTokenScope;
3694
- }
3695
3463
  /**
3696
3464
  * Callback invoked when the SDK refreshes a sandbox bearer transparently
3697
3465
  * (e.g. after a 401 retry against the runtime endpoint). Lets long-
@@ -6478,4 +6246,4 @@ interface CodeExecutionOptions {
6478
6246
  idempotencyKey?: string;
6479
6247
  }
6480
6248
  //#endregion
6481
- export { EgressPolicy as $, WriteManyFile as $i, SandboxConfig as $n, SandboxTraceOptions as $r, IntelligenceReportSubjectType as $t, CreateSandboxFleetTokenOptions as A, StorageConfig as Ai, ProvisionResult as An, SandboxFleetWorkspace as Ar, ForkIdempotency as At, DownloadOptions as B, TeePublicKey as Bi, ReconcileSandboxFleetsResult as Bn, SandboxResources as Br, GpuLeaseBilling as Bt, CodeResultPart as C, SnapshotIdempotency as Ci, ProcessSignal as Cn, SandboxFleetPolicy as Cr, FleetDriveTurnRequest as Ct, CreateIntelligenceReportOptions as D, SshKeysManager as Di, PromptOptions as Dn, SandboxFleetTraceExport as Dr, FleetPromptDispatchOptions as Dt, CreateGpuLeaseOptions as E, SnapshotResult as Ei, PromptInputPart as En, SandboxFleetTraceEvent as Er, FleetMachineId as Et, DeleteOptions as F, TaskSessionInfo as Fi, PublishPublicTemplateOptions as Fn, SandboxInfo as Fr, GitCommit as Ft, DriverType as G, UpdateUserOptions as Gi, RolloutChildResult as Gn, SandboxTerminalCreateOptions as Gr, GpuLeaseProviderName as Gt, DriveTurnOptions as H, TokenRefreshHandler as Hi, RestoreSnapshotOptions as Hn, SandboxRuntimeHealth as Hr, GpuLeaseExecOptions as Ht, DevServerInfo as I, TaskSessionProfile as Ii, PublishPublicTemplateVersionOptions as In, SandboxIntelligenceEnvelope as Ir, GitConfig as It, EffectiveBackend as J, UsageInfo as Ji, RolloutStartResult as Jn, SandboxTerminalRequestOptions as Jr, HostAgentRuntimeBackend as Jt, DurablePlan as K, UploadOptions as Ki, RolloutOptions as Kn, SandboxTerminalInfo as Kr, GpuLeaseStatus as Kt, DirectoryPermission as L, TeeAttestationOptions as Li, ReapExpiredSandboxFleetsOptions as Ln, SandboxPortBinding as Lr, GitDiff as Lt, CreateSandboxOptions as M, TaskSessionChanges as Mi, ProvisionStep as Mn, SandboxFleetWorkspaceRestoreResult as Mr, GPU_LEASE_PROVIDER_NAMES as Mt, CreateSessionOptions as N, TaskSessionCommitResult as Ni, PublicTemplateInfo as Nn, SandboxFleetWorkspaceSnapshotResult as Nr, GitAuth as Nt, CreateRequestOptions as O, StartupDiagnostics as Oi, PromptResult as On, SandboxFleetTraceOptions as Or, FleetPromptDispatchResult as Ot, CreateTaskSessionOptions as P, TaskSessionFileChange as Pi, PublicTemplateVersionInfo as Pn, SandboxIdentity as Pr, GitBranch as Pt, EgressManager as Q, WriteFileOptions as Qi, SSHCredentials as Qn, SandboxTraceExport as Qr, IntelligenceReportCompareTo as Qt, DispatchPromptOptions as R, TeeAttestationReport as Ri, ReapExpiredSandboxFleetsResult as Rn, SandboxPortPreviewLink as Rr, GitStatus as Rt, CodeLanguage as S, SnapshotDeleteOutcome as Si, ProcessManager as Sn, SandboxFleetOperationsSummary as Sr, FleetDriveTurnOutcome as St, CompletedTurnResult as T, SnapshotOptions as Ti, ProcessStatus as Tn, SandboxFleetTraceBundle as Tr, FleetExecDispatchResult as Tt, DriverConfig as U, TokenUsage as Ui, ResumeOptions as Un, SandboxStatus as Ur, GpuLeaseExecResult as Ut, DownloadProgress as V, TeePublicKeyResponse as Vi, RenameOptions as Vn, SandboxRuntimeCapabilities as Vr, GpuLeaseCommandResult as Vt, DriverInfo as W, TurnDriveResult as Wi, Rollout as Wn, SandboxTerminalAttachOptions as Wr, GpuLeaseManager as Wt, EffectiveBackendSource as X, WaitForRolloutOptions as Xi, RolloutTurnPart as Xn, SandboxTraceBundle as Xr, IntelligenceReport as Xt, EffectiveBackendProfile as Y, WaitForOptions as Yi, RolloutStatus as Yn, SandboxTerminals as Yr, InstalledTool as Yt, EgressDenial as Z, WorkspaceOperationLookup as Zi, SSHCommandDescriptor as Zn, SandboxTraceEvent as Zr, IntelligenceReportBudget as Zt, BranchOptions as _, TerminalStreamToken as _a, SessionMessage as _i, PreviewLinkWaitOptions as _n, SandboxFleetMachineMeteredUsage as _r, FileWriteResult as _t, AttachSandboxFleetMachineOptions as a, BatchTaskUsage as aa, SecretInfo as ai, ListSandboxOptions as an, SandboxEnvironment as ar, FileInfo as at, CodeExecutionOptions as b, SessionStatus as bi, ProcessListOptions as bn, SandboxFleetManifest as br, FleetDispatchResultBufferOptions as bt, BackendInfo as c, parseBackendType as ca, SendSessionMessageRequest as ci, MintScopedTokenOptions as cn, SandboxFleetArtifactSpec as cr, FileReadError as ct, BatchBackend as d, TerminalReadyInfo as da, SessionEventStreamOptions as di, NetworkManager as dn, SandboxFleetDispatchResponse as dr, FileSystem as dt, WriteManyOptions as ea, SandboxUser as ei, IntelligenceReportWindow as en, SandboxConnection as er, EnsureDevServerOptions as et, BatchResult as f, TerminalStream as fa, SessionFailureReason as fi, NonHostAgentDriverConfig as fn, SandboxFleetDriverCapability as fr, FileTreeFile as ft, BatchTaskResult as g, TerminalStreamOptions as ga, SessionListOptions as gi, PreviewLinkManager as gn, SandboxFleetMachine as gr, FileUsageResult as gt, BatchTask as h, TerminalStreamHandlers as ha, SessionInterruptOptions as hi, PreviewLinkInfo as hn, SandboxFleetIntelligenceEnvelope as hr, FileUsageOptions as ht, AttachGpuLeaseOptions as i, BatchSidecarGroup as ia, SearchOptions as ii, ListSandboxFleetOptions as in, SandboxDeleteOutcome as ir, ExecResult as it, CreateSandboxFleetWithCoordinatorOptions as j, SubscriptionInfo as ji, ProvisionStatus as jn, SandboxFleetWorkspaceReconcileResult as jr, ForkLookupOptions as jt, CreateSandboxFleetOptions as k, StartupOperation as ki, ProvisionEvent as kn, SandboxFleetUsage as kr, ForkCounts as kt, BackendManager as l, TERMINAL_WS_ECHO_SUBPROTOCOL as la, SentSessionMessage as li, MkdirOptions as ln, SandboxFleetCostEstimate as lr, FileReadResult as lt, BatchRunRequest as m, TerminalStreamError as ma, SessionInfo as mi, PermissionsManager as mn, SandboxFleetInfo as mr, FileTreeResult as mt, AccessPolicyRule as n, BatchEvent as na, ScopedTokenScope as ni, ListMessagesOptions as nn, SandboxCreateReceipt as nr, ExactProcessSpawnOptions as nt, BackendCapabilities as o, PublicBatchRunRequest as oa, SecretsManager as oi, MAX_EGRESS_DENIALS_LIMIT as on, SandboxEvent as or, FileReadBatchOptions as ot, BatchRunOptions as p, TerminalStreamAuthFormat as pa, SessionForkOptions as pi, PermissionLevel as pn, SandboxFleetDriverTimings as pr, FileTreeOptions as pt, DurablePlanDecisionResult as q, UploadProgress as qi, RolloutScorer as qn, SandboxTerminalManager as qr, HostAgentDriverConfig as qt, AddUserOptions as r, BatchEventDataMap as ra, SearchMatch as ri, ListOptions as rn, SandboxDeleteAcknowledgement as rr, ExecOptions as rt, BackendConfig as s, BackendType as sa, SendSessionMessageOptions as si, McpServerConfig as sn, SandboxFleetArtifact as sr, FileReadBatchResult as st, AcceleratorKind as t, BatchBackendStats as ta, ScopedToken as ti, JsonValue as tn, SandboxCreateOutcome as tr, EventStreamOptions as tt, BackendStatus as u, TerminalExitInfo as ua, SessionBackendCredentials as ui, NetworkConfig as un, SandboxFleetDispatchFailureClass as ur, FileRenameResult as ut, ChunkedUploadOptions as v, SessionMessageInputPart as vi, Process as vn, SandboxFleetMachineRecord as vr, FleetDispatchCancelResult as vt, CommitTaskSessionOptions as w, SnapshotInfo as wi, ProcessSpawnOptions as wn, SandboxFleetToken as wr, FleetExecDispatchOptions as wt, CodeExecutionResult as x, SnapshotDeleteAcknowledgement as xi, ProcessLogEntry as xn, SandboxFleetManifestMachine as xr, FleetDispatchStreamOptions as xt, ChunkedUploadResult as y, SessionResultOptions as yi, ProcessInfo as yn, SandboxFleetMachineSpec as yr, FleetDispatchResultBuffer as yt, DispatchedSession as z, TeeAttestationResponse as zi, ReconcileSandboxFleetsOptions as zn, SandboxResourceUsage as zr, GpuLease as zt };
6249
+ export { EffectiveBackend as $, WorkspaceOperationLookup as $i, RolloutStatus as $n, SandboxTerminals as $r, HostAgentRuntimeBackend as $t, CreateGpuLeaseOptions as A, StartupDiagnostics as Ai, PromptInputPart as An, SandboxFleetTraceEvent as Ar, FleetExecDispatchResult as At, DevServerInfo as B, TeeAttestationReport as Bi, PublishPublicTemplateVersionOptions as Bn, SandboxIntelligenceEnvelope as Br, GitCommit as Bt, ChunkedUploadResult as C, SnapshotDeleteAcknowledgement as Ci, ProcessInfo as Cn, SandboxFleetMachineSpec as Cr, FleetDispatchCancelResult as Ct, CodeResultPart as D, SnapshotOptions as Di, ProcessSignal as Dn, SandboxFleetPolicy as Dr, FleetDriveTurnOutcome as Dt, CodeLanguage as E, SnapshotInfo as Ei, ProcessManager as En, SandboxFleetOperationsSummary as Er, FleetDispatchStreamOptions as Et, CreateSandboxFleetWithCoordinatorOptions as F, TaskSessionCommitResult as Fi, ProvisionStatus as Fn, SandboxFleetWorkspaceReconcileResult as Fr, ForkIdempotency as Ft, DownloadProgress as G, TokenUsage as Gi, RenameOptions as Gn, SandboxRuntimeCapabilities as Gr, GpuLeaseBilling as Gt, DispatchPromptOptions as H, TeePublicKey as Hi, ReapExpiredSandboxFleetsResult as Hn, SandboxPortPreviewLink as Hr, GitDiff as Ht, CreateSandboxOptions as I, TaskSessionFileChange as Ii, ProvisionStep as In, SandboxFleetWorkspaceRestoreResult as Ir, ForkLookupOptions as It, DriverInfo as J, UploadOptions as Ji, Rollout as Jn, SandboxTerminalAttachOptions as Jr, GpuLeaseExecResult as Jt, DriveTurnOptions as K, TurnDriveResult as Ki, RestoreSnapshotOptions as Kn, SandboxRuntimeHealth as Kr, GpuLeaseCommandResult as Kt, CreateSessionOptions as L, TaskSessionInfo as Li, PublicTemplateInfo as Ln, SandboxFleetWorkspaceSnapshotResult as Lr, GPU_LEASE_PROVIDER_NAMES as Lt, CreateRequestOptions as M, StorageConfig as Mi, PromptResult as Mn, SandboxFleetTraceOptions as Mr, FleetPromptDispatchOptions as Mt, CreateSandboxFleetOptions as N, SubscriptionInfo as Ni, ProvisionEvent as Nn, SandboxFleetUsage as Nr, FleetPromptDispatchResult as Nt, CommitTaskSessionOptions as O, SnapshotResult as Oi, ProcessSpawnOptions as On, SandboxFleetToken as Or, FleetDriveTurnRequest as Ot, CreateSandboxFleetTokenOptions as P, TaskSessionChanges as Pi, ProvisionResult as Pn, SandboxFleetWorkspace as Pr, ForkCounts as Pt, DurablePlanSnapshot as Q, WaitForRolloutOptions as Qi, RolloutStartResult as Qn, SandboxTerminalRequestOptions as Qr, HostAgentDriverConfig as Qt, CreateTaskSessionOptions as R, TaskSessionProfile as Ri, PublicTemplateVersionInfo as Rn, SandboxIdentity as Rr, GitAuth as Rt, ChunkedUploadOptions as S, SessionStatus as Si, Process as Sn, SandboxFleetMachineRecord as Sr, FileWriteResult as St, CodeExecutionResult as T, SnapshotIdempotency as Ti, ProcessLogEntry as Tn, SandboxFleetManifestMachine as Tr, FleetDispatchResultBufferOptions as Tt, DispatchedSession as U, TeePublicKeyResponse as Ui, ReconcileSandboxFleetsOptions as Un, SandboxResourceUsage as Ur, GitStatus as Ut, DirectoryPermission as V, TeeAttestationResponse as Vi, ReapExpiredSandboxFleetsOptions as Vn, SandboxPortBinding as Vr, GitConfig as Vt, DownloadOptions as W, TokenRefreshHandler as Wi, ReconcileSandboxFleetsResult as Wn, SandboxResources as Wr, GpuLease as Wt, DurablePlan as X, UsageInfo as Xi, RolloutOptions as Xn, SandboxTerminalInfo as Xr, GpuLeaseProviderName as Xt, DriverType as Y, UploadProgress as Yi, RolloutChildResult as Yn, SandboxTerminalCreateOptions as Yr, GpuLeaseManager as Yt, DurablePlanDecisionResult as Z, WaitForOptions as Zi, RolloutScorer as Zn, SandboxTerminalManager as Zr, GpuLeaseStatus as Zt, BatchRunOptions as _, SessionInterruptOptions as _i, PermissionLevel as _n, SandboxFleetDriverTimings as _r, FileTreeFile as _t, AgentQuestionRequest as a, BatchEventDataMap as aa, SearchMatch as ai, IntelligenceReportWindow as an, SandboxCreateOutcome as ar, EnsureDevServerOptions as at, BatchTaskResult as b, SessionMessageInputPart as bi, PreviewLinkManager as bn, SandboxFleetMachine as br, FileUsageOptions as bt, AttachGpuLeaseOptions as c, PublicBatchRunRequest as ca, SecretsManager as ci, ListOptions as cn, SandboxDeleteOutcome as cr, ExecOptions as ct, BackendConfig as d, SentSessionMessage as di, MAX_EGRESS_DENIALS_LIMIT as dn, SandboxFleetArtifact as dr, FileReadBatchOptions as dt, WriteFileOptions as ea, SandboxTraceBundle as ei, InstalledTool as en, RolloutTurnPart as er, EffectiveBackendProfile as et, BackendInfo as f, SessionBackendCredentials as fi, McpServerConfig as fn, SandboxFleetArtifactSpec as fr, FileReadBatchResult as ft, BatchResult as g, SessionInfo as gi, NonHostAgentDriverConfig as gn, SandboxFleetDriverCapability as gr, FileSystem as gt, BatchBackend as h, SessionForkOptions as hi, NetworkManager as hn, SandboxFleetDispatchResponse as hr, FileRenameResult as ht, AgentApprovalRequirement as i, BatchEvent as ia, SandboxUser as ii, IntelligenceReportSubjectType as in, SandboxConnection as ir, EgressPolicy as it, CreateIntelligenceReportOptions as j, StartupOperation as ji, PromptOptions as jn, SandboxFleetTraceExport as jr, FleetMachineId as jt, CompletedTurnResult as k, SshKeysManager as ki, ProcessStatus as kn, SandboxFleetTraceBundle as kr, FleetExecDispatchOptions as kt, AttachSandboxFleetMachineOptions as l, BackendType as la, SendSessionMessageOptions as li, ListSandboxFleetOptions as ln, SandboxEnvironment as lr, ExecResult as lt, BackendStatus as m, SessionFailureReason as mi, NetworkConfig as mn, SandboxFleetDispatchFailureClass as mr, FileReadResult as mt, AccessPolicyRule as n, WriteManyOptions as na, SandboxTraceExport as ni, IntelligenceReportBudget as nn, SSHCredentials as nr, EgressDenial as nt, AgentRunStatus as o, BatchSidecarGroup as oa, SearchOptions as oi, JsonValue as on, SandboxCreateReceipt as or, EventStreamOptions as ot, BackendManager as p, SessionEventStreamOptions as pi, MkdirOptions as pn, SandboxFleetCostEstimate as pr, FileReadError as pt, DriverConfig as q, UpdateUserOptions as qi, ResumeOptions as qn, SandboxStatus as qr, GpuLeaseExecOptions as qt, AddUserOptions as r, BatchBackendStats as ra, SandboxTraceOptions as ri, IntelligenceReportCompareTo as rn, SandboxConfig as rr, EgressManager as rt, AgentToolInvocation as s, BatchTaskUsage as sa, SecretInfo as si, ListMessagesOptions as sn, SandboxDeleteAcknowledgement as sr, ExactProcessSpawnOptions as st, AcceleratorKind as t, WriteManyFile as ta, SandboxTraceEvent as ti, IntelligenceReport as tn, SSHCommandDescriptor as tr, EffectiveBackendSource as tt, BackendCapabilities as u, parseBackendType as ua, SendSessionMessageRequest as ui, ListSandboxOptions as un, SandboxEvent as ur, FileInfo as ut, BatchRunRequest as v, SessionListOptions as vi, PermissionsManager as vn, SandboxFleetInfo as vr, FileTreeOptions as vt, CodeExecutionOptions as w, SnapshotDeleteOutcome as wi, ProcessListOptions as wn, SandboxFleetManifest as wr, FleetDispatchResultBuffer as wt, BranchOptions as x, SessionResultOptions as xi, PreviewLinkWaitOptions as xn, SandboxFleetMachineMeteredUsage as xr, FileUsageResult as xt, BatchTask as y, SessionMessage as yi, PreviewLinkInfo as yn, SandboxFleetIntelligenceEnvelope as yr, FileTreeResult as yt, DeleteOptions as z, TeeAttestationOptions as zi, PublishPublicTemplateOptions as zn, SandboxInfo as zr, GitBranch as zt };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/sandbox",
3
- "version": "0.30.1",
3
+ "version": "0.30.2-develop.20260820122029.869ebfa",
4
4
  "description": "Client SDK for the Tangle Sandbox platform - build AI agent applications with dev containers",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -24,6 +24,11 @@
24
24
  "types": "./dist/runtime.d.ts",
25
25
  "default": "./dist/runtime.js"
26
26
  },
27
+ "./interactive-control": {
28
+ "import": "./dist/interactive-control.js",
29
+ "types": "./dist/interactive-control.d.ts",
30
+ "default": "./dist/interactive-control.js"
31
+ },
27
32
  "./tangle": {
28
33
  "import": "./dist/tangle/index.js",
29
34
  "types": "./dist/tangle/index.d.ts",
@@ -91,7 +96,7 @@
91
96
  },
92
97
  "dependencies": {
93
98
  "@tangle-network/agent-core": "0.9.4",
94
- "@tangle-network/agent-interface": "^1.0.0",
99
+ "@tangle-network/agent-interface": "^1.3.0",
95
100
  "zod": "4.4.3"
96
101
  },
97
102
  "peerDependencies": {
@@ -132,8 +137,8 @@
132
137
  "yjs": "13.6.30",
133
138
  "@repo/shared": "0.0.0",
134
139
  "@tangle-network/cli-agent-registry": "0.3.10",
135
- "@tangle-network/sse-core": "0.0.0",
136
- "@tangle-network/runtime-contracts": "0.6.1"
140
+ "@tangle-network/runtime-contracts": "0.6.1",
141
+ "@tangle-network/sse-core": "0.0.0"
137
142
  },
138
143
  "scripts": {
139
144
  "build": "node scripts/build-dist.mjs",