@tangle-network/sandbox 0.1.2 → 0.2.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.
@@ -0,0 +1,262 @@
1
+ //#region src/errors.ts
2
+ /**
3
+ * Sandbox SDK Errors
4
+ *
5
+ * Error classes for the Sandbox client SDK.
6
+ */
7
+ /**
8
+ * Base error class for all Sandbox SDK errors.
9
+ */
10
+ var SandboxError = class extends Error {
11
+ /** HTTP status code if applicable */
12
+ status;
13
+ /** Error code for programmatic handling */
14
+ code;
15
+ /** Best-effort origin of the failing request */
16
+ origin;
17
+ /** Request path or endpoint when known */
18
+ endpoint;
19
+ /** Retry-after duration in ms when surfaced by the upstream */
20
+ retryAfterMs;
21
+ /** Sidecar version when the runtime emitted it */
22
+ sidecarVersion;
23
+ /** Sidecar image/tag/sha when the runtime emitted it */
24
+ containerImage;
25
+ constructor(message, code, status, metadata) {
26
+ super(message);
27
+ this.name = "SandboxError";
28
+ this.code = code;
29
+ this.status = status;
30
+ this.origin = metadata?.origin;
31
+ this.endpoint = metadata?.endpoint;
32
+ this.retryAfterMs = metadata?.retryAfterMs;
33
+ this.sidecarVersion = metadata?.sidecarVersion;
34
+ this.containerImage = metadata?.containerImage;
35
+ }
36
+ };
37
+ /**
38
+ * Authentication failed or API key is invalid.
39
+ */
40
+ var AuthError = class extends SandboxError {
41
+ constructor(message = "Authentication failed", metadata) {
42
+ super(message, "AUTH_ERROR", 401, metadata);
43
+ this.name = "AuthError";
44
+ }
45
+ };
46
+ /**
47
+ * The requested resource was not found.
48
+ */
49
+ var NotFoundError = class extends SandboxError {
50
+ /** The resource type that was not found */
51
+ resourceType;
52
+ /** The resource ID that was not found */
53
+ resourceId;
54
+ constructor(resourceType, resourceId, metadata) {
55
+ super(`${resourceType} not found: ${resourceId}`, "NOT_FOUND", 404, metadata);
56
+ this.name = "NotFoundError";
57
+ this.resourceType = resourceType;
58
+ this.resourceId = resourceId;
59
+ }
60
+ };
61
+ /**
62
+ * Account quota or rate limit exceeded.
63
+ */
64
+ var QuotaError = class extends SandboxError {
65
+ /** The type of quota that was exceeded */
66
+ quotaType;
67
+ /** Current usage */
68
+ current;
69
+ /** Maximum allowed */
70
+ limit;
71
+ /** Suggested retry-after duration in ms */
72
+ retryAfterMs;
73
+ constructor(quotaType, message, current, limit, metadata, status = 429) {
74
+ super(message ?? `Quota exceeded: ${quotaType}`, "QUOTA_EXCEEDED", status, metadata);
75
+ this.name = "QuotaError";
76
+ this.quotaType = quotaType;
77
+ this.current = current;
78
+ this.limit = limit;
79
+ this.retryAfterMs = metadata?.retryAfterMs;
80
+ }
81
+ };
82
+ /**
83
+ * The requested capability is unavailable for the account, driver, or sandbox.
84
+ */
85
+ var CapabilityError = class extends SandboxError {
86
+ /** Capability or feature that was rejected when known */
87
+ capability;
88
+ constructor(message, code = "CAPABILITY_UNSUPPORTED", status = 400, metadata, capability) {
89
+ super(message, code, status, metadata);
90
+ this.name = "CapabilityError";
91
+ this.capability = capability;
92
+ }
93
+ };
94
+ /**
95
+ * A multi-resource operation failed for one or more branches.
96
+ */
97
+ var PartialFailureError = class extends SandboxError {
98
+ /** Per-resource failures returned by the API when available */
99
+ failures;
100
+ constructor(message, code = "PARTIAL_FAILURE", status = 502, metadata, failures) {
101
+ super(message, code, status, metadata);
102
+ this.name = "PartialFailureError";
103
+ this.failures = failures;
104
+ }
105
+ };
106
+ /**
107
+ * The request was invalid or malformed.
108
+ */
109
+ var ValidationError = class extends SandboxError {
110
+ /** Field-level validation errors */
111
+ fields;
112
+ constructor(message, fields, metadata) {
113
+ super(message, "VALIDATION_ERROR", 400, metadata);
114
+ this.name = "ValidationError";
115
+ this.fields = fields;
116
+ }
117
+ };
118
+ /**
119
+ * The sandbox is not in a valid state for the requested operation.
120
+ */
121
+ var StateError = class extends SandboxError {
122
+ /** Current state of the sandbox */
123
+ currentState;
124
+ /** Required state for the operation */
125
+ requiredState;
126
+ constructor(message, currentState, requiredState, metadata) {
127
+ super(message, "INVALID_STATE", 409, metadata);
128
+ this.name = "StateError";
129
+ this.currentState = currentState;
130
+ this.requiredState = requiredState;
131
+ }
132
+ };
133
+ /**
134
+ * The request timed out.
135
+ */
136
+ var TimeoutError = class extends SandboxError {
137
+ /** Timeout duration in milliseconds */
138
+ timeoutMs;
139
+ constructor(timeoutMs, message, metadata) {
140
+ super(message ?? `Request timed out after ${timeoutMs}ms`, "TIMEOUT", 408, metadata);
141
+ this.name = "TimeoutError";
142
+ this.timeoutMs = timeoutMs;
143
+ }
144
+ };
145
+ /**
146
+ * A network or connection error occurred.
147
+ */
148
+ var NetworkError = class extends SandboxError {
149
+ /** The underlying error */
150
+ cause;
151
+ constructor(message, causeOrMetadata, metadata) {
152
+ const cause = causeOrMetadata instanceof Error ? causeOrMetadata : void 0;
153
+ const resolvedMetadata = causeOrMetadata instanceof Error ? metadata : causeOrMetadata ?? metadata;
154
+ super(message, "NETWORK_ERROR", void 0, resolvedMetadata);
155
+ this.name = "NetworkError";
156
+ this.cause = cause;
157
+ }
158
+ };
159
+ /**
160
+ * The server returned an unexpected error.
161
+ */
162
+ var ServerError = class extends SandboxError {
163
+ constructor(message, status = 500, metadata) {
164
+ super(message, "SERVER_ERROR", status, metadata);
165
+ this.name = "ServerError";
166
+ }
167
+ };
168
+ function parseRetryAfterMs(rawValue, data) {
169
+ if (typeof data.retryAfterMs === "number" && Number.isFinite(data.retryAfterMs)) return Math.max(0, data.retryAfterMs);
170
+ if (!rawValue) return void 0;
171
+ const trimmed = rawValue.trim();
172
+ if (!trimmed) return void 0;
173
+ const seconds = Number(trimmed);
174
+ if (Number.isFinite(seconds)) return Math.max(0, seconds) * 1e3;
175
+ const targetTs = Date.parse(trimmed);
176
+ if (!Number.isNaN(targetTs)) return Math.max(0, targetTs - Date.now());
177
+ }
178
+ function inferOrigin(headers, context) {
179
+ const derivedPath = context?.path ?? headers?.get("x-tangle-request-path") ?? void 0;
180
+ if (!headers) return context?.path ? "sandbox-api" : void 0;
181
+ if (headers.has("x-sidecar-version") || headers.has("x-sidecar-image") || headers.has("x-sidecar-image-tag")) return "sidecar";
182
+ if (headers.has("x-orchestrator-version")) return "control-plane";
183
+ if (derivedPath?.startsWith("/v1/")) return "sandbox-api";
184
+ if (derivedPath) {
185
+ if (derivedPath.startsWith("/projects") || derivedPath.startsWith("/sidecars") || derivedPath.startsWith("/instances")) return "control-plane";
186
+ return "runtime";
187
+ }
188
+ return "unknown";
189
+ }
190
+ function isQuotaCode(code) {
191
+ return code === "QUOTA_EXCEEDED" || code?.endsWith("_QUOTA_EXCEEDED") === true;
192
+ }
193
+ function isCapabilityCode(code) {
194
+ return code === "CAPABILITY_NOT_ENABLED" || code === "CAPABILITY_UNSUPPORTED" || code === "UNSUPPORTED_CAPABILITY" || code === "FLEET_SHARED_WORKSPACE_UNSUPPORTED" || code === "SHARED_WORKSPACE_UNSUPPORTED";
195
+ }
196
+ function isPartialFailureCode(code) {
197
+ return code === "PARTIAL_FAILURE" || code === "FLEET_PARTIAL_FAILURE" || code === "FLEET_DISPATCH_PARTIAL_FAILURE" || code === "FLEET_DEPROVISION_FAILED";
198
+ }
199
+ function asString(value) {
200
+ return typeof value === "string" && value.trim().length > 0 ? value : void 0;
201
+ }
202
+ function isFailureDetail(value) {
203
+ return typeof value === "object" && value !== null && !Array.isArray(value);
204
+ }
205
+ function readCapability(data, errorObj) {
206
+ const nested = typeof errorObj === "object" && errorObj !== null ? asString(errorObj.capability) : void 0;
207
+ return asString(data.capability) ?? nested;
208
+ }
209
+ function readFailures(data, errorObj) {
210
+ if (Array.isArray(data.failures)) return data.failures.filter(isFailureDetail);
211
+ if (Array.isArray(data.results)) {
212
+ const failures = data.results.filter((result) => typeof result === "object" && result !== null && result.ok === false);
213
+ if (failures.length > 0) return failures.filter(isFailureDetail);
214
+ }
215
+ if (typeof errorObj === "object" && errorObj !== null && Array.isArray(errorObj.failures)) return errorObj.failures.filter(isFailureDetail);
216
+ }
217
+ /**
218
+ * Parse an error response from the API.
219
+ * @param status - HTTP status code
220
+ * @param body - Response body text
221
+ * @param context - Optional request context for better error messages
222
+ */
223
+ function parseErrorResponse(status, body, context, headers) {
224
+ let data;
225
+ try {
226
+ data = JSON.parse(body);
227
+ } catch {
228
+ data = { message: body };
229
+ }
230
+ const errorObj = data.error;
231
+ const nestedMessage = typeof errorObj === "object" && errorObj !== null ? errorObj.message : void 0;
232
+ const nestedCode = typeof errorObj === "object" && errorObj !== null ? errorObj.code : void 0;
233
+ const baseMessage = data.message || nestedMessage || (typeof errorObj === "string" ? errorObj : void 0) || body || "Unknown error";
234
+ const details = typeof data.details === "string" && data.details.trim().length > 0 ? data.details.trim() : void 0;
235
+ const shouldAppendDetails = !!details && details !== baseMessage && (baseMessage === "Unknown error" || /^failed\b/i.test(baseMessage) || /^provision failed\b/i.test(baseMessage) || /^deprovision failed\b/i.test(baseMessage));
236
+ const code = data.code || nestedCode;
237
+ const message = `${context ? `${context.method ?? "REQUEST"} ${context.path ?? ""}: ` : ""}${shouldAppendDetails ? `${baseMessage}: ${details}` : baseMessage}`;
238
+ const metadata = {
239
+ origin: inferOrigin(headers, context),
240
+ endpoint: context?.path ?? headers?.get("x-tangle-request-path") ?? void 0,
241
+ retryAfterMs: parseRetryAfterMs(headers?.get("retry-after") ?? void 0, data),
242
+ sidecarVersion: headers?.get("x-sidecar-version") ?? void 0,
243
+ containerImage: headers?.get("x-sidecar-image") ?? headers?.get("x-sidecar-image-tag") ?? void 0
244
+ };
245
+ if (isQuotaCode(code)) return new QuotaError(data.quotaType || "rate_limit", message, data.current, data.limit, metadata, status);
246
+ if (isCapabilityCode(code)) return new CapabilityError(message, code, status, metadata, readCapability(data, errorObj));
247
+ if (isPartialFailureCode(code)) return new PartialFailureError(message, code, status, metadata, readFailures(data, errorObj));
248
+ switch (status) {
249
+ case 400: return new ValidationError(message, data.fields, metadata);
250
+ case 401: return new AuthError(message, metadata);
251
+ case 404: return new NotFoundError(data.resourceType || "Resource", data.resourceId || "unknown", metadata);
252
+ case 408: return new TimeoutError(data.timeoutMs || 3e4, message, metadata);
253
+ case 409: return new StateError(message, data.currentState || "unknown", data.requiredState, metadata);
254
+ case 429: return new QuotaError(data.quotaType || "rate_limit", message, data.current, data.limit, metadata);
255
+ case 501: return new SandboxError(message, code || "NOT_IMPLEMENTED", status, metadata);
256
+ default:
257
+ if (status >= 500) return new ServerError(message, status, metadata);
258
+ return new SandboxError(message, code || "UNKNOWN_ERROR", status, metadata);
259
+ }
260
+ }
261
+ //#endregion
262
+ export { PartialFailureError as a, ServerError as c, ValidationError as d, parseErrorResponse as f, NotFoundError as i, StateError as l, CapabilityError as n, QuotaError as o, NetworkError as r, SandboxError as s, AuthError as t, TimeoutError as u };
@@ -4,6 +4,11 @@
4
4
  *
