@tangle-network/agent-app 0.46.17 → 0.46.19

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.
@@ -23,9 +23,10 @@ export declare function serializeSandboxProvisioningError(error: unknown, option
23
23
  export declare function formatSandboxProvisioningSupportDetails(diagnostics: SafeSandboxErrorDiagnostics): string;
24
24
  export declare function isSandboxAuthFailure(diagnostics: SafeSandboxErrorDiagnostics): boolean;
25
25
  export declare function isSandboxApiBearerAuthFailure(diagnostics: SafeSandboxErrorDiagnostics): boolean;
26
+ export declare function isSandboxBackingContainerMissingMessage(message: string): boolean;
26
27
  /**
27
- * True when the sandbox API answered 404 for a specific sandbox resource — the
28
- * box behind a persisted sandbox id no longer exists.
28
+ * True when the sandbox API cannot find a sandbox resource or its backing
29
+ * container. The latter arrives as a 500 from resume with a nested host 404.
29
30
  *
30
31
  * A sandbox id is a cache of where a workspace's box lives, not the workspace's
31
32
  * identity: the platform reaps, suspends, and loses boxes as ordinary lifecycle
@@ -102,6 +102,10 @@ export interface StoppedSandboxResumeFailure {
102
102
  scope: SandboxScope;
103
103
  boxKey: string;
104
104
  }
105
+ /** Describe a sandbox that disappeared after the platform listed it. */
106
+ export interface MissingSandboxFailure extends StoppedSandboxResumeFailure {
107
+ stage: SandboxExistingBoxStage;
108
+ }
105
109
  /** Define the structure for resuming a stopped sandbox with replacement key and optional restore options */
106
110
  export interface StoppedSandboxResumeRecovery {
107
111
  replacementBoxKey: string;
@@ -218,6 +222,14 @@ export interface SandboxRuntimeConfig {
218
222
  provisionTimeoutMs?: number;
219
223
  replaceUnbringableBox?: boolean;
220
224
  recoverStoppedSandbox?: (failure: StoppedSandboxResumeFailure) => Promise<Outcome<StoppedSandboxResumeRecovery | null>>;
225
+ /**
226
+ * Replace a sandbox resource or backing container that disappears after listing.
227
+ *
228
+ * The shell calls this for a sandbox resource 404 or an exact resume 500 that
229
+ * wraps a host-agent container 404. It excludes runtime 404 and unrelated
230
+ * reuse failures. Return a fresh key without deleting the stale sandbox record.
231
+ */
232
+ recoverMissingSandbox?: (failure: MissingSandboxFailure) => Promise<Outcome<StoppedSandboxResumeRecovery | null>>;
221
233
  backendModelAtCreate?: boolean;
222
234
  deferProfileFiles?: boolean;
223
235
  promptBudget?: ComposeProfileBudget;
@@ -91,7 +91,7 @@ import {
91
91
  workspaceSandboxRecoveryMessage,
92
92
  workspaceSandboxRecoveryRecommendedActions,
93
93
  writeProfileFilesToBox
94
- } from "../chunk-RXHGOLZR.js";
94
+ } from "../chunk-HDQWY5AY.js";
95
95
  import "../chunk-TH7L265V.js";
96
96
  import "../chunk-LWSJK546.js";
97
97
  import "../chunk-P5PIAQVS.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-app",
3
- "version": "0.46.17",
3
+ "version": "0.46.19",
4
4
  "packageManager": "pnpm@11.24.0",
5
5
  "description": "Build agent applications with typed chat, tools, sandboxes, integrations, billing, and evaluation.",
6
6
  "keywords": [