@tangle-network/sandbox 0.60.88 → 0.60.89

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 (50) hide show
  1. package/dist/agent/index.d.ts +4 -4
  2. package/dist/agent/index.js +4 -4
  3. package/dist/agent/preview.d.ts +1 -1
  4. package/dist/agent/preview.js +2 -2
  5. package/dist/{agent-run-outcome-CIlpTZNU.d.ts → agent-run-outcome-KxjDXZW-.d.ts} +1 -1
  6. package/dist/auth/index.d.ts +2 -2
  7. package/dist/auth/index.js +1 -1
  8. package/dist/{browser-interactive-control-controller-Cu6J3TUP.d.ts → browser-interactive-control-controller-B6sySQFu.d.ts} +1 -1
  9. package/dist/{chunked-upload-file-DnsHEjg0.js → chunked-upload-file-RaMaNFN_.js} +1 -1
  10. package/dist/{client-D9OomGmE.js → client-BJ-xYm0s.js} +5 -4
  11. package/dist/{client-CUxfURSp.d.ts → client-BZnfyj0K.d.ts} +5 -5
  12. package/dist/collaboration/index.d.ts +1 -1
  13. package/dist/collaboration/index.js +1 -1
  14. package/dist/core.d.ts +6 -6
  15. package/dist/core.js +3 -3
  16. package/dist/direct-http2-D8mo1ePx.js +97 -0
  17. package/dist/{errors-B7i6lxHc.d.ts → errors-Fv8leP33.d.ts} +3 -3
  18. package/dist/{index-BFW3FzJG.d.ts → index-LO5315tT.d.ts} +2 -2
  19. package/dist/index.d.ts +12 -12
  20. package/dist/index.js +6 -6
  21. package/dist/interactive-control.d.ts +1 -1
  22. package/dist/{interactive-controller-CPtHnjrz.js → interactive-controller-Bize8Sca.js} +1 -1
  23. package/dist/keep-alive-fetch-qPVvvkgJ.js +239 -0
  24. package/dist/{lines-DosoSbnD.d.ts → lines-BgVaTJBw.d.ts} +1 -1
  25. package/dist/lines.d.ts +1 -1
  26. package/dist/{local-cli-auth-CBV7Vjk5.js → local-cli-auth-Do4Kc2jL.js} +1 -1
  27. package/dist/{managed-process-CP-geV3k.d.ts → managed-process-BoQAK9cz.d.ts} +1 -1
  28. package/dist/{mcp-local-DjryqUiY.js → mcp-local-BYHcA72Z.js} +1 -1
  29. package/dist/{preview-B-h5p2LF.d.ts → preview-Zqt4hIgH.d.ts} +3 -3
  30. package/dist/runtime.d.ts +5 -5
  31. package/dist/runtime.js +2 -2
  32. package/dist/{sandbox-Bcs4w1RE.d.ts → sandbox-00TWLhei.d.ts} +8 -7
  33. package/dist/{sandbox-DyoFguBU.js → sandbox-CCVZWs8k.js} +141 -273
  34. package/dist/{secp256k1-Dx2XABHz.js → secp256k1-DoWlH6ff.js} +1 -1
  35. package/dist/tangle/index.d.ts +1 -1
  36. package/dist/tangle/index.js +1 -1
  37. package/dist/{tangle-yvuD9HP_.js → tangle-DugVLl53.js} +3 -3
  38. package/dist/{types-H3SX7E33.d.ts → types-DWG-ZlvL.d.ts} +7 -2
  39. package/package.json +7 -7
  40. /package/dist/{chunked-upload-DtIvkKNo.js → chunked-upload-ClCKGr59.js} +0 -0
  41. /package/dist/{cli-auth-bundle-ODe06Ts7.d.ts → cli-auth-bundle-BKsrsbxy.d.ts} +0 -0
  42. /package/dist/{cli-auth-bundle-cSJjPeFF.js → cli-auth-bundle-CaknD92R.js} +0 -0
  43. /package/dist/{collaboration-YxqL5cZY.js → collaboration-DZCyTGdn.js} +0 -0
  44. /package/dist/{index-7_-RzCh9.d.ts → index-BxyTdtyB.d.ts} +0 -0
  45. /package/dist/{index-Vr-2tNP3.d.ts → index-ONMNeJwr.d.ts} +0 -0
  46. /package/dist/{line-application-Cq6dJLBD.js → line-application-UtPFP0o4.js} +0 -0
  47. /package/dist/{preview-operations-DqSo-IBm.js → preview-operations-Bvo5YcIq.js} +0 -0
  48. /package/dist/{raw-evidence-archive-CZdOSXOC.js → raw-evidence-archive-BjDIFiOM.js} +0 -0
  49. /package/dist/{terminal-stream-BANlVD4Q.d.ts → terminal-stream-DgD7GlFi.d.ts} +0 -0
  50. /package/dist/{utils-B7_9Hl_z.js → utils-B6gap92T.js} +0 -0
