@tangle-network/sandbox 0.59.0 → 0.60.1-develop.20261001222100.ea1ca0e935

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.
Files changed (42) hide show
  1. package/README.md +6 -0
  2. package/dist/agent/index.d.ts +4 -4
  3. package/dist/agent/index.js +4 -4
  4. package/dist/agent/preview.d.ts +2 -2
  5. package/dist/agent/preview.js +54 -4
  6. package/dist/{agent-run-outcome-C45u1fzK.d.ts → agent-run-outcome-C1GJ1YCD.d.ts} +2 -1
  7. package/dist/auth/index.js +1 -1
  8. package/dist/{browser-interactive-control-controller-DRBQ-jf0.js → browser-interactive-control-controller-BJf0P_J4.js} +40 -3
  9. package/dist/{browser-interactive-control-controller-BzR8sFjo.d.ts → browser-interactive-control-controller-C2qVGzQz.d.ts} +7 -2
  10. package/dist/{cli-auth-bundle-CzmAaefZ.js → cli-auth-bundle-ChOdvrjd.js} +1 -1
  11. package/dist/{client-DYgEM_h5.d.ts → client-jPPuv6Ns.d.ts} +4 -4
  12. package/dist/{client-BbiV61Yy.js → client-p2T45dAv.js} +5 -5
  13. package/dist/collaboration/index.js +1 -1
  14. package/dist/core.d.ts +4 -4
  15. package/dist/core.js +3 -3
  16. package/dist/{index-C8Y65I3y.d.ts → index-CZjj0Wj3.d.ts} +2 -2
  17. package/dist/index.d.ts +10 -9
  18. package/dist/index.js +8 -8
  19. package/dist/interactive-control.d.ts +2 -2
  20. package/dist/interactive-control.js +2 -2
  21. package/dist/{runtime-api-CACSOP5L.js → interactive-controller-DV1HT3NR.js} +850 -8
  22. package/dist/interactive-controller-Dghv9yMk.d.ts +40 -0
  23. package/dist/{lines-VAnaqs-K.d.ts → lines-BoT0rBrj.d.ts} +1 -1
  24. package/dist/lines.d.ts +1 -1
  25. package/dist/{local-cli-auth-ChDP5zu4.js → local-cli-auth-CdIM0B6p.js} +1 -1
  26. package/dist/{mcp-local-DY1CnWBn.js → mcp-local-BSvH4yAU.js} +1 -1
  27. package/dist/{preview-3G1piYer.d.ts → preview-iD-q8YLe.d.ts} +19 -6
  28. package/dist/runtime.d.ts +6 -3
  29. package/dist/runtime.js +3 -3
  30. package/dist/{sandbox-D0-Q1vpS.d.ts → sandbox-BY7KZweP.d.ts} +9 -40
  31. package/dist/{sandbox-BJLb1q3b.js → sandbox-DeE2MDx9.js} +160 -878
  32. package/dist/tangle/index.d.ts +1 -1
  33. package/dist/tangle/index.js +1 -1
  34. package/dist/{tangle-Csb8unvj.js → tangle-DsvldZtQ.js} +1 -1
  35. package/dist/{types-Br35Gfpw.d.ts → types-Cs-0Hy_K.d.ts} +24 -4
  36. package/package.json +6 -4
  37. package/dist/abort-signal-BpYYr4JT.js +0 -31
  38. /package/dist/{collaboration-d8Xcvel7.js → collaboration-C1JAl5kE.js} +0 -0
  39. /package/dist/{line-application-9k30rhb2.js → line-application-DJYY1v8U.js} +0 -0
  40. /package/dist/{preview-operations-CbTiBE-a.js → preview-operations-BLsclF88.js} +0 -0
  41. /package/dist/{specs-CnqSWFNT-CHd9ACzP.js → specs-CnqSWFNT-i2wJxPoD.js} +0 -0
  42. /package/dist/{terminal-stream-CB2DF-qq.d.ts → terminal-stream-C9jxoB07.d.ts} +0 -0
