@tangle-network/sandbox 0.33.1 → 0.34.0

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,2 +1,2 @@
1
- import { a as TANGLE_JOBS_CONTRACT, c as ITangleJobsAbi, d as SandboxCreateResponseParamTypes, f as SandboxIdParamTypes, i as TANGLE_CHAIN_ID, l as JsonResponseParamTypes, n as JOB_SANDBOX_CREATE, o as TANGLE_MAINNET_RPC, r as JOB_SANDBOX_DELETE, s as AgentSandboxBlueprintAbi, t as TangleSandboxClient, u as SandboxCreateParamTypes } from "../tangle-C85FdpsD.js";
1
+ import { a as TANGLE_JOBS_CONTRACT, c as ITangleJobsAbi, d as SandboxCreateResponseParamTypes, f as SandboxIdParamTypes, i as TANGLE_CHAIN_ID, l as JsonResponseParamTypes, n as JOB_SANDBOX_CREATE, o as TANGLE_MAINNET_RPC, r as JOB_SANDBOX_DELETE, s as AgentSandboxBlueprintAbi, t as TangleSandboxClient, u as SandboxCreateParamTypes } from "../tangle-DeKTFfoQ.js";
2
2
  export { AgentSandboxBlueprintAbi, ITangleJobsAbi, JOB_SANDBOX_CREATE, JOB_SANDBOX_DELETE, JsonResponseParamTypes, SandboxCreateParamTypes, SandboxCreateResponseParamTypes, SandboxIdParamTypes, TANGLE_CHAIN_ID, TANGLE_JOBS_CONTRACT, TANGLE_MAINNET_RPC, TangleSandboxClient };
@@ -1,5 +1,5 @@
1
1
  import { m as parseErrorResponse } from "./errors-C6kn-3zt.js";
2
- import { n as createSandboxInstanceFromResponse } from "./sandbox-sU-uwrYh.js";
2
+ import { n as createSandboxInstanceFromResponse } from "./sandbox-Dg4nXKd9.js";
3
3
  //#region src/tangle/abi.ts
