@tangle-network/sandbox 1.0.117 → 1.0.118
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-Baj0Jv83.d.ts → agent-run-outcome-1zf14Qvo.d.ts} +2 -2
- package/dist/auth/index.js +1 -1
- package/dist/{browser-interactive-control-controller-BbbyXoS1.d.ts → browser-interactive-control-controller-DjgTiPSK.d.ts} +1 -1
- package/dist/{cli-auth-bundle-De_G0zg3.js → cli-auth-bundle-BGZQl8pf.js} +1 -1
- package/dist/{client-JovtyXn7.d.ts → client-51zzwdCg.d.ts} +6 -16
- package/dist/{client-DPM_Z-gR.js → client-DvLeWxd6.js} +9 -17
- package/dist/{core-CBVuqbD-.js → core-CPmZrgBo.js} +3 -3
- package/dist/core.d.ts +6 -6
- package/dist/core.js +3 -3
- package/dist/{index-C7B3bVLg.d.ts → index-DlCzW_SB.d.ts} +30 -184
- package/dist/index.d.ts +9 -9
- package/dist/index.js +6 -6
- package/dist/interactive-control.d.ts +1 -1
- package/dist/{interactive-controller-D6utTcix.js → interactive-controller-BQzNEYZu.js} +1 -1
- package/dist/{interactive-controller-BI8pMiTR.d.ts → interactive-controller-U_ClwSA2.d.ts} +3 -3
- package/dist/{lines-Cra3SJs-.d.ts → lines-xAhkGjwI.d.ts} +1 -1
- package/dist/lines.d.ts +1 -1
- package/dist/{local-cli-auth-BrlmQZ68.js → local-cli-auth-BZMvbmFe.js} +1 -1
- package/dist/{preview-BuwEdvzT.d.ts → preview-Dhe5MKdu.d.ts} +3 -3
- package/dist/{profile-schema-DFZTAn1S.js → profile-schema--qCcNrz1.js} +6 -2
- package/dist/{public-templates-BFPbBQSO.d.ts → public-templates-B-bkdTUO.d.ts} +2 -2
- package/dist/public-templates.d.ts +1 -1
- package/dist/runtime.d.ts +5 -5
- package/dist/runtime.js +1 -1
- package/dist/{sandbox-B_fFzaht.js → sandbox-gF473YxX.js} +45 -199
- 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-CGLUu3Xx.js → tangle-TNrvVHbo.js} +1 -1
- package/dist/{terminal-stream-types-pMCEfsJv.d.ts → terminal-stream-types-CpPRMcYv.d.ts} +160 -1
- package/dist/{types-BEYAZXvg.d.ts → types-DeLaTirQ.d.ts} +24 -99
- package/package.json +6 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { A as mergeRuntimeBackendConfig, C as encodePromptForWire, E as canUseNodeHttp2, G as normalizeEffectiveBackend, I as withoutRuntimeSecrets, L as createAgentRunOutcomeTracker, M as requestedPublicProfileDigest, N as requestedSecretProfilePublicDigest, O as applyRequestedModel, R as deriveAgentResultOutcome, S as validateAcceptedDispatchRunRef, T as runtimeFilesystemPath, _ as TRACE_ID_HEADER, a as assertScopedTokenActive, b as resolveTraceId, c as SandboxRuntimeApi, d as appendSessionIdQuery, f as callHeaders, g as waitForRetryAfter, h as isRetryableCredentialRefusal, i as terminalUpgradeHeadersSupported, j as normalizeRuntimeBackendConfig, k as assertCurrentBackendType, l as normalizeSessionInfo, m as assertFileWritePreconditions, n as InteractiveSessionController, p as sessionHeaders, r as TerminalStream, s as requestScopedToken, u as sessionMessageRequestBody, v as isTraceId, w as encodeTextForWire, x as resolveDispatchRunIdentity, y as mintTraceId } from "./interactive-controller-
|
|
1
|
+
import { A as mergeRuntimeBackendConfig, C as encodePromptForWire, E as canUseNodeHttp2, G as normalizeEffectiveBackend, I as withoutRuntimeSecrets, L as createAgentRunOutcomeTracker, M as requestedPublicProfileDigest, N as requestedSecretProfilePublicDigest, O as applyRequestedModel, R as deriveAgentResultOutcome, S as validateAcceptedDispatchRunRef, T as runtimeFilesystemPath, _ as TRACE_ID_HEADER, a as assertScopedTokenActive, b as resolveTraceId, c as SandboxRuntimeApi, d as appendSessionIdQuery, f as callHeaders, g as waitForRetryAfter, h as isRetryableCredentialRefusal, i as terminalUpgradeHeadersSupported, j as normalizeRuntimeBackendConfig, k as assertCurrentBackendType, l as normalizeSessionInfo, m as assertFileWritePreconditions, n as InteractiveSessionController, p as sessionHeaders, r as TerminalStream, s as requestScopedToken, u as sessionMessageRequestBody, v as isTraceId, w as encodeTextForWire, x as resolveDispatchRunIdentity, y as mintTraceId } from "./interactive-controller-BQzNEYZu.js";
|
|
2
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
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
|
|
4
|
+
import { a as ProxySecretReceiptSchema, o as canonicalAgentProfileValue, r as agentProfileSchema } from "./profile-schema--qCcNrz1.js";
|
|
5
5
|
import { C as StateError, E as ValidationError, F as SANDBOX_AGENT_HOME, I as SANDBOX_FILE_API_ABSOLUTE_ROOTS, L as isProfileFileMountOutsideRoots, M as FILE_OPERATION_LIMITS, P as PROFILE_FILE_MOUNT_OUTSIDE_ROOTS_CODE, R as profileFileMountOutsideRootsMessage, S as ServerError, T as TimeoutError, a as AuthError, c as CompliancePlacementError, f as GpuProviderNotConfiguredError, g as NotFoundError, h as NetworkError, i as readResponseJson, j as SANDBOX_PROXY_REQUEST_MAX_BYTES, l as EdgeNotReadyError, m as NON_RETRYABLE_CREATE_QUOTA_REASONS, 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-ystNl7Ae.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-BUIKfYAd.js";
|
|
11
11
|
import { s as uploadChunked } from "./chunked-upload-BHRGMfDz.js";
|
|
12
12
|
import { t as runPreparedProcess } from "./prepared-process-GzQXVsX8.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-BGZQl8pf.js";
|
|
14
14
|
import { n as SandboxLines } from "./lines-DEg0cqSV.js";
|
|
15
15
|
import { z } from "zod";
|
|
16
16
|
import { createHash } from "node:crypto";
|
|
@@ -378,19 +378,8 @@ function generateIdempotencyKey() {
|
|
|
378
378
|
}
|
|
379
379
|
//#endregion
|
|
380
380
|
//#region src/normalize.ts
|
|
381
|
-
/**
|
|
382
|
-
|
|
383
|
-
* canonical `SandboxConnection` shape.
|
|
384
|
-
*
|
|
385
|
-
* The server and SDK expose the runtime URL as `connection.runtimeUrl`.
|
|
386
|
-
*
|
|
387
|
-
* Returns `undefined` when the raw payload has no usable runtime URL, so
|
|
388
|
-
* callers using `normalizeConnection(data.connection) ?? fallback` can
|
|
389
|
-
* preserve a previously-known connection during transient server states
|
|
390
|
-
* (e.g. a partial payload that only carries an auth token). Without this
|
|
391
|
-
* guard, a partial `{ authToken: "..." }` response would overwrite a
|
|
392
|
-
* previously-valid connection with an object missing its URL.
|
|
393
|
-
*/
|
|
381
|
+
/** Private client and instance normalization helpers. */
|
|
382
|
+
/** Keep partial token-only replies from replacing an established usable connection. */
|
|
394
383
|
function normalizeConnection(raw) {
|
|
395
384
|
if (!raw || typeof raw !== "object") return void 0;
|
|
396
385
|
const c = raw;
|
|
@@ -468,6 +457,13 @@ function normalizeEgressPolicyFields(data) {
|
|
|
468
457
|
egressPolicySource: EGRESS_POLICY_SOURCES.has(data.egressPolicySource) ? data.egressPolicySource : void 0
|
|
469
458
|
};
|
|
470
459
|
}
|
|
460
|
+
/** Shape and resource identity are required before exposing current credential metadata. */
|
|
461
|
+
function normalizeProxySecretReceipt(raw, sandboxId) {
|
|
462
|
+
if (raw === void 0) return void 0;
|
|
463
|
+
const receipt = ProxySecretReceiptSchema.parse(raw);
|
|
464
|
+
if (receipt.sandboxId !== sandboxId) throw new ServerError("Proxy secret receipt names another sandbox", 502);
|
|
465
|
+
return receipt;
|
|
466
|
+
}
|
|
471
467
|
//#endregion
|
|
472
468
|
//#region ../../../packages/runtime-contracts/dist/profile-cache.js
|
|
473
469
|
/**
|
|
@@ -885,6 +881,9 @@ function parseStopPhase(data) {
|
|
|
885
881
|
//#endregion
|
|
886
882
|
//#region src/sandbox-info.ts
|
|
887
883
|
var SandboxInfoCapabilities = class {
|
|
884
|
+
get proxySecretReceipt() {
|
|
885
|
+
return state(this).info.proxySecretReceipt;
|
|
886
|
+
}
|
|
888
887
|
/** Unique sandbox identifier */
|
|
889
888
|
get id() {
|
|
890
889
|
return state(this).info.id;
|
|
@@ -949,12 +948,8 @@ var SandboxInfoCapabilities = class {
|
|
|
949
948
|
get gpuLease() {
|
|
950
949
|
return state(this).info.gpuLease;
|
|
951
950
|
}
|
|
952
|
-
/**
|
|
953
|
-
*
|
|
954
|
-
* at and the numbers it is billed at. Present on a freshly created box and
|
|
955
|
-
* on one resolved by `get`; `undefined` for a box from a list row until it
|
|
956
|
-
* is refreshed, and for a sandbox created before the platform recorded it.
|
|
957
|
-
*/
|
|
951
|
+
/** Actual granted limits and billing shape; absence means unknown, never the requested or
|
|
952
|
+
* default shape. */
|
|
958
953
|
get resources() {
|
|
959
954
|
return state(this).info.resources;
|
|
960
955
|
}
|
|
@@ -966,40 +961,13 @@ var SandboxInfoCapabilities = class {
|
|
|
966
961
|
get images() {
|
|
967
962
|
return state(this).workspaceImages;
|
|
968
963
|
}
|
|
969
|
-
/**
|
|
970
|
-
*
|
|
971
|
-
* edge_ready, egress_proxy, docker_pull/create/start, sidecar_boot,
|
|
972
|
-
* health_check, …) the platform emitted when this sandbox was provisioned.
|
|
973
|
-
*
|
|
974
|
-
* Present only on a freshly-created box; `null` for a box resolved by id or
|
|
975
|
-
* when the runtime did not report diagnostics. Use `.phases` for the
|
|
976
|
-
* operation-name → durationMs map.
|
|
977
|
-
*
|
|
978
|
-
* @example
|
|
979
|
-
* ```typescript
|
|
980
|
-
* const d = box.startupDiagnostics();
|
|
981
|
-
* if (d) console.log(`provision phases: ${JSON.stringify(d.phases)}`);
|
|
982
|
-
* ```
|
|
983
|
-
*/
|
|
964
|
+
/** Server-attributed startup operations and duration map; available only when the
|
|
965
|
+
* response included diagnostics. */
|
|
984
966
|
startupDiagnostics() {
|
|
985
967
|
return state(this).info.startupDiagnostics ?? null;
|
|
986
968
|
}
|
|
987
|
-
/**
|
|
988
|
-
*
|
|
989
|
-
* the call allocate the environment, or did it replay an earlier create that
|
|
990
|
-
* carried the same idempotency key.
|
|
991
|
-
*
|
|
992
|
-
* Present only on a freshly created box; `null` for a box resolved by id and
|
|
993
|
-
* `null` when the platform reported no receipt. Delete the environment only
|
|
994
|
-
* on a `created` outcome — every other value permits another caller to hold
|
|
995
|
-
* it, and a delete then destroys work that caller depends on.
|
|
996
|
-
*
|
|
997
|
-
* @example
|
|
998
|
-
* ```typescript
|
|
999
|
-
* const receipt = box.createReceipt();
|
|
1000
|
-
* if (receipt?.outcome === "created") await box.delete();
|
|
1001
|
-
* ```
|
|
1002
|
-
*/
|
|
969
|
+
/** Create verdict: created, idempotent replay, or unknown. Missing receipt is unknown; a
|
|
970
|
+
* refreshed or branched handle must not invent a new create fact. */
|
|
1003
971
|
createReceipt() {
|
|
1004
972
|
return state(this).info.createReceipt ?? null;
|
|
1005
973
|
}
|
|
@@ -1007,13 +975,8 @@ var SandboxInfoCapabilities = class {
|
|
|
1007
975
|
captureProof() {
|
|
1008
976
|
return state(this).info.captureProof ?? null;
|
|
1009
977
|
}
|
|
1010
|
-
/**
|
|
1011
|
-
*
|
|
1012
|
-
* output. Secrets in `connection` (currently `authToken`) are
|
|
1013
|
-
* redacted so that `JSON.stringify(box)` is safe to ship to log
|
|
1014
|
-
* sinks. Use {@link toDebugJSON} when the bearer is required (e.g.
|
|
1015
|
-
* one-off CLI commands that print credentials to the user).
|
|
1016
|
-
*/
|
|
978
|
+
/** Public log projection: redacts connection credentials. Use toDebugJSON only when
|
|
979
|
+
* credentials are explicitly required. */
|
|
1017
980
|
toJSON() {
|
|
1018
981
|
return {
|
|
1019
982
|
id: this.id,
|
|
@@ -1024,6 +987,7 @@ var SandboxInfoCapabilities = class {
|
|
|
1024
987
|
status: this.status,
|
|
1025
988
|
connection: redactConnectionSecrets(this.connection),
|
|
1026
989
|
metadata: this.metadata,
|
|
990
|
+
proxySecretReceipt: this.proxySecretReceipt,
|
|
1027
991
|
createdAt: this.createdAt,
|
|
1028
992
|
startedAt: this.startedAt,
|
|
1029
993
|
lastActivityAt: this.lastActivityAt,
|
|
@@ -1037,16 +1001,8 @@ var SandboxInfoCapabilities = class {
|
|
|
1037
1001
|
egressPolicySource: state(this).info.egressPolicySource
|
|
1038
1002
|
};
|
|
1039
1003
|
}
|
|
1040
|
-
/**
|
|
1041
|
-
*
|
|
1042
|
-
* is true. The default behavior matches {@link toJSON} and redacts
|
|
1043
|
-
* `connection.authToken`.
|
|
1044
|
-
*
|
|
1045
|
-
* Use only when the caller has an explicit need for the bearer
|
|
1046
|
-
* (e.g. presenting it once to the human operator). Never wire the
|
|
1047
|
-
* result of `toDebugJSON({ includeSecrets: true })` into a structured
|
|
1048
|
-
* logger — the bearer will land in any log sink consuming that output.
|
|
1049
|
-
*/
|
|
1004
|
+
/** Includes connection credentials only with includeSecrets:true; default output is
|
|
1005
|
+
* redacted. Never send the explicit secret-bearing result to a logger. */
|
|
1050
1006
|
toDebugJSON(options = {}) {
|
|
1051
1007
|
if (options.includeSecrets !== true) return this.toJSON();
|
|
1052
1008
|
return {
|
|
@@ -1103,11 +1059,7 @@ var SandboxInfoCapabilities = class {
|
|
|
1103
1059
|
local.info = this.parseInfo(data, local.info);
|
|
1104
1060
|
sandboxStatusObservedAt.set(this, Date.now());
|
|
1105
1061
|
}
|
|
1106
|
-
/**
|
|
1107
|
-
* What the direct regional read route has done for this sandbox: attempts,
|
|
1108
|
-
* reads it served, reads that fell back to the API, and the last reason.
|
|
1109
|
-
* Read by the lifecycle probe; safe for a caller to read too.
|
|
1110
|
-
*/
|
|
1062
|
+
/** Direct regional read statistics: attempts, failures and fallbacks. */
|
|
1111
1063
|
directReadStats() {
|
|
1112
1064
|
return state(this).directRead.snapshotStats();
|
|
1113
1065
|
}
|
|
@@ -1135,16 +1087,8 @@ var SandboxInfoCapabilities = class {
|
|
|
1135
1087
|
const statusAgeMs = Date.now() - statusObservedAt;
|
|
1136
1088
|
return statusObservedAt > 0 && statusAgeMs >= 0 && statusAgeMs < SANDBOX_STATUS_FRESHNESS_MS;
|
|
1137
1089
|
}
|
|
1138
|
-
/**
|
|
1139
|
-
*
|
|
1140
|
-
* running and ready dispatches at once: the authenticated runtime route
|
|
1141
|
-
* checks current sandbox state itself, so a status GET before every call was
|
|
1142
|
-
* a whole round trip through the Worker that only moved the same refusal
|
|
1143
|
-
* earlier. A stale cache surfaces as the call's own answer, which the
|
|
1144
|
-
* direct client and the prompt stream turn into a typed `StateError`. A
|
|
1145
|
-
* handle that has not seen the status, or saw one that is not runnable,
|
|
1146
|
-
* reads it first.
|
|
1147
|
-
*/
|
|
1090
|
+
/** Require the current ready incarnation before a runtime call; stopped or replaced
|
|
1091
|
+
* handles must refresh before reusing access. */
|
|
1148
1092
|
async ensureRunning(signal) {
|
|
1149
1093
|
signal?.throwIfAborted();
|
|
1150
1094
|
const startedAt = performance.now();
|
|
@@ -1173,12 +1117,8 @@ var SandboxInfoCapabilities = class {
|
|
|
1173
1117
|
assertFilesystemIncarnationReady() {
|
|
1174
1118
|
if (this.filesystemIncarnationReadiness !== "ready") throw new StateError("Sandbox filesystem incarnation is not ready", this.status, "running with a ready filesystem incarnation");
|
|
1175
1119
|
}
|
|
1176
|
-
/**
|
|
1177
|
-
*
|
|
1178
|
-
* (`/agents/...`), scoped to the current filesystem incarnation. This is
|
|
1179
|
-
* the transport `/agents/profiles` rides and the box surface mount
|
|
1180
|
-
* delivery uses for profile-bundle cache claim/publish.
|
|
1181
|
-
*/
|
|
1120
|
+
/** Authenticated runtime request relative to this sandbox; preserves the runtime error
|
|
1121
|
+
* and request context. */
|
|
1182
1122
|
async runtimeFetch(path, inputOptions, fetchOptions) {
|
|
1183
1123
|
let options = inputOptions;
|
|
1184
1124
|
const data = state(this);
|
|
@@ -1238,17 +1178,8 @@ var SandboxInfoCapabilities = class {
|
|
|
1238
1178
|
});
|
|
1239
1179
|
}
|
|
1240
1180
|
}
|
|
1241
|
-
/**
|
|
1242
|
-
*
|
|
1243
|
-
*
|
|
1244
|
-
* `carryCreateFacts` supplies the create-time facts a refresh must keep:
|
|
1245
|
-
* the GPU lease, the startup diagnostics, and the create receipt each arrive
|
|
1246
|
-
* once on the create response and are absent from every later payload. They
|
|
1247
|
-
* describe ONE environment's creation, so they travel only when the payload
|
|
1248
|
-
* describes that same environment. A payload for a different sandbox — a
|
|
1249
|
-
* branch child parsed through its parent — passes no carry, or the child
|
|
1250
|
-
* would report its parent's create verdict.
|
|
1251
|
-
*/
|
|
1181
|
+
/** Parse public sandbox data. Carry create-only facts only for the same handle; branches
|
|
1182
|
+
* and unrelated incarnations must not inherit their parent’s create verdict. */
|
|
1252
1183
|
parseInfo(data, carryCreateFacts) {
|
|
1253
1184
|
const local = state(this);
|
|
1254
1185
|
const id = data.id ?? this.id;
|
|
@@ -1258,6 +1189,7 @@ var SandboxInfoCapabilities = class {
|
|
|
1258
1189
|
const connection = incarnationComplete && incarnation.readiness === "ready" ? normalizeConnection(data.connection) ?? (sameReadyIncarnation ? local.info.connection : void 0) : void 0;
|
|
1259
1190
|
return {
|
|
1260
1191
|
id,
|
|
1192
|
+
proxySecretReceipt: normalizeProxySecretReceipt(data.proxySecretReceipt, id),
|
|
1261
1193
|
name: data.name,
|
|
1262
1194
|
filesystemIncarnationId: incarnationComplete ? incarnation.id : void 0,
|
|
1263
1195
|
filesystemIncarnationProvenance: incarnationComplete ? incarnation.provenance : void 0,
|
|
@@ -1280,14 +1212,8 @@ var SandboxInfoCapabilities = class {
|
|
|
1280
1212
|
};
|
|
1281
1213
|
}
|
|
1282
1214
|
};
|
|
1283
|
-
/**
|
|
1284
|
-
*
|
|
1285
|
-
* response into a {@link StartupDiagnostics}, deriving the
|
|
1286
|
-
* operation-name → duration `phases` map. Returns `null` when the
|
|
1287
|
-
* payload is absent or carries no operations — diagnostics are emitted
|
|
1288
|
-
* on create and lifecycle responses, so most ordinary reads have no payload to
|
|
1289
|
-
* normalize.
|
|
1290
|
-
*/
|
|
1215
|
+
/** Parse startup operations and derive the duration map; absent or empty operations produce
|
|
1216
|
+
* null. */
|
|
1291
1217
|
function normalizeStartupDiagnostics(raw) {
|
|
1292
1218
|
if (!raw || typeof raw !== "object") return null;
|
|
1293
1219
|
const rawOperations = raw.operations;
|
|
@@ -1353,12 +1279,7 @@ function normalizeSandboxCreateReceipt(raw) {
|
|
|
1353
1279
|
...captureProof ? { captureProof } : {}
|
|
1354
1280
|
};
|
|
1355
1281
|
}
|
|
1356
|
-
/**
|
|
1357
|
-
* Replace bearer-secret fields on a `SandboxConnection` with a sentinel
|
|
1358
|
-
* before serialization. The serialized shape is preserved (so external
|
|
1359
|
-
* tooling that switches on `connection.authToken !== undefined` keeps
|
|
1360
|
-
* working), but the actual token value never leaves the process.
|
|
1361
|
-
*/
|
|
1282
|
+
/** Redact connection bearer fields with the public sentinel; retain route metadata. */
|
|
1362
1283
|
function redactConnectionSecrets(connection) {
|
|
1363
1284
|
if (!connection) return connection;
|
|
1364
1285
|
if (connection.authToken === void 0 && connection.execToken === void 0) return connection;
|
|
@@ -1385,11 +1306,7 @@ function readFilesystemIncarnationTuple(value) {
|
|
|
1385
1306
|
const SANDBOX_STATUS_FRESHNESS_MS = 1e3;
|
|
1386
1307
|
const sandboxStatusObservedAt = /* @__PURE__ */ new WeakMap();
|
|
1387
1308
|
const REFRESH_REASON_HEADER = "x-tangle-refresh-reason";
|
|
1388
|
-
/**
|
|
1389
|
-
* A browser preflights any header the API does not list in its CORS allow
|
|
1390
|
-
* list, and the reason header is the SDK's, so only runtimes that have no
|
|
1391
|
-
* CORS (Node, Workers) send it.
|
|
1392
|
-
*/
|
|
1309
|
+
/** Browsers may send only CORS-allowed headers; omit unsupported diagnostic headers. */
|
|
1393
1310
|
function sendsRefreshReason() {
|
|
1394
1311
|
return !("document" in globalThis);
|
|
1395
1312
|
}
|
|
@@ -6733,29 +6650,7 @@ var SandboxRuntimeOperations = class extends SandboxLifecycleCapabilities {
|
|
|
6733
6650
|
if (!response.ok) throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
6734
6651
|
return null;
|
|
6735
6652
|
}
|
|
6736
|
-
/**
|
|
6737
|
-
* What the DEPLOYED sidecar image can do — capability flags compiled into
|
|
6738
|
-
* the image, served by the authenticated `GET /capabilities` route — not
|
|
6739
|
-
* SDK method presence. Read this before relying on a newer contract
|
|
6740
|
-
* feature (exact run cancellation, event replay) against a deployment you
|
|
6741
|
-
* did not ship.
|
|
6742
|
-
*
|
|
6743
|
-
* Returns `null` when a NEWER deployment serves a `schema` > 1 this SDK
|
|
6744
|
-
* cannot read — "unknown, fail closed": treat every capability as
|
|
6745
|
-
* unclaimed. A malformed v1 document or any other error throws.
|
|
6746
|
-
*
|
|
6747
|
-
* The document is a plain JSON body; see `SandboxRuntimeCapabilities` for
|
|
6748
|
-
* why no field is header-derived.
|
|
6749
|
-
*
|
|
6750
|
-
* @example Gate canonical cancellation on the deployment
|
|
6751
|
-
* ```typescript
|
|
6752
|
-
* const caps = await box.capabilities();
|
|
6753
|
-
* if (caps?.cancel.canonicalRunCancellation) {
|
|
6754
|
-
* await box.session(sessionId).cancelRun(request);
|
|
6755
|
-
* }
|
|
6756
|
-
* ```
|
|
6757
|
-
*/
|
|
6758
|
-
/** Grant one owner-authorized stored token for a native continuation; never accepts or returns its value. */
|
|
6653
|
+
/** Grant one stored native reference. Canonical admission stays pending until preparation proves HOME; no value crosses this API. */
|
|
6759
6654
|
async grantNativeCredential(grant, options) {
|
|
6760
6655
|
const cliAuth = cliAuthReferenceSchema.parse(grant.cliAuth);
|
|
6761
6656
|
if (grant.harness === "claude-code" && cliAuth.format !== "token" || grant.harness === "codex" && cliAuth.format !== "bundle" && cliAuth.format !== "files" || grant.harness !== "claude-code" && grant.harness !== "codex") throw new ValidationError("Native credential continuation requires a supported harness and reference format");
|
|
@@ -6770,10 +6665,12 @@ var SandboxRuntimeOperations = class extends SandboxLifecycleCapabilities {
|
|
|
6770
6665
|
});
|
|
6771
6666
|
if (!response.ok) throw new StateError("Native credential grant was not confirmed", "unconfirmed");
|
|
6772
6667
|
const value = await readResponseJson(response);
|
|
6773
|
-
|
|
6668
|
+
const pending = value && typeof value === "object" && "proxySecretReceipt" in value ? ProxySecretReceiptSchema.safeParse(value.proxySecretReceipt) : void 0;
|
|
6669
|
+
if (!value || typeof value !== "object" || (pending ? !pending.success || pending.data.status !== "proxy-installed" || pending.data.sandboxId !== this.id || !pending.data.bindings.length || pending.data.bindings.some((binding) => binding.secretRef.key !== cliAuth.secretEnv) || "installed" in value : !("installed" in value) || value.installed !== true) || !("harness" in value) || value.harness !== grant.harness || !("cliAuth" in value)) throw new StateError("Native credential grant receipt is invalid", "unconfirmed");
|
|
6774
6670
|
const confirmed = cliAuthReferenceSchema.safeParse(value.cliAuth);
|
|
6775
6671
|
if (!confirmed.success || confirmed.data.account !== cliAuth.account || confirmed.data.secretEnv !== cliAuth.secretEnv || confirmed.data.format !== cliAuth.format) throw new StateError("Native credential grant receipt names another reference", "unconfirmed");
|
|
6776
6672
|
}
|
|
6673
|
+
/** Deployed capabilities; newer schemas return null, malformed known schemas or transport failures throw. */
|
|
6777
6674
|
async capabilities() {
|
|
6778
6675
|
await this.ensureRunning();
|
|
6779
6676
|
return parseSandboxRuntimeCapabilities(await readResponseJson(await this.runtimeFetch("/capabilities", { method: "GET" })));
|
|
@@ -7239,20 +7136,6 @@ function readPublicProfileConflicts(value) {
|
|
|
7239
7136
|
}));
|
|
7240
7137
|
}
|
|
7241
7138
|
var SandboxProfileCapabilities = class extends SandboxFileWriteCapabilities {
|
|
7242
|
-
/**
|
|
7243
|
-
* Stream events from an agent prompt.
|
|
7244
|
-
* Use this for real-time updates during agent execution.
|
|
7245
|
-
*
|
|
7246
|
-
* Guarantees terminal completion on every non-cancelled path. A clean run
|
|
7247
|
-
* emits a `result` summary and ends with `done`. A failure is an in-band
|
|
7248
|
-
* `error` followed by `done`, never a thrown generator. Caller cancellation
|
|
7249
|
-
* ends the stream silently with no synthetic terminal.
|
|
7250
|
-
*
|
|
7251
|
-
* Automatically reconnects via the runtime event replay endpoint if the
|
|
7252
|
-
* SSE stream drops before a terminal event (`done` or `error`) is
|
|
7253
|
-
* received. Reconnection is transparent — replayed events that were
|
|
7254
|
-
* already yielded (based on event ID tracking) are deduplicated.
|
|
7255
|
-
*/
|
|
7256
7139
|
/**
|
|
7257
7140
|
* Record that the runtime already holds `profile` under `sha256`, so
|
|
7258
7141
|
* subsequent turns whose profile has the same canonical content send
|
|
@@ -7344,15 +7227,6 @@ var SandboxProfileCapabilities = class extends SandboxFileWriteCapabilities {
|
|
|
7344
7227
|
return data.sha256;
|
|
7345
7228
|
}
|
|
7346
7229
|
/**
|
|
7347
|
-
* Build the run request's `backend` body. When the outgoing profile's CONTENT
|
|
7348
|
-
* matches the one the runtime already holds (and we are not resending after a
|
|
7349
|
-
* cache miss), swap the inline `profile` for its `profileSha256` so a large
|
|
7350
|
-
* static corpus does not ride every turn. The match is by serialized content,
|
|
7351
|
-
* not object identity, so a mutated-in-place profile — or an equivalent
|
|
7352
|
-
* object passed as a per-turn override — is compared correctly: unchanged
|
|
7353
|
-
* content references by hash, changed content sends inline.
|
|
7354
|
-
*/
|
|
7355
|
-
/**
|
|
7356
7230
|
* How this handle's most recent profile file preparation was satisfied
|
|
7357
7231
|
* (host cache hit, partial, miss, direct delivery, or a held receipt) and
|
|
7358
7232
|
* how long it took. Undefined until a profile with file mounts is prepared.
|
|
@@ -7412,36 +7286,6 @@ var SandboxProfileCapabilities = class extends SandboxFileWriteCapabilities {
|
|
|
7412
7286
|
return true;
|
|
7413
7287
|
}
|
|
7414
7288
|
/**
|
|
7415
|
-
* Create a snapshot of the sandbox state.
|
|
7416
|
-
* Snapshots can be used to save workspace state for later restoration.
|
|
7417
|
-
*
|
|
7418
|
-
* If `storage` is provided (BYOS3), the snapshot is created directly
|
|
7419
|
-
* directly on the sandbox and uploaded to customer-provided S3 storage.
|
|
7420
|
-
*
|
|
7421
|
-
* @param options - Snapshot options (tags, paths, storage)
|
|
7422
|
-
* @returns Snapshot result with ID and metadata
|
|
7423
|
-
*
|
|
7424
|
-
* @example Standard snapshot (our storage)
|
|
7425
|
-
* ```typescript
|
|
7426
|
-
* const snap = await box.snapshot({
|
|
7427
|
-
* tags: ["v1.0", "stable"],
|
|
7428
|
-
* });
|
|
7429
|
-
* console.log(`Snapshot: ${snap.snapshotId}`);
|
|
7430
|
-
* ```
|
|
7431
|
-
*
|
|
7432
|
-
* @example BYOS3 snapshot (customer storage)
|
|
7433
|
-
* ```typescript
|
|
7434
|
-
* const snap = await box.snapshot({
|
|
7435
|
-
* tags: ["production"],
|
|
7436
|
-
* storage: {
|
|
7437
|
-
* type: "s3",
|
|
7438
|
-
* bucket: "my-snapshots",
|
|
7439
|
-
* credentials: { accessKeyId: "...", secretAccessKey: "..." },
|
|
7440
|
-
* },
|
|
7441
|
-
* });
|
|
7442
|
-
* ```
|
|
7443
|
-
*/
|
|
7444
|
-
/**
|
|
7445
7289
|
* The profile provenance receipt for this sandbox: which profile was
|
|
7446
7290
|
* materialized, its content hash, and when. Absent for a bare sandbox
|
|
7447
7291
|
* created without a profile. This is what `snapshot()` carries into the
|
|
@@ -7515,6 +7359,7 @@ var SandboxProfileCapabilities = class extends SandboxFileWriteCapabilities {
|
|
|
7515
7359
|
endpoint
|
|
7516
7360
|
});
|
|
7517
7361
|
return {
|
|
7362
|
+
...receipt.proxySecretReceipt === void 0 ? {} : { proxySecretReceipt: normalizeProxySecretReceipt(receipt.proxySecretReceipt, this.id) },
|
|
7518
7363
|
expectedPublicProfileRequestDigest,
|
|
7519
7364
|
expectedPublicProfileRevision: {
|
|
7520
7365
|
workspacePlanDigest: receipt.workspacePlanDigest,
|
|
@@ -7553,6 +7398,7 @@ var SandboxProfileCapabilities = class extends SandboxFileWriteCapabilities {
|
|
|
7553
7398
|
endpoint
|
|
7554
7399
|
});
|
|
7555
7400
|
return {
|
|
7401
|
+
...receipt.proxySecretReceipt === void 0 ? {} : { proxySecretReceipt: normalizeProxySecretReceipt(receipt.proxySecretReceipt, this.id) },
|
|
7556
7402
|
expectedPublicProfileRequestDigest,
|
|
7557
7403
|
expectedSecretProfileReceipt: receipt.executorReceipt,
|
|
7558
7404
|
workspacePlanDigest: receipt.workspacePlanDigest,
|
|
@@ -12075,4 +11921,4 @@ var SandboxInstance = class SandboxInstance extends SandboxEgressCapabilities {
|
|
|
12075
11921
|
}
|
|
12076
11922
|
};
|
|
12077
11923
|
//#endregion
|
|
12078
|
-
export { normalizeSandboxCreateReceipt as A,
|
|
11924
|
+
export { normalizeSandboxCreateReceipt as A, createRetryDelayMs as B, SandboxOperationFailedError as C, validateDeferredProfileFileMounts as D, splitInlineProfileSkills as E, normalizeProxySecretReceipt as F, waitForCreateRetry as G, isDeployWindowCreateError as H, normalizeSandboxShape as I, canonicalAgentProfileDigest as K, DEFAULT_CREATE_TIMEOUT_MS as L, parseStopPhase as M, normalizeConnection as N, isRetryableProfileFileMaterializeFailure as O, normalizeEgressPolicyFields as P, DEFAULT_GPU_CREATE_TIMEOUT_MS as R, SandboxOperation as S, splitInlineProfileFileMounts as T, isRateLimitCreateError as U, generateIdempotencyKey as V, isRetryableCreateError as W, collectAgentFinalMessageText as _, MAX_EGRESS_DENIALS_LIMIT as a, isToolBearingEvent as b, otelTraceIdForTangleTrace as c, SandboxSession as d, InteractiveSessionHandle as f, applySandboxEventText as g, createInteractiveTerminalSession as h, downloadFile as i, normalizeStartupDiagnostics as j, normalizeCaptureProof as k, toOtelJson as l, createInteractiveTerminalCapture as m, createSandboxInstanceFromResponse as n, buildTraceExportPayload as o, InteractiveTerminalFrameLog as p, WorkspaceImages as r, exportTraceBundle as s, SandboxInstance as t, SandboxTaskSession as u, collectAgentResponseText as v, materializeProfileFileMounts as w, ManagedProcessClient as x, getSandboxEventText as y, DEPLOY_WINDOW_RETRY_MS as z };
|
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-DlCzW_SB.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-TNrvVHbo.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-gF473YxX.js";
|
|
2
2
|
import { i as readResponseJson } from "./errors-ystNl7Ae.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
|
|
@@ -485,6 +485,165 @@ declare const ProxySecretBindingSchema: z.ZodObject<{
|
|
|
485
485
|
ttlSeconds: z.ZodOptional<z.ZodNumber>;
|
|
486
486
|
}, z.core.$strict>;
|
|
487
487
|
type ProxySecretBinding = z.infer<typeof ProxySecretBindingSchema>;
|
|
488
|
+
/** proxy-installed is a phase-two input, never dispatch authority. Only installed acknowledges
|
|
489
|
+
* proxy and placeholder-only materialization. Revoked confirms binding revocation, not upstream
|
|
490
|
+
* credential revocation. Receipts contain metadata only, never secret or placeholder bytes.
|
|
491
|
+
*/
|
|
492
|
+
declare const ProxySecretReceiptSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
493
|
+
status: z.ZodLiteral<"proxy-installed">;
|
|
494
|
+
materializationAcknowledged: z.ZodLiteral<false>;
|
|
495
|
+
protocolVersion: z.ZodLiteral<1>;
|
|
496
|
+
sandboxId: z.ZodString;
|
|
497
|
+
generation: z.ZodNumber;
|
|
498
|
+
bindings: z.ZodArray<z.ZodObject<{
|
|
499
|
+
envName: z.ZodString;
|
|
500
|
+
secretRef: z.ZodObject<{
|
|
501
|
+
key: z.ZodString;
|
|
502
|
+
kind: z.ZodLiteral<"secret-ref">;
|
|
503
|
+
}, z.core.$strict>;
|
|
504
|
+
grant: z.ZodObject<{
|
|
505
|
+
protocolVersion: z.ZodLiteral<1>;
|
|
506
|
+
grantId: z.ZodString;
|
|
507
|
+
sandboxId: z.ZodString;
|
|
508
|
+
epoch: z.ZodString;
|
|
509
|
+
identity: z.ZodObject<{
|
|
510
|
+
tenantId: z.ZodString;
|
|
511
|
+
issuerId: z.ZodString;
|
|
512
|
+
secretId: z.ZodString;
|
|
513
|
+
revision: z.ZodString;
|
|
514
|
+
}, z.core.$strict>;
|
|
515
|
+
scope: z.ZodObject<{
|
|
516
|
+
hosts: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
517
|
+
methods: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
518
|
+
paths: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
519
|
+
}, z.core.$strict>;
|
|
520
|
+
presentation: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
521
|
+
type: z.ZodLiteral<"bearer">;
|
|
522
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
523
|
+
type: z.ZodLiteral<"basic">;
|
|
524
|
+
username: z.ZodString;
|
|
525
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
526
|
+
type: z.ZodLiteral<"header">;
|
|
527
|
+
name: z.ZodString;
|
|
528
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
529
|
+
type: z.ZodLiteral<"query">;
|
|
530
|
+
name: z.ZodString;
|
|
531
|
+
}, z.core.$strict>], "type">;
|
|
532
|
+
placeholderFormat: z.ZodEnum<{
|
|
533
|
+
jwt: "jwt";
|
|
534
|
+
opaque: "opaque";
|
|
535
|
+
}>;
|
|
536
|
+
issuedAt: z.ZodISODateTime;
|
|
537
|
+
expiresAt: z.ZodISODateTime;
|
|
538
|
+
sourceExpiresAt: z.ZodOptional<z.ZodISODateTime>;
|
|
539
|
+
parentGrantId: z.ZodOptional<z.ZodString>;
|
|
540
|
+
}, z.core.$strict>;
|
|
541
|
+
}, z.core.$strict>>;
|
|
542
|
+
proxyAcknowledged: z.ZodLiteral<true>;
|
|
543
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
544
|
+
status: z.ZodLiteral<"installed">;
|
|
545
|
+
materializationAcknowledged: z.ZodLiteral<true>;
|
|
546
|
+
protocolVersion: z.ZodLiteral<1>;
|
|
547
|
+
sandboxId: z.ZodString;
|
|
548
|
+
generation: z.ZodNumber;
|
|
549
|
+
bindings: z.ZodArray<z.ZodObject<{
|
|
550
|
+
envName: z.ZodString;
|
|
551
|
+
secretRef: z.ZodObject<{
|
|
552
|
+
key: z.ZodString;
|
|
553
|
+
kind: z.ZodLiteral<"secret-ref">;
|
|
554
|
+
}, z.core.$strict>;
|
|
555
|
+
grant: z.ZodObject<{
|
|
556
|
+
protocolVersion: z.ZodLiteral<1>;
|
|
557
|
+
grantId: z.ZodString;
|
|
558
|
+
sandboxId: z.ZodString;
|
|
559
|
+
epoch: z.ZodString;
|
|
560
|
+
identity: z.ZodObject<{
|
|
561
|
+
tenantId: z.ZodString;
|
|
562
|
+
issuerId: z.ZodString;
|
|
563
|
+
secretId: z.ZodString;
|
|
564
|
+
revision: z.ZodString;
|
|
565
|
+
}, z.core.$strict>;
|
|
566
|
+
scope: z.ZodObject<{
|
|
567
|
+
hosts: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
568
|
+
methods: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
569
|
+
paths: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
570
|
+
}, z.core.$strict>;
|
|
571
|
+
presentation: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
572
|
+
type: z.ZodLiteral<"bearer">;
|
|
573
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
574
|
+
type: z.ZodLiteral<"basic">;
|
|
575
|
+
username: z.ZodString;
|
|
576
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
577
|
+
type: z.ZodLiteral<"header">;
|
|
578
|
+
name: z.ZodString;
|
|
579
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
580
|
+
type: z.ZodLiteral<"query">;
|
|
581
|
+
name: z.ZodString;
|
|
582
|
+
}, z.core.$strict>], "type">;
|
|
583
|
+
placeholderFormat: z.ZodEnum<{
|
|
584
|
+
jwt: "jwt";
|
|
585
|
+
opaque: "opaque";
|
|
586
|
+
}>;
|
|
587
|
+
issuedAt: z.ZodISODateTime;
|
|
588
|
+
expiresAt: z.ZodISODateTime;
|
|
589
|
+
sourceExpiresAt: z.ZodOptional<z.ZodISODateTime>;
|
|
590
|
+
parentGrantId: z.ZodOptional<z.ZodString>;
|
|
591
|
+
}, z.core.$strict>;
|
|
592
|
+
}, z.core.$strict>>;
|
|
593
|
+
proxyAcknowledged: z.ZodLiteral<true>;
|
|
594
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
595
|
+
status: z.ZodLiteral<"revoked">;
|
|
596
|
+
materializationAcknowledged: z.ZodLiteral<true>;
|
|
597
|
+
protocolVersion: z.ZodLiteral<1>;
|
|
598
|
+
sandboxId: z.ZodString;
|
|
599
|
+
generation: z.ZodNumber;
|
|
600
|
+
bindings: z.ZodArray<z.ZodObject<{
|
|
601
|
+
envName: z.ZodString;
|
|
602
|
+
secretRef: z.ZodObject<{
|
|
603
|
+
key: z.ZodString;
|
|
604
|
+
kind: z.ZodLiteral<"secret-ref">;
|
|
605
|
+
}, z.core.$strict>;
|
|
606
|
+
grant: z.ZodObject<{
|
|
607
|
+
protocolVersion: z.ZodLiteral<1>;
|
|
608
|
+
grantId: z.ZodString;
|
|
609
|
+
sandboxId: z.ZodString;
|
|
610
|
+
epoch: z.ZodString;
|
|
611
|
+
identity: z.ZodObject<{
|
|
612
|
+
tenantId: z.ZodString;
|
|
613
|
+
issuerId: z.ZodString;
|
|
614
|
+
secretId: z.ZodString;
|
|
615
|
+
revision: z.ZodString;
|
|
616
|
+
}, z.core.$strict>;
|
|
617
|
+
scope: z.ZodObject<{
|
|
618
|
+
hosts: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
619
|
+
methods: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
620
|
+
paths: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
621
|
+
}, z.core.$strict>;
|
|
622
|
+
presentation: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
623
|
+
type: z.ZodLiteral<"bearer">;
|
|
624
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
625
|
+
type: z.ZodLiteral<"basic">;
|
|
626
|
+
username: z.ZodString;
|
|
627
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
628
|
+
type: z.ZodLiteral<"header">;
|
|
629
|
+
name: z.ZodString;
|
|
630
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
631
|
+
type: z.ZodLiteral<"query">;
|
|
632
|
+
name: z.ZodString;
|
|
633
|
+
}, z.core.$strict>], "type">;
|
|
634
|
+
placeholderFormat: z.ZodEnum<{
|
|
635
|
+
jwt: "jwt";
|
|
636
|
+
opaque: "opaque";
|
|
637
|
+
}>;
|
|
638
|
+
issuedAt: z.ZodISODateTime;
|
|
639
|
+
expiresAt: z.ZodISODateTime;
|
|
640
|
+
sourceExpiresAt: z.ZodOptional<z.ZodISODateTime>;
|
|
641
|
+
parentGrantId: z.ZodOptional<z.ZodString>;
|
|
642
|
+
}, z.core.$strict>;
|
|
643
|
+
}, z.core.$strict>>;
|
|
644
|
+
proxyAcknowledged: z.ZodLiteral<true>;
|
|
645
|
+
}, z.core.$strict>], "status">;
|
|
646
|
+
type ProxySecretReceipt = z.infer<typeof ProxySecretReceiptSchema>;
|
|
488
647
|
/** Advertise only when served API, driver, host, proxy and materializer agree. Absence,
|
|
489
648
|
* protocol skew, or unsupported driver/presentation/format refuses before resolution or launch.
|
|
490
649
|
*/
|
|
@@ -2666,4 +2825,4 @@ interface TerminalStreamOptions {
|
|
|
2666
2825
|
mintMs?: number;
|
|
2667
2826
|
}
|
|
2668
2827
|
//#endregion
|
|
2669
|
-
export {
|
|
2828
|
+
export { ProxySecretReceipt as $, AgentInteractiveSessionStatus as A, InteractionAcknowledgement as B, AgentInteractiveSessionAttach as C, StateError as Ct, AgentInteractiveSessionPromptAcknowledgement as D, ValidationError as Dt, AgentInteractiveSessionControlClaimRequest as E, TimeoutError as Et, TerminalOutputEvent as F, AgentProfileConfidential as G, InteractionResponseCommand as H, TerminalReplayWindow as I, AgentProfileMcpServer as J, AgentProfileConfigValue as K, AgentExactRunControlRef as L, AgentInteractiveSessionStopCommand as M, AgentInteractiveTerminalSession as N, AgentInteractiveSessionPromptCommand as O, SandboxCreateOutcome as Ot, agentInteractiveSessionPromptRequestDigest as P, ReasoningEffort as Q, AgentRunCancellationAcknowledgement as R, AgentInteractiveSessionStart as S, ServerError as St, AgentInteractiveSessionControlClaimAcknowledgement as T, StreamInterruptionReason as Tt, AgentProfile as U, InteractionRequest as V, AgentProfileCapabilities as W, AgentProfileSeat as X, AgentProfileMetadata as Y, AgentProfileValidationResult as Z, TerminalReadyTimings as _, QuotaError as _t, TerminalStreamOptions as a, CapabilityError as at, SandboxSizePreset as b, SandboxErrorJson as bt, MintInteractiveSessionTokenOptions as c, EgressProxyRecoveryError as ct, ScopedTokenScope as d, GpuProviderRequirement as dt, InteractionData as et, TERMINAL_WS_ECHO_SUBPROTOCOL as f, KeyBudgetExhaustedError as ft, TerminalReadyInfo as g, ProfileFileMountPathError as gt, TerminalOutputMessage as h, PartialFailureError as ht, TerminalStreamHandlers as i, BranchFanoutExceedsHostError as it, AgentInteractiveSessionStopAcknowledgement as j, AgentInteractiveSessionRef as k, SandboxCreateReceipt as kt, MintScopedTokenOptions as l, FileWriteConflictError as lt, TerminalInteractiveSessionIdentity as m, NotFoundError as mt, TerminalStreamApiKey as n, TerminalStreamError as nt, TerminalStreamReconnectAuthority as o, CompliancePlacementError as ot, TerminalExitInfo as p, NetworkError as pt, AgentProfileFileMount as q, TerminalStreamBearerToken as r, AuthError as rt, TerminalStreamToken as s, EdgeNotReadyError as st, TerminalAttachTimings as t, PlanContinuation as tt, ScopedToken as u, GpuProviderNotConfiguredError as ut, TerminalStreamAuthFormat as v, ResumeEnvRequiredError as vt, AgentInteractiveSessionControlClaim as w, StreamInterruptedError as wt, AgentRuntimeAttachments as x, SandboxFailureDetail as xt, SANDBOX_SIZE_PRESET_NAMES as y, SandboxError as yt, AgentRunCancellationRequest as z };
|