@@ -0,0 +1,40 @@
1
+ import { a as TerminalStreamReconnectAuthority, l as ScopedToken, t as TerminalStream } from "./terminal-stream-C9jxoB07.js";
2
+ import { a as InteractiveSessionControlController, c as InteractiveSessionIdentity, f as InteractiveAttachOptions, h as InteractiveRequestOptions, n as BrowserInteractiveSessionControlControllerOptions, o as InteractiveSessionControlControllerOptions, s as InteractiveSessionControlTransport } from "./browser-interactive-control-controller-C2qVGzQz.js";
3
+ import { AgentInteractiveSessionRef } from "@tangle-network/agent-interface";
4
+
5
+ //#region src/interactive-controller.d.ts
6
+ /** The request fields supplied by an attach caller before control is claimed. */
7
+ type InteractiveAttachRequest = Omit<InteractiveAttachOptions, "control">;
8
+ /** Transport used by the status → claim → WebSocket controller. */
9
+ interface InteractiveSessionControllerTransport extends InteractiveSessionControlTransport {
10
+ attach(sessionId: string, ref: AgentInteractiveSessionRef, request: InteractiveAttachOptions, options?: InteractiveRequestOptions, reconnectAuthority?: TerminalStreamReconnectAuthority): Promise<TerminalStream>;
11
+ }
12
+ interface InteractiveSessionControllerOptions extends InteractiveSessionControlControllerOptions {}
13
+ /**
14
+ * Attach-capable controller for one exact interactive process.
15
+ *
16
+ * Control ownership lives in the dependency-light base controller. This layer
17
+ * adds only the terminal attach operation after that ownership is resolved.
18
+ */
19
+ declare class InteractiveSessionController extends InteractiveSessionControlController {
20
+ private readonly attachTransport;
21
+ private attachInFlight?;
22
+ constructor(attachTransport: InteractiveSessionControllerTransport, options: InteractiveSessionControllerOptions);
23
+ attach(request: InteractiveAttachRequest, requestOptions?: InteractiveRequestOptions): Promise<TerminalStream>;
24
+ /**
25
+ * Open a stream for a claim returned by this controller's `resolve()`.
26
+ * The controller releases that claim when the stream cannot be opened.
27
+ */
28
+ attachWithIdentity(identity: InteractiveSessionIdentity, request: InteractiveAttachRequest, requestOptions?: InteractiveRequestOptions): Promise<TerminalStream>;
29
+ }
30
+ /** Browser transport options for the attach-capable controller. */
31
+ interface BrowserInteractiveSessionControllerOptions extends InteractiveSessionControllerOptions, BrowserInteractiveSessionControlControllerOptions {
32
+ /** Mint a future session-runtime token for every browser terminal dial. */
33
+ terminalTokenProvider?: (signal?: AbortSignal) => Promise<ScopedToken>;
34
+ }
35
+ /** Concrete controller for browser deep links and terminal attachment. */
36
+ declare class BrowserInteractiveSessionController extends InteractiveSessionController {
37
+ constructor(options: BrowserInteractiveSessionControllerOptions);
38
+ }
39
+ //#endregion
40
+ export { InteractiveSessionControllerOptions as a, InteractiveSessionController as i, BrowserInteractiveSessionControllerOptions as n, InteractiveSessionControllerTransport as o, InteractiveAttachRequest as r, BrowserInteractiveSessionController as t };
@@ -1,4 +1,4 @@
1
- import { B as CreateSandboxOptions, d as BackendConfig } from "./types-Br35Gfpw.js";
1
+ import { B as CreateSandboxOptions, d as BackendConfig } from "./types-Cs-0Hy_K.js";
2
2
 
3
3
  //#region src/line-application.d.ts
4
4
  /** Bounded callback request bytes after canonicalization, including JSON framing. */
package/dist/lines.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { A as LineTransport, C as LineRespondView, D as LineSenderVerification, E as LineSendReceipt, F as SandboxLines, I as lineInstanceKey, L as profileChannelReference, M as LineVoiceOptions, N as LinesClient, O as LineSenderVerificationStart, P as LinesHttpClient, S as LineRespondAgent, T as LineSendInput, _ as LineMessage, a as LineAttachOptions, b as LineReminderPreferences, c as LineExecutionKey, d as LineInstanceCreate, f as LineLimits, g as LineMemberSpec, h as LineMemberPatch, i as LineAllowanceSubject, j as LineVoice, k as LineThread, l as LineFromConnectionInput, m as LineMemberInstance, n as LineAgentRolePolicy, o as LineAttachment, p as LineMember, r as LineAllowance, s as LineAttachmentReauthorization, t as Line, u as LineInstanceAttachOptions, v as LineNumberInventory, w as LineRole, x as LineReplyGate, y as LineProvider } from "./lines-VAnaqs-K.js";
1
+ import { A as LineTransport, C as LineRespondView, D as LineSenderVerification, E as LineSendReceipt, F as SandboxLines, I as lineInstanceKey, L as profileChannelReference, M as LineVoiceOptions, N as LinesClient, O as LineSenderVerificationStart, P as LinesHttpClient, S as LineRespondAgent, T as LineSendInput, _ as LineMessage, a as LineAttachOptions, b as LineReminderPreferences, c as LineExecutionKey, d as LineInstanceCreate, f as LineLimits, g as LineMemberSpec, h as LineMemberPatch, i as LineAllowanceSubject, j as LineVoice, k as LineThread, l as LineFromConnectionInput, m as LineMemberInstance, n as LineAgentRolePolicy, o as LineAttachment, p as LineMember, r as LineAllowance, s as LineAttachmentReauthorization, t as Line, u as LineInstanceAttachOptions, v as LineNumberInventory, w as LineRole, x as LineReplyGate, y as LineProvider } from "./lines-BoT0rBrj.js";
2
2
  export { Line, LineAgentRolePolicy, LineAllowance, LineAllowanceSubject, LineAttachOptions, LineAttachment, LineAttachmentReauthorization, LineExecutionKey, LineFromConnectionInput, LineInstanceAttachOptions, LineInstanceCreate, LineLimits, LineMember, LineMemberInstance, LineMemberPatch, LineMemberSpec, LineMessage, LineNumberInventory, LineProvider, LineReminderPreferences, LineReplyGate, LineRespondAgent, LineRespondView, LineRole, LineSendInput, LineSendReceipt, LineSenderVerification, LineSenderVerificationStart, LineThread, LineTransport, LineVoice, LineVoiceOptions, LinesClient, LinesHttpClient, SandboxLines, lineInstanceKey, profileChannelReference };
