@tangle-network/agent-app 0.63.18 → 0.63.20

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.
Files changed (176) hide show
  1. package/README.md +3 -3
  2. package/dist/{DesignCanvas-IQKYAEC4.js → DesignCanvas-CFNV5JGQ.js} +6 -6
  3. package/dist/DesignCanvasEditor-KH4BDUE3.js +19 -0
  4. package/dist/agent-enrollment/drizzle.js +3 -3
  5. package/dist/agent-enrollment/index.js +3 -3
  6. package/dist/agent-profiles/d1.js +2 -2
  7. package/dist/agent-profiles/index.js +2 -2
  8. package/dist/agent-profiles/switch.d.ts +1 -1
  9. package/dist/agent-profiles/switch.js +1 -1
  10. package/dist/app-auth/index.js +3 -3
  11. package/dist/app-auth/index.js.map +1 -1
  12. package/dist/chat-routes/hybrid-producer.d.ts +1 -1
  13. package/dist/chat-routes/index.js +14 -14
  14. package/dist/chat-routes/model-failover-stream.d.ts +1 -1
  15. package/dist/chat-routes/turn-prefetch.d.ts +1 -1
  16. package/dist/{chunk-Z4RD5UF7.js → chunk-2PCNHHN2.js} +2 -2
  17. package/dist/{chunk-I6BZVIRH.js → chunk-3CI35I4X.js} +1 -1
  18. package/dist/chunk-3CI35I4X.js.map +1 -0
  19. package/dist/{chunk-ISP6ZH3G.js → chunk-3Q3UEWKK.js} +1 -1
  20. package/dist/chunk-3Q3UEWKK.js.map +1 -0
  21. package/dist/{chunk-VDYEVCQQ.js → chunk-5WSSH3X5.js} +2 -2
  22. package/dist/chunk-5WSSH3X5.js.map +1 -0
  23. package/dist/{chunk-WP2GYFZ4.js → chunk-ALIWB2P3.js} +1 -1
  24. package/dist/{chunk-WP2GYFZ4.js.map → chunk-ALIWB2P3.js.map} +1 -1
  25. package/dist/{chunk-6GX3UHQW.js → chunk-B5YYKYMM.js} +10 -10
  26. package/dist/chunk-B5YYKYMM.js.map +1 -0
  27. package/dist/{chunk-BTKI4XMM.js → chunk-CPWMBYLQ.js} +2 -2
  28. package/dist/{chunk-NUWSPR5O.js → chunk-G3LZITCA.js} +2 -2
  29. package/dist/{chunk-PK65B6HP.js → chunk-H4JL74GP.js} +165 -7
  30. package/dist/chunk-H4JL74GP.js.map +1 -0
  31. package/dist/{chunk-PIPNDZ6H.js → chunk-I4CFBLSJ.js} +3 -3
  32. package/dist/{chunk-IX6UVHXY.js → chunk-JKECSYDB.js} +2 -2
  33. package/dist/{chunk-BI5AZAOO.js → chunk-JUQMVD4U.js} +2 -2
  34. package/dist/{chunk-5GSZGTPJ.js → chunk-KA6LD4OI.js} +3 -3
  35. package/dist/{chunk-KH4QSBNI.js → chunk-KADVQCAS.js} +4 -4
  36. package/dist/{chunk-MT6ZTQGD.js → chunk-N5RWYR5N.js} +1 -1
  37. package/dist/chunk-N5RWYR5N.js.map +1 -0
  38. package/dist/{chunk-7VTGB4DM.js → chunk-OSMMEMDH.js} +1 -1
  39. package/dist/chunk-OSMMEMDH.js.map +1 -0
  40. package/dist/{chunk-5FAKBTCK.js → chunk-OYFA7BAK.js} +1 -1
  41. package/dist/chunk-OYFA7BAK.js.map +1 -0
  42. package/dist/{chunk-7EDNPQHW.js → chunk-OZDMIYES.js} +1 -1
  43. package/dist/chunk-OZDMIYES.js.map +1 -0
  44. package/dist/{chunk-CPVGRQ43.js → chunk-QFIVY6WA.js} +5 -5
  45. package/dist/{chunk-ZLX4BA27.js → chunk-QUT3T2IN.js} +1 -1
  46. package/dist/chunk-QUT3T2IN.js.map +1 -0
  47. package/dist/{chunk-UGFCLD32.js → chunk-SFR7FPWL.js} +2 -2
  48. package/dist/{chunk-OODZCBSM.js → chunk-SJ73F7HD.js} +2 -2
  49. package/dist/{chunk-5UQJ7F3P.js → chunk-UULUBF5J.js} +1 -1
  50. package/dist/chunk-UULUBF5J.js.map +1 -0
  51. package/dist/{chunk-ZWJ3SZ2G.js → chunk-VCG4DQC4.js} +2 -2
  52. package/dist/{chunk-LRYY3OX7.js → chunk-VEPII3YP.js} +4 -4
  53. package/dist/chunk-VEPII3YP.js.map +1 -0
  54. package/dist/{chunk-A3BJDXPX.js → chunk-VOXKDO4T.js} +13 -7
  55. package/dist/chunk-VOXKDO4T.js.map +1 -0
  56. package/dist/{chunk-4FEH6266.js → chunk-W3KXRU5N.js} +2 -2
  57. package/dist/{chunk-AVBNS64P.js → chunk-W6G2HF6M.js} +1 -1
  58. package/dist/chunk-W6G2HF6M.js.map +1 -0
  59. package/dist/{chunk-4GINUJPF.js → chunk-WRCMVBUJ.js} +1 -1
  60. package/dist/{chunk-4GINUJPF.js.map → chunk-WRCMVBUJ.js.map} +1 -1
  61. package/dist/{chunk-UTL6TEN6.js → chunk-WTNW4NFS.js} +3 -3
  62. package/dist/{chunk-E3AOUTIR.js → chunk-XGFGSZS5.js} +2 -2
  63. package/dist/chunk-XGFGSZS5.js.map +1 -0
  64. package/dist/{chunk-EKXG4JSN.js → chunk-YRWUJKW5.js} +2 -2
  65. package/dist/chunk-YRWUJKW5.js.map +1 -0
  66. package/dist/{chunk-CQGEGPY7.js → chunk-ZNE4NYU7.js} +2 -2
  67. package/dist/design-canvas/index.js +3 -3
  68. package/dist/design-canvas-react/engine.js +5 -5
  69. package/dist/design-canvas-react/index.js +8 -8
  70. package/dist/design-canvas-react/lazy.js +1 -1
  71. package/dist/hosted-agent/application.js +2 -2
  72. package/dist/interactions/index.js +2 -2
  73. package/dist/journeys/cli.js +1 -1
  74. package/dist/journeys/index.js +1 -1
  75. package/dist/journeys/index.js.map +1 -1
  76. package/dist/journeys/score.d.ts +1 -1
  77. package/dist/journeys/scoreboard.d.ts +1 -2
  78. package/dist/journeys/send.d.ts +1 -2
  79. package/dist/launch-invariants/auth-lookup-cache.d.ts +1 -1
  80. package/dist/launch-invariants/catalog.d.ts +3 -3
  81. package/dist/launch-invariants/cli.js +3 -3
  82. package/dist/launch-invariants/index.d.ts +1 -1
  83. package/dist/launch-invariants/index.js +3 -3
  84. package/dist/launch-invariants/index.js.map +1 -1
  85. package/dist/launch-invariants/limit-alarms.d.ts +1 -1
  86. package/dist/launch-invariants/pasted-code.d.ts +1 -1
  87. package/dist/launch-invariants/schedule.d.ts +1 -1
  88. package/dist/launch-invariants/settlement.d.ts +2 -2
  89. package/dist/launch-invariants/sized-reads.d.ts +1 -1
  90. package/dist/launch-invariants/testing.js +3 -3
  91. package/dist/model-resolution/index.js +1 -1
  92. package/dist/openui/index.js +1 -1
  93. package/dist/platform/billable-turn-admission.d.ts +1 -1
  94. package/dist/platform/delegated-keys.d.ts +2 -2
  95. package/dist/platform/delegated-turn-keys.d.ts +1 -1
  96. package/dist/platform/index.js +5 -5
  97. package/dist/platform/index.js.map +1 -1
  98. package/dist/preflight/cli.js +1 -1
  99. package/dist/preflight/index.d.ts +1 -1
  100. package/dist/preflight/index.js +1 -1
  101. package/dist/preset-cloudflare/index.js +7 -6
  102. package/dist/preset-cloudflare/index.js.map +1 -1
  103. package/dist/public-consultation/index.d.ts +1 -1
  104. package/dist/public-consultation/index.js +12 -12
  105. package/dist/rollout/cli.js +1 -1
  106. package/dist/rollout/d1.js +1 -1
  107. package/dist/rollout/index.d.ts +1 -1
  108. package/dist/rollout/index.js +1 -1
  109. package/dist/runtime/index.js +3 -3
  110. package/dist/runtime/router-turn.d.ts +3 -3
  111. package/dist/runtime/router-turn.js +2 -2
  112. package/dist/runtime/turn-knowledge.d.ts +1 -1
  113. package/dist/sandbox/index.d.ts +1 -0
  114. package/dist/sandbox/index.js +7 -5
  115. package/dist/sandbox/model.d.ts +1 -1
  116. package/dist/sandbox/prewarm-claim-d1.d.ts +1 -1
  117. package/dist/sandbox/prewarm.d.ts +2 -2
  118. package/dist/sandbox/recovery-original.d.ts +25 -0
  119. package/dist/sandbox/recovery.d.ts +18 -0
  120. package/dist/sandbox/reuse-state.d.ts +1 -1
  121. package/dist/sandbox/terminal-connection.d.ts +4 -4
  122. package/dist/sandbox/warm-lease.d.ts +2 -2
  123. package/dist/sandbox/warm-receipts.d.ts +1 -1
  124. package/dist/sequences/index.js +2 -2
  125. package/dist/signoff/app-defaults.d.ts +1 -1
  126. package/dist/signoff/cli.js +2 -2
  127. package/dist/signoff/index.js +2 -2
  128. package/dist/signoff/surface-ladder.d.ts +2 -2
  129. package/dist/signoff/workspace-surface.d.ts +1 -1
  130. package/dist/stream/index.js +2 -2
  131. package/dist/stream/turn-buffer.d.ts +1 -1
  132. package/dist/turn-health/index.js +1 -1
  133. package/dist/turn-health/index.js.map +1 -1
  134. package/dist/turn-stream/adapters.d.ts +1 -1
  135. package/dist/turn-stream/core.d.ts +1 -1
  136. package/dist/turn-stream/index.js +2 -2
  137. package/dist/turn-trace/index.js +1 -1
  138. package/dist/turn-trace/otel.d.ts +1 -1
  139. package/dist/web/core.d.ts +2 -2
  140. package/dist/web/index.js +2 -2
  141. package/dist/workspace-export/index.js.map +1 -1
  142. package/package.json +2 -2
  143. package/dist/DesignCanvasEditor-O7OCZTGC.js +0 -19
  144. package/dist/chunk-5FAKBTCK.js.map +0 -1
  145. package/dist/chunk-5UQJ7F3P.js.map +0 -1
  146. package/dist/chunk-6GX3UHQW.js.map +0 -1
  147. package/dist/chunk-7EDNPQHW.js.map +0 -1
  148. package/dist/chunk-7VTGB4DM.js.map +0 -1
  149. package/dist/chunk-A3BJDXPX.js.map +0 -1
  150. package/dist/chunk-AVBNS64P.js.map +0 -1
  151. package/dist/chunk-E3AOUTIR.js.map +0 -1
  152. package/dist/chunk-EKXG4JSN.js.map +0 -1
  153. package/dist/chunk-I6BZVIRH.js.map +0 -1
  154. package/dist/chunk-ISP6ZH3G.js.map +0 -1
  155. package/dist/chunk-LRYY3OX7.js.map +0 -1
  156. package/dist/chunk-MT6ZTQGD.js.map +0 -1
  157. package/dist/chunk-PK65B6HP.js.map +0 -1
  158. package/dist/chunk-VDYEVCQQ.js.map +0 -1
  159. package/dist/chunk-ZLX4BA27.js.map +0 -1
  160. /package/dist/{DesignCanvas-IQKYAEC4.js.map → DesignCanvas-CFNV5JGQ.js.map} +0 -0
  161. /package/dist/{DesignCanvasEditor-O7OCZTGC.js.map → DesignCanvasEditor-KH4BDUE3.js.map} +0 -0
  162. /package/dist/{chunk-Z4RD5UF7.js.map → chunk-2PCNHHN2.js.map} +0 -0
  163. /package/dist/{chunk-BTKI4XMM.js.map → chunk-CPWMBYLQ.js.map} +0 -0
  164. /package/dist/{chunk-NUWSPR5O.js.map → chunk-G3LZITCA.js.map} +0 -0
  165. /package/dist/{chunk-PIPNDZ6H.js.map → chunk-I4CFBLSJ.js.map} +0 -0
  166. /package/dist/{chunk-IX6UVHXY.js.map → chunk-JKECSYDB.js.map} +0 -0
  167. /package/dist/{chunk-BI5AZAOO.js.map → chunk-JUQMVD4U.js.map} +0 -0
  168. /package/dist/{chunk-5GSZGTPJ.js.map → chunk-KA6LD4OI.js.map} +0 -0
  169. /package/dist/{chunk-KH4QSBNI.js.map → chunk-KADVQCAS.js.map} +0 -0
  170. /package/dist/{chunk-CPVGRQ43.js.map → chunk-QFIVY6WA.js.map} +0 -0
  171. /package/dist/{chunk-UGFCLD32.js.map → chunk-SFR7FPWL.js.map} +0 -0
  172. /package/dist/{chunk-OODZCBSM.js.map → chunk-SJ73F7HD.js.map} +0 -0
  173. /package/dist/{chunk-ZWJ3SZ2G.js.map → chunk-VCG4DQC4.js.map} +0 -0
  174. /package/dist/{chunk-4FEH6266.js.map → chunk-W3KXRU5N.js.map} +0 -0
  175. /package/dist/{chunk-UTL6TEN6.js.map → chunk-WTNW4NFS.js.map} +0 -0
  176. /package/dist/{chunk-CQGEGPY7.js.map → chunk-ZNE4NYU7.js.map} +0 -0
