@tangle-network/sandbox 0.64.13 → 0.64.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/index.d.ts +3 -3
- package/dist/agent/index.js +2 -2
- package/dist/agent/preview.d.ts +1 -1
- package/dist/auth/index.js +1 -1
- package/dist/{cli-auth-bundle-hoD3-9Xr.js → cli-auth-bundle-DiO80j-k.js} +22 -6
- package/dist/{client-BtbfFtEX.d.ts → client-Bzklblzg.d.ts} +1 -1
- package/dist/{client-BwffEbHl.js → client-CAa6I_92.js} +3 -3
- package/dist/core.d.ts +2 -2
- package/dist/core.js +2 -2
- package/dist/{index-L3if4cfp.d.ts → index-iYdJi4O8.d.ts} +4 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/{local-cli-auth-BphtVcki.js → local-cli-auth-DAukxS-v.js} +1 -1
- package/dist/{preview-BjqK2sII.d.ts → preview-Cjg3Lsls.d.ts} +2 -2
- package/dist/{sandbox-dxjJMlUt.js → sandbox-CICD7KcJ.js} +219 -222
- package/dist/tangle/index.d.ts +1 -1
- package/dist/tangle/index.js +1 -1
- package/dist/{tangle-DXYPV6rH.js → tangle-DA1aBXXG.js} +1 -1
- package/package.json +4 -4
package/dist/agent/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { I as SandboxTaskSession, O as SandboxInstance, R as SandboxSession } from "../index-
|
|
1
|
+
import { I as SandboxTaskSession, O as SandboxInstance, R as SandboxSession } from "../index-iYdJi4O8.js";
|
|
2
2
|
import { Di as CodeResultPart, Ei as CodeExecutionResult, Ha as CodeLanguage, Ti as CodeExecutionOptions, bn as SandboxFleetParent, vo as BackendType, xa as BackendConfig, xt as SessionListOptions, yt as SessionInfo } from "../types-CxfH95D5.js";
|
|
3
|
-
import { t as Sandbox } from "../client-
|
|
4
|
-
import { u as PreviewAuthorizer } from "../preview-
|
|
3
|
+
import { t as Sandbox } from "../client-Bzklblzg.js";
|
|
4
|
+
import { u as PreviewAuthorizer } from "../preview-Cjg3Lsls.js";
|
|
5
5
|
import * as _$_modelcontextprotocol_sdk_server_index_js0 from "@modelcontextprotocol/sdk/server/index.js";
|
|
6
6
|
import { JSONSchema } from "zod/v4/core";
|
|
7
7
|
import { ToolSet } from "ai";
|
package/dist/agent/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as TOOL_SPECS, i as ALL_TOOL_SPECS, o as serializeToolResult, r as bindToolSpecs, t as createMcpServer } from "../mcp-local-BjLG7VHY.js";
|
|
2
2
|
import { D as assertCurrentBackendType } from "../interactive-controller-OAsASPd_.js";
|
|
3
3
|
import { S as StateError, T as ValidationError, h as NotFoundError } from "../errors-BfbOP_rx.js";
|
|
4
|
-
import { t as Sandbox } from "../client-
|
|
5
|
-
import { t as SandboxInstance } from "../sandbox-
|
|
4
|
+
import { t as Sandbox } from "../client-CAa6I_92.js";
|
|
5
|
+
import { t as SandboxInstance } from "../sandbox-CICD7KcJ.js";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region src/agent/instances.ts
|
|
8
8
|
const managers = /* @__PURE__ */ new WeakMap();
|
package/dist/agent/preview.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as publishAgentPreview, a as previewOperationTool, c as AgentPreviewOptions, d as PreviewExecutionContext, f as PublishAgentPreviewOptions, g as listAgentPreviews, h as getAgentPreview, i as PreviewTool, l as PreviewAuthorizationRequest, m as ensureAgentPreview, n as PREVIEW_MCP_ALIAS, o as previewToolsForProfile, p as assertPreviewId, r as PREVIEW_TOOLS, s as AgentPreviewError, t as servePreviewMcp, u as PreviewAuthorizer, v as removeAgentPreview, y as resolveSelfSandbox } from "../preview-
|
|
1
|
+
import { _ as publishAgentPreview, a as previewOperationTool, c as AgentPreviewOptions, d as PreviewExecutionContext, f as PublishAgentPreviewOptions, g as listAgentPreviews, h as getAgentPreview, i as PreviewTool, l as PreviewAuthorizationRequest, m as ensureAgentPreview, n as PREVIEW_MCP_ALIAS, o as previewToolsForProfile, p as assertPreviewId, r as PREVIEW_TOOLS, s as AgentPreviewError, t as servePreviewMcp, u as PreviewAuthorizer, v as removeAgentPreview, y as resolveSelfSandbox } from "../preview-Cjg3Lsls.js";
|
|
2
2
|
export { AgentPreviewError, AgentPreviewOptions, PREVIEW_MCP_ALIAS, PREVIEW_TOOLS, PreviewAuthorizationRequest, PreviewAuthorizer, PreviewExecutionContext, PreviewTool, PublishAgentPreviewOptions, assertPreviewId, ensureAgentPreview, getAgentPreview, listAgentPreviews, previewOperationTool, previewToolsForProfile, publishAgentPreview, removeAgentPreview, resolveSelfSandbox, servePreviewMcp };
|
package/dist/auth/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as materializeCliAuthBundle, n as assertCliAuthReferenceSupported, r as cliAuthReferenceSchema } from "../cli-auth-bundle-
|
|
1
|
+
import { i as materializeCliAuthBundle, n as assertCliAuthReferenceSupported, r as cliAuthReferenceSchema } from "../cli-auth-bundle-DiO80j-k.js";
|
|
2
2
|
//#region src/auth/tokens.ts
|
|
3
3
|
const textEncoder = new TextEncoder();
|
|
4
4
|
const textDecoder = new TextDecoder();
|
|
@@ -1040,7 +1040,7 @@ const NATIVE_SESSION_CONTRACTS = {
|
|
|
1040
1040
|
HARNESSES["kimi-code"].session.defect.reason, HARNESSES["factory-droids"].session.defect.reason, HARNESSES["amp"].session.defect.reason, HARNESSES["prime"].session.defect.reason, HARNESSES["hermes"].session.defect.reason, HARNESSES["forge"].session.defect.reason, HARNESSES["openclaw"].session.defect.reason, HARNESSES["acp"].session.defect.reason;
|
|
1041
1041
|
HARNESSES["nanoclaw"].session.defect.reason, HARNESSES["cursor"].session.defect.reason;
|
|
1042
1042
|
//#endregion
|
|
1043
|
-
//#region ../../../packages/cli-agent-registry/dist/specs-
|
|
1043
|
+
//#region ../../../packages/cli-agent-registry/dist/specs-DO3bJSWj.mjs
|
|
1044
1044
|
z.globalRegistry.add(agentProfileSchema$1, {
|
|
1045
1045
|
id: "AgentProfile",
|
|
1046
1046
|
...agentProfileJsonSchema
|
|
@@ -1161,11 +1161,27 @@ const CLI_AGENT_SPECS = [
|
|
|
1161
1161
|
nativeSession: NATIVE_SESSION_CONTRACTS["claude-code"],
|
|
1162
1162
|
runtime: HARNESSES["claude-code"].lifecycle.runtime,
|
|
1163
1163
|
messageStorageDir: ".claude-code",
|
|
1164
|
-
cliDirLayout: {
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1164
|
+
cliDirLayout: {
|
|
1165
|
+
sessionData: [
|
|
1166
|
+
"plans/**",
|
|
1167
|
+
"file-history/**",
|
|
1168
|
+
"debug/**",
|
|
1169
|
+
"projects/*/*/subagents/**/*.meta.json",
|
|
1170
|
+
"projects/*/*/tool-results/**"
|
|
1171
|
+
],
|
|
1172
|
+
configAllow: [
|
|
1173
|
+
".last-cleanup",
|
|
1174
|
+
"policy-limits.json*",
|
|
1175
|
+
"remote-settings.json",
|
|
1176
|
+
"skills/**"
|
|
1177
|
+
],
|
|
1178
|
+
credential: [
|
|
1179
|
+
"backups/**",
|
|
1180
|
+
"session-env/**",
|
|
1181
|
+
"shell-snapshots/**",
|
|
1182
|
+
"sessions/**"
|
|
1183
|
+
]
|
|
1184
|
+
},
|
|
1169
1185
|
displayName: "Claude Code",
|
|
1170
1186
|
description: "Anthropic Claude Code CLI-based agent backend.",
|
|
1171
1187
|
envVars: HARNESSES["claude-code"].config.envVars,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as TraceExportResult, H as MaterializeProfileFileMountsOptions, O as SandboxInstance, U as MaterializeProfileFileMountsResult, W as ProfileFileMountBox, j as TraceExportSink } from "./index-
|
|
1
|
+
import { A as TraceExportResult, H as MaterializeProfileFileMountsOptions, O as SandboxInstance, U as MaterializeProfileFileMountsResult, W as ProfileFileMountBox, j as TraceExportSink } from "./index-iYdJi4O8.js";
|
|
2
2
|
import { F as SandboxError, c as MintInteractiveSessionTokenOptions, u as ScopedToken } from "./terminal-stream-types-ClZCArRg.js";
|
|
3
3
|
import { $n as TeeAttestationReport, $t as ReapExpiredSandboxFleetsResult, A as SandboxIdentity, Ai as ManagedProcessRecord, An as SandboxFleetUsage, Bt as FleetDispatchCancelResult, En as SandboxFleetTraceBundle, Fn as ListSandboxOptions, Ft as CreateSandboxFleetWithCoordinatorOptions, Gt as FleetExecDispatchResult, Hn as SandboxRunGeneration, Ht as FleetDispatchResultBufferOptions, Ia as GpuLeaseProviderName, Ii as SdkTimingHook, It as FleetAgentId, Jt as FleetPromptDispatchResult, Ki as BatchRunOptions, Kt as FleetMachineId, M as UsageInfo, Mi as ManagedProcessSpec, Mn as SandboxFleetWorkspaceReconcileResult, Mt as AttachSandboxFleetMachineOptions, Nn as SandboxFleetWorkspaceRestoreResult, Nt as CreateSandboxFleetOptions, Oi as ManagedProcessJobs, Pi as HttpClient, Pn as SandboxFleetWorkspaceSnapshotResult, Pt as CreateSandboxFleetTokenOptions, Qt as ReapExpiredSandboxFleetsOptions, Rt as FleetAgentResult, Sn as SandboxFleetPolicy, T as SshKeysManager, Tn as SandboxFleetToken, Ut as FleetDispatchStreamOptions, Vt as FleetDispatchResultBuffer, Wt as FleetExecDispatchOptions, X as FleetDriveTurnRequest, Xt as FleetRunOptions, Y as FleetDriveTurnOutcome, Yt as FleetRunEvent, Z as TokenRefreshHandler, Zi as CreateIntelligenceReportOptions, Zt as ListSandboxFleetOptions, _n as SandboxFleetManifest, a as DeleteMatchingSandboxesResult, aa as IntelligenceReportBudget, an as SandboxFleetArtifactSpec, ar as CreateSandboxOptions, bn as SandboxFleetParent, ca as IntelligenceReportWindow, cn as SandboxFleetDispatchResponse, cr as SandboxShapesInfo, da as PromptResult, dn as SandboxFleetInfo, do as PublicBatchRunRequestInput, ei as ExecOptions, en as ReconcileSandboxFleetsOptions, er as TeeAttestationResponse, fa as SandboxEvent, fr as SandboxShapePreset, gn as SandboxFleetMachineSpec, hn as SandboxFleetMachineRecord, i as DeleteMatchingSandboxesOptions, ia as IntelligenceReport, in as SandboxFleetArtifact, ir as CreateRequestOptions, j as SubscriptionInfo, ji as ManagedProcessResumeOptions, ki as ManagedProcessOptions, kn as SandboxFleetTraceOptions, la as PromptInputPart, ln as SandboxFleetDriverCapability, nn as SandboxFleetAgent, nt as ConversationTurnResult, oa as IntelligenceReportCompareTo, oi as SandboxEnvironment, on as SandboxFleetCostEstimate, or as SandboxConfig, pn as SandboxFleetMachine, po as BatchEvent, qt as FleetPromptDispatchOptions, r as DeleteMatchingSandboxesFilter, so as BatchResult, sr as SandboxResources, ti as ExecResult, tn as ReconcileSandboxFleetsResult, tt as ConversationTurnOptions, ua as PromptOptions, uo as PublicBatchRunRequest, w as SecretsManager, wn as SandboxFleetSpend, xa as BackendConfig, ya as TurnBackendConfig, yn as SandboxFleetOperationsSummary, zn as SandboxInfo } from "./types-CxfH95D5.js";
|
|
4
4
|
import { t as LinesClient } from "./lines-CEX65fBF.js";
|
|
@@ -3,7 +3,7 @@ import { A as normalizeRuntimeBackendConfig, C as encodePromptForWire, D as asse
|
|
|
3
3
|
import { T as ValidationError, a as AuthError, b as SandboxError, d as GpuProviderNotConfiguredError, g as PartialFailureError, h as NotFoundError, i as readResponseJson, m as NetworkError, n as parseErrorResponse, p as NON_RETRYABLE_CREATE_QUOTA_REASONS, r as parseResponseError, v as QuotaError, w as TimeoutError, x as ServerError } from "./errors-BfbOP_rx.js";
|
|
4
4
|
import { f as combineAbortSignals } from "./browser-interactive-control-controller-DHx53yre.js";
|
|
5
5
|
import { n as fetchWithKeepAlive } from "./keep-alive-fetch-BBzJDWyt.js";
|
|
6
|
-
import { A as normalizeSandboxCreateReceipt, D as validateDeferredProfileFileMounts, E as splitInlineProfileSkills, F as normalizeSandboxShape, I as rewrapResponse, M as parseStopPhase, N as normalizeConnection, O as isRetryableProfileFileMaterializeFailure, P as normalizeEgressPolicyFields, T as splitInlineProfileFileMounts, j as normalizeStartupDiagnostics, k as normalizeCaptureProof, n as createSandboxInstanceFromResponse, o as exportTraceBundle } from "./sandbox-
|
|
6
|
+
import { A as normalizeSandboxCreateReceipt, D as validateDeferredProfileFileMounts, E as splitInlineProfileSkills, F as normalizeSandboxShape, I as rewrapResponse, M as parseStopPhase, N as normalizeConnection, O as isRetryableProfileFileMaterializeFailure, P as normalizeEgressPolicyFields, T as splitInlineProfileFileMounts, j as normalizeStartupDiagnostics, k as normalizeCaptureProof, n as createSandboxInstanceFromResponse, o as exportTraceBundle } from "./sandbox-CICD7KcJ.js";
|
|
7
7
|
import { t as LinesClient } from "./lines-C5ER4aN_.js";
|
|
8
8
|
import { PublicTemplatesClient } from "./public-templates.js";
|
|
9
9
|
import { z } from "zod";
|
|
@@ -1222,11 +1222,11 @@ function isLocalSandboxEndpoint(baseUrl) {
|
|
|
1222
1222
|
}
|
|
1223
1223
|
}
|
|
1224
1224
|
async function resolveLocalCliAuthFiles(backendType) {
|
|
1225
|
-
const { discoverLocalCliAuthFiles } = await import("./local-cli-auth-
|
|
1225
|
+
const { discoverLocalCliAuthFiles } = await import("./local-cli-auth-DAukxS-v.js");
|
|
1226
1226
|
return discoverLocalCliAuthFiles(backendType);
|
|
1227
1227
|
}
|
|
1228
1228
|
async function loadLocalCliAuthExpectation(backendType) {
|
|
1229
|
-
const { describeLocalCliAuthExpectation: describe } = await import("./local-cli-auth-
|
|
1229
|
+
const { describeLocalCliAuthExpectation: describe } = await import("./local-cli-auth-DAukxS-v.js");
|
|
1230
1230
|
return describe(backendType);
|
|
1231
1231
|
}
|
|
1232
1232
|
/**
|
package/dist/core.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { B as WorkspaceImages, O as SandboxInstance, V as ProfileFileDeliveryReport, z as WorkspaceImagePublishRequestOptions } from "./index-
|
|
1
|
+
import { B as WorkspaceImages, O as SandboxInstance, V as ProfileFileDeliveryReport, z as WorkspaceImagePublishRequestOptions } from "./index-iYdJi4O8.js";
|
|
2
2
|
import { A as NotFoundError, F as SandboxError, H as TimeoutError, I as SandboxErrorJson, L as SandboxFailureDetail, M as ProfileFileMountPathError, N as QuotaError, R as ServerError, S as CapabilityError, T as FileWriteConflictError, U as ValidationError, b as AuthError, j as PartialFailureError, k as NetworkError, z as StateError } from "./terminal-stream-types-ClZCArRg.js";
|
|
3
3
|
import { Ai as ManagedProcessRecord, Ba as WorkspaceImagePublishInput, Ct as SessionMessageAdmission, H as PreviewLinkInfo, Ja as SandboxEnvRecoveryView, Mi as ManagedProcessSpec, Ni as ManagedProcessState, Oi as ManagedProcessJobs, U as PreviewLinkManager, Va as WorkspaceImagePublishResult, W as PreviewLinkWaitOptions, _r as NetworkConfig, ar as CreateSandboxOptions, ei as ExecOptions, ji as ManagedProcessResumeOptions, ki as ManagedProcessOptions, la as PromptInputPart, lr as SandboxStatus, nt as ConversationTurnResult, or as SandboxConfig, qa as SandboxEnvRecovery, ti as ExecResult, tt as ConversationTurnOptions, zn as SandboxInfo } from "./types-CxfH95D5.js";
|
|
4
4
|
import { D as LineReplyCode, E as LineReminderPreferences, F as LineSenderVerification, G as LineApplicationRequest, H as LINE_APPLICATION_REPLY_MAX_CHARS, I as LineSenderVerificationStart, J as LineApplicationView, K as LineApplicationResult, N as LineSendInput, O as LineReplyCodeInput, P as LineSendReceipt, T as LineProvider, U as LINE_APPLICATION_REQUEST_MAX_BYTES, W as LineApplication, X as parseLineApplicationResult, Y as parseLineApplicationRequest, _ as LineInstanceCreate, a as Line, b as LineMemberInstance, d as LineAttachment, f as LineAttachmentReauthorization, g as LineInstanceAttachOptions, h as LineImage, i as profileChannelReference, l as LineApplicationAttachOptions, o as LineAgentRolePolicy, p as LineExecutionKey, q as LineApplicationState, r as lineInstanceKey, t as LinesClient, w as LineNumberInventory, y as LineMember } from "./lines-CEX65fBF.js";
|
|
5
|
-
import { Ct as InstancesClient, _t as EnsureInstanceOptions, an as BackendRegistryInteractionKind, bt as InstanceRecord, cn as backendRegistryEntrySchema, dn as isBackendRegistryInteractionKind, fn as parseBackendRegistryResponse, in as BackendRegistryEntry, it as ManagedProcessClient, ln as backendRegistryInteractionKindSchema, on as BackendRegistryResponse, pn as parseBackendRegistryResponseBody, rn as BackendRegistryCapabilities, sn as backendRegistryCapabilitiesSchema, t as Sandbox, un as backendRegistryResponseSchema, vt as HostedInstance, xt as InstanceRestartingError, yt as InstanceProfile } from "./client-
|
|
5
|
+
import { Ct as InstancesClient, _t as EnsureInstanceOptions, an as BackendRegistryInteractionKind, bt as InstanceRecord, cn as backendRegistryEntrySchema, dn as isBackendRegistryInteractionKind, fn as parseBackendRegistryResponse, in as BackendRegistryEntry, it as ManagedProcessClient, ln as backendRegistryInteractionKindSchema, on as BackendRegistryResponse, pn as parseBackendRegistryResponseBody, rn as BackendRegistryCapabilities, sn as backendRegistryCapabilitiesSchema, t as Sandbox, un as backendRegistryResponseSchema, vt as HostedInstance, xt as InstanceRestartingError, yt as InstanceProfile } from "./client-Bzklblzg.js";
|
|
6
6
|
import { a as PublicTemplatesClient, i as PublicTemplatePublishRequestOptions, n as PublicTemplatePublishError, r as PublicTemplatePublishJob, t as PublicTemplatePublishArtifact } from "./public-templates-CXn4aQsN.js";
|
|
7
7
|
|
|
8
8
|
//#region src/core.d.ts
|
package/dist/core.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { S as StateError, T as ValidationError, _ as ProfileFileMountPathError, a as AuthError, b as SandboxError, g as PartialFailureError, h as NotFoundError, m as NetworkError, s as CapabilityError, u as FileWriteConflictError, v as QuotaError, w as TimeoutError, x as ServerError } from "./errors-BfbOP_rx.js";
|
|
2
|
-
import { _ as parseBackendRegistryResponse, a as InstancesClient, f as backendRegistryCapabilitiesSchema, g as isBackendRegistryInteractionKind, h as backendRegistryResponseSchema, i as InstanceRestartingError, m as backendRegistryInteractionKindSchema, p as backendRegistryEntrySchema, r as HostedInstance, t as Sandbox, v as parseBackendRegistryResponseBody } from "./client-
|
|
3
|
-
import { r as WorkspaceImages, t as SandboxInstance, x as ManagedProcessClient } from "./sandbox-
|
|
2
|
+
import { _ as parseBackendRegistryResponse, a as InstancesClient, f as backendRegistryCapabilitiesSchema, g as isBackendRegistryInteractionKind, h as backendRegistryResponseSchema, i as InstanceRestartingError, m as backendRegistryInteractionKindSchema, p as backendRegistryEntrySchema, r as HostedInstance, t as Sandbox, v as parseBackendRegistryResponseBody } from "./client-CAa6I_92.js";
|
|
3
|
+
import { r as WorkspaceImages, t as SandboxInstance, x as ManagedProcessClient } from "./sandbox-CICD7KcJ.js";
|
|
4
4
|
import { i as profileChannelReference, r as lineInstanceKey, t as LinesClient } from "./lines-C5ER4aN_.js";
|
|
5
5
|
import { PublicTemplatePublishError, PublicTemplatesClient } from "./public-templates.js";
|
|
6
6
|
import { i as parseLineApplicationResult, n as LINE_APPLICATION_REQUEST_MAX_BYTES, r as parseLineApplicationRequest, t as LINE_APPLICATION_REPLY_MAX_CHARS } from "./line-application-DY9ZTdgF.js";
|
|
@@ -1505,6 +1505,10 @@ declare abstract class SandboxPromptTransportCapabilities extends SandboxSession
|
|
|
1505
1505
|
forceFullProfile?: boolean;
|
|
1506
1506
|
replaySessionId?: string;
|
|
1507
1507
|
}): AsyncGenerator<SandboxEvent>;
|
|
1508
|
+
private openPromptStream;
|
|
1509
|
+
private endPromptStreamFromRecord;
|
|
1510
|
+
private readPromptStream;
|
|
1511
|
+
private rejoinPromptStream;
|
|
1508
1512
|
}
|
|
1509
1513
|
//#endregion
|
|
1510
1514
|
//#region src/sandbox-prompt.d.ts
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { $ as SandboxInteractionResult, A as TraceExportResult, At as buildControlPlaneMcpConfig, B as WorkspaceImages, Ct as BuildControlPlaneMcpConfigOptions, D as ForkAcknowledgement, Dt as SandboxMcpConfig, Et as SANDBOX_MCP_SERVER_NAME, F as toOtelJson, G as SplitInlineProfileFileMountsResult, H as MaterializeProfileFileMountsOptions, I as SandboxTaskSession, J as splitInlineProfileSkills, K as SplitInlineProfileSkillsResult, L as RawEvidenceExport, M as buildTraceExportPayload, N as exportTraceBundle, O as SandboxInstance, Ot as SandboxMcpEndpoint, P as otelTraceIdForTangleTrace, Q as SandboxInteractionResolution, R as SandboxSession, St as SandboxOperationFailedError, Tt as CONTROL_PLANE_MCP_SERVER_NAME, U as MaterializeProfileFileMountsResult, V as ProfileFileDeliveryReport, X as SandboxInteractionCommandResult, Y as validateDeferredProfileFileMounts, Z as SandboxInteractionConflict, _t as InteractiveTerminalFrameLog, at as InteractiveSessionHandleOptions, bt as createInteractiveTerminalSession, ct as InteractiveSessionInfo, dt as InteractiveSessionStartResult, et as AgentInteractiveTerminalSession, ft as InteractiveStopCommand, gt as InteractiveTerminalCapture, h as TangleSandboxClient, ht as agentInteractiveSessionPromptRequestDigest, it as InteractiveSessionHandle, j as TraceExportSink, jt as buildSandboxMcpConfig, k as TraceExportFormat, kt as SandboxMcpServerEntry, lt as InteractiveSessionRef, mt as RespondToPermissionOptions, nt as InteractivePromptCommand, ot as InteractiveSessionHost, pt as InterruptResult, q as splitInlineProfileFileMounts, rt as InteractiveSessionControlClaim, st as InteractiveSessionIncarnationId, tt as InteractiveControlClaimRequest, ut as InteractiveSessionStartOptions, v as TangleSandboxClientConfig, vt as InteractiveTerminalMetadata, wt as BuildSandboxMcpConfigOptions, xt as SandboxOperation, yt as createInteractiveTerminalCapture, z as WorkspaceImagePublishRequestOptions } from "./index-
|
|
1
|
+
import { $ as SandboxInteractionResult, A as TraceExportResult, At as buildControlPlaneMcpConfig, B as WorkspaceImages, Ct as BuildControlPlaneMcpConfigOptions, D as ForkAcknowledgement, Dt as SandboxMcpConfig, Et as SANDBOX_MCP_SERVER_NAME, F as toOtelJson, G as SplitInlineProfileFileMountsResult, H as MaterializeProfileFileMountsOptions, I as SandboxTaskSession, J as splitInlineProfileSkills, K as SplitInlineProfileSkillsResult, L as RawEvidenceExport, M as buildTraceExportPayload, N as exportTraceBundle, O as SandboxInstance, Ot as SandboxMcpEndpoint, P as otelTraceIdForTangleTrace, Q as SandboxInteractionResolution, R as SandboxSession, St as SandboxOperationFailedError, Tt as CONTROL_PLANE_MCP_SERVER_NAME, U as MaterializeProfileFileMountsResult, V as ProfileFileDeliveryReport, X as SandboxInteractionCommandResult, Y as validateDeferredProfileFileMounts, Z as SandboxInteractionConflict, _t as InteractiveTerminalFrameLog, at as InteractiveSessionHandleOptions, bt as createInteractiveTerminalSession, ct as InteractiveSessionInfo, dt as InteractiveSessionStartResult, et as AgentInteractiveTerminalSession, ft as InteractiveStopCommand, gt as InteractiveTerminalCapture, h as TangleSandboxClient, ht as agentInteractiveSessionPromptRequestDigest, it as InteractiveSessionHandle, j as TraceExportSink, jt as buildSandboxMcpConfig, k as TraceExportFormat, kt as SandboxMcpServerEntry, lt as InteractiveSessionRef, mt as RespondToPermissionOptions, nt as InteractivePromptCommand, ot as InteractiveSessionHost, pt as InterruptResult, q as splitInlineProfileFileMounts, rt as InteractiveSessionControlClaim, st as InteractiveSessionIncarnationId, tt as InteractiveControlClaimRequest, ut as InteractiveSessionStartOptions, v as TangleSandboxClientConfig, vt as InteractiveTerminalMetadata, wt as BuildSandboxMcpConfigOptions, xt as SandboxOperation, yt as createInteractiveTerminalCapture, z as WorkspaceImagePublishRequestOptions } from "./index-iYdJi4O8.js";
|
|
2
2
|
import { A as NotFoundError, B as StreamInterruptedError, C as EdgeNotReadyError, D as GpuProviderRequirement, E as GpuProviderNotConfiguredError, F as SandboxError, G as SandboxCreateReceipt, H as TimeoutError, I as SandboxErrorJson, L as SandboxFailureDetail, M as ProfileFileMountPathError, N as QuotaError, O as KeyBudgetExhaustedError, P as ResumeEnvRequiredError, R as ServerError, S as CapabilityError, T as FileWriteConflictError, U as ValidationError, V as StreamInterruptionReason, W as SandboxCreateOutcome, _ as TerminalReadyTimings, a as TerminalStreamOptions, b as AuthError, c as MintInteractiveSessionTokenOptions, d as ScopedTokenScope, f as TERMINAL_WS_ECHO_SUBPROTOCOL, g as TerminalReadyInfo, h as TerminalOutputMessage, i as TerminalStreamHandlers, j as PartialFailureError, k as NetworkError, l as MintScopedTokenOptions, m as TerminalInteractiveSessionIdentity, n as TerminalStreamApiKey, p as TerminalExitInfo, r as TerminalStreamBearerToken, s as TerminalStreamToken, t as TerminalAttachTimings, u as ScopedToken, v as TerminalStreamAuthFormat, w as EgressProxyRecoveryError, x as BranchFanoutExceedsHostError, y as TerminalStreamError, z as StateError } from "./terminal-stream-types-ClZCArRg.js";
|
|
3
3
|
import { $ as CompletedTurnPayload, $a as RawEvidenceBoxDirectoryExport, $i as DurablePlanDecisionOptions, $n as TeeAttestationReport, $r as SearchOptions, $t as ReapExpiredSandboxFleetsResult, A as SandboxIdentity, Aa as RolloutChildResult, Ai as ManagedProcessRecord, An as SandboxFleetUsage, Ar as DownloadResult, At as TaskSessionProfile, B as ProcessSignal, Ba as WorkspaceImagePublishInput, Bi as ForkLookupOptions, Bn as SandboxPortBinding, Br as FileTreeResult, Bt as FleetDispatchCancelResult, C as WorkspaceOperationLookup, Ca as BackendManager, Ci as HostAgentRuntimeBackend, Cn as SandboxFleetProfileRef, Cr as GitAuth, Ct as SessionMessageAdmission, D as ProvisionResult, Da as McpServerConfig, Dn as SandboxFleetTraceEvent, Dr as DeleteOptions, Dt as TaskSessionCommitResult, E as ProvisionEvent, Ea as BackendStatus, En as SandboxFleetTraceBundle, Er as ChunkedUploadResult, Et as TaskSessionChanges, F as EnsureDevServerOptions, Fa as GPU_LEASE_PROVIDER_NAMES, Fn as ListSandboxOptions, Fr as FileReadResult, Ft as CreateSandboxFleetWithCoordinatorOptions, G as GitBranch, Ga as ProcessStatus, Gi as BatchBackend, Gn as SandboxTerminalCreateOptions, Gr as MkdirOptions, H as PreviewLinkInfo, Hi as RolloutOptions, Hn as SandboxRunGeneration, Hr as FileUsageResult, Ht as FleetDispatchResultBufferOptions, I as ExactProcessSpawnOptions, Ia as GpuLeaseProviderName, In as SSHCommandDescriptor, Ir as FileRenameResult, It as FleetAgentId, J as GitStatus, Ja as SandboxEnvRecoveryView, Jn as SandboxTerminalRequestOptions, Jr as UploadProgress, Jt as FleetPromptDispatchResult, K as GitCommit, Ka as SessionStatus, Ki as BatchRunOptions, Kn as SandboxTerminalInfo, Kr as RenameOptions, Kt as FleetMachineId, L as Process, La as GpuLeaseProviderState, Li as BranchOptions, Ln as SSHCredentials, Lr as FileSystem, Lt as FleetAgentPlacement, M as UsageInfo, Ma as RolloutStatus, Mi as ManagedProcessSpec, Mn as SandboxFleetWorkspaceReconcileResult, Mr as FileReadBatchOptions, Mt as AttachSandboxFleetMachineOptions, N as WaitForOptions, Na as RolloutTurnPart, Ni as ManagedProcessState, Nn as SandboxFleetWorkspaceRestoreResult, Nr as FileReadBatchResult, Nt as CreateSandboxFleetOptions, O as ProvisionStep, Oa as RouterRoutingOptions, Oi as ManagedProcessJobs, On as SandboxFleetTraceExport, Or as DownloadOptions, Ot as TaskSessionFileChange, P as DevServerInfo, Pa as ProvisionStatus, Pn as SandboxFleetWorkspaceSnapshotResult, Pr as FileReadError, Q as CommitTaskSessionOptions, Qa as RawEvidenceBoxArchiveManifest, Qi as DurablePlan, Qn as TeeAttestationOptions, Qr as SearchMatch, Qt as ReapExpiredSandboxFleetsOptions, R as ProcessLogEntry, Ra as GpuLeaseProviderStatus, Ri as ForkCounts, Rn as SandboxConnection, Rr as FileTreeFile, Rt as FleetAgentResult, S as StopOptions, Sa as BackendInfo, Si as HostAgentDriverConfig, Sn as SandboxFleetPolicy, So as parseBackendType, Sr as MAX_EGRESS_DENIALS_LIMIT, St as SessionMessage, Ta as BackendRuntimeConfigUpdate, Tn as SandboxFleetToken, Tr as ChunkedUploadOptions, Tt as SessionResultOptions, U as PreviewLinkManager, Ua as ProcessInfo, Ui as RolloutStartResult, Un as SandboxRuntimeHealth, Ur as FileWriteResult, Ut as FleetDispatchStreamOptions, V as ProcessSpawnOptions, Va as WorkspaceImagePublishResult, Vi as Rollout, Vn as SandboxPortPreviewLink, Vr as FileUsageOptions, Vt as FleetDispatchResultBuffer, W as PreviewLinkWaitOptions, Wa as ProcessListOptions, Wi as WaitForRolloutOptions, Wn as SandboxTerminalAttachOptions, Wr as ListOptions, Wt as FleetExecDispatchOptions, X as FleetDriveTurnRequest, Xa as RawEvidenceArchiveManifest, Xn as StartupDiagnostics, Xr as WriteManyFile, Xt as FleetRunOptions, Y as FleetDriveTurnOutcome, Ya as NativeStoreHomeCopy, Yn as SandboxTerminals, Yr as WriteFileOptions, Yt as FleetRunEvent, Z as TokenRefreshHandler, Za as RawEvidenceArchiveManifestNative, Zi as CreateIntelligenceReportOptions, Zn as StartupOperation, Zr as WriteManyOptions, Zt as ListSandboxFleetOptions, _ as SnapshotInfo, _a as SandboxTraceOptions, _i as GpuLeaseExecOptions, _n as SandboxFleetManifest, _o as ALL_BACKEND_TYPES, _r as NetworkConfig, _t as SessionFailureReason, a as DeleteMatchingSandboxesResult, aa as IntelligenceReportBudget, ai as PublishPublicTemplateVersionOptions, an as SandboxFleetArtifactSpec, ao as RawEvidenceRecordsFile, ar as CreateSandboxOptions, at as DispatchPromptOptions, b as SnapshotRemoteSync, ba as BackendCapabilities, bi as GpuLeaseProviders, bn as SandboxFleetParent, bo as EffectiveBackendProfile, br as EgressPolicy, bt as SessionInterruptOptions, c as SandboxDeleteOptions, ca as IntelligenceReportWindow, ci as AttachGpuLeaseOptions, cn as SandboxFleetDispatchResponse, co as BatchTaskResult, cr as SandboxShapesInfo, ct as ListMessagesOptions, d as SandboxOperationKind, da as PromptResult, di as DriverConfig, dn as SandboxFleetInfo, do as PublicBatchRunRequestInput, dr as SandboxShape, dt as SendSessionMessageRequest, ea as DurablePlanDecisionResult, ei as ExecOptions, en as ReconcileSandboxFleetsOptions, eo as RawEvidenceBoxExportOptions, er as TeeAttestationResponse, et as CompletedTurnResult, f as SandboxOperationState, fa as SandboxEvent, fi as DriverInfo, fn as SandboxFleetIntelligenceEnvelope, fo as BatchBackendStats, fr as SandboxShapePreset, ft as SentSessionMessage, g as SnapshotIdempotency, ga as SandboxTraceExport, gi as GpuLeaseCommandResult, gn as SandboxFleetMachineSpec, go as BatchTaskUsage, gr as EgressManager, gt as SessionExecutionStatus, h as SnapshotDeleteOutcome, ha as SandboxTraceEvent, hi as GpuLeaseBilling, hn as SandboxFleetMachineRecord, ho as BatchSidecarGroup, hr as StorageConfig, ht as SessionExecutionInfo, i as DeleteMatchingSandboxesOptions, ia as IntelligenceReport, ii as PublishPublicTemplateOptions, in as SandboxFleetArtifact, io as RawEvidencePayloadFile, ir as CreateRequestOptions, it as CreateTaskSessionOptions, j as SubscriptionInfo, ja as RolloutScorer, ji as ManagedProcessResumeOptions, jn as SandboxFleetWorkspace, jr as FileInfo, jt as TurnDriveResult, ka as SecretInfo, ki as ManagedProcessOptions, kn as SandboxFleetTraceOptions, kr as DownloadProgress, kt as TaskSessionInfo, l as SandboxDeleteOutcome, la as PromptInputPart, li as CreateGpuLeaseOptions, ln as SandboxFleetDriverCapability, lo as BatchTaskInput, lr as SandboxStatus, lt as PublicProfileConflict, m as SnapshotDeleteAcknowledgement, ma as SandboxTraceBundle, mi as GpuLease, mn as SandboxFleetMachineMeteredUsage, mo as BatchEventDataMap, mr as SandboxRuntimeCapabilities, mt as SessionEventStreamOptions, n as DeleteMatchingSandboxResult, ni as PublicTemplateInfo, nn as SandboxFleetAgent, no as RawEvidenceExportOptions, nr as TeePublicKeyResponse, nt as ConversationTurnResult, oa as IntelligenceReportCompareTo, oi as SandboxEnvironment, on as SandboxFleetCostEstimate, or as SandboxConfig, ot as DispatchedSession, p as SandboxRemovalState, pa as SandboxIntelligenceEnvelope, pi as DriverType, pn as SandboxFleetMachine, po as BatchEvent, pr as SandboxResourceUsage, pt as SessionBackendCredentials, q as GitDiff, qa as SandboxEnvRecovery, qn as SandboxTerminalManager, qr as UploadOptions, qt as FleetPromptDispatchOptions, r as DeleteMatchingSandboxesFilter, ra as EventStreamOptions, ri as PublicTemplateVersionInfo, rn as SandboxFleetAgentSpec, ro as RawEvidenceNativeFile, rr as TerminalStream, rt as CreateSessionOptions, s as SandboxDeleteAcknowledgement, sa as IntelligenceReportSubjectType, si as AcceleratorKind, sn as SandboxFleetDispatchFailureClass, so as BatchResult, sr as SandboxResources, st as DriveTurnOptions, t as DeleteMatchingSandboxOutcome, ta as DurablePlanFollowUpResume, ti as ExecResult, tn as ReconcileSandboxFleetsResult, to as RawEvidenceDirectoryExport, tr as TeePublicKey, tt as ConversationTurnOptions, u as SandboxOperationInfo, ua as PromptOptions, ui as DockerDriverConfig, un as SandboxFleetDriverTimings, ur as SecretBinding, ut as SendSessionMessageOptions, v as SnapshotOptions, va as TokenUsage, vi as GpuLeaseExecResult, vn as SandboxFleetManifestMachine, vo as BackendType, vr as NetworkManager, vt as SessionForkOptions, w as SecretsManager, wa as BackendMcpServerStatus, wi as NonHostAgentDriverConfig, wn as SandboxFleetSpend, wr as GitConfig, wt as SessionMessageInputPart, x as SnapshotResult, xa as BackendConfig, xi as GpuLeaseProvidersOptions, xn as SandboxFleetPlacement, xo as EffectiveBackendSource, xr as EgressDenial, xt as SessionListOptions, ya as TurnBackendConfig, yi as GpuLeaseManager, yn as SandboxFleetOperationsSummary, yo as EffectiveBackend, yr as SandboxEgressUsage, yt as SessionInfo, z as ProcessManager, za as GpuLeaseStatus, zi as ForkIdempotency, zn as SandboxInfo, zr as FileTreeOptions, zt as FleetAgentRunStatus } from "./types-CxfH95D5.js";
|
|
4
4
|
import { A as LineRespondAgent, B as LineVoiceOptions, C as LineMessage, D as LineReplyCode, E as LineReminderPreferences, F as LineSenderVerification, G as LineApplicationRequest, H as LINE_APPLICATION_REPLY_MAX_CHARS, I as LineSenderVerificationStart, J as LineApplicationView, K as LineApplicationResult, L as LineThread, M as LineRole, N as LineSendInput, O as LineReplyCodeInput, P as LineSendReceipt, R as LineTransport, S as LineMemberSpec, T as LineProvider, U as LINE_APPLICATION_REQUEST_MAX_BYTES, W as LineApplication, X as parseLineApplicationResult, Y as parseLineApplicationRequest, _ as LineInstanceCreate, a as Line, b as LineMemberInstance, c as LineAllowanceSubject, d as LineAttachment, f as LineAttachmentReauthorization, g as LineInstanceAttachOptions, h as LineImage, i as profileChannelReference, j as LineRespondView, k as LineReplyGate, l as LineApplicationAttachOptions, m as LineFromConnectionInput, n as SandboxLines, o as LineAgentRolePolicy, p as LineExecutionKey, q as LineApplicationState, r as lineInstanceKey, s as LineAllowance, t as LinesClient, u as LineAttachOptions, v as LineLimits, w as LineNumberInventory, x as LineMemberPatch, y as LineMember, z as LineVoice } from "./lines-CEX65fBF.js";
|
|
5
5
|
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-CvObO_Kf.js";
|
|
6
6
|
import { a as InteractiveSessionControllerOptions, i as InteractiveSessionController, n as BrowserInteractiveSessionControllerOptions, o as InteractiveSessionControllerTransport, r as InteractiveAttachRequest, t as BrowserInteractiveSessionController } from "./interactive-controller-CG-ikeYf.js";
|
|
7
|
-
import { $ as SANDBOX_SIZE_PRESET_NAMES, $t as Team, A as RunsHttpClient, At as ImageBuilder, B as RunTangleRouterEvalMatrixInSandboxOptions, Bt as normalizeRuntimeBackendConfig, C as SessionBroadcastResult, Ct as InstancesClient, D as RunRecord, Dt as ImageBuildFetchClient, E as RunPlacementRecord, Et as ImageBuildClientConfig, F as RouterEvalMatrixSandboxBox, Ft as createConfidentialSandbox, G as TangleSearchProvider, Gt as startTeeAttestationHeartbeat, H as runTangleRouterEvalMatrixInSandbox, Ht as TeeAttestationHeartbeat, I as RouterEvalMatrixSandboxClient, It as generateAttestationNonce, J as buildTangleRouterSearchBackend, Jt as ParseSSEStreamOptions, K as buildTangleRouterEvalMatrixRequest, Kt as BuildProgressEvent, L as RouterEvalMatrixScenario, Lt as BatchResultAccumulator, M as RouterEvalMatrixCaseResult, Mt as ConfidentialSandboxResult, N as RouterEvalMatrixHarness, Nt as ConfidentialTeeType, O as RunWaitOptions, Ot as ImageBuildOptions, P as RouterEvalMatrixPayload, Pt as CreateConfidentialSandboxOptions, Q as SANDBOX_SIZE_PRESETS, Qt as InviteTeamMemberOptions, R as RouterEvalMatrixSuiteResponse, Rt as createBatchResultAccumulator, S as SessionBroadcastEvent, St as InstanceStart, T as RunPlacement, Tt as ImageBuildClient, U as RouterSearchConfig, Ut as TeeAttestationHeartbeatOptions, V as RunTangleRouterEvalMatrixInSandboxResult, Vt as requestedPublicProfileDigest, W as RouterSearchConfigOptions, Wt as TeeAttestationHeartbeatSample, X as fetchTangleRouterSearchConfig, Xt as parseSSEStream, Y as buildTangleRouterSearchProfile, Yt as ParsedSSEEvent, Z as DEFAULT_SANDBOX_SIZE, Zt as CreateTeamOptions, _ as AgentRunCancellationAcknowledgement, _t as EnsureInstanceOptions, a as AgentProfileCapabilities, an as BackendRegistryInteractionKind, at as MANAGE_SANDBOXES_PARAMETERS, b as Capability, bt as InstanceRecord, c as AgentProfileMcpServer, cn as backendRegistryEntrySchema, ct as ManageSandboxesTool, d as AgentProfilePrompt, dn as isBackendRegistryInteractionKind, dt as manageSandboxesInputSchema, en as TeamInvitation, et as SandboxSizePreset, f as AgentProfileResourceRef, fn as parseBackendRegistryResponse, ft as applySandboxEventText, g as AgentProfileValidationResult, gt as isToolBearingEvent, h as AgentProfileValidationIssue, ht as getSandboxEventText, i as AgentProfile, in as BackendRegistryEntry, it as ManagedProcessClient, j as RouterEvalMatrixAgentProfile, jt as generateDockerfile, k as RunsClient, kt as ImageBuildResult, l as AgentProfileModelHints, ln as backendRegistryInteractionKindSchema, lt as ManageSandboxesToolOptions, m as AgentProfileSecurityPolicy, mt as collectAgentResponseText, n as SandboxFleetClient, nn as IntelligenceClient, nt as sandboxResourcesForSize, o as AgentProfileConnection, on as BackendRegistryResponse, ot as MANAGE_SANDBOXES_TOOL_NAME, p as AgentProfileResources, pn as parseBackendRegistryResponseBody, pt as collectAgentFinalMessageText, q as buildTangleRouterResponsesWebSearchRequest, qt as ImageSpec, r as SandboxFleet, rn as BackendRegistryCapabilities, rt as materializeProfileFileMounts, s as AgentProfileFileMount, sn as backendRegistryCapabilitiesSchema, st as ManageSandboxesInput, t as Sandbox, tn as TeamMember, tt as resolveSandboxResources, u as AgentProfilePermissionValue, un as backendRegistryResponseSchema, ut as createManageSandboxesTool, v as AgentRunCancellationRequest, vt as HostedInstance, w as RunOptions, wt as Image, x as terminalUpgradeHeadersSupported, xt as InstanceRestartingError, y as AgentSubagentProfile, yt as InstanceProfile, z as RouterImportedRunResponse, zt as validateBatchRunRequest } from "./client-
|
|
7
|
+
import { $ as SANDBOX_SIZE_PRESET_NAMES, $t as Team, A as RunsHttpClient, At as ImageBuilder, B as RunTangleRouterEvalMatrixInSandboxOptions, Bt as normalizeRuntimeBackendConfig, C as SessionBroadcastResult, Ct as InstancesClient, D as RunRecord, Dt as ImageBuildFetchClient, E as RunPlacementRecord, Et as ImageBuildClientConfig, F as RouterEvalMatrixSandboxBox, Ft as createConfidentialSandbox, G as TangleSearchProvider, Gt as startTeeAttestationHeartbeat, H as runTangleRouterEvalMatrixInSandbox, Ht as TeeAttestationHeartbeat, I as RouterEvalMatrixSandboxClient, It as generateAttestationNonce, J as buildTangleRouterSearchBackend, Jt as ParseSSEStreamOptions, K as buildTangleRouterEvalMatrixRequest, Kt as BuildProgressEvent, L as RouterEvalMatrixScenario, Lt as BatchResultAccumulator, M as RouterEvalMatrixCaseResult, Mt as ConfidentialSandboxResult, N as RouterEvalMatrixHarness, Nt as ConfidentialTeeType, O as RunWaitOptions, Ot as ImageBuildOptions, P as RouterEvalMatrixPayload, Pt as CreateConfidentialSandboxOptions, Q as SANDBOX_SIZE_PRESETS, Qt as InviteTeamMemberOptions, R as RouterEvalMatrixSuiteResponse, Rt as createBatchResultAccumulator, S as SessionBroadcastEvent, St as InstanceStart, T as RunPlacement, Tt as ImageBuildClient, U as RouterSearchConfig, Ut as TeeAttestationHeartbeatOptions, V as RunTangleRouterEvalMatrixInSandboxResult, Vt as requestedPublicProfileDigest, W as RouterSearchConfigOptions, Wt as TeeAttestationHeartbeatSample, X as fetchTangleRouterSearchConfig, Xt as parseSSEStream, Y as buildTangleRouterSearchProfile, Yt as ParsedSSEEvent, Z as DEFAULT_SANDBOX_SIZE, Zt as CreateTeamOptions, _ as AgentRunCancellationAcknowledgement, _t as EnsureInstanceOptions, a as AgentProfileCapabilities, an as BackendRegistryInteractionKind, at as MANAGE_SANDBOXES_PARAMETERS, b as Capability, bt as InstanceRecord, c as AgentProfileMcpServer, cn as backendRegistryEntrySchema, ct as ManageSandboxesTool, d as AgentProfilePrompt, dn as isBackendRegistryInteractionKind, dt as manageSandboxesInputSchema, en as TeamInvitation, et as SandboxSizePreset, f as AgentProfileResourceRef, fn as parseBackendRegistryResponse, ft as applySandboxEventText, g as AgentProfileValidationResult, gt as isToolBearingEvent, h as AgentProfileValidationIssue, ht as getSandboxEventText, i as AgentProfile, in as BackendRegistryEntry, it as ManagedProcessClient, j as RouterEvalMatrixAgentProfile, jt as generateDockerfile, k as RunsClient, kt as ImageBuildResult, l as AgentProfileModelHints, ln as backendRegistryInteractionKindSchema, lt as ManageSandboxesToolOptions, m as AgentProfileSecurityPolicy, mt as collectAgentResponseText, n as SandboxFleetClient, nn as IntelligenceClient, nt as sandboxResourcesForSize, o as AgentProfileConnection, on as BackendRegistryResponse, ot as MANAGE_SANDBOXES_TOOL_NAME, p as AgentProfileResources, pn as parseBackendRegistryResponseBody, pt as collectAgentFinalMessageText, q as buildTangleRouterResponsesWebSearchRequest, qt as ImageSpec, r as SandboxFleet, rn as BackendRegistryCapabilities, rt as materializeProfileFileMounts, s as AgentProfileFileMount, sn as backendRegistryCapabilitiesSchema, st as ManageSandboxesInput, t as Sandbox, tn as TeamMember, tt as resolveSandboxResources, u as AgentProfilePermissionValue, un as backendRegistryResponseSchema, ut as createManageSandboxesTool, v as AgentRunCancellationRequest, vt as HostedInstance, w as RunOptions, wt as Image, x as terminalUpgradeHeadersSupported, xt as InstanceRestartingError, y as AgentSubagentProfile, yt as InstanceProfile, z as RouterImportedRunResponse, zt as validateBatchRunRequest } from "./client-Bzklblzg.js";
|
|
8
8
|
import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, o as projectAgentTerminalRecord, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-UqVoiafo.js";
|
|
9
9
|
import { d as AnyTokenPayload, h as IssueCollaborationTokenOptions, m as CollaborationTokenPayload, p as CollaborationAccess } from "./index-C8VSFtWl.js";
|
|
10
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-CVjTnRWP.js";
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { i as isolationPrincipalSchema, o as parseBackendType, r as backendTypeSchema, t as ALL_BACKEND_TYPES } from "./backend-types-CLvdSX8V.js";
|
|
2
2
|
import { A as normalizeRuntimeBackendConfig, B as TERMINAL_WS_ECHO_SUBPROTOCOL, I as createAgentRunOutcomeTracker, L as deriveAgentResultOutcome, R as deriveAgentRunOutcome, b as parseSSEStream, i as terminalUpgradeHeadersSupported, j as requestedPublicProfileDigest, n as InteractiveSessionController, r as TerminalStream, t as BrowserInteractiveSessionController, z as projectAgentTerminalRecord } from "./interactive-controller-OAsASPd_.js";
|
|
3
3
|
import { C as StreamInterruptedError, S as StateError, T as ValidationError, _ as ProfileFileMountPathError, a as AuthError, b as SandboxError, c as EdgeNotReadyError, d as GpuProviderNotConfiguredError, f as KeyBudgetExhaustedError, g as PartialFailureError, h as NotFoundError, l as EgressProxyRecoveryError, m as NetworkError, o as BranchFanoutExceedsHostError, s as CapabilityError, t as TerminalStreamError, u as FileWriteConflictError, v as QuotaError, w as TimeoutError, x as ServerError, y as ResumeEnvRequiredError } from "./errors-BfbOP_rx.js";
|
|
4
|
-
import { _ as parseBackendRegistryResponse, a as InstancesClient, c as IntelligenceClient, d as validateBatchRunRequest, f as backendRegistryCapabilitiesSchema, g as isBackendRegistryInteractionKind, h as backendRegistryResponseSchema, i as InstanceRestartingError, l as runtimeWorkspaceCwdSchema, m as backendRegistryInteractionKindSchema, n as RunsClient, o as SandboxFleetClient, p as backendRegistryEntrySchema, r as HostedInstance, s as SandboxFleet, t as Sandbox, u as createBatchResultAccumulator, v as parseBackendRegistryResponseBody } from "./client-
|
|
4
|
+
import { _ as parseBackendRegistryResponse, a as InstancesClient, c as IntelligenceClient, d as validateBatchRunRequest, f as backendRegistryCapabilitiesSchema, g as isBackendRegistryInteractionKind, h as backendRegistryResponseSchema, i as InstanceRestartingError, l as runtimeWorkspaceCwdSchema, m as backendRegistryInteractionKindSchema, n as RunsClient, o as SandboxFleetClient, p as backendRegistryEntrySchema, r as HostedInstance, s as SandboxFleet, t as Sandbox, u as createBatchResultAccumulator, v as parseBackendRegistryResponseBody } from "./client-CAa6I_92.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-DHx53yre.js";
|
|
6
|
-
import { C as SandboxOperationFailedError, D as validateDeferredProfileFileMounts, E as splitInlineProfileSkills, S as SandboxOperation, T as splitInlineProfileFileMounts, _ as collectAgentFinalMessageText, a as buildTraceExportPayload, b as isToolBearingEvent, c as toOtelJson, d as InteractiveSessionHandle, f as agentInteractiveSessionPromptRequestDigest, g as applySandboxEventText, h as createInteractiveTerminalSession, i as MAX_EGRESS_DENIALS_LIMIT, l as SandboxTaskSession, m as createInteractiveTerminalCapture, o as exportTraceBundle, p as InteractiveTerminalFrameLog, r as WorkspaceImages, s as otelTraceIdForTangleTrace, t as SandboxInstance, u as SandboxSession, v as collectAgentResponseText, w as materializeProfileFileMounts, x as ManagedProcessClient, y as getSandboxEventText } from "./sandbox-
|
|
6
|
+
import { C as SandboxOperationFailedError, D as validateDeferredProfileFileMounts, E as splitInlineProfileSkills, S as SandboxOperation, T as splitInlineProfileFileMounts, _ as collectAgentFinalMessageText, a as buildTraceExportPayload, b as isToolBearingEvent, c as toOtelJson, d as InteractiveSessionHandle, f as agentInteractiveSessionPromptRequestDigest, g as applySandboxEventText, h as createInteractiveTerminalSession, i as MAX_EGRESS_DENIALS_LIMIT, l as SandboxTaskSession, m as createInteractiveTerminalCapture, o as exportTraceBundle, p as InteractiveTerminalFrameLog, r as WorkspaceImages, s as otelTraceIdForTangleTrace, t as SandboxInstance, u as SandboxSession, v as collectAgentResponseText, w as materializeProfileFileMounts, x as ManagedProcessClient, y as getSandboxEventText } from "./sandbox-CICD7KcJ.js";
|
|
7
7
|
import { i as profileChannelReference, n as SandboxLines, r as lineInstanceKey, t as LinesClient } from "./lines-C5ER4aN_.js";
|
|
8
8
|
import { PublicTemplatePublishError, PublicTemplatesClient } from "./public-templates.js";
|
|
9
9
|
import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-g_HzXa6f.js";
|
|
10
10
|
import { i as parseLineApplicationResult, n as LINE_APPLICATION_REQUEST_MAX_BYTES, r as parseLineApplicationRequest, t as LINE_APPLICATION_REPLY_MAX_CHARS } from "./line-application-DY9ZTdgF.js";
|
|
11
|
-
import { s as TangleSandboxClient } from "./tangle-
|
|
11
|
+
import { s as TangleSandboxClient } from "./tangle-DA1aBXXG.js";
|
|
12
12
|
import { z } from "zod";
|
|
13
13
|
import { SANDBOX_SIZE_PRESET_NAMES, agentProfileConfidentialSchema, agentProfileSchema } from "@tangle-network/agent-interface";
|
|
14
14
|
//#region src/confidential.ts
|
|
@@ -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-DiO80j-k.js";
|
|
2
2
|
import { existsSync, readFileSync } from "node:fs";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { homedir } from "node:os";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { O as SandboxInstance } from "./index-
|
|
1
|
+
import { O as SandboxInstance } from "./index-iYdJi4O8.js";
|
|
2
2
|
import { F as EnsureDevServerOptions, H as PreviewLinkInfo } from "./types-CxfH95D5.js";
|
|
3
|
-
import { t as Sandbox } from "./client-
|
|
3
|
+
import { t as Sandbox } from "./client-Bzklblzg.js";
|
|
4
4
|
|
|
5
5
|
//#region src/agent/preview-operations.d.ts
|
|
6
6
|
type AgentPreviewOptions = Pick<EnsureDevServerOptions, "sessionId" | "cwd"> & {
|
|
@@ -4,7 +4,7 @@ import { C as StreamInterruptedError, F as profileFileMountOutsideRootsMessage,
|
|
|
4
4
|
import { _ as interactiveSessionStatusResponseSchema, d as awaitWithAbort, f as combineAbortSignals, g as interactiveSessionControlValidationResponseSchema, h as interactiveSessionControlReleaseResponseSchema, l as createInteractiveControlHolderId, m as interactiveSessionControlClaimResponseSchema, p as delayUntilAborted } from "./browser-interactive-control-controller-DHx53yre.js";
|
|
5
5
|
import { n as fetchWithKeepAlive, t as emitTiming } from "./keep-alive-fetch-BBzJDWyt.js";
|
|
6
6
|
import { s as uploadChunked } from "./chunked-upload-DN2twsUu.js";
|
|
7
|
-
import { r as cliAuthReferenceSchema } from "./cli-auth-bundle-
|
|
7
|
+
import { r as cliAuthReferenceSchema } from "./cli-auth-bundle-DiO80j-k.js";
|
|
8
8
|
import { n as SandboxLines } from "./lines-C5ER4aN_.js";
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
import { AgentExactRunControlRefSchema, AgentInteractiveSessionAttachSchema, AgentInteractiveSessionControlClaimAcknowledgementSchema, AgentInteractiveSessionControlClaimRequestSchema, AgentInteractiveSessionControlClaimSchema, AgentInteractiveSessionPromptAcknowledgementSchema, AgentInteractiveSessionPromptCommandSchema, AgentInteractiveSessionRefSchema, AgentInteractiveSessionStartSchema, AgentInteractiveSessionStopAcknowledgementSchema, AgentInteractiveSessionStopCommandSchema, AgentRunCancellationAcknowledgementSchema, AgentRunCancellationRequestSchema, InteractionAcknowledgementSchema, InteractionBindingSchema, InteractionRequestSchema, InteractionResponseCommandSchema, InteractionResponseSchema, PlanContinuationSchema, TerminalInputSchema, TerminalOutputEventSchema, TerminalReplayWindowSchema, TerminalResizeSchema, TerminalSessionRefSchema, agentInteractiveSessionControlClaimAcknowledgementMatchesRequest, agentInteractiveSessionControlClaimIsNewer, agentInteractiveSessionControlClaimMatchesRef, agentInteractiveSessionPromptAcknowledgementMatchesCommand, agentInteractiveSessionPromptRequestDigest, agentInteractiveSessionRefMatchesStart, agentInteractiveSessionStatusMatchesRef, agentInteractiveSessionStopAcknowledgementMatchesCommand, agentProfileSchema, agentRunCancellationAcknowledgementMatchesRequest, canonicalCandidateDigest, canonicalCandidateJson, exactAgentInteractiveSessionStart, sha256DigestSchema, terminalSessionUsable } from "@tangle-network/agent-interface";
|
|
@@ -6238,6 +6238,18 @@ var SandboxSessionAdmissionCapabilities = class extends SandboxProfileCapabiliti
|
|
|
6238
6238
|
};
|
|
6239
6239
|
//#endregion
|
|
6240
6240
|
//#region src/sandbox-prompt-transport.ts
|
|
6241
|
+
function validatePromptDispatchOptions(sandboxId, options) {
|
|
6242
|
+
if (options?.nativeResume !== void 0) {
|
|
6243
|
+
const resume = options.nativeResume;
|
|
6244
|
+
const validId = (id) => typeof id === "string" && /^[A-Za-z0-9._:-]{1,256}$/u.test(id);
|
|
6245
|
+
if (!options.sessionId || options.lastEventId !== void 0 || resume === null || typeof resume !== "object" || Object.keys(resume).sort().join(",") !== "harness,nativeSessionId,sourceCheckpointId" || !["claude-code", "codex"].includes(resume.harness) || !validId(resume.nativeSessionId) || !validId(resume.sourceCheckpointId)) throw new ValidationError("Native resume requires an exact harness, native session, source checkpoint, and new session dispatch");
|
|
6246
|
+
}
|
|
6247
|
+
if (options?.lastEventId && !options.executionId) throw new ValidationError("lastEventId requires executionId so the SDK can replay the correct execution", { executionId: "Required when lastEventId is set" });
|
|
6248
|
+
const runControlRef = options?.runControlRef ? AgentExactRunControlRefSchema.safeParse(options.runControlRef) : void 0;
|
|
6249
|
+
if (runControlRef && !runControlRef.success) throw new ValidationError("Invalid runControlRef", { runControlRef: runControlRef.error.message });
|
|
6250
|
+
if (runControlRef?.success && (runControlRef.data.environmentId !== sandboxId || runControlRef.data.sessionId !== options?.sessionId || runControlRef.data.executionId !== options?.executionId)) throw new ValidationError("runControlRef does not belong to this sandbox dispatch", { runControlRef: "environmentId, sessionId, and executionId must match the dispatch" });
|
|
6251
|
+
return runControlRef?.success ? runControlRef.data : void 0;
|
|
6252
|
+
}
|
|
6241
6253
|
var SandboxPromptTransportCapabilities = class extends SandboxSessionAdmissionCapabilities {
|
|
6242
6254
|
logStreamCheckpoint(checkpoint, data = {}) {
|
|
6243
6255
|
if (globalThis.process?.env?.TANGLE_SANDBOX_SDK_STREAM_DEBUG !== "1") return;
|
|
@@ -6254,15 +6266,7 @@ var SandboxPromptTransportCapabilities = class extends SandboxSessionAdmissionCa
|
|
|
6254
6266
|
* callers never see a thrown generator.
|
|
6255
6267
|
*/
|
|
6256
6268
|
async *streamPromptInner(message, options, internal) {
|
|
6257
|
-
|
|
6258
|
-
const resume = options.nativeResume;
|
|
6259
|
-
const validId = (id) => typeof id === "string" && /^[A-Za-z0-9._:-]{1,256}$/u.test(id);
|
|
6260
|
-
if (!options.sessionId || options.lastEventId !== void 0 || resume === null || typeof resume !== "object" || Object.keys(resume).sort().join(",") !== "harness,nativeSessionId,sourceCheckpointId" || !["claude-code", "codex"].includes(resume.harness) || !validId(resume.nativeSessionId) || !validId(resume.sourceCheckpointId)) throw new ValidationError("Native resume requires an exact harness, native session, source checkpoint, and new session dispatch");
|
|
6261
|
-
}
|
|
6262
|
-
if (options?.lastEventId && !options.executionId) throw new ValidationError("lastEventId requires executionId so the SDK can replay the correct execution", { executionId: "Required when lastEventId is set" });
|
|
6263
|
-
const runControlRef = options?.runControlRef ? AgentExactRunControlRefSchema.safeParse(options.runControlRef) : void 0;
|
|
6264
|
-
if (runControlRef && !runControlRef.success) throw new ValidationError("Invalid runControlRef", { runControlRef: runControlRef.error.message });
|
|
6265
|
-
if (runControlRef?.success && (runControlRef.data.environmentId !== this.id || runControlRef.data.sessionId !== options?.sessionId || runControlRef.data.executionId !== options?.executionId)) throw new ValidationError("runControlRef does not belong to this sandbox dispatch", { runControlRef: "environmentId, sessionId, and executionId must match the dispatch" });
|
|
6269
|
+
const runControlRef = validatePromptDispatchOptions(this.id, options);
|
|
6266
6270
|
const ttlMs = usableExecutionTtlMs(options?.ttlMs);
|
|
6267
6271
|
await this.ensureRunning();
|
|
6268
6272
|
const timeoutMs = typeof options?.timeoutMs === "number" && options.timeoutMs > 0 ? options.timeoutMs : void 0;
|
|
@@ -6301,186 +6305,210 @@ var SandboxPromptTransportCapabilities = class extends SandboxSessionAdmissionCa
|
|
|
6301
6305
|
format: "sse"
|
|
6302
6306
|
});
|
|
6303
6307
|
appendSessionIdQuery(replaySearch, internal?.replaySessionId);
|
|
6304
|
-
const
|
|
6305
|
-
|
|
6306
|
-
|
|
6307
|
-
|
|
6308
|
-
|
|
6309
|
-
|
|
6310
|
-
|
|
6311
|
-
|
|
6312
|
-
|
|
6313
|
-
|
|
6314
|
-
|
|
6315
|
-
|
|
6316
|
-
|
|
6317
|
-
|
|
6318
|
-
|
|
6319
|
-
|
|
6320
|
-
|
|
6321
|
-
|
|
6322
|
-
|
|
6323
|
-
|
|
6324
|
-
|
|
6325
|
-
...sessionId ? { sessionId } : {},
|
|
6326
|
-
...executionId ? { executionId } : {},
|
|
6327
|
-
status: end.status,
|
|
6328
|
-
...end.status === "completed" ? { outcome: { type: "completed" } } : {},
|
|
6329
|
-
...end.code ? { code: end.code } : {},
|
|
6330
|
-
...end.message ? { message: end.message } : {},
|
|
6331
|
-
endedWithoutTerminalEvent: true
|
|
6332
|
-
}
|
|
6333
|
-
};
|
|
6308
|
+
const state = {
|
|
6309
|
+
options,
|
|
6310
|
+
internal,
|
|
6311
|
+
runControlRef,
|
|
6312
|
+
ttlMs,
|
|
6313
|
+
timeoutMs,
|
|
6314
|
+
streamSignal,
|
|
6315
|
+
throwIfTimedOut,
|
|
6316
|
+
reconcileRuntimeRefusal,
|
|
6317
|
+
logStreamCheckpoint,
|
|
6318
|
+
explicitReplay,
|
|
6319
|
+
requestEndpoint: explicitReplay ? `/agents/run/${encodeURIComponent(options?.executionId ?? "")}/events?${replaySearch}` : "/agents/run/stream",
|
|
6320
|
+
traceHeaders: options?.traceId ? { [TRACE_ID_HEADER]: options.traceId } : {},
|
|
6321
|
+
lastEventId: options?.lastEventId,
|
|
6322
|
+
executionId: options?.executionId,
|
|
6323
|
+
sessionId: options?.sessionId,
|
|
6324
|
+
receivedTerminal: false,
|
|
6325
|
+
reconnectWindowMs: resolveReconnectWindowMs(options?.reconnectWindowMs),
|
|
6326
|
+
delivered: new DeliveredEvents(options?.lastEventId),
|
|
6327
|
+
firstSseEventSeen: false,
|
|
6328
|
+
deliveredThisConnection: 0
|
|
6334
6329
|
};
|
|
6335
|
-
|
|
6336
|
-
|
|
6337
|
-
|
|
6338
|
-
|
|
6330
|
+
const response = await this.openPromptStream(message, state);
|
|
6331
|
+
if (!response.ok) {
|
|
6332
|
+
const body = await response.text();
|
|
6333
|
+
const responseError = parseErrorResponse(response.status, body, {
|
|
6334
|
+
method: state.explicitReplay ? "GET" : "POST",
|
|
6335
|
+
path: `/v1/sandboxes/${encodeURIComponent(this.id)}/runtime${state.requestEndpoint}`
|
|
6336
|
+
}, response.headers);
|
|
6337
|
+
if (!isProfileNotCachedError(responseError)) await state.reconcileRuntimeRefusal(response.status);
|
|
6338
|
+
if (!state.explicitReplay) throw responseError;
|
|
6339
|
+
state.lastReplayStatus = response.status;
|
|
6340
|
+
state.logStreamCheckpoint("replay_response_status", {
|
|
6341
|
+
attempt: 0,
|
|
6342
|
+
status: response.status,
|
|
6343
|
+
ok: false
|
|
6344
|
+
});
|
|
6345
|
+
} else try {
|
|
6346
|
+
yield* this.readPromptStream(response, state, false);
|
|
6347
|
+
} catch (readError) {
|
|
6348
|
+
state.throwIfTimedOut();
|
|
6349
|
+
if (state.receivedTerminal || state.options?.signal?.aborted || state.streamSignal?.aborted) return;
|
|
6350
|
+
state.logStreamCheckpoint("stream_read_failed", { error: readError instanceof Error ? readError.message : String(readError) });
|
|
6351
|
+
console.warn(`[sandbox-sdk] Stream connection broke: ${readError instanceof Error ? readError.message : String(readError)}`);
|
|
6352
|
+
}
|
|
6353
|
+
if (state.receivedTerminal) return;
|
|
6354
|
+
if (state.recordedEnd) {
|
|
6355
|
+
yield this.endPromptStreamFromRecord(state, state.recordedEnd);
|
|
6356
|
+
return;
|
|
6357
|
+
}
|
|
6358
|
+
state.throwIfTimedOut();
|
|
6359
|
+
if (state.options?.signal?.aborted || state.streamSignal?.aborted) return;
|
|
6360
|
+
state.logStreamCheckpoint("stream_drop", {
|
|
6361
|
+
executionId: state.executionId,
|
|
6362
|
+
sessionId: state.sessionId,
|
|
6363
|
+
lastEventId: state.lastEventId,
|
|
6364
|
+
receivedTerminal: state.receivedTerminal
|
|
6365
|
+
});
|
|
6366
|
+
yield* this.rejoinPromptStream(state);
|
|
6367
|
+
}
|
|
6368
|
+
async openPromptStream(message, state) {
|
|
6339
6369
|
let response;
|
|
6340
6370
|
try {
|
|
6341
|
-
logStreamCheckpoint("runtime_post_start", {
|
|
6342
|
-
endpoint: requestEndpoint,
|
|
6343
|
-
sessionId: options?.sessionId,
|
|
6344
|
-
executionId: options?.executionId,
|
|
6345
|
-
hasLastEventId: Boolean(options?.lastEventId),
|
|
6346
|
-
detach: options?.detach === true,
|
|
6347
|
-
replayOnly: explicitReplay
|
|
6371
|
+
state.logStreamCheckpoint("runtime_post_start", {
|
|
6372
|
+
endpoint: state.requestEndpoint,
|
|
6373
|
+
sessionId: state.options?.sessionId,
|
|
6374
|
+
executionId: state.options?.executionId,
|
|
6375
|
+
hasLastEventId: Boolean(state.options?.lastEventId),
|
|
6376
|
+
detach: state.options?.detach === true,
|
|
6377
|
+
replayOnly: state.explicitReplay
|
|
6348
6378
|
});
|
|
6349
|
-
const request = explicitReplay ? {
|
|
6379
|
+
const request = state.explicitReplay ? {
|
|
6350
6380
|
method: "GET",
|
|
6351
|
-
signal: streamSignal,
|
|
6352
|
-
headers: traceHeaders
|
|
6381
|
+
signal: state.streamSignal,
|
|
6382
|
+
headers: state.traceHeaders
|
|
6353
6383
|
} : {
|
|
6354
6384
|
method: "POST",
|
|
6355
|
-
signal: streamSignal,
|
|
6385
|
+
signal: state.streamSignal,
|
|
6356
6386
|
headers: {
|
|
6357
|
-
...traceHeaders,
|
|
6358
|
-
...options?.executionId ? { "X-Execution-ID": options.executionId } : {},
|
|
6359
|
-
...options?.detach ? { "x-agent-detach": "true" } : {}
|
|
6387
|
+
...state.traceHeaders,
|
|
6388
|
+
...state.options?.executionId ? { "X-Execution-ID": state.options.executionId } : {},
|
|
6389
|
+
...state.options?.detach ? { "x-agent-detach": "true" } : {}
|
|
6360
6390
|
},
|
|
6361
6391
|
body: JSON.stringify({
|
|
6362
6392
|
id: "default",
|
|
6363
|
-
...options?.sessionId ? { sessionId: options.sessionId } : {},
|
|
6364
|
-
...options?.nativeResume ? { nativeResume: options.nativeResume } : {},
|
|
6365
|
-
...runControlRef
|
|
6393
|
+
...state.options?.sessionId ? { sessionId: state.options.sessionId } : {},
|
|
6394
|
+
...state.options?.nativeResume ? { nativeResume: state.options.nativeResume } : {},
|
|
6395
|
+
...state.runControlRef ? { runControlRef: state.runControlRef } : {},
|
|
6366
6396
|
parts: encodePromptForWire(message),
|
|
6367
|
-
turnId: options?.turnId,
|
|
6368
|
-
metadata: options?.context,
|
|
6369
|
-
requireVisibleAssistantOutput: options?.requireVisibleAssistantOutput,
|
|
6370
|
-
...timeoutMs ? { timeoutMs } : {},
|
|
6371
|
-
...ttlMs !== void 0 ? { ttlMs } : {},
|
|
6372
|
-
...options?.detach ? { detach: true } : {},
|
|
6373
|
-
...options?.expectedPublicProfileRequestDigest ? { expectedPublicProfileRequestDigest: options.expectedPublicProfileRequestDigest } : {},
|
|
6374
|
-
...options?.expectedSecretProfileReceipt ? { expectedSecretProfileReceipt: options.expectedSecretProfileReceipt } : {},
|
|
6375
|
-
backend: await this.buildRunBackendBody(options?.backend, (internal?.forceFullProfile ?? false) || options?.expectedSecretProfileReceipt !== void 0, options?.model, streamSignal, options?.expectedSecretProfileReceipt !== void 0)
|
|
6397
|
+
turnId: state.options?.turnId,
|
|
6398
|
+
metadata: state.options?.context,
|
|
6399
|
+
requireVisibleAssistantOutput: state.options?.requireVisibleAssistantOutput,
|
|
6400
|
+
...state.timeoutMs ? { timeoutMs: state.timeoutMs } : {},
|
|
6401
|
+
...state.ttlMs !== void 0 ? { ttlMs: state.ttlMs } : {},
|
|
6402
|
+
...state.options?.detach ? { detach: true } : {},
|
|
6403
|
+
...state.options?.expectedPublicProfileRequestDigest ? { expectedPublicProfileRequestDigest: state.options.expectedPublicProfileRequestDigest } : {},
|
|
6404
|
+
...state.options?.expectedSecretProfileReceipt ? { expectedSecretProfileReceipt: state.options.expectedSecretProfileReceipt } : {},
|
|
6405
|
+
backend: await this.buildRunBackendBody(state.options?.backend, (state.internal?.forceFullProfile ?? false) || state.options?.expectedSecretProfileReceipt !== void 0, state.options?.model, state.streamSignal, state.options?.expectedSecretProfileReceipt !== void 0)
|
|
6376
6406
|
})
|
|
6377
6407
|
};
|
|
6378
6408
|
if (typeof request.body === "string" && new TextEncoder().encode(request.body).byteLength > 1048576) throw new ValidationError("Agent run request exceeds the gateway request bound; place large content in resources.files");
|
|
6379
|
-
response = await this.runtimeFetch(requestEndpoint, request);
|
|
6380
|
-
for (let attempt = 1; !explicitReplay && response.status === 503 && attempt <= MAX_CREDENTIAL_REFUSAL_RETRIES; attempt += 1) {
|
|
6409
|
+
response = await this.runtimeFetch(state.requestEndpoint, request);
|
|
6410
|
+
for (let attempt = 1; !state.explicitReplay && response.status === 503 && attempt <= MAX_CREDENTIAL_REFUSAL_RETRIES; attempt += 1) {
|
|
6381
6411
|
const body = await response.clone().text();
|
|
6382
6412
|
const refusal = parseErrorResponse(response.status, body, {
|
|
6383
6413
|
method: request.method,
|
|
6384
|
-
path: `/v1/sandboxes/${encodeURIComponent(this.id)}/runtime${requestEndpoint}`
|
|
6414
|
+
path: `/v1/sandboxes/${encodeURIComponent(this.id)}/runtime${state.requestEndpoint}`
|
|
6385
6415
|
}, response.headers);
|
|
6386
6416
|
if (!isRetryableCredentialRefusal(refusal)) break;
|
|
6387
|
-
await waitForRetryAfter(refusal.retryAfterMs ?? 1e3, streamSignal);
|
|
6388
|
-
response = await this.runtimeFetch(requestEndpoint, request);
|
|
6417
|
+
await waitForRetryAfter(refusal.retryAfterMs ?? 1e3, state.streamSignal);
|
|
6418
|
+
response = await this.runtimeFetch(state.requestEndpoint, request);
|
|
6389
6419
|
}
|
|
6390
|
-
logStreamCheckpoint("runtime_response_headers", {
|
|
6420
|
+
state.logStreamCheckpoint("runtime_response_headers", {
|
|
6391
6421
|
status: response.status,
|
|
6392
6422
|
ok: response.ok
|
|
6393
6423
|
});
|
|
6394
6424
|
} catch (err) {
|
|
6395
|
-
logStreamCheckpoint("runtime_post_failed", { error: err instanceof Error ? err.message : String(err) });
|
|
6396
|
-
throwIfTimedOut();
|
|
6425
|
+
state.logStreamCheckpoint("runtime_post_failed", { error: err instanceof Error ? err.message : String(err) });
|
|
6426
|
+
state.throwIfTimedOut();
|
|
6397
6427
|
throw err;
|
|
6398
6428
|
}
|
|
6399
|
-
|
|
6400
|
-
|
|
6401
|
-
|
|
6402
|
-
|
|
6403
|
-
|
|
6404
|
-
|
|
6405
|
-
|
|
6406
|
-
|
|
6407
|
-
|
|
6408
|
-
|
|
6409
|
-
|
|
6410
|
-
|
|
6411
|
-
|
|
6429
|
+
return response;
|
|
6430
|
+
}
|
|
6431
|
+
endPromptStreamFromRecord(state, end) {
|
|
6432
|
+
state.receivedTerminal = true;
|
|
6433
|
+
state.logStreamCheckpoint("terminal_event", {
|
|
6434
|
+
eventType: "done",
|
|
6435
|
+
synthetic: true,
|
|
6436
|
+
reason: "execution_ended_without_terminal_event",
|
|
6437
|
+
status: end.status,
|
|
6438
|
+
sessionId: state.sessionId,
|
|
6439
|
+
executionId: state.executionId
|
|
6440
|
+
});
|
|
6441
|
+
return {
|
|
6442
|
+
type: "done",
|
|
6443
|
+
data: {
|
|
6444
|
+
...state.sessionId ? { sessionId: state.sessionId } : {},
|
|
6445
|
+
...state.executionId ? { executionId: state.executionId } : {},
|
|
6446
|
+
status: end.status,
|
|
6447
|
+
...end.status === "completed" ? { outcome: { type: "completed" } } : {},
|
|
6448
|
+
...end.code ? { code: end.code } : {},
|
|
6449
|
+
...end.message ? { message: end.message } : {},
|
|
6450
|
+
endedWithoutTerminalEvent: true
|
|
6451
|
+
}
|
|
6452
|
+
};
|
|
6453
|
+
}
|
|
6454
|
+
async *readPromptStream(response, state, replay) {
|
|
6455
|
+
let previousId;
|
|
6456
|
+
const firstEvent = (event) => {
|
|
6457
|
+
if (state.firstSseEventSeen) return;
|
|
6458
|
+
state.firstSseEventSeen = true;
|
|
6459
|
+
state.logStreamCheckpoint("first_sse_event", {
|
|
6460
|
+
eventType: event.type,
|
|
6461
|
+
eventId: event.id,
|
|
6462
|
+
...replay ? { replay: true } : {}
|
|
6412
6463
|
});
|
|
6413
|
-
}
|
|
6414
|
-
|
|
6415
|
-
|
|
6416
|
-
|
|
6417
|
-
|
|
6418
|
-
|
|
6419
|
-
|
|
6420
|
-
|
|
6421
|
-
|
|
6422
|
-
|
|
6423
|
-
|
|
6424
|
-
|
|
6425
|
-
|
|
6426
|
-
|
|
6427
|
-
|
|
6428
|
-
delivered.record(event.id);
|
|
6429
|
-
if (event.id) lastEventId = event.id;
|
|
6430
|
-
if (event.type === "execution.started" && event.data?.executionId) {
|
|
6431
|
-
executionId = event.data.executionId;
|
|
6432
|
-
const eventSessionId = event.data?.sessionId;
|
|
6433
|
-
if (sessionId === void 0 && typeof eventSessionId === "string" && eventSessionId.length > 0) sessionId = eventSessionId;
|
|
6434
|
-
}
|
|
6435
|
-
if (event.type === "done" || event.type === "error") {
|
|
6436
|
-
receivedTerminal = true;
|
|
6437
|
-
logStreamCheckpoint("terminal_event", {
|
|
6438
|
-
eventType: event.type,
|
|
6439
|
-
eventId: event.id,
|
|
6440
|
-
sessionId,
|
|
6441
|
-
executionId
|
|
6442
|
-
});
|
|
6443
|
-
}
|
|
6444
|
-
recordedEnd ??= receivedTerminal ? void 0 : recordedExecutionEnd(event);
|
|
6445
|
-
yield event;
|
|
6446
|
-
}
|
|
6447
|
-
} catch (readError) {
|
|
6448
|
-
throwIfTimedOut();
|
|
6449
|
-
if (receivedTerminal || options?.signal?.aborted || streamSignal?.aborted) return;
|
|
6450
|
-
logStreamCheckpoint("stream_read_failed", { error: readError instanceof Error ? readError.message : String(readError) });
|
|
6451
|
-
console.warn(`[sandbox-sdk] Stream connection broke: ${readError instanceof Error ? readError.message : String(readError)}`);
|
|
6464
|
+
};
|
|
6465
|
+
for await (const event of this.parseSSEStream(response, state.streamSignal)) {
|
|
6466
|
+
if (replay) firstEvent(event);
|
|
6467
|
+
if (event.type === "history.replay.start" || event.type === "history.replay.end") continue;
|
|
6468
|
+
if (!replay) firstEvent(event);
|
|
6469
|
+
const repeated = isDuplicateDelivery(state.delivered, event, previousId);
|
|
6470
|
+
if (event.id) previousId = event.id;
|
|
6471
|
+
if (repeated) continue;
|
|
6472
|
+
state.delivered.record(event.id);
|
|
6473
|
+
if (replay) state.deliveredThisConnection += 1;
|
|
6474
|
+
if (event.id) state.lastEventId = event.id;
|
|
6475
|
+
if (event.type === "execution.started") {
|
|
6476
|
+
if (!replay && event.data?.executionId) state.executionId = event.data.executionId;
|
|
6477
|
+
const eventSessionId = event.data?.sessionId;
|
|
6478
|
+
if (state.sessionId === void 0 && (replay || event.data?.executionId) && typeof eventSessionId === "string" && eventSessionId.length > 0) state.sessionId = eventSessionId;
|
|
6452
6479
|
}
|
|
6480
|
+
if (event.type === "done" || event.type === "error") {
|
|
6481
|
+
state.receivedTerminal = true;
|
|
6482
|
+
state.logStreamCheckpoint("terminal_event", {
|
|
6483
|
+
eventType: event.type,
|
|
6484
|
+
eventId: event.id,
|
|
6485
|
+
...replay ? { replay: true } : {},
|
|
6486
|
+
sessionId: state.sessionId,
|
|
6487
|
+
executionId: state.executionId
|
|
6488
|
+
});
|
|
6489
|
+
}
|
|
6490
|
+
state.recordedEnd ??= state.receivedTerminal ? void 0 : recordedExecutionEnd(event);
|
|
6491
|
+
yield event;
|
|
6453
6492
|
}
|
|
6454
|
-
|
|
6455
|
-
|
|
6456
|
-
|
|
6457
|
-
return;
|
|
6458
|
-
}
|
|
6459
|
-
throwIfTimedOut();
|
|
6460
|
-
if (options?.signal?.aborted || streamSignal?.aborted) return;
|
|
6461
|
-
logStreamCheckpoint("stream_drop", {
|
|
6462
|
-
executionId,
|
|
6463
|
-
sessionId,
|
|
6464
|
-
lastEventId,
|
|
6465
|
-
receivedTerminal
|
|
6466
|
-
});
|
|
6467
|
-
if (!executionId) throw new NetworkError("Prompt stream dropped before execution.started; cannot reconnect", {
|
|
6493
|
+
}
|
|
6494
|
+
async *rejoinPromptStream(state) {
|
|
6495
|
+
if (!state.executionId) throw new NetworkError("Prompt stream dropped before execution.started; cannot reconnect", {
|
|
6468
6496
|
endpoint: "/agents/run/stream",
|
|
6469
6497
|
origin: "runtime"
|
|
6470
6498
|
});
|
|
6471
|
-
const resumeExecutionId = executionId;
|
|
6499
|
+
const resumeExecutionId = state.executionId;
|
|
6472
6500
|
const interrupted = (reason, detail, cause) => {
|
|
6473
|
-
const replayStatusText = lastReplayStatus !== void 0 ? `; last replay status ${lastReplayStatus}` : "";
|
|
6474
|
-
const execStatusText = lastExecutionStatus ? `; last known execution status ${lastExecutionStatus}` : "";
|
|
6501
|
+
const replayStatusText = state.lastReplayStatus !== void 0 ? `; last replay status ${state.lastReplayStatus}` : "";
|
|
6502
|
+
const execStatusText = state.lastExecutionStatus ? `; last known execution status ${state.lastExecutionStatus}` : "";
|
|
6475
6503
|
console.warn(`[sandbox-sdk] Stopped rejoining execution ${resumeExecutionId}: ${detail}`);
|
|
6476
6504
|
return new StreamInterruptedError({
|
|
6477
6505
|
message: `Prompt stream for execution ${resumeExecutionId} ended before a terminal event and could not be rejoined (${detail}); the execution's outcome is unknown${replayStatusText}${execStatusText}`,
|
|
6478
6506
|
executionId: resumeExecutionId,
|
|
6479
|
-
...sessionId ? { sessionId } : {},
|
|
6480
|
-
...lastEventId ? { lastEventId } : {},
|
|
6507
|
+
...state.sessionId ? { sessionId: state.sessionId } : {},
|
|
6508
|
+
...state.lastEventId ? { lastEventId: state.lastEventId } : {},
|
|
6481
6509
|
reason,
|
|
6482
|
-
...lastReplayStatus !== void 0 ? { lastReplayStatus } : {},
|
|
6483
|
-
...lastExecutionStatus ? { lastExecutionStatus } : {},
|
|
6510
|
+
...state.lastReplayStatus !== void 0 ? { lastReplayStatus: state.lastReplayStatus } : {},
|
|
6511
|
+
...state.lastExecutionStatus ? { lastExecutionStatus: state.lastExecutionStatus } : {},
|
|
6484
6512
|
...cause !== void 0 ? { cause } : {}
|
|
6485
6513
|
});
|
|
6486
6514
|
};
|
|
@@ -6488,69 +6516,69 @@ var SandboxPromptTransportCapabilities = class extends SandboxSessionAdmissionCa
|
|
|
6488
6516
|
let consecutiveFailures = 0;
|
|
6489
6517
|
let notFoundSince;
|
|
6490
6518
|
for (let attempt = 1;; attempt++) {
|
|
6491
|
-
throwIfTimedOut();
|
|
6492
|
-
if (options?.signal?.aborted || streamSignal?.aborted) return;
|
|
6519
|
+
state.throwIfTimedOut();
|
|
6520
|
+
if (state.options?.signal?.aborted || state.streamSignal?.aborted) return;
|
|
6493
6521
|
const outageMs = Date.now() - outageStartedAt;
|
|
6494
|
-
if (outageMs >= reconnectWindowMs) throw interrupted("reconnect-window-elapsed", `unreachable for ${outageMs}ms of a ${reconnectWindowMs}ms reconnect window`);
|
|
6522
|
+
if (outageMs >= state.reconnectWindowMs) throw interrupted("reconnect-window-elapsed", `unreachable for ${outageMs}ms of a ${state.reconnectWindowMs}ms reconnect window`);
|
|
6495
6523
|
consecutiveFailures += 1;
|
|
6496
|
-
const delayMs = Math.min(reconnectDelayMs(consecutiveFailures), reconnectWindowMs - outageMs);
|
|
6497
|
-
console.warn(`[sandbox-sdk] Stream dropped without terminal event, reconnecting (attempt ${attempt}; unreachable ${Math.round(outageMs / 1e3)}s of ${Math.round(reconnectWindowMs / 1e3)}s)`);
|
|
6498
|
-
logStreamCheckpoint("reconnect_attempt_start", {
|
|
6524
|
+
const delayMs = Math.min(reconnectDelayMs(consecutiveFailures), state.reconnectWindowMs - outageMs);
|
|
6525
|
+
console.warn(`[sandbox-sdk] Stream dropped without terminal event, reconnecting (attempt ${attempt}; unreachable ${Math.round(outageMs / 1e3)}s of ${Math.round(state.reconnectWindowMs / 1e3)}s)`);
|
|
6526
|
+
state.logStreamCheckpoint("reconnect_attempt_start", {
|
|
6499
6527
|
attempt,
|
|
6500
|
-
executionId,
|
|
6501
|
-
sessionId,
|
|
6502
|
-
lastEventId,
|
|
6528
|
+
executionId: state.executionId,
|
|
6529
|
+
sessionId: state.sessionId,
|
|
6530
|
+
lastEventId: state.lastEventId,
|
|
6503
6531
|
outageMs,
|
|
6504
6532
|
delayMs
|
|
6505
6533
|
});
|
|
6506
|
-
await waitForReconnect(delayMs, streamSignal);
|
|
6507
|
-
throwIfTimedOut();
|
|
6508
|
-
if (options?.signal?.aborted || streamSignal?.aborted) return;
|
|
6534
|
+
await waitForReconnect(delayMs, state.streamSignal);
|
|
6535
|
+
state.throwIfTimedOut();
|
|
6536
|
+
if (state.options?.signal?.aborted || state.streamSignal?.aborted) return;
|
|
6509
6537
|
let connectedAt;
|
|
6510
|
-
|
|
6538
|
+
state.deliveredThisConnection = 0;
|
|
6511
6539
|
try {
|
|
6512
6540
|
const queryParams = new URLSearchParams();
|
|
6513
|
-
if (lastEventId) queryParams.set("lastEventId", lastEventId);
|
|
6541
|
+
if (state.lastEventId) queryParams.set("lastEventId", state.lastEventId);
|
|
6514
6542
|
queryParams.set("format", "sse");
|
|
6515
|
-
appendSessionIdQuery(queryParams, internal?.replaySessionId);
|
|
6543
|
+
appendSessionIdQuery(queryParams, state.internal?.replaySessionId);
|
|
6516
6544
|
const replayResponse = await this.runtimeFetch(`/agents/run/${encodeURIComponent(resumeExecutionId)}/events?${queryParams}`, {
|
|
6517
6545
|
method: "GET",
|
|
6518
|
-
signal: streamSignal,
|
|
6519
|
-
headers: traceHeaders
|
|
6546
|
+
signal: state.streamSignal,
|
|
6547
|
+
headers: state.traceHeaders
|
|
6520
6548
|
});
|
|
6521
|
-
logStreamCheckpoint("replay_response_status", {
|
|
6549
|
+
state.logStreamCheckpoint("replay_response_status", {
|
|
6522
6550
|
attempt,
|
|
6523
6551
|
status: replayResponse.status,
|
|
6524
6552
|
ok: replayResponse.ok
|
|
6525
6553
|
});
|
|
6526
6554
|
if (!replayResponse.ok) {
|
|
6527
|
-
lastReplayStatus = replayResponse.status;
|
|
6555
|
+
state.lastReplayStatus = replayResponse.status;
|
|
6528
6556
|
await replayResponse.body?.cancel().catch(() => void 0);
|
|
6529
|
-
await reconcileRuntimeRefusal(replayResponse.status);
|
|
6557
|
+
await state.reconcileRuntimeRefusal(replayResponse.status);
|
|
6530
6558
|
console.warn(`[sandbox-sdk] Replay endpoint returned ${replayResponse.status}, attempt ${attempt}`);
|
|
6531
6559
|
if (replayResponse.status !== 404) {
|
|
6532
6560
|
notFoundSince = void 0;
|
|
6533
6561
|
continue;
|
|
6534
6562
|
}
|
|
6535
6563
|
notFoundSince ??= Date.now();
|
|
6536
|
-
if (sessionId) try {
|
|
6537
|
-
const info = await this._sessionStatus(sessionId);
|
|
6564
|
+
if (state.sessionId) try {
|
|
6565
|
+
const info = await this._sessionStatus(state.sessionId);
|
|
6538
6566
|
if (info) {
|
|
6539
|
-
lastExecutionStatus = info.status;
|
|
6567
|
+
state.lastExecutionStatus = info.status;
|
|
6540
6568
|
if (info.status === "completed" || info.status === "failed" || info.status === "cancelled") {
|
|
6541
|
-
console.warn(`[sandbox-sdk] Replay 404 but session ${sessionId} is terminal (${info.status}); ending stream gracefully`);
|
|
6542
|
-
logStreamCheckpoint("terminal_event", {
|
|
6569
|
+
console.warn(`[sandbox-sdk] Replay 404 but session ${state.sessionId} is terminal (${info.status}); ending stream gracefully`);
|
|
6570
|
+
state.logStreamCheckpoint("terminal_event", {
|
|
6543
6571
|
eventType: "done",
|
|
6544
6572
|
synthetic: true,
|
|
6545
6573
|
reason: "replay_unavailable_terminal_session",
|
|
6546
|
-
sessionId,
|
|
6547
|
-
executionId
|
|
6574
|
+
sessionId: state.sessionId,
|
|
6575
|
+
executionId: state.executionId
|
|
6548
6576
|
});
|
|
6549
6577
|
yield {
|
|
6550
6578
|
type: "done",
|
|
6551
6579
|
data: {
|
|
6552
|
-
sessionId,
|
|
6553
|
-
executionId,
|
|
6580
|
+
sessionId: state.sessionId,
|
|
6581
|
+
executionId: state.executionId,
|
|
6554
6582
|
status: info.status,
|
|
6555
6583
|
...info.status === "completed" ? { outcome: { type: "completed" } } : {},
|
|
6556
6584
|
replayUnavailable: true
|
|
@@ -6567,64 +6595,33 @@ var SandboxPromptTransportCapabilities = class extends SandboxSessionAdmissionCa
|
|
|
6567
6595
|
}
|
|
6568
6596
|
notFoundSince = void 0;
|
|
6569
6597
|
connectedAt = Date.now();
|
|
6570
|
-
|
|
6571
|
-
|
|
6572
|
-
|
|
6573
|
-
firstSseEventSeen = true;
|
|
6574
|
-
logStreamCheckpoint("first_sse_event", {
|
|
6575
|
-
eventType: event.type,
|
|
6576
|
-
eventId: event.id,
|
|
6577
|
-
replay: true
|
|
6578
|
-
});
|
|
6579
|
-
}
|
|
6580
|
-
if (event.type === "history.replay.start" || event.type === "history.replay.end") continue;
|
|
6581
|
-
const repeated = isDuplicateDelivery(delivered, event, previousId);
|
|
6582
|
-
if (event.id) previousId = event.id;
|
|
6583
|
-
if (repeated) continue;
|
|
6584
|
-
delivered.record(event.id);
|
|
6585
|
-
deliveredThisConnection += 1;
|
|
6586
|
-
if (event.id) lastEventId = event.id;
|
|
6587
|
-
const eventSessionId = event.data?.sessionId;
|
|
6588
|
-
if (sessionId === void 0 && event.type === "execution.started" && typeof eventSessionId === "string" && eventSessionId.length > 0) sessionId = eventSessionId;
|
|
6589
|
-
if (event.type === "done" || event.type === "error") {
|
|
6590
|
-
receivedTerminal = true;
|
|
6591
|
-
logStreamCheckpoint("terminal_event", {
|
|
6592
|
-
eventType: event.type,
|
|
6593
|
-
eventId: event.id,
|
|
6594
|
-
replay: true,
|
|
6595
|
-
sessionId,
|
|
6596
|
-
executionId
|
|
6597
|
-
});
|
|
6598
|
-
}
|
|
6599
|
-
recordedEnd ??= receivedTerminal ? void 0 : recordedExecutionEnd(event);
|
|
6600
|
-
yield event;
|
|
6601
|
-
}
|
|
6602
|
-
if (!receivedTerminal && recordedEnd) {
|
|
6603
|
-
yield endFromRecord(recordedEnd);
|
|
6598
|
+
yield* this.readPromptStream(replayResponse, state, true);
|
|
6599
|
+
if (!state.receivedTerminal && state.recordedEnd) {
|
|
6600
|
+
yield this.endPromptStreamFromRecord(state, state.recordedEnd);
|
|
6604
6601
|
return;
|
|
6605
6602
|
}
|
|
6606
|
-
if (receivedTerminal) {
|
|
6607
|
-
logStreamCheckpoint("reconnect_attempt_end", {
|
|
6603
|
+
if (state.receivedTerminal) {
|
|
6604
|
+
state.logStreamCheckpoint("reconnect_attempt_end", {
|
|
6608
6605
|
attempt,
|
|
6609
6606
|
status: "terminal_received"
|
|
6610
6607
|
});
|
|
6611
6608
|
return;
|
|
6612
6609
|
}
|
|
6613
|
-
throwIfTimedOut();
|
|
6614
|
-
if (options?.signal?.aborted || streamSignal?.aborted) return;
|
|
6610
|
+
state.throwIfTimedOut();
|
|
6611
|
+
if (state.options?.signal?.aborted || state.streamSignal?.aborted) return;
|
|
6615
6612
|
} catch (err) {
|
|
6616
|
-
throwIfTimedOut();
|
|
6613
|
+
state.throwIfTimedOut();
|
|
6617
6614
|
if (err instanceof StreamInterruptedError) throw err;
|
|
6618
|
-
if (options?.signal?.aborted || streamSignal?.aborted) return;
|
|
6615
|
+
if (state.options?.signal?.aborted || state.streamSignal?.aborted) return;
|
|
6619
6616
|
if (err instanceof StateError && isFinalSandboxStatus(this.status)) throw interrupted("sandbox-not-running", `the sandbox is ${this.status}`, err);
|
|
6620
|
-
logStreamCheckpoint("reconnect_attempt_end", {
|
|
6617
|
+
state.logStreamCheckpoint("reconnect_attempt_end", {
|
|
6621
6618
|
attempt,
|
|
6622
6619
|
status: "failed",
|
|
6623
6620
|
error: err instanceof Error ? err.message : String(err)
|
|
6624
6621
|
});
|
|
6625
6622
|
console.warn(`[sandbox-sdk] Reconnection attempt ${attempt} failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
6626
6623
|
}
|
|
6627
|
-
if (connectedAt !== void 0 && (deliveredThisConnection > 0 || Date.now() - connectedAt >= 3e4)) {
|
|
6624
|
+
if (connectedAt !== void 0 && (state.deliveredThisConnection > 0 || Date.now() - connectedAt >= 3e4)) {
|
|
6628
6625
|
outageStartedAt = Date.now();
|
|
6629
6626
|
consecutiveFailures = 0;
|
|
6630
6627
|
}
|
package/dist/tangle/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as JsonResponseParamTypes, E as SandboxIdParamTypes, S as JOB_SANDBOX_DELETE, T as SandboxCreateResponseParamTypes, _ as TANGLE_JOBS_CONTRACT, a as fetchQuote, b as AgentSandboxBlueprintAbi, c as parseQuoteResponse, d as OperatorSession, f as OperatorSessionError, g as TANGLE_CHAIN_ID, h as TangleSandboxClient, i as SignedQuote, l as validateQuote, m as SignMessage, n as QuoteDomain, o as inputsHashOf, p as OperatorSessionToken, r as QuoteError, s as jobQuoteDigest, t as JobQuoteDetails, u as OperatorChallenge, v as TangleSandboxClientConfig, w as SandboxCreateParamTypes, x as JOB_SANDBOX_CREATE, y as ITangleJobsAbi } from "../index-
|
|
1
|
+
import { C as JsonResponseParamTypes, E as SandboxIdParamTypes, S as JOB_SANDBOX_DELETE, T as SandboxCreateResponseParamTypes, _ as TANGLE_JOBS_CONTRACT, a as fetchQuote, b as AgentSandboxBlueprintAbi, c as parseQuoteResponse, d as OperatorSession, f as OperatorSessionError, g as TANGLE_CHAIN_ID, h as TangleSandboxClient, i as SignedQuote, l as validateQuote, m as SignMessage, n as QuoteDomain, o as inputsHashOf, p as OperatorSessionToken, r as QuoteError, s as jobQuoteDigest, t as JobQuoteDetails, u as OperatorChallenge, v as TangleSandboxClientConfig, w as SandboxCreateParamTypes, x as JOB_SANDBOX_CREATE, y as ITangleJobsAbi } from "../index-iYdJi4O8.js";
|
|
2
2
|
export { AgentSandboxBlueprintAbi, ITangleJobsAbi, JOB_SANDBOX_CREATE, JOB_SANDBOX_DELETE, JobQuoteDetails, JsonResponseParamTypes, OperatorChallenge, OperatorSession, OperatorSessionError, OperatorSessionToken, QuoteDomain, QuoteError, SandboxCreateParamTypes, SandboxCreateResponseParamTypes, SandboxIdParamTypes, SignMessage, SignedQuote, TANGLE_CHAIN_ID, TANGLE_JOBS_CONTRACT, TangleSandboxClient, TangleSandboxClientConfig, fetchQuote, inputsHashOf, jobQuoteDigest, parseQuoteResponse, validateQuote };
|
package/dist/tangle/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as SandboxCreateParamTypes, a as parseQuoteResponse, c as OperatorSession, d as TANGLE_JOBS_CONTRACT, f as ITangleJobsAbi, g as JsonResponseParamTypes, h as JOB_SANDBOX_DELETE, i as jobQuoteDigest, l as OperatorSessionError, m as JOB_SANDBOX_CREATE, n as fetchQuote, o as validateQuote, p as AgentSandboxBlueprintAbi, r as inputsHashOf, s as TangleSandboxClient, t as QuoteError, u as TANGLE_CHAIN_ID, v as SandboxCreateResponseParamTypes, y as SandboxIdParamTypes } from "../tangle-
|
|
1
|
+
import { _ as SandboxCreateParamTypes, a as parseQuoteResponse, c as OperatorSession, d as TANGLE_JOBS_CONTRACT, f as ITangleJobsAbi, g as JsonResponseParamTypes, h as JOB_SANDBOX_DELETE, i as jobQuoteDigest, l as OperatorSessionError, m as JOB_SANDBOX_CREATE, n as fetchQuote, o as validateQuote, p as AgentSandboxBlueprintAbi, r as inputsHashOf, s as TangleSandboxClient, t as QuoteError, u as TANGLE_CHAIN_ID, v as SandboxCreateResponseParamTypes, y as SandboxIdParamTypes } from "../tangle-DA1aBXXG.js";
|
|
2
2
|
export { AgentSandboxBlueprintAbi, ITangleJobsAbi, JOB_SANDBOX_CREATE, JOB_SANDBOX_DELETE, JsonResponseParamTypes, OperatorSession, OperatorSessionError, QuoteError, SandboxCreateParamTypes, SandboxCreateResponseParamTypes, SandboxIdParamTypes, TANGLE_CHAIN_ID, TANGLE_JOBS_CONTRACT, TangleSandboxClient, fetchQuote, inputsHashOf, jobQuoteDigest, parseQuoteResponse, validateQuote };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as readResponseJson } from "./errors-BfbOP_rx.js";
|
|
2
|
-
import { n as createSandboxInstanceFromResponse } from "./sandbox-
|
|
2
|
+
import { n as createSandboxInstanceFromResponse } from "./sandbox-CICD7KcJ.js";
|
|
3
3
|
import { _ as rotlBH, a as anumber, b as rotlSL, d as createXOFer, g as u32, h as toBytes$1, l as createHasher, m as swap32IfBE, n as abytes, o as aoutput, r as aexists, s as clean, t as Hash, v as rotlBL, x as split, y as rotlSH } from "./utils-BGvM02yJ.js";
|
|
4
4
|
//#region ../../../packages/runtime-contracts/dist/tangle-blueprint-abi.js
|
|
5
5
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/sandbox",
|
|
3
|
-
"version": "0.64.
|
|
3
|
+
"version": "0.64.14",
|
|
4
4
|
"description": "Client SDK for the Tangle Sandbox platform - build AI agent applications with dev containers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -162,14 +162,14 @@
|
|
|
162
162
|
"@products/sandbox-test-utils": "0.0.0",
|
|
163
163
|
"@repo/shared": "0.0.0",
|
|
164
164
|
"@tangle-network/cli-agent-registry": "0.10.2",
|
|
165
|
+
"@tangle-network/runtime-contracts": "0.19.0",
|
|
165
166
|
"@tangle-network/agent-profile-materialize": "0.26.0",
|
|
166
167
|
"@tangle-network/sdk": "4.0.16",
|
|
167
|
-
"@tangle-network/runtime-contracts": "0.19.0",
|
|
168
168
|
"@tangle-network/sse-core": "0.0.0"
|
|
169
169
|
},
|
|
170
170
|
"tangleRelease": {
|
|
171
|
-
"sourceSha": "
|
|
172
|
-
"mergedAt": "2026-10-22T13:
|
|
171
|
+
"sourceSha": "35ea82f07e6f97624e75deec6079c034dcf43120",
|
|
172
|
+
"mergedAt": "2026-10-22T13:57:03-06:00"
|
|
173
173
|
},
|
|
174
174
|
"scripts": {
|
|
175
175
|
"build": "node scripts/build-dist.mjs",
|