@@ -0,0 +1,239 @@
1
+ //#region src/lib/keep-alive-fetch.ts
2
+ /** How long an idle SDK socket stays open. The servers keep theirs open for 35 s and more. */
3
+ const KEEP_ALIVE_TIMEOUT_MS = 6e4;
4
+ const GLOBAL_DISPATCHER = Symbol.for("undici.globalDispatcher.1");
5
+ /** Report a span. A hook that throws must never fail an SDK call. */
6
+ function emitTiming(hook, entry) {
7
+ if (!hook) return;
8
+ try {
9
+ hook(entry);
10
+ } catch {}
11
+ }
12
+ /** Milliseconds, at 0.1 ms: the resolution these spans can honestly claim. */
13
+ function ms(value) {
14
+ return Math.round(value * 10) / 10;
15
+ }
16
+ let cachedHost;
17
+ let cachedAgent = null;
18
+ function readGlobalDispatcher() {
19
+ const read = () => globalThis[GLOBAL_DISPATCHER];
20
+ const host = read();
21
+ if (host) return host;
22
+ globalThis.Headers;
23
+ return read();
24
+ }
25
+ /** The options undici stored on an Agent, if this version keeps them where we look. */
26
+ function agentOptions(agent) {
27
+ for (const symbol of Object.getOwnPropertySymbols(agent)) {
28
+ if (symbol.description !== "options") continue;
29
+ const value = agent[symbol];
30
+ if (value && typeof value === "object") return value;
31
+ }
32
+ }
33
+ function buildKeepAliveAgent(host) {
34
+ const AgentClass = Object.getPrototypeOf(host)?.constructor;
35
+ if (typeof AgentClass !== "function" || AgentClass.name !== "Agent") return null;
36
+ const options = agentOptions(host);
37
+ if (!options || options.keepAliveTimeout !== void 0) return null;
38
+ try {
39
+ return new AgentClass({
40
+ ...options,
41
+ keepAliveTimeout: KEEP_ALIVE_TIMEOUT_MS
42
+ });
43
+ } catch {
44
+ return null;
45
+ }
46
+ }
47
+ /**
48
+ * The dispatcher SDK calls pass to `fetch`, or `undefined` to keep the host's.
49
+ * Rebuilt when the host replaces its global dispatcher, so a test that installs
50
+ * a mock agent, or an app that reconfigures its own, is never bypassed.
51
+ */
52
+ function keepAliveDispatcher() {
53
+ const host = readGlobalDispatcher();
54
+ if (!host) return void 0;
55
+ if (host !== cachedHost) {
56
+ const previous = cachedAgent;
57
+ cachedHost = host;
58
+ cachedAgent = buildKeepAliveAgent(host);
59
+ Promise.resolve(previous?.close?.()).catch(() => void 0);
60
+ }
61
+ return cachedAgent ?? void 0;
62
+ }
63
+ /**
64
+ * In-flight requests by undici request. A response whose body is never read
65
+ * never completes, so the map is bounded rather than trusted to drain.
66
+ */
67
+ const MAX_LIVE_CAPTURES = 256;
68
+ const captures = /* @__PURE__ */ new Map();
69
+ const socketMarks = /* @__PURE__ */ new WeakMap();
70
+ let dispatching;
71
+ let observing;
72
+ function subscribeChannels(channels) {
73
+ const now = () => performance.now();
74
+ channels.subscribe("net.client.socket", (message) => {
75
+ const socket = message.socket;
76
+ if (!socket || captures.size === 0) return;
77
+ const marks = {
78
+ createdAt: now(),
79
+ claimed: false
80
+ };
81
+ socketMarks.set(socket, marks);
82
+ const once = socket.once;
83
+ if (typeof once !== "function") return;
84
+ once.call(socket, "lookup", () => {
85
+ marks.lookupAt = now();
86
+ });
87
+ once.call(socket, "connect", () => {
88
+ marks.connectAt = now();
89
+ });
90
+ once.call(socket, "secureConnect", () => {
91
+ marks.secureAt = now();
92
+ });
93
+ });
94
+ channels.subscribe("undici:request:create", (message) => {
95
+ const request = message.request;
96
+ if (!dispatching || !request) return;
97
+ dispatching.request = request;
98
+ captures.set(request, dispatching);
99
+ if (captures.size > MAX_LIVE_CAPTURES) {
100
+ const oldest = captures.keys().next().value;
101
+ if (oldest !== void 0) captures.delete(oldest);
102
+ }
103
+ });
104
+ channels.subscribe("undici:client:sendHeaders", (message) => {
105
+ const { request, socket } = message;
106
+ const capture = request ? captures.get(request) : void 0;
107
+ if (!capture) return;
108
+ capture.sentAt = now();
109
+ const marks = socket ? socketMarks.get(socket) : void 0;
110
+ if (marks && !marks.claimed) {
111
+ marks.claimed = true;
112
+ capture.marks = marks;
113
+ }
114
+ });
115
+ channels.subscribe("undici:request:headers", (message) => {
116
+ const request = message.request;
117
+ const capture = request ? captures.get(request) : void 0;
118
+ if (capture) capture.headersAt = now();
119
+ });
120
+ channels.subscribe("undici:request:trailers", (message) => {
121
+ const request = message.request;
122
+ const capture = request ? captures.get(request) : void 0;
123
+ if (!capture) return;
124
+ capture.doneAt = now();
125
+ captures.delete(request);
126
+ capture.finish();
127
+ });
128
+ channels.subscribe("undici:request:error", (message) => {
129
+ const request = message.request;
130
+ const capture = request ? captures.get(request) : void 0;
131
+ if (!capture) return;
132
+ capture.failed = true;
133
+ capture.doneAt = now();
134
+ captures.delete(request);
135
+ capture.finish();
136
+ });
137
+ }
138
+ /** Subscribe once. False where the runtime has no Node diagnostics channels. */
139
+ function observeRequests() {
140
+ observing ??= import("node:diagnostics_channel").then((channels) => {
141
+ if (typeof channels.subscribe !== "function") return false;
142
+ subscribeChannels(channels);
143
+ return true;
144
+ }, () => false);
145
+ return observing;
146
+ }
147
+ /** A dispatcher that tells `capture` which undici request its dispatch created. */
148
+ function tagged(base, capture) {
149
+ return new Proxy(base, { get(target, property) {
150
+ if (property === "dispatch") return (options, handler) => {
151
+ dispatching = capture;
152
+ try {
153
+ return target.dispatch(options, handler);
154
+ } finally {
155
+ dispatching = void 0;
156
+ }
157
+ };
158
+ const value = Reflect.get(target, property, target);
159
+ return typeof value === "function" ? value.bind(target) : value;
160
+ } });
161
+ }
162
+ function phasesOf(capture) {
163
+ if (capture.sentAt === void 0 || capture.headersAt === void 0) return;
164
+ const phases = { ttfbMs: ms(capture.headersAt - capture.sentAt) };
165
+ const marks = capture.marks;
166
+ if (marks?.connectAt !== void 0) {
167
+ if (marks.lookupAt !== void 0) phases.dnsMs = ms(marks.lookupAt - marks.createdAt);
168
+ phases.connectMs = ms(marks.connectAt - (marks.lookupAt ?? marks.createdAt));
169
+ if (marks.secureAt !== void 0) phases.tlsMs = ms(marks.secureAt - marks.connectAt);
170
+ }
171
+ if (capture.doneAt !== void 0 && !capture.failed) phases.bodyMs = ms(capture.doneAt - capture.headersAt);
172
+ return phases;
173
+ }
174
+ /**
175
+ * `fetch` for an SDK call: the keep-alive dispatcher on Node, and a timing
176
+ * entry per request when the client has a hook. Calls `globalThis.fetch` at
177
+ * call time, so a caller's fetch override still receives the request.
178
+ */
179
+ async function fetchWithKeepAlive(url, init, options) {
180
+ let dispatcher = keepAliveDispatcher();
181
+ const hook = options.onTiming;
182
+ if (!hook) return dispatcher ? globalThis.fetch(url, {
183
+ ...init,
184
+ dispatcher
185
+ }) : globalThis.fetch(url, init);
186
+ const startedAt = performance.now();
187
+ const method = init.method ?? "GET";
188
+ const observed = await observeRequests();
189
+ const host = dispatcher ?? (observed ? readGlobalDispatcher() : void 0);
190
+ let capture;
191
+ let finished;
192
+ if (observed && host) {
193
+ let finish = () => {};
194
+ finished = new Promise((resolve) => {
195
+ finish = resolve;
196
+ });
197
+ capture = {
198
+ startedAt,
199
+ finish
200
+ };
201
+ dispatcher = tagged(host, capture);
202
+ }
203
+ let response;
204
+ try {
205
+ response = await globalThis.fetch(url, dispatcher ? {
206
+ ...init,
207
+ dispatcher
208
+ } : init);
209
+ } catch (error) {
210
+ if (capture?.request) captures.delete(capture.request);
211
+ emitTiming(hook, {
212
+ name: "sdk.request",
213
+ durMs: ms(performance.now() - startedAt),
214
+ desc: "failed",
215
+ method,
216
+ path: options.path
217
+ });
218
+ throw error;
219
+ }
220
+ const report = () => {
221
+ const phases = capture ? phasesOf(capture) : void 0;
222
+ const socket = phases ? capture?.marks ? "new" : "reused" : void 0;
223
+ emitTiming(hook, {
224
+ name: "sdk.request",
225
+ durMs: ms((capture?.doneAt ?? capture?.headersAt ?? performance.now()) - startedAt),
226
+ desc: socket ? `socket=${socket}` : "",
227
+ method,
228
+ path: options.path,
229
+ status: response.status,
230
+ ...socket ? { socket } : {},
231
+ ...phases ? { phases } : {}
232
+ });
233
+ };
234
+ if (capture?.request && finished) finished.then(report);
235
+ else report();
236
+ return response;
237
+ }
238
+ //#endregion
239
+ export { fetchWithKeepAlive as n, emitTiming as t };
@@ -1,4 +1,4 @@
1
- import { B as CreateSandboxOptions, d as BackendConfig } from "./types-H3SX7E33.js";
1
+ import { B as CreateSandboxOptions, d as BackendConfig } from "./types-DWG-ZlvL.js";
2
2
 
