@tangle-network/sandbox 0.11.1-develop.20260718200351.2f5db96 → 0.11.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/README.md +16 -39
- package/dist/agent/index.d.ts +3 -3
- package/dist/{client-L4c2I5tL.d.ts → client-DBioX_CL.d.ts} +2 -2
- package/dist/{client-yksqE5VH.js → client-D_67csnK.js} +7 -15
- package/dist/collaboration/index.js +1 -1
- package/dist/{collaboration-CeNQA9H_.js → collaboration-DDnuTcZd.js} +1 -1
- package/dist/core.d.ts +4 -4
- package/dist/core.js +3 -3
- package/dist/{errors-hbpL_-S6.js → errors-Cbs78OlF.js} +3 -3
- package/dist/{errors-B-8AMQdY.d.ts → errors-ntvaf0_F.d.ts} +1 -1
- package/dist/{index-XaVF9qK-.d.ts → index-Dj8LzvId.d.ts} +2 -2
- package/dist/index.d.ts +6 -6
- package/dist/index.js +8 -8
- package/dist/intelligence/index.js +1 -1
- package/dist/{runtime-api-r8vQVMe4.js → runtime-api-kukaWPtF.js} +5 -6
- package/dist/runtime.d.ts +2 -2
- package/dist/runtime.js +2 -2
- package/dist/{sandbox-C0qo2TZO.d.ts → sandbox-BRoxCvpS.d.ts} +29 -81
- package/dist/{sandbox-C8WoMyT0.js → sandbox-DaLPTCRA.js} +32 -133
- package/dist/session-gateway/index.d.ts +13 -82
- package/dist/session-gateway/index.js +144 -343
- package/dist/tangle/index.d.ts +1 -1
- package/dist/tangle/index.js +1 -1
- package/dist/{tangle-m1lRkQlR.js → tangle-DHOkbr5a.js} +4 -4
- package/dist/{types-DACKEpON.d.ts → types-D2C72ySk.d.ts} +30 -83
- package/package.json +3 -4
package/README.md
CHANGED
|
@@ -160,22 +160,14 @@ The decision tree:
|
|
|
160
160
|
### Dispatch + reconnect (the "Worker restart" pattern)
|
|
161
161
|
|
|
162
162
|
```typescript
|
|
163
|
-
import { Sandbox } from "@tangle-network/sandbox
|
|
163
|
+
import { Sandbox } from "@tangle-network/sandbox";
|
|
164
164
|
|
|
165
165
|
const client = new Sandbox({ apiKey: process.env.TANGLE_API_KEY! });
|
|
166
166
|
|
|
167
|
-
// In your /chat handler
|
|
168
|
-
|
|
169
|
-
// server-side HMAC; never accept a caller-selected runtime session ID.
|
|
170
|
-
const turnId = requireStableTurnId(req);
|
|
171
|
-
const sessionId = await deriveOwnedTurnSessionId(
|
|
172
|
-
user.id,
|
|
173
|
-
conversationId,
|
|
174
|
-
turnId,
|
|
175
|
-
);
|
|
167
|
+
// In your /chat handler:
|
|
168
|
+
const sessionId = req.headers.get("x-turn-id") ?? crypto.randomUUID();
|
|
176
169
|
const { sessionId: id, alreadyExisted } = await box.dispatchPrompt(prompt, {
|
|
177
|
-
sessionId,
|
|
178
|
-
turnId,
|
|
170
|
+
sessionId, // idempotent: a retry with the same id is a lookup, not a re-execute
|
|
179
171
|
});
|
|
180
172
|
|
|
181
173
|
// Stream to the browser; if the client comes back later with the same sessionId
|
|
@@ -187,43 +179,32 @@ for await (const event of box.session(id).events({
|
|
|
187
179
|
}
|
|
188
180
|
```
|
|
189
181
|
|
|
190
|
-
### Browser-direct streaming (without proxying
|
|
182
|
+
### Browser-direct streaming (without proxying tokens through your server)
|
|
191
183
|
|
|
192
184
|
```typescript
|
|
193
185
|
import { SessionGatewayClient } from "@tangle-network/sandbox/session-gateway";
|
|
194
186
|
|
|
195
|
-
const
|
|
196
|
-
localStorage.getItem("sandbox-browser-session") ?? crypto.randomUUID();
|
|
197
|
-
localStorage.setItem("sandbox-browser-session", sessionId);
|
|
198
|
-
|
|
199
|
-
// The browser sends only sessionId. Your authenticated backend looks up the
|
|
200
|
-
// owned runtime session and mints with both sessionId and runtimeSessionId:
|
|
201
|
-
// box.mintScopedToken({ scope: "session", sessionId, runtimeSessionId })
|
|
202
|
-
const scoped = await fetchScopedToken({ sessionId });
|
|
203
|
-
let client: SessionGatewayClient;
|
|
204
|
-
client = new SessionGatewayClient({
|
|
187
|
+
const client = new SessionGatewayClient({
|
|
205
188
|
url: "wss://your-sandbox-api.example.com/session",
|
|
206
|
-
token:
|
|
189
|
+
token: await fetchScopedToken(), // mint via box.mintScopedToken({ scope: 'session', sessionId })
|
|
207
190
|
sessionId,
|
|
208
|
-
onTokenRefresh: () => fetchScopedToken({ sessionId }),
|
|
209
191
|
autoReconnect: true,
|
|
210
|
-
enableReplayPersistence: true,
|
|
211
|
-
replayStorage:
|
|
192
|
+
enableReplayPersistence: true, // remembers lastEventId across reloads
|
|
193
|
+
replayStorage: { /* localStorage adapter, see session-gateway docs */ },
|
|
212
194
|
handlers: {
|
|
213
|
-
|
|
214
|
-
onReplayStart: (
|
|
195
|
+
onMessage: (event) => render(event),
|
|
196
|
+
onReplayStart: ({ since }) => showSpinner(`replaying from ${since}`),
|
|
215
197
|
onReplayComplete: () => hideSpinner(),
|
|
216
|
-
onBackpressureWarning: (
|
|
198
|
+
onBackpressureWarning: ({ droppedCount, suggestReplay }) =>
|
|
199
|
+
suggestReplay && client.replay(client.stats.replay.lastEventId),
|
|
217
200
|
},
|
|
218
201
|
});
|
|
219
202
|
client.connect();
|
|
220
203
|
```
|
|
221
204
|
|
|
222
|
-
`SessionGatewayClient` handles auto-reconnect with exponential backoff,
|
|
223
|
-
None of this requires a
|
|
224
|
-
|
|
225
|
-
Public operations reject if `connection.established` does not arrive within `connectionEstablishmentTimeoutMs` (10 seconds by default).
|
|
226
|
-
Use `handlers.onMessage` to observe every non-duplicate normalized frame after the client processes it; its `id` and canonical `seq` fields cover runtime, project, terminal, and control messages, while `onAgentEvent` is the agent-event convenience callback.
|
|
205
|
+
`SessionGatewayClient` handles auto-reconnect with exponential backoff, sequence-gap
|
|
206
|
+
detection, replay-on-reconnect, and `lastEventId` persistence. None of this requires a
|
|
207
|
+
Durable Object.
|
|
227
208
|
|
|
228
209
|
Server-originated product events can arrive before the browser connects:
|
|
229
210
|
|
|
@@ -238,10 +219,6 @@ The public API binds that pending queue to the authenticated product and Sandbox
|
|
|
238
219
|
A later connection by the same owner leases and acknowledges the ordered queue; another owner receives none of it.
|
|
239
220
|
A gateway crash before acknowledgement redelivers the same event IDs, which the default `SessionGatewayClient` deduplicates before invoking handlers.
|
|
240
221
|
|
|
241
|
-
The Worker example authenticates before touching the account-key-backed Sandbox client and derives a user-owned runtime session ID from the user, conversation, and turn.
|
|
242
|
-
A retry with the same `x-conversation-id` and `x-turn-id` reuses one execution; a distinct turn gets a distinct execution.
|
|
243
|
-
The detached run survives a Worker or browser response ending; reconnect with the same conversation ID, turn ID, and `Last-Event-ID` to resume.
|
|
244
|
-
|
|
245
222
|
See `examples/cf-worker-chat.ts`, `examples/browser-streaming-resume.ts`, and
|
|
246
223
|
`examples/reconnect-from-last-event-id.ts` for end-to-end patterns.
|
|
247
224
|
|
package/dist/agent/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { D as CodeExecutionOptions, O as CodeExecutionResult, j as CodeResultPart, k as CodeLanguage } from "../types-
|
|
2
|
-
import { n as SandboxInstance } from "../sandbox-
|
|
3
|
-
import { i as SandboxClient } from "../client-
|
|
1
|
+
import { D as CodeExecutionOptions, O as CodeExecutionResult, j as CodeResultPart, k as CodeLanguage } from "../types-D2C72ySk.js";
|
|
2
|
+
import { n as SandboxInstance } from "../sandbox-BRoxCvpS.js";
|
|
3
|
+
import { i as SandboxClient } from "../client-DBioX_CL.js";
|
|
4
4
|
import * as _$_modelcontextprotocol_sdk_server_index_js0 from "@modelcontextprotocol/sdk/server/index.js";
|
|
5
5
|
|
|
6
6
|
//#region src/agent/tools/_specs.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $
|
|
2
|
-
import { a as TraceExportSink, i as TraceExportResult, n as SandboxInstance, t as HttpClient } from "./sandbox-
|
|
1
|
+
import { $t as ListSandboxFleetOptions, An as ReapExpiredSandboxFleetsResult, B as CreateSandboxOptions, Cr as SandboxInfo, Ct as FleetMachineId, Di as TokenRefreshHandler, Dn as PublishPublicTemplateOptions, En as PublicTemplateVersionInfo, F as CreateIntelligenceReportOptions, Gt as IntelligenceReport, I as CreateRequestOptions, Jn as SandboxEnvironment, Kn as SandboxClientConfig, Kt as IntelligenceReportBudget, L as CreateSandboxFleetOptions, Mn as ReconcileSandboxFleetsResult, Ni as UsageInfo, On as PublishPublicTemplateVersionOptions, Or as SandboxProfileSummary, Qn as SandboxFleetCostEstimate, R as CreateSandboxFleetTokenOptions, Sr as SandboxFleetWorkspaceSnapshotResult, St as FleetExecDispatchResult, Tn as PublicTemplateInfo, Tt as FleetPromptDispatchResult, Xn as SandboxFleetArtifact, Yr as SecretsManager, Yt as IntelligenceReportWindow, Zn as SandboxFleetArtifactSpec, _ as BatchResult, _r as SandboxFleetTraceOptions, _t as FleetDispatchCancelResult, a as AttachSandboxFleetMachineOptions, at as ExecResult, bn as PromptResult, br as SandboxFleetWorkspaceReconcileResult, bt as FleetDispatchStreamOptions, dr as SandboxFleetOperationsSummary, en as ListSandboxOptions, er as SandboxFleetDispatchResponse, g as BatchOptions, it as ExecOptions, jn as ReconcileSandboxFleetsOptions, kn as ReapExpiredSandboxFleetsOptions, lr as SandboxFleetManifest, m as BatchEvent, mi as SubscriptionInfo, mr as SandboxFleetTraceBundle, pr as SandboxFleetToken, qt as IntelligenceReportCompareTo, rr as SandboxFleetInfo, sr as SandboxFleetMachineRecord, tr as SandboxFleetDriverCapability, ui as SshKeysManager, v as BatchRunOptions, vn as PromptInputPart, vr as SandboxFleetUsage, vt as FleetDispatchResultBuffer, wt as FleetPromptDispatchOptions, x as BatchTask, xr as SandboxFleetWorkspaceRestoreResult, xt as FleetExecDispatchOptions, y as BatchRunRequest, yn as PromptOptions, yt as FleetDispatchResultBufferOptions, z as CreateSandboxFleetWithCoordinatorOptions } from "./types-D2C72ySk.js";
|
|
2
|
+
import { a as TraceExportSink, i as TraceExportResult, n as SandboxInstance, t as HttpClient } from "./sandbox-BRoxCvpS.js";
|
|
3
3
|
|
|
4
4
|
//#region src/lib/sse-parser.d.ts
|
|
5
5
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as encodeTextForWire, i as SANDBOX_PROXY_REQUEST_MAX_BYTES, o as combineAbortSignals, s as encodePromptForWire } from "./runtime-api-
|
|
2
|
-
import { a as NotFoundError, c as SandboxError, d as TimeoutError, f as ValidationError, i as NetworkError, o as PartialFailureError, p as parseErrorResponse, t as AuthError } from "./errors-
|
|
3
|
-
import {
|
|
1
|
+
import { c as encodeTextForWire, i as SANDBOX_PROXY_REQUEST_MAX_BYTES, o as combineAbortSignals, s as encodePromptForWire } from "./runtime-api-kukaWPtF.js";
|
|
2
|
+
import { a as NotFoundError, c as SandboxError, d as TimeoutError, f as ValidationError, i as NetworkError, o as PartialFailureError, p as parseErrorResponse, t as AuthError } from "./errors-Cbs78OlF.js";
|
|
3
|
+
import { d as exportTraceBundle, l as normalizeConnection, m as parseSSEStream, n as normalizeStartupDiagnostics, t as SandboxInstance } from "./sandbox-DaLPTCRA.js";
|
|
4
4
|
//#region src/resources.ts
|
|
5
5
|
/**
|
|
6
6
|
* Compute tiers, ordered smallest → largest. Defined HERE (not imported from
|
|
@@ -326,18 +326,10 @@ var SandboxFleet = class {
|
|
|
326
326
|
return this.requireSandbox(machineId);
|
|
327
327
|
}
|
|
328
328
|
async collectArtifacts(artifacts) {
|
|
329
|
-
const sandboxes = /* @__PURE__ */ new Map();
|
|
330
|
-
const sandboxFor = (machineId) => {
|
|
331
|
-
const existing = sandboxes.get(machineId);
|
|
332
|
-
if (existing) return existing;
|
|
333
|
-
const pending = this.requireSandbox(machineId);
|
|
334
|
-
sandboxes.set(machineId, pending);
|
|
335
|
-
return pending;
|
|
336
|
-
};
|
|
337
329
|
return mapConcurrent(artifacts, Math.min(MAX_CONCURRENT_ARTIFACT_READS, artifacts.length || 1), async (artifact) => {
|
|
338
330
|
assertArtifactPath(artifact.path);
|
|
339
331
|
const machine = this.get(artifact.machineId);
|
|
340
|
-
const content = await (await
|
|
332
|
+
const content = await (await this.requireSandbox(artifact.machineId)).read(artifact.path);
|
|
341
333
|
assertArtifactSize(content, artifact);
|
|
342
334
|
return {
|
|
343
335
|
...artifact,
|
|
@@ -1753,7 +1745,7 @@ var SandboxClient = class {
|
|
|
1753
1745
|
}
|
|
1754
1746
|
if (!response) throw createTimeoutError();
|
|
1755
1747
|
const data = await response.json();
|
|
1756
|
-
const instance =
|
|
1748
|
+
const instance = new SandboxInstance(this, this.parseInfo(data), requestBackend);
|
|
1757
1749
|
if (instance.status === "provisioning" || instance.status === "pending") {
|
|
1758
1750
|
const remainingMs = Math.max(0, deadline - Date.now());
|
|
1759
1751
|
await instance.waitFor("running", {
|
|
@@ -1836,7 +1828,7 @@ var SandboxClient = class {
|
|
|
1836
1828
|
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
1837
1829
|
}
|
|
1838
1830
|
const data = await response.json();
|
|
1839
|
-
return (Array.isArray(data) ? data : data.sandboxes ?? []).map((item) =>
|
|
1831
|
+
return (Array.isArray(data) ? data : data.sandboxes ?? []).map((item) => new SandboxInstance(this, this.parseInfo(item)));
|
|
1840
1832
|
}
|
|
1841
1833
|
/**
|
|
1842
1834
|
* Get a sandbox by ID.
|
|
@@ -1860,7 +1852,7 @@ var SandboxClient = class {
|
|
|
1860
1852
|
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
1861
1853
|
}
|
|
1862
1854
|
const data = await response.json();
|
|
1863
|
-
return
|
|
1855
|
+
return new SandboxInstance(this, this.parseInfo(data));
|
|
1864
1856
|
}
|
|
1865
1857
|
/**
|
|
1866
1858
|
* Get usage information for the account.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "../collaboration-
|
|
1
|
+
import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "../collaboration-DDnuTcZd.js";
|
|
2
2
|
export { CollaborationClient, CollaborationFileBridge, buildCollaborationDocumentId, normalizeCollaborationPath, parseCollaborationDocumentId };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as TimeoutError, i as NetworkError, p as parseErrorResponse } from "./errors-
|
|
1
|
+
import { d as TimeoutError, i as NetworkError, p as parseErrorResponse } from "./errors-Cbs78OlF.js";
|
|
2
2
|
//#region src/collaboration/client.ts
|
|
3
3
|
const DEFAULT_TIMEOUT_MS = 3e4;
|
|
4
4
|
function normalizeBaseUrl(url) {
|
package/dist/core.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as CreateSandboxOptions,
|
|
2
|
-
import { n as SandboxInstance } from "./sandbox-
|
|
3
|
-
import { i as SandboxClient } from "./client-
|
|
4
|
-
import { a as NotFoundError, c as SandboxError, d as ServerError, f as StateError, i as NetworkError, l as SandboxErrorJson, m as ValidationError, n as CapabilityError, o as PartialFailureError, p as TimeoutError, s as QuotaError, t as AuthError, u as SandboxFailureDetail } from "./errors-
|
|
1
|
+
import { B as CreateSandboxOptions, Cr as SandboxInfo, Kn as SandboxClientConfig, Pr as SandboxStatus, at as ExecResult, in as NetworkConfig, it as ExecOptions, ln as PreviewLinkInfo, un as PreviewLinkManager } from "./types-D2C72ySk.js";
|
|
2
|
+
import { n as SandboxInstance } from "./sandbox-BRoxCvpS.js";
|
|
3
|
+
import { i as SandboxClient } from "./client-DBioX_CL.js";
|
|
4
|
+
import { a as NotFoundError, c as SandboxError, d as ServerError, f as StateError, i as NetworkError, l as SandboxErrorJson, m as ValidationError, n as CapabilityError, o as PartialFailureError, p as TimeoutError, s as QuotaError, t as AuthError, u as SandboxFailureDetail } from "./errors-ntvaf0_F.js";
|
|
5
5
|
export { AuthError, CapabilityError, type CreateSandboxOptions, type ExecOptions, type ExecResult, type NetworkConfig, NetworkError, NotFoundError, PartialFailureError, type PreviewLinkInfo, type PreviewLinkManager, QuotaError, SandboxClient as Sandbox, SandboxClient, type SandboxClientConfig, SandboxError, type SandboxErrorJson, type SandboxFailureDetail, type SandboxInfo, SandboxInstance, type SandboxStatus, ServerError, StateError, TimeoutError, ValidationError };
|
package/dist/core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as NotFoundError, c as SandboxError, d as TimeoutError, f as ValidationError, i as NetworkError, l as ServerError, n as CapabilityError, o as PartialFailureError, s as QuotaError, t as AuthError, u as StateError } from "./errors-
|
|
2
|
-
import { t as SandboxInstance } from "./sandbox-
|
|
3
|
-
import { n as SandboxClient } from "./client-
|
|
1
|
+
import { a as NotFoundError, c as SandboxError, d as TimeoutError, f as ValidationError, i as NetworkError, l as ServerError, n as CapabilityError, o as PartialFailureError, s as QuotaError, t as AuthError, u as StateError } from "./errors-Cbs78OlF.js";
|
|
2
|
+
import { t as SandboxInstance } from "./sandbox-DaLPTCRA.js";
|
|
3
|
+
import { n as SandboxClient } from "./client-D_67csnK.js";
|
|
4
4
|
export { AuthError, CapabilityError, NetworkError, NotFoundError, PartialFailureError, QuotaError, SandboxClient as Sandbox, SandboxClient, SandboxError, SandboxInstance, ServerError, StateError, TimeoutError, ValidationError };
|
|
@@ -51,8 +51,8 @@ var NotFoundError = class extends SandboxError {
|
|
|
51
51
|
resourceType;
|
|
52
52
|
/** The resource ID that was not found */
|
|
53
53
|
resourceId;
|
|
54
|
-
constructor(resourceType, resourceId, metadata
|
|
55
|
-
super(
|
|
54
|
+
constructor(resourceType, resourceId, metadata) {
|
|
55
|
+
super(`${resourceType} not found: ${resourceId}`, "NOT_FOUND", 404, metadata);
|
|
56
56
|
this.name = "NotFoundError";
|
|
57
57
|
this.resourceType = resourceType;
|
|
58
58
|
this.resourceId = resourceId;
|
|
@@ -257,7 +257,7 @@ function parseErrorResponse(status, body, context, headers) {
|
|
|
257
257
|
switch (status) {
|
|
258
258
|
case 400: return new ValidationError(message, data.fields, metadata, code);
|
|
259
259
|
case 401: return new AuthError(message, metadata);
|
|
260
|
-
case 404: return new NotFoundError(data.resourceType || "Resource", data.resourceId || "unknown", metadata
|
|
260
|
+
case 404: return new NotFoundError(data.resourceType || "Resource", data.resourceId || "unknown", metadata);
|
|
261
261
|
case 408: return new TimeoutError(data.timeoutMs || 3e4, message, metadata);
|
|
262
262
|
case 409: return new StateError(message, data.currentState || "unknown", data.requiredState, metadata, code);
|
|
263
263
|
case 429: return new QuotaError(data.quotaType || "rate_limit", message, data.current, data.limit, metadata);
|
|
@@ -52,7 +52,7 @@ declare class NotFoundError extends SandboxError {
|
|
|
52
52
|
readonly resourceType: string;
|
|
53
53
|
/** The resource ID that was not found */
|
|
54
54
|
readonly resourceId: string;
|
|
55
|
-
constructor(resourceType: string, resourceId: string, metadata?: SandboxErrorMetadata
|
|
55
|
+
constructor(resourceType: string, resourceId: string, metadata?: SandboxErrorMetadata);
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
58
58
|
* Account quota or rate limit exceeded.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as CreateSandboxOptions } from "./types-
|
|
2
|
-
import { n as SandboxInstance, t as HttpClient } from "./sandbox-
|
|
1
|
+
import { B as CreateSandboxOptions } from "./types-D2C72ySk.js";
|
|
2
|
+
import { n as SandboxInstance, t as HttpClient } from "./sandbox-BRoxCvpS.js";
|
|
3
3
|
|
|
4
4
|
//#region src/tangle/abi.d.ts
|
|
5
5
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { $
|
|
2
|
-
import { C as
|
|
3
|
-
import { a as Team, c as SessionBroadcastEvent, d as SandboxFleetClient, f as ParseSSEStreamOptions, i as SandboxClient, l as SessionBroadcastResult, m as parseSSEStream, n as IntelligenceClient, o as TeamInvitation, p as ParsedSSEEvent, r as InviteTeamMemberOptions, s as TeamMember, t as CreateTeamOptions, u as SandboxFleet } from "./client-
|
|
1
|
+
import { $i as defineAgentProfile, $n as SandboxFleetDispatchFailureClass, $r as SessionBackendCredentials, $t as ListSandboxFleetOptions, A as CodeResult, Ai as UpdateUserOptions, An as ReapExpiredSandboxFleetsResult, Ar as SandboxResources, At as GitConfig, B as CreateSandboxOptions, Bi as AgentProfileCapabilities, Bn as RolloutStartResult, Br as SandboxTraceEvent, Bt as GpuLeaseStatus, C as BatchTaskUsage, Ci as TeeAttestationReport, Cn as ProvisionStatus, Cr as SandboxInfo, Ct as FleetMachineId, Di as TokenRefreshHandler, Dn as PublishPublicTemplateOptions, Dr as SandboxPortPreviewLink, Dt as GitAuth, E as ChunkedUploadResult, Ei as TeePublicKeyResponse, En as PublicTemplateVersionInfo, Er as SandboxPortBinding, Et as GPU_LEASE_PROVIDER_NAMES, F as CreateIntelligenceReportOptions, Fi as WaitForRolloutOptions, Fr as SandboxTerminalCreateOptions, Ft as GpuLeaseCommandResult, G as DispatchPromptOptions, Gi as AgentProfileModelHints, Gn as SSHCredentials, Gr as ScopedTokenScope, Gt as IntelligenceReport, H as CreateTaskSessionOptions, Hi as AgentProfileConnection, Hn as RolloutTurnPart, Hr as SandboxTraceOptions, Ht as HostAgentDriverConfig, I as CreateRequestOptions, Ii as WriteFileOptions, In as Rollout, Ir as SandboxTerminalInfo, It as GpuLeaseExecOptions, J as DownloadProgress, Ji as AgentProfileResourceRef, Jn as SandboxEnvironment, Jr as SecretInfo, Jt as IntelligenceReportSubjectType, K as DispatchedSession, Ki as AgentProfilePermissionValue, Kn as SandboxClientConfig, Kr as SearchMatch, Kt as IntelligenceReportBudget, L as CreateSandboxFleetOptions, Li as WriteManyFile, Ln as RolloutChildResult, Lr as SandboxTerminalManager, Lt as GpuLeaseExecResult, M as CommitTaskSessionOptions, Mi as UploadProgress, Mn as ReconcileSandboxFleetsResult, Mr as SandboxRuntimeProfile, Mt as GitStatus, N as CompletedTurnResult, Ni as UsageInfo, Nn as RenameOptions, Nr as SandboxRuntimeProfileList, Nt as GpuLease, Oi as ToolsConfig, On as PublishPublicTemplateVersionOptions, Or as SandboxProfileSummary, Ot as GitBranch, P as CreateGpuLeaseOptions, Pi as WaitForOptions, Pr as SandboxStatus, Pt as GpuLeaseBilling, Q as DriverType, Qi as AgentSubagentProfile, Qn as SandboxFleetCostEstimate, Qr as SentSessionMessage, Qt as ListOptions, Ri as WriteManyOptions, Rn as RolloutOptions, Rr as SandboxTerminalRequestOptions, Rt as GpuLeaseManager, S as BatchTaskResult, Si as TeeAttestationOptions, Sn as ProvisionResult, Sr as SandboxFleetWorkspaceSnapshotResult, T as ChunkedUploadOptions, Ti as TeePublicKey, Tn as PublicTemplateInfo, Tr as SandboxPermissionsConfig, U as DeleteOptions, Ui as AgentProfileFileMount, Un as RunCodeOptions, Ur as SandboxUser, Ut as HostAgentRuntimeBackend, V as CreateSessionOptions, Vi as AgentProfileConfidential, Vn as RolloutStatus, Vr as SandboxTraceExport, Vt as GpuType, W as DirectoryPermission, Wi as AgentProfileMcpServer, Wn as SSHCommandDescriptor, Wr as ScopedToken, Wt as InstalledTool, X as DriverConfig, Xi as AgentProfileValidationIssue, Xn as SandboxFleetArtifact, Xr as SendSessionMessageOptions, Y as DriveTurnOptions, Yi as AgentProfileResources, Yn as SandboxEvent, Yr as SecretsManager, Yt as IntelligenceReportWindow, Z as DriverInfo, Zi as AgentProfileValidationResult, Zn as SandboxFleetArtifactSpec, Zr as SendSessionMessageRequest, Zt as ListMessagesOptions, _ as BatchResult, _i as TaskSessionChanges, _n as ProcessStatus, _r as SandboxFleetTraceOptions, _t as FleetDispatchCancelResult, a as AttachSandboxFleetMachineOptions, ai as SessionMessageInputPart, an as NetworkManager, ar as SandboxFleetMachine, at as ExecResult, b as BatchSidecarGroup, bi as TaskSessionInfo, bn as PromptResult, br as SandboxFleetWorkspaceReconcileResult, bt as FleetDispatchStreamOptions, c as BackendInfo, ci as SnapshotOptions, cn as PermissionsManager, cr as SandboxFleetMachineSpec, ct as FileReadBatchResult, d as BackendType, di as StartupDiagnostics, dn as Process, dr as SandboxFleetOperationsSummary, dt as FileRenameResult, ea as defineGitHubResource, ei as SessionEventStreamOptions, en as ListSandboxOptions, er as SandboxFleetDispatchResponse, et as EgressManager, f as BatchBackend, fi as StartupOperation, fn as ProcessInfo, fr as SandboxFleetPolicy, ft as FileSystem, g as BatchOptions, gi as TaskResult, gn as ProcessSpawnOptions, gr as SandboxFleetTraceExport, gt as FileWriteResult, h as BatchEventDataMap, hi as TaskOptions, hn as ProcessSignal, hr as SandboxFleetTraceEvent, ht as FileTreeResult, i as AttachGpuLeaseOptions, ii as SessionMessage, in as NetworkConfig, ir as SandboxFleetIntelligenceEnvelope, it as ExecOptions, ji as UploadOptions, jn as ReconcileSandboxFleetsOptions, jr as SandboxRuntimeHealth, jt as GitDiff, ki as TurnDriveResult, kn as ReapExpiredSandboxFleetsOptions, kr as SandboxResourceUsage, kt as GitCommit, l as BackendManager, li as SnapshotResult, ln as PreviewLinkInfo, lr as SandboxFleetManifest, lt as FileReadError, m as BatchEvent, mi as SubscriptionInfo, mn as ProcessManager, mr as SandboxFleetTraceBundle, mt as FileTreeOptions, n as AccessPolicyRule, na as mergeAgentProfiles, ni as SessionInfo, nn as MintScopedTokenOptions, nr as SandboxFleetDriverTimings, nt as EventStreamOptions, o as BackendCapabilities, oi as SessionStatus, on as NonHostAgentDriverConfig, or as SandboxFleetMachineMeteredUsage, ot as FileInfo, p as BatchBackendStats, pi as StorageConfig, pn as ProcessLogEntry, pr as SandboxFleetToken, pt as FileTreeFile, q as DownloadOptions, qi as AgentProfilePrompt, qn as SandboxConnection, qr as SearchOptions, qt as IntelligenceReportCompareTo, r as AddUserOptions, ri as SessionListOptions, rn as MkdirOptions, rr as SandboxFleetInfo, rt as ExactProcessSpawnOptions, s as BackendConfig, si as SnapshotInfo, sn as PermissionLevel, sr as SandboxFleetMachineRecord, st as FileReadBatchOptions, t as AcceleratorKind, ta as defineInlineResource, ti as SessionForkOptions, tn as McpServerConfig, tr as SandboxFleetDriverCapability, tt as EgressPolicy, u as BackendStatus, un as PreviewLinkManager, ur as SandboxFleetManifestMachine, ut as FileReadResult, v as BatchRunOptions, vi as TaskSessionCommitResult, vr as SandboxFleetUsage, vt as FleetDispatchResultBuffer, w as BranchOptions, wi as TeeAttestationResponse, wn as ProvisionStep, wr as SandboxIntelligenceEnvelope, wt as FleetPromptDispatchOptions, x as BatchTask, xi as TaskSessionProfile, xn as ProvisionEvent, xr as SandboxFleetWorkspaceRestoreResult, xt as FleetExecDispatchOptions, y as BatchRunRequest, yi as TaskSessionFileChange, yn as PromptOptions, yr as SandboxFleetWorkspace, yt as FleetDispatchResultBufferOptions, z as CreateSandboxFleetWithCoordinatorOptions, zi as AgentProfile, zn as RolloutScorer, zr as SandboxTraceBundle, zt as GpuLeaseProviderName } from "./types-D2C72ySk.js";
|
|
2
|
+
import { C as SandboxMcpConfig, D as buildSandboxMcpConfig, E as buildControlPlaneMcpConfig, S as SANDBOX_MCP_SERVER_NAME, T as SandboxMcpServerEntry, _ as RespondToPermissionOptions, a as TraceExportSink, b as BuildSandboxMcpConfigOptions, c as otelTraceIdForTangleTrace, d as SandboxSession, f as InteractiveAuthFile, g as InterruptResult, h as InteractiveSessionInfo, i as TraceExportResult, l as toOtelJson, m as InteractiveSessionHost, n as SandboxInstance, o as buildTraceExportPayload, p as InteractiveSessionHandle, r as TraceExportFormat, s as exportTraceBundle, u as SandboxTaskSession, v as StartInteractiveOptions, w as SandboxMcpEndpoint, x as CONTROL_PLANE_MCP_SERVER_NAME, y as BuildControlPlaneMcpConfigOptions } from "./sandbox-BRoxCvpS.js";
|
|
3
|
+
import { a as Team, c as SessionBroadcastEvent, d as SandboxFleetClient, f as ParseSSEStreamOptions, i as SandboxClient, l as SessionBroadcastResult, m as parseSSEStream, n as IntelligenceClient, o as TeamInvitation, p as ParsedSSEEvent, r as InviteTeamMemberOptions, s as TeamMember, t as CreateTeamOptions, u as SandboxFleet } from "./client-DBioX_CL.js";
|
|
4
4
|
import { d as AnyTokenPayload, h as IssueCollaborationTokenOptions, m as CollaborationTokenPayload, p as CollaborationAccess } from "./index-CyHojkuA.js";
|
|
5
5
|
import { _ as CollaborationTransportConfig, a as CollaborationClient, c as CollaborationClientConfig, d as CollaborationDocumentRef, f as CollaborationFileBridgeOptions, g as CollaborationTokenRefreshResponse, h as CollaborationTokenRefreshRequest, i as parseCollaborationDocumentId, l as CollaborationDocumentAdapter, m as CollaborationPermissions, n as buildCollaborationDocumentId, o as CollaborationBootstrapRequest, p as CollaborationFileEvent, r as normalizeCollaborationPath, s as CollaborationBootstrapResponse, t as CollaborationFileBridge, u as CollaborationDocumentChange, v as SaveCollaborationSnapshotRequest, y as SaveCollaborationSnapshotResponse } from "./index-DKzapw-9.js";
|
|
6
|
-
import { a as NotFoundError, c as SandboxError, d as ServerError, f as StateError, i as NetworkError, l as SandboxErrorJson, m as ValidationError, n as CapabilityError, o as PartialFailureError, p as TimeoutError, r as EgressProxyRecoveryError, s as QuotaError, t as AuthError, u as SandboxFailureDetail } from "./errors-
|
|
7
|
-
import { s as TangleSandboxClientConfig, t as TangleSandboxClient } from "./index-
|
|
6
|
+
import { a as NotFoundError, c as SandboxError, d as ServerError, f as StateError, i as NetworkError, l as SandboxErrorJson, m as ValidationError, n as CapabilityError, o as PartialFailureError, p as TimeoutError, r as EgressProxyRecoveryError, s as QuotaError, t as AuthError, u as SandboxFailureDetail } from "./errors-ntvaf0_F.js";
|
|
7
|
+
import { s as TangleSandboxClientConfig, t as TangleSandboxClient } from "./index-Dj8LzvId.js";
|
|
8
8
|
|
|
9
9
|
//#region src/attestation-heartbeat.d.ts
|
|
10
10
|
interface TeeAttestationHeartbeatSample {
|
|
@@ -1386,4 +1386,4 @@ interface RouterEvalMatrixCaseResult {
|
|
|
1386
1386
|
}
|
|
1387
1387
|
declare function runTangleRouterEvalMatrixInSandbox(options: RunTangleRouterEvalMatrixInSandboxOptions): Promise<RunTangleRouterEvalMatrixInSandboxResult>;
|
|
1388
1388
|
//#endregion
|
|
1389
|
-
export { type AcceleratorKind, type AccessPolicyRule, type AddUserOptions, type AgentProfile, type AgentProfileCapabilities, type AgentProfileConnection, type AgentProfileFileMount, type AgentProfileMcpServer, type AgentProfileModelHints, type AgentProfilePermissionValue, type AgentProfilePrompt, type AgentProfileResourceRef, type AgentProfileResources, type AgentProfileSecurityPolicy, type AgentProfileValidationIssue, type AgentProfileValidationResult, type AgentSubagentProfile, type AnyTokenPayload, type AttachGpuLeaseOptions, type AttachSandboxFleetMachineOptions, AuthError, type BackendCapabilities, type BackendConfig, type BackendInfo, type BackendManager, type BackendStatus, type BackendType, type BatchBackend, type BatchBackendStats, type BatchEvent, type BatchEventDataMap, type BatchOptions, type BatchResult, type BatchRunOptions, type BatchRunRequest, type BatchSidecarGroup, type BatchTask, type BatchTaskResult, type BatchTaskUsage, type BranchOptions, type BuildControlPlaneMcpConfigOptions, type BuildProgressEvent, type BuildSandboxMcpConfigOptions, CONTROL_PLANE_MCP_SERVER_NAME, type Capability, CapabilityError, type ChunkedUploadOptions, type ChunkedUploadResult, type CodeResult, type CollaborationAccess, type CollaborationBootstrapRequest, type CollaborationBootstrapResponse, CollaborationClient, type CollaborationClientConfig, type CollaborationDocumentAdapter, type CollaborationDocumentChange, type CollaborationDocumentRef, CollaborationFileBridge, type CollaborationFileBridgeOptions, type CollaborationFileEvent, type CollaborationPermissions, type CollaborationTokenPayload, type CollaborationTokenRefreshRequest, type CollaborationTokenRefreshResponse, type CollaborationTransportConfig, type CommitTaskSessionOptions, type CompletedTurnResult, type ConfidentialSandboxResult, type ConfidentialTeeType, type CreateConfidentialSandboxOptions, type CreateGpuLeaseOptions, type CreateIntelligenceReportOptions, type CreateRequestOptions, type CreateSandboxFleetOptions, type CreateSandboxFleetWithCoordinatorOptions, type CreateSandboxOptions, type CreateSessionOptions, type CreateTaskSessionOptions, type CreateTeamOptions, DEFAULT_SANDBOX_SIZE, type DeleteOptions, type DevServerInfo, type DirectoryPermission, type DispatchPromptOptions, type DispatchedSession, type DownloadOptions, type DownloadProgress, type DriveTurnOptions, type DriverConfig, type DriverInfo, type DriverType, type EgressManager, type EgressPolicy, EgressProxyRecoveryError, type EnsureDevServerOptions, type EventStreamOptions, type ExactProcessSpawnOptions, type ExecOptions, type ExecResult, type FileInfo, type FileReadBatchOptions, type FileReadBatchResult, type FileReadError, type FileReadResult, type FileRenameResult, type FileSystem, type FileTreeFile, type FileTreeOptions, type FileTreeResult, type FileWriteResult, type FleetDispatchCancelResult, type FleetDispatchResultBuffer, type FleetDispatchResultBufferOptions, type FleetDispatchStreamOptions, type FleetExecDispatchOptions, type FleetMachineId, type FleetPromptDispatchOptions, GPU_LEASE_PROVIDER_NAMES, type GitAuth, type GitBranch, type GitCommit, type GitConfig, type GitDiff, type GitStatus, type GpuLease, type GpuLeaseBilling, type GpuLeaseCommandResult, type GpuLeaseExecOptions, type GpuLeaseExecResult, type GpuLeaseManager, type GpuLeaseProviderName, type GpuLeaseStatus, type GpuType, type HostAgentDriverConfig, type HostAgentRuntimeBackend, Image, type ImageBuildClient, type ImageBuildClientConfig, type ImageBuildFetchClient, type ImageBuildOptions, type ImageBuildResult, ImageBuilder, type ImageSpec, type InstalledTool, IntelligenceClient, type IntelligenceReport, type IntelligenceReportBudget, type IntelligenceReportCompareTo, type IntelligenceReportSubjectType, type IntelligenceReportWindow, type InteractiveAuthFile, InteractiveSessionHandle, type InteractiveSessionHost, type InteractiveSessionInfo, type InteractiveSessionStatus, type InterruptResult, type InviteTeamMemberOptions, type IssueCollaborationTokenOptions, type ListMessagesOptions, type ListOptions, type ListSandboxFleetOptions, type ListSandboxOptions, MANAGE_SANDBOXES_PARAMETERS, MANAGE_SANDBOXES_TOOL_NAME, type ManageSandboxesInput, type ManageSandboxesTool, type ManageSandboxesToolOptions, type MaterializeProfileFileMountsOptions, type MaterializeProfileFileMountsResult, type McpServerConfig, type MintScopedTokenOptions, type MkdirOptions, type NetworkConfig, NetworkError, type NetworkManager, type NonHostAgentDriverConfig, NotFoundError, type ParseSSEStreamOptions, type ParsedSSEEvent, PartialFailureError, type PermissionLevel, type PermissionsManager, type PreviewLinkInfo, type PreviewLinkManager, type Process, type ProcessInfo, type ProcessLogEntry, type ProcessManager, type ProcessSignal, type ProcessSpawnOptions, type ProcessStatus, type PromptOptions, type PromptResult, type ProvisionEvent, type ProvisionResult, type ProvisionStatus, type ProvisionStep, type PublicTemplateInfo, type PublicTemplateVersionInfo, type PublishPublicTemplateOptions, type PublishPublicTemplateVersionOptions, QuotaError, type ReapExpiredSandboxFleetsOptions, type ReapExpiredSandboxFleetsResult, type ReconcileSandboxFleetsOptions, type ReconcileSandboxFleetsResult, type RenameOptions, type RespondToPermissionOptions, type Rollout, type RolloutChildResult, type RolloutOptions, type RolloutScorer, type RolloutStartResult, type RolloutStatus, type RolloutTurnPart, type RouterEvalMatrixAgentProfile, type RouterEvalMatrixCaseResult, type RouterEvalMatrixHarness, type RouterEvalMatrixPayload, type RouterEvalMatrixSandboxBox, type RouterEvalMatrixSandboxClient, type RouterEvalMatrixScenario, type RouterEvalMatrixSuiteResponse, type RouterImportedRunResponse, type RouterSearchConfig, type RouterSearchConfigOptions, type RunCodeOptions, type RunTangleRouterEvalMatrixInSandboxOptions, type RunTangleRouterEvalMatrixInSandboxResult, SANDBOX_MCP_SERVER_NAME, SANDBOX_SIZE_PRESETS, SANDBOX_SIZE_PRESET_NAMES, type SSHCommandDescriptor, type SSHCredentials, SandboxClient as Sandbox, SandboxClient, type SandboxClientConfig, type SandboxConnection, type SandboxEnvironment, SandboxError, type SandboxErrorJson, type SandboxEvent, type SandboxFailureDetail, SandboxFleet, type SandboxFleetArtifact, type SandboxFleetArtifactSpec, SandboxFleetClient, type SandboxFleetCostEstimate, type SandboxFleetDispatchFailureClass, type SandboxFleetDispatchResponse, type SandboxFleetDriverCapability, type SandboxFleetDriverTimings, type SandboxFleetInfo, type SandboxFleetIntelligenceEnvelope, type SandboxFleetMachine, type SandboxFleetMachineMeteredUsage, type SandboxFleetMachineRecord, type SandboxFleetMachineSpec, type SandboxFleetManifest, type SandboxFleetManifestMachine, type SandboxFleetOperationsSummary, type SandboxFleetPolicy, type SandboxFleetToken, type SandboxFleetTraceBundle, type SandboxFleetTraceEvent, type SandboxFleetTraceExport, type SandboxFleetTraceOptions, type SandboxFleetUsage, type SandboxFleetWorkspace, type SandboxFleetWorkspaceReconcileResult, type SandboxFleetWorkspaceRestoreResult, type SandboxFleetWorkspaceSnapshotResult, type SandboxInfo, SandboxInstance, type SandboxIntelligenceEnvelope, type SandboxMcpConfig, type SandboxMcpEndpoint, type SandboxMcpServerEntry, type SandboxPermissionsConfig, type SandboxPortBinding, type SandboxPortPreviewLink, type SandboxProfileSummary, type SandboxResourceUsage, type SandboxResources, type SandboxRuntimeHealth, type SandboxRuntimeProfile, type SandboxRuntimeProfileList, SandboxSession, type SandboxSizePreset, type SandboxStatus, SandboxTaskSession, type SandboxTerminalCreateOptions, type SandboxTerminalInfo, type SandboxTerminalManager, type SandboxTerminalRequestOptions, type SandboxTraceBundle, type SandboxTraceEvent, type SandboxTraceExport, type SandboxTraceOptions, type SandboxUser, type SaveCollaborationSnapshotRequest, type SaveCollaborationSnapshotResponse, type ScopedToken, type ScopedTokenScope, type SearchMatch, type SearchOptions, type SecretInfo, type SecretsManager, type SendSessionMessageOptions, type SendSessionMessageRequest, type SentSessionMessage, ServerError, type SessionBackendCredentials, type SessionBroadcastEvent, type SessionBroadcastResult, type SessionEventStreamOptions, type SessionForkOptions, type SessionInfo, type SessionListOptions, type SessionMessage, type SessionMessageInputPart, type SessionStatus, type SnapshotInfo, type SnapshotOptions, type SnapshotResult, type SplitInlineProfileFileMountsResult, type StartInteractiveOptions, type StartupDiagnostics, type StartupOperation, StateError, type StorageConfig, type SubscriptionInfo, TangleSandboxClient, type TangleSandboxClientConfig, type TangleSearchProvider, type TaskOptions, type TaskResult, type TaskSessionChanges, type TaskSessionCommitResult, type TaskSessionFileChange, type TaskSessionInfo, type TaskSessionProfile, type Team, type TeamInvitation, type TeamMember, type TeeAttestationHeartbeat, type TeeAttestationHeartbeatOptions, type TeeAttestationHeartbeatSample, type TeeAttestationOptions, type TeeAttestationReport, type TeeAttestationResponse, type TeePublicKey, type TeePublicKeyResponse, TimeoutError, type TokenRefreshHandler, type ToolsConfig, type TraceExportFormat, type TraceExportResult, type TraceExportSink, type TurnDriveResult, type UpdateUserOptions, type UploadOptions, type UploadProgress, type UsageInfo, ValidationError, type WaitForOptions, type WaitForRolloutOptions, type WriteFileOptions, type WriteManyFile, type WriteManyOptions, agentProfileSchema, applySandboxEventText, buildCollaborationDocumentId, buildControlPlaneMcpConfig, buildSandboxMcpConfig, buildTangleRouterEvalMatrixRequest, buildTangleRouterResponsesWebSearchRequest, buildTangleRouterSearchBackend, buildTangleRouterSearchProfile, buildTraceExportPayload, capabilitySchema, collectAgentResponseText, createConfidentialSandbox, createManageSandboxesTool, defineAgentProfile, defineGitHubResource, defineInlineResource, exportTraceBundle, fetchTangleRouterSearchConfig, generateAttestationNonce, generateDockerfile, getSandboxEventText, materializeProfileFileMounts, mergeAgentProfiles, normalizeCollaborationPath, normalizeRuntimeBackendConfig, otelTraceIdForTangleTrace, parseCollaborationDocumentId, parseSSEStream, resolveSandboxResources, runTangleRouterEvalMatrixInSandbox, sandboxResourcesForSize, serializeForSidecar, splitInlineProfileFileMounts, startTeeAttestationHeartbeat, toOtelJson, validateAgentProfileSecurity, validateDeferredProfileFileMounts };
|
|
1389
|
+
export { type AcceleratorKind, type AccessPolicyRule, type AddUserOptions, type AgentProfile, type AgentProfileCapabilities, type AgentProfileConnection, type AgentProfileFileMount, type AgentProfileMcpServer, type AgentProfileModelHints, type AgentProfilePermissionValue, type AgentProfilePrompt, type AgentProfileResourceRef, type AgentProfileResources, type AgentProfileValidationIssue, type AgentProfileValidationResult, type AgentSubagentProfile, type AnyTokenPayload, type AttachGpuLeaseOptions, type AttachSandboxFleetMachineOptions, AuthError, type BackendCapabilities, type BackendConfig, type BackendInfo, type BackendManager, type BackendStatus, type BackendType, type BatchBackend, type BatchBackendStats, type BatchEvent, type BatchEventDataMap, type BatchOptions, type BatchResult, type BatchRunOptions, type BatchRunRequest, type BatchSidecarGroup, type BatchTask, type BatchTaskResult, type BatchTaskUsage, type BranchOptions, type BuildControlPlaneMcpConfigOptions, type BuildProgressEvent, type BuildSandboxMcpConfigOptions, CONTROL_PLANE_MCP_SERVER_NAME, CapabilityError, type ChunkedUploadOptions, type ChunkedUploadResult, type CodeResult, type CollaborationAccess, type CollaborationBootstrapRequest, type CollaborationBootstrapResponse, CollaborationClient, type CollaborationClientConfig, type CollaborationDocumentAdapter, type CollaborationDocumentChange, type CollaborationDocumentRef, CollaborationFileBridge, type CollaborationFileBridgeOptions, type CollaborationFileEvent, type CollaborationPermissions, type CollaborationTokenPayload, type CollaborationTokenRefreshRequest, type CollaborationTokenRefreshResponse, type CollaborationTransportConfig, type CommitTaskSessionOptions, type CompletedTurnResult, type ConfidentialSandboxResult, type ConfidentialTeeType, type CreateConfidentialSandboxOptions, type CreateGpuLeaseOptions, type CreateIntelligenceReportOptions, type CreateRequestOptions, type CreateSandboxFleetOptions, type CreateSandboxFleetWithCoordinatorOptions, type CreateSandboxOptions, type CreateSessionOptions, type CreateTaskSessionOptions, type CreateTeamOptions, DEFAULT_SANDBOX_SIZE, type DeleteOptions, type DirectoryPermission, type DispatchPromptOptions, type DispatchedSession, type DownloadOptions, type DownloadProgress, type DriveTurnOptions, type DriverConfig, type DriverInfo, type DriverType, type EgressManager, type EgressPolicy, EgressProxyRecoveryError, type EventStreamOptions, type ExactProcessSpawnOptions, type ExecOptions, type ExecResult, type FileInfo, type FileReadBatchOptions, type FileReadBatchResult, type FileReadError, type FileReadResult, type FileRenameResult, type FileSystem, type FileTreeFile, type FileTreeOptions, type FileTreeResult, type FileWriteResult, type FleetDispatchCancelResult, type FleetDispatchResultBuffer, type FleetDispatchResultBufferOptions, type FleetDispatchStreamOptions, type FleetExecDispatchOptions, type FleetMachineId, type FleetPromptDispatchOptions, GPU_LEASE_PROVIDER_NAMES, type GitAuth, type GitBranch, type GitCommit, type GitConfig, type GitDiff, type GitStatus, type GpuLease, type GpuLeaseBilling, type GpuLeaseCommandResult, type GpuLeaseExecOptions, type GpuLeaseExecResult, type GpuLeaseManager, type GpuLeaseProviderName, type GpuLeaseStatus, type GpuType, type HostAgentDriverConfig, type HostAgentRuntimeBackend, Image, type ImageBuildClient, type ImageBuildClientConfig, type ImageBuildFetchClient, type ImageBuildOptions, type ImageBuildResult, ImageBuilder, type ImageSpec, type InstalledTool, IntelligenceClient, type IntelligenceReport, type IntelligenceReportBudget, type IntelligenceReportCompareTo, type IntelligenceReportSubjectType, type IntelligenceReportWindow, type InteractiveAuthFile, InteractiveSessionHandle, type InteractiveSessionHost, type InteractiveSessionInfo, type InterruptResult, type InviteTeamMemberOptions, type IssueCollaborationTokenOptions, type ListMessagesOptions, type ListOptions, type ListSandboxFleetOptions, type ListSandboxOptions, MANAGE_SANDBOXES_PARAMETERS, MANAGE_SANDBOXES_TOOL_NAME, type ManageSandboxesInput, type ManageSandboxesTool, type ManageSandboxesToolOptions, type MaterializeProfileFileMountsOptions, type MaterializeProfileFileMountsResult, type McpServerConfig, type MintScopedTokenOptions, type MkdirOptions, type NetworkConfig, NetworkError, type NetworkManager, type NonHostAgentDriverConfig, NotFoundError, type ParseSSEStreamOptions, type ParsedSSEEvent, PartialFailureError, type PermissionLevel, type PermissionsManager, type PreviewLinkInfo, type PreviewLinkManager, type Process, type ProcessInfo, type ProcessLogEntry, type ProcessManager, type ProcessSignal, type ProcessSpawnOptions, type ProcessStatus, type PromptOptions, type PromptResult, type ProvisionEvent, type ProvisionResult, type ProvisionStatus, type ProvisionStep, type PublicTemplateInfo, type PublicTemplateVersionInfo, type PublishPublicTemplateOptions, type PublishPublicTemplateVersionOptions, QuotaError, type ReapExpiredSandboxFleetsOptions, type ReapExpiredSandboxFleetsResult, type ReconcileSandboxFleetsOptions, type ReconcileSandboxFleetsResult, type RenameOptions, type RespondToPermissionOptions, type Rollout, type RolloutChildResult, type RolloutOptions, type RolloutScorer, type RolloutStartResult, type RolloutStatus, type RolloutTurnPart, type RouterEvalMatrixAgentProfile, type RouterEvalMatrixCaseResult, type RouterEvalMatrixHarness, type RouterEvalMatrixPayload, type RouterEvalMatrixSandboxBox, type RouterEvalMatrixSandboxClient, type RouterEvalMatrixScenario, type RouterEvalMatrixSuiteResponse, type RouterImportedRunResponse, type RouterSearchConfig, type RouterSearchConfigOptions, type RunCodeOptions, type RunTangleRouterEvalMatrixInSandboxOptions, type RunTangleRouterEvalMatrixInSandboxResult, SANDBOX_MCP_SERVER_NAME, SANDBOX_SIZE_PRESETS, SANDBOX_SIZE_PRESET_NAMES, type SSHCommandDescriptor, type SSHCredentials, SandboxClient as Sandbox, SandboxClient, type SandboxClientConfig, type SandboxConnection, type SandboxEnvironment, SandboxError, type SandboxErrorJson, type SandboxEvent, type SandboxFailureDetail, SandboxFleet, type SandboxFleetArtifact, type SandboxFleetArtifactSpec, SandboxFleetClient, type SandboxFleetCostEstimate, type SandboxFleetDispatchFailureClass, type SandboxFleetDispatchResponse, type SandboxFleetDriverCapability, type SandboxFleetDriverTimings, type SandboxFleetInfo, type SandboxFleetIntelligenceEnvelope, type SandboxFleetMachine, type SandboxFleetMachineMeteredUsage, type SandboxFleetMachineRecord, type SandboxFleetMachineSpec, type SandboxFleetManifest, type SandboxFleetManifestMachine, type SandboxFleetOperationsSummary, type SandboxFleetPolicy, type SandboxFleetToken, type SandboxFleetTraceBundle, type SandboxFleetTraceEvent, type SandboxFleetTraceExport, type SandboxFleetTraceOptions, type SandboxFleetUsage, type SandboxFleetWorkspace, type SandboxFleetWorkspaceReconcileResult, type SandboxFleetWorkspaceRestoreResult, type SandboxFleetWorkspaceSnapshotResult, type SandboxInfo, SandboxInstance, type SandboxIntelligenceEnvelope, type SandboxMcpConfig, type SandboxMcpEndpoint, type SandboxMcpServerEntry, type SandboxPermissionsConfig, type SandboxPortBinding, type SandboxPortPreviewLink, type SandboxProfileSummary, type SandboxResourceUsage, type SandboxResources, type SandboxRuntimeHealth, type SandboxRuntimeProfile, type SandboxRuntimeProfileList, SandboxSession, type SandboxSizePreset, type SandboxStatus, SandboxTaskSession, type SandboxTerminalCreateOptions, type SandboxTerminalInfo, type SandboxTerminalManager, type SandboxTerminalRequestOptions, type SandboxTraceBundle, type SandboxTraceEvent, type SandboxTraceExport, type SandboxTraceOptions, type SandboxUser, type SaveCollaborationSnapshotRequest, type SaveCollaborationSnapshotResponse, type ScopedToken, type ScopedTokenScope, type SearchMatch, type SearchOptions, type SecretInfo, type SecretsManager, type SendSessionMessageOptions, type SendSessionMessageRequest, type SentSessionMessage, ServerError, type SessionBackendCredentials, type SessionBroadcastEvent, type SessionBroadcastResult, type SessionEventStreamOptions, type SessionForkOptions, type SessionInfo, type SessionListOptions, type SessionMessage, type SessionMessageInputPart, type SessionStatus, type SnapshotInfo, type SnapshotOptions, type SnapshotResult, type SplitInlineProfileFileMountsResult, type StartInteractiveOptions, type StartupDiagnostics, type StartupOperation, StateError, type StorageConfig, type SubscriptionInfo, TangleSandboxClient, type TangleSandboxClientConfig, type TangleSearchProvider, type TaskOptions, type TaskResult, type TaskSessionChanges, type TaskSessionCommitResult, type TaskSessionFileChange, type TaskSessionInfo, type TaskSessionProfile, type Team, type TeamInvitation, type TeamMember, type TeeAttestationHeartbeat, type TeeAttestationHeartbeatOptions, type TeeAttestationHeartbeatSample, type TeeAttestationOptions, type TeeAttestationReport, type TeeAttestationResponse, type TeePublicKey, type TeePublicKeyResponse, TimeoutError, type TokenRefreshHandler, type ToolsConfig, type TraceExportFormat, type TraceExportResult, type TraceExportSink, type TurnDriveResult, type UpdateUserOptions, type UploadOptions, type UploadProgress, type UsageInfo, ValidationError, type WaitForOptions, type WaitForRolloutOptions, type WriteFileOptions, type WriteManyFile, type WriteManyOptions, applySandboxEventText, buildCollaborationDocumentId, buildControlPlaneMcpConfig, buildSandboxMcpConfig, buildTangleRouterEvalMatrixRequest, buildTangleRouterResponsesWebSearchRequest, buildTangleRouterSearchBackend, buildTangleRouterSearchProfile, buildTraceExportPayload, collectAgentResponseText, createConfidentialSandbox, createManageSandboxesTool, defineAgentProfile, defineGitHubResource, defineInlineResource, exportTraceBundle, fetchTangleRouterSearchConfig, generateAttestationNonce, generateDockerfile, getSandboxEventText, materializeProfileFileMounts, mergeAgentProfiles, normalizeCollaborationPath, normalizeRuntimeBackendConfig, otelTraceIdForTangleTrace, parseCollaborationDocumentId, parseSSEStream, resolveSandboxResources, runTangleRouterEvalMatrixInSandbox, sandboxResourcesForSize, serializeForSidecar, splitInlineProfileFileMounts, startTeeAttestationHeartbeat, toOtelJson, validateDeferredProfileFileMounts };
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as NotFoundError, c as SandboxError, d as TimeoutError, f as ValidationError, i as NetworkError, l as ServerError, n as CapabilityError, o as PartialFailureError, r as EgressProxyRecoveryError, s as QuotaError, t as AuthError, u as StateError } from "./errors-
|
|
3
|
-
import { a as
|
|
4
|
-
import { a as validateDeferredProfileFileMounts, c as DEFAULT_SANDBOX_SIZE, d as resolveSandboxResources, f as sandboxResourcesForSize, i as splitInlineProfileFileMounts, l as SANDBOX_SIZE_PRESETS, n as SandboxClient, o as SandboxFleet, r as materializeProfileFileMounts, s as SandboxFleetClient, t as IntelligenceClient, u as SANDBOX_SIZE_PRESET_NAMES } from "./client-
|
|
5
|
-
import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-
|
|
6
|
-
import { t as TangleSandboxClient } from "./tangle-
|
|
7
|
-
import {
|
|
1
|
+
import { l as normalizeRuntimeBackendConfig, u as serializeForSidecar } from "./runtime-api-kukaWPtF.js";
|
|
2
|
+
import { a as NotFoundError, c as SandboxError, d as TimeoutError, f as ValidationError, i as NetworkError, l as ServerError, n as CapabilityError, o as PartialFailureError, r as EgressProxyRecoveryError, s as QuotaError, t as AuthError, u as StateError } from "./errors-Cbs78OlF.js";
|
|
3
|
+
import { a as InteractiveSessionHandle, c as getSandboxEventText, d as exportTraceBundle, f as otelTraceIdForTangleTrace, i as SandboxSession, m as parseSSEStream, o as applySandboxEventText, p as toOtelJson, r as SandboxTaskSession, s as collectAgentResponseText, t as SandboxInstance, u as buildTraceExportPayload } from "./sandbox-DaLPTCRA.js";
|
|
4
|
+
import { a as validateDeferredProfileFileMounts, c as DEFAULT_SANDBOX_SIZE, d as resolveSandboxResources, f as sandboxResourcesForSize, i as splitInlineProfileFileMounts, l as SANDBOX_SIZE_PRESETS, n as SandboxClient, o as SandboxFleet, r as materializeProfileFileMounts, s as SandboxFleetClient, t as IntelligenceClient, u as SANDBOX_SIZE_PRESET_NAMES } from "./client-D_67csnK.js";
|
|
5
|
+
import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-DDnuTcZd.js";
|
|
6
|
+
import { t as TangleSandboxClient } from "./tangle-DHOkbr5a.js";
|
|
7
|
+
import { defineAgentProfile, defineGitHubResource, defineInlineResource, mergeAgentProfiles } from "@tangle-network/agent-interface";
|
|
8
8
|
//#region src/confidential.ts
|
|
9
9
|
function generateAttestationNonce(bytes = 32) {
|
|
10
10
|
const buffer = new Uint8Array(bytes);
|
|
@@ -1454,4 +1454,4 @@ function stripUndefined(value) {
|
|
|
1454
1454
|
return Object.fromEntries(Object.entries(value).filter(([, v]) => v !== void 0).map(([k, v]) => [k, stripUndefined(v)]));
|
|
1455
1455
|
}
|
|
1456
1456
|
//#endregion
|
|
1457
|
-
export { AuthError, CONTROL_PLANE_MCP_SERVER_NAME, CapabilityError, CollaborationClient, CollaborationFileBridge, DEFAULT_SANDBOX_SIZE, EgressProxyRecoveryError, GPU_LEASE_PROVIDER_NAMES, Image, ImageBuilder, IntelligenceClient, InteractiveSessionHandle, MANAGE_SANDBOXES_PARAMETERS, MANAGE_SANDBOXES_TOOL_NAME, NetworkError, NotFoundError, PartialFailureError, QuotaError, SANDBOX_MCP_SERVER_NAME, SANDBOX_SIZE_PRESETS, SANDBOX_SIZE_PRESET_NAMES, SandboxClient as Sandbox, SandboxClient, SandboxError, SandboxFleet, SandboxFleetClient, SandboxInstance, SandboxSession, SandboxTaskSession, ServerError, StateError, TangleSandboxClient, TimeoutError, ValidationError,
|
|
1457
|
+
export { AuthError, CONTROL_PLANE_MCP_SERVER_NAME, CapabilityError, CollaborationClient, CollaborationFileBridge, DEFAULT_SANDBOX_SIZE, EgressProxyRecoveryError, GPU_LEASE_PROVIDER_NAMES, Image, ImageBuilder, IntelligenceClient, InteractiveSessionHandle, MANAGE_SANDBOXES_PARAMETERS, MANAGE_SANDBOXES_TOOL_NAME, NetworkError, NotFoundError, PartialFailureError, QuotaError, SANDBOX_MCP_SERVER_NAME, SANDBOX_SIZE_PRESETS, SANDBOX_SIZE_PRESET_NAMES, SandboxClient as Sandbox, SandboxClient, SandboxError, SandboxFleet, SandboxFleetClient, SandboxInstance, SandboxSession, SandboxTaskSession, ServerError, StateError, TangleSandboxClient, TimeoutError, ValidationError, applySandboxEventText, buildCollaborationDocumentId, buildControlPlaneMcpConfig, buildSandboxMcpConfig, buildTangleRouterEvalMatrixRequest, buildTangleRouterResponsesWebSearchRequest, buildTangleRouterSearchBackend, buildTangleRouterSearchProfile, buildTraceExportPayload, collectAgentResponseText, createConfidentialSandbox, createManageSandboxesTool, defineAgentProfile, defineGitHubResource, defineInlineResource, exportTraceBundle, fetchTangleRouterSearchConfig, generateAttestationNonce, generateDockerfile, getSandboxEventText, materializeProfileFileMounts, mergeAgentProfiles, normalizeCollaborationPath, normalizeRuntimeBackendConfig, otelTraceIdForTangleTrace, parseCollaborationDocumentId, parseSSEStream, resolveSandboxResources, runTangleRouterEvalMatrixInSandbox, sandboxResourcesForSize, serializeForSidecar, splitInlineProfileFileMounts, startTeeAttestationHeartbeat, toOtelJson, validateDeferredProfileFileMounts };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as TimeoutError, i as NetworkError, p as parseErrorResponse } from "../errors-
|
|
1
|
+
import { d as TimeoutError, i as NetworkError, p as parseErrorResponse } from "../errors-Cbs78OlF.js";
|
|
2
2
|
//#region src/intelligence/index.ts
|
|
3
3
|
/**
|
|
4
4
|
* `@tangle-network/sandbox/intelligence` — browser-safe typed client for the
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c as SandboxError, d as TimeoutError, f as ValidationError, i as NetworkError, l as ServerError, p as parseErrorResponse, s as QuotaError } from "./errors-
|
|
1
|
+
import { c as SandboxError, d as TimeoutError, f as ValidationError, i as NetworkError, l as ServerError, p as parseErrorResponse, s as QuotaError } from "./errors-Cbs78OlF.js";
|
|
2
2
|
//#region src/backend-config.ts
|
|
3
3
|
const LEGACY_QUESTION_ALIAS_KEY = ["question", "Channel"].join("");
|
|
4
|
-
function
|
|
4
|
+
function parseModelString(model) {
|
|
5
5
|
const parts = model.split("/");
|
|
6
6
|
if (parts.length >= 2) return {
|
|
7
7
|
provider: parts[0],
|
|
@@ -24,7 +24,7 @@ function normalizeRuntimeBackendConfig(backend, options = {}) {
|
|
|
24
24
|
...backend?.type ? { type: backend.type } : {},
|
|
25
25
|
...backend?.profile !== void 0 ? { profile: backend.profile } : {},
|
|
26
26
|
...callerInlineProfile !== void 0 ? { inlineProfile: callerInlineProfile } : {},
|
|
27
|
-
...backend?.model ? { model: backend.model } : options.model ? { model:
|
|
27
|
+
...backend?.model ? { model: backend.model } : options.model ? { model: parseModelString(options.model) } : {},
|
|
28
28
|
...backend?.server ? { server: backend.server } : {},
|
|
29
29
|
...backend?.interactions !== void 0 ? { interactions: backend.interactions } : {},
|
|
30
30
|
...backend?.metadata !== void 0 ? { metadata: backend.metadata } : {}
|
|
@@ -192,7 +192,7 @@ function sizeOfInput(data) {
|
|
|
192
192
|
* always-accepted buffer type.
|
|
193
193
|
*/
|
|
194
194
|
async function normalizeToBytes(data) {
|
|
195
|
-
if (typeof data === "string") return new
|
|
195
|
+
if (typeof data === "string") return new TextEncoder().encode(data);
|
|
196
196
|
if (data instanceof ArrayBuffer) return new Uint8Array(data.slice(0));
|
|
197
197
|
if (ArrayBuffer.isView(data)) {
|
|
198
198
|
const copy = new Uint8Array(data.byteLength);
|
|
@@ -665,7 +665,6 @@ function normalizeSessionInfo(raw) {
|
|
|
665
665
|
"failed",
|
|
666
666
|
"cancelled"
|
|
667
667
|
].includes(status) ? status : "running",
|
|
668
|
-
latestExecutionId: typeof raw.latestExecutionId === "string" && raw.latestExecutionId.length > 0 ? raw.latestExecutionId : void 0,
|
|
669
668
|
backend: typeof raw.backendType === "string" ? raw.backendType : typeof raw.backend === "string" ? raw.backend : void 0,
|
|
670
669
|
model: typeof raw.model === "string" ? raw.model : void 0,
|
|
671
670
|
promptCount: typeof raw.promptCount === "number" ? raw.promptCount : void 0,
|
|
@@ -676,4 +675,4 @@ function normalizeSessionInfo(raw) {
|
|
|
676
675
|
};
|
|
677
676
|
}
|
|
678
677
|
//#endregion
|
|
679
|
-
export { FILE_DECODED_WRITE_MAX_BYTES as a, encodeTextForWire as c,
|
|
678
|
+
export { FILE_DECODED_WRITE_MAX_BYTES as a, encodeTextForWire as c, SANDBOX_PROXY_REQUEST_MAX_BYTES as i, normalizeRuntimeBackendConfig as l, normalizeSessionInfo as n, combineAbortSignals as o, uploadChunked as r, encodePromptForWire as s, SandboxRuntimeApi as t, serializeForSidecar as u };
|
package/dist/runtime.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as NotFoundError, c as SandboxError, d as ServerError, f as StateError, i as NetworkError, l as SandboxErrorJson, m as ValidationError, n as CapabilityError, o as PartialFailureError, p as TimeoutError, s as QuotaError, t as AuthError, u as SandboxFailureDetail } from "./errors-
|
|
1
|
+
import { E as ChunkedUploadResult, Er as SandboxPortBinding, Fr as SandboxTerminalCreateOptions, H as CreateTaskSessionOptions, Ii as WriteFileOptions, Ir as SandboxTerminalInfo, Lr as SandboxTerminalManager, M as CommitTaskSessionOptions, Mi as UploadProgress, Nn as RenameOptions, Nr as SandboxRuntimeProfileList, Qr as SentSessionMessage, Rr as SandboxTerminalRequestOptions, T as ChunkedUploadOptions, V as CreateSessionOptions, Xr as SendSessionMessageOptions, Zr as SendSessionMessageRequest, Zt as ListMessagesOptions, _i as TaskSessionChanges, bi as TaskSessionInfo, ct as FileReadBatchResult, dt as FileRenameResult, gt as FileWriteResult, ht as FileTreeResult, ii as SessionMessage, jr as SandboxRuntimeHealth, mt as FileTreeOptions, ni as SessionInfo, st as FileReadBatchOptions, vi as TaskSessionCommitResult } from "./types-D2C72ySk.js";
|
|
2
|
+
import { a as NotFoundError, c as SandboxError, d as ServerError, f as StateError, i as NetworkError, l as SandboxErrorJson, m as ValidationError, n as CapabilityError, o as PartialFailureError, p as TimeoutError, s as QuotaError, t as AuthError, u as SandboxFailureDetail } from "./errors-ntvaf0_F.js";
|
|
3
3
|
|
|
4
4
|
//#region src/lib/chunked-upload.d.ts
|
|
5
5
|
/** The transport a caller wires this module to — {@link SandboxInstance.runtimeFetch}
|
package/dist/runtime.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { o as combineAbortSignals, r as uploadChunked, t as SandboxRuntimeApi } from "./runtime-api-
|
|
2
|
-
import { a as NotFoundError, c as SandboxError, d as TimeoutError, f as ValidationError, i as NetworkError, l as ServerError, n as CapabilityError, o as PartialFailureError, s as QuotaError, t as AuthError, u as StateError } from "./errors-
|
|
1
|
+
import { o as combineAbortSignals, r as uploadChunked, t as SandboxRuntimeApi } from "./runtime-api-kukaWPtF.js";
|
|
2
|
+
import { a as NotFoundError, c as SandboxError, d as TimeoutError, f as ValidationError, i as NetworkError, l as ServerError, n as CapabilityError, o as PartialFailureError, s as QuotaError, t as AuthError, u as StateError } from "./errors-Cbs78OlF.js";
|
|
3
3
|
//#region src/runtime-client.ts
|
|
4
4
|
const DEFAULT_RUNTIME_TIMEOUT_MS = 3e4;
|
|
5
5
|
function requireToken(token) {
|