@tangle-network/sandbox 1.0.267 → 1.0.269
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/index.d.ts +4 -4
- package/dist/agent/index.js +4 -4
- package/dist/agent/preview.d.ts +1 -1
- package/dist/agent/preview.js +1 -1
- package/dist/{agent-run-outcome-DThM9ULE.d.ts → agent-run-outcome-D-FJ3vk7.d.ts} +2 -2
- package/dist/{api-request-Cro-o_Hn.js → api-request-d6B6aqw2.js} +1 -1
- package/dist/auth/index.d.ts +2 -2
- package/dist/auth/index.js +2 -2
- package/dist/{browser-interactive-control-controller-ClykJB9N.d.ts → browser-interactive-control-controller-BD0GL8aF.d.ts} +2 -1
- package/dist/{browser-interactive-control-controller-CoXo6W-C.js → browser-interactive-control-controller-DQROMYR8.js} +1 -1
- package/dist/{cli-auth-bundle-CQCt2mcZ.d.ts → cli-auth-bundle-B3jfdNXg.d.ts} +6 -8
- package/dist/{cli-auth-bundle-DcxhAW23-C22MMIvx.js → cli-auth-bundle-B4SGUcYM-CukXOw4n.js} +21 -11
- package/dist/cli-auth-bundle-DIZ0PWyR.js +2 -0
- package/dist/{client-T2segRsd.js → client-2ScDoZ8I.js} +5 -5
- package/dist/{client-BYGLoEiU.d.ts → client-DD-ocMMn.d.ts} +8 -7
- package/dist/collaboration/index.d.ts +1 -1
- package/dist/collaboration/index.js +1 -1
- package/dist/{collaboration-C7MXUmkW.js → collaboration-BnH82ukZ.js} +1 -1
- package/dist/core.d.ts +6 -6
- package/dist/core.js +3 -3
- package/dist/gpu-lease/index.js +1 -1
- package/dist/{terminal-stream-types-Cdz3xrux.d.ts → index-B5e7Pa7p.d.ts} +8 -1750
- package/dist/{index-DkB8WbjK.d.ts → index-iof5xqBR.d.ts} +8 -7
- package/dist/index.d.ts +13 -12
- package/dist/index.js +8 -8
- package/dist/intelligence/index.d.ts +1 -1
- package/dist/intelligence/index.js +1 -1
- package/dist/interactive-control.d.ts +1 -1
- package/dist/interactive-control.js +1 -1
- package/dist/{interactive-controller-D1Jl59Np.js → interactive-controller-BN-DYor8.js} +2 -2
- package/dist/{interactive-controller-DSYQTRwh.d.ts → interactive-controller-D5TOWZcD.d.ts} +4 -3
- package/dist/{lines-D7lE49lV.d.ts → lines-C4okxSB-.d.ts} +1 -1
- package/dist/lines.d.ts +1 -1
- package/dist/{local-cli-auth-C2cETxK4.js → local-cli-auth-DNNXF4cB.js} +1 -1
- package/dist/{mcp-local-Bk8_gFfz.js → mcp-local-Bn88WmHt.js} +2 -2
- package/dist/{preview-DsHoo8BC.d.ts → preview-D-8VD4_D.d.ts} +3 -3
- package/dist/{public-templates-DRqOkshE.d.ts → public-templates-BiV_GW-f.d.ts} +2 -2
- package/dist/public-templates.d.ts +1 -1
- package/dist/runtime.d.ts +5 -5
- package/dist/runtime.js +3 -3
- package/dist/{sandbox-DVKv1JBh.js → sandbox-B740bdgv.js} +221 -223
- package/dist/{select-seat-DWMZh9Mj.js → select-seat-D0YBpIJl.js} +2 -2
- package/dist/select-seat-command.d.ts +2 -2
- package/dist/select-seat-command.js +1 -1
- package/dist/session-gateway/index.js +1 -1
- package/dist/tangle/index.d.ts +1 -1
- package/dist/tangle/index.js +1 -1
- package/dist/{tangle-Dz9tB-jj.js → tangle-wDixJBx_.js} +2 -2
- package/dist/terminal-stream-types-BSyus9Qn.d.ts +1753 -0
- package/dist/{types-BikjtQi3.d.ts → types-D3PBgznU.d.ts} +365 -373
- package/package.json +5 -5
- package/dist/cli-auth-bundle-DXKH215p.js +0 -2
- /package/dist/{index-B6aMEMDR.d.ts → index-DreKipF6.d.ts} +0 -0
- /package/dist/{index-BsT3M4X-.d.ts → index-zu3yijbl.d.ts} +0 -0
- /package/dist/{raw-evidence-export-C-TDdAgC.d.ts → raw-evidence-export-3QmilbFa.d.ts} +0 -0
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { A as requestedPublicProfileDigest, C as runtimeFilesystemPath, D as assertCurrentBackendType, E as applyRequestedModel, F as createAgentRunOutcomeTracker, I as deriveAgentResultOutcome, O as mergeRuntimeBackendConfig, P as withoutRuntimeSecrets, S as encodeTextForWire, U as normalizeEffectiveBackend, _ as mintTraceId, a as assertScopedTokenActive, b as validateAcceptedDispatchRunRef, c as SandboxRuntimeApi, d as appendSessionIdQuery, f as callHeaders, g as isTraceId, h as TRACE_ID_HEADER, i as terminalUpgradeHeadersSupported, j as requestedSecretProfilePublicDigest, k as normalizeRuntimeBackendConfig, l as normalizeSessionInfo, m as assertFileWritePreconditions, n as InteractiveSessionController, p as sessionHeaders, r as TerminalStream, s as requestScopedToken, u as sessionMessageRequestBody, v as resolveTraceId, w as canUseNodeHttp2, x as encodePromptForWire, y as resolveDispatchRunIdentity } from "./interactive-controller-
|
|
1
|
+
import { A as requestedPublicProfileDigest, C as runtimeFilesystemPath, D as assertCurrentBackendType, E as applyRequestedModel, F as createAgentRunOutcomeTracker, I as deriveAgentResultOutcome, O as mergeRuntimeBackendConfig, P as withoutRuntimeSecrets, S as encodeTextForWire, U as normalizeEffectiveBackend, _ as mintTraceId, a as assertScopedTokenActive, b as validateAcceptedDispatchRunRef, c as SandboxRuntimeApi, d as appendSessionIdQuery, f as callHeaders, g as isTraceId, h as TRACE_ID_HEADER, i as terminalUpgradeHeadersSupported, j as requestedSecretProfilePublicDigest, k as normalizeRuntimeBackendConfig, l as normalizeSessionInfo, m as assertFileWritePreconditions, n as InteractiveSessionController, p as sessionHeaders, r as TerminalStream, s as requestScopedToken, u as sessionMessageRequestBody, v as resolveTraceId, w as canUseNodeHttp2, x as encodePromptForWire, y as resolveDispatchRunIdentity } from "./interactive-controller-BN-DYor8.js";
|
|
2
2
|
import { C as boundedIdentifierSchema$1, E as boundedStringSchema$1, g as sha256DigestSchema$1, o as canonicalCandidateDigest$1, s as canonicalCandidateJson$1 } from "./harness--g8UQ5TZ.js";
|
|
3
3
|
import { a as ProxySecretReceiptSchema$1, r as agentProfileSchema$1 } from "./profile-schema-B11dRfGB.js";
|
|
4
4
|
import { t as sha256$1 } from "./sha2-BIoWepwn.js";
|
|
5
|
-
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-
|
|
5
|
+
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-DQROMYR8.js";
|
|
6
6
|
import { t as canonicalAgentProfileDigest } from "./agent-execution-preparation-N1ksNIIJ.js";
|
|
7
7
|
import { C as SandboxError, D as TimeoutError, E as StreamInterruptedError, O as ValidationError, T as StateError, _ as NetworkError, a as readResponseJson, b as ProfileFileMountPathError, c as AuthError, f as EdgeNotReadyError, i as parseResponseError, n as isTransientWrite, o as responseMetadata, r as parseErrorResponse, s as retryWhen, t as TerminalStreamError, u as CapabilityError, v as NotFoundError, w as ServerError, y as PartialFailureError } from "./errors-D44qyFpy.js";
|
|
8
8
|
import { t as parseSandboxRetryAfterHeader } from "./retry-after-header-BZbs5rig.js";
|
|
9
9
|
import { n as combineAbortSignals, t as awaitWithAbort } from "./abort-signal-BsriwJ8L.js";
|
|
10
10
|
import { a as backoffDelayMs, o as isUndelivered, r as abortableSleep } from "./retry-policy-oW3_ljoc.js";
|
|
11
|
-
import { a as isReplayableBody, i as fetchSandboxApi, n as SDK_TIMEOUTS, o as rewrapResponse, t as IDEMPOTENT_METHODS } from "./api-request-
|
|
11
|
+
import { a as isReplayableBody, i as fetchSandboxApi, n as SDK_TIMEOUTS, o as rewrapResponse, t as IDEMPOTENT_METHODS } from "./api-request-d6B6aqw2.js";
|
|
12
12
|
import { a as SANDBOX_PROXY_REQUEST_MAX_BYTES, c as PROFILE_FILE_MOUNT_OUTSIDE_ROOTS_CODE, d as isProfileFileMountOutsideRoots, f as profileFileMountOutsideRootsMessage, l as SANDBOX_AGENT_HOME, o as FILE_OPERATION_LIMITS, u as SANDBOX_FILE_API_ABSOLUTE_ROOTS } from "./file-transfer-DOSTbUSR.js";
|
|
13
13
|
import { c as awaitSdkResend, l as takeSdkTurn, s as uploadChunked } from "./chunked-upload-ChZB-dYE.js";
|
|
14
14
|
import { n as fetchWithKeepAlive, t as emitTiming } from "./keep-alive-fetch-sGVP8skk.js";
|
|
15
15
|
import { t as SIDECAR_PROXY_ERROR_HEADER } from "./sidecar-proxy-error-DTdbCbUM.js";
|
|
16
16
|
import { t as parseSSEStream } from "./sse-parser-BCG3iL9j.js";
|
|
17
17
|
import { t as runPreparedProcess } from "./prepared-process-DQ_68Ofg.js";
|
|
18
|
-
import { a as isBackendType, r as cliAuthReferenceSchema } from "./cli-auth-bundle-
|
|
19
|
-
import "./cli-auth-bundle-
|
|
18
|
+
import { a as isBackendType, r as cliAuthReferenceSchema } from "./cli-auth-bundle-B4SGUcYM-CukXOw4n.js";
|
|
19
|
+
import "./cli-auth-bundle-DIZ0PWyR.js";
|
|
20
20
|
import { n as SandboxLines } from "./lines-DwJ7AKx7.js";
|
|
21
21
|
import { t as downloadFile } from "./file-download-BO-Hmn3x.js";
|
|
22
22
|
import { z } from "zod";
|
|
@@ -3056,6 +3056,194 @@ async function isRefusedBearer(response) {
|
|
|
3056
3056
|
}
|
|
3057
3057
|
}
|
|
3058
3058
|
//#endregion
|
|
3059
|
+
//#region src/operation.ts
|
|
3060
|
+
/** Durable lifecycle operations and their client waits. */
|
|
3061
|
+
const FIRST_POLL_MS = 250;
|
|
3062
|
+
const MAX_POLL_MS = 2e3;
|
|
3063
|
+
/** An accepted operation ended in failure. `code` names why. */
|
|
3064
|
+
var SandboxOperationFailedError = class extends SandboxError {
|
|
3065
|
+
operation;
|
|
3066
|
+
constructor(operation) {
|
|
3067
|
+
super(operation.error?.message ?? `Sandbox ${operation.kind} operation ${operation.id} failed`, { code: operation.error?.code ?? "OPERATION_FAILED" });
|
|
3068
|
+
this.operation = operation;
|
|
3069
|
+
}
|
|
3070
|
+
};
|
|
3071
|
+
function isRecord$1(value) {
|
|
3072
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
3073
|
+
}
|
|
3074
|
+
const KINDS = [
|
|
3075
|
+
"stop",
|
|
3076
|
+
"snapshot",
|
|
3077
|
+
"delete"
|
|
3078
|
+
];
|
|
3079
|
+
const STATES = [
|
|
3080
|
+
"accepted",
|
|
3081
|
+
"running",
|
|
3082
|
+
"succeeded",
|
|
3083
|
+
"failed"
|
|
3084
|
+
];
|
|
3085
|
+
function parseSnapshot(value) {
|
|
3086
|
+
if (!isRecord$1(value) || typeof value.snapshotId !== "string") return;
|
|
3087
|
+
return {
|
|
3088
|
+
snapshotId: value.snapshotId,
|
|
3089
|
+
createdAt: new Date(typeof value.createdAt === "string" ? value.createdAt : Date.now()),
|
|
3090
|
+
...typeof value.sizeBytes === "number" ? { sizeBytes: value.sizeBytes } : {},
|
|
3091
|
+
tags: Array.isArray(value.tags) ? value.tags.filter((tag) => typeof tag === "string") : []
|
|
3092
|
+
};
|
|
3093
|
+
}
|
|
3094
|
+
/** A keyed create's acknowledgement; anything else (an older API) is unknown. */
|
|
3095
|
+
function parseIdempotencyAcknowledgement(value) {
|
|
3096
|
+
return isRecord$1(value) && (value.outcome === "created" || value.outcome === "replayed") && typeof value.requestDigest === "string" ? {
|
|
3097
|
+
outcome: value.outcome,
|
|
3098
|
+
requestDigest: value.requestDigest
|
|
3099
|
+
} : void 0;
|
|
3100
|
+
}
|
|
3101
|
+
function contractViolation(message) {
|
|
3102
|
+
return new SandboxError(message, {
|
|
3103
|
+
code: "UPSTREAM_CONTRACT_VIOLATION",
|
|
3104
|
+
status: 502
|
|
3105
|
+
});
|
|
3106
|
+
}
|
|
3107
|
+
/** Parse a wire operation without changing the expected identity. */
|
|
3108
|
+
function parseSandboxOperation(value, expected) {
|
|
3109
|
+
const info = parseOperationBody(value);
|
|
3110
|
+
if (expected && (expected.kind !== void 0 && info.kind !== expected.kind || info.sandboxId !== expected.sandboxId || expected.id !== void 0 && info.id !== expected.id)) throw contractViolation(`The API answered ${info.kind} operation ${info.id} on ${info.sandboxId} for ${expected.kind ?? "an"} operation ${expected.id ?? "(new)"} on ${expected.sandboxId}`);
|
|
3111
|
+
return info;
|
|
3112
|
+
}
|
|
3113
|
+
function parseOperationBody(value) {
|
|
3114
|
+
if (!isRecord$1(value) || typeof value.id !== "string" || typeof value.sandboxId !== "string" || typeof value.statusUrl !== "string" || typeof value.acceptedAt !== "string" || !KINDS.includes(value.kind) || !STATES.includes(value.state)) throw contractViolation(`The API answered an operation that does not match the contract: ${JSON.stringify(value).slice(0, 200)}`);
|
|
3115
|
+
const result = isRecord$1(value.result) ? value.result : void 0;
|
|
3116
|
+
const snapshot = parseSnapshot(result?.snapshot);
|
|
3117
|
+
const durability = result?.durability === "local" || result?.durability === "remote" ? result.durability : void 0;
|
|
3118
|
+
const error = isRecord$1(value.error) ? value.error : void 0;
|
|
3119
|
+
return {
|
|
3120
|
+
id: value.id,
|
|
3121
|
+
kind: value.kind,
|
|
3122
|
+
sandboxId: value.sandboxId,
|
|
3123
|
+
state: value.state,
|
|
3124
|
+
...typeof value.phase === "string" ? { phase: value.phase } : {},
|
|
3125
|
+
acceptedAt: new Date(value.acceptedAt),
|
|
3126
|
+
...typeof value.completedAt === "string" ? { completedAt: new Date(value.completedAt) } : {},
|
|
3127
|
+
statusUrl: value.statusUrl,
|
|
3128
|
+
...result ? { result: {
|
|
3129
|
+
...durability ? { durability } : {},
|
|
3130
|
+
...snapshot ? { snapshot } : {},
|
|
3131
|
+
...isRecord$1(result.sandbox) ? { sandbox: result.sandbox } : {},
|
|
3132
|
+
...result.deleted === true ? { deleted: true } : {},
|
|
3133
|
+
...result.removal === "pending" || result.removal === "complete" ? { removal: result.removal } : {}
|
|
3134
|
+
} } : {},
|
|
3135
|
+
...error && typeof error.code === "string" && typeof error.message === "string" ? { error: {
|
|
3136
|
+
code: error.code,
|
|
3137
|
+
message: error.message
|
|
3138
|
+
} } : {}
|
|
3139
|
+
};
|
|
3140
|
+
}
|
|
3141
|
+
function isTerminalOperation(info) {
|
|
3142
|
+
return info.state === "succeeded" || info.state === "failed";
|
|
3143
|
+
}
|
|
3144
|
+
var SandboxOperation = class SandboxOperation {
|
|
3145
|
+
#info;
|
|
3146
|
+
#client;
|
|
3147
|
+
#onSettled;
|
|
3148
|
+
#settled = false;
|
|
3149
|
+
constructor(info, client, onSettled) {
|
|
3150
|
+
this.#info = info;
|
|
3151
|
+
this.#client = client;
|
|
3152
|
+
this.#onSettled = onSettled;
|
|
3153
|
+
}
|
|
3154
|
+
static completed(kind, sandboxId, result) {
|
|
3155
|
+
const now = /* @__PURE__ */ new Date();
|
|
3156
|
+
return new SandboxOperation({
|
|
3157
|
+
id: "",
|
|
3158
|
+
kind,
|
|
3159
|
+
sandboxId,
|
|
3160
|
+
state: "succeeded",
|
|
3161
|
+
acceptedAt: now,
|
|
3162
|
+
completedAt: now,
|
|
3163
|
+
statusUrl: "",
|
|
3164
|
+
...result ? { result } : {}
|
|
3165
|
+
}, null);
|
|
3166
|
+
}
|
|
3167
|
+
get id() {
|
|
3168
|
+
return this.#info.id;
|
|
3169
|
+
}
|
|
3170
|
+
get state() {
|
|
3171
|
+
return this.#info.state;
|
|
3172
|
+
}
|
|
3173
|
+
/** The last state read. */
|
|
3174
|
+
get info() {
|
|
3175
|
+
return this.#info;
|
|
3176
|
+
}
|
|
3177
|
+
/** Read the operation's current state. */
|
|
3178
|
+
async refresh({ signal, waitMs = 0 } = {}) {
|
|
3179
|
+
signal?.throwIfAborted();
|
|
3180
|
+
if (!this.#client || isTerminalOperation(this.#info)) {
|
|
3181
|
+
await this.#settle();
|
|
3182
|
+
signal?.throwIfAborted();
|
|
3183
|
+
return this.#info;
|
|
3184
|
+
}
|
|
3185
|
+
const query = this.#info.kind === "delete" && new URLSearchParams(this.#info.statusUrl.split("?")[1]).get("until") === "removed" ? "?until=removed" : waitMs ? `?waitMs=${waitMs}` : "";
|
|
3186
|
+
const response = await this.#client.fetch(`/v1/sandboxes/${encodeURIComponent(this.#info.sandboxId)}/operations/${encodeURIComponent(this.#info.id)}${query}`, { signal });
|
|
3187
|
+
if (!response.ok) throw await parseResponseError(response);
|
|
3188
|
+
this.#info = parseSandboxOperation(await response.json(), {
|
|
3189
|
+
kind: this.#info.kind,
|
|
3190
|
+
sandboxId: this.#info.sandboxId,
|
|
3191
|
+
id: this.#info.id
|
|
3192
|
+
});
|
|
3193
|
+
await this.#settle();
|
|
3194
|
+
signal?.throwIfAborted();
|
|
3195
|
+
return this.#info;
|
|
3196
|
+
}
|
|
3197
|
+
async #settle() {
|
|
3198
|
+
if (this.#settled || this.#info.state !== "succeeded") return;
|
|
3199
|
+
this.#settled = true;
|
|
3200
|
+
await this.#onSettled?.(this.#info);
|
|
3201
|
+
}
|
|
3202
|
+
/** Wait through held snapshot reads or paced polls; retain retry budgets and identity. */
|
|
3203
|
+
async wait(options = {}) {
|
|
3204
|
+
const timeoutMs = options.timeoutMs ?? SDK_TIMEOUTS.operationWait;
|
|
3205
|
+
const startedAt = Date.now();
|
|
3206
|
+
const { signal } = options;
|
|
3207
|
+
let [delayMs, capMs, failedReads] = [
|
|
3208
|
+
0,
|
|
3209
|
+
0,
|
|
3210
|
+
0
|
|
3211
|
+
];
|
|
3212
|
+
let info;
|
|
3213
|
+
const timedOut = (cause) => new TimeoutError(`Timed out waiting for ${this.#info.kind} operation ${this.#info.id} (last state ${this.#info.state})`, {
|
|
3214
|
+
timeoutMs,
|
|
3215
|
+
cause
|
|
3216
|
+
});
|
|
3217
|
+
while (!info || !isTerminalOperation(info)) {
|
|
3218
|
+
if (Date.now() - startedAt + delayMs > timeoutMs) throw timedOut();
|
|
3219
|
+
await abortableSleep(delayMs, signal);
|
|
3220
|
+
capMs = Math.min(Math.max(capMs * 2, FIRST_POLL_MS), MAX_POLL_MS);
|
|
3221
|
+
try {
|
|
3222
|
+
const readStartedAt = Date.now();
|
|
3223
|
+
info = await this.refresh({
|
|
3224
|
+
signal,
|
|
3225
|
+
waitMs: this.#info.kind === "snapshot" ? Math.max(0, Math.min(1e4, startedAt + timeoutMs - Date.now())) : 0
|
|
3226
|
+
});
|
|
3227
|
+
delayMs = this.#info.kind === "snapshot" ? Math.max(0, capMs - (Date.now() - readStartedAt)) : capMs;
|
|
3228
|
+
failedReads = 0;
|
|
3229
|
+
} catch (error) {
|
|
3230
|
+
if (!retryWhen(error) || error.code === "UPSTREAM_CONTRACT_VIOLATION") throw error;
|
|
3231
|
+
const deadlineAt = startedAt + timeoutMs;
|
|
3232
|
+
const pacing = {
|
|
3233
|
+
retryAfterMs: error.retryAfterMs,
|
|
3234
|
+
signal,
|
|
3235
|
+
deadlineAt
|
|
3236
|
+
};
|
|
3237
|
+
if (!await awaitSdkResend(++failedReads, pacing)) throw timedOut(error);
|
|
3238
|
+
delayMs = 0;
|
|
3239
|
+
}
|
|
3240
|
+
}
|
|
3241
|
+
signal?.throwIfAborted();
|
|
3242
|
+
if (info.state === "failed") throw new SandboxOperationFailedError(info);
|
|
3243
|
+
return info;
|
|
3244
|
+
}
|
|
3245
|
+
};
|
|
3246
|
+
//#endregion
|
|
3059
3247
|
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.11/node_modules/@tangle-network/agent-interface/dist/provider-config.js
|
|
3060
3248
|
const nativeWebSearchKeys = new Set(["websearch"]);
|
|
3061
3249
|
const nativeWebFetchKeys = new Set(["webfetch", "fetch"]);
|
|
@@ -7420,187 +7608,6 @@ var ProfileFileDelivery = class {
|
|
|
7420
7608
|
}
|
|
7421
7609
|
};
|
|
7422
7610
|
//#endregion
|
|
7423
|
-
//#region src/operation.ts
|
|
7424
|
-
/** Durable lifecycle operations and their client waits. */
|
|
7425
|
-
const FIRST_POLL_MS = 250;
|
|
7426
|
-
const MAX_POLL_MS = 2e3;
|
|
7427
|
-
/** An accepted operation ended in failure. `code` names why. */
|
|
7428
|
-
var SandboxOperationFailedError = class extends SandboxError {
|
|
7429
|
-
operation;
|
|
7430
|
-
constructor(operation) {
|
|
7431
|
-
super(operation.error?.message ?? `Sandbox ${operation.kind} operation ${operation.id} failed`, { code: operation.error?.code ?? "OPERATION_FAILED" });
|
|
7432
|
-
this.operation = operation;
|
|
7433
|
-
}
|
|
7434
|
-
};
|
|
7435
|
-
function isRecord$1(value) {
|
|
7436
|
-
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
7437
|
-
}
|
|
7438
|
-
const KINDS = [
|
|
7439
|
-
"stop",
|
|
7440
|
-
"snapshot",
|
|
7441
|
-
"delete"
|
|
7442
|
-
];
|
|
7443
|
-
const STATES = [
|
|
7444
|
-
"accepted",
|
|
7445
|
-
"running",
|
|
7446
|
-
"succeeded",
|
|
7447
|
-
"failed"
|
|
7448
|
-
];
|
|
7449
|
-
function parseSnapshot(value) {
|
|
7450
|
-
if (!isRecord$1(value) || typeof value.snapshotId !== "string") return;
|
|
7451
|
-
return {
|
|
7452
|
-
snapshotId: value.snapshotId,
|
|
7453
|
-
createdAt: new Date(typeof value.createdAt === "string" ? value.createdAt : Date.now()),
|
|
7454
|
-
...typeof value.sizeBytes === "number" ? { sizeBytes: value.sizeBytes } : {},
|
|
7455
|
-
tags: Array.isArray(value.tags) ? value.tags.filter((tag) => typeof tag === "string") : []
|
|
7456
|
-
};
|
|
7457
|
-
}
|
|
7458
|
-
function contractViolation(message) {
|
|
7459
|
-
return new SandboxError(message, {
|
|
7460
|
-
code: "UPSTREAM_CONTRACT_VIOLATION",
|
|
7461
|
-
status: 502
|
|
7462
|
-
});
|
|
7463
|
-
}
|
|
7464
|
-
/** Parse a wire operation without changing the expected identity. */
|
|
7465
|
-
function parseSandboxOperation(value, expected) {
|
|
7466
|
-
const info = parseOperationBody(value);
|
|
7467
|
-
if (expected && (expected.kind !== void 0 && info.kind !== expected.kind || info.sandboxId !== expected.sandboxId || expected.id !== void 0 && info.id !== expected.id)) throw contractViolation(`The API answered ${info.kind} operation ${info.id} on ${info.sandboxId} for ${expected.kind ?? "an"} operation ${expected.id ?? "(new)"} on ${expected.sandboxId}`);
|
|
7468
|
-
return info;
|
|
7469
|
-
}
|
|
7470
|
-
function parseOperationBody(value) {
|
|
7471
|
-
if (!isRecord$1(value) || typeof value.id !== "string" || typeof value.sandboxId !== "string" || typeof value.statusUrl !== "string" || typeof value.acceptedAt !== "string" || !KINDS.includes(value.kind) || !STATES.includes(value.state)) throw contractViolation(`The API answered an operation that does not match the contract: ${JSON.stringify(value).slice(0, 200)}`);
|
|
7472
|
-
const result = isRecord$1(value.result) ? value.result : void 0;
|
|
7473
|
-
const snapshot = parseSnapshot(result?.snapshot);
|
|
7474
|
-
const durability = result?.durability === "local" || result?.durability === "remote" ? result.durability : void 0;
|
|
7475
|
-
const error = isRecord$1(value.error) ? value.error : void 0;
|
|
7476
|
-
return {
|
|
7477
|
-
id: value.id,
|
|
7478
|
-
kind: value.kind,
|
|
7479
|
-
sandboxId: value.sandboxId,
|
|
7480
|
-
state: value.state,
|
|
7481
|
-
...typeof value.phase === "string" ? { phase: value.phase } : {},
|
|
7482
|
-
acceptedAt: new Date(value.acceptedAt),
|
|
7483
|
-
...typeof value.completedAt === "string" ? { completedAt: new Date(value.completedAt) } : {},
|
|
7484
|
-
statusUrl: value.statusUrl,
|
|
7485
|
-
...result ? { result: {
|
|
7486
|
-
...durability ? { durability } : {},
|
|
7487
|
-
...snapshot ? { snapshot } : {},
|
|
7488
|
-
...isRecord$1(result.sandbox) ? { sandbox: result.sandbox } : {},
|
|
7489
|
-
...result.deleted === true ? { deleted: true } : {},
|
|
7490
|
-
...result.removal === "pending" || result.removal === "complete" ? { removal: result.removal } : {}
|
|
7491
|
-
} } : {},
|
|
7492
|
-
...error && typeof error.code === "string" && typeof error.message === "string" ? { error: {
|
|
7493
|
-
code: error.code,
|
|
7494
|
-
message: error.message
|
|
7495
|
-
} } : {}
|
|
7496
|
-
};
|
|
7497
|
-
}
|
|
7498
|
-
function isTerminalOperation(info) {
|
|
7499
|
-
return info.state === "succeeded" || info.state === "failed";
|
|
7500
|
-
}
|
|
7501
|
-
var SandboxOperation = class SandboxOperation {
|
|
7502
|
-
#info;
|
|
7503
|
-
#client;
|
|
7504
|
-
#onSettled;
|
|
7505
|
-
#settled = false;
|
|
7506
|
-
constructor(info, client, onSettled) {
|
|
7507
|
-
this.#info = info;
|
|
7508
|
-
this.#client = client;
|
|
7509
|
-
this.#onSettled = onSettled;
|
|
7510
|
-
}
|
|
7511
|
-
static completed(kind, sandboxId, result) {
|
|
7512
|
-
const now = /* @__PURE__ */ new Date();
|
|
7513
|
-
return new SandboxOperation({
|
|
7514
|
-
id: "",
|
|
7515
|
-
kind,
|
|
7516
|
-
sandboxId,
|
|
7517
|
-
state: "succeeded",
|
|
7518
|
-
acceptedAt: now,
|
|
7519
|
-
completedAt: now,
|
|
7520
|
-
statusUrl: "",
|
|
7521
|
-
...result ? { result } : {}
|
|
7522
|
-
}, null);
|
|
7523
|
-
}
|
|
7524
|
-
get id() {
|
|
7525
|
-
return this.#info.id;
|
|
7526
|
-
}
|
|
7527
|
-
get state() {
|
|
7528
|
-
return this.#info.state;
|
|
7529
|
-
}
|
|
7530
|
-
/** The last state read. */
|
|
7531
|
-
get info() {
|
|
7532
|
-
return this.#info;
|
|
7533
|
-
}
|
|
7534
|
-
/** Read the operation's current state. */
|
|
7535
|
-
async refresh({ signal, waitMs = 0 } = {}) {
|
|
7536
|
-
signal?.throwIfAborted();
|
|
7537
|
-
if (!this.#client || isTerminalOperation(this.#info)) {
|
|
7538
|
-
await this.#settle();
|
|
7539
|
-
signal?.throwIfAborted();
|
|
7540
|
-
return this.#info;
|
|
7541
|
-
}
|
|
7542
|
-
const query = this.#info.kind === "delete" && new URLSearchParams(this.#info.statusUrl.split("?")[1]).get("until") === "removed" ? "?until=removed" : waitMs ? `?waitMs=${waitMs}` : "";
|
|
7543
|
-
const response = await this.#client.fetch(`/v1/sandboxes/${encodeURIComponent(this.#info.sandboxId)}/operations/${encodeURIComponent(this.#info.id)}${query}`, { signal });
|
|
7544
|
-
if (!response.ok) throw await parseResponseError(response);
|
|
7545
|
-
this.#info = parseSandboxOperation(await response.json(), {
|
|
7546
|
-
kind: this.#info.kind,
|
|
7547
|
-
sandboxId: this.#info.sandboxId,
|
|
7548
|
-
id: this.#info.id
|
|
7549
|
-
});
|
|
7550
|
-
await this.#settle();
|
|
7551
|
-
signal?.throwIfAborted();
|
|
7552
|
-
return this.#info;
|
|
7553
|
-
}
|
|
7554
|
-
async #settle() {
|
|
7555
|
-
if (this.#settled || this.#info.state !== "succeeded") return;
|
|
7556
|
-
this.#settled = true;
|
|
7557
|
-
await this.#onSettled?.(this.#info);
|
|
7558
|
-
}
|
|
7559
|
-
/** Wait through held snapshot reads or paced polls; retain retry budgets and identity. */
|
|
7560
|
-
async wait(options = {}) {
|
|
7561
|
-
const timeoutMs = options.timeoutMs ?? SDK_TIMEOUTS.operationWait;
|
|
7562
|
-
const startedAt = Date.now();
|
|
7563
|
-
const { signal } = options;
|
|
7564
|
-
let [delayMs, capMs, failedReads] = [
|
|
7565
|
-
0,
|
|
7566
|
-
0,
|
|
7567
|
-
0
|
|
7568
|
-
];
|
|
7569
|
-
let info;
|
|
7570
|
-
const timedOut = (cause) => new TimeoutError(`Timed out waiting for ${this.#info.kind} operation ${this.#info.id} (last state ${this.#info.state})`, {
|
|
7571
|
-
timeoutMs,
|
|
7572
|
-
cause
|
|
7573
|
-
});
|
|
7574
|
-
while (!info || !isTerminalOperation(info)) {
|
|
7575
|
-
if (Date.now() - startedAt + delayMs > timeoutMs) throw timedOut();
|
|
7576
|
-
await abortableSleep(delayMs, signal);
|
|
7577
|
-
capMs = Math.min(Math.max(capMs * 2, FIRST_POLL_MS), MAX_POLL_MS);
|
|
7578
|
-
try {
|
|
7579
|
-
const readStartedAt = Date.now();
|
|
7580
|
-
info = await this.refresh({
|
|
7581
|
-
signal,
|
|
7582
|
-
waitMs: this.#info.kind === "snapshot" ? Math.max(0, Math.min(1e4, startedAt + timeoutMs - Date.now())) : 0
|
|
7583
|
-
});
|
|
7584
|
-
delayMs = this.#info.kind === "snapshot" ? Math.max(0, capMs - (Date.now() - readStartedAt)) : capMs;
|
|
7585
|
-
failedReads = 0;
|
|
7586
|
-
} catch (error) {
|
|
7587
|
-
if (!retryWhen(error) || error.code === "UPSTREAM_CONTRACT_VIOLATION") throw error;
|
|
7588
|
-
const deadlineAt = startedAt + timeoutMs;
|
|
7589
|
-
const pacing = {
|
|
7590
|
-
retryAfterMs: error.retryAfterMs,
|
|
7591
|
-
signal,
|
|
7592
|
-
deadlineAt
|
|
7593
|
-
};
|
|
7594
|
-
if (!await awaitSdkResend(++failedReads, pacing)) throw timedOut(error);
|
|
7595
|
-
delayMs = 0;
|
|
7596
|
-
}
|
|
7597
|
-
}
|
|
7598
|
-
signal?.throwIfAborted();
|
|
7599
|
-
if (info.state === "failed") throw new SandboxOperationFailedError(info);
|
|
7600
|
-
return info;
|
|
7601
|
-
}
|
|
7602
|
-
};
|
|
7603
|
-
//#endregion
|
|
7604
7611
|
//#region src/lib/sandbox-command.ts
|
|
7605
7612
|
const SANDBOX_COMMAND_SHELL = "/bin/sh";
|
|
7606
7613
|
function sandboxShellCommandArgs(command) {
|
|
@@ -13059,18 +13066,22 @@ var SandboxSnapshotCapabilities = class extends SandboxTurnCapabilities {
|
|
|
13059
13066
|
tags: options.tags
|
|
13060
13067
|
})
|
|
13061
13068
|
}));
|
|
13062
|
-
|
|
13063
|
-
|
|
13064
|
-
|
|
13065
|
-
|
|
13066
|
-
|
|
13067
|
-
|
|
13069
|
+
const { snapshot = {} } = data;
|
|
13070
|
+
return toSnapshotResult({
|
|
13071
|
+
...data,
|
|
13072
|
+
...snapshot,
|
|
13073
|
+
snapshotId: snapshot.id ?? data.snapshotId,
|
|
13074
|
+
createdAt: snapshot.createdAt ?? data.createdAt ?? Date.now()
|
|
13075
|
+
});
|
|
13068
13076
|
}
|
|
13069
|
-
const operation = await this.#snapshotNoWait(options ?? {});
|
|
13077
|
+
const [operation, idempotency] = await this.#snapshotNoWait(options ?? {});
|
|
13070
13078
|
if (options?.wait === false) return operation;
|
|
13071
13079
|
const done = await operation.wait({ timeoutMs: SDK_TIMEOUTS.snapshot });
|
|
13072
13080
|
if (!done.result?.snapshot) throw new ServerError(`Snapshot operation ${operation.id} succeeded without a snapshot`);
|
|
13073
|
-
return
|
|
13081
|
+
return {
|
|
13082
|
+
...done.result.snapshot,
|
|
13083
|
+
...idempotency && { idempotency }
|
|
13084
|
+
};
|
|
13074
13085
|
}
|
|
13075
13086
|
/** Asynchronous acceptance returns an operation; synchronous capture returns a succeeded operation. */
|
|
13076
13087
|
async #snapshotNoWait(options) {
|
|
@@ -13081,37 +13092,29 @@ var SandboxSnapshotCapabilities = class extends SandboxTurnCapabilities {
|
|
|
13081
13092
|
body: JSON.stringify({ tags: options.tags })
|
|
13082
13093
|
}, { timeoutMs: SDK_TIMEOUTS.snapshot });
|
|
13083
13094
|
const body = await readResponseJson(response);
|
|
13084
|
-
|
|
13095
|
+
const idempotency = parseIdempotencyAcknowledgement(body.idempotency);
|
|
13096
|
+
if (response.status === 202) return [new SandboxOperation(parseSandboxOperation(body.operation, {
|
|
13085
13097
|
kind: "snapshot",
|
|
13086
13098
|
sandboxId: this.id
|
|
13087
|
-
}), state(this).client);
|
|
13099
|
+
}), state(this).client), idempotency];
|
|
13088
13100
|
const snapshotId = body.snapshotId ?? body.id;
|
|
13089
13101
|
if (typeof snapshotId !== "string" || snapshotId.length === 0) throw new ServerError(`Snapshot create returned ${response.status} but body had no snapshot ID: ${JSON.stringify(body).slice(0, 200)}`, { status: response.status });
|
|
13090
|
-
|
|
13102
|
+
const snapshot = toSnapshotResult({
|
|
13091
13103
|
...body,
|
|
13092
13104
|
createdAt: body.createdAt ?? (/* @__PURE__ */ new Date()).toISOString()
|
|
13093
|
-
})
|
|
13105
|
+
});
|
|
13106
|
+
return [SandboxOperation.completed("snapshot", this.id, { snapshot }), idempotency];
|
|
13094
13107
|
}
|
|
13095
13108
|
/** List snapshots; storage selects the direct customer-S3 path. */
|
|
13096
13109
|
async listSnapshots(storage) {
|
|
13097
|
-
if (storage)
|
|
13098
|
-
|
|
13099
|
-
|
|
13100
|
-
|
|
13101
|
-
|
|
13102
|
-
|
|
13103
|
-
|
|
13104
|
-
|
|
13105
|
-
}))).snapshots ?? []).map((s) => ({
|
|
13106
|
-
snapshotId: s.id ?? s.snapshotId,
|
|
13107
|
-
sandboxId: this.id,
|
|
13108
|
-
createdAt: new Date(s.createdAt),
|
|
13109
|
-
tags: s.tags ?? [],
|
|
13110
|
-
paths: [],
|
|
13111
|
-
sizeBytes: s.sizeBytes
|
|
13112
|
-
}));
|
|
13113
|
-
}
|
|
13114
|
-
const data = await readResponseJson(await state(this).client.fetch(`/v1/sandboxes/${this.id}/snapshots`));
|
|
13110
|
+
if (storage) await this.ensureRunning();
|
|
13111
|
+
const data = await readResponseJson(storage ? await this.runtimeFetch("/snapshots/list", {
|
|
13112
|
+
method: "POST",
|
|
13113
|
+
body: JSON.stringify({
|
|
13114
|
+
projectId: this.id,
|
|
13115
|
+
storage
|
|
13116
|
+
})
|
|
13117
|
+
}) : await state(this).client.fetch(`/v1/sandboxes/${this.id}/snapshots`));
|
|
13115
13118
|
return (Array.isArray(data) ? data : data.snapshots ?? []).map((s) => {
|
|
13116
13119
|
const remoteSync = toSnapshotRemoteSync(s.remoteSync);
|
|
13117
13120
|
return {
|
|
@@ -15088,12 +15091,7 @@ var SandboxInstance = class SandboxInstance extends SandboxEgressCapabilities {
|
|
|
15088
15091
|
const children = (data.children ?? []).map((child) => createSandboxInstanceFromResponse(local.client, this.parseInfo(child), local.defaultRuntimeBackend));
|
|
15089
15092
|
const materializedCount = children.length;
|
|
15090
15093
|
const requestedCount = typeof data.fork?.requestedCount === "number" ? data.fork.requestedCount : count;
|
|
15091
|
-
const
|
|
15092
|
-
const reportedDigest = data.idempotency?.requestDigest;
|
|
15093
|
-
const idempotency = (reportedOutcome === "created" || reportedOutcome === "replayed") && typeof reportedDigest === "string" ? {
|
|
15094
|
-
outcome: reportedOutcome,
|
|
15095
|
-
requestDigest: reportedDigest
|
|
15096
|
-
} : void 0;
|
|
15094
|
+
const idempotency = parseIdempotencyAcknowledgement(data.idempotency);
|
|
15097
15095
|
return {
|
|
15098
15096
|
children,
|
|
15099
15097
|
requestedCount,
|
|
@@ -15146,4 +15144,4 @@ var SandboxInstance = class SandboxInstance extends SandboxEgressCapabilities {
|
|
|
15146
15144
|
}
|
|
15147
15145
|
};
|
|
15148
15146
|
//#endregion
|
|
15149
|
-
export { createRetryDelayMs as $,
|
|
15147
|
+
export { createRetryDelayMs as $, splitInlineProfileSkills as A, normalizeSandboxCreateReceipt as B, collectAgentResponseText as C, ManagedProcessClient as D, deleteSandbox as E, isMaterializerHarness as F, normalizeConnection as G, readFilesystemIncarnationTuple as H, materializeProfile as I, normalizeSandboxShape as J, normalizeEgressPolicyFields as K, SandboxOperation as L, HARNESS_LAUNCH_MATERIALIZE_OPTIONS as M, ProfileUnsupportedError as N, materializeProfileFileMounts as O, enforceWorkspacePlanSupport as P, awaitCreateResend as Q, SandboxOperationFailedError as R, collectAgentFinalMessageText as S, isToolBearingEvent as T, dateOf as U, normalizeStartupDiagnostics as V, parseLifecycleTimes as W, CAPACITY_ETA_WAIT_MAX_MS as X, CAPACITY_ETA_MARGIN_MS as Y, DEPLOY_WINDOW_RETRY_MS as Z, InteractiveSessionHandle as _, SANDBOX_RUNTIMES as a, isRetryableCreateError as at, createInteractiveTerminalSession as b, gpuLeaseAttachSchema as c, exportTraceBundle as d, extendableDeadline as et, otelTraceIdForTangleTrace as f, sandboxLedgerUsd as g, SandboxSession as h, MAX_EGRESS_DENIALS_LIMIT as i, isRateLimitCreateError as it, validateDeferredProfileFileMounts as j, splitInlineProfileFileMounts as k, gpuLeaseCommandSchema as l, SandboxTaskSession as m, createSandboxInstanceFromResponse as n, isCapacityShortageCreateError as nt, GPU_LEASE_PROVIDER_NAMES as o, toOtelJson as p, normalizeProxySecretReceipt as q, WorkspaceImages as r, isDeployWindowCreateError as rt, gpuAcceleratorSchema as s, SandboxInstance as t, generateIdempotencyKey as tt, buildTraceExportPayload as u, InteractiveTerminalFrameLog as v, getSandboxEventText as w, applySandboxEventText as x, createInteractiveTerminalCapture as y, normalizeCaptureProof as z };
|
|
@@ -2,8 +2,8 @@ import { r as agentProfileSchema } from "./profile-schema-B11dRfGB.js";
|
|
|
2
2
|
import { t as canonicalAgentProfileDigest } from "./agent-execution-preparation-N1ksNIIJ.js";
|
|
3
3
|
import { C as SandboxError, O as ValidationError, u as CapabilityError } from "./errors-D44qyFpy.js";
|
|
4
4
|
import { n as combineAbortSignals, t as awaitWithAbort } from "./abort-signal-BsriwJ8L.js";
|
|
5
|
-
import { r as cliAuthReferenceSchema } from "./cli-auth-bundle-
|
|
6
|
-
import "./cli-auth-bundle-
|
|
5
|
+
import { r as cliAuthReferenceSchema } from "./cli-auth-bundle-B4SGUcYM-CukXOw4n.js";
|
|
6
|
+
import "./cli-auth-bundle-DIZ0PWyR.js";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
//#region ../../../packages/runtime-contracts/dist/seat-selection.js
|
|
9
9
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as SandboxError } from "./terminal-stream-types-
|
|
2
|
-
import { _t as SeatOwnerTransport, bt as SeatSelectionRequest, ft as SEAT_COMMAND_TIMEOUT_MS } from "./client-
|
|
1
|
+
import { R as SandboxError } from "./terminal-stream-types-BSyus9Qn.js";
|
|
2
|
+
import { _t as SeatOwnerTransport, bt as SeatSelectionRequest, ft as SEAT_COMMAND_TIMEOUT_MS } from "./client-DD-ocMMn.js";
|
|
3
3
|
|
|
4
4
|
//#region src/select-seat-command.d.ts
|
|
5
5
|
/** Public reply bound; the owner prints one metadata object. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { C as SandboxError, O as ValidationError } from "./errors-D44qyFpy.js";
|
|
2
|
-
import { r as SEAT_OWNER_MAX_RESPONSE_BYTES, s as seatOwnerTimeoutMs, t as SEAT_COMMAND_TIMEOUT_MS } from "./select-seat-
|
|
2
|
+
import { r as SEAT_OWNER_MAX_RESPONSE_BYTES, s as seatOwnerTimeoutMs, t as SEAT_COMMAND_TIMEOUT_MS } from "./select-seat-D0YBpIJl.js";
|
|
3
3
|
import { spawn } from "node:child_process";
|
|
4
4
|
//#region src/select-seat-command.ts
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as combineAbortSignals } from "../abort-signal-BsriwJ8L.js";
|
|
2
|
-
import { i as fetchSandboxApi } from "../api-request-
|
|
2
|
+
import { i as fetchSandboxApi } from "../api-request-d6B6aqw2.js";
|
|
3
3
|
import "../sidecar-proxy-error-DTdbCbUM.js";
|
|
4
4
|
import { t as parseSSEStream } from "../sse-parser-BCG3iL9j.js";
|
|
5
5
|
import { PART_TEXT, PART_TEXT_SUFFIX } from "@tangle-network/agent-core/sse";
|
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_CHAIN_ID, a as fetchQuote, b as AgentSandboxBlueprintAbi, c as parseQuoteResponse, d as OperatorSession, f as OperatorSessionError, g as BlueprintSandboxClientConfig, h as BlueprintSandboxClient, 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 TANGLE_JOBS_CONTRACT, 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_CHAIN_ID, a as fetchQuote, b as AgentSandboxBlueprintAbi, c as parseQuoteResponse, d as OperatorSession, f as OperatorSessionError, g as BlueprintSandboxClientConfig, h as BlueprintSandboxClient, 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 TANGLE_JOBS_CONTRACT, w as SandboxCreateParamTypes, x as JOB_SANDBOX_CREATE, y as ITangleJobsAbi } from "../index-iof5xqBR.js";
|
|
2
2
|
export { AgentSandboxBlueprintAbi, BlueprintSandboxClient, BlueprintSandboxClientConfig, 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, fetchQuote, inputsHashOf, jobQuoteDigest, parseQuoteResponse, validateQuote };
|
package/dist/tangle/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { _ as SandboxCreateResponseParamTypes, a as parseQuoteResponse, c as OperatorSession, d as TANGLE_JOBS_CONTRACT, f as AgentSandboxBlueprintAbi, g as SandboxCreateParamTypes, h as JsonResponseParamTypes, i as jobQuoteDigest, l as OperatorSessionError, m as JOB_SANDBOX_DELETE, n as fetchQuote, o as validateQuote, p as JOB_SANDBOX_CREATE, r as inputsHashOf, s as BlueprintSandboxClient, t as QuoteError, u as TANGLE_CHAIN_ID, v as SandboxIdParamTypes } from "../tangle-
|
|
1
|
+
import { _ as SandboxCreateResponseParamTypes, a as parseQuoteResponse, c as OperatorSession, d as TANGLE_JOBS_CONTRACT, f as AgentSandboxBlueprintAbi, g as SandboxCreateParamTypes, h as JsonResponseParamTypes, i as jobQuoteDigest, l as OperatorSessionError, m as JOB_SANDBOX_DELETE, n as fetchQuote, o as validateQuote, p as JOB_SANDBOX_CREATE, r as inputsHashOf, s as BlueprintSandboxClient, t as QuoteError, u as TANGLE_CHAIN_ID, v as SandboxIdParamTypes } from "../tangle-wDixJBx_.js";
|
|
2
2
|
import { t as ITangleJobsAbi } from "../abi-pcDt2Adp.js";
|
|
3
3
|
export { AgentSandboxBlueprintAbi, BlueprintSandboxClient, ITangleJobsAbi, JOB_SANDBOX_CREATE, JOB_SANDBOX_DELETE, JsonResponseParamTypes, OperatorSession, OperatorSessionError, QuoteError, SandboxCreateParamTypes, SandboxCreateResponseParamTypes, SandboxIdParamTypes, TANGLE_CHAIN_ID, TANGLE_JOBS_CONTRACT, fetchQuote, inputsHashOf, jobQuoteDigest, parseQuoteResponse, validateQuote };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { H as readFilesystemIncarnationTuple, n as createSandboxInstanceFromResponse } from "./sandbox-
|
|
1
|
+
import { H as readFilesystemIncarnationTuple, n as createSandboxInstanceFromResponse } from "./sandbox-B740bdgv.js";
|
|
2
2
|
import { a as readResponseJson } from "./errors-D44qyFpy.js";
|
|
3
|
-
import { i as fetchSandboxApi } from "./api-request-
|
|
3
|
+
import { i as fetchSandboxApi } from "./api-request-d6B6aqw2.js";
|
|
4
4
|
import { t as ITangleJobsAbi } from "./abi-pcDt2Adp.js";
|
|
5
5
|
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-BvN0Mk3j.js";
|
|
6
6
|
//#region ../../../packages/runtime-contracts/dist/tangle-blueprint-abi.js
|