@@ -2,7 +2,7 @@ import {
2
2
  ProtectedModelSettlementError,
3
3
  createRouterProtectedModelPort,
4
4
  runProtectedRouterTurn
5
- } from "../chunk-NUWSPR5O.js";
5
+ } from "../chunk-G3LZITCA.js";
6
6
  import {
7
7
  DURABLE_HOP_BUDGET_MS,
8
8
  asksForLanguage,
@@ -26,7 +26,7 @@ import {
26
26
  turnKnowledgeInstructions,
27
27
  workspaceKnowledgeForTurn,
28
28
  workspaceTurnCheckpoints
29
- } from "../chunk-EKXG4JSN.js";
29
+ } from "../chunk-YRWUJKW5.js";
30
30
  import {
31
31
  DEFAULT_TANGLE_BILLING_ENFORCEMENT_ENV_VAR,
32
32
  DEFAULT_TANGLE_ROUTER_BASE_URL,
@@ -42,7 +42,7 @@ import {
42
42
  tangleExecutionKeyHttpError,
43
43
  trimOrNull
44
44
  } from "../chunk-D6UJEOZQ.js";
45
- import "../chunk-AVBNS64P.js";
45
+ import "../chunk-W6G2HF6M.js";
46
46
  import {
47
47
  MAX_RECOMMENDED_MODELS,
48
48
  __resetCatalogCache,
@@ -222,7 +222,7 @@ export interface RouterTurnOptions {
222
222
  continueFrom?: RouterTurnContinuation;
223
223
  /** Runaway watchdog on model turns. Default: the tool loop's own watchdog, far above any legitimate turn, so
224
224
  * `budgetMs` bounds the turn. A fixed 12 failed Legal's formation turns, which need 12 tools in 13 model calls
225
- * (2026-10-20, turn_backstop on 2 of 6). */
225
+ * (turn_backstop on 2 of 6). */
226
226
  maxToolTurns?: number;
227
227
  maxTokens?: number;
228
228
  /** Sent as `x-tangle-trace-id` so the router's generation joins the app's trace. Characters the Router
@@ -348,8 +348,8 @@ export declare function perTurnPrefixBytes(prefix: string, perTurn?: readonly st
348
348
  * actually calls.
349
349
  *
350
350
  * A provider serves a repeated prompt prefix from its cache: through the Router, Gemini served 38,685 of
351
- * 40,734 prompt tokens from cache on each repeat of a stable 150 kB prefix, and none when a timestamp came first
352
- * (2026-10-22). One per-turn byte early in the prompt therefore costs the whole prompt on every turn, so nothing
351
+ * 40,734 prompt tokens from cache on each repeat of a stable 150 kB prefix, and none when a timestamp came first.
352
+ * One per-turn byte early in the prompt therefore costs the whole prompt on every turn, so nothing
353
353
  * per-turn belongs in `stable` or the profile's prompt; under a test runner a clock or a repeated `context` section in
354
354
  * the prefix throws (`checkStablePrefix`).
355
355
  */
@@ -13,9 +13,9 @@ import {
13
13
  turnKnowledgeInstructions,
14
14
  workspaceKnowledgeForTurn,
15
15
  workspaceTurnCheckpoints
16
- } from "../chunk-EKXG4JSN.js";
16
+ } from "../chunk-YRWUJKW5.js";
17
17
  import "../chunk-D6UJEOZQ.js";
18
- import "../chunk-AVBNS64P.js";
18
+ import "../chunk-W6G2HF6M.js";
19
19
  import "../chunk-AMUXRAUO.js";
20
20
  export {
21
21
  DURABLE_HOP_BUDGET_MS,
@@ -2,7 +2,7 @@
2
2
  * Knowledge in every turn: the index of an app's knowledge files, the full
3
3
  * text of the small ones, and the rule that keeps answers on them.
4
4
  *
5
- * Measured on Hospitality production (2026-10-11): a Router turn that had to
5
+ * Measured on Hospitality production: a Router turn that had to
6
6
  * discover files through list/read tools answered 17/17 correctly but needed
7
7
  * 3 tool calls (first words 12-17 s), and a turn that skipped the tools
8
8
  * answered from model defaults ("checkout 11:00" when the file said 12 pm).
@@ -8,6 +8,7 @@ export { resolveModel, resolveModelSelection, backendModelFields, requireTranspo
8
8
  export type { ProviderResolutionConfig, ResolvedModel, ModelSelection, ModelSelectionFailure, ModelSelectionError, ModelSelectionSource, } from './model';
9
9
  export type { StorageConfig } from '@tangle-network/sandbox';
10
10
  export * from './recovery';
11
+ export type { WorkspaceSandboxOriginalRecoveryOptions, WorkspaceSandboxOriginalRecoveryResult } from './recovery-original';
11
12
  export { serializeSandboxProvisioningError, formatSandboxProvisioningSupportDetails, formatSandboxProvisioningUserMessage, isSandboxAuthFailure, isSandboxApiBearerAuthFailure, isSandboxApiSandboxMissingFailure, isSandboxApiTransientFailure, SANDBOX_BACKING_CONTAINER_MISSING_CODE, isSandboxHostCapacityFailure, type SafeSandboxErrorCause, type SafeSandboxErrorDiagnostics, } from './diagnostics';
12
13
  export * from './workspace-sandbox-manager';
13
14
  export * from './terminal-connection';
@@ -102,7 +102,7 @@ import {
102
102
  warmKey,
103
103
  warmReceiptId,
104
104
  warmWeekdayOf
105
- } from "../chunk-A3BJDXPX.js";
105
+ } from "../chunk-VOXKDO4T.js";
106
106
  import {
107
107
  createWarmCache
108
108
  } from "../chunk-F4TUZYMX.js";
@@ -146,9 +146,10 @@ import {
146
146
  workspaceSandboxRecoveryFromError,
147
147
  workspaceSandboxRecoveryMessage,
148
148
  workspaceSandboxRecoveryRecommendedActions
149
- } from "../chunk-PK65B6HP.js";
150
- import "../chunk-MT6ZTQGD.js";
151
- import "../chunk-ISP6ZH3G.js";
149
+ } from "../chunk-H4JL74GP.js";
150
+ import "../chunk-ALIWB2P3.js";
151
+ import "../chunk-N5RWYR5N.js";
152
+ import "../chunk-3Q3UEWKK.js";
152
153
  import "../chunk-DSMGS4IV.js";
153
154
  import "../chunk-ACB7KOQ6.js";
154
155
  import "../chunk-6A7MYOUI.js";
@@ -159,7 +160,7 @@ import "../chunk-FCYHDENJ.js";
159
160
  import "../chunk-UGWQLQDS.js";
160
161
  import "../chunk-HRBF4B5L.js";
161
162
  import "../chunk-D6UJEOZQ.js";
162
- import "../chunk-AVBNS64P.js";
163
+ import "../chunk-W6G2HF6M.js";
163
164
  import {
164
165
  readSandboxBinaryBytes,
165
166
  shellQuote,
@@ -169,6 +170,7 @@ import {
169
170
  } from "../chunk-CTREXL3O.js";
170
171
  import "../chunk-ELX5YITO.js";
171
172
  import "../chunk-HY57QRRW.js";
173
+ import "../chunk-TXD5HXLE.js";
172
174
  export {
173
175
  DEFAULT_ESCALATION_TOOLS,
174
176
  DEFAULT_FOREGROUND_PROVISION_CLAIM_TTL_SECONDS,
@@ -20,7 +20,7 @@ export interface ProviderResolutionConfig {
20
20
  * and the platform's strict backend schema refuses the extra keys:
21
21
  * agent-app 0.53.10–0.54.0 emitted both, and every sandbox chat turn on a
22
22
  * product resolving sandbox < 0.60.16 failed with "unrecognized_keys
23
- * provider, apiKey, baseUrl, modelId at path backend" (Creative, 2026-10-06).
23
+ * provider, apiKey, baseUrl, modelId at path backend" (Creative).
24
24
  */
25
25
  export declare function backendModelFields(model: ResolvedModel): {
26
26
  model: {
@@ -12,7 +12,7 @@ import type { FencedPrewarmClaimStore } from './prewarm';
12
12
  * store is the same code in all of them: it is mechanism, not domain, and it
13
13
  * belongs beside the prewarmer.
14
14
  *
15
- * The measured stake (staging-sandbox, 2026-07-28): two concurrent
15
+ * The measured stake (staging-sandbox): two concurrent
16
16
  * `POST /v1/sandboxes` with an identical name BOTH returned HTTP 201 and left
17
17
  * two running boxes. The platform does not dedupe by name, so nothing below
18
18
  * this line is defensive programming — an unclaimed race genuinely doubles
@@ -16,7 +16,7 @@
16
16
  * is split out).
17
17
  *
18
18
  * WHAT IT IS NOT. It does not make cold starts fast — they already are.
19
- * Measured on the real platform (staging-sandbox, n=5, 2026-07-28): a box goes
19
+ * Measured on the real platform (staging-sandbox, n=5): a box goes
20
20
  * from nothing to terminal-ready in 2.34–3.19 s (median 2.73 s), and an
21
21
  * already-running box answers in 1.16–2.29 s (median 1.35 s). Prewarming buys
22
22
  * ~1.4 s. The reason it matters is not latency: it is that a product which
@@ -52,7 +52,7 @@
52
52
  * ── SINGLE-FLIGHT (measured, not assumed) ──────────────────────────────────
53
53
  * The sandbox platform does NOT dedupe by box name. Two concurrent
54
54
  * `POST /v1/sandboxes` with an identical name both returned HTTP 201 and left
55
- * two running boxes (verified against staging-sandbox, 2026-07-28). So two
55
+ * two running boxes (verified against staging-sandbox). So two
56
56
  * tabs, or two isolates, racing a warm genuinely leak a box — a prewarm that
57
57
  * races is worse than no prewarm. Hence two layers:
58
58
  * 1. an in-process map, which is free and catches same-isolate races
@@ -0,0 +1,25 @@
1
+ import type { Sandbox } from '@tangle-network/sandbox';
2
+ import { type WorkspaceSandboxRecoveryState, type WorkspaceSandboxRecoveryStore, type WorkspaceSandboxSnapshot } from './recovery';
3
+ export interface WorkspaceSandboxOriginalRecoveryOptions {
4
+ workspaceId: string;
5
+ /** The application's authenticated SDK client, with a finite request timeout
6
+ * and the caller's cancellation signal. No admin credentials or lifecycle calls. */
7
+ client: Pick<Sandbox, 'fetch'>;
8
+ /** Server-owned namespace policy. Accept historical generations for this
9
+ * workspace, never a key supplied by a browser or a freshly computed epoch. */
10
+ ownsOriginalBoxKey: (identity: {
11
+ workspaceId: string;
12
+ sandboxId: string;
13
+ boxKey: string;
14
+ }) => boolean;
15
+ now?: number;
16
+ }
17
+ export type WorkspaceSandboxOriginalRecoveryResult<Snapshot extends WorkspaceSandboxSnapshot = WorkspaceSandboxSnapshot> = {
18
+ status: 'unchanged' | 'recovered' | 'unverified' | 'conflict';
19
+ recovery: WorkspaceSandboxRecoveryState<Snapshot> | undefined;
20
+ /** Fixed diagnostic category; never runtime errors, credentials or raw API bodies. */
21
+ reason?: string;
22
+ };
23
+ /** Called only through the recovery manager. No create/resume/ensure/delete,
24
+ * no physical-absence inference and no cancellation of remote operations. */
25
+ export declare function reconcileWorkspaceSandboxOriginal<Snapshot extends WorkspaceSandboxSnapshot>(store: WorkspaceSandboxRecoveryStore<Snapshot>, options: WorkspaceSandboxOriginalRecoveryOptions): Promise<WorkspaceSandboxOriginalRecoveryResult<Snapshot>>;
@@ -1,3 +1,4 @@
1
+ import { type WorkspaceSandboxOriginalRecoveryOptions, type WorkspaceSandboxOriginalRecoveryResult } from './recovery-original';
1
2
  /**
2
3
  * What an app does after the platform hands back a sandbox it cannot use.
3
4
  *
@@ -71,6 +72,9 @@ export type WorkspaceSandboxRecoveryCode = keyof typeof CODES;
71
72
  * declined to lose.
72
73
  */
73
74
  declare const ACTIONS: {
75
+ readonly original_recovered: {
76
+ readonly replacementChosen: false;
77
+ };
74
78
  readonly confirmation_required: {
75
79
  readonly replacementChosen: false;
76
80
  readonly canDecide: true;
@@ -141,6 +145,15 @@ export interface WorkspaceSandboxRecoveryState<Snapshot extends WorkspaceSandbox
141
145
  replacementBoxKey?: string;
142
146
  replacementSandboxId?: string;
143
147
  confirmedAt?: string;
148
+ /** Verified historical key of the original; never the current generation key. */
149
+ originalBoxKey?: string;
150
+ originalRecovered?: {
151
+ snapshotId: string;
152
+ snapshotCreatedAt: string;
153
+ suspendedAt: string;
154
+ filesystemIncarnationId?: string;
155
+ verifiedAt: string;
156
+ };
144
157
  }
145
158
  export type WorkspaceSandboxRecoveryDecision = 'replace' | 'decline';
146
159
  /** Raised when chat cannot continue until an owner decides about the box. */
@@ -188,12 +201,17 @@ export declare function shouldRestoreWorkspaceSandboxRecovery(recovery: Workspac
188
201
  export interface WorkspaceSandboxRecoveryStore<Snapshot extends WorkspaceSandboxSnapshot = WorkspaceSandboxSnapshot> {
189
202
  read: (workspaceId: string) => Promise<WorkspaceSandboxRecoveryState<Snapshot> | undefined>;
190
203
  write: (workspaceId: string, recovery: WorkspaceSandboxRecoveryState<Snapshot>) => Promise<void>;
204
+ /** Atomic first record. Required with compareAndSet for original reconciliation.
205
+ * Return false if any recovery already exists; never overwrite it. */
206
+ insertIfAbsent?: (workspaceId: string, recovery: WorkspaceSandboxRecoveryState<Snapshot>) => Promise<boolean>;
191
207
  /** Commit a transition only while the exact recovery read above remains current. */
192
208
  compareAndSet?: (workspaceId: string, expected: WorkspaceSandboxRecoveryState<Snapshot>, recovery: WorkspaceSandboxRecoveryState<Snapshot>) => Promise<boolean>;
193
209
  }
194
210
  export interface WorkspaceSandboxRecoveryManager<Snapshot extends WorkspaceSandboxSnapshot = WorkspaceSandboxSnapshot> {
195
211
  read: WorkspaceSandboxRecoveryStore<Snapshot>['read'];
196
212
  record: WorkspaceSandboxRecoveryStore<Snapshot>['write'];
213
+ /** Reconcile before choosing a box key; unverified/conflict must not provision. */
214
+ reconcileOriginal: (args: WorkspaceSandboxOriginalRecoveryOptions) => Promise<WorkspaceSandboxOriginalRecoveryResult<Snapshot>>;
197
215
  /** Only a pending/declined recovery for this sandbox accepts a new decision.
198
216
  * Replacement requires a fresh, nonblank key; decline needs no key. */
199
217
  decide: (args: {
@@ -3,7 +3,7 @@
3
3
  * trust (see `ReuseChecks` in `./index`).
4
4
  *
5
5
  * A Worker request is not promised the isolate that served the last one. Legal's
6
- * sandbox lane, 8 consecutive turns on 2026-10-20, found no check from the turn
6
+ * sandbox lane, 8 consecutive turns, found no check from the turn
7
7
  * before in any of them, so a trust held only in isolate memory never opened. The
8
8
  * state is small and best effort, so it rides the Workers Cache API (one read at
9
9
  * the start of a reuse, a write only when a check changed); a miss costs the full
@@ -10,7 +10,7 @@
10
10
  * migrated, leaving this as the package's only terminal transport.
11
11
  *
12
12
  * VERIFIED PLATFORM CONTRACT (`@tangle-network/sandbox` 0.15.2 + the
13
- * orchestrator/sidecar enforcement source, verified 2026-07-30):
13
+ * orchestrator/sidecar enforcement source):
14
14
  *
15
15
  * 1. Only a `scope: 'session-runtime'` token carries the `terminal`
16
16
  * capability (`cap: ["read", "workspace", "terminal"]`). `'project'` and
@@ -40,9 +40,9 @@
40
40
  * HISTORICAL NOTE: an earlier shape of this route (and legal-agent's
41
41
  * production route it was modeled on, `scope: 'project'` +
42
42
  * `connection.runtimeUrl`) predates the platform's terminal-auth hardening —
43
- * the terminal capability gate (2026-06-19), the scoped-token terminal WS
44
- * path (2026-07-15), and the `sid`-binding fail-closed check
45
- * (2026-07-17/18). That shape does not authenticate on the current platform
43
+ * the terminal capability gate, the scoped-token terminal WS
44
+ * path, and the `sid`-binding fail-closed check.
45
+ * That shape does not authenticate on the current platform
46
46
  * and is not a valid spec for the token path anymore.
47
47
  *
48
48
  * SECURITY POSTURE: unlike the read-only session-gateway streaming token
@@ -5,9 +5,9 @@
5
5
  * focus, an inbound line message and a learned weekly pattern share one
6
6
  * dedupe, one budget and one event stream.
7
7
  *
8
- * WHY A LEASE. Drew cancelled always-on keep-warm (2026-10-11): a warm box must
8
+ * WHY A LEASE. Always-on keep-warm is off: a warm box must
9
9
  * be earned by a signal and must cost a bounded amount when the signal was
10
- * wrong. Measured on Hospitality (2026-10-04..10-11, timestamps only): every
10
+ * wrong. Measured on Hospitality (timestamps only): every
11
11
  * human first message after 30 min of quiet landed on a suspended box, and the
12
12
  * cold first reply took 68 s on the web and 76 s on a line.
13
13
  *
@@ -11,7 +11,7 @@
11
11
  *
12
12
  * The receipt store is shared across isolates (D1), because Workers spread one
13
13
  * member's requests over many isolates: an in-isolate cache missed on 2 of 3
14
- * warm turns in Creative staging (2026-10-21, connected-tool catalog 928-2,742
14
+ * warm turns in Creative staging (connected-tool catalog 928-2,742
15
15
  * ms). The route still keeps an in-isolate copy, so a repeat in the same
16
16
  * isolate costs no read at all.
17
17
  *
@@ -19,11 +19,11 @@ import {
19
19
  requireEnum,
20
20
  requireMcpString
21
21
  } from "../chunk-PEJ5OP5B.js";
22
- import "../chunk-CQGEGPY7.js";
22
+ import "../chunk-ZNE4NYU7.js";
23
23
  import "../chunk-RN4WPTBH.js";
24
24
  import {
25
25
  assertMediaUrl
26
- } from "../chunk-WP2GYFZ4.js";
26
+ } from "../chunk-ALIWB2P3.js";
27
27
  import {
28
28
  MCP_PROTOCOL_VERSIONS,
29
29
  buildScopedMcpServerEntry,
@@ -6,7 +6,7 @@
6
6
  * It is a report: it fails only on an explicit opt-out that gives no reason, so a gap stays visible without
7
7
  * blocking a merge, and an exemption is a line in the app's `signoff.config.mjs` with the reason beside it.
8
8
  *
9
- * The rows are the outcomes Drew named on 2026-10-19: the turn trace on every turn with first-visible and answer-text timing (a turn handed
9
+ * The rows are the required outcomes: the turn trace on every turn with first-visible and answer-text timing (a turn handed
10
10
  * to a completion owner included), the shared
11
11
  * prewarm route, Worker placement beside the D1 primary, limit alarms wired in the server entry, and the Worker
12
12
  * upload size against Cloudflare's limit. A row is read from the source, the Wrangler config and the lockfile; it
@@ -10,8 +10,8 @@ import {
10
10
  runSignoff,
11
11
  runSurfaceLadderCli,
12
12
  runWorkspaceSurfaceCli
13
- } from "../chunk-E3AOUTIR.js";
14
- import "../chunk-LRYY3OX7.js";
13
+ } from "../chunk-XGFGSZS5.js";
14
+ import "../chunk-VEPII3YP.js";
15
15
  import {
16
16
  invokedAsScript
17
17
  } from "../chunk-C3CAYGGQ.js";
@@ -42,8 +42,8 @@ import {
42
42
  runWorkspaceSurfaceCli,
43
43
  summarizeSurfacePage,
44
44
  surfaceDeltaL
45
- } from "../chunk-E3AOUTIR.js";
46
- import "../chunk-LRYY3OX7.js";
45
+ } from "../chunk-XGFGSZS5.js";
46
+ import "../chunk-VEPII3YP.js";
47
47
  export {
48
48
  HEADER_TOP_TOLERANCE_PX,
49
49
  NETWORK_OVER_BUDGET_EXIT,
@@ -4,8 +4,8 @@
4
4
  * copy must stay one short line.
5
5
  *
6
6
  * Hospitality shipped cards painted the color of their parent, a search field
7
- * the color of the page, and cards carrying 20–40 words of body copy. Drew
8
- * rated it 0/10 for exactly that. This check measures the rendered page, so it
7
+ * the color of the page, and cards carrying 20–40 words of body copy, and
8
+ * rated 0/10 for exactly that. This check measures the rendered page, so it
9
9
  * catches the flat step whatever token, class or override produced it.
10
10
  *
11
11
  * Rules (OKLCH lightness ×100, the same unit the brand ladder is specified in):
@@ -3,7 +3,7 @@
3
3
  * floating panel (sandbox-ui `WorkspaceSurface`, or `WorkspaceLayout` with
4
4
  * `surface="inset"`), and that panel's first row is an inset `ShellHeader`.
5
5
  *
6
- * Drew's review of Creative asked for "ONE skeleton": the chat's rounded panel
6
+ * Every workspace page uses one skeleton: the chat's rounded panel
7
7
  * as the layout of Studio, Assets, Tasks, Activity, Vault, the terminal and
8
8
  * Integrations. A page with its own skeleton has no `[data-workspace-surface]`,
9
9
  * or a header that is not the shell row, and this check names it. It measures
@@ -5,7 +5,7 @@ import {
5
5
  observeTurnEvent,
6
6
  parseTurnObservation,
7
7
  settleOrphanedTurns
8
- } from "../chunk-Z4RD5UF7.js";
8
+ } from "../chunk-2PCNHHN2.js";
9
9
  import {
10
10
  buildUserTextParts,
11
11
  messageHasTurnId,
@@ -51,7 +51,7 @@ import {
51
51
  pumpBufferedTurn,
52
52
  replayTurnEvents,
53
53
  stampReplaySeq
54
- } from "../chunk-ISP6ZH3G.js";
54
+ } from "../chunk-3Q3UEWKK.js";
55
55
  import "../chunk-WL7PZK7Q.js";
56
56
  export {
57
57
  DEFAULT_RUNNING_TURN_LEASE_MS,
@@ -99,7 +99,7 @@ export declare function isLiveProgressEvent(ev: unknown): boolean;
99
99
  * live-state events a harness interleaves with them, and keep only the latest
100
100
  * of each live-state event. A reasoning model streams three events per token
101
101
  * (its raw part update, a model-processing heartbeat and the delta); merging
102
- * only adjacent deltas wrote all three as rows (2026-10-10: 1.63 M rows in a
102
+ * only adjacent deltas wrote all three as rows (1.63 M rows in a
103
103
  * day, 59,659 in one turn). Any other event is a boundary nothing merges
104
104
  * across. Concatenation-preserving: replaying the coalesced stream produces
105
105
  * the same accumulated text, and the latest state of every part.
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  SIZED_READ_BYTES,
3
3
  sizedBatches
4
- } from "../chunk-5UQJ7F3P.js";
4
+ } from "../chunk-UULUBF5J.js";
5
5
  import {
6
6
  classifyTurnOutcome,
7
7
  createConsoleAlertSink,