@tangle-network/sandbox 0.60.31-develop.20261010074258.7991cf8 → 0.60.31-develop.20261010075509.de7486e
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 +4 -4
- package/dist/agent/index.js +4 -4
- package/dist/agent/preview.d.ts +1 -1
- package/dist/agent/preview.js +2 -2
- package/dist/{agent-run-outcome-C8Si8478.d.ts → agent-run-outcome-CGf6PAs8.d.ts} +1 -1
- package/dist/auth/index.d.ts +2 -2
- package/dist/auth/index.js +1 -1
- package/dist/{browser-interactive-control-controller-DRCfxOQz.d.ts → browser-interactive-control-controller-JUW3gOGH.d.ts} +1 -1
- package/dist/chunked-upload-CfefWUE5.js +435 -0
- package/dist/chunked-upload-file-Bo2ROB52.js +109 -0
- package/dist/{client-HewG9j9A.d.ts → client-B6JfkRhc.d.ts} +5 -5
- package/dist/{client-BzXVeXvo.js → client-p2d-6oAH.js} +4 -4
- package/dist/collaboration/index.d.ts +1 -1
- package/dist/collaboration/index.js +1 -1
- package/dist/core.d.ts +5 -5
- package/dist/core.js +3 -3
- package/dist/{index-D_o4zbXJ.d.ts → index-DHgljRHu.d.ts} +2 -2
- package/dist/index.d.ts +12 -12
- package/dist/index.js +6 -6
- package/dist/interactive-control.d.ts +1 -1
- package/dist/{interactive-controller-ykaThYp6.d.ts → interactive-controller-DNbLzamS.d.ts} +2 -2
- package/dist/{interactive-controller-CvW2-UfM.js → interactive-controller-Dxt5sW2N.js} +3 -291
- package/dist/{lines-DCxU0xIV.d.ts → lines-BOWMNDp5.d.ts} +1 -1
- package/dist/lines.d.ts +1 -1
- package/dist/{local-cli-auth-Cr1fyoKv.js → local-cli-auth-BWELjBLz.js} +1 -1
- package/dist/{mcp-local-DY1CnWBn.js → mcp-local-DjryqUiY.js} +1 -1
- package/dist/{preview-DcT5Fb1W.d.ts → preview-B4yfnMgD.d.ts} +3 -3
- package/dist/runtime.d.ts +6 -31
- package/dist/runtime.js +2 -1
- package/dist/{sandbox-CbuA-iZi.js → sandbox-B6LlVm4f.js} +109 -8
- package/dist/{sandbox-CrET4m65.d.ts → sandbox-WpE5rzUa.d.ts} +6 -6
- package/dist/{secp256k1-CyKOxB5J.js → secp256k1-Dx2XABHz.js} +1 -1
- package/dist/tangle/index.d.ts +1 -1
- package/dist/tangle/index.js +1 -1
- package/dist/{tangle-C1dd-4xk.js → tangle-Ux41HNTu.js} +3 -3
- package/dist/{types-BeWUGJ5S.d.ts → types-i3Vs02b8.d.ts} +74 -3
- package/package.json +5 -5
- /package/dist/{cli-auth-bundle-BwIJkzAQ.js → cli-auth-bundle-Dm8w5faq.js} +0 -0
- /package/dist/{cli-auth-bundle-BMcIiB-I.d.ts → cli-auth-bundle-ODe06Ts7.d.ts} +0 -0
- /package/dist/{collaboration-CrO2Lhyi.js → collaboration-DaWEv29D.js} +0 -0
- /package/dist/{errors-D7RVedpR.d.ts → errors-CRssX9qs.d.ts} +0 -0
- /package/dist/{index-BoQeoNOD.d.ts → index-BgmgfYZZ.d.ts} +0 -0
- /package/dist/{index-BXcL8P-U.d.ts → index-DHuHjNie.d.ts} +0 -0
- /package/dist/{line-application-C2SuT1zK.js → line-application-Cq6dJLBD.js} +0 -0
- /package/dist/{preview-operations-CbTiBE-a.js → preview-operations-DqSo-IBm.js} +0 -0
- /package/dist/{raw-evidence-archive-Bi-Lt83d.js → raw-evidence-archive-Br5a3xZ_.js} +0 -0
- /package/dist/{terminal-stream-B6bUr0hj.d.ts → terminal-stream-CV1pMSKC.d.ts} +0 -0
- /package/dist/{utils-ChcSLv53.js → utils-B7_9Hl_z.js} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as backendTypeSchema } from "./backend-types-C7b_Gpa0.js";
|
|
2
|
-
import {
|
|
2
|
+
import { D as foldModelRoutingFields, E as assertCurrentBackendType, M as withProfileHarness, S as encodePromptForWire, T as applyRequestedModel, k as normalizeRuntimeBackendConfig, s as requestInteractiveSessionToken, w as parseSSEStream } from "./interactive-controller-Dxt5sW2N.js";
|
|
3
3
|
import { _ as TimeoutError, b as parseResponseError, c as NetworkError, d as QuotaError, l as NotFoundError, m as ServerError, p as SandboxError, s as NON_RETRYABLE_CREATE_QUOTA_REASONS, t as AuthError, u as PartialFailureError, v as ValidationError, x as readResponseJson, y as parseErrorResponse } from "./errors-Cq4hMysQ.js";
|
|
4
4
|
import { f as combineAbortSignals } from "./browser-interactive-control-controller-BJf0P_J4.js";
|
|
5
|
-
import { A as exportTraceBundle, C as splitInlineProfileFileMounts, D as normalizeSandboxShape, E as normalizeConnection, O as rewrapResponse, T as validateDeferredProfileFileMounts, a as normalizeStartupDiagnostics, i as normalizeSandboxCreateReceipt, n as createSandboxInstanceFromResponse, r as normalizeCaptureProof, w as splitInlineProfileSkills } from "./sandbox-
|
|
5
|
+
import { A as exportTraceBundle, C as splitInlineProfileFileMounts, D as normalizeSandboxShape, E as normalizeConnection, O as rewrapResponse, T as validateDeferredProfileFileMounts, a as normalizeStartupDiagnostics, i as normalizeSandboxCreateReceipt, n as createSandboxInstanceFromResponse, r as normalizeCaptureProof, w as splitInlineProfileSkills } from "./sandbox-B6LlVm4f.js";
|
|
6
6
|
import { LinesClient } from "./lines.js";
|
|
7
7
|
import { agentProfileSchema } from "@tangle-network/agent-interface";
|
|
8
8
|
import { z } from "zod";
|
|
@@ -3323,11 +3323,11 @@ function withRequestContextHeaders(response, path, method) {
|
|
|
3323
3323
|
return rewrapResponse(response, headers);
|
|
3324
3324
|
}
|
|
3325
3325
|
async function resolveLocalCliAuthFiles(backendType) {
|
|
3326
|
-
const { discoverLocalCliAuthFiles } = await import("./local-cli-auth-
|
|
3326
|
+
const { discoverLocalCliAuthFiles } = await import("./local-cli-auth-BWELjBLz.js");
|
|
3327
3327
|
return discoverLocalCliAuthFiles(backendType);
|
|
3328
3328
|
}
|
|
3329
3329
|
async function describeLocalCliAuthExpectation(backendType) {
|
|
3330
|
-
const { describeLocalCliAuthExpectation: describe } = await import("./local-cli-auth-
|
|
3330
|
+
const { describeLocalCliAuthExpectation: describe } = await import("./local-cli-auth-BWELjBLz.js");
|
|
3331
3331
|
return describe(backendType);
|
|
3332
3332
|
}
|
|
3333
3333
|
async function hydrateLocalCliBackendAuth(backend, baseUrl, trustLocalCliAuth) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
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-
|
|
1
|
+
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-DHuHjNie.js";
|
|
2
2
|
export { CollaborationBootstrapRequest, CollaborationBootstrapResponse, CollaborationClient, CollaborationClientConfig, CollaborationDocumentAdapter, CollaborationDocumentChange, CollaborationDocumentRef, CollaborationFileBridge, CollaborationFileBridgeOptions, CollaborationFileEvent, CollaborationPermissions, CollaborationTokenRefreshRequest, CollaborationTokenRefreshResponse, CollaborationTransportConfig, SaveCollaborationSnapshotRequest, SaveCollaborationSnapshotResponse, buildCollaborationDocumentId, normalizeCollaborationPath, parseCollaborationDocumentId };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "../collaboration-
|
|
1
|
+
import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "../collaboration-DaWEv29D.js";
|
|
2
2
|
export { CollaborationClient, CollaborationFileBridge, buildCollaborationDocumentId, normalizeCollaborationPath, parseCollaborationDocumentId };
|
package/dist/core.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as WorkspaceImagePublishRequestOptions, i as WorkspaceImagePublishInput, o as WorkspaceImagePublishResult, r as SandboxInstance, s as WorkspaceImages } from "./sandbox-
|
|
2
|
-
import { An as NetworkConfig, B as CreateSandboxOptions, Ba as
|
|
3
|
-
import { A as LineSenderVerification, B as profileChannelReference, C as LineReplyCodeInput, G as LineApplicationResult, H as LINE_APPLICATION_REQUEST_MAX_BYTES, I as LinesClient, J as parseLineApplicationRequest, K as LineApplicationState, O as LineSendInput, S as LineReplyCode, U as LineApplication, V as LINE_APPLICATION_REPLY_MAX_CHARS, W as LineApplicationRequest, Y as parseLineApplicationResult, a as LineApplicationAttachOptions, b as LineProvider, c as LineAttachmentReauthorization, d as LineInstanceAttachOptions, f as LineInstanceCreate, h as LineMemberInstance, j as LineSenderVerificationStart, k as LineSendReceipt, l as LineExecutionKey, m as LineMember, n as LineAgentRolePolicy, q as LineApplicationView, s as LineAttachment, t as Line, x as LineReminderPreferences, y as LineNumberInventory, z as lineInstanceKey } from "./lines-
|
|
4
|
-
import { A as BackendRegistryEntry, C as InstancesClient, F as backendRegistryInteractionKindSchema, I as backendRegistryResponseSchema, L as isBackendRegistryInteractionKind, M as BackendRegistryResponse, N as backendRegistryCapabilitiesSchema, P as backendRegistryEntrySchema, R as parseBackendRegistryResponse, _ as EnsureInstanceOptions, b as InstanceRecord, i as Sandbox, j as BackendRegistryInteractionKind, k as BackendRegistryCapabilities, v as HostedInstance, x as InstanceRestartingError, y as InstanceProfile, z as parseBackendRegistryResponseBody } from "./client-
|
|
5
|
-
import { a as FileWriteConflictError, b as ValidationError, 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, y as TimeoutError } from "./errors-
|
|
1
|
+
import { a as WorkspaceImagePublishRequestOptions, i as WorkspaceImagePublishInput, o as WorkspaceImagePublishResult, r as SandboxInstance, s as WorkspaceImages } from "./sandbox-WpE5rzUa.js";
|
|
2
|
+
import { An as NetworkConfig, B as CreateSandboxOptions, Ba as ManagedProcessOptions, Ci as SandboxStatus, Fn as PreviewLinkInfo, Ga as SandboxEnvRecovery, Ha as ManagedProcessResumeOptions, In as PreviewLinkManager, Ka as SandboxEnvRecoveryView, Kn as PromptInputPart, Ln as PreviewLinkWaitOptions, M as ConversationTurnOptions, N as ConversationTurnResult, Qi as SessionMessageAdmission, Ra as ManagedProcessClient, Ua as ManagedProcessSpec, Va as ManagedProcessRecord, Wa as ManagedProcessState, br as SandboxConfig, ui as SandboxInfo, vt as ExecOptions, yt as ExecResult, za as ManagedProcessJobs } from "./types-i3Vs02b8.js";
|
|
3
|
+
import { A as LineSenderVerification, B as profileChannelReference, C as LineReplyCodeInput, G as LineApplicationResult, H as LINE_APPLICATION_REQUEST_MAX_BYTES, I as LinesClient, J as parseLineApplicationRequest, K as LineApplicationState, O as LineSendInput, S as LineReplyCode, U as LineApplication, V as LINE_APPLICATION_REPLY_MAX_CHARS, W as LineApplicationRequest, Y as parseLineApplicationResult, a as LineApplicationAttachOptions, b as LineProvider, c as LineAttachmentReauthorization, d as LineInstanceAttachOptions, f as LineInstanceCreate, h as LineMemberInstance, j as LineSenderVerificationStart, k as LineSendReceipt, l as LineExecutionKey, m as LineMember, n as LineAgentRolePolicy, q as LineApplicationView, s as LineAttachment, t as Line, x as LineReminderPreferences, y as LineNumberInventory, z as lineInstanceKey } from "./lines-BOWMNDp5.js";
|
|
4
|
+
import { A as BackendRegistryEntry, C as InstancesClient, F as backendRegistryInteractionKindSchema, I as backendRegistryResponseSchema, L as isBackendRegistryInteractionKind, M as BackendRegistryResponse, N as backendRegistryCapabilitiesSchema, P as backendRegistryEntrySchema, R as parseBackendRegistryResponse, _ as EnsureInstanceOptions, b as InstanceRecord, i as Sandbox, j as BackendRegistryInteractionKind, k as BackendRegistryCapabilities, v as HostedInstance, x as InstanceRestartingError, y as InstanceProfile, z as parseBackendRegistryResponseBody } from "./client-B6JfkRhc.js";
|
|
5
|
+
import { a as FileWriteConflictError, b as ValidationError, 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, y as TimeoutError } from "./errors-CRssX9qs.js";
|
|
6
6
|
|
|
7
7
|
//#region src/core.d.ts
|
|
8
8
|
/** Local SDK protocol support only, not a deployed-host readiness assertion.
|
package/dist/core.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { _ as TimeoutError, a as FileWriteConflictError, c as NetworkError, d as QuotaError, h as StateError, l as NotFoundError, m as ServerError, n as CapabilityError, p as SandboxError, t as AuthError, u as PartialFailureError, v as ValidationError } from "./errors-Cq4hMysQ.js";
|
|
2
|
-
import { _ as parseBackendRegistryResponse, a as InstanceRestartingError, f as backendRegistryCapabilitiesSchema, g as isBackendRegistryInteractionKind, h as backendRegistryResponseSchema, i as HostedInstance, m as backendRegistryInteractionKindSchema, n as Sandbox, o as InstancesClient, p as backendRegistryEntrySchema, v as parseBackendRegistryResponseBody } from "./client-
|
|
3
|
-
import { o as WorkspaceImages, t as SandboxInstance, x as ManagedProcessClient } from "./sandbox-
|
|
2
|
+
import { _ as parseBackendRegistryResponse, a as InstanceRestartingError, f as backendRegistryCapabilitiesSchema, g as isBackendRegistryInteractionKind, h as backendRegistryResponseSchema, i as HostedInstance, m as backendRegistryInteractionKindSchema, n as Sandbox, o as InstancesClient, p as backendRegistryEntrySchema, v as parseBackendRegistryResponseBody } from "./client-p2d-6oAH.js";
|
|
3
|
+
import { o as WorkspaceImages, t as SandboxInstance, x as ManagedProcessClient } from "./sandbox-B6LlVm4f.js";
|
|
4
4
|
import { LinesClient, lineInstanceKey, profileChannelReference } from "./lines.js";
|
|
5
|
-
import { i as parseLineApplicationResult, n as LINE_APPLICATION_REQUEST_MAX_BYTES, r as parseLineApplicationRequest, t as LINE_APPLICATION_REPLY_MAX_CHARS } from "./line-application-
|
|
5
|
+
import { i as parseLineApplicationResult, n as LINE_APPLICATION_REQUEST_MAX_BYTES, r as parseLineApplicationRequest, t as LINE_APPLICATION_REPLY_MAX_CHARS } from "./line-application-Cq6dJLBD.js";
|
|
6
6
|
//#region src/core.ts
|
|
7
7
|
/** Local SDK protocol support only, not a deployed-host readiness assertion.
|
|
8
8
|
* Version 1 refuses unconfirmed isolated receipts before materializing any
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as HttpClient, r as SandboxInstance } from "./sandbox-
|
|
2
|
-
import { B as CreateSandboxOptions } from "./types-
|
|
1
|
+
import { n as HttpClient, r as SandboxInstance } from "./sandbox-WpE5rzUa.js";
|
|
2
|
+
import { B as CreateSandboxOptions } from "./types-i3Vs02b8.js";
|
|
3
3
|
|
|
4
4
|
//#region src/tangle/abi.d.ts
|
|
5
5
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { A as InteractiveStopCommand, B as SandboxInteractionConflict, C as InteractiveSessionHandleOptions, D as InteractiveSessionRef, E as InteractiveSessionInfo, F as InteractiveTerminalFrameLog, G as CONTROL_PLANE_MCP_SERVER_NAME, H as SandboxInteractionResult, I as InteractiveTerminalMetadata, J as SandboxMcpEndpoint, K as SANDBOX_MCP_SERVER_NAME, L as createInteractiveTerminalCapture, M as RespondToPermissionOptions, N as agentInteractiveSessionPromptRequestDigest, O as InteractiveSessionStartOptions, P as InteractiveTerminalCapture, R as createInteractiveTerminalSession, S as InteractiveSessionHandle, T as InteractiveSessionIncarnationId, U as BuildControlPlaneMcpConfigOptions, V as SandboxInteractionResolution, W as BuildSandboxMcpConfigOptions, X as buildControlPlaneMcpConfig, Y as SandboxMcpServerEntry, Z as buildSandboxMcpConfig, _ as SandboxSession, a as WorkspaceImagePublishRequestOptions, b as InteractivePromptCommand, c as TraceExportFormat, d as buildTraceExportPayload, f as exportTraceBundle, g as RawEvidenceExport, h as SandboxTaskSession, i as WorkspaceImagePublishInput, j as InterruptResult, k as InteractiveSessionStartResult, l as TraceExportResult, m as toOtelJson, o as WorkspaceImagePublishResult, p as otelTraceIdForTangleTrace, q as SandboxMcpConfig, r as SandboxInstance, s as WorkspaceImages, t as ForkAcknowledgement, u as TraceExportSink, v as AgentInteractiveTerminalSession, w as InteractiveSessionHost, x as InteractiveSessionControlClaim, y as InteractiveControlClaimRequest, z as SandboxInteractionCommandResult } from "./sandbox-
|
|
2
|
-
import { $ as DownloadOptions, $
|
|
3
|
-
import { c as MintScopedTokenOptions, d as TERMINAL_WS_ECHO_SUBPROTOCOL, f as TerminalExitInfo, g as TerminalStreamAuthFormat, h as TerminalReadyInfo, i as TerminalStreamOptions, l as ScopedToken, m as TerminalOutputMessage, n as TerminalStreamError, o as TerminalStreamToken, p as TerminalInteractiveSessionIdentity, r as TerminalStreamHandlers, s as MintInteractiveSessionTokenOptions, t as TerminalStream, u as ScopedTokenScope } from "./terminal-stream-
|
|
4
|
-
import { a as InteractiveSessionControlController, c as InteractiveSessionIdentity, d as interactiveSessionIdentityDigest, f as InteractiveAttachOptions, g as InteractiveSessionStatus, h as InteractiveRequestOptions, i as INTERACTIVE_CONTROL_CLEANUP_TIMEOUT_MS, l as InteractiveSessionNotRunningError, m as InteractiveControlClaimOptions, n as BrowserInteractiveSessionControlControllerOptions, o as InteractiveSessionControlControllerOptions, p as InteractiveControlClaimAcknowledgement, r as browserInteractiveControlHolderId, s as InteractiveSessionControlTransport, t as BrowserInteractiveSessionControlController, u as createInteractiveControlHolderId } from "./browser-interactive-control-controller-
|
|
5
|
-
import { a as InteractiveSessionControllerOptions, i as InteractiveSessionController, n as BrowserInteractiveSessionControllerOptions, o as InteractiveSessionControllerTransport, r as InteractiveAttachRequest, t as BrowserInteractiveSessionController } from "./interactive-controller-
|
|
6
|
-
import { A as LineSenderVerification, B as profileChannelReference, C as LineReplyCodeInput, D as LineRole, E as LineRespondView, F as LineVoiceOptions, G as LineApplicationResult, H as LINE_APPLICATION_REQUEST_MAX_BYTES, I as LinesClient, J as parseLineApplicationRequest, K as LineApplicationState, M as LineThread, N as LineTransport, O as LineSendInput, P as LineVoice, R as SandboxLines, S as LineReplyCode, T as LineRespondAgent, U as LineApplication, V as LINE_APPLICATION_REPLY_MAX_CHARS, W as LineApplicationRequest, Y as parseLineApplicationResult, _ as LineMemberSpec, a as LineApplicationAttachOptions, b as LineProvider, c as LineAttachmentReauthorization, d as LineInstanceAttachOptions, f as LineInstanceCreate, g as LineMemberPatch, h as LineMemberInstance, i as LineAllowanceSubject, j as LineSenderVerificationStart, k as LineSendReceipt, l as LineExecutionKey, m as LineMember, n as LineAgentRolePolicy, o as LineAttachOptions, p as LineLimits, q as LineApplicationView, r as LineAllowance, s as LineAttachment, t as Line, u as LineFromConnectionInput, v as LineMessage, w as LineReplyGate, x as LineReminderPreferences, y as LineNumberInventory, z as lineInstanceKey } from "./lines-
|
|
7
|
-
import { A as BackendRegistryEntry, C as InstancesClient, D as ParsedSSEEvent, E as ParseSSEStreamOptions, F as backendRegistryInteractionKindSchema, I as backendRegistryResponseSchema, L as isBackendRegistryInteractionKind, M as BackendRegistryResponse, N as backendRegistryCapabilitiesSchema, O as parseSSEStream, P as backendRegistryEntrySchema, R as parseBackendRegistryResponse, S as InstanceStart, T as SandboxFleetClient, _ as EnsureInstanceOptions, a as Team, b as InstanceRecord, c as SessionBroadcastEvent, d as RunPlacement, f as RunPlacementRecord, g as RunsHttpClient, h as RunsClient, i as Sandbox, j as BackendRegistryInteractionKind, k as BackendRegistryCapabilities, l as SessionBroadcastResult, m as RunWaitOptions, n as IntelligenceClient, o as TeamInvitation, p as RunRecord, r as InviteTeamMemberOptions, s as TeamMember, t as CreateTeamOptions, u as RunOptions, v as HostedInstance, w as SandboxFleet, x as InstanceRestartingError, y as InstanceProfile, z as parseBackendRegistryResponseBody } from "./client-
|
|
8
|
-
import { _ as StreamInterruptedError, a as FileWriteConflictError, b as ValidationError, c as NotFoundError, d as ResumeEnvRequiredError, f as SandboxError, g as StateError, h as ServerError, i as EgressProxyRecoveryError, l as PartialFailureError, m as SandboxFailureDetail, n as CapabilityError, o as KeyBudgetExhaustedError, p as SandboxErrorJson, r as EdgeNotReadyError, s as NetworkError, t as AuthError, u as QuotaError, v as StreamInterruptionReason, y as TimeoutError } from "./errors-
|
|
9
|
-
import { d as AnyTokenPayload, h as IssueCollaborationTokenOptions, m as CollaborationTokenPayload, p as CollaborationAccess } from "./index-
|
|
10
|
-
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-
|
|
11
|
-
import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, o as projectAgentTerminalRecord, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-
|
|
12
|
-
import { b as TangleSandboxClientConfig, h as TangleSandboxClient } from "./index-
|
|
1
|
+
import { A as InteractiveStopCommand, B as SandboxInteractionConflict, C as InteractiveSessionHandleOptions, D as InteractiveSessionRef, E as InteractiveSessionInfo, F as InteractiveTerminalFrameLog, G as CONTROL_PLANE_MCP_SERVER_NAME, H as SandboxInteractionResult, I as InteractiveTerminalMetadata, J as SandboxMcpEndpoint, K as SANDBOX_MCP_SERVER_NAME, L as createInteractiveTerminalCapture, M as RespondToPermissionOptions, N as agentInteractiveSessionPromptRequestDigest, O as InteractiveSessionStartOptions, P as InteractiveTerminalCapture, R as createInteractiveTerminalSession, S as InteractiveSessionHandle, T as InteractiveSessionIncarnationId, U as BuildControlPlaneMcpConfigOptions, V as SandboxInteractionResolution, W as BuildSandboxMcpConfigOptions, X as buildControlPlaneMcpConfig, Y as SandboxMcpServerEntry, Z as buildSandboxMcpConfig, _ as SandboxSession, a as WorkspaceImagePublishRequestOptions, b as InteractivePromptCommand, c as TraceExportFormat, d as buildTraceExportPayload, f as exportTraceBundle, g as RawEvidenceExport, h as SandboxTaskSession, i as WorkspaceImagePublishInput, j as InterruptResult, k as InteractiveSessionStartResult, l as TraceExportResult, m as toOtelJson, o as WorkspaceImagePublishResult, p as otelTraceIdForTangleTrace, q as SandboxMcpConfig, r as SandboxInstance, s as WorkspaceImages, t as ForkAcknowledgement, u as TraceExportSink, v as AgentInteractiveTerminalSession, w as InteractiveSessionHost, x as InteractiveSessionControlClaim, y as InteractiveControlClaimRequest, z as SandboxInteractionCommandResult } from "./sandbox-WpE5rzUa.js";
|
|
2
|
+
import { $ as DownloadOptions, $i as SessionMessageInputPart, $n as PublicProfileConflict, $r as SandboxFleetToken, $t as GPU_LEASE_PROVIDER_NAMES, A as CommitTaskSessionOptions, Aa as WaitForOptions, Ai as SandboxTraceBundle, An as NetworkConfig, Ar as SandboxFleetAgent, At as FileUsageOptions, B as CreateSandboxOptions, Ba as ManagedProcessOptions, Bi as SendSessionMessageRequest, Bn as ProcessListOptions, Br as SandboxFleetIntelligenceEnvelope, Bt as FleetDispatchStreamOptions, C as BranchOptions, Ca as TokenRefreshHandler, Ci as SandboxStatus, Cn as ListMessagesOptions, Cr as SandboxCreateReceipt, Ct as FileReadError, Da as UploadOptions, Di as SandboxTerminalManager, Dn as MAX_EGRESS_DENIALS_LIMIT, Dr as SandboxEgressUsage, Dt as FileTreeFile, Ea as UpdateUserOptions, Ei as SandboxTerminalInfo, En as ListSandboxOptions, Er as SandboxDeleteOutcome, Et as FileSystem, F as CreateIntelligenceReportOptions, Fa as WriteManyOptions, Fi as SearchMatch, Fn as PreviewLinkInfo, Fr as SandboxFleetDispatchFailureClass, Ft as FleetAgentResult, G as DeleteMatchingSandboxesFilter, Ga as SandboxEnvRecovery, Gi as SessionExecutionStatus, Gn as ProcessStatus, Gr as SandboxFleetManifest, Gt as FleetMachineId, H as CreateTaskSessionOptions, Ha as ManagedProcessResumeOptions, Hi as SessionBackendCredentials, Hn as ProcessManager, Hr as SandboxFleetMachineMeteredUsage, Ht as FleetDriveTurnRequest, I as CreateRequestOptions, Ii as SearchOptions, In as PreviewLinkManager, Ir as SandboxFleetDispatchResponse, It as FleetAgentRunStatus, J as DeleteOptions, Ja as RawEvidenceDirectoryExport, Ji as SessionInfo, Jn as PromptResult, Jr as SandboxFleetParent, Jt as FleetRunEvent, K as DeleteMatchingSandboxesOptions, Ka as SandboxEnvRecoveryView, Ki as SessionFailureReason, Kn as PromptInputPart, Kr as SandboxFleetManifestMachine, Kt as FleetPromptDispatchOptions, L as CreateSandboxFleetOptions, Li as SecretInfo, Ln as PreviewLinkWaitOptions, Lr as SandboxFleetDriverCapability, Lt as FleetDispatchCancelResult, M as ConversationTurnOptions, Ma as WorkspaceOperationLookup, Mi as SandboxTraceExport, Mn as NonHostAgentDriverConfig, Mr as SandboxFleetArtifact, Mt as FileWriteResult, N as ConversationTurnResult, Na as WriteFileOptions, Ni as SandboxTraceOptions, Nn as PermissionLevel, Nr as SandboxFleetArtifactSpec, Nt as FleetAgentId, Oa as UploadProgress, Oi as SandboxTerminalRequestOptions, On as McpServerConfig, Or as SandboxEnvironment, Ot as FileTreeOptions, P as CreateGpuLeaseOptions, Pa as WriteManyFile, Pi as SandboxUser, Pn as PermissionsManager, Pr as SandboxFleetCostEstimate, Pt as FleetAgentPlacement, Q as DispatchedSession, Qa as RawEvidenceRecordsFile, Qi as SessionMessageAdmission, Qn as ProvisionStep, Qr as SandboxFleetSpend, Qt as ForkLookupOptions, Ra as ManagedProcessClient, Ri as SecretsManager, Rn as Process, Rr as SandboxFleetDriverTimings, Rt as FleetDispatchResultBuffer, S as BatchTaskResult, Sa as TeePublicKeyResponse, Si as SandboxShapesInfo, Sr as SandboxCreateOutcome, St as FileReadBatchResult, T as ChunkedUploadResult, Ta as TurnDriveResult, Ti as SandboxTerminalCreateOptions, Tn as ListSandboxFleetOptions, Tr as SandboxDeleteOptions, Tt as FileRenameResult, U as DeleteMatchingSandboxOutcome, Ua as ManagedProcessSpec, Ui as SessionEventStreamOptions, Un as ProcessSignal, Ur as SandboxFleetMachineRecord, Ut as FleetExecDispatchOptions, V as CreateSessionOptions, Va as ManagedProcessRecord, Vi as SentSessionMessage, Vn as ProcessLogEntry, Vr as SandboxFleetMachine, Vt as FleetDriveTurnOutcome, W as DeleteMatchingSandboxResult, Wa as ManagedProcessState, Wi as SessionExecutionInfo, Wn as ProcessSpawnOptions, Wr as SandboxFleetMachineSpec, X as DirectoryPermission, Xa as RawEvidenceNativeFile, Xi as SessionListOptions, Xn as ProvisionResult, Xr as SandboxFleetPolicy, Xt as ForkCounts, Y as DevServerInfo, Ya as RawEvidenceExportOptions, Yi as SessionInterruptOptions, Yn as ProvisionEvent, Yr as SandboxFleetPlacement, Yt as FleetRunOptions, Z as DispatchPromptOptions, Za as RawEvidencePayloadFile, Zi as SessionMessage, Zn as ProvisionStatus, Zr as SandboxFleetProfileRef, Zt as ForkIdempotency, _ as BatchBackend, _a as TaskSessionProfile, _i as SandboxRunGeneration, _n as IntelligenceReport, _r as RolloutTurnPart, _t as ExactProcessSpawnOptions, aa as SnapshotInfo, ai as SandboxFleetWorkspace, an as GitStatus, ao as BatchSidecarGroup, ar as ReapExpiredSandboxFleetsResult, at as DriverType, b as BatchRunRequest, ba as TeeAttestationResponse, bi as SandboxShape, bn as IntelligenceReportSubjectType, br as SandboxConfig, bt as FileInfo, c as AttachGpuLeaseOptions, ci as SandboxFleetWorkspaceSnapshotResult, cn as GpuLeaseCommandResult, co as BackendType, cr as RenameOptions, d as BackendConfig, da as StorageConfig, di as SandboxIntelligenceEnvelope, dn as GpuLeaseManager, dr as Rollout, dt as EffectiveBackendSource, ea as SessionResultOptions, ei as SandboxFleetTraceBundle, en as GitAuth, er as PublicTemplateInfo, et as DownloadProgress, f as BackendInfo, fa as SubscriptionInfo, fi as SandboxPortBinding, fn as GpuLeaseProviderName, fr as RolloutChildResult, ft as EgressDenial, g as BackendStatus, ga as TaskSessionInfo, gi as SandboxResources, gn as InstalledTool, gr as RolloutStatus, gt as EventStreamOptions, h as BackendRuntimeConfigUpdate, ha as TaskSessionFileChange, hi as SandboxResourceUsage, hn as HostAgentRuntimeBackend, hr as RolloutStartResult, ht as EnsureDevServerOptions, ia as SnapshotIdempotency, ii as SandboxFleetUsage, in as GitDiff, io as BatchEventDataMap, ir as ReapExpiredSandboxFleetsOptions, it as DriverInfo, j as CompletedTurnResult, ja as WaitForRolloutOptions, ji as SandboxTraceEvent, jn as NetworkManager, jr as SandboxFleetAgentSpec, jt as FileUsageResult, ka as UsageInfo, ki as SandboxTerminals, kn as MkdirOptions, kr as SandboxEvent, kt as FileTreeResult, l as AttachSandboxFleetMachineOptions, la as StartupDiagnostics, li as SandboxIdentity, ln as GpuLeaseExecOptions, lo as parseBackendType, lt as EffectiveBackend, m as BackendMcpServerStatus, ma as TaskSessionCommitResult, mi as SandboxRemovalState, mn as HostAgentDriverConfig, mr as RolloutScorer, mt as EgressPolicy, n as AccessPolicyRule, na as SnapshotDeleteAcknowledgement, ni as SandboxFleetTraceExport, nn as GitCommit, no as BatchBackendStats, nr as PublishPublicTemplateOptions, nt as DriveTurnOptions, oa as SnapshotOptions, oi as SandboxFleetWorkspaceReconcileResult, on as GpuLease, oo as BatchTaskUsage, or as ReconcileSandboxFleetsOptions, ot as DurablePlan, p as BackendManager, pa as TaskSessionChanges, pi as SandboxPortPreviewLink, pn as GpuLeaseStatus, pr as RolloutOptions, pt as EgressManager, q as DeleteMatchingSandboxesResult, qa as RawEvidenceArchiveManifest, qi as SessionForkOptions, qn as PromptOptions, qr as SandboxFleetOperationsSummary, qt as FleetPromptDispatchResult, r as AddUserOptions, ra as SnapshotDeleteOutcome, ri as SandboxFleetTraceOptions, rn as GitConfig, ro as BatchEvent, rr as PublishPublicTemplateVersionOptions, rt as DriverConfig, sa as SnapshotResult, si as SandboxFleetWorkspaceRestoreResult, sn as GpuLeaseBilling, so as ALL_BACKEND_TYPES, sr as ReconcileSandboxFleetsResult, st as DurablePlanDecisionResult, t as AcceleratorKind, ta as SessionStatus, ti as SandboxFleetTraceEvent, tn as GitBranch, to as PublicBatchRunRequest, tr as PublicTemplateVersionInfo, tt as DownloadResult, u as BackendCapabilities, ua as StartupOperation, ui as SandboxInfo, un as GpuLeaseExecResult, ut as EffectiveBackendProfile, v as BatchResult, va as TeeAttestationOptions, vi as SandboxRuntimeCapabilities, vn as IntelligenceReportBudget, vr as SSHCommandDescriptor, vt as ExecOptions, w as ChunkedUploadOptions, wa as TokenUsage, wi as SandboxTerminalAttachOptions, wn as ListOptions, wr as SandboxDeleteAcknowledgement, wt as FileReadResult, x as BatchTask, xa as TeePublicKey, xi as SandboxShapePreset, xn as IntelligenceReportWindow, xr as SandboxConnection, xt as FileReadBatchOptions, y as BatchRunOptions, ya as TeeAttestationReport, yi as SandboxRuntimeHealth, yn as IntelligenceReportCompareTo, yr as SSHCredentials, yt as ExecResult, z as CreateSandboxFleetWithCoordinatorOptions, za as ManagedProcessJobs, zi as SendSessionMessageOptions, zn as ProcessInfo, zr as SandboxFleetInfo, zt as FleetDispatchResultBufferOptions } from "./types-i3Vs02b8.js";
|
|
3
|
+
import { c as MintScopedTokenOptions, d as TERMINAL_WS_ECHO_SUBPROTOCOL, f as TerminalExitInfo, g as TerminalStreamAuthFormat, h as TerminalReadyInfo, i as TerminalStreamOptions, l as ScopedToken, m as TerminalOutputMessage, n as TerminalStreamError, o as TerminalStreamToken, p as TerminalInteractiveSessionIdentity, r as TerminalStreamHandlers, s as MintInteractiveSessionTokenOptions, t as TerminalStream, u as ScopedTokenScope } from "./terminal-stream-CV1pMSKC.js";
|
|
4
|
+
import { a as InteractiveSessionControlController, c as InteractiveSessionIdentity, d as interactiveSessionIdentityDigest, f as InteractiveAttachOptions, g as InteractiveSessionStatus, h as InteractiveRequestOptions, i as INTERACTIVE_CONTROL_CLEANUP_TIMEOUT_MS, l as InteractiveSessionNotRunningError, m as InteractiveControlClaimOptions, n as BrowserInteractiveSessionControlControllerOptions, o as InteractiveSessionControlControllerOptions, p as InteractiveControlClaimAcknowledgement, r as browserInteractiveControlHolderId, s as InteractiveSessionControlTransport, t as BrowserInteractiveSessionControlController, u as createInteractiveControlHolderId } from "./browser-interactive-control-controller-JUW3gOGH.js";
|
|
5
|
+
import { a as InteractiveSessionControllerOptions, i as InteractiveSessionController, n as BrowserInteractiveSessionControllerOptions, o as InteractiveSessionControllerTransport, r as InteractiveAttachRequest, t as BrowserInteractiveSessionController } from "./interactive-controller-DNbLzamS.js";
|
|
6
|
+
import { A as LineSenderVerification, B as profileChannelReference, C as LineReplyCodeInput, D as LineRole, E as LineRespondView, F as LineVoiceOptions, G as LineApplicationResult, H as LINE_APPLICATION_REQUEST_MAX_BYTES, I as LinesClient, J as parseLineApplicationRequest, K as LineApplicationState, M as LineThread, N as LineTransport, O as LineSendInput, P as LineVoice, R as SandboxLines, S as LineReplyCode, T as LineRespondAgent, U as LineApplication, V as LINE_APPLICATION_REPLY_MAX_CHARS, W as LineApplicationRequest, Y as parseLineApplicationResult, _ as LineMemberSpec, a as LineApplicationAttachOptions, b as LineProvider, c as LineAttachmentReauthorization, d as LineInstanceAttachOptions, f as LineInstanceCreate, g as LineMemberPatch, h as LineMemberInstance, i as LineAllowanceSubject, j as LineSenderVerificationStart, k as LineSendReceipt, l as LineExecutionKey, m as LineMember, n as LineAgentRolePolicy, o as LineAttachOptions, p as LineLimits, q as LineApplicationView, r as LineAllowance, s as LineAttachment, t as Line, u as LineFromConnectionInput, v as LineMessage, w as LineReplyGate, x as LineReminderPreferences, y as LineNumberInventory, z as lineInstanceKey } from "./lines-BOWMNDp5.js";
|
|
7
|
+
import { A as BackendRegistryEntry, C as InstancesClient, D as ParsedSSEEvent, E as ParseSSEStreamOptions, F as backendRegistryInteractionKindSchema, I as backendRegistryResponseSchema, L as isBackendRegistryInteractionKind, M as BackendRegistryResponse, N as backendRegistryCapabilitiesSchema, O as parseSSEStream, P as backendRegistryEntrySchema, R as parseBackendRegistryResponse, S as InstanceStart, T as SandboxFleetClient, _ as EnsureInstanceOptions, a as Team, b as InstanceRecord, c as SessionBroadcastEvent, d as RunPlacement, f as RunPlacementRecord, g as RunsHttpClient, h as RunsClient, i as Sandbox, j as BackendRegistryInteractionKind, k as BackendRegistryCapabilities, l as SessionBroadcastResult, m as RunWaitOptions, n as IntelligenceClient, o as TeamInvitation, p as RunRecord, r as InviteTeamMemberOptions, s as TeamMember, t as CreateTeamOptions, u as RunOptions, v as HostedInstance, w as SandboxFleet, x as InstanceRestartingError, y as InstanceProfile, z as parseBackendRegistryResponseBody } from "./client-B6JfkRhc.js";
|
|
8
|
+
import { _ as StreamInterruptedError, a as FileWriteConflictError, b as ValidationError, c as NotFoundError, d as ResumeEnvRequiredError, f as SandboxError, g as StateError, h as ServerError, i as EgressProxyRecoveryError, l as PartialFailureError, m as SandboxFailureDetail, n as CapabilityError, o as KeyBudgetExhaustedError, p as SandboxErrorJson, r as EdgeNotReadyError, s as NetworkError, t as AuthError, u as QuotaError, v as StreamInterruptionReason, y as TimeoutError } from "./errors-CRssX9qs.js";
|
|
9
|
+
import { d as AnyTokenPayload, h as IssueCollaborationTokenOptions, m as CollaborationTokenPayload, p as CollaborationAccess } from "./index-BgmgfYZZ.js";
|
|
10
|
+
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-DHuHjNie.js";
|
|
11
|
+
import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, o as projectAgentTerminalRecord, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-CGf6PAs8.js";
|
|
12
|
+
import { b as TangleSandboxClientConfig, h as TangleSandboxClient } from "./index-DHgljRHu.js";
|
|
13
13
|
import * as _$_tangle_network_agent_interface0 from "@tangle-network/agent-interface";
|
|
14
14
|
import { AgentProfile, AgentProfile as AgentProfile$1, AgentProfileCapabilities, AgentProfileConfidential, AgentProfileConfigValue, AgentProfileConnection, AgentProfileFileMount, AgentProfileFileMount as AgentProfileFileMount$1, AgentProfileMcpServer, AgentProfileModelHints, AgentProfilePermissionValue, AgentProfilePrompt, AgentProfileResourceRef, AgentProfileResources, AgentProfileSecurityPolicy, AgentProfileValidationIssue, AgentProfileValidationResult, AgentRunCancellationAcknowledgement, AgentRunCancellationRequest, AgentSubagentProfile, Capability, SANDBOX_SIZE_PRESET_NAMES, SandboxSizePreset } from "@tangle-network/agent-interface";
|
|
15
15
|
import { z } from "zod";
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { i as parseBackendType, r as backendTypeSchema, t as ALL_BACKEND_TYPES } from "./backend-types-C7b_Gpa0.js";
|
|
2
|
-
import {
|
|
2
|
+
import { A as requestedPublicProfileDigest, F as deriveAgentResultOutcome, I as deriveAgentRunOutcome, L as projectAgentTerminalRecord, P as createAgentRunOutcomeTracker, a as TERMINAL_WS_ECHO_SUBPROTOCOL, i as TerminalStreamError, k as normalizeRuntimeBackendConfig, n as InteractiveSessionController, r as TerminalStream, t as BrowserInteractiveSessionController, w as parseSSEStream } from "./interactive-controller-Dxt5sW2N.js";
|
|
3
3
|
import { _ as TimeoutError, a as FileWriteConflictError, c as NetworkError, d as QuotaError, f as ResumeEnvRequiredError, g as StreamInterruptedError, h as StateError, i as EgressProxyRecoveryError, l as NotFoundError, m as ServerError, n as CapabilityError, o as KeyBudgetExhaustedError, p as SandboxError, r as EdgeNotReadyError, t as AuthError, u as PartialFailureError, v as ValidationError } from "./errors-Cq4hMysQ.js";
|
|
4
|
-
import { _ as parseBackendRegistryResponse, a as InstanceRestartingError, c as SandboxFleetClient, d as validateBatchRunRequest, f as backendRegistryCapabilitiesSchema, g as isBackendRegistryInteractionKind, h as backendRegistryResponseSchema, i as HostedInstance, l as runtimeWorkspaceCwdSchema, m as backendRegistryInteractionKindSchema, n as Sandbox, o as InstancesClient, p as backendRegistryEntrySchema, r as RunsClient, s as SandboxFleet, t as IntelligenceClient, u as createBatchResultAccumulator, v as parseBackendRegistryResponseBody } from "./client-
|
|
4
|
+
import { _ as parseBackendRegistryResponse, a as InstanceRestartingError, c as SandboxFleetClient, d as validateBatchRunRequest, f as backendRegistryCapabilitiesSchema, g as isBackendRegistryInteractionKind, h as backendRegistryResponseSchema, i as HostedInstance, l as runtimeWorkspaceCwdSchema, m as backendRegistryInteractionKindSchema, n as Sandbox, o as InstancesClient, p as backendRegistryEntrySchema, r as RunsClient, s as SandboxFleet, t as IntelligenceClient, u as createBatchResultAccumulator, v as parseBackendRegistryResponseBody } from "./client-p2d-6oAH.js";
|
|
5
5
|
import { a as INTERACTIVE_CONTROL_CLEANUP_TIMEOUT_MS, l as createInteractiveControlHolderId, n as browserInteractiveControlHolderId, o as InteractiveSessionControlController, s as InteractiveSessionNotRunningError, t as BrowserInteractiveSessionControlController, u as interactiveSessionIdentityDigest } from "./browser-interactive-control-controller-BJf0P_J4.js";
|
|
6
|
-
import { A as exportTraceBundle, C as splitInlineProfileFileMounts, M as toOtelJson, S as materializeProfileFileMounts, T as validateDeferredProfileFileMounts, _ as collectAgentFinalMessageText, b as isToolBearingEvent, c as MAX_EGRESS_DENIALS_LIMIT, d as InteractiveSessionHandle, f as agentInteractiveSessionPromptRequestDigest, g as applySandboxEventText, h as createInteractiveTerminalSession, j as otelTraceIdForTangleTrace, k as buildTraceExportPayload, l as SandboxTaskSession, m as createInteractiveTerminalCapture, o as WorkspaceImages, p as InteractiveTerminalFrameLog, s as GPU_LEASE_PROVIDER_NAMES, t as SandboxInstance, u as SandboxSession, v as collectAgentResponseText, w as splitInlineProfileSkills, x as ManagedProcessClient, y as getSandboxEventText } from "./sandbox-
|
|
6
|
+
import { A as exportTraceBundle, C as splitInlineProfileFileMounts, M as toOtelJson, S as materializeProfileFileMounts, T as validateDeferredProfileFileMounts, _ as collectAgentFinalMessageText, b as isToolBearingEvent, c as MAX_EGRESS_DENIALS_LIMIT, d as InteractiveSessionHandle, f as agentInteractiveSessionPromptRequestDigest, g as applySandboxEventText, h as createInteractiveTerminalSession, j as otelTraceIdForTangleTrace, k as buildTraceExportPayload, l as SandboxTaskSession, m as createInteractiveTerminalCapture, o as WorkspaceImages, p as InteractiveTerminalFrameLog, s as GPU_LEASE_PROVIDER_NAMES, t as SandboxInstance, u as SandboxSession, v as collectAgentResponseText, w as splitInlineProfileSkills, x as ManagedProcessClient, y as getSandboxEventText } from "./sandbox-B6LlVm4f.js";
|
|
7
7
|
import { LinesClient, SandboxLines, lineInstanceKey, profileChannelReference } from "./lines.js";
|
|
8
|
-
import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-
|
|
9
|
-
import { i as parseLineApplicationResult, n as LINE_APPLICATION_REQUEST_MAX_BYTES, r as parseLineApplicationRequest, t as LINE_APPLICATION_REPLY_MAX_CHARS } from "./line-application-
|
|
10
|
-
import { s as TangleSandboxClient } from "./tangle-
|
|
8
|
+
import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-DaWEv29D.js";
|
|
9
|
+
import { i as parseLineApplicationResult, n as LINE_APPLICATION_REQUEST_MAX_BYTES, r as parseLineApplicationRequest, t as LINE_APPLICATION_REPLY_MAX_CHARS } from "./line-application-Cq6dJLBD.js";
|
|
10
|
+
import { s as TangleSandboxClient } from "./tangle-Ux41HNTu.js";
|
|
11
11
|
import { SANDBOX_SIZE_PRESET_NAMES, agentProfileConfidentialSchema, agentProfileSchema } from "@tangle-network/agent-interface";
|
|
12
12
|
import { z } from "zod";
|
|
13
13
|
//#region src/confidential.ts
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { c as InteractiveSessionIdentity, l as InteractiveSessionNotRunningError, n as BrowserInteractiveSessionControlControllerOptions, r as browserInteractiveControlHolderId, t as BrowserInteractiveSessionControlController } from "./browser-interactive-control-controller-
|
|
1
|
+
import { c as InteractiveSessionIdentity, l as InteractiveSessionNotRunningError, n as BrowserInteractiveSessionControlControllerOptions, r as browserInteractiveControlHolderId, t as BrowserInteractiveSessionControlController } from "./browser-interactive-control-controller-JUW3gOGH.js";
|
|
2
2
|
export { BrowserInteractiveSessionControlController, type BrowserInteractiveSessionControlControllerOptions, type InteractiveSessionIdentity, InteractiveSessionNotRunningError, browserInteractiveControlHolderId };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as TerminalStreamReconnectAuthority, l as ScopedToken, t as TerminalStream } from "./terminal-stream-
|
|
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-
|
|
1
|
+
import { a as TerminalStreamReconnectAuthority, l as ScopedToken, t as TerminalStream } from "./terminal-stream-CV1pMSKC.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-JUW3gOGH.js";
|
|
3
3
|
import { AgentInteractiveSessionRef } from "@tangle-network/agent-interface";
|
|
4
4
|
|
|
5
5
|
//#region src/interactive-controller.d.ts
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { r as backendTypeSchema } from "./backend-types-C7b_Gpa0.js";
|
|
2
|
-
import {
|
|
2
|
+
import { b as parseResponseError, c as NetworkError, m as ServerError, n as CapabilityError, p as SandboxError, v as ValidationError } from "./errors-Cq4hMysQ.js";
|
|
3
3
|
import { c as assertInteractiveSessionRef, d as awaitWithAbort, f as combineAbortSignals, i as createBrowserInteractiveSessionControlTransport, o as InteractiveSessionControlController, r as browserInteractiveTerminalEndpoint } from "./browser-interactive-control-controller-BJf0P_J4.js";
|
|
4
|
+
import { s as uploadChunked } from "./chunked-upload-CfefWUE5.js";
|
|
4
5
|
import { AgentExactRunControlRefSchema, AgentExecutionOutcomeSchema, AgentInteractiveSessionAttachSchema, AgentInteractiveSessionControlClaimSchema, AgentInteractiveSessionRefSchema, AgentRuntimeAttachmentsSchema, DurablePlanSchema, InteractionRequestSchema, agentInteractiveSessionControlClaimMatchesRef, agentProfileSchema, canonicalCandidateDigest } from "@tangle-network/agent-interface";
|
|
5
6
|
import { z } from "zod";
|
|
6
7
|
//#region src/agent-run-outcome-inspection.ts
|
|
@@ -934,63 +935,6 @@ function encodePromptForWire(message) {
|
|
|
934
935
|
} : part);
|
|
935
936
|
}
|
|
936
937
|
//#endregion
|
|
937
|
-
//#region ../../../packages/runtime-contracts/dist/file-limits.js
|
|
938
|
-
const MEBIBYTE$1 = 1024 * 1024;
|
|
939
|
-
10 * MEBIBYTE$1;
|
|
940
|
-
const FILE_DECODED_WRITE_MAX_BYTES = 5 * MEBIBYTE$1;
|
|
941
|
-
5 * MEBIBYTE$1;
|
|
942
|
-
10 * MEBIBYTE$1;
|
|
943
|
-
5 * MEBIBYTE$1;
|
|
944
|
-
//#endregion
|
|
945
|
-
//#region ../../../packages/runtime-contracts/dist/request-limits.js
|
|
946
|
-
/**
|
|
947
|
-
* Raw WIRE/TRANSPORT caps: request-byte limits checked while the body
|
|
948
|
-
* streams in (bodyLimit middleware, Content-Length, encoded proxy bodies),
|
|
949
|
-
* before anything is parsed or decoded. Rejections against these carry
|
|
950
|
-
* code `PAYLOAD_TOO_LARGE` (`payload-too-large.ts`) — the remedy is to
|
|
951
|
-
* split the delivery. Decoded/parsed-content caps (code `FILE_TOO_LARGE`)
|
|
952
|
-
* live in `file-io.ts`.
|
|
953
|
-
*/
|
|
954
|
-
const MEBIBYTE = 1024 * 1024;
|
|
955
|
-
/**
|
|
956
|
-
* Gateway (CF Worker) proxy cap on any request body it forwards — both
|
|
957
|
-
* pass-through requests and route-constructed (`options.body`) proxy
|
|
958
|
-
* payloads. Workers buffer forwarded bodies (streaming upstream stalls),
|
|
959
|
-
* so this bounds Worker memory per request.
|
|
960
|
-
*/
|
|
961
|
-
const SANDBOX_PROXY_REQUEST_MAX_BYTES = MEBIBYTE;
|
|
962
|
-
32 * MEBIBYTE;
|
|
963
|
-
/**
|
|
964
|
-
* Max assembled size of one chunked-upload session — the ceiling of the
|
|
965
|
-
* sanctioned >1 MiB delivery path. Parts stage in sidecar memory until
|
|
966
|
-
* commit, so this bounds per-session memory, not the destination
|
|
967
|
-
* filesystem.
|
|
968
|
-
*/
|
|
969
|
-
const FILE_UPLOAD_SESSION_MAX_BYTES = 64 * MEBIBYTE;
|
|
970
|
-
128 * MEBIBYTE;
|
|
971
|
-
//#endregion
|
|
972
|
-
//#region ../../../packages/runtime-contracts/dist/size-limit-errors.js
|
|
973
|
-
/** Canonical error codes for wire-size and decoded-content rejections. */
|
|
974
|
-
const PAYLOAD_TOO_LARGE_CODE = "PAYLOAD_TOO_LARGE";
|
|
975
|
-
const FILE_TOO_LARGE_CODE = "FILE_TOO_LARGE";
|
|
976
|
-
function isRecord(value) {
|
|
977
|
-
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
978
|
-
}
|
|
979
|
-
function isPositiveInteger(value) {
|
|
980
|
-
return typeof value === "number" && Number.isInteger(value) && value > 0;
|
|
981
|
-
}
|
|
982
|
-
function isSizeLimitErrorBodyFor(value, code) {
|
|
983
|
-
if (!isRecord(value) || value.success !== false || !isRecord(value.error)) return false;
|
|
984
|
-
const error = value.error;
|
|
985
|
-
return error.code === code && typeof error.message === "string" && typeof error.surface === "string" && isPositiveInteger(error.limitBytes) && (error.actualBytes === void 0 || isPositiveInteger(error.actualBytes));
|
|
986
|
-
}
|
|
987
|
-
function isPayloadTooLargeErrorBody(value) {
|
|
988
|
-
return isSizeLimitErrorBodyFor(value, PAYLOAD_TOO_LARGE_CODE);
|
|
989
|
-
}
|
|
990
|
-
function isFileTooLargeErrorBody(value) {
|
|
991
|
-
return isSizeLimitErrorBodyFor(value, FILE_TOO_LARGE_CODE);
|
|
992
|
-
}
|
|
993
|
-
//#endregion
|
|
994
938
|
//#region src/dispatch-run-control.ts
|
|
995
939
|
const DISPATCH_RUN_PROVIDER = "tangle-sandbox";
|
|
996
940
|
function generateRuntimeId(prefix) {
|
|
@@ -1042,238 +986,6 @@ function validateAcceptedDispatchRunRef(raw, expected, sandboxId, sessionId, exe
|
|
|
1042
986
|
return accepted;
|
|
1043
987
|
}
|
|
1044
988
|
//#endregion
|
|
1045
|
-
//#region src/lib/chunked-upload.ts
|
|
1046
|
-
/**
|
|
1047
|
-
* Chunked upload — the sanctioned SDK path for delivering payloads larger
|
|
1048
|
-
* than the sandbox API's single-request body caps. Splits the payload into
|
|
1049
|
-
* server-sized parts against a `/fs/upload-session` session, PUTs each part
|
|
1050
|
-
* with transient retry, then commits with a whole-payload SHA-256 so the
|
|
1051
|
-
* runtime can verify nothing was dropped or reordered in transit.
|
|
1052
|
-
*
|
|
1053
|
-
* Browser/Worker-safe: no `node:` imports, no `Buffer`. Input normalizes to
|
|
1054
|
-
* a `Uint8Array` and hashes via Web Crypto (`crypto.subtle`), available in
|
|
1055
|
-
* browsers, Workers, and Node 18+ — the same environments this module must
|
|
1056
|
-
* run in unmodified.
|
|
1057
|
-
*/
|
|
1058
|
-
const DEFAULT_MAX_RETRIES = 4;
|
|
1059
|
-
const RETRY_BASE_MS = 250;
|
|
1060
|
-
const RETRY_MAX_MS = 2e3;
|
|
1061
|
-
const delay = (ms, signal) => new Promise((resolve, reject) => {
|
|
1062
|
-
if (signal?.aborted) {
|
|
1063
|
-
reject(signal.reason ?? /* @__PURE__ */ new Error("aborted"));
|
|
1064
|
-
return;
|
|
1065
|
-
}
|
|
1066
|
-
const timer = setTimeout(() => {
|
|
1067
|
-
signal?.removeEventListener("abort", onAbort);
|
|
1068
|
-
resolve();
|
|
1069
|
-
}, ms);
|
|
1070
|
-
function onAbort() {
|
|
1071
|
-
clearTimeout(timer);
|
|
1072
|
-
reject(signal?.reason ?? /* @__PURE__ */ new Error("aborted"));
|
|
1073
|
-
}
|
|
1074
|
-
signal?.addEventListener("abort", onAbort, { once: true });
|
|
1075
|
-
});
|
|
1076
|
-
/** Transient part-upload failures worth retrying: rate-limit/budget (429),
|
|
1077
|
-
* 5xx, transport (network), and request timeouts — mirrors
|
|
1078
|
-
* `isTransientWriteError` in `sandbox.ts`. A non-transient error (bad path,
|
|
1079
|
-
* auth, checksum, containment) fails loud immediately. */
|
|
1080
|
-
function isTransientUploadError(err) {
|
|
1081
|
-
return err instanceof QuotaError || err instanceof ServerError || err instanceof NetworkError || err instanceof TimeoutError;
|
|
1082
|
-
}
|
|
1083
|
-
function isChecksumMismatch(err) {
|
|
1084
|
-
return err instanceof SandboxError && err.code === "CHECKSUM_MISMATCH";
|
|
1085
|
-
}
|
|
1086
|
-
/** Cheap size probe used for the pre-flight cap check, read directly off
|
|
1087
|
-
* the input shape (`Blob.size` / `ArrayBuffer.byteLength` / view
|
|
1088
|
-
* `byteLength`) so an oversized `Blob` never has its bytes materialized
|
|
1089
|
-
* just to be rejected. Strings have no cheap length in UTF-8, so they're
|
|
1090
|
-
* encoded once here (and once more in {@link normalizeToBytes} — an
|
|
1091
|
-
* acceptable cost given strings are never the multi-MB case this path
|
|
1092
|
-
* exists for). */
|
|
1093
|
-
function sizeOfInput(data) {
|
|
1094
|
-
if (typeof data === "string") return new TextEncoder().encode(data).byteLength;
|
|
1095
|
-
if (data instanceof ArrayBuffer) return data.byteLength;
|
|
1096
|
-
if (ArrayBuffer.isView(data)) return data.byteLength;
|
|
1097
|
-
return data.size;
|
|
1098
|
-
}
|
|
1099
|
-
/**
|
|
1100
|
-
* Normalizes to a `Uint8Array` backed by a plain (never shared)
|
|
1101
|
-
* `ArrayBuffer`. A caller-supplied view may be backed by a
|
|
1102
|
-
* `SharedArrayBuffer`, which `crypto.subtle.digest` and `fetch`'s
|
|
1103
|
-
* `BodyInit` both reject at the type level (and some engines reject at
|
|
1104
|
-
* runtime) — copying here keeps every downstream call on one concrete,
|
|
1105
|
-
* always-accepted buffer type.
|
|
1106
|
-
*/
|
|
1107
|
-
async function normalizeToBytes(data) {
|
|
1108
|
-
if (typeof data === "string") return new Uint8Array(new TextEncoder().encode(data));
|
|
1109
|
-
if (data instanceof ArrayBuffer) return new Uint8Array(data.slice(0));
|
|
1110
|
-
if (ArrayBuffer.isView(data)) {
|
|
1111
|
-
const copy = new Uint8Array(data.byteLength);
|
|
1112
|
-
copy.set(new Uint8Array(data.buffer, data.byteOffset, data.byteLength));
|
|
1113
|
-
return copy;
|
|
1114
|
-
}
|
|
1115
|
-
return new Uint8Array(await data.arrayBuffer());
|
|
1116
|
-
}
|
|
1117
|
-
function webCryptoSubtle() {
|
|
1118
|
-
const subtle = globalThis.crypto?.subtle;
|
|
1119
|
-
if (!subtle) throw new Error("chunked upload requires Web Crypto (crypto.subtle) for SHA-256 hashing — available in browsers, Workers, and Node 18+");
|
|
1120
|
-
return subtle;
|
|
1121
|
-
}
|
|
1122
|
-
async function sha256Hex(bytes) {
|
|
1123
|
-
const digest = await webCryptoSubtle().digest("SHA-256", bytes);
|
|
1124
|
-
return Array.from(new Uint8Array(digest)).map((byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
1125
|
-
}
|
|
1126
|
-
/**
|
|
1127
|
-
* Canonical size-cap bodies (413 `PAYLOAD_TOO_LARGE` / `FILE_TOO_LARGE`)
|
|
1128
|
-
* carry `surface`/`limitBytes`/`actualBytes` that the generic error parser
|
|
1129
|
-
* drops; fold them into the message before delegating to
|
|
1130
|
-
* `parseErrorResponse` for the rest (status→class mapping, retryAfterMs,
|
|
1131
|
-
* origin).
|
|
1132
|
-
*/
|
|
1133
|
-
async function parseUploadError(response) {
|
|
1134
|
-
const bodyText = await response.text();
|
|
1135
|
-
let parsedBody;
|
|
1136
|
-
try {
|
|
1137
|
-
parsedBody = JSON.parse(bodyText);
|
|
1138
|
-
} catch {
|
|
1139
|
-
parsedBody = void 0;
|
|
1140
|
-
}
|
|
1141
|
-
if (isPayloadTooLargeErrorBody(parsedBody) || isFileTooLargeErrorBody(parsedBody)) {
|
|
1142
|
-
const { code, message, surface, limitBytes, actualBytes } = parsedBody.error;
|
|
1143
|
-
const detail = typeof actualBytes === "number" ? `${message} (${surface}: ${actualBytes} of ${limitBytes} bytes)` : `${message} (${surface}: limit ${limitBytes} bytes)`;
|
|
1144
|
-
return parseErrorResponse(response.status, JSON.stringify({
|
|
1145
|
-
code,
|
|
1146
|
-
message: detail
|
|
1147
|
-
}), void 0, response.headers);
|
|
1148
|
-
}
|
|
1149
|
-
return parseErrorResponse(response.status, bodyText, void 0, response.headers);
|
|
1150
|
-
}
|
|
1151
|
-
async function initUploadSession(transport, remotePath, totalBytes, sha256, mode, signal) {
|
|
1152
|
-
signal?.throwIfAborted();
|
|
1153
|
-
const response = await transport.fetch("/fs/upload-session", {
|
|
1154
|
-
method: "POST",
|
|
1155
|
-
headers: { "Content-Type": "application/json" },
|
|
1156
|
-
body: JSON.stringify({
|
|
1157
|
-
path: remotePath,
|
|
1158
|
-
mode,
|
|
1159
|
-
totalBytes,
|
|
1160
|
-
sha256
|
|
1161
|
-
}),
|
|
1162
|
-
signal
|
|
1163
|
-
});
|
|
1164
|
-
if (!response.ok) throw await parseUploadError(response);
|
|
1165
|
-
return (await response.json()).data;
|
|
1166
|
-
}
|
|
1167
|
-
async function putPart(transport, uploadId, index, chunk, options) {
|
|
1168
|
-
const maxRetries = options.maxRetries ?? DEFAULT_MAX_RETRIES;
|
|
1169
|
-
for (let attempt = 0;; attempt++) {
|
|
1170
|
-
options.signal?.throwIfAborted();
|
|
1171
|
-
try {
|
|
1172
|
-
const response = await transport.fetch(`/fs/upload-session/${encodeURIComponent(uploadId)}/parts/${index}`, {
|
|
1173
|
-
method: "PUT",
|
|
1174
|
-
headers: { "Content-Type": "application/octet-stream" },
|
|
1175
|
-
body: chunk,
|
|
1176
|
-
signal: options.signal
|
|
1177
|
-
});
|
|
1178
|
-
if (!response.ok) throw await parseUploadError(response);
|
|
1179
|
-
return;
|
|
1180
|
-
} catch (err) {
|
|
1181
|
-
if (isTransientUploadError(err) && attempt < maxRetries) {
|
|
1182
|
-
const retryAfterMs = err instanceof SandboxError ? err.retryAfterMs : void 0;
|
|
1183
|
-
const backoff = Math.min(RETRY_BASE_MS * 2 ** attempt, RETRY_MAX_MS);
|
|
1184
|
-
await delay(retryAfterMs ?? backoff, options.signal);
|
|
1185
|
-
continue;
|
|
1186
|
-
}
|
|
1187
|
-
throw err;
|
|
1188
|
-
}
|
|
1189
|
-
}
|
|
1190
|
-
}
|
|
1191
|
-
function partCount(totalBytes, partSize) {
|
|
1192
|
-
return Math.ceil(totalBytes / partSize);
|
|
1193
|
-
}
|
|
1194
|
-
async function uploadAllParts(transport, uploadId, bytes, partSize, totalParts, options) {
|
|
1195
|
-
const totalBytes = bytes.byteLength;
|
|
1196
|
-
const paceMs = options.paceMs ?? 0;
|
|
1197
|
-
let uploadedBytes = 0;
|
|
1198
|
-
let started = false;
|
|
1199
|
-
for (let index = 0; index < totalParts; index++) {
|
|
1200
|
-
if (started && paceMs > 0) await delay(paceMs, options.signal);
|
|
1201
|
-
started = true;
|
|
1202
|
-
const start = index * partSize;
|
|
1203
|
-
const end = Math.min(start + partSize, totalBytes);
|
|
1204
|
-
await putPart(transport, uploadId, index, bytes.subarray(start, end), options);
|
|
1205
|
-
uploadedBytes += end - start;
|
|
1206
|
-
options.onProgress?.({
|
|
1207
|
-
bytesUploaded: uploadedBytes,
|
|
1208
|
-
totalBytes,
|
|
1209
|
-
percentage: totalBytes === 0 ? 100 : Math.round(uploadedBytes / totalBytes * 100)
|
|
1210
|
-
});
|
|
1211
|
-
}
|
|
1212
|
-
}
|
|
1213
|
-
async function commitSession(transport, uploadId, totalParts, sha256, signal) {
|
|
1214
|
-
signal?.throwIfAborted();
|
|
1215
|
-
const response = await transport.fetch(`/fs/upload-session/${encodeURIComponent(uploadId)}/commit`, {
|
|
1216
|
-
method: "POST",
|
|
1217
|
-
headers: { "Content-Type": "application/json" },
|
|
1218
|
-
body: JSON.stringify({
|
|
1219
|
-
totalParts,
|
|
1220
|
-
sha256
|
|
1221
|
-
}),
|
|
1222
|
-
signal
|
|
1223
|
-
});
|
|
1224
|
-
if (!response.ok) throw await parseUploadError(response);
|
|
1225
|
-
return (await response.json()).data;
|
|
1226
|
-
}
|
|
1227
|
-
/** Best-effort abort of an in-progress session — never masks the real
|
|
1228
|
-
* failure that triggered it, and never itself throws. An orphaned session
|
|
1229
|
-
* also self-expires server-side (`expiresAt`), so a failed DELETE here is
|
|
1230
|
-
* not a leak, just deferred cleanup. */
|
|
1231
|
-
async function abortSession(transport, uploadId) {
|
|
1232
|
-
try {
|
|
1233
|
-
await transport.fetch(`/fs/upload-session/${encodeURIComponent(uploadId)}`, { method: "DELETE" });
|
|
1234
|
-
} catch {}
|
|
1235
|
-
}
|
|
1236
|
-
/**
|
|
1237
|
-
* Upload arbitrary binary or text data to the sandbox via the chunked
|
|
1238
|
-
* upload-session protocol, verifying integrity with a whole-payload
|
|
1239
|
-
* SHA-256 at commit. Browser/Worker-safe and works identically over the
|
|
1240
|
-
* gateway proxy or a direct sidecar connection — see
|
|
1241
|
-
* {@link FileSystem.uploadData}.
|
|
1242
|
-
*
|
|
1243
|
-
* @param transport - Fetch-shaped adapter scoped to the sandbox runtime
|
|
1244
|
-
* (paths are relative to it, e.g. `/fs/upload-session`).
|
|
1245
|
-
* @param remotePath - Destination path in the sandbox.
|
|
1246
|
-
* @param data - Payload to upload. Strings encode as UTF-8.
|
|
1247
|
-
* @param options - See {@link ChunkedUploadOptions}.
|
|
1248
|
-
* @throws {SandboxError} `PAYLOAD_TOO_LARGE` immediately (zero requests) if
|
|
1249
|
-
* the payload exceeds {@link FILE_UPLOAD_SESSION_MAX_BYTES}; otherwise the
|
|
1250
|
-
* typed error from whichever step (init/part/commit) failed after retries
|
|
1251
|
-
* are exhausted.
|
|
1252
|
-
*/
|
|
1253
|
-
async function uploadChunked(transport, remotePath, data, options = {}) {
|
|
1254
|
-
const estimatedSize = sizeOfInput(data);
|
|
1255
|
-
if (estimatedSize > 67108864) throw new SandboxError(`Payload for ${remotePath} is ${estimatedSize} bytes, over the ${FILE_UPLOAD_SESSION_MAX_BYTES} byte chunked-upload session cap`, "PAYLOAD_TOO_LARGE", 413);
|
|
1256
|
-
options.signal?.throwIfAborted();
|
|
1257
|
-
const bytes = await normalizeToBytes(data);
|
|
1258
|
-
options.signal?.throwIfAborted();
|
|
1259
|
-
const sha256 = await sha256Hex(bytes);
|
|
1260
|
-
const init = await initUploadSession(transport, remotePath, bytes.byteLength, sha256, options.mode, options.signal);
|
|
1261
|
-
const totalParts = partCount(bytes.byteLength, init.partSize);
|
|
1262
|
-
try {
|
|
1263
|
-
await uploadAllParts(transport, init.uploadId, bytes, init.partSize, totalParts, options);
|
|
1264
|
-
try {
|
|
1265
|
-
return await commitSession(transport, init.uploadId, totalParts, sha256, options.signal);
|
|
1266
|
-
} catch (err) {
|
|
1267
|
-
if (!isChecksumMismatch(err)) throw err;
|
|
1268
|
-
await uploadAllParts(transport, init.uploadId, bytes, init.partSize, totalParts, options);
|
|
1269
|
-
return await commitSession(transport, init.uploadId, totalParts, sha256, options.signal);
|
|
1270
|
-
}
|
|
1271
|
-
} catch (err) {
|
|
1272
|
-
await abortSession(transport, init.uploadId);
|
|
1273
|
-
throw err;
|
|
1274
|
-
}
|
|
1275
|
-
}
|
|
1276
|
-
//#endregion
|
|
1277
989
|
//#region src/lib/session-id.ts
|
|
1278
990
|
const SESSION_ID_PATTERN = /^[a-zA-Z0-9_-]+$/;
|
|
1279
991
|
function assertValidSessionId(value) {
|
|
@@ -2737,4 +2449,4 @@ var BrowserInteractiveSessionController = class extends InteractiveSessionContro
|
|
|
2737
2449
|
}
|
|
2738
2450
|
};
|
|
2739
2451
|
//#endregion
|
|
2740
|
-
export {
|
|
2452
|
+
export { requestedPublicProfileDigest as A, encodeTextForWire as C, foldModelRoutingFields as D, assertCurrentBackendType as E, deriveAgentResultOutcome as F, deriveAgentRunOutcome as I, projectAgentTerminalRecord as L, withProfileHarness as M, withoutRuntimeSecrets as N, mergeRuntimeBackendConfig as O, createAgentRunOutcomeTracker as P, encodePromptForWire as S, applyRequestedModel as T, resolveTraceId as _, TERMINAL_WS_ECHO_SUBPROTOCOL as a, resolveDispatchRunIdentity as b, requestScopedToken as c, normalizeSessionInfo as d, sessionMessageRequestBody as f, mintTraceId as g, isTraceId as h, TerminalStreamError as i, requestedSecretProfilePublicDigest as j, normalizeRuntimeBackendConfig as k, SandboxRuntimeApi as l, TRACE_ID_HEADER as m, InteractiveSessionController as n, assertScopedTokenActive as o, waitForRetryAfter as p, TerminalStream as r, requestInteractiveSessionToken as s, BrowserInteractiveSessionController as t, isRetryableCredentialRefusal as u, appendSessionIdQuery as v, parseSSEStream as w, validateAcceptedDispatchRunRef as x, sessionHeaders as y };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as CreateSandboxOptions, d as BackendConfig } from "./types-
|
|
1
|
+
import { B as CreateSandboxOptions, d as BackendConfig } from "./types-i3Vs02b8.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 LineSenderVerification, B as profileChannelReference, C as LineReplyCodeInput, D as LineRole, E as LineRespondView, F as LineVoiceOptions, I as LinesClient, L as LinesHttpClient, M as LineThread, N as LineTransport, O as LineSendInput, P as LineVoice, R as SandboxLines, S as LineReplyCode, T as LineRespondAgent, _ as LineMemberSpec, a as LineApplicationAttachOptions, b as LineProvider, c as LineAttachmentReauthorization, d as LineInstanceAttachOptions, f as LineInstanceCreate, g as LineMemberPatch, h as LineMemberInstance, i as LineAllowanceSubject, j as LineSenderVerificationStart, k as LineSendReceipt, l as LineExecutionKey, m as LineMember, n as LineAgentRolePolicy, o as LineAttachOptions, p as LineLimits, r as LineAllowance, s as LineAttachment, t as Line, u as LineFromConnectionInput, v as LineMessage, w as LineReplyGate, x as LineReminderPreferences, y as LineNumberInventory, z as lineInstanceKey } from "./lines-
|
|
1
|
+
import { A as LineSenderVerification, B as profileChannelReference, C as LineReplyCodeInput, D as LineRole, E as LineRespondView, F as LineVoiceOptions, I as LinesClient, L as LinesHttpClient, M as LineThread, N as LineTransport, O as LineSendInput, P as LineVoice, R as SandboxLines, S as LineReplyCode, T as LineRespondAgent, _ as LineMemberSpec, a as LineApplicationAttachOptions, b as LineProvider, c as LineAttachmentReauthorization, d as LineInstanceAttachOptions, f as LineInstanceCreate, g as LineMemberPatch, h as LineMemberInstance, i as LineAllowanceSubject, j as LineSenderVerificationStart, k as LineSendReceipt, l as LineExecutionKey, m as LineMember, n as LineAgentRolePolicy, o as LineAttachOptions, p as LineLimits, r as LineAllowance, s as LineAttachment, t as Line, u as LineFromConnectionInput, v as LineMessage, w as LineReplyGate, x as LineReminderPreferences, y as LineNumberInventory, z as lineInstanceKey } from "./lines-BOWMNDp5.js";
|
|
2
2
|
export { Line, LineAgentRolePolicy, LineAllowance, LineAllowanceSubject, LineApplicationAttachOptions, LineAttachOptions, LineAttachment, LineAttachmentReauthorization, LineExecutionKey, LineFromConnectionInput, LineInstanceAttachOptions, LineInstanceCreate, LineLimits, LineMember, LineMemberInstance, LineMemberPatch, LineMemberSpec, LineMessage, LineNumberInventory, LineProvider, LineReminderPreferences, LineReplyCode, LineReplyCodeInput, 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-
|
|
1
|
+
import { t as AUTH_BUNDLE_PATHS } from "./cli-auth-bundle-Dm8w5faq.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-
|
|
1
|
+
import { a as listAgentPreviews, i as getAgentPreview, o as publishAgentPreview, r as ensureAgentPreview, s as removeAgentPreview, t as AgentPreviewError } from "./preview-operations-DqSo-IBm.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-
|
|
2
|
-
import { Fn as PreviewLinkInfo, ht as EnsureDevServerOptions } from "./types-
|
|
3
|
-
import { i as Sandbox } from "./client-
|
|
1
|
+
import { r as SandboxInstance } from "./sandbox-WpE5rzUa.js";
|
|
2
|
+
import { Fn as PreviewLinkInfo, ht as EnsureDevServerOptions } from "./types-i3Vs02b8.js";
|
|
3
|
+
import { i as Sandbox } from "./client-B6JfkRhc.js";
|
|
4
4
|
|
|
5
5
|
//#region src/agent/preview-operations.d.ts
|
|
6
6
|
type AgentPreviewOptions = Pick<EnsureDevServerOptions, "sessionId" | "cwd"> & {
|