@tangle-network/sandbox 1.0.237 → 1.0.239
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/index.d.ts +4 -4
- package/dist/agent/index.js +4 -4
- package/dist/agent/preview.d.ts +1 -1
- package/dist/agent/preview.js +2 -2
- package/dist/{agent-execution-preparation-BJChICex.js → agent-execution-preparation-CjKTjmJ9.js} +3 -3
- package/dist/{agent-execution-preparation-receipt-BIFxqyr5.js → agent-execution-preparation-receipt-AihkqLnd.js} +4 -4
- package/dist/{agent-run-outcome-DkEeNhH6.d.ts → agent-run-outcome-DrhA0Z4S.d.ts} +2 -2
- package/dist/{api-request-Cm1H_xsv.js → api-request-C7JAklv7.js} +1 -1
- package/dist/auth/index.d.ts +2 -2
- package/dist/auth/index.js +2 -2
- package/dist/{browser-interactive-control-controller-JSGfFeNB.d.ts → browser-interactive-control-controller-9RauUsHw.d.ts} +1 -1
- package/dist/{browser-interactive-control-controller-CrBx8ETe.js → browser-interactive-control-controller-bap2mKa-.js} +14 -14
- package/dist/cli-auth-bundle-BinY89CX.js +2 -0
- package/dist/{cli-auth-bundle-C6DtK7GX-mBUPER0R.js → cli-auth-bundle-C6DtK7GX-DoqlFTT-.js} +1 -1
- package/dist/{client-Crwo3vqo.js → client-DjgUvely.js} +18 -115
- package/dist/{client-Cy6Zlb3W.d.ts → client-DsXWyLrM.d.ts} +79 -114
- package/dist/collaboration/index.d.ts +1 -1
- package/dist/collaboration/index.js +1 -1
- package/dist/{collaboration-k3yUVGgP.js → collaboration-klNBRyda.js} +1 -1
- package/dist/core.d.ts +6 -6
- package/dist/core.js +3 -3
- package/dist/{file-download-DXgIe-CV.js → file-download-CihyMYH-.js} +1 -1
- package/dist/{harness-DMaNgn0S.js → harness-C5lXV9e5.js} +5 -5
- package/dist/{index-DYxmMGbU.d.ts → index-B_1aVs2B.d.ts} +7 -6
- package/dist/index.d.ts +12 -11
- package/dist/index.js +10 -10
- package/dist/intelligence/index.d.ts +13 -6
- package/dist/intelligence/index.js +60 -8
- package/dist/interactive-control.d.ts +1 -1
- package/dist/interactive-control.js +1 -1
- package/dist/{interactive-controller-DaBe9oR5.d.ts → interactive-controller-C2vOFe0u.d.ts} +3 -3
- package/dist/{interactive-controller-mqraKMkh.js → interactive-controller-CbWMfA4f.js} +5 -5
- package/dist/{lines-DfKFyMTA.d.ts → lines-CxWFuuJ3.d.ts} +1 -1
- package/dist/lines.d.ts +1 -1
- package/dist/{local-cli-auth-CO0byocv.js → local-cli-auth-DrNihS9-.js} +1 -1
- package/dist/{mcp-local-DV-BvoUI.js → mcp-local-Bfrna88t.js} +2 -2
- package/dist/{preview-BqicYuSJ.d.ts → preview-DFFaAZdF.d.ts} +3 -3
- package/dist/{profile-schema-C1KpT-wS.js → profile-schema-C0n0VgmA.js} +468 -36
- package/dist/{public-templates-Bk843Kqc.d.ts → public-templates-xqtPv6pg.d.ts} +2 -2
- package/dist/public-templates.d.ts +1 -1
- package/dist/{raw-evidence-archive-XEDh0VUj.js → raw-evidence-archive-DLNEUdij.js} +3 -15
- package/dist/raw-evidence-export-C0ieFpi2.d.ts +354 -0
- package/dist/raw-evidence-export-C6Xdl3nC.js +19 -0
- package/dist/runtime.d.ts +5 -5
- package/dist/runtime.js +3 -3
- package/dist/{sandbox-DnuEGRn4.js → sandbox-eUHRN1gu.js} +79 -72
- package/dist/{select-seat-CntQ4bko.js → select-seat-BHHUFoKh.js} +4 -4
- package/dist/select-seat-command.d.ts +2 -2
- package/dist/select-seat-command.js +1 -1
- package/dist/session-gateway/index.js +1 -1
- package/dist/tangle/index.d.ts +1 -1
- package/dist/tangle/index.js +1 -1
- package/dist/{tangle-DjcPKCqo.js → tangle-JTU0M4Zk.js} +2 -2
- package/dist/{terminal-stream-types-DBQuAsmB.d.ts → terminal-stream-types-D7dMd-NV.d.ts} +28 -20
- package/dist/{types-C8aazs-y.d.ts → types-ImZuAuFG.d.ts} +3 -344
- package/package.json +7 -7
- package/dist/cli-auth-bundle-BLAtE6Dc.js +0 -2
- /package/dist/{chunked-upload-file-JfRw6PRf.js → chunked-upload-file-DtAW52iW.js} +0 -0
- /package/dist/{cli-auth-bundle-B91fSxkR.d.ts → cli-auth-bundle-eUl7Sa1x.d.ts} +0 -0
- /package/dist/{direct-http2-Bgb2lHte.js → direct-http2-zLxsvF44.js} +0 -0
- /package/dist/{index-o31uwAkX.d.ts → index-BTXyTVq4.d.ts} +0 -0
- /package/dist/{index-C-_HY5NY.d.ts → index-ClusTWYM.d.ts} +0 -0
- /package/dist/{sha2-vu4U-x2L.js → sha2-BIoWepwn.js} +0 -0
package/dist/agent/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { I as SandboxTaskSession, O as SandboxInstance, R as SandboxSession } from "../index-
|
|
2
|
-
import { Bt as SandboxFleetParent, Ha as CodeExecutionResult, Ua as CodeLanguage, Ur as CodeExecutionOptions, Wa as CodeResultPart, ga as BackendConfig, ia as SessionListOptions,
|
|
3
|
-
import { t as Sandbox } from "../client-
|
|
4
|
-
import { u as PreviewAuthorizer } from "../preview-
|
|
1
|
+
import { I as SandboxTaskSession, O as SandboxInstance, R as SandboxSession } from "../index-B_1aVs2B.js";
|
|
2
|
+
import { Bt as SandboxFleetParent, Ha as CodeExecutionResult, Ua as CodeLanguage, Ur as CodeExecutionOptions, Wa as CodeResultPart, ga as BackendConfig, ia as SessionListOptions, na as SessionInfo, no as BackendType } from "../types-ImZuAuFG.js";
|
|
3
|
+
import { t as Sandbox } from "../client-DsXWyLrM.js";
|
|
4
|
+
import { u as PreviewAuthorizer } from "../preview-DFFaAZdF.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 TOOL_SPECS, i as ALL_TOOL_SPECS, o as serializeToolResult, r as bindToolSpecs, t as createMcpServer } from "../mcp-local-
|
|
2
|
-
import { D as assertCurrentBackendType } from "../interactive-controller-
|
|
3
|
-
import { t as SandboxInstance } from "../sandbox-
|
|
1
|
+
import { a as TOOL_SPECS, i as ALL_TOOL_SPECS, o as serializeToolResult, r as bindToolSpecs, t as createMcpServer } from "../mcp-local-Bfrna88t.js";
|
|
2
|
+
import { D as assertCurrentBackendType } from "../interactive-controller-CbWMfA4f.js";
|
|
3
|
+
import { t as SandboxInstance } from "../sandbox-eUHRN1gu.js";
|
|
4
4
|
import { O as ValidationError, T as StateError, v as NotFoundError } from "../errors-DQEu-Q7s.js";
|
|
5
|
-
import { t as Sandbox } from "../client-
|
|
5
|
+
import { t as Sandbox } from "../client-DjgUvely.js";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region src/agent/instances.ts
|
|
8
8
|
const managers = /* @__PURE__ */ new WeakMap();
|
package/dist/agent/preview.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as publishAgentPreview, a as previewOperationTool, c as AgentPreviewOptions, d as PreviewExecutionContext, f as PublishAgentPreviewOptions, g as listAgentPreviews, h as getAgentPreview, i as PreviewTool, l as PreviewAuthorizationRequest, m as ensureAgentPreview, n as PREVIEW_MCP_ALIAS, o as previewToolsForProfile, p as assertPreviewId, r as PREVIEW_TOOLS, s as AgentPreviewError, t as servePreviewMcp, u as PreviewAuthorizer, v as removeAgentPreview, y as resolveSelfSandbox } from "../preview-
|
|
1
|
+
import { _ as publishAgentPreview, a as previewOperationTool, c as AgentPreviewOptions, d as PreviewExecutionContext, f as PublishAgentPreviewOptions, g as listAgentPreviews, h as getAgentPreview, i as PreviewTool, l as PreviewAuthorizationRequest, m as ensureAgentPreview, n as PREVIEW_MCP_ALIAS, o as previewToolsForProfile, p as assertPreviewId, r as PREVIEW_TOOLS, s as AgentPreviewError, t as servePreviewMcp, u as PreviewAuthorizer, v as removeAgentPreview, y as resolveSelfSandbox } from "../preview-DFFaAZdF.js";
|
|
2
2
|
export { AgentPreviewError, AgentPreviewOptions, PREVIEW_MCP_ALIAS, PREVIEW_TOOLS, PreviewAuthorizationRequest, PreviewAuthorizer, PreviewExecutionContext, PreviewTool, PublishAgentPreviewOptions, assertPreviewId, ensureAgentPreview, getAgentPreview, listAgentPreviews, previewOperationTool, previewToolsForProfile, publishAgentPreview, removeAgentPreview, resolveSelfSandbox, servePreviewMcp };
|
package/dist/agent/preview.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as agentProfileSchema } from "../profile-schema-
|
|
1
|
+
import { r as agentProfileSchema } from "../profile-schema-C0n0VgmA.js";
|
|
2
2
|
import { a as listAgentPreviews, c as resolveSelfSandbox, i as getAgentPreview, n as assertPreviewId, o as publishAgentPreview, r as ensureAgentPreview, s as removeAgentPreview, t as AgentPreviewError } from "../preview-operations-DWL78boI.js";
|
|
3
3
|
//#region src/agent/preview-policy.ts
|
|
4
4
|
/** Channel-neutral preview tool selection from a host-authored profile. */
|
|
@@ -66,7 +66,7 @@ async function servePreviewMcp(request, config) {
|
|
|
66
66
|
if (typeof config.authorize !== "function") throw new Error("Preview MCP requires a host authorization callback");
|
|
67
67
|
const tools = config.tools ?? PREVIEW_TOOLS;
|
|
68
68
|
if (!tools.length || tools.some((tool) => !PREVIEW_TOOLS.includes(tool))) throw new Error("Preview MCP requires an explicit nonempty preview-only tool grant");
|
|
69
|
-
const [{ createMcpServer }, { WebStandardStreamableHTTPServerTransport }] = await Promise.all([import("../mcp-local-
|
|
69
|
+
const [{ createMcpServer }, { WebStandardStreamableHTTPServerTransport }] = await Promise.all([import("../mcp-local-Bfrna88t.js").then((n) => n.n), import("@modelcontextprotocol/sdk/server/webStandardStreamableHttp.js")]);
|
|
70
70
|
const handle = await createMcpServer(config.box, {
|
|
71
71
|
name: "tangle-previews",
|
|
72
72
|
sessionId: config.sessionId,
|
package/dist/{agent-execution-preparation-BJChICex.js → agent-execution-preparation-CjKTjmJ9.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { o as canonicalCandidateDigest, u as isCanonicalJsonValue } from "./harness-
|
|
2
|
-
import { o as canonicalAgentProfileValue, r as agentProfileSchema } from "./profile-schema-
|
|
3
|
-
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.
|
|
1
|
+
import { o as canonicalCandidateDigest, u as isCanonicalJsonValue } from "./harness-C5lXV9e5.js";
|
|
2
|
+
import { o as canonicalAgentProfileValue, r as agentProfileSchema } from "./profile-schema-C0n0VgmA.js";
|
|
3
|
+
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.19/node_modules/@tangle-network/agent-interface/dist/agent-execution-preparation.js
|
|
4
4
|
/**
|
|
5
5
|
* Canonical RFC 8785/SHA-256 identity for one validated, public AgentProfile.
|
|
6
6
|
* Secret-capable MCP/hook fields are tagged. Other prompt, resource, metadata,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { g as sha256DigestSchema, h as omitTopLevelDigest, m as looksLikeCredential, n as REASONING_EFFORTS, o as canonicalCandidateDigest, p as isWellFormedUnicode, s as canonicalCandidateJson, t as harnessTypeSchema, u as isCanonicalJsonValue } from "./harness-
|
|
1
|
+
import { g as sha256DigestSchema, h as omitTopLevelDigest, m as looksLikeCredential, n as REASONING_EFFORTS, o as canonicalCandidateDigest, p as isWellFormedUnicode, s as canonicalCandidateJson, t as harnessTypeSchema, u as isCanonicalJsonValue } from "./harness-C5lXV9e5.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.
|
|
3
|
+
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.19/node_modules/@tangle-network/agent-interface/dist/agent-workspace-source-snapshot.js
|
|
4
4
|
const controlCharacterPattern = /[\u0000-\u001f\u007f]/;
|
|
5
5
|
/** Shared public identifier used by workspace lifecycle contracts. */
|
|
6
6
|
const agentWorkspacePublicIdentifierSchema = z.string().min(1).max(500).refine((value) => value.trim().length > 0 && isWellFormedUnicode(value) && !controlCharacterPattern.test(value) && !looksLikeCredential(value), "public workspace identity cannot carry credential-like material");
|
|
@@ -11,7 +11,7 @@ const agentWorkspaceSourceSnapshotPolicySchema = z.strictObject({
|
|
|
11
11
|
digest: sha256DigestSchema
|
|
12
12
|
});
|
|
13
13
|
//#endregion
|
|
14
|
-
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.
|
|
14
|
+
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.19/node_modules/@tangle-network/agent-interface/dist/agent-profile-materialization.js
|
|
15
15
|
/**
|
|
16
16
|
* The canonical AgentProfile leaves that can affect one execution.
|
|
17
17
|
*
|
|
@@ -75,7 +75,7 @@ const AGENT_PROFILE_MATERIALIZATION_AXES = [
|
|
|
75
75
|
value: (profile) => profile.model?.[property]
|
|
76
76
|
}))];
|
|
77
77
|
//#endregion
|
|
78
|
-
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.
|
|
78
|
+
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.19/node_modules/@tangle-network/agent-interface/dist/agent-execution-preparation-receipt.js
|
|
79
79
|
const nonBlankStringSchema = z.string().refine((value) => value.trim().length > 0, "value cannot be blank");
|
|
80
80
|
const publicMechanismIdentifierSchema = z.string().regex(/^[A-Za-z0-9][A-Za-z0-9._:/-]{0,199}$/, "mechanism must be a public identifier, not launch arguments").refine((value) => !looksLikeCredential(value), "mechanism cannot carry credential-like material");
|
|
81
81
|
const publicLifecycleIdentifierSchema = z.string().regex(/^[A-Za-z0-9][A-Za-z0-9._~:/+-]{0,499}$/, "lifecycle identity must be a public identifier").refine((value) => !looksLikeCredential(value), "lifecycle identity cannot carry credential-like material");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Tt as InteractionRequest } from "./terminal-stream-types-
|
|
2
|
-
import { Di as SandboxEvent, _i as DurablePlanSnapshot, ci as AgentApprovalRequirement, di as AgentToolInvocation, li as AgentQuestionRequest, ui as AgentRunStatus } from "./types-
|
|
1
|
+
import { Tt as InteractionRequest } from "./terminal-stream-types-D7dMd-NV.js";
|
|
2
|
+
import { Di as SandboxEvent, _i as DurablePlanSnapshot, ci as AgentApprovalRequirement, di as AgentToolInvocation, li as AgentQuestionRequest, ui as AgentRunStatus } from "./types-ImZuAuFG.js";
|
|
3
3
|
|
|
4
4
|
//#region src/agent-run-outcome.d.ts
|
|
5
5
|
interface AgentRunOutcome {
|
|
@@ -30,7 +30,7 @@ function rewrapResponse(original, headers, body = original.body) {
|
|
|
30
30
|
//#endregion
|
|
31
31
|
//#region src/lib/api-request.mjs
|
|
32
32
|
/** The package version tsdown.config.ts defines; unbuilt source reports 0.0.0. */
|
|
33
|
-
const SDK_VERSION = "1.0.
|
|
33
|
+
const SDK_VERSION = "1.0.239";
|
|
34
34
|
function withRequestContextHeaders(response, path, method, body = response.body) {
|
|
35
35
|
const headers = new Headers(response.headers);
|
|
36
36
|
headers.set("x-tangle-request-path", path);
|
package/dist/auth/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { i as materializeCliAuthBundle, n as assertCliAuthReferenceSupported, r as cliAuthReferenceSchema, t as CliAuthReference } from "../cli-auth-bundle-
|
|
2
|
-
import { _ as ReadTokenPayload, a as issueCollaborationToken, c as issueSessionScopedToken, d as AnyTokenPayload, f as BatchScopedTokenPayload, g as ProjectScopedTokenPayload, h as IssueCollaborationTokenOptions, i as issueBatchScopedToken, l as unsafeDecodeToken, m as CollaborationTokenPayload, n as getTokenTTL, o as issueProjectScopedToken, p as CollaborationAccess, r as isTokenExpiringSoon, s as issueReadToken, t as ProductTokenIssuer, u as verifyToken, v as SessionScopedTokenPayload, y as TokenScope } from "../index-
|
|
1
|
+
import { i as materializeCliAuthBundle, n as assertCliAuthReferenceSupported, r as cliAuthReferenceSchema, t as CliAuthReference } from "../cli-auth-bundle-eUl7Sa1x.js";
|
|
2
|
+
import { _ as ReadTokenPayload, a as issueCollaborationToken, c as issueSessionScopedToken, d as AnyTokenPayload, f as BatchScopedTokenPayload, g as ProjectScopedTokenPayload, h as IssueCollaborationTokenOptions, i as issueBatchScopedToken, l as unsafeDecodeToken, m as CollaborationTokenPayload, n as getTokenTTL, o as issueProjectScopedToken, p as CollaborationAccess, r as isTokenExpiringSoon, s as issueReadToken, t as ProductTokenIssuer, u as verifyToken, v as SessionScopedTokenPayload, y as TokenScope } from "../index-ClusTWYM.js";
|
|
3
3
|
export { AnyTokenPayload, BatchScopedTokenPayload, CliAuthReference, CollaborationAccess, CollaborationTokenPayload, IssueCollaborationTokenOptions, ProductTokenIssuer, ProjectScopedTokenPayload, ReadTokenPayload, SessionScopedTokenPayload, TokenScope, assertCliAuthReferenceSupported, cliAuthReferenceSchema, getTokenTTL, isTokenExpiringSoon, issueBatchScopedToken, issueCollaborationToken, issueProjectScopedToken, issueReadToken, issueSessionScopedToken, materializeCliAuthBundle, unsafeDecodeToken, verifyToken };
|
package/dist/auth/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as materializeCliAuthBundle, n as assertCliAuthReferenceSupported, r as cliAuthReferenceSchema } from "../cli-auth-bundle-C6DtK7GX-
|
|
2
|
-
import "../cli-auth-bundle-
|
|
1
|
+
import { i as materializeCliAuthBundle, n as assertCliAuthReferenceSupported, r as cliAuthReferenceSchema } from "../cli-auth-bundle-C6DtK7GX-DoqlFTT-.js";
|
|
2
|
+
import "../cli-auth-bundle-BinY89CX.js";
|
|
3
3
|
//#region src/auth/tokens.ts
|
|
4
4
|
const textEncoder = new TextEncoder();
|
|
5
5
|
const textDecoder = new TextDecoder();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ct as
|
|
1
|
+
import { ct as AgentInteractiveSessionControlClaimAcknowledgement, ft as AgentInteractiveSessionRef, i as TerminalStreamHandlers, lt as AgentInteractiveSessionControlClaimRequest, ot as AgentInteractiveSessionAttach, pt as AgentInteractiveSessionStatus, st as AgentInteractiveSessionControlClaim } from "./terminal-stream-types-D7dMd-NV.js";
|
|
2
2
|
|
|
3
3
|
//#region src/interactive-types.d.ts
|
|
4
4
|
/** Cancellation for an interactive SDK request. */
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { C as boundedIdentifierSchema, D as isBoundedEventContentJson, E as boundedStringSchema, S as boundedEventContentStringSchema, T as boundedJsonSchema, _ as CONTRACT_MAX_ARRAY_LENGTH, b as boundedEventContentJsonSchema, g as sha256DigestSchema, o as canonicalCandidateDigest, w as boundedJsonRecordSchema, x as boundedEventContentRecordSchema, y as CONTRACT_MAX_STRING_LENGTH } from "./harness-
|
|
2
|
-
import { t as agentExecutionPreparationReceiptSchema } from "./agent-execution-preparation-receipt-
|
|
1
|
+
import { C as boundedIdentifierSchema, D as isBoundedEventContentJson, E as boundedStringSchema, S as boundedEventContentStringSchema, T as boundedJsonSchema, _ as CONTRACT_MAX_ARRAY_LENGTH, b as boundedEventContentJsonSchema, g as sha256DigestSchema, o as canonicalCandidateDigest, w as boundedJsonRecordSchema, x as boundedEventContentRecordSchema, y as CONTRACT_MAX_STRING_LENGTH } from "./harness-C5lXV9e5.js";
|
|
2
|
+
import { t as agentExecutionPreparationReceiptSchema } from "./agent-execution-preparation-receipt-AihkqLnd.js";
|
|
3
3
|
import { t as awaitWithAbort } from "./abort-signal-CRxC2dlT.js";
|
|
4
|
-
import { i as fetchSandboxApi } from "./api-request-
|
|
4
|
+
import { i as fetchSandboxApi } from "./api-request-C7JAklv7.js";
|
|
5
5
|
import { z } from "zod";
|
|
6
|
-
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.
|
|
6
|
+
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.19/node_modules/@tangle-network/agent-interface/dist/native-session-event.js
|
|
7
7
|
/**
|
|
8
8
|
* Private adapter observation of a provider conversation or resume identity.
|
|
9
9
|
* The adapter must obtain this ID from its bound provider process or API.
|
|
@@ -18,7 +18,7 @@ const NativeSessionObservedEventSchema = z.object({
|
|
|
18
18
|
nativeSessionId: z.string().min(1).max(512).regex(/^\S+$/u)
|
|
19
19
|
}).strict();
|
|
20
20
|
//#endregion
|
|
21
|
-
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.
|
|
21
|
+
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.19/node_modules/@tangle-network/agent-interface/dist/environment-observation.js
|
|
22
22
|
const ObservationProvenanceSchema = z.strictObject({
|
|
23
23
|
origin: z.enum([
|
|
24
24
|
"measured",
|
|
@@ -210,7 +210,7 @@ z.strictObject({
|
|
|
210
210
|
accountUsage: AccountUsageSchema.optional()
|
|
211
211
|
});
|
|
212
212
|
//#endregion
|
|
213
|
-
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.
|
|
213
|
+
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.19/node_modules/@tangle-network/agent-interface/dist/interaction-fields.js
|
|
214
214
|
/**
|
|
215
215
|
* Field names whose own-key form collides with object internals. A record
|
|
216
216
|
* parser drops a raw `__proto__` key through the legacy prototype setter before
|
|
@@ -391,7 +391,7 @@ z.strictObject({
|
|
|
391
391
|
});
|
|
392
392
|
});
|
|
393
393
|
//#endregion
|
|
394
|
-
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.
|
|
394
|
+
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.19/node_modules/@tangle-network/agent-interface/dist/interaction-data.js
|
|
395
395
|
const InteractionSecretReferenceSchema = z.strictObject({
|
|
396
396
|
kind: z.literal("secret_handle"),
|
|
397
397
|
handleId: boundedIdentifierSchema,
|
|
@@ -436,7 +436,7 @@ const InteractionResolutionSchema = z.discriminatedUnion("outcome", [
|
|
|
436
436
|
})
|
|
437
437
|
]);
|
|
438
438
|
//#endregion
|
|
439
|
-
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.
|
|
439
|
+
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.19/node_modules/@tangle-network/agent-interface/dist/interaction-permissions.js
|
|
440
440
|
const InteractionKind = {
|
|
441
441
|
/** Agent asks the user to answer/choose. Answer = the chosen field values. */
|
|
442
442
|
Question: "question",
|
|
@@ -463,7 +463,7 @@ const PermissionGrantSchema = z.enum([
|
|
|
463
463
|
"deny"
|
|
464
464
|
]);
|
|
465
465
|
//#endregion
|
|
466
|
-
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.
|
|
466
|
+
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.19/node_modules/@tangle-network/agent-interface/dist/interaction-answer-validation.js
|
|
467
467
|
/**
|
|
468
468
|
* Validate an accepted answer against its spec. Used by the broker before a
|
|
469
469
|
* response reaches the adapter, so malformed answers are rejected centrally.
|
|
@@ -568,7 +568,7 @@ function validateInteractionAnswer(spec, data) {
|
|
|
568
568
|
};
|
|
569
569
|
}
|
|
570
570
|
//#endregion
|
|
571
|
-
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.
|
|
571
|
+
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.19/node_modules/@tangle-network/agent-interface/dist/interaction-resolution-validation.js
|
|
572
572
|
/**
|
|
573
573
|
* A declined or cancelled resolution submits no answer, so any secret-typed
|
|
574
574
|
* field it carries can only be leakage into a transport that retains it.
|
|
@@ -606,7 +606,7 @@ function validateResolutionForRequest(request, resolution) {
|
|
|
606
606
|
return errors;
|
|
607
607
|
}
|
|
608
608
|
//#endregion
|
|
609
|
-
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.
|
|
609
|
+
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.19/node_modules/@tangle-network/agent-interface/dist/interaction-envelope.js
|
|
610
610
|
const interactionOutcomeValues = [
|
|
611
611
|
"accepted",
|
|
612
612
|
"declined",
|
|
@@ -810,7 +810,7 @@ const InteractionAcknowledgementSchema = z.strictObject({
|
|
|
810
810
|
});
|
|
811
811
|
});
|
|
812
812
|
//#endregion
|
|
813
|
-
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.
|
|
813
|
+
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.19/node_modules/@tangle-network/agent-interface/dist/plan.js
|
|
814
814
|
/**
|
|
815
815
|
* Credential-free provider correlation committed with the plan. This union is
|
|
816
816
|
* deliberately closed: adding plan support for another harness requires an
|
|
@@ -875,7 +875,7 @@ const AgentExecutionOutcomeSchema = z.discriminatedUnion("type", [z.object({ typ
|
|
|
875
875
|
plan: DurablePlanSchema
|
|
876
876
|
}).strict()]);
|
|
877
877
|
//#endregion
|
|
878
|
-
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.
|
|
878
|
+
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.19/node_modules/@tangle-network/agent-interface/dist/runtime-control.js
|
|
879
879
|
const stableIdSchema = boundedIdentifierSchema;
|
|
880
880
|
const AgentExactRunControlRefSchema = z.strictObject({
|
|
881
881
|
runId: stableIdSchema,
|
|
@@ -1211,7 +1211,7 @@ function sameAgentExactRun(left, right) {
|
|
|
1211
1211
|
return left.runId === right.runId && left.provider === right.provider && left.environmentId === right.environmentId && left.sessionId === right.sessionId && left.executionId === right.executionId && left.requestDigest === right.requestDigest;
|
|
1212
1212
|
}
|
|
1213
1213
|
//#endregion
|
|
1214
|
-
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.
|
|
1214
|
+
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.19/node_modules/@tangle-network/agent-interface/dist/environment-interactive-control.js
|
|
1215
1215
|
/**
|
|
1216
1216
|
* Durable identity of one coding-agent TUI.
|
|
1217
1217
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as agentProfileJsonSchema, r as agentProfileSchema } from "./profile-schema-
|
|
1
|
+
import { n as agentProfileJsonSchema, r as agentProfileSchema } from "./profile-schema-C0n0VgmA.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import "@tangle-network/agent-interface/harness-capabilities";
|
|
4
4
|
//#region ../../../packages/cli-agent-registry/dist/harness-contracts-BZoECCMc.mjs
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { D as assertCurrentBackendType, E as applyRequestedModel, M as withProfileHarness, N as withoutCreateOnlyModelFields, T as isBrowserRuntime, V as backendTypeSchema, k as normalizeRuntimeBackendConfig, o as requestInteractiveSessionToken, x as encodePromptForWire } from "./interactive-controller-
|
|
2
|
-
import { r as agentProfileSchema } from "./profile-schema-
|
|
3
|
-
import { $ as
|
|
1
|
+
import { D as assertCurrentBackendType, E as applyRequestedModel, M as withProfileHarness, N as withoutCreateOnlyModelFields, T as isBrowserRuntime, V as backendTypeSchema, k as normalizeRuntimeBackendConfig, o as requestInteractiveSessionToken, x as encodePromptForWire } from "./interactive-controller-CbWMfA4f.js";
|
|
2
|
+
import { r as agentProfileSchema } from "./profile-schema-C0n0VgmA.js";
|
|
3
|
+
import { $ as isDeployWindowCreateError, B as parseLifecycleTimes, D as splitInlineProfileSkills, E as splitInlineProfileFileMounts, F as normalizeCaptureProof, G as CAPACITY_ETA_MARGIN_MS, H as normalizeEgressPolicyFields, I as normalizeSandboxCreateReceipt, J as awaitCreateResend, K as CAPACITY_ETA_WAIT_MAX_MS, L as normalizeStartupDiagnostics, O as validateDeferredProfileFileMounts, Q as isCapacityShortageCreateError, U as normalizeProxySecretReceipt, V as normalizeConnection, W as normalizeSandboxShape, X as extendableDeadline, Y as createRetryDelayMs, Z as generateIdempotencyKey, d as sandboxLedgerUsd, et as isRateLimitCreateError, k as isRetryableProfileFileMaterializeFailure, n as createSandboxInstanceFromResponse, o as exportTraceBundle, q as DEPLOY_WINDOW_RETRY_MS, tt as isRetryableCreateError, x as deleteSandbox, z as dateOf } from "./sandbox-eUHRN1gu.js";
|
|
4
4
|
import { C as SandboxError, D as TimeoutError, O as ValidationError, _ as NetworkError, a as readResponseJson, c as AuthError, i as parseResponseError, r as parseErrorResponse, v as NotFoundError, w as ServerError, y as PartialFailureError } from "./errors-DQEu-Q7s.js";
|
|
5
5
|
import { n as combineAbortSignals } from "./abort-signal-CRxC2dlT.js";
|
|
6
6
|
import { r as abortableSleep, t as RETRY_POLICY } from "./retry-policy-oW3_ljoc.js";
|
|
7
|
-
import { i as fetchSandboxApi, n as SDK_TIMEOUTS } from "./api-request-
|
|
7
|
+
import { i as fetchSandboxApi, n as SDK_TIMEOUTS } from "./api-request-C7JAklv7.js";
|
|
8
8
|
import { l as SANDBOX_AGENT_HOME, t as isInsideReservedDir } from "./file-transfer-DOSTbUSR.js";
|
|
9
9
|
import { n as fetchWithKeepAlive, t as emitTiming } from "./keep-alive-fetch-sGVP8skk.js";
|
|
10
10
|
import { t as parseSSEStream } from "./sse-parser-BCG3iL9j.js";
|
|
@@ -1236,11 +1236,11 @@ function isLocalSandboxEndpoint(baseUrl) {
|
|
|
1236
1236
|
}
|
|
1237
1237
|
}
|
|
1238
1238
|
async function resolveLocalCliAuthFiles(backendType) {
|
|
1239
|
-
const { discoverLocalCliAuthFiles } = await import("./local-cli-auth-
|
|
1239
|
+
const { discoverLocalCliAuthFiles } = await import("./local-cli-auth-DrNihS9-.js");
|
|
1240
1240
|
return discoverLocalCliAuthFiles(backendType);
|
|
1241
1241
|
}
|
|
1242
1242
|
async function loadLocalCliAuthExpectation(backendType) {
|
|
1243
|
-
const { describeLocalCliAuthExpectation: describe } = await import("./local-cli-auth-
|
|
1243
|
+
const { describeLocalCliAuthExpectation: describe } = await import("./local-cli-auth-DrNihS9-.js");
|
|
1244
1244
|
return describe(backendType);
|
|
1245
1245
|
}
|
|
1246
1246
|
/**
|
|
@@ -1495,13 +1495,7 @@ async function deleteMatchingSandboxes(client, filter, options) {
|
|
|
1495
1495
|
//#endregion
|
|
1496
1496
|
//#region src/client-sandbox-management.ts
|
|
1497
1497
|
var SandboxManagement = class extends SandboxTransport {
|
|
1498
|
-
/**
|
|
1499
|
-
* Poll a sandbox to `running` by id. Surfaces a real provision failure
|
|
1500
|
-
* as a {@link StateError} (carrying the sandbox's error message) rather
|
|
1501
|
-
* than an opaque timeout, and throws {@link NotFoundError} if the id is
|
|
1502
|
-
* unknown. Use after a {@link create} that timed out client-side but may
|
|
1503
|
-
* have continued provisioning server-side under its idempotency key.
|
|
1504
|
-
*/
|
|
1498
|
+
/** Await running, or report the provisioning StateError/unknown-ID NotFoundError. */
|
|
1505
1499
|
async waitForRunning(id, options) {
|
|
1506
1500
|
const instance = await this.get(id);
|
|
1507
1501
|
if (!instance) throw new NotFoundError(`Sandbox not found: ${id}`, {
|
|
@@ -1516,12 +1510,7 @@ var SandboxManagement = class extends SandboxTransport {
|
|
|
1516
1510
|
});
|
|
1517
1511
|
return instance;
|
|
1518
1512
|
}
|
|
1519
|
-
/**
|
|
1520
|
-
* List the agent backends registered by the Sandbox platform.
|
|
1521
|
-
*
|
|
1522
|
-
* The response contains static capabilities. A specific session can expose
|
|
1523
|
-
* fewer interaction kinds after its configuration is applied.
|
|
1524
|
-
*/
|
|
1513
|
+
/** Serving backend capabilities; individual session configuration may narrow them. */
|
|
1525
1514
|
async listBackends() {
|
|
1526
1515
|
const response = await this.fetch("/v1/backends");
|
|
1527
1516
|
const body = await response.text();
|
|
@@ -1531,31 +1520,11 @@ var SandboxManagement = class extends SandboxTransport {
|
|
|
1531
1520
|
}, response.headers);
|
|
1532
1521
|
return parseBackendRegistryResponseBody(body);
|
|
1533
1522
|
}
|
|
1534
|
-
/**
|
|
1535
|
-
* Get one registered agent backend by its canonical type.
|
|
1536
|
-
*
|
|
1537
|
-
* An absent entry means the authenticated Sandbox deployment does not
|
|
1538
|
-
* advertise that backend. The lookup uses the same typed catalog as
|
|
1539
|
-
* {@link listBackends}; it does not maintain a second registry.
|
|
1540
|
-
*/
|
|
1523
|
+
/** Read one canonical type from the authenticated deployment's backend catalog. */
|
|
1541
1524
|
async getBackend(type) {
|
|
1542
1525
|
return (await this.listBackends()).backends.find((backend) => backend.type === type);
|
|
1543
1526
|
}
|
|
1544
|
-
/**
|
|
1545
|
-
* List all sandboxes.
|
|
1546
|
-
*
|
|
1547
|
-
* @param options - Filtering and pagination options
|
|
1548
|
-
* @returns Array of SandboxInstance objects
|
|
1549
|
-
*
|
|
1550
|
-
* @example
|
|
1551
|
-
* ```typescript
|
|
1552
|
-
* // List all running sandboxes
|
|
1553
|
-
* const running = await client.list({ status: "running" });
|
|
1554
|
-
*
|
|
1555
|
-
* // List with pagination
|
|
1556
|
-
* const page = await client.list({ limit: 10, offset: 0 });
|
|
1557
|
-
* ```
|
|
1558
|
-
*/
|
|
1527
|
+
/** List sandboxes with the requested filters and pagination. */
|
|
1559
1528
|
async list(options) {
|
|
1560
1529
|
const params = new URLSearchParams();
|
|
1561
1530
|
if (options?.status) {
|
|
@@ -1593,20 +1562,7 @@ var SandboxManagement = class extends SandboxTransport {
|
|
|
1593
1562
|
} while (cursor !== null);
|
|
1594
1563
|
return generations;
|
|
1595
1564
|
}
|
|
1596
|
-
/**
|
|
1597
|
-
* Get a sandbox by ID.
|
|
1598
|
-
*
|
|
1599
|
-
* @param id - The sandbox ID
|
|
1600
|
-
* @returns A SandboxInstance or null if not found
|
|
1601
|
-
*
|
|
1602
|
-
* @example
|
|
1603
|
-
* ```typescript
|
|
1604
|
-
* const box = await client.get("sandbox_abc123");
|
|
1605
|
-
* if (box) {
|
|
1606
|
-
* console.log(box.status);
|
|
1607
|
-
* }
|
|
1608
|
-
* ```
|
|
1609
|
-
*/
|
|
1565
|
+
/** Load the exact sandbox, including failed/stopped boxes; return null on HTTP 404. */
|
|
1610
1566
|
async get(id) {
|
|
1611
1567
|
const response = await this.fetch(`/v1/sandboxes/${encodeURIComponent(id)}`);
|
|
1612
1568
|
if (response.status === 404) {
|
|
@@ -1616,66 +1572,18 @@ var SandboxManagement = class extends SandboxTransport {
|
|
|
1616
1572
|
const data = await readResponseJson(response);
|
|
1617
1573
|
return createSandboxInstanceFromResponse(this, this.parseInfo(data), void 0, data);
|
|
1618
1574
|
}
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
* Each sandbox goes through the same delete as {@link SandboxInstance.delete}.
|
|
1624
|
-
* The API deletes a bounded batch per request in ID order; this method
|
|
1625
|
-
* follows its cursor, so one call attempts every match once and a refused
|
|
1626
|
-
* delete never holds back the matches after it. Calling it again is safe: a
|
|
1627
|
-
* sandbox confirmed gone no longer matches.
|
|
1628
|
-
*
|
|
1629
|
-
* `complete` is the teardown verdict. When it is false, `sandboxes` names
|
|
1630
|
-
* each refused delete with its status and code, and `listingComplete` or
|
|
1631
|
-
* `remaining` says whether a match may not have been attempted.
|
|
1632
|
-
*
|
|
1633
|
-
* `complete` covers the sandboxes this call listed. Stop creating
|
|
1634
|
-
* sandboxes that match before calling, and call again once in-flight
|
|
1635
|
-
* creates have settled; a create that registers after the listing, or that
|
|
1636
|
-
* retries with the same idempotency key, can leave a match behind.
|
|
1637
|
-
*
|
|
1638
|
-
* @example
|
|
1639
|
-
* ```typescript
|
|
1640
|
-
* // Remove every sandbox one Agent Runtime run created.
|
|
1641
|
-
* const result = await client.deleteMatching({
|
|
1642
|
-
* metadataPrefix: { retainedIdempotencyKey: `runtime:${runId}:` },
|
|
1643
|
-
* });
|
|
1644
|
-
* if (!result.complete) {
|
|
1645
|
-
* console.warn(result.sandboxes.filter((s) => !s.confirmed));
|
|
1646
|
-
* }
|
|
1647
|
-
* ```
|
|
1648
|
-
*/
|
|
1575
|
+
async delete(id, options) {
|
|
1576
|
+
return deleteSandbox(this, id, options);
|
|
1577
|
+
}
|
|
1578
|
+
/** Delete owned metadata matches. Complete covers the listed set; stop matching creates before confirming cleanup. */
|
|
1649
1579
|
async deleteMatching(filter, options) {
|
|
1650
1580
|
return deleteMatchingSandboxes(this, filter, options);
|
|
1651
1581
|
}
|
|
1652
|
-
/**
|
|
1653
|
-
* Mint the terminal-capable token for one exact interactive session.
|
|
1654
|
-
*
|
|
1655
|
-
* This is a server-side operation. It validates the complete session
|
|
1656
|
-
* reference, derives the sandbox and runtime session IDs from that reference,
|
|
1657
|
-
* and makes one scoped-token request without loading the sandbox first.
|
|
1658
|
-
*/
|
|
1582
|
+
/** Mint a terminal token for the exact interactive reference without loading its sandbox. */
|
|
1659
1583
|
async mintInteractiveSessionToken(ref, options = {}) {
|
|
1660
1584
|
return requestInteractiveSessionToken(this, ref, options);
|
|
1661
1585
|
}
|
|
1662
|
-
/**
|
|
1663
|
-
* The named sandbox sizes, which one is the platform's default, and the
|
|
1664
|
-
* largest shape this account can be granted on the serving deployment.
|
|
1665
|
-
*
|
|
1666
|
-
* The platform owns these numbers; a client that sizes a request from
|
|
1667
|
-
* `ceiling` is never refused with `RESOURCES_EXCEED_LIMIT`, and
|
|
1668
|
-
* {@link sandboxResourcesForSize} accepts `presets` so a named tier expands
|
|
1669
|
-
* to what this deployment actually sells.
|
|
1670
|
-
*
|
|
1671
|
-
* @example
|
|
1672
|
-
* ```typescript
|
|
1673
|
-
* const shapes = await client.shapes();
|
|
1674
|
-
* const box = await client.create({
|
|
1675
|
-
* resources: sandboxResourcesForSize("medium", shapes.presets),
|
|
1676
|
-
* });
|
|
1677
|
-
* ```
|
|
1678
|
-
*/
|
|
1586
|
+
/** Read serving sizes, default and granted ceiling; pass presets to sandboxResourcesForSize. */
|
|
1679
1587
|
async shapes() {
|
|
1680
1588
|
const data = await readResponseJson(await this.fetch("/v1/shapes"));
|
|
1681
1589
|
if (!Array.isArray(data?.presets) || typeof data.default !== "string" || !data.ceiling || typeof data.ceiling.cpuCores !== "number" || typeof data.ceiling.memoryMB !== "number" || typeof data.ceiling.diskGB !== "number") throw new SandboxError("GET /v1/shapes returned no usable shape catalogue", {
|
|
@@ -1684,12 +1592,7 @@ var SandboxManagement = class extends SandboxTransport {
|
|
|
1684
1592
|
});
|
|
1685
1593
|
return data;
|
|
1686
1594
|
}
|
|
1687
|
-
/**
|
|
1688
|
-
* Return the identity the public Sandbox API observed for this credential.
|
|
1689
|
-
*
|
|
1690
|
-
* This is useful for deployment checks that must confirm which account and
|
|
1691
|
-
* API key a service credential resolves to without exposing the key itself.
|
|
1692
|
-
*/
|
|
1595
|
+
/** Read the API-observed owner/key identity without exposing its credential. */
|
|
1693
1596
|
async getIdentity() {
|
|
1694
1597
|
const payload = await readResponseJson(await this.fetch("/v1/me"));
|
|
1695
1598
|
const data = payload.data;
|