3
3
  //#region src/line-application.d.ts
4
4
  /** Bounded callback request bytes after canonicalization, including JSON framing. */
package/dist/lines.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { A as LineSendReceipt, B as lineInstanceKey, C as LineReplyCode, D as LineRespondView, E as LineRespondAgent, F as LineVoice, I as LineVoiceOptions, L as LinesClient, M as LineSenderVerificationStart, N as LineThread, O as LineRole, P as LineTransport, R as LinesHttpClient, S as LineReminderPreferences, T as LineReplyGate, V as profileChannelReference, _ as LineMemberPatch, a as LineApplicationAttachOptions, b as LineNumberInventory, c as LineAttachmentReauthorization, d as LineImage, f as LineInstanceAttachOptions, g as LineMemberInstance, h as LineMember, i as LineAllowanceSubject, j as LineSenderVerification, k as LineSendInput, l as LineExecutionKey, m as LineLimits, n as LineAgentRolePolicy, o as LineAttachOptions, p as LineInstanceCreate, r as LineAllowance, s as LineAttachment, t as Line, u as LineFromConnectionInput, v as LineMemberSpec, w as LineReplyCodeInput, x as LineProvider, y as LineMessage, z as SandboxLines } from "./lines-DosoSbnD.js";
1
+ import { A as LineSendReceipt, B as lineInstanceKey, C as LineReplyCode, D as LineRespondView, E as LineRespondAgent, F as LineVoice, I as LineVoiceOptions, L as LinesClient, M as LineSenderVerificationStart, N as LineThread, O as LineRole, P as LineTransport, R as LinesHttpClient, S as LineReminderPreferences, T as LineReplyGate, V as profileChannelReference, _ as LineMemberPatch, a as LineApplicationAttachOptions, b as LineNumberInventory, c as LineAttachmentReauthorization, d as LineImage, f as LineInstanceAttachOptions, g as LineMemberInstance, h as LineMember, i as LineAllowanceSubject, j as LineSenderVerification, k as LineSendInput, l as LineExecutionKey, m as LineLimits, n as LineAgentRolePolicy, o as LineAttachOptions, p as LineInstanceCreate, r as LineAllowance, s as LineAttachment, t as Line, u as LineFromConnectionInput, v as LineMemberSpec, w as LineReplyCodeInput, x as LineProvider, y as LineMessage, z as SandboxLines } from "./lines-BgVaTJBw.js";
2
2
  export { Line, LineAgentRolePolicy, LineAllowance, LineAllowanceSubject, LineApplicationAttachOptions, LineAttachOptions, LineAttachment, LineAttachmentReauthorization, LineExecutionKey, LineFromConnectionInput, LineImage, LineInstanceAttachOptions, LineInstanceCreate, LineLimits, LineMember, LineMemberInstance, LineMemberPatch, LineMemberSpec, LineMessage, LineNumberInventory, LineProvider, LineReminderPreferences, LineReplyCode, LineReplyCodeInput, LineReplyGate, LineRespondAgent, LineRespondView, LineRole, LineSendInput, LineSendReceipt, LineSenderVerification, LineSenderVerificationStart, LineThread, LineTransport, LineVoice, LineVoiceOptions, LinesClient, LinesHttpClient, SandboxLines, lineInstanceKey, profileChannelReference };
