@tangle-network/sandbox 0.57.0 → 0.58.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/README.md +3 -2
- package/dist/agent/index.d.ts +4 -4
- package/dist/agent/index.js +36 -74
- package/dist/agent/preview.d.ts +1 -1
- package/dist/agent/preview.js +1 -1
- package/dist/{agent-run-outcome-B8PjRMLE.d.ts → agent-run-outcome-DV-9cNsk.d.ts} +1 -1
- package/dist/{client-BHGieo06.d.ts → client-B1I66sl_.d.ts} +2 -2
- package/dist/{client-CdbHGWiu.js → client-BMdV_CeM.js} +11 -2
- package/dist/core.d.ts +3 -3
- package/dist/core.js +2 -2
- package/dist/{index-C1sVorE5.d.ts → index-CGnI-q1g.d.ts} +2 -2
- package/dist/index.d.ts +5 -5
- package/dist/index.js +3 -3
- package/dist/{mcp-local-DUT2U_y8.js → mcp-local-DXO-9rtB.js} +26 -15
- package/dist/{preview-wJJxG42-.d.ts → preview-Bz7TXYSf.d.ts} +3 -3
- package/dist/runtime.d.ts +2 -2
- package/dist/{sandbox-DWDqWnsJ.d.ts → sandbox-BMSWYvdP.d.ts} +6 -1
- package/dist/{sandbox-C9VLoJAb.js → sandbox-DyrDBnjp.js} +24 -3
- package/dist/tangle/index.d.ts +1 -1
- package/dist/tangle/index.js +1 -1
- package/dist/{tangle-Bm6H-xIM.js → tangle-BtQkJqfz.js} +1 -1
- package/dist/{types-CFmeauzy.d.ts → types-DRyvWIJf.d.ts} +12 -0
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -431,8 +431,9 @@ Use `fs.upload()` for local files or `fs.uploadData()` for in-memory content lar
|
|
|
431
431
|
|
|
432
432
|
The instance also exposes `git`, `tools`, `process`, `terminals`, `network`, `egress`, `previewLinks`, `images`, and `backend` capability clients.
|
|
433
433
|
Unsupported capabilities fail with a typed SDK error.
|
|
434
|
-
`box.images.publish()`
|
|
435
|
-
|
|
434
|
+
`box.images.publish()` uses an admitted image builder for the sandbox runtime.
|
|
435
|
+
A hardened runc box can publish through an isolated Firecracker builder when the cell enables that capability.
|
|
436
|
+
Without a qualified builder, publication fails with `IN_BOX_DOCKER_UNAVAILABLE` or `WORKSPACE_IMAGE_BUILDER_UNAVAILABLE`.
|
|
436
437
|
|
|
437
438
|
## Prompts
|
|
438
439
|
|
package/dist/agent/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { h as SandboxTaskSession, r as SandboxInstance, v as SandboxSession } from "../sandbox-
|
|
2
|
-
import { D as CodeExecutionResult, E as CodeExecutionOptions, Gr as SandboxFleetParent, Ki as SessionListOptions, O as CodeLanguage, Wi as SessionInfo, d as BackendConfig, k as CodeResultPart, za as BackendType } from "../types-
|
|
3
|
-
import { i as Sandbox } from "../client-
|
|
4
|
-
import { o as PreviewAuthorizer } from "../preview-
|
|
1
|
+
import { h as SandboxTaskSession, r as SandboxInstance, v as SandboxSession } from "../sandbox-BMSWYvdP.js";
|
|
2
|
+
import { D as CodeExecutionResult, E as CodeExecutionOptions, Gr as SandboxFleetParent, Ki as SessionListOptions, O as CodeLanguage, Wi as SessionInfo, d as BackendConfig, k as CodeResultPart, za as BackendType } from "../types-DRyvWIJf.js";
|
|
3
|
+
import { i as Sandbox } from "../client-B1I66sl_.js";
|
|
4
|
+
import { o as PreviewAuthorizer } from "../preview-Bz7TXYSf.js";
|
|
5
5
|
import * as _$_modelcontextprotocol_sdk_server_index_js0 from "@modelcontextprotocol/sdk/server/index.js";
|
|
6
6
|
import { JSONSchema } from "zod/v4/core";
|
|
7
7
|
import { ToolSet } from "ai";
|
package/dist/agent/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as TOOL_SPECS, i as ALL_TOOL_SPECS, o as serializeToolResult, r as bindToolSpecs, t as createMcpServer } from "../mcp-local-DXO-9rtB.js";
|
|
2
2
|
import { x as assertCurrentBackendType } from "../runtime-api-BZg34WGd.js";
|
|
3
3
|
import { c as NotFoundError, g as ValidationError, m as StateError } from "../errors-BkhlSDW-.js";
|
|
4
|
-
import { n as Sandbox } from "../client-
|
|
5
|
-
import { t as SandboxInstance } from "../sandbox-
|
|
4
|
+
import { n as Sandbox } from "../client-BMdV_CeM.js";
|
|
5
|
+
import { t as SandboxInstance } from "../sandbox-DyrDBnjp.js";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region src/agent/instances.ts
|
|
8
8
|
const managers = /* @__PURE__ */ new WeakMap();
|
|
@@ -179,19 +179,8 @@ function runCode(box, language, source, options) {
|
|
|
179
179
|
* ```
|
|
180
180
|
*/
|
|
181
181
|
function anthropicTools(box, options = {}) {
|
|
182
|
-
const
|
|
183
|
-
const
|
|
184
|
-
box,
|
|
185
|
-
sessionId: options.sessionId,
|
|
186
|
-
previewAuthorize: options.previewAuthorize,
|
|
187
|
-
signal: options.signal
|
|
188
|
-
};
|
|
189
|
-
const handlers = /* @__PURE__ */ new Map();
|
|
190
|
-
for (const spec of specs) {
|
|
191
|
-
const handler = spec.makeHandler(ctx);
|
|
192
|
-
handlers.set(spec.name, (args) => handler(args));
|
|
193
|
-
}
|
|
194
|
-
const tools = specs.map((s) => ({
|
|
182
|
+
const { bindings, handlers } = bindToolSpecs(box, options);
|
|
183
|
+
const tools = bindings.map(({ spec: s }) => ({
|
|
195
184
|
name: s.name,
|
|
196
185
|
description: s.description,
|
|
197
186
|
input_schema: s.inputSchema
|
|
@@ -879,25 +868,16 @@ async function mastraTools(box, options = {}) {
|
|
|
879
868
|
} catch {
|
|
880
869
|
throw new Error("mastraTools(): the `@mastra/core` package is not installed. Install it via `pnpm add @mastra/core`.");
|
|
881
870
|
}
|
|
882
|
-
const
|
|
883
|
-
const ctx = {
|
|
884
|
-
box,
|
|
885
|
-
sessionId: options.sessionId,
|
|
886
|
-
previewAuthorize: options.previewAuthorize,
|
|
887
|
-
signal: options.signal
|
|
888
|
-
};
|
|
871
|
+
const { bindings } = bindToolSpecs(box, options);
|
|
889
872
|
const result = {};
|
|
890
|
-
for (const spec of
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
}
|
|
899
|
-
});
|
|
900
|
-
}
|
|
873
|
+
for (const { spec, handler } of bindings) result[spec.name] = mastra.createTool({
|
|
874
|
+
id: spec.name,
|
|
875
|
+
description: spec.description,
|
|
876
|
+
inputSchema: z.fromJSONSchema(spec.inputSchema).pipe(z.record(z.string(), z.unknown())),
|
|
877
|
+
execute: async (input) => {
|
|
878
|
+
return { result: serializeToolResult(await handler(input)) };
|
|
879
|
+
}
|
|
880
|
+
});
|
|
901
881
|
return result;
|
|
902
882
|
}
|
|
903
883
|
//#endregion
|
|
@@ -926,19 +906,8 @@ async function mastraTools(box, options = {}) {
|
|
|
926
906
|
* ```
|
|
927
907
|
*/
|
|
928
908
|
function openaiTools(box, options = {}) {
|
|
929
|
-
const
|
|
930
|
-
const
|
|
931
|
-
box,
|
|
932
|
-
sessionId: options.sessionId,
|
|
933
|
-
previewAuthorize: options.previewAuthorize,
|
|
934
|
-
signal: options.signal
|
|
935
|
-
};
|
|
936
|
-
const handlers = /* @__PURE__ */ new Map();
|
|
937
|
-
for (const spec of specs) {
|
|
938
|
-
const handler = spec.makeHandler(ctx);
|
|
939
|
-
handlers.set(spec.name, async (args) => serializeToolResult(await handler(args)));
|
|
940
|
-
}
|
|
941
|
-
const tools = specs.map((s) => ({
|
|
909
|
+
const { bindings, handlers } = bindToolSpecs(box, options);
|
|
910
|
+
const tools = bindings.map(({ spec: s }) => ({
|
|
942
911
|
type: "function",
|
|
943
912
|
function: {
|
|
944
913
|
name: s.name,
|
|
@@ -946,15 +915,6 @@ function openaiTools(box, options = {}) {
|
|
|
946
915
|
parameters: s.inputSchema
|
|
947
916
|
}
|
|
948
917
|
}));
|
|
949
|
-
function parseArgs(raw) {
|
|
950
|
-
if (!raw) return {};
|
|
951
|
-
try {
|
|
952
|
-
const v = JSON.parse(raw);
|
|
953
|
-
return typeof v === "object" && v !== null ? v : {};
|
|
954
|
-
} catch {
|
|
955
|
-
return {};
|
|
956
|
-
}
|
|
957
|
-
}
|
|
958
918
|
async function handleToolCall(call) {
|
|
959
919
|
const handler = handlers.get(call.function.name);
|
|
960
920
|
if (!handler) return {
|
|
@@ -963,7 +923,7 @@ function openaiTools(box, options = {}) {
|
|
|
963
923
|
content: JSON.stringify({ error: `Unknown tool: ${call.function.name}` })
|
|
964
924
|
};
|
|
965
925
|
try {
|
|
966
|
-
const result = await handler(
|
|
926
|
+
const result = serializeToolResult(await handler(parseOpenAIToolArguments(call.function.arguments)));
|
|
967
927
|
return {
|
|
968
928
|
role: "tool",
|
|
969
929
|
tool_call_id: call.id,
|
|
@@ -987,6 +947,17 @@ function openaiTools(box, options = {}) {
|
|
|
987
947
|
handleAssistantMessage
|
|
988
948
|
};
|
|
989
949
|
}
|
|
950
|
+
function parseOpenAIToolArguments(raw) {
|
|
951
|
+
if (typeof raw !== "string" || raw.trim() === "") throw new Error("Tool arguments must be a non-empty JSON object");
|
|
952
|
+
let value;
|
|
953
|
+
try {
|
|
954
|
+
value = JSON.parse(raw);
|
|
955
|
+
} catch {
|
|
956
|
+
throw new Error("Tool arguments must be valid JSON");
|
|
957
|
+
}
|
|
958
|
+
if (value === null || typeof value !== "object" || Array.isArray(value)) throw new Error("Tool arguments must be a JSON object");
|
|
959
|
+
return value;
|
|
960
|
+
}
|
|
990
961
|
//#endregion
|
|
991
962
|
//#region src/agent/tools/vercel-ai.ts
|
|
992
963
|
/**
|
|
@@ -1015,24 +986,15 @@ async function vercelAiTools(box, options = {}) {
|
|
|
1015
986
|
} catch {
|
|
1016
987
|
throw new Error("vercelAiTools(): the `ai` package is not installed. Install it via `pnpm add ai` (and pick an `@ai-sdk/*` model adapter).");
|
|
1017
988
|
}
|
|
1018
|
-
const
|
|
1019
|
-
const ctx = {
|
|
1020
|
-
box,
|
|
1021
|
-
sessionId: options.sessionId,
|
|
1022
|
-
previewAuthorize: options.previewAuthorize,
|
|
1023
|
-
signal: options.signal
|
|
1024
|
-
};
|
|
989
|
+
const { bindings } = bindToolSpecs(box, options);
|
|
1025
990
|
const result = {};
|
|
1026
|
-
for (const spec of
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
}
|
|
1034
|
-
});
|
|
1035
|
-
}
|
|
991
|
+
for (const { spec, handler } of bindings) result[spec.name] = ai.tool({
|
|
992
|
+
description: spec.description,
|
|
993
|
+
inputSchema: ai.jsonSchema(spec.inputSchema),
|
|
994
|
+
execute: async (args) => {
|
|
995
|
+
return serializeToolResult(await handler(args));
|
|
996
|
+
}
|
|
997
|
+
});
|
|
1036
998
|
return result;
|
|
1037
999
|
}
|
|
1038
1000
|
//#endregion
|
package/dist/agent/preview.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as PreviewAuthorizationRequest, c as PublishAgentPreviewOptions, d as getAgentPreview, f as listAgentPreviews, h as resolveSelfSandbox, i as AgentPreviewOptions, l as assertPreviewId, m as removeAgentPreview, n as servePreviewMcp, o as PreviewAuthorizer, p as publishAgentPreview, r as AgentPreviewError, s as PreviewExecutionContext, t as PREVIEW_TOOLS, u as ensureAgentPreview } from "../preview-
|
|
1
|
+
import { a as PreviewAuthorizationRequest, c as PublishAgentPreviewOptions, d as getAgentPreview, f as listAgentPreviews, h as resolveSelfSandbox, i as AgentPreviewOptions, l as assertPreviewId, m as removeAgentPreview, n as servePreviewMcp, o as PreviewAuthorizer, p as publishAgentPreview, r as AgentPreviewError, s as PreviewExecutionContext, t as PREVIEW_TOOLS, u as ensureAgentPreview } from "../preview-Bz7TXYSf.js";
|
|
2
2
|
export { AgentPreviewError, AgentPreviewOptions, PREVIEW_TOOLS, PreviewAuthorizationRequest, PreviewAuthorizer, PreviewExecutionContext, PublishAgentPreviewOptions, assertPreviewId, ensureAgentPreview, getAgentPreview, listAgentPreviews, publishAgentPreview, removeAgentPreview, resolveSelfSandbox, servePreviewMcp };
|
package/dist/agent/preview.js
CHANGED
|
@@ -16,7 +16,7 @@ async function servePreviewMcp(request, config) {
|
|
|
16
16
|
if (typeof config.authorize !== "function") throw new Error("Preview MCP requires a host authorization callback");
|
|
17
17
|
const tools = config.tools ?? PREVIEW_TOOLS;
|
|
18
18
|
if (!tools.length || tools.some((tool) => !PREVIEW_TOOLS.includes(tool))) throw new Error("Preview MCP requires an explicit nonempty preview-only tool grant");
|
|
19
|
-
const [{ createMcpServer }, { WebStandardStreamableHTTPServerTransport }] = await Promise.all([import("../mcp-local-
|
|
19
|
+
const [{ createMcpServer }, { WebStandardStreamableHTTPServerTransport }] = await Promise.all([import("../mcp-local-DXO-9rtB.js").then((n) => n.n), import("@modelcontextprotocol/sdk/server/webStandardStreamableHttp.js")]);
|
|
20
20
|
const handle = await createMcpServer(config.box, {
|
|
21
21
|
name: "tangle-previews",
|
|
22
22
|
sessionId: config.sessionId,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Er as SandboxEvent, a as AgentQuestionRequest, i as AgentApprovalRequirement, o as AgentRunStatus, s as AgentToolInvocation, st as DurablePlanSnapshot } from "./types-
|
|
1
|
+
import { Er as SandboxEvent, a as AgentQuestionRequest, i as AgentApprovalRequirement, o as AgentRunStatus, s as AgentToolInvocation, st as DurablePlanSnapshot } from "./types-DRyvWIJf.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 { W as LinesClient, l as TraceExportResult, n as HttpClient, r as SandboxInstance, u as TraceExportSink } from "./sandbox-
|
|
1
|
+
import { W as LinesClient, l as TraceExportResult, n as HttpClient, r as SandboxInstance, u as TraceExportSink } from "./sandbox-BMSWYvdP.js";
|
|
2
2
|
import { l as ScopedToken, s as MintInteractiveSessionTokenOptions } from "./terminal-stream-BW4veIsI.js";
|
|
3
|
-
import { $n as PublicTemplateVersionInfo, Ar as SandboxFleetArtifactSpec, B as CreateSandboxOptions, Br as SandboxFleetMachineRecord, Bt as FleetDriveTurnOutcome, Dr as SandboxFleetAgent, F as CreateIntelligenceReportOptions, G as DeleteMatchingSandboxesFilter, Gn as PromptInputPart, Gr as SandboxFleetParent, Gt as FleetPromptDispatchOptions, Hr as SandboxFleetManifest, Ht as FleetExecDispatchOptions, I as CreateRequestOptions, Ir as SandboxFleetInfo, It as FleetDispatchCancelResult, Jt as FleetRunOptions, K as DeleteMatchingSandboxesOptions, Kn as PromptOptions, Kt as FleetPromptDispatchResult, L as CreateSandboxFleetOptions, Lt as FleetDispatchResultBuffer, M as ConversationTurnOptions, Mt as FleetAgentId, N as ConversationTurnResult, Na as BatchEvent, Nr as SandboxFleetDispatchResponse, Pi as SecretsManager, Pr as SandboxFleetDriverCapability, Pt as FleetAgentResult, Qn as PublicTemplateInfo, R as CreateSandboxFleetTokenOptions, Rt as FleetDispatchResultBufferOptions, Ta as UsageInfo, Tn as ListSandboxOptions, Tr as SandboxEnvironment, Ut as FleetExecDispatchResult, Vr as SandboxFleetMachineSpec, Vt as FleetDriveTurnRequest, Wr as SandboxFleetOperationsSummary, Wt as FleetMachineId, Xr as SandboxFleetToken, Yr as SandboxFleetSpend, Zr as SandboxFleetTraceBundle, _n as IntelligenceReportBudget, _t as ExecOptions, ai as SandboxFleetWorkspaceSnapshotResult, ar as ReconcileSandboxFleetsResult, b as BatchRunRequest, bn as IntelligenceReportWindow, ca as SubscriptionInfo, d as BackendConfig, ei as SandboxFleetTraceOptions, er as PublishPublicTemplateOptions, gn as IntelligenceReport, ia as SshKeysManager, ii as SandboxFleetWorkspaceRestoreResult, ir as ReconcileSandboxFleetsOptions, jr as SandboxFleetCostEstimate, kr as SandboxFleetArtifact, l as AttachSandboxFleetMachineOptions, nr as ReapExpiredSandboxFleetsOptions, oi as SandboxIdentity, q as DeleteMatchingSandboxesResult, qn as PromptResult, qr as SandboxFleetPolicy, qt as FleetRunEvent, ri as SandboxFleetWorkspaceReconcileResult, rr as ReapExpiredSandboxFleetsResult, si as SandboxInfo, ti as SandboxFleetUsage, tr as PublishPublicTemplateVersionOptions, v as BatchResult, vi as SandboxShapesInfo, vn as IntelligenceReportCompareTo, vr as SandboxConfig, vt as ExecResult, wn as ListSandboxFleetOptions, y as BatchRunOptions, ya as TokenRefreshHandler, z as CreateSandboxFleetWithCoordinatorOptions, zt as FleetDispatchStreamOptions } from "./types-
|
|
3
|
+
import { $n as PublicTemplateVersionInfo, Ar as SandboxFleetArtifactSpec, B as CreateSandboxOptions, Br as SandboxFleetMachineRecord, Bt as FleetDriveTurnOutcome, Dr as SandboxFleetAgent, F as CreateIntelligenceReportOptions, G as DeleteMatchingSandboxesFilter, Gn as PromptInputPart, Gr as SandboxFleetParent, Gt as FleetPromptDispatchOptions, Hr as SandboxFleetManifest, Ht as FleetExecDispatchOptions, I as CreateRequestOptions, Ir as SandboxFleetInfo, It as FleetDispatchCancelResult, Jt as FleetRunOptions, K as DeleteMatchingSandboxesOptions, Kn as PromptOptions, Kt as FleetPromptDispatchResult, L as CreateSandboxFleetOptions, Lt as FleetDispatchResultBuffer, M as ConversationTurnOptions, Mt as FleetAgentId, N as ConversationTurnResult, Na as BatchEvent, Nr as SandboxFleetDispatchResponse, Pi as SecretsManager, Pr as SandboxFleetDriverCapability, Pt as FleetAgentResult, Qn as PublicTemplateInfo, R as CreateSandboxFleetTokenOptions, Rt as FleetDispatchResultBufferOptions, Ta as UsageInfo, Tn as ListSandboxOptions, Tr as SandboxEnvironment, Ut as FleetExecDispatchResult, Vr as SandboxFleetMachineSpec, Vt as FleetDriveTurnRequest, Wr as SandboxFleetOperationsSummary, Wt as FleetMachineId, Xr as SandboxFleetToken, Yr as SandboxFleetSpend, Zr as SandboxFleetTraceBundle, _n as IntelligenceReportBudget, _t as ExecOptions, ai as SandboxFleetWorkspaceSnapshotResult, ar as ReconcileSandboxFleetsResult, b as BatchRunRequest, bn as IntelligenceReportWindow, ca as SubscriptionInfo, d as BackendConfig, ei as SandboxFleetTraceOptions, er as PublishPublicTemplateOptions, gn as IntelligenceReport, ia as SshKeysManager, ii as SandboxFleetWorkspaceRestoreResult, ir as ReconcileSandboxFleetsOptions, jr as SandboxFleetCostEstimate, kr as SandboxFleetArtifact, l as AttachSandboxFleetMachineOptions, nr as ReapExpiredSandboxFleetsOptions, oi as SandboxIdentity, q as DeleteMatchingSandboxesResult, qn as PromptResult, qr as SandboxFleetPolicy, qt as FleetRunEvent, ri as SandboxFleetWorkspaceReconcileResult, rr as ReapExpiredSandboxFleetsResult, si as SandboxInfo, ti as SandboxFleetUsage, tr as PublishPublicTemplateVersionOptions, v as BatchResult, vi as SandboxShapesInfo, vn as IntelligenceReportCompareTo, vr as SandboxConfig, vt as ExecResult, wn as ListSandboxFleetOptions, y as BatchRunOptions, ya as TokenRefreshHandler, z as CreateSandboxFleetWithCoordinatorOptions, zt as FleetDispatchStreamOptions } from "./types-DRyvWIJf.js";
|
|
4
4
|
import { f as SandboxError } from "./errors-CNsmhCen.js";
|
|
5
5
|
import { AgentInteractiveSessionRef } from "@tangle-network/agent-interface";
|
|
6
6
|
import { z } from "zod";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { C as normalizeRuntimeBackendConfig, O as backendTypeSchema, _ as encodePromptForWire, b as applyRequestedModel, h as SANDBOX_PROXY_REQUEST_MAX_BYTES, v as encodeTextForWire, x as assertCurrentBackendType, y as parseSSEStream } from "./runtime-api-BZg34WGd.js";
|
|
2
2
|
import { _ as parseErrorResponse, c as NotFoundError, f as SandboxError, g as ValidationError, h as TimeoutError, l as PartialFailureError, p as ServerError, s as NetworkError, t as AuthError } from "./errors-BkhlSDW-.js";
|
|
3
3
|
import { n as combineAbortSignals } from "./abort-signal-CgFhjY_v.js";
|
|
4
|
-
import { D as
|
|
4
|
+
import { D as normalizeConnection, M as rewrapResponse, O as normalizeSandboxShape, P as exportTraceBundle, a as normalizeStartupDiagnostics, i as normalizeSandboxCreateReceipt, k as LinesClient, n as createSandboxInstanceFromResponse, r as normalizeCaptureProof, x as requestInteractiveSessionToken } from "./sandbox-DyrDBnjp.js";
|
|
5
5
|
import { agentProfileSchema } from "@tangle-network/agent-interface";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region src/backend-registry.ts
|
|
@@ -4097,6 +4097,7 @@ var Sandbox = class Sandbox {
|
|
|
4097
4097
|
cwd: workspaceCwd,
|
|
4098
4098
|
bare: options?.bare,
|
|
4099
4099
|
agent: options?.agent,
|
|
4100
|
+
requireNativeSessionCapture: options?.requireNativeSessionCapture,
|
|
4100
4101
|
driver: options?.driver,
|
|
4101
4102
|
backend: requestBackend,
|
|
4102
4103
|
env: options?.env,
|
|
@@ -4198,6 +4199,13 @@ var Sandbox = class Sandbox {
|
|
|
4198
4199
|
const data = await response.json();
|
|
4199
4200
|
const info = this.parseInfo(data);
|
|
4200
4201
|
const injectedSecrets = data.createReceipt?.injectedSecrets;
|
|
4202
|
+
if (options?.requireNativeSessionCapture && (!info.captureProof || !info.createReceipt?.captureProof || JSON.stringify(info.captureProof) !== JSON.stringify(info.createReceipt.captureProof))) throw new PartialFailureError("The API did not confirm native session capture for the created container.", "NATIVE_CAPTURE_UNVERIFIED", 502, {
|
|
4203
|
+
origin: "sandbox-api",
|
|
4204
|
+
endpoint: "/v1/sandboxes"
|
|
4205
|
+
}, [{
|
|
4206
|
+
sandboxId: info.id,
|
|
4207
|
+
idempotencyKey
|
|
4208
|
+
}]);
|
|
4201
4209
|
if (options?.ownerContext === "isolated" && (info.createReceipt?.ownerContext !== "isolated" || injectedSecrets !== void 0 && (!Array.isArray(injectedSecrets) || injectedSecrets.length !== 0))) throw new PartialFailureError("The host did not confirm isolated owner context. No post-create work was started. Inspect the recorded sandbox and retry identity before allocating a replacement.", "SANDBOX_ISOLATION_UNVERIFIED", 502, {
|
|
4202
4210
|
origin: "sandbox-api",
|
|
4203
4211
|
endpoint: "/v1/sandboxes"
|
|
@@ -4691,7 +4699,8 @@ var Sandbox = class Sandbox {
|
|
|
4691
4699
|
gpuLease: data.gpuLease,
|
|
4692
4700
|
resources: normalizeSandboxShape(data.resources),
|
|
4693
4701
|
startupDiagnostics: normalizeStartupDiagnostics(data.startupDiagnostics) ?? void 0,
|
|
4694
|
-
createReceipt: normalizeSandboxCreateReceipt(data.createReceipt) ?? void 0
|
|
4702
|
+
createReceipt: normalizeSandboxCreateReceipt(data.createReceipt) ?? void 0,
|
|
4703
|
+
captureProof: normalizeCaptureProof(data.captureProof) ?? void 0
|
|
4695
4704
|
};
|
|
4696
4705
|
}
|
|
4697
4706
|
_tokenRefreshHandlers = /* @__PURE__ */ new Set();
|
package/dist/core.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as LineAttachment, E as LineInstanceCreate, K as lineInstanceKey, N as LineReminderPreferences, O as LineMember, R as LineSendInput, T as LineInstanceAttachOptions, W as LinesClient, a as WorkspaceImagePublishRequestOptions, b as LineAgentRolePolicy, i as WorkspaceImagePublishInput, k as LineMemberInstance, o as WorkspaceImagePublishResult, r as SandboxInstance, s as WorkspaceImages, y as Line, z as LineSendReceipt } from "./sandbox-
|
|
2
|
-
import { B as CreateSandboxOptions, Fn as PreviewLinkManager, Gn as PromptInputPart, In as PreviewLinkWaitOptions, Ji as SessionMessageAdmission, M as ConversationTurnOptions, N as ConversationTurnResult, Pn as PreviewLinkInfo, _t as ExecOptions, kn as NetworkConfig, si as SandboxInfo, vr as SandboxConfig, vt as ExecResult, yi as SandboxStatus } from "./types-
|
|
3
|
-
import { A as isBackendRegistryInteractionKind, C as BackendRegistryEntry, D as backendRegistryEntrySchema, E as backendRegistryCapabilitiesSchema, M as parseBackendRegistryResponseBody, O as backendRegistryInteractionKindSchema, S as BackendRegistryCapabilities, T as BackendRegistryResponse, d as HostedInstance, f as InstanceProfile, g as InstancesClient, i as Sandbox, j as parseBackendRegistryResponse, k as backendRegistryResponseSchema, m as InstanceRestartingError, p as InstanceRecord, u as EnsureInstanceOptions, w as BackendRegistryInteractionKind } from "./client-
|
|
1
|
+
import { C as LineAttachment, E as LineInstanceCreate, K as lineInstanceKey, N as LineReminderPreferences, O as LineMember, R as LineSendInput, T as LineInstanceAttachOptions, W as LinesClient, a as WorkspaceImagePublishRequestOptions, b as LineAgentRolePolicy, i as WorkspaceImagePublishInput, k as LineMemberInstance, o as WorkspaceImagePublishResult, r as SandboxInstance, s as WorkspaceImages, y as Line, z as LineSendReceipt } from "./sandbox-BMSWYvdP.js";
|
|
2
|
+
import { B as CreateSandboxOptions, Fn as PreviewLinkManager, Gn as PromptInputPart, In as PreviewLinkWaitOptions, Ji as SessionMessageAdmission, M as ConversationTurnOptions, N as ConversationTurnResult, Pn as PreviewLinkInfo, _t as ExecOptions, kn as NetworkConfig, si as SandboxInfo, vr as SandboxConfig, vt as ExecResult, yi as SandboxStatus } from "./types-DRyvWIJf.js";
|
|
3
|
+
import { A as isBackendRegistryInteractionKind, C as BackendRegistryEntry, D as backendRegistryEntrySchema, E as backendRegistryCapabilitiesSchema, M as parseBackendRegistryResponseBody, O as backendRegistryInteractionKindSchema, S as BackendRegistryCapabilities, T as BackendRegistryResponse, d as HostedInstance, f as InstanceProfile, g as InstancesClient, i as Sandbox, j as parseBackendRegistryResponse, k as backendRegistryResponseSchema, m as InstanceRestartingError, p as InstanceRecord, u as EnsureInstanceOptions, w as BackendRegistryInteractionKind } from "./client-B1I66sl_.js";
|
|
4
4
|
import { _ as TimeoutError, a as FileWriteConflictError, c as NotFoundError, f as SandboxError, g as StateError, h as ServerError, l as PartialFailureError, m as SandboxFailureDetail, n as CapabilityError, p as SandboxErrorJson, s as NetworkError, t as AuthError, u as QuotaError, v as ValidationError } from "./errors-CNsmhCen.js";
|
|
5
5
|
|
|
6
6
|
//#region src/core.d.ts
|
package/dist/core.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as FileWriteConflictError, c as NotFoundError, f as SandboxError, g as ValidationError, h as TimeoutError, l as PartialFailureError, m as StateError, n as CapabilityError, p as ServerError, s as NetworkError, t as AuthError, u as QuotaError } from "./errors-BkhlSDW-.js";
|
|
2
|
-
import { _ as backendRegistryInteractionKindSchema, b as parseBackendRegistryResponse, c as InstanceRestartingError, g as backendRegistryEntrySchema, h as backendRegistryCapabilitiesSchema, l as InstancesClient, n as Sandbox, s as HostedInstance, v as backendRegistryResponseSchema, x as parseBackendRegistryResponseBody, y as isBackendRegistryInteractionKind } from "./client-
|
|
3
|
-
import {
|
|
2
|
+
import { _ as backendRegistryInteractionKindSchema, b as parseBackendRegistryResponse, c as InstanceRestartingError, g as backendRegistryEntrySchema, h as backendRegistryCapabilitiesSchema, l as InstancesClient, n as Sandbox, s as HostedInstance, v as backendRegistryResponseSchema, x as parseBackendRegistryResponseBody, y as isBackendRegistryInteractionKind } from "./client-BMdV_CeM.js";
|
|
3
|
+
import { j as lineInstanceKey, k as LinesClient, o as WorkspaceImages, t as SandboxInstance } from "./sandbox-DyrDBnjp.js";
|
|
4
4
|
//#region src/core.ts
|
|
5
5
|
/** Local SDK protocol support only, not a deployed-host readiness assertion.
|
|
6
6
|
* Version 1 refuses unconfirmed isolated receipts before materializing any
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as HttpClient, r as SandboxInstance } from "./sandbox-
|
|
2
|
-
import { B as CreateSandboxOptions } from "./types-
|
|
1
|
+
import { n as HttpClient, r as SandboxInstance } from "./sandbox-BMSWYvdP.js";
|
|
2
|
+
import { B as CreateSandboxOptions } from "./types-DRyvWIJf.js";
|
|
3
3
|
|
|
4
4
|
//#region src/tangle/abi.d.ts
|
|
5
5
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { $ as InteractiveSessionHost, A as LineMemberPatch, At as SandboxMcpServerEntry, B as LineThread, C as LineAttachment, Ct as SandboxInteractionResult, D as LineLimits, Dt as SANDBOX_MCP_SERVER_NAME, E as LineInstanceCreate, Et as CONTROL_PLANE_MCP_SERVER_NAME, F as LineRespondAgent, G as SandboxLines, H as LineVoice, I as LineRespondView, J as InteractiveControlClaimRequest, K as lineInstanceKey, L as LineRole, M as LineMessage, Mt as buildSandboxMcpConfig, N as LineReminderPreferences, O as LineMember, Ot as SandboxMcpConfig, P as LineReplyGate, Q as InteractiveSessionHandleOptions, R as LineSendInput, S as LineAttachOptions, St as SandboxInteractionResolution, T as LineInstanceAttachOptions, Tt as BuildSandboxMcpConfigOptions, U as LineVoiceOptions, V as LineTransport, W as LinesClient, X as InteractiveSessionControlClaim, Y as InteractivePromptCommand, Z as InteractiveSessionHandle, _ as RawEvidenceExport, _t as InteractiveSessionController, a as WorkspaceImagePublishRequestOptions, at as InteractiveStopCommand, b as LineAgentRolePolicy, bt as SandboxInteractionCommandResult, c as TraceExportFormat, ct as agentInteractiveSessionPromptRequestDigest, d as buildTraceExportPayload, dt as InteractiveTerminalMetadata, et as InteractiveSessionIncarnationId, f as exportTraceBundle, ft as createInteractiveTerminalCapture, g as NativeRolloutExport, gt as InteractiveAttachRequest, h as SandboxTaskSession, ht as BrowserInteractiveSessionControllerOptions, i as WorkspaceImagePublishInput, it as InteractiveSessionStartResult, j as LineMemberSpec, jt as buildControlPlaneMcpConfig, k as LineMemberInstance, kt as SandboxMcpEndpoint, l as TraceExportResult, lt as InteractiveTerminalCapture, m as toOtelJson, mt as BrowserInteractiveSessionController, nt as InteractiveSessionRef, o as WorkspaceImagePublishResult, ot as InterruptResult, p as otelTraceIdForTangleTrace, pt as createInteractiveTerminalSession, q as AgentInteractiveTerminalSession, r as SandboxInstance, rt as InteractiveSessionStartOptions, s as WorkspaceImages, st as RespondToPermissionOptions, t as ForkAcknowledgement, tt as InteractiveSessionInfo, u as TraceExportSink, ut as InteractiveTerminalFrameLog, v as SandboxSession, vt as InteractiveSessionControllerOptions, w as LineFromConnectionInput, wt as BuildControlPlaneMcpConfigOptions, x as LineAllowance, xt as SandboxInteractionConflict, y as Line, yt as InteractiveSessionControllerTransport, z as LineSendReceipt } from "./sandbox-
|
|
1
|
+
import { $ as InteractiveSessionHost, A as LineMemberPatch, At as SandboxMcpServerEntry, B as LineThread, C as LineAttachment, Ct as SandboxInteractionResult, D as LineLimits, Dt as SANDBOX_MCP_SERVER_NAME, E as LineInstanceCreate, Et as CONTROL_PLANE_MCP_SERVER_NAME, F as LineRespondAgent, G as SandboxLines, H as LineVoice, I as LineRespondView, J as InteractiveControlClaimRequest, K as lineInstanceKey, L as LineRole, M as LineMessage, Mt as buildSandboxMcpConfig, N as LineReminderPreferences, O as LineMember, Ot as SandboxMcpConfig, P as LineReplyGate, Q as InteractiveSessionHandleOptions, R as LineSendInput, S as LineAttachOptions, St as SandboxInteractionResolution, T as LineInstanceAttachOptions, Tt as BuildSandboxMcpConfigOptions, U as LineVoiceOptions, V as LineTransport, W as LinesClient, X as InteractiveSessionControlClaim, Y as InteractivePromptCommand, Z as InteractiveSessionHandle, _ as RawEvidenceExport, _t as InteractiveSessionController, a as WorkspaceImagePublishRequestOptions, at as InteractiveStopCommand, b as LineAgentRolePolicy, bt as SandboxInteractionCommandResult, c as TraceExportFormat, ct as agentInteractiveSessionPromptRequestDigest, d as buildTraceExportPayload, dt as InteractiveTerminalMetadata, et as InteractiveSessionIncarnationId, f as exportTraceBundle, ft as createInteractiveTerminalCapture, g as NativeRolloutExport, gt as InteractiveAttachRequest, h as SandboxTaskSession, ht as BrowserInteractiveSessionControllerOptions, i as WorkspaceImagePublishInput, it as InteractiveSessionStartResult, j as LineMemberSpec, jt as buildControlPlaneMcpConfig, k as LineMemberInstance, kt as SandboxMcpEndpoint, l as TraceExportResult, lt as InteractiveTerminalCapture, m as toOtelJson, mt as BrowserInteractiveSessionController, nt as InteractiveSessionRef, o as WorkspaceImagePublishResult, ot as InterruptResult, p as otelTraceIdForTangleTrace, pt as createInteractiveTerminalSession, q as AgentInteractiveTerminalSession, r as SandboxInstance, rt as InteractiveSessionStartOptions, s as WorkspaceImages, st as RespondToPermissionOptions, t as ForkAcknowledgement, tt as InteractiveSessionInfo, u as TraceExportSink, ut as InteractiveTerminalFrameLog, v as SandboxSession, vt as InteractiveSessionControllerOptions, w as LineFromConnectionInput, wt as BuildControlPlaneMcpConfigOptions, x as LineAllowance, xt as SandboxInteractionConflict, y as Line, yt as InteractiveSessionControllerTransport, z as LineSendReceipt } from "./sandbox-BMSWYvdP.js";
|
|
2
2
|
import { c as MintScopedTokenOptions, d as TERMINAL_WS_ECHO_SUBPROTOCOL, f as TerminalExitInfo, g as TerminalStreamAuthFormat, h as TerminalReadyInfo, i as TerminalStreamOptions, l as ScopedToken, m as TerminalOutputMessage, n as TerminalStreamError, o as TerminalStreamToken, p as TerminalInteractiveSessionIdentity, r as TerminalStreamHandlers, s as MintInteractiveSessionTokenOptions, t as TerminalStream, u as ScopedTokenScope } from "./terminal-stream-BW4veIsI.js";
|
|
3
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-knjCl8Zp.js";
|
|
4
|
-
import { $ as DownloadOptions, $i as SnapshotDeleteOutcome, $n as PublicTemplateVersionInfo, $r as SandboxFleetTraceExport, $t as GitAuth, A as CommitTaskSessionOptions, Aa as WriteManyFile, Ai as SandboxUser, An as NetworkManager, Ar as SandboxFleetArtifactSpec, At as FileUsageResult, B as CreateSandboxOptions, Ba as parseBackendType, Bi as SessionExecutionInfo, Bn as ProcessLogEntry, Br as SandboxFleetMachineRecord, Bt as FleetDriveTurnOutcome, C as BranchOptions, Ca as UploadOptions, Ci as SandboxTerminalManager, Cn as ListOptions, Cr as SandboxDeleteOptions, Ct as FileReadResult, Da as WaitForRolloutOptions, Di as SandboxTraceEvent, Dn as McpServerConfig, Dr as SandboxFleetAgent, Dt as FileTreeOptions, Ea as WaitForOptions, Ei as SandboxTraceBundle, En as MAX_EGRESS_DENIALS_LIMIT, Er as SandboxEvent, Et as FileTreeFile, F as CreateIntelligenceReportOptions, Fa as BatchSidecarGroup, Fi as SendSessionMessageOptions, Fn as PreviewLinkManager, Fr as SandboxFleetDriverTimings, Ft as FleetAgentRunStatus, G as DeleteMatchingSandboxesFilter, Gi as SessionInterruptOptions, Gn as PromptInputPart, Gr as SandboxFleetParent, Gt as FleetPromptDispatchOptions, H as CreateTaskSessionOptions, Hi as SessionFailureReason, Hn as ProcessSignal, Hr as SandboxFleetManifest, Ht as FleetExecDispatchOptions, I as CreateRequestOptions, Ia as BatchTaskUsage, Ii as SendSessionMessageRequest, In as PreviewLinkWaitOptions, Ir as SandboxFleetInfo, It as FleetDispatchCancelResult, J as DeleteOptions, Ji as SessionMessageAdmission, Jn as ProvisionEvent, Jr as SandboxFleetProfileRef, Jt as FleetRunOptions, K as DeleteMatchingSandboxesOptions, Ki as SessionListOptions, Kn as PromptOptions, Kr as SandboxFleetPlacement, Kt as FleetPromptDispatchResult, L as CreateSandboxFleetOptions, La as PublicBatchRunRequest, Li as SentSessionMessage, Ln as Process, Lr as SandboxFleetIntelligenceEnvelope, Lt as FleetDispatchResultBuffer, M as ConversationTurnOptions, Ma as BatchBackendStats, Mi as SearchOptions, Mn as PermissionLevel, Mr as SandboxFleetDispatchFailureClass, Mt as FleetAgentId, N as ConversationTurnResult, Na as BatchEvent, Ni as SecretInfo, Nn as PermissionsManager, Nr as SandboxFleetDispatchResponse, Nt as FleetAgentPlacement, Oa as WorkspaceOperationLookup, Oi as SandboxTraceExport, On as MkdirOptions, Or as SandboxFleetAgentSpec, Ot as FileTreeResult, P as CreateGpuLeaseOptions, Pa as BatchEventDataMap, Pi as SecretsManager, Pn as PreviewLinkInfo, Pr as SandboxFleetDriverCapability, Pt as FleetAgentResult, Q as DispatchedSession, Qi as SnapshotDeleteAcknowledgement, Qn as PublicTemplateInfo, Qr as SandboxFleetTraceEvent, Qt as GPU_LEASE_PROVIDER_NAMES, Ra as ALL_BACKEND_TYPES, Ri as SessionBackendCredentials, Rn as ProcessInfo, Rr as SandboxFleetMachine, Rt as FleetDispatchResultBufferOptions, S as BatchTaskResult, Sa as UpdateUserOptions, Si as SandboxTerminalInfo, Sn as ListMessagesOptions, Sr as SandboxDeleteAcknowledgement, St as FileReadError, T as ChunkedUploadResult, Ta as UsageInfo, Ti as SandboxTerminals, Tn as ListSandboxOptions, Tr as SandboxEnvironment, Tt as FileSystem, U as DeleteMatchingSandboxOutcome, Ui as SessionForkOptions, Un as ProcessSpawnOptions, Ur as SandboxFleetManifestMachine, V as CreateSessionOptions, Vi as SessionExecutionStatus, Vn as ProcessManager, Vr as SandboxFleetMachineSpec, Vt as FleetDriveTurnRequest, W as DeleteMatchingSandboxResult, Wi as SessionInfo, Wn as ProcessStatus, Wr as SandboxFleetOperationsSummary, Wt as FleetMachineId, X as DirectoryPermission, Xi as SessionResultOptions, Xn as ProvisionStatus, Xr as SandboxFleetToken, Xt as ForkIdempotency, Y as DevServerInfo, Yi as SessionMessageInputPart, Yn as ProvisionResult, Yr as SandboxFleetSpend, Yt as ForkCounts, Z as DispatchPromptOptions, Zi as SessionStatus, Zn as ProvisionStep, Zr as SandboxFleetTraceBundle, Zt as ForkLookupOptions, _ as BatchBackend, _a as TeePublicKey, _i as SandboxShapePreset, _n as IntelligenceReportBudget, _r as SSHCredentials, _t as ExecOptions, aa as StartupDiagnostics, ai as SandboxFleetWorkspaceSnapshotResult, an as GpuLease, ar as ReconcileSandboxFleetsResult, at as DurablePlan, b as BatchRunRequest, ba as TokenUsage, bi as SandboxTerminalAttachOptions, bn as IntelligenceReportWindow, br as SandboxCreateOutcome, bt as FileReadBatchOptions, c as AttachGpuLeaseOptions, ca as SubscriptionInfo, ci as SandboxIntelligenceEnvelope, cn as GpuLeaseExecOptions, ct as EffectiveBackend, d as BackendConfig, da as TaskSessionFileChange, di as SandboxRemovalState, dn as GpuLeaseProviderName, dr as RolloutOptions, dt as EgressDenial, ea as SnapshotIdempotency, ei as SandboxFleetTraceOptions, en as GitBranch, er as PublishPublicTemplateOptions, et as DownloadProgress, f as BackendInfo, fa as TaskSessionInfo, fi as SandboxResourceUsage, fn as GpuLeaseStatus, fr as RolloutScorer, ft as EgressManager, g as BackendStatus, ga as TeeAttestationResponse, gi as SandboxShape, gn as IntelligenceReport, gr as SSHCommandDescriptor, gt as ExactProcessSpawnOptions, h as BackendRuntimeConfigUpdate, ha as TeeAttestationReport, hi as SandboxRuntimeHealth, hn as InstalledTool, hr as RolloutTurnPart, ht as EventStreamOptions, ii as SandboxFleetWorkspaceRestoreResult, in as GitStatus, ir as ReconcileSandboxFleetsOptions, it as DriverType, j as CompletedTurnResult, ja as WriteManyOptions, ji as SearchMatch, jn as NonHostAgentDriverConfig, jr as SandboxFleetCostEstimate, jt as FileWriteResult, ka as WriteFileOptions, ki as SandboxTraceOptions, kn as NetworkConfig, kr as SandboxFleetArtifact, kt as FileUsageOptions, l as AttachSandboxFleetMachineOptions, la as TaskSessionChanges, li as SandboxPortBinding, ln as GpuLeaseExecResult, lr as Rollout, lt as EffectiveBackendProfile, m as BackendMcpServerStatus, ma as TeeAttestationOptions, mi as SandboxRuntimeCapabilities, mn as HostAgentRuntimeBackend, mr as RolloutStatus, mt as EnsureDevServerOptions, n as AccessPolicyRule, na as SnapshotOptions, ni as SandboxFleetWorkspace, nn as GitConfig, nr as ReapExpiredSandboxFleetsOptions, nt as DriverConfig, oa as StartupOperation, oi as SandboxIdentity, on as GpuLeaseBilling, or as RenameOptions, ot as DurablePlanDecisionResult, p as BackendManager, pa as TaskSessionProfile, pi as SandboxResources, pn as HostAgentDriverConfig, pr as RolloutStartResult, pt as EgressPolicy, q as DeleteMatchingSandboxesResult, qi as SessionMessage, qn as PromptResult, qr as SandboxFleetPolicy, qt as FleetRunEvent, r as AddUserOptions, ra as SnapshotResult, ri as SandboxFleetWorkspaceReconcileResult, rn as GitDiff, rr as ReapExpiredSandboxFleetsResult, rt as DriverInfo, sa as StorageConfig, si as SandboxInfo, sn as GpuLeaseCommandResult, t as AcceleratorKind, ta as SnapshotInfo, ti as SandboxFleetUsage, tn as GitCommit, tr as PublishPublicTemplateVersionOptions, tt as DriveTurnOptions, u as BackendCapabilities, ua as TaskSessionCommitResult, ui as SandboxPortPreviewLink, un as GpuLeaseManager, ur as RolloutChildResult, ut as EffectiveBackendSource, v as BatchResult, va as TeePublicKeyResponse, vi as SandboxShapesInfo, vn as IntelligenceReportCompareTo, vr as SandboxConfig, vt as ExecResult, w as ChunkedUploadOptions, wa as UploadProgress, wi as SandboxTerminalRequestOptions, wn as ListSandboxFleetOptions, wr as SandboxDeleteOutcome, wt as FileRenameResult, x as BatchTask, xa as TurnDriveResult, xi as SandboxTerminalCreateOptions, xr as SandboxCreateReceipt, xt as FileReadBatchResult, y as BatchRunOptions, ya as TokenRefreshHandler, yi as SandboxStatus, yn as IntelligenceReportSubjectType, yr as SandboxConnection, yt as FileInfo, z as CreateSandboxFleetWithCoordinatorOptions, za as BackendType, zi as SessionEventStreamOptions, zn as ProcessListOptions, zr as SandboxFleetMachineMeteredUsage, zt as FleetDispatchStreamOptions } from "./types-
|
|
5
|
-
import { A as isBackendRegistryInteractionKind, C as BackendRegistryEntry, D as backendRegistryEntrySchema, E as backendRegistryCapabilitiesSchema, M as parseBackendRegistryResponseBody, O as backendRegistryInteractionKindSchema, S as BackendRegistryCapabilities, T as BackendRegistryResponse, _ as SandboxFleet, a as Team, b as ParsedSSEEvent, c as SessionBroadcastEvent, d as HostedInstance, f as InstanceProfile, g as InstancesClient, h as InstanceStart, i as Sandbox, j as parseBackendRegistryResponse, k as backendRegistryResponseSchema, l as SessionBroadcastResult, m as InstanceRestartingError, n as IntelligenceClient, o as TeamInvitation, p as InstanceRecord, r as InviteTeamMemberOptions, s as TeamMember, t as CreateTeamOptions, u as EnsureInstanceOptions, v as SandboxFleetClient, w as BackendRegistryInteractionKind, x as parseSSEStream, y as ParseSSEStreamOptions } from "./client-
|
|
4
|
+
import { $ as DownloadOptions, $i as SnapshotDeleteOutcome, $n as PublicTemplateVersionInfo, $r as SandboxFleetTraceExport, $t as GitAuth, A as CommitTaskSessionOptions, Aa as WriteManyFile, Ai as SandboxUser, An as NetworkManager, Ar as SandboxFleetArtifactSpec, At as FileUsageResult, B as CreateSandboxOptions, Ba as parseBackendType, Bi as SessionExecutionInfo, Bn as ProcessLogEntry, Br as SandboxFleetMachineRecord, Bt as FleetDriveTurnOutcome, C as BranchOptions, Ca as UploadOptions, Ci as SandboxTerminalManager, Cn as ListOptions, Cr as SandboxDeleteOptions, Ct as FileReadResult, Da as WaitForRolloutOptions, Di as SandboxTraceEvent, Dn as McpServerConfig, Dr as SandboxFleetAgent, Dt as FileTreeOptions, Ea as WaitForOptions, Ei as SandboxTraceBundle, En as MAX_EGRESS_DENIALS_LIMIT, Er as SandboxEvent, Et as FileTreeFile, F as CreateIntelligenceReportOptions, Fa as BatchSidecarGroup, Fi as SendSessionMessageOptions, Fn as PreviewLinkManager, Fr as SandboxFleetDriverTimings, Ft as FleetAgentRunStatus, G as DeleteMatchingSandboxesFilter, Gi as SessionInterruptOptions, Gn as PromptInputPart, Gr as SandboxFleetParent, Gt as FleetPromptDispatchOptions, H as CreateTaskSessionOptions, Hi as SessionFailureReason, Hn as ProcessSignal, Hr as SandboxFleetManifest, Ht as FleetExecDispatchOptions, I as CreateRequestOptions, Ia as BatchTaskUsage, Ii as SendSessionMessageRequest, In as PreviewLinkWaitOptions, Ir as SandboxFleetInfo, It as FleetDispatchCancelResult, J as DeleteOptions, Ji as SessionMessageAdmission, Jn as ProvisionEvent, Jr as SandboxFleetProfileRef, Jt as FleetRunOptions, K as DeleteMatchingSandboxesOptions, Ki as SessionListOptions, Kn as PromptOptions, Kr as SandboxFleetPlacement, Kt as FleetPromptDispatchResult, L as CreateSandboxFleetOptions, La as PublicBatchRunRequest, Li as SentSessionMessage, Ln as Process, Lr as SandboxFleetIntelligenceEnvelope, Lt as FleetDispatchResultBuffer, M as ConversationTurnOptions, Ma as BatchBackendStats, Mi as SearchOptions, Mn as PermissionLevel, Mr as SandboxFleetDispatchFailureClass, Mt as FleetAgentId, N as ConversationTurnResult, Na as BatchEvent, Ni as SecretInfo, Nn as PermissionsManager, Nr as SandboxFleetDispatchResponse, Nt as FleetAgentPlacement, Oa as WorkspaceOperationLookup, Oi as SandboxTraceExport, On as MkdirOptions, Or as SandboxFleetAgentSpec, Ot as FileTreeResult, P as CreateGpuLeaseOptions, Pa as BatchEventDataMap, Pi as SecretsManager, Pn as PreviewLinkInfo, Pr as SandboxFleetDriverCapability, Pt as FleetAgentResult, Q as DispatchedSession, Qi as SnapshotDeleteAcknowledgement, Qn as PublicTemplateInfo, Qr as SandboxFleetTraceEvent, Qt as GPU_LEASE_PROVIDER_NAMES, Ra as ALL_BACKEND_TYPES, Ri as SessionBackendCredentials, Rn as ProcessInfo, Rr as SandboxFleetMachine, Rt as FleetDispatchResultBufferOptions, S as BatchTaskResult, Sa as UpdateUserOptions, Si as SandboxTerminalInfo, Sn as ListMessagesOptions, Sr as SandboxDeleteAcknowledgement, St as FileReadError, T as ChunkedUploadResult, Ta as UsageInfo, Ti as SandboxTerminals, Tn as ListSandboxOptions, Tr as SandboxEnvironment, Tt as FileSystem, U as DeleteMatchingSandboxOutcome, Ui as SessionForkOptions, Un as ProcessSpawnOptions, Ur as SandboxFleetManifestMachine, V as CreateSessionOptions, Vi as SessionExecutionStatus, Vn as ProcessManager, Vr as SandboxFleetMachineSpec, Vt as FleetDriveTurnRequest, W as DeleteMatchingSandboxResult, Wi as SessionInfo, Wn as ProcessStatus, Wr as SandboxFleetOperationsSummary, Wt as FleetMachineId, X as DirectoryPermission, Xi as SessionResultOptions, Xn as ProvisionStatus, Xr as SandboxFleetToken, Xt as ForkIdempotency, Y as DevServerInfo, Yi as SessionMessageInputPart, Yn as ProvisionResult, Yr as SandboxFleetSpend, Yt as ForkCounts, Z as DispatchPromptOptions, Zi as SessionStatus, Zn as ProvisionStep, Zr as SandboxFleetTraceBundle, Zt as ForkLookupOptions, _ as BatchBackend, _a as TeePublicKey, _i as SandboxShapePreset, _n as IntelligenceReportBudget, _r as SSHCredentials, _t as ExecOptions, aa as StartupDiagnostics, ai as SandboxFleetWorkspaceSnapshotResult, an as GpuLease, ar as ReconcileSandboxFleetsResult, at as DurablePlan, b as BatchRunRequest, ba as TokenUsage, bi as SandboxTerminalAttachOptions, bn as IntelligenceReportWindow, br as SandboxCreateOutcome, bt as FileReadBatchOptions, c as AttachGpuLeaseOptions, ca as SubscriptionInfo, ci as SandboxIntelligenceEnvelope, cn as GpuLeaseExecOptions, ct as EffectiveBackend, d as BackendConfig, da as TaskSessionFileChange, di as SandboxRemovalState, dn as GpuLeaseProviderName, dr as RolloutOptions, dt as EgressDenial, ea as SnapshotIdempotency, ei as SandboxFleetTraceOptions, en as GitBranch, er as PublishPublicTemplateOptions, et as DownloadProgress, f as BackendInfo, fa as TaskSessionInfo, fi as SandboxResourceUsage, fn as GpuLeaseStatus, fr as RolloutScorer, ft as EgressManager, g as BackendStatus, ga as TeeAttestationResponse, gi as SandboxShape, gn as IntelligenceReport, gr as SSHCommandDescriptor, gt as ExactProcessSpawnOptions, h as BackendRuntimeConfigUpdate, ha as TeeAttestationReport, hi as SandboxRuntimeHealth, hn as InstalledTool, hr as RolloutTurnPart, ht as EventStreamOptions, ii as SandboxFleetWorkspaceRestoreResult, in as GitStatus, ir as ReconcileSandboxFleetsOptions, it as DriverType, j as CompletedTurnResult, ja as WriteManyOptions, ji as SearchMatch, jn as NonHostAgentDriverConfig, jr as SandboxFleetCostEstimate, jt as FileWriteResult, ka as WriteFileOptions, ki as SandboxTraceOptions, kn as NetworkConfig, kr as SandboxFleetArtifact, kt as FileUsageOptions, l as AttachSandboxFleetMachineOptions, la as TaskSessionChanges, li as SandboxPortBinding, ln as GpuLeaseExecResult, lr as Rollout, lt as EffectiveBackendProfile, m as BackendMcpServerStatus, ma as TeeAttestationOptions, mi as SandboxRuntimeCapabilities, mn as HostAgentRuntimeBackend, mr as RolloutStatus, mt as EnsureDevServerOptions, n as AccessPolicyRule, na as SnapshotOptions, ni as SandboxFleetWorkspace, nn as GitConfig, nr as ReapExpiredSandboxFleetsOptions, nt as DriverConfig, oa as StartupOperation, oi as SandboxIdentity, on as GpuLeaseBilling, or as RenameOptions, ot as DurablePlanDecisionResult, p as BackendManager, pa as TaskSessionProfile, pi as SandboxResources, pn as HostAgentDriverConfig, pr as RolloutStartResult, pt as EgressPolicy, q as DeleteMatchingSandboxesResult, qi as SessionMessage, qn as PromptResult, qr as SandboxFleetPolicy, qt as FleetRunEvent, r as AddUserOptions, ra as SnapshotResult, ri as SandboxFleetWorkspaceReconcileResult, rn as GitDiff, rr as ReapExpiredSandboxFleetsResult, rt as DriverInfo, sa as StorageConfig, si as SandboxInfo, sn as GpuLeaseCommandResult, t as AcceleratorKind, ta as SnapshotInfo, ti as SandboxFleetUsage, tn as GitCommit, tr as PublishPublicTemplateVersionOptions, tt as DriveTurnOptions, u as BackendCapabilities, ua as TaskSessionCommitResult, ui as SandboxPortPreviewLink, un as GpuLeaseManager, ur as RolloutChildResult, ut as EffectiveBackendSource, v as BatchResult, va as TeePublicKeyResponse, vi as SandboxShapesInfo, vn as IntelligenceReportCompareTo, vr as SandboxConfig, vt as ExecResult, w as ChunkedUploadOptions, wa as UploadProgress, wi as SandboxTerminalRequestOptions, wn as ListSandboxFleetOptions, wr as SandboxDeleteOutcome, wt as FileRenameResult, x as BatchTask, xa as TurnDriveResult, xi as SandboxTerminalCreateOptions, xr as SandboxCreateReceipt, xt as FileReadBatchResult, y as BatchRunOptions, ya as TokenRefreshHandler, yi as SandboxStatus, yn as IntelligenceReportSubjectType, yr as SandboxConnection, yt as FileInfo, z as CreateSandboxFleetWithCoordinatorOptions, za as BackendType, zi as SessionEventStreamOptions, zn as ProcessListOptions, zr as SandboxFleetMachineMeteredUsage, zt as FleetDispatchStreamOptions } from "./types-DRyvWIJf.js";
|
|
5
|
+
import { A as isBackendRegistryInteractionKind, C as BackendRegistryEntry, D as backendRegistryEntrySchema, E as backendRegistryCapabilitiesSchema, M as parseBackendRegistryResponseBody, O as backendRegistryInteractionKindSchema, S as BackendRegistryCapabilities, T as BackendRegistryResponse, _ as SandboxFleet, a as Team, b as ParsedSSEEvent, c as SessionBroadcastEvent, d as HostedInstance, f as InstanceProfile, g as InstancesClient, h as InstanceStart, i as Sandbox, j as parseBackendRegistryResponse, k as backendRegistryResponseSchema, l as SessionBroadcastResult, m as InstanceRestartingError, n as IntelligenceClient, o as TeamInvitation, p as InstanceRecord, r as InviteTeamMemberOptions, s as TeamMember, t as CreateTeamOptions, u as EnsureInstanceOptions, v as SandboxFleetClient, w as BackendRegistryInteractionKind, x as parseSSEStream, y as ParseSSEStreamOptions } from "./client-B1I66sl_.js";
|
|
6
6
|
import { _ as TimeoutError, a as FileWriteConflictError, c as NotFoundError, d as ResumeEnvRequiredError, f as SandboxError, g as StateError, h as ServerError, i as EgressProxyRecoveryError, l as PartialFailureError, m as SandboxFailureDetail, n as CapabilityError, o as KeyBudgetExhaustedError, p as SandboxErrorJson, r as EdgeNotReadyError, s as NetworkError, t as AuthError, u as QuotaError, v as ValidationError } from "./errors-CNsmhCen.js";
|
|
7
7
|
import { d as AnyTokenPayload, h as IssueCollaborationTokenOptions, m as CollaborationTokenPayload, p as CollaborationAccess } from "./index-X4EEZlMi.js";
|
|
8
8
|
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-BN7zNEUB.js";
|
|
9
|
-
import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-
|
|
10
|
-
import { o as TangleSandboxClientConfig, t as TangleSandboxClient } from "./index-
|
|
9
|
+
import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-DV-9cNsk.js";
|
|
10
|
+
import { o as TangleSandboxClientConfig, t as TangleSandboxClient } from "./index-CGnI-q1g.js";
|
|
11
11
|
import * as _$_tangle_network_agent_interface0 from "@tangle-network/agent-interface";
|
|
12
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";
|
|
13
13
|
import { z } from "zod";
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { C as normalizeRuntimeBackendConfig, D as ALL_BACKEND_TYPES, E as deriveAgentRunOutcome, O as backendTypeSchema, T as deriveAgentResultOutcome, k as parseBackendType, w as createAgentRunOutcomeTracker, y as parseSSEStream } from "./runtime-api-BZg34WGd.js";
|
|
2
2
|
import { a as FileWriteConflictError, c as NotFoundError, d as ResumeEnvRequiredError, f as SandboxError, g as ValidationError, h as TimeoutError, i as EgressProxyRecoveryError, l as PartialFailureError, m as StateError, n as CapabilityError, o as KeyBudgetExhaustedError, p as ServerError, r as EdgeNotReadyError, s as NetworkError, t as AuthError, u as QuotaError } from "./errors-BkhlSDW-.js";
|
|
3
|
-
import { _ as backendRegistryInteractionKindSchema, a as splitInlineProfileSkills, b as parseBackendRegistryResponse, c as InstanceRestartingError, d as SandboxFleetClient, f as runtimeWorkspaceCwdSchema, g as backendRegistryEntrySchema, h as backendRegistryCapabilitiesSchema, i as splitInlineProfileFileMounts, l as InstancesClient, m as validateBatchRunRequest, n as Sandbox, o as validateDeferredProfileFileMounts, p as createBatchResultAccumulator, r as materializeProfileFileMounts, s as HostedInstance, t as IntelligenceClient, u as SandboxFleet, v as backendRegistryResponseSchema, x as parseBackendRegistryResponseBody, y as isBackendRegistryInteractionKind } from "./client-
|
|
3
|
+
import { _ as backendRegistryInteractionKindSchema, a as splitInlineProfileSkills, b as parseBackendRegistryResponse, c as InstanceRestartingError, d as SandboxFleetClient, f as runtimeWorkspaceCwdSchema, g as backendRegistryEntrySchema, h as backendRegistryCapabilitiesSchema, i as splitInlineProfileFileMounts, l as InstancesClient, m as validateBatchRunRequest, n as Sandbox, o as validateDeferredProfileFileMounts, p as createBatchResultAccumulator, r as materializeProfileFileMounts, s as HostedInstance, t as IntelligenceClient, u as SandboxFleet, v as backendRegistryResponseSchema, x as parseBackendRegistryResponseBody, y as isBackendRegistryInteractionKind } from "./client-BMdV_CeM.js";
|
|
4
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-CVGqjPgs.js";
|
|
5
|
-
import { A as
|
|
5
|
+
import { A as SandboxLines, C as collectAgentFinalMessageText, E as isToolBearingEvent, F as otelTraceIdForTangleTrace, I as toOtelJson, N as buildTraceExportPayload, P as exportTraceBundle, S as applySandboxEventText, T as getSandboxEventText, _ as InteractiveSessionController, b as TERMINAL_WS_ECHO_SUBPROTOCOL, c as MAX_EGRESS_DENIALS_LIMIT, d as InteractiveSessionHandle, f as agentInteractiveSessionPromptRequestDigest, g as BrowserInteractiveSessionController, h as createInteractiveTerminalSession, j as lineInstanceKey, k as LinesClient, l as SandboxTaskSession, m as createInteractiveTerminalCapture, o as WorkspaceImages, p as InteractiveTerminalFrameLog, s as GPU_LEASE_PROVIDER_NAMES, t as SandboxInstance, u as SandboxSession, v as TerminalStream, w as collectAgentResponseText, y as TerminalStreamError } from "./sandbox-DyrDBnjp.js";
|
|
6
6
|
import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-CSHswAOI.js";
|
|
7
|
-
import { t as TangleSandboxClient } from "./tangle-
|
|
7
|
+
import { t as TangleSandboxClient } from "./tangle-BtQkJqfz.js";
|
|
8
8
|
import { SANDBOX_SIZE_PRESET_NAMES, agentProfileConfidentialSchema, agentProfileSchema } from "@tangle-network/agent-interface";
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
//#region src/confidential.ts
|
|
@@ -309,6 +309,28 @@ function serializeToolResult(value) {
|
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
311
|
//#endregion
|
|
312
|
+
//#region src/agent/tools/_binding.ts
|
|
313
|
+
function bindToolSpecs(box, options) {
|
|
314
|
+
const context = {
|
|
315
|
+
box,
|
|
316
|
+
sessionId: options.sessionId,
|
|
317
|
+
previewAuthorize: options.previewAuthorize,
|
|
318
|
+
signal: options.signal
|
|
319
|
+
};
|
|
320
|
+
const handlers = /* @__PURE__ */ new Map();
|
|
321
|
+
return {
|
|
322
|
+
bindings: selectSpecs(options.allow).map((spec) => {
|
|
323
|
+
const handler = spec.makeHandler(context);
|
|
324
|
+
handlers.set(spec.name, handler);
|
|
325
|
+
return {
|
|
326
|
+
spec,
|
|
327
|
+
handler
|
|
328
|
+
};
|
|
329
|
+
}),
|
|
330
|
+
handlers
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
//#endregion
|
|
312
334
|
//#region src/agent/mcp-local.ts
|
|
313
335
|
/**
|
|
314
336
|
* Local MCP (Model Context Protocol) server bridge.
|
|
@@ -373,23 +395,12 @@ async function createMcpServer(box, options = {}) {
|
|
|
373
395
|
} catch {
|
|
374
396
|
throw new Error("createMcpServer(): the `@modelcontextprotocol/sdk` package is not installed. Install it via `pnpm add @modelcontextprotocol/sdk`.");
|
|
375
397
|
}
|
|
376
|
-
const
|
|
377
|
-
const ctx = {
|
|
378
|
-
box,
|
|
379
|
-
sessionId: options.sessionId,
|
|
380
|
-
previewAuthorize: options.previewAuthorize,
|
|
381
|
-
signal: options.signal
|
|
382
|
-
};
|
|
383
|
-
const handlers = /* @__PURE__ */ new Map();
|
|
384
|
-
for (const spec of specs) {
|
|
385
|
-
const handler = spec.makeHandler(ctx);
|
|
386
|
-
handlers.set(spec.name, async (args) => serializeToolResult(await handler(args)));
|
|
387
|
-
}
|
|
398
|
+
const { bindings, handlers } = bindToolSpecs(box, options);
|
|
388
399
|
const server = new serverModule.Server({
|
|
389
400
|
name: options.name ?? "tangle-sandbox",
|
|
390
401
|
version: options.version ?? SDK_VERSION
|
|
391
402
|
}, { capabilities: { tools: {} } });
|
|
392
|
-
server.setRequestHandler(typesModule.ListToolsRequestSchema, async () => ({ tools:
|
|
403
|
+
server.setRequestHandler(typesModule.ListToolsRequestSchema, async () => ({ tools: bindings.map(({ spec: s }) => ({
|
|
393
404
|
name: s.name,
|
|
394
405
|
description: s.description,
|
|
395
406
|
inputSchema: s.inputSchema
|
|
@@ -407,7 +418,7 @@ async function createMcpServer(box, options = {}) {
|
|
|
407
418
|
try {
|
|
408
419
|
return { content: [{
|
|
409
420
|
type: "text",
|
|
410
|
-
text: await handler(r.params.arguments ?? {})
|
|
421
|
+
text: serializeToolResult(await handler(r.params.arguments ?? {}))
|
|
411
422
|
}] };
|
|
412
423
|
} catch (err) {
|
|
413
424
|
return {
|
|
@@ -426,4 +437,4 @@ async function createMcpServer(box, options = {}) {
|
|
|
426
437
|
};
|
|
427
438
|
}
|
|
428
439
|
//#endregion
|
|
429
|
-
export {
|
|
440
|
+
export { TOOL_SPECS as a, ALL_TOOL_SPECS as i, mcp_local_exports as n, serializeToolResult as o, bindToolSpecs as r, createMcpServer as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as SandboxInstance } from "./sandbox-
|
|
2
|
-
import { Pn as PreviewLinkInfo, mt as EnsureDevServerOptions } from "./types-
|
|
3
|
-
import { i as Sandbox } from "./client-
|
|
1
|
+
import { r as SandboxInstance } from "./sandbox-BMSWYvdP.js";
|
|
2
|
+
import { Pn as PreviewLinkInfo, mt as EnsureDevServerOptions } from "./types-DRyvWIJf.js";
|
|
3
|
+
import { i as Sandbox } from "./client-B1I66sl_.js";
|
|
4
4
|
|
|
5
5
|
//#region src/agent/preview-operations.d.ts
|
|
6
6
|
type AgentPreviewOptions = Pick<EnsureDevServerOptions, "sessionId" | "cwd"> & {
|
package/dist/runtime.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as CommitTaskSessionOptions, At as FileUsageResult, Bi as SessionExecutionInfo, Ci as SandboxTerminalManager, Dt as FileTreeOptions, Er as SandboxEvent, Fi as SendSessionMessageOptions, H as CreateTaskSessionOptions, Ii as SendSessionMessageRequest, Ji as SessionMessageAdmission, Li as SentSessionMessage, Ot as FileTreeResult, Si as SandboxTerminalInfo, Sn as ListMessagesOptions, T as ChunkedUploadResult, V as CreateSessionOptions, Vi as SessionExecutionStatus, Wi as SessionInfo, bt as FileReadBatchOptions, fa as TaskSessionInfo, hi as SandboxRuntimeHealth, jt as FileWriteResult, ka as WriteFileOptions, kt as FileUsageOptions, la as TaskSessionChanges, li as SandboxPortBinding, or as RenameOptions, qi as SessionMessage, ua as TaskSessionCommitResult, w as ChunkedUploadOptions, wa as UploadProgress, wi as SandboxTerminalRequestOptions, wt as FileRenameResult, xi as SandboxTerminalCreateOptions, xt as FileReadBatchResult, zi as SessionEventStreamOptions } from "./types-
|
|
1
|
+
import { A as CommitTaskSessionOptions, At as FileUsageResult, Bi as SessionExecutionInfo, Ci as SandboxTerminalManager, Dt as FileTreeOptions, Er as SandboxEvent, Fi as SendSessionMessageOptions, H as CreateTaskSessionOptions, Ii as SendSessionMessageRequest, Ji as SessionMessageAdmission, Li as SentSessionMessage, Ot as FileTreeResult, Si as SandboxTerminalInfo, Sn as ListMessagesOptions, T as ChunkedUploadResult, V as CreateSessionOptions, Vi as SessionExecutionStatus, Wi as SessionInfo, bt as FileReadBatchOptions, fa as TaskSessionInfo, hi as SandboxRuntimeHealth, jt as FileWriteResult, ka as WriteFileOptions, kt as FileUsageOptions, la as TaskSessionChanges, li as SandboxPortBinding, or as RenameOptions, qi as SessionMessage, ua as TaskSessionCommitResult, w as ChunkedUploadOptions, wa as UploadProgress, wi as SandboxTerminalRequestOptions, wt as FileRenameResult, xi as SandboxTerminalCreateOptions, xt as FileReadBatchResult, zi as SessionEventStreamOptions } from "./types-DRyvWIJf.js";
|
|
2
2
|
import { _ as TimeoutError, a as FileWriteConflictError, c as NotFoundError, f as SandboxError, g as StateError, h as ServerError, l as PartialFailureError, m as SandboxFailureDetail, n as CapabilityError, p as SandboxErrorJson, s as NetworkError, t as AuthError, u as QuotaError, v as ValidationError } from "./errors-CNsmhCen.js";
|
|
3
|
-
import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-
|
|
3
|
+
import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-DV-9cNsk.js";
|
|
4
4
|
|
|
5
5
|
//#region src/lib/chunked-upload.d.ts
|
|
6
6
|
/** The transport a caller wires this module to — {@link SandboxInstance.runtimeFetch}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as TerminalStreamReconnectAuthority, c as MintScopedTokenOptions, h as TerminalReadyInfo, l as ScopedToken, r as TerminalStreamHandlers, t as TerminalStream } from "./terminal-stream-BW4veIsI.js";
|
|
2
2
|
import { a as InteractiveSessionControlController, c as InteractiveSessionIdentity, d as InteractiveAttachOptions, f as InteractiveControlClaimAcknowledgement, h as InteractiveSessionStatus, m as InteractiveRequestOptions, n as BrowserInteractiveSessionControlControllerOptions, o as InteractiveSessionControlControllerOptions, p as InteractiveControlClaimOptions, s as InteractiveSessionControlTransport } from "./browser-interactive-control-controller-knjCl8Zp.js";
|
|
3
|
-
import { A as CommitTaskSessionOptions, Aa as WriteManyFile, An as NetworkManager, B as CreateSandboxOptions, Bi as SessionExecutionInfo, C as BranchOptions, Cr as SandboxDeleteOptions, D as CodeExecutionResult, Da as WaitForRolloutOptions, E as CodeExecutionOptions, Ea as WaitForOptions, Ei as SandboxTraceBundle, Er as SandboxEvent, Fi as SendSessionMessageOptions, Fn as PreviewLinkManager, Gi as SessionInterruptOptions, Gn as PromptInputPart, H as CreateTaskSessionOptions, Ii as SendSessionMessageRequest, Ji as SessionMessageAdmission, Jn as ProvisionEvent, Ki as SessionListOptions, Kn as PromptOptions, Li as SentSessionMessage, M as ConversationTurnOptions, Mi as SearchOptions, N as ConversationTurnResult, Nn as PermissionsManager, O as CodeLanguage, Oa as WorkspaceOperationLookup, Q as DispatchedSession, Qi as SnapshotDeleteAcknowledgement, Sn as ListMessagesOptions, Sr as SandboxDeleteAcknowledgement, Ti as SandboxTerminals, Tt as FileSystem, Ui as SessionForkOptions, V as CreateSessionOptions, Vn as ProcessManager, Wi as SessionInfo, Xi as SessionResultOptions, Xt as ForkIdempotency, Yn as ProvisionResult, Yt as ForkCounts, Z as DispatchPromptOptions, Zr as SandboxFleetTraceBundle, Zt as ForkLookupOptions, _n as IntelligenceReportBudget, _r as SSHCredentials, _t as ExecOptions, aa as StartupDiagnostics, an as GpuLease, at as DurablePlan, bi as SandboxTerminalAttachOptions, bn as IntelligenceReportWindow, cr as ResumeOptions, d as BackendConfig, dr as RolloutOptions, en as GitBranch, fa as TaskSessionInfo, fi as SandboxResourceUsage, ft as EgressManager, ga as TeeAttestationResponse, gi as SandboxShape, gn as IntelligenceReport, gr as SSHCommandDescriptor, hi as SandboxRuntimeHealth, hn as InstalledTool, ht as EventStreamOptions, in as GitStatus, j as CompletedTurnResult, ja as WriteManyOptions, ji as SearchMatch, jt as FileWriteResult, ka as WriteFileOptions, ki as SandboxTraceOptions, la as TaskSessionChanges, li as SandboxPortBinding, lr as Rollout, ma as TeeAttestationOptions, mi as SandboxRuntimeCapabilities, na as SnapshotOptions, ot as DurablePlanDecisionResult, p as BackendManager, pr as RolloutStartResult, qi as SessionMessage, qn as PromptResult, ra as SnapshotResult, rn as GitDiff, rt as DriverInfo, si as SandboxInfo, sr as RestoreSnapshotOptions, ta as SnapshotInfo, tn as GitCommit, tt as DriveTurnOptions, ua as TaskSessionCommitResult, un as GpuLeaseManager, va as TeePublicKeyResponse, vn as IntelligenceReportCompareTo, vt as ExecResult, xa as TurnDriveResult, xn as JsonValue, xr as SandboxCreateReceipt, yi as SandboxStatus, yr as SandboxConnection, zi as SessionEventStreamOptions } from "./types-
|
|
3
|
+
import { A as CommitTaskSessionOptions, Aa as WriteManyFile, An as NetworkManager, B as CreateSandboxOptions, Bi as SessionExecutionInfo, C as BranchOptions, Cr as SandboxDeleteOptions, D as CodeExecutionResult, Da as WaitForRolloutOptions, E as CodeExecutionOptions, Ea as WaitForOptions, Ei as SandboxTraceBundle, Er as SandboxEvent, Fi as SendSessionMessageOptions, Fn as PreviewLinkManager, Gi as SessionInterruptOptions, Gn as PromptInputPart, H as CreateTaskSessionOptions, Ii as SendSessionMessageRequest, Ji as SessionMessageAdmission, Jn as ProvisionEvent, Ki as SessionListOptions, Kn as PromptOptions, Li as SentSessionMessage, M as ConversationTurnOptions, Mi as SearchOptions, N as ConversationTurnResult, Nn as PermissionsManager, O as CodeLanguage, Oa as WorkspaceOperationLookup, Q as DispatchedSession, Qi as SnapshotDeleteAcknowledgement, Sn as ListMessagesOptions, Sr as SandboxDeleteAcknowledgement, Ti as SandboxTerminals, Tt as FileSystem, Ui as SessionForkOptions, V as CreateSessionOptions, Vn as ProcessManager, Wi as SessionInfo, Xi as SessionResultOptions, Xt as ForkIdempotency, Yn as ProvisionResult, Yt as ForkCounts, Z as DispatchPromptOptions, Zr as SandboxFleetTraceBundle, Zt as ForkLookupOptions, _n as IntelligenceReportBudget, _r as SSHCredentials, _t as ExecOptions, aa as StartupDiagnostics, an as GpuLease, at as DurablePlan, bi as SandboxTerminalAttachOptions, bn as IntelligenceReportWindow, cr as ResumeOptions, d as BackendConfig, dr as RolloutOptions, en as GitBranch, fa as TaskSessionInfo, fi as SandboxResourceUsage, ft as EgressManager, ga as TeeAttestationResponse, gi as SandboxShape, gn as IntelligenceReport, gr as SSHCommandDescriptor, hi as SandboxRuntimeHealth, hn as InstalledTool, ht as EventStreamOptions, in as GitStatus, j as CompletedTurnResult, ja as WriteManyOptions, ji as SearchMatch, jt as FileWriteResult, ka as WriteFileOptions, ki as SandboxTraceOptions, la as TaskSessionChanges, li as SandboxPortBinding, lr as Rollout, ma as TeeAttestationOptions, mi as SandboxRuntimeCapabilities, na as SnapshotOptions, ot as DurablePlanDecisionResult, p as BackendManager, pr as RolloutStartResult, qi as SessionMessage, qn as PromptResult, ra as SnapshotResult, rn as GitDiff, rt as DriverInfo, si as SandboxInfo, sr as RestoreSnapshotOptions, ta as SnapshotInfo, tn as GitCommit, tt as DriveTurnOptions, ua as TaskSessionCommitResult, un as GpuLeaseManager, va as TeePublicKeyResponse, vn as IntelligenceReportCompareTo, vt as ExecResult, xa as TurnDriveResult, xn as JsonValue, xr as SandboxCreateReceipt, yi as SandboxStatus, yr as SandboxConnection, zi as SessionEventStreamOptions } from "./types-DRyvWIJf.js";
|
|
4
4
|
import { AgentInteractiveSessionAttach, AgentInteractiveSessionControlClaim, AgentInteractiveSessionControlClaimAcknowledgement, AgentInteractiveSessionControlClaimRequest, AgentInteractiveSessionPromptAcknowledgement, AgentInteractiveSessionPromptCommand, AgentInteractiveSessionRef, AgentInteractiveSessionStart, AgentInteractiveSessionStopAcknowledgement, AgentInteractiveSessionStopCommand, AgentInteractiveTerminalSession, AgentInteractiveTerminalSession as AgentInteractiveTerminalSession$1, AgentRunCancellationAcknowledgement, AgentRunCancellationRequest, InteractionAcknowledgement, InteractionData, InteractionRequest, InteractionResponseCommand, TerminalOutputEvent, TerminalReplayWindow, agentInteractiveSessionPromptRequestDigest } from "@tangle-network/agent-interface";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
|
|
@@ -815,8 +815,11 @@ type RawEvidenceExport = {
|
|
|
815
815
|
sessionId: string;
|
|
816
816
|
backendType: string;
|
|
817
817
|
nativeSessionId: string;
|
|
818
|
+
proofStatus: "verified" | "unverified";
|
|
819
|
+
containerId?: string;
|
|
818
820
|
sidecarImageDigest: string;
|
|
819
821
|
sidecarBundleRevision: string;
|
|
822
|
+
sidecarBundleChecksum?: string;
|
|
820
823
|
nativeRoots: Array<{
|
|
821
824
|
rootScope: "session-home" | "workspace-session";
|
|
822
825
|
path: string;
|
|
@@ -1321,6 +1324,8 @@ declare class SandboxInstance {
|
|
|
1321
1324
|
* ```
|
|
1322
1325
|
*/
|
|
1323
1326
|
createReceipt(): SandboxCreateReceipt | null;
|
|
1327
|
+
/** Verified identity of the currently running container, if available. */
|
|
1328
|
+
captureProof(): SandboxCreateReceipt["captureProof"] | null;
|
|
1324
1329
|
/**
|
|
1325
1330
|
* Serialize to the public sandbox shape for logs and structured
|
|
1326
1331
|
* output. Secrets in `connection` (currently `authToken`) are
|
|
@@ -3745,6 +3745,18 @@ const SANDBOX_CREATE_OUTCOMES = [
|
|
|
3745
3745
|
* An outcome this SDK version does not know becomes `unknown`: only a known
|
|
3746
3746
|
* `created` proves that the call allocated the environment.
|
|
3747
3747
|
*/
|
|
3748
|
+
function normalizeCaptureProof(raw) {
|
|
3749
|
+
if (!raw || typeof raw !== "object") return null;
|
|
3750
|
+
const proof = raw;
|
|
3751
|
+
if (typeof proof.hostId !== "string" || proof.hostId.length === 0 || typeof proof.containerId !== "string" || !/^[a-f0-9]{64}$/.test(proof.containerId) || typeof proof.imageId !== "string" || !/^sha256:[a-f0-9]{64}$/.test(proof.imageId) || typeof proof.bundleRevision !== "string" || !/^[a-f0-9]{40}$/.test(proof.bundleRevision) || typeof proof.bundleChecksum !== "string" || !/^sha256:[a-f0-9]{64}$/.test(proof.bundleChecksum)) return null;
|
|
3752
|
+
return {
|
|
3753
|
+
hostId: proof.hostId,
|
|
3754
|
+
containerId: proof.containerId,
|
|
3755
|
+
imageId: proof.imageId,
|
|
3756
|
+
bundleRevision: proof.bundleRevision,
|
|
3757
|
+
bundleChecksum: proof.bundleChecksum
|
|
3758
|
+
};
|
|
3759
|
+
}
|
|
3748
3760
|
function normalizeSandboxCreateReceipt(raw) {
|
|
3749
3761
|
if (!raw || typeof raw !== "object") return null;
|
|
3750
3762
|
const record = raw;
|
|
@@ -3756,7 +3768,8 @@ function normalizeSandboxCreateReceipt(raw) {
|
|
|
3756
3768
|
outcome,
|
|
3757
3769
|
idempotencyKeyApplied,
|
|
3758
3770
|
...record.ownerContext === "inherit" || record.ownerContext === "isolated" ? { ownerContext: record.ownerContext } : {},
|
|
3759
|
-
...injectedSecrets ? { injectedSecrets } : {}
|
|
3771
|
+
...injectedSecrets ? { injectedSecrets } : {},
|
|
3772
|
+
...normalizeCaptureProof(record.captureProof) ? { captureProof: normalizeCaptureProof(record.captureProof) ?? void 0 } : {}
|
|
3760
3773
|
};
|
|
3761
3774
|
}
|
|
3762
3775
|
/**
|
|
@@ -4276,6 +4289,10 @@ var SandboxInstance = class SandboxInstance {
|
|
|
4276
4289
|
createReceipt() {
|
|
4277
4290
|
return this.info.createReceipt ?? null;
|
|
4278
4291
|
}
|
|
4292
|
+
/** Verified identity of the currently running container, if available. */
|
|
4293
|
+
captureProof() {
|
|
4294
|
+
return this.info.captureProof ?? null;
|
|
4295
|
+
}
|
|
4279
4296
|
/**
|
|
4280
4297
|
* Serialize to the public sandbox shape for logs and structured
|
|
4281
4298
|
* output. Secrets in `connection` (currently `authToken`) are
|
|
@@ -8039,6 +8056,7 @@ var SandboxInstance = class SandboxInstance {
|
|
|
8039
8056
|
status: data.status ?? "pending",
|
|
8040
8057
|
connection,
|
|
8041
8058
|
metadata: data.metadata,
|
|
8059
|
+
captureProof: normalizeCaptureProof(data.captureProof) ?? void 0,
|
|
8042
8060
|
createdAt: data.createdAt ? new Date(data.createdAt) : this.info.createdAt,
|
|
8043
8061
|
startedAt: data.startedAt ? new Date(data.startedAt) : void 0,
|
|
8044
8062
|
lastActivityAt: data.lastActivityAt ? new Date(data.lastActivityAt) : void 0,
|
|
@@ -8597,6 +8615,7 @@ var SandboxInstance = class SandboxInstance {
|
|
|
8597
8615
|
/** @internal — invoked before the sandbox is deleted. */
|
|
8598
8616
|
async _sessionRawEvidence(id) {
|
|
8599
8617
|
await this.ensureRunning();
|
|
8618
|
+
await this.refresh();
|
|
8600
8619
|
const response = await this.runtimeFetch(`/agents/sessions/${encodeURIComponent(id)}/raw-evidence`);
|
|
8601
8620
|
if (!response.ok && response.status !== 404) throw parseErrorResponse(response.status, await response.text(), void 0, response.headers);
|
|
8602
8621
|
const raw = await response.json();
|
|
@@ -8607,7 +8626,9 @@ var SandboxInstance = class SandboxInstance {
|
|
|
8607
8626
|
return record;
|
|
8608
8627
|
}
|
|
8609
8628
|
const completeness = record.completeness;
|
|
8610
|
-
if (record.status !== "captured" || record.sessionId !== id || typeof record.backendType !== "string" || typeof record.nativeSessionId !== "string" || typeof record.sidecarImageDigest !== "string" || !/^sha256:[a-f0-9]{64}$/.test(record.sidecarImageDigest) || typeof record.sidecarBundleRevision !== "string" || !/^[a-f0-9]{40}$/.test(record.sidecarBundleRevision) || !Array.isArray(record.nativeRoots) || !Array.isArray(record.files) || !Array.isArray(record.excluded) || !Array.isArray(record.processIo) || !Array.isArray(record.processTerminals) || !Array.isArray(record.events) || typeof record.inventory !== "object" || record.inventory === null || completeness?.nativeStore !== true || completeness.processIo !== true || completeness.events !== true || record.coverageComplete !== true) throw new ServerError("Malformed raw evidence response");
|
|
8629
|
+
if (record.status !== "captured" || record.sessionId !== id || typeof record.backendType !== "string" || typeof record.nativeSessionId !== "string" || record.proofStatus !== "verified" && record.proofStatus !== "unverified" || record.proofStatus === "verified" && (typeof record.containerId !== "string" || !/^[a-f0-9]{64}$/.test(record.containerId) || typeof record.sidecarBundleChecksum !== "string" || !/^sha256:[a-f0-9]{64}$/.test(record.sidecarBundleChecksum)) || typeof record.sidecarImageDigest !== "string" || !/^sha256:[a-f0-9]{64}$/.test(record.sidecarImageDigest) || typeof record.sidecarBundleRevision !== "string" || !/^[a-f0-9]{40}$/.test(record.sidecarBundleRevision) || !Array.isArray(record.nativeRoots) || !Array.isArray(record.files) || !Array.isArray(record.excluded) || !Array.isArray(record.processIo) || !Array.isArray(record.processTerminals) || !Array.isArray(record.events) || typeof record.inventory !== "object" || record.inventory === null || completeness?.nativeStore !== true || completeness.processIo !== true || completeness.events !== true || record.coverageComplete !== true) throw new ServerError("Malformed raw evidence response");
|
|
8630
|
+
const expected = this.info.captureProof;
|
|
8631
|
+
if (expected && (record.proofStatus !== "verified" || record.containerId !== expected.containerId || record.sidecarImageDigest !== expected.imageId || record.sidecarBundleRevision !== expected.bundleRevision || record.sidecarBundleChecksum !== expected.bundleChecksum)) throw new ServerError("Raw evidence does not match current container capture proof");
|
|
8611
8632
|
return record;
|
|
8612
8633
|
}
|
|
8613
8634
|
/** @internal — invoked by SandboxSession.runs(). */
|
|
@@ -9005,4 +9026,4 @@ function quoteForShell(value) {
|
|
|
9005
9026
|
return `'${value.replace(/'/g, "'\\''")}'`;
|
|
9006
9027
|
}
|
|
9007
9028
|
//#endregion
|
|
9008
|
-
export {
|
|
9029
|
+
export { SandboxLines as A, collectAgentFinalMessageText as C, normalizeConnection as D, isToolBearingEvent as E, otelTraceIdForTangleTrace as F, toOtelJson as I, rewrapResponse as M, buildTraceExportPayload as N, normalizeSandboxShape as O, exportTraceBundle as P, applySandboxEventText as S, getSandboxEventText as T, InteractiveSessionController as _, normalizeStartupDiagnostics as a, TERMINAL_WS_ECHO_SUBPROTOCOL as b, MAX_EGRESS_DENIALS_LIMIT as c, InteractiveSessionHandle as d, agentInteractiveSessionPromptRequestDigest as f, BrowserInteractiveSessionController as g, createInteractiveTerminalSession as h, normalizeSandboxCreateReceipt as i, lineInstanceKey as j, LinesClient as k, SandboxTaskSession as l, createInteractiveTerminalCapture as m, createSandboxInstanceFromResponse as n, WorkspaceImages as o, InteractiveTerminalFrameLog as p, normalizeCaptureProof as r, GPU_LEASE_PROVIDER_NAMES as s, SandboxInstance as t, SandboxSession as u, TerminalStream as v, collectAgentResponseText as w, requestInteractiveSessionToken as x, TerminalStreamError as y };
|
package/dist/tangle/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as TANGLE_JOBS_CONTRACT, c as ITangleJobsAbi, d as SandboxCreateResponseParamTypes, f as SandboxIdParamTypes, i as TANGLE_CHAIN_ID, l as JsonResponseParamTypes, n as JOB_SANDBOX_CREATE, o as TangleSandboxClientConfig, r as JOB_SANDBOX_DELETE, s as AgentSandboxBlueprintAbi, t as TangleSandboxClient, u as SandboxCreateParamTypes } from "../index-
|
|
1
|
+
import { a as TANGLE_JOBS_CONTRACT, c as ITangleJobsAbi, d as SandboxCreateResponseParamTypes, f as SandboxIdParamTypes, i as TANGLE_CHAIN_ID, l as JsonResponseParamTypes, n as JOB_SANDBOX_CREATE, o as TangleSandboxClientConfig, r as JOB_SANDBOX_DELETE, s as AgentSandboxBlueprintAbi, t as TangleSandboxClient, u as SandboxCreateParamTypes } from "../index-CGnI-q1g.js";
|
|
2
2
|
export { AgentSandboxBlueprintAbi, ITangleJobsAbi, JOB_SANDBOX_CREATE, JOB_SANDBOX_DELETE, JsonResponseParamTypes, SandboxCreateParamTypes, SandboxCreateResponseParamTypes, SandboxIdParamTypes, TANGLE_CHAIN_ID, TANGLE_JOBS_CONTRACT, TangleSandboxClient, TangleSandboxClientConfig };
|
package/dist/tangle/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as TANGLE_JOBS_CONTRACT, c as JsonResponseParamTypes, d as SandboxIdParamTypes, i as TANGLE_CHAIN_ID, l as SandboxCreateParamTypes, n as JOB_SANDBOX_CREATE, o as AgentSandboxBlueprintAbi, r as JOB_SANDBOX_DELETE, s as ITangleJobsAbi, t as TangleSandboxClient, u as SandboxCreateResponseParamTypes } from "../tangle-
|
|
1
|
+
import { a as TANGLE_JOBS_CONTRACT, c as JsonResponseParamTypes, d as SandboxIdParamTypes, i as TANGLE_CHAIN_ID, l as SandboxCreateParamTypes, n as JOB_SANDBOX_CREATE, o as AgentSandboxBlueprintAbi, r as JOB_SANDBOX_DELETE, s as ITangleJobsAbi, t as TangleSandboxClient, u as SandboxCreateResponseParamTypes } from "../tangle-BtQkJqfz.js";
|
|
2
2
|
export { AgentSandboxBlueprintAbi, ITangleJobsAbi, JOB_SANDBOX_CREATE, JOB_SANDBOX_DELETE, JsonResponseParamTypes, SandboxCreateParamTypes, SandboxCreateResponseParamTypes, SandboxIdParamTypes, TANGLE_CHAIN_ID, TANGLE_JOBS_CONTRACT, TangleSandboxClient };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ as parseErrorResponse } from "./errors-BkhlSDW-.js";
|
|
2
|
-
import { n as createSandboxInstanceFromResponse } from "./sandbox-
|
|
2
|
+
import { n as createSandboxInstanceFromResponse } from "./sandbox-DyrDBnjp.js";
|
|
3
3
|
//#region src/tangle/abi.ts
|
|
4
4
|
/**
|
|
5
5
|
* Tangle Contract ABI Definitions
|
|
@@ -1456,6 +1456,8 @@ interface SandboxShapesInfo {
|
|
|
1456
1456
|
interface CreateSandboxOptions {
|
|
1457
1457
|
/** Suppress implicit owner secrets, startup scripts, and Hub authority. */
|
|
1458
1458
|
ownerContext?: "inherit" | "isolated";
|
|
1459
|
+
/** Require proven native session capture on the selected host. */
|
|
1460
|
+
requireNativeSessionCapture?: boolean;
|
|
1459
1461
|
/**
|
|
1460
1462
|
* Environment or container image to run.
|
|
1461
1463
|
*
|
|
@@ -2010,6 +2012,14 @@ interface SandboxCreateReceipt {
|
|
|
2010
2012
|
* on a platform old enough not to report the set.
|
|
2011
2013
|
*/
|
|
2012
2014
|
injectedSecrets?: string[];
|
|
2015
|
+
/** Host-confirmed identity of the container whose native rollout is retained. */
|
|
2016
|
+
captureProof?: {
|
|
2017
|
+
hostId: string;
|
|
2018
|
+
containerId: string;
|
|
2019
|
+
imageId: string;
|
|
2020
|
+
bundleRevision: string;
|
|
2021
|
+
bundleChecksum: string;
|
|
2022
|
+
};
|
|
2013
2023
|
}
|
|
2014
2024
|
/**
|
|
2015
2025
|
* Full sandbox information returned from the API.
|
|
@@ -2031,6 +2041,8 @@ interface SandboxInfo {
|
|
|
2031
2041
|
connection?: SandboxConnection;
|
|
2032
2042
|
/** Custom metadata */
|
|
2033
2043
|
metadata?: Record<string, unknown>;
|
|
2044
|
+
/** Verified current container identity, available on create and get. */
|
|
2045
|
+
captureProof?: SandboxCreateReceipt["captureProof"];
|
|
2034
2046
|
/** When the sandbox was created */
|
|
2035
2047
|
createdAt: Date;
|
|
2036
2048
|
/** When the sandbox started running */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/sandbox",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.58.0",
|
|
4
4
|
"description": "Client SDK for the Tangle Sandbox platform - build AI agent applications with dev containers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -143,10 +143,10 @@
|
|
|
143
143
|
"ws": "^8.20.0",
|
|
144
144
|
"yjs": "13.6.30",
|
|
145
145
|
"@repo/shared": "0.0.0",
|
|
146
|
-
"@tangle-network/
|
|
147
|
-
"@tangle-network/
|
|
148
|
-
"@tangle-network/
|
|
149
|
-
"@tangle-network/
|
|
146
|
+
"@tangle-network/agent-profile-materialize": "0.20.4",
|
|
147
|
+
"@tangle-network/cli-agent-registry": "0.4.13",
|
|
148
|
+
"@tangle-network/runtime-contracts": "0.10.0",
|
|
149
|
+
"@tangle-network/sse-core": "0.0.0"
|
|
150
150
|
},
|
|
151
151
|
"scripts": {
|
|
152
152
|
"build": "node scripts/build-dist.mjs",
|