@tangle-network/sandbox 0.13.0-develop.20260726140131.65bdb24 → 0.13.0-develop.20260726161607.1f7da8b

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.
@@ -0,0 +1,35 @@
1
+ import { existsSync, readFileSync } from "node:fs";
2
+ import { homedir } from "node:os";
3
+ import { join } from "node:path";
4
+ //#region ../../../packages/cli-agent-registry/dist/local-cli-auth.mjs
5
+ const DEFAULT_MODE = 384;
6
+ function readAuthFile(sourcePath, targetPath) {
7
+ if (!existsSync(sourcePath)) return null;
8
+ return {
9
+ path: targetPath,
10
+ content: readFileSync(sourcePath, "utf-8"),
11
+ mode: DEFAULT_MODE
12
+ };
13
+ }
14
+ function discoverCodexAuthFiles(homeDir) {
15
+ const auth = readAuthFile(join(homeDir, ".codex", "auth.json"), ".codex/auth.json");
16
+ return auth ? [auth] : [];
17
+ }
18
+ function discoverClaudeAuthFiles(homeDir) {
19
+ return [
20
+ readAuthFile(join(homeDir, ".claude", ".credentials.json"), ".claude/.credentials.json"),
21
+ readAuthFile(join(homeDir, ".claude", "settings.json"), ".claude/settings.json"),
22
+ readAuthFile(join(homeDir, ".claude", "settings.local.json"), ".claude/settings.local.json")
23
+ ].filter((entry) => entry !== null);
24
+ }
25
+ function discoverLocalCliAuthFiles(backendType, options = {}) {
26
+ const homeDir = options.homeDir ?? homedir();
27
+ const authFiles = backendType === "codex" ? discoverCodexAuthFiles(homeDir) : discoverClaudeAuthFiles(homeDir);
28
+ return authFiles.length > 0 ? authFiles : void 0;
29
+ }
30
+ function describeLocalCliAuthExpectation(backendType) {
31
+ if (backendType === "codex") return "~/.codex/auth.json";
32
+ return "~/.claude/{.credentials.json,settings.json,settings.local.json}";
33
+ }
34
+ //#endregion
35
+ export { describeLocalCliAuthExpectation, discoverLocalCliAuthFiles };
@@ -476,7 +476,7 @@ type RunEvent = {
476
476
  type RunStatus = "queued" | "in_progress" | "requires_action" | "completed" | "failed" | "cancelled" | "expired";
477
477
  /**
478
478
  * Minimal interface the low-level `runEvents()` consumes. The route
479
- * layer adapts the concrete `SandboxClient` SSE stream onto this
479
+ * layer adapts the concrete `Sandbox` SSE stream onto this
480
480
  * surface so the Run executor stays decoupled from any specific HTTP
481
481
  * shape. `cancel()` is best-effort — the source should stop producing
482
482
  * events as soon as it observes a cancellation.
@@ -1,13 +1,29 @@
1
1
  import { c as SandboxError, d as TimeoutError, f as ValidationError, i as NetworkError, l as ServerError, p as parseErrorResponse, s as QuotaError } from "./errors-D9fFOWX9.js";
2
+ import { agentProfileSchema } from "@tangle-network/agent-interface";
3
+ import { z } from "zod";
4
+ const ALL_BACKEND_TYPES = Object.values({
5
+ OPENCODE: "opencode",
6
+ CLAUDE_CODE: "claude-code",
7
+ KIMI_CODE: "kimi-code",
8
+ CODEX: "codex",
9
+ AMP: "amp",
10
+ FACTORY_DROIDS: "factory-droids",
11
+ PI: "pi",
12
+ HERMES: "hermes",
13
+ FORGE: "forge",
14
+ OPENCLAW: "openclaw",
15
+ NANOCLAW: "nanoclaw",
16
+ ACP: "acp",
17
+ CURSOR: "cursor",
18
+ CLI_BASE: "cli-base"
19
+ });
20
+ const backendTypeSchema = z.enum(ALL_BACKEND_TYPES);
21
+ new Set(ALL_BACKEND_TYPES);
22
+ //#endregion
2
23
  //#region src/backend-config.ts
3
- const LEGACY_QUESTION_ALIAS_KEY = ["question", "Channel"].join("");
4
- function normalizeRuntimeModelOverride(model) {
5
- const parts = model.split("/");
6
- if (parts.length >= 2) return {
7
- provider: parts[0],
8
- model: parts.slice(1).join("/")
9
- };
10
- return { model };
24
+ function assertCurrentBackendType(value, field = "backend.type") {
25
+ const parsed = backendTypeSchema.safeParse(value);
26
+ if (!parsed.success) throw new Error(`[sandbox-sdk] ${field} must be a current backend type: ${parsed.error.issues[0]?.message ?? "invalid value"}`);
11
27
  }
12
28
  /**
13
29
  * Normalize runtime backend config for the wire format.
@@ -15,13 +31,14 @@ function normalizeRuntimeModelOverride(model) {
15
31
  * Canonical profile objects are already accepted by the sidecar and are
16
32
  * forwarded without translation.
17
33
  */
18
- function normalizeRuntimeBackendConfig(backend, options = {}) {
19
- if (!backend && !options.model) return void 0;
20
- if (backend && LEGACY_QUESTION_ALIAS_KEY in backend) throw new Error(`[sandbox-sdk] backend.${LEGACY_QUESTION_ALIAS_KEY} was removed. Use backend.interactions.question instead.`);
34
+ function normalizeRuntimeBackendConfig(backend) {
35
+ if (!backend) return void 0;
36
+ if (backend.type !== void 0) assertCurrentBackendType(backend.type);
37
+ if (backend.profile !== void 0 && !agentProfileSchema.safeParse(backend.profile).success) throw new Error("[sandbox-sdk] backend.profile must be an AgentProfile object");
21
38
  return {
22
39
  ...backend?.type ? { type: backend.type } : {},
23
40
  ...backend?.profile !== void 0 ? { profile: backend.profile } : {},
24
- ...backend?.model ? { model: backend.model } : options.model ? { model: normalizeRuntimeModelOverride(options.model) } : {},
41
+ ...backend?.model ? { model: backend.model } : {},
25
42
  ...backend?.server ? { server: backend.server } : {},
26
43
  ...backend?.interactions !== void 0 ? { interactions: backend.interactions } : {},
27
44
  ...backend?.metadata !== void 0 ? { metadata: backend.metadata } : {}
@@ -372,10 +389,6 @@ var SandboxRuntimeApi = class {
372
389
  await this.transport.ensureRunning();
373
390
  return (await this.json("/ports", { method: "GET" })).data?.ports ?? [];
374
391
  }
375
- async profiles() {
376
- await this.transport.ensureRunning();
377
- return this.json("/profiles", { method: "GET" });
378
- }
379
392
  async readFiles(paths, options = {}) {
380
393
  if (paths.length === 0) return {
381
394
  files: [],
@@ -672,4 +685,4 @@ function normalizeSessionInfo(raw) {
672
685
  };
673
686
  }
674
687
  //#endregion
675
- export { FILE_DECODED_WRITE_MAX_BYTES as a, encodeTextForWire as c, SANDBOX_PROXY_REQUEST_MAX_BYTES as i, normalizeRuntimeBackendConfig as l, normalizeSessionInfo as n, combineAbortSignals as o, uploadChunked as r, encodePromptForWire as s, SandboxRuntimeApi as t, normalizeRuntimeModelOverride as u };
688
+ export { FILE_DECODED_WRITE_MAX_BYTES as a, encodeTextForWire as c, backendTypeSchema as d, SANDBOX_PROXY_REQUEST_MAX_BYTES as i, assertCurrentBackendType as l, normalizeSessionInfo as n, combineAbortSignals as o, uploadChunked as r, encodePromptForWire as s, SandboxRuntimeApi as t, normalizeRuntimeBackendConfig as u };
package/dist/runtime.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { $r as SendSessionMessageOptions, Br as SandboxTerminalRequestOptions, Ci as TaskSessionInfo, D as CommitTaskSessionOptions, Dr as SandboxPortBinding, Fi as UploadProgress, I as CreateSessionOptions, L as CreateTaskSessionOptions, Lr as SandboxTerminalCreateOptions, Mr as SandboxRuntimeHealth, Pn as RenameOptions, Pr as SandboxRuntimeProfileList, Rr as SandboxTerminalInfo, Zt as ListMessagesOptions, ai as SessionInfo, at as FileReadBatchResult, b as ChunkedUploadOptions, bi as TaskSessionChanges, ct as FileRenameResult, dt as FileTreeOptions, ei as SendSessionMessageRequest, ft as FileTreeResult, ht as FileWriteResult, it as FileReadBatchOptions, mt as FileUsageResult, pt as FileUsageOptions, si as SessionMessage, ti as SentSessionMessage, x as ChunkedUploadResult, xi as TaskSessionCommitResult, zi as WriteFileOptions, zr as SandboxTerminalManager } from "./types-DFYV3JSL.js";
2
- import { a as NotFoundError, c as SandboxError, d as ServerError, f as StateError, i as NetworkError, l as SandboxErrorJson, m as ValidationError, n as CapabilityError, o as PartialFailureError, p as TimeoutError, s as QuotaError, t as AuthError, u as SandboxFailureDetail } from "./errors-C8HMx78o.js";
1
+ import { E as CommitTaskSessionOptions, F as CreateSessionOptions, Fr as SandboxTerminalRequestOptions, I as CreateTaskSessionOptions, Jr as SendSessionMessageOptions, Mi as WriteFileOptions, Mr as SandboxTerminalCreateOptions, Nn as RenameOptions, Nr as SandboxTerminalInfo, Oi as UploadProgress, Pr as SandboxTerminalManager, Tr as SandboxPortBinding, Xr as SentSessionMessage, Xt as ListMessagesOptions, Yr as SendSessionMessageRequest, b as ChunkedUploadOptions, dt as FileTreeResult, ei as SessionInfo, ft as FileUsageOptions, gi as TaskSessionInfo, it as FileReadBatchResult, kr as SandboxRuntimeHealth, mi as TaskSessionCommitResult, mt as FileWriteResult, ni as SessionMessage, pi as TaskSessionChanges, pt as FileUsageResult, rt as FileReadBatchOptions, st as FileRenameResult, ut as FileTreeOptions, x as ChunkedUploadResult } from "./types-Ch78hv3k.js";
2
+ import { a as NotFoundError, c as SandboxError, d as ServerError, f as StateError, i as NetworkError, l as SandboxErrorJson, m as ValidationError, n as CapabilityError, o as PartialFailureError, p as TimeoutError, s as QuotaError, t as AuthError, u as SandboxFailureDetail } from "./errors-BzMmpmqU.js";
3
3
 
4
4
  //#region src/lib/chunked-upload.d.ts
5
5
  /** The transport a caller wires this module to — {@link SandboxInstance.runtimeFetch}
@@ -38,7 +38,6 @@ declare class SandboxRuntimeApi {
38
38
  constructor(transport: RuntimeTransport);
39
39
  health(): Promise<SandboxRuntimeHealth>;
40
40
  ports(): Promise<SandboxPortBinding[]>;
41
- profiles(): Promise<SandboxRuntimeProfileList>;
42
41
  readFiles(paths: string[], options?: FileReadBatchOptions): Promise<FileReadBatchResult>;
43
42
  writeFile(path: string, content: string, options?: WriteFileOptions): Promise<FileWriteResult>;
44
43
  /**
package/dist/runtime.js CHANGED
@@ -1,4 +1,4 @@
1
- import { o as combineAbortSignals, r as uploadChunked, t as SandboxRuntimeApi } from "./runtime-api-BFtk4_HK.js";
1
+ import { o as combineAbortSignals, r as uploadChunked, t as SandboxRuntimeApi } from "./runtime-api-fZ4UDwOY.js";
2
2
  import { a as NotFoundError, c as SandboxError, d as TimeoutError, f as ValidationError, i as NetworkError, l as ServerError, n as CapabilityError, o as PartialFailureError, s as QuotaError, t as AuthError, u as StateError } from "./errors-D9fFOWX9.js";
3
3
  //#region src/runtime-client.ts
4
4
  const DEFAULT_RUNTIME_TIMEOUT_MS = 3e4;
@@ -1,4 +1,4 @@
1
- import { $ as EventStreamOptions, $i as TerminalStreamHandlers, $r as SendSessionMessageOptions, Ar as SandboxResourceUsage, At as GitCommit, Bi as WriteManyFile, C as CodeExecutionResult, Ci as TaskSessionInfo, Cn as ProvisionResult, D as CommitTaskSessionOptions, Di as TeeAttestationResponse, Dr as SandboxPortBinding, Fn as RestoreSnapshotOptions, Fr as SandboxStatus, G as DriveTurnOptions, Gn as SSHCommandDescriptor, Gr as SandboxTraceOptions, Gt as IntelligenceReport, H as DispatchedSession, Hr as SandboxTraceBundle, I as CreateSessionOptions, In as ResumeOptions, Ir as SandboxTerminalAttachOptions, Jn as SandboxConnection, Kn as SSHCredentials, Kt as IntelligenceReportBudget, L as CreateTaskSessionOptions, Li as WaitForOptions, Ln as Rollout, Mi as TurnDriveResult, Mr as SandboxRuntimeHealth, Mt as GitDiff, Nt as GitStatus, O as CompletedTurnResult, Pr as SandboxRuntimeProfileList, Pt as GpuLease, Ri as WaitForRolloutOptions, S as CodeExecutionOptions, Sn as ProvisionEvent, Ti as TeeAttestationOptions, Tr as SandboxInfo, V as DispatchPromptOptions, Vi as WriteManyOptions, Vn as RolloutStartResult, Vr as SandboxTerminals, Wt as InstalledTool, X as EgressManager, Xi as TerminalStream, Xn as SandboxEvent, Xr as SearchOptions, Xt as JsonValue, Y as DurablePlan, Yr as SearchMatch, Yt as IntelligenceReportWindow, Zt as ListMessagesOptions, ai as SessionInfo, an as NetworkManager, bi as TaskSessionChanges, bn as PromptOptions, cn as PermissionsManager, di as SnapshotOptions, ei as SendSessionMessageRequest, fi as SnapshotResult, hn as ProcessManager, hr as SandboxFleetTraceBundle, ht as FileWriteResult, ii as SessionForkOptions, ki as TeePublicKeyResponse, kt as GitBranch, l as BackendManager, lt as FileSystem, mi as StartupDiagnostics, nn as MintScopedTokenOptions, nt as ExecResult, oi as SessionListOptions, q as DriverInfo, qr as ScopedToken, qt as IntelligenceReportCompareTo, ri as SessionEventStreamOptions, s as BackendConfig, si as SessionMessage, ti as SentSessionMessage, tt as ExecOptions, ui as SnapshotInfo, un as PreviewLinkManager, vi as TaskOptions, w as CodeLanguage, xi as TaskSessionCommitResult, xn as PromptResult, y as BranchOptions, yi as TaskResult, yn as PromptInputPart, zi as WriteFileOptions, zn as RolloutOptions, zt as GpuLeaseManager } from "./types-DFYV3JSL.js";
1
+ import { $r as SessionForkOptions, Ai as WaitForOptions, Ar as SandboxStatus, B as DispatchPromptOptions, Bn as RolloutStartResult, Br as SandboxTraceOptions, C as CodeExecutionResult, Cr as SandboxInfo, D as CompletedTurnResult, Dr as SandboxResourceUsage, E as CommitTaskSessionOptions, F as CreateSessionOptions, Fn as ResumeOptions, Gr as SearchOptions, Gt as IntelligenceReportBudget, Hr as ScopedToken, I as CreateTaskSessionOptions, In as Rollout, Ir as SandboxTerminals, J as DurablePlan, Jn as SandboxEvent, Jr as SendSessionMessageOptions, Jt as IntelligenceReportWindow, K as DriverInfo, Kn as SandboxConnection, Kt as IntelligenceReportCompareTo, Lr as SandboxTraceBundle, Mi as WriteFileOptions, Mt as GitStatus, Ni as WriteManyFile, Nt as GpuLease, Ot as GitBranch, Pi as WriteManyOptions, Pn as RestoreSnapshotOptions, Q as EventStreamOptions, Qr as SessionEventStreamOptions, Ri as TerminalStream, Rn as RolloutOptions, Rt as GpuLeaseManager, S as CodeExecutionOptions, Si as TeePublicKeyResponse, Sn as ProvisionResult, Ti as TurnDriveResult, Tr as SandboxPortBinding, Un as SSHCommandDescriptor, Ut as InstalledTool, V as DispatchedSession, Vi as TerminalStreamHandlers, W as DriveTurnOptions, Wn as SSHCredentials, Wr as SearchMatch, Wt as IntelligenceReport, Xr as SentSessionMessage, Xt as ListMessagesOptions, Y as EgressManager, Yr as SendSessionMessageRequest, Yt as JsonValue, ai as SnapshotInfo, bi as TeeAttestationResponse, bn as PromptResult, ct as FileSystem, d as BackendType, ei as SessionInfo, et as ExecOptions, gi as TaskSessionInfo, in as NetworkManager, ji as WaitForRolloutOptions, jr as SandboxTerminalAttachOptions, jt as GitDiff, kr as SandboxRuntimeHealth, kt as GitCommit, l as BackendManager, li as StartupDiagnostics, ln as PreviewLinkManager, mi as TaskSessionCommitResult, mn as ProcessManager, mt as FileWriteResult, ni as SessionMessage, oi as SnapshotOptions, pi as TaskSessionChanges, pr as SandboxFleetTraceBundle, s as BackendConfig, si as SnapshotResult, sn as PermissionsManager, ti as SessionListOptions, tn as MintScopedTokenOptions, tt as ExecResult, vi as TeeAttestationOptions, vn as PromptInputPart, w as CodeLanguage, xn as ProvisionEvent, y as BranchOptions, yn as PromptOptions } from "./types-Ch78hv3k.js";
2
2
  import { AgentProfile } from "@tangle-network/agent-interface";
3
3
 
4
4
  //#region src/mcp.d.ts
@@ -123,10 +123,10 @@ interface StartInteractiveOptions {
123
123
  /**
124
124
  * Harness with a native interactive TUI (bare binary launches it): e.g.
125
125
  * "claude-code", "codex", "opencode", "kimi-code", "factory-droids",
126
- * "forge", "pi", "amp", "hermes". The sidecar's harness registry is the
127
- * authority; it rejects harnesses without a TUI entrypoint (e.g. "cursor").
126
+ * "pi", "amp", "hermes". The sidecar's runner registry is the authority
127
+ * and rejects values without a TUI entrypoint.
128
128
  */
129
- harness: string;
129
+ harness: BackendType;
130
130
  model?: string;
131
131
  apiKey?: string;
132
132
  authMode?: string;
@@ -153,7 +153,7 @@ interface StartInteractiveOptions {
153
153
  }
154
154
  interface InteractiveSessionInfo {
155
155
  sessionId: string;
156
- harness: string;
156
+ harness: BackendType;
157
157
  /** ISO timestamp of when the harness process was spawned. */
158
158
  startedAt: string;
159
159
  /**
@@ -171,13 +171,13 @@ interface InteractiveSessionInfo {
171
171
  type InteractiveSessionStatus = {
172
172
  state: "running";
173
173
  sessionId: string;
174
- harness: string;
174
+ harness: BackendType;
175
175
  startedAt: string;
176
176
  streamUrl: string;
177
177
  } | {
178
178
  state: "exited";
179
179
  sessionId: string;
180
- harness: string;
180
+ harness: BackendType;
181
181
  startedAt: string;
182
182
  endedAt: string;
183
183
  exitCode?: number;
@@ -296,7 +296,6 @@ interface SandboxSessionHost extends InteractiveSessionHost {
296
296
  _sessionStatus(id: string): Promise<SessionInfo | null>;
297
297
  _sessionEvents(id: string, opts?: SessionEventStreamOptions): AsyncGenerator<SandboxEvent>;
298
298
  _sessionResult(id: string, session?: SessionInfo): Promise<PromptResult>;
299
- _sessionCancel(id: string): Promise<void>;
300
299
  _sessionDelete(id: string): Promise<void>;
301
300
  _sessionSendMessage(id: string, request: SendSessionMessageRequest, options?: SendSessionMessageOptions): Promise<SentSessionMessage>;
302
301
  messages(opts: ListMessagesOptions): Promise<SessionMessage[]>;
@@ -373,15 +372,6 @@ declare class SandboxSession {
373
372
  * are translated to the runtime's wire names by the SDK.
374
373
  */
375
374
  sendMessage(request: SendSessionMessageRequest, options?: SendSessionMessageOptions): Promise<SentSessionMessage>;
376
- /**
377
- * Abort the session's in-flight execution; the session and its messages
378
- * are preserved (this does not delete the session). Void-returning alias
379
- * of `interrupt()` — use `interrupt()` when you need to know whether an
380
- * execution was actually running. Best-effort: an in-flight LLM call may
381
- * still complete one more token before the abort takes effect. Idempotent —
382
- * aborting a session with nothing in flight is a no-op.
383
- */
384
- cancel(): Promise<void>;
385
375
  /** Delete this session and its persisted runtime state. */
386
376
  delete(): Promise<void>;
387
377
  /**
@@ -603,8 +593,6 @@ interface ToolsCapability {
603
593
  declare class SandboxInstance {
604
594
  private readonly client;
605
595
  private info;
606
- /** Once observed, incarnation metadata is authoritative for this handle. */
607
- private filesystemIncarnationContract;
608
596
  private refreshInFlight?;
609
597
  private readonly defaultRuntimeBackend?;
610
598
  private readonly runtime;
@@ -613,7 +601,7 @@ declare class SandboxInstance {
613
601
  * A profile the runtime has cached (create-time priming), letting turns
614
602
  * send `backend.profileSha256` instead of re-shipping the profile's static
615
603
  * corpus. Set only when priming succeeded; when unset every turn sends the
616
- * full profile (unchanged legacy behavior). `snapshot` is the serialized
604
+ * full profile. `snapshot` is the serialized
617
605
  * content at prime time — a turn substitutes the reference only when the
618
606
  * outgoing profile serializes identically, so a caller that mutates the
619
607
  * profile in place (or passes an equivalent object) is compared by CONTENT,
@@ -909,7 +897,7 @@ declare class SandboxInstance {
909
897
  * static corpus does not ride every turn. The match is by serialized content,
910
898
  * not object identity, so a mutated-in-place profile — or an equivalent
911
899
  * object passed as a per-turn override — is compared correctly: unchanged
912
- * content references by hash, changed content sends inline (the legacy shape).
900
+ * content references by hash, changed content sends inline.
913
901
  */
914
902
  private buildRunBackendBody;
915
903
  streamPrompt(message: string | PromptInputPart[], options?: PromptOptions): AsyncGenerator<SandboxEvent>;
@@ -962,36 +950,6 @@ declare class SandboxInstance {
962
950
  watchProvisioning(options?: {
963
951
  signal?: AbortSignal;
964
952
  }): AsyncGenerator<ProvisionEvent, ProvisionResult | undefined>;
965
- /**
966
- * Run an agentic task until completion.
967
- *
968
- * Unlike prompt(), task() is designed for autonomous agent work:
969
- * - The agent works until it completes the task or hits an error
970
- * - Session state is maintained for context continuity
971
- * - Token usage is aggregated across the execution
972
- *
973
- * Note: The agent (OpenCode/Claude) handles multi-turn execution internally.
974
- * Most tasks complete in a single call. The maxTurns option is for edge cases
975
- * where the agent explicitly signals it needs additional input.
976
- *
977
- * @param prompt - Task description for the agent
978
- * @param options - Task options
979
- * @returns Task result with response and execution metadata
980
- */
981
- task(prompt: string, options?: TaskOptions): Promise<TaskResult>;
982
- /**
983
- * Stream events from a task execution.
984
- *
985
- * Use this for real-time updates as the agent works:
986
- * - Tool calls and results
987
- * - Thinking/reasoning steps
988
- * - File operations
989
- * - Final response
990
- *
991
- * @param prompt - Task description for the agent
992
- * @param options - Task options
993
- */
994
- streamTask(prompt: string, options?: TaskOptions): AsyncGenerator<SandboxEvent>;
995
953
  /**
996
954
  * Search for text patterns in files using ripgrep.
997
955
  *
@@ -1028,8 +986,6 @@ declare class SandboxInstance {
1028
986
  * WebSocket as a {@link TerminalStream}.
1029
987
  */
1030
988
  get terminals(): SandboxTerminals;
1031
- /** List profiles installed in this sandbox runtime. */
1032
- listProfiles(): Promise<SandboxRuntimeProfileList>;
1033
989
  /**
1034
990
  * Live whole-sandbox resource usage (memory + CPU) from the container cgroup.
1035
991
  *
@@ -1233,20 +1189,11 @@ declare class SandboxInstance {
1233
1189
  * await proc.kill();
1234
1190
  * ```
1235
1191
  *
1236
- * @example Run Python code directly
1237
- * ```typescript
1238
- * const result = await box.process.runCode(`
1239
- * import numpy as np
1240
- * print(np.random.rand(10).mean())
1241
- * `);
1242
- * console.log(result.stdout);
1243
- * ```
1244
1192
  */
1245
1193
  get process(): ProcessManager;
1246
1194
  private processEnsureDevServer;
1247
1195
  private processSpawn;
1248
1196
  private processSpawnExact;
1249
- private processRunCode;
1250
1197
  private processList;
1251
1198
  private processGet;
1252
1199
  private createProcessHandle;
@@ -1512,11 +1459,6 @@ declare class SandboxInstance {
1512
1459
  * to parse (older API, empty body) must not fail the lifecycle call.
1513
1460
  */
1514
1461
  private readLifecycleDiagnostics;
1515
- /**
1516
- * keepAlive is intentionally unavailable until the API exposes timeout updates.
1517
- * @param seconds - Reserved for future support
1518
- */
1519
- keepAlive(_seconds?: number): Promise<void>;
1520
1462
  /**
1521
1463
  * Upload a local directory to the sandbox via tar.
1522
1464
  * @param localPath - Local directory path to upload
@@ -1526,9 +1468,8 @@ declare class SandboxInstance {
1526
1468
  /**
1527
1469
  * Wait for the sandbox to reach a specific status.
1528
1470
  *
1529
- * A sandbox using the filesystem-incarnation contract is not considered
1530
- * `running` until that incarnation is ready. Legacy servers that omit the
1531
- * contract retain the status-only behavior.
1471
+ * A sandbox is not considered `running` until its filesystem incarnation is
1472
+ * complete and ready.
1532
1473
  *
1533
1474
  * When `onProgress` is provided and the sandbox is still provisioning,
1534
1475
  * uses SSE events for real-time progress instead of polling. Falls back
@@ -1722,14 +1663,6 @@ declare class SandboxInstance {
1722
1663
  _sessionEvents(id: string, opts?: SessionEventStreamOptions, stopOnTurnTerminal?: boolean): AsyncGenerator<SandboxEvent>;
1723
1664
  /** @internal — invoked by SandboxSession.result(). */
1724
1665
  _sessionResult(id: string, knownSession?: SessionInfo): Promise<PromptResult>;
1725
- /**
1726
- * @internal — invoked by SandboxSession.cancel(). Void-returning alias of
1727
- * `_interrupt`: both abort the in-flight execution via `POST /{id}/abort`
1728
- * (the session and its messages are preserved). `cancel()` discards the
1729
- * `cancelled` flag; callers that need to distinguish a real interruption
1730
- * from a no-op should use `interrupt()`.
1731
- */
1732
- _sessionCancel(id: string): Promise<void>;
1733
1666
  /** @internal — invoked by InteractiveSessionHandle.start(). */
1734
1667
  _startInteractive(id: string, options: StartInteractiveOptions): Promise<InteractiveSessionInfo>;
1735
1668
  /** @internal — invoked by InteractiveSessionHandle.sendPrompt(). */