@tangle-network/sandbox 0.12.0 → 0.12.1-develop.20260725201418.71254fb
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/index.d.ts +3 -3
- package/dist/{client-BCNrDjvA.js → client-B1cU2xzD.js} +70 -3
- package/dist/{client-iZbD-9Ks.d.ts → client-BjkNkFl7.d.ts} +21 -2
- package/dist/core.d.ts +3 -3
- package/dist/core.js +2 -2
- package/dist/{index-Bhx4EQca.d.ts → index-DHhxHd85.d.ts} +2 -2
- package/dist/index.d.ts +5 -5
- package/dist/index.js +3 -3
- package/dist/runtime.d.ts +1 -1
- package/dist/{sandbox-CWeFm9Hj.js → sandbox-D77F7Yja.js} +23 -14
- package/dist/{sandbox-hbYwu_Ot.d.ts → sandbox-eH5LS4U_.d.ts} +23 -16
- package/dist/tangle/index.d.ts +1 -1
- package/dist/tangle/index.js +1 -1
- package/dist/{tangle-C8CaT3tE.js → tangle-DpxmcNGp.js} +2 -1
- package/dist/{types-C67osezQ.d.ts → types-Dph9_dE4.d.ts} +70 -5
- package/package.json +1 -1
package/dist/agent/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as CodeExecutionResult, E as CodeResultPart, S as CodeExecutionOptions, w as CodeLanguage } from "../types-
|
|
2
|
-
import { n as SandboxInstance } from "../sandbox-
|
|
3
|
-
import { i as SandboxClient } from "../client-
|
|
1
|
+
import { C as CodeExecutionResult, E as CodeResultPart, S as CodeExecutionOptions, w as CodeLanguage } from "../types-Dph9_dE4.js";
|
|
2
|
+
import { n as SandboxInstance } from "../sandbox-eH5LS4U_.js";
|
|
3
|
+
import { i as SandboxClient } from "../client-BjkNkFl7.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,6 +1,6 @@
|
|
|
1
1
|
import { c as encodeTextForWire, i as SANDBOX_PROXY_REQUEST_MAX_BYTES, o as combineAbortSignals, s as encodePromptForWire } from "./runtime-api-XhAv6YiH.js";
|
|
2
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-D9fFOWX9.js";
|
|
3
|
-
import { g as exportTraceBundle, m as normalizeConnection, n as createSandboxInstanceFromResponse, r as normalizeStartupDiagnostics, y as parseSSEStream } from "./sandbox-
|
|
3
|
+
import { g as exportTraceBundle, m as normalizeConnection, n as createSandboxInstanceFromResponse, r as normalizeStartupDiagnostics, y as parseSSEStream } from "./sandbox-D77F7Yja.js";
|
|
4
4
|
//#region src/resources.ts
|
|
5
5
|
/**
|
|
6
6
|
* Compute tiers, ordered smallest → largest. Defined HERE (not imported from
|
|
@@ -100,6 +100,7 @@ const RESERVED_METADATA_PREFIX = "tangle.";
|
|
|
100
100
|
const DEFAULT_MACHINE_LIFETIME_SECONDS = 3600;
|
|
101
101
|
const DEFAULT_MAX_CONCURRENT_CREATES = 4;
|
|
102
102
|
const MAX_CONCURRENT_ARTIFACT_READS = 8;
|
|
103
|
+
const MAX_CONCURRENT_DRIVE_TURNS = 4;
|
|
103
104
|
const DEFAULT_ARTIFACT_ROOT = "/workspace";
|
|
104
105
|
const DEFAULT_MAX_ARTIFACT_BYTES = 10 * 1024 * 1024;
|
|
105
106
|
const MAX_MACHINE_ID_LENGTH = 64;
|
|
@@ -392,6 +393,43 @@ var SandboxFleet = class {
|
|
|
392
393
|
}
|
|
393
394
|
return await response.json();
|
|
394
395
|
}
|
|
396
|
+
/**
|
|
397
|
+
* Drive one settle → poll → dispatch pass across N machines at once — the
|
|
398
|
+
* fleet counterpart of `box.driveTurn()` for tick-based callers (Workflows
|
|
399
|
+
* steps, queue consumers, crons) that re-invoke on their own schedule. One
|
|
400
|
+
* invocation never loops, never sleeps, and never holds a connection: each
|
|
401
|
+
* machine gets exactly one pass, and a per-machine failure is captured in
|
|
402
|
+
* that machine's outcome instead of failing the batch, so the caller
|
|
403
|
+
* re-drives survivors on its next tick and only escalates the errors.
|
|
404
|
+
*/
|
|
405
|
+
async driveTurns(turns, options) {
|
|
406
|
+
const concurrency = options?.concurrency ?? MAX_CONCURRENT_DRIVE_TURNS;
|
|
407
|
+
if (!Number.isInteger(concurrency) || concurrency <= 0) throw new ValidationError("driveTurns concurrency must be a positive integer");
|
|
408
|
+
const sandboxes = /* @__PURE__ */ new Map();
|
|
409
|
+
const sandboxFor = (machineId) => {
|
|
410
|
+
const existing = sandboxes.get(machineId);
|
|
411
|
+
if (existing) return existing;
|
|
412
|
+
const pending = this.requireSandbox(machineId);
|
|
413
|
+
sandboxes.set(machineId, pending);
|
|
414
|
+
return pending;
|
|
415
|
+
};
|
|
416
|
+
return mapConcurrent(turns, Math.min(concurrency, turns.length || 1), async (turn) => {
|
|
417
|
+
try {
|
|
418
|
+
const result = await (await sandboxFor(turn.machineId)).driveTurn(turn.message, turn.options);
|
|
419
|
+
return {
|
|
420
|
+
machineId: turn.machineId,
|
|
421
|
+
outcome: "driven",
|
|
422
|
+
result
|
|
423
|
+
};
|
|
424
|
+
} catch (error) {
|
|
425
|
+
return {
|
|
426
|
+
machineId: turn.machineId,
|
|
427
|
+
outcome: "error",
|
|
428
|
+
error: error instanceof Error ? error.message : String(error)
|
|
429
|
+
};
|
|
430
|
+
}
|
|
431
|
+
});
|
|
432
|
+
}
|
|
395
433
|
manifest() {
|
|
396
434
|
return this.client.fleets.manifest(this.fleetId);
|
|
397
435
|
}
|
|
@@ -1765,7 +1803,8 @@ var SandboxClient = class {
|
|
|
1765
1803
|
capabilities: options?.capabilities,
|
|
1766
1804
|
privacy: options?.privacy,
|
|
1767
1805
|
egressPolicy: options?.egressPolicy,
|
|
1768
|
-
idempotencyKey
|
|
1806
|
+
idempotencyKey,
|
|
1807
|
+
billingOwnerId: options?.billingOwnerId
|
|
1769
1808
|
});
|
|
1770
1809
|
const createTimeoutError = () => new TimeoutError(timeoutMs, `Sandbox create did not complete within ${timeoutMs}ms. The provision may still be running server-side; retry create() with idempotencyKey="${idempotencyKey}" to join it.`);
|
|
1771
1810
|
const waitBeforeRetry = async (error, failedAttempt) => {
|
|
@@ -1832,7 +1871,7 @@ var SandboxClient = class {
|
|
|
1832
1871
|
}
|
|
1833
1872
|
}
|
|
1834
1873
|
if (deferredProfileForPriming !== void 0) try {
|
|
1835
|
-
await instance.
|
|
1874
|
+
await instance.primeProfile(deferredProfileForPriming);
|
|
1836
1875
|
} catch (err) {
|
|
1837
1876
|
console.warn(`[sandbox.create] Profile priming failed for ${instance.id}; turns will send the full profile inline. Cause: ${err instanceof Error ? err.message : String(err)}`);
|
|
1838
1877
|
}
|
|
@@ -1916,6 +1955,34 @@ var SandboxClient = class {
|
|
|
1916
1955
|
return createSandboxInstanceFromResponse(this, this.parseInfo(data));
|
|
1917
1956
|
}
|
|
1918
1957
|
/**
|
|
1958
|
+
* Return the identity the public Sandbox API observed for this credential.
|
|
1959
|
+
*
|
|
1960
|
+
* This is useful for deployment checks that must confirm which account and
|
|
1961
|
+
* API key a service credential resolves to without exposing the key itself.
|
|
1962
|
+
*/
|
|
1963
|
+
async getIdentity() {
|
|
1964
|
+
const response = await this.fetch("/v1/me");
|
|
1965
|
+
if (!response.ok) {
|
|
1966
|
+
const body = await response.text();
|
|
1967
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
1968
|
+
}
|
|
1969
|
+
const payload = await response.json();
|
|
1970
|
+
const data = payload.data;
|
|
1971
|
+
if (payload.success !== true || !data || typeof data !== "object" || Array.isArray(data)) throw new ValidationError("Sandbox API returned an invalid /v1/me response");
|
|
1972
|
+
const identity = data;
|
|
1973
|
+
const customerId = identity.customer_id;
|
|
1974
|
+
const billingOwnerId = identity.billing_owner_id;
|
|
1975
|
+
const apiKeyId = identity.api_key_id;
|
|
1976
|
+
const billingDelegationAuthorized = identity.billing_delegation_authorized;
|
|
1977
|
+
if (typeof customerId !== "string" || !customerId || typeof billingOwnerId !== "string" || !billingOwnerId || apiKeyId !== null && typeof apiKeyId !== "string" || billingDelegationAuthorized !== void 0 && typeof billingDelegationAuthorized !== "boolean") throw new ValidationError("Sandbox API returned an invalid identity response");
|
|
1978
|
+
return {
|
|
1979
|
+
customerId,
|
|
1980
|
+
billingOwnerId,
|
|
1981
|
+
apiKeyId,
|
|
1982
|
+
billingDelegationAuthorized: billingDelegationAuthorized === true
|
|
1983
|
+
};
|
|
1984
|
+
}
|
|
1985
|
+
/**
|
|
1919
1986
|
* Get usage information for the account.
|
|
1920
1987
|
*
|
|
1921
1988
|
* @returns Usage statistics for the current billing period
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $
|
|
2
|
-
import { c as TraceExportResult, l as TraceExportSink, n as SandboxInstance, t as HttpClient } from "./sandbox-
|
|
1
|
+
import { $n as SandboxFleetArtifactSpec, A as CreateIntelligenceReportOptions, An as PublishPublicTemplateVersionOptions, Cr as SandboxFleetWorkspaceRestoreResult, Ct as FleetExecDispatchResult, Dn as PublicTemplateInfo, Er as SandboxInfo, Et as FleetPromptDispatchResult, F as CreateSandboxOptions, Jn as SandboxClientConfig, Jt as IntelligenceReportCompareTo, Ki as BatchEvent, Kt as IntelligenceReport, M as CreateSandboxFleetOptions, Mi as TokenRefreshHandler, Mn as ReapExpiredSandboxFleetsResult, N as CreateSandboxFleetTokenOptions, Nn as ReconcileSandboxFleetsOptions, On as PublicTemplateVersionInfo, P as CreateSandboxFleetWithCoordinatorOptions, Pn as ReconcileSandboxFleetsResult, Qn as SandboxFleetArtifact, Sn as PromptResult, Sr as SandboxFleetWorkspaceReconcileResult, St as FleetExecDispatchOptions, Tr as SandboxIdentity, Tt as FleetPromptDispatchOptions, Xn as SandboxEnvironment, Xt as IntelligenceReportWindow, _ as BatchTask, _t as FleetDispatchResultBuffer, a as AttachSandboxFleetMachineOptions, ar as SandboxFleetInfo, bn as PromptInputPart, br as SandboxFleetUsage, bt as FleetDriveTurnOutcome, dr as SandboxFleetManifest, ei as SecretsManager, en as ListSandboxFleetOptions, er as SandboxFleetCostEstimate, g as BatchRunRequest, gr as SandboxFleetTraceBundle, gt as FleetDispatchCancelResult, h as BatchRunOptions, hi as SshKeysManager, hr as SandboxFleetToken, j as CreateRequestOptions, jn as ReapExpiredSandboxFleetsOptions, jr as SandboxProfileSummary, kn as PublishPublicTemplateOptions, lr as SandboxFleetMachineRecord, m as BatchResult, nr as SandboxFleetDispatchResponse, nt as ExecResult, p as BatchOptions, pr as SandboxFleetOperationsSummary, qt as IntelligenceReportBudget, rr as SandboxFleetDriverCapability, tn as ListSandboxOptions, tt as ExecOptions, vt as FleetDispatchResultBufferOptions, wr as SandboxFleetWorkspaceSnapshotResult, wt as FleetMachineId, xn as PromptOptions, xt as FleetDriveTurnRequest, yi as SubscriptionInfo, yr as SandboxFleetTraceOptions, yt as FleetDispatchStreamOptions, zi as UsageInfo } from "./types-Dph9_dE4.js";
|
|
2
|
+
import { c as TraceExportResult, l as TraceExportSink, n as SandboxInstance, t as HttpClient } from "./sandbox-eH5LS4U_.js";
|
|
3
3
|
|
|
4
4
|
//#region src/lib/sse-parser.d.ts
|
|
5
5
|
/**
|
|
@@ -94,6 +94,18 @@ declare class SandboxFleet {
|
|
|
94
94
|
prompt(machineId: FleetMachineId, message: string | PromptInputPart[], options?: PromptOptions): Promise<PromptResult>;
|
|
95
95
|
dispatchPrompt(message: string | PromptInputPart[], options?: FleetPromptDispatchOptions): Promise<FleetPromptDispatchResult[]>;
|
|
96
96
|
dispatchPromptDetailed(message: string | PromptInputPart[], options?: FleetPromptDispatchOptions): Promise<SandboxFleetDispatchResponse<FleetPromptDispatchResult>>;
|
|
97
|
+
/**
|
|
98
|
+
* Drive one settle → poll → dispatch pass across N machines at once — the
|
|
99
|
+
* fleet counterpart of `box.driveTurn()` for tick-based callers (Workflows
|
|
100
|
+
* steps, queue consumers, crons) that re-invoke on their own schedule. One
|
|
101
|
+
* invocation never loops, never sleeps, and never holds a connection: each
|
|
102
|
+
* machine gets exactly one pass, and a per-machine failure is captured in
|
|
103
|
+
* that machine's outcome instead of failing the batch, so the caller
|
|
104
|
+
* re-drives survivors on its next tick and only escalates the errors.
|
|
105
|
+
*/
|
|
106
|
+
driveTurns(turns: readonly FleetDriveTurnRequest[], options?: {
|
|
107
|
+
concurrency?: number;
|
|
108
|
+
}): Promise<FleetDriveTurnOutcome[]>;
|
|
97
109
|
manifest(): Promise<SandboxFleetManifest>;
|
|
98
110
|
attachMachine(machine: AttachSandboxFleetMachineOptions): Promise<SandboxFleetMachineRecord>;
|
|
99
111
|
detachMachine(machineId: FleetMachineId): Promise<{
|
|
@@ -370,6 +382,13 @@ declare class SandboxClient implements HttpClient {
|
|
|
370
382
|
* ```
|
|
371
383
|
*/
|
|
372
384
|
get(id: string): Promise<SandboxInstance | null>;
|
|
385
|
+
/**
|
|
386
|
+
* Return the identity the public Sandbox API observed for this credential.
|
|
387
|
+
*
|
|
388
|
+
* This is useful for deployment checks that must confirm which account and
|
|
389
|
+
* API key a service credential resolves to without exposing the key itself.
|
|
390
|
+
*/
|
|
391
|
+
getIdentity(): Promise<SandboxIdentity>;
|
|
373
392
|
/**
|
|
374
393
|
* Get usage information for the account.
|
|
375
394
|
*
|
package/dist/core.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as WorkspaceImagePublishResult, i as WorkspaceImagePublishRequestOptions, n as SandboxInstance, o as WorkspaceImages, r as WorkspaceImagePublishInput } from "./sandbox-
|
|
3
|
-
import { i as SandboxClient } from "./client-
|
|
1
|
+
import { Er as SandboxInfo, F as CreateSandboxOptions, Jn as SandboxClientConfig, Lr as SandboxStatus, an as NetworkConfig, dn as PreviewLinkManager, nt as ExecResult, tt as ExecOptions, un as PreviewLinkInfo } from "./types-Dph9_dE4.js";
|
|
2
|
+
import { a as WorkspaceImagePublishResult, i as WorkspaceImagePublishRequestOptions, n as SandboxInstance, o as WorkspaceImages, r as WorkspaceImagePublishInput } from "./sandbox-eH5LS4U_.js";
|
|
3
|
+
import { i as SandboxClient } from "./client-BjkNkFl7.js";
|
|
4
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-C8HMx78o.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, type WorkspaceImagePublishInput, type WorkspaceImagePublishRequestOptions, type WorkspaceImagePublishResult, WorkspaceImages };
|
package/dist/core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
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-D9fFOWX9.js";
|
|
2
|
-
import { i as WorkspaceImages, t as SandboxInstance } from "./sandbox-
|
|
3
|
-
import { n as SandboxClient } from "./client-
|
|
2
|
+
import { i as WorkspaceImages, t as SandboxInstance } from "./sandbox-D77F7Yja.js";
|
|
3
|
+
import { n as SandboxClient } from "./client-B1cU2xzD.js";
|
|
4
4
|
export { AuthError, CapabilityError, NetworkError, NotFoundError, PartialFailureError, QuotaError, SandboxClient as Sandbox, SandboxClient, SandboxError, SandboxInstance, ServerError, StateError, TimeoutError, ValidationError, WorkspaceImages };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as CreateSandboxOptions } from "./types-
|
|
2
|
-
import { n as SandboxInstance, t as HttpClient } from "./sandbox-
|
|
1
|
+
import { F as CreateSandboxOptions } from "./types-Dph9_dE4.js";
|
|
2
|
+
import { n as SandboxInstance, t as HttpClient } from "./sandbox-eH5LS4U_.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 { $ as EventStreamOptions, $i as
|
|
2
|
-
import { A as SandboxMcpEndpoint, C as RespondToPermissionOptions, D as CONTROL_PLANE_MCP_SERVER_NAME, E as BuildSandboxMcpConfigOptions, M as buildControlPlaneMcpConfig, N as buildSandboxMcpConfig, O as SANDBOX_MCP_SERVER_NAME, S as InterruptResult, T as BuildControlPlaneMcpConfigOptions, _ as InteractiveAuthFile, a as WorkspaceImagePublishResult, b as InteractiveSessionInfo, c as TraceExportResult, d as exportTraceBundle, f as otelTraceIdForTangleTrace, g as InteractiveAttachOptions, h as SandboxSession, i as WorkspaceImagePublishRequestOptions, j as SandboxMcpServerEntry, k as SandboxMcpConfig, l as TraceExportSink, m as SandboxTaskSession, n as SandboxInstance, o as WorkspaceImages, p as toOtelJson, r as WorkspaceImagePublishInput, s as TraceExportFormat, u as buildTraceExportPayload, v as InteractiveSessionHandle, w as StartInteractiveOptions, x as InteractiveSessionStatus, y as InteractiveSessionHost } from "./sandbox-
|
|
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 { $ as EventStreamOptions, $i as TerminalStream, $n as SandboxFleetArtifactSpec, $r as SecretInfo, $t as ListOptions, A as CreateIntelligenceReportOptions, Ai as TeePublicKey, An as PublishPublicTemplateVersionOptions, Ar as SandboxPortPreviewLink, At as GitCommit, B as DirectoryPermission, Bi as WaitForOptions, Bn as RolloutOptions, Br as SandboxTerminalInfo, Bt as GpuLeaseProviderName, Ca as defineAgentProfile, Ci as TaskSessionCommitResult, Cn as ProvisionEvent, Cr as SandboxFleetWorkspaceRestoreResult, D as CommitTaskSessionOptions, Da as validateAgentProfileSecurity, Di as TeeAttestationOptions, Dn as PublicTemplateInfo, Dr as SandboxIntelligenceEnvelope, Dt as GPU_LEASE_PROVIDER_NAMES, Ea as mergeAgentProfiles, Ei as TaskSessionProfile, En as ProvisionStep, Er as SandboxInfo, F as CreateSandboxOptions, Fi as TurnDriveResult, Fn as RenameOptions, Fr as SandboxRuntimeProfile, Ft as GpuLeaseBilling, G as DriveTurnOptions, Gi as BatchBackendStats, Gn as RunCodeOptions, Gr as SandboxTraceEvent, Gt as InstalledTool, H as DispatchedSession, Hi as WriteFileOptions, Hn as RolloutStartResult, Hr as SandboxTerminalRequestOptions, Ht as GpuType, I as CreateSessionOptions, Ii as UpdateUserOptions, Ir as SandboxRuntimeProfileList, It as GpuLeaseCommandResult, J as DriverType, Ji as BatchSidecarGroup, Jn as SandboxClientConfig, Jr as SandboxUser, Jt as IntelligenceReportCompareTo, K as DriverConfig, Ki as BatchEvent, Kn as SSHCommandDescriptor, Kr as SandboxTraceExport, Kt as IntelligenceReport, L as CreateTaskSessionOptions, Li as UploadOptions, Lr as SandboxStatus, Lt as GpuLeaseExecOptions, M as CreateSandboxFleetOptions, Mi as TokenRefreshHandler, Mn as ReapExpiredSandboxFleetsResult, Mr as SandboxResourceUsage, Mt as GitDiff, Ni as TokenUsage, Nn as ReconcileSandboxFleetsOptions, Nr as SandboxResources, Nt as GitStatus, O as CompletedTurnResult, Oi as TeeAttestationReport, On as PublicTemplateVersionInfo, Or as SandboxPermissionsConfig, Ot as GitAuth, P as CreateSandboxFleetWithCoordinatorOptions, Pi as ToolsConfig, Pn as ReconcileSandboxFleetsResult, Pr as SandboxRuntimeHealth, Pt as GpuLease, Q as EnsureDevServerOptions, Qi as TerminalReadyInfo, Qn as SandboxFleetArtifact, Qr as SearchOptions, Qt as ListMessagesOptions, R as DeleteOptions, Ri as UploadProgress, Rn as Rollout, Rr as SandboxTerminalAttachOptions, Rt as GpuLeaseExecResult, Sa as capabilitySchema, Si as TaskSessionChanges, Sn as PromptResult, Sr as SandboxFleetWorkspaceReconcileResult, St as FleetExecDispatchOptions, T as CodeResult, Ta as defineInlineResource, Ti as TaskSessionInfo, Tn as ProvisionStatus, Tr as SandboxIdentity, Tt as FleetPromptDispatchOptions, U as DownloadOptions, Ui as WriteManyFile, Un as RolloutStatus, Ur as SandboxTerminals, Ut as HostAgentDriverConfig, V as DispatchPromptOptions, Vi as WaitForRolloutOptions, Vn as RolloutScorer, Vr as SandboxTerminalManager, Vt as GpuLeaseStatus, W as DownloadProgress, Wi as WriteManyOptions, Wn as RolloutTurnPart, Wr as SandboxTraceBundle, Wt as HostAgentRuntimeBackend, X as EgressManager, Xi as TERMINAL_WS_ECHO_SUBPROTOCOL, Xn as SandboxEnvironment, Xr as ScopedTokenScope, Xt as IntelligenceReportWindow, Yi as BatchTaskUsage, Yn as SandboxConnection, Yr as ScopedToken, Yt as IntelligenceReportSubjectType, Z as EgressPolicy, Zi as TerminalExitInfo, Zn as SandboxEvent, Zr as SearchMatch, _ as BatchTask, _a as AgentProfileValidationIssue, _i as StartupOperation, _n as ProcessSignal, _r as SandboxFleetTraceEvent, _t as FleetDispatchResultBuffer, a as AttachSandboxFleetMachineOptions, aa as AgentProfile, ai as SessionEventStreamOptions, an as NetworkConfig, ar as SandboxFleetInfo, at as FileReadBatchResult, b as ChunkedUploadOptions, ba as Capability, bi as TaskOptions, br as SandboxFleetUsage, bt as FleetDriveTurnOutcome, c as BackendInfo, ca as AgentProfileConnection, ci as SessionListOptions, cn as PermissionLevel, cr as SandboxFleetMachineMeteredUsage, ct as FileRenameResult, d as BackendType, da as AgentProfileModelHints, di as SessionStatus, dn as PreviewLinkManager, dr as SandboxFleetManifest, dt as FileTreeOptions, ea as TerminalStreamAuthFormat, ei as SecretsManager, en as ListSandboxFleetOptions, er as SandboxFleetCostEstimate, et as ExactProcessSpawnOptions, f as BatchBackend, fa as AgentProfilePermissionValue, fi as SnapshotInfo, fn as Process, fr as SandboxFleetManifestMachine, ft as FileTreeResult, g as BatchRunRequest, ga as AgentProfileSecurityPolicy, gi as StartupDiagnostics, gn as ProcessManager, gr as SandboxFleetTraceBundle, gt as FleetDispatchCancelResult, h as BatchRunOptions, ha as AgentProfileResources, hn as ProcessLogEntry, hr as SandboxFleetToken, ht as FileWriteResult, i as AttachGpuLeaseOptions, ia as TerminalStreamToken, ii as SessionBackendCredentials, in as MkdirOptions, ir as SandboxFleetDriverTimings, it as FileReadBatchOptions, j as CreateRequestOptions, ji as TeePublicKeyResponse, jn as ReapExpiredSandboxFleetsOptions, jr as SandboxProfileSummary, jt as GitConfig, k as CreateGpuLeaseOptions, ki as TeeAttestationResponse, kn as PublishPublicTemplateOptions, kr as SandboxPortBinding, kt as GitBranch, l as BackendManager, la as AgentProfileFileMount, li as SessionMessage, ln as PermissionsManager, lr as SandboxFleetMachineRecord, lt as FileSystem, m as BatchResult, ma as AgentProfileResourceRef, mi as SnapshotResult, mn as ProcessListOptions, mr as SandboxFleetPolicy, mt as FileUsageResult, n as AccessPolicyRule, na as TerminalStreamHandlers, ni as SendSessionMessageRequest, nn as McpServerConfig, nr as SandboxFleetDispatchResponse, nt as ExecResult, o as BackendCapabilities, oa as AgentProfileCapabilities, oi as SessionForkOptions, on as NetworkManager, or as SandboxFleetIntelligenceEnvelope, ot as FileReadError, p as BatchOptions, pa as AgentProfilePrompt, pi as SnapshotOptions, pn as ProcessInfo, pr as SandboxFleetOperationsSummary, pt as FileUsageOptions, q as DriverInfo, qi as BatchEventDataMap, qn as SSHCredentials, qr as SandboxTraceOptions, qt as IntelligenceReportBudget, r as AddUserOptions, ra as TerminalStreamOptions, ri as SentSessionMessage, rn as MintScopedTokenOptions, rr as SandboxFleetDriverCapability, rt as FileInfo, s as BackendConfig, sa as AgentProfileConfidential, si as SessionInfo, sn as NonHostAgentDriverConfig, sr as SandboxFleetMachine, st as FileReadResult, t as AcceleratorKind, ta as TerminalStreamError, ti as SendSessionMessageOptions, tn as ListSandboxOptions, tr as SandboxFleetDispatchFailureClass, tt as ExecOptions, u as BackendStatus, ua as AgentProfileMcpServer, ui as SessionMessageInputPart, un as PreviewLinkInfo, ur as SandboxFleetMachineSpec, ut as FileTreeFile, v as BatchTaskResult, va as AgentProfileValidationResult, vi as StorageConfig, vn as ProcessSpawnOptions, vr as SandboxFleetTraceExport, vt as FleetDispatchResultBufferOptions, wa as defineGitHubResource, wi as TaskSessionFileChange, wn as ProvisionResult, wr as SandboxFleetWorkspaceSnapshotResult, wt as FleetMachineId, x as ChunkedUploadResult, xa as agentProfileSchema, xi as TaskResult, xn as PromptOptions, xr as SandboxFleetWorkspace, xt as FleetDriveTurnRequest, y as BranchOptions, ya as AgentSubagentProfile, yi as SubscriptionInfo, yn as ProcessStatus, yr as SandboxFleetTraceOptions, yt as FleetDispatchStreamOptions, z as DevServerInfo, zi as UsageInfo, zn as RolloutChildResult, zr as SandboxTerminalCreateOptions, zt as GpuLeaseManager } from "./types-Dph9_dE4.js";
|
|
2
|
+
import { A as SandboxMcpEndpoint, C as RespondToPermissionOptions, D as CONTROL_PLANE_MCP_SERVER_NAME, E as BuildSandboxMcpConfigOptions, M as buildControlPlaneMcpConfig, N as buildSandboxMcpConfig, O as SANDBOX_MCP_SERVER_NAME, S as InterruptResult, T as BuildControlPlaneMcpConfigOptions, _ as InteractiveAuthFile, a as WorkspaceImagePublishResult, b as InteractiveSessionInfo, c as TraceExportResult, d as exportTraceBundle, f as otelTraceIdForTangleTrace, g as InteractiveAttachOptions, h as SandboxSession, i as WorkspaceImagePublishRequestOptions, j as SandboxMcpServerEntry, k as SandboxMcpConfig, l as TraceExportSink, m as SandboxTaskSession, n as SandboxInstance, o as WorkspaceImages, p as toOtelJson, r as WorkspaceImagePublishInput, s as TraceExportFormat, u as buildTraceExportPayload, v as InteractiveSessionHandle, w as StartInteractiveOptions, x as InteractiveSessionStatus, y as InteractiveSessionHost } from "./sandbox-eH5LS4U_.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-BjkNkFl7.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
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-C8HMx78o.js";
|
|
7
|
-
import { s as TangleSandboxClientConfig, t as TangleSandboxClient } from "./index-
|
|
7
|
+
import { s as TangleSandboxClientConfig, t as TangleSandboxClient } from "./index-DHhxHd85.js";
|
|
8
8
|
|
|
9
9
|
//#region src/attestation-heartbeat.d.ts
|
|
10
10
|
interface TeeAttestationHeartbeatSample {
|
|
@@ -1404,4 +1404,4 @@ interface RouterEvalMatrixCaseResult {
|
|
|
1404
1404
|
}
|
|
1405
1405
|
declare function runTangleRouterEvalMatrixInSandbox(options: RunTangleRouterEvalMatrixInSandboxOptions): Promise<RunTangleRouterEvalMatrixInSandboxResult>;
|
|
1406
1406
|
//#endregion
|
|
1407
|
-
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 FileUsageOptions, type FileUsageResult, 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 InteractiveAttachOptions, 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 ProcessListOptions, 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 SandboxTerminalAttachOptions, type SandboxTerminalCreateOptions, type SandboxTerminalInfo, type SandboxTerminalManager, type SandboxTerminalRequestOptions, type SandboxTerminals, 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 SplitInlineProfileSkillsResult, type StartInteractiveOptions, type StartupDiagnostics, type StartupOperation, StateError, type StorageConfig, type SubscriptionInfo, TERMINAL_WS_ECHO_SUBPROTOCOL, 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, type TerminalExitInfo, type TerminalReadyInfo, TerminalStream, type TerminalStreamAuthFormat, TerminalStreamError, type TerminalStreamHandlers, type TerminalStreamOptions, type TerminalStreamToken, 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 WorkspaceImagePublishInput, type WorkspaceImagePublishRequestOptions, type WorkspaceImagePublishResult, WorkspaceImages, 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, splitInlineProfileSkills, startTeeAttestationHeartbeat, toOtelJson, validateAgentProfileSecurity, validateDeferredProfileFileMounts };
|
|
1407
|
+
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 FileUsageOptions, type FileUsageResult, type FileWriteResult, type FleetDispatchCancelResult, type FleetDispatchResultBuffer, type FleetDispatchResultBufferOptions, type FleetDispatchStreamOptions, type FleetDriveTurnOutcome, type FleetDriveTurnRequest, 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 InteractiveAttachOptions, 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 ProcessListOptions, 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 SandboxIdentity, 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 SandboxTerminalAttachOptions, type SandboxTerminalCreateOptions, type SandboxTerminalInfo, type SandboxTerminalManager, type SandboxTerminalRequestOptions, type SandboxTerminals, 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 SplitInlineProfileSkillsResult, type StartInteractiveOptions, type StartupDiagnostics, type StartupOperation, StateError, type StorageConfig, type SubscriptionInfo, TERMINAL_WS_ECHO_SUBPROTOCOL, 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, type TerminalExitInfo, type TerminalReadyInfo, TerminalStream, type TerminalStreamAuthFormat, TerminalStreamError, type TerminalStreamHandlers, type TerminalStreamOptions, type TerminalStreamToken, TimeoutError, type TokenRefreshHandler, type TokenUsage, type ToolsConfig, type TraceExportFormat, type TraceExportResult, type TraceExportSink, type TurnDriveResult, type UpdateUserOptions, type UploadOptions, type UploadProgress, type UsageInfo, ValidationError, type WaitForOptions, type WaitForRolloutOptions, type WorkspaceImagePublishInput, type WorkspaceImagePublishRequestOptions, type WorkspaceImagePublishResult, WorkspaceImages, 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, splitInlineProfileSkills, startTeeAttestationHeartbeat, toOtelJson, validateAgentProfileSecurity, validateDeferredProfileFileMounts };
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { d as serializeForSidecar, l as normalizeRuntimeBackendConfig } from "./runtime-api-XhAv6YiH.js";
|
|
2
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-D9fFOWX9.js";
|
|
3
|
-
import { _ as otelTraceIdForTangleTrace, a as TERMINAL_WS_ECHO_SUBPROTOCOL, c as SandboxTaskSession, d as applySandboxEventText, f as collectAgentResponseText, g as exportTraceBundle, h as buildTraceExportPayload, i as WorkspaceImages, l as SandboxSession, o as TerminalStream, p as getSandboxEventText, s as TerminalStreamError, t as SandboxInstance, u as InteractiveSessionHandle, v as toOtelJson, y as parseSSEStream } from "./sandbox-
|
|
4
|
-
import { a as splitInlineProfileSkills, c as SandboxFleetClient, d as SANDBOX_SIZE_PRESET_NAMES, f as resolveSandboxResources, i as splitInlineProfileFileMounts, l as DEFAULT_SANDBOX_SIZE, n as SandboxClient, o as validateDeferredProfileFileMounts, p as sandboxResourcesForSize, r as materializeProfileFileMounts, s as SandboxFleet, t as IntelligenceClient, u as SANDBOX_SIZE_PRESETS } from "./client-
|
|
3
|
+
import { _ as otelTraceIdForTangleTrace, a as TERMINAL_WS_ECHO_SUBPROTOCOL, c as SandboxTaskSession, d as applySandboxEventText, f as collectAgentResponseText, g as exportTraceBundle, h as buildTraceExportPayload, i as WorkspaceImages, l as SandboxSession, o as TerminalStream, p as getSandboxEventText, s as TerminalStreamError, t as SandboxInstance, u as InteractiveSessionHandle, v as toOtelJson, y as parseSSEStream } from "./sandbox-D77F7Yja.js";
|
|
4
|
+
import { a as splitInlineProfileSkills, c as SandboxFleetClient, d as SANDBOX_SIZE_PRESET_NAMES, f as resolveSandboxResources, i as splitInlineProfileFileMounts, l as DEFAULT_SANDBOX_SIZE, n as SandboxClient, o as validateDeferredProfileFileMounts, p as sandboxResourcesForSize, r as materializeProfileFileMounts, s as SandboxFleet, t as IntelligenceClient, u as SANDBOX_SIZE_PRESETS } from "./client-B1cU2xzD.js";
|
|
5
5
|
import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-DdD_rFZQ.js";
|
|
6
|
-
import { t as TangleSandboxClient } from "./tangle-
|
|
6
|
+
import { t as TangleSandboxClient } from "./tangle-DpxmcNGp.js";
|
|
7
7
|
import { agentProfileSchema, capabilitySchema, defineAgentProfile, defineGitHubResource, defineInlineResource, mergeAgentProfiles, validateAgentProfileSecurity } from "@tangle-network/agent-interface";
|
|
8
8
|
//#region src/confidential.ts
|
|
9
9
|
function generateAttestationNonce(bytes = 32) {
|
package/dist/runtime.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Br as SandboxTerminalInfo, Ci as TaskSessionCommitResult, D as CommitTaskSessionOptions, Fn as RenameOptions, Hi as WriteFileOptions, Hr as SandboxTerminalRequestOptions, I as CreateSessionOptions, Ir as SandboxRuntimeProfileList, L as CreateTaskSessionOptions, Pr as SandboxRuntimeHealth, Qt as ListMessagesOptions, Ri as UploadProgress, Si as TaskSessionChanges, Ti as TaskSessionInfo, Vr as SandboxTerminalManager, at as FileReadBatchResult, b as ChunkedUploadOptions, ct as FileRenameResult, dt as FileTreeOptions, ft as FileTreeResult, ht as FileWriteResult, it as FileReadBatchOptions, kr as SandboxPortBinding, li as SessionMessage, mt as FileUsageResult, ni as SendSessionMessageRequest, pt as FileUsageOptions, ri as SentSessionMessage, si as SessionInfo, ti as SendSessionMessageOptions, x as ChunkedUploadResult, zr as SandboxTerminalCreateOptions } from "./types-Dph9_dE4.js";
|
|
2
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-C8HMx78o.js";
|
|
3
3
|
|
|
4
4
|
//#region src/lib/chunked-upload.d.ts
|
|
@@ -2207,26 +2207,33 @@ var SandboxInstance = class SandboxInstance {
|
|
|
2207
2207
|
* already yielded (based on event ID tracking) are deduplicated.
|
|
2208
2208
|
*/
|
|
2209
2209
|
/**
|
|
2210
|
-
* Record that the runtime holds `profile` under `sha256
|
|
2211
|
-
*
|
|
2212
|
-
*
|
|
2213
|
-
*
|
|
2214
|
-
*
|
|
2210
|
+
* Record that the runtime already holds `profile` under `sha256`, so
|
|
2211
|
+
* subsequent turns whose profile serializes byte-identically send
|
|
2212
|
+
* `backend.profileSha256` instead of the inline corpus. Use this to hydrate
|
|
2213
|
+
* a freshly-fetched instance (`get()`/`list()`) from caller-persisted state
|
|
2214
|
+
* — the reference otherwise lives only on the instance that primed it.
|
|
2215
|
+
* Captures a content snapshot, so mutating the object afterwards is
|
|
2216
|
+
* detected and that turn falls back to sending the profile inline.
|
|
2215
2217
|
*/
|
|
2216
|
-
|
|
2218
|
+
attachProfileReference(profile, sha256) {
|
|
2217
2219
|
this.deferredProfileReference = {
|
|
2218
2220
|
snapshot: serializeProfileSnapshot(profile),
|
|
2219
2221
|
sha256
|
|
2220
2222
|
};
|
|
2221
2223
|
}
|
|
2222
2224
|
/**
|
|
2223
|
-
*
|
|
2224
|
-
*
|
|
2225
|
-
* by
|
|
2226
|
-
*
|
|
2227
|
-
*
|
|
2225
|
+
* Upload `profile` to the runtime once (`POST /agents/profiles`) and record
|
|
2226
|
+
* the returned hash via {@link attachProfileReference}, so subsequent turns
|
|
2227
|
+
* reference it by `profileSha256` instead of re-sending the corpus.
|
|
2228
|
+
* `create()` calls this automatically for its inline profile when
|
|
2229
|
+
* `autoDeferProfile` is on; call it directly when the profile only exists
|
|
2230
|
+
* per-turn, or when the instance was fetched rather than created. Persist
|
|
2231
|
+
* the returned sha256 alongside a content hash of the profile to
|
|
2232
|
+
* re-attach on later instances without re-priming. Throws on transport/HTTP
|
|
2233
|
+
* failure — the caller decides whether that is fatal (it is not: turns fall
|
|
2234
|
+
* back to sending the full profile inline).
|
|
2228
2235
|
*/
|
|
2229
|
-
async
|
|
2236
|
+
async primeProfile(profile) {
|
|
2230
2237
|
const response = await this.runtimeFetch("/agents/profiles", {
|
|
2231
2238
|
method: "POST",
|
|
2232
2239
|
headers: { "content-type": "application/json" },
|
|
@@ -2241,7 +2248,7 @@ var SandboxInstance = class SandboxInstance {
|
|
|
2241
2248
|
}
|
|
2242
2249
|
const data = await response.json();
|
|
2243
2250
|
if (typeof data.sha256 !== "string" || data.sha256.length === 0) throw new Error("Profile priming returned no sha256; runtime response malformed");
|
|
2244
|
-
this.
|
|
2251
|
+
this.attachProfileReference(profile, data.sha256);
|
|
2245
2252
|
return data.sha256;
|
|
2246
2253
|
}
|
|
2247
2254
|
/**
|
|
@@ -5750,10 +5757,12 @@ function settleTurnDrive(result) {
|
|
|
5750
5757
|
state: "failed",
|
|
5751
5758
|
error: typeof result.error === "string" && result.error.length > 0 ? result.error : `turn ${status}`
|
|
5752
5759
|
};
|
|
5760
|
+
const usage = readTokenUsage(result);
|
|
5753
5761
|
return {
|
|
5754
5762
|
state: "completed",
|
|
5755
5763
|
text: text ?? "",
|
|
5756
|
-
result
|
|
5764
|
+
result,
|
|
5765
|
+
...usage ? { usage } : {}
|
|
5757
5766
|
};
|
|
5758
5767
|
}
|
|
5759
5768
|
var DirectRuntimeHttpClient = class {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as EventStreamOptions, $
|
|
1
|
+
import { $ as EventStreamOptions, $i as TerminalStream, At as GitCommit, Bi as WaitForOptions, Bn as RolloutOptions, C as CodeExecutionResult, Ci as TaskSessionCommitResult, Cn as ProvisionEvent, D as CommitTaskSessionOptions, Di as TeeAttestationOptions, Er as SandboxInfo, Fi as TurnDriveResult, G as DriveTurnOptions, Gt as InstalledTool, H as DispatchedSession, Hi as WriteFileOptions, Hn as RolloutStartResult, I as CreateSessionOptions, In as RestoreSnapshotOptions, Ir as SandboxRuntimeProfileList, Jt as IntelligenceReportCompareTo, Kn as SSHCommandDescriptor, Kt as IntelligenceReport, L as CreateTaskSessionOptions, Ln as ResumeOptions, Lr as SandboxStatus, Mr as SandboxResourceUsage, Mt as GitDiff, Nt as GitStatus, O as CompletedTurnResult, Pr as SandboxRuntimeHealth, Pt as GpuLease, Qr as SearchOptions, Qt as ListMessagesOptions, Rn as Rollout, Rr as SandboxTerminalAttachOptions, S as CodeExecutionOptions, Si as TaskSessionChanges, Sn as PromptResult, Ti as TaskSessionInfo, Ui as WriteManyFile, Ur as SandboxTerminals, V as DispatchPromptOptions, Vi as WaitForRolloutOptions, Wi as WriteManyOptions, Wr as SandboxTraceBundle, X as EgressManager, Xt as IntelligenceReportWindow, Y as DurablePlan, Yn as SandboxConnection, Yr as ScopedToken, Zn as SandboxEvent, Zr as SearchMatch, Zt as JsonValue, ai as SessionEventStreamOptions, bi as TaskOptions, bn as PromptInputPart, ci as SessionListOptions, dn as PreviewLinkManager, fi as SnapshotInfo, gi as StartupDiagnostics, gn as ProcessManager, gr as SandboxFleetTraceBundle, ht as FileWriteResult, ji as TeePublicKeyResponse, ki as TeeAttestationResponse, kr as SandboxPortBinding, kt as GitBranch, l as BackendManager, li as SessionMessage, ln as PermissionsManager, lt as FileSystem, mi as SnapshotResult, na as TerminalStreamHandlers, ni as SendSessionMessageRequest, nt as ExecResult, oi as SessionForkOptions, on as NetworkManager, pi as SnapshotOptions, q as DriverInfo, qn as SSHCredentials, qr as SandboxTraceOptions, qt as IntelligenceReportBudget, ri as SentSessionMessage, rn as MintScopedTokenOptions, s as BackendConfig, si as SessionInfo, ti as SendSessionMessageOptions, tt as ExecOptions, w as CodeLanguage, wn as ProvisionResult, xi as TaskResult, xn as PromptOptions, y as BranchOptions, zt as GpuLeaseManager } from "./types-Dph9_dE4.js";
|
|
2
2
|
import { AgentProfile } from "@tangle-network/agent-interface";
|
|
3
3
|
|
|
4
4
|
//#region src/mcp.d.ts
|
|
@@ -880,21 +880,28 @@ declare class SandboxInstance {
|
|
|
880
880
|
* already yielded (based on event ID tracking) are deduplicated.
|
|
881
881
|
*/
|
|
882
882
|
/**
|
|
883
|
-
* Record that the runtime holds `profile` under `sha256
|
|
884
|
-
*
|
|
885
|
-
*
|
|
886
|
-
*
|
|
887
|
-
*
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
*
|
|
894
|
-
*
|
|
895
|
-
*
|
|
896
|
-
|
|
897
|
-
|
|
883
|
+
* Record that the runtime already holds `profile` under `sha256`, so
|
|
884
|
+
* subsequent turns whose profile serializes byte-identically send
|
|
885
|
+
* `backend.profileSha256` instead of the inline corpus. Use this to hydrate
|
|
886
|
+
* a freshly-fetched instance (`get()`/`list()`) from caller-persisted state
|
|
887
|
+
* — the reference otherwise lives only on the instance that primed it.
|
|
888
|
+
* Captures a content snapshot, so mutating the object afterwards is
|
|
889
|
+
* detected and that turn falls back to sending the profile inline.
|
|
890
|
+
*/
|
|
891
|
+
attachProfileReference(profile: object, sha256: string): void;
|
|
892
|
+
/**
|
|
893
|
+
* Upload `profile` to the runtime once (`POST /agents/profiles`) and record
|
|
894
|
+
* the returned hash via {@link attachProfileReference}, so subsequent turns
|
|
895
|
+
* reference it by `profileSha256` instead of re-sending the corpus.
|
|
896
|
+
* `create()` calls this automatically for its inline profile when
|
|
897
|
+
* `autoDeferProfile` is on; call it directly when the profile only exists
|
|
898
|
+
* per-turn, or when the instance was fetched rather than created. Persist
|
|
899
|
+
* the returned sha256 alongside a content hash of the profile to
|
|
900
|
+
* re-attach on later instances without re-priming. Throws on transport/HTTP
|
|
901
|
+
* failure — the caller decides whether that is fatal (it is not: turns fall
|
|
902
|
+
* back to sending the full profile inline).
|
|
903
|
+
*/
|
|
904
|
+
primeProfile(profile: object): Promise<string>;
|
|
898
905
|
/**
|
|
899
906
|
* Build the run request's `backend` body. When the outgoing profile's CONTENT
|
|
900
907
|
* matches the one the runtime already holds (and we are not resending after a
|
package/dist/tangle/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as TANGLE_JOBS_CONTRACT, c as AgentSandboxBlueprintAbi, d as SandboxCreateParamTypes, f as SandboxCreateResponseParamTypes, i as TANGLE_CHAIN_ID, l as ITangleJobsAbi, n as JOB_SANDBOX_CREATE, o as TANGLE_MAINNET_RPC, p as SandboxIdParamTypes, r as JOB_SANDBOX_DELETE, s as TangleSandboxClientConfig, t as TangleSandboxClient, u as JsonResponseParamTypes } from "../index-
|
|
1
|
+
import { a as TANGLE_JOBS_CONTRACT, c as AgentSandboxBlueprintAbi, d as SandboxCreateParamTypes, f as SandboxCreateResponseParamTypes, i as TANGLE_CHAIN_ID, l as ITangleJobsAbi, n as JOB_SANDBOX_CREATE, o as TANGLE_MAINNET_RPC, p as SandboxIdParamTypes, r as JOB_SANDBOX_DELETE, s as TangleSandboxClientConfig, t as TangleSandboxClient, u as JsonResponseParamTypes } from "../index-DHhxHd85.js";
|
|
2
2
|
export { AgentSandboxBlueprintAbi, ITangleJobsAbi, JOB_SANDBOX_CREATE, JOB_SANDBOX_DELETE, JsonResponseParamTypes, SandboxCreateParamTypes, SandboxCreateResponseParamTypes, SandboxIdParamTypes, TANGLE_CHAIN_ID, TANGLE_JOBS_CONTRACT, TANGLE_MAINNET_RPC, TangleSandboxClient, TangleSandboxClientConfig };
|
package/dist/tangle/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as TANGLE_JOBS_CONTRACT, c as ITangleJobsAbi, d as SandboxCreateResponseParamTypes, f as SandboxIdParamTypes, i as TANGLE_CHAIN_ID, l as JsonResponseParamTypes, n as JOB_SANDBOX_CREATE, o as TANGLE_MAINNET_RPC, r as JOB_SANDBOX_DELETE, s as AgentSandboxBlueprintAbi, t as TangleSandboxClient, u as SandboxCreateParamTypes } from "../tangle-
|
|
1
|
+
import { a as TANGLE_JOBS_CONTRACT, c as ITangleJobsAbi, d as SandboxCreateResponseParamTypes, f as SandboxIdParamTypes, i as TANGLE_CHAIN_ID, l as JsonResponseParamTypes, n as JOB_SANDBOX_CREATE, o as TANGLE_MAINNET_RPC, r as JOB_SANDBOX_DELETE, s as AgentSandboxBlueprintAbi, t as TangleSandboxClient, u as SandboxCreateParamTypes } from "../tangle-DpxmcNGp.js";
|
|
2
2
|
export { AgentSandboxBlueprintAbi, ITangleJobsAbi, JOB_SANDBOX_CREATE, JOB_SANDBOX_DELETE, JsonResponseParamTypes, SandboxCreateParamTypes, SandboxCreateResponseParamTypes, SandboxIdParamTypes, TANGLE_CHAIN_ID, TANGLE_JOBS_CONTRACT, TANGLE_MAINNET_RPC, TangleSandboxClient };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as parseErrorResponse } from "./errors-D9fFOWX9.js";
|
|
2
|
-
import { n as createSandboxInstanceFromResponse } from "./sandbox-
|
|
2
|
+
import { n as createSandboxInstanceFromResponse } from "./sandbox-D77F7Yja.js";
|
|
3
3
|
//#region src/tangle/abi.ts
|
|
4
4
|
/**
|
|
5
5
|
* Tangle Contract ABI Definitions
|
|
@@ -752,6 +752,7 @@ var TangleSandboxClient = class {
|
|
|
752
752
|
* Create a sandbox via on-chain job submission.
|
|
753
753
|
*/
|
|
754
754
|
async create(options) {
|
|
755
|
+
if (options?.billingOwnerId !== void 0) throw new Error("billingOwnerId is supported only by the HTTP Sandbox API client");
|
|
755
756
|
const createOptions = withAttestationNonce(options ?? {});
|
|
756
757
|
const encoded = this.chain.encodeSandboxCreateInputs(createOptions);
|
|
757
758
|
const { result: _result, callId, blockNumber } = await this.chain.submitJobAndWait(0, encoded);
|
|
@@ -1046,6 +1046,19 @@ interface CreateSandboxOptions {
|
|
|
1046
1046
|
* timeout-driven retries.
|
|
1047
1047
|
*/
|
|
1048
1048
|
idempotencyKey?: string;
|
|
1049
|
+
/**
|
|
1050
|
+
* Platform user id whose wallet funds managed model usage for this sandbox.
|
|
1051
|
+
*
|
|
1052
|
+
* Use only from a trusted first-party service acting for an authenticated
|
|
1053
|
+
* user. The Sandbox API honors this field only when the caller's exact
|
|
1054
|
+
* verified API key ID is allow-listed; otherwise strict deployments reject
|
|
1055
|
+
* the create.
|
|
1056
|
+
* It never grants the caller permission to charge arbitrary users.
|
|
1057
|
+
*
|
|
1058
|
+
* This option applies to the HTTP Sandbox API client. Direct Tangle job
|
|
1059
|
+
* creation does not support delegated billing.
|
|
1060
|
+
*/
|
|
1061
|
+
billingOwnerId?: string;
|
|
1049
1062
|
/**
|
|
1050
1063
|
* Auto-split inline file mounts out of an inline `backend.profile` object
|
|
1051
1064
|
* at create time, send the lean profile (mount refs stripped) in the
|
|
@@ -1662,6 +1675,15 @@ interface AgentQuestionRequest {
|
|
|
1662
1675
|
/** The questions payload the agent emitted (prompt + options per entry). */
|
|
1663
1676
|
questions: unknown;
|
|
1664
1677
|
}
|
|
1678
|
+
/**
|
|
1679
|
+
* Token usage counts for a single agent run: prompt tokens in, completion
|
|
1680
|
+
* tokens out. Both are whole non-negative counts; a runtime that reports
|
|
1681
|
+
* only one side leaves the other at 0.
|
|
1682
|
+
*/
|
|
1683
|
+
interface TokenUsage {
|
|
1684
|
+
inputTokens: number;
|
|
1685
|
+
outputTokens: number;
|
|
1686
|
+
}
|
|
1665
1687
|
interface PromptResult {
|
|
1666
1688
|
/**
|
|
1667
1689
|
* Whether the run succeeded. Shorthand for `status === "success"`: true only
|
|
@@ -1691,10 +1713,7 @@ interface PromptResult {
|
|
|
1691
1713
|
/** Duration in milliseconds */
|
|
1692
1714
|
durationMs: number;
|
|
1693
1715
|
/** Token usage */
|
|
1694
|
-
usage?:
|
|
1695
|
-
inputTokens: number;
|
|
1696
|
-
outputTokens: number;
|
|
1697
|
-
};
|
|
1716
|
+
usage?: TokenUsage;
|
|
1698
1717
|
/** Provider-reported model cost in USD, when the runtime emitted it. */
|
|
1699
1718
|
costUsd?: number;
|
|
1700
1719
|
}
|
|
@@ -2028,6 +2047,21 @@ interface UsageInfo {
|
|
|
2028
2047
|
/** Period end date (next day UTC) */
|
|
2029
2048
|
periodEnd: Date;
|
|
2030
2049
|
}
|
|
2050
|
+
/** Identity observed by the public Sandbox API for the current credential. */
|
|
2051
|
+
interface SandboxIdentity {
|
|
2052
|
+
/** Sandbox customer id for the authenticated caller. */
|
|
2053
|
+
customerId: string;
|
|
2054
|
+
/** Platform account whose wallet Sandbox charges for this caller. */
|
|
2055
|
+
billingOwnerId: string;
|
|
2056
|
+
/** Verified Platform API key id, or null for session-based callers. */
|
|
2057
|
+
apiKeyId: string | null;
|
|
2058
|
+
/**
|
|
2059
|
+
* Whether this key may select a funded platform payer on sandbox create.
|
|
2060
|
+
* `false` can also mean the connected Sandbox API predates this capability;
|
|
2061
|
+
* callers that require delegation must explicitly require `true`.
|
|
2062
|
+
*/
|
|
2063
|
+
billingDelegationAuthorized: boolean;
|
|
2064
|
+
}
|
|
2031
2065
|
/**
|
|
2032
2066
|
* Subscription and billing information for the account.
|
|
2033
2067
|
*/
|
|
@@ -2506,6 +2540,11 @@ type TurnDriveResult = {
|
|
|
2506
2540
|
state: "completed"; /** Final assistant text of the turn. */
|
|
2507
2541
|
text: string; /** The full turn payload (text, toolInvocations, tokenUsage, etc.). */
|
|
2508
2542
|
result: Record<string, unknown>;
|
|
2543
|
+
/**
|
|
2544
|
+
* Token usage the turn reported, when the payload carried it. Typed
|
|
2545
|
+
* access to the counts otherwise buried untyped inside `result`.
|
|
2546
|
+
*/
|
|
2547
|
+
usage?: TokenUsage;
|
|
2509
2548
|
} | {
|
|
2510
2549
|
state: "awaiting_plan_decision";
|
|
2511
2550
|
plan: DurablePlanSnapshot;
|
|
@@ -2518,6 +2557,32 @@ type TurnDriveResult = {
|
|
|
2518
2557
|
state: "failed"; /** Human-readable reason the turn is deterministically failed. */
|
|
2519
2558
|
error: string;
|
|
2520
2559
|
};
|
|
2560
|
+
/**
|
|
2561
|
+
* One machine's pass in a `fleet.driveTurns()` invocation: the machine to
|
|
2562
|
+
* drive, the message dispatched on a cold start (same semantics as
|
|
2563
|
+
* `box.driveTurn`), and the per-session drive options (`sessionId` is the
|
|
2564
|
+
* resume key — every tick for the same logical turn MUST pass the same id).
|
|
2565
|
+
*/
|
|
2566
|
+
interface FleetDriveTurnRequest {
|
|
2567
|
+
machineId: FleetMachineId;
|
|
2568
|
+
message: string | PromptInputPart[];
|
|
2569
|
+
options: DriveTurnOptions;
|
|
2570
|
+
}
|
|
2571
|
+
/**
|
|
2572
|
+
* Per-machine outcome of `fleet.driveTurns()`. A machine whose pass threw
|
|
2573
|
+
* (unreachable sandbox, unknown machine, dispatch failure) is captured as
|
|
2574
|
+
* `error` instead of failing the batch — tick-based callers re-drive the
|
|
2575
|
+
* survivors on the next invocation and only escalate the failures.
|
|
2576
|
+
*/
|
|
2577
|
+
type FleetDriveTurnOutcome = {
|
|
2578
|
+
machineId: FleetMachineId;
|
|
2579
|
+
outcome: "driven";
|
|
2580
|
+
result: TurnDriveResult;
|
|
2581
|
+
} | {
|
|
2582
|
+
machineId: FleetMachineId;
|
|
2583
|
+
outcome: "error";
|
|
2584
|
+
error: string;
|
|
2585
|
+
};
|
|
2521
2586
|
/**
|
|
2522
2587
|
* Scope of a `box.mintScopedToken()` request. `session` and `project` mint
|
|
2523
2588
|
* SessionGateway read tokens. `session-runtime` and `read-only` mint sidecar
|
|
@@ -5407,4 +5472,4 @@ interface CodeExecutionOptions {
|
|
|
5407
5472
|
idempotencyKey?: string;
|
|
5408
5473
|
}
|
|
5409
5474
|
//#endregion
|
|
5410
|
-
export { EventStreamOptions as $,
|
|
5475
|
+
export { EventStreamOptions as $, TerminalStream as $i, SandboxFleetArtifactSpec as $n, SecretInfo as $r, ListOptions as $t, CreateIntelligenceReportOptions as A, TeePublicKey as Ai, PublishPublicTemplateVersionOptions as An, SandboxPortPreviewLink as Ar, GitCommit as At, DirectoryPermission as B, WaitForOptions as Bi, RolloutOptions as Bn, SandboxTerminalInfo as Br, GpuLeaseProviderName as Bt, CodeExecutionResult as C, defineAgentProfile as Ca, TaskSessionCommitResult as Ci, ProvisionEvent as Cn, SandboxFleetWorkspaceRestoreResult as Cr, FleetExecDispatchResult as Ct, CommitTaskSessionOptions as D, validateAgentProfileSecurity as Da, TeeAttestationOptions as Di, PublicTemplateInfo as Dn, SandboxIntelligenceEnvelope as Dr, GPU_LEASE_PROVIDER_NAMES as Dt, CodeResultPart as E, mergeAgentProfiles as Ea, TaskSessionProfile as Ei, ProvisionStep as En, SandboxInfo as Er, FleetPromptDispatchResult as Et, CreateSandboxOptions as F, TurnDriveResult as Fi, RenameOptions as Fn, SandboxRuntimeProfile as Fr, GpuLeaseBilling as Ft, DriveTurnOptions as G, BatchBackendStats as Gi, RunCodeOptions as Gn, SandboxTraceEvent as Gr, InstalledTool as Gt, DispatchedSession as H, WriteFileOptions as Hi, RolloutStartResult as Hn, SandboxTerminalRequestOptions as Hr, GpuType as Ht, CreateSessionOptions as I, UpdateUserOptions as Ii, RestoreSnapshotOptions as In, SandboxRuntimeProfileList as Ir, GpuLeaseCommandResult as It, DriverType as J, BatchSidecarGroup as Ji, SandboxClientConfig as Jn, SandboxUser as Jr, IntelligenceReportCompareTo as Jt, DriverConfig as K, BatchEvent as Ki, SSHCommandDescriptor as Kn, SandboxTraceExport as Kr, IntelligenceReport as Kt, CreateTaskSessionOptions as L, UploadOptions as Li, ResumeOptions as Ln, SandboxStatus as Lr, GpuLeaseExecOptions as Lt, CreateSandboxFleetOptions as M, TokenRefreshHandler as Mi, ReapExpiredSandboxFleetsResult as Mn, SandboxResourceUsage as Mr, GitDiff as Mt, CreateSandboxFleetTokenOptions as N, TokenUsage as Ni, ReconcileSandboxFleetsOptions as Nn, SandboxResources as Nr, GitStatus as Nt, CompletedTurnResult as O, TeeAttestationReport as Oi, PublicTemplateVersionInfo as On, SandboxPermissionsConfig as Or, GitAuth as Ot, CreateSandboxFleetWithCoordinatorOptions as P, ToolsConfig as Pi, ReconcileSandboxFleetsResult as Pn, SandboxRuntimeHealth as Pr, GpuLease as Pt, EnsureDevServerOptions as Q, TerminalReadyInfo as Qi, SandboxFleetArtifact as Qn, SearchOptions as Qr, ListMessagesOptions as Qt, DeleteOptions as R, UploadProgress as Ri, Rollout as Rn, SandboxTerminalAttachOptions as Rr, GpuLeaseExecResult as Rt, CodeExecutionOptions as S, capabilitySchema as Sa, TaskSessionChanges as Si, PromptResult as Sn, SandboxFleetWorkspaceReconcileResult as Sr, FleetExecDispatchOptions as St, CodeResult as T, defineInlineResource as Ta, TaskSessionInfo as Ti, ProvisionStatus as Tn, SandboxIdentity as Tr, FleetPromptDispatchOptions as Tt, DownloadOptions as U, WriteManyFile as Ui, RolloutStatus as Un, SandboxTerminals as Ur, HostAgentDriverConfig as Ut, DispatchPromptOptions as V, WaitForRolloutOptions as Vi, RolloutScorer as Vn, SandboxTerminalManager as Vr, GpuLeaseStatus as Vt, DownloadProgress as W, WriteManyOptions as Wi, RolloutTurnPart as Wn, SandboxTraceBundle as Wr, HostAgentRuntimeBackend as Wt, EgressManager as X, TERMINAL_WS_ECHO_SUBPROTOCOL as Xi, SandboxEnvironment as Xn, ScopedTokenScope as Xr, IntelligenceReportWindow as Xt, DurablePlan as Y, BatchTaskUsage as Yi, SandboxConnection as Yn, ScopedToken as Yr, IntelligenceReportSubjectType as Yt, EgressPolicy as Z, TerminalExitInfo as Zi, SandboxEvent as Zn, SearchMatch as Zr, JsonValue as Zt, BatchTask as _, AgentProfileValidationIssue as _a, StartupOperation as _i, ProcessSignal as _n, SandboxFleetTraceEvent as _r, FleetDispatchResultBuffer as _t, AttachSandboxFleetMachineOptions as a, AgentProfile$1 as aa, SessionEventStreamOptions as ai, NetworkConfig as an, SandboxFleetInfo as ar, FileReadBatchResult as at, ChunkedUploadOptions as b, Capability as ba, TaskOptions as bi, PromptInputPart as bn, SandboxFleetUsage as br, FleetDriveTurnOutcome as bt, BackendInfo as c, AgentProfileConnection as ca, SessionListOptions as ci, PermissionLevel as cn, SandboxFleetMachineMeteredUsage as cr, FileRenameResult as ct, BackendType as d, AgentProfileModelHints as da, SessionStatus as di, PreviewLinkManager as dn, SandboxFleetManifest as dr, FileTreeOptions as dt, TerminalStreamAuthFormat as ea, SecretsManager as ei, ListSandboxFleetOptions as en, SandboxFleetCostEstimate as er, ExactProcessSpawnOptions as et, BatchBackend as f, AgentProfilePermissionValue as fa, SnapshotInfo as fi, Process as fn, SandboxFleetManifestMachine as fr, FileTreeResult as ft, BatchRunRequest as g, AgentProfileSecurityPolicy as ga, StartupDiagnostics as gi, ProcessManager as gn, SandboxFleetTraceBundle as gr, FleetDispatchCancelResult as gt, BatchRunOptions as h, AgentProfileResources as ha, SshKeysManager as hi, ProcessLogEntry as hn, SandboxFleetToken as hr, FileWriteResult as ht, AttachGpuLeaseOptions as i, TerminalStreamToken as ia, SessionBackendCredentials as ii, MkdirOptions as in, SandboxFleetDriverTimings as ir, FileReadBatchOptions as it, CreateRequestOptions as j, TeePublicKeyResponse as ji, ReapExpiredSandboxFleetsOptions as jn, SandboxProfileSummary as jr, GitConfig as jt, CreateGpuLeaseOptions as k, TeeAttestationResponse as ki, PublishPublicTemplateOptions as kn, SandboxPortBinding as kr, GitBranch as kt, BackendManager as l, AgentProfileFileMount as la, SessionMessage as li, PermissionsManager as ln, SandboxFleetMachineRecord as lr, FileSystem as lt, BatchResult as m, AgentProfileResourceRef as ma, SnapshotResult as mi, ProcessListOptions as mn, SandboxFleetPolicy as mr, FileUsageResult as mt, AccessPolicyRule as n, TerminalStreamHandlers as na, SendSessionMessageRequest as ni, McpServerConfig as nn, SandboxFleetDispatchResponse as nr, ExecResult as nt, BackendCapabilities as o, AgentProfileCapabilities as oa, SessionForkOptions as oi, NetworkManager as on, SandboxFleetIntelligenceEnvelope as or, FileReadError as ot, BatchOptions as p, AgentProfilePrompt as pa, SnapshotOptions as pi, ProcessInfo as pn, SandboxFleetOperationsSummary as pr, FileUsageOptions as pt, DriverInfo as q, BatchEventDataMap as qi, SSHCredentials as qn, SandboxTraceOptions as qr, IntelligenceReportBudget as qt, AddUserOptions as r, TerminalStreamOptions as ra, SentSessionMessage as ri, MintScopedTokenOptions as rn, SandboxFleetDriverCapability as rr, FileInfo as rt, BackendConfig as s, AgentProfileConfidential as sa, SessionInfo as si, NonHostAgentDriverConfig as sn, SandboxFleetMachine as sr, FileReadResult as st, AcceleratorKind as t, TerminalStreamError as ta, SendSessionMessageOptions as ti, ListSandboxOptions as tn, SandboxFleetDispatchFailureClass as tr, ExecOptions as tt, BackendStatus as u, AgentProfileMcpServer as ua, SessionMessageInputPart as ui, PreviewLinkInfo as un, SandboxFleetMachineSpec as ur, FileTreeFile as ut, BatchTaskResult as v, AgentProfileValidationResult as va, StorageConfig as vi, ProcessSpawnOptions as vn, SandboxFleetTraceExport as vr, FleetDispatchResultBufferOptions as vt, CodeLanguage as w, defineGitHubResource as wa, TaskSessionFileChange as wi, ProvisionResult as wn, SandboxFleetWorkspaceSnapshotResult as wr, FleetMachineId as wt, ChunkedUploadResult as x, agentProfileSchema as xa, TaskResult as xi, PromptOptions as xn, SandboxFleetWorkspace as xr, FleetDriveTurnRequest as xt, BranchOptions as y, AgentSubagentProfile as ya, SubscriptionInfo as yi, ProcessStatus as yn, SandboxFleetTraceOptions as yr, FleetDispatchStreamOptions as yt, DevServerInfo as z, UsageInfo as zi, RolloutChildResult as zn, SandboxTerminalCreateOptions as zr, GpuLeaseManager as zt };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/sandbox",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.1-develop.20260725201418.71254fb",
|
|
4
4
|
"description": "Client SDK for the Tangle Sandbox platform - build AI agent applications with dev containers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|