@tangle-network/sandbox 0.34.4 → 0.36.1
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/dist/agent/index.d.ts +3 -3
- package/dist/agent/index.js +3 -3
- package/dist/{agent-run-outcome-CW49Y_lY.d.ts → agent-run-outcome-C0T6t4zn.d.ts} +1 -1
- package/dist/{client-BO4rdVfR.d.ts → client-BUy5hS2I.d.ts} +2 -2
- package/dist/{client-CPsnVEj0.js → client-CX3LB-64.js} +40 -3
- package/dist/core.d.ts +3 -3
- package/dist/core.js +2 -2
- package/dist/{index-DMAaPk_u.d.ts → index-CtmbhfdA.d.ts} +2 -2
- package/dist/index.d.ts +197 -186
- package/dist/index.js +5 -4
- package/dist/{runtime-api-paApH4-W.js → runtime-api-ClXF8k_q.js} +78 -2
- package/dist/runtime.d.ts +10 -3
- package/dist/runtime.js +1 -1
- package/dist/{sandbox-B70BzvzR.js → sandbox-CzKxUiYj.js} +26 -36
- package/dist/{sandbox-yn4s4Q2t.d.ts → sandbox-DWTay6Ou.d.ts} +13 -8
- package/dist/tangle/index.d.ts +1 -1
- package/dist/tangle/index.js +1 -1
- package/dist/{tangle-Cj1fDoJ7.js → tangle-BhLq6l2G.js} +1 -1
- package/dist/{types-CsDzg6PB.d.ts → types-B00bLoQR.d.ts} +47 -14
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { _ as backendTypeSchema, g as deriveAgentRunOutcome, h as deriveAgentResultOutcome, m as createAgentRunOutcomeTracker, p as normalizeRuntimeBackendConfig, u as parseSSEStream, v as parseBackendType } from "./runtime-api-
|
|
1
|
+
import { _ as backendTypeSchema, g as deriveAgentRunOutcome, h as deriveAgentResultOutcome, m as createAgentRunOutcomeTracker, p as normalizeRuntimeBackendConfig, u as parseSSEStream, v as parseBackendType } from "./runtime-api-ClXF8k_q.js";
|
|
2
2
|
import { a as NetworkError, c as QuotaError, d as StateError, f as TimeoutError, i as FileWriteConflictError, l as SandboxError, n as CapabilityError, o as NotFoundError, p as ValidationError, r as EgressProxyRecoveryError, s as PartialFailureError, t as AuthError, u as ServerError } from "./errors-C6kn-3zt.js";
|
|
3
|
-
import { _ as
|
|
3
|
+
import { _ as parseBackendRegistryResponse, a as splitInlineProfileSkills, c as SandboxFleetClient, d as validateBatchRunRequest, f as backendRegistryCapabilitiesSchema, g as isBackendRegistryInteractionKind, h as backendRegistryResponseSchema, i as splitInlineProfileFileMounts, l as runtimeWorkspaceCwdSchema, m as backendRegistryInteractionKindSchema, n as Sandbox, o as validateDeferredProfileFileMounts, p as backendRegistryEntrySchema, r as materializeProfileFileMounts, s as SandboxFleet, t as IntelligenceClient, u as createBatchResultAccumulator, v as parseBackendRegistryResponseBody } from "./client-CX3LB-64.js";
|
|
4
4
|
import { a as INTERACTIVE_CONTROL_CLEANUP_TIMEOUT_MS, c as createInteractiveControlHolderId, l as interactiveSessionIdentityDigest, n as browserInteractiveControlHolderId, o as InteractiveSessionControlController, t as BrowserInteractiveSessionControlController } from "./browser-interactive-control-controller-Dv0gbFMu.js";
|
|
5
|
-
import { A as toOtelJson, C as collectAgentResponseText, D as buildTraceExportPayload, O as exportTraceBundle, S as collectAgentFinalMessageText, T as isToolBearingEvent, _ as TerminalStream, a as WorkspaceImages, c as SandboxTaskSession, d as agentInteractiveSessionPromptRequestDigest, f as InteractiveTerminalFrameLog, g as InteractiveSessionController, h as BrowserInteractiveSessionController, k as otelTraceIdForTangleTrace, l as SandboxSession, m as createInteractiveTerminalSession, o as GPU_LEASE_PROVIDER_NAMES, p as createInteractiveTerminalCapture, s as MAX_EGRESS_DENIALS_LIMIT, t as SandboxInstance, u as InteractiveSessionHandle, v as TerminalStreamError, w as getSandboxEventText, x as applySandboxEventText, y as TERMINAL_WS_ECHO_SUBPROTOCOL } from "./sandbox-
|
|
5
|
+
import { A as toOtelJson, C as collectAgentResponseText, D as buildTraceExportPayload, O as exportTraceBundle, S as collectAgentFinalMessageText, T as isToolBearingEvent, _ as TerminalStream, a as WorkspaceImages, c as SandboxTaskSession, d as agentInteractiveSessionPromptRequestDigest, f as InteractiveTerminalFrameLog, g as InteractiveSessionController, h as BrowserInteractiveSessionController, k as otelTraceIdForTangleTrace, l as SandboxSession, m as createInteractiveTerminalSession, o as GPU_LEASE_PROVIDER_NAMES, p as createInteractiveTerminalCapture, s as MAX_EGRESS_DENIALS_LIMIT, t as SandboxInstance, u as InteractiveSessionHandle, v as TerminalStreamError, w as getSandboxEventText, x as applySandboxEventText, y as TERMINAL_WS_ECHO_SUBPROTOCOL } from "./sandbox-CzKxUiYj.js";
|
|
6
6
|
import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-DQD9kCdN.js";
|
|
7
|
-
import { t as TangleSandboxClient } from "./tangle-
|
|
7
|
+
import { t as TangleSandboxClient } from "./tangle-BhLq6l2G.js";
|
|
8
8
|
import { SANDBOX_SIZE_PRESET_NAMES, agentProfileConfidentialSchema, agentProfileSchema } from "@tangle-network/agent-interface";
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
//#region src/confidential.ts
|
|
@@ -681,6 +681,7 @@ const createFragmentSchema = z.strictObject({
|
|
|
681
681
|
depth: z.number().int().positive().optional(),
|
|
682
682
|
sparse: z.array(nonEmptyStringSchema).optional()
|
|
683
683
|
}).optional(),
|
|
684
|
+
cwd: runtimeWorkspaceCwdSchema.optional(),
|
|
684
685
|
resources: resourcesSchema.optional(),
|
|
685
686
|
env: envSchema.optional(),
|
|
686
687
|
maxLifetimeSeconds: z.number().int().positive().optional(),
|
|
@@ -1022,6 +1022,29 @@ function appendSessionIdQuery(params, sessionId) {
|
|
|
1022
1022
|
}
|
|
1023
1023
|
//#endregion
|
|
1024
1024
|
//#region src/runtime-api.ts
|
|
1025
|
+
function isModelCredentialSuperseded(error) {
|
|
1026
|
+
return error instanceof SandboxError && error.status === 503 && error.code === "MODEL_CREDENTIAL_SUPERSEDED";
|
|
1027
|
+
}
|
|
1028
|
+
function waitForRetryAfter(delayMs, signal) {
|
|
1029
|
+
if (delayMs <= 0) return Promise.resolve();
|
|
1030
|
+
return new Promise((resolve, reject) => {
|
|
1031
|
+
let timer;
|
|
1032
|
+
const onAbort = () => {
|
|
1033
|
+
if (timer) clearTimeout(timer);
|
|
1034
|
+
signal?.removeEventListener("abort", onAbort);
|
|
1035
|
+
reject(signal?.reason ?? new DOMException("The operation was aborted", "AbortError"));
|
|
1036
|
+
};
|
|
1037
|
+
if (signal?.aborted) {
|
|
1038
|
+
onAbort();
|
|
1039
|
+
return;
|
|
1040
|
+
}
|
|
1041
|
+
timer = setTimeout(() => {
|
|
1042
|
+
signal?.removeEventListener("abort", onAbort);
|
|
1043
|
+
resolve();
|
|
1044
|
+
}, delayMs);
|
|
1045
|
+
signal?.addEventListener("abort", onAbort, { once: true });
|
|
1046
|
+
});
|
|
1047
|
+
}
|
|
1025
1048
|
/** Internal typed client for routes served by a sandbox runtime. */
|
|
1026
1049
|
var SandboxRuntimeApi = class {
|
|
1027
1050
|
terminals;
|
|
@@ -1087,6 +1110,27 @@ var SandboxRuntimeApi = class {
|
|
|
1087
1110
|
}
|
|
1088
1111
|
if (options.executionId !== void 0 && !sawTerminal) throw new NetworkError("event stream ended before a terminal event — the connection dropped mid-turn");
|
|
1089
1112
|
}
|
|
1113
|
+
/**
|
|
1114
|
+
* List the durable execution records for one session.
|
|
1115
|
+
*
|
|
1116
|
+
* The sidecar owns this ledger and returns records newest first. Validate
|
|
1117
|
+
* the response here so malformed payloads cannot become false run evidence.
|
|
1118
|
+
*/
|
|
1119
|
+
async runs(sessionId) {
|
|
1120
|
+
await this.transport.ensureRunning();
|
|
1121
|
+
const endpoint = `/agents/sessions/${encodeURIComponent(sessionId)}/runs`;
|
|
1122
|
+
const payload = await this.json(endpoint, { method: "GET" });
|
|
1123
|
+
if (payload.success !== true || !Array.isArray(payload.executions)) throw new ServerError("Session runs response has an invalid shape", 502, {
|
|
1124
|
+
origin: "runtime",
|
|
1125
|
+
endpoint
|
|
1126
|
+
});
|
|
1127
|
+
const executions = payload.executions.map((value) => normalizeSessionExecutionInfo(value, sessionId));
|
|
1128
|
+
if (executions.some((execution) => execution === null)) throw new ServerError("Session runs response has an invalid execution", 502, {
|
|
1129
|
+
origin: "runtime",
|
|
1130
|
+
endpoint
|
|
1131
|
+
});
|
|
1132
|
+
return executions.filter((execution) => execution !== null);
|
|
1133
|
+
}
|
|
1090
1134
|
async readFiles(paths, options = {}) {
|
|
1091
1135
|
const params = new URLSearchParams();
|
|
1092
1136
|
appendSessionIdQuery(params, options.sessionId);
|
|
@@ -1278,7 +1322,8 @@ var SandboxRuntimeApi = class {
|
|
|
1278
1322
|
if (options.credentials?.baseUrl) headers.set("X-Backend-Base-Url", options.credentials.baseUrl);
|
|
1279
1323
|
const timeoutSignal = options.timeoutMs !== void 0 ? AbortSignal.timeout(options.timeoutMs) : void 0;
|
|
1280
1324
|
const signal = options.signal && timeoutSignal ? combineAbortSignals([options.signal, timeoutSignal]) : options.signal ?? timeoutSignal;
|
|
1281
|
-
|
|
1325
|
+
const path = `/agents/sessions/${encodeURIComponent(id)}/messages`;
|
|
1326
|
+
const init = {
|
|
1282
1327
|
method: "POST",
|
|
1283
1328
|
headers,
|
|
1284
1329
|
signal,
|
|
@@ -1298,7 +1343,14 @@ var SandboxRuntimeApi = class {
|
|
|
1298
1343
|
...request.turnId !== void 0 ? { turnId: request.turnId } : {},
|
|
1299
1344
|
...request.interactions !== void 0 ? { interactions: request.interactions } : {}
|
|
1300
1345
|
})
|
|
1301
|
-
}
|
|
1346
|
+
};
|
|
1347
|
+
try {
|
|
1348
|
+
return await this.json(path, init);
|
|
1349
|
+
} catch (error) {
|
|
1350
|
+
if (!isModelCredentialSuperseded(error)) throw error;
|
|
1351
|
+
await waitForRetryAfter(error.retryAfterMs ?? 1e3, signal);
|
|
1352
|
+
return this.json(path, init);
|
|
1353
|
+
}
|
|
1302
1354
|
}
|
|
1303
1355
|
async deleteSession(id) {
|
|
1304
1356
|
await this.transport.ensureRunning();
|
|
@@ -1410,6 +1462,30 @@ function normalizeSessionFailureReason(value) {
|
|
|
1410
1462
|
...executionId ? { executionId } : {}
|
|
1411
1463
|
};
|
|
1412
1464
|
}
|
|
1465
|
+
function normalizeSessionExecutionInfo(value, expectedSessionId) {
|
|
1466
|
+
if (!value || typeof value !== "object") return null;
|
|
1467
|
+
const raw = value;
|
|
1468
|
+
const executionId = raw.executionId;
|
|
1469
|
+
const sessionId = raw.sessionId;
|
|
1470
|
+
const status = raw.status;
|
|
1471
|
+
const startedAt = raw.startedAt;
|
|
1472
|
+
const completedAt = raw.completedAt;
|
|
1473
|
+
const eventCount = raw.eventCount;
|
|
1474
|
+
const lastEventId = raw.lastEventId;
|
|
1475
|
+
const normalizedStartedAt = typeof startedAt === "number" && Number.isFinite(startedAt) ? startedAt : void 0;
|
|
1476
|
+
const normalizedCompletedAt = typeof completedAt === "number" && Number.isFinite(completedAt) ? completedAt : void 0;
|
|
1477
|
+
const validCompletion = status === "active" ? completedAt === void 0 : normalizedCompletedAt !== void 0 && normalizedStartedAt !== void 0 && normalizedCompletedAt >= normalizedStartedAt;
|
|
1478
|
+
if (typeof executionId !== "string" || executionId.length === 0 || typeof sessionId !== "string" || sessionId.length === 0 || sessionId !== expectedSessionId || status !== "active" && status !== "completed" && status !== "failed" && status !== "cancelled" || normalizedStartedAt === void 0 || !validCompletion || typeof eventCount !== "number" || !Number.isInteger(eventCount) || eventCount < 0 || typeof lastEventId !== "string" || lastEventId.length === 0) return null;
|
|
1479
|
+
return {
|
|
1480
|
+
executionId,
|
|
1481
|
+
sessionId,
|
|
1482
|
+
status,
|
|
1483
|
+
startedAt: normalizedStartedAt,
|
|
1484
|
+
...normalizedCompletedAt !== void 0 ? { completedAt: normalizedCompletedAt } : {},
|
|
1485
|
+
eventCount,
|
|
1486
|
+
lastEventId
|
|
1487
|
+
};
|
|
1488
|
+
}
|
|
1413
1489
|
function normalizeSessionInfo(raw) {
|
|
1414
1490
|
const id = raw.id;
|
|
1415
1491
|
if (typeof id !== "string") return null;
|
package/dist/runtime.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $i as UploadProgress, $r as SandboxTerminalManager, A as CommitTaskSessionOptions, B as CreateTaskSessionOptions, Ci as SessionMessage, Ct as FileUsageResult, Jr as SandboxRuntimeHealth, Qr as SandboxTerminalInfo, Ri as TaskSessionChanges, St as FileUsageOptions, T as ChunkedUploadResult, Ur as SandboxPortBinding, Vi as TaskSessionInfo, Zr as SandboxTerminalCreateOptions, _i as SessionExecutionStatus, _t as FileRenameResult, bi as SessionInfo, bt as FileTreeOptions, di as SendSessionMessageOptions, ei as SandboxTerminalRequestOptions, fi as SendSessionMessageRequest, fr as SandboxEvent, gi as SessionExecutionInfo, hi as SessionEventStreamOptions, ia as WriteFileOptions, ln as ListMessagesOptions, mt as FileReadBatchResult, pi as SentSessionMessage, pt as FileReadBatchOptions, qn as RenameOptions, w as ChunkedUploadOptions, wt as FileWriteResult, xt as FileTreeResult, z as CreateSessionOptions, zi as TaskSessionCommitResult } from "./types-B00bLoQR.js";
|
|
2
2
|
import { a as NetworkError, c as QuotaError, d as SandboxFailureDetail, f as ServerError, h as ValidationError, i as FileWriteConflictError, l as SandboxError, m as TimeoutError, n as CapabilityError, o as NotFoundError, p as StateError, s as PartialFailureError, t as AuthError, u as SandboxErrorJson } from "./errors-CQOvGddH.js";
|
|
3
|
-
import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-
|
|
3
|
+
import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-C0T6t4zn.js";
|
|
4
4
|
|
|
5
5
|
//#region src/lib/chunked-upload.d.ts
|
|
6
6
|
/** The transport a caller wires this module to — {@link SandboxInstance.runtimeFetch}
|
|
@@ -55,6 +55,13 @@ declare class SandboxRuntimeApi {
|
|
|
55
55
|
* the token for.
|
|
56
56
|
*/
|
|
57
57
|
events(sessionId: string, options?: SessionEventStreamOptions): AsyncGenerator<SandboxEvent>;
|
|
58
|
+
/**
|
|
59
|
+
* List the durable execution records for one session.
|
|
60
|
+
*
|
|
61
|
+
* The sidecar owns this ledger and returns records newest first. Validate
|
|
62
|
+
* the response here so malformed payloads cannot become false run evidence.
|
|
63
|
+
*/
|
|
64
|
+
runs(sessionId: string): Promise<SessionExecutionInfo[]>;
|
|
58
65
|
readFiles(paths: string[], options?: FileReadBatchOptions): Promise<FileReadBatchResult>;
|
|
59
66
|
writeFile(path: string, content: string, options?: WriteFileOptions): Promise<FileWriteResult>;
|
|
60
67
|
/**
|
|
@@ -120,4 +127,4 @@ declare class SandboxRuntimeClient extends SandboxRuntimeApi {
|
|
|
120
127
|
}
|
|
121
128
|
declare function createSandboxRuntimeClient(config: SandboxRuntimeClientConfig): SandboxRuntimeClient;
|
|
122
129
|
//#endregion
|
|
123
|
-
export { type AgentRunOutcome, type AgentRunOutcomeTracker, AuthError, CapabilityError, type ChunkedUploadOptions, type ChunkedUploadResult, type ChunkedUploadTransport, type FileReadBatchOptions, type FileReadBatchResult, type FileRenameResult, type FileTreeOptions, type FileTreeResult, FileWriteConflictError, type FileWriteResult, type ListMessagesOptions, NetworkError, NotFoundError, PartialFailureError, QuotaError, type RenameOptions, SandboxError, type SandboxErrorJson, type SandboxEvent, type SandboxFailureDetail, SandboxRuntimeClient, type SandboxRuntimeClientConfig, type SandboxRuntimeHealth, type SandboxTerminalCreateOptions, type SandboxTerminalInfo, type SandboxTerminalManager, type SandboxTerminalRequestOptions, ServerError, type SessionEventStreamOptions, type SessionMessage, StateError, TimeoutError, type UploadProgress, ValidationError, type WriteFileOptions, createAgentRunOutcomeTracker, createSandboxRuntimeClient, deriveAgentResultOutcome, deriveAgentRunOutcome, uploadChunked };
|
|
130
|
+
export { type AgentRunOutcome, type AgentRunOutcomeTracker, AuthError, CapabilityError, type ChunkedUploadOptions, type ChunkedUploadResult, type ChunkedUploadTransport, type FileReadBatchOptions, type FileReadBatchResult, type FileRenameResult, type FileTreeOptions, type FileTreeResult, FileWriteConflictError, type FileWriteResult, type ListMessagesOptions, NetworkError, NotFoundError, PartialFailureError, QuotaError, type RenameOptions, SandboxError, type SandboxErrorJson, type SandboxEvent, type SandboxFailureDetail, SandboxRuntimeClient, type SandboxRuntimeClientConfig, type SandboxRuntimeHealth, type SandboxTerminalCreateOptions, type SandboxTerminalInfo, type SandboxTerminalManager, type SandboxTerminalRequestOptions, ServerError, type SessionEventStreamOptions, type SessionExecutionInfo, type SessionExecutionStatus, type SessionMessage, StateError, TimeoutError, type UploadProgress, ValidationError, type WriteFileOptions, createAgentRunOutcomeTracker, createSandboxRuntimeClient, deriveAgentResultOutcome, deriveAgentRunOutcome, uploadChunked };
|
package/dist/runtime.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as uploadChunked, g as deriveAgentRunOutcome, h as deriveAgentResultOutcome, m as createAgentRunOutcomeTracker, t as SandboxRuntimeApi } from "./runtime-api-
|
|
1
|
+
import { a as uploadChunked, g as deriveAgentRunOutcome, h as deriveAgentResultOutcome, m as createAgentRunOutcomeTracker, t as SandboxRuntimeApi } from "./runtime-api-ClXF8k_q.js";
|
|
2
2
|
import { a as NetworkError, c as QuotaError, d as StateError, f as TimeoutError, i as FileWriteConflictError, l as SandboxError, n as CapabilityError, o as NotFoundError, p as ValidationError, s as PartialFailureError, t as AuthError, u as ServerError } from "./errors-C6kn-3zt.js";
|
|
3
3
|
import { n as combineAbortSignals } from "./abort-signal-si1WMfJb.js";
|
|
4
4
|
//#region src/runtime-client.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as uploadChunked, c as encodePromptForWire, d as applyRequestedModel, f as assertCurrentBackendType, h as deriveAgentResultOutcome, i as sessionHeaders, m as createAgentRunOutcomeTracker, n as normalizeSessionInfo, o as SANDBOX_PROXY_REQUEST_MAX_BYTES, p as normalizeRuntimeBackendConfig, r as appendSessionIdQuery, t as SandboxRuntimeApi, u as parseSSEStream } from "./runtime-api-
|
|
1
|
+
import { a as uploadChunked, c as encodePromptForWire, d as applyRequestedModel, f as assertCurrentBackendType, h as deriveAgentResultOutcome, i as sessionHeaders, m as createAgentRunOutcomeTracker, n as normalizeSessionInfo, o as SANDBOX_PROXY_REQUEST_MAX_BYTES, p as normalizeRuntimeBackendConfig, r as appendSessionIdQuery, t as SandboxRuntimeApi, u as parseSSEStream } from "./runtime-api-ClXF8k_q.js";
|
|
2
2
|
import { a as NetworkError, c as QuotaError, d as StateError, f as TimeoutError, l as SandboxError, m as parseErrorResponse, n as CapabilityError, o as NotFoundError, p as ValidationError, t as AuthError, u as ServerError } from "./errors-C6kn-3zt.js";
|
|
3
3
|
import { c as createInteractiveControlHolderId, d as interactiveSessionControlReleaseResponseSchema, f as interactiveSessionControlValidationResponseSchema, i as createBrowserInteractiveSessionControlTransport, o as InteractiveSessionControlController, p as interactiveSessionStatusResponseSchema, r as browserInteractiveTerminalEndpoint, s as assertInteractiveSessionRef, u as interactiveSessionControlClaimResponseSchema } from "./browser-interactive-control-controller-Dv0gbFMu.js";
|
|
4
4
|
import { n as combineAbortSignals, t as awaitWithAbort } from "./abort-signal-si1WMfJb.js";
|
|
@@ -2756,6 +2756,15 @@ var SandboxSession = class SandboxSession {
|
|
|
2756
2756
|
return this.box._sessionEvents(this.id, opts);
|
|
2757
2757
|
}
|
|
2758
2758
|
/**
|
|
2759
|
+
* List the durable executions recorded for this session, newest first.
|
|
2760
|
+
*
|
|
2761
|
+
* This is the runtime's authoritative execution ledger. It lets callers
|
|
2762
|
+
* count provider runs without inferring execution from model-written files.
|
|
2763
|
+
*/
|
|
2764
|
+
async runs() {
|
|
2765
|
+
return this.box._sessionRuns(this.id);
|
|
2766
|
+
}
|
|
2767
|
+
/**
|
|
2759
2768
|
* Await a terminal result. With `executionId`, drains only that execution;
|
|
2760
2769
|
* without it, reads status and selects the latest execution. Event replay
|
|
2761
2770
|
* makes either form safe after the execution has already finished.
|
|
@@ -5213,7 +5222,12 @@ var SandboxInstance = class SandboxInstance {
|
|
|
5213
5222
|
const buffer = await response.arrayBuffer();
|
|
5214
5223
|
await fs.writeFile(tempTarPath, Buffer.from(buffer));
|
|
5215
5224
|
await fs.mkdir(localDir, { recursive: true });
|
|
5216
|
-
|
|
5225
|
+
try {
|
|
5226
|
+
execSync(`tar -xzf "${tempTarPath}" -C "${localDir}"`, { stdio: "pipe" });
|
|
5227
|
+
} catch (error) {
|
|
5228
|
+
const stderr = error.stderr?.toString().trim();
|
|
5229
|
+
throw new Error(`downloadDir: host tar failed to extract the archive${stderr ? ` — ${stderr}` : ""}`);
|
|
5230
|
+
}
|
|
5217
5231
|
} finally {
|
|
5218
5232
|
await fs.rm(tempDir, { recursive: true }).catch(() => {});
|
|
5219
5233
|
}
|
|
@@ -5488,12 +5502,9 @@ var SandboxInstance = class SandboxInstance {
|
|
|
5488
5502
|
* console.log(`Backend: ${status.type}, Status: ${status.status}`);
|
|
5489
5503
|
* ```
|
|
5490
5504
|
*
|
|
5491
|
-
* @example
|
|
5505
|
+
* @example Point the backend at a different model
|
|
5492
5506
|
* ```typescript
|
|
5493
|
-
* await box.backend.
|
|
5494
|
-
* command: "npx",
|
|
5495
|
-
* args: ["-y", "@anthropic/web-search"],
|
|
5496
|
-
* });
|
|
5507
|
+
* await box.backend.updateConfig({ model: "openai/gpt-5-mini" });
|
|
5497
5508
|
* ```
|
|
5498
5509
|
*
|
|
5499
5510
|
* @example Read provider-native Cursor metadata
|
|
@@ -5506,8 +5517,6 @@ var SandboxInstance = class SandboxInstance {
|
|
|
5506
5517
|
get backend() {
|
|
5507
5518
|
return {
|
|
5508
5519
|
status: () => this.backendStatus(),
|
|
5509
|
-
capabilities: () => this.backendCapabilities(),
|
|
5510
|
-
addMcp: (name, config) => this.backendAddMcp(name, config),
|
|
5511
5520
|
getMcpStatus: () => this.backendGetMcpStatus(),
|
|
5512
5521
|
updateConfig: (config) => this.backendUpdateConfig(config),
|
|
5513
5522
|
account: () => this.backendAccount(),
|
|
@@ -5528,36 +5537,13 @@ var SandboxInstance = class SandboxInstance {
|
|
|
5528
5537
|
}
|
|
5529
5538
|
async backendStatus() {
|
|
5530
5539
|
await this.ensureRunning();
|
|
5531
|
-
const response = await this.runtimeFetch("/backend
|
|
5532
|
-
if (!response.ok) {
|
|
5533
|
-
const body = await response.text();
|
|
5534
|
-
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
5535
|
-
}
|
|
5536
|
-
return await response.json();
|
|
5537
|
-
}
|
|
5538
|
-
async backendCapabilities() {
|
|
5539
|
-
await this.ensureRunning();
|
|
5540
|
-
const response = await this.runtimeFetch("/backend/capabilities", { method: "GET" });
|
|
5540
|
+
const response = await this.runtimeFetch("/backend", { method: "GET" });
|
|
5541
5541
|
if (!response.ok) {
|
|
5542
5542
|
const body = await response.text();
|
|
5543
5543
|
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
5544
5544
|
}
|
|
5545
5545
|
return await response.json();
|
|
5546
5546
|
}
|
|
5547
|
-
async backendAddMcp(name, config) {
|
|
5548
|
-
await this.ensureRunning();
|
|
5549
|
-
const response = await this.runtimeFetch("/backend/mcp", {
|
|
5550
|
-
method: "POST",
|
|
5551
|
-
body: JSON.stringify({
|
|
5552
|
-
name,
|
|
5553
|
-
config
|
|
5554
|
-
})
|
|
5555
|
-
});
|
|
5556
|
-
if (!response.ok) {
|
|
5557
|
-
const body = await response.text();
|
|
5558
|
-
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
5559
|
-
}
|
|
5560
|
-
}
|
|
5561
5547
|
async backendGetMcpStatus() {
|
|
5562
5548
|
await this.ensureRunning();
|
|
5563
5549
|
const response = await this.runtimeFetch("/backend/mcp", { method: "GET" });
|
|
@@ -5569,9 +5555,9 @@ var SandboxInstance = class SandboxInstance {
|
|
|
5569
5555
|
}
|
|
5570
5556
|
async backendUpdateConfig(config) {
|
|
5571
5557
|
await this.ensureRunning();
|
|
5572
|
-
const response = await this.runtimeFetch("/backend/
|
|
5573
|
-
method: "
|
|
5574
|
-
body: JSON.stringify(
|
|
5558
|
+
const response = await this.runtimeFetch("/backend/configure", {
|
|
5559
|
+
method: "POST",
|
|
5560
|
+
body: JSON.stringify(config)
|
|
5575
5561
|
});
|
|
5576
5562
|
if (!response.ok) {
|
|
5577
5563
|
const body = await response.text();
|
|
@@ -7599,6 +7585,10 @@ var SandboxInstance = class SandboxInstance {
|
|
|
7599
7585
|
}
|
|
7600
7586
|
return normalizeSessionInfo(await response.json());
|
|
7601
7587
|
}
|
|
7588
|
+
/** @internal — invoked by SandboxSession.runs(). */
|
|
7589
|
+
async _sessionRuns(id) {
|
|
7590
|
+
return this.runtime.runs(id);
|
|
7591
|
+
}
|
|
7602
7592
|
/** @internal — invoked by SandboxSession.events(). */
|
|
7603
7593
|
async *_sessionEvents(id, opts, stopOnTurnTerminal = false) {
|
|
7604
7594
|
await this.ensureRunning();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as TerminalStreamReconnectAuthority, c as MintScopedTokenOptions, h as TerminalReadyInfo, l as ScopedToken, r as TerminalStreamHandlers, t as TerminalStream } from "./terminal-stream-5GNLCsms.js";
|
|
2
2
|
import { a as InteractiveSessionControlController, c as InteractiveSessionIdentity, d as InteractiveAttachOptions, f as InteractiveControlClaimAcknowledgement, h as InteractiveSessionStatus, m as InteractiveRequestOptions, n as BrowserInteractiveSessionControlControllerOptions, o as InteractiveSessionControlControllerOptions, p as InteractiveControlClaimOptions, s as InteractiveSessionControlTransport } from "./browser-interactive-control-controller-lRfzpg9t.js";
|
|
3
|
-
import { $
|
|
3
|
+
import { $ as DurablePlanDecisionResult, A as CommitTaskSessionOptions, Ai as SnapshotInfo, B as CreateTaskSessionOptions, C as BranchOptions, Ci as SessionMessage, D as CodeExecutionResult, Di as SnapshotDeleteAcknowledgement, E as CodeExecutionOptions, Fn as ProvisionEvent, G as DispatchedSession, Gi as TeeAttestationResponse, Gr as SandboxResourceUsage, Gt as GitStatus, Ht as GitCommit, In as ProvisionResult, It as ForkCounts, J as DriveTurnOptions, Jn as RestoreSnapshotOptions, Jr as SandboxRuntimeHealth, Kt as GpuLease, Lt as ForkIdempotency, Mi as SnapshotResult, Mn as PromptInputPart, Nn as PromptOptions, O as CodeLanguage, On as ProcessManager, Pi as StartupDiagnostics, Pn as PromptResult, Q as DurablePlan, Qn as RolloutOptions, Ri as TaskSessionChanges, Rt as ForkLookupOptions, Si as SessionListOptions, Sn as PreviewLinkManager, Ti as SessionResultOptions, Ui as TeeAttestationOptions, Ur as SandboxPortBinding, Vi as TaskSessionInfo, Vr as SandboxInfo, Vt as GitBranch, W as DispatchPromptOptions, Wt as GitDiff, X as DriverInfo, Xi as TurnDriveResult, Xn as Rollout, Xr as SandboxTerminalAttachOptions, Yn as ResumeOptions, Yr as SandboxStatus, Zt as GpuLeaseManager, _n as NetworkManager, aa as WriteManyFile, ai as SandboxTraceOptions, an as IntelligenceReportCompareTo, at as EgressManager, bi as SessionInfo, bn as PermissionsManager, ci as SearchOptions, cn as JsonValue, cr as SandboxCreateReceipt, ct as EventStreamOptions, d as BackendConfig, di as SendSessionMessageOptions, dt as ExecResult, er as RolloutStartResult, fi as SendSessionMessageRequest, fr as SandboxEvent, gi as SessionExecutionInfo, hi as SessionEventStreamOptions, ia as WriteFileOptions, in as IntelligenceReportBudget, ir as SSHCredentials, j as CompletedTurnResult, ji as SnapshotOptions, jr as SandboxFleetTraceBundle, ln as ListMessagesOptions, lr as SandboxDeleteAcknowledgement, na as WaitForRolloutOptions, ni as SandboxTraceBundle, nn as InstalledTool, oa as WriteManyOptions, or as SandboxConnection, p as BackendManager, pi as SentSessionMessage, qi as TeePublicKeyResponse, qr as SandboxRuntimeCapabilities, ra as WorkspaceOperationLookup, rn as IntelligenceReport, rr as SSHCommandDescriptor, si as SearchMatch, sn as IntelligenceReportWindow, ta as WaitForOptions, ti as SandboxTerminals, ut as ExecOptions, vt as FileSystem, wt as FileWriteResult, xi as SessionInterruptOptions, yi as SessionForkOptions, z as CreateSessionOptions, zi as TaskSessionCommitResult } from "./types-B00bLoQR.js";
|
|
4
4
|
import { AgentInteractiveSessionAttach, AgentInteractiveSessionControlClaim, AgentInteractiveSessionControlClaimAcknowledgement, AgentInteractiveSessionControlClaimRequest, AgentInteractiveSessionPromptAcknowledgement, AgentInteractiveSessionPromptCommand, AgentInteractiveSessionRef, AgentInteractiveSessionStart, AgentInteractiveSessionStopAcknowledgement, AgentInteractiveSessionStopCommand, AgentInteractiveTerminalSession, AgentInteractiveTerminalSession as AgentInteractiveTerminalSession$1, AgentRunCancellationAcknowledgement, AgentRunCancellationRequest, InteractionAcknowledgement, InteractionData, InteractionRequest, InteractionResponseCommand, TerminalOutputEvent, TerminalReplayWindow, agentInteractiveSessionPromptRequestDigest } from "@tangle-network/agent-interface";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
|
|
@@ -397,6 +397,7 @@ interface SandboxSessionHost extends InteractiveSessionHost {
|
|
|
397
397
|
prompt(message: string | PromptInputPart[], options?: PromptOptions): Promise<PromptResult>;
|
|
398
398
|
_sessionStatus(id: string): Promise<SessionInfo | null>;
|
|
399
399
|
_sessionEvents(id: string, opts?: SessionEventStreamOptions): AsyncGenerator<SandboxEvent>;
|
|
400
|
+
_sessionRuns(id: string): Promise<SessionExecutionInfo[]>;
|
|
400
401
|
_sessionResult(id: string, options?: SessionResultOptions, session?: SessionInfo): Promise<PromptResult>;
|
|
401
402
|
_sessionDelete(id: string): Promise<void>;
|
|
402
403
|
_sessionSendMessage(id: string, request: SendSessionMessageRequest, options?: SendSessionMessageOptions): Promise<SentSessionMessage>;
|
|
@@ -457,6 +458,13 @@ declare class SandboxSession {
|
|
|
457
458
|
* terminal event has been yielded, OR when the caller's signal aborts.
|
|
458
459
|
*/
|
|
459
460
|
events(opts?: SessionEventStreamOptions): AsyncGenerator<SandboxEvent>;
|
|
461
|
+
/**
|
|
462
|
+
* List the durable executions recorded for this session, newest first.
|
|
463
|
+
*
|
|
464
|
+
* This is the runtime's authoritative execution ledger. It lets callers
|
|
465
|
+
* count provider runs without inferring execution from model-written files.
|
|
466
|
+
*/
|
|
467
|
+
runs(): Promise<SessionExecutionInfo[]>;
|
|
460
468
|
/**
|
|
461
469
|
* Await a terminal result. With `executionId`, drains only that execution;
|
|
462
470
|
* without it, reads status and selects the latest execution. Event replay
|
|
@@ -1329,12 +1337,9 @@ declare class SandboxInstance {
|
|
|
1329
1337
|
* console.log(`Backend: ${status.type}, Status: ${status.status}`);
|
|
1330
1338
|
* ```
|
|
1331
1339
|
*
|
|
1332
|
-
* @example
|
|
1340
|
+
* @example Point the backend at a different model
|
|
1333
1341
|
* ```typescript
|
|
1334
|
-
* await box.backend.
|
|
1335
|
-
* command: "npx",
|
|
1336
|
-
* args: ["-y", "@anthropic/web-search"],
|
|
1337
|
-
* });
|
|
1342
|
+
* await box.backend.updateConfig({ model: "openai/gpt-5-mini" });
|
|
1338
1343
|
* ```
|
|
1339
1344
|
*
|
|
1340
1345
|
* @example Read provider-native Cursor metadata
|
|
@@ -1346,8 +1351,6 @@ declare class SandboxInstance {
|
|
|
1346
1351
|
*/
|
|
1347
1352
|
get backend(): BackendManager;
|
|
1348
1353
|
private backendStatus;
|
|
1349
|
-
private backendCapabilities;
|
|
1350
|
-
private backendAddMcp;
|
|
1351
1354
|
private backendGetMcpStatus;
|
|
1352
1355
|
private backendUpdateConfig;
|
|
1353
1356
|
private backendControlData;
|
|
@@ -1960,6 +1963,8 @@ declare class SandboxInstance {
|
|
|
1960
1963
|
mintScopedToken(opts: MintScopedTokenOptions): Promise<ScopedToken>;
|
|
1961
1964
|
/** @internal — invoked by SandboxSession.status(). */
|
|
1962
1965
|
_sessionStatus(id: string): Promise<SessionInfo | null>;
|
|
1966
|
+
/** @internal — invoked by SandboxSession.runs(). */
|
|
1967
|
+
_sessionRuns(id: string): Promise<SessionExecutionInfo[]>;
|
|
1963
1968
|
/** @internal — invoked by SandboxSession.events(). */
|
|
1964
1969
|
_sessionEvents(id: string, opts?: SessionEventStreamOptions, stopOnTurnTerminal?: boolean): AsyncGenerator<SandboxEvent>;
|
|
1965
1970
|
/** Replay one execution without subscribing to other runs on its session. */
|
package/dist/tangle/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as TANGLE_JOBS_CONTRACT, c as AgentSandboxBlueprintAbi, d as SandboxCreateParamTypes, f as SandboxCreateResponseParamTypes, i as TANGLE_CHAIN_ID, l as ITangleJobsAbi, n as JOB_SANDBOX_CREATE, o as TANGLE_MAINNET_RPC, p as SandboxIdParamTypes, r as JOB_SANDBOX_DELETE, s as TangleSandboxClientConfig, t as TangleSandboxClient, u as JsonResponseParamTypes } from "../index-
|
|
1
|
+
import { a as TANGLE_JOBS_CONTRACT, c as AgentSandboxBlueprintAbi, d as SandboxCreateParamTypes, f as SandboxCreateResponseParamTypes, i as TANGLE_CHAIN_ID, l as ITangleJobsAbi, n as JOB_SANDBOX_CREATE, o as TANGLE_MAINNET_RPC, p as SandboxIdParamTypes, r as JOB_SANDBOX_DELETE, s as TangleSandboxClientConfig, t as TangleSandboxClient, u as JsonResponseParamTypes } from "../index-CtmbhfdA.js";
|
|
2
2
|
export { AgentSandboxBlueprintAbi, ITangleJobsAbi, JOB_SANDBOX_CREATE, JOB_SANDBOX_DELETE, JsonResponseParamTypes, SandboxCreateParamTypes, SandboxCreateResponseParamTypes, SandboxIdParamTypes, TANGLE_CHAIN_ID, TANGLE_JOBS_CONTRACT, TANGLE_MAINNET_RPC, TangleSandboxClient, TangleSandboxClientConfig };
|
package/dist/tangle/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as TANGLE_JOBS_CONTRACT, c as ITangleJobsAbi, d as SandboxCreateResponseParamTypes, f as SandboxIdParamTypes, i as TANGLE_CHAIN_ID, l as JsonResponseParamTypes, n as JOB_SANDBOX_CREATE, o as TANGLE_MAINNET_RPC, r as JOB_SANDBOX_DELETE, s as AgentSandboxBlueprintAbi, t as TangleSandboxClient, u as SandboxCreateParamTypes } from "../tangle-
|
|
1
|
+
import { a as TANGLE_JOBS_CONTRACT, c as ITangleJobsAbi, d as SandboxCreateResponseParamTypes, f as SandboxIdParamTypes, i as TANGLE_CHAIN_ID, l as JsonResponseParamTypes, n as JOB_SANDBOX_CREATE, o as TANGLE_MAINNET_RPC, r as JOB_SANDBOX_DELETE, s as AgentSandboxBlueprintAbi, t as TangleSandboxClient, u as SandboxCreateParamTypes } from "../tangle-BhLq6l2G.js";
|
|
2
2
|
export { AgentSandboxBlueprintAbi, ITangleJobsAbi, JOB_SANDBOX_CREATE, JOB_SANDBOX_DELETE, JsonResponseParamTypes, SandboxCreateParamTypes, SandboxCreateResponseParamTypes, SandboxIdParamTypes, TANGLE_CHAIN_ID, TANGLE_JOBS_CONTRACT, TANGLE_MAINNET_RPC, TangleSandboxClient };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { m as parseErrorResponse } from "./errors-C6kn-3zt.js";
|
|
2
|
-
import { n as createSandboxInstanceFromResponse } from "./sandbox-
|
|
2
|
+
import { n as createSandboxInstanceFromResponse } from "./sandbox-CzKxUiYj.js";
|
|
3
3
|
//#region src/tangle/abi.ts
|
|
4
4
|
/**
|
|
5
5
|
* Tangle Contract ABI Definitions
|
|
@@ -1492,6 +1492,13 @@ interface CreateSandboxOptions {
|
|
|
1492
1492
|
* @example { url: "https://github.com/user/repo.git", ref: "main" }
|
|
1493
1493
|
*/
|
|
1494
1494
|
git?: GitConfig;
|
|
1495
|
+
/**
|
|
1496
|
+
* Initial working directory below the realized workspace root.
|
|
1497
|
+
*
|
|
1498
|
+
* Use a relative POSIX path. When `git` is set, `.` means the repository
|
|
1499
|
+
* root. Otherwise, `.` means the sandbox workspace root.
|
|
1500
|
+
*/
|
|
1501
|
+
cwd?: string;
|
|
1495
1502
|
/** Human-readable name for the sandbox */
|
|
1496
1503
|
name?: string;
|
|
1497
1504
|
/** Resource limits (CPU cores, memory, disk) */
|
|
@@ -3036,6 +3043,23 @@ interface SandboxRuntimeCapabilities {
|
|
|
3036
3043
|
* Lifecycle state of an agent session inside a sandbox.
|
|
3037
3044
|
*/
|
|
3038
3045
|
type SessionStatus = "queued" | "running" | "completed" | "failed" | "cancelled";
|
|
3046
|
+
/** Lifecycle state of an execution retained in the session replay ledger. */
|
|
3047
|
+
type SessionExecutionStatus = "active" | "completed" | "failed" | "cancelled";
|
|
3048
|
+
/**
|
|
3049
|
+
* Durable metadata for one session execution.
|
|
3050
|
+
*
|
|
3051
|
+
* The values come from the runtime replay ledger, not from a provider
|
|
3052
|
+
* response or an inferred model result.
|
|
3053
|
+
*/
|
|
3054
|
+
interface SessionExecutionInfo {
|
|
3055
|
+
executionId: string;
|
|
3056
|
+
sessionId: string;
|
|
3057
|
+
status: SessionExecutionStatus;
|
|
3058
|
+
startedAt: number;
|
|
3059
|
+
completedAt?: number;
|
|
3060
|
+
eventCount: number;
|
|
3061
|
+
lastEventId: string;
|
|
3062
|
+
}
|
|
3039
3063
|
/** Secret-free model tuple selected by the sandbox runtime. */
|
|
3040
3064
|
/**
|
|
3041
3065
|
* Which layer supplied the model id that executed. `request` means the model
|
|
@@ -4674,8 +4698,24 @@ interface BackendStatus {
|
|
|
4674
4698
|
version?: string;
|
|
4675
4699
|
/** Error message if failed */
|
|
4676
4700
|
error?: string;
|
|
4677
|
-
/**
|
|
4678
|
-
|
|
4701
|
+
/** Capabilities the running backend reports, when it reports them */
|
|
4702
|
+
capabilities?: BackendCapabilities;
|
|
4703
|
+
}
|
|
4704
|
+
/** Status of one MCP server, as the runtime reports it. */
|
|
4705
|
+
interface BackendMcpServerStatus {
|
|
4706
|
+
name: string;
|
|
4707
|
+
status: "connected" | "disconnected" | "error" | "unknown";
|
|
4708
|
+
type?: "local" | "remote" | "stdio" | "http";
|
|
4709
|
+
error?: string;
|
|
4710
|
+
}
|
|
4711
|
+
/**
|
|
4712
|
+
* The runtime-adjustable backend settings. Thinking-token budgets are
|
|
4713
|
+
* per-run (`backend.model.maxThinkingTokens` on the run request), not part
|
|
4714
|
+
* of the durable config, and the server refuses them here.
|
|
4715
|
+
*/
|
|
4716
|
+
interface BackendRuntimeConfigUpdate {
|
|
4717
|
+
/** Model id for the running backend */
|
|
4718
|
+
model?: string;
|
|
4679
4719
|
}
|
|
4680
4720
|
/**
|
|
4681
4721
|
* Backend information.
|
|
@@ -5187,19 +5227,12 @@ interface PermissionsManager {
|
|
|
5187
5227
|
* Access via `sandbox.backend`.
|
|
5188
5228
|
*/
|
|
5189
5229
|
interface BackendManager {
|
|
5190
|
-
/** Get current backend status */
|
|
5230
|
+
/** Get current backend status, including reported capabilities */
|
|
5191
5231
|
status(): Promise<BackendStatus>;
|
|
5192
|
-
/** Get backend capabilities */
|
|
5193
|
-
capabilities(): Promise<BackendCapabilities>;
|
|
5194
|
-
/** Add MCP server at runtime (opencode only) */
|
|
5195
|
-
addMcp(name: string, config: McpServerConfig): Promise<void>;
|
|
5196
5232
|
/** Get MCP server status */
|
|
5197
|
-
getMcpStatus(): Promise<Record<string,
|
|
5198
|
-
|
|
5199
|
-
|
|
5200
|
-
}>>;
|
|
5201
|
-
/** Update backend configuration */
|
|
5202
|
-
updateConfig(config: Partial<BackendConfig>): Promise<void>;
|
|
5233
|
+
getMcpStatus(): Promise<Record<string, BackendMcpServerStatus>>;
|
|
5234
|
+
/** Update the runtime-adjustable backend settings */
|
|
5235
|
+
updateConfig(config: BackendRuntimeConfigUpdate): Promise<void>;
|
|
5203
5236
|
/** Provider account metadata, when exposed by the backend SDK */
|
|
5204
5237
|
account(): Promise<BackendAccount>;
|
|
5205
5238
|
/** Provider model catalog, when exposed by the backend SDK */
|
|
@@ -6279,4 +6312,4 @@ interface CodeExecutionOptions {
|
|
|
6279
6312
|
idempotencyKey?: string;
|
|
6280
6313
|
}
|
|
6281
6314
|
//#endregion
|
|
6282
|
-
export {
|
|
6315
|
+
export { DurablePlanDecisionResult as $, UploadProgress as $i, RolloutScorer as $n, SandboxTerminalManager as $r, GpuLeaseStatus as $t, CommitTaskSessionOptions as A, SnapshotInfo as Ai, ProcessSpawnOptions as An, SandboxFleetToken as Ar, FleetDriveTurnRequest as At, CreateTaskSessionOptions as B, TaskSessionFileChange as Bi, PublicTemplateVersionInfo as Bn, SandboxIdentity as Br, GitAuth as Bt, BranchOptions as C, SessionMessage as Ci, PreviewLinkWaitOptions as Cn, SandboxFleetMachineMeteredUsage as Cr, FileUsageResult as Ct, CodeExecutionResult as D, SnapshotDeleteAcknowledgement as Di, ProcessLogEntry as Dn, SandboxFleetManifestMachine as Dr, FleetDispatchResultBufferOptions as Dt, CodeExecutionOptions as E, SessionStatus as Ei, ProcessListOptions as En, SandboxFleetManifest as Er, FleetDispatchResultBuffer as Et, CreateSandboxFleetOptions as F, StartupOperation as Fi, ProvisionEvent as Fn, SandboxFleetUsage as Fr, FleetPromptDispatchResult as Ft, DispatchedSession as G, TeeAttestationResponse as Gi, ReconcileSandboxFleetsOptions as Gn, SandboxResourceUsage as Gr, GitStatus as Gt, DevServerInfo as H, TaskSessionProfile as Hi, PublishPublicTemplateVersionOptions as Hn, SandboxIntelligenceEnvelope as Hr, GitCommit as Ht, CreateSandboxFleetTokenOptions as I, StorageConfig as Ii, ProvisionResult as In, SandboxFleetWorkspace as Ir, ForkCounts as It, DriveTurnOptions as J, TokenRefreshHandler as Ji, RestoreSnapshotOptions as Jn, SandboxRuntimeHealth as Jr, GpuLeaseCommandResult as Jt, DownloadOptions as K, TeePublicKey as Ki, ReconcileSandboxFleetsResult as Kn, SandboxResources as Kr, GpuLease as Kt, CreateSandboxFleetWithCoordinatorOptions as L, SubscriptionInfo as Li, ProvisionStatus as Ln, SandboxFleetWorkspaceReconcileResult as Lr, ForkIdempotency as Lt, CreateGpuLeaseOptions as M, SnapshotResult as Mi, PromptInputPart as Mn, SandboxFleetTraceEvent as Mr, FleetExecDispatchResult as Mt, CreateIntelligenceReportOptions as N, SshKeysManager as Ni, PromptOptions as Nn, SandboxFleetTraceExport as Nr, FleetMachineId as Nt, CodeLanguage as O, SnapshotDeleteOutcome as Oi, ProcessManager as On, SandboxFleetOperationsSummary as Or, FleetDispatchStreamOptions as Ot, CreateRequestOptions as P, StartupDiagnostics as Pi, PromptResult as Pn, SandboxFleetTraceOptions as Pr, FleetPromptDispatchOptions as Pt, DurablePlan as Q, UploadOptions as Qi, RolloutOptions as Qn, SandboxTerminalInfo as Qr, GpuLeaseProviderName as Qt, CreateSandboxOptions as R, TaskSessionChanges as Ri, ProvisionStep as Rn, SandboxFleetWorkspaceRestoreResult as Rr, ForkLookupOptions as Rt, BatchTaskResult as S, SessionListOptions as Si, PreviewLinkManager as Sn, SandboxFleetMachine as Sr, FileUsageOptions as St, ChunkedUploadResult as T, SessionResultOptions as Ti, ProcessInfo as Tn, SandboxFleetMachineSpec as Tr, FleetDispatchCancelResult as Tt, DirectoryPermission as U, TeeAttestationOptions as Ui, ReapExpiredSandboxFleetsOptions as Un, SandboxPortBinding as Ur, GitConfig as Ut, DeleteOptions as V, TaskSessionInfo as Vi, PublishPublicTemplateOptions as Vn, SandboxInfo as Vr, GitBranch as Vt, DispatchPromptOptions as W, TeeAttestationReport as Wi, ReapExpiredSandboxFleetsResult as Wn, SandboxPortPreviewLink as Wr, GitDiff as Wt, DriverInfo as X, TurnDriveResult as Xi, Rollout as Xn, SandboxTerminalAttachOptions as Xr, GpuLeaseExecResult as Xt, DriverConfig as Y, TokenUsage as Yi, ResumeOptions as Yn, SandboxStatus as Yr, GpuLeaseExecOptions as Yt, DriverType as Z, UpdateUserOptions as Zi, RolloutChildResult as Zn, SandboxTerminalCreateOptions as Zr, GpuLeaseManager as Zt, BatchBackend as _, SessionExecutionStatus as _i, NetworkManager as _n, SandboxFleetDispatchResponse as _r, FileRenameResult as _t, AgentQuestionRequest as a, WriteManyFile as aa, SandboxTraceOptions as ai, IntelligenceReportCompareTo as an, SandboxConfig as ar, EgressManager as at, BatchRunRequest as b, SessionInfo as bi, PermissionsManager as bn, SandboxFleetInfo as br, FileTreeOptions as bt, AttachGpuLeaseOptions as c, BatchEvent as ca, SearchOptions as ci, JsonValue as cn, SandboxCreateReceipt as cr, EventStreamOptions as ct, BackendConfig as d, BatchTaskUsage as da, SendSessionMessageOptions as di, ListSandboxFleetOptions as dn, SandboxEnvironment as dr, ExecResult as dt, UsageInfo as ea, SandboxTerminalRequestOptions as ei, HostAgentDriverConfig as en, RolloutStartResult as er, DurablePlanSnapshot as et, BackendInfo as f, PublicBatchRunRequest as fa, SendSessionMessageRequest as fi, ListSandboxOptions as fn, SandboxEvent as fr, FileInfo as ft, BackendStatus as g, SessionExecutionInfo as gi, NetworkConfig as gn, SandboxFleetDispatchFailureClass as gr, FileReadResult as gt, BackendRuntimeConfigUpdate as h, SessionEventStreamOptions as hi, MkdirOptions as hn, SandboxFleetCostEstimate as hr, FileReadError as ht, AgentApprovalRequirement as i, WriteFileOptions as ia, SandboxTraceExport as ii, IntelligenceReportBudget as in, SSHCredentials as ir, EgressDenial as it, CompletedTurnResult as j, SnapshotOptions as ji, ProcessStatus as jn, SandboxFleetTraceBundle as jr, FleetExecDispatchOptions as jt, CodeResultPart as k, SnapshotIdempotency as ki, ProcessSignal as kn, SandboxFleetPolicy as kr, FleetDriveTurnOutcome as kt, AttachSandboxFleetMachineOptions as l, BatchEventDataMap as la, SecretInfo as li, ListMessagesOptions as ln, SandboxDeleteAcknowledgement as lr, ExactProcessSpawnOptions as lt, BackendMcpServerStatus as m, parseBackendType as ma, SessionBackendCredentials as mi, McpServerConfig as mn, SandboxFleetArtifactSpec as mr, FileReadBatchResult as mt, AccessPolicyRule as n, WaitForRolloutOptions as na, SandboxTraceBundle as ni, InstalledTool as nn, RolloutTurnPart as nr, EffectiveBackendProfile as nt, AgentRunStatus as o, WriteManyOptions as oa, SandboxUser as oi, IntelligenceReportSubjectType as on, SandboxConnection as or, EgressPolicy as ot, BackendManager as p, BackendType as pa, SentSessionMessage as pi, MAX_EGRESS_DENIALS_LIMIT as pn, SandboxFleetArtifact as pr, FileReadBatchOptions as pt, DownloadProgress as q, TeePublicKeyResponse as qi, RenameOptions as qn, SandboxRuntimeCapabilities as qr, GpuLeaseBilling as qt, AddUserOptions as r, WorkspaceOperationLookup as ra, SandboxTraceEvent as ri, IntelligenceReport as rn, SSHCommandDescriptor as rr, EffectiveBackendSource as rt, AgentToolInvocation as s, BatchBackendStats as sa, SearchMatch as si, IntelligenceReportWindow as sn, SandboxCreateOutcome as sr, EnsureDevServerOptions as st, AcceleratorKind as t, WaitForOptions as ta, SandboxTerminals as ti, HostAgentRuntimeBackend as tn, RolloutStatus as tr, EffectiveBackend as tt, BackendCapabilities as u, BatchSidecarGroup as ua, SecretsManager as ui, ListOptions as un, SandboxDeleteOutcome as ur, ExecOptions as ut, BatchResult as v, SessionFailureReason as vi, NonHostAgentDriverConfig as vn, SandboxFleetDriverCapability as vr, FileSystem as vt, ChunkedUploadOptions as w, SessionMessageInputPart as wi, Process as wn, SandboxFleetMachineRecord as wr, FileWriteResult as wt, BatchTask as x, SessionInterruptOptions as xi, PreviewLinkInfo as xn, SandboxFleetIntelligenceEnvelope as xr, FileTreeResult as xt, BatchRunOptions as y, SessionForkOptions as yi, PermissionLevel as yn, SandboxFleetDriverTimings as yr, FileTreeFile as yt, CreateSessionOptions as z, TaskSessionCommitResult as zi, PublicTemplateInfo as zn, SandboxFleetWorkspaceSnapshotResult as zr, GPU_LEASE_PROVIDER_NAMES as zt };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/sandbox",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.36.1",
|
|
4
4
|
"description": "Client SDK for the Tangle Sandbox platform - build AI agent applications with dev containers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -95,9 +95,9 @@
|
|
|
95
95
|
"url": "https://github.com/tangle-network/agent-dev-container/issues"
|
|
96
96
|
},
|
|
97
97
|
"dependencies": {
|
|
98
|
-
"@tangle-network/agent-core": "0.9.
|
|
99
|
-
"@tangle-network/agent-interface": "
|
|
100
|
-
"zod": "4.4
|
|
98
|
+
"@tangle-network/agent-core": "0.9.6",
|
|
99
|
+
"@tangle-network/agent-interface": "2.0.0",
|
|
100
|
+
"zod": "4.5.4"
|
|
101
101
|
},
|
|
102
102
|
"peerDependencies": {
|
|
103
103
|
"@mastra/core": "^1.36.0",
|
|
@@ -136,8 +136,8 @@
|
|
|
136
136
|
"ws": "^8.20.0",
|
|
137
137
|
"yjs": "13.6.30",
|
|
138
138
|
"@repo/shared": "0.0.0",
|
|
139
|
-
"@tangle-network/cli-agent-registry": "0.3.
|
|
140
|
-
"@tangle-network/runtime-contracts": "0.6.
|
|
139
|
+
"@tangle-network/cli-agent-registry": "0.3.14",
|
|
140
|
+
"@tangle-network/runtime-contracts": "0.6.4",
|
|
141
141
|
"@tangle-network/sse-core": "0.0.0"
|
|
142
142
|
},
|
|
143
143
|
"scripts": {
|