pulseed 0.6.3 → 0.6.5

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 (615) hide show
  1. package/dist/adapters/datasources/artifact-metric-datasource.d.ts +11 -1
  2. package/dist/adapters/datasources/artifact-metric-datasource.d.ts.map +1 -1
  3. package/dist/adapters/datasources/artifact-metric-datasource.js +256 -9
  4. package/dist/adapters/datasources/artifact-metric-datasource.js.map +1 -1
  5. package/dist/base/config/global-config.d.ts +7 -4
  6. package/dist/base/config/global-config.d.ts.map +1 -1
  7. package/dist/base/config/global-config.js +3 -1
  8. package/dist/base/config/global-config.js.map +1 -1
  9. package/dist/base/protocol/exact-protocol.d.ts +47 -0
  10. package/dist/base/protocol/exact-protocol.d.ts.map +1 -0
  11. package/dist/base/protocol/exact-protocol.js +175 -0
  12. package/dist/base/protocol/exact-protocol.js.map +1 -0
  13. package/dist/base/types/core.d.ts +1 -1
  14. package/dist/base/types/core.d.ts.map +1 -1
  15. package/dist/base/types/core.js +1 -0
  16. package/dist/base/types/core.js.map +1 -1
  17. package/dist/base/utils/paths.d.ts +5 -0
  18. package/dist/base/utils/paths.d.ts.map +1 -1
  19. package/dist/base/utils/paths.js +7 -0
  20. package/dist/base/utils/paths.js.map +1 -1
  21. package/dist/base/utils/workspace-path.d.ts +6 -0
  22. package/dist/base/utils/workspace-path.d.ts.map +1 -0
  23. package/dist/base/utils/workspace-path.js +24 -0
  24. package/dist/base/utils/workspace-path.js.map +1 -0
  25. package/dist/base/utils/workspace-root.d.ts +6 -0
  26. package/dist/base/utils/workspace-root.d.ts.map +1 -0
  27. package/dist/base/utils/workspace-root.js +87 -0
  28. package/dist/base/utils/workspace-root.js.map +1 -0
  29. package/dist/index.d.ts +4 -0
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +2 -0
  32. package/dist/index.js.map +1 -1
  33. package/dist/interface/chat/chat-event-state.d.ts +2 -0
  34. package/dist/interface/chat/chat-event-state.d.ts.map +1 -1
  35. package/dist/interface/chat/chat-event-state.js +22 -41
  36. package/dist/interface/chat/chat-event-state.js.map +1 -1
  37. package/dist/interface/chat/chat-events.d.ts +15 -1
  38. package/dist/interface/chat/chat-events.d.ts.map +1 -1
  39. package/dist/interface/chat/chat-history.d.ts +3816 -192
  40. package/dist/interface/chat/chat-history.d.ts.map +1 -1
  41. package/dist/interface/chat/chat-history.js +529 -5
  42. package/dist/interface/chat/chat-history.js.map +1 -1
  43. package/dist/interface/chat/chat-runner-commands.d.ts +2 -0
  44. package/dist/interface/chat/chat-runner-commands.d.ts.map +1 -1
  45. package/dist/interface/chat/chat-runner-commands.js +83 -22
  46. package/dist/interface/chat/chat-runner-commands.js.map +1 -1
  47. package/dist/interface/chat/chat-runner-contracts.d.ts +5 -1
  48. package/dist/interface/chat/chat-runner-contracts.d.ts.map +1 -1
  49. package/dist/interface/chat/chat-runner-event-bridge.d.ts +13 -1
  50. package/dist/interface/chat/chat-runner-event-bridge.d.ts.map +1 -1
  51. package/dist/interface/chat/chat-runner-event-bridge.js +51 -3
  52. package/dist/interface/chat/chat-runner-event-bridge.js.map +1 -1
  53. package/dist/interface/chat/chat-runner-routes.d.ts +5 -17
  54. package/dist/interface/chat/chat-runner-routes.d.ts.map +1 -1
  55. package/dist/interface/chat/chat-runner-routes.js +80 -51
  56. package/dist/interface/chat/chat-runner-routes.js.map +1 -1
  57. package/dist/interface/chat/chat-runner-runtime.d.ts.map +1 -1
  58. package/dist/interface/chat/chat-runner-runtime.js +4 -0
  59. package/dist/interface/chat/chat-runner-runtime.js.map +1 -1
  60. package/dist/interface/chat/chat-runner.d.ts +7 -1
  61. package/dist/interface/chat/chat-runner.d.ts.map +1 -1
  62. package/dist/interface/chat/chat-runner.js +135 -49
  63. package/dist/interface/chat/chat-runner.js.map +1 -1
  64. package/dist/interface/chat/chat-session-store.d.ts +3 -0
  65. package/dist/interface/chat/chat-session-store.d.ts.map +1 -1
  66. package/dist/interface/chat/chat-session-store.js +12 -0
  67. package/dist/interface/chat/chat-session-store.js.map +1 -1
  68. package/dist/interface/chat/cross-platform-session.d.ts +15 -0
  69. package/dist/interface/chat/cross-platform-session.d.ts.map +1 -1
  70. package/dist/interface/chat/cross-platform-session.js +260 -42
  71. package/dist/interface/chat/cross-platform-session.js.map +1 -1
  72. package/dist/interface/chat/failure-recovery.d.ts.map +1 -1
  73. package/dist/interface/chat/failure-recovery.js +15 -1
  74. package/dist/interface/chat/failure-recovery.js.map +1 -1
  75. package/dist/interface/chat/freeform-route-classifier.d.ts +4 -4
  76. package/dist/interface/chat/ingress-router.d.ts +3 -0
  77. package/dist/interface/chat/ingress-router.d.ts.map +1 -1
  78. package/dist/interface/chat/ingress-router.js +3 -0
  79. package/dist/interface/chat/ingress-router.js.map +1 -1
  80. package/dist/interface/chat/model-request-builder.d.ts +37 -0
  81. package/dist/interface/chat/model-request-builder.d.ts.map +1 -0
  82. package/dist/interface/chat/model-request-builder.js +76 -0
  83. package/dist/interface/chat/model-request-builder.js.map +1 -0
  84. package/dist/interface/chat/turn-context.d.ts +200 -0
  85. package/dist/interface/chat/turn-context.d.ts.map +1 -0
  86. package/dist/interface/chat/turn-context.js +249 -0
  87. package/dist/interface/chat/turn-context.js.map +1 -0
  88. package/dist/interface/chat/turn-protocol.d.ts +35 -0
  89. package/dist/interface/chat/turn-protocol.d.ts.map +1 -0
  90. package/dist/interface/chat/turn-protocol.js +27 -0
  91. package/dist/interface/chat/turn-protocol.js.map +1 -0
  92. package/dist/interface/chat/user-input.d.ts +55 -0
  93. package/dist/interface/chat/user-input.d.ts.map +1 -0
  94. package/dist/interface/chat/user-input.js +52 -0
  95. package/dist/interface/chat/user-input.js.map +1 -0
  96. package/dist/interface/cli/cli-command-registry.d.ts +1 -1
  97. package/dist/interface/cli/cli-command-registry.d.ts.map +1 -1
  98. package/dist/interface/cli/cli-command-registry.js +12 -16
  99. package/dist/interface/cli/cli-command-registry.js.map +1 -1
  100. package/dist/interface/cli/cli-runner.js +0 -0
  101. package/dist/interface/cli/commands/daemon-shared.d.ts +12 -1
  102. package/dist/interface/cli/commands/daemon-shared.d.ts.map +1 -1
  103. package/dist/interface/cli/commands/daemon-shared.js +26 -4
  104. package/dist/interface/cli/commands/daemon-shared.js.map +1 -1
  105. package/dist/interface/cli/commands/daemon.d.ts.map +1 -1
  106. package/dist/interface/cli/commands/daemon.js +66 -8
  107. package/dist/interface/cli/commands/daemon.js.map +1 -1
  108. package/dist/interface/cli/commands/doctor.d.ts +1 -1
  109. package/dist/interface/cli/commands/doctor.d.ts.map +1 -1
  110. package/dist/interface/cli/commands/doctor.js +61 -29
  111. package/dist/interface/cli/commands/doctor.js.map +1 -1
  112. package/dist/interface/cli/commands/goal-dispatch.d.ts.map +1 -1
  113. package/dist/interface/cli/commands/goal-dispatch.js +10 -6
  114. package/dist/interface/cli/commands/goal-dispatch.js.map +1 -1
  115. package/dist/interface/cli/commands/goal-utils.d.ts.map +1 -1
  116. package/dist/interface/cli/commands/goal-utils.js +3 -5
  117. package/dist/interface/cli/commands/goal-utils.js.map +1 -1
  118. package/dist/interface/cli/commands/run.d.ts.map +1 -1
  119. package/dist/interface/cli/commands/run.js +50 -0
  120. package/dist/interface/cli/commands/run.js.map +1 -1
  121. package/dist/interface/cli/setup.d.ts +1 -1
  122. package/dist/interface/cli/setup.d.ts.map +1 -1
  123. package/dist/interface/cli/setup.js +4 -3
  124. package/dist/interface/cli/setup.js.map +1 -1
  125. package/dist/interface/cli/utils/loop-runner.d.ts +1 -0
  126. package/dist/interface/cli/utils/loop-runner.d.ts.map +1 -1
  127. package/dist/interface/cli/utils/loop-runner.js +12 -3
  128. package/dist/interface/cli/utils/loop-runner.js.map +1 -1
  129. package/dist/interface/tui/app.d.ts +6 -1
  130. package/dist/interface/tui/app.d.ts.map +1 -1
  131. package/dist/interface/tui/app.js +29 -12
  132. package/dist/interface/tui/app.js.map +1 -1
  133. package/dist/interface/tui/bash-mode.d.ts.map +1 -1
  134. package/dist/interface/tui/bash-mode.js +2 -9
  135. package/dist/interface/tui/bash-mode.js.map +1 -1
  136. package/dist/interface/tui/chat/viewport.d.ts.map +1 -1
  137. package/dist/interface/tui/chat/viewport.js +57 -11
  138. package/dist/interface/tui/chat/viewport.js.map +1 -1
  139. package/dist/interface/tui/entry-deps.d.ts +6 -1
  140. package/dist/interface/tui/entry-deps.d.ts.map +1 -1
  141. package/dist/interface/tui/entry-deps.js +3 -0
  142. package/dist/interface/tui/entry-deps.js.map +1 -1
  143. package/dist/interface/tui/entry.d.ts.map +1 -1
  144. package/dist/interface/tui/entry.js +6 -2
  145. package/dist/interface/tui/entry.js.map +1 -1
  146. package/dist/interface/tui/input-action.d.ts.map +1 -1
  147. package/dist/interface/tui/input-action.js +3 -2
  148. package/dist/interface/tui/input-action.js.map +1 -1
  149. package/dist/interface/tui/intent-recognizer.d.ts.map +1 -1
  150. package/dist/interface/tui/intent-recognizer.js +21 -33
  151. package/dist/interface/tui/intent-recognizer.js.map +1 -1
  152. package/dist/orchestrator/execution/adapter-layer.d.ts +10 -1
  153. package/dist/orchestrator/execution/adapter-layer.d.ts.map +1 -1
  154. package/dist/orchestrator/execution/adapter-layer.js.map +1 -1
  155. package/dist/orchestrator/execution/agent-loop/agent-loop-command-classifier.d.ts +12 -1
  156. package/dist/orchestrator/execution/agent-loop/agent-loop-command-classifier.d.ts.map +1 -1
  157. package/dist/orchestrator/execution/agent-loop/agent-loop-command-classifier.js +16 -31
  158. package/dist/orchestrator/execution/agent-loop/agent-loop-command-classifier.js.map +1 -1
  159. package/dist/orchestrator/execution/agent-loop/agent-loop-compaction-record.d.ts +75 -0
  160. package/dist/orchestrator/execution/agent-loop/agent-loop-compaction-record.d.ts.map +1 -0
  161. package/dist/orchestrator/execution/agent-loop/agent-loop-compaction-record.js +10 -0
  162. package/dist/orchestrator/execution/agent-loop/agent-loop-compaction-record.js.map +1 -0
  163. package/dist/orchestrator/execution/agent-loop/agent-loop-compactor.d.ts +3 -2
  164. package/dist/orchestrator/execution/agent-loop/agent-loop-compactor.d.ts.map +1 -1
  165. package/dist/orchestrator/execution/agent-loop/agent-loop-compactor.js +185 -22
  166. package/dist/orchestrator/execution/agent-loop/agent-loop-compactor.js.map +1 -1
  167. package/dist/orchestrator/execution/agent-loop/agent-loop-context-assembler.d.ts.map +1 -1
  168. package/dist/orchestrator/execution/agent-loop/agent-loop-context-assembler.js +18 -1
  169. package/dist/orchestrator/execution/agent-loop/agent-loop-context-assembler.js.map +1 -1
  170. package/dist/orchestrator/execution/agent-loop/agent-loop-default-profile.d.ts.map +1 -1
  171. package/dist/orchestrator/execution/agent-loop/agent-loop-default-profile.js +7 -1
  172. package/dist/orchestrator/execution/agent-loop/agent-loop-default-profile.js.map +1 -1
  173. package/dist/orchestrator/execution/agent-loop/agent-loop-events.d.ts +8 -1
  174. package/dist/orchestrator/execution/agent-loop/agent-loop-events.d.ts.map +1 -1
  175. package/dist/orchestrator/execution/agent-loop/agent-loop-events.js.map +1 -1
  176. package/dist/orchestrator/execution/agent-loop/agent-loop-history.d.ts +3 -1
  177. package/dist/orchestrator/execution/agent-loop/agent-loop-history.d.ts.map +1 -1
  178. package/dist/orchestrator/execution/agent-loop/agent-loop-history.js +12 -3
  179. package/dist/orchestrator/execution/agent-loop/agent-loop-history.js.map +1 -1
  180. package/dist/orchestrator/execution/agent-loop/agent-loop-model-client.d.ts.map +1 -1
  181. package/dist/orchestrator/execution/agent-loop/agent-loop-model-client.js +7 -1
  182. package/dist/orchestrator/execution/agent-loop/agent-loop-model-client.js.map +1 -1
  183. package/dist/orchestrator/execution/agent-loop/agent-loop-model.d.ts +37 -0
  184. package/dist/orchestrator/execution/agent-loop/agent-loop-model.d.ts.map +1 -1
  185. package/dist/orchestrator/execution/agent-loop/agent-loop-model.js +21 -0
  186. package/dist/orchestrator/execution/agent-loop/agent-loop-model.js.map +1 -1
  187. package/dist/orchestrator/execution/agent-loop/agent-loop-prompts.d.ts.map +1 -1
  188. package/dist/orchestrator/execution/agent-loop/agent-loop-prompts.js +1 -0
  189. package/dist/orchestrator/execution/agent-loop/agent-loop-prompts.js.map +1 -1
  190. package/dist/orchestrator/execution/agent-loop/agent-loop-result.d.ts +19 -11
  191. package/dist/orchestrator/execution/agent-loop/agent-loop-result.d.ts.map +1 -1
  192. package/dist/orchestrator/execution/agent-loop/agent-loop-session-state.d.ts +4 -0
  193. package/dist/orchestrator/execution/agent-loop/agent-loop-session-state.d.ts.map +1 -1
  194. package/dist/orchestrator/execution/agent-loop/agent-loop-session-state.js +135 -0
  195. package/dist/orchestrator/execution/agent-loop/agent-loop-session-state.js.map +1 -1
  196. package/dist/orchestrator/execution/agent-loop/agent-loop-tool-runtime.d.ts +3 -2
  197. package/dist/orchestrator/execution/agent-loop/agent-loop-tool-runtime.d.ts.map +1 -1
  198. package/dist/orchestrator/execution/agent-loop/agent-loop-tool-runtime.js +68 -61
  199. package/dist/orchestrator/execution/agent-loop/agent-loop-tool-runtime.js.map +1 -1
  200. package/dist/orchestrator/execution/agent-loop/agent-loop-turn-context.d.ts +3 -1
  201. package/dist/orchestrator/execution/agent-loop/agent-loop-turn-context.d.ts.map +1 -1
  202. package/dist/orchestrator/execution/agent-loop/agent-loop-turn-context.js.map +1 -1
  203. package/dist/orchestrator/execution/agent-loop/agent-timeline.d.ts +12 -1
  204. package/dist/orchestrator/execution/agent-loop/agent-timeline.d.ts.map +1 -1
  205. package/dist/orchestrator/execution/agent-loop/agent-timeline.js +19 -56
  206. package/dist/orchestrator/execution/agent-loop/agent-timeline.js.map +1 -1
  207. package/dist/orchestrator/execution/agent-loop/anthropic-messages-agent-loop-model-client.d.ts.map +1 -1
  208. package/dist/orchestrator/execution/agent-loop/anthropic-messages-agent-loop-model-client.js +8 -2
  209. package/dist/orchestrator/execution/agent-loop/anthropic-messages-agent-loop-model-client.js.map +1 -1
  210. package/dist/orchestrator/execution/agent-loop/bounded-agent-loop-runner.d.ts +14 -0
  211. package/dist/orchestrator/execution/agent-loop/bounded-agent-loop-runner.d.ts.map +1 -1
  212. package/dist/orchestrator/execution/agent-loop/bounded-agent-loop-runner.js +440 -81
  213. package/dist/orchestrator/execution/agent-loop/bounded-agent-loop-runner.js.map +1 -1
  214. package/dist/orchestrator/execution/agent-loop/chat-agent-loop-runner.d.ts +1 -1
  215. package/dist/orchestrator/execution/agent-loop/chat-agent-loop-runner.d.ts.map +1 -1
  216. package/dist/orchestrator/execution/agent-loop/chat-agent-loop-runner.js +80 -12
  217. package/dist/orchestrator/execution/agent-loop/chat-agent-loop-runner.js.map +1 -1
  218. package/dist/orchestrator/execution/agent-loop/chat-display-output.d.ts +1 -0
  219. package/dist/orchestrator/execution/agent-loop/chat-display-output.d.ts.map +1 -1
  220. package/dist/orchestrator/execution/agent-loop/chat-display-output.js +3 -1
  221. package/dist/orchestrator/execution/agent-loop/chat-display-output.js.map +1 -1
  222. package/dist/orchestrator/execution/agent-loop/index.d.ts +3 -0
  223. package/dist/orchestrator/execution/agent-loop/index.d.ts.map +1 -1
  224. package/dist/orchestrator/execution/agent-loop/index.js +3 -0
  225. package/dist/orchestrator/execution/agent-loop/index.js.map +1 -1
  226. package/dist/orchestrator/execution/agent-loop/openai-responses-agent-loop-model-client.d.ts +1 -0
  227. package/dist/orchestrator/execution/agent-loop/openai-responses-agent-loop-model-client.d.ts.map +1 -1
  228. package/dist/orchestrator/execution/agent-loop/openai-responses-agent-loop-model-client.js +51 -9
  229. package/dist/orchestrator/execution/agent-loop/openai-responses-agent-loop-model-client.js.map +1 -1
  230. package/dist/orchestrator/execution/agent-loop/response-item-tool-router.d.ts +20 -0
  231. package/dist/orchestrator/execution/agent-loop/response-item-tool-router.d.ts.map +1 -0
  232. package/dist/orchestrator/execution/agent-loop/response-item-tool-router.js +181 -0
  233. package/dist/orchestrator/execution/agent-loop/response-item-tool-router.js.map +1 -0
  234. package/dist/orchestrator/execution/agent-loop/response-item.d.ts +805 -0
  235. package/dist/orchestrator/execution/agent-loop/response-item.d.ts.map +1 -0
  236. package/dist/orchestrator/execution/agent-loop/response-item.js +104 -0
  237. package/dist/orchestrator/execution/agent-loop/response-item.js.map +1 -0
  238. package/dist/orchestrator/execution/agent-loop/task-agent-loop-context.d.ts +7 -2
  239. package/dist/orchestrator/execution/agent-loop/task-agent-loop-context.d.ts.map +1 -1
  240. package/dist/orchestrator/execution/agent-loop/task-agent-loop-context.js +33 -1
  241. package/dist/orchestrator/execution/agent-loop/task-agent-loop-context.js.map +1 -1
  242. package/dist/orchestrator/execution/agent-loop/task-agent-loop-result.d.ts +32 -17
  243. package/dist/orchestrator/execution/agent-loop/task-agent-loop-result.d.ts.map +1 -1
  244. package/dist/orchestrator/execution/agent-loop/task-agent-loop-result.js +174 -16
  245. package/dist/orchestrator/execution/agent-loop/task-agent-loop-result.js.map +1 -1
  246. package/dist/orchestrator/execution/agent-loop/task-agent-loop-runner.d.ts +2 -0
  247. package/dist/orchestrator/execution/agent-loop/task-agent-loop-runner.d.ts.map +1 -1
  248. package/dist/orchestrator/execution/agent-loop/task-agent-loop-runner.js +10 -4
  249. package/dist/orchestrator/execution/agent-loop/task-agent-loop-runner.js.map +1 -1
  250. package/dist/orchestrator/execution/agent-loop/task-agent-loop-verification.d.ts +0 -1
  251. package/dist/orchestrator/execution/agent-loop/task-agent-loop-verification.d.ts.map +1 -1
  252. package/dist/orchestrator/execution/agent-loop/task-agent-loop-verification.js +7 -87
  253. package/dist/orchestrator/execution/agent-loop/task-agent-loop-verification.js.map +1 -1
  254. package/dist/orchestrator/execution/agent-loop/task-agent-loop-worktree.d.ts.map +1 -1
  255. package/dist/orchestrator/execution/agent-loop/task-agent-loop-worktree.js +25 -0
  256. package/dist/orchestrator/execution/agent-loop/task-agent-loop-worktree.js.map +1 -1
  257. package/dist/orchestrator/execution/context/issue-context-fetcher.d.ts +5 -1
  258. package/dist/orchestrator/execution/context/issue-context-fetcher.d.ts.map +1 -1
  259. package/dist/orchestrator/execution/context/issue-context-fetcher.js +7 -4
  260. package/dist/orchestrator/execution/context/issue-context-fetcher.js.map +1 -1
  261. package/dist/orchestrator/execution/task/task-artifact-contract.d.ts +18 -0
  262. package/dist/orchestrator/execution/task/task-artifact-contract.d.ts.map +1 -0
  263. package/dist/orchestrator/execution/task/task-artifact-contract.js +199 -0
  264. package/dist/orchestrator/execution/task/task-artifact-contract.js.map +1 -0
  265. package/dist/orchestrator/execution/task/task-diff-capture.d.ts +15 -1
  266. package/dist/orchestrator/execution/task/task-diff-capture.d.ts.map +1 -1
  267. package/dist/orchestrator/execution/task/task-diff-capture.js +271 -18
  268. package/dist/orchestrator/execution/task/task-diff-capture.js.map +1 -1
  269. package/dist/orchestrator/execution/task/task-execution-helpers.d.ts +1 -0
  270. package/dist/orchestrator/execution/task/task-execution-helpers.d.ts.map +1 -1
  271. package/dist/orchestrator/execution/task/task-execution-helpers.js +76 -17
  272. package/dist/orchestrator/execution/task/task-execution-helpers.js.map +1 -1
  273. package/dist/orchestrator/execution/task/task-execution-types.d.ts +2 -0
  274. package/dist/orchestrator/execution/task/task-execution-types.d.ts.map +1 -1
  275. package/dist/orchestrator/execution/task/task-execution-types.js.map +1 -1
  276. package/dist/orchestrator/execution/task/task-executor.d.ts +16 -1
  277. package/dist/orchestrator/execution/task/task-executor.d.ts.map +1 -1
  278. package/dist/orchestrator/execution/task/task-executor.js +56 -50
  279. package/dist/orchestrator/execution/task/task-executor.js.map +1 -1
  280. package/dist/orchestrator/execution/task/task-generation.d.ts +62 -2
  281. package/dist/orchestrator/execution/task/task-generation.d.ts.map +1 -1
  282. package/dist/orchestrator/execution/task/task-generation.js +30 -13
  283. package/dist/orchestrator/execution/task/task-generation.js.map +1 -1
  284. package/dist/orchestrator/execution/task/task-lifecycle-runner.d.ts +2 -2
  285. package/dist/orchestrator/execution/task/task-lifecycle-runner.d.ts.map +1 -1
  286. package/dist/orchestrator/execution/task/task-lifecycle-runner.js +32 -4
  287. package/dist/orchestrator/execution/task/task-lifecycle-runner.js.map +1 -1
  288. package/dist/orchestrator/execution/task/task-lifecycle.d.ts +3 -3
  289. package/dist/orchestrator/execution/task/task-lifecycle.d.ts.map +1 -1
  290. package/dist/orchestrator/execution/task/task-lifecycle.js +109 -10
  291. package/dist/orchestrator/execution/task/task-lifecycle.js.map +1 -1
  292. package/dist/orchestrator/execution/task/task-outcome-ledger.d.ts +9 -0
  293. package/dist/orchestrator/execution/task/task-outcome-ledger.d.ts.map +1 -1
  294. package/dist/orchestrator/execution/task/task-outcome-ledger.js +64 -3
  295. package/dist/orchestrator/execution/task/task-outcome-ledger.js.map +1 -1
  296. package/dist/orchestrator/execution/task/task-prompt-builder.d.ts +3 -1
  297. package/dist/orchestrator/execution/task/task-prompt-builder.d.ts.map +1 -1
  298. package/dist/orchestrator/execution/task/task-prompt-builder.js +28 -13
  299. package/dist/orchestrator/execution/task/task-prompt-builder.js.map +1 -1
  300. package/dist/orchestrator/execution/task/task-verifier-rules.d.ts +3 -2
  301. package/dist/orchestrator/execution/task/task-verifier-rules.d.ts.map +1 -1
  302. package/dist/orchestrator/execution/task/task-verifier-rules.js +377 -90
  303. package/dist/orchestrator/execution/task/task-verifier-rules.js.map +1 -1
  304. package/dist/orchestrator/execution/task/task-verifier-types.d.ts +13 -0
  305. package/dist/orchestrator/execution/task/task-verifier-types.d.ts.map +1 -1
  306. package/dist/orchestrator/execution/task/task-verifier-types.js.map +1 -1
  307. package/dist/orchestrator/execution/task/task-verifier.d.ts +5 -4
  308. package/dist/orchestrator/execution/task/task-verifier.d.ts.map +1 -1
  309. package/dist/orchestrator/execution/task/task-verifier.js +396 -25
  310. package/dist/orchestrator/execution/task/task-verifier.js.map +1 -1
  311. package/dist/orchestrator/execution/task/task-workspace.d.ts +5 -0
  312. package/dist/orchestrator/execution/task/task-workspace.d.ts.map +1 -1
  313. package/dist/orchestrator/execution/task/task-workspace.js +20 -10
  314. package/dist/orchestrator/execution/task/task-workspace.js.map +1 -1
  315. package/dist/orchestrator/execution/types/task-group.d.ts +85 -5
  316. package/dist/orchestrator/execution/types/task-group.d.ts.map +1 -1
  317. package/dist/orchestrator/execution/types/task.d.ts +155 -3
  318. package/dist/orchestrator/execution/types/task.d.ts.map +1 -1
  319. package/dist/orchestrator/execution/types/task.js +18 -0
  320. package/dist/orchestrator/execution/types/task.js.map +1 -1
  321. package/dist/orchestrator/loop/durable-loop/contracts.d.ts +2 -0
  322. package/dist/orchestrator/loop/durable-loop/contracts.d.ts.map +1 -1
  323. package/dist/orchestrator/loop/durable-loop/contracts.js.map +1 -1
  324. package/dist/orchestrator/loop/durable-loop/phase-specs.d.ts +12 -12
  325. package/dist/orchestrator/loop/durable-loop/preparation.d.ts.map +1 -1
  326. package/dist/orchestrator/loop/durable-loop/preparation.js +7 -1
  327. package/dist/orchestrator/loop/durable-loop/preparation.js.map +1 -1
  328. package/dist/orchestrator/loop/loop-report-helper.d.ts.map +1 -1
  329. package/dist/orchestrator/loop/loop-report-helper.js +2 -0
  330. package/dist/orchestrator/loop/loop-report-helper.js.map +1 -1
  331. package/dist/platform/corrections/memory-correction-ledger.d.ts +30 -30
  332. package/dist/platform/corrections/memory-governance.d.ts +2 -2
  333. package/dist/platform/corrections/memory-quarantine.d.ts +2 -2
  334. package/dist/platform/dream/playbook-memory.d.ts +4 -4
  335. package/dist/platform/knowledge/types/agent-memory.d.ts +46 -46
  336. package/dist/platform/observation/context-provider/collector.d.ts.map +1 -1
  337. package/dist/platform/observation/context-provider/collector.js +89 -24
  338. package/dist/platform/observation/context-provider/collector.js.map +1 -1
  339. package/dist/platform/observation/data-source-adapter.d.ts +2 -0
  340. package/dist/platform/observation/data-source-adapter.d.ts.map +1 -1
  341. package/dist/platform/observation/data-source-adapter.js.map +1 -1
  342. package/dist/platform/observation/observation-apply.d.ts.map +1 -1
  343. package/dist/platform/observation/observation-apply.js +8 -2
  344. package/dist/platform/observation/observation-apply.js.map +1 -1
  345. package/dist/platform/observation/observation-engine.d.ts.map +1 -1
  346. package/dist/platform/observation/observation-engine.js +118 -70
  347. package/dist/platform/observation/observation-engine.js.map +1 -1
  348. package/dist/platform/observation/observation-helpers.d.ts +2 -0
  349. package/dist/platform/observation/observation-helpers.d.ts.map +1 -1
  350. package/dist/platform/observation/observation-helpers.js.map +1 -1
  351. package/dist/platform/observation/types/data-source.d.ts +48 -0
  352. package/dist/platform/observation/types/data-source.d.ts.map +1 -1
  353. package/dist/platform/observation/types/data-source.js +4 -0
  354. package/dist/platform/observation/types/data-source.js.map +1 -1
  355. package/dist/platform/observation/workspace-context.d.ts.map +1 -1
  356. package/dist/platform/observation/workspace-context.js +13 -18
  357. package/dist/platform/observation/workspace-context.js.map +1 -1
  358. package/dist/platform/soil/contracts.d.ts +58 -58
  359. package/dist/prompt/purposes/verification.d.ts +2 -2
  360. package/dist/reporting/report-formatters.d.ts.map +1 -1
  361. package/dist/reporting/report-formatters.js +26 -1
  362. package/dist/reporting/report-formatters.js.map +1 -1
  363. package/dist/reporting/reporting-engine.d.ts.map +1 -1
  364. package/dist/reporting/reporting-engine.js +1 -0
  365. package/dist/reporting/reporting-engine.js.map +1 -1
  366. package/dist/reporting/reporting-types.d.ts +7 -0
  367. package/dist/reporting/reporting-types.d.ts.map +1 -1
  368. package/dist/reporting/types/report.d.ts +12 -0
  369. package/dist/reporting/types/report.d.ts.map +1 -1
  370. package/dist/reporting/types/report.js +1 -0
  371. package/dist/reporting/types/report.js.map +1 -1
  372. package/dist/runtime/approval-broker.d.ts +12 -0
  373. package/dist/runtime/approval-broker.d.ts.map +1 -1
  374. package/dist/runtime/approval-broker.js +27 -7
  375. package/dist/runtime/approval-broker.js.map +1 -1
  376. package/dist/runtime/control/daemon-runtime-control-executor.d.ts.map +1 -1
  377. package/dist/runtime/control/daemon-runtime-control-executor.js +9 -4
  378. package/dist/runtime/control/daemon-runtime-control-executor.js.map +1 -1
  379. package/dist/runtime/control/runtime-control-intent.d.ts.map +1 -1
  380. package/dist/runtime/control/runtime-control-intent.js +3 -2
  381. package/dist/runtime/control/runtime-control-intent.js.map +1 -1
  382. package/dist/runtime/control/runtime-control-service.d.ts +27 -1
  383. package/dist/runtime/control/runtime-control-service.d.ts.map +1 -1
  384. package/dist/runtime/control/runtime-control-service.js +181 -2
  385. package/dist/runtime/control/runtime-control-service.js.map +1 -1
  386. package/dist/runtime/control/runtime-target-resolver.js +2 -0
  387. package/dist/runtime/control/runtime-target-resolver.js.map +1 -1
  388. package/dist/runtime/daemon/browser-backpressure-policy.d.ts +22 -0
  389. package/dist/runtime/daemon/browser-backpressure-policy.d.ts.map +1 -0
  390. package/dist/runtime/daemon/browser-backpressure-policy.js +95 -0
  391. package/dist/runtime/daemon/browser-backpressure-policy.js.map +1 -0
  392. package/dist/runtime/daemon/client.d.ts +1 -0
  393. package/dist/runtime/daemon/client.d.ts.map +1 -1
  394. package/dist/runtime/daemon/client.js.map +1 -1
  395. package/dist/runtime/daemon/runner-goal-cycle.d.ts.map +1 -1
  396. package/dist/runtime/daemon/runner-goal-cycle.js +1 -2
  397. package/dist/runtime/daemon/runner-goal-cycle.js.map +1 -1
  398. package/dist/runtime/daemon/runner-recovery.d.ts +17 -3
  399. package/dist/runtime/daemon/runner-recovery.d.ts.map +1 -1
  400. package/dist/runtime/daemon/runner-recovery.js +50 -12
  401. package/dist/runtime/daemon/runner-recovery.js.map +1 -1
  402. package/dist/runtime/daemon/runner-startup.d.ts.map +1 -1
  403. package/dist/runtime/daemon/runner-startup.js +18 -1
  404. package/dist/runtime/daemon/runner-startup.js.map +1 -1
  405. package/dist/runtime/daemon/runner.d.ts.map +1 -1
  406. package/dist/runtime/daemon/runner.js +13 -3
  407. package/dist/runtime/daemon/runner.js.map +1 -1
  408. package/dist/runtime/daemon/runtime-ownership.d.ts +7 -1
  409. package/dist/runtime/daemon/runtime-ownership.d.ts.map +1 -1
  410. package/dist/runtime/daemon/runtime-ownership.js +171 -25
  411. package/dist/runtime/daemon/runtime-ownership.js.map +1 -1
  412. package/dist/runtime/daemon/wait-deadline-resolver.d.ts.map +1 -1
  413. package/dist/runtime/daemon/wait-deadline-resolver.js +2 -0
  414. package/dist/runtime/daemon/wait-deadline-resolver.js.map +1 -1
  415. package/dist/runtime/event/server-snapshot-reader.d.ts +3 -1
  416. package/dist/runtime/event/server-snapshot-reader.d.ts.map +1 -1
  417. package/dist/runtime/event/server-snapshot-reader.js +68 -2
  418. package/dist/runtime/event/server-snapshot-reader.js.map +1 -1
  419. package/dist/runtime/event/server-types.d.ts +2 -0
  420. package/dist/runtime/event/server-types.d.ts.map +1 -1
  421. package/dist/runtime/evidence-answer.d.ts.map +1 -1
  422. package/dist/runtime/evidence-answer.js +34 -7
  423. package/dist/runtime/evidence-answer.js.map +1 -1
  424. package/dist/runtime/gateway/channel-adapter.d.ts +3 -0
  425. package/dist/runtime/gateway/channel-adapter.d.ts.map +1 -1
  426. package/dist/runtime/gateway/channel-display-policy.d.ts +42 -0
  427. package/dist/runtime/gateway/channel-display-policy.d.ts.map +1 -0
  428. package/dist/runtime/gateway/channel-display-policy.js +85 -0
  429. package/dist/runtime/gateway/channel-display-policy.js.map +1 -0
  430. package/dist/runtime/gateway/chat-event-rendering.d.ts +2 -1
  431. package/dist/runtime/gateway/chat-event-rendering.d.ts.map +1 -1
  432. package/dist/runtime/gateway/chat-event-rendering.js +2 -0
  433. package/dist/runtime/gateway/chat-event-rendering.js.map +1 -1
  434. package/dist/runtime/gateway/chat-session-dispatch.d.ts.map +1 -1
  435. package/dist/runtime/gateway/chat-session-dispatch.js +4 -9
  436. package/dist/runtime/gateway/chat-session-dispatch.js.map +1 -1
  437. package/dist/runtime/gateway/chat-session-port.d.ts +2 -0
  438. package/dist/runtime/gateway/chat-session-port.d.ts.map +1 -1
  439. package/dist/runtime/gateway/chat-session-port.js.map +1 -1
  440. package/dist/runtime/gateway/discord-gateway-adapter.d.ts +4 -0
  441. package/dist/runtime/gateway/discord-gateway-adapter.d.ts.map +1 -1
  442. package/dist/runtime/gateway/discord-gateway-adapter.js +100 -31
  443. package/dist/runtime/gateway/discord-gateway-adapter.js.map +1 -1
  444. package/dist/runtime/gateway/index.d.ts +4 -0
  445. package/dist/runtime/gateway/index.d.ts.map +1 -1
  446. package/dist/runtime/gateway/index.js +2 -0
  447. package/dist/runtime/gateway/index.js.map +1 -1
  448. package/dist/runtime/gateway/non-tui-display-projector.d.ts +40 -0
  449. package/dist/runtime/gateway/non-tui-display-projector.d.ts.map +1 -0
  450. package/dist/runtime/gateway/non-tui-display-projector.js +166 -0
  451. package/dist/runtime/gateway/non-tui-display-projector.js.map +1 -0
  452. package/dist/runtime/gateway/signal-gateway-adapter.d.ts +1 -0
  453. package/dist/runtime/gateway/signal-gateway-adapter.d.ts.map +1 -1
  454. package/dist/runtime/gateway/signal-gateway-adapter.js +47 -4
  455. package/dist/runtime/gateway/signal-gateway-adapter.js.map +1 -1
  456. package/dist/runtime/gateway/slack-channel-adapter.d.ts +1 -0
  457. package/dist/runtime/gateway/slack-channel-adapter.d.ts.map +1 -1
  458. package/dist/runtime/gateway/slack-channel-adapter.js +93 -18
  459. package/dist/runtime/gateway/slack-channel-adapter.js.map +1 -1
  460. package/dist/runtime/gateway/telegram-gateway-adapter.d.ts +2 -0
  461. package/dist/runtime/gateway/telegram-gateway-adapter.d.ts.map +1 -1
  462. package/dist/runtime/gateway/telegram-gateway-adapter.js +61 -113
  463. package/dist/runtime/gateway/telegram-gateway-adapter.js.map +1 -1
  464. package/dist/runtime/gateway/whatsapp-gateway-adapter.d.ts +1 -0
  465. package/dist/runtime/gateway/whatsapp-gateway-adapter.d.ts.map +1 -1
  466. package/dist/runtime/gateway/whatsapp-gateway-adapter.js +49 -4
  467. package/dist/runtime/gateway/whatsapp-gateway-adapter.js.map +1 -1
  468. package/dist/runtime/interactive-automation/browser-session-resolver.d.ts +26 -0
  469. package/dist/runtime/interactive-automation/browser-session-resolver.d.ts.map +1 -0
  470. package/dist/runtime/interactive-automation/browser-session-resolver.js +75 -0
  471. package/dist/runtime/interactive-automation/browser-session-resolver.js.map +1 -0
  472. package/dist/runtime/interactive-automation/index.d.ts +2 -0
  473. package/dist/runtime/interactive-automation/index.d.ts.map +1 -1
  474. package/dist/runtime/interactive-automation/index.js +2 -0
  475. package/dist/runtime/interactive-automation/index.js.map +1 -1
  476. package/dist/runtime/interactive-automation/runtime-auth-handoff-store.d.ts +35 -0
  477. package/dist/runtime/interactive-automation/runtime-auth-handoff-store.d.ts.map +1 -0
  478. package/dist/runtime/interactive-automation/runtime-auth-handoff-store.js +125 -0
  479. package/dist/runtime/interactive-automation/runtime-auth-handoff-store.js.map +1 -0
  480. package/dist/runtime/permission-dialogue.d.ts +113 -0
  481. package/dist/runtime/permission-dialogue.d.ts.map +1 -0
  482. package/dist/runtime/permission-dialogue.js +82 -0
  483. package/dist/runtime/permission-dialogue.js.map +1 -0
  484. package/dist/runtime/run-spec/derive.d.ts +14 -14
  485. package/dist/runtime/run-spec/handoff.d.ts.map +1 -1
  486. package/dist/runtime/run-spec/handoff.js +33 -0
  487. package/dist/runtime/run-spec/handoff.js.map +1 -1
  488. package/dist/runtime/run-spec/types.d.ts +16 -16
  489. package/dist/runtime/session-registry/types.d.ts +12 -12
  490. package/dist/runtime/store/artifact-retention.d.ts +2 -0
  491. package/dist/runtime/store/artifact-retention.d.ts.map +1 -1
  492. package/dist/runtime/store/artifact-retention.js +24 -21
  493. package/dist/runtime/store/artifact-retention.js.map +1 -1
  494. package/dist/runtime/store/budget-store.d.ts +8 -8
  495. package/dist/runtime/store/evidence-ledger.d.ts.map +1 -1
  496. package/dist/runtime/store/evidence-ledger.js +39 -1
  497. package/dist/runtime/store/evidence-ledger.js.map +1 -1
  498. package/dist/runtime/store/evidence-types.d.ts +204 -204
  499. package/dist/runtime/store/experiment-queue-store.d.ts +20 -20
  500. package/dist/runtime/store/index.d.ts +2 -2
  501. package/dist/runtime/store/index.d.ts.map +1 -1
  502. package/dist/runtime/store/index.js +1 -1
  503. package/dist/runtime/store/index.js.map +1 -1
  504. package/dist/runtime/store/operator-handoff-store.d.ts +3 -3
  505. package/dist/runtime/store/reproducibility-manifest.d.ts +20 -20
  506. package/dist/runtime/store/runtime-operation-schemas.d.ts +95 -62
  507. package/dist/runtime/store/runtime-operation-schemas.d.ts.map +1 -1
  508. package/dist/runtime/store/runtime-operation-schemas.js +9 -0
  509. package/dist/runtime/store/runtime-operation-schemas.js.map +1 -1
  510. package/dist/runtime/store/runtime-paths.d.ts +2 -0
  511. package/dist/runtime/store/runtime-paths.d.ts.map +1 -1
  512. package/dist/runtime/store/runtime-paths.js +6 -0
  513. package/dist/runtime/store/runtime-paths.js.map +1 -1
  514. package/dist/runtime/store/runtime-schemas.d.ts +2256 -46
  515. package/dist/runtime/store/runtime-schemas.d.ts.map +1 -1
  516. package/dist/runtime/store/runtime-schemas.js +85 -0
  517. package/dist/runtime/store/runtime-schemas.js.map +1 -1
  518. package/dist/runtime/types/companion.d.ts +52 -52
  519. package/dist/runtime/types/daemon.d.ts +31 -31
  520. package/dist/tools/automation/InteractiveAutomationTools.d.ts +22 -2
  521. package/dist/tools/automation/InteractiveAutomationTools.d.ts.map +1 -1
  522. package/dist/tools/automation/InteractiveAutomationTools.js +75 -10
  523. package/dist/tools/automation/InteractiveAutomationTools.js.map +1 -1
  524. package/dist/tools/builtin/factory.d.ts +2 -1
  525. package/dist/tools/builtin/factory.d.ts.map +1 -1
  526. package/dist/tools/builtin/factory.js +6 -2
  527. package/dist/tools/builtin/factory.js.map +1 -1
  528. package/dist/tools/execution/MemorySaveTool/MemorySaveTool.d.ts +20 -20
  529. package/dist/tools/execution/RunAdapterTool/RunAdapterTool.d.ts +6 -0
  530. package/dist/tools/execution/RunAdapterTool/RunAdapterTool.d.ts.map +1 -1
  531. package/dist/tools/execution/RunAdapterTool/RunAdapterTool.js +2 -0
  532. package/dist/tools/execution/RunAdapterTool/RunAdapterTool.js.map +1 -1
  533. package/dist/tools/execution-orchestrator.d.ts +29 -0
  534. package/dist/tools/execution-orchestrator.d.ts.map +1 -0
  535. package/dist/tools/execution-orchestrator.js +153 -0
  536. package/dist/tools/execution-orchestrator.js.map +1 -0
  537. package/dist/tools/executor.d.ts +6 -0
  538. package/dist/tools/executor.d.ts.map +1 -1
  539. package/dist/tools/executor.js +48 -11
  540. package/dist/tools/executor.js.map +1 -1
  541. package/dist/tools/fs/ApplyPatchTool/ApplyPatchTool.d.ts.map +1 -1
  542. package/dist/tools/fs/ApplyPatchTool/ApplyPatchTool.js +130 -17
  543. package/dist/tools/fs/ApplyPatchTool/ApplyPatchTool.js.map +1 -1
  544. package/dist/tools/kaggle/KaggleExperimentTools.js +4 -3
  545. package/dist/tools/kaggle/KaggleExperimentTools.js.map +1 -1
  546. package/dist/tools/kaggle/KaggleSubmissionTools.js +6 -5
  547. package/dist/tools/kaggle/KaggleSubmissionTools.js.map +1 -1
  548. package/dist/tools/kaggle/KaggleWorkspacePrepareTool.js +6 -5
  549. package/dist/tools/kaggle/KaggleWorkspacePrepareTool.js.map +1 -1
  550. package/dist/tools/kaggle/paths.d.ts.map +1 -1
  551. package/dist/tools/kaggle/paths.js +12 -8
  552. package/dist/tools/kaggle/paths.js.map +1 -1
  553. package/dist/tools/mutation/TaskStopTool/TaskStopTool.d.ts.map +1 -1
  554. package/dist/tools/mutation/TaskStopTool/TaskStopTool.js +8 -0
  555. package/dist/tools/mutation/TaskStopTool/TaskStopTool.js.map +1 -1
  556. package/dist/tools/mutation/TaskUpdateTool/TaskUpdateTool.d.ts +8 -8
  557. package/dist/tools/mutation/TaskUpdateTool/TaskUpdateTool.d.ts.map +1 -1
  558. package/dist/tools/mutation/TaskUpdateTool/TaskUpdateTool.js +49 -7
  559. package/dist/tools/mutation/TaskUpdateTool/TaskUpdateTool.js.map +1 -1
  560. package/dist/tools/network/GitHubCliTool/GitHubCliTool.d.ts +4 -4
  561. package/dist/tools/network/McpStdioTool/McpStdioTool.d.ts +4 -4
  562. package/dist/tools/permission.d.ts +0 -1
  563. package/dist/tools/permission.d.ts.map +1 -1
  564. package/dist/tools/permission.js +9 -33
  565. package/dist/tools/permission.js.map +1 -1
  566. package/dist/tools/query/CodeReadContextTool/CodeReadContextTool.d.ts +4 -4
  567. package/dist/tools/query/CodeSearchRepairTool/CodeSearchRepairTool.d.ts +8 -8
  568. package/dist/tools/query/CodeSearchTool/CodeSearchTool.d.ts +4 -4
  569. package/dist/tools/query/MemoryRecallTool/MemoryRecallTool.d.ts +4 -4
  570. package/dist/tools/query/runtime-session-tools.d.ts +73 -5
  571. package/dist/tools/query/runtime-session-tools.d.ts.map +1 -1
  572. package/dist/tools/query/runtime-session-tools.js +114 -0
  573. package/dist/tools/query/runtime-session-tools.js.map +1 -1
  574. package/dist/tools/runtime/LongRunningRuntimeTools.d.ts +72 -54
  575. package/dist/tools/runtime/LongRunningRuntimeTools.d.ts.map +1 -1
  576. package/dist/tools/runtime/LongRunningRuntimeTools.js +4 -1
  577. package/dist/tools/runtime/LongRunningRuntimeTools.js.map +1 -1
  578. package/dist/tools/runtime/RunSpecHandoffTools.d.ts.map +1 -1
  579. package/dist/tools/runtime/RunSpecHandoffTools.js +162 -2
  580. package/dist/tools/runtime/RunSpecHandoffTools.js.map +1 -1
  581. package/dist/tools/runtime/SetupRuntimeControlTools.d.ts.map +1 -1
  582. package/dist/tools/runtime/SetupRuntimeControlTools.js +169 -17
  583. package/dist/tools/runtime/SetupRuntimeControlTools.js.map +1 -1
  584. package/dist/tools/system/EnvTool/EnvTool.d.ts +4 -4
  585. package/dist/tools/system/GitDiffTool/GitDiffTool.d.ts +4 -4
  586. package/dist/tools/system/GitLogTool/GitLogTool.d.ts +4 -4
  587. package/dist/tools/system/ShellCommandTool/ShellCommandTool.d.ts.map +1 -1
  588. package/dist/tools/system/ShellCommandTool/ShellCommandTool.js +8 -2
  589. package/dist/tools/system/ShellCommandTool/ShellCommandTool.js.map +1 -1
  590. package/dist/tools/system/ShellTool/ShellTool.d.ts.map +1 -1
  591. package/dist/tools/system/ShellTool/ShellTool.js +29 -11
  592. package/dist/tools/system/ShellTool/ShellTool.js.map +1 -1
  593. package/dist/tools/system/ShellTool/command-policy.d.ts +12 -8
  594. package/dist/tools/system/ShellTool/command-policy.d.ts.map +1 -1
  595. package/dist/tools/system/ShellTool/command-policy.js +412 -98
  596. package/dist/tools/system/ShellTool/command-policy.js.map +1 -1
  597. package/dist/tools/system/ShellTool/prompt.d.ts +1 -1
  598. package/dist/tools/system/ShellTool/prompt.d.ts.map +1 -1
  599. package/dist/tools/system/ShellTool/prompt.js +1 -1
  600. package/dist/tools/system/ShellTool/prompt.js.map +1 -1
  601. package/dist/tools/system/TestRunnerTool/TestRunnerTool.d.ts +1 -1
  602. package/dist/tools/system/TestRunnerTool/TestRunnerTool.d.ts.map +1 -1
  603. package/dist/tools/system/TestRunnerTool/TestRunnerTool.js +152 -8
  604. package/dist/tools/system/TestRunnerTool/TestRunnerTool.js.map +1 -1
  605. package/dist/tools/system/UpdatePlanTool/UpdatePlanTool.js +1 -1
  606. package/dist/tools/system/UpdatePlanTool/UpdatePlanTool.js.map +1 -1
  607. package/dist/tools/types.d.ts +36 -12
  608. package/dist/tools/types.d.ts.map +1 -1
  609. package/dist/tools/types.js +26 -3
  610. package/dist/tools/types.js.map +1 -1
  611. package/dist/tools/workspace-scope.d.ts +11 -0
  612. package/dist/tools/workspace-scope.d.ts.map +1 -0
  613. package/dist/tools/workspace-scope.js +77 -0
  614. package/dist/tools/workspace-scope.js.map +1 -0
  615. package/package.json +2 -2
