@tangle-network/sandbox 0.30.1 → 0.30.2-develop.20260820122029.869ebfa
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/abort-signal-si1WMfJb.js +31 -0
- package/dist/agent/index.d.ts +3 -3
- package/dist/agent/index.js +3 -3
- package/dist/agent-run-outcome-CM7xD7Mg.d.ts +27 -0
- package/dist/auth/index.d.ts +1 -1
- package/dist/browser-interactive-control-controller-B476gcui.d.ts +96 -0
- package/dist/browser-interactive-control-controller-wXQ7W5pT.js +276 -0
- package/dist/{client-Bg9vBEfL.js → client-BfnJ44gF.js} +29 -6
- package/dist/{client-DRV5bzRc.d.ts → client-Do_HS671.d.ts} +28 -3
- package/dist/collaboration/index.d.ts +1 -1
- package/dist/collaboration/index.js +1 -1
- package/dist/core.d.ts +4 -4
- package/dist/core.js +2 -2
- package/dist/{index-ldDRk8Jh.d.ts → index-ebsVOlUc.d.ts} +2 -2
- package/dist/index.d.ts +11 -8
- package/dist/index.js +7 -6
- package/dist/interactive-control.d.ts +2 -0
- package/dist/interactive-control.js +2 -0
- package/dist/openai/index.d.ts +24 -2
- package/dist/openai/index.js +147 -67
- package/dist/{runtime-api-CK-4S7oA.js → runtime-api-B0tx7NJM.js} +389 -7
- package/dist/runtime.d.ts +4 -3
- package/dist/runtime.js +3 -2
- package/dist/{sandbox-4F9CNqdR.js → sandbox-AUHcCJe1.js} +1435 -784
- package/dist/{sandbox-B49ZGQv7.d.ts → sandbox-Cr-4qzaA.d.ts} +139 -194
- package/dist/tangle/index.d.ts +1 -1
- package/dist/tangle/index.js +1 -1
- package/dist/{tangle-CHpXtqlI.js → tangle-iDk_s8vt.js} +1 -1
- package/dist/terminal-stream-4KNJ6SmL.d.ts +256 -0
- package/dist/{types-Qn3x7R8O.d.ts → types-BwYLVqxX.d.ts} +24 -256
- package/package.json +9 -4
- /package/dist/{collaboration-COCXdRrk.js → collaboration-DQD9kCdN.js} +0 -0
- /package/dist/{errors-Bdy5jXzc.d.ts → errors-CQOvGddH.d.ts} +0 -0
- /package/dist/{index-DtRFVx5U.d.ts → index-Bq_z_u6A.d.ts} +0 -0
- /package/dist/{index-Cp1KYanB.d.ts → index-CMLW3u5K.d.ts} +0 -0
- /package/dist/{local-cli-auth-D4u7fsnH.js → local-cli-auth-CJmSpTjk.js} +0 -0
package/dist/core.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as WorkspaceImagePublishRequestOptions, i as WorkspaceImagePublishInput, o as WorkspaceImagePublishResult, r as SandboxInstance, s as WorkspaceImages } from "./sandbox-
|
|
2
|
-
import {
|
|
3
|
-
import { C as isBackendRegistryInteractionKind, S as backendRegistryResponseSchema, T as parseBackendRegistryResponseBody, _ as BackendRegistryInteractionKind, b as backendRegistryEntrySchema, g as BackendRegistryEntry, h as BackendRegistryCapabilities, i as Sandbox, v as BackendRegistryResponse, w as parseBackendRegistryResponse, x as backendRegistryInteractionKindSchema, y as backendRegistryCapabilitiesSchema } from "./client-
|
|
4
|
-
import { a as NetworkError, c as QuotaError, d as SandboxFailureDetail, f as ServerError, h as ValidationError, i as FileWriteConflictError, l as SandboxError, m as TimeoutError, n as CapabilityError, o as NotFoundError, p as StateError, s as PartialFailureError, t as AuthError, u as SandboxErrorJson } from "./errors-
|
|
1
|
+
import { a as WorkspaceImagePublishRequestOptions, i as WorkspaceImagePublishInput, o as WorkspaceImagePublishResult, r as SandboxInstance, s as WorkspaceImages } from "./sandbox-Cr-4qzaA.js";
|
|
2
|
+
import { An as PromptInputPart, I as CreateSandboxOptions, bn as PreviewLinkManager, ct as ExecOptions, lt as ExecResult, mn as NetworkConfig, qr as SandboxStatus, rr as SandboxConfig, xn as PreviewLinkWaitOptions, yn as PreviewLinkInfo, zr as SandboxInfo } from "./types-BwYLVqxX.js";
|
|
3
|
+
import { C as isBackendRegistryInteractionKind, S as backendRegistryResponseSchema, T as parseBackendRegistryResponseBody, _ as BackendRegistryInteractionKind, b as backendRegistryEntrySchema, g as BackendRegistryEntry, h as BackendRegistryCapabilities, i as Sandbox, v as BackendRegistryResponse, w as parseBackendRegistryResponse, x as backendRegistryInteractionKindSchema, y as backendRegistryCapabilitiesSchema } from "./client-Do_HS671.js";
|
|
4
|
+
import { a as NetworkError, c as QuotaError, d as SandboxFailureDetail, f as ServerError, h as ValidationError, i as FileWriteConflictError, l as SandboxError, m as TimeoutError, n as CapabilityError, o as NotFoundError, p as StateError, s as PartialFailureError, t as AuthError, u as SandboxErrorJson } from "./errors-CQOvGddH.js";
|
|
5
5
|
export { AuthError, type BackendRegistryCapabilities, type BackendRegistryEntry, type BackendRegistryInteractionKind, type BackendRegistryResponse, CapabilityError, type CreateSandboxOptions, type ExecOptions, type ExecResult, FileWriteConflictError, type NetworkConfig, NetworkError, NotFoundError, PartialFailureError, type PreviewLinkInfo, type PreviewLinkManager, type PreviewLinkWaitOptions, type PromptInputPart, QuotaError, Sandbox, type SandboxConfig, SandboxError, type SandboxErrorJson, type SandboxFailureDetail, type SandboxInfo, SandboxInstance, type SandboxStatus, ServerError, StateError, TimeoutError, ValidationError, type WorkspaceImagePublishInput, type WorkspaceImagePublishRequestOptions, type WorkspaceImagePublishResult, WorkspaceImages, backendRegistryCapabilitiesSchema, backendRegistryEntrySchema, backendRegistryInteractionKindSchema, backendRegistryResponseSchema, isBackendRegistryInteractionKind, parseBackendRegistryResponse, parseBackendRegistryResponseBody };
|
package/dist/core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { a as NetworkError, c as QuotaError, d as StateError, f as TimeoutError, i as FileWriteConflictError, l as SandboxError, n as CapabilityError, o as NotFoundError, p as ValidationError, s as PartialFailureError, t as AuthError, u as ServerError } from "./errors-C6kn-3zt.js";
|
|
2
|
-
import { _ as parseBackendRegistryResponseBody, d as backendRegistryCapabilitiesSchema, f as backendRegistryEntrySchema, g as parseBackendRegistryResponse, h as isBackendRegistryInteractionKind, m as backendRegistryResponseSchema, n as Sandbox, p as backendRegistryInteractionKindSchema } from "./client-
|
|
3
|
-
import { a as WorkspaceImages, t as SandboxInstance } from "./sandbox-
|
|
2
|
+
import { _ as parseBackendRegistryResponseBody, d as backendRegistryCapabilitiesSchema, f as backendRegistryEntrySchema, g as parseBackendRegistryResponse, h as isBackendRegistryInteractionKind, m as backendRegistryResponseSchema, n as Sandbox, p as backendRegistryInteractionKindSchema } from "./client-BfnJ44gF.js";
|
|
3
|
+
import { a as WorkspaceImages, t as SandboxInstance } from "./sandbox-AUHcCJe1.js";
|
|
4
4
|
export { AuthError, CapabilityError, FileWriteConflictError, NetworkError, NotFoundError, PartialFailureError, QuotaError, Sandbox, SandboxError, SandboxInstance, ServerError, StateError, TimeoutError, ValidationError, WorkspaceImages, backendRegistryCapabilitiesSchema, backendRegistryEntrySchema, backendRegistryInteractionKindSchema, backendRegistryResponseSchema, isBackendRegistryInteractionKind, parseBackendRegistryResponse, parseBackendRegistryResponseBody };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as HttpClient, r as SandboxInstance } from "./sandbox-
|
|
2
|
-
import {
|
|
1
|
+
import { n as HttpClient, r as SandboxInstance } from "./sandbox-Cr-4qzaA.js";
|
|
2
|
+
import { I as CreateSandboxOptions } from "./types-BwYLVqxX.js";
|
|
3
3
|
|
|
4
4
|
//#region src/tangle/abi.d.ts
|
|
5
5
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { d as
|
|
5
|
-
import { _ as
|
|
6
|
-
import {
|
|
7
|
-
import { s as
|
|
1
|
+
import { A as RespondToPermissionOptions, B as SandboxInteractionResolution, C as InteractiveSessionIncarnationId, D as InteractiveSessionStartResult, E as InteractiveSessionStartOptions, F as InteractiveSessionController, G as SANDBOX_MCP_SERVER_NAME, H as BuildControlPlaneMcpConfigOptions, I as InteractiveSessionControllerOptions, J as SandboxMcpServerEntry, K as SandboxMcpConfig, L as InteractiveSessionControllerTransport, M as BrowserInteractiveSessionController, N as BrowserInteractiveSessionControllerOptions, O as InteractiveStopCommand, P as InteractiveAttachRequest, R as SandboxInteractionCommandResult, S as InteractiveSessionHost, T as InteractiveSessionRef, U as BuildSandboxMcpConfigOptions, V as SandboxInteractionResult, W as CONTROL_PLANE_MCP_SERVER_NAME, X as buildSandboxMcpConfig, Y as buildControlPlaneMcpConfig, _ as InteractiveControlClaimRequest, a as WorkspaceImagePublishRequestOptions, b as InteractiveSessionHandle, c as TraceExportFormat, d as buildTraceExportPayload, f as exportTraceBundle, g as SandboxSession, h as SandboxTaskSession, i as WorkspaceImagePublishInput, j as agentInteractiveSessionPromptRequestDigest, k as InterruptResult, l as TraceExportResult, m as toOtelJson, o as WorkspaceImagePublishResult, p as otelTraceIdForTangleTrace, q as SandboxMcpEndpoint, r as SandboxInstance, s as WorkspaceImages, t as ForkAcknowledgement, u as TraceExportSink, v as InteractivePromptCommand, w as InteractiveSessionInfo, x as InteractiveSessionHandleOptions, y as InteractiveSessionControlClaim, z as SandboxInteractionConflict } from "./sandbox-Cr-4qzaA.js";
|
|
2
|
+
import { c as MintScopedTokenOptions, d as TERMINAL_WS_ECHO_SUBPROTOCOL, f as TerminalExitInfo, h as TerminalStreamAuthFormat, i as TerminalStreamOptions, l as ScopedToken, m as TerminalReadyInfo, n as TerminalStreamError, o as TerminalStreamToken, p as TerminalInteractiveSessionIdentity, r as TerminalStreamHandlers, s as MintInteractiveSessionTokenOptions, t as TerminalStream, u as ScopedTokenScope } from "./terminal-stream-4KNJ6SmL.js";
|
|
3
|
+
import { a as InteractiveSessionControlController, c as InteractiveSessionIdentity, d as InteractiveAttachOptions, f as InteractiveControlClaimAcknowledgement, h as InteractiveSessionStatus, i as INTERACTIVE_CONTROL_CLEANUP_TIMEOUT_MS, l as createInteractiveControlHolderId, m as InteractiveRequestOptions, n as BrowserInteractiveSessionControlControllerOptions, o as InteractiveSessionControlControllerOptions, p as InteractiveControlClaimOptions, r as browserInteractiveControlHolderId, s as InteractiveSessionControlTransport, t as BrowserInteractiveSessionControlController, u as interactiveSessionIdentityDigest } from "./browser-interactive-control-controller-B476gcui.js";
|
|
4
|
+
import { $ as EffectiveBackend, $i as WorkspaceOperationLookup, $n as RolloutStatus, $r as SandboxTerminals, $t as HostAgentRuntimeBackend, A as CreateGpuLeaseOptions, Ai as StartupDiagnostics, An as PromptInputPart, Ar as SandboxFleetTraceEvent, B as DevServerInfo, Bi as TeeAttestationReport, Bn as PublishPublicTemplateVersionOptions, Br as SandboxIntelligenceEnvelope, Bt as GitCommit, C as ChunkedUploadResult, Ci as SnapshotDeleteAcknowledgement, Cn as ProcessInfo, Cr as SandboxFleetMachineSpec, Ct as FleetDispatchCancelResult, Di as SnapshotOptions, Dn as ProcessSignal, Dr as SandboxFleetPolicy, Dt as FleetDriveTurnOutcome, Ei as SnapshotInfo, En as ProcessManager, Er as SandboxFleetOperationsSummary, Et as FleetDispatchStreamOptions, F as CreateSandboxFleetWithCoordinatorOptions, Fi as TaskSessionCommitResult, Fn as ProvisionStatus, Fr as SandboxFleetWorkspaceReconcileResult, Ft as ForkIdempotency, G as DownloadProgress, Gi as TokenUsage, Gn as RenameOptions, Gr as SandboxRuntimeCapabilities, Gt as GpuLeaseBilling, H as DispatchPromptOptions, Hi as TeePublicKey, Hn as ReapExpiredSandboxFleetsResult, Hr as SandboxPortPreviewLink, Ht as GitDiff, I as CreateSandboxOptions, Ii as TaskSessionFileChange, In as ProvisionStep, Ir as SandboxFleetWorkspaceRestoreResult, It as ForkLookupOptions, J as DriverInfo, Ji as UploadOptions, Jn as Rollout, Jr as SandboxTerminalAttachOptions, Jt as GpuLeaseExecResult, K as DriveTurnOptions, Ki as TurnDriveResult, Kr as SandboxRuntimeHealth, Kt as GpuLeaseCommandResult, L as CreateSessionOptions, Li as TaskSessionInfo, Ln as PublicTemplateInfo, Lr as SandboxFleetWorkspaceSnapshotResult, Lt as GPU_LEASE_PROVIDER_NAMES, M as CreateRequestOptions, Mi as StorageConfig, Mn as PromptResult, Mr as SandboxFleetTraceOptions, Mt as FleetPromptDispatchOptions, N as CreateSandboxFleetOptions, Ni as SubscriptionInfo, Nn as ProvisionEvent, Nr as SandboxFleetUsage, O as CommitTaskSessionOptions, Oi as SnapshotResult, On as ProcessSpawnOptions, Or as SandboxFleetToken, Ot as FleetDriveTurnRequest, Pi as TaskSessionChanges, Pn as ProvisionResult, Pr as SandboxFleetWorkspace, Pt as ForkCounts, Qi as WaitForRolloutOptions, Qn as RolloutStartResult, Qr as SandboxTerminalRequestOptions, Qt as HostAgentDriverConfig, R as CreateTaskSessionOptions, Ri as TaskSessionProfile, Rn as PublicTemplateVersionInfo, Rr as SandboxIdentity, Rt as GitAuth, S as ChunkedUploadOptions, Si as SessionStatus, Sn as Process, Sr as SandboxFleetMachineRecord, St as FileWriteResult, Ti as SnapshotIdempotency, Tn as ProcessLogEntry, Tr as SandboxFleetManifestMachine, Tt as FleetDispatchResultBufferOptions, U as DispatchedSession, Ui as TeePublicKeyResponse, Un as ReconcileSandboxFleetsOptions, Ur as SandboxResourceUsage, Ut as GitStatus, V as DirectoryPermission, Vi as TeeAttestationResponse, Vn as ReapExpiredSandboxFleetsOptions, Vr as SandboxPortBinding, Vt as GitConfig, W as DownloadOptions, Wi as TokenRefreshHandler, Wn as ReconcileSandboxFleetsResult, Wr as SandboxResources, Wt as GpuLease, X as DurablePlan, Xi as UsageInfo, Xn as RolloutOptions, Xr as SandboxTerminalInfo, Xt as GpuLeaseProviderName, Y as DriverType, Yi as UploadProgress, Yn as RolloutChildResult, Yr as SandboxTerminalCreateOptions, Yt as GpuLeaseManager, Z as DurablePlanDecisionResult, Zi as WaitForOptions, Zn as RolloutScorer, Zr as SandboxTerminalManager, Zt as GpuLeaseStatus, _ as BatchRunOptions, _i as SessionInterruptOptions, _n as PermissionLevel, _r as SandboxFleetDriverTimings, _t as FileTreeFile, aa as BatchEventDataMap, ai as SearchMatch, an as IntelligenceReportWindow, ar as SandboxCreateOutcome, at as EnsureDevServerOptions, b as BatchTaskResult, bi as SessionMessageInputPart, bn as PreviewLinkManager, br as SandboxFleetMachine, bt as FileUsageOptions, c as AttachGpuLeaseOptions, ca as PublicBatchRunRequest, ci as SecretsManager, cn as ListOptions, cr as SandboxDeleteOutcome, ct as ExecOptions, d as BackendConfig, di as SentSessionMessage, dn as MAX_EGRESS_DENIALS_LIMIT, dr as SandboxFleetArtifact, dt as FileReadBatchOptions, ea as WriteFileOptions, ei as SandboxTraceBundle, en as InstalledTool, er as RolloutTurnPart, et as EffectiveBackendProfile, f as BackendInfo, fi as SessionBackendCredentials, fn as McpServerConfig, fr as SandboxFleetArtifactSpec, ft as FileReadBatchResult, g as BatchResult, gi as SessionInfo, gn as NonHostAgentDriverConfig, gr as SandboxFleetDriverCapability, gt as FileSystem, h as BatchBackend, hi as SessionForkOptions, hn as NetworkManager, hr as SandboxFleetDispatchResponse, ht as FileRenameResult, ia as BatchEvent, ii as SandboxUser, in as IntelligenceReportSubjectType, ir as SandboxConnection, it as EgressPolicy, j as CreateIntelligenceReportOptions, ji as StartupOperation, jn as PromptOptions, jr as SandboxFleetTraceExport, jt as FleetMachineId, k as CompletedTurnResult, kn as ProcessStatus, kr as SandboxFleetTraceBundle, kt as FleetExecDispatchOptions, l as AttachSandboxFleetMachineOptions, la as BackendType, li as SendSessionMessageOptions, ln as ListSandboxFleetOptions, lr as SandboxEnvironment, lt as ExecResult, m as BackendStatus, mi as SessionFailureReason, mn as NetworkConfig, mr as SandboxFleetDispatchFailureClass, mt as FileReadResult, n as AccessPolicyRule, na as WriteManyOptions, ni as SandboxTraceExport, nn as IntelligenceReportBudget, nr as SSHCredentials, nt as EgressDenial, oa as BatchSidecarGroup, oi as SearchOptions, or as SandboxCreateReceipt, ot as EventStreamOptions, p as BackendManager, pi as SessionEventStreamOptions, pn as MkdirOptions, pr as SandboxFleetCostEstimate, pt as FileReadError, q as DriverConfig, qi as UpdateUserOptions, qr as SandboxStatus, qt as GpuLeaseExecOptions, r as AddUserOptions, ra as BatchBackendStats, ri as SandboxTraceOptions, rn as IntelligenceReportCompareTo, rr as SandboxConfig, rt as EgressManager, sa as BatchTaskUsage, si as SecretInfo, sn as ListMessagesOptions, sr as SandboxDeleteAcknowledgement, st as ExactProcessSpawnOptions, t as AcceleratorKind, ta as WriteManyFile, ti as SandboxTraceEvent, tn as IntelligenceReport, tr as SSHCommandDescriptor, tt as EffectiveBackendSource, u as BackendCapabilities, ua as parseBackendType, ui as SendSessionMessageRequest, un as ListSandboxOptions, ur as SandboxEvent, ut as FileInfo, v as BatchRunRequest, vi as SessionListOptions, vn as PermissionsManager, vr as SandboxFleetInfo, vt as FileTreeOptions, wi as SnapshotDeleteOutcome, wn as ProcessListOptions, wr as SandboxFleetManifest, wt as FleetDispatchResultBuffer, x as BranchOptions, xi as SessionResultOptions, xn as PreviewLinkWaitOptions, xr as SandboxFleetMachineMeteredUsage, xt as FileUsageResult, y as BatchTask, yi as SessionMessage, yn as PreviewLinkInfo, yr as SandboxFleetIntelligenceEnvelope, yt as FileTreeResult, z as DeleteOptions, zi as TeeAttestationOptions, zn as PublishPublicTemplateOptions, zr as SandboxInfo, zt as GitBranch } from "./types-BwYLVqxX.js";
|
|
5
|
+
import { C as isBackendRegistryInteractionKind, S as backendRegistryResponseSchema, T as parseBackendRegistryResponseBody, _ as BackendRegistryInteractionKind, a as Team, b as backendRegistryEntrySchema, c as SessionBroadcastEvent, d as SandboxFleetClient, f as ParseSSEStreamOptions, g as BackendRegistryEntry, h as BackendRegistryCapabilities, i as Sandbox, l as SessionBroadcastResult, m as parseSSEStream, n as IntelligenceClient, o as TeamInvitation, p as ParsedSSEEvent, r as InviteTeamMemberOptions, s as TeamMember, t as CreateTeamOptions, u as SandboxFleet, v as BackendRegistryResponse, w as parseBackendRegistryResponse, x as backendRegistryInteractionKindSchema, y as backendRegistryCapabilitiesSchema } from "./client-Do_HS671.js";
|
|
6
|
+
import { d as AnyTokenPayload, h as IssueCollaborationTokenOptions, m as CollaborationTokenPayload, p as CollaborationAccess } from "./index-Bq_z_u6A.js";
|
|
7
|
+
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-CMLW3u5K.js";
|
|
8
|
+
import { a as NetworkError, c as QuotaError, d as SandboxFailureDetail, f as ServerError, h as ValidationError, i as FileWriteConflictError, l as SandboxError, m as TimeoutError, n as CapabilityError, o as NotFoundError, p as StateError, r as EgressProxyRecoveryError, s as PartialFailureError, t as AuthError, u as SandboxErrorJson } from "./errors-CQOvGddH.js";
|
|
9
|
+
import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-CM7xD7Mg.js";
|
|
10
|
+
import { s as TangleSandboxClientConfig, t as TangleSandboxClient } from "./index-ebsVOlUc.js";
|
|
8
11
|
import * as _$_tangle_network_agent_interface0 from "@tangle-network/agent-interface";
|
|
9
12
|
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";
|
|
10
13
|
import { z } from "zod";
|
|
@@ -4425,4 +4428,4 @@ interface RouterEvalMatrixCaseResult {
|
|
|
4425
4428
|
}
|
|
4426
4429
|
declare function runTangleRouterEvalMatrixInSandbox(options: RunTangleRouterEvalMatrixInSandboxOptions): Promise<RunTangleRouterEvalMatrixInSandboxResult>;
|
|
4427
4430
|
//#endregion
|
|
4428
|
-
export { type AcceleratorKind, type AccessPolicyRule, type AddUserOptions, type AgentProfile, type AgentProfileCapabilities, type AgentProfileConnection, type AgentProfileFileMount, type AgentProfileMcpServer, type AgentProfileModelHints, type AgentProfilePermissionValue, type AgentProfilePrompt, type AgentProfileResourceRef, type AgentProfileResources, type AgentProfileSecurityPolicy, type AgentProfileValidationIssue, type AgentProfileValidationResult, type AgentRunCancellationAcknowledgement, type AgentRunCancellationRequest, type AgentSubagentProfile, type AnyTokenPayload, type AttachGpuLeaseOptions, type AttachSandboxFleetMachineOptions, AuthError, type BackendCapabilities, type BackendConfig, type BackendInfo, type BackendManager, type BackendRegistryCapabilities, type BackendRegistryEntry, type BackendRegistryInteractionKind, type BackendRegistryResponse, type BackendStatus, type BackendType, type BatchBackend, type BatchBackendStats, type BatchEvent, type BatchEventDataMap, type BatchResult, type BatchResultAccumulator, type BatchRunOptions, type BatchRunRequest, type BatchSidecarGroup, type BatchTask, type BatchTaskResult, type BatchTaskUsage, type BranchOptions, type BuildControlPlaneMcpConfigOptions, type BuildProgressEvent, type BuildSandboxMcpConfigOptions, CONTROL_PLANE_MCP_SERVER_NAME, type Capability, CapabilityError, type ChunkedUploadOptions, type ChunkedUploadResult, type CollaborationAccess, type CollaborationBootstrapRequest, type CollaborationBootstrapResponse, CollaborationClient, type CollaborationClientConfig, type CollaborationDocumentAdapter, type CollaborationDocumentChange, type CollaborationDocumentRef, CollaborationFileBridge, type CollaborationFileBridgeOptions, type CollaborationFileEvent, type CollaborationPermissions, type CollaborationTokenPayload, type CollaborationTokenRefreshRequest, type CollaborationTokenRefreshResponse, type CollaborationTransportConfig, type CommitTaskSessionOptions, type CompletedTurnResult, type ConfidentialSandboxResult, type ConfidentialTeeType, type CreateConfidentialSandboxOptions, type CreateGpuLeaseOptions, type CreateIntelligenceReportOptions, type CreateRequestOptions, type CreateSandboxFleetOptions, type CreateSandboxFleetWithCoordinatorOptions, type CreateSandboxOptions, type CreateSessionOptions, type CreateTaskSessionOptions, type CreateTeamOptions, DEFAULT_SANDBOX_SIZE, type DeleteOptions, type DevServerInfo, type DirectoryPermission, type DispatchPromptOptions, type DispatchedSession, type DownloadOptions, type DownloadProgress, type DriveTurnOptions, type DriverConfig, type DriverInfo, type DriverType, type DurablePlan, type DurablePlanDecisionResult, type EffectiveBackend, type EffectiveBackendProfile, type EffectiveBackendSource, type EgressDenial, type EgressManager, type EgressPolicy, EgressProxyRecoveryError, type EnsureDevServerOptions, type EventStreamOptions, type ExactProcessSpawnOptions, type ExecOptions, type ExecResult, type FileInfo, type FileReadBatchOptions, type FileReadBatchResult, type FileReadError, type FileReadResult, type FileRenameResult, type FileSystem, type FileTreeFile, type FileTreeOptions, type FileTreeResult, type FileUsageOptions, type FileUsageResult, FileWriteConflictError, type FileWriteResult, type FleetDispatchCancelResult, type FleetDispatchResultBuffer, type FleetDispatchResultBufferOptions, type FleetDispatchStreamOptions, type FleetDriveTurnOutcome, type FleetDriveTurnRequest, type FleetExecDispatchOptions, type FleetMachineId, type FleetPromptDispatchOptions, type ForkAcknowledgement, type ForkCounts, type ForkIdempotency, type ForkLookupOptions, GPU_LEASE_PROVIDER_NAMES, type GitAuth, type GitBranch, type GitCommit, type GitConfig, type GitDiff, type GitStatus, type GpuLease, type GpuLeaseBilling, type GpuLeaseCommandResult, type GpuLeaseExecOptions, type GpuLeaseExecResult, type GpuLeaseManager, type GpuLeaseProviderName, type GpuLeaseStatus, type HostAgentDriverConfig, type HostAgentRuntimeBackend, Image, type ImageBuildClient, type ImageBuildClientConfig, type ImageBuildFetchClient, type ImageBuildOptions, type ImageBuildResult, ImageBuilder, type ImageSpec, type InstalledTool, IntelligenceClient, type IntelligenceReport, type IntelligenceReportBudget, type IntelligenceReportCompareTo, type IntelligenceReportSubjectType, type IntelligenceReportWindow, type InteractiveAttachOptions, type InteractiveAuthFile, InteractiveSessionHandle, type InteractiveSessionHost, type InteractiveSessionInfo, type InteractiveSessionStatus, type InterruptResult, type InviteTeamMemberOptions, type IssueCollaborationTokenOptions, type ListMessagesOptions, type ListOptions, type ListSandboxFleetOptions, type ListSandboxOptions, MANAGE_SANDBOXES_PARAMETERS, MANAGE_SANDBOXES_TOOL_NAME, MAX_EGRESS_DENIALS_LIMIT, type ManageSandboxesInput, type ManageSandboxesTool, type ManageSandboxesToolOptions, type MaterializeProfileFileMountsOptions, type MaterializeProfileFileMountsResult, type McpServerConfig, type MintScopedTokenOptions, type MkdirOptions, type NetworkConfig, NetworkError, type NetworkManager, type NonHostAgentDriverConfig, NotFoundError, type ParseSSEStreamOptions, type ParsedSSEEvent, PartialFailureError, type PermissionLevel, type PermissionsManager, type PreviewLinkInfo, type PreviewLinkManager, type PreviewLinkWaitOptions, type Process, type ProcessInfo, type ProcessListOptions, type ProcessLogEntry, type ProcessManager, type ProcessSignal, type ProcessSpawnOptions, type ProcessStatus, type PromptInputPart, type PromptOptions, type PromptResult, type ProvisionEvent, type ProvisionResult, type ProvisionStatus, type ProvisionStep, type PublicTemplateInfo, type PublicTemplateVersionInfo, type PublishPublicTemplateOptions, type PublishPublicTemplateVersionOptions, QuotaError, type ReapExpiredSandboxFleetsOptions, type ReapExpiredSandboxFleetsResult, type ReconcileSandboxFleetsOptions, type ReconcileSandboxFleetsResult, type RenameOptions, type RespondToPermissionOptions, type Rollout, type RolloutChildResult, type RolloutOptions, type RolloutScorer, type RolloutStartResult, type RolloutStatus, type RolloutTurnPart, type RouterEvalMatrixAgentProfile, type RouterEvalMatrixCaseResult, type RouterEvalMatrixHarness, type RouterEvalMatrixPayload, type RouterEvalMatrixSandboxBox, type RouterEvalMatrixSandboxClient, type RouterEvalMatrixScenario, type RouterEvalMatrixSuiteResponse, type RouterImportedRunResponse, type RouterSearchConfig, type RouterSearchConfigOptions, type RunTangleRouterEvalMatrixInSandboxOptions, type RunTangleRouterEvalMatrixInSandboxResult, SANDBOX_MCP_SERVER_NAME, SANDBOX_SIZE_PRESETS, SANDBOX_SIZE_PRESET_NAMES, type SSHCommandDescriptor, type SSHCredentials, Sandbox, type SandboxConfig, type SandboxConnection, type SandboxCreateOutcome, type SandboxCreateReceipt, type SandboxDeleteAcknowledgement, type SandboxDeleteOutcome, type SandboxEnvironment, SandboxError, type SandboxErrorJson, type SandboxEvent, type SandboxFailureDetail, SandboxFleet, type SandboxFleetArtifact, type SandboxFleetArtifactSpec, SandboxFleetClient, type SandboxFleetCostEstimate, type SandboxFleetDispatchFailureClass, type SandboxFleetDispatchResponse, type SandboxFleetDriverCapability, type SandboxFleetDriverTimings, type SandboxFleetInfo, type SandboxFleetIntelligenceEnvelope, type SandboxFleetMachine, type SandboxFleetMachineMeteredUsage, type SandboxFleetMachineRecord, type SandboxFleetMachineSpec, type SandboxFleetManifest, type SandboxFleetManifestMachine, type SandboxFleetOperationsSummary, type SandboxFleetPolicy, type SandboxFleetToken, type SandboxFleetTraceBundle, type SandboxFleetTraceEvent, type SandboxFleetTraceExport, type SandboxFleetTraceOptions, type SandboxFleetUsage, type SandboxFleetWorkspace, type SandboxFleetWorkspaceReconcileResult, type SandboxFleetWorkspaceRestoreResult, type SandboxFleetWorkspaceSnapshotResult, type SandboxIdentity, type SandboxInfo, SandboxInstance, type SandboxIntelligenceEnvelope, type SandboxInteractionCommandResult, type SandboxInteractionConflict, type SandboxInteractionResolution, type SandboxInteractionResult, type SandboxMcpConfig, type SandboxMcpEndpoint, type SandboxMcpServerEntry, type SandboxPortBinding, type SandboxPortPreviewLink, type SandboxResourceUsage, type SandboxResources, type SandboxRuntimeCapabilities, type SandboxRuntimeHealth, SandboxSession, type SandboxSizePreset, type SandboxStatus, SandboxTaskSession, type SandboxTerminalAttachOptions, type SandboxTerminalCreateOptions, type SandboxTerminalInfo, type SandboxTerminalManager, type SandboxTerminalRequestOptions, type SandboxTerminals, type SandboxTraceBundle, type SandboxTraceEvent, type SandboxTraceExport, type SandboxTraceOptions, type SandboxUser, type SaveCollaborationSnapshotRequest, type SaveCollaborationSnapshotResponse, type ScopedToken, type ScopedTokenScope, type SearchMatch, type SearchOptions, type SecretInfo, type SecretsManager, type SendSessionMessageOptions, type SendSessionMessageRequest, type SentSessionMessage, ServerError, type SessionBackendCredentials, type SessionBroadcastEvent, type SessionBroadcastResult, type SessionEventStreamOptions, type SessionFailureReason, type SessionForkOptions, type SessionInfo, type SessionInterruptOptions, type SessionListOptions, type SessionMessage, type SessionMessageInputPart, type SessionResultOptions, type SessionStatus, type SnapshotDeleteAcknowledgement, type SnapshotDeleteOutcome, type SnapshotIdempotency, type SnapshotInfo, type SnapshotOptions, type SnapshotResult, type SplitInlineProfileFileMountsResult, type SplitInlineProfileSkillsResult, type StartInteractiveOptions, type StartupDiagnostics, type StartupOperation, StateError, type StorageConfig, type SubscriptionInfo, TERMINAL_WS_ECHO_SUBPROTOCOL, TangleSandboxClient, type TangleSandboxClientConfig, type TangleSearchProvider, type TaskSessionChanges, type TaskSessionCommitResult, type TaskSessionFileChange, type TaskSessionInfo, type TaskSessionProfile, type Team, type TeamInvitation, type TeamMember, type TeeAttestationHeartbeat, type TeeAttestationHeartbeatOptions, type TeeAttestationHeartbeatSample, type TeeAttestationOptions, type TeeAttestationReport, type TeeAttestationResponse, type TeePublicKey, type TeePublicKeyResponse, type TerminalExitInfo, type TerminalReadyInfo, TerminalStream, type TerminalStreamAuthFormat, TerminalStreamError, type TerminalStreamHandlers, type TerminalStreamOptions, type TerminalStreamToken, TimeoutError, type TokenRefreshHandler, type TokenUsage, type TraceExportFormat, type TraceExportResult, type TraceExportSink, type TurnDriveResult, type UpdateUserOptions, type UploadOptions, type UploadProgress, type UsageInfo, ValidationError, type WaitForOptions, type WaitForRolloutOptions, type WorkspaceImagePublishInput, type WorkspaceImagePublishRequestOptions, type WorkspaceImagePublishResult, WorkspaceImages, type WorkspaceOperationLookup, type WriteFileOptions, type WriteManyFile, type WriteManyOptions, applySandboxEventText, backendRegistryCapabilitiesSchema, backendRegistryEntrySchema, backendRegistryInteractionKindSchema, backendRegistryResponseSchema, buildCollaborationDocumentId, buildControlPlaneMcpConfig, buildSandboxMcpConfig, buildTangleRouterEvalMatrixRequest, buildTangleRouterResponsesWebSearchRequest, buildTangleRouterSearchBackend, buildTangleRouterSearchProfile, buildTraceExportPayload, collectAgentFinalMessageText, collectAgentResponseText, createBatchResultAccumulator, createConfidentialSandbox, createManageSandboxesTool, exportTraceBundle, fetchTangleRouterSearchConfig, generateAttestationNonce, generateDockerfile, getSandboxEventText, isBackendRegistryInteractionKind, isToolBearingEvent, manageSandboxesInputSchema, materializeProfileFileMounts, normalizeCollaborationPath, normalizeRuntimeBackendConfig, otelTraceIdForTangleTrace, parseBackendRegistryResponse, parseBackendRegistryResponseBody, parseBackendType, parseCollaborationDocumentId, parseSSEStream, resolveSandboxResources, runTangleRouterEvalMatrixInSandbox, sandboxResourcesForSize, splitInlineProfileFileMounts, splitInlineProfileSkills, startTeeAttestationHeartbeat, toOtelJson, validateBatchRunRequest, validateDeferredProfileFileMounts };
|
|
4431
|
+
export { type AcceleratorKind, type AccessPolicyRule, type AddUserOptions, type AgentProfile, type AgentProfileCapabilities, type AgentProfileConnection, type AgentProfileFileMount, type AgentProfileMcpServer, type AgentProfileModelHints, type AgentProfilePermissionValue, type AgentProfilePrompt, type AgentProfileResourceRef, type AgentProfileResources, type AgentProfileSecurityPolicy, type AgentProfileValidationIssue, type AgentProfileValidationResult, type AgentRunCancellationAcknowledgement, type AgentRunCancellationRequest, type AgentRunOutcome, type AgentRunOutcomeTracker, type AgentSubagentProfile, type AnyTokenPayload, type AttachGpuLeaseOptions, type AttachSandboxFleetMachineOptions, AuthError, type BackendCapabilities, type BackendConfig, type BackendInfo, type BackendManager, type BackendRegistryCapabilities, type BackendRegistryEntry, type BackendRegistryInteractionKind, type BackendRegistryResponse, type BackendStatus, type BackendType, type BatchBackend, type BatchBackendStats, type BatchEvent, type BatchEventDataMap, type BatchResult, type BatchResultAccumulator, type BatchRunOptions, type BatchRunRequest, type BatchSidecarGroup, type BatchTask, type BatchTaskResult, type BatchTaskUsage, type BranchOptions, BrowserInteractiveSessionControlController, type BrowserInteractiveSessionControlControllerOptions, BrowserInteractiveSessionController, type BrowserInteractiveSessionControllerOptions, type BuildControlPlaneMcpConfigOptions, type BuildProgressEvent, type BuildSandboxMcpConfigOptions, CONTROL_PLANE_MCP_SERVER_NAME, type Capability, CapabilityError, type ChunkedUploadOptions, type ChunkedUploadResult, type CollaborationAccess, type CollaborationBootstrapRequest, type CollaborationBootstrapResponse, CollaborationClient, type CollaborationClientConfig, type CollaborationDocumentAdapter, type CollaborationDocumentChange, type CollaborationDocumentRef, CollaborationFileBridge, type CollaborationFileBridgeOptions, type CollaborationFileEvent, type CollaborationPermissions, type CollaborationTokenPayload, type CollaborationTokenRefreshRequest, type CollaborationTokenRefreshResponse, type CollaborationTransportConfig, type CommitTaskSessionOptions, type CompletedTurnResult, type ConfidentialSandboxResult, type ConfidentialTeeType, type CreateConfidentialSandboxOptions, type CreateGpuLeaseOptions, type CreateIntelligenceReportOptions, type CreateRequestOptions, type CreateSandboxFleetOptions, type CreateSandboxFleetWithCoordinatorOptions, type CreateSandboxOptions, type CreateSessionOptions, type CreateTaskSessionOptions, type CreateTeamOptions, DEFAULT_SANDBOX_SIZE, type DeleteOptions, type DevServerInfo, type DirectoryPermission, type DispatchPromptOptions, type DispatchedSession, type DownloadOptions, type DownloadProgress, type DriveTurnOptions, type DriverConfig, type DriverInfo, type DriverType, type DurablePlan, type DurablePlanDecisionResult, type EffectiveBackend, type EffectiveBackendProfile, type EffectiveBackendSource, type EgressDenial, type EgressManager, type EgressPolicy, EgressProxyRecoveryError, type EnsureDevServerOptions, type EventStreamOptions, type ExactProcessSpawnOptions, type ExecOptions, type ExecResult, type FileInfo, type FileReadBatchOptions, type FileReadBatchResult, type FileReadError, type FileReadResult, type FileRenameResult, type FileSystem, type FileTreeFile, type FileTreeOptions, type FileTreeResult, type FileUsageOptions, type FileUsageResult, FileWriteConflictError, type FileWriteResult, type FleetDispatchCancelResult, type FleetDispatchResultBuffer, type FleetDispatchResultBufferOptions, type FleetDispatchStreamOptions, type FleetDriveTurnOutcome, type FleetDriveTurnRequest, type FleetExecDispatchOptions, type FleetMachineId, type FleetPromptDispatchOptions, type ForkAcknowledgement, type ForkCounts, type ForkIdempotency, type ForkLookupOptions, GPU_LEASE_PROVIDER_NAMES, type GitAuth, type GitBranch, type GitCommit, type GitConfig, type GitDiff, type GitStatus, type GpuLease, type GpuLeaseBilling, type GpuLeaseCommandResult, type GpuLeaseExecOptions, type GpuLeaseExecResult, type GpuLeaseManager, type GpuLeaseProviderName, type GpuLeaseStatus, type HostAgentDriverConfig, type HostAgentRuntimeBackend, INTERACTIVE_CONTROL_CLEANUP_TIMEOUT_MS, Image, type ImageBuildClient, type ImageBuildClientConfig, type ImageBuildFetchClient, type ImageBuildOptions, type ImageBuildResult, ImageBuilder, type ImageSpec, type InstalledTool, IntelligenceClient, type IntelligenceReport, type IntelligenceReportBudget, type IntelligenceReportCompareTo, type IntelligenceReportSubjectType, type IntelligenceReportWindow, type InteractiveAttachOptions, type InteractiveAttachRequest, type InteractiveControlClaimAcknowledgement, type InteractiveControlClaimOptions, type InteractiveControlClaimRequest, type InteractivePromptCommand, type InteractiveRequestOptions, type InteractiveSessionControlClaim, InteractiveSessionControlController, type InteractiveSessionControlControllerOptions, type InteractiveSessionControlTransport, InteractiveSessionController, type InteractiveSessionControllerOptions, type InteractiveSessionControllerTransport, InteractiveSessionHandle, type InteractiveSessionHandleOptions, type InteractiveSessionHost, type InteractiveSessionIdentity, type InteractiveSessionIncarnationId, type InteractiveSessionInfo, type InteractiveSessionRef, type InteractiveSessionStartOptions, type InteractiveSessionStartResult, type InteractiveSessionStatus, type InteractiveStopCommand, type InterruptResult, type InviteTeamMemberOptions, type IssueCollaborationTokenOptions, type ListMessagesOptions, type ListOptions, type ListSandboxFleetOptions, type ListSandboxOptions, MANAGE_SANDBOXES_PARAMETERS, MANAGE_SANDBOXES_TOOL_NAME, MAX_EGRESS_DENIALS_LIMIT, type ManageSandboxesInput, type ManageSandboxesTool, type ManageSandboxesToolOptions, type MaterializeProfileFileMountsOptions, type MaterializeProfileFileMountsResult, type McpServerConfig, type MintInteractiveSessionTokenOptions, type MintScopedTokenOptions, type MkdirOptions, type NetworkConfig, NetworkError, type NetworkManager, type NonHostAgentDriverConfig, NotFoundError, type ParseSSEStreamOptions, type ParsedSSEEvent, PartialFailureError, type PermissionLevel, type PermissionsManager, type PreviewLinkInfo, type PreviewLinkManager, type PreviewLinkWaitOptions, type Process, type ProcessInfo, type ProcessListOptions, type ProcessLogEntry, type ProcessManager, type ProcessSignal, type ProcessSpawnOptions, type ProcessStatus, type PromptInputPart, type PromptOptions, type PromptResult, type ProvisionEvent, type ProvisionResult, type ProvisionStatus, type ProvisionStep, type PublicTemplateInfo, type PublicTemplateVersionInfo, type PublishPublicTemplateOptions, type PublishPublicTemplateVersionOptions, QuotaError, type ReapExpiredSandboxFleetsOptions, type ReapExpiredSandboxFleetsResult, type ReconcileSandboxFleetsOptions, type ReconcileSandboxFleetsResult, type RenameOptions, type RespondToPermissionOptions, type Rollout, type RolloutChildResult, type RolloutOptions, type RolloutScorer, type RolloutStartResult, type RolloutStatus, type RolloutTurnPart, type RouterEvalMatrixAgentProfile, type RouterEvalMatrixCaseResult, type RouterEvalMatrixHarness, type RouterEvalMatrixPayload, type RouterEvalMatrixSandboxBox, type RouterEvalMatrixSandboxClient, type RouterEvalMatrixScenario, type RouterEvalMatrixSuiteResponse, type RouterImportedRunResponse, type RouterSearchConfig, type RouterSearchConfigOptions, type RunTangleRouterEvalMatrixInSandboxOptions, type RunTangleRouterEvalMatrixInSandboxResult, SANDBOX_MCP_SERVER_NAME, SANDBOX_SIZE_PRESETS, SANDBOX_SIZE_PRESET_NAMES, type SSHCommandDescriptor, type SSHCredentials, Sandbox, type SandboxConfig, type SandboxConnection, type SandboxCreateOutcome, type SandboxCreateReceipt, type SandboxDeleteAcknowledgement, type SandboxDeleteOutcome, type SandboxEnvironment, SandboxError, type SandboxErrorJson, type SandboxEvent, type SandboxFailureDetail, SandboxFleet, type SandboxFleetArtifact, type SandboxFleetArtifactSpec, SandboxFleetClient, type SandboxFleetCostEstimate, type SandboxFleetDispatchFailureClass, type SandboxFleetDispatchResponse, type SandboxFleetDriverCapability, type SandboxFleetDriverTimings, type SandboxFleetInfo, type SandboxFleetIntelligenceEnvelope, type SandboxFleetMachine, type SandboxFleetMachineMeteredUsage, type SandboxFleetMachineRecord, type SandboxFleetMachineSpec, type SandboxFleetManifest, type SandboxFleetManifestMachine, type SandboxFleetOperationsSummary, type SandboxFleetPolicy, type SandboxFleetToken, type SandboxFleetTraceBundle, type SandboxFleetTraceEvent, type SandboxFleetTraceExport, type SandboxFleetTraceOptions, type SandboxFleetUsage, type SandboxFleetWorkspace, type SandboxFleetWorkspaceReconcileResult, type SandboxFleetWorkspaceRestoreResult, type SandboxFleetWorkspaceSnapshotResult, type SandboxIdentity, type SandboxInfo, SandboxInstance, type SandboxIntelligenceEnvelope, type SandboxInteractionCommandResult, type SandboxInteractionConflict, type SandboxInteractionResolution, type SandboxInteractionResult, type SandboxMcpConfig, type SandboxMcpEndpoint, type SandboxMcpServerEntry, type SandboxPortBinding, type SandboxPortPreviewLink, type SandboxResourceUsage, type SandboxResources, type SandboxRuntimeCapabilities, type SandboxRuntimeHealth, SandboxSession, type SandboxSizePreset, type SandboxStatus, SandboxTaskSession, type SandboxTerminalAttachOptions, type SandboxTerminalCreateOptions, type SandboxTerminalInfo, type SandboxTerminalManager, type SandboxTerminalRequestOptions, type SandboxTerminals, type SandboxTraceBundle, type SandboxTraceEvent, type SandboxTraceExport, type SandboxTraceOptions, type SandboxUser, type SaveCollaborationSnapshotRequest, type SaveCollaborationSnapshotResponse, type ScopedToken, type ScopedTokenScope, type SearchMatch, type SearchOptions, type SecretInfo, type SecretsManager, type SendSessionMessageOptions, type SendSessionMessageRequest, type SentSessionMessage, ServerError, type SessionBackendCredentials, type SessionBroadcastEvent, type SessionBroadcastResult, type SessionEventStreamOptions, type SessionFailureReason, type SessionForkOptions, type SessionInfo, type SessionInterruptOptions, type SessionListOptions, type SessionMessage, type SessionMessageInputPart, type SessionResultOptions, type SessionStatus, type SnapshotDeleteAcknowledgement, type SnapshotDeleteOutcome, type SnapshotIdempotency, type SnapshotInfo, type SnapshotOptions, type SnapshotResult, type SplitInlineProfileFileMountsResult, type SplitInlineProfileSkillsResult, type StartupDiagnostics, type StartupOperation, StateError, type StorageConfig, type SubscriptionInfo, TERMINAL_WS_ECHO_SUBPROTOCOL, TangleSandboxClient, type TangleSandboxClientConfig, type TangleSearchProvider, type TaskSessionChanges, type TaskSessionCommitResult, type TaskSessionFileChange, type TaskSessionInfo, type TaskSessionProfile, type Team, type TeamInvitation, type TeamMember, type TeeAttestationHeartbeat, type TeeAttestationHeartbeatOptions, type TeeAttestationHeartbeatSample, type TeeAttestationOptions, type TeeAttestationReport, type TeeAttestationResponse, type TeePublicKey, type TeePublicKeyResponse, type TerminalExitInfo, type TerminalInteractiveSessionIdentity, type TerminalReadyInfo, TerminalStream, type TerminalStreamAuthFormat, TerminalStreamError, type TerminalStreamHandlers, type TerminalStreamOptions, type TerminalStreamToken, TimeoutError, type TokenRefreshHandler, type TokenUsage, type TraceExportFormat, type TraceExportResult, type TraceExportSink, type TurnDriveResult, type UpdateUserOptions, type UploadOptions, type UploadProgress, type UsageInfo, ValidationError, type WaitForOptions, type WaitForRolloutOptions, type WorkspaceImagePublishInput, type WorkspaceImagePublishRequestOptions, type WorkspaceImagePublishResult, WorkspaceImages, type WorkspaceOperationLookup, type WriteFileOptions, type WriteManyFile, type WriteManyOptions, applySandboxEventText, backendRegistryCapabilitiesSchema, backendRegistryEntrySchema, backendRegistryInteractionKindSchema, backendRegistryResponseSchema, browserInteractiveControlHolderId, buildCollaborationDocumentId, buildControlPlaneMcpConfig, buildSandboxMcpConfig, buildTangleRouterEvalMatrixRequest, buildTangleRouterResponsesWebSearchRequest, buildTangleRouterSearchBackend, buildTangleRouterSearchProfile, buildTraceExportPayload, collectAgentFinalMessageText, collectAgentResponseText, createAgentRunOutcomeTracker, createBatchResultAccumulator, createConfidentialSandbox, createInteractiveControlHolderId, createManageSandboxesTool, deriveAgentResultOutcome, deriveAgentRunOutcome, exportTraceBundle, fetchTangleRouterSearchConfig, generateAttestationNonce, generateDockerfile, getSandboxEventText, agentInteractiveSessionPromptRequestDigest as interactivePromptRequestDigest, interactiveSessionIdentityDigest, isBackendRegistryInteractionKind, isToolBearingEvent, manageSandboxesInputSchema, materializeProfileFileMounts, normalizeCollaborationPath, normalizeRuntimeBackendConfig, otelTraceIdForTangleTrace, parseBackendRegistryResponse, parseBackendRegistryResponseBody, parseBackendType, parseCollaborationDocumentId, parseSSEStream, resolveSandboxResources, runTangleRouterEvalMatrixInSandbox, sandboxResourcesForSize, splitInlineProfileFileMounts, splitInlineProfileSkills, startTeeAttestationHeartbeat, toOtelJson, validateBatchRunRequest, validateDeferredProfileFileMounts };
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as parseBackendType, f as normalizeRuntimeBackendConfig, g as backendTypeSchema, h as deriveAgentRunOutcome, m as deriveAgentResultOutcome, p as createAgentRunOutcomeTracker } from "./runtime-api-B0tx7NJM.js";
|
|
2
2
|
import { a as NetworkError, c as QuotaError, d as StateError, f as TimeoutError, i as FileWriteConflictError, l as SandboxError, n as CapabilityError, o as NotFoundError, p as ValidationError, r as EgressProxyRecoveryError, s as PartialFailureError, t as AuthError, u as ServerError } from "./errors-C6kn-3zt.js";
|
|
3
|
-
import { _ as parseBackendRegistryResponseBody, a as splitInlineProfileSkills, c as SandboxFleetClient, d as backendRegistryCapabilitiesSchema, f as backendRegistryEntrySchema, g as parseBackendRegistryResponse, h as isBackendRegistryInteractionKind, i as splitInlineProfileFileMounts, l as createBatchResultAccumulator, m as backendRegistryResponseSchema, n as Sandbox, o as validateDeferredProfileFileMounts, p as backendRegistryInteractionKindSchema, r as materializeProfileFileMounts, s as SandboxFleet, t as IntelligenceClient, u as validateBatchRunRequest } from "./client-
|
|
4
|
-
import {
|
|
5
|
-
import { a as
|
|
6
|
-
import { t as
|
|
3
|
+
import { _ as parseBackendRegistryResponseBody, a as splitInlineProfileSkills, c as SandboxFleetClient, d as backendRegistryCapabilitiesSchema, f as backendRegistryEntrySchema, g as parseBackendRegistryResponse, h as isBackendRegistryInteractionKind, i as splitInlineProfileFileMounts, l as createBatchResultAccumulator, m as backendRegistryResponseSchema, n as Sandbox, o as validateDeferredProfileFileMounts, p as backendRegistryInteractionKindSchema, r as materializeProfileFileMounts, s as SandboxFleet, t as IntelligenceClient, u as validateBatchRunRequest } from "./client-BfnJ44gF.js";
|
|
4
|
+
import { a as INTERACTIVE_CONTROL_CLEANUP_TIMEOUT_MS, c as createInteractiveControlHolderId, l as interactiveSessionIdentityDigest, n as browserInteractiveControlHolderId, o as InteractiveSessionControlController, t as BrowserInteractiveSessionControlController } from "./browser-interactive-control-controller-wXQ7W5pT.js";
|
|
5
|
+
import { D as toOtelJson, E as otelTraceIdForTangleTrace, O as parseSSEStream, S as isToolBearingEvent, T as exportTraceBundle, a as WorkspaceImages, b as collectAgentResponseText, c as SandboxTaskSession, d as agentInteractiveSessionPromptRequestDigest, f as BrowserInteractiveSessionController, g as TERMINAL_WS_ECHO_SUBPROTOCOL, h as TerminalStreamError, l as SandboxSession, m as TerminalStream, o as GPU_LEASE_PROVIDER_NAMES, p as InteractiveSessionController, s as MAX_EGRESS_DENIALS_LIMIT, t as SandboxInstance, u as InteractiveSessionHandle, v as applySandboxEventText, w as buildTraceExportPayload, x as getSandboxEventText, y as collectAgentFinalMessageText } from "./sandbox-AUHcCJe1.js";
|
|
6
|
+
import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-DQD9kCdN.js";
|
|
7
|
+
import { t as TangleSandboxClient } from "./tangle-iDk_s8vt.js";
|
|
7
8
|
import { SANDBOX_SIZE_PRESET_NAMES, agentProfileConfidentialSchema, agentProfileSchema } from "@tangle-network/agent-interface";
|
|
8
9
|
import { z } from "zod";
|
|
9
10
|
//#region src/confidential.ts
|
|
@@ -1469,4 +1470,4 @@ function stripUndefined(value) {
|
|
|
1469
1470
|
return Object.fromEntries(Object.entries(value).filter(([, v]) => v !== void 0).map(([k, v]) => [k, stripUndefined(v)]));
|
|
1470
1471
|
}
|
|
1471
1472
|
//#endregion
|
|
1472
|
-
export { AuthError, CONTROL_PLANE_MCP_SERVER_NAME, CapabilityError, CollaborationClient, CollaborationFileBridge, DEFAULT_SANDBOX_SIZE, EgressProxyRecoveryError, FileWriteConflictError, GPU_LEASE_PROVIDER_NAMES, Image, ImageBuilder, IntelligenceClient, InteractiveSessionHandle, MANAGE_SANDBOXES_PARAMETERS, MANAGE_SANDBOXES_TOOL_NAME, MAX_EGRESS_DENIALS_LIMIT, NetworkError, NotFoundError, PartialFailureError, QuotaError, SANDBOX_MCP_SERVER_NAME, SANDBOX_SIZE_PRESETS, SANDBOX_SIZE_PRESET_NAMES, Sandbox, SandboxError, SandboxFleet, SandboxFleetClient, SandboxInstance, SandboxSession, SandboxTaskSession, ServerError, StateError, TERMINAL_WS_ECHO_SUBPROTOCOL, TangleSandboxClient, TerminalStream, TerminalStreamError, TimeoutError, ValidationError, WorkspaceImages, applySandboxEventText, backendRegistryCapabilitiesSchema, backendRegistryEntrySchema, backendRegistryInteractionKindSchema, backendRegistryResponseSchema, buildCollaborationDocumentId, buildControlPlaneMcpConfig, buildSandboxMcpConfig, buildTangleRouterEvalMatrixRequest, buildTangleRouterResponsesWebSearchRequest, buildTangleRouterSearchBackend, buildTangleRouterSearchProfile, buildTraceExportPayload, collectAgentFinalMessageText, collectAgentResponseText, createBatchResultAccumulator, createConfidentialSandbox, createManageSandboxesTool, exportTraceBundle, fetchTangleRouterSearchConfig, generateAttestationNonce, generateDockerfile, getSandboxEventText, isBackendRegistryInteractionKind, isToolBearingEvent, manageSandboxesInputSchema, materializeProfileFileMounts, normalizeCollaborationPath, normalizeRuntimeBackendConfig, otelTraceIdForTangleTrace, parseBackendRegistryResponse, parseBackendRegistryResponseBody, parseBackendType, parseCollaborationDocumentId, parseSSEStream, resolveSandboxResources, runTangleRouterEvalMatrixInSandbox, sandboxResourcesForSize, splitInlineProfileFileMounts, splitInlineProfileSkills, startTeeAttestationHeartbeat, toOtelJson, validateBatchRunRequest, validateDeferredProfileFileMounts };
|
|
1473
|
+
export { AuthError, BrowserInteractiveSessionControlController, BrowserInteractiveSessionController, CONTROL_PLANE_MCP_SERVER_NAME, CapabilityError, CollaborationClient, CollaborationFileBridge, DEFAULT_SANDBOX_SIZE, EgressProxyRecoveryError, FileWriteConflictError, GPU_LEASE_PROVIDER_NAMES, INTERACTIVE_CONTROL_CLEANUP_TIMEOUT_MS, Image, ImageBuilder, IntelligenceClient, InteractiveSessionControlController, InteractiveSessionController, InteractiveSessionHandle, MANAGE_SANDBOXES_PARAMETERS, MANAGE_SANDBOXES_TOOL_NAME, MAX_EGRESS_DENIALS_LIMIT, NetworkError, NotFoundError, PartialFailureError, QuotaError, SANDBOX_MCP_SERVER_NAME, SANDBOX_SIZE_PRESETS, SANDBOX_SIZE_PRESET_NAMES, Sandbox, SandboxError, SandboxFleet, SandboxFleetClient, SandboxInstance, SandboxSession, SandboxTaskSession, ServerError, StateError, TERMINAL_WS_ECHO_SUBPROTOCOL, TangleSandboxClient, TerminalStream, TerminalStreamError, TimeoutError, ValidationError, WorkspaceImages, applySandboxEventText, backendRegistryCapabilitiesSchema, backendRegistryEntrySchema, backendRegistryInteractionKindSchema, backendRegistryResponseSchema, browserInteractiveControlHolderId, buildCollaborationDocumentId, buildControlPlaneMcpConfig, buildSandboxMcpConfig, buildTangleRouterEvalMatrixRequest, buildTangleRouterResponsesWebSearchRequest, buildTangleRouterSearchBackend, buildTangleRouterSearchProfile, buildTraceExportPayload, collectAgentFinalMessageText, collectAgentResponseText, createAgentRunOutcomeTracker, createBatchResultAccumulator, createConfidentialSandbox, createInteractiveControlHolderId, createManageSandboxesTool, deriveAgentResultOutcome, deriveAgentRunOutcome, exportTraceBundle, fetchTangleRouterSearchConfig, generateAttestationNonce, generateDockerfile, getSandboxEventText, agentInteractiveSessionPromptRequestDigest as interactivePromptRequestDigest, interactiveSessionIdentityDigest, isBackendRegistryInteractionKind, isToolBearingEvent, manageSandboxesInputSchema, materializeProfileFileMounts, normalizeCollaborationPath, normalizeRuntimeBackendConfig, otelTraceIdForTangleTrace, parseBackendRegistryResponse, parseBackendRegistryResponseBody, parseBackendType, parseCollaborationDocumentId, parseSSEStream, resolveSandboxResources, runTangleRouterEvalMatrixInSandbox, sandboxResourcesForSize, splitInlineProfileFileMounts, splitInlineProfileSkills, startTeeAttestationHeartbeat, toOtelJson, validateBatchRunRequest, validateDeferredProfileFileMounts };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { c as InteractiveSessionIdentity, n as BrowserInteractiveSessionControlControllerOptions, r as browserInteractiveControlHolderId, t as BrowserInteractiveSessionControlController } from "./browser-interactive-control-controller-B476gcui.js";
|
|
2
|
+
export { BrowserInteractiveSessionControlController, type BrowserInteractiveSessionControlControllerOptions, type InteractiveSessionIdentity, browserInteractiveControlHolderId };
|
package/dist/openai/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Response, ResponseCreateParamsBase, ResponseOutputItem, ResponseStreamEvent, ResponseUsage } from "openai/resources/responses/responses";
|
|
1
|
+
import { Response, ResponseCreateParamsBase, ResponseError, ResponseOutputItem, ResponseStreamEvent, ResponseUsage } from "openai/resources/responses/responses";
|
|
2
2
|
import { ChatCompletionChunk, ChatCompletionMessageParam, ChatCompletionTool } from "openai/resources/chat/completions/completions";
|
|
3
3
|
import { Completion } from "openai/resources/completions";
|
|
4
4
|
import { EmbeddingCreateParams } from "openai/resources/embeddings";
|
|
@@ -340,6 +340,27 @@ interface BufferedToolCall {
|
|
|
340
340
|
*/
|
|
341
341
|
declare function createTranslatorContext(init: Pick<TranslatorContext, "runId" | "modelId"> & Partial<TranslatorContext>): TranslatorContext;
|
|
342
342
|
//#endregion
|
|
343
|
+
//#region src/openai/terminal.d.ts
|
|
344
|
+
type OpenAITerminal = {
|
|
345
|
+
status: "completed";
|
|
346
|
+
error: null;
|
|
347
|
+
} | {
|
|
348
|
+
status: "failed";
|
|
349
|
+
error: ResponseError;
|
|
350
|
+
reason: string;
|
|
351
|
+
};
|
|
352
|
+
/**
|
|
353
|
+
* Classify one top-level OpenAI-adapter event.
|
|
354
|
+
*
|
|
355
|
+
* `TangleSSEEvent` is not the nested `SandboxEvent` protocol. This function
|
|
356
|
+
* reads only fields on the supplied event itself.
|
|
357
|
+
*/
|
|
358
|
+
declare function classifyOpenAITerminal(event: TangleSSEEvent): OpenAITerminal | null;
|
|
359
|
+
/**
|
|
360
|
+
* Classify a complete collected stream. Any failure takes precedence.
|
|
361
|
+
*/
|
|
362
|
+
declare function classifyOpenAITerminalEvents(events: TangleSSEEvent[]): OpenAITerminal | null;
|
|
363
|
+
//#endregion
|
|
343
364
|
//#region src/openai/translate/responses.d.ts
|
|
344
365
|
/**
|
|
345
366
|
* Persistence interface for `previous_response_id` chains. The route layer
|
|
@@ -419,6 +440,7 @@ declare function buildResponseShell(args: {
|
|
|
419
440
|
usage: ResponseUsage;
|
|
420
441
|
instructions?: string | null;
|
|
421
442
|
previousResponseId?: string | null;
|
|
443
|
+
terminal?: OpenAITerminal | null;
|
|
422
444
|
}): Response;
|
|
423
445
|
//#endregion
|
|
424
446
|
//#region src/openai/responses-store.d.ts
|
|
@@ -654,4 +676,4 @@ declare function outcomeToFinishReason(outcome: string, hasToolCall: boolean): O
|
|
|
654
676
|
*/
|
|
655
677
|
declare function openaiMessagesToSandboxInput(messages: ChatCompletionMessageParam[], tools: ChatCompletionTool[] | undefined, model: string): SandboxRunInput;
|
|
656
678
|
//#endregion
|
|
657
|
-
export { type ActionRateLimitOptions, type AfterHookOutcome, type AuditEvent, type AuditLogOptions, type BeforeHookOutcome, type BufferedToolCall, type CostCapOptions, type DestructiveActionGuardOptions, type EgressPolicyOptions, EmbeddingValidationError, HookChain, type HookSurface, InMemoryResponseStore, type MultimodalPart, type NormalizedEmbeddingInput, type NormalizedEmbeddingRequest, type OpenAIFinishReason, type PriorToolCall, type PriorToolResult, type PriorTurn, type RedactionRegion, type ResponseStore, ResponsesValidationError, Run, type RunEvent, type RunEventSource, type RunOptions, type RunStatus, type SandboxRunInput, type SandboxToolSpec, type ScreenshotRedactionOptions, type TangleRouterResponsesWebSearchOptions, type TangleSSEEvent, type ToolCallContext, type ToolOutput, type ToolResult, type TranslatorContext, actionRateLimitHook, assembleResponseOutput, auditLogHook, buildResponseShell, costCapHook, createTranslatorContext, destructiveActionGuardHook, egressPolicyHook, normalizeResponsesWebSearchForTangleRouter, openaiMessagesToSandboxInput, outcomeToFinishReason, resolvePreviousResponseId, runEvents, sandboxEventToChatChunk, sandboxEventToCompletionChunk, sandboxEventToResponsesEvent, screenshotRedactionHook, usageFromEvents, validateEmbeddingRequest, validateResponsesRequest };
|
|
679
|
+
export { type ActionRateLimitOptions, type AfterHookOutcome, type AuditEvent, type AuditLogOptions, type BeforeHookOutcome, type BufferedToolCall, type CostCapOptions, type DestructiveActionGuardOptions, type EgressPolicyOptions, EmbeddingValidationError, HookChain, type HookSurface, InMemoryResponseStore, type MultimodalPart, type NormalizedEmbeddingInput, type NormalizedEmbeddingRequest, type OpenAIFinishReason, type OpenAITerminal, type PriorToolCall, type PriorToolResult, type PriorTurn, type RedactionRegion, type ResponseStore, ResponsesValidationError, Run, type RunEvent, type RunEventSource, type RunOptions, type RunStatus, type SandboxRunInput, type SandboxToolSpec, type ScreenshotRedactionOptions, type TangleRouterResponsesWebSearchOptions, type TangleSSEEvent, type ToolCallContext, type ToolOutput, type ToolResult, type TranslatorContext, actionRateLimitHook, assembleResponseOutput, auditLogHook, buildResponseShell, classifyOpenAITerminal, classifyOpenAITerminalEvents, costCapHook, createTranslatorContext, destructiveActionGuardHook, egressPolicyHook, normalizeResponsesWebSearchForTangleRouter, openaiMessagesToSandboxInput, outcomeToFinishReason, resolvePreviousResponseId, runEvents, sandboxEventToChatChunk, sandboxEventToCompletionChunk, sandboxEventToResponsesEvent, screenshotRedactionHook, usageFromEvents, validateEmbeddingRequest, validateResponsesRequest };
|
package/dist/openai/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
1
2
|
//#region src/openai/hooks.ts
|
|
2
3
|
/**
|
|
3
4
|
* Sequential hook composer. Hooks run in registration order; `block` and
|
|
@@ -379,6 +380,101 @@ var InMemoryResponseStore = class {
|
|
|
379
380
|
}
|
|
380
381
|
};
|
|
381
382
|
//#endregion
|
|
383
|
+
//#region src/openai/terminal.ts
|
|
384
|
+
const SUCCESS_OUTCOMES = new Set([
|
|
385
|
+
"success",
|
|
386
|
+
"succeeded",
|
|
387
|
+
"completed",
|
|
388
|
+
"done"
|
|
389
|
+
]);
|
|
390
|
+
const ResponseErrorCodeSchema = z.enum([
|
|
391
|
+
"empty_image_file",
|
|
392
|
+
"failed_to_download_image",
|
|
393
|
+
"image_content_policy_violation",
|
|
394
|
+
"image_file_not_found",
|
|
395
|
+
"image_file_too_large",
|
|
396
|
+
"image_parse_error",
|
|
397
|
+
"image_too_large",
|
|
398
|
+
"image_too_small",
|
|
399
|
+
"invalid_base64_image",
|
|
400
|
+
"invalid_image",
|
|
401
|
+
"invalid_image_format",
|
|
402
|
+
"invalid_image_mode",
|
|
403
|
+
"invalid_image_url",
|
|
404
|
+
"invalid_prompt",
|
|
405
|
+
"rate_limit_exceeded",
|
|
406
|
+
"server_error",
|
|
407
|
+
"unsupported_image_media_type",
|
|
408
|
+
"vector_store_timeout"
|
|
409
|
+
]);
|
|
410
|
+
const OPENAI_MISSING_TERMINAL_REASON = "stream ended without a terminal event";
|
|
411
|
+
const OPENAI_MALFORMED_TERMINAL_REASON = "malformed terminal event";
|
|
412
|
+
const OpenAITerminalEventSchema = z.object({
|
|
413
|
+
type: z.enum(["done", "error"]),
|
|
414
|
+
outcome: z.string().optional(),
|
|
415
|
+
status: z.string().optional(),
|
|
416
|
+
success: z.boolean().optional(),
|
|
417
|
+
error: z.string().optional(),
|
|
418
|
+
message: z.string().optional()
|
|
419
|
+
}).passthrough();
|
|
420
|
+
function responseError(reason) {
|
|
421
|
+
const normalized = reason.trim().toLowerCase().replace(/[\s-]+/g, "_");
|
|
422
|
+
const parsedCode = ResponseErrorCodeSchema.safeParse(normalized);
|
|
423
|
+
return {
|
|
424
|
+
code: parsedCode.success ? parsedCode.data : normalized === "rate_limit" || normalized === "rate_limited" ? "rate_limit_exceeded" : normalized === "invalid_prompt_format" ? "invalid_prompt" : "server_error",
|
|
425
|
+
message: reason
|
|
426
|
+
};
|
|
427
|
+
}
|
|
428
|
+
function failure(reason) {
|
|
429
|
+
return {
|
|
430
|
+
status: "failed",
|
|
431
|
+
error: responseError(reason),
|
|
432
|
+
reason
|
|
433
|
+
};
|
|
434
|
+
}
|
|
435
|
+
function terminalOutcome(event) {
|
|
436
|
+
if (event.outcome?.trim()) return event.outcome.trim().toLowerCase();
|
|
437
|
+
if (event.status?.trim()) return event.status.trim().toLowerCase();
|
|
438
|
+
if (event.success === false) return "failure";
|
|
439
|
+
return "success";
|
|
440
|
+
}
|
|
441
|
+
function terminalReason(event, fallback) {
|
|
442
|
+
if (event.error && event.error.length > 0) return event.error;
|
|
443
|
+
if (event.message && event.message.length > 0) return event.message;
|
|
444
|
+
return fallback;
|
|
445
|
+
}
|
|
446
|
+
/**
|
|
447
|
+
* Classify one top-level OpenAI-adapter event.
|
|
448
|
+
*
|
|
449
|
+
* `TangleSSEEvent` is not the nested `SandboxEvent` protocol. This function
|
|
450
|
+
* reads only fields on the supplied event itself.
|
|
451
|
+
*/
|
|
452
|
+
function classifyOpenAITerminal(event) {
|
|
453
|
+
if (event.type !== "done" && event.type !== "error") return null;
|
|
454
|
+
const parsed = OpenAITerminalEventSchema.safeParse(event);
|
|
455
|
+
if (!parsed.success) return failure(OPENAI_MALFORMED_TERMINAL_REASON);
|
|
456
|
+
if (parsed.data.type === "done") {
|
|
457
|
+
const outcome = terminalOutcome(parsed.data);
|
|
458
|
+
return SUCCESS_OUTCOMES.has(outcome) ? {
|
|
459
|
+
status: "completed",
|
|
460
|
+
error: null
|
|
461
|
+
} : failure(terminalReason(parsed.data, outcome));
|
|
462
|
+
}
|
|
463
|
+
return failure(terminalReason(parsed.data, "stream error"));
|
|
464
|
+
}
|
|
465
|
+
/**
|
|
466
|
+
* Classify a complete collected stream. Any failure takes precedence.
|
|
467
|
+
*/
|
|
468
|
+
function classifyOpenAITerminalEvents(events) {
|
|
469
|
+
let terminal = null;
|
|
470
|
+
for (const event of events) {
|
|
471
|
+
const current = classifyOpenAITerminal(event);
|
|
472
|
+
if (!current) continue;
|
|
473
|
+
if (current.status === "failed" || terminal === null) terminal = current;
|
|
474
|
+
}
|
|
475
|
+
return terminal;
|
|
476
|
+
}
|
|
477
|
+
//#endregion
|
|
382
478
|
//#region src/openai/runs.ts
|
|
383
479
|
const TERMINAL_STATUSES = new Set([
|
|
384
480
|
"completed",
|
|
@@ -425,21 +521,6 @@ function readToolCallFromFrame(event) {
|
|
|
425
521
|
requiresAction: false
|
|
426
522
|
};
|
|
427
523
|
}
|
|
428
|
-
function readTerminal(event) {
|
|
429
|
-
if (event.type === "done") {
|
|
430
|
-
const outcome = typeof event.outcome === "string" && event.outcome || "success";
|
|
431
|
-
if (outcome === "success" || outcome === "completed" || outcome === "succeeded" || outcome === "done") return { status: "completed" };
|
|
432
|
-
return {
|
|
433
|
-
status: "failed",
|
|
434
|
-
reason: typeof event.error === "string" ? event.error : outcome
|
|
435
|
-
};
|
|
436
|
-
}
|
|
437
|
-
if (event.type === "error") return {
|
|
438
|
-
status: "failed",
|
|
439
|
-
reason: typeof event.message === "string" && event.message || typeof event.error === "string" && event.error || "stream error"
|
|
440
|
-
};
|
|
441
|
-
return null;
|
|
442
|
-
}
|
|
443
524
|
/**
|
|
444
525
|
* Internal queue helper: an async iterable backed by a bounded
|
|
445
526
|
* pending-list with a settle promise that resolves whenever a new
|
|
@@ -649,7 +730,7 @@ var Run = class {
|
|
|
649
730
|
if (handled === "requires_action") return;
|
|
650
731
|
continue;
|
|
651
732
|
}
|
|
652
|
-
const terminal =
|
|
733
|
+
const terminal = classifyOpenAITerminal(event);
|
|
653
734
|
if (terminal) {
|
|
654
735
|
if (terminal.status === "completed") {
|
|
655
736
|
this.transition("completed");
|
|
@@ -658,7 +739,7 @@ var Run = class {
|
|
|
658
739
|
this.transition("failed");
|
|
659
740
|
this.queue.push({
|
|
660
741
|
type: "failed",
|
|
661
|
-
reason: terminal.reason
|
|
742
|
+
reason: terminal.reason
|
|
662
743
|
});
|
|
663
744
|
}
|
|
664
745
|
this.queue.close();
|
|
@@ -666,8 +747,11 @@ var Run = class {
|
|
|
666
747
|
}
|
|
667
748
|
}
|
|
668
749
|
if (!isTerminal(this._status)) {
|
|
669
|
-
this.transition("
|
|
670
|
-
this.queue.push({
|
|
750
|
+
this.transition("failed");
|
|
751
|
+
this.queue.push({
|
|
752
|
+
type: "failed",
|
|
753
|
+
reason: OPENAI_MISSING_TERMINAL_REASON
|
|
754
|
+
});
|
|
671
755
|
this.queue.close();
|
|
672
756
|
}
|
|
673
757
|
} catch (err) {
|
|
@@ -1038,6 +1122,43 @@ function usageFromTokens(usage) {
|
|
|
1038
1122
|
output_tokens_details: { reasoning_tokens: 0 }
|
|
1039
1123
|
};
|
|
1040
1124
|
}
|
|
1125
|
+
function terminalResponse(event, ctx, terminal) {
|
|
1126
|
+
const tokens = event.type === "done" ? readUsage(event) : null;
|
|
1127
|
+
return {
|
|
1128
|
+
id: ctx.runId,
|
|
1129
|
+
object: "response",
|
|
1130
|
+
created_at: ctx.createdAt,
|
|
1131
|
+
output_text: "",
|
|
1132
|
+
error: terminal.error,
|
|
1133
|
+
incomplete_details: null,
|
|
1134
|
+
instructions: null,
|
|
1135
|
+
metadata: null,
|
|
1136
|
+
model: ctx.modelId,
|
|
1137
|
+
output: [],
|
|
1138
|
+
parallel_tool_calls: false,
|
|
1139
|
+
temperature: null,
|
|
1140
|
+
tool_choice: "auto",
|
|
1141
|
+
tools: [],
|
|
1142
|
+
top_p: null,
|
|
1143
|
+
status: terminal.status,
|
|
1144
|
+
usage: tokens ? usageFromTokens(tokens) : emptyResponseUsage()
|
|
1145
|
+
};
|
|
1146
|
+
}
|
|
1147
|
+
function terminalResponseEvent(event, ctx, extras) {
|
|
1148
|
+
const terminal = classifyOpenAITerminal(event);
|
|
1149
|
+
if (!terminal) return null;
|
|
1150
|
+
const response = terminalResponse(event, ctx, terminal);
|
|
1151
|
+
if (terminal.status === "failed") return {
|
|
1152
|
+
type: "response.failed",
|
|
1153
|
+
sequence_number: nextSeq(extras),
|
|
1154
|
+
response
|
|
1155
|
+
};
|
|
1156
|
+
return {
|
|
1157
|
+
type: "response.completed",
|
|
1158
|
+
sequence_number: nextSeq(extras),
|
|
1159
|
+
response
|
|
1160
|
+
};
|
|
1161
|
+
}
|
|
1041
1162
|
function sandboxEventToResponsesEvent(event, ctx) {
|
|
1042
1163
|
const extras = getResponsesExtras(ctx);
|
|
1043
1164
|
switch (event.type) {
|
|
@@ -1089,48 +1210,8 @@ function sandboxEventToResponsesEvent(event, ctx) {
|
|
|
1089
1210
|
sequence_number: nextSeq(extras)
|
|
1090
1211
|
};
|
|
1091
1212
|
}
|
|
1092
|
-
case "error":
|
|
1093
|
-
|
|
1094
|
-
return {
|
|
1095
|
-
type: "response.output_item.done",
|
|
1096
|
-
item: {
|
|
1097
|
-
type: "message",
|
|
1098
|
-
id: `msg_${ctx.runId}`,
|
|
1099
|
-
role: "assistant",
|
|
1100
|
-
status: "incomplete",
|
|
1101
|
-
content: []
|
|
1102
|
-
},
|
|
1103
|
-
output_index: outputIndex,
|
|
1104
|
-
sequence_number: nextSeq(extras)
|
|
1105
|
-
};
|
|
1106
|
-
}
|
|
1107
|
-
case "done": {
|
|
1108
|
-
const tokens = readUsage(event);
|
|
1109
|
-
const usage = tokens ? usageFromTokens(tokens) : emptyResponseUsage();
|
|
1110
|
-
return {
|
|
1111
|
-
type: "response.completed",
|
|
1112
|
-
sequence_number: nextSeq(extras),
|
|
1113
|
-
response: {
|
|
1114
|
-
id: ctx.runId,
|
|
1115
|
-
object: "response",
|
|
1116
|
-
created_at: ctx.createdAt,
|
|
1117
|
-
output_text: "",
|
|
1118
|
-
error: null,
|
|
1119
|
-
incomplete_details: null,
|
|
1120
|
-
instructions: null,
|
|
1121
|
-
metadata: null,
|
|
1122
|
-
model: ctx.modelId,
|
|
1123
|
-
output: [],
|
|
1124
|
-
parallel_tool_calls: false,
|
|
1125
|
-
temperature: null,
|
|
1126
|
-
tool_choice: "auto",
|
|
1127
|
-
tools: [],
|
|
1128
|
-
top_p: null,
|
|
1129
|
-
status: "completed",
|
|
1130
|
-
usage
|
|
1131
|
-
}
|
|
1132
|
-
};
|
|
1133
|
-
}
|
|
1213
|
+
case "error":
|
|
1214
|
+
case "done": return terminalResponseEvent(event, ctx, extras);
|
|
1134
1215
|
default: return null;
|
|
1135
1216
|
}
|
|
1136
1217
|
}
|
|
@@ -1705,11 +1786,10 @@ function normalizeResponsesWebSearchForTangleRouter(req, options = {}) {
|
|
|
1705
1786
|
} : req;
|
|
1706
1787
|
}
|
|
1707
1788
|
function readNativeWebSearchParameters(tool) {
|
|
1708
|
-
const input = tool;
|
|
1709
1789
|
const result = {};
|
|
1710
|
-
const searchContextSize =
|
|
1790
|
+
const searchContextSize = ("search_context_size" in tool ? tool.search_context_size : void 0) ?? ("searchContextSize" in tool ? tool.searchContextSize : void 0);
|
|
1711
1791
|
if (searchContextSize === "low" || searchContextSize === "medium" || searchContextSize === "high") result.search_context_size = searchContextSize;
|
|
1712
|
-
const userLocation =
|
|
1792
|
+
const userLocation = ("user_location" in tool ? tool.user_location : void 0) ?? ("userLocation" in tool ? tool.userLocation : void 0);
|
|
1713
1793
|
if (userLocation && typeof userLocation === "object") result.user_location = userLocation;
|
|
1714
1794
|
return result;
|
|
1715
1795
|
}
|
|
@@ -1726,7 +1806,7 @@ function buildResponseShell(args) {
|
|
|
1726
1806
|
object: "response",
|
|
1727
1807
|
created_at: args.createdAt,
|
|
1728
1808
|
output_text: outputText,
|
|
1729
|
-
error: null,
|
|
1809
|
+
error: args.terminal?.error ?? null,
|
|
1730
1810
|
incomplete_details: null,
|
|
1731
1811
|
instructions: args.instructions ?? null,
|
|
1732
1812
|
metadata: null,
|
|
@@ -1737,7 +1817,7 @@ function buildResponseShell(args) {
|
|
|
1737
1817
|
tool_choice: "auto",
|
|
1738
1818
|
tools: [],
|
|
1739
1819
|
top_p: null,
|
|
1740
|
-
status: "completed",
|
|
1820
|
+
status: args.terminal?.status ?? "completed",
|
|
1741
1821
|
usage: args.usage,
|
|
1742
1822
|
previous_response_id: args.previousResponseId ?? null
|
|
1743
1823
|
};
|
|
@@ -1757,4 +1837,4 @@ function createTranslatorContext(init) {
|
|
|
1757
1837
|
};
|
|
1758
1838
|
}
|
|
1759
1839
|
//#endregion
|
|
1760
|
-
export { EmbeddingValidationError, HookChain, InMemoryResponseStore, ResponsesValidationError, Run, actionRateLimitHook, assembleResponseOutput, auditLogHook, buildResponseShell, costCapHook, createTranslatorContext, destructiveActionGuardHook, egressPolicyHook, normalizeResponsesWebSearchForTangleRouter, openaiMessagesToSandboxInput, outcomeToFinishReason, resolvePreviousResponseId, runEvents, sandboxEventToChatChunk, sandboxEventToCompletionChunk, sandboxEventToResponsesEvent, screenshotRedactionHook, usageFromEvents, validateEmbeddingRequest, validateResponsesRequest };
|
|
1840
|
+
export { EmbeddingValidationError, HookChain, InMemoryResponseStore, ResponsesValidationError, Run, actionRateLimitHook, assembleResponseOutput, auditLogHook, buildResponseShell, classifyOpenAITerminal, classifyOpenAITerminalEvents, costCapHook, createTranslatorContext, destructiveActionGuardHook, egressPolicyHook, normalizeResponsesWebSearchForTangleRouter, openaiMessagesToSandboxInput, outcomeToFinishReason, resolvePreviousResponseId, runEvents, sandboxEventToChatChunk, sandboxEventToCompletionChunk, sandboxEventToResponsesEvent, screenshotRedactionHook, usageFromEvents, validateEmbeddingRequest, validateResponsesRequest };
|