@tangle-network/sandbox 0.60.77-develop.20261016231633.b9943d8 → 0.60.78-develop.20261017035743.f29a2da
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.js +2 -2
- package/dist/{client-CRkHfByN.js → client-R1tw-4Px.js} +1 -1
- package/dist/core.js +2 -2
- package/dist/index.js +3 -3
- package/dist/{sandbox-DzSEprto.js → sandbox-C7Tk62qn.js} +30 -7
- package/dist/tangle/index.js +1 -1
- package/dist/{tangle-DHFKq9sn.js → tangle-Ba4Kz5zT.js} +1 -1
- package/package.json +5 -5
package/dist/agent/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as TOOL_SPECS, i as ALL_TOOL_SPECS, o as serializeToolResult, r as bindToolSpecs, t as createMcpServer } from "../mcp-local-DjryqUiY.js";
|
|
2
2
|
import { D as assertCurrentBackendType } from "../interactive-controller-CJ24g8Va.js";
|
|
3
3
|
import { _ as StateError, b as ValidationError, d as NotFoundError } from "../errors-DSJBKmGZ.js";
|
|
4
|
-
import { n as Sandbox } from "../client-
|
|
5
|
-
import { t as SandboxInstance } from "../sandbox-
|
|
4
|
+
import { n as Sandbox } from "../client-R1tw-4Px.js";
|
|
5
|
+
import { t as SandboxInstance } from "../sandbox-C7Tk62qn.js";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region src/agent/instances.ts
|
|
8
8
|
const managers = /* @__PURE__ */ new WeakMap();
|
|
@@ -2,7 +2,7 @@ import { r as backendTypeSchema } from "./backend-types-D6bYbvMB.js";
|
|
|
2
2
|
import { A as normalizeRuntimeBackendConfig, C as encodePromptForWire, D as assertCurrentBackendType, E as applyRequestedModel, N as withProfileHarness, O as foldModelRoutingFields, T as parseSSEStream, c as requestInteractiveSessionToken } from "./interactive-controller-CJ24g8Va.js";
|
|
3
3
|
import { C as readResponseJson, S as parseResponseError, b as ValidationError, d as NotFoundError, f as PartialFailureError, g as ServerError, h as SandboxError, l as NON_RETRYABLE_CREATE_QUOTA_REASONS, p as QuotaError, s as GpuProviderNotConfiguredError, t as AuthError, u as NetworkError, x as parseErrorResponse, y as TimeoutError } from "./errors-DSJBKmGZ.js";
|
|
4
4
|
import { f as combineAbortSignals } from "./browser-interactive-control-controller-BJf0P_J4.js";
|
|
5
|
-
import { A as rewrapResponse, D as validateDeferredProfileFileMounts, E as splitInlineProfileSkills, N as exportTraceBundle, O as normalizeConnection, T as splitInlineProfileFileMounts, a as normalizeStartupDiagnostics, i as normalizeSandboxCreateReceipt, j as fetchWithKeepAlive, k as normalizeSandboxShape, n as createSandboxInstanceFromResponse, r as normalizeCaptureProof } from "./sandbox-
|
|
5
|
+
import { A as rewrapResponse, D as validateDeferredProfileFileMounts, E as splitInlineProfileSkills, N as exportTraceBundle, O as normalizeConnection, T as splitInlineProfileFileMounts, a as normalizeStartupDiagnostics, i as normalizeSandboxCreateReceipt, j as fetchWithKeepAlive, k as normalizeSandboxShape, n as createSandboxInstanceFromResponse, r as normalizeCaptureProof } from "./sandbox-C7Tk62qn.js";
|
|
6
6
|
import { LinesClient } from "./lines.js";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
import { agentProfileSchema } from "@tangle-network/agent-interface";
|
package/dist/core.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { _ as StateError, b as ValidationError, d as NotFoundError, f as PartialFailureError, g as ServerError, h as SandboxError, o as FileWriteConflictError, p as QuotaError, r as CapabilityError, t as AuthError, u as NetworkError, y as TimeoutError } from "./errors-DSJBKmGZ.js";
|
|
2
|
-
import { _ as parseBackendRegistryResponse, a as InstanceRestartingError, f as backendRegistryCapabilitiesSchema, g as isBackendRegistryInteractionKind, h as backendRegistryResponseSchema, i as HostedInstance, m as backendRegistryInteractionKindSchema, n as Sandbox, o as InstancesClient, p as backendRegistryEntrySchema, v as parseBackendRegistryResponseBody } from "./client-
|
|
3
|
-
import { C as ManagedProcessClient, o as WorkspaceImages, t as SandboxInstance } from "./sandbox-
|
|
2
|
+
import { _ as parseBackendRegistryResponse, a as InstanceRestartingError, f as backendRegistryCapabilitiesSchema, g as isBackendRegistryInteractionKind, h as backendRegistryResponseSchema, i as HostedInstance, m as backendRegistryInteractionKindSchema, n as Sandbox, o as InstancesClient, p as backendRegistryEntrySchema, v as parseBackendRegistryResponseBody } from "./client-R1tw-4Px.js";
|
|
3
|
+
import { C as ManagedProcessClient, o as WorkspaceImages, t as SandboxInstance } from "./sandbox-C7Tk62qn.js";
|
|
4
4
|
import { LinesClient, lineInstanceKey, profileChannelReference } from "./lines.js";
|
|
5
5
|
import { i as parseLineApplicationResult, n as LINE_APPLICATION_REQUEST_MAX_BYTES, r as parseLineApplicationRequest, t as LINE_APPLICATION_REPLY_MAX_CHARS } from "./line-application-Cq6dJLBD.js";
|
|
6
6
|
//#region src/core.ts
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { i as parseBackendType, r as backendTypeSchema, t as ALL_BACKEND_TYPES } from "./backend-types-D6bYbvMB.js";
|
|
2
2
|
import { A as normalizeRuntimeBackendConfig, F as createAgentRunOutcomeTracker, I as deriveAgentResultOutcome, L as deriveAgentRunOutcome, R as projectAgentTerminalRecord, T as parseSSEStream, a as terminalUpgradeHeadersSupported, i as TerminalStreamError, j as requestedPublicProfileDigest, n as InteractiveSessionController, o as TERMINAL_WS_ECHO_SUBPROTOCOL, r as TerminalStream, t as BrowserInteractiveSessionController } from "./interactive-controller-CJ24g8Va.js";
|
|
3
3
|
import { _ as StateError, a as EgressProxyRecoveryError, b as ValidationError, c as KeyBudgetExhaustedError, d as NotFoundError, f as PartialFailureError, g as ServerError, h as SandboxError, i as EdgeNotReadyError, m as ResumeEnvRequiredError, n as BranchFanoutExceedsHostError, o as FileWriteConflictError, p as QuotaError, r as CapabilityError, s as GpuProviderNotConfiguredError, t as AuthError, u as NetworkError, v as StreamInterruptedError, y as TimeoutError } from "./errors-DSJBKmGZ.js";
|
|
4
|
-
import { _ as parseBackendRegistryResponse, a as InstanceRestartingError, c as SandboxFleetClient, d as validateBatchRunRequest, f as backendRegistryCapabilitiesSchema, g as isBackendRegistryInteractionKind, h as backendRegistryResponseSchema, i as HostedInstance, l as runtimeWorkspaceCwdSchema, m as backendRegistryInteractionKindSchema, n as Sandbox, o as InstancesClient, p as backendRegistryEntrySchema, r as RunsClient, s as SandboxFleet, t as IntelligenceClient, u as createBatchResultAccumulator, v as parseBackendRegistryResponseBody } from "./client-
|
|
4
|
+
import { _ as parseBackendRegistryResponse, a as InstanceRestartingError, c as SandboxFleetClient, d as validateBatchRunRequest, f as backendRegistryCapabilitiesSchema, g as isBackendRegistryInteractionKind, h as backendRegistryResponseSchema, i as HostedInstance, l as runtimeWorkspaceCwdSchema, m as backendRegistryInteractionKindSchema, n as Sandbox, o as InstancesClient, p as backendRegistryEntrySchema, r as RunsClient, s as SandboxFleet, t as IntelligenceClient, u as createBatchResultAccumulator, v as parseBackendRegistryResponseBody } from "./client-R1tw-4Px.js";
|
|
5
5
|
import { a as INTERACTIVE_CONTROL_CLEANUP_TIMEOUT_MS, l as createInteractiveControlHolderId, n as browserInteractiveControlHolderId, o as InteractiveSessionControlController, s as InteractiveSessionNotRunningError, t as BrowserInteractiveSessionControlController, u as interactiveSessionIdentityDigest } from "./browser-interactive-control-controller-BJf0P_J4.js";
|
|
6
|
-
import { C as ManagedProcessClient, D as validateDeferredProfileFileMounts, E as splitInlineProfileSkills, F as toOtelJson, M as buildTraceExportPayload, N as exportTraceBundle, P as otelTraceIdForTangleTrace, S as isToolBearingEvent, T as splitInlineProfileFileMounts, _ as SandboxOperationFailedError, b as collectAgentResponseText, c as MAX_EGRESS_DENIALS_LIMIT, d as InteractiveSessionHandle, f as agentInteractiveSessionPromptRequestDigest, g as SandboxOperation, h as createInteractiveTerminalSession, l as SandboxTaskSession, m as createInteractiveTerminalCapture, o as WorkspaceImages, p as InteractiveTerminalFrameLog, s as GPU_LEASE_PROVIDER_NAMES, t as SandboxInstance, u as SandboxSession, v as applySandboxEventText, w as materializeProfileFileMounts, x as getSandboxEventText, y as collectAgentFinalMessageText } from "./sandbox-
|
|
6
|
+
import { C as ManagedProcessClient, D as validateDeferredProfileFileMounts, E as splitInlineProfileSkills, F as toOtelJson, M as buildTraceExportPayload, N as exportTraceBundle, P as otelTraceIdForTangleTrace, S as isToolBearingEvent, T as splitInlineProfileFileMounts, _ as SandboxOperationFailedError, b as collectAgentResponseText, c as MAX_EGRESS_DENIALS_LIMIT, d as InteractiveSessionHandle, f as agentInteractiveSessionPromptRequestDigest, g as SandboxOperation, h as createInteractiveTerminalSession, l as SandboxTaskSession, m as createInteractiveTerminalCapture, o as WorkspaceImages, p as InteractiveTerminalFrameLog, s as GPU_LEASE_PROVIDER_NAMES, t as SandboxInstance, u as SandboxSession, v as applySandboxEventText, w as materializeProfileFileMounts, x as getSandboxEventText, y as collectAgentFinalMessageText } from "./sandbox-C7Tk62qn.js";
|
|
7
7
|
import { LinesClient, SandboxLines, lineInstanceKey, profileChannelReference } from "./lines.js";
|
|
8
8
|
import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-DaJU5O0E.js";
|
|
9
9
|
import { i as parseLineApplicationResult, n as LINE_APPLICATION_REQUEST_MAX_BYTES, r as parseLineApplicationRequest, t as LINE_APPLICATION_REPLY_MAX_CHARS } from "./line-application-Cq6dJLBD.js";
|
|
10
|
-
import { s as TangleSandboxClient } from "./tangle-
|
|
10
|
+
import { s as TangleSandboxClient } from "./tangle-Ba4Kz5zT.js";
|
|
11
11
|
import { z } from "zod";
|
|
12
12
|
import { SANDBOX_SIZE_PRESET_NAMES, agentProfileConfidentialSchema, agentProfileSchema } from "@tangle-network/agent-interface";
|
|
13
13
|
//#region src/confidential.ts
|
|
@@ -5919,7 +5919,12 @@ var SandboxInstance = class SandboxInstance {
|
|
|
5919
5919
|
});
|
|
5920
5920
|
};
|
|
5921
5921
|
const explicitReplay = Boolean(options?.executionId && options.lastEventId);
|
|
5922
|
-
const
|
|
5922
|
+
const replaySearch = new URLSearchParams({
|
|
5923
|
+
lastEventId: options?.lastEventId ?? "0",
|
|
5924
|
+
format: "sse"
|
|
5925
|
+
});
|
|
5926
|
+
appendSessionIdQuery(replaySearch, internal?.replaySessionId);
|
|
5927
|
+
const requestEndpoint = explicitReplay ? `/agents/run/${encodeURIComponent(options?.executionId ?? "")}/events?${replaySearch}` : "/agents/run/stream";
|
|
5923
5928
|
let lastEventId = options?.lastEventId;
|
|
5924
5929
|
let executionId = options?.executionId;
|
|
5925
5930
|
let sessionId = options?.sessionId;
|
|
@@ -6127,8 +6132,11 @@ var SandboxInstance = class SandboxInstance {
|
|
|
6127
6132
|
let connectedAt;
|
|
6128
6133
|
let deliveredThisConnection = 0;
|
|
6129
6134
|
try {
|
|
6130
|
-
const queryParams =
|
|
6131
|
-
|
|
6135
|
+
const queryParams = new URLSearchParams();
|
|
6136
|
+
if (lastEventId) queryParams.set("lastEventId", lastEventId);
|
|
6137
|
+
queryParams.set("format", "sse");
|
|
6138
|
+
appendSessionIdQuery(queryParams, internal?.replaySessionId);
|
|
6139
|
+
const replayResponse = await this.runtimeFetch(`/agents/run/${encodeURIComponent(resumeExecutionId)}/events?${queryParams}`, {
|
|
6132
6140
|
method: "GET",
|
|
6133
6141
|
signal: streamSignal,
|
|
6134
6142
|
headers: traceHeaders
|
|
@@ -6200,7 +6208,7 @@ var SandboxInstance = class SandboxInstance {
|
|
|
6200
6208
|
deliveredThisConnection += 1;
|
|
6201
6209
|
if (event.id) lastEventId = event.id;
|
|
6202
6210
|
const eventSessionId = event.data?.sessionId;
|
|
6203
|
-
if (typeof eventSessionId === "string" && eventSessionId.length > 0) sessionId = eventSessionId;
|
|
6211
|
+
if (sessionId === void 0 && event.type === "execution.started" && typeof eventSessionId === "string" && eventSessionId.length > 0) sessionId = eventSessionId;
|
|
6204
6212
|
if (event.type === "done" || event.type === "error") {
|
|
6205
6213
|
receivedTerminal = true;
|
|
6206
6214
|
logStreamCheckpoint("terminal_event", {
|
|
@@ -9620,10 +9628,25 @@ var SandboxInstance = class SandboxInstance {
|
|
|
9620
9628
|
});
|
|
9621
9629
|
const response = await this.runtimeFetch(`/agents/run/${encodeURIComponent(executionId)}/events?${search.toString()}`);
|
|
9622
9630
|
if (!response.ok) throw await parseResponseError(response);
|
|
9623
|
-
|
|
9624
|
-
|
|
9625
|
-
|
|
9631
|
+
let lastEventId = "0";
|
|
9632
|
+
try {
|
|
9633
|
+
for await (const event of this.parseSSEStream(response)) {
|
|
9634
|
+
if (event.id) lastEventId = event.id;
|
|
9635
|
+
yield event;
|
|
9636
|
+
if (event.type === "done" || event.type === "error") return;
|
|
9637
|
+
}
|
|
9638
|
+
} catch (error) {
|
|
9639
|
+
this.logStreamCheckpoint("result_stream_read_failed", {
|
|
9640
|
+
executionId,
|
|
9641
|
+
sessionId,
|
|
9642
|
+
error: error instanceof Error ? error.message : String(error)
|
|
9643
|
+
});
|
|
9626
9644
|
}
|
|
9645
|
+
yield* this.streamPromptInner("", {
|
|
9646
|
+
sessionId,
|
|
9647
|
+
executionId,
|
|
9648
|
+
lastEventId
|
|
9649
|
+
}, { replaySessionId: sessionId });
|
|
9627
9650
|
}
|
|
9628
9651
|
/** @internal — invoked by SandboxSession.result(). */
|
|
9629
9652
|
async _sessionResult(id, options, knownSession) {
|
package/dist/tangle/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as SandboxCreateParamTypes, a as parseQuoteResponse, c as OperatorSession, d as JOB_SANDBOX_DELETE, f as TANGLE_CHAIN_ID, g as JsonResponseParamTypes, h as ITangleJobsAbi, i as jobQuoteDigest, l as OperatorSessionError, m as AgentSandboxBlueprintAbi, n as fetchQuote, o as validateQuote, p as TANGLE_JOBS_CONTRACT, r as inputsHashOf, s as TangleSandboxClient, t as QuoteError, u as JOB_SANDBOX_CREATE, v as SandboxCreateResponseParamTypes, y as SandboxIdParamTypes } from "../tangle-
|
|
1
|
+
import { _ as SandboxCreateParamTypes, a as parseQuoteResponse, c as OperatorSession, d as JOB_SANDBOX_DELETE, f as TANGLE_CHAIN_ID, g as JsonResponseParamTypes, h as ITangleJobsAbi, i as jobQuoteDigest, l as OperatorSessionError, m as AgentSandboxBlueprintAbi, n as fetchQuote, o as validateQuote, p as TANGLE_JOBS_CONTRACT, r as inputsHashOf, s as TangleSandboxClient, t as QuoteError, u as JOB_SANDBOX_CREATE, v as SandboxCreateResponseParamTypes, y as SandboxIdParamTypes } from "../tangle-Ba4Kz5zT.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,5 +1,5 @@
|
|
|
1
1
|
import { C as readResponseJson } from "./errors-DSJBKmGZ.js";
|
|
2
|
-
import { n as createSandboxInstanceFromResponse } from "./sandbox-
|
|
2
|
+
import { n as createSandboxInstanceFromResponse } from "./sandbox-C7Tk62qn.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-B7_9Hl_z.js";
|
|
4
4
|
//#region src/tangle/abi.ts
|
|
5
5
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/sandbox",
|
|
3
|
-
"version": "0.60.
|
|
3
|
+
"version": "0.60.78-develop.20261017035743.f29a2da",
|
|
4
4
|
"description": "Client SDK for the Tangle Sandbox platform - build AI agent applications with dev containers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -154,13 +154,13 @@
|
|
|
154
154
|
"vitest": "^4.1.11",
|
|
155
155
|
"ws": "^8.20.0",
|
|
156
156
|
"yjs": "13.6.30",
|
|
157
|
-
"@repo/shared": "0.0.0",
|
|
158
157
|
"@products/sandbox-test-utils": "0.0.0",
|
|
158
|
+
"@repo/shared": "0.0.0",
|
|
159
159
|
"@tangle-network/agent-profile-materialize": "0.26.0",
|
|
160
|
-
"@tangle-network/cli-agent-registry": "0.10.2",
|
|
161
160
|
"@tangle-network/runtime-contracts": "0.19.0",
|
|
162
|
-
"@tangle-network/
|
|
163
|
-
"@tangle-network/
|
|
161
|
+
"@tangle-network/sdk": "4.0.16",
|
|
162
|
+
"@tangle-network/cli-agent-registry": "0.10.2",
|
|
163
|
+
"@tangle-network/sse-core": "0.0.0"
|
|
164
164
|
},
|
|
165
165
|
"scripts": {
|
|
166
166
|
"build": "node scripts/build-dist.mjs",
|