4
4
  /**
5
5
  * Tangle Contract ABI Definitions
@@ -10,9 +10,21 @@ declare const terminalReadyMessageSchema: z.ZodObject<{
10
10
  sessionId: z.ZodString;
11
11
  restored: z.ZodBoolean;
12
12
  detachTimeoutMs: z.ZodNumber;
13
+ attachCount: z.ZodOptional<z.ZodNumber>;
14
+ cursors: z.ZodOptional<z.ZodObject<{
15
+ earliest: z.ZodNumber;
16
+ latest: z.ZodNumber;
17
+ }, z.core.$strip>>;
13
18
  }, z.core.$strip>;
14
19
  type TerminalReadyMessage = z.infer<typeof terminalReadyMessageSchema>;
15
20
  type TerminalReadyInfo = Omit<TerminalReadyMessage, "type">;
21
+ /** One sequenced output frame for an exact interactive terminal. */
22
+ declare const terminalOutputMessageSchema: z.ZodObject<{
23
+ type: z.ZodLiteral<"output">;
24
+ seq: z.ZodNumber;
25
+ data: z.ZodString;
26
+ }, z.core.$strip>;
27
+ type TerminalOutputMessage = z.infer<typeof terminalOutputMessageSchema>;
16
28
  declare const terminalExitMessageSchema: z.ZodObject<{
17
29
  type: z.ZodLiteral<"exit">;
18
30
  exitCode: z.ZodOptional<z.ZodNumber>;
@@ -97,6 +109,8 @@ declare class TerminalStreamError extends Error {
97
109
  interface TerminalStreamHandlers {
98
110
  /** Raw PTY output bytes (both live output and reattach history replay). */
99
111
  onData?: (data: Uint8Array) => void;
112
+ /** Server-sequenced output for exact interactive terminal sessions. */
113
+ onOutput?: (seq: number, data: Uint8Array) => void;
100
114
  onReady?: (info: TerminalReadyInfo) => void;
101
115
  onExit?: (info: TerminalExitInfo) => void;
102
116
  /** Protocol `error` frames and post-connect transport failures. */
@@ -253,4 +267,4 @@ declare class TerminalStream {
253
267
  private assertOpen;
254
268
  }
255
269
  //#endregion
256
- export { TerminalStreamReconnectAuthority as a, MintScopedTokenOptions as c, TERMINAL_WS_ECHO_SUBPROTOCOL as d, TerminalExitInfo as f, TerminalStreamAuthFormat as h, TerminalStreamOptions as i, ScopedToken as l, TerminalReadyInfo as m, TerminalStreamError as n, TerminalStreamToken as o, TerminalInteractiveSessionIdentity as p, TerminalStreamHandlers as r, MintInteractiveSessionTokenOptions as s, TerminalStream as t, ScopedTokenScope as u };
270
+ export { TerminalStreamReconnectAuthority as a, MintScopedTokenOptions as c, TERMINAL_WS_ECHO_SUBPROTOCOL as d, TerminalExitInfo as f, TerminalStreamAuthFormat as g, TerminalReadyInfo as h, TerminalStreamOptions as i, ScopedToken as l, TerminalOutputMessage as m, TerminalStreamError as n, TerminalStreamToken as o, TerminalInteractiveSessionIdentity as p, TerminalStreamHandlers as r, MintInteractiveSessionTokenOptions as s, TerminalStream as t, ScopedTokenScope as u };
@@ -1,4 +1,4 @@
1
- import { r as TerminalStreamHandlers, t as TerminalStream } from "./terminal-stream-4KNJ6SmL.js";
1
+ import { r as TerminalStreamHandlers, t as TerminalStream } from "./terminal-stream-5GNLCsms.js";
2
2
  import * as _$_tangle_network_agent_interface0 from "@tangle-network/agent-interface";
3
3
  import { AgentExactRunControlRef, AgentProfile, AgentProfileCapabilities, AgentProfileConfidential, AgentProfileValidationResult, HarnessType, ReasoningEffort } from "@tangle-network/agent-interface";
4
4
  import { z } from "zod";
@@ -1630,11 +1630,18 @@ interface CreateSandboxOptions {
1630
1630
  /** Pin sandbox creation to a specific published public-template version. */
1631
1631
  publicTemplateVersionId?: string;
1632
1632
  /**
1633
- * Names of secrets to inject as environment variables.
1633
+ * Names of secrets to inject as environment variables, or `"all"` for every
1634
+ * secret the account stores.
1634
1635
  *
1635
1636
  * Secrets must be created via `client.secrets.create()` before use.
1636
1637
  * They are injected as environment variables with the same name.
1637
1638
  *
1639
+ * Anything running in the sandbox reads an injected secret in plaintext, so
1640
+ * name the secrets the box needs. A create that omits this field selects no
1641
+ * stored secret, and the box still receives the secrets an auto-applied
1642
+ * startup script names plus a stored Hub credential.
1643
+ * `createReceipt.injectedSecrets` reports every name the create decrypted.
1644
+ *
1638
1645
  * @example
1639
1646
  * ```typescript
1640
1647
  * // First, create the secrets
@@ -1650,7 +1657,7 @@ interface CreateSandboxOptions {
1650
1657
  * const result = await box.exec("echo $HF_TOKEN");
1651
1658
  * ```
1652
1659
  */
1653
- secrets?: string[];
1660
+ secrets?: string[] | "all";
1654
1661
  /** Custom metadata to store with the sandbox */
1655
1662
  metadata?: Record<string, unknown>;
1656
1663
  /**
@@ -1926,6 +1933,15 @@ type SandboxCreateOutcome = "created" | "idempotent_replay" | "unknown";
1926
1933
  interface SandboxCreateReceipt {
1927
1934
  outcome: SandboxCreateOutcome;
1928
1935
  idempotencyKeyApplied: boolean;
1936
+ /**
1937
+ * Names of the stored secrets this call decrypted into the sandbox.
1938
+ * Read it to size what the box can read. The set is sorted and
1939
+ * de-duplicated, and it also counts the names a startup script or a Hub
1940
+ * credential pulled in, so it is a superset of the `secrets` the create
1941
+ * asked for rather than the same list. Absent on an idempotent replay, and
1942
+ * on a platform old enough not to report the set.
1943
+ */
1944
+ injectedSecrets?: string[];
1929
1945
  }
1930
1946
  /**
1931
1947
  * Full sandbox information returned from the API.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/sandbox",
3
- "version": "0.33.1",
3
+ "version": "0.34.0",
4
4
  "description": "Client SDK for the Tangle Sandbox platform - build AI agent applications with dev containers",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -96,7 +96,7 @@
96
96
  },
97
97
  "dependencies": {
98
98
  "@tangle-network/agent-core": "0.9.5",
99
- "@tangle-network/agent-interface": "^1.3.0",
99
+ "@tangle-network/agent-interface": "^1.6.0",
100
100
  "zod": "4.4.3"
101
101
  },
102
102
  "peerDependencies": {
@@ -135,9 +135,9 @@
135
135
  "vitest": "^4.1.5",
136
136
  "ws": "^8.20.0",
137
137
  "yjs": "13.6.30",
138
- "@tangle-network/runtime-contracts": "0.6.2",
139
- "@tangle-network/cli-agent-registry": "0.3.11",
140
138
  "@repo/shared": "0.0.0",
139
+ "@tangle-network/cli-agent-registry": "0.3.11",
140
+ "@tangle-network/runtime-contracts": "0.6.2",
141
141
  "@tangle-network/sse-core": "0.0.0"
142
142
  },
143
143
  "scripts": {