@@ -1,4 +1,4 @@
1
- import { t as AUTH_BUNDLE_PATHS } from "./cli-auth-bundle-CzmAaefZ.js";
1
+ import { t as AUTH_BUNDLE_PATHS } from "./cli-auth-bundle-ChOdvrjd.js";
2
2
  import { existsSync, readFileSync } from "node:fs";
3
3
  import { homedir } from "node:os";
4
4
  import { join } from "node:path";
@@ -1,4 +1,4 @@
1
- import { a as listAgentPreviews, i as getAgentPreview, o as publishAgentPreview, r as ensureAgentPreview, s as removeAgentPreview, t as AgentPreviewError } from "./preview-operations-CbTiBE-a.js";
1
+ import { a as listAgentPreviews, i as getAgentPreview, o as publishAgentPreview, r as ensureAgentPreview, s as removeAgentPreview, t as AgentPreviewError } from "./preview-operations-BLsclF88.js";
2
2
  import { createRequire } from "node:module";
3
3
  //#region \0rolldown/runtime.js
4
4
  var __defProp = Object.defineProperty;
@@ -1,6 +1,6 @@
1
- import { r as SandboxInstance } from "./sandbox-D0-Q1vpS.js";
2
- import { Pn as PreviewLinkInfo, mt as EnsureDevServerOptions } from "./types-Br35Gfpw.js";
3
- import { i as Sandbox } from "./client-DYgEM_h5.js";
1
+ import { r as SandboxInstance } from "./sandbox-BY7KZweP.js";
2
+ import { Fn as PreviewLinkInfo, ht as EnsureDevServerOptions } from "./types-Cs-0Hy_K.js";
3
+ import { i as Sandbox } from "./client-jPPuv6Ns.js";
4
4
 
5
5
  //#region src/agent/preview-operations.d.ts