@@ -174,9 +174,9 @@ export declare const RuntimeSafePauseRecordSchema: z.ZodObject<{
174
174
  completed_at?: string | undefined;
175
175
  reason?: string | undefined;
176
176
  requested_at?: string | undefined;
177
+ requested_by?: string | undefined;
177
178
  paused_at?: string | undefined;
178
179
  resumed_at?: string | undefined;
179
- requested_by?: string | undefined;
180
180
  checkpoint?: {
181
181
  artifact_refs: string[];
182
182
  checkpoint_id: string;
@@ -198,9 +198,9 @@ export declare const RuntimeSafePauseRecordSchema: z.ZodObject<{
198
198
  completed_at?: string | undefined;
199
199
  reason?: string | undefined;
200
200
  requested_at?: string | undefined;
201
+ requested_by?: string | undefined;
201
202
  paused_at?: string | undefined;
202
203
  resumed_at?: string | undefined;
203
- requested_by?: string | undefined;
204
204
  checkpoint?: {
205
205
  artifact_refs: string[];
206
206
  checkpoint_id: string;
@@ -252,19 +252,19 @@ export declare const ApprovalOriginSchema: z.ZodObject<{
252
252
  turn_id: z.ZodOptional<z.ZodString>;
253
253
  reply_target: z.ZodOptional<z.ZodUnknown>;
254
254
  }, "strip", z.ZodTypeAny, {
255
- channel: string;
256
255
  conversation_id: string;
256
+ channel: string;
257
257
  session_id?: string | undefined;
258
258
  user_id?: string | undefined;
259
- turn_id?: string | undefined;
260
259
  reply_target?: unknown;
260
+ turn_id?: string | undefined;
261
261
  }, {
262
- channel: string;
263
262
  conversation_id: string;
263
+ channel: string;
264
264
  session_id?: string | undefined;
265
265
  user_id?: string | undefined;
266
- turn_id?: string | undefined;
267
266
  reply_target?: unknown;
267
+ turn_id?: string | undefined;
268
268
  }>;
269
269
  export type ApprovalOrigin = z.infer<typeof ApprovalOriginSchema>;
270
270
  export declare const ApprovalRecordSchema: z.ZodObject<{
@@ -285,59 +285,59 @@ export declare const ApprovalRecordSchema: z.ZodObject<{
285
285
  turn_id: z.ZodOptional<z.ZodString>;
286
286
  reply_target: z.ZodOptional<z.ZodUnknown>;
287
287
  }, "strip", z.ZodTypeAny, {
288
- channel: string;
289
288
  conversation_id: string;
289
+ channel: string;
290
290
  session_id?: string | undefined;
291
291
  user_id?: string | undefined;
292
- turn_id?: string | undefined;
293
292
  reply_target?: unknown;
293
+ turn_id?: string | undefined;
294
294
  }, {
295
- channel: string;
296
295
  conversation_id: string;
296
+ channel: string;
297
297
  session_id?: string | undefined;
298
298
  user_id?: string | undefined;
299
- turn_id?: string | undefined;
300
299
  reply_target?: unknown;
300
+ turn_id?: string | undefined;
301
301
  }>>;
302
302
  payload: z.ZodUnknown;
303
303
  }, "strip", z.ZodTypeAny, {
304
304
  created_at: number;
305
305
  state: "pending" | "cancelled" | "expired" | "approved" | "denied";
306
- correlation_id: string;
307
306
  approval_id: string;
307
+ correlation_id: string;
308
308
  request_envelope_id: string;
309
309
  expires_at: number;
310
310
  origin?: {
311
- channel: string;
312
311
  conversation_id: string;
312
+ channel: string;
313
313
  session_id?: string | undefined;
314
314
  user_id?: string | undefined;
315
- turn_id?: string | undefined;
316
315
  reply_target?: unknown;
316
+ turn_id?: string | undefined;
317
317
  } | undefined;
318
318
  goal_id?: string | undefined;
319
+ response_channel?: string | undefined;
319
320
  payload?: unknown;
320
321
  resolved_at?: number | undefined;
321
- response_channel?: string | undefined;
322
322
  }, {
323
323
  created_at: number;
324
324
  state: "pending" | "cancelled" | "expired" | "approved" | "denied";
325
- correlation_id: string;
326
325
  approval_id: string;
326
+ correlation_id: string;
327
327
  request_envelope_id: string;
328
328
  expires_at: number;
329
329
  origin?: {
330
- channel: string;
331
330
  conversation_id: string;
331
+ channel: string;
332
332
  session_id?: string | undefined;
333
333
  user_id?: string | undefined;
334
- turn_id?: string | undefined;
335
334
  reply_target?: unknown;
335
+ turn_id?: string | undefined;
336
336
  } | undefined;
337
337
  goal_id?: string | undefined;
338
+ response_channel?: string | undefined;
338
339
  payload?: unknown;
339
340
  resolved_at?: number | undefined;
340
- response_channel?: string | undefined;
341
341
  }>;
342
342
  export type ApprovalRecord = z.infer<typeof ApprovalRecordSchema>;
343
343
  export declare const OutboxRecordSchema: z.ZodObject<{
@@ -485,6 +485,7 @@ export declare const RuntimeLongRunHealthSignalsSchema: z.ZodObject<{
485
485
  } & {
486
486
  status: z.ZodEnum<["improved", "plateau", "regressed", "missing", "unknown"]>;
487
487
  metric_name: z.ZodOptional<z.ZodString>;
488
+ direction: z.ZodOptional<z.ZodEnum<["maximize", "minimize"]>>;
488
489
  previous_value: z.ZodOptional<z.ZodNumber>;
489
490
  current_value: z.ZodOptional<z.ZodNumber>;
490
491
  }, "strip", z.ZodTypeAny, {
@@ -493,6 +494,7 @@ export declare const RuntimeLongRunHealthSignalsSchema: z.ZodObject<{
493
494
  current_value?: number | undefined;
494
495
  previous_value?: number | undefined;
495
496
  reason?: string | undefined;
497
+ direction?: "maximize" | "minimize" | undefined;
496
498
  observed_at?: number | undefined;
497
499
  metric_name?: string | undefined;
498
500
  }, {
@@ -501,6 +503,7 @@ export declare const RuntimeLongRunHealthSignalsSchema: z.ZodObject<{
501
503
  current_value?: number | undefined;
502
504
  previous_value?: number | undefined;
503
505
  reason?: string | undefined;
506
+ direction?: "maximize" | "minimize" | undefined;
504
507
  observed_at?: number | undefined;
505
508
  metric_name?: string | undefined;
506
509
  }>;
@@ -510,16 +513,28 @@ export declare const RuntimeLongRunHealthSignalsSchema: z.ZodObject<{
510
513
  reason: z.ZodOptional<z.ZodString>;
511
514
  } & {
512
515
  status: z.ZodEnum<["none", "approval_wait", "auth_wait", "operator_wait", "resource_pressure", "blocked", "unknown"]>;
516
+ active_goal_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
517
+ pending_approval_count: z.ZodOptional<z.ZodNumber>;
518
+ goal_scoped_pending_approval_count: z.ZodOptional<z.ZodNumber>;
519
+ unrelated_pending_approval_count: z.ZodOptional<z.ZodNumber>;
513
520
  }, "strip", z.ZodTypeAny, {
514
- status: "unknown" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure" | "blocked";
521
+ status: "unknown" | "blocked" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure";
515
522
  checked_at: number;
516
523
  reason?: string | undefined;
517
524
  observed_at?: number | undefined;
525
+ active_goal_ids?: string[] | undefined;
526
+ pending_approval_count?: number | undefined;
527
+ goal_scoped_pending_approval_count?: number | undefined;
528
+ unrelated_pending_approval_count?: number | undefined;
518
529
  }, {
519
- status: "unknown" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure" | "blocked";
530
+ status: "unknown" | "blocked" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure";
520
531
  checked_at: number;
521
532
  reason?: string | undefined;
522
533
  observed_at?: number | undefined;
534
+ active_goal_ids?: string[] | undefined;
535
+ pending_approval_count?: number | undefined;
536
+ goal_scoped_pending_approval_count?: number | undefined;
537
+ unrelated_pending_approval_count?: number | undefined;
523
538
  }>;
524
539
  expected_next_checkpoint_at: z.ZodOptional<z.ZodNumber>;
525
540
  resumable: z.ZodOptional<z.ZodBoolean>;
@@ -565,14 +580,19 @@ export declare const RuntimeLongRunHealthSignalsSchema: z.ZodObject<{
565
580
  current_value?: number | undefined;
566
581
  previous_value?: number | undefined;
567
582
  reason?: string | undefined;
583
+ direction?: "maximize" | "minimize" | undefined;
568
584
  observed_at?: number | undefined;
569
585
  metric_name?: string | undefined;
570
586
  };
571
587
  blocker: {
572
- status: "unknown" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure" | "blocked";
588
+ status: "unknown" | "blocked" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure";
573
589
  checked_at: number;
574
590
  reason?: string | undefined;
575
591
  observed_at?: number | undefined;
592
+ active_goal_ids?: string[] | undefined;
593
+ pending_approval_count?: number | undefined;
594
+ goal_scoped_pending_approval_count?: number | undefined;
595
+ unrelated_pending_approval_count?: number | undefined;
576
596
  };
577
597
  expected_next_checkpoint_at?: number | undefined;
578
598
  resumable?: boolean | undefined;
@@ -618,14 +638,19 @@ export declare const RuntimeLongRunHealthSignalsSchema: z.ZodObject<{
618
638
  current_value?: number | undefined;
619
639
  previous_value?: number | undefined;
620
640
  reason?: string | undefined;
641
+ direction?: "maximize" | "minimize" | undefined;
621
642
  observed_at?: number | undefined;
622
643
  metric_name?: string | undefined;
623
644
  };
624
645
  blocker: {
625
- status: "unknown" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure" | "blocked";
646
+ status: "unknown" | "blocked" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure";
626
647
  checked_at: number;
627
648
  reason?: string | undefined;
628
649
  observed_at?: number | undefined;
650
+ active_goal_ids?: string[] | undefined;
651
+ pending_approval_count?: number | undefined;
652
+ goal_scoped_pending_approval_count?: number | undefined;
653
+ unrelated_pending_approval_count?: number | undefined;
629
654
  };
630
655
  expected_next_checkpoint_at?: number | undefined;
631
656
  resumable?: boolean | undefined;
@@ -742,6 +767,7 @@ export declare const RuntimeLongRunHealthSchema: z.ZodObject<{
742
767
  } & {
743
768
  status: z.ZodEnum<["improved", "plateau", "regressed", "missing", "unknown"]>;
744
769
  metric_name: z.ZodOptional<z.ZodString>;
770
+ direction: z.ZodOptional<z.ZodEnum<["maximize", "minimize"]>>;
745
771
  previous_value: z.ZodOptional<z.ZodNumber>;
746
772
  current_value: z.ZodOptional<z.ZodNumber>;
747
773
  }, "strip", z.ZodTypeAny, {
@@ -750,6 +776,7 @@ export declare const RuntimeLongRunHealthSchema: z.ZodObject<{
750
776
  current_value?: number | undefined;
751
777
  previous_value?: number | undefined;
752
778
  reason?: string | undefined;
779
+ direction?: "maximize" | "minimize" | undefined;
753
780
  observed_at?: number | undefined;
754
781
  metric_name?: string | undefined;
755
782
  }, {
@@ -758,6 +785,7 @@ export declare const RuntimeLongRunHealthSchema: z.ZodObject<{
758
785
  current_value?: number | undefined;
759
786
  previous_value?: number | undefined;
760
787
  reason?: string | undefined;
788
+ direction?: "maximize" | "minimize" | undefined;
761
789
  observed_at?: number | undefined;
762
790
  metric_name?: string | undefined;
763
791
  }>;
@@ -767,16 +795,28 @@ export declare const RuntimeLongRunHealthSchema: z.ZodObject<{
767
795
  reason: z.ZodOptional<z.ZodString>;
768
796
  } & {
769
797
  status: z.ZodEnum<["none", "approval_wait", "auth_wait", "operator_wait", "resource_pressure", "blocked", "unknown"]>;
798
+ active_goal_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
799
+ pending_approval_count: z.ZodOptional<z.ZodNumber>;
800
+ goal_scoped_pending_approval_count: z.ZodOptional<z.ZodNumber>;
801
+ unrelated_pending_approval_count: z.ZodOptional<z.ZodNumber>;
770
802
  }, "strip", z.ZodTypeAny, {
771
- status: "unknown" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure" | "blocked";
803
+ status: "unknown" | "blocked" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure";
772
804
  checked_at: number;
773
805
  reason?: string | undefined;
774
806
  observed_at?: number | undefined;
807
+ active_goal_ids?: string[] | undefined;
808
+ pending_approval_count?: number | undefined;
809
+ goal_scoped_pending_approval_count?: number | undefined;
810
+ unrelated_pending_approval_count?: number | undefined;
775
811
  }, {
776
- status: "unknown" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure" | "blocked";
812
+ status: "unknown" | "blocked" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure";
777
813
  checked_at: number;
778
814
  reason?: string | undefined;
779
815
  observed_at?: number | undefined;
816
+ active_goal_ids?: string[] | undefined;
817
+ pending_approval_count?: number | undefined;
818
+ goal_scoped_pending_approval_count?: number | undefined;
819
+ unrelated_pending_approval_count?: number | undefined;
780
820
  }>;
781
821
  expected_next_checkpoint_at: z.ZodOptional<z.ZodNumber>;
782
822
  resumable: z.ZodOptional<z.ZodBoolean>;
@@ -822,14 +862,19 @@ export declare const RuntimeLongRunHealthSchema: z.ZodObject<{
822
862
  current_value?: number | undefined;
823
863
  previous_value?: number | undefined;
824
864
  reason?: string | undefined;
865
+ direction?: "maximize" | "minimize" | undefined;
825
866
  observed_at?: number | undefined;
826
867
  metric_name?: string | undefined;
827
868
  };
828
869
  blocker: {
829
- status: "unknown" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure" | "blocked";
870
+ status: "unknown" | "blocked" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure";
830
871
  checked_at: number;
831
872
  reason?: string | undefined;
832
873
  observed_at?: number | undefined;
874
+ active_goal_ids?: string[] | undefined;
875
+ pending_approval_count?: number | undefined;
876
+ goal_scoped_pending_approval_count?: number | undefined;
877
+ unrelated_pending_approval_count?: number | undefined;
833
878
  };
834
879
  expected_next_checkpoint_at?: number | undefined;
835
880
  resumable?: boolean | undefined;
@@ -875,14 +920,19 @@ export declare const RuntimeLongRunHealthSchema: z.ZodObject<{
875
920
  current_value?: number | undefined;
876
921
  previous_value?: number | undefined;
877
922
  reason?: string | undefined;
923
+ direction?: "maximize" | "minimize" | undefined;
878
924
  observed_at?: number | undefined;
879
925
  metric_name?: string | undefined;
880
926
  };
881
927
  blocker: {
882
- status: "unknown" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure" | "blocked";
928
+ status: "unknown" | "blocked" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure";
883
929
  checked_at: number;
884
930
  reason?: string | undefined;
885
931
  observed_at?: number | undefined;
932
+ active_goal_ids?: string[] | undefined;
933
+ pending_approval_count?: number | undefined;
934
+ goal_scoped_pending_approval_count?: number | undefined;
935
+ unrelated_pending_approval_count?: number | undefined;
886
936
  };
887
937
  expected_next_checkpoint_at?: number | undefined;
888
938
  resumable?: boolean | undefined;
@@ -932,14 +982,19 @@ export declare const RuntimeLongRunHealthSchema: z.ZodObject<{
932
982
  current_value?: number | undefined;
933
983
  previous_value?: number | undefined;
934
984
  reason?: string | undefined;
985
+ direction?: "maximize" | "minimize" | undefined;
935
986
  observed_at?: number | undefined;
936
987
  metric_name?: string | undefined;
937
988
  };
938
989
  blocker: {
939
- status: "unknown" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure" | "blocked";
990
+ status: "unknown" | "blocked" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure";
940
991
  checked_at: number;
941
992
  reason?: string | undefined;
942
993
  observed_at?: number | undefined;
994
+ active_goal_ids?: string[] | undefined;
995
+ pending_approval_count?: number | undefined;
996
+ goal_scoped_pending_approval_count?: number | undefined;
997
+ unrelated_pending_approval_count?: number | undefined;
943
998
  };
944
999
  expected_next_checkpoint_at?: number | undefined;
945
1000
  resumable?: boolean | undefined;
@@ -989,14 +1044,19 @@ export declare const RuntimeLongRunHealthSchema: z.ZodObject<{
989
1044
  current_value?: number | undefined;
990
1045
  previous_value?: number | undefined;
991
1046
  reason?: string | undefined;
1047
+ direction?: "maximize" | "minimize" | undefined;
992
1048
  observed_at?: number | undefined;
993
1049
  metric_name?: string | undefined;
994
1050
  };
995
1051
  blocker: {
996
- status: "unknown" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure" | "blocked";
1052
+ status: "unknown" | "blocked" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure";
997
1053
  checked_at: number;
998
1054
  reason?: string | undefined;
999
1055
  observed_at?: number | undefined;
1056
+ active_goal_ids?: string[] | undefined;
1057
+ pending_approval_count?: number | undefined;
1058
+ goal_scoped_pending_approval_count?: number | undefined;
1059
+ unrelated_pending_approval_count?: number | undefined;
1000
1060
  };
1001
1061
  expected_next_checkpoint_at?: number | undefined;
1002
1062
  resumable?: boolean | undefined;
@@ -1403,6 +1463,7 @@ export declare const RuntimeDaemonHealthSchema: z.ZodObject<{
1403
1463
  } & {
1404
1464
  status: z.ZodEnum<["improved", "plateau", "regressed", "missing", "unknown"]>;
1405
1465
  metric_name: z.ZodOptional<z.ZodString>;
1466
+ direction: z.ZodOptional<z.ZodEnum<["maximize", "minimize"]>>;
1406
1467
  previous_value: z.ZodOptional<z.ZodNumber>;
1407
1468
  current_value: z.ZodOptional<z.ZodNumber>;
1408
1469
  }, "strip", z.ZodTypeAny, {
@@ -1411,6 +1472,7 @@ export declare const RuntimeDaemonHealthSchema: z.ZodObject<{
1411
1472
  current_value?: number | undefined;
1412
1473
  previous_value?: number | undefined;
1413
1474
  reason?: string | undefined;
1475
+ direction?: "maximize" | "minimize" | undefined;
1414
1476
  observed_at?: number | undefined;
1415
1477
  metric_name?: string | undefined;
1416
1478
  }, {
@@ -1419,6 +1481,7 @@ export declare const RuntimeDaemonHealthSchema: z.ZodObject<{
1419
1481
  current_value?: number | undefined;
1420
1482
  previous_value?: number | undefined;
1421
1483
  reason?: string | undefined;
1484
+ direction?: "maximize" | "minimize" | undefined;
1422
1485
  observed_at?: number | undefined;
1423
1486
  metric_name?: string | undefined;
1424
1487
  }>;
@@ -1428,16 +1491,28 @@ export declare const RuntimeDaemonHealthSchema: z.ZodObject<{
1428
1491
  reason: z.ZodOptional<z.ZodString>;
1429
1492
  } & {
1430
1493
  status: z.ZodEnum<["none", "approval_wait", "auth_wait", "operator_wait", "resource_pressure", "blocked", "unknown"]>;
1494
+ active_goal_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1495
+ pending_approval_count: z.ZodOptional<z.ZodNumber>;
1496
+ goal_scoped_pending_approval_count: z.ZodOptional<z.ZodNumber>;
1497
+ unrelated_pending_approval_count: z.ZodOptional<z.ZodNumber>;
1431
1498
  }, "strip", z.ZodTypeAny, {
1432
- status: "unknown" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure" | "blocked";
1499
+ status: "unknown" | "blocked" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure";
1433
1500
  checked_at: number;
1434
1501
  reason?: string | undefined;
1435
1502
  observed_at?: number | undefined;
1503
+ active_goal_ids?: string[] | undefined;
1504
+ pending_approval_count?: number | undefined;
1505
+ goal_scoped_pending_approval_count?: number | undefined;
1506
+ unrelated_pending_approval_count?: number | undefined;
1436
1507
  }, {
1437
- status: "unknown" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure" | "blocked";
1508
+ status: "unknown" | "blocked" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure";
1438
1509
  checked_at: number;
1439
1510
  reason?: string | undefined;
1440
1511
  observed_at?: number | undefined;
1512
+ active_goal_ids?: string[] | undefined;
1513
+ pending_approval_count?: number | undefined;
1514
+ goal_scoped_pending_approval_count?: number | undefined;
1515
+ unrelated_pending_approval_count?: number | undefined;
1441
1516
  }>;
1442
1517
  expected_next_checkpoint_at: z.ZodOptional<z.ZodNumber>;
1443
1518
  resumable: z.ZodOptional<z.ZodBoolean>;
@@ -1483,14 +1558,19 @@ export declare const RuntimeDaemonHealthSchema: z.ZodObject<{
1483
1558
  current_value?: number | undefined;
1484
1559
  previous_value?: number | undefined;
1485
1560
  reason?: string | undefined;
1561
+ direction?: "maximize" | "minimize" | undefined;
1486
1562
  observed_at?: number | undefined;
1487
1563
  metric_name?: string | undefined;
1488
1564
  };
1489
1565
  blocker: {
1490
- status: "unknown" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure" | "blocked";
1566
+ status: "unknown" | "blocked" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure";
1491
1567
  checked_at: number;
1492
1568
  reason?: string | undefined;
1493
1569
  observed_at?: number | undefined;
1570
+ active_goal_ids?: string[] | undefined;
1571
+ pending_approval_count?: number | undefined;
1572
+ goal_scoped_pending_approval_count?: number | undefined;
1573
+ unrelated_pending_approval_count?: number | undefined;
1494
1574
  };
1495
1575
  expected_next_checkpoint_at?: number | undefined;
1496
1576
  resumable?: boolean | undefined;
@@ -1536,14 +1616,19 @@ export declare const RuntimeDaemonHealthSchema: z.ZodObject<{
1536
1616
  current_value?: number | undefined;
1537
1617
  previous_value?: number | undefined;
1538
1618
  reason?: string | undefined;
1619
+ direction?: "maximize" | "minimize" | undefined;
1539
1620
  observed_at?: number | undefined;
1540
1621
  metric_name?: string | undefined;
1541
1622
  };
1542
1623
  blocker: {
1543
- status: "unknown" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure" | "blocked";
1624
+ status: "unknown" | "blocked" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure";
1544
1625
  checked_at: number;
1545
1626
  reason?: string | undefined;
1546
1627
  observed_at?: number | undefined;
1628
+ active_goal_ids?: string[] | undefined;
1629
+ pending_approval_count?: number | undefined;
1630
+ goal_scoped_pending_approval_count?: number | undefined;
1631
+ unrelated_pending_approval_count?: number | undefined;
1547
1632
  };
1548
1633
  expected_next_checkpoint_at?: number | undefined;
1549
1634
  resumable?: boolean | undefined;
@@ -1593,14 +1678,19 @@ export declare const RuntimeDaemonHealthSchema: z.ZodObject<{
1593
1678
  current_value?: number | undefined;
1594
1679
  previous_value?: number | undefined;
1595
1680
  reason?: string | undefined;
1681
+ direction?: "maximize" | "minimize" | undefined;
1596
1682
  observed_at?: number | undefined;
1597
1683
  metric_name?: string | undefined;
1598
1684
  };
1599
1685
  blocker: {
1600
- status: "unknown" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure" | "blocked";
1686
+ status: "unknown" | "blocked" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure";
1601
1687
  checked_at: number;
1602
1688
  reason?: string | undefined;
1603
1689
  observed_at?: number | undefined;
1690
+ active_goal_ids?: string[] | undefined;
1691
+ pending_approval_count?: number | undefined;
1692
+ goal_scoped_pending_approval_count?: number | undefined;
1693
+ unrelated_pending_approval_count?: number | undefined;
1604
1694
  };
1605
1695
  expected_next_checkpoint_at?: number | undefined;
1606
1696
  resumable?: boolean | undefined;
@@ -1650,14 +1740,19 @@ export declare const RuntimeDaemonHealthSchema: z.ZodObject<{
1650
1740
  current_value?: number | undefined;
1651
1741
  previous_value?: number | undefined;
1652
1742
  reason?: string | undefined;
1743
+ direction?: "maximize" | "minimize" | undefined;
1653
1744
  observed_at?: number | undefined;
1654
1745
  metric_name?: string | undefined;
1655
1746
  };
1656
1747
  blocker: {
1657
- status: "unknown" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure" | "blocked";
1748
+ status: "unknown" | "blocked" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure";
1658
1749
  checked_at: number;
1659
1750
  reason?: string | undefined;
1660
1751
  observed_at?: number | undefined;
1752
+ active_goal_ids?: string[] | undefined;
1753
+ pending_approval_count?: number | undefined;
1754
+ goal_scoped_pending_approval_count?: number | undefined;
1755
+ unrelated_pending_approval_count?: number | undefined;
1661
1756
  };
1662
1757
  expected_next_checkpoint_at?: number | undefined;
1663
1758
  resumable?: boolean | undefined;
@@ -1742,14 +1837,19 @@ export declare const RuntimeDaemonHealthSchema: z.ZodObject<{
1742
1837
  current_value?: number | undefined;
1743
1838
  previous_value?: number | undefined;
1744
1839
  reason?: string | undefined;
1840
+ direction?: "maximize" | "minimize" | undefined;
1745
1841
  observed_at?: number | undefined;
1746
1842
  metric_name?: string | undefined;
1747
1843
  };
1748
1844
  blocker: {
1749
- status: "unknown" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure" | "blocked";
1845
+ status: "unknown" | "blocked" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure";
1750
1846
  checked_at: number;
1751
1847
  reason?: string | undefined;
1752
1848
  observed_at?: number | undefined;
1849
+ active_goal_ids?: string[] | undefined;
1850
+ pending_approval_count?: number | undefined;
1851
+ goal_scoped_pending_approval_count?: number | undefined;
1852
+ unrelated_pending_approval_count?: number | undefined;
1753
1853
  };
1754
1854
  expected_next_checkpoint_at?: number | undefined;
1755
1855
  resumable?: boolean | undefined;
@@ -1833,14 +1933,19 @@ export declare const RuntimeDaemonHealthSchema: z.ZodObject<{
1833
1933
  current_value?: number | undefined;
1834
1934
  previous_value?: number | undefined;
1835
1935
  reason?: string | undefined;
1936
+ direction?: "maximize" | "minimize" | undefined;
1836
1937
  observed_at?: number | undefined;
1837
1938
  metric_name?: string | undefined;
1838
1939
  };
1839
1940
  blocker: {
1840
- status: "unknown" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure" | "blocked";
1941
+ status: "unknown" | "blocked" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure";
1841
1942
  checked_at: number;
1842
1943
  reason?: string | undefined;
1843
1944
  observed_at?: number | undefined;
1945
+ active_goal_ids?: string[] | undefined;
1946
+ pending_approval_count?: number | undefined;
1947
+ goal_scoped_pending_approval_count?: number | undefined;
1948
+ unrelated_pending_approval_count?: number | undefined;
1844
1949
  };
1845
1950
  expected_next_checkpoint_at?: number | undefined;
1846
1951
  resumable?: boolean | undefined;
@@ -2099,6 +2204,7 @@ export declare const RuntimeHealthSnapshotSchema: z.ZodObject<{
2099
2204
  } & {
2100
2205
  status: z.ZodEnum<["improved", "plateau", "regressed", "missing", "unknown"]>;
2101
2206
  metric_name: z.ZodOptional<z.ZodString>;
2207
+ direction: z.ZodOptional<z.ZodEnum<["maximize", "minimize"]>>;
2102
2208
  previous_value: z.ZodOptional<z.ZodNumber>;
2103
2209
  current_value: z.ZodOptional<z.ZodNumber>;
2104
2210
  }, "strip", z.ZodTypeAny, {
@@ -2107,6 +2213,7 @@ export declare const RuntimeHealthSnapshotSchema: z.ZodObject<{
2107
2213
  current_value?: number | undefined;
2108
2214
  previous_value?: number | undefined;
2109
2215
  reason?: string | undefined;
2216
+ direction?: "maximize" | "minimize" | undefined;
2110
2217
  observed_at?: number | undefined;
2111
2218
  metric_name?: string | undefined;
2112
2219
  }, {
@@ -2115,6 +2222,7 @@ export declare const RuntimeHealthSnapshotSchema: z.ZodObject<{
2115
2222
  current_value?: number | undefined;
2116
2223
  previous_value?: number | undefined;
2117
2224
  reason?: string | undefined;
2225
+ direction?: "maximize" | "minimize" | undefined;
2118
2226
  observed_at?: number | undefined;
2119
2227
  metric_name?: string | undefined;
2120
2228
  }>;
@@ -2124,16 +2232,28 @@ export declare const RuntimeHealthSnapshotSchema: z.ZodObject<{
2124
2232
  reason: z.ZodOptional<z.ZodString>;
2125
2233
  } & {
2126
2234
  status: z.ZodEnum<["none", "approval_wait", "auth_wait", "operator_wait", "resource_pressure", "blocked", "unknown"]>;
2235
+ active_goal_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2236
+ pending_approval_count: z.ZodOptional<z.ZodNumber>;
2237
+ goal_scoped_pending_approval_count: z.ZodOptional<z.ZodNumber>;
2238
+ unrelated_pending_approval_count: z.ZodOptional<z.ZodNumber>;
2127
2239
  }, "strip", z.ZodTypeAny, {
2128
- status: "unknown" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure" | "blocked";
2240
+ status: "unknown" | "blocked" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure";
2129
2241
  checked_at: number;
2130
2242
  reason?: string | undefined;
2131
2243
  observed_at?: number | undefined;
2244
+ active_goal_ids?: string[] | undefined;
2245
+ pending_approval_count?: number | undefined;
2246
+ goal_scoped_pending_approval_count?: number | undefined;
2247
+ unrelated_pending_approval_count?: number | undefined;
2132
2248
  }, {
2133
- status: "unknown" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure" | "blocked";
2249
+ status: "unknown" | "blocked" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure";
2134
2250
  checked_at: number;
2135
2251
  reason?: string | undefined;
2136
2252
  observed_at?: number | undefined;
2253
+ active_goal_ids?: string[] | undefined;
2254
+ pending_approval_count?: number | undefined;
2255
+ goal_scoped_pending_approval_count?: number | undefined;
2256
+ unrelated_pending_approval_count?: number | undefined;
2137
2257
  }>;
2138
2258
  expected_next_checkpoint_at: z.ZodOptional<z.ZodNumber>;
2139
2259
  resumable: z.ZodOptional<z.ZodBoolean>;
@@ -2179,14 +2299,19 @@ export declare const RuntimeHealthSnapshotSchema: z.ZodObject<{
2179
2299
  current_value?: number | undefined;
2180
2300
  previous_value?: number | undefined;
2181
2301
  reason?: string | undefined;
2302
+ direction?: "maximize" | "minimize" | undefined;
2182
2303
  observed_at?: number | undefined;
2183
2304
  metric_name?: string | undefined;
2184
2305
  };
2185
2306
  blocker: {
2186
- status: "unknown" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure" | "blocked";
2307
+ status: "unknown" | "blocked" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure";
2187
2308
  checked_at: number;
2188
2309
  reason?: string | undefined;
2189
2310
  observed_at?: number | undefined;
2311
+ active_goal_ids?: string[] | undefined;
2312
+ pending_approval_count?: number | undefined;
2313
+ goal_scoped_pending_approval_count?: number | undefined;
2314
+ unrelated_pending_approval_count?: number | undefined;
2190
2315
  };
2191
2316
  expected_next_checkpoint_at?: number | undefined;
2192
2317
  resumable?: boolean | undefined;
@@ -2232,14 +2357,19 @@ export declare const RuntimeHealthSnapshotSchema: z.ZodObject<{
2232
2357
  current_value?: number | undefined;
2233
2358
  previous_value?: number | undefined;
2234
2359
  reason?: string | undefined;
2360
+ direction?: "maximize" | "minimize" | undefined;
2235
2361
  observed_at?: number | undefined;
2236
2362
  metric_name?: string | undefined;
2237
2363
  };
2238
2364
  blocker: {
2239
- status: "unknown" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure" | "blocked";
2365
+ status: "unknown" | "blocked" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure";
2240
2366
  checked_at: number;
2241
2367
  reason?: string | undefined;
2242
2368
  observed_at?: number | undefined;
2369
+ active_goal_ids?: string[] | undefined;
2370
+ pending_approval_count?: number | undefined;
2371
+ goal_scoped_pending_approval_count?: number | undefined;
2372
+ unrelated_pending_approval_count?: number | undefined;
2243
2373
  };
2244
2374
  expected_next_checkpoint_at?: number | undefined;
2245
2375
  resumable?: boolean | undefined;
@@ -2289,14 +2419,19 @@ export declare const RuntimeHealthSnapshotSchema: z.ZodObject<{
2289
2419
  current_value?: number | undefined;
2290
2420
  previous_value?: number | undefined;
2291
2421
  reason?: string | undefined;
2422
+ direction?: "maximize" | "minimize" | undefined;
2292
2423
  observed_at?: number | undefined;
2293
2424
  metric_name?: string | undefined;
2294
2425
  };
2295
2426
  blocker: {
2296
- status: "unknown" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure" | "blocked";
2427
+ status: "unknown" | "blocked" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure";
2297
2428
  checked_at: number;
2298
2429
  reason?: string | undefined;
2299
2430
  observed_at?: number | undefined;
2431
+ active_goal_ids?: string[] | undefined;
2432
+ pending_approval_count?: number | undefined;
2433
+ goal_scoped_pending_approval_count?: number | undefined;
2434
+ unrelated_pending_approval_count?: number | undefined;
2300
2435
  };
2301
2436
  expected_next_checkpoint_at?: number | undefined;
2302
2437
  resumable?: boolean | undefined;
@@ -2346,14 +2481,19 @@ export declare const RuntimeHealthSnapshotSchema: z.ZodObject<{
2346
2481
  current_value?: number | undefined;
2347
2482
  previous_value?: number | undefined;
2348
2483
  reason?: string | undefined;
2484
+ direction?: "maximize" | "minimize" | undefined;
2349
2485
  observed_at?: number | undefined;
2350
2486
  metric_name?: string | undefined;
2351
2487
  };
2352
2488
  blocker: {
2353
- status: "unknown" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure" | "blocked";
2489
+ status: "unknown" | "blocked" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure";
2354
2490
  checked_at: number;
2355
2491
  reason?: string | undefined;
2356
2492
  observed_at?: number | undefined;
2493
+ active_goal_ids?: string[] | undefined;
2494
+ pending_approval_count?: number | undefined;
2495
+ goal_scoped_pending_approval_count?: number | undefined;
2496
+ unrelated_pending_approval_count?: number | undefined;
2357
2497
  };
2358
2498
  expected_next_checkpoint_at?: number | undefined;
2359
2499
  resumable?: boolean | undefined;
@@ -2439,14 +2579,19 @@ export declare const RuntimeHealthSnapshotSchema: z.ZodObject<{
2439
2579
  current_value?: number | undefined;
2440
2580
  previous_value?: number | undefined;
2441
2581
  reason?: string | undefined;
2582
+ direction?: "maximize" | "minimize" | undefined;
2442
2583
  observed_at?: number | undefined;
2443
2584
  metric_name?: string | undefined;
2444
2585
  };
2445
2586
  blocker: {
2446
- status: "unknown" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure" | "blocked";
2587
+ status: "unknown" | "blocked" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure";
2447
2588
  checked_at: number;
2448
2589
  reason?: string | undefined;
2449
2590
  observed_at?: number | undefined;
2591
+ active_goal_ids?: string[] | undefined;
2592
+ pending_approval_count?: number | undefined;
2593
+ goal_scoped_pending_approval_count?: number | undefined;
2594
+ unrelated_pending_approval_count?: number | undefined;
2450
2595
  };
2451
2596
  expected_next_checkpoint_at?: number | undefined;
2452
2597
  resumable?: boolean | undefined;
@@ -2531,14 +2676,19 @@ export declare const RuntimeHealthSnapshotSchema: z.ZodObject<{
2531
2676
  current_value?: number | undefined;
2532
2677
  previous_value?: number | undefined;
2533
2678
  reason?: string | undefined;
2679
+ direction?: "maximize" | "minimize" | undefined;
2534
2680
  observed_at?: number | undefined;
2535
2681
  metric_name?: string | undefined;
2536
2682
  };
2537
2683
  blocker: {
2538
- status: "unknown" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure" | "blocked";
2684
+ status: "unknown" | "blocked" | "none" | "approval_wait" | "auth_wait" | "operator_wait" | "resource_pressure";
2539
2685
  checked_at: number;
2540
2686
  reason?: string | undefined;
2541
2687
  observed_at?: number | undefined;
2688
+ active_goal_ids?: string[] | undefined;
2689
+ pending_approval_count?: number | undefined;
2690
+ goal_scoped_pending_approval_count?: number | undefined;
2691
+ unrelated_pending_approval_count?: number | undefined;
2542
2692
  };
2543
2693
  expected_next_checkpoint_at?: number | undefined;
2544
2694
  resumable?: boolean | undefined;
@@ -2565,7 +2715,7 @@ export declare const BrowserAutomationSessionRecordSchema: z.ZodObject<{
2565
2715
  }, "strip", z.ZodTypeAny, {
2566
2716
  created_at: string;
2567
2717
  updated_at: string;
2568
- state: "expired" | "fresh" | "blocked" | "authenticated" | "auth_required" | "unavailable";
2718
+ state: "blocked" | "expired" | "unavailable" | "fresh" | "authenticated" | "auth_required";
2569
2719
  session_id: string;
2570
2720
  provider_id: string;
2571
2721
  service_key: string;
@@ -2579,7 +2729,7 @@ export declare const BrowserAutomationSessionRecordSchema: z.ZodObject<{
2579
2729
  }, {
2580
2730
  created_at: string;
2581
2731
  updated_at: string;
2582
- state: "expired" | "fresh" | "blocked" | "authenticated" | "auth_required" | "unavailable";
2732
+ state: "blocked" | "expired" | "unavailable" | "fresh" | "authenticated" | "auth_required";
2583
2733
  session_id: string;
2584
2734
  provider_id: string;
2585
2735
  service_key: string;
@@ -2592,6 +2742,211 @@ export declare const BrowserAutomationSessionRecordSchema: z.ZodObject<{
2592
2742
  last_failure_message?: string | null | undefined;
2593
2743
  }>;
2594
2744
  export type BrowserAutomationSessionRecord = z.infer<typeof BrowserAutomationSessionRecordSchema>;
2745
+ export declare const RuntimeAuthHandoffStateSchema: z.ZodEnum<["requested", "pending_operator", "in_progress", "completed", "cancelled", "expired", "superseded", "blocked"]>;
2746
+ export type RuntimeAuthHandoffState = z.infer<typeof RuntimeAuthHandoffStateSchema>;
2747
+ export declare const RuntimeAuthHandoffRecordSchema: z.ZodObject<{
2748
+ schema_version: z.ZodLiteral<"runtime-auth-handoff-v1">;
2749
+ handoff_id: z.ZodString;
2750
+ provider_id: z.ZodString;
2751
+ service_key: z.ZodString;
2752
+ workspace: z.ZodString;
2753
+ actor_key: z.ZodString;
2754
+ state: z.ZodEnum<["requested", "pending_operator", "in_progress", "completed", "cancelled", "expired", "superseded", "blocked"]>;
2755
+ requested_at: z.ZodString;
2756
+ updated_at: z.ZodString;
2757
+ expires_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2758
+ completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2759
+ browser_session_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2760
+ resumable_session_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2761
+ supersedes_handoff_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2762
+ superseded_by_handoff_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2763
+ reply_target: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2764
+ surface: z.ZodOptional<z.ZodEnum<["chat", "gateway", "cli", "tui"]>>;
2765
+ channel: z.ZodOptional<z.ZodEnum<["tui", "plugin_gateway", "cli", "web"]>>;
2766
+ platform: z.ZodOptional<z.ZodString>;
2767
+ conversation_id: z.ZodOptional<z.ZodString>;
2768
+ message_id: z.ZodOptional<z.ZodString>;
2769
+ response_channel: z.ZodOptional<z.ZodString>;
2770
+ outbox_topic: z.ZodOptional<z.ZodString>;
2771
+ identity_key: z.ZodOptional<z.ZodString>;
2772
+ user_id: z.ZodOptional<z.ZodString>;
2773
+ deliveryMode: z.ZodOptional<z.ZodEnum<["reply", "notify", "thread_reply"]>>;
2774
+ delivery_mode: z.ZodOptional<z.ZodEnum<["reply", "notify", "thread_reply"]>>;
2775
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2776
+ }, "strip", z.ZodTypeAny, {
2777
+ metadata?: Record<string, unknown> | undefined;
2778
+ surface?: "chat" | "gateway" | "cli" | "tui" | undefined;
2779
+ platform?: string | undefined;
2780
+ conversation_id?: string | undefined;
2781
+ identity_key?: string | undefined;
2782
+ user_id?: string | undefined;
2783
+ channel?: "web" | "cli" | "tui" | "plugin_gateway" | undefined;
2784
+ message_id?: string | undefined;
2785
+ response_channel?: string | undefined;
2786
+ outbox_topic?: string | undefined;
2787
+ deliveryMode?: "reply" | "notify" | "thread_reply" | undefined;
2788
+ delivery_mode?: "reply" | "notify" | "thread_reply" | undefined;
2789
+ }, {
2790
+ metadata?: Record<string, unknown> | undefined;
2791
+ surface?: "chat" | "gateway" | "cli" | "tui" | undefined;
2792
+ platform?: string | undefined;
2793
+ conversation_id?: string | undefined;
2794
+ identity_key?: string | undefined;
2795
+ user_id?: string | undefined;
2796
+ channel?: "web" | "cli" | "tui" | "plugin_gateway" | undefined;
2797
+ message_id?: string | undefined;
2798
+ response_channel?: string | undefined;
2799
+ outbox_topic?: string | undefined;
2800
+ deliveryMode?: "reply" | "notify" | "thread_reply" | undefined;
2801
+ delivery_mode?: "reply" | "notify" | "thread_reply" | undefined;
2802
+ }>>>;
2803
+ requested_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2804
+ surface: z.ZodEnum<["chat", "gateway", "cli", "tui"]>;
2805
+ platform: z.ZodOptional<z.ZodString>;
2806
+ conversation_id: z.ZodOptional<z.ZodString>;
2807
+ identity_key: z.ZodOptional<z.ZodString>;
2808
+ user_id: z.ZodOptional<z.ZodString>;
2809
+ }, "strip", z.ZodTypeAny, {
2810
+ surface: "chat" | "gateway" | "cli" | "tui";
2811
+ platform?: string | undefined;
2812
+ conversation_id?: string | undefined;
2813
+ identity_key?: string | undefined;
2814
+ user_id?: string | undefined;
2815
+ }, {
2816
+ surface: "chat" | "gateway" | "cli" | "tui";
2817
+ platform?: string | undefined;
2818
+ conversation_id?: string | undefined;
2819
+ identity_key?: string | undefined;
2820
+ user_id?: string | undefined;
2821
+ }>>>;
2822
+ failure_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2823
+ failure_message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2824
+ resume_hint: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2825
+ tool_name: z.ZodLiteral<"browser_run_workflow">;
2826
+ input_ref: z.ZodOptional<z.ZodString>;
2827
+ task_summary: z.ZodString;
2828
+ }, "strip", z.ZodTypeAny, {
2829
+ tool_name: "browser_run_workflow";
2830
+ task_summary: string;
2831
+ input_ref?: string | undefined;
2832
+ }, {
2833
+ tool_name: "browser_run_workflow";
2834
+ task_summary: string;
2835
+ input_ref?: string | undefined;
2836
+ }>>>;
2837
+ evidence_refs: z.ZodDefault<z.ZodArray<z.ZodObject<{
2838
+ kind: z.ZodString;
2839
+ ref: z.ZodString;
2840
+ observed_at: z.ZodOptional<z.ZodString>;
2841
+ }, "strip", z.ZodTypeAny, {
2842
+ kind: string;
2843
+ ref: string;
2844
+ observed_at?: string | undefined;
2845
+ }, {
2846
+ kind: string;
2847
+ ref: string;
2848
+ observed_at?: string | undefined;
2849
+ }>, "many">>;
2850
+ }, "strip", z.ZodTypeAny, {
2851
+ updated_at: string;
2852
+ schema_version: "runtime-auth-handoff-v1";
2853
+ evidence_refs: {
2854
+ kind: string;
2855
+ ref: string;
2856
+ observed_at?: string | undefined;
2857
+ }[];
2858
+ state: "completed" | "cancelled" | "blocked" | "expired" | "in_progress" | "requested" | "pending_operator" | "superseded";
2859
+ requested_at: string;
2860
+ handoff_id: string;
2861
+ provider_id: string;
2862
+ service_key: string;
2863
+ workspace: string;
2864
+ actor_key: string;
2865
+ completed_at?: string | null | undefined;
2866
+ resume_hint?: {
2867
+ tool_name: "browser_run_workflow";
2868
+ task_summary: string;
2869
+ input_ref?: string | undefined;
2870
+ } | null | undefined;
2871
+ requested_by?: {
2872
+ surface: "chat" | "gateway" | "cli" | "tui";
2873
+ platform?: string | undefined;
2874
+ conversation_id?: string | undefined;
2875
+ identity_key?: string | undefined;
2876
+ user_id?: string | undefined;
2877
+ } | null | undefined;
2878
+ reply_target?: {
2879
+ metadata?: Record<string, unknown> | undefined;
2880
+ surface?: "chat" | "gateway" | "cli" | "tui" | undefined;
2881
+ platform?: string | undefined;
2882
+ conversation_id?: string | undefined;
2883
+ identity_key?: string | undefined;
2884
+ user_id?: string | undefined;
2885
+ channel?: "web" | "cli" | "tui" | "plugin_gateway" | undefined;
2886
+ message_id?: string | undefined;
2887
+ response_channel?: string | undefined;
2888
+ outbox_topic?: string | undefined;
2889
+ deliveryMode?: "reply" | "notify" | "thread_reply" | undefined;
2890
+ delivery_mode?: "reply" | "notify" | "thread_reply" | undefined;
2891
+ } | null | undefined;
2892
+ expires_at?: string | null | undefined;
2893
+ browser_session_id?: string | null | undefined;
2894
+ resumable_session_id?: string | null | undefined;
2895
+ supersedes_handoff_id?: string | null | undefined;
2896
+ superseded_by_handoff_id?: string | null | undefined;
2897
+ failure_code?: string | null | undefined;
2898
+ failure_message?: string | null | undefined;
2899
+ }, {
2900
+ updated_at: string;
2901
+ schema_version: "runtime-auth-handoff-v1";
2902
+ state: "completed" | "cancelled" | "blocked" | "expired" | "in_progress" | "requested" | "pending_operator" | "superseded";
2903
+ requested_at: string;
2904
+ handoff_id: string;
2905
+ provider_id: string;
2906
+ service_key: string;
2907
+ workspace: string;
2908
+ actor_key: string;
2909
+ completed_at?: string | null | undefined;
2910
+ evidence_refs?: {
2911
+ kind: string;
2912
+ ref: string;
2913
+ observed_at?: string | undefined;
2914
+ }[] | undefined;
2915
+ resume_hint?: {
2916
+ tool_name: "browser_run_workflow";
2917
+ task_summary: string;
2918
+ input_ref?: string | undefined;
2919
+ } | null | undefined;
2920
+ requested_by?: {
2921
+ surface: "chat" | "gateway" | "cli" | "tui";
2922
+ platform?: string | undefined;
2923
+ conversation_id?: string | undefined;
2924
+ identity_key?: string | undefined;
2925
+ user_id?: string | undefined;
2926
+ } | null | undefined;
2927
+ reply_target?: {
2928
+ metadata?: Record<string, unknown> | undefined;
2929
+ surface?: "chat" | "gateway" | "cli" | "tui" | undefined;
2930
+ platform?: string | undefined;
2931
+ conversation_id?: string | undefined;
2932
+ identity_key?: string | undefined;
2933
+ user_id?: string | undefined;
2934
+ channel?: "web" | "cli" | "tui" | "plugin_gateway" | undefined;
2935
+ message_id?: string | undefined;
2936
+ response_channel?: string | undefined;
2937
+ outbox_topic?: string | undefined;
2938
+ deliveryMode?: "reply" | "notify" | "thread_reply" | undefined;
2939
+ delivery_mode?: "reply" | "notify" | "thread_reply" | undefined;
2940
+ } | null | undefined;
2941
+ expires_at?: string | null | undefined;
2942
+ browser_session_id?: string | null | undefined;
2943
+ resumable_session_id?: string | null | undefined;
2944
+ supersedes_handoff_id?: string | null | undefined;
2945
+ superseded_by_handoff_id?: string | null | undefined;
2946
+ failure_code?: string | null | undefined;
2947
+ failure_message?: string | null | undefined;
2948
+ }>;
2949
+ export type RuntimeAuthHandoffRecord = z.infer<typeof RuntimeAuthHandoffRecordSchema>;
2595
2950
  export declare const CircuitBreakerStateSchema: z.ZodEnum<["closed", "open", "half_open", "paused"]>;
2596
2951
  export type CircuitBreakerState = z.infer<typeof CircuitBreakerStateSchema>;
2597
2952
  export declare const CircuitBreakerRecordSchema: z.ZodObject<{
@@ -2713,6 +3068,1861 @@ export declare const BackpressureSnapshotSchema: z.ZodObject<{
2713
3068
  }[] | undefined;
2714
3069
  }>;
2715
3070
  export type BackpressureSnapshot = z.infer<typeof BackpressureSnapshotSchema>;
3071
+ export declare const RuntimeAutomationSnapshotSchema: z.ZodObject<{
3072
+ schema_version: z.ZodLiteral<"runtime-automation-snapshot-v1">;
3073
+ generated_at: z.ZodString;
3074
+ auth_handoffs: z.ZodObject<{
3075
+ pending: z.ZodArray<z.ZodObject<{
3076
+ schema_version: z.ZodLiteral<"runtime-auth-handoff-v1">;
3077
+ handoff_id: z.ZodString;
3078
+ provider_id: z.ZodString;
3079
+ service_key: z.ZodString;
3080
+ workspace: z.ZodString;
3081
+ actor_key: z.ZodString;
3082
+ state: z.ZodEnum<["requested", "pending_operator", "in_progress", "completed", "cancelled", "expired", "superseded", "blocked"]>;
3083
+ requested_at: z.ZodString;
3084
+ updated_at: z.ZodString;
3085
+ expires_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3086
+ completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3087
+ browser_session_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3088
+ resumable_session_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3089
+ supersedes_handoff_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3090
+ superseded_by_handoff_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3091
+ reply_target: z.ZodOptional<z.ZodNullable<z.ZodObject<{
3092
+ surface: z.ZodOptional<z.ZodEnum<["chat", "gateway", "cli", "tui"]>>;
3093
+ channel: z.ZodOptional<z.ZodEnum<["tui", "plugin_gateway", "cli", "web"]>>;
3094
+ platform: z.ZodOptional<z.ZodString>;
3095
+ conversation_id: z.ZodOptional<z.ZodString>;
3096
+ message_id: z.ZodOptional<z.ZodString>;
3097
+ response_channel: z.ZodOptional<z.ZodString>;
3098
+ outbox_topic: z.ZodOptional<z.ZodString>;
3099
+ identity_key: z.ZodOptional<z.ZodString>;
3100
+ user_id: z.ZodOptional<z.ZodString>;
3101
+ deliveryMode: z.ZodOptional<z.ZodEnum<["reply", "notify", "thread_reply"]>>;
3102
+ delivery_mode: z.ZodOptional<z.ZodEnum<["reply", "notify", "thread_reply"]>>;
3103
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3104
+ }, "strip", z.ZodTypeAny, {
3105
+ metadata?: Record<string, unknown> | undefined;
3106
+ surface?: "chat" | "gateway" | "cli" | "tui" | undefined;
3107
+ platform?: string | undefined;
3108
+ conversation_id?: string | undefined;
3109
+ identity_key?: string | undefined;
3110
+ user_id?: string | undefined;
3111
+ channel?: "web" | "cli" | "tui" | "plugin_gateway" | undefined;
3112
+ message_id?: string | undefined;
3113
+ response_channel?: string | undefined;
3114
+ outbox_topic?: string | undefined;
3115
+ deliveryMode?: "reply" | "notify" | "thread_reply" | undefined;
3116
+ delivery_mode?: "reply" | "notify" | "thread_reply" | undefined;
3117
+ }, {
3118
+ metadata?: Record<string, unknown> | undefined;
3119
+ surface?: "chat" | "gateway" | "cli" | "tui" | undefined;
3120
+ platform?: string | undefined;
3121
+ conversation_id?: string | undefined;
3122
+ identity_key?: string | undefined;
3123
+ user_id?: string | undefined;
3124
+ channel?: "web" | "cli" | "tui" | "plugin_gateway" | undefined;
3125
+ message_id?: string | undefined;
3126
+ response_channel?: string | undefined;
3127
+ outbox_topic?: string | undefined;
3128
+ deliveryMode?: "reply" | "notify" | "thread_reply" | undefined;
3129
+ delivery_mode?: "reply" | "notify" | "thread_reply" | undefined;
3130
+ }>>>;
3131
+ requested_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
3132
+ surface: z.ZodEnum<["chat", "gateway", "cli", "tui"]>;
3133
+ platform: z.ZodOptional<z.ZodString>;
3134
+ conversation_id: z.ZodOptional<z.ZodString>;
3135
+ identity_key: z.ZodOptional<z.ZodString>;
3136
+ user_id: z.ZodOptional<z.ZodString>;
3137
+ }, "strip", z.ZodTypeAny, {
3138
+ surface: "chat" | "gateway" | "cli" | "tui";
3139
+ platform?: string | undefined;
3140
+ conversation_id?: string | undefined;
3141
+ identity_key?: string | undefined;
3142
+ user_id?: string | undefined;
3143
+ }, {
3144
+ surface: "chat" | "gateway" | "cli" | "tui";
3145
+ platform?: string | undefined;
3146
+ conversation_id?: string | undefined;
3147
+ identity_key?: string | undefined;
3148
+ user_id?: string | undefined;
3149
+ }>>>;
3150
+ failure_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3151
+ failure_message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3152
+ resume_hint: z.ZodOptional<z.ZodNullable<z.ZodObject<{
3153
+ tool_name: z.ZodLiteral<"browser_run_workflow">;
3154
+ input_ref: z.ZodOptional<z.ZodString>;
3155
+ task_summary: z.ZodString;
3156
+ }, "strip", z.ZodTypeAny, {
3157
+ tool_name: "browser_run_workflow";
3158
+ task_summary: string;
3159
+ input_ref?: string | undefined;
3160
+ }, {
3161
+ tool_name: "browser_run_workflow";
3162
+ task_summary: string;
3163
+ input_ref?: string | undefined;
3164
+ }>>>;
3165
+ evidence_refs: z.ZodDefault<z.ZodArray<z.ZodObject<{
3166
+ kind: z.ZodString;
3167
+ ref: z.ZodString;
3168
+ observed_at: z.ZodOptional<z.ZodString>;
3169
+ }, "strip", z.ZodTypeAny, {
3170
+ kind: string;
3171
+ ref: string;
3172
+ observed_at?: string | undefined;
3173
+ }, {
3174
+ kind: string;
3175
+ ref: string;
3176
+ observed_at?: string | undefined;
3177
+ }>, "many">>;
3178
+ }, "strip", z.ZodTypeAny, {
3179
+ updated_at: string;
3180
+ schema_version: "runtime-auth-handoff-v1";
3181
+ evidence_refs: {
3182
+ kind: string;
3183
+ ref: string;
3184
+ observed_at?: string | undefined;
3185
+ }[];
3186
+ state: "completed" | "cancelled" | "blocked" | "expired" | "in_progress" | "requested" | "pending_operator" | "superseded";
3187
+ requested_at: string;
3188
+ handoff_id: string;
3189
+ provider_id: string;
3190
+ service_key: string;
3191
+ workspace: string;
3192
+ actor_key: string;
3193
+ completed_at?: string | null | undefined;
3194
+ resume_hint?: {
3195
+ tool_name: "browser_run_workflow";
3196
+ task_summary: string;
3197
+ input_ref?: string | undefined;
3198
+ } | null | undefined;
3199
+ requested_by?: {
3200
+ surface: "chat" | "gateway" | "cli" | "tui";
3201
+ platform?: string | undefined;
3202
+ conversation_id?: string | undefined;
3203
+ identity_key?: string | undefined;
3204
+ user_id?: string | undefined;
3205
+ } | null | undefined;
3206
+ reply_target?: {
3207
+ metadata?: Record<string, unknown> | undefined;
3208
+ surface?: "chat" | "gateway" | "cli" | "tui" | undefined;
3209
+ platform?: string | undefined;
3210
+ conversation_id?: string | undefined;
3211
+ identity_key?: string | undefined;
3212
+ user_id?: string | undefined;
3213
+ channel?: "web" | "cli" | "tui" | "plugin_gateway" | undefined;
3214
+ message_id?: string | undefined;
3215
+ response_channel?: string | undefined;
3216
+ outbox_topic?: string | undefined;
3217
+ deliveryMode?: "reply" | "notify" | "thread_reply" | undefined;
3218
+ delivery_mode?: "reply" | "notify" | "thread_reply" | undefined;
3219
+ } | null | undefined;
3220
+ expires_at?: string | null | undefined;
3221
+ browser_session_id?: string | null | undefined;
3222
+ resumable_session_id?: string | null | undefined;
3223
+ supersedes_handoff_id?: string | null | undefined;
3224
+ superseded_by_handoff_id?: string | null | undefined;
3225
+ failure_code?: string | null | undefined;
3226
+ failure_message?: string | null | undefined;
3227
+ }, {
3228
+ updated_at: string;
3229
+ schema_version: "runtime-auth-handoff-v1";
3230
+ state: "completed" | "cancelled" | "blocked" | "expired" | "in_progress" | "requested" | "pending_operator" | "superseded";
3231
+ requested_at: string;
3232
+ handoff_id: string;
3233
+ provider_id: string;
3234
+ service_key: string;
3235
+ workspace: string;
3236
+ actor_key: string;
3237
+ completed_at?: string | null | undefined;
3238
+ evidence_refs?: {
3239
+ kind: string;
3240
+ ref: string;
3241
+ observed_at?: string | undefined;
3242
+ }[] | undefined;
3243
+ resume_hint?: {
3244
+ tool_name: "browser_run_workflow";
3245
+ task_summary: string;
3246
+ input_ref?: string | undefined;
3247
+ } | null | undefined;
3248
+ requested_by?: {
3249
+ surface: "chat" | "gateway" | "cli" | "tui";
3250
+ platform?: string | undefined;
3251
+ conversation_id?: string | undefined;
3252
+ identity_key?: string | undefined;
3253
+ user_id?: string | undefined;
3254
+ } | null | undefined;
3255
+ reply_target?: {
3256
+ metadata?: Record<string, unknown> | undefined;
3257
+ surface?: "chat" | "gateway" | "cli" | "tui" | undefined;
3258
+ platform?: string | undefined;
3259
+ conversation_id?: string | undefined;
3260
+ identity_key?: string | undefined;
3261
+ user_id?: string | undefined;
3262
+ channel?: "web" | "cli" | "tui" | "plugin_gateway" | undefined;
3263
+ message_id?: string | undefined;
3264
+ response_channel?: string | undefined;
3265
+ outbox_topic?: string | undefined;
3266
+ deliveryMode?: "reply" | "notify" | "thread_reply" | undefined;
3267
+ delivery_mode?: "reply" | "notify" | "thread_reply" | undefined;
3268
+ } | null | undefined;
3269
+ expires_at?: string | null | undefined;
3270
+ browser_session_id?: string | null | undefined;
3271
+ resumable_session_id?: string | null | undefined;
3272
+ supersedes_handoff_id?: string | null | undefined;
3273
+ superseded_by_handoff_id?: string | null | undefined;
3274
+ failure_code?: string | null | undefined;
3275
+ failure_message?: string | null | undefined;
3276
+ }>, "many">;
3277
+ stale: z.ZodArray<z.ZodObject<{
3278
+ schema_version: z.ZodLiteral<"runtime-auth-handoff-v1">;
3279
+ handoff_id: z.ZodString;
3280
+ provider_id: z.ZodString;
3281
+ service_key: z.ZodString;
3282
+ workspace: z.ZodString;
3283
+ actor_key: z.ZodString;
3284
+ state: z.ZodEnum<["requested", "pending_operator", "in_progress", "completed", "cancelled", "expired", "superseded", "blocked"]>;
3285
+ requested_at: z.ZodString;
3286
+ updated_at: z.ZodString;
3287
+ expires_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3288
+ completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3289
+ browser_session_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3290
+ resumable_session_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3291
+ supersedes_handoff_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3292
+ superseded_by_handoff_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3293
+ reply_target: z.ZodOptional<z.ZodNullable<z.ZodObject<{
3294
+ surface: z.ZodOptional<z.ZodEnum<["chat", "gateway", "cli", "tui"]>>;
3295
+ channel: z.ZodOptional<z.ZodEnum<["tui", "plugin_gateway", "cli", "web"]>>;
3296
+ platform: z.ZodOptional<z.ZodString>;
3297
+ conversation_id: z.ZodOptional<z.ZodString>;
3298
+ message_id: z.ZodOptional<z.ZodString>;
3299
+ response_channel: z.ZodOptional<z.ZodString>;
3300
+ outbox_topic: z.ZodOptional<z.ZodString>;
3301
+ identity_key: z.ZodOptional<z.ZodString>;
3302
+ user_id: z.ZodOptional<z.ZodString>;
3303
+ deliveryMode: z.ZodOptional<z.ZodEnum<["reply", "notify", "thread_reply"]>>;
3304
+ delivery_mode: z.ZodOptional<z.ZodEnum<["reply", "notify", "thread_reply"]>>;
3305
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3306
+ }, "strip", z.ZodTypeAny, {
3307
+ metadata?: Record<string, unknown> | undefined;
3308
+ surface?: "chat" | "gateway" | "cli" | "tui" | undefined;
3309
+ platform?: string | undefined;
3310
+ conversation_id?: string | undefined;
3311
+ identity_key?: string | undefined;
3312
+ user_id?: string | undefined;
3313
+ channel?: "web" | "cli" | "tui" | "plugin_gateway" | undefined;
3314
+ message_id?: string | undefined;
3315
+ response_channel?: string | undefined;
3316
+ outbox_topic?: string | undefined;
3317
+ deliveryMode?: "reply" | "notify" | "thread_reply" | undefined;
3318
+ delivery_mode?: "reply" | "notify" | "thread_reply" | undefined;
3319
+ }, {
3320
+ metadata?: Record<string, unknown> | undefined;
3321
+ surface?: "chat" | "gateway" | "cli" | "tui" | undefined;
3322
+ platform?: string | undefined;
3323
+ conversation_id?: string | undefined;
3324
+ identity_key?: string | undefined;
3325
+ user_id?: string | undefined;
3326
+ channel?: "web" | "cli" | "tui" | "plugin_gateway" | undefined;
3327
+ message_id?: string | undefined;
3328
+ response_channel?: string | undefined;
3329
+ outbox_topic?: string | undefined;
3330
+ deliveryMode?: "reply" | "notify" | "thread_reply" | undefined;
3331
+ delivery_mode?: "reply" | "notify" | "thread_reply" | undefined;
3332
+ }>>>;
3333
+ requested_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
3334
+ surface: z.ZodEnum<["chat", "gateway", "cli", "tui"]>;
3335
+ platform: z.ZodOptional<z.ZodString>;
3336
+ conversation_id: z.ZodOptional<z.ZodString>;
3337
+ identity_key: z.ZodOptional<z.ZodString>;
3338
+ user_id: z.ZodOptional<z.ZodString>;
3339
+ }, "strip", z.ZodTypeAny, {
3340
+ surface: "chat" | "gateway" | "cli" | "tui";
3341
+ platform?: string | undefined;
3342
+ conversation_id?: string | undefined;
3343
+ identity_key?: string | undefined;
3344
+ user_id?: string | undefined;
3345
+ }, {
3346
+ surface: "chat" | "gateway" | "cli" | "tui";
3347
+ platform?: string | undefined;
3348
+ conversation_id?: string | undefined;
3349
+ identity_key?: string | undefined;
3350
+ user_id?: string | undefined;
3351
+ }>>>;
3352
+ failure_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3353
+ failure_message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3354
+ resume_hint: z.ZodOptional<z.ZodNullable<z.ZodObject<{
3355
+ tool_name: z.ZodLiteral<"browser_run_workflow">;
3356
+ input_ref: z.ZodOptional<z.ZodString>;
3357
+ task_summary: z.ZodString;
3358
+ }, "strip", z.ZodTypeAny, {
3359
+ tool_name: "browser_run_workflow";
3360
+ task_summary: string;
3361
+ input_ref?: string | undefined;
3362
+ }, {
3363
+ tool_name: "browser_run_workflow";
3364
+ task_summary: string;
3365
+ input_ref?: string | undefined;
3366
+ }>>>;
3367
+ evidence_refs: z.ZodDefault<z.ZodArray<z.ZodObject<{
3368
+ kind: z.ZodString;
3369
+ ref: z.ZodString;
3370
+ observed_at: z.ZodOptional<z.ZodString>;
3371
+ }, "strip", z.ZodTypeAny, {
3372
+ kind: string;
3373
+ ref: string;
3374
+ observed_at?: string | undefined;
3375
+ }, {
3376
+ kind: string;
3377
+ ref: string;
3378
+ observed_at?: string | undefined;
3379
+ }>, "many">>;
3380
+ }, "strip", z.ZodTypeAny, {
3381
+ updated_at: string;
3382
+ schema_version: "runtime-auth-handoff-v1";
3383
+ evidence_refs: {
3384
+ kind: string;
3385
+ ref: string;
3386
+ observed_at?: string | undefined;
3387
+ }[];
3388
+ state: "completed" | "cancelled" | "blocked" | "expired" | "in_progress" | "requested" | "pending_operator" | "superseded";
3389
+ requested_at: string;
3390
+ handoff_id: string;
3391
+ provider_id: string;
3392
+ service_key: string;
3393
+ workspace: string;
3394
+ actor_key: string;
3395
+ completed_at?: string | null | undefined;
3396
+ resume_hint?: {
3397
+ tool_name: "browser_run_workflow";
3398
+ task_summary: string;
3399
+ input_ref?: string | undefined;
3400
+ } | null | undefined;
3401
+ requested_by?: {
3402
+ surface: "chat" | "gateway" | "cli" | "tui";
3403
+ platform?: string | undefined;
3404
+ conversation_id?: string | undefined;
3405
+ identity_key?: string | undefined;
3406
+ user_id?: string | undefined;
3407
+ } | null | undefined;
3408
+ reply_target?: {
3409
+ metadata?: Record<string, unknown> | undefined;
3410
+ surface?: "chat" | "gateway" | "cli" | "tui" | undefined;
3411
+ platform?: string | undefined;
3412
+ conversation_id?: string | undefined;
3413
+ identity_key?: string | undefined;
3414
+ user_id?: string | undefined;
3415
+ channel?: "web" | "cli" | "tui" | "plugin_gateway" | undefined;
3416
+ message_id?: string | undefined;
3417
+ response_channel?: string | undefined;
3418
+ outbox_topic?: string | undefined;
3419
+ deliveryMode?: "reply" | "notify" | "thread_reply" | undefined;
3420
+ delivery_mode?: "reply" | "notify" | "thread_reply" | undefined;
3421
+ } | null | undefined;
3422
+ expires_at?: string | null | undefined;
3423
+ browser_session_id?: string | null | undefined;
3424
+ resumable_session_id?: string | null | undefined;
3425
+ supersedes_handoff_id?: string | null | undefined;
3426
+ superseded_by_handoff_id?: string | null | undefined;
3427
+ failure_code?: string | null | undefined;
3428
+ failure_message?: string | null | undefined;
3429
+ }, {
3430
+ updated_at: string;
3431
+ schema_version: "runtime-auth-handoff-v1";
3432
+ state: "completed" | "cancelled" | "blocked" | "expired" | "in_progress" | "requested" | "pending_operator" | "superseded";
3433
+ requested_at: string;
3434
+ handoff_id: string;
3435
+ provider_id: string;
3436
+ service_key: string;
3437
+ workspace: string;
3438
+ actor_key: string;
3439
+ completed_at?: string | null | undefined;
3440
+ evidence_refs?: {
3441
+ kind: string;
3442
+ ref: string;
3443
+ observed_at?: string | undefined;
3444
+ }[] | undefined;
3445
+ resume_hint?: {
3446
+ tool_name: "browser_run_workflow";
3447
+ task_summary: string;
3448
+ input_ref?: string | undefined;
3449
+ } | null | undefined;
3450
+ requested_by?: {
3451
+ surface: "chat" | "gateway" | "cli" | "tui";
3452
+ platform?: string | undefined;
3453
+ conversation_id?: string | undefined;
3454
+ identity_key?: string | undefined;
3455
+ user_id?: string | undefined;
3456
+ } | null | undefined;
3457
+ reply_target?: {
3458
+ metadata?: Record<string, unknown> | undefined;
3459
+ surface?: "chat" | "gateway" | "cli" | "tui" | undefined;
3460
+ platform?: string | undefined;
3461
+ conversation_id?: string | undefined;
3462
+ identity_key?: string | undefined;
3463
+ user_id?: string | undefined;
3464
+ channel?: "web" | "cli" | "tui" | "plugin_gateway" | undefined;
3465
+ message_id?: string | undefined;
3466
+ response_channel?: string | undefined;
3467
+ outbox_topic?: string | undefined;
3468
+ deliveryMode?: "reply" | "notify" | "thread_reply" | undefined;
3469
+ delivery_mode?: "reply" | "notify" | "thread_reply" | undefined;
3470
+ } | null | undefined;
3471
+ expires_at?: string | null | undefined;
3472
+ browser_session_id?: string | null | undefined;
3473
+ resumable_session_id?: string | null | undefined;
3474
+ supersedes_handoff_id?: string | null | undefined;
3475
+ superseded_by_handoff_id?: string | null | undefined;
3476
+ failure_code?: string | null | undefined;
3477
+ failure_message?: string | null | undefined;
3478
+ }>, "many">;
3479
+ recent_terminal: z.ZodArray<z.ZodObject<{
3480
+ schema_version: z.ZodLiteral<"runtime-auth-handoff-v1">;
3481
+ handoff_id: z.ZodString;
3482
+ provider_id: z.ZodString;
3483
+ service_key: z.ZodString;
3484
+ workspace: z.ZodString;
3485
+ actor_key: z.ZodString;
3486
+ state: z.ZodEnum<["requested", "pending_operator", "in_progress", "completed", "cancelled", "expired", "superseded", "blocked"]>;
3487
+ requested_at: z.ZodString;
3488
+ updated_at: z.ZodString;
3489
+ expires_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3490
+ completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3491
+ browser_session_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3492
+ resumable_session_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3493
+ supersedes_handoff_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3494
+ superseded_by_handoff_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3495
+ reply_target: z.ZodOptional<z.ZodNullable<z.ZodObject<{
3496
+ surface: z.ZodOptional<z.ZodEnum<["chat", "gateway", "cli", "tui"]>>;
3497
+ channel: z.ZodOptional<z.ZodEnum<["tui", "plugin_gateway", "cli", "web"]>>;
3498
+ platform: z.ZodOptional<z.ZodString>;
3499
+ conversation_id: z.ZodOptional<z.ZodString>;
3500
+ message_id: z.ZodOptional<z.ZodString>;
3501
+ response_channel: z.ZodOptional<z.ZodString>;
3502
+ outbox_topic: z.ZodOptional<z.ZodString>;
3503
+ identity_key: z.ZodOptional<z.ZodString>;
3504
+ user_id: z.ZodOptional<z.ZodString>;
3505
+ deliveryMode: z.ZodOptional<z.ZodEnum<["reply", "notify", "thread_reply"]>>;
3506
+ delivery_mode: z.ZodOptional<z.ZodEnum<["reply", "notify", "thread_reply"]>>;
3507
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3508
+ }, "strip", z.ZodTypeAny, {
3509
+ metadata?: Record<string, unknown> | undefined;
3510
+ surface?: "chat" | "gateway" | "cli" | "tui" | undefined;
3511
+ platform?: string | undefined;
3512
+ conversation_id?: string | undefined;
3513
+ identity_key?: string | undefined;
3514
+ user_id?: string | undefined;
3515
+ channel?: "web" | "cli" | "tui" | "plugin_gateway" | undefined;
3516
+ message_id?: string | undefined;
3517
+ response_channel?: string | undefined;
3518
+ outbox_topic?: string | undefined;
3519
+ deliveryMode?: "reply" | "notify" | "thread_reply" | undefined;
3520
+ delivery_mode?: "reply" | "notify" | "thread_reply" | undefined;
3521
+ }, {
3522
+ metadata?: Record<string, unknown> | undefined;
3523
+ surface?: "chat" | "gateway" | "cli" | "tui" | undefined;
3524
+ platform?: string | undefined;
3525
+ conversation_id?: string | undefined;
3526
+ identity_key?: string | undefined;
3527
+ user_id?: string | undefined;
3528
+ channel?: "web" | "cli" | "tui" | "plugin_gateway" | undefined;
3529
+ message_id?: string | undefined;
3530
+ response_channel?: string | undefined;
3531
+ outbox_topic?: string | undefined;
3532
+ deliveryMode?: "reply" | "notify" | "thread_reply" | undefined;
3533
+ delivery_mode?: "reply" | "notify" | "thread_reply" | undefined;
3534
+ }>>>;
3535
+ requested_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
3536
+ surface: z.ZodEnum<["chat", "gateway", "cli", "tui"]>;
3537
+ platform: z.ZodOptional<z.ZodString>;
3538
+ conversation_id: z.ZodOptional<z.ZodString>;
3539
+ identity_key: z.ZodOptional<z.ZodString>;
3540
+ user_id: z.ZodOptional<z.ZodString>;
3541
+ }, "strip", z.ZodTypeAny, {
3542
+ surface: "chat" | "gateway" | "cli" | "tui";
3543
+ platform?: string | undefined;
3544
+ conversation_id?: string | undefined;
3545
+ identity_key?: string | undefined;
3546
+ user_id?: string | undefined;
3547
+ }, {
3548
+ surface: "chat" | "gateway" | "cli" | "tui";
3549
+ platform?: string | undefined;
3550
+ conversation_id?: string | undefined;
3551
+ identity_key?: string | undefined;
3552
+ user_id?: string | undefined;
3553
+ }>>>;
3554
+ failure_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3555
+ failure_message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3556
+ resume_hint: z.ZodOptional<z.ZodNullable<z.ZodObject<{
3557
+ tool_name: z.ZodLiteral<"browser_run_workflow">;
3558
+ input_ref: z.ZodOptional<z.ZodString>;
3559
+ task_summary: z.ZodString;
3560
+ }, "strip", z.ZodTypeAny, {
3561
+ tool_name: "browser_run_workflow";
3562
+ task_summary: string;
3563
+ input_ref?: string | undefined;
3564
+ }, {
3565
+ tool_name: "browser_run_workflow";
3566
+ task_summary: string;
3567
+ input_ref?: string | undefined;
3568
+ }>>>;
3569
+ evidence_refs: z.ZodDefault<z.ZodArray<z.ZodObject<{
3570
+ kind: z.ZodString;
3571
+ ref: z.ZodString;
3572
+ observed_at: z.ZodOptional<z.ZodString>;
3573
+ }, "strip", z.ZodTypeAny, {
3574
+ kind: string;
3575
+ ref: string;
3576
+ observed_at?: string | undefined;
3577
+ }, {
3578
+ kind: string;
3579
+ ref: string;
3580
+ observed_at?: string | undefined;
3581
+ }>, "many">>;
3582
+ }, "strip", z.ZodTypeAny, {
3583
+ updated_at: string;
3584
+ schema_version: "runtime-auth-handoff-v1";
3585
+ evidence_refs: {
3586
+ kind: string;
3587
+ ref: string;
3588
+ observed_at?: string | undefined;
3589
+ }[];
3590
+ state: "completed" | "cancelled" | "blocked" | "expired" | "in_progress" | "requested" | "pending_operator" | "superseded";
3591
+ requested_at: string;
3592
+ handoff_id: string;
3593
+ provider_id: string;
3594
+ service_key: string;
3595
+ workspace: string;
3596
+ actor_key: string;
3597
+ completed_at?: string | null | undefined;
3598
+ resume_hint?: {
3599
+ tool_name: "browser_run_workflow";
3600
+ task_summary: string;
3601
+ input_ref?: string | undefined;
3602
+ } | null | undefined;
3603
+ requested_by?: {
3604
+ surface: "chat" | "gateway" | "cli" | "tui";
3605
+ platform?: string | undefined;
3606
+ conversation_id?: string | undefined;
3607
+ identity_key?: string | undefined;
3608
+ user_id?: string | undefined;
3609
+ } | null | undefined;
3610
+ reply_target?: {
3611
+ metadata?: Record<string, unknown> | undefined;
3612
+ surface?: "chat" | "gateway" | "cli" | "tui" | undefined;
3613
+ platform?: string | undefined;
3614
+ conversation_id?: string | undefined;
3615
+ identity_key?: string | undefined;
3616
+ user_id?: string | undefined;
3617
+ channel?: "web" | "cli" | "tui" | "plugin_gateway" | undefined;
3618
+ message_id?: string | undefined;
3619
+ response_channel?: string | undefined;
3620
+ outbox_topic?: string | undefined;
3621
+ deliveryMode?: "reply" | "notify" | "thread_reply" | undefined;
3622
+ delivery_mode?: "reply" | "notify" | "thread_reply" | undefined;
3623
+ } | null | undefined;
3624
+ expires_at?: string | null | undefined;
3625
+ browser_session_id?: string | null | undefined;
3626
+ resumable_session_id?: string | null | undefined;
3627
+ supersedes_handoff_id?: string | null | undefined;
3628
+ superseded_by_handoff_id?: string | null | undefined;
3629
+ failure_code?: string | null | undefined;
3630
+ failure_message?: string | null | undefined;
3631
+ }, {
3632
+ updated_at: string;
3633
+ schema_version: "runtime-auth-handoff-v1";
3634
+ state: "completed" | "cancelled" | "blocked" | "expired" | "in_progress" | "requested" | "pending_operator" | "superseded";
3635
+ requested_at: string;
3636
+ handoff_id: string;
3637
+ provider_id: string;
3638
+ service_key: string;
3639
+ workspace: string;
3640
+ actor_key: string;
3641
+ completed_at?: string | null | undefined;
3642
+ evidence_refs?: {
3643
+ kind: string;
3644
+ ref: string;
3645
+ observed_at?: string | undefined;
3646
+ }[] | undefined;
3647
+ resume_hint?: {
3648
+ tool_name: "browser_run_workflow";
3649
+ task_summary: string;
3650
+ input_ref?: string | undefined;
3651
+ } | null | undefined;
3652
+ requested_by?: {
3653
+ surface: "chat" | "gateway" | "cli" | "tui";
3654
+ platform?: string | undefined;
3655
+ conversation_id?: string | undefined;
3656
+ identity_key?: string | undefined;
3657
+ user_id?: string | undefined;
3658
+ } | null | undefined;
3659
+ reply_target?: {
3660
+ metadata?: Record<string, unknown> | undefined;
3661
+ surface?: "chat" | "gateway" | "cli" | "tui" | undefined;
3662
+ platform?: string | undefined;
3663
+ conversation_id?: string | undefined;
3664
+ identity_key?: string | undefined;
3665
+ user_id?: string | undefined;
3666
+ channel?: "web" | "cli" | "tui" | "plugin_gateway" | undefined;
3667
+ message_id?: string | undefined;
3668
+ response_channel?: string | undefined;
3669
+ outbox_topic?: string | undefined;
3670
+ deliveryMode?: "reply" | "notify" | "thread_reply" | undefined;
3671
+ delivery_mode?: "reply" | "notify" | "thread_reply" | undefined;
3672
+ } | null | undefined;
3673
+ expires_at?: string | null | undefined;
3674
+ browser_session_id?: string | null | undefined;
3675
+ resumable_session_id?: string | null | undefined;
3676
+ supersedes_handoff_id?: string | null | undefined;
3677
+ superseded_by_handoff_id?: string | null | undefined;
3678
+ failure_code?: string | null | undefined;
3679
+ failure_message?: string | null | undefined;
3680
+ }>, "many">;
3681
+ }, "strip", z.ZodTypeAny, {
3682
+ pending: {
3683
+ updated_at: string;
3684
+ schema_version: "runtime-auth-handoff-v1";
3685
+ evidence_refs: {
3686
+ kind: string;
3687
+ ref: string;
3688
+ observed_at?: string | undefined;
3689
+ }[];
3690
+ state: "completed" | "cancelled" | "blocked" | "expired" | "in_progress" | "requested" | "pending_operator" | "superseded";
3691
+ requested_at: string;
3692
+ handoff_id: string;
3693
+ provider_id: string;
3694
+ service_key: string;
3695
+ workspace: string;
3696
+ actor_key: string;
3697
+ completed_at?: string | null | undefined;
3698
+ resume_hint?: {
3699
+ tool_name: "browser_run_workflow";
3700
+ task_summary: string;
3701
+ input_ref?: string | undefined;
3702
+ } | null | undefined;
3703
+ requested_by?: {
3704
+ surface: "chat" | "gateway" | "cli" | "tui";
3705
+ platform?: string | undefined;
3706
+ conversation_id?: string | undefined;
3707
+ identity_key?: string | undefined;
3708
+ user_id?: string | undefined;
3709
+ } | null | undefined;
3710
+ reply_target?: {
3711
+ metadata?: Record<string, unknown> | undefined;
3712
+ surface?: "chat" | "gateway" | "cli" | "tui" | undefined;
3713
+ platform?: string | undefined;
3714
+ conversation_id?: string | undefined;
3715
+ identity_key?: string | undefined;
3716
+ user_id?: string | undefined;
3717
+ channel?: "web" | "cli" | "tui" | "plugin_gateway" | undefined;
3718
+ message_id?: string | undefined;
3719
+ response_channel?: string | undefined;
3720
+ outbox_topic?: string | undefined;
3721
+ deliveryMode?: "reply" | "notify" | "thread_reply" | undefined;
3722
+ delivery_mode?: "reply" | "notify" | "thread_reply" | undefined;
3723
+ } | null | undefined;
3724
+ expires_at?: string | null | undefined;
3725
+ browser_session_id?: string | null | undefined;
3726
+ resumable_session_id?: string | null | undefined;
3727
+ supersedes_handoff_id?: string | null | undefined;
3728
+ superseded_by_handoff_id?: string | null | undefined;
3729
+ failure_code?: string | null | undefined;
3730
+ failure_message?: string | null | undefined;
3731
+ }[];
3732
+ stale: {
3733
+ updated_at: string;
3734
+ schema_version: "runtime-auth-handoff-v1";
3735
+ evidence_refs: {
3736
+ kind: string;
3737
+ ref: string;
3738
+ observed_at?: string | undefined;
3739
+ }[];
3740
+ state: "completed" | "cancelled" | "blocked" | "expired" | "in_progress" | "requested" | "pending_operator" | "superseded";
3741
+ requested_at: string;
3742
+ handoff_id: string;
3743
+ provider_id: string;
3744
+ service_key: string;
3745
+ workspace: string;
3746
+ actor_key: string;
3747
+ completed_at?: string | null | undefined;
3748
+ resume_hint?: {
3749
+ tool_name: "browser_run_workflow";
3750
+ task_summary: string;
3751
+ input_ref?: string | undefined;
3752
+ } | null | undefined;
3753
+ requested_by?: {
3754
+ surface: "chat" | "gateway" | "cli" | "tui";
3755
+ platform?: string | undefined;
3756
+ conversation_id?: string | undefined;
3757
+ identity_key?: string | undefined;
3758
+ user_id?: string | undefined;
3759
+ } | null | undefined;
3760
+ reply_target?: {
3761
+ metadata?: Record<string, unknown> | undefined;
3762
+ surface?: "chat" | "gateway" | "cli" | "tui" | undefined;
3763
+ platform?: string | undefined;
3764
+ conversation_id?: string | undefined;
3765
+ identity_key?: string | undefined;
3766
+ user_id?: string | undefined;
3767
+ channel?: "web" | "cli" | "tui" | "plugin_gateway" | undefined;
3768
+ message_id?: string | undefined;
3769
+ response_channel?: string | undefined;
3770
+ outbox_topic?: string | undefined;
3771
+ deliveryMode?: "reply" | "notify" | "thread_reply" | undefined;
3772
+ delivery_mode?: "reply" | "notify" | "thread_reply" | undefined;
3773
+ } | null | undefined;
3774
+ expires_at?: string | null | undefined;
3775
+ browser_session_id?: string | null | undefined;
3776
+ resumable_session_id?: string | null | undefined;
3777
+ supersedes_handoff_id?: string | null | undefined;
3778
+ superseded_by_handoff_id?: string | null | undefined;
3779
+ failure_code?: string | null | undefined;
3780
+ failure_message?: string | null | undefined;
3781
+ }[];
3782
+ recent_terminal: {
3783
+ updated_at: string;
3784
+ schema_version: "runtime-auth-handoff-v1";
3785
+ evidence_refs: {
3786
+ kind: string;
3787
+ ref: string;
3788
+ observed_at?: string | undefined;
3789
+ }[];
3790
+ state: "completed" | "cancelled" | "blocked" | "expired" | "in_progress" | "requested" | "pending_operator" | "superseded";
3791
+ requested_at: string;
3792
+ handoff_id: string;
3793
+ provider_id: string;
3794
+ service_key: string;
3795
+ workspace: string;
3796
+ actor_key: string;
3797
+ completed_at?: string | null | undefined;
3798
+ resume_hint?: {
3799
+ tool_name: "browser_run_workflow";
3800
+ task_summary: string;
3801
+ input_ref?: string | undefined;
3802
+ } | null | undefined;
3803
+ requested_by?: {
3804
+ surface: "chat" | "gateway" | "cli" | "tui";
3805
+ platform?: string | undefined;
3806
+ conversation_id?: string | undefined;
3807
+ identity_key?: string | undefined;
3808
+ user_id?: string | undefined;
3809
+ } | null | undefined;
3810
+ reply_target?: {
3811
+ metadata?: Record<string, unknown> | undefined;
3812
+ surface?: "chat" | "gateway" | "cli" | "tui" | undefined;
3813
+ platform?: string | undefined;
3814
+ conversation_id?: string | undefined;
3815
+ identity_key?: string | undefined;
3816
+ user_id?: string | undefined;
3817
+ channel?: "web" | "cli" | "tui" | "plugin_gateway" | undefined;
3818
+ message_id?: string | undefined;
3819
+ response_channel?: string | undefined;
3820
+ outbox_topic?: string | undefined;
3821
+ deliveryMode?: "reply" | "notify" | "thread_reply" | undefined;
3822
+ delivery_mode?: "reply" | "notify" | "thread_reply" | undefined;
3823
+ } | null | undefined;
3824
+ expires_at?: string | null | undefined;
3825
+ browser_session_id?: string | null | undefined;
3826
+ resumable_session_id?: string | null | undefined;
3827
+ supersedes_handoff_id?: string | null | undefined;
3828
+ superseded_by_handoff_id?: string | null | undefined;
3829
+ failure_code?: string | null | undefined;
3830
+ failure_message?: string | null | undefined;
3831
+ }[];
3832
+ }, {
3833
+ pending: {
3834
+ updated_at: string;
3835
+ schema_version: "runtime-auth-handoff-v1";
3836
+ state: "completed" | "cancelled" | "blocked" | "expired" | "in_progress" | "requested" | "pending_operator" | "superseded";
3837
+ requested_at: string;
3838
+ handoff_id: string;
3839
+ provider_id: string;
3840
+ service_key: string;
3841
+ workspace: string;
3842
+ actor_key: string;
3843
+ completed_at?: string | null | undefined;
3844
+ evidence_refs?: {
3845
+ kind: string;
3846
+ ref: string;
3847
+ observed_at?: string | undefined;
3848
+ }[] | undefined;
3849
+ resume_hint?: {
3850
+ tool_name: "browser_run_workflow";
3851
+ task_summary: string;
3852
+ input_ref?: string | undefined;
3853
+ } | null | undefined;
3854
+ requested_by?: {
3855
+ surface: "chat" | "gateway" | "cli" | "tui";
3856
+ platform?: string | undefined;
3857
+ conversation_id?: string | undefined;
3858
+ identity_key?: string | undefined;
3859
+ user_id?: string | undefined;
3860
+ } | null | undefined;
3861
+ reply_target?: {
3862
+ metadata?: Record<string, unknown> | undefined;
3863
+ surface?: "chat" | "gateway" | "cli" | "tui" | undefined;
3864
+ platform?: string | undefined;
3865
+ conversation_id?: string | undefined;
3866
+ identity_key?: string | undefined;
3867
+ user_id?: string | undefined;
3868
+ channel?: "web" | "cli" | "tui" | "plugin_gateway" | undefined;
3869
+ message_id?: string | undefined;
3870
+ response_channel?: string | undefined;
3871
+ outbox_topic?: string | undefined;
3872
+ deliveryMode?: "reply" | "notify" | "thread_reply" | undefined;
3873
+ delivery_mode?: "reply" | "notify" | "thread_reply" | undefined;
3874
+ } | null | undefined;
3875
+ expires_at?: string | null | undefined;
3876
+ browser_session_id?: string | null | undefined;
3877
+ resumable_session_id?: string | null | undefined;
3878
+ supersedes_handoff_id?: string | null | undefined;
3879
+ superseded_by_handoff_id?: string | null | undefined;
3880
+ failure_code?: string | null | undefined;
3881
+ failure_message?: string | null | undefined;
3882
+ }[];
3883
+ stale: {
3884
+ updated_at: string;
3885
+ schema_version: "runtime-auth-handoff-v1";
3886
+ state: "completed" | "cancelled" | "blocked" | "expired" | "in_progress" | "requested" | "pending_operator" | "superseded";
3887
+ requested_at: string;
3888
+ handoff_id: string;
3889
+ provider_id: string;
3890
+ service_key: string;
3891
+ workspace: string;
3892
+ actor_key: string;
3893
+ completed_at?: string | null | undefined;
3894
+ evidence_refs?: {
3895
+ kind: string;
3896
+ ref: string;
3897
+ observed_at?: string | undefined;
3898
+ }[] | undefined;
3899
+ resume_hint?: {
3900
+ tool_name: "browser_run_workflow";
3901
+ task_summary: string;
3902
+ input_ref?: string | undefined;
3903
+ } | null | undefined;
3904
+ requested_by?: {
3905
+ surface: "chat" | "gateway" | "cli" | "tui";
3906
+ platform?: string | undefined;
3907
+ conversation_id?: string | undefined;
3908
+ identity_key?: string | undefined;
3909
+ user_id?: string | undefined;
3910
+ } | null | undefined;
3911
+ reply_target?: {
3912
+ metadata?: Record<string, unknown> | undefined;
3913
+ surface?: "chat" | "gateway" | "cli" | "tui" | undefined;
3914
+ platform?: string | undefined;
3915
+ conversation_id?: string | undefined;
3916
+ identity_key?: string | undefined;
3917
+ user_id?: string | undefined;
3918
+ channel?: "web" | "cli" | "tui" | "plugin_gateway" | undefined;
3919
+ message_id?: string | undefined;
3920
+ response_channel?: string | undefined;
3921
+ outbox_topic?: string | undefined;
3922
+ deliveryMode?: "reply" | "notify" | "thread_reply" | undefined;
3923
+ delivery_mode?: "reply" | "notify" | "thread_reply" | undefined;
3924
+ } | null | undefined;
3925
+ expires_at?: string | null | undefined;
3926
+ browser_session_id?: string | null | undefined;
3927
+ resumable_session_id?: string | null | undefined;
3928
+ supersedes_handoff_id?: string | null | undefined;
3929
+ superseded_by_handoff_id?: string | null | undefined;
3930
+ failure_code?: string | null | undefined;
3931
+ failure_message?: string | null | undefined;
3932
+ }[];
3933
+ recent_terminal: {
3934
+ updated_at: string;
3935
+ schema_version: "runtime-auth-handoff-v1";
3936
+ state: "completed" | "cancelled" | "blocked" | "expired" | "in_progress" | "requested" | "pending_operator" | "superseded";
3937
+ requested_at: string;
3938
+ handoff_id: string;
3939
+ provider_id: string;
3940
+ service_key: string;
3941
+ workspace: string;
3942
+ actor_key: string;
3943
+ completed_at?: string | null | undefined;
3944
+ evidence_refs?: {
3945
+ kind: string;
3946
+ ref: string;
3947
+ observed_at?: string | undefined;
3948
+ }[] | undefined;
3949
+ resume_hint?: {
3950
+ tool_name: "browser_run_workflow";
3951
+ task_summary: string;
3952
+ input_ref?: string | undefined;
3953
+ } | null | undefined;
3954
+ requested_by?: {
3955
+ surface: "chat" | "gateway" | "cli" | "tui";
3956
+ platform?: string | undefined;
3957
+ conversation_id?: string | undefined;
3958
+ identity_key?: string | undefined;
3959
+ user_id?: string | undefined;
3960
+ } | null | undefined;
3961
+ reply_target?: {
3962
+ metadata?: Record<string, unknown> | undefined;
3963
+ surface?: "chat" | "gateway" | "cli" | "tui" | undefined;
3964
+ platform?: string | undefined;
3965
+ conversation_id?: string | undefined;
3966
+ identity_key?: string | undefined;
3967
+ user_id?: string | undefined;
3968
+ channel?: "web" | "cli" | "tui" | "plugin_gateway" | undefined;
3969
+ message_id?: string | undefined;
3970
+ response_channel?: string | undefined;
3971
+ outbox_topic?: string | undefined;
3972
+ deliveryMode?: "reply" | "notify" | "thread_reply" | undefined;
3973
+ delivery_mode?: "reply" | "notify" | "thread_reply" | undefined;
3974
+ } | null | undefined;
3975
+ expires_at?: string | null | undefined;
3976
+ browser_session_id?: string | null | undefined;
3977
+ resumable_session_id?: string | null | undefined;
3978
+ supersedes_handoff_id?: string | null | undefined;
3979
+ superseded_by_handoff_id?: string | null | undefined;
3980
+ failure_code?: string | null | undefined;
3981
+ failure_message?: string | null | undefined;
3982
+ }[];
3983
+ }>;
3984
+ browser_sessions: z.ZodObject<{
3985
+ authenticated: z.ZodArray<z.ZodObject<{
3986
+ session_id: z.ZodString;
3987
+ provider_id: z.ZodString;
3988
+ service_key: z.ZodString;
3989
+ workspace: z.ZodString;
3990
+ actor_key: z.ZodString;
3991
+ state: z.ZodEnum<["fresh", "authenticated", "auth_required", "expired", "blocked", "unavailable"]>;
3992
+ created_at: z.ZodString;
3993
+ updated_at: z.ZodString;
3994
+ last_auth_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3995
+ expires_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3996
+ last_failure_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3997
+ last_failure_message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3998
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3999
+ }, "strip", z.ZodTypeAny, {
4000
+ created_at: string;
4001
+ updated_at: string;
4002
+ state: "blocked" | "expired" | "unavailable" | "fresh" | "authenticated" | "auth_required";
4003
+ session_id: string;
4004
+ provider_id: string;
4005
+ service_key: string;
4006
+ workspace: string;
4007
+ actor_key: string;
4008
+ metadata?: Record<string, unknown> | undefined;
4009
+ expires_at?: string | null | undefined;
4010
+ last_auth_at?: string | null | undefined;
4011
+ last_failure_code?: string | null | undefined;
4012
+ last_failure_message?: string | null | undefined;
4013
+ }, {
4014
+ created_at: string;
4015
+ updated_at: string;
4016
+ state: "blocked" | "expired" | "unavailable" | "fresh" | "authenticated" | "auth_required";
4017
+ session_id: string;
4018
+ provider_id: string;
4019
+ service_key: string;
4020
+ workspace: string;
4021
+ actor_key: string;
4022
+ metadata?: Record<string, unknown> | undefined;
4023
+ expires_at?: string | null | undefined;
4024
+ last_auth_at?: string | null | undefined;
4025
+ last_failure_code?: string | null | undefined;
4026
+ last_failure_message?: string | null | undefined;
4027
+ }>, "many">;
4028
+ stale: z.ZodArray<z.ZodObject<{
4029
+ session_id: z.ZodString;
4030
+ provider_id: z.ZodString;
4031
+ service_key: z.ZodString;
4032
+ workspace: z.ZodString;
4033
+ actor_key: z.ZodString;
4034
+ state: z.ZodEnum<["fresh", "authenticated", "auth_required", "expired", "blocked", "unavailable"]>;
4035
+ created_at: z.ZodString;
4036
+ updated_at: z.ZodString;
4037
+ last_auth_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4038
+ expires_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4039
+ last_failure_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4040
+ last_failure_message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4041
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4042
+ }, "strip", z.ZodTypeAny, {
4043
+ created_at: string;
4044
+ updated_at: string;
4045
+ state: "blocked" | "expired" | "unavailable" | "fresh" | "authenticated" | "auth_required";
4046
+ session_id: string;
4047
+ provider_id: string;
4048
+ service_key: string;
4049
+ workspace: string;
4050
+ actor_key: string;
4051
+ metadata?: Record<string, unknown> | undefined;
4052
+ expires_at?: string | null | undefined;
4053
+ last_auth_at?: string | null | undefined;
4054
+ last_failure_code?: string | null | undefined;
4055
+ last_failure_message?: string | null | undefined;
4056
+ }, {
4057
+ created_at: string;
4058
+ updated_at: string;
4059
+ state: "blocked" | "expired" | "unavailable" | "fresh" | "authenticated" | "auth_required";
4060
+ session_id: string;
4061
+ provider_id: string;
4062
+ service_key: string;
4063
+ workspace: string;
4064
+ actor_key: string;
4065
+ metadata?: Record<string, unknown> | undefined;
4066
+ expires_at?: string | null | undefined;
4067
+ last_auth_at?: string | null | undefined;
4068
+ last_failure_code?: string | null | undefined;
4069
+ last_failure_message?: string | null | undefined;
4070
+ }>, "many">;
4071
+ }, "strip", z.ZodTypeAny, {
4072
+ stale: {
4073
+ created_at: string;
4074
+ updated_at: string;
4075
+ state: "blocked" | "expired" | "unavailable" | "fresh" | "authenticated" | "auth_required";
4076
+ session_id: string;
4077
+ provider_id: string;
4078
+ service_key: string;
4079
+ workspace: string;
4080
+ actor_key: string;
4081
+ metadata?: Record<string, unknown> | undefined;
4082
+ expires_at?: string | null | undefined;
4083
+ last_auth_at?: string | null | undefined;
4084
+ last_failure_code?: string | null | undefined;
4085
+ last_failure_message?: string | null | undefined;
4086
+ }[];
4087
+ authenticated: {
4088
+ created_at: string;
4089
+ updated_at: string;
4090
+ state: "blocked" | "expired" | "unavailable" | "fresh" | "authenticated" | "auth_required";
4091
+ session_id: string;
4092
+ provider_id: string;
4093
+ service_key: string;
4094
+ workspace: string;
4095
+ actor_key: string;
4096
+ metadata?: Record<string, unknown> | undefined;
4097
+ expires_at?: string | null | undefined;
4098
+ last_auth_at?: string | null | undefined;
4099
+ last_failure_code?: string | null | undefined;
4100
+ last_failure_message?: string | null | undefined;
4101
+ }[];
4102
+ }, {
4103
+ stale: {
4104
+ created_at: string;
4105
+ updated_at: string;
4106
+ state: "blocked" | "expired" | "unavailable" | "fresh" | "authenticated" | "auth_required";
4107
+ session_id: string;
4108
+ provider_id: string;
4109
+ service_key: string;
4110
+ workspace: string;
4111
+ actor_key: string;
4112
+ metadata?: Record<string, unknown> | undefined;
4113
+ expires_at?: string | null | undefined;
4114
+ last_auth_at?: string | null | undefined;
4115
+ last_failure_code?: string | null | undefined;
4116
+ last_failure_message?: string | null | undefined;
4117
+ }[];
4118
+ authenticated: {
4119
+ created_at: string;
4120
+ updated_at: string;
4121
+ state: "blocked" | "expired" | "unavailable" | "fresh" | "authenticated" | "auth_required";
4122
+ session_id: string;
4123
+ provider_id: string;
4124
+ service_key: string;
4125
+ workspace: string;
4126
+ actor_key: string;
4127
+ metadata?: Record<string, unknown> | undefined;
4128
+ expires_at?: string | null | undefined;
4129
+ last_auth_at?: string | null | undefined;
4130
+ last_failure_code?: string | null | undefined;
4131
+ last_failure_message?: string | null | undefined;
4132
+ }[];
4133
+ }>;
4134
+ guardrails: z.ZodObject<{
4135
+ open_breakers: z.ZodArray<z.ZodObject<{
4136
+ key: z.ZodString;
4137
+ provider_id: z.ZodString;
4138
+ service_key: z.ZodString;
4139
+ state: z.ZodEnum<["closed", "open", "half_open", "paused"]>;
4140
+ failure_count: z.ZodNumber;
4141
+ last_failure_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4142
+ last_failure_message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4143
+ last_failure_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4144
+ opened_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4145
+ cooldown_until: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4146
+ updated_at: z.ZodString;
4147
+ }, "strip", z.ZodTypeAny, {
4148
+ updated_at: string;
4149
+ state: "paused" | "closed" | "open" | "half_open";
4150
+ provider_id: string;
4151
+ service_key: string;
4152
+ key: string;
4153
+ failure_count: number;
4154
+ cooldown_until?: string | null | undefined;
4155
+ last_failure_code?: string | null | undefined;
4156
+ last_failure_message?: string | null | undefined;
4157
+ last_failure_at?: string | null | undefined;
4158
+ opened_at?: string | null | undefined;
4159
+ }, {
4160
+ updated_at: string;
4161
+ state: "paused" | "closed" | "open" | "half_open";
4162
+ provider_id: string;
4163
+ service_key: string;
4164
+ key: string;
4165
+ failure_count: number;
4166
+ cooldown_until?: string | null | undefined;
4167
+ last_failure_code?: string | null | undefined;
4168
+ last_failure_message?: string | null | undefined;
4169
+ last_failure_at?: string | null | undefined;
4170
+ opened_at?: string | null | undefined;
4171
+ }>, "many">;
4172
+ paused_breakers: z.ZodArray<z.ZodObject<{
4173
+ key: z.ZodString;
4174
+ provider_id: z.ZodString;
4175
+ service_key: z.ZodString;
4176
+ state: z.ZodEnum<["closed", "open", "half_open", "paused"]>;
4177
+ failure_count: z.ZodNumber;
4178
+ last_failure_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4179
+ last_failure_message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4180
+ last_failure_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4181
+ opened_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4182
+ cooldown_until: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4183
+ updated_at: z.ZodString;
4184
+ }, "strip", z.ZodTypeAny, {
4185
+ updated_at: string;
4186
+ state: "paused" | "closed" | "open" | "half_open";
4187
+ provider_id: string;
4188
+ service_key: string;
4189
+ key: string;
4190
+ failure_count: number;
4191
+ cooldown_until?: string | null | undefined;
4192
+ last_failure_code?: string | null | undefined;
4193
+ last_failure_message?: string | null | undefined;
4194
+ last_failure_at?: string | null | undefined;
4195
+ opened_at?: string | null | undefined;
4196
+ }, {
4197
+ updated_at: string;
4198
+ state: "paused" | "closed" | "open" | "half_open";
4199
+ provider_id: string;
4200
+ service_key: string;
4201
+ key: string;
4202
+ failure_count: number;
4203
+ cooldown_until?: string | null | undefined;
4204
+ last_failure_code?: string | null | undefined;
4205
+ last_failure_message?: string | null | undefined;
4206
+ last_failure_at?: string | null | undefined;
4207
+ opened_at?: string | null | undefined;
4208
+ }>, "many">;
4209
+ half_open_breakers: z.ZodArray<z.ZodObject<{
4210
+ key: z.ZodString;
4211
+ provider_id: z.ZodString;
4212
+ service_key: z.ZodString;
4213
+ state: z.ZodEnum<["closed", "open", "half_open", "paused"]>;
4214
+ failure_count: z.ZodNumber;
4215
+ last_failure_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4216
+ last_failure_message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4217
+ last_failure_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4218
+ opened_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4219
+ cooldown_until: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4220
+ updated_at: z.ZodString;
4221
+ }, "strip", z.ZodTypeAny, {
4222
+ updated_at: string;
4223
+ state: "paused" | "closed" | "open" | "half_open";
4224
+ provider_id: string;
4225
+ service_key: string;
4226
+ key: string;
4227
+ failure_count: number;
4228
+ cooldown_until?: string | null | undefined;
4229
+ last_failure_code?: string | null | undefined;
4230
+ last_failure_message?: string | null | undefined;
4231
+ last_failure_at?: string | null | undefined;
4232
+ opened_at?: string | null | undefined;
4233
+ }, {
4234
+ updated_at: string;
4235
+ state: "paused" | "closed" | "open" | "half_open";
4236
+ provider_id: string;
4237
+ service_key: string;
4238
+ key: string;
4239
+ failure_count: number;
4240
+ cooldown_until?: string | null | undefined;
4241
+ last_failure_code?: string | null | undefined;
4242
+ last_failure_message?: string | null | undefined;
4243
+ last_failure_at?: string | null | undefined;
4244
+ opened_at?: string | null | undefined;
4245
+ }>, "many">;
4246
+ }, "strip", z.ZodTypeAny, {
4247
+ open_breakers: {
4248
+ updated_at: string;
4249
+ state: "paused" | "closed" | "open" | "half_open";
4250
+ provider_id: string;
4251
+ service_key: string;
4252
+ key: string;
4253
+ failure_count: number;
4254
+ cooldown_until?: string | null | undefined;
4255
+ last_failure_code?: string | null | undefined;
4256
+ last_failure_message?: string | null | undefined;
4257
+ last_failure_at?: string | null | undefined;
4258
+ opened_at?: string | null | undefined;
4259
+ }[];
4260
+ paused_breakers: {
4261
+ updated_at: string;
4262
+ state: "paused" | "closed" | "open" | "half_open";
4263
+ provider_id: string;
4264
+ service_key: string;
4265
+ key: string;
4266
+ failure_count: number;
4267
+ cooldown_until?: string | null | undefined;
4268
+ last_failure_code?: string | null | undefined;
4269
+ last_failure_message?: string | null | undefined;
4270
+ last_failure_at?: string | null | undefined;
4271
+ opened_at?: string | null | undefined;
4272
+ }[];
4273
+ half_open_breakers: {
4274
+ updated_at: string;
4275
+ state: "paused" | "closed" | "open" | "half_open";
4276
+ provider_id: string;
4277
+ service_key: string;
4278
+ key: string;
4279
+ failure_count: number;
4280
+ cooldown_until?: string | null | undefined;
4281
+ last_failure_code?: string | null | undefined;
4282
+ last_failure_message?: string | null | undefined;
4283
+ last_failure_at?: string | null | undefined;
4284
+ opened_at?: string | null | undefined;
4285
+ }[];
4286
+ }, {
4287
+ open_breakers: {
4288
+ updated_at: string;
4289
+ state: "paused" | "closed" | "open" | "half_open";
4290
+ provider_id: string;
4291
+ service_key: string;
4292
+ key: string;
4293
+ failure_count: number;
4294
+ cooldown_until?: string | null | undefined;
4295
+ last_failure_code?: string | null | undefined;
4296
+ last_failure_message?: string | null | undefined;
4297
+ last_failure_at?: string | null | undefined;
4298
+ opened_at?: string | null | undefined;
4299
+ }[];
4300
+ paused_breakers: {
4301
+ updated_at: string;
4302
+ state: "paused" | "closed" | "open" | "half_open";
4303
+ provider_id: string;
4304
+ service_key: string;
4305
+ key: string;
4306
+ failure_count: number;
4307
+ cooldown_until?: string | null | undefined;
4308
+ last_failure_code?: string | null | undefined;
4309
+ last_failure_message?: string | null | undefined;
4310
+ last_failure_at?: string | null | undefined;
4311
+ opened_at?: string | null | undefined;
4312
+ }[];
4313
+ half_open_breakers: {
4314
+ updated_at: string;
4315
+ state: "paused" | "closed" | "open" | "half_open";
4316
+ provider_id: string;
4317
+ service_key: string;
4318
+ key: string;
4319
+ failure_count: number;
4320
+ cooldown_until?: string | null | undefined;
4321
+ last_failure_code?: string | null | undefined;
4322
+ last_failure_message?: string | null | undefined;
4323
+ last_failure_at?: string | null | undefined;
4324
+ opened_at?: string | null | undefined;
4325
+ }[];
4326
+ }>;
4327
+ backpressure: z.ZodObject<{
4328
+ active: z.ZodArray<z.ZodObject<{
4329
+ provider_id: z.ZodString;
4330
+ service_key: z.ZodString;
4331
+ run_key: z.ZodString;
4332
+ acquired_at: z.ZodString;
4333
+ }, "strip", z.ZodTypeAny, {
4334
+ acquired_at: string;
4335
+ provider_id: string;
4336
+ service_key: string;
4337
+ run_key: string;
4338
+ }, {
4339
+ acquired_at: string;
4340
+ provider_id: string;
4341
+ service_key: string;
4342
+ run_key: string;
4343
+ }>, "many">;
4344
+ throttled: z.ZodArray<z.ZodObject<{
4345
+ provider_id: z.ZodString;
4346
+ service_key: z.ZodString;
4347
+ reason: z.ZodString;
4348
+ at: z.ZodString;
4349
+ }, "strip", z.ZodTypeAny, {
4350
+ at: string;
4351
+ reason: string;
4352
+ provider_id: string;
4353
+ service_key: string;
4354
+ }, {
4355
+ at: string;
4356
+ reason: string;
4357
+ provider_id: string;
4358
+ service_key: string;
4359
+ }>, "many">;
4360
+ }, "strip", z.ZodTypeAny, {
4361
+ active: {
4362
+ acquired_at: string;
4363
+ provider_id: string;
4364
+ service_key: string;
4365
+ run_key: string;
4366
+ }[];
4367
+ throttled: {
4368
+ at: string;
4369
+ reason: string;
4370
+ provider_id: string;
4371
+ service_key: string;
4372
+ }[];
4373
+ }, {
4374
+ active: {
4375
+ acquired_at: string;
4376
+ provider_id: string;
4377
+ service_key: string;
4378
+ run_key: string;
4379
+ }[];
4380
+ throttled: {
4381
+ at: string;
4382
+ reason: string;
4383
+ provider_id: string;
4384
+ service_key: string;
4385
+ }[];
4386
+ }>;
4387
+ blocked_work: z.ZodArray<z.ZodObject<{
4388
+ kind: z.ZodEnum<["auth_wait", "guardrail_open", "backpressure", "provider_unavailable"]>;
4389
+ provider_id: z.ZodString;
4390
+ service_key: z.ZodString;
4391
+ run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4392
+ goal_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4393
+ handoff_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4394
+ reason: z.ZodString;
4395
+ since: z.ZodString;
4396
+ retry_after: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4397
+ }, "strip", z.ZodTypeAny, {
4398
+ kind: "backpressure" | "auth_wait" | "guardrail_open" | "provider_unavailable";
4399
+ reason: string;
4400
+ provider_id: string;
4401
+ service_key: string;
4402
+ since: string;
4403
+ goal_id?: string | null | undefined;
4404
+ run_id?: string | null | undefined;
4405
+ handoff_id?: string | null | undefined;
4406
+ retry_after?: string | null | undefined;
4407
+ }, {
4408
+ kind: "backpressure" | "auth_wait" | "guardrail_open" | "provider_unavailable";
4409
+ reason: string;
4410
+ provider_id: string;
4411
+ service_key: string;
4412
+ since: string;
4413
+ goal_id?: string | null | undefined;
4414
+ run_id?: string | null | undefined;
4415
+ handoff_id?: string | null | undefined;
4416
+ retry_after?: string | null | undefined;
4417
+ }>, "many">;
4418
+ }, "strip", z.ZodTypeAny, {
4419
+ generated_at: string;
4420
+ schema_version: "runtime-automation-snapshot-v1";
4421
+ backpressure: {
4422
+ active: {
4423
+ acquired_at: string;
4424
+ provider_id: string;
4425
+ service_key: string;
4426
+ run_key: string;
4427
+ }[];
4428
+ throttled: {
4429
+ at: string;
4430
+ reason: string;
4431
+ provider_id: string;
4432
+ service_key: string;
4433
+ }[];
4434
+ };
4435
+ auth_handoffs: {
4436
+ pending: {
4437
+ updated_at: string;
4438
+ schema_version: "runtime-auth-handoff-v1";
4439
+ evidence_refs: {
4440
+ kind: string;
4441
+ ref: string;
4442
+ observed_at?: string | undefined;
4443
+ }[];
4444
+ state: "completed" | "cancelled" | "blocked" | "expired" | "in_progress" | "requested" | "pending_operator" | "superseded";
4445
+ requested_at: string;
4446
+ handoff_id: string;
4447
+ provider_id: string;
4448
+ service_key: string;
4449
+ workspace: string;
4450
+ actor_key: string;
4451
+ completed_at?: string | null | undefined;
4452
+ resume_hint?: {
4453
+ tool_name: "browser_run_workflow";
4454
+ task_summary: string;
4455
+ input_ref?: string | undefined;
4456
+ } | null | undefined;
4457
+ requested_by?: {
4458
+ surface: "chat" | "gateway" | "cli" | "tui";
4459
+ platform?: string | undefined;
4460
+ conversation_id?: string | undefined;
4461
+ identity_key?: string | undefined;
4462
+ user_id?: string | undefined;
4463
+ } | null | undefined;
4464
+ reply_target?: {
4465
+ metadata?: Record<string, unknown> | undefined;
4466
+ surface?: "chat" | "gateway" | "cli" | "tui" | undefined;
4467
+ platform?: string | undefined;
4468
+ conversation_id?: string | undefined;
4469
+ identity_key?: string | undefined;
4470
+ user_id?: string | undefined;
4471
+ channel?: "web" | "cli" | "tui" | "plugin_gateway" | undefined;
4472
+ message_id?: string | undefined;
4473
+ response_channel?: string | undefined;
4474
+ outbox_topic?: string | undefined;
4475
+ deliveryMode?: "reply" | "notify" | "thread_reply" | undefined;
4476
+ delivery_mode?: "reply" | "notify" | "thread_reply" | undefined;
4477
+ } | null | undefined;
4478
+ expires_at?: string | null | undefined;
4479
+ browser_session_id?: string | null | undefined;
4480
+ resumable_session_id?: string | null | undefined;
4481
+ supersedes_handoff_id?: string | null | undefined;
4482
+ superseded_by_handoff_id?: string | null | undefined;
4483
+ failure_code?: string | null | undefined;
4484
+ failure_message?: string | null | undefined;
4485
+ }[];
4486
+ stale: {
4487
+ updated_at: string;
4488
+ schema_version: "runtime-auth-handoff-v1";
4489
+ evidence_refs: {
4490
+ kind: string;
4491
+ ref: string;
4492
+ observed_at?: string | undefined;
4493
+ }[];
4494
+ state: "completed" | "cancelled" | "blocked" | "expired" | "in_progress" | "requested" | "pending_operator" | "superseded";
4495
+ requested_at: string;
4496
+ handoff_id: string;
4497
+ provider_id: string;
4498
+ service_key: string;
4499
+ workspace: string;
4500
+ actor_key: string;
4501
+ completed_at?: string | null | undefined;
4502
+ resume_hint?: {
4503
+ tool_name: "browser_run_workflow";
4504
+ task_summary: string;
4505
+ input_ref?: string | undefined;
4506
+ } | null | undefined;
4507
+ requested_by?: {
4508
+ surface: "chat" | "gateway" | "cli" | "tui";
4509
+ platform?: string | undefined;
4510
+ conversation_id?: string | undefined;
4511
+ identity_key?: string | undefined;
4512
+ user_id?: string | undefined;
4513
+ } | null | undefined;
4514
+ reply_target?: {
4515
+ metadata?: Record<string, unknown> | undefined;
4516
+ surface?: "chat" | "gateway" | "cli" | "tui" | undefined;
4517
+ platform?: string | undefined;
4518
+ conversation_id?: string | undefined;
4519
+ identity_key?: string | undefined;
4520
+ user_id?: string | undefined;
4521
+ channel?: "web" | "cli" | "tui" | "plugin_gateway" | undefined;
4522
+ message_id?: string | undefined;
4523
+ response_channel?: string | undefined;
4524
+ outbox_topic?: string | undefined;
4525
+ deliveryMode?: "reply" | "notify" | "thread_reply" | undefined;
4526
+ delivery_mode?: "reply" | "notify" | "thread_reply" | undefined;
4527
+ } | null | undefined;
4528
+ expires_at?: string | null | undefined;
4529
+ browser_session_id?: string | null | undefined;
4530
+ resumable_session_id?: string | null | undefined;
4531
+ supersedes_handoff_id?: string | null | undefined;
4532
+ superseded_by_handoff_id?: string | null | undefined;
4533
+ failure_code?: string | null | undefined;
4534
+ failure_message?: string | null | undefined;
4535
+ }[];
4536
+ recent_terminal: {
4537
+ updated_at: string;
4538
+ schema_version: "runtime-auth-handoff-v1";
4539
+ evidence_refs: {
4540
+ kind: string;
4541
+ ref: string;
4542
+ observed_at?: string | undefined;
4543
+ }[];
4544
+ state: "completed" | "cancelled" | "blocked" | "expired" | "in_progress" | "requested" | "pending_operator" | "superseded";
4545
+ requested_at: string;
4546
+ handoff_id: string;
4547
+ provider_id: string;
4548
+ service_key: string;
4549
+ workspace: string;
4550
+ actor_key: string;
4551
+ completed_at?: string | null | undefined;
4552
+ resume_hint?: {
4553
+ tool_name: "browser_run_workflow";
4554
+ task_summary: string;
4555
+ input_ref?: string | undefined;
4556
+ } | null | undefined;
4557
+ requested_by?: {
4558
+ surface: "chat" | "gateway" | "cli" | "tui";
4559
+ platform?: string | undefined;
4560
+ conversation_id?: string | undefined;
4561
+ identity_key?: string | undefined;
4562
+ user_id?: string | undefined;
4563
+ } | null | undefined;
4564
+ reply_target?: {
4565
+ metadata?: Record<string, unknown> | undefined;
4566
+ surface?: "chat" | "gateway" | "cli" | "tui" | undefined;
4567
+ platform?: string | undefined;
4568
+ conversation_id?: string | undefined;
4569
+ identity_key?: string | undefined;
4570
+ user_id?: string | undefined;
4571
+ channel?: "web" | "cli" | "tui" | "plugin_gateway" | undefined;
4572
+ message_id?: string | undefined;
4573
+ response_channel?: string | undefined;
4574
+ outbox_topic?: string | undefined;
4575
+ deliveryMode?: "reply" | "notify" | "thread_reply" | undefined;
4576
+ delivery_mode?: "reply" | "notify" | "thread_reply" | undefined;
4577
+ } | null | undefined;
4578
+ expires_at?: string | null | undefined;
4579
+ browser_session_id?: string | null | undefined;
4580
+ resumable_session_id?: string | null | undefined;
4581
+ supersedes_handoff_id?: string | null | undefined;
4582
+ superseded_by_handoff_id?: string | null | undefined;
4583
+ failure_code?: string | null | undefined;
4584
+ failure_message?: string | null | undefined;
4585
+ }[];
4586
+ };
4587
+ browser_sessions: {
4588
+ stale: {
4589
+ created_at: string;
4590
+ updated_at: string;
4591
+ state: "blocked" | "expired" | "unavailable" | "fresh" | "authenticated" | "auth_required";
4592
+ session_id: string;
4593
+ provider_id: string;
4594
+ service_key: string;
4595
+ workspace: string;
4596
+ actor_key: string;
4597
+ metadata?: Record<string, unknown> | undefined;
4598
+ expires_at?: string | null | undefined;
4599
+ last_auth_at?: string | null | undefined;
4600
+ last_failure_code?: string | null | undefined;
4601
+ last_failure_message?: string | null | undefined;
4602
+ }[];
4603
+ authenticated: {
4604
+ created_at: string;
4605
+ updated_at: string;
4606
+ state: "blocked" | "expired" | "unavailable" | "fresh" | "authenticated" | "auth_required";
4607
+ session_id: string;
4608
+ provider_id: string;
4609
+ service_key: string;
4610
+ workspace: string;
4611
+ actor_key: string;
4612
+ metadata?: Record<string, unknown> | undefined;
4613
+ expires_at?: string | null | undefined;
4614
+ last_auth_at?: string | null | undefined;
4615
+ last_failure_code?: string | null | undefined;
4616
+ last_failure_message?: string | null | undefined;
4617
+ }[];
4618
+ };
4619
+ guardrails: {
4620
+ open_breakers: {
4621
+ updated_at: string;
4622
+ state: "paused" | "closed" | "open" | "half_open";
4623
+ provider_id: string;
4624
+ service_key: string;
4625
+ key: string;
4626
+ failure_count: number;
4627
+ cooldown_until?: string | null | undefined;
4628
+ last_failure_code?: string | null | undefined;
4629
+ last_failure_message?: string | null | undefined;
4630
+ last_failure_at?: string | null | undefined;
4631
+ opened_at?: string | null | undefined;
4632
+ }[];
4633
+ paused_breakers: {
4634
+ updated_at: string;
4635
+ state: "paused" | "closed" | "open" | "half_open";
4636
+ provider_id: string;
4637
+ service_key: string;
4638
+ key: string;
4639
+ failure_count: number;
4640
+ cooldown_until?: string | null | undefined;
4641
+ last_failure_code?: string | null | undefined;
4642
+ last_failure_message?: string | null | undefined;
4643
+ last_failure_at?: string | null | undefined;
4644
+ opened_at?: string | null | undefined;
4645
+ }[];
4646
+ half_open_breakers: {
4647
+ updated_at: string;
4648
+ state: "paused" | "closed" | "open" | "half_open";
4649
+ provider_id: string;
4650
+ service_key: string;
4651
+ key: string;
4652
+ failure_count: number;
4653
+ cooldown_until?: string | null | undefined;
4654
+ last_failure_code?: string | null | undefined;
4655
+ last_failure_message?: string | null | undefined;
4656
+ last_failure_at?: string | null | undefined;
4657
+ opened_at?: string | null | undefined;
4658
+ }[];
4659
+ };
4660
+ blocked_work: {
4661
+ kind: "backpressure" | "auth_wait" | "guardrail_open" | "provider_unavailable";
4662
+ reason: string;
4663
+ provider_id: string;
4664
+ service_key: string;
4665
+ since: string;
4666
+ goal_id?: string | null | undefined;
4667
+ run_id?: string | null | undefined;
4668
+ handoff_id?: string | null | undefined;
4669
+ retry_after?: string | null | undefined;
4670
+ }[];
4671
+ }, {
4672
+ generated_at: string;
4673
+ schema_version: "runtime-automation-snapshot-v1";
4674
+ backpressure: {
4675
+ active: {
4676
+ acquired_at: string;
4677
+ provider_id: string;
4678
+ service_key: string;
4679
+ run_key: string;
4680
+ }[];
4681
+ throttled: {
4682
+ at: string;
4683
+ reason: string;
4684
+ provider_id: string;
4685
+ service_key: string;
4686
+ }[];
4687
+ };
4688
+ auth_handoffs: {
4689
+ pending: {
4690
+ updated_at: string;
4691
+ schema_version: "runtime-auth-handoff-v1";
4692
+ state: "completed" | "cancelled" | "blocked" | "expired" | "in_progress" | "requested" | "pending_operator" | "superseded";
4693
+ requested_at: string;
4694
+ handoff_id: string;
4695
+ provider_id: string;
4696
+ service_key: string;
4697
+ workspace: string;
4698
+ actor_key: string;
4699
+ completed_at?: string | null | undefined;
4700
+ evidence_refs?: {
4701
+ kind: string;
4702
+ ref: string;
4703
+ observed_at?: string | undefined;
4704
+ }[] | undefined;
4705
+ resume_hint?: {
4706
+ tool_name: "browser_run_workflow";
4707
+ task_summary: string;
4708
+ input_ref?: string | undefined;
4709
+ } | null | undefined;
4710
+ requested_by?: {
4711
+ surface: "chat" | "gateway" | "cli" | "tui";
4712
+ platform?: string | undefined;
4713
+ conversation_id?: string | undefined;
4714
+ identity_key?: string | undefined;
4715
+ user_id?: string | undefined;
4716
+ } | null | undefined;
4717
+ reply_target?: {
4718
+ metadata?: Record<string, unknown> | undefined;
4719
+ surface?: "chat" | "gateway" | "cli" | "tui" | undefined;
4720
+ platform?: string | undefined;
4721
+ conversation_id?: string | undefined;
4722
+ identity_key?: string | undefined;
4723
+ user_id?: string | undefined;
4724
+ channel?: "web" | "cli" | "tui" | "plugin_gateway" | undefined;
4725
+ message_id?: string | undefined;
4726
+ response_channel?: string | undefined;
4727
+ outbox_topic?: string | undefined;
4728
+ deliveryMode?: "reply" | "notify" | "thread_reply" | undefined;
4729
+ delivery_mode?: "reply" | "notify" | "thread_reply" | undefined;
4730
+ } | null | undefined;
4731
+ expires_at?: string | null | undefined;
4732
+ browser_session_id?: string | null | undefined;
4733
+ resumable_session_id?: string | null | undefined;
4734
+ supersedes_handoff_id?: string | null | undefined;
4735
+ superseded_by_handoff_id?: string | null | undefined;
4736
+ failure_code?: string | null | undefined;
4737
+ failure_message?: string | null | undefined;
4738
+ }[];
4739
+ stale: {
4740
+ updated_at: string;
4741
+ schema_version: "runtime-auth-handoff-v1";
4742
+ state: "completed" | "cancelled" | "blocked" | "expired" | "in_progress" | "requested" | "pending_operator" | "superseded";
4743
+ requested_at: string;
4744
+ handoff_id: string;
4745
+ provider_id: string;
4746
+ service_key: string;
4747
+ workspace: string;
4748
+ actor_key: string;
4749
+ completed_at?: string | null | undefined;
4750
+ evidence_refs?: {
4751
+ kind: string;
4752
+ ref: string;
4753
+ observed_at?: string | undefined;
4754
+ }[] | undefined;
4755
+ resume_hint?: {
4756
+ tool_name: "browser_run_workflow";
4757
+ task_summary: string;
4758
+ input_ref?: string | undefined;
4759
+ } | null | undefined;
4760
+ requested_by?: {
4761
+ surface: "chat" | "gateway" | "cli" | "tui";
4762
+ platform?: string | undefined;
4763
+ conversation_id?: string | undefined;
4764
+ identity_key?: string | undefined;
4765
+ user_id?: string | undefined;
4766
+ } | null | undefined;
4767
+ reply_target?: {
4768
+ metadata?: Record<string, unknown> | undefined;
4769
+ surface?: "chat" | "gateway" | "cli" | "tui" | undefined;
4770
+ platform?: string | undefined;
4771
+ conversation_id?: string | undefined;
4772
+ identity_key?: string | undefined;
4773
+ user_id?: string | undefined;
4774
+ channel?: "web" | "cli" | "tui" | "plugin_gateway" | undefined;
4775
+ message_id?: string | undefined;
4776
+ response_channel?: string | undefined;
4777
+ outbox_topic?: string | undefined;
4778
+ deliveryMode?: "reply" | "notify" | "thread_reply" | undefined;
4779
+ delivery_mode?: "reply" | "notify" | "thread_reply" | undefined;
4780
+ } | null | undefined;
4781
+ expires_at?: string | null | undefined;
4782
+ browser_session_id?: string | null | undefined;
4783
+ resumable_session_id?: string | null | undefined;
4784
+ supersedes_handoff_id?: string | null | undefined;
4785
+ superseded_by_handoff_id?: string | null | undefined;
4786
+ failure_code?: string | null | undefined;
4787
+ failure_message?: string | null | undefined;
4788
+ }[];
4789
+ recent_terminal: {
4790
+ updated_at: string;
4791
+ schema_version: "runtime-auth-handoff-v1";
4792
+ state: "completed" | "cancelled" | "blocked" | "expired" | "in_progress" | "requested" | "pending_operator" | "superseded";
4793
+ requested_at: string;
4794
+ handoff_id: string;
4795
+ provider_id: string;
4796
+ service_key: string;
4797
+ workspace: string;
4798
+ actor_key: string;
4799
+ completed_at?: string | null | undefined;
4800
+ evidence_refs?: {
4801
+ kind: string;
4802
+ ref: string;
4803
+ observed_at?: string | undefined;
4804
+ }[] | undefined;
4805
+ resume_hint?: {
4806
+ tool_name: "browser_run_workflow";
4807
+ task_summary: string;
4808
+ input_ref?: string | undefined;
4809
+ } | null | undefined;
4810
+ requested_by?: {
4811
+ surface: "chat" | "gateway" | "cli" | "tui";
4812
+ platform?: string | undefined;
4813
+ conversation_id?: string | undefined;
4814
+ identity_key?: string | undefined;
4815
+ user_id?: string | undefined;
4816
+ } | null | undefined;
4817
+ reply_target?: {
4818
+ metadata?: Record<string, unknown> | undefined;
4819
+ surface?: "chat" | "gateway" | "cli" | "tui" | undefined;
4820
+ platform?: string | undefined;
4821
+ conversation_id?: string | undefined;
4822
+ identity_key?: string | undefined;
4823
+ user_id?: string | undefined;
4824
+ channel?: "web" | "cli" | "tui" | "plugin_gateway" | undefined;
4825
+ message_id?: string | undefined;
4826
+ response_channel?: string | undefined;
4827
+ outbox_topic?: string | undefined;
4828
+ deliveryMode?: "reply" | "notify" | "thread_reply" | undefined;
4829
+ delivery_mode?: "reply" | "notify" | "thread_reply" | undefined;
4830
+ } | null | undefined;
4831
+ expires_at?: string | null | undefined;
4832
+ browser_session_id?: string | null | undefined;
4833
+ resumable_session_id?: string | null | undefined;
4834
+ supersedes_handoff_id?: string | null | undefined;
4835
+ superseded_by_handoff_id?: string | null | undefined;
4836
+ failure_code?: string | null | undefined;
4837
+ failure_message?: string | null | undefined;
4838
+ }[];
4839
+ };
4840
+ browser_sessions: {
4841
+ stale: {
4842
+ created_at: string;
4843
+ updated_at: string;
4844
+ state: "blocked" | "expired" | "unavailable" | "fresh" | "authenticated" | "auth_required";
4845
+ session_id: string;
4846
+ provider_id: string;
4847
+ service_key: string;
4848
+ workspace: string;
4849
+ actor_key: string;
4850
+ metadata?: Record<string, unknown> | undefined;
4851
+ expires_at?: string | null | undefined;
4852
+ last_auth_at?: string | null | undefined;
4853
+ last_failure_code?: string | null | undefined;
4854
+ last_failure_message?: string | null | undefined;
4855
+ }[];
4856
+ authenticated: {
4857
+ created_at: string;
4858
+ updated_at: string;
4859
+ state: "blocked" | "expired" | "unavailable" | "fresh" | "authenticated" | "auth_required";
4860
+ session_id: string;
4861
+ provider_id: string;
4862
+ service_key: string;
4863
+ workspace: string;
4864
+ actor_key: string;
4865
+ metadata?: Record<string, unknown> | undefined;
4866
+ expires_at?: string | null | undefined;
4867
+ last_auth_at?: string | null | undefined;
4868
+ last_failure_code?: string | null | undefined;
4869
+ last_failure_message?: string | null | undefined;
4870
+ }[];
4871
+ };
4872
+ guardrails: {
4873
+ open_breakers: {
4874
+ updated_at: string;
4875
+ state: "paused" | "closed" | "open" | "half_open";
4876
+ provider_id: string;
4877
+ service_key: string;
4878
+ key: string;
4879
+ failure_count: number;
4880
+ cooldown_until?: string | null | undefined;
4881
+ last_failure_code?: string | null | undefined;
4882
+ last_failure_message?: string | null | undefined;
4883
+ last_failure_at?: string | null | undefined;
4884
+ opened_at?: string | null | undefined;
4885
+ }[];
4886
+ paused_breakers: {
4887
+ updated_at: string;
4888
+ state: "paused" | "closed" | "open" | "half_open";
4889
+ provider_id: string;
4890
+ service_key: string;
4891
+ key: string;
4892
+ failure_count: number;
4893
+ cooldown_until?: string | null | undefined;
4894
+ last_failure_code?: string | null | undefined;
4895
+ last_failure_message?: string | null | undefined;
4896
+ last_failure_at?: string | null | undefined;
4897
+ opened_at?: string | null | undefined;
4898
+ }[];
4899
+ half_open_breakers: {
4900
+ updated_at: string;
4901
+ state: "paused" | "closed" | "open" | "half_open";
4902
+ provider_id: string;
4903
+ service_key: string;
4904
+ key: string;
4905
+ failure_count: number;
4906
+ cooldown_until?: string | null | undefined;
4907
+ last_failure_code?: string | null | undefined;
4908
+ last_failure_message?: string | null | undefined;
4909
+ last_failure_at?: string | null | undefined;
4910
+ opened_at?: string | null | undefined;
4911
+ }[];
4912
+ };
4913
+ blocked_work: {
4914
+ kind: "backpressure" | "auth_wait" | "guardrail_open" | "provider_unavailable";
4915
+ reason: string;
4916
+ provider_id: string;
4917
+ service_key: string;
4918
+ since: string;
4919
+ goal_id?: string | null | undefined;
4920
+ run_id?: string | null | undefined;
4921
+ handoff_id?: string | null | undefined;
4922
+ retry_after?: string | null | undefined;
4923
+ }[];
4924
+ }>;
4925
+ export type RuntimeAutomationSnapshot = z.infer<typeof RuntimeAutomationSnapshotSchema>;
2716
4926
  export declare function summarizeRuntimeHealthStatus(components: Record<string, RuntimeHealthStatus>): RuntimeHealthStatus;
2717
4927
  export declare function classifyLongRunHealth(signals: RuntimeLongRunHealthSignals): RuntimeLongRunHealthSummary;
2718
4928
  export declare function buildLongRunHealth(signals: RuntimeLongRunHealthSignals, checkedAt?: number): RuntimeLongRunHealth;