@tangle-network/sandbox 1.0.31 → 1.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/index.d.ts +4 -4
- package/dist/agent/index.js +3 -3
- package/dist/agent/preview.d.ts +1 -1
- package/dist/agent/preview.js +1 -1
- package/dist/{agent-run-outcome-DXGjmPhJ.d.ts → agent-run-outcome-9BtP7NBt.d.ts} +2 -2
- package/dist/auth/index.js +1 -1
- package/dist/{browser-interactive-control-controller-BujauBOG.js → browser-interactive-control-controller-BvtNDWql.js} +15 -15
- package/dist/{browser-interactive-control-controller-CE_Sm_NP.d.ts → browser-interactive-control-controller-DLqCjRF4.d.ts} +1 -1
- package/dist/{cli-auth-bundle-CP67k1J2.js → cli-auth-bundle-CP1BXoLR.js} +1 -1
- package/dist/{client-CRRBS-R5.d.ts → client-DsK0Ea5d.d.ts} +5 -5
- package/dist/{client-CWcpIyB1.js → client-kk6pKXCu.js} +5 -5
- package/dist/{core-CD_K08bh.js → core-B6BFSxJC.js} +3 -3
- package/dist/core.d.ts +6 -6
- package/dist/core.js +3 -3
- package/dist/{harness-DkCl2wJv.js → harness-BnGz2Wng.js} +71 -126
- package/dist/{index-CKK1V65I.d.ts → index-Dma53Dv-.d.ts} +5 -5
- package/dist/index.d.ts +9 -9
- package/dist/index.js +7 -7
- package/dist/interactive-control.d.ts +1 -1
- package/dist/interactive-control.js +1 -1
- package/dist/{interactive-controller-B0g65BjC.js → interactive-controller-BdFyhsao.js} +4 -4
- package/dist/{interactive-controller-BVGahfQh.d.ts → interactive-controller-kj6pSOCi.d.ts} +3 -3
- package/dist/{lines-CT6ZQ8Tq.d.ts → lines-DAuBNRwu.d.ts} +1 -1
- package/dist/lines.d.ts +1 -1
- package/dist/{local-cli-auth-tQ_m92Kz.js → local-cli-auth-CNh4Oy17.js} +1 -1
- package/dist/{preview-CLzh6Zpn.d.ts → preview-Dv6LSRvg.d.ts} +3 -3
- package/dist/{profile-schema-1WmjXjE9.js → profile-schema-DFZTAn1S.js} +171 -73
- package/dist/{public-templates-DMyZOU0k.d.ts → public-templates-C-AGDnNh.d.ts} +2 -2
- package/dist/public-templates.d.ts +1 -1
- package/dist/runtime.d.ts +5 -5
- package/dist/runtime.js +2 -2
- package/dist/{sandbox-DFT2Z7UT.js → sandbox-DcnMQd34.js} +26 -131
- package/dist/select-seat-command.d.ts +1 -1
- package/dist/tangle/index.d.ts +1 -1
- package/dist/tangle/index.js +1 -1
- package/dist/{tangle-BpJVw3gd.js → tangle-DbGX5au3.js} +1 -1
- package/dist/{terminal-stream-types-BcZxAiU-.d.ts → terminal-stream-types-IbpWmEvd.d.ts} +16 -16
- package/dist/{types-CYyhRYez.d.ts → types-D1wY611n.d.ts} +1 -1
- package/package.json +6 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { A as requestedPublicProfileDigest, C as encodeTextForWire, E as assertCurrentBackendType, F as createAgentRunOutcomeTracker, I as deriveAgentResultOutcome, O as mergeRuntimeBackendConfig, P as withoutRuntimeSecrets, S as encodePromptForWire, T as applyRequestedModel, U as normalizeEffectiveBackend, _ as mintTraceId, a as assertScopedTokenActive, b as resolveDispatchRunIdentity, c as SandboxRuntimeApi, d as appendSessionIdQuery, f as sessionHeaders, g as isTraceId, h as TRACE_ID_HEADER, i as terminalUpgradeHeadersSupported, j as requestedSecretProfilePublicDigest, k as normalizeRuntimeBackendConfig, l as normalizeSessionInfo, m as waitForRetryAfter, n as InteractiveSessionController, p as isRetryableCredentialRefusal, r as TerminalStream, s as requestScopedToken, u as sessionMessageRequestBody, v as resolveTraceId, w as canUseNodeHttp2, x as validateAcceptedDispatchRunRef, y as traceHeaders } from "./interactive-controller-
|
|
2
|
-
import { C as boundedIdentifierSchema, E as boundedStringSchema,
|
|
3
|
-
import { A as agentInteractiveSessionStatusMatchesRef, B as PlanContinuationSchema, C as AgentInteractiveSessionStopAcknowledgementSchema, D as agentInteractiveSessionControlClaimMatchesRef, E as agentInteractiveSessionControlClaimIsNewer, F as AgentRunCancellationAcknowledgementSchema, G as InteractionResponseSchema, H as InteractionBindingSchema, I as AgentRunCancellationRequestSchema, L as agentRunCancellationAcknowledgementMatchesRequest, M as agentInteractiveDimensionSchema, N as sameAgentExactRun, O as agentInteractiveSessionPromptAcknowledgementMatchesCommand, P as AgentExactRunControlRefSchema, S as AgentInteractiveSessionStatusSchema, T as agentInteractiveSessionControlClaimAcknowledgementMatchesRequest, U as InteractionRequestSchema, V as InteractionAcknowledgementSchema, W as InteractionResponseCommandSchema, _ as AgentInteractiveSessionControlClaimRequestSchema, b as AgentInteractiveSessionPromptCommandSchema, d as interactiveSessionControlClaimResponseSchema, f as interactiveSessionControlReleaseResponseSchema, g as AgentInteractiveSessionControlClaimAcknowledgementSchema, h as AgentInteractiveSessionAttachSchema, j as agentInteractiveSessionStopAcknowledgementMatchesCommand, l as createInteractiveControlHolderId, m as interactiveSessionStatusResponseSchema, p as interactiveSessionControlValidationResponseSchema, v as AgentInteractiveSessionControlClaimSchema, w as AgentInteractiveSessionStopCommandSchema, x as AgentInteractiveSessionRefSchema, y as AgentInteractiveSessionPromptAcknowledgementSchema } from "./browser-interactive-control-controller-
|
|
4
|
-
import { a as canonicalAgentProfileValue, r as agentProfileSchema } from "./profile-schema-
|
|
1
|
+
import { A as requestedPublicProfileDigest, C as encodeTextForWire, E as assertCurrentBackendType, F as createAgentRunOutcomeTracker, I as deriveAgentResultOutcome, O as mergeRuntimeBackendConfig, P as withoutRuntimeSecrets, S as encodePromptForWire, T as applyRequestedModel, U as normalizeEffectiveBackend, _ as mintTraceId, a as assertScopedTokenActive, b as resolveDispatchRunIdentity, c as SandboxRuntimeApi, d as appendSessionIdQuery, f as sessionHeaders, g as isTraceId, h as TRACE_ID_HEADER, i as terminalUpgradeHeadersSupported, j as requestedSecretProfilePublicDigest, k as normalizeRuntimeBackendConfig, l as normalizeSessionInfo, m as waitForRetryAfter, n as InteractiveSessionController, p as isRetryableCredentialRefusal, r as TerminalStream, s as requestScopedToken, u as sessionMessageRequestBody, v as resolveTraceId, w as canUseNodeHttp2, x as validateAcceptedDispatchRunRef, y as traceHeaders } from "./interactive-controller-BdFyhsao.js";
|
|
2
|
+
import { C as boundedIdentifierSchema, E as boundedStringSchema, g as sha256DigestSchema, o as canonicalCandidateDigest, s as canonicalCandidateJson, u as isCanonicalJsonValue } from "./harness-BnGz2Wng.js";
|
|
3
|
+
import { A as agentInteractiveSessionStatusMatchesRef, B as PlanContinuationSchema, C as AgentInteractiveSessionStopAcknowledgementSchema, D as agentInteractiveSessionControlClaimMatchesRef, E as agentInteractiveSessionControlClaimIsNewer, F as AgentRunCancellationAcknowledgementSchema, G as InteractionResponseSchema, H as InteractionBindingSchema, I as AgentRunCancellationRequestSchema, L as agentRunCancellationAcknowledgementMatchesRequest, M as agentInteractiveDimensionSchema, N as sameAgentExactRun, O as agentInteractiveSessionPromptAcknowledgementMatchesCommand, P as AgentExactRunControlRefSchema, S as AgentInteractiveSessionStatusSchema, T as agentInteractiveSessionControlClaimAcknowledgementMatchesRequest, U as InteractionRequestSchema, V as InteractionAcknowledgementSchema, W as InteractionResponseCommandSchema, _ as AgentInteractiveSessionControlClaimRequestSchema, b as AgentInteractiveSessionPromptCommandSchema, d as interactiveSessionControlClaimResponseSchema, f as interactiveSessionControlReleaseResponseSchema, g as AgentInteractiveSessionControlClaimAcknowledgementSchema, h as AgentInteractiveSessionAttachSchema, j as agentInteractiveSessionStopAcknowledgementMatchesCommand, l as createInteractiveControlHolderId, m as interactiveSessionStatusResponseSchema, p as interactiveSessionControlValidationResponseSchema, v as AgentInteractiveSessionControlClaimSchema, w as AgentInteractiveSessionStopCommandSchema, x as AgentInteractiveSessionRefSchema, y as AgentInteractiveSessionPromptAcknowledgementSchema } from "./browser-interactive-control-controller-BvtNDWql.js";
|
|
4
|
+
import { a as canonicalAgentProfileValue, r as agentProfileSchema } from "./profile-schema-DFZTAn1S.js";
|
|
5
5
|
import { A as SANDBOX_PROXY_REQUEST_MAX_BYTES, C as StateError, E as ValidationError, F as isProfileFileMountOutsideRoots, I as profileFileMountOutsideRootsMessage, M as PROFILE_FILE_MOUNT_OUTSIDE_ROOTS_CODE, N as SANDBOX_AGENT_HOME, P as SANDBOX_FILE_API_ABSOLUTE_ROOTS, S as ServerError, T as TimeoutError, a as AuthError, g as NotFoundError, h as NetworkError, i as readResponseJson, l as EdgeNotReadyError, n as parseErrorResponse, r as parseResponseError, s as CapabilityError, t as TerminalStreamError, v as ProfileFileMountPathError, w as StreamInterruptedError, x as SandboxError, y as QuotaError } from "./errors-BuPtQ91K.js";
|
|
6
6
|
import { n as combineAbortSignals, r as delayUntilAborted, t as awaitWithAbort } from "./abort-signal-JVaAyNMP.js";
|
|
7
7
|
import { t as rewrapResponse } from "./response-rewrap-B75N59JT.js";
|
|
@@ -10,7 +10,7 @@ import { t as SIDECAR_PROXY_ERROR_HEADER } from "./sidecar-proxy-error-DORW8_mD.
|
|
|
10
10
|
import { t as parseSSEStream } from "./sse-parser-B7uNzlUG.js";
|
|
11
11
|
import { s as uploadChunked } from "./chunked-upload-BC-0EYSR.js";
|
|
12
12
|
import { t as runPreparedProcess } from "./prepared-process-8V85-d5C.js";
|
|
13
|
-
import { a as backendTypeSchema, r as cliAuthReferenceSchema } from "./cli-auth-bundle-
|
|
13
|
+
import { a as backendTypeSchema, r as cliAuthReferenceSchema } from "./cli-auth-bundle-CP1BXoLR.js";
|
|
14
14
|
import { n as SandboxLines } from "./lines-CmiqZwyo.js";
|
|
15
15
|
import { z } from "zod";
|
|
16
16
|
import { createHash } from "node:crypto";
|
|
@@ -20,7 +20,7 @@ import "node:fs/promises";
|
|
|
20
20
|
import { readTokenCostUsd, readTokenUsage } from "@tangle-network/agent-core";
|
|
21
21
|
import "@tangle-network/agent-interface/environment-provider";
|
|
22
22
|
import { OTLP_SPAN_KIND, OTLP_STATUS_CODE, msToUnixNano, otlpTraceExport, toOtlpAttributes, toW3CSpanId, toW3CTraceId } from "@tangle-network/agent-trace-contract/otlp";
|
|
23
|
-
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.
|
|
23
|
+
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.2/node_modules/@tangle-network/agent-interface/dist/agent-execution-preparation.js
|
|
24
24
|
/**
|
|
25
25
|
* Canonical RFC 8785/SHA-256 identity for one validated, public AgentProfile.
|
|
26
26
|
* Secret-capable MCP/hook fields are tagged. Other prompt, resource, metadata,
|
|
@@ -31,11 +31,11 @@ import { OTLP_SPAN_KIND, OTLP_STATUS_CODE, msToUnixNano, otlpTraceExport, toOtlp
|
|
|
31
31
|
*/
|
|
32
32
|
function canonicalAgentProfileDigest(profile) {
|
|
33
33
|
const material = canonicalAgentProfileValue(agentProfileSchema.parse(profile));
|
|
34
|
-
if (material === void 0 || !isCanonicalJsonValue
|
|
35
|
-
return canonicalCandidateDigest
|
|
34
|
+
if (material === void 0 || !isCanonicalJsonValue(material)) throw new Error("AgentProfile must contain finite, acyclic RFC 8785 JSON values");
|
|
35
|
+
return canonicalCandidateDigest(material);
|
|
36
36
|
}
|
|
37
37
|
//#endregion
|
|
38
|
-
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.
|
|
38
|
+
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.2/node_modules/@tangle-network/agent-interface/dist/environment-interactive-start.js
|
|
39
39
|
const AgentInteractiveSessionRunCoordinatesSchema = z.strictObject({
|
|
40
40
|
provider: boundedIdentifierSchema,
|
|
41
41
|
environmentId: boundedIdentifierSchema,
|
|
@@ -52,7 +52,7 @@ const AgentInteractiveSessionRunCoordinatesSchema = z.strictObject({
|
|
|
52
52
|
const AgentInteractiveSessionStartSchema = z.strictObject({
|
|
53
53
|
run: AgentExactRunControlRefSchema,
|
|
54
54
|
profile: agentProfileSchema,
|
|
55
|
-
requestedProfileDigest: sha256DigestSchema
|
|
55
|
+
requestedProfileDigest: sha256DigestSchema,
|
|
56
56
|
authMode: z.literal("oauth").optional(),
|
|
57
57
|
initialPrompt: boundedStringSchema.optional(),
|
|
58
58
|
cwd: boundedStringSchema.min(1).optional(),
|
|
@@ -63,7 +63,7 @@ const AgentInteractiveSessionStartSchema = z.strictObject({
|
|
|
63
63
|
function agentInteractiveSessionRequestDigest(coordinates, input) {
|
|
64
64
|
const exactCoordinates = AgentInteractiveSessionRunCoordinatesSchema.parse(coordinates);
|
|
65
65
|
const exactInput = AgentInteractiveSessionStartSchema.omit({ run: true }).parse(input);
|
|
66
|
-
return canonicalCandidateDigest
|
|
66
|
+
return canonicalCandidateDigest({
|
|
67
67
|
kind: "agent-interactive-session-start.v1",
|
|
68
68
|
run: exactCoordinates,
|
|
69
69
|
requestedProfileDigest: exactInput.requestedProfileDigest,
|
|
@@ -112,7 +112,7 @@ function runCoordinates(run) {
|
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
114
|
//#endregion
|
|
115
|
-
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.
|
|
115
|
+
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.2/node_modules/@tangle-network/agent-interface/dist/environment-terminal.js
|
|
116
116
|
const terminalDimensionSchema = z.number().int().positive().max(1e4);
|
|
117
117
|
/**
|
|
118
118
|
* Provider-neutral handle for one interactive terminal.
|
|
@@ -362,7 +362,7 @@ const PROFILE_IMPORT_PART_BYTES = 512 * 1024;
|
|
|
362
362
|
const MANAGED_PROFILE_TRANSPORT = "managed-profile-reference-v1";
|
|
363
363
|
/** Cache identity follows JSON wire semantics and RFC 8785 key ordering. */
|
|
364
364
|
function profileCacheSha256(profile) {
|
|
365
|
-
return canonicalCandidateDigest
|
|
365
|
+
return canonicalCandidateDigest(JSON.parse(JSON.stringify(profile))).slice(7);
|
|
366
366
|
}
|
|
367
367
|
//#endregion
|
|
368
368
|
//#region ../../../packages/runtime-contracts/dist/direct-read.js
|
|
@@ -637,7 +637,7 @@ async function responseNeedsProfileImport(response) {
|
|
|
637
637
|
}
|
|
638
638
|
/** Upload the public profile only. Runtime grants remain in the turn backend. */
|
|
639
639
|
async function primeManagedProfile(profile, fetchRuntime) {
|
|
640
|
-
const bytes = new TextEncoder().encode(canonicalCandidateJson
|
|
640
|
+
const bytes = new TextEncoder().encode(canonicalCandidateJson(profile));
|
|
641
641
|
const sha256 = profileCacheSha256(profile);
|
|
642
642
|
if (bytes.length > 8388608) throw new ValidationError("Managed profile exceeds the profile import bound");
|
|
643
643
|
const post = async (body) => {
|
|
@@ -1729,111 +1729,6 @@ async function isRefusedBearer(response) {
|
|
|
1729
1729
|
return false;
|
|
1730
1730
|
}
|
|
1731
1731
|
}
|
|
1732
|
-
//#endregion
|
|
1733
|
-
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@3.0.0/node_modules/@tangle-network/agent-interface/dist/agent-candidate-schema-common.js
|
|
1734
|
-
const sha256Pattern = /^sha256:[a-f0-9]{64}$/;
|
|
1735
|
-
const gitObjectPattern = /^(?:[a-f0-9]{40}|[a-f0-9]{64})$/;
|
|
1736
|
-
const environmentNamePattern = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
1737
|
-
const headerNamePattern = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
|
|
1738
|
-
const mediaTypePattern = /^[a-z0-9][a-z0-9!#$&^_.+-]{0,126}\/[a-z0-9][a-z0-9!#$&^_.+-]{0,126}$/;
|
|
1739
|
-
const githubComponentPattern = /^[A-Za-z0-9][A-Za-z0-9_.-]{0,99}$/;
|
|
1740
|
-
const secretNamePattern = /(?:^|[_-])(?:api[_-]?key|access[_-]?key|private[_-]?key|token|secret|password|credentials?|authorization|cookie|database[_-]?url|dsn|pat)(?:[_-]|$)/i;
|
|
1741
|
-
const obviousSecretValuePattern = /(?:\bsk[-_][-_A-Za-z0-9]{10,}\b|\bgh[pousr]_[A-Za-z0-9]{12,}\b|\bgithub_pat_[A-Za-z0-9_]{12,}\b|\bAKIA[A-Z0-9]{12,}\b|-----BEGIN [A-Z ]*PRIVATE KEY-----|\bBearer\s+\S+)/;
|
|
1742
|
-
const controlCharacterPattern = /[\u0000-\u001f\u007f]/;
|
|
1743
|
-
z.string().regex(sha256Pattern);
|
|
1744
|
-
z.string().regex(gitObjectPattern);
|
|
1745
|
-
const environmentNameSchema = z.string().regex(environmentNamePattern);
|
|
1746
|
-
z.string().regex(headerNamePattern);
|
|
1747
|
-
z.string().regex(mediaTypePattern);
|
|
1748
|
-
function sha256Bytes(value) {
|
|
1749
|
-
const bytes = sha256(value);
|
|
1750
|
-
return `sha256:${Array.from(bytes, (byte) => byte.toString(16).padStart(2, "0")).join("")}`;
|
|
1751
|
-
}
|
|
1752
|
-
/** RFC 8785 serialization used by every candidate-producing package. */
|
|
1753
|
-
function canonicalCandidateJson(value) {
|
|
1754
|
-
if (!isCanonicalJsonValue(value)) throw new Error("candidate document must be finite, acyclic RFC 8785 JSON");
|
|
1755
|
-
return serializeCanonicalCandidate(value);
|
|
1756
|
-
}
|
|
1757
|
-
function canonicalCandidateBytes(value) {
|
|
1758
|
-
return new TextEncoder().encode(canonicalCandidateJson(value));
|
|
1759
|
-
}
|
|
1760
|
-
function canonicalCandidateDigest(value) {
|
|
1761
|
-
return sha256Bytes(canonicalCandidateBytes(value));
|
|
1762
|
-
}
|
|
1763
|
-
function serializeCanonicalCandidate(value) {
|
|
1764
|
-
if (value === null || typeof value === "boolean" || typeof value === "number") return JSON.stringify(value);
|
|
1765
|
-
if (typeof value === "string") return JSON.stringify(value);
|
|
1766
|
-
if (Array.isArray(value)) return `[${value.map(serializeCanonicalCandidate).join(",")}]`;
|
|
1767
|
-
return `{${Object.keys(value).sort().map((key) => `${JSON.stringify(key)}:${serializeCanonicalCandidate(value[key])}`).join(",")}}`;
|
|
1768
|
-
}
|
|
1769
|
-
function isWellFormedUnicode(value) {
|
|
1770
|
-
for (let index = 0; index < value.length; index++) {
|
|
1771
|
-
const code = value.charCodeAt(index);
|
|
1772
|
-
if (code >= 55296 && code <= 56319) {
|
|
1773
|
-
const next = value.charCodeAt(index + 1);
|
|
1774
|
-
if (!(next >= 56320 && next <= 57343)) return false;
|
|
1775
|
-
index++;
|
|
1776
|
-
} else if (code >= 56320 && code <= 57343) return false;
|
|
1777
|
-
}
|
|
1778
|
-
return true;
|
|
1779
|
-
}
|
|
1780
|
-
function isCanonicalJsonValue(value, ancestors = /* @__PURE__ */ new Set()) {
|
|
1781
|
-
if (value === null || typeof value === "boolean") return true;
|
|
1782
|
-
if (typeof value === "string") return isWellFormedUnicode(value);
|
|
1783
|
-
if (typeof value === "number") return Number.isFinite(value);
|
|
1784
|
-
if (typeof value !== "object" || ancestors.has(value)) return false;
|
|
1785
|
-
const prototype = Object.getPrototypeOf(value);
|
|
1786
|
-
if (!Array.isArray(value) && prototype !== Object.prototype && prototype !== null) return false;
|
|
1787
|
-
const nextAncestors = new Set(ancestors).add(value);
|
|
1788
|
-
if (Array.isArray(value)) {
|
|
1789
|
-
for (let index = 0; index < value.length; index += 1) {
|
|
1790
|
-
if (!(index in value)) return false;
|
|
1791
|
-
if (!isCanonicalJsonValue(value[index], nextAncestors)) return false;
|
|
1792
|
-
}
|
|
1793
|
-
return true;
|
|
1794
|
-
}
|
|
1795
|
-
return Object.entries(value).every(([key, entry]) => isWellFormedUnicode(key) && isCanonicalJsonValue(entry, nextAncestors));
|
|
1796
|
-
}
|
|
1797
|
-
function hasCredentialBearingUrl(value) {
|
|
1798
|
-
try {
|
|
1799
|
-
const url = new URL(value);
|
|
1800
|
-
if (url.username !== "" || url.password !== "") return true;
|
|
1801
|
-
return [...url.searchParams.keys()].some((key) => secretNamePattern.test(key));
|
|
1802
|
-
} catch {
|
|
1803
|
-
return false;
|
|
1804
|
-
}
|
|
1805
|
-
}
|
|
1806
|
-
/**
|
|
1807
|
-
* Whether a string holds an obvious credential: a provider key (`sk-`, `gh*_`,
|
|
1808
|
-
* `github_pat_`, `AKIA`), a PEM private key, a bearer token, or a URL with
|
|
1809
|
-
* userinfo or a credential-named query parameter. The agent-eval redaction
|
|
1810
|
-
* core calls it, so candidate validation and trace redaction agree.
|
|
1811
|
-
*/
|
|
1812
|
-
function looksLikeCredential(value) {
|
|
1813
|
-
return obviousSecretValuePattern.test(value) || hasCredentialBearingUrl(value);
|
|
1814
|
-
}
|
|
1815
|
-
function isPublicConfigValue(value) {
|
|
1816
|
-
return !controlCharacterPattern.test(value) && isWellFormedUnicode(value) && !looksLikeCredential(value);
|
|
1817
|
-
}
|
|
1818
|
-
const agentCandidateConfigValueSchema = z.object({
|
|
1819
|
-
kind: z.literal("public"),
|
|
1820
|
-
value: z.string().refine(isPublicConfigValue, "candidate config cannot carry credentials; the evaluator owns model authorization")
|
|
1821
|
-
}).strict();
|
|
1822
|
-
function configRecordSchema(keySchema) {
|
|
1823
|
-
return z.record(keySchema, agentCandidateConfigValueSchema).superRefine((config, ctx) => {
|
|
1824
|
-
for (const name of Object.keys(config)) if (secretNamePattern.test(name)) ctx.addIssue({
|
|
1825
|
-
code: "custom",
|
|
1826
|
-
path: [name],
|
|
1827
|
-
message: "candidate config cannot declare credential-bearing names"
|
|
1828
|
-
});
|
|
1829
|
-
});
|
|
1830
|
-
}
|
|
1831
|
-
configRecordSchema(environmentNameSchema);
|
|
1832
|
-
z.object({
|
|
1833
|
-
kind: z.literal("github"),
|
|
1834
|
-
owner: z.string().regex(githubComponentPattern).refine((value) => value !== "." && value !== ".."),
|
|
1835
|
-
repo: z.string().regex(githubComponentPattern).refine((value) => value !== "." && value !== "..")
|
|
1836
|
-
}).strict();
|
|
1837
1732
|
const CODEX_SYSTEM_PROMPT_FILE = ".codex/system-prompt.md";
|
|
1838
1733
|
const OPENCODE_APPEND_SYSTEM_PROMPT_FILE = ".opencode/agent-system-prompt.md";
|
|
1839
1734
|
const OPENCODE_CONFIG_FILE = "opencode.json";
|
|
@@ -5079,7 +4974,7 @@ var InteractiveSessionHandle = class {
|
|
|
5079
4974
|
options?.signal?.throwIfAborted();
|
|
5080
4975
|
const binding = this.requireBinding();
|
|
5081
4976
|
const exactCommand = AgentInteractiveSessionPromptCommandSchema.parse(command);
|
|
5082
|
-
if (canonicalCandidateDigest
|
|
4977
|
+
if (canonicalCandidateDigest(exactCommand.ref) !== canonicalCandidateDigest(binding.ref) || canonicalCandidateDigest(exactCommand.control) !== canonicalCandidateDigest(binding.control)) throw new Error(`Interactive session ${this.sessionId} prompt is bound to a different exact ref`);
|
|
5083
4978
|
return (options === void 0 ? this.host._sendInteractivePrompt(this.sessionId, exactCommand) : this.host._sendInteractivePrompt(this.sessionId, exactCommand, options)).then((acknowledgement) => {
|
|
5084
4979
|
const exactAcknowledgement = AgentInteractiveSessionPromptAcknowledgementSchema.parse(acknowledgement);
|
|
5085
4980
|
if (!agentInteractiveSessionPromptAcknowledgementMatchesCommand(exactCommand, exactAcknowledgement)) throw new Error(`Interactive session ${this.sessionId} prompt acknowledgement does not match the command`);
|
|
@@ -5146,8 +5041,8 @@ var InteractiveSessionHandle = class {
|
|
|
5146
5041
|
options?.signal?.throwIfAborted();
|
|
5147
5042
|
const binding = this.requireBinding();
|
|
5148
5043
|
const exactRequest = AgentInteractiveSessionAttachSchema.parse(request);
|
|
5149
|
-
if (!agentInteractiveSessionControlClaimMatchesRef(binding.ref, exactRequest.control) || canonicalCandidateDigest
|
|
5150
|
-
const requestDigest = canonicalCandidateDigest
|
|
5044
|
+
if (!agentInteractiveSessionControlClaimMatchesRef(binding.ref, exactRequest.control) || canonicalCandidateDigest(exactRequest.control) !== canonicalCandidateDigest(binding.control)) throw new Error(`Interactive session ${this.sessionId} terminal attach is bound to a different active control claim`);
|
|
5045
|
+
const requestDigest = canonicalCandidateDigest(exactRequest);
|
|
5151
5046
|
if (this.agentTerminalAttachInFlight !== void 0) {
|
|
5152
5047
|
if (this.agentTerminalAttachDigest !== requestDigest) throw new Error(`Interactive session ${this.sessionId} cannot attach with a different terminal request while another attach is in flight`);
|
|
5153
5048
|
return awaitWithAbort(this.agentTerminalAttachInFlight, options?.signal);
|
|
@@ -5200,7 +5095,7 @@ var InteractiveSessionHandle = class {
|
|
|
5200
5095
|
options?.signal?.throwIfAborted();
|
|
5201
5096
|
const ref = this.requireRef();
|
|
5202
5097
|
const exactRequest = AgentInteractiveSessionControlClaimRequestSchema.parse(request);
|
|
5203
|
-
if (canonicalCandidateDigest
|
|
5098
|
+
if (canonicalCandidateDigest(exactRequest.ref) !== canonicalCandidateDigest(ref)) throw new Error(`Interactive session ${this.sessionId} control claim is bound to a different exact ref`);
|
|
5204
5099
|
return this.host._claimInteractiveControl(this.sessionId, exactRequest, options).then((acknowledgement) => {
|
|
5205
5100
|
const exactAcknowledgement = AgentInteractiveSessionControlClaimAcknowledgementSchema.parse(acknowledgement);
|
|
5206
5101
|
if (!agentInteractiveSessionControlClaimAcknowledgementMatchesRequest(exactRequest, exactAcknowledgement)) throw new Error(`Interactive session ${this.sessionId} control claim acknowledgement does not match the request`);
|
|
@@ -5215,7 +5110,7 @@ var InteractiveSessionHandle = class {
|
|
|
5215
5110
|
options?.signal?.throwIfAborted();
|
|
5216
5111
|
const binding = this.requireBinding();
|
|
5217
5112
|
const exactCommand = AgentInteractiveSessionStopCommandSchema.parse(command);
|
|
5218
|
-
if (canonicalCandidateDigest
|
|
5113
|
+
if (canonicalCandidateDigest(exactCommand.ref) !== canonicalCandidateDigest(binding.ref) || canonicalCandidateDigest(exactCommand.control) !== canonicalCandidateDigest(binding.control)) throw new Error(`Interactive session ${this.sessionId} stop is bound to a different exact ref`);
|
|
5219
5114
|
return (options === void 0 ? this.host._stopInteractive(this.sessionId, exactCommand) : this.host._stopInteractive(this.sessionId, exactCommand, options)).then((acknowledgement) => {
|
|
5220
5115
|
const exactAcknowledgement = AgentInteractiveSessionStopAcknowledgementSchema.parse(acknowledgement);
|
|
5221
5116
|
if (!agentInteractiveSessionStopAcknowledgementMatchesCommand(exactCommand, exactAcknowledgement)) throw new Error(`Interactive session ${this.sessionId} stop acknowledgement does not match the command`);
|
|
@@ -5227,7 +5122,7 @@ var InteractiveSessionHandle = class {
|
|
|
5227
5122
|
const ref = this.requireRef();
|
|
5228
5123
|
return (options === void 0 ? this.host._stopInteractiveLifecycle(this.sessionId, ref) : this.host._stopInteractiveLifecycle(this.sessionId, ref, options)).then((acknowledgement) => {
|
|
5229
5124
|
const exactAcknowledgement = AgentInteractiveSessionStopAcknowledgementSchema.parse(acknowledgement);
|
|
5230
|
-
if (canonicalCandidateDigest
|
|
5125
|
+
if (canonicalCandidateDigest(exactAcknowledgement.ref) !== canonicalCandidateDigest(ref)) throw new Error(`Interactive session ${this.sessionId} lifecycle stop acknowledgement does not match the exact ref`);
|
|
5231
5126
|
if (exactAcknowledgement.status !== "accepted" && exactAcknowledgement.status !== "replayed") throw new Error(`Interactive session ${this.sessionId} lifecycle stop was not confirmed (${exactAcknowledgement.status})`);
|
|
5232
5127
|
if (exactAcknowledgement.effect === "unknown") throw new Error(`Interactive session ${this.sessionId} lifecycle stop returned an unknown outcome`);
|
|
5233
5128
|
return exactAcknowledgement;
|
|
@@ -6473,7 +6368,7 @@ const interactionResolutionDeliveryStateSchema = z.enum([
|
|
|
6473
6368
|
const interactionResolutionAcknowledgementSchema = z.strictObject({
|
|
6474
6369
|
status: z.enum(["accepted", "already_resolved_same"]),
|
|
6475
6370
|
operationId: z.string().min(1),
|
|
6476
|
-
responseDigest: sha256DigestSchema
|
|
6371
|
+
responseDigest: sha256DigestSchema,
|
|
6477
6372
|
interactionId: z.string().min(1),
|
|
6478
6373
|
sessionId: z.string().min(1),
|
|
6479
6374
|
outcome: z.enum([
|
|
@@ -6501,7 +6396,7 @@ const InteractionConflictEnvelopeSchema = z.object({
|
|
|
6501
6396
|
code: z.string().min(1),
|
|
6502
6397
|
message: z.string().min(1),
|
|
6503
6398
|
status: REFUSED_INTERACTION_STATUS,
|
|
6504
|
-
existingResponseDigest: sha256DigestSchema
|
|
6399
|
+
existingResponseDigest: sha256DigestSchema.optional(),
|
|
6505
6400
|
existingOperationId: z.string().min(1).optional(),
|
|
6506
6401
|
resolvedAt: z.string().min(1).optional()
|
|
6507
6402
|
})
|
|
@@ -6529,7 +6424,7 @@ function bindingsEqual(left, right) {
|
|
|
6529
6424
|
return left.requestDigest === right.requestDigest && left.runId === right.runId && left.provider === right.provider && left.environmentId === right.environmentId && left.sessionId === right.sessionId && left.executionId === right.executionId && left.interactionId === right.interactionId;
|
|
6530
6425
|
}
|
|
6531
6426
|
function assertResolutionMatches(resolution, sessionId, submitted, response, endpoint) {
|
|
6532
|
-
const expectedDigest = canonicalCandidateDigest
|
|
6427
|
+
const expectedDigest = canonicalCandidateDigest(submitted);
|
|
6533
6428
|
if (resolution.sessionId !== sessionId || resolution.interactionId !== submitted.id || resolution.outcome !== submitted.outcome || resolution.responseDigest !== expectedDigest) throw invalidRuntimeResponse("Sidecar returned a resolution for another interaction response", response, endpoint);
|
|
6534
6429
|
}
|
|
6535
6430
|
/** Parse one interaction response without discarding replay information. */
|
|
@@ -7581,7 +7476,7 @@ var SandboxInteractiveCapabilities = class extends SandboxPromptCapabilities {
|
|
|
7581
7476
|
origin: "runtime",
|
|
7582
7477
|
endpoint: `/agents/sessions/${encodeURIComponent(id)}/interactive`
|
|
7583
7478
|
});
|
|
7584
|
-
if (canonicalCandidateDigest
|
|
7479
|
+
if (canonicalCandidateDigest(status.ref) !== canonicalCandidateDigest(exactCommand.ref)) throw new ValidationError("Interactive prompt ref or control does not match the session");
|
|
7585
7480
|
const endpoint = `/agents/sessions/${encodeURIComponent(id)}/interactive/prompt`;
|
|
7586
7481
|
const response = await this.runtimeFetch(endpoint, {
|
|
7587
7482
|
method: "POST",
|
|
@@ -7755,7 +7650,7 @@ var SandboxInteractiveCapabilities = class extends SandboxPromptCapabilities {
|
|
|
7755
7650
|
origin: "runtime"
|
|
7756
7651
|
});
|
|
7757
7652
|
const acknowledgement = parsed.data.data;
|
|
7758
|
-
if (canonicalCandidateDigest
|
|
7653
|
+
if (canonicalCandidateDigest(acknowledgement.ref) !== canonicalCandidateDigest(exactRef)) throw new ServerError("Interactive lifecycle stop acknowledgement does not match the exact ref", 502, {
|
|
7759
7654
|
endpoint,
|
|
7760
7655
|
origin: "runtime"
|
|
7761
7656
|
});
|
|
@@ -10419,7 +10314,7 @@ var SandboxInteractiveTerminalOperations = class {
|
|
|
10419
10314
|
origin: "runtime",
|
|
10420
10315
|
endpoint: `/agents/sessions/${encodeURIComponent(id)}/interactive`
|
|
10421
10316
|
}, "INTERACTIVE_SESSION_EXITED");
|
|
10422
|
-
if (canonicalCandidateDigest
|
|
10317
|
+
if (canonicalCandidateDigest(status.ref) !== canonicalCandidateDigest(exactRef)) throw new ValidationError("Interactive attach ref does not match the current session");
|
|
10423
10318
|
const stream = await this.connectStream(id, `/terminals/${encodeURIComponent(id)}/ws`, {
|
|
10424
10319
|
connectionId: id,
|
|
10425
10320
|
cols: exactRequest.cols,
|
package/dist/tangle/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as JsonResponseParamTypes, E as SandboxIdParamTypes, S as JOB_SANDBOX_DELETE, T as SandboxCreateResponseParamTypes, _ as TANGLE_JOBS_CONTRACT, a as fetchQuote, b as AgentSandboxBlueprintAbi, c as parseQuoteResponse, d as OperatorSession, f as OperatorSessionError, g as TANGLE_CHAIN_ID, h as TangleSandboxClient, i as SignedQuote, l as validateQuote, m as SignMessage, n as QuoteDomain, o as inputsHashOf, p as OperatorSessionToken, r as QuoteError, s as jobQuoteDigest, t as JobQuoteDetails, u as OperatorChallenge, v as TangleSandboxClientConfig, w as SandboxCreateParamTypes, x as JOB_SANDBOX_CREATE, y as ITangleJobsAbi } from "../index-
|
|
1
|
+
import { C as JsonResponseParamTypes, E as SandboxIdParamTypes, S as JOB_SANDBOX_DELETE, T as SandboxCreateResponseParamTypes, _ as TANGLE_JOBS_CONTRACT, a as fetchQuote, b as AgentSandboxBlueprintAbi, c as parseQuoteResponse, d as OperatorSession, f as OperatorSessionError, g as TANGLE_CHAIN_ID, h as TangleSandboxClient, i as SignedQuote, l as validateQuote, m as SignMessage, n as QuoteDomain, o as inputsHashOf, p as OperatorSessionToken, r as QuoteError, s as jobQuoteDigest, t as JobQuoteDetails, u as OperatorChallenge, v as TangleSandboxClientConfig, w as SandboxCreateParamTypes, x as JOB_SANDBOX_CREATE, y as ITangleJobsAbi } from "../index-Dma53Dv-.js";
|
|
2
2
|
export { AgentSandboxBlueprintAbi, ITangleJobsAbi, JOB_SANDBOX_CREATE, JOB_SANDBOX_DELETE, JobQuoteDetails, JsonResponseParamTypes, OperatorChallenge, OperatorSession, OperatorSessionError, OperatorSessionToken, QuoteDomain, QuoteError, SandboxCreateParamTypes, SandboxCreateResponseParamTypes, SandboxIdParamTypes, SignMessage, SignedQuote, TANGLE_CHAIN_ID, TANGLE_JOBS_CONTRACT, TangleSandboxClient, TangleSandboxClientConfig, fetchQuote, inputsHashOf, jobQuoteDigest, parseQuoteResponse, validateQuote };
|
package/dist/tangle/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as SandboxCreateParamTypes, a as parseQuoteResponse, c as OperatorSession, d as TANGLE_JOBS_CONTRACT, f as ITangleJobsAbi, g as JsonResponseParamTypes, h as JOB_SANDBOX_DELETE, i as jobQuoteDigest, l as OperatorSessionError, m as JOB_SANDBOX_CREATE, n as fetchQuote, o as validateQuote, p as AgentSandboxBlueprintAbi, r as inputsHashOf, s as TangleSandboxClient, t as QuoteError, u as TANGLE_CHAIN_ID, v as SandboxCreateResponseParamTypes, y as SandboxIdParamTypes } from "../tangle-
|
|
1
|
+
import { _ as SandboxCreateParamTypes, a as parseQuoteResponse, c as OperatorSession, d as TANGLE_JOBS_CONTRACT, f as ITangleJobsAbi, g as JsonResponseParamTypes, h as JOB_SANDBOX_DELETE, i as jobQuoteDigest, l as OperatorSessionError, m as JOB_SANDBOX_CREATE, n as fetchQuote, o as validateQuote, p as AgentSandboxBlueprintAbi, r as inputsHashOf, s as TangleSandboxClient, t as QuoteError, u as TANGLE_CHAIN_ID, v as SandboxCreateResponseParamTypes, y as SandboxIdParamTypes } from "../tangle-DbGX5au3.js";
|
|
2
2
|
export { AgentSandboxBlueprintAbi, ITangleJobsAbi, JOB_SANDBOX_CREATE, JOB_SANDBOX_DELETE, JsonResponseParamTypes, OperatorSession, OperatorSessionError, QuoteError, SandboxCreateParamTypes, SandboxCreateResponseParamTypes, SandboxIdParamTypes, TANGLE_CHAIN_ID, TANGLE_JOBS_CONTRACT, TangleSandboxClient, fetchQuote, inputsHashOf, jobQuoteDigest, parseQuoteResponse, validateQuote };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as createSandboxInstanceFromResponse } from "./sandbox-
|
|
1
|
+
import { n as createSandboxInstanceFromResponse } from "./sandbox-DcnMQd34.js";
|
|
2
2
|
import { i as readResponseJson } from "./errors-BuPtQ91K.js";
|
|
3
3
|
import { _ as rotlBH, a as anumber, b as rotlSL, d as createXOFer, g as u32, h as toBytes$1, l as createHasher, m as swap32IfBE, n as abytes, o as aoutput, r as aexists, s as clean, t as Hash, v as rotlBL, x as split, y as rotlSH } from "./utils-BXgE8UHJ.js";
|
|
4
4
|
//#region ../../../packages/runtime-contracts/dist/tangle-blueprint-abi.js
|
|
@@ -394,7 +394,7 @@ declare class TerminalStreamError extends Error {
|
|
|
394
394
|
});
|
|
395
395
|
}
|
|
396
396
|
//#endregion
|
|
397
|
-
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.
|
|
397
|
+
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.2/node_modules/@tangle-network/agent-interface/dist/plan.d.ts
|
|
398
398
|
/**
|
|
399
399
|
* Typed server-originated continuation. Adapters consume this instead of
|
|
400
400
|
* inferring approval from a free-form user message.
|
|
@@ -430,7 +430,7 @@ declare const PlanContinuationSchema: z.ZodObject<{
|
|
|
430
430
|
}, z.core.$strict>;
|
|
431
431
|
type PlanContinuation = z.infer<typeof PlanContinuationSchema>;
|
|
432
432
|
//#endregion
|
|
433
|
-
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.
|
|
433
|
+
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.2/node_modules/@tangle-network/agent-interface/dist/interaction-data.d.ts
|
|
434
434
|
declare const InteractionSecretReferenceSchema: z.ZodObject<{
|
|
435
435
|
kind: z.ZodLiteral<"secret_handle">;
|
|
436
436
|
handleId: z.ZodString;
|
|
@@ -451,7 +451,7 @@ declare const InteractionResolutionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
451
451
|
}, z.core.$strict>], "outcome">;
|
|
452
452
|
type InteractionResolution = z.infer<typeof InteractionResolutionSchema>;
|
|
453
453
|
//#endregion
|
|
454
|
-
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.
|
|
454
|
+
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.2/node_modules/@tangle-network/agent-interface/dist/proxy-secrets.d.ts
|
|
455
455
|
declare const ProxySecretBindingSchema: z.ZodObject<{
|
|
456
456
|
hosts: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
457
457
|
methods: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
@@ -503,7 +503,7 @@ declare const ProxySecretCapabilitiesSchema: z.ZodObject<{
|
|
|
503
503
|
}, z.core.$strict>;
|
|
504
504
|
type ProxySecretCapabilities = z.infer<typeof ProxySecretCapabilitiesSchema>;
|
|
505
505
|
//#endregion
|
|
506
|
-
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.
|
|
506
|
+
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.2/node_modules/@tangle-network/agent-interface/dist/harness.d.ts
|
|
507
507
|
/**
|
|
508
508
|
* Recognized execution identities, not a deployment's list of installed runners.
|
|
509
509
|
* A profile's authored harness remains part of its canonical identity; execution
|
|
@@ -537,7 +537,7 @@ declare const harnessTypeSchema: z.ZodEnum<{
|
|
|
537
537
|
/** One declaration owns runtime validation and the compile-time vocabulary. */
|
|
538
538
|
type HarnessType = z.infer<typeof harnessTypeSchema>;
|
|
539
539
|
//#endregion
|
|
540
|
-
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.
|
|
540
|
+
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.2/node_modules/@tangle-network/agent-interface/dist/agent-profile.d.ts
|
|
541
541
|
/**
|
|
542
542
|
* Permission policy value for a capability.
|
|
543
543
|
*/
|
|
@@ -1013,11 +1013,11 @@ interface AgentProfileValidationResult {
|
|
|
1013
1013
|
normalizedProfile?: AgentProfile;
|
|
1014
1014
|
}
|
|
1015
1015
|
//#endregion
|
|
1016
|
-
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.
|
|
1016
|
+
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.2/node_modules/@tangle-network/agent-interface/dist/agent-candidate.d.ts
|
|
1017
1017
|
/** Full SHA-256 digest with an explicit algorithm prefix. */
|
|
1018
1018
|
type Sha256Digest = `sha256:${string}`;
|
|
1019
1019
|
//#endregion
|
|
1020
|
-
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.
|
|
1020
|
+
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.2/node_modules/@tangle-network/agent-interface/dist/interaction-fields.d.ts
|
|
1021
1021
|
declare const InteractionAnswerSpecSchema: z.ZodObject<{
|
|
1022
1022
|
fields: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1023
1023
|
type: z.ZodLiteral<"text">;
|
|
@@ -1071,7 +1071,7 @@ declare const InteractionResponseScopeSchema: z.ZodEnum<{
|
|
|
1071
1071
|
persistent: "persistent";
|
|
1072
1072
|
}>;
|
|
1073
1073
|
//#endregion
|
|
1074
|
-
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.
|
|
1074
|
+
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.2/node_modules/@tangle-network/agent-interface/dist/interaction-envelope.d.ts
|
|
1075
1075
|
declare const InteractionSubjectSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1076
1076
|
type: z.ZodLiteral<"tool">;
|
|
1077
1077
|
toolName: z.ZodString;
|
|
@@ -1178,7 +1178,7 @@ declare const InteractionAcknowledgementSchema: z.ZodObject<{
|
|
|
1178
1178
|
}, z.core.$strict>;
|
|
1179
1179
|
type InteractionAcknowledgement = z.infer<typeof InteractionAcknowledgementSchema>;
|
|
1180
1180
|
//#endregion
|
|
1181
|
-
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.
|
|
1181
|
+
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.2/node_modules/@tangle-network/agent-interface/dist/runtime-control.d.ts
|
|
1182
1182
|
/** Provider-neutral coordinates sufficient to recreate control of one run. */
|
|
1183
1183
|
interface AgentRunControlRef {
|
|
1184
1184
|
runId: string;
|
|
@@ -1215,7 +1215,7 @@ interface AgentRunCancellationAcknowledgement {
|
|
|
1215
1215
|
existingRequestDigest?: Sha256Digest;
|
|
1216
1216
|
}
|
|
1217
1217
|
//#endregion
|
|
1218
|
-
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.
|
|
1218
|
+
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.2/node_modules/@tangle-network/agent-interface/dist/environment-terminal.d.ts
|
|
1219
1219
|
/**
|
|
1220
1220
|
* Provider-neutral handle for one interactive terminal.
|
|
1221
1221
|
*
|
|
@@ -1334,7 +1334,7 @@ interface AgentTerminalSession {
|
|
|
1334
1334
|
}): AsyncIterable<TerminalOutputEvent>;
|
|
1335
1335
|
}
|
|
1336
1336
|
//#endregion
|
|
1337
|
-
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.
|
|
1337
|
+
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.2/node_modules/@tangle-network/agent-interface/dist/environment-interactive-control.d.ts
|
|
1338
1338
|
/**
|
|
1339
1339
|
* Durable identity of one coding-agent TUI.
|
|
1340
1340
|
*
|
|
@@ -2055,7 +2055,7 @@ interface AgentInteractiveSessionPromptAcknowledgement {
|
|
|
2055
2055
|
existingRequestDigest?: `sha256:${string}`;
|
|
2056
2056
|
}
|
|
2057
2057
|
//#endregion
|
|
2058
|
-
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.
|
|
2058
|
+
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.2/node_modules/@tangle-network/agent-interface/dist/environment-interactive-start.d.ts
|
|
2059
2059
|
/**
|
|
2060
2060
|
* Start one native coding-agent TUI from caller-owned request material.
|
|
2061
2061
|
*
|
|
@@ -2346,13 +2346,13 @@ declare const AgentInteractiveSessionStartSchema: z.ZodObject<{
|
|
|
2346
2346
|
}, z.core.$strict>;
|
|
2347
2347
|
type AgentInteractiveSessionStart = z.infer<typeof AgentInteractiveSessionStartSchema>;
|
|
2348
2348
|
//#endregion
|
|
2349
|
-
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.
|
|
2349
|
+
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.2/node_modules/@tangle-network/agent-interface/dist/runtime-attachments.d.ts
|
|
2350
2350
|
/** Runtime-owned bindings do not alter the authored AgentProfile or candidate identity. */
|
|
2351
2351
|
interface AgentRuntimeAttachments {
|
|
2352
2352
|
mcp: Record<string, AgentProfileMcpServer>;
|
|
2353
2353
|
}
|
|
2354
2354
|
//#endregion
|
|
2355
|
-
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.
|
|
2355
|
+
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.2/node_modules/@tangle-network/agent-interface/dist/sandbox-size.d.ts
|
|
2356
2356
|
/**
|
|
2357
2357
|
* Portable sandbox size vocabulary.
|
|
2358
2358
|
*
|
|
@@ -2376,7 +2376,7 @@ declare const SANDBOX_SIZE_PRESET_NAMES: readonly ["nano", "small", "medium", "l
|
|
|
2376
2376
|
*/
|
|
2377
2377
|
type SandboxSizePreset = (typeof SANDBOX_SIZE_PRESET_NAMES)[number];
|
|
2378
2378
|
//#endregion
|
|
2379
|
-
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.
|
|
2379
|
+
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.2/node_modules/@tangle-network/agent-interface/dist/profile-schema.d.ts
|
|
2380
2380
|
/**
|
|
2381
2381
|
* A registered capability: a stable id paired with its canonical
|
|
2382
2382
|
* {@link AgentProfile}. `definition` is the full profile (prompt/model/tools/
|
|
@@ -2398,7 +2398,7 @@ interface Capability {
|
|
|
2398
2398
|
recommendedSize?: SandboxSizePreset;
|
|
2399
2399
|
}
|
|
2400
2400
|
//#endregion
|
|
2401
|
-
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.
|
|
2401
|
+
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.2/node_modules/@tangle-network/agent-interface/dist/profile-security.d.ts
|
|
2402
2402
|
/** Policy for {@link validateAgentProfileSecurity}. */
|
|
2403
2403
|
interface AgentProfileSecurityPolicy {
|
|
2404
2404
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as AgentRuntimeAttachments, G as AgentProfile, K as AgentProfileCapabilities, Rt as SandboxCreateReceipt, S as SandboxSizePreset, U as InteractionRequest, a as TerminalStreamOptions, ct as ReasoningEffort, g as TerminalReadyInfo, i as TerminalStreamHandlers, ot as AgentProfileValidationResult, q as AgentProfileConfidential, s as TerminalStreamToken, t as TerminalAttachTimings, ut as PlanContinuation, z as AgentExactRunControlRef } from "./terminal-stream-types-
|
|
1
|
+
import { C as AgentRuntimeAttachments, G as AgentProfile, K as AgentProfileCapabilities, Rt as SandboxCreateReceipt, S as SandboxSizePreset, U as InteractionRequest, a as TerminalStreamOptions, ct as ReasoningEffort, g as TerminalReadyInfo, i as TerminalStreamHandlers, ot as AgentProfileValidationResult, q as AgentProfileConfidential, s as TerminalStreamToken, t as TerminalAttachTimings, ut as PlanContinuation, z as AgentExactRunControlRef } from "./terminal-stream-types-IbpWmEvd.js";
|
|
2
2
|
import { t as CliAuthReference } from "./cli-auth-bundle-99-eo7R4.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region ../../../packages/runtime-contracts/dist/backend-types.d.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/sandbox",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.33",
|
|
4
4
|
"description": "Client SDK for the Tangle Sandbox platform - build AI agent applications with dev containers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
},
|
|
110
110
|
"dependencies": {
|
|
111
111
|
"@tangle-network/agent-core": "^1.0.0",
|
|
112
|
-
"@tangle-network/agent-interface": "^5.
|
|
112
|
+
"@tangle-network/agent-interface": "^5.10.2",
|
|
113
113
|
"@tangle-network/agent-trace-contract": "^2.2.0",
|
|
114
114
|
"tar-stream": "3.2.1",
|
|
115
115
|
"zod": "^4.6.6"
|
|
@@ -155,13 +155,13 @@
|
|
|
155
155
|
"yjs": "13.6.30",
|
|
156
156
|
"@products/sandbox-test-utils": "0.0.0",
|
|
157
157
|
"@repo/shared": "0.0.0",
|
|
158
|
-
"@tangle-network/
|
|
158
|
+
"@tangle-network/agent-profile-materialize": "0.27.1",
|
|
159
159
|
"@tangle-network/cli-agent-registry": "0.14.0",
|
|
160
|
-
"@tangle-network/
|
|
160
|
+
"@tangle-network/runtime-contracts": "0.19.0"
|
|
161
161
|
},
|
|
162
162
|
"tangleRelease": {
|
|
163
|
-
"sourceSha": "
|
|
164
|
-
"mergedAt": "2026-10-
|
|
163
|
+
"sourceSha": "8659c5fb3d3f493e643752c4dc6ba54f919bd497",
|
|
164
|
+
"mergedAt": "2026-10-27T09:29:56-06:00"
|
|
165
165
|
},
|
|
166
166
|
"scripts": {
|
|
167
167
|
"build": "node scripts/build-dist.mjs",
|