@tangle-network/sandbox 1.0.241 → 1.0.242
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-BiCsXGzw.d.ts → agent-run-outcome-CUfQje-w.d.ts} +1 -1
- package/dist/{api-request--DWPzmwv.js → api-request-BWT7PYL0.js} +1 -1
- package/dist/{browser-interactive-control-controller-D3ENnAih.js → browser-interactive-control-controller-B0bioynZ.js} +1 -1
- package/dist/{client-BaodKpEF.js → client-CjekYXSa.js} +3 -3
- package/dist/{client-CP2Arxbz.d.ts → client-Tv6glrZu.d.ts} +14 -7
- package/dist/collaboration/index.js +1 -1
- package/dist/{collaboration-BqP_-0rI.js → collaboration-DKC-ShI6.js} +1 -1
- package/dist/core.d.ts +6 -6
- package/dist/core.js +3 -3
- package/dist/{index-B2cujKJI.d.ts → index-D_q6Yfb-.d.ts} +6 -6
- package/dist/index.d.ts +8 -8
- package/dist/index.js +8 -8
- package/dist/intelligence/index.js +1 -1
- package/dist/interactive-control.js +1 -1
- package/dist/{interactive-controller-CwHdvUR-.js → interactive-controller-9ILeAfX9.js} +2 -2
- package/dist/{interactive-controller-XhBbQdry.d.ts → interactive-controller-CG6mx72N.d.ts} +1 -1
- package/dist/{lines-Bpzbhe3z.d.ts → lines-DuXPjPJT.d.ts} +1 -1
- package/dist/lines.d.ts +1 -1
- package/dist/{mcp-local-BrTDDAV2.js → mcp-local-BAUbr-VS.js} +2 -2
- package/dist/{preview-BEQ_X3h1.d.ts → preview-C_9PQGix.d.ts} +3 -3
- package/dist/{public-templates-BDIqpwN5.d.ts → public-templates-CBH6Qrnn.d.ts} +1 -1
- package/dist/public-templates.d.ts +1 -1
- package/dist/runtime.d.ts +3 -3
- package/dist/runtime.js +3 -3
- package/dist/{sandbox-qq0PSq3P.js → sandbox-Bu3jceX_.js} +79 -68
- package/dist/{select-seat-sASXpRdL.js → select-seat--yEFCKqb.js} +101 -40
- package/dist/select-seat-command.d.ts +4 -5
- package/dist/select-seat-command.js +30 -24
- 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-qoQOQKdR.js → tangle-BtTPZXhK.js} +2 -2
- package/dist/{types-D2l2jaHS.d.ts → types-jIqZ_dPk.d.ts} +2 -0
- package/package.json +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { O as SandboxInstance } from "./index-
|
|
2
|
-
import { F as EnsureDevServerOptions, H as PreviewLinkInfo } from "./types-
|
|
3
|
-
import { t as Sandbox } from "./client-
|
|
1
|
+
import { O as SandboxInstance } from "./index-D_q6Yfb-.js";
|
|
2
|
+
import { F as EnsureDevServerOptions, H as PreviewLinkInfo } from "./types-jIqZ_dPk.js";
|
|
3
|
+
import { t as Sandbox } from "./client-Tv6glrZu.js";
|
|
4
4
|
|
|
5
5
|
//#region src/agent/preview-operations.d.ts
|
|
6
6
|
type AgentPreviewOptions = Pick<EnsureDevServerOptions, "sessionId" | "cwd"> & {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { R as SandboxError } from "./terminal-stream-types-DQNUfdKj.js";
|
|
2
|
-
import { Cr as PublishPublicTemplateVersionOptions, Sr as PublishPublicTemplateOptions, Xr as HttpClient, br as PublicTemplateInfo, xr as PublicTemplateVersionInfo } from "./types-
|
|
2
|
+
import { Cr as PublishPublicTemplateVersionOptions, Sr as PublishPublicTemplateOptions, Xr as HttpClient, br as PublicTemplateInfo, xr as PublicTemplateVersionInfo } from "./types-jIqZ_dPk.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
|
|
5
5
|
//#region src/public-templates.d.ts
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as PublicTemplatesClient, i as PublicTemplatePublishRequestOptions, n as PublicTemplatePublishError, r as PublicTemplatePublishJob, t as PublicTemplatePublishArtifact } from "./public-templates-
|
|
1
|
+
import { a as PublicTemplatesClient, i as PublicTemplatePublishRequestOptions, n as PublicTemplatePublishError, r as PublicTemplatePublishJob, t as PublicTemplatePublishArtifact } from "./public-templates-CBH6Qrnn.js";
|
|
2
2
|
export { PublicTemplatePublishArtifact, PublicTemplatePublishError, PublicTemplatePublishJob, PublicTemplatePublishRequestOptions, PublicTemplatesClient };
|
package/dist/runtime.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { F as ProfileFileMountPathError, H as ServerError, I as QuotaError, K as TimeoutError, M as NetworkError, N as NotFoundError, O as FileWriteConflictError, P as PartialFailureError, R as SandboxError, S as AuthError, U as StateError, V as SandboxFailureDetail, q as ValidationError, u as ScopedToken, w as CapabilityError, z as SandboxErrorJson } from "./terminal-stream-types-DQNUfdKj.js";
|
|
2
|
-
import { $i as SessionExecutionStatus, Bi as CreateSessionOptions, Cn as TerminalStream, Di as SandboxEvent, Fi as CommitTaskSessionOptions, Gi as ListMessagesOptions, Gn as ChunkedUploadResult, Ji as SendSessionMessageRequest, Qi as SessionExecutionInfo, Qn as FileReadBatchResult, Vi as CreateTaskSessionOptions, Wn as ChunkedUploadOptions, Xr as HttpClient, Yi as SentSessionMessage, Zi as SessionEventStreamOptions, Zn as FileReadBatchOptions, aa as SessionMessage, ar as FileTreeResult, cr as FileWriteResult, dn as SandboxTerminalCreateOptions, dr as RenameOptions, fa as TaskSessionInfo, fn as SandboxTerminalInfo, ir as FileTreeOptions, la as TaskSessionChanges, ln as SandboxRuntimeHealth, mn as SandboxTerminalRequestOptions, mr as WriteFileOptions, na as SessionInfo, oa as SessionMessageAdmission, on as SandboxPortBinding, or as FileUsageOptions, pn as SandboxTerminalManager, pr as UploadProgress, qi as SendSessionMessageOptions, sr as FileUsageResult, tr as FileRenameResult, ua as TaskSessionCommitResult } from "./types-
|
|
2
|
+
import { $i as SessionExecutionStatus, Bi as CreateSessionOptions, Cn as TerminalStream, Di as SandboxEvent, Fi as CommitTaskSessionOptions, Gi as ListMessagesOptions, Gn as ChunkedUploadResult, Ji as SendSessionMessageRequest, Qi as SessionExecutionInfo, Qn as FileReadBatchResult, Vi as CreateTaskSessionOptions, Wn as ChunkedUploadOptions, Xr as HttpClient, Yi as SentSessionMessage, Zi as SessionEventStreamOptions, Zn as FileReadBatchOptions, aa as SessionMessage, ar as FileTreeResult, cr as FileWriteResult, dn as SandboxTerminalCreateOptions, dr as RenameOptions, fa as TaskSessionInfo, fn as SandboxTerminalInfo, ir as FileTreeOptions, la as TaskSessionChanges, ln as SandboxRuntimeHealth, mn as SandboxTerminalRequestOptions, mr as WriteFileOptions, na as SessionInfo, oa as SessionMessageAdmission, on as SandboxPortBinding, or as FileUsageOptions, pn as SandboxTerminalManager, pr as UploadProgress, qi as SendSessionMessageOptions, sr as FileUsageResult, tr as FileRenameResult, ua as TaskSessionCommitResult } from "./types-jIqZ_dPk.js";
|
|
3
3
|
import { c as InteractiveSessionIdentity, l as InteractiveSessionNotRunningError, r as browserInteractiveControlHolderId } from "./browser-interactive-control-controller-D9plWzEP.js";
|
|
4
|
-
import { t as BrowserInteractiveSessionController } from "./interactive-controller-
|
|
5
|
-
import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, o as projectAgentTerminalRecord, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-
|
|
4
|
+
import { t as BrowserInteractiveSessionController } from "./interactive-controller-CG6mx72N.js";
|
|
5
|
+
import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, o as projectAgentTerminalRecord, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-CUfQje-w.js";
|
|
6
6
|
|
|
7
7
|
//#region src/lib/chunked-upload.d.ts
|
|
8
8
|
/** The transport a caller wires this module to — {@link SandboxInstance.runtimeFetch}
|
package/dist/runtime.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { F as createAgentRunOutcomeTracker, I as deriveAgentResultOutcome, L as deriveAgentRunOutcome, R as projectAgentTerminalRecord, c as SandboxRuntimeApi, t as BrowserInteractiveSessionController } from "./interactive-controller-
|
|
2
|
-
import { n as browserInteractiveControlHolderId, s as InteractiveSessionNotRunningError } from "./browser-interactive-control-controller-
|
|
1
|
+
import { F as createAgentRunOutcomeTracker, I as deriveAgentResultOutcome, L as deriveAgentRunOutcome, R as projectAgentTerminalRecord, c as SandboxRuntimeApi, t as BrowserInteractiveSessionController } from "./interactive-controller-9ILeAfX9.js";
|
|
2
|
+
import { n as browserInteractiveControlHolderId, s as InteractiveSessionNotRunningError } from "./browser-interactive-control-controller-B0bioynZ.js";
|
|
3
3
|
import { C as SandboxError, D as TimeoutError, O as ValidationError, T as StateError, _ as NetworkError, b as ProfileFileMountPathError, c as AuthError, m as FileWriteConflictError, u as CapabilityError, v as NotFoundError, w as ServerError, x as QuotaError, y as PartialFailureError } from "./errors-BY-3SBlL.js";
|
|
4
|
-
import { i as fetchSandboxApi, n as SDK_TIMEOUTS } from "./api-request
|
|
4
|
+
import { i as fetchSandboxApi, n as SDK_TIMEOUTS } from "./api-request-BWT7PYL0.js";
|
|
5
5
|
import { s as uploadChunked } from "./chunked-upload-O-8ZfTgv.js";
|
|
6
6
|
//#region src/runtime-client.ts
|
|
7
7
|
function requireToken(token) {
|
|
@@ -1,13 +1,13 @@
|
|
|
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-9ILeAfX9.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-C5lXV9e5.js";
|
|
3
3
|
import { a as ProxySecretReceiptSchema$1, r as agentProfileSchema$1 } from "./profile-schema-C0n0VgmA.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-B0bioynZ.js";
|
|
6
6
|
import { t as canonicalAgentProfileDigest } from "./agent-execution-preparation-CjKTjmJ9.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 } from "./errors-BY-3SBlL.js";
|
|
8
8
|
import { n as combineAbortSignals, t as awaitWithAbort } from "./abort-signal-CRxC2dlT.js";
|
|
9
9
|
import { a as backoffDelayMs, o as isUndelivered, r as abortableSleep } from "./retry-policy-oW3_ljoc.js";
|
|
10
|
-
import { a as isReplayableBody, i as fetchSandboxApi, n as SDK_TIMEOUTS, o as rewrapResponse, t as IDEMPOTENT_METHODS } from "./api-request
|
|
10
|
+
import { a as isReplayableBody, i as fetchSandboxApi, n as SDK_TIMEOUTS, o as rewrapResponse, t as IDEMPOTENT_METHODS } from "./api-request-BWT7PYL0.js";
|
|
11
11
|
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";
|
|
12
12
|
import { c as awaitSdkResend, l as takeSdkTurn, s as uploadChunked } from "./chunked-upload-O-8ZfTgv.js";
|
|
13
13
|
import { n as fetchWithKeepAlive, t as emitTiming } from "./keep-alive-fetch-sGVP8skk.js";
|
|
@@ -11114,9 +11114,9 @@ var SandboxSessionAdmissionCapabilities = class extends SandboxProfileCapabiliti
|
|
|
11114
11114
|
return info;
|
|
11115
11115
|
}
|
|
11116
11116
|
/** @internal — invoked by SandboxSession.status(). */
|
|
11117
|
-
async _sessionStatus(id) {
|
|
11118
|
-
await this.ensureRunning();
|
|
11119
|
-
const response = await this.runtimeFetch(`/agents/sessions/${encodeURIComponent(id)}
|
|
11117
|
+
async _sessionStatus(id, signal) {
|
|
11118
|
+
await this.ensureRunning(signal);
|
|
11119
|
+
const response = await this.runtimeFetch(`/agents/sessions/${encodeURIComponent(id)}`, { signal });
|
|
11120
11120
|
if (response.status === 404) return null;
|
|
11121
11121
|
return normalizeSessionInfo(await readResponseJson(response));
|
|
11122
11122
|
}
|
|
@@ -12129,92 +12129,103 @@ var SandboxSessionEvidenceCapabilities = class extends SandboxInteractiveCapabil
|
|
|
12129
12129
|
}
|
|
12130
12130
|
}
|
|
12131
12131
|
/** Replay one execution without subscribing to other runs on its session. */
|
|
12132
|
-
async *_executionEvents(sessionId, executionId) {
|
|
12133
|
-
await this.ensureRunning();
|
|
12132
|
+
async *_executionEvents(sessionId, executionId, signal) {
|
|
12133
|
+
await this.ensureRunning(signal);
|
|
12134
12134
|
const search = new URLSearchParams({
|
|
12135
12135
|
lastEventId: "0",
|
|
12136
12136
|
format: "sse",
|
|
12137
12137
|
sessionId,
|
|
12138
12138
|
[PART_TEXT]: PART_TEXT_SUFFIX
|
|
12139
12139
|
});
|
|
12140
|
-
const response = await this.runtimeFetch(`/agents/run/${encodeURIComponent(executionId)}/events?${search.toString()}
|
|
12140
|
+
const response = await this.runtimeFetch(`/agents/run/${encodeURIComponent(executionId)}/events?${search.toString()}`, { signal });
|
|
12141
12141
|
if (!response.ok) throw await parseResponseError(response);
|
|
12142
12142
|
let lastEventId = "0";
|
|
12143
12143
|
try {
|
|
12144
|
-
for await (const event of this.parseSSEStream(response)) {
|
|
12144
|
+
for await (const event of this.parseSSEStream(response, signal)) {
|
|
12145
12145
|
if (event.id) lastEventId = event.id;
|
|
12146
12146
|
yield event;
|
|
12147
12147
|
if (event.type === "done" || event.type === "error") return;
|
|
12148
12148
|
}
|
|
12149
12149
|
} catch {}
|
|
12150
|
+
signal?.throwIfAborted();
|
|
12150
12151
|
yield* this.streamPromptInner("", {
|
|
12151
12152
|
sessionId,
|
|
12152
12153
|
executionId,
|
|
12153
|
-
lastEventId
|
|
12154
|
+
lastEventId,
|
|
12155
|
+
signal
|
|
12154
12156
|
}, { replaySessionId: sessionId });
|
|
12155
12157
|
}
|
|
12156
12158
|
/** @internal — invoked by SandboxSession.result(). */
|
|
12157
12159
|
async _sessionResult(id, options, knownSession) {
|
|
12158
12160
|
if (options?.executionId !== void 0 && !options.executionId) throw new ValidationError("executionId must not be empty", { fields: { executionId: "Expected a non-empty runtime execution id" } });
|
|
12159
|
-
const
|
|
12160
|
-
|
|
12161
|
-
|
|
12162
|
-
|
|
12163
|
-
|
|
12164
|
-
|
|
12165
|
-
|
|
12166
|
-
|
|
12167
|
-
|
|
12168
|
-
|
|
12169
|
-
|
|
12170
|
-
|
|
12171
|
-
|
|
12172
|
-
|
|
12173
|
-
|
|
12174
|
-
|
|
12175
|
-
|
|
12176
|
-
|
|
12177
|
-
|
|
12178
|
-
|
|
12179
|
-
|
|
12180
|
-
|
|
12181
|
-
let traceId;
|
|
12182
|
-
let usage;
|
|
12183
|
-
let modelCalls;
|
|
12184
|
-
const events = this._executionEvents(id, executionId);
|
|
12185
|
-
for await (const event of events) {
|
|
12186
|
-
outcomeTracker.observe(event);
|
|
12187
|
-
response = applySandboxEventText(response, event);
|
|
12188
|
-
if (event.type === "result" || event.type === "done") {
|
|
12189
|
-
const data = event.data;
|
|
12190
|
-
if (typeof data.executionId === "string" && data.executionId) resultExecutionId = data.executionId;
|
|
12191
|
-
usage = readTokenUsage(data) ?? usage;
|
|
12192
|
-
modelCalls = readModelCalls(data.modelCalls) ?? modelCalls;
|
|
12161
|
+
const configuredSignal = state(this).client.signal;
|
|
12162
|
+
const signal = options?.signal && configuredSignal ? combineAbortSignals([options.signal, configuredSignal]) : options?.signal ?? configuredSignal;
|
|
12163
|
+
signal?.throwIfAborted();
|
|
12164
|
+
try {
|
|
12165
|
+
const startTime = Date.now();
|
|
12166
|
+
let executionId = options?.executionId;
|
|
12167
|
+
if (!executionId) {
|
|
12168
|
+
const session = knownSession ?? await this._sessionStatus(id, signal);
|
|
12169
|
+
if (!session) throw new NotFoundError(`Session not found: ${id}`, {
|
|
12170
|
+
resourceType: "Session",
|
|
12171
|
+
resourceId: id,
|
|
12172
|
+
origin: "runtime",
|
|
12173
|
+
endpoint: `/agents/sessions/${encodeURIComponent(id)}`
|
|
12174
|
+
});
|
|
12175
|
+
if (!session.latestExecutionId) throw new StateError(`Session ${id} has no execution result to await`, {
|
|
12176
|
+
currentState: session.status,
|
|
12177
|
+
requiredState: "session with an admitted execution",
|
|
12178
|
+
origin: "runtime",
|
|
12179
|
+
endpoint: `/agents/sessions/${encodeURIComponent(id)}`,
|
|
12180
|
+
code: "SESSION_EXECUTION_MISSING"
|
|
12181
|
+
});
|
|
12182
|
+
executionId = session.latestExecutionId;
|
|
12193
12183
|
}
|
|
12194
|
-
|
|
12195
|
-
|
|
12184
|
+
let resultExecutionId = executionId;
|
|
12185
|
+
let response;
|
|
12186
|
+
const outcomeTracker = createAgentRunOutcomeTracker();
|
|
12187
|
+
let traceId;
|
|
12188
|
+
let usage;
|
|
12189
|
+
let modelCalls;
|
|
12190
|
+
const events = this._executionEvents(id, executionId, signal);
|
|
12191
|
+
for await (const event of events) {
|
|
12192
|
+
outcomeTracker.observe(event);
|
|
12193
|
+
response = applySandboxEventText(response, event);
|
|
12194
|
+
if (event.type === "result" || event.type === "done") {
|
|
12195
|
+
const data = event.data;
|
|
12196
|
+
if (typeof data.executionId === "string" && data.executionId) resultExecutionId = data.executionId;
|
|
12197
|
+
usage = readTokenUsage(data) ?? usage;
|
|
12198
|
+
modelCalls = readModelCalls(data.modelCalls) ?? modelCalls;
|
|
12199
|
+
}
|
|
12200
|
+
if (event.type === "trace.id") traceId = event.data.traceId;
|
|
12201
|
+
if (event.type === "done" || event.type === "error") break;
|
|
12202
|
+
}
|
|
12203
|
+
signal?.throwIfAborted();
|
|
12204
|
+
const outcome = outcomeTracker.finish();
|
|
12205
|
+
return {
|
|
12206
|
+
success: outcome.success,
|
|
12207
|
+
status: outcome.status,
|
|
12208
|
+
executionId: resultExecutionId,
|
|
12209
|
+
response,
|
|
12210
|
+
error: outcome.error,
|
|
12211
|
+
errorCode: outcome.errorCode,
|
|
12212
|
+
...outcome.failure ? { failure: outcome.failure } : {},
|
|
12213
|
+
...outcome.resetAt ? { resetAt: outcome.resetAt } : {},
|
|
12214
|
+
...outcome.statusCode === void 0 ? {} : { statusCode: outcome.statusCode },
|
|
12215
|
+
toolInvocations: outcome.toolInvocations,
|
|
12216
|
+
approval: outcome.approval,
|
|
12217
|
+
interaction: outcome.interaction,
|
|
12218
|
+
question: outcome.question,
|
|
12219
|
+
plan: outcome.plan,
|
|
12220
|
+
traceId,
|
|
12221
|
+
durationMs: Date.now() - startTime,
|
|
12222
|
+
usage,
|
|
12223
|
+
...modelCalls ? { modelCalls } : {}
|
|
12224
|
+
};
|
|
12225
|
+
} catch (cause) {
|
|
12226
|
+
signal?.throwIfAborted();
|
|
12227
|
+
throw cause;
|
|
12196
12228
|
}
|
|
12197
|
-
const outcome = outcomeTracker.finish();
|
|
12198
|
-
return {
|
|
12199
|
-
success: outcome.success,
|
|
12200
|
-
status: outcome.status,
|
|
12201
|
-
executionId: resultExecutionId,
|
|
12202
|
-
response,
|
|
12203
|
-
error: outcome.error,
|
|
12204
|
-
errorCode: outcome.errorCode,
|
|
12205
|
-
...outcome.failure ? { failure: outcome.failure } : {},
|
|
12206
|
-
...outcome.resetAt ? { resetAt: outcome.resetAt } : {},
|
|
12207
|
-
...outcome.statusCode === void 0 ? {} : { statusCode: outcome.statusCode },
|
|
12208
|
-
toolInvocations: outcome.toolInvocations,
|
|
12209
|
-
approval: outcome.approval,
|
|
12210
|
-
interaction: outcome.interaction,
|
|
12211
|
-
question: outcome.question,
|
|
12212
|
-
plan: outcome.plan,
|
|
12213
|
-
traceId,
|
|
12214
|
-
durationMs: Date.now() - startTime,
|
|
12215
|
-
usage,
|
|
12216
|
-
...modelCalls ? { modelCalls } : {}
|
|
12217
|
-
};
|
|
12218
12229
|
}
|
|
12219
12230
|
};
|
|
12220
12231
|
function isSessionAwaitingFirstTurn(info) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as agentProfileSchema } from "./profile-schema-C0n0VgmA.js";
|
|
2
2
|
import { t as canonicalAgentProfileDigest } from "./agent-execution-preparation-CjKTjmJ9.js";
|
|
3
3
|
import { C as SandboxError, O as ValidationError, u as CapabilityError } from "./errors-BY-3SBlL.js";
|
|
4
|
-
import { t as awaitWithAbort } from "./abort-signal-CRxC2dlT.js";
|
|
4
|
+
import { n as combineAbortSignals, t as awaitWithAbort } from "./abort-signal-CRxC2dlT.js";
|
|
5
5
|
import { r as cliAuthReferenceSchema } from "./cli-auth-bundle-C6DtK7GX-DoqlFTT-.js";
|
|
6
6
|
import "./cli-auth-bundle-BinY89CX.js";
|
|
7
7
|
import { z } from "zod";
|
|
@@ -56,50 +56,111 @@ const resolutionSchema = z.strictObject({
|
|
|
56
56
|
const refusalSchema = seatSelectionRefusalSchema;
|
|
57
57
|
const SEAT_OWNER_MAX_RESPONSE_BYTES = 64 * 1024;
|
|
58
58
|
const SEAT_OWNER_MAX_REQUEST_BYTES = 8 * 1024 * 1024;
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
const SEAT_COMMAND_TIMEOUT_MS = 3e4;
|
|
60
|
+
/** @internal Shared command/broker timer policy; not a root SDK export. */
|
|
61
|
+
function seatOwnerTimeoutMs(timeoutMs = SEAT_COMMAND_TIMEOUT_MS) {
|
|
62
|
+
if (!Number.isSafeInteger(timeoutMs) || timeoutMs <= 0 || timeoutMs > 2147483647) throw new ValidationError("The account owner requires a positive timer bound");
|
|
63
|
+
return timeoutMs;
|
|
64
|
+
}
|
|
65
|
+
/** The existing authenticated client, or a private account-owner broker. */
|
|
66
|
+
function gatewaySeatTransport(source) {
|
|
67
|
+
let send;
|
|
68
|
+
let timeoutMs;
|
|
69
|
+
const rawBroker = !("fetch" in source);
|
|
70
|
+
if ("fetch" in source) send = (init) => source.fetch("/v1/model-credentials/resolve", init);
|
|
71
|
+
else {
|
|
72
|
+
const options = source;
|
|
73
|
+
let endpoint;
|
|
74
|
+
try {
|
|
75
|
+
endpoint = new URL(options.url);
|
|
76
|
+
} catch {
|
|
77
|
+
throw new ValidationError("The account owner broker URL is invalid");
|
|
78
|
+
}
|
|
79
|
+
if (typeof options.url !== "string" || options.url.length > 2048 || /\s/u.test(options.url) || endpoint.username || endpoint.password || endpoint.search || endpoint.hash || endpoint.protocol !== "https:" && !(endpoint.protocol === "http:" && [
|
|
80
|
+
"localhost",
|
|
81
|
+
"127.0.0.1",
|
|
82
|
+
"[::1]"
|
|
83
|
+
].includes(endpoint.hostname))) throw new ValidationError("The account owner requires HTTPS or loopback HTTP without URL credentials or parameters");
|
|
84
|
+
timeoutMs = seatOwnerTimeoutMs(options.timeoutMs);
|
|
85
|
+
const bearer = (configured = options.bearer) => {
|
|
86
|
+
const value = typeof configured === "function" ? configured() : configured;
|
|
87
|
+
if (typeof value !== "string" || value.length < 32 || value.length > 4096 || /\s/u.test(value)) throw new ValidationError("The account owner requires a bounded private bearer grant");
|
|
88
|
+
return value;
|
|
89
|
+
};
|
|
90
|
+
const configured = options.bearer;
|
|
91
|
+
if (typeof configured !== "function") bearer(configured);
|
|
92
|
+
send = (init) => fetch(endpoint, {
|
|
93
|
+
...init,
|
|
94
|
+
credentials: "omit",
|
|
95
|
+
headers: {
|
|
96
|
+
Authorization: `Bearer ${bearer()}`,
|
|
97
|
+
"Content-Type": "application/json"
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
}
|
|
61
101
|
return async (request, signal) => {
|
|
102
|
+
signal?.throwIfAborted();
|
|
62
103
|
const payload = JSON.stringify(request);
|
|
63
|
-
if (new TextEncoder().encode(payload).byteLength > 8388608) throw new ValidationError("The account owner request exceeded its public bound");
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
});
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
104
|
+
if (typeof payload !== "string" || new TextEncoder().encode(payload).byteLength > 8388608) throw new ValidationError("The account owner request exceeded its public bound");
|
|
105
|
+
const controller = timeoutMs === void 0 ? void 0 : new AbortController();
|
|
106
|
+
const active = controller ? combineAbortSignals([controller.signal, ...signal ? [signal] : []]) : signal;
|
|
107
|
+
const timer = controller ? setTimeout(() => controller.abort(new SandboxError("The account owner request timed out", {
|
|
108
|
+
code: "SEAT_SELECTION_UNCONFIRMED",
|
|
109
|
+
status: 502
|
|
110
|
+
})), timeoutMs) : void 0;
|
|
111
|
+
const wait = (work) => {
|
|
112
|
+
active?.throwIfAborted();
|
|
113
|
+
return awaitWithAbort(Promise.resolve().then(() => {
|
|
114
|
+
active?.throwIfAborted();
|
|
115
|
+
return work();
|
|
116
|
+
}), active);
|
|
117
|
+
};
|
|
74
118
|
try {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
119
|
+
const response = await wait(() => send({
|
|
120
|
+
method: "POST",
|
|
121
|
+
redirect: "error",
|
|
122
|
+
body: payload,
|
|
123
|
+
...active ? { signal: active } : {}
|
|
124
|
+
}));
|
|
125
|
+
const reader = response.body?.getReader();
|
|
126
|
+
if (!reader) throw new ValidationError("The account owner returned no reply");
|
|
127
|
+
const decoder = new TextDecoder();
|
|
128
|
+
let text = "";
|
|
129
|
+
let size = 0;
|
|
130
|
+
try {
|
|
131
|
+
for (;;) {
|
|
132
|
+
const { done, value } = await wait(() => reader.read());
|
|
133
|
+
if (done) break;
|
|
134
|
+
size += value.byteLength;
|
|
135
|
+
if (size > 65536) throw new ValidationError("The account owner exceeded its public response bound");
|
|
136
|
+
text += decoder.decode(value, { stream: true });
|
|
137
|
+
}
|
|
138
|
+
} finally {
|
|
139
|
+
reader.cancel().catch(() => {});
|
|
140
|
+
reader.releaseLock();
|
|
81
141
|
}
|
|
142
|
+
let body;
|
|
143
|
+
try {
|
|
144
|
+
body = JSON.parse(text + decoder.decode());
|
|
145
|
+
} catch {
|
|
146
|
+
throw new ValidationError("The account owner returned invalid JSON");
|
|
147
|
+
}
|
|
148
|
+
active?.throwIfAborted();
|
|
149
|
+
return {
|
|
150
|
+
ok: response.ok,
|
|
151
|
+
status: response.status,
|
|
152
|
+
body
|
|
153
|
+
};
|
|
154
|
+
} catch (error) {
|
|
155
|
+
active?.throwIfAborted();
|
|
156
|
+
if (rawBroker && !(error instanceof SandboxError)) throw new SandboxError("The account owner request failed", {
|
|
157
|
+
code: "SEAT_SELECTION_UNCONFIRMED",
|
|
158
|
+
status: 502
|
|
159
|
+
});
|
|
160
|
+
throw error;
|
|
82
161
|
} finally {
|
|
83
|
-
|
|
84
|
-
reader.releaseLock();
|
|
162
|
+
clearTimeout(timer);
|
|
85
163
|
}
|
|
86
|
-
const bytes = new Uint8Array(size);
|
|
87
|
-
let offset = 0;
|
|
88
|
-
for (const chunk of chunks) {
|
|
89
|
-
bytes.set(chunk, offset);
|
|
90
|
-
offset += chunk.byteLength;
|
|
91
|
-
}
|
|
92
|
-
let body;
|
|
93
|
-
try {
|
|
94
|
-
body = JSON.parse(new TextDecoder().decode(bytes));
|
|
95
|
-
} catch {
|
|
96
|
-
throw new ValidationError("The account owner returned invalid JSON");
|
|
97
|
-
}
|
|
98
|
-
return {
|
|
99
|
-
ok: response.ok,
|
|
100
|
-
status: response.status,
|
|
101
|
-
body
|
|
102
|
-
};
|
|
103
164
|
};
|
|
104
165
|
}
|
|
105
166
|
/** Classified owner refusal, with fixed diagnostics and no upstream credential material. */
|
|
@@ -242,4 +303,4 @@ function createSelectSeat(options) {
|
|
|
242
303
|
};
|
|
243
304
|
}
|
|
244
305
|
//#endregion
|
|
245
|
-
export {
|
|
306
|
+
export { createSelectSeat as a, SeatSelectionError as i, SEAT_OWNER_MAX_REQUEST_BYTES as n, gatewaySeatTransport as o, SEAT_OWNER_MAX_RESPONSE_BYTES as r, seatOwnerTimeoutMs as s, SEAT_COMMAND_TIMEOUT_MS as t };
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { R as SandboxError } from "./terminal-stream-types-DQNUfdKj.js";
|
|
2
|
-
import {
|
|
2
|
+
import { _t as SeatOwnerTransport, bt as SeatSelectionRequest, ft as SEAT_COMMAND_TIMEOUT_MS } from "./client-Tv6glrZu.js";
|
|
3
3
|
|
|
4
4
|
//#region src/select-seat-command.d.ts
|
|
5
5
|
/** Public reply bound; the owner prints one metadata object. */
|
|
6
6
|
declare const SEAT_COMMAND_MAX_RESPONSE_BYTES: number;
|
|
7
|
-
declare const SEAT_COMMAND_TIMEOUT_MS = 30000;
|
|
8
7
|
interface CommandSeatTransportOptions {
|
|
9
|
-
/**
|
|
8
|
+
/** Owner argv; never run through a shell. */
|
|
10
9
|
command: readonly string[];
|
|
11
|
-
/** Complete environment for
|
|
12
|
-
env?: Record<string, string | undefined
|
|
10
|
+
/** Complete environment, read afresh for each request. */
|
|
11
|
+
env?: Record<string, string | undefined> | (() => Record<string, string | undefined>);
|
|
13
12
|
timeoutMs?: number;
|
|
14
13
|
}
|
|
15
14
|
declare class SeatOwnerCommandError extends SandboxError {
|
|
@@ -1,31 +1,26 @@
|
|
|
1
1
|
import { C as SandboxError, O as ValidationError } from "./errors-BY-3SBlL.js";
|
|
2
|
-
import {
|
|
2
|
+
import { r as SEAT_OWNER_MAX_RESPONSE_BYTES, s as seatOwnerTimeoutMs, t as SEAT_COMMAND_TIMEOUT_MS } from "./select-seat--yEFCKqb.js";
|
|
3
3
|
import { spawn } from "node:child_process";
|
|
4
4
|
//#region src/select-seat-command.ts
|
|
5
5
|
/**
|
|
6
|
-
* Node-only transport for
|
|
7
|
-
* command (for example `acct sandbox resolve`) on a trusted controller host.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* ```typescript
|
|
11
|
-
* import { createSelectSeat } from "@tangle-network/sandbox";
|
|
12
|
-
* import { commandSeatTransport } from "@tangle-network/sandbox/select-seat/command";
|
|
13
|
-
*
|
|
14
|
-
* const selectSeat = createSelectSeat({ client, runId, minimumValidUntil, createBackend,
|
|
15
|
-
* transport: commandSeatTransport({ command: ["/usr/local/bin/acct", "sandbox", "resolve"] }) });
|
|
16
|
-
* ```
|
|
17
|
-
*
|
|
6
|
+
* Node-only account-owner command transport for seat selection and credentials.
|
|
18
7
|
* @packageDocumentation
|
|
19
8
|
*/
|
|
20
9
|
/** Public reply bound; the owner prints one metadata object. */
|
|
21
10
|
const SEAT_COMMAND_MAX_RESPONSE_BYTES = SEAT_OWNER_MAX_RESPONSE_BYTES;
|
|
22
|
-
const SEAT_COMMAND_TIMEOUT_MS = 3e4;
|
|
23
11
|
/** The owner command's exit contract: 0 selected, 75 capacity refusal, 78 permanent route refusal. */
|
|
24
12
|
const EXIT_STATUS = {
|
|
25
13
|
0: 200,
|
|
26
14
|
75: 503,
|
|
27
15
|
78: 400
|
|
28
16
|
};
|
|
17
|
+
function commandEnvironment(env) {
|
|
18
|
+
if (env === void 0) return { ...process.env };
|
|
19
|
+
const entries = [];
|
|
20
|
+
if (env && typeof env === "object" && !Array.isArray(env)) for (const key in env) entries.push([key, env[key]]);
|
|
21
|
+
if (!env || typeof env !== "object" || Array.isArray(env) || entries.some(([key, value]) => !key || /[=\0]/u.test(key) || value !== void 0 && (typeof value !== "string" || value.includes("\0")))) throw new ValidationError("The account owner requires valid private process variables");
|
|
22
|
+
return Object.fromEntries(entries);
|
|
23
|
+
}
|
|
29
24
|
var SeatOwnerCommandError = class extends SandboxError {
|
|
30
25
|
constructor(message, exitCode = null, terminationSignal = null) {
|
|
31
26
|
super(message, {
|
|
@@ -37,16 +32,23 @@ var SeatOwnerCommandError = class extends SandboxError {
|
|
|
37
32
|
}
|
|
38
33
|
};
|
|
39
34
|
function commandSeatTransport(options) {
|
|
40
|
-
const
|
|
41
|
-
if (
|
|
42
|
-
const
|
|
43
|
-
|
|
35
|
+
const command = options.command;
|
|
36
|
+
if (!Array.isArray(command) || command.length === 0 || command.length > 128 || [...command].some((part) => typeof part !== "string" || part.length === 0 || part.length > 4096 || part.includes("\0"))) throw new ValidationError("Seat selection requires a configured account command");
|
|
37
|
+
const [program, ...args] = command;
|
|
38
|
+
const timeoutMs = seatOwnerTimeoutMs(options.timeoutMs);
|
|
39
|
+
const configured = options.env;
|
|
40
|
+
if (typeof configured !== "function" && (!configured || Object.getPrototypeOf(configured) === Object.prototype || Array.isArray(configured)) && !Object.values(Object.getOwnPropertyDescriptors(configured ?? {})).some(({ enumerable, get }) => enumerable && get)) commandEnvironment(configured);
|
|
41
|
+
return async (request, signal) => {
|
|
42
|
+
signal?.throwIfAborted();
|
|
44
43
|
const payload = JSON.stringify(request);
|
|
45
|
-
if (Buffer.byteLength(payload) > 8388608)
|
|
44
|
+
if (typeof payload !== "string" || Buffer.byteLength(payload) > 8388608) throw new ValidationError("The account owner request exceeded its public bound");
|
|
46
45
|
return new Promise((resolve, reject) => {
|
|
46
|
+
signal?.throwIfAborted();
|
|
47
|
+
const configured = options.env;
|
|
48
|
+
const env = commandEnvironment(typeof configured === "function" ? configured() : configured);
|
|
47
49
|
signal?.throwIfAborted();
|
|
48
50
|
const child = spawn(program, args, {
|
|
49
|
-
env
|
|
51
|
+
env,
|
|
50
52
|
shell: false,
|
|
51
53
|
stdio: [
|
|
52
54
|
"pipe",
|
|
@@ -62,13 +64,14 @@ function commandSeatTransport(options) {
|
|
|
62
64
|
settled = true;
|
|
63
65
|
clearTimeout(timer);
|
|
64
66
|
signal?.removeEventListener("abort", abort);
|
|
65
|
-
if (
|
|
67
|
+
if (reply) resolve(reply);
|
|
68
|
+
else {
|
|
66
69
|
child.kill("SIGKILL");
|
|
67
70
|
reject(error);
|
|
68
|
-
}
|
|
71
|
+
}
|
|
69
72
|
};
|
|
70
73
|
const fail = (message, code = null, signal = null) => finish(new SeatOwnerCommandError(message, code, signal));
|
|
71
|
-
const abort = () => finish(signal?.reason
|
|
74
|
+
const abort = () => finish(signal?.reason);
|
|
72
75
|
signal?.addEventListener("abort", abort, { once: true });
|
|
73
76
|
const timer = setTimeout(() => fail("The account owner command timed out"), timeoutMs);
|
|
74
77
|
child.stderr.resume();
|
|
@@ -86,7 +89,7 @@ function commandSeatTransport(options) {
|
|
|
86
89
|
try {
|
|
87
90
|
body = JSON.parse(Buffer.concat(chunks).toString("utf8"));
|
|
88
91
|
} catch {
|
|
89
|
-
return
|
|
92
|
+
return fail("The account owner returned invalid JSON", code, terminationSignal);
|
|
90
93
|
}
|
|
91
94
|
finish(null, {
|
|
92
95
|
ok: status === 200,
|
|
@@ -95,6 +98,9 @@ function commandSeatTransport(options) {
|
|
|
95
98
|
});
|
|
96
99
|
});
|
|
97
100
|
child.stdin.end(payload);
|
|
101
|
+
}).catch((error) => {
|
|
102
|
+
signal?.throwIfAborted();
|
|
103
|
+
throw error instanceof SandboxError ? error : new SeatOwnerCommandError("The account owner command could not start");
|
|
98
104
|
});
|
|
99
105
|
};
|
|
100
106
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as combineAbortSignals } from "../abort-signal-CRxC2dlT.js";
|
|
2
|
-
import { i as fetchSandboxApi } from "../api-request
|
|
2
|
+
import { i as fetchSandboxApi } from "../api-request-BWT7PYL0.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-D_q6Yfb-.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,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 BlueprintSandboxClient, 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 BlueprintSandboxClient, t as QuoteError, u as TANGLE_CHAIN_ID, v as SandboxCreateResponseParamTypes, y as SandboxIdParamTypes } from "../tangle-BtTPZXhK.js";
|
|
2
2
|
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 { R as readFilesystemIncarnationTuple, n as createSandboxInstanceFromResponse } from "./sandbox-
|
|
1
|
+
import { R as readFilesystemIncarnationTuple, n as createSandboxInstanceFromResponse } from "./sandbox-Bu3jceX_.js";
|
|
2
2
|
import { a as readResponseJson } from "./errors-BY-3SBlL.js";
|
|
3
|
-
import { i as fetchSandboxApi } from "./api-request
|
|
3
|
+
import { i as fetchSandboxApi } from "./api-request-BWT7PYL0.js";
|
|
4
4
|
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-BT2q9nkO.js";
|
|
5
5
|
//#region ../../../packages/runtime-contracts/dist/tangle-blueprint-abi.js
|
|
6
6
|
/**
|
|
@@ -1227,6 +1227,8 @@ interface SessionEventStreamOptions {
|
|
|
1227
1227
|
}
|
|
1228
1228
|
/** Select one exact execution when awaiting a session result. */
|
|
1229
1229
|
interface SessionResultOptions {
|
|
1230
|
+
/** Cancel this result wait without interrupting the execution. */
|
|
1231
|
+
signal?: AbortSignal;
|
|
1230
1232
|
/**
|
|
1231
1233
|
* Runtime execution to replay and aggregate.
|
|
1232
1234
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/sandbox",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.242",
|
|
4
4
|
"description": "Client SDK for the Tangle Sandbox platform - build AI agent applications with dev containers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -155,13 +155,13 @@
|
|
|
155
155
|
"yjs": "13.6.33",
|
|
156
156
|
"@products/sandbox-test-utils": "0.0.0",
|
|
157
157
|
"@repo/shared": "0.0.0",
|
|
158
|
-
"@tangle-network/agent-profile-materialize": "0.27.1",
|
|
159
158
|
"@tangle-network/cli-agent-registry": "0.15.0",
|
|
159
|
+
"@tangle-network/agent-profile-materialize": "0.27.1",
|
|
160
160
|
"@tangle-network/runtime-contracts": "0.20.0"
|
|
161
161
|
},
|
|
162
162
|
"tangleRelease": {
|
|
163
|
-
"sourceSha": "
|
|
164
|
-
"mergedAt": "2026-11-
|
|
163
|
+
"sourceSha": "6d3a44e2139f02011c16965d5f4387e647747628",
|
|
164
|
+
"mergedAt": "2026-11-05T01:47:38-08:00"
|
|
165
165
|
},
|
|
166
166
|
"scripts": {
|
|
167
167
|
"build": "node scripts/build-dist.mjs",
|