@tangle-network/sandbox 0.60.50-develop.20261013200919.56fef80 → 0.60.50-develop.20261013202153.b5fd71f

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.
@@ -1,7 +1,7 @@
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 { E as assertCurrentBackendType } from "../interactive-controller-DbKLSfTD.js";
3
3
  import { h as StateError, l as NotFoundError, v as ValidationError } from "../errors-iWIsey1D.js";
4
- import { n as Sandbox } from "../client-CIbv9y2g.js";
4
+ import { n as Sandbox } from "../client-De3QD_Uq.js";
5
5
  import { t as SandboxInstance } from "../sandbox-CsmTplZQ.js";
6
6
  import { z } from "zod";
7
7
  //#region src/agent/instances.ts
@@ -3330,13 +3330,22 @@ async function describeLocalCliAuthExpectation(backendType) {
3330
3330
  const { describeLocalCliAuthExpectation: describe } = await import("./local-cli-auth-CZ6F7Sbi.js");
3331
3331
  return describe(backendType);
3332
3332
  }
3333
+ /**
3334
+ * Whether the caller already chose the backend's credential: inline files or
3335
+ * key, an API-key mode, or a stored-secret reference (`cliAuth`, `apiKeyEnv`).
3336
+ * Each field is read in both spellings the public type accepts, role-named on
3337
+ * `backend` and nested under the deprecated `backend.model`, because folding
3338
+ * into the wire shape happens after this check.
3339
+ */
3340
+ function namesExplicitCredential(backend) {
3341
+ const nested = backend.model;
3342
+ return Boolean(backend.authFiles?.length || nested?.authFiles?.length || backend.apiKey || nested?.apiKey || backend.apiKeyEnv || nested?.apiKeyEnv || backend.cliAuth || nested?.cliAuth || backend.authMode === "api-key" || nested?.authMode === "api-key");
3343
+ }
3333
3344
  async function hydrateLocalCliBackendAuth(backend, baseUrl, trustLocalCliAuth) {
3334
3345
  if (!backend) return void 0;
3335
3346
  if (!isLocalSandboxEndpoint(baseUrl)) return backend;
3336
3347
  if (backend.type !== "codex" && backend.type !== "claude-code") return backend;
3337
- if (backend.model?.authFiles?.length) return backend;
3338
- if (backend.model?.apiKey) return backend;
3339
- if (backend.model?.authMode === "api-key") return backend;
3348
+ if (namesExplicitCredential(backend)) return backend;
3340
3349
  if (!trustLocalCliAuth) {
3341
3350
  const cliName = backend.type === "codex" ? "codex" : "claude";
3342
3351
  throw new AuthError(`Local ${backend.type} backend requested for ${baseUrl}, but the SDK will not read CLI credentials from the host home directory unless you opt in by constructing the client with \`new Sandbox({ ..., trustLocalCliAuth: true })\`. Only opt in when the localhost endpoint is one you control. Otherwise, pass \`backend.model.apiKey\` / \`backend.model.authFiles\` explicitly, or run \`${cliName} login\` inside the sandbox.`);
package/dist/core.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { _ as TimeoutError, a as FileWriteConflictError, c as NetworkError, d as QuotaError, h as StateError, l as NotFoundError, m as ServerError, n as CapabilityError, p as SandboxError, t as AuthError, u as PartialFailureError, v as ValidationError } from "./errors-iWIsey1D.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-CIbv9y2g.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-De3QD_Uq.js";
3
3
  import { o as WorkspaceImages, t as SandboxInstance, x as ManagedProcessClient } from "./sandbox-CsmTplZQ.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";
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { i as parseBackendType, r as backendTypeSchema, t as ALL_BACKEND_TYPES } from "./backend-types-C7b_Gpa0.js";
2
2
  import { A as requestedPublicProfileDigest, F as deriveAgentResultOutcome, I as deriveAgentRunOutcome, L as projectAgentTerminalRecord, P as createAgentRunOutcomeTracker, a as TERMINAL_WS_ECHO_SUBPROTOCOL, i as TerminalStreamError, k as normalizeRuntimeBackendConfig, n as InteractiveSessionController, r as TerminalStream, t as BrowserInteractiveSessionController, w as parseSSEStream } from "./interactive-controller-DbKLSfTD.js";
3
3
  import { _ as TimeoutError, a as FileWriteConflictError, c as NetworkError, d as QuotaError, f as ResumeEnvRequiredError, g as StreamInterruptedError, h as StateError, i as EgressProxyRecoveryError, l as NotFoundError, m as ServerError, n as CapabilityError, o as KeyBudgetExhaustedError, p as SandboxError, r as EdgeNotReadyError, t as AuthError, u as PartialFailureError, v as ValidationError } from "./errors-iWIsey1D.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-CIbv9y2g.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-De3QD_Uq.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
6
  import { A as exportTraceBundle, C as splitInlineProfileFileMounts, M as toOtelJson, S as materializeProfileFileMounts, T as validateDeferredProfileFileMounts, _ as collectAgentFinalMessageText, b as isToolBearingEvent, c as MAX_EGRESS_DENIALS_LIMIT, d as InteractiveSessionHandle, f as agentInteractiveSessionPromptRequestDigest, g as applySandboxEventText, h as createInteractiveTerminalSession, j as otelTraceIdForTangleTrace, k as buildTraceExportPayload, 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 collectAgentResponseText, w as splitInlineProfileSkills, x as ManagedProcessClient, y as getSandboxEventText } from "./sandbox-CsmTplZQ.js";
7
7
  import { LinesClient, SandboxLines, lineInstanceKey, profileChannelReference } from "./lines.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/sandbox",
3
- "version": "0.60.50-develop.20261013200919.56fef80",
3
+ "version": "0.60.50-develop.20261013202153.b5fd71f",
4
4
  "description": "Client SDK for the Tangle Sandbox platform - build AI agent applications with dev containers",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -149,13 +149,13 @@
149
149
  "vitest": "^4.1.11",
150
150
  "ws": "^8.20.0",
151
151
  "yjs": "13.6.30",
152
- "@tangle-network/sse-core": "0.0.0",
153
152
  "@tangle-network/cli-agent-registry": "0.6.5",
154
- "@products/sandbox-test-utils": "0.0.0",
155
- "@tangle-network/runtime-contracts": "0.16.3",
156
153
  "@tangle-network/sdk": "4.0.6",
154
+ "@tangle-network/runtime-contracts": "0.16.3",
157
155
  "@tangle-network/agent-profile-materialize": "0.25.3",
158
- "@repo/shared": "0.0.0"
156
+ "@products/sandbox-test-utils": "0.0.0",
157
+ "@repo/shared": "0.0.0",
158
+ "@tangle-network/sse-core": "0.0.0"
159
159
  },
160
160
  "scripts": {
161
161
  "build": "node scripts/build-dist.mjs",