6
6
  type AgentPreviewOptions = Pick<EnsureDevServerOptions, "sessionId" | "cwd"> & {
@@ -55,8 +55,21 @@ declare function getAgentPreview(box: Pick<SandboxInstance, "previewLinks">, pre
55
55
  /** Unpublishes one service; does not stop it or affect other app URLs. */
56
56
  declare function removeAgentPreview(box: Pick<SandboxInstance, "previewLinks">, previewId: string, context?: PreviewExecutionContext): Promise<void>;
57
57
  //#endregion
58
- //#region src/agent/preview-mcp.d.ts
58
+ //#region src/agent/preview-policy.d.ts
59
59
  declare const PREVIEW_TOOLS: readonly ["sandbox_preview", "sandbox_preview_publish", "sandbox_preview_list", "sandbox_preview_get", "sandbox_preview_remove"];
60
+ declare const PREVIEW_MCP_ALIAS = "tangle_previews";
61
+ type PreviewTool = (typeof PREVIEW_TOOLS)[number];
62
+ declare function previewOperationTool(operation: PreviewAuthorizationRequest["operation"]): PreviewTool;
63
+ /**
64
+ * Select preview tools without granting account, sandbox, or member authority.
65
+ * The host authenticates the caller and supplies the authorizer separately.
66
+ * The same profile contract applies to web, native, workflow, and messaging
67
+ * hosts. Disabled shells and provider-specific restrictions require explicit
68
+ * preview grants; selecting a read tool never promotes the profile to execution.
69
+ */
70
+ declare function previewToolsForProfile(input?: unknown): readonly PreviewTool[];
71
+ //#endregion
72
+ //#region src/agent/preview-mcp.d.ts
60
73
  /** Host-side bridge for native agents, custom apps and isolated computers.
61
74
  * Authenticate the request before calling this function. The host keeps its
62
75
  * Sandbox credential; the agent receives only the host's limited capability.
@@ -66,7 +79,7 @@ declare function servePreviewMcp(request: Request, config: {
66
79
  box: SandboxInstance;
67
80
  sessionId?: string;
68
81
  authorize: PreviewAuthorizer;
69
- tools?: readonly (typeof PREVIEW_TOOLS)[number][];
82
+ tools?: readonly PreviewTool[];
70
83
  }): Promise<Response>;
71
84
  //#endregion
72
- export { PreviewAuthorizationRequest as a, PublishAgentPreviewOptions as c, getAgentPreview as d, listAgentPreviews as f, resolveSelfSandbox as h, AgentPreviewOptions as i, assertPreviewId as l, removeAgentPreview as m, servePreviewMcp as n, PreviewAuthorizer as o, publishAgentPreview as p, AgentPreviewError as r, PreviewExecutionContext as s, PREVIEW_TOOLS as t, ensureAgentPreview as u };
85
+ export { publishAgentPreview as _, previewOperationTool as a, AgentPreviewOptions as c, PreviewExecutionContext as d, PublishAgentPreviewOptions as f, listAgentPreviews as g, getAgentPreview as h, PreviewTool as i, PreviewAuthorizationRequest as l, ensureAgentPreview as m, PREVIEW_MCP_ALIAS as n, previewToolsForProfile as o, assertPreviewId as p, PREVIEW_TOOLS as r, AgentPreviewError as s, servePreviewMcp as t, PreviewAuthorizer as u, removeAgentPreview as v, resolveSelfSandbox as y };
package/dist/runtime.d.ts CHANGED
@@ -1,6 +1,9 @@
1
- import { A as CommitTaskSessionOptions, At as FileUsageResult, Bi as SessionExecutionInfo, Ci as SandboxTerminalManager, Dt as FileTreeOptions, Er as SandboxEvent, Fi as SendSessionMessageOptions, H as CreateTaskSessionOptions, Ii as SendSessionMessageRequest, Ji as SessionMessageAdmission, Li as SentSessionMessage, Ot as FileTreeResult, Si as SandboxTerminalInfo, Sn as ListMessagesOptions, T as ChunkedUploadResult, V as CreateSessionOptions, Vi as SessionExecutionStatus, Wi as SessionInfo, bt as FileReadBatchOptions, fa as TaskSessionInfo, hi as SandboxRuntimeHealth, jt as FileWriteResult, ka as WriteFileOptions, kt as FileUsageOptions, la as TaskSessionChanges, li as SandboxPortBinding, or as RenameOptions, qi as SessionMessage, ua as TaskSessionCommitResult, w as ChunkedUploadOptions, wa as UploadProgress, wi as SandboxTerminalRequestOptions, wt as FileRenameResult, xi as SandboxTerminalCreateOptions, xt as FileReadBatchResult, zi as SessionEventStreamOptions } from "./types-Br35Gfpw.js";
1
+ import { l as ScopedToken, t as TerminalStream } from "./terminal-stream-C9jxoB07.js";
2
+ import { c as InteractiveSessionIdentity, l as InteractiveSessionNotRunningError, r as browserInteractiveControlHolderId } from "./browser-interactive-control-controller-C2qVGzQz.js";
3
+ import { t as BrowserInteractiveSessionController } from "./interactive-controller-Dghv9yMk.js";
4
+ import { A as CommitTaskSessionOptions, Aa as WriteFileOptions, At as FileUsageOptions, Bi as SessionEventStreamOptions, Ci as SandboxTerminalInfo, Cn as ListMessagesOptions, Dr as SandboxEvent, Gi as SessionInfo, H as CreateTaskSessionOptions, Hi as SessionExecutionStatus, Ii as SendSessionMessageOptions, Ji as SessionMessage, Li as SendSessionMessageRequest, Mt as FileWriteResult, Ot as FileTreeOptions, Ri as SentSessionMessage, Si as SandboxTerminalCreateOptions, St as FileReadBatchResult, T as ChunkedUploadResult, Ta as UploadProgress, Ti as SandboxTerminalRequestOptions, Tt as FileRenameResult, V as CreateSessionOptions, Vi as SessionExecutionInfo, Yi as SessionMessageAdmission, da as TaskSessionCommitResult, gi as SandboxRuntimeHealth, jt as FileUsageResult, kt as FileTreeResult, pa as TaskSessionInfo, sr as RenameOptions, ua as TaskSessionChanges, ui as SandboxPortBinding, w as ChunkedUploadOptions, wi as SandboxTerminalManager, xt as FileReadBatchOptions } from "./types-Cs-0Hy_K.js";
2
5
  import { _ as TimeoutError, a as FileWriteConflictError, c as NotFoundError, f as SandboxError, g as StateError, h as ServerError, l as PartialFailureError, m as SandboxFailureDetail, n as CapabilityError, p as SandboxErrorJson, s as NetworkError, t as AuthError, u as QuotaError, v as ValidationError } from "./errors-C6dll8Qf.js";
3
- import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-C45u1fzK.js";
6
+ import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-C1GJ1YCD.js";
4
7
 
5
8
  //#region src/lib/chunked-upload.d.ts
6
9
  /** The transport a caller wires this module to — {@link SandboxInstance.runtimeFetch}
@@ -132,4 +135,4 @@ declare class SandboxRuntimeClient extends SandboxRuntimeApi {
132
135
  }
133
136
  declare function createSandboxRuntimeClient(config: SandboxRuntimeClientConfig): SandboxRuntimeClient;
134
137
  //#endregion
135
- export { type AgentRunOutcome, type AgentRunOutcomeTracker, AuthError, CapabilityError, type ChunkedUploadOptions, type ChunkedUploadResult, type ChunkedUploadTransport, type FileReadBatchOptions, type FileReadBatchResult, type FileRenameResult, type FileTreeOptions, type FileTreeResult, FileWriteConflictError, type FileWriteResult, type ListMessagesOptions, NetworkError, NotFoundError, PartialFailureError, QuotaError, type RenameOptions, SandboxError, type SandboxErrorJson, type SandboxEvent, type SandboxFailureDetail, SandboxRuntimeClient, type SandboxRuntimeClientConfig, type SandboxRuntimeHealth, type SandboxTerminalCreateOptions, type SandboxTerminalInfo, type SandboxTerminalManager, type SandboxTerminalRequestOptions, ServerError, type SessionEventStreamOptions, type SessionExecutionInfo, type SessionExecutionStatus, type SessionMessage, type SessionMessageAdmission, StateError, TimeoutError, type UploadProgress, ValidationError, type WriteFileOptions, createAgentRunOutcomeTracker, createSandboxRuntimeClient, deriveAgentResultOutcome, deriveAgentRunOutcome, uploadChunked };
138
+ export { type AgentRunOutcome, type AgentRunOutcomeTracker, AuthError, BrowserInteractiveSessionController, CapabilityError, type ChunkedUploadOptions, type ChunkedUploadResult, type ChunkedUploadTransport, type FileReadBatchOptions, type FileReadBatchResult, type FileRenameResult, type FileTreeOptions, type FileTreeResult, FileWriteConflictError, type FileWriteResult, type InteractiveSessionIdentity, InteractiveSessionNotRunningError, type ListMessagesOptions, NetworkError, NotFoundError, PartialFailureError, QuotaError, type RenameOptions, SandboxError, type SandboxErrorJson, type SandboxEvent, type SandboxFailureDetail, SandboxRuntimeClient, type SandboxRuntimeClientConfig, type SandboxRuntimeHealth, type SandboxTerminalCreateOptions, type SandboxTerminalInfo, type SandboxTerminalManager, type SandboxTerminalRequestOptions, type ScopedToken, ServerError, type SessionEventStreamOptions, type SessionExecutionInfo, type SessionExecutionStatus, type SessionMessage, type SessionMessageAdmission, StateError, type TerminalStream, TimeoutError, type UploadProgress, ValidationError, type WriteFileOptions, browserInteractiveControlHolderId, createAgentRunOutcomeTracker, createSandboxRuntimeClient, deriveAgentResultOutcome, deriveAgentRunOutcome, uploadChunked };
package/dist/runtime.js CHANGED
@@ -1,6 +1,6 @@
1
- import { E as deriveAgentRunOutcome, T as deriveAgentResultOutcome, f as uploadChunked, t as SandboxRuntimeApi, w as createAgentRunOutcomeTracker } from "./runtime-api-CACSOP5L.js";
1
+ import { M as createAgentRunOutcomeTracker, N as deriveAgentResultOutcome, P as deriveAgentRunOutcome, b as uploadChunked, l as SandboxRuntimeApi, t as BrowserInteractiveSessionController } from "./interactive-controller-DV1HT3NR.js";
2
2
  import { a as FileWriteConflictError, c as NotFoundError, f as SandboxError, g as ValidationError, h as TimeoutError, l as PartialFailureError, m as StateError, n as CapabilityError, p as ServerError, s as NetworkError, t as AuthError, u as QuotaError } from "./errors-CKl_BSlD.js";
3
- import { n as combineAbortSignals } from "./abort-signal-BpYYr4JT.js";
3
+ import { f as combineAbortSignals, n as browserInteractiveControlHolderId, s as InteractiveSessionNotRunningError } from "./browser-interactive-control-controller-BJf0P_J4.js";
4
4
  //#region src/runtime-client.ts
5
5
  const DEFAULT_RUNTIME_TIMEOUT_MS = 3e4;
6
6
  function requireToken(token) {
@@ -81,4 +81,4 @@ function createSandboxRuntimeClient(config) {
81
81
  return new SandboxRuntimeClient(config);
82
82
  }
83
83
  //#endregion
84
- export { AuthError, CapabilityError, FileWriteConflictError, NetworkError, NotFoundError, PartialFailureError, QuotaError, SandboxError, SandboxRuntimeClient, ServerError, StateError, TimeoutError, ValidationError, createAgentRunOutcomeTracker, createSandboxRuntimeClient, deriveAgentResultOutcome, deriveAgentRunOutcome, uploadChunked };
84
+ export { AuthError, BrowserInteractiveSessionController, CapabilityError, FileWriteConflictError, InteractiveSessionNotRunningError, NetworkError, NotFoundError, PartialFailureError, QuotaError, SandboxError, SandboxRuntimeClient, ServerError, StateError, TimeoutError, ValidationError, browserInteractiveControlHolderId, createAgentRunOutcomeTracker, createSandboxRuntimeClient, deriveAgentResultOutcome, deriveAgentRunOutcome, uploadChunked };
@@ -1,7 +1,8 @@
1
- import { a as TerminalStreamReconnectAuthority, c as MintScopedTokenOptions, h as TerminalReadyInfo, l as ScopedToken, r as TerminalStreamHandlers, t as TerminalStream } from "./terminal-stream-CB2DF-qq.js";
2
- import { a as InteractiveSessionControlController, c as InteractiveSessionIdentity, d as InteractiveAttachOptions, f as InteractiveControlClaimAcknowledgement, h as InteractiveSessionStatus, m as InteractiveRequestOptions, n as BrowserInteractiveSessionControlControllerOptions, o as InteractiveSessionControlControllerOptions, p as InteractiveControlClaimOptions, s as InteractiveSessionControlTransport } from "./browser-interactive-control-controller-BzR8sFjo.js";
3
- import { F as SandboxLines } from "./lines-VAnaqs-K.js";
4
- import { A as CommitTaskSessionOptions, Aa as WriteManyFile, An as NetworkManager, Bi as SessionExecutionInfo, C as BranchOptions, Cr as SandboxDeleteOptions, D as CodeExecutionResult, Da as WaitForRolloutOptions, E as CodeExecutionOptions, Ea as WaitForOptions, Ei as SandboxTraceBundle, Er as SandboxEvent, Fi as SendSessionMessageOptions, Fn as PreviewLinkManager, Gi as SessionInterruptOptions, Gn as PromptInputPart, H as CreateTaskSessionOptions, Ii as SendSessionMessageRequest, Ji as SessionMessageAdmission, Jn as ProvisionEvent, Ki as SessionListOptions, Kn as PromptOptions, Li as SentSessionMessage, M as ConversationTurnOptions, Mi as SearchOptions, N as ConversationTurnResult, Nn as PermissionsManager, O as CodeLanguage, Oa as WorkspaceOperationLookup, Q as DispatchedSession, Qi as SnapshotDeleteAcknowledgement, Sn as ListMessagesOptions, Sr as SandboxDeleteAcknowledgement, Ti as SandboxTerminals, Tt as FileSystem, Ui as SessionForkOptions, V as CreateSessionOptions, Vn as ProcessManager, Wi as SessionInfo, Xi as SessionResultOptions, Xt as ForkIdempotency, Yn as ProvisionResult, Yt as ForkCounts, Z as DispatchPromptOptions, Zr as SandboxFleetTraceBundle, Zt as ForkLookupOptions, _n as IntelligenceReportBudget, _r as SSHCredentials, _t as ExecOptions, aa as StartupDiagnostics, an as GpuLease, at as DurablePlan, bi as SandboxTerminalAttachOptions, bn as IntelligenceReportWindow, cr as ResumeOptions, d as BackendConfig, dr as RolloutOptions, en as GitBranch, fa as TaskSessionInfo, fi as SandboxResourceUsage, ft as EgressManager, ga as TeeAttestationResponse, gi as SandboxShape, gn as IntelligenceReport, gr as SSHCommandDescriptor, hi as SandboxRuntimeHealth, hn as InstalledTool, ht as EventStreamOptions, in as GitStatus, j as CompletedTurnResult, ja as WriteManyOptions, ji as SearchMatch, jt as FileWriteResult, ka as WriteFileOptions, ki as SandboxTraceOptions, la as TaskSessionChanges, li as SandboxPortBinding, lr as Rollout, ma as TeeAttestationOptions, mi as SandboxRuntimeCapabilities, na as SnapshotOptions, ot as DurablePlanDecisionResult, p as BackendManager, pr as RolloutStartResult, qi as SessionMessage, qn as PromptResult, ra as SnapshotResult, rn as GitDiff, rt as DriverInfo, si as SandboxInfo, sr as RestoreSnapshotOptions, ta as SnapshotInfo, tn as GitCommit, tt as DriveTurnOptions, ua as TaskSessionCommitResult, un as GpuLeaseManager, va as TeePublicKeyResponse, vn as IntelligenceReportCompareTo, vt as ExecResult, xa as TurnDriveResult, xn as JsonValue, xr as SandboxCreateReceipt, yi as SandboxStatus, yr as SandboxConnection, zi as SessionEventStreamOptions } from "./types-Br35Gfpw.js";
1
+ import { a as TerminalStreamReconnectAuthority, c as MintScopedTokenOptions, h as TerminalReadyInfo, l as ScopedToken, r as TerminalStreamHandlers, t as TerminalStream } from "./terminal-stream-C9jxoB07.js";
2
+ import { f as InteractiveAttachOptions, g as InteractiveSessionStatus, h as InteractiveRequestOptions, m as InteractiveControlClaimOptions, p as InteractiveControlClaimAcknowledgement } from "./browser-interactive-control-controller-C2qVGzQz.js";
3
+ import { r as InteractiveAttachRequest } from "./interactive-controller-Dghv9yMk.js";
4
+ import { F as SandboxLines } from "./lines-BoT0rBrj.js";
5
+ import { $i as SnapshotDeleteAcknowledgement, A as CommitTaskSessionOptions, Aa as WriteFileOptions, Ai as SandboxTraceOptions, Bi as SessionEventStreamOptions, C as BranchOptions, Cn as ListMessagesOptions, Cr as SandboxDeleteAcknowledgement, D as CodeExecutionResult, Da as WaitForOptions, Di as SandboxTraceBundle, Dr as SandboxEvent, E as CodeExecutionOptions, Ei as SandboxTerminals, Et as FileSystem, Gi as SessionInfo, H as CreateTaskSessionOptions, Hn as ProcessManager, Ii as SendSessionMessageOptions, In as PreviewLinkManager, Ji as SessionMessage, Jn as PromptResult, Ki as SessionInterruptOptions, Kn as PromptInputPart, Li as SendSessionMessageRequest, M as ConversationTurnOptions, Ma as WriteManyOptions, Mi as SearchMatch, Mt as FileWriteResult, N as ConversationTurnResult, Ni as SearchOptions, O as CodeLanguage, Oa as WaitForRolloutOptions, Pn as PermissionsManager, Q as DispatchedSession, Qr as SandboxFleetTraceBundle, Qt as ForkLookupOptions, Ri as SentSessionMessage, Sa as TurnDriveResult, Sn as JsonValue, Sr as SandboxCreateReceipt, V as CreateSessionOptions, Vi as SessionExecutionInfo, Wi as SessionForkOptions, Xn as ProvisionResult, Xt as ForkCounts, Yi as SessionMessageAdmission, Yn as ProvisionEvent, Z as DispatchPromptOptions, Zi as SessionResultOptions, Zt as ForkIdempotency, _a as TeeAttestationResponse, _i as SandboxShape, _n as IntelligenceReport, _r as SSHCommandDescriptor, an as GitStatus, bi as SandboxStatus, br as SandboxConnection, ci as SandboxInfo, cr as RestoreSnapshotOptions, d as BackendConfig, da as TaskSessionCommitResult, dn as GpuLeaseManager, fr as RolloutOptions, gi as SandboxRuntimeHealth, gn as InstalledTool, gt as EventStreamOptions, ha as TeeAttestationOptions, hi as SandboxRuntimeCapabilities, ia as SnapshotResult, in as GitDiff, it as DriverInfo, j as CompletedTurnResult, ja as WriteManyFile, jn as NetworkManager, ka as WorkspaceOperationLookup, lr as ResumeOptions, mr as RolloutStartResult, na as SnapshotInfo, nn as GitCommit, nt as DriveTurnOptions, oa as StartupDiagnostics, on as GpuLease, ot as DurablePlan, p as BackendManager, pa as TaskSessionInfo, pi as SandboxResourceUsage, pt as EgressManager, qi as SessionListOptions, qn as PromptOptions, ra as SnapshotOptions, st as DurablePlanDecisionResult, tn as GitBranch, ua as TaskSessionChanges, ui as SandboxPortBinding, ur as Rollout, vn as IntelligenceReportBudget, vr as SSHCredentials, vt as ExecOptions, wr as SandboxDeleteOptions, xi as SandboxTerminalAttachOptions, xn as IntelligenceReportWindow, ya as TeePublicKeyResponse, yn as IntelligenceReportCompareTo, yt as ExecResult } from "./types-Cs-0Hy_K.js";
5
6
  import { AgentInteractiveSessionAttach, AgentInteractiveSessionControlClaim, AgentInteractiveSessionControlClaimAcknowledgement, AgentInteractiveSessionControlClaimRequest, AgentInteractiveSessionPromptAcknowledgement, AgentInteractiveSessionPromptCommand, AgentInteractiveSessionRef, AgentInteractiveSessionStart, AgentInteractiveSessionStopAcknowledgement, AgentInteractiveSessionStopCommand, AgentInteractiveTerminalSession, AgentInteractiveTerminalSession as AgentInteractiveTerminalSession$1, AgentRunCancellationAcknowledgement, AgentRunCancellationRequest, InteractionAcknowledgement, InteractionData, InteractionRequest, InteractionResponseCommand, TerminalOutputEvent, TerminalReplayWindow, agentInteractiveSessionPromptRequestDigest } from "@tangle-network/agent-interface";
6
7
  import { z } from "zod";
7
8
 
@@ -190,41 +191,6 @@ interface SandboxInteractionCommandResult {
190
191
  serverResult?: SandboxInteractionResult;
191
192
  }
192
193
  //#endregion
193
- //#region src/interactive-controller.d.ts
194
- /** The request fields supplied by an attach caller before control is claimed. */
195
- type InteractiveAttachRequest = Omit<InteractiveAttachOptions, "control">;
196
- /** Transport used by the status → claim → WebSocket controller. */
197
- interface InteractiveSessionControllerTransport extends InteractiveSessionControlTransport {
198
- attach(sessionId: string, ref: AgentInteractiveSessionRef, request: InteractiveAttachOptions, options?: InteractiveRequestOptions, reconnectAuthority?: TerminalStreamReconnectAuthority): Promise<TerminalStream>;
199
- }
200
- interface InteractiveSessionControllerOptions extends InteractiveSessionControlControllerOptions {}
201
- /**
202
- * Attach-capable controller for one exact interactive process.
203
- *
204
- * Control ownership lives in the dependency-light base controller. This layer
205
- * adds only the terminal attach operation after that ownership is resolved.
206
- */
207
- declare class InteractiveSessionController extends InteractiveSessionControlController {
208
- private readonly attachTransport;
209
- private attachInFlight?;
210
- constructor(attachTransport: InteractiveSessionControllerTransport, options: InteractiveSessionControllerOptions);
211
- attach(request: InteractiveAttachRequest, requestOptions?: InteractiveRequestOptions): Promise<TerminalStream>;
212
- /**
213
- * Open a stream for a claim returned by this controller's `resolve()`.
214
- * The controller releases that claim when the stream cannot be opened.
215
- */
216
- attachWithIdentity(identity: InteractiveSessionIdentity, request: InteractiveAttachRequest, requestOptions?: InteractiveRequestOptions): Promise<TerminalStream>;
217
- }
218
- /** Browser transport options for the attach-capable controller. */
219
- interface BrowserInteractiveSessionControllerOptions extends InteractiveSessionControllerOptions, BrowserInteractiveSessionControlControllerOptions {
220
- /** Mint a future session-runtime token for every browser terminal dial. */
221
- terminalTokenProvider?: (signal?: AbortSignal) => Promise<ScopedToken>;
222
- }
223
- /** Concrete controller for browser deep links and terminal attachment. */
224
- declare class BrowserInteractiveSessionController extends InteractiveSessionController {
225
- constructor(options: BrowserInteractiveSessionControllerOptions);
226
- }
227
- //#endregion
228
194
  //#region src/interactive-terminal-session.d.ts
229
195
  /** Metadata required to describe one terminal without reading provider state. */
230
196
  interface InteractiveTerminalMetadata {
@@ -1864,6 +1830,9 @@ declare class SandboxInstance {
1864
1830
  * Resume a stopped sandbox.
1865
1831
  */
1866
1832
  resume(options?: ResumeOptions): Promise<void>;
1833
+ /** Rebuild a stopped sandbox from its durable snapshot under the same ID. */
1834
+ rebuild(options?: ResumeOptions): Promise<void>;
1835
+ private resumeRuntime;
1867
1836
  /**
1868
1837
  * Delete the sandbox permanently. This is how a forked child is destroyed.
1869
1838
  *
@@ -2210,4 +2179,4 @@ declare class SandboxInstance {
2210
2179
  }): Promise<DurablePlanDecisionResult>;
2211
2180
  }
2212
2181
  //#endregion
2213
- export { SandboxMcpConfig as $, InteractiveStopCommand as A, BrowserInteractiveSessionControllerOptions as B, InteractiveSessionHandleOptions as C, InteractiveSessionRef as D, InteractiveSessionInfo as E, InteractiveTerminalFrameLog as F, SandboxInteractionCommandResult as G, InteractiveSessionController as H, InteractiveTerminalMetadata as I, SandboxInteractionResult as J, SandboxInteractionConflict as K, createInteractiveTerminalCapture as L, RespondToPermissionOptions as M, agentInteractiveSessionPromptRequestDigest as N, InteractiveSessionStartOptions as O, InteractiveTerminalCapture as P, SANDBOX_MCP_SERVER_NAME as Q, createInteractiveTerminalSession as R, InteractiveSessionHandle as S, InteractiveSessionIncarnationId as T, InteractiveSessionControllerOptions as U, InteractiveAttachRequest as V, InteractiveSessionControllerTransport as W, BuildSandboxMcpConfigOptions as X, BuildControlPlaneMcpConfigOptions as Y, CONTROL_PLANE_MCP_SERVER_NAME as Z, SandboxSession as _, WorkspaceImagePublishRequestOptions as a, InteractivePromptCommand as b, TraceExportFormat as c, buildTraceExportPayload as d, SandboxMcpEndpoint as et, exportTraceBundle as f, RawEvidenceExport as g, SandboxTaskSession as h, WorkspaceImagePublishInput as i, InterruptResult as j, InteractiveSessionStartResult as k, TraceExportResult as l, toOtelJson as m, HttpClient as n, buildControlPlaneMcpConfig as nt, WorkspaceImagePublishResult as o, otelTraceIdForTangleTrace as p, SandboxInteractionResolution as q, SandboxInstance as r, buildSandboxMcpConfig as rt, WorkspaceImages as s, ForkAcknowledgement as t, SandboxMcpServerEntry as tt, TraceExportSink as u, AgentInteractiveTerminalSession$1 as v, InteractiveSessionHost as w, InteractiveSessionControlClaim as x, InteractiveControlClaimRequest as y, BrowserInteractiveSessionController as z };
2182
+ export { InteractiveStopCommand as A, SandboxInteractionConflict as B, InteractiveSessionHandleOptions as C, InteractiveSessionRef as D, InteractiveSessionInfo as E, InteractiveTerminalFrameLog as F, CONTROL_PLANE_MCP_SERVER_NAME as G, SandboxInteractionResult as H, InteractiveTerminalMetadata as I, SandboxMcpEndpoint as J, SANDBOX_MCP_SERVER_NAME as K, createInteractiveTerminalCapture as L, RespondToPermissionOptions as M, agentInteractiveSessionPromptRequestDigest as N, InteractiveSessionStartOptions as O, InteractiveTerminalCapture as P, createInteractiveTerminalSession as R, InteractiveSessionHandle as S, InteractiveSessionIncarnationId as T, BuildControlPlaneMcpConfigOptions as U, SandboxInteractionResolution as V, BuildSandboxMcpConfigOptions as W, buildControlPlaneMcpConfig as X, SandboxMcpServerEntry as Y, buildSandboxMcpConfig as Z, SandboxSession as _, WorkspaceImagePublishRequestOptions as a, InteractivePromptCommand as b, TraceExportFormat as c, buildTraceExportPayload as d, exportTraceBundle as f, RawEvidenceExport as g, SandboxTaskSession as h, WorkspaceImagePublishInput as i, InterruptResult as j, InteractiveSessionStartResult as k, TraceExportResult as l, toOtelJson as m, HttpClient as n, WorkspaceImagePublishResult as o, otelTraceIdForTangleTrace as p, SandboxMcpConfig as q, SandboxInstance as r, WorkspaceImages as s, ForkAcknowledgement as t, TraceExportSink as u, AgentInteractiveTerminalSession$1 as v, InteractiveSessionHost as w, InteractiveSessionControlClaim as x, InteractiveControlClaimRequest as y, SandboxInteractionCommandResult as z };