@@ -1,4 +1,4 @@
1
- import { t as AUTH_BUNDLE_PATHS } from "./cli-auth-bundle-cSJjPeFF.js";
1
+ import { t as AUTH_BUNDLE_PATHS } from "./cli-auth-bundle-CaknD92R.js";
2
2
  import { existsSync, readFileSync } from "node:fs";
3
3
  import { join } from "node:path";
4
4
  import { homedir } from "node:os";
@@ -1,4 +1,4 @@
1
- import { Fn as ManagedProcessJobs, In as ManagedProcessOptions, Ln as ManagedProcessRecord, Rn as ManagedProcessResumeOptions, zn as ManagedProcessSpec } from "./types-H3SX7E33.js";
1
+ import { Fn as ManagedProcessJobs, In as ManagedProcessOptions, Ln as ManagedProcessRecord, Rn as ManagedProcessResumeOptions, zn as ManagedProcessSpec } from "./types-DWG-ZlvL.js";
2
2
 
3
3
  //#region src/managed-process.d.ts
4
4
  declare class ManagedProcessClient implements ManagedProcessJobs {
@@ -1,4 +1,4 @@
1
- import { a as listAgentPreviews, i as getAgentPreview, o as publishAgentPreview, r as ensureAgentPreview, s as removeAgentPreview, t as AgentPreviewError } from "./preview-operations-DqSo-IBm.js";
1
+ import { a as listAgentPreviews, i as getAgentPreview, o as publishAgentPreview, r as ensureAgentPreview, s as removeAgentPreview, t as AgentPreviewError } from "./preview-operations-Bvo5YcIq.js";
2
2
  import { createRequire } from "node:module";
3
3
  //#region \0rolldown/runtime.js
4
4
  var __defProp = Object.defineProperty;
@@ -1,6 +1,6 @@
1
- import { n as SandboxInstance } from "./sandbox-Bcs4w1RE.js";
2
- import { Jn as PreviewLinkInfo, _t as EnsureDevServerOptions } from "./types-H3SX7E33.js";
3
- import { i as Sandbox } from "./client-CUxfURSp.js";
1
+ import { n as SandboxInstance } from "./sandbox-00TWLhei.js";
2
+ import { Jn as PreviewLinkInfo, _t as EnsureDevServerOptions } from "./types-DWG-ZlvL.js";
3
+ import { i as Sandbox } from "./client-BZnfyj0K.js";
4
4
 
5
5
  //#region src/agent/preview-operations.d.ts
6
6
  type AgentPreviewOptions = Pick<EnsureDevServerOptions, "sessionId" | "cwd"> & {
package/dist/runtime.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { A as CommitTaskSessionOptions, An as ListMessagesOptions, At as FileTreeOptions, Bi as SandboxTerminalCreateOptions, Ct as FileReadBatchOptions, Di as SandboxPortBinding, Dt as FileRenameResult, H as CreateTaskSessionOptions, Hi as SandboxTerminalManager, Ma as TaskSessionCommitResult, Mt as FileUsageOptions, Nt as FileUsageResult, Pa as TaskSessionInfo, Pi as SandboxRuntimeHealth, Pt as FileWriteResult, Qa as WriteFileOptions, T as ChunkedUploadResult, Ui as SandboxTerminalRequestOptions, V as CreateSessionOptions, Vi as SandboxTerminalInfo, Vr as SandboxEvent, aa as SessionExecutionInfo, ea as SendSessionMessageOptions, fa as SessionMessage, ia as SessionEventStreamOptions, ja as TaskSessionChanges, jt as FileTreeResult, la as SessionInfo, na as SentSessionMessage, oa as SessionExecutionStatus, pa as SessionMessageAdmission, qa as UploadProgress, ta as SendSessionMessageRequest, w as ChunkedUploadOptions, wt as FileReadBatchResult, xr as RenameOptions } from "./types-H3SX7E33.js";
2
- import { n as TerminalStream, p as ScopedToken } from "./terminal-stream-BANlVD4Q.js";
3
- import { c as InteractiveSessionIdentity, l as InteractiveSessionNotRunningError, r as browserInteractiveControlHolderId } from "./browser-interactive-control-controller-Cu6J3TUP.js";
4
- import { C as ValidationError, S as TimeoutError, _ as SandboxFailureDetail, d as NotFoundError, f as PartialFailureError, g as SandboxErrorJson, h as SandboxError, o as FileWriteConflictError, p as QuotaError, r as CapabilityError, t as AuthError, u as NetworkError, v as ServerError, w as BrowserInteractiveSessionController, y as StateError } from "./errors-B7i6lxHc.js";
5
- import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, o as projectAgentTerminalRecord, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-CIlpTZNU.js";
1
+ import { A as CommitTaskSessionOptions, An as ListMessagesOptions, At as FileTreeOptions, Bi as SandboxTerminalCreateOptions, Ct as FileReadBatchOptions, Di as SandboxPortBinding, Dt as FileRenameResult, H as CreateTaskSessionOptions, Hi as SandboxTerminalManager, Ma as TaskSessionCommitResult, Mt as FileUsageOptions, Nt as FileUsageResult, Pa as TaskSessionInfo, Pi as SandboxRuntimeHealth, Pt as FileWriteResult, Qa as WriteFileOptions, T as ChunkedUploadResult, Ui as SandboxTerminalRequestOptions, V as CreateSessionOptions, Vi as SandboxTerminalInfo, Vr as SandboxEvent, aa as SessionExecutionInfo, ea as SendSessionMessageOptions, fa as SessionMessage, ia as SessionEventStreamOptions, ja as TaskSessionChanges, jt as FileTreeResult, la as SessionInfo, na as SentSessionMessage, oa as SessionExecutionStatus, pa as SessionMessageAdmission, qa as UploadProgress, ta as SendSessionMessageRequest, w as ChunkedUploadOptions, wt as FileReadBatchResult, xr as RenameOptions } from "./types-DWG-ZlvL.js";
2
+ import { n as TerminalStream, p as ScopedToken } from "./terminal-stream-DgD7GlFi.js";
3
+ import { c as InteractiveSessionIdentity, l as InteractiveSessionNotRunningError, r as browserInteractiveControlHolderId } from "./browser-interactive-control-controller-B6sySQFu.js";
4
+ import { C as ValidationError, S as TimeoutError, _ as SandboxFailureDetail, d as NotFoundError, f as PartialFailureError, g as SandboxErrorJson, h as SandboxError, o as FileWriteConflictError, p as QuotaError, r as CapabilityError, t as AuthError, u as NetworkError, v as ServerError, w as BrowserInteractiveSessionController, y as StateError } from "./errors-Fv8leP33.js";
5
+ import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, o as projectAgentTerminalRecord, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-KxjDXZW-.js";
6
6
 
7
7
  //#region src/lib/chunked-upload.d.ts
8
8
  /** The transport a caller wires this module to — {@link SandboxInstance.runtimeFetch}
package/dist/runtime.js CHANGED
@@ -1,7 +1,7 @@
1
- import { I as createAgentRunOutcomeTracker, L as deriveAgentResultOutcome, R as deriveAgentRunOutcome, t as BrowserInteractiveSessionController, u as SandboxRuntimeApi, z as projectAgentTerminalRecord } from "./interactive-controller-CPtHnjrz.js";
1
+ import { I as createAgentRunOutcomeTracker, L as deriveAgentResultOutcome, R as deriveAgentRunOutcome, t as BrowserInteractiveSessionController, u as SandboxRuntimeApi, z as projectAgentTerminalRecord } from "./interactive-controller-Bize8Sca.js";
2
2
  import { _ as StateError, b as ValidationError, d as NotFoundError, f as PartialFailureError, g as ServerError, h as SandboxError, o as FileWriteConflictError, p as QuotaError, r as CapabilityError, t as AuthError, u as NetworkError, y as TimeoutError } from "./errors-DSJBKmGZ.js";
3
3
  import { f as combineAbortSignals, n as browserInteractiveControlHolderId, s as InteractiveSessionNotRunningError } from "./browser-interactive-control-controller-BJf0P_J4.js";
4
- import { s as uploadChunked } from "./chunked-upload-DtIvkKNo.js";
4
+ import { s as uploadChunked } from "./chunked-upload-ClCKGr59.js";
5
5
  //#region src/runtime-client.ts
6
6
  const DEFAULT_RUNTIME_TIMEOUT_MS = 3e4;
7
7
  function requireToken(token) {
@@ -1,9 +1,9 @@
1
- import { t as CliAuthReference } from "./cli-auth-bundle-ODe06Ts7.js";
2
- import { $a as WriteManyFile, $t as ForkIdempotency, A as CommitTaskSessionOptions, Ai as SandboxResourceUsage, An as ListMessagesOptions, Ba as TeePublicKeyResponse, C as BranchOptions, Cn as InstalledTool, Cr as ResumeOptions, D as CodeExecutionResult, Di as SandboxPortBinding, E as CodeExecutionOptions, Ea as StartupDiagnostics, Ei as SandboxOperationState, En as IntelligenceReportCompareTo, Er as RolloutOptions, Fi as SandboxShape, Fr as SandboxConnection, Gi as SandboxTraceBundle, H as CreateTaskSessionOptions, Ia as TeeAttestationOptions, Ir as SandboxDeleteAcknowledgement, Ji as SandboxTraceOptions, Lr as SandboxDeleteOptions, M as ConversationTurnOptions, Ma as TaskSessionCommitResult, Mr as SSHCommandDescriptor, N as ConversationTurnResult, Ni as SandboxRuntimeCapabilities, Nr as SSHCredentials, O as CodeLanguage, Oa as StopOptions, On as IntelligenceReportWindow, Or as RolloutStartResult, Ot as FileSystem, Pa as TaskSessionInfo, Pi as SandboxRuntimeHealth, Pt as FileWriteResult, Q as DispatchedSession, Qa as WriteFileOptions, Qt as ForkCounts, Ra as TeeAttestationResponse, Ri as SandboxStatus, Sa as SnapshotProvenance, Si as SandboxInfo, Sn as HttpClient, Sr as RestoreSnapshotOptions, Ti as SandboxOperationKind, Tn as IntelligenceReportBudget, Ua as TurnBackendConfig, V as CreateSessionOptions, Vr as SandboxEvent, Wa as TurnDriveResult, Wi as SandboxTerminals, Wn as NetworkManager, Xa as WaitForRolloutOptions, Xi as SearchMatch, Ya as WaitForOptions, Yn as PreviewLinkManager, Z as DispatchPromptOptions, Za as WorkspaceOperationLookup, Zi as SearchOptions, _a as SnapshotDeleteAcknowledgement, aa as SessionExecutionInfo, ao as SandboxEnvRecoveryView, ar as PromptInputPart, ba as SnapshotInfo, bt as ExecOptions, ca as SessionForkOptions, cn as GpuLease, co as RawEvidenceDirectoryExport, cr as ProvisionEvent, ct as DurablePlanDecisionResult, d as BackendConfig, da as SessionListOptions, ea as SendSessionMessageOptions, en as ForkLookupOptions, eo as WriteManyOptions, fa as SessionMessage, fi as SandboxFleetTraceBundle, fr as PublicProfileConflict, ha as SessionResultOptions, ht as EgressManager, ia as SessionEventStreamOptions, in as GitCommit, io as SandboxEnvRecovery, it as DriverInfo, j as CompletedTurnResult, ja as TaskSessionChanges, kn as JsonValue, la as SessionInfo, lo as RawEvidenceExportOptions, lr as ProvisionResult, mo as InteractionResolutionAcknowledgement, na as SentSessionMessage, nt as DriveTurnOptions, on as GitDiff, or as PromptOptions, ot as DurablePlan, p as BackendManager, pa as SessionMessageAdmission, pn as GpuLeaseManager, po as WorkspaceImagePublishResult$1, qn as PermissionsManager, rn as GitBranch, ro as SandboxCreateReceipt, sn as GitStatus, sr as PromptResult, st as DurablePlanDecisionOptions, ta as SendSessionMessageRequest, tr as ProcessManager, ua as SessionInterruptOptions, vt as EventStreamOptions, wa as SnapshotResult, wi as SandboxOperationInfo, wn as IntelligenceReport, wr as Rollout, xa as SnapshotOptions, xt as ExecResult, zi as SandboxTerminalAttachOptions } from "./types-H3SX7E33.js";
3
- import { c as TerminalStreamReconnectAuthority, f as MintScopedTokenOptions, n as TerminalStream, o as TerminalStreamHandlers, p as ScopedToken, y as TerminalReadyInfo } from "./terminal-stream-BANlVD4Q.js";
4
- import { f as InteractiveAttachOptions, g as InteractiveSessionStatus, h as InteractiveRequestOptions, m as InteractiveControlClaimOptions, p as InteractiveControlClaimAcknowledgement } from "./browser-interactive-control-controller-Cu6J3TUP.js";
5
- import { E as InteractiveAttachRequest, h as SandboxError } from "./errors-B7i6lxHc.js";
6
- import { z as SandboxLines } from "./lines-DosoSbnD.js";
1
+ import { t as CliAuthReference } from "./cli-auth-bundle-BKsrsbxy.js";
2
+ import { $a as WriteManyFile, $t as ForkIdempotency, A as CommitTaskSessionOptions, Ai as SandboxResourceUsage, An as ListMessagesOptions, Ba as TeePublicKeyResponse, C as BranchOptions, Cn as InstalledTool, Cr as ResumeOptions, D as CodeExecutionResult, Di as SandboxPortBinding, E as CodeExecutionOptions, Ea as StartupDiagnostics, Ei as SandboxOperationState, En as IntelligenceReportCompareTo, Er as RolloutOptions, Fi as SandboxShape, Fr as SandboxConnection, Gi as SandboxTraceBundle, H as CreateTaskSessionOptions, Ia as TeeAttestationOptions, Ir as SandboxDeleteAcknowledgement, Ji as SandboxTraceOptions, Lr as SandboxDeleteOptions, M as ConversationTurnOptions, Ma as TaskSessionCommitResult, Mr as SSHCommandDescriptor, N as ConversationTurnResult, Ni as SandboxRuntimeCapabilities, Nr as SSHCredentials, O as CodeLanguage, Oa as StopOptions, On as IntelligenceReportWindow, Or as RolloutStartResult, Ot as FileSystem, Pa as TaskSessionInfo, Pi as SandboxRuntimeHealth, Pt as FileWriteResult, Q as DispatchedSession, Qa as WriteFileOptions, Qt as ForkCounts, Ra as TeeAttestationResponse, Ri as SandboxStatus, Sa as SnapshotProvenance, Si as SandboxInfo, Sn as HttpClient, Sr as RestoreSnapshotOptions, Ti as SandboxOperationKind, Tn as IntelligenceReportBudget, Ua as TurnBackendConfig, V as CreateSessionOptions, Vr as SandboxEvent, Wa as TurnDriveResult, Wi as SandboxTerminals, Wn as NetworkManager, Xa as WaitForRolloutOptions, Xi as SearchMatch, Ya as WaitForOptions, Yn as PreviewLinkManager, Z as DispatchPromptOptions, Za as WorkspaceOperationLookup, Zi as SearchOptions, _a as SnapshotDeleteAcknowledgement, aa as SessionExecutionInfo, ao as SandboxEnvRecoveryView, ar as PromptInputPart, ba as SnapshotInfo, bt as ExecOptions, ca as SessionForkOptions, cn as GpuLease, co as RawEvidenceDirectoryExport, cr as ProvisionEvent, ct as DurablePlanDecisionResult, d as BackendConfig, da as SessionListOptions, ea as SendSessionMessageOptions, en as ForkLookupOptions, eo as WriteManyOptions, fa as SessionMessage, fi as SandboxFleetTraceBundle, fr as PublicProfileConflict, ha as SessionResultOptions, ht as EgressManager, ia as SessionEventStreamOptions, in as GitCommit, io as SandboxEnvRecovery, it as DriverInfo, j as CompletedTurnResult, ja as TaskSessionChanges, kn as JsonValue, la as SessionInfo, lo as RawEvidenceExportOptions, lr as ProvisionResult, mo as InteractionResolutionAcknowledgement, na as SentSessionMessage, nt as DriveTurnOptions, on as GitDiff, or as PromptOptions, ot as DurablePlan, p as BackendManager, pa as SessionMessageAdmission, pn as GpuLeaseManager, po as WorkspaceImagePublishResult$1, qn as PermissionsManager, rn as GitBranch, ro as SandboxCreateReceipt, sn as GitStatus, sr as PromptResult, st as DurablePlanDecisionOptions, ta as SendSessionMessageRequest, tr as ProcessManager, ua as SessionInterruptOptions, vt as EventStreamOptions, wa as SnapshotResult, wi as SandboxOperationInfo, wn as IntelligenceReport, wr as Rollout, xa as SnapshotOptions, xt as ExecResult, zi as SandboxTerminalAttachOptions } from "./types-DWG-ZlvL.js";
3
+ import { c as TerminalStreamReconnectAuthority, f as MintScopedTokenOptions, n as TerminalStream, o as TerminalStreamHandlers, p as ScopedToken, y as TerminalReadyInfo } from "./terminal-stream-DgD7GlFi.js";
4
+ import { f as InteractiveAttachOptions, g as InteractiveSessionStatus, h as InteractiveRequestOptions, m as InteractiveControlClaimOptions, p as InteractiveControlClaimAcknowledgement } from "./browser-interactive-control-controller-B6sySQFu.js";
5
+ import { E as InteractiveAttachRequest, h as SandboxError } from "./errors-Fv8leP33.js";
6
+ import { z as SandboxLines } from "./lines-BgVaTJBw.js";
7
7
  import { z } from "zod";
8
8
  import { AgentInteractiveSessionAttach, AgentInteractiveSessionControlClaim, AgentInteractiveSessionControlClaimAcknowledgement, AgentInteractiveSessionControlClaimRequest, AgentInteractiveSessionPromptAcknowledgement, AgentInteractiveSessionPromptCommand, AgentInteractiveSessionRef, AgentInteractiveSessionStart, AgentInteractiveSessionStopAcknowledgement, AgentInteractiveSessionStopCommand, AgentInteractiveTerminalSession, AgentInteractiveTerminalSession as AgentInteractiveTerminalSession$1, AgentProfile, AgentProfileFileMount, AgentRunCancellationAcknowledgement, AgentRunCancellationRequest, InteractionAcknowledgement, InteractionData, InteractionRequest, InteractionResponseCommand, TerminalOutputEvent, TerminalReplayWindow, agentInteractiveSessionPromptRequestDigest } from "@tangle-network/agent-interface";
9
9
 
@@ -1004,7 +1004,8 @@ declare class SandboxInstance {
1004
1004
  * Create an advanced direct-runtime view of this sandbox.
1005
1005
  *
1006
1006
  * Runtime methods on the returned instance talk to the sandbox runtime
1007
- * directly using `connection.runtimeUrl` and `connection.authToken`.
1007
+ * directly using `connection.execHost` when supplied, otherwise
1008
+ * `connection.runtimeUrl`, and the scoped `connection.authToken`.
1008
1009
  * Lifecycle methods still go through the parent SDK client.
1009
1010
  */
1010
1011
  direct(): SandboxInstance;