@tangle-network/sandbox 0.63.23 → 0.64.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/index.d.ts +4 -4
- package/dist/agent/index.js +3 -3
- package/dist/agent/preview.d.ts +1 -1
- package/dist/{agent-run-outcome-C-VR-L0I.d.ts → agent-run-outcome-LUFfTBdK.d.ts} +1 -1
- package/dist/auth/index.js +1 -1
- package/dist/{backend-types-zuUBEJO1.js → backend-types-CLvdSX8V.js} +7 -1
- package/dist/{cli-auth-bundle-R0Y7rngn.js → cli-auth-bundle-BYvVrIso.js} +1 -1
- package/dist/{client-CqpKC6n3.d.ts → client-BW5mWBxb.d.ts} +14 -4
- package/dist/{client-CGcWP4FX.js → client-Dum1731g.js} +6 -6
- package/dist/core.d.ts +5 -5
- package/dist/core.js +2 -2
- package/dist/{direct-http2-CoGVOqVR.js → direct-http2-Dar5erTH.js} +4 -2
- package/dist/{index-D4OBUP5M.d.ts → index-CfoLKgFq.d.ts} +5 -72
- package/dist/index.d.ts +8 -8
- package/dist/index.js +6 -5
- package/dist/{interactive-controller-BBwB_5QQ.d.ts → interactive-controller-IF4mRCDS.d.ts} +1 -1
- package/dist/{interactive-controller-D4N4zqmu.js → interactive-controller-OAsASPd_.js} +1 -1
- package/dist/{keep-alive-fetch-CuwGi7gz.js → keep-alive-fetch-BBzJDWyt.js} +5 -2
- package/dist/{lines-5m11CEj-.d.ts → lines-8zW13eqa.d.ts} +1 -1
- package/dist/lines.d.ts +1 -1
- package/dist/{local-cli-auth-DVUBOY4y.js → local-cli-auth-XgKy2zsU.js} +1 -1
- package/dist/{preview-CcJBQSjB.d.ts → preview-DngLxMGP.d.ts} +3 -3
- package/dist/{public-templates-nv4AFFVc.d.ts → public-templates-BJGUN0AS.d.ts} +1 -1
- package/dist/public-templates.d.ts +1 -1
- package/dist/runtime.d.ts +3 -3
- package/dist/runtime.js +1 -1
- package/dist/{sandbox-BDgvO9Z3.js → sandbox-bXjId_Sc.js} +7 -202
- package/dist/tangle/index.d.ts +1 -1
- package/dist/tangle/index.js +1 -1
- package/dist/{tangle-D-VfQGTu.js → tangle-BpKM5etV.js} +1 -1
- package/dist/{types-BjyQe_CI.d.ts → types-BulbFMYO.d.ts} +62 -182
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
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-
|
|
1
|
+
import { i as isolationPrincipalSchema, o as parseBackendType, r as backendTypeSchema, t as ALL_BACKEND_TYPES } from "./backend-types-CLvdSX8V.js";
|
|
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-Dum1731g.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-bXjId_Sc.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-BpKM5etV.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
|
|
@@ -680,6 +680,7 @@ const backendSchema = z.strictObject({
|
|
|
680
680
|
metadata: z.strictObject({
|
|
681
681
|
containerType: nonEmptyStringSchema.optional(),
|
|
682
682
|
profileSecretIsolation: z.literal(true).optional(),
|
|
683
|
+
isolationPrincipal: isolationPrincipalSchema.optional(),
|
|
683
684
|
traceAttributes: envSchema.optional()
|
|
684
685
|
}).optional()
|
|
685
686
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { o as TerminalStreamReconnectAuthority, u as ScopedToken } from "./terminal-stream-types-ClZCArRg.js";
|
|
2
|
-
import {
|
|
2
|
+
import { rr as TerminalStream } from "./types-BulbFMYO.js";
|
|
3
3
|
import { a as InteractiveSessionControlController, c as InteractiveSessionIdentity, f as InteractiveAttachOptions, h as InteractiveRequestOptions, n as BrowserInteractiveSessionControlControllerOptions, o as InteractiveSessionControlControllerOptions, s as InteractiveSessionControlTransport } from "./browser-interactive-control-controller-CvObO_Kf.js";
|
|
4
4
|
import { AgentInteractiveSessionRef } from "@tangle-network/agent-interface";
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as normalizeEffectiveBackend, r as backendTypeSchema } from "./backend-types-CLvdSX8V.js";
|
|
2
2
|
import { T as ValidationError, b as SandboxError, m as NetworkError, r as parseResponseError, s as CapabilityError, t as TerminalStreamError, x as ServerError } from "./errors-BfbOP_rx.js";
|
|
3
3
|
import { c as assertInteractiveSessionRef, d as awaitWithAbort, f as combineAbortSignals, i as createBrowserInteractiveSessionControlTransport, o as InteractiveSessionControlController, r as browserInteractiveTerminalEndpoint } from "./browser-interactive-control-controller-DHx53yre.js";
|
|
4
4
|
import { s as uploadChunked } from "./chunked-upload-DN2twsUu.js";
|
|
@@ -225,15 +225,18 @@ async function fetchWithKeepAlive(url, init, options) {
|
|
|
225
225
|
const report = () => {
|
|
226
226
|
const phases = capture ? phasesOf(capture) : void 0;
|
|
227
227
|
const socket = phases ? capture?.marks ? "new" : "reused" : void 0;
|
|
228
|
+
const endedAt = capture?.doneAt ?? capture?.headersAt ?? performance.now();
|
|
229
|
+
const serverTiming = response.headers.get("server-timing");
|
|
228
230
|
emitTiming(hook, {
|
|
229
231
|
name: "sdk.request",
|
|
230
|
-
durMs: ms(
|
|
232
|
+
durMs: ms(endedAt - startedAt),
|
|
231
233
|
desc: socket ? `socket=${socket}` : "",
|
|
232
234
|
method,
|
|
233
235
|
path: options.path,
|
|
234
236
|
status: response.status,
|
|
235
237
|
...socket ? { socket } : {},
|
|
236
|
-
...phases ? { phases } : {}
|
|
238
|
+
...phases ? { phases } : {},
|
|
239
|
+
...serverTiming ? { serverTiming } : {}
|
|
237
240
|
});
|
|
238
241
|
};
|
|
239
242
|
if (capture?.request && finished) finished.then(report);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Sa as BackendConfig, ar as CreateSandboxOptions } from "./types-BulbFMYO.js";
|
|
2
2
|
|
|
3
3
|
//#region src/line-application.d.ts
|
|
4
4
|
/** Bounded callback request bytes after canonicalization, including JSON framing. */
|
package/dist/lines.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as LineRespondAgent, B as LineVoiceOptions, C as LineMessage, D as LineReplyCode, E as LineReminderPreferences, F as LineSenderVerification, I as LineSenderVerificationStart, L as LineThread, M as LineRole, N as LineSendInput, O as LineReplyCodeInput, P as LineSendReceipt, R as LineTransport, S as LineMemberSpec, T as LineProvider, V as LinesHttpClient, _ 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, 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-
|
|
1
|
+
import { A as LineRespondAgent, B as LineVoiceOptions, C as LineMessage, D as LineReplyCode, E as LineReminderPreferences, F as LineSenderVerification, I as LineSenderVerificationStart, L as LineThread, M as LineRole, N as LineSendInput, O as LineReplyCodeInput, P as LineSendReceipt, R as LineTransport, S as LineMemberSpec, T as LineProvider, V as LinesHttpClient, _ 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, 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-8zW13eqa.js";
|
|
2
2
|
export { Line, LineAgentRolePolicy, LineAllowance, LineAllowanceSubject, LineApplicationAttachOptions, LineAttachOptions, LineAttachment, LineAttachmentReauthorization, LineExecutionKey, LineFromConnectionInput, LineImage, LineInstanceAttachOptions, LineInstanceCreate, LineLimits, LineMember, LineMemberInstance, LineMemberPatch, LineMemberSpec, LineMessage, LineNumberInventory, LineProvider, LineReminderPreferences, LineReplyCode, LineReplyCodeInput, LineReplyGate, LineRespondAgent, LineRespondView, LineRole, LineSendInput, LineSendReceipt, LineSenderVerification, LineSenderVerificationStart, LineThread, LineTransport, LineVoice, LineVoiceOptions, LinesClient, LinesHttpClient, SandboxLines, lineInstanceKey, profileChannelReference };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as AUTH_BUNDLE_PATHS } from "./cli-auth-bundle-
|
|
1
|
+
import { t as AUTH_BUNDLE_PATHS } from "./cli-auth-bundle-BYvVrIso.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-
|
|
2
|
-
import {
|
|
3
|
-
import { t as Sandbox } from "./client-
|
|
1
|
+
import { O as SandboxInstance } from "./index-CfoLKgFq.js";
|
|
2
|
+
import { F as EnsureDevServerOptions, H as PreviewLinkInfo } from "./types-BulbFMYO.js";
|
|
3
|
+
import { t as Sandbox } from "./client-BW5mWBxb.js";
|
|
4
4
|
|
|
5
5
|
//#region src/agent/preview-operations.d.ts
|
|
6
6
|
type AgentPreviewOptions = Pick<EnsureDevServerOptions, "sessionId" | "cwd"> & {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { F as SandboxError } from "./terminal-stream-types-ClZCArRg.js";
|
|
2
|
-
import {
|
|
2
|
+
import { Pi as HttpClient, ai as PublishPublicTemplateVersionOptions, ii as PublishPublicTemplateOptions, ni as PublicTemplateInfo, ri as PublicTemplateVersionInfo } from "./types-BulbFMYO.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
|
|
5
5
|
//#region src/public-templates.d.ts
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as PublicTemplatesClient, i as PublicTemplatePublishRequestOptions, n as PublicTemplatePublishError, r as PublicTemplatePublishJob, t as PublicTemplatePublishArtifact } from "./public-templates-
|
|
1
|
+
import { a as PublicTemplatesClient, i as PublicTemplatePublishRequestOptions, n as PublicTemplatePublishError, r as PublicTemplatePublishJob, t as PublicTemplatePublishArtifact } from "./public-templates-BJGUN0AS.js";
|
|
2
2
|
export { PublicTemplatePublishArtifact, PublicTemplatePublishError, PublicTemplatePublishJob, PublicTemplatePublishRequestOptions, PublicTemplatesClient };
|
package/dist/runtime.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
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, u as ScopedToken, z as StateError } from "./terminal-stream-types-ClZCArRg.js";
|
|
2
|
-
import {
|
|
2
|
+
import { Bn as SandboxPortBinding, Br as FileTreeResult, Ct as SessionMessageAdmission, Dt as TaskSessionCommitResult, Er as ChunkedUploadResult, Et as TaskSessionChanges, Gn as SandboxTerminalCreateOptions, Hr as FileUsageResult, Ir as FileRenameResult, Jn as SandboxTerminalRequestOptions, Jr as UploadProgress, Kn as SandboxTerminalInfo, Kr as RenameOptions, Mr as FileReadBatchOptions, Nr as FileReadBatchResult, Q as CommitTaskSessionOptions, St as SessionMessage, Tr as ChunkedUploadOptions, Un as SandboxRuntimeHealth, Ur as FileWriteResult, Vr as FileUsageOptions, Yr as WriteFileOptions, ct as ListMessagesOptions, dt as SendSessionMessageRequest, ft as SentSessionMessage, gt as SessionExecutionStatus, ht as SessionExecutionInfo, it as CreateTaskSessionOptions, kt as TaskSessionInfo, mt as SessionEventStreamOptions, pa as SandboxEvent, qn as SandboxTerminalManager, rr as TerminalStream, rt as CreateSessionOptions, ut as SendSessionMessageOptions, yt as SessionInfo, zr as FileTreeOptions } from "./types-BulbFMYO.js";
|
|
3
3
|
import { c as InteractiveSessionIdentity, l as InteractiveSessionNotRunningError, r as browserInteractiveControlHolderId } from "./browser-interactive-control-controller-CvObO_Kf.js";
|
|
4
|
-
import { t as BrowserInteractiveSessionController } from "./interactive-controller-
|
|
5
|
-
import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, o as projectAgentTerminalRecord, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-
|
|
4
|
+
import { t as BrowserInteractiveSessionController } from "./interactive-controller-IF4mRCDS.js";
|
|
5
|
+
import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, o as projectAgentTerminalRecord, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-LUFfTBdK.js";
|
|
6
6
|
|
|
7
7
|
//#region src/lib/chunked-upload.d.ts
|
|
8
8
|
/** The transport a caller wires this module to — {@link SandboxInstance.runtimeFetch}
|
package/dist/runtime.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as createAgentRunOutcomeTracker, L as deriveAgentResultOutcome, R as deriveAgentRunOutcome, c as SandboxRuntimeApi, t as BrowserInteractiveSessionController, z as projectAgentTerminalRecord } from "./interactive-controller-
|
|
1
|
+
import { I as createAgentRunOutcomeTracker, L as deriveAgentResultOutcome, R as deriveAgentRunOutcome, c as SandboxRuntimeApi, t as BrowserInteractiveSessionController, z as projectAgentTerminalRecord } from "./interactive-controller-OAsASPd_.js";
|
|
2
2
|
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";
|
|
3
3
|
import { f as combineAbortSignals, n as browserInteractiveControlHolderId, s as InteractiveSessionNotRunningError } from "./browser-interactive-control-controller-DHx53yre.js";
|
|
4
4
|
import { s as uploadChunked } from "./chunked-upload-DN2twsUu.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as normalizeRuntimeBackendConfig, C as encodePromptForWire, D as assertCurrentBackendType, E as applyRequestedModel, F as withoutRuntimeSecrets, I as createAgentRunOutcomeTracker, L as deriveAgentResultOutcome, M as requestedSecretProfilePublicDigest, S as validateAcceptedDispatchRunRef, T as canUseNodeHttp2, _ as mintTraceId, a as assertScopedTokenActive, b as parseSSEStream, c as SandboxRuntimeApi, d as appendSessionIdQuery, f as sessionHeaders, g as isTraceId, h as TRACE_ID_HEADER, i as terminalUpgradeHeadersSupported, j as requestedPublicProfileDigest, k as mergeRuntimeBackendConfig, l as normalizeSessionInfo, m as waitForRetryAfter, n as InteractiveSessionController, p as isRetryableCredentialRefusal, r as TerminalStream, s as requestScopedToken, u as sessionMessageRequestBody, v as resolveTraceId, w as encodeTextForWire, x as resolveDispatchRunIdentity, y as traceHeaders } from "./interactive-controller-
|
|
1
|
+
import { a as normalizeEffectiveBackend, r as backendTypeSchema } from "./backend-types-CLvdSX8V.js";
|
|
2
|
+
import { A as normalizeRuntimeBackendConfig, C as encodePromptForWire, D as assertCurrentBackendType, E as applyRequestedModel, F as withoutRuntimeSecrets, I as createAgentRunOutcomeTracker, L as deriveAgentResultOutcome, M as requestedSecretProfilePublicDigest, S as validateAcceptedDispatchRunRef, T as canUseNodeHttp2, _ as mintTraceId, a as assertScopedTokenActive, b as parseSSEStream, c as SandboxRuntimeApi, d as appendSessionIdQuery, f as sessionHeaders, g as isTraceId, h as TRACE_ID_HEADER, i as terminalUpgradeHeadersSupported, j as requestedPublicProfileDigest, k as mergeRuntimeBackendConfig, l as normalizeSessionInfo, m as waitForRetryAfter, n as InteractiveSessionController, p as isRetryableCredentialRefusal, r as TerminalStream, s as requestScopedToken, u as sessionMessageRequestBody, v as resolveTraceId, w as encodeTextForWire, x as resolveDispatchRunIdentity, y as traceHeaders } from "./interactive-controller-OAsASPd_.js";
|
|
3
3
|
import { C as StreamInterruptedError, F as profileFileMountOutsideRootsMessage, M as SANDBOX_AGENT_HOME, N as SANDBOX_FILE_API_ABSOLUTE_ROOTS, P as isProfileFileMountOutsideRoots, S as StateError, T as ValidationError, _ as ProfileFileMountPathError, a as AuthError, b as SandboxError, c as EdgeNotReadyError, h as NotFoundError, i as readResponseJson, j as PROFILE_FILE_MOUNT_OUTSIDE_ROOTS_CODE, k as SANDBOX_PROXY_REQUEST_MAX_BYTES, m as NetworkError, n as parseErrorResponse, r as parseResponseError, s as CapabilityError, t as TerminalStreamError, v as QuotaError, w as TimeoutError, x as ServerError } from "./errors-BfbOP_rx.js";
|
|
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
|
-
import { n as fetchWithKeepAlive, t as emitTiming } from "./keep-alive-fetch-
|
|
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-BYvVrIso.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";
|
|
@@ -1133,7 +1133,7 @@ var DirectRuntimeHttpClient = class {
|
|
|
1133
1133
|
};
|
|
1134
1134
|
if (!route) throw new NetworkError("Direct runtime route was withdrawn");
|
|
1135
1135
|
if (route.useExec && canUseNodeHttp2()) {
|
|
1136
|
-
const { fetchDirectHttp2 } = await import("./direct-http2-
|
|
1136
|
+
const { fetchDirectHttp2 } = await import("./direct-http2-Dar5erTH.js");
|
|
1137
1137
|
return fetchDirectHttp2(route.url, request, timing);
|
|
1138
1138
|
}
|
|
1139
1139
|
return fetchWithKeepAlive(route.url, request, timing);
|
|
@@ -2612,138 +2612,8 @@ var SandboxGitCapabilities = class extends SandboxInfoCapabilities {
|
|
|
2612
2612
|
}
|
|
2613
2613
|
};
|
|
2614
2614
|
//#endregion
|
|
2615
|
-
//#region src/sandbox-workspace-permissions.ts
|
|
2616
|
-
var SandboxPermissionsCapabilities = class extends SandboxGitCapabilities {
|
|
2617
|
-
/**
|
|
2618
|
-
* Permissions manager for multi-user access control.
|
|
2619
|
-
*
|
|
2620
|
-
* @example List users
|
|
2621
|
-
* ```typescript
|
|
2622
|
-
* const users = await box.permissions.list();
|
|
2623
|
-
* for (const user of users) {
|
|
2624
|
-
* console.log(`${user.username}: ${user.role}`);
|
|
2625
|
-
* }
|
|
2626
|
-
* ```
|
|
2627
|
-
*
|
|
2628
|
-
* @example Add a developer
|
|
2629
|
-
* ```typescript
|
|
2630
|
-
* await box.permissions.add({
|
|
2631
|
-
* userId: "user_abc",
|
|
2632
|
-
* role: "developer",
|
|
2633
|
-
* sshKeys: ["ssh-ed25519 AAAA..."],
|
|
2634
|
-
* });
|
|
2635
|
-
* ```
|
|
2636
|
-
*/
|
|
2637
|
-
get permissions() {
|
|
2638
|
-
return {
|
|
2639
|
-
list: () => this.permissionsList(),
|
|
2640
|
-
get: (userId) => this.permissionsGet(userId),
|
|
2641
|
-
add: (options) => this.permissionsAdd(options),
|
|
2642
|
-
update: (userId, options) => this.permissionsUpdate(userId, options),
|
|
2643
|
-
remove: (userId, options) => this.permissionsRemove(userId, options),
|
|
2644
|
-
setAccessPolicies: (userId, rules) => this.permissionsSetAccessPolicies(userId, rules),
|
|
2645
|
-
getAccessPolicies: (userId) => this.permissionsGetAccessPolicies(userId),
|
|
2646
|
-
checkAccess: (userId, path, action) => this.permissionsCheckAccess(userId, path, action)
|
|
2647
|
-
};
|
|
2648
|
-
}
|
|
2649
|
-
async permissionsList() {
|
|
2650
|
-
await this.ensureRunning();
|
|
2651
|
-
return ((await readResponseJson(await this.runtimeFetch("/permissions/users", { method: "GET" }))).users ?? []).map((u) => ({
|
|
2652
|
-
userId: u.userId,
|
|
2653
|
-
username: u.username,
|
|
2654
|
-
homeDir: u.homeDir,
|
|
2655
|
-
role: u.role,
|
|
2656
|
-
sshKeys: u.sshKeys ?? [],
|
|
2657
|
-
directoryPermissions: u.directoryPermissions,
|
|
2658
|
-
accessPolicies: u.accessPolicies,
|
|
2659
|
-
createdAt: new Date(u.createdAt)
|
|
2660
|
-
}));
|
|
2661
|
-
}
|
|
2662
|
-
async permissionsGet(userId) {
|
|
2663
|
-
await this.ensureRunning();
|
|
2664
|
-
const response = await this.runtimeFetch(`/permissions/users/${encodeURIComponent(userId)}`, { method: "GET" });
|
|
2665
|
-
if (response.status === 404) return null;
|
|
2666
|
-
const u = await readResponseJson(response);
|
|
2667
|
-
return {
|
|
2668
|
-
userId: u.userId,
|
|
2669
|
-
username: u.username,
|
|
2670
|
-
homeDir: u.homeDir,
|
|
2671
|
-
role: u.role,
|
|
2672
|
-
sshKeys: u.sshKeys ?? [],
|
|
2673
|
-
directoryPermissions: u.directoryPermissions,
|
|
2674
|
-
accessPolicies: u.accessPolicies,
|
|
2675
|
-
createdAt: new Date(u.createdAt)
|
|
2676
|
-
};
|
|
2677
|
-
}
|
|
2678
|
-
async permissionsAdd(options) {
|
|
2679
|
-
await this.ensureRunning();
|
|
2680
|
-
const u = await readResponseJson(await this.runtimeFetch("/permissions/users", {
|
|
2681
|
-
method: "POST",
|
|
2682
|
-
body: JSON.stringify(options)
|
|
2683
|
-
}));
|
|
2684
|
-
return {
|
|
2685
|
-
userId: u.userId,
|
|
2686
|
-
username: u.username,
|
|
2687
|
-
homeDir: u.homeDir,
|
|
2688
|
-
role: u.role,
|
|
2689
|
-
sshKeys: u.sshKeys ?? [],
|
|
2690
|
-
directoryPermissions: u.directoryPermissions,
|
|
2691
|
-
accessPolicies: u.accessPolicies,
|
|
2692
|
-
createdAt: new Date(u.createdAt)
|
|
2693
|
-
};
|
|
2694
|
-
}
|
|
2695
|
-
async permissionsUpdate(userId, options) {
|
|
2696
|
-
await this.ensureRunning();
|
|
2697
|
-
const u = await readResponseJson(await this.runtimeFetch(`/permissions/users/${encodeURIComponent(userId)}`, {
|
|
2698
|
-
method: "PATCH",
|
|
2699
|
-
body: JSON.stringify(options)
|
|
2700
|
-
}));
|
|
2701
|
-
return {
|
|
2702
|
-
userId: u.userId,
|
|
2703
|
-
username: u.username,
|
|
2704
|
-
homeDir: u.homeDir,
|
|
2705
|
-
role: u.role,
|
|
2706
|
-
sshKeys: u.sshKeys ?? [],
|
|
2707
|
-
directoryPermissions: u.directoryPermissions,
|
|
2708
|
-
accessPolicies: u.accessPolicies,
|
|
2709
|
-
createdAt: new Date(u.createdAt)
|
|
2710
|
-
};
|
|
2711
|
-
}
|
|
2712
|
-
async permissionsRemove(userId, options) {
|
|
2713
|
-
await this.ensureRunning();
|
|
2714
|
-
const params = new URLSearchParams();
|
|
2715
|
-
if (options?.preserveHomeDir) params.set("preserveHomeDir", "true");
|
|
2716
|
-
const query = params.toString();
|
|
2717
|
-
const path = query ? `/permissions/users/${encodeURIComponent(userId)}?${query}` : `/permissions/users/${encodeURIComponent(userId)}`;
|
|
2718
|
-
const response = await this.runtimeFetch(path, { method: "DELETE" });
|
|
2719
|
-
if (!response.ok) throw await parseResponseError(response);
|
|
2720
|
-
}
|
|
2721
|
-
async permissionsSetAccessPolicies(userId, rules) {
|
|
2722
|
-
await this.ensureRunning();
|
|
2723
|
-
const response = await this.runtimeFetch(`/permissions/users/${encodeURIComponent(userId)}/policies`, {
|
|
2724
|
-
method: "PUT",
|
|
2725
|
-
body: JSON.stringify({ rules })
|
|
2726
|
-
});
|
|
2727
|
-
if (!response.ok) throw await parseResponseError(response);
|
|
2728
|
-
}
|
|
2729
|
-
async permissionsGetAccessPolicies(userId) {
|
|
2730
|
-
await this.ensureRunning();
|
|
2731
|
-
return (await readResponseJson(await this.runtimeFetch(`/permissions/users/${encodeURIComponent(userId)}/policies`, { method: "GET" }))).rules ?? [];
|
|
2732
|
-
}
|
|
2733
|
-
async permissionsCheckAccess(userId, path, action) {
|
|
2734
|
-
await this.ensureRunning();
|
|
2735
|
-
return (await readResponseJson(await this.runtimeFetch(`/permissions/users/${encodeURIComponent(userId)}/check`, {
|
|
2736
|
-
method: "POST",
|
|
2737
|
-
body: JSON.stringify({
|
|
2738
|
-
path,
|
|
2739
|
-
action
|
|
2740
|
-
})
|
|
2741
|
-
}))).allowed === true;
|
|
2742
|
-
}
|
|
2743
|
-
};
|
|
2744
|
-
//#endregion
|
|
2745
2615
|
//#region src/sandbox-workspace-backend.ts
|
|
2746
|
-
var SandboxBackendCapabilities = class extends
|
|
2616
|
+
var SandboxBackendCapabilities = class extends SandboxGitCapabilities {
|
|
2747
2617
|
/**
|
|
2748
2618
|
* Backend manager for runtime agent configuration.
|
|
2749
2619
|
*
|
|
@@ -3325,77 +3195,12 @@ var SandboxPreviewCapabilities = class extends SandboxGpuCapabilities {
|
|
|
3325
3195
|
}
|
|
3326
3196
|
};
|
|
3327
3197
|
//#endregion
|
|
3328
|
-
//#region src/sandbox-workspace-tools.ts
|
|
3329
|
-
var SandboxToolsCapabilities = class extends SandboxPreviewCapabilities {
|
|
3330
|
-
/**
|
|
3331
|
-
* Tools capability object for managing language runtimes.
|
|
3332
|
-
*
|
|
3333
|
-
* Uses mise (polyglot version manager) to install and manage tools.
|
|
3334
|
-
*
|
|
3335
|
-
* @example Install and use Node.js
|
|
3336
|
-
* ```typescript
|
|
3337
|
-
* await box.tools.install("node", "22");
|
|
3338
|
-
* await box.tools.use("node", "22");
|
|
3339
|
-
* const list = await box.tools.list();
|
|
3340
|
-
* ```
|
|
3341
|
-
*/
|
|
3342
|
-
get tools() {
|
|
3343
|
-
return {
|
|
3344
|
-
install: (tool, version) => this.toolsInstall(tool, version),
|
|
3345
|
-
use: (tool, version) => this.toolsUse(tool, version),
|
|
3346
|
-
list: () => this.toolsList(),
|
|
3347
|
-
run: (tool, args) => this.toolsRun(tool, args)
|
|
3348
|
-
};
|
|
3349
|
-
}
|
|
3350
|
-
async toolsInstall(tool, version) {
|
|
3351
|
-
await this.ensureRunning();
|
|
3352
|
-
const response = await this.runtimeFetch("/tools/install", {
|
|
3353
|
-
method: "POST",
|
|
3354
|
-
body: JSON.stringify({
|
|
3355
|
-
tool,
|
|
3356
|
-
version
|
|
3357
|
-
})
|
|
3358
|
-
});
|
|
3359
|
-
if (!response.ok) throw await parseResponseError(response);
|
|
3360
|
-
}
|
|
3361
|
-
async toolsUse(tool, version) {
|
|
3362
|
-
await this.ensureRunning();
|
|
3363
|
-
const response = await this.runtimeFetch("/tools/use", {
|
|
3364
|
-
method: "POST",
|
|
3365
|
-
body: JSON.stringify({
|
|
3366
|
-
tool,
|
|
3367
|
-
version
|
|
3368
|
-
})
|
|
3369
|
-
});
|
|
3370
|
-
if (!response.ok) throw await parseResponseError(response);
|
|
3371
|
-
}
|
|
3372
|
-
async toolsList() {
|
|
3373
|
-
await this.ensureRunning();
|
|
3374
|
-
return (await readResponseJson(await this.runtimeFetch("/tools", { method: "GET" }))).tools ?? [];
|
|
3375
|
-
}
|
|
3376
|
-
async toolsRun(tool, args) {
|
|
3377
|
-
await this.ensureRunning();
|
|
3378
|
-
const data = await readResponseJson(await this.runtimeFetch("/tools/run", {
|
|
3379
|
-
method: "POST",
|
|
3380
|
-
body: JSON.stringify({
|
|
3381
|
-
tool,
|
|
3382
|
-
args
|
|
3383
|
-
})
|
|
3384
|
-
}));
|
|
3385
|
-
return {
|
|
3386
|
-
exitCode: data.exitCode ?? 0,
|
|
3387
|
-
stdout: data.stdout ?? "",
|
|
3388
|
-
stderr: data.stderr ?? ""
|
|
3389
|
-
};
|
|
3390
|
-
}
|
|
3391
|
-
};
|
|
3392
|
-
//#endregion
|
|
3393
3198
|
//#region src/sandbox-lifecycle-events.ts
|
|
3394
3199
|
function normalizeProvisionStep(raw) {
|
|
3395
3200
|
if (raw === "sidecar-ready") return "runtime-ready";
|
|
3396
3201
|
return raw;
|
|
3397
3202
|
}
|
|
3398
|
-
var SandboxLifecycleEventsCapabilities = class extends
|
|
3203
|
+
var SandboxLifecycleEventsCapabilities = class extends SandboxPreviewCapabilities {
|
|
3399
3204
|
/**
|
|
3400
3205
|
* Stream sandbox lifecycle and activity events.
|
|
3401
3206
|
*/
|
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-CfoLKgFq.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-BpKM5etV.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-bXjId_Sc.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
|
/**
|