@tangle-network/sandbox 0.60.69 → 0.60.77-develop.20261016230332.7f22d61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -0
- package/dist/agent/index.d.ts +4 -4
- package/dist/agent/index.js +4 -4
- package/dist/agent/preview.d.ts +1 -1
- package/dist/{agent-run-outcome-BBk2-5vp.d.ts → agent-run-outcome-CTEpjCEZ.d.ts} +1 -1
- package/dist/auth/index.d.ts +1 -1
- package/dist/auth/index.js +1 -1
- package/dist/backend-types-D6bYbvMB.js +42 -0
- package/dist/{browser-interactive-control-controller-JUW3gOGH.d.ts → browser-interactive-control-controller-rpTbyvAS.d.ts} +1 -1
- package/dist/{chunked-upload-BklCn3Li.js → chunked-upload-DtIvkKNo.js} +1 -1
- package/dist/{chunked-upload-file-Cp-iWsWN.js → chunked-upload-file-DnsHEjg0.js} +1 -1
- package/dist/{cli-auth-bundle-D61iX68d.js → cli-auth-bundle-cSJjPeFF.js} +2 -2
- package/dist/{client-DUDqUYDG.js → client-CRkHfByN.js} +21 -9
- package/dist/{client-DVouBFPR.d.ts → client-Lhxo82x1.d.ts} +10 -6
- package/dist/collaboration/index.d.ts +1 -1
- package/dist/collaboration/index.js +1 -1
- package/dist/{collaboration-B2g1j2ey.js → collaboration-DaJU5O0E.js} +1 -1
- package/dist/core.d.ts +6 -6
- package/dist/core.js +3 -3
- package/dist/{errors-iWIsey1D.js → errors-DSJBKmGZ.js} +60 -1
- package/dist/{errors-5j_Hlkm-.d.ts → errors-mPL-qvgF.d.ts} +79 -2
- package/dist/{index-DaJrtipt.d.ts → index-DRto9Ijb.d.ts} +2 -2
- package/dist/index.d.ts +19 -17
- package/dist/index.js +9 -9
- package/dist/intelligence/index.js +1 -1
- package/dist/interactive-control.d.ts +1 -1
- package/dist/{interactive-controller-DaYmUCO_.js → interactive-controller-CJ24g8Va.js} +237 -25
- package/dist/{lines-D07bn-mu.d.ts → lines-DodQslsf.d.ts} +1 -1
- package/dist/lines.d.ts +1 -1
- package/dist/lines.js +1 -1
- package/dist/{local-cli-auth-t8KUbrfI.js → local-cli-auth-CBV7Vjk5.js} +1 -1
- package/dist/{managed-process-RMyVq_du.d.ts → managed-process-B7WfqKmi.d.ts} +1 -1
- package/dist/{preview-dIOd13_U.d.ts → preview-wpGGk0bu.d.ts} +3 -3
- package/dist/runtime.d.ts +5 -6
- package/dist/runtime.js +3 -3
- package/dist/{sandbox-C7wOeFZB.d.ts → sandbox-CoIGxzm_.d.ts} +78 -24
- package/dist/{sandbox-Dg0WI1ZF.js → sandbox-DzSEprto.js} +732 -79
- package/dist/tangle/index.d.ts +1 -1
- package/dist/tangle/index.js +1 -1
- package/dist/{tangle-CaY9_VGA.js → tangle-DHFKq9sn.js} +2 -2
- package/dist/{terminal-stream-CV1pMSKC.d.ts → terminal-stream-jdYomM1m.d.ts} +123 -4
- package/dist/{types-BLCY5T4s.d.ts → types-B_QF-iHm.d.ts} +242 -28
- package/package.json +5 -5
- package/dist/backend-types-C7b_Gpa0.js +0 -59
- package/dist/interactive-controller-DNbLzamS.d.ts +0 -40
- /package/dist/{index-BgmgfYZZ.d.ts → index-DO7GVpk_.d.ts} +0 -0
- /package/dist/{index-DHuHjNie.d.ts → index-DZ27pdB8.d.ts} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as CliAuthReference } from "./cli-auth-bundle-ODe06Ts7.js";
|
|
2
|
-
import { $a as
|
|
3
|
-
import {
|
|
4
|
-
import { f as InteractiveAttachOptions, g as InteractiveSessionStatus, h as InteractiveRequestOptions, m as InteractiveControlClaimOptions, p as InteractiveControlClaimAcknowledgement } from "./browser-interactive-control-controller-
|
|
5
|
-
import {
|
|
6
|
-
import { z as SandboxLines } from "./lines-
|
|
7
|
-
import { AgentInteractiveSessionAttach, AgentInteractiveSessionControlClaim, AgentInteractiveSessionControlClaimAcknowledgement, AgentInteractiveSessionControlClaimRequest, AgentInteractiveSessionPromptAcknowledgement, AgentInteractiveSessionPromptCommand, AgentInteractiveSessionRef, AgentInteractiveSessionStart, AgentInteractiveSessionStopAcknowledgement, AgentInteractiveSessionStopCommand, AgentInteractiveTerminalSession, AgentInteractiveTerminalSession as AgentInteractiveTerminalSession$1, AgentProfile, AgentProfileFileMount, AgentRunCancellationAcknowledgement, AgentRunCancellationRequest, InteractionAcknowledgement, InteractionData, InteractionRequest, InteractionResponseCommand, TerminalOutputEvent, TerminalReplayWindow, agentInteractiveSessionPromptRequestDigest } from "@tangle-network/agent-interface";
|
|
2
|
+
import { $a as WriteManyOptions, $i as SendSessionMessageOptions, $t as ForkIdempotency, A as CommitTaskSessionOptions, Aa as TaskSessionChanges, An as ListMessagesOptions, Br as SandboxEvent, C as BranchOptions, Ca as SnapshotResult, Ci as SandboxOperationInfo, Cn as InstalledTool, Cr as ResumeOptions, D as CodeExecutionResult, Da as StopOptions, E as CodeExecutionOptions, Ei as SandboxPortBinding, En as IntelligenceReportCompareTo, Er as RolloutOptions, Fa as TeeAttestationOptions, Fr as SandboxDeleteAcknowledgement, H as CreateTaskSessionOptions, Ha as TurnBackendConfig, Ir as SandboxDeleteOptions, Ja as WaitForOptions, La as TeeAttestationResponse, Li as SandboxStatus, M as ConversationTurnOptions, Mi as SandboxRuntimeCapabilities, Mr as SSHCredentials, N as ConversationTurnResult, Na as TaskSessionInfo, Ni as SandboxRuntimeHealth, O as CodeLanguage, On as IntelligenceReportWindow, Or as RolloutStartResult, Ot as FileSystem, Pi as SandboxShape, Pr as SandboxConnection, Pt as FileWriteResult, Q as DispatchedSession, Qa as WriteManyFile, Qt as ForkCounts, Ri as SandboxTerminalAttachOptions, Sn as HttpClient, Sr as RestoreSnapshotOptions, Ta as StartupDiagnostics, Ti as SandboxOperationState, Tn as IntelligenceReportBudget, Ua as TurnDriveResult, Ui as SandboxTerminals, V as CreateSessionOptions, Wi as SandboxTraceBundle, Wn as NetworkManager, Xa as WorkspaceOperationLookup, Xi as SearchOptions, Ya as WaitForRolloutOptions, Yi as SearchMatch, Yn as PreviewLinkManager, Z as DispatchPromptOptions, Za as WriteFileOptions, ar as PromptInputPart, ba as SnapshotOptions, bt as ExecOptions, ca as SessionInfo, cn as GpuLease, cr as ProvisionEvent, ct as DurablePlanDecisionResult, d as BackendConfig, da as SessionMessage, di as SandboxFleetTraceBundle, do as WorkspaceImagePublishResult$1, ea as SendSessionMessageRequest, en as ForkLookupOptions, fa as SessionMessageAdmission, fo as InteractionResolutionAcknowledgement, fr as PublicProfileConflict, ga as SnapshotDeleteAcknowledgement, ht as EgressManager, ia as SessionExecutionInfo, in as GitCommit, io as SandboxEnvRecoveryView, it as DriverInfo, j as CompletedTurnResult, ja as TaskSessionCommitResult, jr as SSHCommandDescriptor, ki as SandboxResourceUsage, kn as JsonValue, la as SessionInterruptOptions, lr as ProvisionResult, ma as SessionResultOptions, no as SandboxCreateReceipt, nt as DriveTurnOptions, on as GitDiff, oo as RawEvidenceDirectoryExport, or as PromptOptions, ot as DurablePlan, p as BackendManager, pn as GpuLeaseManager, qi as SandboxTraceOptions, qn as PermissionsManager, ra as SessionEventStreamOptions, rn as GitBranch, ro as SandboxEnvRecovery, sa as SessionForkOptions, sn as GitStatus, so as RawEvidenceExportOptions, sr as PromptResult, st as DurablePlanDecisionOptions, ta as SentSessionMessage, tr as ProcessManager, ua as SessionListOptions, vt as EventStreamOptions, wi as SandboxOperationKind, wn as IntelligenceReport, wr as Rollout, xa as SnapshotProvenance, xi as SandboxInfo, xt as ExecResult, ya as SnapshotInfo, za as TeePublicKeyResponse } from "./types-B_QF-iHm.js";
|
|
3
|
+
import { c as TerminalStreamReconnectAuthority, f as MintScopedTokenOptions, n as TerminalStream, o as TerminalStreamHandlers, p as ScopedToken, y as TerminalReadyInfo } from "./terminal-stream-jdYomM1m.js";
|
|
4
|
+
import { f as InteractiveAttachOptions, g as InteractiveSessionStatus, h as InteractiveRequestOptions, m as InteractiveControlClaimOptions, p as InteractiveControlClaimAcknowledgement } from "./browser-interactive-control-controller-rpTbyvAS.js";
|
|
5
|
+
import { E as InteractiveAttachRequest, h as SandboxError } from "./errors-mPL-qvgF.js";
|
|
6
|
+
import { z as SandboxLines } from "./lines-DodQslsf.js";
|
|
8
7
|
import { z } from "zod";
|
|
8
|
+
import { AgentInteractiveSessionAttach, AgentInteractiveSessionControlClaim, AgentInteractiveSessionControlClaimAcknowledgement, AgentInteractiveSessionControlClaimRequest, AgentInteractiveSessionPromptAcknowledgement, AgentInteractiveSessionPromptCommand, AgentInteractiveSessionRef, AgentInteractiveSessionStart, AgentInteractiveSessionStopAcknowledgement, AgentInteractiveSessionStopCommand, AgentInteractiveTerminalSession, AgentInteractiveTerminalSession as AgentInteractiveTerminalSession$1, AgentProfile, AgentProfileFileMount, AgentRunCancellationAcknowledgement, AgentRunCancellationRequest, InteractionAcknowledgement, InteractionData, InteractionRequest, InteractionResponseCommand, TerminalOutputEvent, TerminalReplayWindow, agentInteractiveSessionPromptRequestDigest } from "@tangle-network/agent-interface";
|
|
9
9
|
|
|
10
10
|
//#region src/mcp.d.ts
|
|
11
11
|
/**
|
|
@@ -332,6 +332,38 @@ declare class InteractiveSessionHandle {
|
|
|
332
332
|
stopLifecycle(options?: InteractiveRequestOptions): Promise<AgentInteractiveSessionStopAcknowledgement>;
|
|
333
333
|
}
|
|
334
334
|
//#endregion
|
|
335
|
+
//#region src/operation.d.ts
|
|
336
|
+
/** An accepted operation ended in failure. `code` names why. */
|
|
337
|
+
declare class SandboxOperationFailedError extends SandboxError {
|
|
338
|
+
readonly operation: SandboxOperationInfo;
|
|
339
|
+
constructor(operation: SandboxOperationInfo);
|
|
340
|
+
}
|
|
341
|
+
declare class SandboxOperation {
|
|
342
|
+
#private;
|
|
343
|
+
/**
|
|
344
|
+
* @param client - null for a verb that already finished synchronously.
|
|
345
|
+
* @param onSettled - runs once when the operation is first seen succeeded.
|
|
346
|
+
*/
|
|
347
|
+
constructor(info: SandboxOperationInfo, client: HttpClient | null, onSettled?: (info: SandboxOperationInfo) => void | Promise<void>);
|
|
348
|
+
/** A verb the API finished synchronously, as a succeeded operation. */
|
|
349
|
+
static completed(kind: SandboxOperationKind, sandboxId: string, result?: SandboxOperationInfo["result"]): SandboxOperation;
|
|
350
|
+
get id(): string;
|
|
351
|
+
get state(): SandboxOperationState;
|
|
352
|
+
/** The last state read. */
|
|
353
|
+
get info(): SandboxOperationInfo;
|
|
354
|
+
/** Read the operation's current state. */
|
|
355
|
+
refresh(): Promise<SandboxOperationInfo>;
|
|
356
|
+
/**
|
|
357
|
+
* Poll until the operation is terminal (250 ms, doubling to 2 s). Resolves
|
|
358
|
+
* with a succeeded operation; throws {@link SandboxOperationFailedError} on
|
|
359
|
+
* a failed one and {@link TimeoutError} past `timeoutMs` (default 10 min).
|
|
360
|
+
*/
|
|
361
|
+
wait(options?: {
|
|
362
|
+
timeoutMs?: number;
|
|
363
|
+
signal?: AbortSignal;
|
|
364
|
+
}): Promise<SandboxOperationInfo>;
|
|
365
|
+
}
|
|
366
|
+
//#endregion
|
|
335
367
|
//#region src/profile-file-mounts.d.ts
|
|
336
368
|
interface SplitInlineProfileFileMountsResult {
|
|
337
369
|
leanProfile: AgentProfile;
|
|
@@ -547,7 +579,7 @@ interface SandboxSessionHost extends InteractiveSessionHost {
|
|
|
547
579
|
} | {
|
|
548
580
|
outcome: "rejected";
|
|
549
581
|
feedback: string;
|
|
550
|
-
}): Promise<DurablePlanDecisionResult>;
|
|
582
|
+
}, options?: DurablePlanDecisionOptions): Promise<DurablePlanDecisionResult>;
|
|
551
583
|
}
|
|
552
584
|
/**
|
|
553
585
|
* A single agent session inside a sandbox. Created via
|
|
@@ -679,10 +711,10 @@ declare class SandboxSession {
|
|
|
679
711
|
}): Promise<SandboxInteractionResult>;
|
|
680
712
|
/** Return the newest plan awaiting a decision for this session. */
|
|
681
713
|
plan(): Promise<DurablePlan | null>;
|
|
682
|
-
/** Approve a durable plan
|
|
683
|
-
approvePlan(planId?: string): Promise<DurablePlanDecisionResult>;
|
|
684
|
-
/** Reject a durable plan with
|
|
685
|
-
rejectPlan(feedback: string, planId?: string): Promise<DurablePlanDecisionResult>;
|
|
714
|
+
/** Approve a durable plan; caller mode returns admission for fresh preparation. */
|
|
715
|
+
approvePlan(planId?: string, options?: DurablePlanDecisionOptions): Promise<DurablePlanDecisionResult>;
|
|
716
|
+
/** Reject a durable plan with feedback; caller mode prepares the revision turn. */
|
|
717
|
+
rejectPlan(feedback: string, planId?: string, options?: DurablePlanDecisionOptions): Promise<DurablePlanDecisionResult>;
|
|
686
718
|
private requireCurrentPlan;
|
|
687
719
|
}
|
|
688
720
|
//#endregion
|
|
@@ -778,15 +810,6 @@ interface SessionMappingResult {
|
|
|
778
810
|
reprovisionRequired: boolean;
|
|
779
811
|
code?: string;
|
|
780
812
|
}
|
|
781
|
-
/**
|
|
782
|
-
* HTTP client interface for making requests.
|
|
783
|
-
*/
|
|
784
|
-
interface HttpClient {
|
|
785
|
-
fetch(path: string, options?: RequestInit, fetchOptions?: {
|
|
786
|
-
timeoutMs?: number;
|
|
787
|
-
}): Promise<Response>;
|
|
788
|
-
getApiKey?(): string | undefined;
|
|
789
|
-
}
|
|
790
813
|
/**
|
|
791
814
|
* Git capability for repository operations.
|
|
792
815
|
*/
|
|
@@ -848,6 +871,7 @@ interface ForkAcknowledgement extends ForkCounts {
|
|
|
848
871
|
* A sandbox instance with methods for interaction.
|
|
849
872
|
*/
|
|
850
873
|
declare class SandboxInstance {
|
|
874
|
+
#private;
|
|
851
875
|
private readonly client;
|
|
852
876
|
private info;
|
|
853
877
|
private refreshInFlight?;
|
|
@@ -1015,7 +1039,9 @@ declare class SandboxInstance {
|
|
|
1015
1039
|
* Refresh sandbox information from the server.
|
|
1016
1040
|
*/
|
|
1017
1041
|
refresh(signal?: AbortSignal): Promise<void>;
|
|
1042
|
+
private refreshFor;
|
|
1018
1043
|
private refreshInfo;
|
|
1044
|
+
private readStatus;
|
|
1019
1045
|
/**
|
|
1020
1046
|
* What the direct regional read route has done for this sandbox: attempts,
|
|
1021
1047
|
* reads it served, reads that fell back to the API, and the last reason.
|
|
@@ -1648,6 +1674,7 @@ declare class SandboxInstance {
|
|
|
1648
1674
|
* from a broken response would manufacture the very proof it came for.
|
|
1649
1675
|
*/
|
|
1650
1676
|
private egressActivity;
|
|
1677
|
+
private gpuProviders;
|
|
1651
1678
|
private gpuAttach;
|
|
1652
1679
|
private gpuList;
|
|
1653
1680
|
private gpuExec;
|
|
@@ -1770,6 +1797,9 @@ declare class SandboxInstance {
|
|
|
1770
1797
|
format: string;
|
|
1771
1798
|
content: string;
|
|
1772
1799
|
}>>;
|
|
1800
|
+
snapshot(options: SnapshotOptions & {
|
|
1801
|
+
wait: false;
|
|
1802
|
+
}): Promise<SandboxOperation>;
|
|
1773
1803
|
snapshot(options?: SnapshotOptions): Promise<SnapshotResult>;
|
|
1774
1804
|
/**
|
|
1775
1805
|
* List all snapshots for this sandbox.
|
|
@@ -1949,6 +1979,18 @@ declare class SandboxInstance {
|
|
|
1949
1979
|
* returns it (replacing the create breakdown).
|
|
1950
1980
|
*/
|
|
1951
1981
|
stop(): Promise<void>;
|
|
1982
|
+
/**
|
|
1983
|
+
* With `wait: false`, answers as soon as the stop is durably accepted and
|
|
1984
|
+
* returns the {@link SandboxOperation}; `await op.wait()` resolves once the
|
|
1985
|
+
* sandbox is stopped. A stop the API finished synchronously comes back as an
|
|
1986
|
+
* operation that is already `succeeded`.
|
|
1987
|
+
*/
|
|
1988
|
+
stop(options: StopOptions & {
|
|
1989
|
+
wait: false;
|
|
1990
|
+
}): Promise<SandboxOperation>;
|
|
1991
|
+
stop(options?: StopOptions): Promise<void>;
|
|
1992
|
+
/** Read an operation a `wait: false` stop or snapshot of this sandbox returned. */
|
|
1993
|
+
getOperation(operationId: string): Promise<SandboxOperation>;
|
|
1952
1994
|
/** Read credential recovery metadata without changing sandbox lifecycle. */
|
|
1953
1995
|
getEnvRecovery(): Promise<SandboxEnvRecoveryView>;
|
|
1954
1996
|
/** Replace a stopped sandbox's policy, or inspect a proposed change with dryRun. */
|
|
@@ -2032,8 +2074,20 @@ declare class SandboxInstance {
|
|
|
2032
2074
|
*/
|
|
2033
2075
|
private consumerConnectionReady;
|
|
2034
2076
|
private hasFreshStatus;
|
|
2077
|
+
/**
|
|
2078
|
+
* The check before a runtime call. A handle that has seen the sandbox
|
|
2079
|
+
* running and ready dispatches at once: the authenticated runtime route
|
|
2080
|
+
* checks current sandbox state itself, so a status GET before every call was
|
|
2081
|
+
* a whole round trip through the Worker that only moved the same refusal
|
|
2082
|
+
* earlier. A stale cache surfaces as the call's own answer, which the
|
|
2083
|
+
* direct client and the prompt stream turn into a typed `StateError`. A
|
|
2084
|
+
* handle that has not seen the status, or saw one that is not runnable,
|
|
2085
|
+
* reads it first.
|
|
2086
|
+
*/
|
|
2035
2087
|
private ensureRunning;
|
|
2036
|
-
|
|
2088
|
+
/** Why the status must be read before a runtime call, or undefined to trust the cache. */
|
|
2089
|
+
private statusReadReason;
|
|
2090
|
+
private assertRunnable;
|
|
2037
2091
|
private assertFilesystemIncarnationReady;
|
|
2038
2092
|
/**
|
|
2039
2093
|
* One authenticated runtime HTTP call for this sandbox, relative endpoint
|
|
@@ -2252,7 +2306,7 @@ declare class SandboxInstance {
|
|
|
2252
2306
|
/** Prepare a secret-bearing native revision without starting a model turn. */
|
|
2253
2307
|
prepareSecretProfileRevision(opts: {
|
|
2254
2308
|
sessionId: string;
|
|
2255
|
-
backend:
|
|
2309
|
+
backend: TurnBackendConfig;
|
|
2256
2310
|
model?: ConversationTurnOptions["model"];
|
|
2257
2311
|
}): Promise<{
|
|
2258
2312
|
expectedPublicProfileRequestDigest: `sha256:${string}`;
|
|
@@ -2344,7 +2398,7 @@ declare class SandboxInstance {
|
|
|
2344
2398
|
} | {
|
|
2345
2399
|
outcome: "rejected";
|
|
2346
2400
|
feedback: string;
|
|
2347
|
-
}): Promise<DurablePlanDecisionResult>;
|
|
2401
|
+
}, options?: DurablePlanDecisionOptions): Promise<DurablePlanDecisionResult>;
|
|
2348
2402
|
}
|
|
2349
2403
|
//#endregion
|
|
2350
|
-
export {
|
|
2404
|
+
export { BuildControlPlaneMcpConfigOptions as $, InteractivePromptCommand as A, InteractiveStopCommand as B, splitInlineProfileFileMounts as C, SandboxOperationFailedError as D, SandboxOperation as E, InteractiveSessionIncarnationId as F, InteractiveTerminalFrameLog as G, RespondToPermissionOptions as H, InteractiveSessionInfo as I, createInteractiveTerminalSession as J, InteractiveTerminalMetadata as K, InteractiveSessionRef as L, InteractiveSessionHandle as M, InteractiveSessionHandleOptions as N, AgentInteractiveTerminalSession$1 as O, InteractiveSessionHost as P, SandboxInteractionResult as Q, InteractiveSessionStartOptions as R, materializeProfileFileMounts as S, validateDeferredProfileFileMounts as T, agentInteractiveSessionPromptRequestDigest as U, InterruptResult as V, InteractiveTerminalCapture as W, SandboxInteractionConflict as X, SandboxInteractionCommandResult as Y, SandboxInteractionResolution as Z, ProfileFileDeliveryReport as _, WorkspaceImagePublishResult as a, SandboxMcpServerEntry as at, SplitInlineProfileFileMountsResult as b, TraceExportResult as c, exportTraceBundle as d, BuildSandboxMcpConfigOptions as et, otelTraceIdForTangleTrace as f, SandboxSession as g, RawEvidenceExport as h, WorkspaceImagePublishRequestOptions as i, SandboxMcpEndpoint as it, InteractiveSessionControlClaim as j, InteractiveControlClaimRequest as k, TraceExportSink as l, SandboxTaskSession as m, SandboxInstance as n, SANDBOX_MCP_SERVER_NAME as nt, WorkspaceImages as o, buildControlPlaneMcpConfig as ot, toOtelJson as p, createInteractiveTerminalCapture as q, WorkspaceImagePublishInput as r, SandboxMcpConfig as rt, TraceExportFormat as s, buildSandboxMcpConfig as st, ForkAcknowledgement as t, CONTROL_PLANE_MCP_SERVER_NAME as tt, buildTraceExportPayload as u, MaterializeProfileFileMountsOptions as v, splitInlineProfileSkills as w, SplitInlineProfileSkillsResult as x, MaterializeProfileFileMountsResult as y, InteractiveSessionStartResult as z };
|