@tangle-network/sandbox 0.11.1-develop.20260718000408.b3f0f2a → 0.11.1-develop.20260718034345.c7df56e

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 AgentSandboxBlueprintAbi, d as SandboxCreateParamTypes, f as SandboxCreateResponseParamTypes, i as TANGLE_CHAIN_ID, l as ITangleJobsAbi, n as JOB_SANDBOX_CREATE, o as TANGLE_MAINNET_RPC, p as SandboxIdParamTypes, r as JOB_SANDBOX_DELETE, s as TangleSandboxClientConfig, t as TangleSandboxClient, u as JsonResponseParamTypes } from "../index-DD8we2b9.js";
1
+ import { a as TANGLE_JOBS_CONTRACT, c as AgentSandboxBlueprintAbi, d as SandboxCreateParamTypes, f as SandboxCreateResponseParamTypes, i as TANGLE_CHAIN_ID, l as ITangleJobsAbi, n as JOB_SANDBOX_CREATE, o as TANGLE_MAINNET_RPC, p as SandboxIdParamTypes, r as JOB_SANDBOX_DELETE, s as TangleSandboxClientConfig, t as TangleSandboxClient, u as JsonResponseParamTypes } from "../index-CmLkWZDA.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, TangleSandboxClientConfig };
@@ -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-DcGiYTx3.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-BbC2o7B8.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 { p as parseErrorResponse } from "./errors-Cbs78OlF.js";
2
- import { t as SandboxInstance } from "./sandbox-Cf25Dgrc.js";
2
+ import { t as SandboxInstance } from "./sandbox-Ban9d-wW.js";
3
3
  //#region src/tangle/abi.ts
4
4
  /**
5
5
  * Tangle Contract ABI Definitions
@@ -2081,21 +2081,24 @@ type TurnDriveResult = {
2081
2081
  * capability tokens for browser-safe runtime access.
2082
2082
  */
2083
2083
  type ScopedTokenScope = "session" | "session-runtime" | "project" | "read-only";
2084
- /**
2085
- * Options for `box.mintScopedToken()`.
2086
- */
2087
- interface MintScopedTokenOptions {
2088
- /** Scope to mint. `session` and `project` are for SessionGateway streams;
2089
- * `session-runtime` permits typed files, messages, and terminals for one
2090
- * session; `read-only` permits read-only runtime requests. */
2091
- scope: ScopedTokenScope;
2092
- /** Required when `scope` is `session` or `session-runtime`. */
2093
- sessionId?: string;
2094
- /** TTL in minutes. Default 5; clamped to [1, 15]. Browser-side
2095
- * bearers must be short-lived; pair with `client.onTokenRefresh()`
2096
- * for long-running consumers. */
2084
+ interface MintScopedTokenBase {
2085
+ /** TTL in minutes. Default 5; clamped to [1, 15]. */
2097
2086
  ttlMinutes?: number;
2098
2087
  }
2088
+ /** Options for `box.mintScopedToken()`, narrowed by consumer scope. */
2089
+ type MintScopedTokenOptions = (MintScopedTokenBase & {
2090
+ scope: "session"; /** Client-facing browser session ID. */
2091
+ sessionId: string; /** Actual runtime session ID used to filter the sandbox event stream. */
2092
+ runtimeSessionId: string;
2093
+ }) | (MintScopedTokenBase & {
2094
+ scope: "session-runtime";
2095
+ sessionId: string;
2096
+ runtimeSessionId?: never;
2097
+ }) | (MintScopedTokenBase & {
2098
+ scope: "project" | "read-only";
2099
+ sessionId?: never;
2100
+ runtimeSessionId?: never;
2101
+ });
2099
2102
  /**
2100
2103
  * Returned by `box.mintScopedToken()`. Use session/project tokens with
2101
2104
  * `SessionGatewayClient`; use session-runtime/read-only tokens with
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/sandbox",
3
- "version": "0.11.1-develop.20260718000408.b3f0f2a",
3
+ "version": "0.11.1-develop.20260718034345.c7df56e",
4
4
  "description": "Client SDK for the Tangle Sandbox platform - build AI agent applications with dev containers",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -131,6 +131,7 @@
131
131
  "build": "tsdown",
132
132
  "build:clean": "tsdown",
133
133
  "check-types": "tsc --noEmit",
134
+ "check-examples": "tsc -p tsconfig.examples.json && tsc -p tsconfig.worker-example.json",
134
135
  "verify-dist": "bash scripts/verify-dist.sh",
135
136
  "test": "vitest run",
136
137
  "test:watch": "vitest",