@tangle-network/sandbox 0.34.4 → 0.36.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/index.d.ts +3 -3
- package/dist/agent/index.js +3 -3
- package/dist/{agent-run-outcome-CW49Y_lY.d.ts → agent-run-outcome-C0T6t4zn.d.ts} +1 -1
- package/dist/{client-BO4rdVfR.d.ts → client-BUy5hS2I.d.ts} +2 -2
- package/dist/{client-CPsnVEj0.js → client-CX3LB-64.js} +40 -3
- package/dist/core.d.ts +3 -3
- package/dist/core.js +2 -2
- package/dist/{index-DMAaPk_u.d.ts → index-CtmbhfdA.d.ts} +2 -2
- package/dist/index.d.ts +197 -186
- package/dist/index.js +5 -4
- package/dist/{runtime-api-paApH4-W.js → runtime-api-ClXF8k_q.js} +78 -2
- package/dist/runtime.d.ts +10 -3
- package/dist/runtime.js +1 -1
- package/dist/{sandbox-B70BzvzR.js → sandbox-CzKxUiYj.js} +26 -36
- package/dist/{sandbox-yn4s4Q2t.d.ts → sandbox-DWTay6Ou.d.ts} +13 -8
- package/dist/tangle/index.d.ts +1 -1
- package/dist/tangle/index.js +1 -1
- package/dist/{tangle-Cj1fDoJ7.js → tangle-BhLq6l2G.js} +1 -1
- package/dist/{types-CsDzg6PB.d.ts → types-B00bLoQR.d.ts} +47 -14
- package/package.json +6 -6
package/dist/agent/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { g as SandboxSession, h as SandboxTaskSession, r as SandboxInstance } from "../sandbox-
|
|
2
|
-
import { D as
|
|
3
|
-
import { i as Sandbox } from "../client-
|
|
1
|
+
import { g as SandboxSession, h as SandboxTaskSession, r as SandboxInstance } from "../sandbox-DWTay6Ou.js";
|
|
2
|
+
import { D as CodeExecutionResult, E as CodeExecutionOptions, O as CodeLanguage, Si as SessionListOptions, bi as SessionInfo, d as BackendConfig, k as CodeResultPart } from "../types-B00bLoQR.js";
|
|
3
|
+
import { i as Sandbox } from "../client-BUy5hS2I.js";
|
|
4
4
|
import * as _$_modelcontextprotocol_sdk_server_index_js0 from "@modelcontextprotocol/sdk/server/index.js";
|
|
5
5
|
|
|
6
6
|
//#region src/agent/instances.d.ts
|
package/dist/agent/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { f as assertCurrentBackendType } from "../runtime-api-
|
|
1
|
+
import { f as assertCurrentBackendType } from "../runtime-api-ClXF8k_q.js";
|
|
2
2
|
import { d as StateError, o as NotFoundError, p as ValidationError } from "../errors-C6kn-3zt.js";
|
|
3
|
-
import { n as Sandbox } from "../client-
|
|
4
|
-
import { t as SandboxInstance } from "../sandbox-
|
|
3
|
+
import { n as Sandbox } from "../client-CX3LB-64.js";
|
|
4
|
+
import { t as SandboxInstance } from "../sandbox-CzKxUiYj.js";
|
|
5
5
|
import { createRequire } from "node:module";
|
|
6
6
|
//#region src/agent/instances.ts
|
|
7
7
|
const managers = /* @__PURE__ */ new WeakMap();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as AgentQuestionRequest, et as DurablePlanSnapshot, fr as SandboxEvent, i as AgentApprovalRequirement, o as AgentRunStatus, s as AgentToolInvocation } from "./types-B00bLoQR.js";
|
|
2
2
|
import { InteractionRequest } from "@tangle-network/agent-interface";
|
|
3
3
|
|
|
4
4
|
//#region src/agent-run-outcome.d.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { l as TraceExportResult, n as HttpClient, r as SandboxInstance, u as TraceExportSink } from "./sandbox-
|
|
1
|
+
import { l as TraceExportResult, n as HttpClient, r as SandboxInstance, u as TraceExportSink } from "./sandbox-DWTay6Ou.js";
|
|
2
2
|
import { l as ScopedToken, s as MintInteractiveSessionTokenOptions } from "./terminal-stream-5GNLCsms.js";
|
|
3
|
-
import {
|
|
3
|
+
import { Ar as SandboxFleetToken, At as FleetDriveTurnRequest, Bn as PublicTemplateVersionInfo, Br as SandboxIdentity, Dt as FleetDispatchResultBufferOptions, Er as SandboxFleetManifest, Et as FleetDispatchResultBuffer, F as CreateSandboxFleetOptions, Fr as SandboxFleetUsage, Ft as FleetPromptDispatchResult, Gn as ReconcileSandboxFleetsOptions, Hn as PublishPublicTemplateVersionOptions, I as CreateSandboxFleetTokenOptions, Ji as TokenRefreshHandler, Kn as ReconcileSandboxFleetsResult, L as CreateSandboxFleetWithCoordinatorOptions, Li as SubscriptionInfo, Lr as SandboxFleetWorkspaceReconcileResult, Mn as PromptInputPart, Mt as FleetExecDispatchResult, N as CreateIntelligenceReportOptions, Ni as SshKeysManager, Nn as PromptOptions, Nt as FleetMachineId, Or as SandboxFleetOperationsSummary, Ot as FleetDispatchStreamOptions, P as CreateRequestOptions, Pn as PromptResult, Pr as SandboxFleetTraceOptions, Pt as FleetPromptDispatchOptions, R as CreateSandboxOptions, Rr as SandboxFleetWorkspaceRestoreResult, Tt as FleetDispatchCancelResult, Un as ReapExpiredSandboxFleetsOptions, Vn as PublishPublicTemplateOptions, Vr as SandboxInfo, Wn as ReapExpiredSandboxFleetsResult, _r as SandboxFleetDispatchResponse, an as IntelligenceReportCompareTo, ar as SandboxConfig, b as BatchRunRequest, br as SandboxFleetInfo, ca as BatchEvent, dn as ListSandboxFleetOptions, dr as SandboxEnvironment, dt as ExecResult, ea as UsageInfo, fn as ListSandboxOptions, hr as SandboxFleetCostEstimate, in as IntelligenceReportBudget, jr as SandboxFleetTraceBundle, jt as FleetExecDispatchOptions, kt as FleetDriveTurnOutcome, l as AttachSandboxFleetMachineOptions, mr as SandboxFleetArtifactSpec, pr as SandboxFleetArtifact, rn as IntelligenceReport, sn as IntelligenceReportWindow, ui as SecretsManager, ut as ExecOptions, v as BatchResult, vr as SandboxFleetDriverCapability, wr as SandboxFleetMachineRecord, y as BatchRunOptions, zn as PublicTemplateInfo, zr as SandboxFleetWorkspaceSnapshotResult } from "./types-B00bLoQR.js";
|
|
4
4
|
import { AgentInteractiveSessionRef } from "@tangle-network/agent-interface";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { _ as backendTypeSchema, c as encodePromptForWire, d as applyRequestedModel, f as assertCurrentBackendType, l as encodeTextForWire, o as SANDBOX_PROXY_REQUEST_MAX_BYTES, p as normalizeRuntimeBackendConfig, u as parseSSEStream } from "./runtime-api-
|
|
1
|
+
import { _ as backendTypeSchema, c as encodePromptForWire, d as applyRequestedModel, f as assertCurrentBackendType, l as encodeTextForWire, o as SANDBOX_PROXY_REQUEST_MAX_BYTES, p as normalizeRuntimeBackendConfig, u as parseSSEStream } from "./runtime-api-ClXF8k_q.js";
|
|
2
2
|
import { a as NetworkError, f as TimeoutError, l as SandboxError, m as parseErrorResponse, o as NotFoundError, p as ValidationError, s as PartialFailureError, t as AuthError, u as ServerError } from "./errors-C6kn-3zt.js";
|
|
3
3
|
import { n as combineAbortSignals } from "./abort-signal-si1WMfJb.js";
|
|
4
|
-
import { E as normalizeConnection, O as exportTraceBundle, b as requestInteractiveSessionToken, i as normalizeStartupDiagnostics, n as createSandboxInstanceFromResponse, r as normalizeSandboxCreateReceipt } from "./sandbox-
|
|
4
|
+
import { E as normalizeConnection, O as exportTraceBundle, b as requestInteractiveSessionToken, i as normalizeStartupDiagnostics, n as createSandboxInstanceFromResponse, r as normalizeSandboxCreateReceipt } from "./sandbox-CzKxUiYj.js";
|
|
5
5
|
import { agentProfileSchema } from "@tangle-network/agent-interface";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region src/backend-registry.ts
|
|
@@ -1040,6 +1040,41 @@ const batchEventSchema = z.discriminatedUnion("type", [
|
|
|
1040
1040
|
eventSchema("sidecar.release_pending", batchEventDataSchemas["sidecar.release_pending"])
|
|
1041
1041
|
]);
|
|
1042
1042
|
//#endregion
|
|
1043
|
+
//#region ../../../packages/runtime-contracts/dist/workspace-cwd.js
|
|
1044
|
+
const MAX_RUNTIME_WORKSPACE_CWD_LENGTH = 4096;
|
|
1045
|
+
function hasControlCharacter$1(value) {
|
|
1046
|
+
return Array.from(value).some((character) => {
|
|
1047
|
+
const codePoint = character.codePointAt(0);
|
|
1048
|
+
return codePoint !== void 0 && (codePoint <= 31 || codePoint === 127);
|
|
1049
|
+
});
|
|
1050
|
+
}
|
|
1051
|
+
/**
|
|
1052
|
+
* A portable working directory below a sandbox workspace root.
|
|
1053
|
+
*
|
|
1054
|
+
* The value is relative because container layouts differ by runtime.
|
|
1055
|
+
* The platform resolves it only after it knows the mounted checkout root.
|
|
1056
|
+
*/
|
|
1057
|
+
const runtimeWorkspaceCwdSchema = z.string().min(1).max(MAX_RUNTIME_WORKSPACE_CWD_LENGTH).superRefine((value, refinement) => {
|
|
1058
|
+
if (value.startsWith("/")) refinement.addIssue({
|
|
1059
|
+
code: "custom",
|
|
1060
|
+
message: "Workspace cwd must be relative"
|
|
1061
|
+
});
|
|
1062
|
+
if (value.includes("\\")) refinement.addIssue({
|
|
1063
|
+
code: "custom",
|
|
1064
|
+
message: "Workspace cwd must use POSIX separators"
|
|
1065
|
+
});
|
|
1066
|
+
if (hasControlCharacter$1(value)) refinement.addIssue({
|
|
1067
|
+
code: "custom",
|
|
1068
|
+
message: "Workspace cwd cannot contain control characters"
|
|
1069
|
+
});
|
|
1070
|
+
if (value.split("/").includes("..")) refinement.addIssue({
|
|
1071
|
+
code: "custom",
|
|
1072
|
+
message: "Workspace cwd cannot leave the workspace root"
|
|
1073
|
+
});
|
|
1074
|
+
}).transform((value) => {
|
|
1075
|
+
return value.split("/").filter((segment) => segment.length > 0 && segment !== ".").join("/") || ".";
|
|
1076
|
+
});
|
|
1077
|
+
//#endregion
|
|
1043
1078
|
//#region src/fleet.ts
|
|
1044
1079
|
const FLEET_ID_META = "tangle.fleet.id";
|
|
1045
1080
|
const MACHINE_ID_META = "tangle.fleet.machine_id";
|
|
@@ -2680,12 +2715,14 @@ var Sandbox = class {
|
|
|
2680
2715
|
}
|
|
2681
2716
|
}
|
|
2682
2717
|
const resources = options?.resources;
|
|
2718
|
+
const workspaceCwd = options?.cwd === void 0 ? void 0 : runtimeWorkspaceCwdSchema.parse(options.cwd);
|
|
2683
2719
|
const postDeadline = AbortSignal.timeout(timeoutMs);
|
|
2684
2720
|
const postSignal = requestOptions?.signal ? combineAbortSignals([requestOptions.signal, postDeadline]) : postDeadline;
|
|
2685
2721
|
const createRequestBody = JSON.stringify({
|
|
2686
2722
|
name: options?.name,
|
|
2687
2723
|
...environment !== void 0 ? { environment } : {},
|
|
2688
2724
|
git,
|
|
2725
|
+
cwd: workspaceCwd,
|
|
2689
2726
|
bare: options?.bare,
|
|
2690
2727
|
agent: options?.agent,
|
|
2691
2728
|
driver: options?.driver,
|
|
@@ -3697,4 +3734,4 @@ var TeamsClient = class {
|
|
|
3697
3734
|
}
|
|
3698
3735
|
};
|
|
3699
3736
|
//#endregion
|
|
3700
|
-
export {
|
|
3737
|
+
export { parseBackendRegistryResponse as _, splitInlineProfileSkills as a, SandboxFleetClient as c, validateBatchRunRequest as d, backendRegistryCapabilitiesSchema as f, isBackendRegistryInteractionKind as g, backendRegistryResponseSchema as h, splitInlineProfileFileMounts as i, runtimeWorkspaceCwdSchema as l, backendRegistryInteractionKindSchema as m, Sandbox as n, validateDeferredProfileFileMounts as o, backendRegistryEntrySchema as p, materializeProfileFileMounts as r, SandboxFleet as s, IntelligenceClient as t, createBatchResultAccumulator as u, parseBackendRegistryResponseBody as v };
|
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-
|
|
1
|
+
import { a as WorkspaceImagePublishRequestOptions, i as WorkspaceImagePublishInput, o as WorkspaceImagePublishResult, r as SandboxInstance, s as WorkspaceImages } from "./sandbox-DWTay6Ou.js";
|
|
2
|
+
import { Cn as PreviewLinkWaitOptions, Mn as PromptInputPart, R as CreateSandboxOptions, Sn as PreviewLinkManager, Vr as SandboxInfo, Yr as SandboxStatus, ar as SandboxConfig, dt as ExecResult, gn as NetworkConfig, ut as ExecOptions, xn as PreviewLinkInfo } from "./types-B00bLoQR.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-BUy5hS2I.js";
|
|
4
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
|
|
3
|
-
import { a as WorkspaceImages, t as SandboxInstance } from "./sandbox-
|
|
2
|
+
import { _ as parseBackendRegistryResponse, f as backendRegistryCapabilitiesSchema, g as isBackendRegistryInteractionKind, h as backendRegistryResponseSchema, m as backendRegistryInteractionKindSchema, n as Sandbox, p as backendRegistryEntrySchema, v as parseBackendRegistryResponseBody } from "./client-CX3LB-64.js";
|
|
3
|
+
import { a as WorkspaceImages, t as SandboxInstance } from "./sandbox-CzKxUiYj.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-DWTay6Ou.js";
|
|
2
|
+
import { R as CreateSandboxOptions } from "./types-B00bLoQR.js";
|
|
3
3
|
|
|
4
4
|
//#region src/tangle/abi.d.ts
|
|
5
5
|
/**
|