5
5
  * Shared type contracts for collaborative document identity and bootstrap.
6
6
  */
7
+ /**
8
+ * Headers shape accepted by `fetch` requests. Mirrors the standard
9
+ * `HeadersInit` (which is not consistently exported by `@types/node`).
10
+ */
11
+ type CollaborationRequestHeaders = Headers | Record<string, string> | Array<[string, string]>;
7
12
  interface CollaborationDocumentRef {
8
13
  workspaceId: string;
9
14
  relativePath: string;
@@ -80,7 +85,7 @@ interface CollaborationFileBridgeOptions {
80
85
  interface CollaborationClientConfig {
81
86
  baseUrl: string;
82
87
  timeoutMs?: number;
83
- headers?: HeadersInit | (() => HeadersInit | Promise<HeadersInit>);
88
+ headers?: CollaborationRequestHeaders | (() => CollaborationRequestHeaders | Promise<CollaborationRequestHeaders>);
84
89
  fetch?: typeof globalThis.fetch;
85
90
  }
86
91
  //#endregion
@@ -1,4 +1,4 @@
1
- import { b as CreateSandboxOptions, n as SandboxInstance, t as HttpClient } from "./sandbox-BvZ0-Iv7.js";
1
+ import { P as CreateSandboxOptions, n as SandboxInstance, t as HttpClient } from "./sandbox-aBpWqler.js";
2
2
 
3
3
  //#region src/tangle/abi.d.ts
4
4
  /**
@@ -127,8 +127,8 @@ declare const SandboxCreateParamTypes: readonly [{
127
127
  readonly name: "ssh_enabled";
128
128
  readonly type: "bool";
129
129
  }, {
130
- readonly name: "ssh_public_key";
131
- readonly type: "string";
130
+ readonly name: "ssh_public_keys";
131
+ readonly type: "string[]";
132
132
  }, {
133
133
  readonly name: "web_terminal_enabled";
134
134
  readonly type: "bool";
@@ -120,10 +120,41 @@ declare function issueBatchScopedToken(signingSecret: string, payload: Omit<Read
120
120
  */
121
121
  declare function issueCollaborationToken(signingSecret: string, payload: IssueCollaborationTokenOptions, ttlMinutes: number): string;
122
122
  /**
123
- * Decode a JWT without verification (to extract claims for lookup).
124
- * Returns null if the token is malformed.
123
+ * Decode a JWT **without verifying its signature**.
124
+ *
125
+ * The deliberately scary name is the API contract: an HMAC-signed token
126
+ * whose signature has not been verified is a self-asserted blob of JSON,
127
+ * not an authenticated claim. Treating its fields as authoritative
128
+ * (e.g. `if (unsafeDecodeToken(t).sub === userId) grantAccess()`) is a
129
+ * straightforward authorization bypass — an attacker can mint any
130
+ * payload they like.
131
+ *
132
+ * Use this only when the signature has already been validated upstream
133
+ * (e.g. by an API gateway that strips the token after verification),
134
+ * for client-side `exp` peeking to decide whether to refresh, or for
135
+ * routing/logging keyed off non-security-sensitive claims.
136
+ *
137
+ * For any access-control decision, use {@link verifyToken} instead.
138
+ *
139
+ * Returns `null` if the token is malformed.
140
+ */
141
+ declare function unsafeDecodeToken(token: string): AnyTokenPayload | null;
142
+ /**
143
+ * Verify a JWT's HMAC-SHA256 signature against `signingSecret` and
144
+ * check that it has not expired. Returns the decoded payload on
145
+ * success, or `null` on any failure (malformed token, bad signature,
146
+ * expired, or unexpected algorithm).
147
+ *
148
+ * Signature comparison is constant-time. Callers must use this — not
149
+ * {@link unsafeDecodeToken} — for any authorization decision.
150
+ *
151
+ * @param token - The JWT to verify
152
+ * @param signingSecret - The same secret used to issue the token
153
+ * @param options.clockSkewSeconds - Tolerance for `exp` checks; default `0`
125
154
  */
126
- declare function decodeToken(token: string): AnyTokenPayload | null;
155
+ declare function verifyToken(token: string, signingSecret: string, options?: {
156
+ clockSkewSeconds?: number;
157
+ }): AnyTokenPayload | null;
127
158
  /**
128
159
  * Get time until token expires (in seconds).
129
160
  * Returns negative if expired.
@@ -186,4 +217,4 @@ declare class ProductTokenIssuer {
186
217
  getTtlMinutes(tier?: "free" | "pro" | "enterprise"): number;
187
218
  }
188
219
  //#endregion
189
- export { SessionScopedTokenPayload as _, issueBatchScopedToken as a, issueReadToken as c, BatchScopedTokenPayload as d, CollaborationAccess as f, ReadTokenPayload as g, ProjectScopedTokenPayload as h, isTokenExpiringSoon as i, issueSessionScopedToken as l, IssueCollaborationTokenOptions as m, decodeToken as n, issueCollaborationToken as o, CollaborationTokenPayload as p, getTokenTTL as r, issueProjectScopedToken as s, ProductTokenIssuer as t, AnyTokenPayload as u, TokenScope as v };
220
+ export { ReadTokenPayload as _, issueCollaborationToken as a, issueSessionScopedToken as c, AnyTokenPayload as d, BatchScopedTokenPayload as f, ProjectScopedTokenPayload as g, IssueCollaborationTokenOptions as h, issueBatchScopedToken as i, unsafeDecodeToken as l, CollaborationTokenPayload as m, getTokenTTL as n, issueProjectScopedToken as o, CollaborationAccess as p, isTokenExpiringSoon as r, issueReadToken as s, ProductTokenIssuer as t, verifyToken as u, SessionScopedTokenPayload as v, TokenScope as y };
package/dist/index.d.ts CHANGED
@@ -1,8 +1,9 @@
1
- import { f as CollaborationAccess, m as IssueCollaborationTokenOptions, p as CollaborationTokenPayload, u as AnyTokenPayload } from "./index-gA-oRjOi.js";
2
- 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-BuS8nl3b.js";
3
- import { $ as Process, $t as AgentProfileResourceRef, A as ExecResult, At as StorageConfig, B as GitStatus, Bt as UpdateUserOptions, C as DownloadOptions, Ct as SearchMatch, D as DriverType, Dt as SnapshotInfo, E as DriverInfo, Et as SecretsManager, F as GitAuth, Ft as TeeAttestationReport, G as McpServerConfig, Gt as AgentProfile, H as InstalledTool, Ht as UploadProgress, I as GitBranch, It as TeeAttestationResponse, J as NetworkManager, Jt as AgentProfileFileMount, K as MkdirOptions, Kt as AgentProfileCapabilities, L as GitCommit, Lt as TeePublicKey, M as FileSystem, Mt as TaskOptions, N as ForkOptions, Nt as TaskResult, O as EventStreamOptions, Ot as SnapshotOptions, P as ForkResult, Pt as TeeAttestationOptions, Q as PreviewLinkManager, Qt as AgentProfilePrompt, R as GitConfig, Rt as TeePublicKeyResponse, S as DirectoryPermission, St as SandboxUser, T as DriverConfig, Tt as SecretInfo, U as ListOptions, Ut as UsageInfo, V as GpuType, Vt as UploadOptions, W as ListSandboxOptions, Wt as WaitForOptions, X as PermissionsManager, Xt as AgentProfileModelHints, Y as PermissionLevel, Yt as AgentProfileMcpServer, Z as PreviewLinkInfo, Zt as AgentProfilePermissionValue, _ as CheckpointOptions, _t as SandboxEvent, a as BackendCapabilities, an as defineGitHubResource, at as ProcessStatus, b as CreateSandboxOptions, bt as SandboxResources, c as BackendManager, ct as ProvisionEvent, d as BatchEvent, dt as ProvisionStep, en as AgentProfileResources, et as ProcessInfo, f as BatchOptions, ft as RunCodeOptions, g as CheckpointInfo, gt as SandboxEnvironment, h as BatchTaskResult, ht as SandboxConnection, i as AddUserOptions, in as defineAgentProfile, it as ProcessSpawnOptions, j as FileInfo, jt as SubscriptionInfo, k as ExecOptions, kt as SnapshotResult, l as BackendStatus, lt as ProvisionResult, m as BatchTask, mt as SandboxClientConfig, n as SandboxInstance, nn as AgentProfileValidationResult, nt as ProcessManager, o as BackendConfig, on as defineInlineResource, ot as PromptOptions, p as BatchResult, pt as SSHCredentials, q as NetworkConfig, qt as AgentProfileConfidential, r as AccessPolicyRule, rn as AgentSubagentProfile, rt as ProcessSignal, s as BackendInfo, sn as mergeAgentProfiles, st as PromptResult, tn as AgentProfileValidationIssue, tt as ProcessLogEntry, u as BackendType, ut as ProvisionStatus, v as CheckpointResult, vt as SandboxInfo, w as DownloadProgress, wt as SearchOptions, x as DeleteOptions, xt as SandboxStatus, y as CodeResult, yt as SandboxPermissionsConfig, z as GitDiff, zt as ToolsConfig } from "./sandbox-BvZ0-Iv7.js";
4
- import { a as SandboxError, c as TimeoutError, d as InviteTeamMemberOptions, f as SandboxClient, h as TeamMember, i as QuotaError, l as ValidationError, m as TeamInvitation, n as NetworkError, o as ServerError, p as Team, r as NotFoundError, s as StateError, t as AuthError, u as CreateTeamOptions } from "./errors-AIT8qikt.js";
5
- import { s as TangleSandboxClientConfig, t as TangleSandboxClient } from "./index-t7xkzv0U.js";
1
+ import { d as AnyTokenPayload, h as IssueCollaborationTokenOptions, m as CollaborationTokenPayload, p as CollaborationAccess } from "./index-Dpj1oB5i.js";
2
+ 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-CCsA3S0D.js";
3
+ import { A as IntegrationAction, B as TriggerRun, C as CreateAutomationInput, D as EndpointInfo, E as DeliveryAttempt, F as IntegrationScope, G as ParsedSSEEvent, H as SandboxFleet, I as IntegrationVerificationKind, K as parseSSEStream, L as IntegrationsManager, M as IntegrationDeliveryStatus, N as IntegrationPrincipalType, O as EndpointWithSecret, P as IntegrationProvider, R as RecipeManifest, S as ConnectionInfo, T as CreateTriggerInput, U as SandboxFleetClient, V as TriggerWithSecret, W as ParseSSEStreamOptions, _ as SandboxClient, a as PartialFailureError, b as TeamMember, c as SandboxErrorJson, d as StateError, f as TimeoutError, g as InviteTeamMemberOptions, h as IntelligenceClient, i as NotFoundError, j as IntegrationActionKind, k as InstallRecipeInput, l as SandboxFailureDetail, m as CreateTeamOptions, n as CapabilityError, o as QuotaError, p as ValidationError, r as NetworkError, s as SandboxError, t as AuthError, u as ServerError, v as Team, w as CreateEndpointInput, x as AutomationInfo, y as TeamInvitation, z as TriggerInfo } from "./errors-BI75IXOM.js";
4
+ import { $ as FleetExecDispatchOptions, $n as SnapshotInfo, $t as RunCodeOptions, A as CreateIntelligenceReportOptions, An as SandboxFleetWorkspaceReconcileResult, Ar as AgentProfileValidationResult, At as PreviewLinkManager, B as DownloadProgress, Bn as SandboxTraceExport, Br as SandboxMcpServerEntry, Bt as PromptResult, C as BatchResult, Cn as SandboxFleetToken, Cr as AgentProfileMcpServer, Ct as MintScopedTokenOptions, D as CheckpointOptions, Dn as SandboxFleetTraceOptions, Dr as AgentProfileResourceRef, Dt as PermissionLevel, E as CheckpointInfo, En as SandboxFleetTraceExport, Er as AgentProfilePrompt, Et as NetworkManager, F as DeleteOptions, Fn as SandboxPermissionsConfig, Fr as mergeAgentProfiles, Ft as ProcessSignal, G as ExecOptions, Gn as SearchMatch, Gt as PublicTemplateInfo, H as DriverInfo, Hn as SandboxUser, Ht as ProvisionResult, I as DirectoryPermission, In as SandboxResources, Ir as BuildSandboxMcpConfigOptions, It as ProcessSpawnOptions, J as FileSystem, Jn as SecretsManager, Jt as PublishPublicTemplateVersionOptions, K as ExecResult, Kn as SearchOptions, Kt as PublicTemplateVersionInfo, L as DispatchPromptOptions, Ln as SandboxStatus, Lr as SANDBOX_MCP_SERVER_NAME, Lt as ProcessStatus, Mn as SandboxFleetWorkspaceSnapshotResult, Mr as defineAgentProfile, Mt as ProcessInfo, N as CreateSandboxFleetWithCoordinatorOptions, Nn as SandboxInfo, Nr as defineGitHubResource, Nt as ProcessLogEntry, O as CheckpointResult, On as SandboxFleetUsage, Or as AgentProfileResources, Ot as PermissionsManager, P as CreateSandboxOptions, Pn as SandboxIntelligenceEnvelope, Pr as defineInlineResource, Pt as ProcessManager, Q as FleetDispatchStreamOptions, Qn as SessionStatus, Qt as ReconcileSandboxFleetsResult, R as DispatchedSession, Rn as SandboxTraceBundle, Rr as SandboxMcpConfig, S as BatchOptions, Sn as SandboxFleetPolicy, Sr as AgentProfileFileMount, St as McpServerConfig, T as BatchTaskResult, Tn as SandboxFleetTraceEvent, Tr as AgentProfilePermissionValue, Tt as NetworkConfig, U as DriverType, Un as ScopedToken, Ut as ProvisionStatus, V as DriverConfig, Vn as SandboxTraceOptions, Vr as buildSandboxMcpConfig, Vt as ProvisionEvent, W as EventStreamOptions, Wn as ScopedTokenScope, Wt as ProvisionStep, X as FleetDispatchResultBuffer, Xn as SessionInfo, Xt as ReapExpiredSandboxFleetsResult, Y as FleetDispatchCancelResult, Yn as SessionEventStreamOptions, Yt as ReapExpiredSandboxFleetsOptions, Z as FleetDispatchResultBufferOptions, Zn as SessionListOptions, Zt as ReconcileSandboxFleetsOptions, _ as BackendInfo, _n as SandboxFleetMachineRecord, _r as UsageInfo, _t as IntelligenceReportSubjectType, a as TraceExportSink, an as SandboxEvent, ar as TaskOptions, at as ForkResult, b as BackendType, bn as SandboxFleetManifestMachine, br as AgentProfileCapabilities, bt as ListSandboxFleetOptions, c as otelTraceIdForTangleTrace, cn as SandboxFleetCostEstimate, cr as TeeAttestationReport, ct as GitCommit, d as AcceleratorKind, dn as SandboxFleetDriverCapability, dr as TeePublicKeyResponse, dt as GitStatus, en as SSHCommandDescriptor, er as SnapshotOptions, f as AccessPolicyRule, fn as SandboxFleetDriverTimings, fr as TokenRefreshHandler, ft as GpuType, g as BackendConfig, gn as SandboxFleetMachineMeteredUsage, gr as UploadProgress, gt as IntelligenceReportCompareTo, h as BackendCapabilities, hn as SandboxFleetMachine, hr as UploadOptions, ht as IntelligenceReportBudget, i as TraceExportResult, in as SandboxEnvironment, ir as SubscriptionInfo, it as ForkOptions, j as CreateSandboxFleetOptions, jn as SandboxFleetWorkspaceRestoreResult, jr as AgentSubagentProfile, jt as Process, k as CodeResult, kn as SandboxFleetWorkspace, kr as AgentProfileValidationIssue, kt as PreviewLinkInfo, l as toOtelJson, ln as SandboxFleetDispatchFailureClass, lr as TeeAttestationResponse, lt as GitConfig, m as AttachSandboxFleetMachineOptions, mn as SandboxFleetIntelligenceEnvelope, mr as UpdateUserOptions, mt as IntelligenceReport, n as SandboxInstance, nn as SandboxClientConfig, nt as FleetPromptDispatchOptions, o as buildTraceExportPayload, on as SandboxFleetArtifact, or as TaskResult, ot as GitAuth, p as AddUserOptions, pn as SandboxFleetInfo, pr as ToolsConfig, pt as InstalledTool, q as FileInfo, qn as SecretInfo, qt as PublishPublicTemplateOptions, r as TraceExportFormat, rn as SandboxConnection, rr as StorageConfig, s as exportTraceBundle, sn as SandboxFleetArtifactSpec, sr as TeeAttestationOptions, st as GitBranch, tn as SSHCredentials, tr as SnapshotResult, tt as FleetMachineId, u as SandboxSession, un as SandboxFleetDispatchResponse, ur as TeePublicKey, ut as GitDiff, v as BackendManager, vn as SandboxFleetMachineSpec, vr as WaitForOptions, vt as IntelligenceReportWindow, w as BatchTask, wn as SandboxFleetTraceBundle, wr as AgentProfileModelHints, wt as MkdirOptions, x as BatchEvent, xn as SandboxFleetOperationsSummary, xr as AgentProfileConfidential, xt as ListSandboxOptions, y as BackendStatus, yn as SandboxFleetManifest, yr as AgentProfile, yt as ListOptions, z as DownloadOptions, zn as SandboxTraceEvent, zr as SandboxMcpEndpoint, zt as PromptOptions } from "./sandbox-aBpWqler.js";
5
+ import { IntegrationActor, IntegrationManifest, IntegrationRequirement } from "./platform-integrations.js";
6
+ import { s as TangleSandboxClientConfig, t as TangleSandboxClient } from "./index-DhNGZ0h4.js";
6
7
 
7
8
  //#region src/attestation-heartbeat.d.ts
8
9
  interface TeeAttestationHeartbeatSample {
@@ -444,65 +445,111 @@ declare class ImageBuilder {
444
445
  */
445
446
  declare function generateDockerfile(spec: ImageSpec): string;
446
447
  //#endregion
447
- //#region src/lib/sse-parser.d.ts
448
- /**
449
- * SSE Stream Parser
450
- *
451
- * EventSource stream parsing for SDK consumers. Implements the
452
- * subset of the SSE spec (§9.2.6) that the platform actually emits —
453
- * LF and CRLF terminators, `event:` / `data:` / `id:` fields, and
454
- * multi-line `data:` dispatch. Used by `SandboxClient.streamBatch`
455
- * and by the web dashboard's batch page; exported so downstream
456
- * surfaces don't maintain their own copies.
457
- *
458
- * Guarantees:
459
- * - Correctly buffers frames that straddle chunk boundaries.
460
- * - Accepts LF- and CRLF-terminated streams interchangeably.
461
- * - Joins multi-line `data:` per the spec (dispatch joins with
462
- * "\n" before JSON parse).
463
- * - Defaults event type to `"message"` when a frame carries
464
- * `data:` but no `event:` field (SSE spec §9.2.6 step 3).
465
- * - Surfaces optional `id:` so callers can implement reconnection.
466
- * - Flushes a dangling event when the stream closes without a
467
- * terminating blank line (well-behaved servers emit `\n\n`, but
468
- * some close early).
469
- * - Throws `AbortError` when the caller-supplied signal fires, so
470
- * consumers can distinguish "ran to completion" from "cancelled"
471
- * without peeking at signal state.
472
- * - Silently drops frames with malformed JSON — the stream remains
473
- * usable and only the individual frame is lost.
474
- *
475
- * What it does NOT do:
476
- * - CR-only (legacy Mac) line terminators. No known emitter uses
477
- * them; supporting them would risk splitting payloads that
478
- * legitimately contain CR.
479
- * - Retry/reconnect (caller's responsibility).
480
- * - Event-type filtering (caller's responsibility).
481
- */
482
- interface ParsedSSEEvent {
483
- /** Event type from the `event:` field, e.g. `task.completed`. */
484
- type: string;
485
- /** Parsed JSON payload from joined `data:` lines. */
486
- data: Record<string, unknown>;
487
- /** Optional `id:` field if the server emitted one. */
488
- id?: string;
448
+ //#region src/manage-sandboxes.d.ts
449
+ declare const MANAGE_SANDBOXES_TOOL_NAME = "manageSandboxes";
450
+ type ManageSandboxesInput = {
451
+ action: "capabilities";
452
+ } | {
453
+ action: "create";
454
+ options: CreateSandboxFleetOptions;
455
+ } | {
456
+ action: "createWithCoordinator";
457
+ options: CreateSandboxFleetWithCoordinatorOptions;
458
+ } | {
459
+ action: "list";
460
+ fleetId: string;
461
+ } | {
462
+ action: "delete";
463
+ fleetId: string;
464
+ } | {
465
+ action: "attachMachine";
466
+ fleetId: string;
467
+ machine: AttachSandboxFleetMachineOptions;
468
+ } | {
469
+ action: "detachMachine";
470
+ fleetId: string;
471
+ machineId: FleetMachineId;
472
+ } | {
473
+ action: "manifest";
474
+ fleetId: string;
475
+ } | {
476
+ action: "usage";
477
+ fleetId: string;
478
+ } | {
479
+ action: "trace";
480
+ fleetId: string;
481
+ } | {
482
+ action: "intelligence";
483
+ fleetId: string;
484
+ } | {
485
+ action: "cost";
486
+ fleetId: string;
487
+ } | {
488
+ action: "createWorkspaceSnapshot";
489
+ fleetId: string;
490
+ } | {
491
+ action: "restoreWorkspaceSnapshot";
492
+ fleetId: string;
493
+ snapshotId: string;
494
+ } | {
495
+ action: "reconcileWorkspace";
496
+ fleetId: string;
497
+ };
498
+ interface ManageSandboxesTool {
499
+ name: typeof MANAGE_SANDBOXES_TOOL_NAME;
500
+ description: string;
501
+ parameters: Record<string, unknown>;
502
+ execute(input: ManageSandboxesInput | Record<string, unknown>): Promise<unknown>;
489
503
  }
490
- interface ParseSSEStreamOptions {
504
+ interface ManageSandboxesToolOptions {
491
505
  /**
492
- * Signal to abort the stream. When aborted, the generator throws
493
- * `AbortError` this is a deliberate departure from silent-return
494
- * semantics so the consumer's for-await loop propagates the abort
495
- * to its own catch block instead of looking like a clean finish.
506
+ * Host-owned caps applied to every create action. The model must not be
507
+ * allowed to choose its own spend, driver, accelerator, or scale policy.
496
508
  */
497
- signal?: AbortSignal;
509
+ policy?: SandboxFleetPolicy;
498
510
  }
499
- /**
500
- * Parse a streaming SSE response body into an async iterable of
501
- * structured events.
502
- *
503
- * @throws `TypeError` when the response has no body.
504
- * @throws `DOMException` with `name === "AbortError"` on cancellation.
505
- */
506
- declare function parseSSEStream(body: ReadableStream<Uint8Array> | null | undefined, options?: ParseSSEStreamOptions): AsyncGenerator<ParsedSSEEvent>;
511
+ declare function createManageSandboxesTool(client: SandboxClient, options?: ManageSandboxesToolOptions): ManageSandboxesTool;
512
+ declare const MANAGE_SANDBOXES_PARAMETERS: {
513
+ readonly type: "object";
514
+ readonly additionalProperties: false;
515
+ readonly required: readonly ["action"];
516
+ readonly properties: {
517
+ readonly action: {
518
+ readonly type: "string";
519
+ readonly enum: readonly ["capabilities", "create", "createWithCoordinator", "list", "delete", "attachMachine", "detachMachine", "manifest", "usage", "trace", "intelligence", "cost", "createWorkspaceSnapshot", "restoreWorkspaceSnapshot", "reconcileWorkspace"];
520
+ };
521
+ readonly fleetId: {
522
+ type: string;
523
+ pattern: string;
524
+ };
525
+ readonly machineId: {
526
+ type: string;
527
+ pattern: string;
528
+ };
529
+ readonly snapshotId: {
530
+ readonly type: "string";
531
+ readonly minLength: 1;
532
+ };
533
+ readonly options: {
534
+ readonly type: "object";
535
+ };
536
+ readonly machine: {
537
+ readonly type: "object";
538
+ readonly required: readonly ["machineId", "sandboxId"];
539
+ readonly additionalProperties: true;
540
+ readonly properties: {
541
+ readonly machineId: {
542
+ type: string;
543
+ pattern: string;
544
+ };
545
+ readonly sandboxId: {
546
+ readonly type: "string";
547
+ readonly minLength: 1;
548
+ readonly maxLength: 128;
549
+ };
550
+ };
551
+ };
552
+ };
553
+ };
507
554
  //#endregion
508
- export { type AccessPolicyRule, type AddUserOptions, type AgentProfile, type AgentProfileCapabilities, type AgentProfileFileMount, type AgentProfileMcpServer, type AgentProfileModelHints, type AgentProfilePermissionValue, type AgentProfilePrompt, type AgentProfileResourceRef, type AgentProfileResources, type AgentProfileValidationIssue, type AgentProfileValidationResult, type AgentSubagentProfile, type AnyTokenPayload, AuthError, type BackendCapabilities, type BackendConfig, type BackendInfo, type BackendManager, type BackendStatus, type BackendType, type BatchEvent, type BatchOptions, type BatchResult, type BatchTask, type BatchTaskResult, type BuildProgressEvent, type CheckpointInfo, type CheckpointOptions, type CheckpointResult, 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 ConfidentialSandboxResult, type ConfidentialTeeType, type CreateConfidentialSandboxOptions, type CreateSandboxOptions, type CreateTeamOptions, type DeleteOptions, type DirectoryPermission, type DownloadOptions, type DownloadProgress, type DriverConfig, type DriverInfo, type DriverType, type EventStreamOptions, type ExecOptions, type ExecResult, type FileInfo, type FileSystem, type ForkOptions, type ForkResult, type GitAuth, type GitBranch, type GitCommit, type GitConfig, type GitDiff, type GitStatus, type GpuType, Image, type ImageBuildOptions, type ImageBuildResult, ImageBuilder, type ImageSpec, type InstalledTool, type InviteTeamMemberOptions, type IssueCollaborationTokenOptions, type ListOptions, type ListSandboxOptions, type McpServerConfig, type MkdirOptions, type NetworkConfig, NetworkError, type NetworkManager, NotFoundError, type ParseSSEStreamOptions, type ParsedSSEEvent, 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, QuotaError, type RunCodeOptions, type SSHCredentials, SandboxClient as Sandbox, SandboxClient, type SandboxClientConfig, type SandboxConnection, type SandboxEnvironment, SandboxError, type SandboxEvent, type SandboxInfo, SandboxInstance, type SandboxPermissionsConfig, type SandboxResources, type SandboxStatus, type SandboxUser, type SaveCollaborationSnapshotRequest, type SaveCollaborationSnapshotResponse, type SearchMatch, type SearchOptions, type SecretInfo, type SecretsManager, ServerError, type SnapshotInfo, type SnapshotOptions, type SnapshotResult, StateError, type StorageConfig, type SubscriptionInfo, TangleSandboxClient, type TangleSandboxClientConfig, type TaskOptions, type TaskResult, type Team, type TeamInvitation, type TeamMember, type TeeAttestationHeartbeat, type TeeAttestationHeartbeatOptions, type TeeAttestationHeartbeatSample, type TeeAttestationOptions, type TeeAttestationReport, type TeeAttestationResponse, type TeePublicKey, type TeePublicKeyResponse, TimeoutError, type ToolsConfig, type UpdateUserOptions, type UploadOptions, type UploadProgress, type UsageInfo, ValidationError, type WaitForOptions, buildCollaborationDocumentId, createConfidentialSandbox, defineAgentProfile, defineGitHubResource, defineInlineResource, generateAttestationNonce, generateDockerfile, mergeAgentProfiles, normalizeCollaborationPath, parseCollaborationDocumentId, parseSSEStream, startTeeAttestationHeartbeat };
555
+ export { type AcceleratorKind, type AccessPolicyRule, type AddUserOptions, type AgentProfile, type AgentProfileCapabilities, type AgentProfileFileMount, type AgentProfileMcpServer, type AgentProfileModelHints, type AgentProfilePermissionValue, type AgentProfilePrompt, type AgentProfileResourceRef, type AgentProfileResources, type AgentProfileValidationIssue, type AgentProfileValidationResult, type AgentSubagentProfile, type AnyTokenPayload, type AttachSandboxFleetMachineOptions, AuthError, type AutomationInfo, type BackendCapabilities, type BackendConfig, type BackendInfo, type BackendManager, type BackendStatus, type BackendType, type BatchEvent, type BatchOptions, type BatchResult, type BatchTask, type BatchTaskResult, type BuildProgressEvent, type BuildSandboxMcpConfigOptions, CapabilityError, type CheckpointInfo, type CheckpointOptions, type CheckpointResult, 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 ConfidentialSandboxResult, type ConfidentialTeeType, type ConnectionInfo, type CreateAutomationInput, type CreateConfidentialSandboxOptions, type CreateEndpointInput, type CreateIntelligenceReportOptions, type CreateSandboxFleetOptions, type CreateSandboxFleetWithCoordinatorOptions, type CreateSandboxOptions, type CreateTeamOptions, type CreateTriggerInput, type DeleteOptions, type DeliveryAttempt, type DirectoryPermission, type DispatchPromptOptions, type DispatchedSession, type DownloadOptions, type DownloadProgress, type DriverConfig, type DriverInfo, type DriverType, type EndpointInfo, type EndpointWithSecret, type EventStreamOptions, type ExecOptions, type ExecResult, type FileInfo, type FileSystem, type FleetDispatchCancelResult, type FleetDispatchResultBuffer, type FleetDispatchResultBufferOptions, type FleetDispatchStreamOptions, type FleetExecDispatchOptions, type FleetMachineId, type FleetPromptDispatchOptions, type ForkOptions, type ForkResult, type GitAuth, type GitBranch, type GitCommit, type GitConfig, type GitDiff, type GitStatus, type GpuType, Image, type ImageBuildOptions, type ImageBuildResult, ImageBuilder, type ImageSpec, type InstallRecipeInput, type InstalledTool, type IntegrationAction, type IntegrationActionKind, type IntegrationActor, type IntegrationDeliveryStatus, type IntegrationManifest, type IntegrationPrincipalType, type IntegrationProvider, type IntegrationRequirement, type IntegrationScope, type IntegrationVerificationKind, IntegrationsManager, type RecipeManifest as IntegrationsRecipeManifest, IntelligenceClient, type IntelligenceReport, type IntelligenceReportBudget, type IntelligenceReportCompareTo, type IntelligenceReportSubjectType, type IntelligenceReportWindow, type InviteTeamMemberOptions, type IssueCollaborationTokenOptions, type ListOptions, type ListSandboxFleetOptions, type ListSandboxOptions, MANAGE_SANDBOXES_PARAMETERS, MANAGE_SANDBOXES_TOOL_NAME, type ManageSandboxesInput, type ManageSandboxesTool, type ManageSandboxesToolOptions, type McpServerConfig, type MintScopedTokenOptions, type MkdirOptions, type NetworkConfig, NetworkError, type NetworkManager, 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 RunCodeOptions, SANDBOX_MCP_SERVER_NAME, 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 SandboxResources, SandboxSession, type SandboxStatus, 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, ServerError, type SessionEventStreamOptions, type SessionInfo, type SessionListOptions, type SessionStatus, type SnapshotInfo, type SnapshotOptions, type SnapshotResult, StateError, type StorageConfig, type SubscriptionInfo, TangleSandboxClient, type TangleSandboxClientConfig, type TaskOptions, type TaskResult, 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 TriggerInfo, type TriggerRun, type TriggerWithSecret, type UpdateUserOptions, type UploadOptions, type UploadProgress, type UsageInfo, ValidationError, type WaitForOptions, buildCollaborationDocumentId, buildSandboxMcpConfig, buildTraceExportPayload, createConfidentialSandbox, createManageSandboxesTool, defineAgentProfile, defineGitHubResource, defineInlineResource, exportTraceBundle, generateAttestationNonce, generateDockerfile, mergeAgentProfiles, normalizeCollaborationPath, otelTraceIdForTangleTrace, parseCollaborationDocumentId, parseSSEStream, startTeeAttestationHeartbeat, toOtelJson };