@maiaos/protocol 0.1.0-canary.7 → 0.1.0-canary.71

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 (910) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +15 -6
  3. package/dist/agent/definition.d.ts +3 -3
  4. package/dist/agent/definition.d.ts.map +1 -1
  5. package/dist/agent/definition.js +1 -1
  6. package/dist/agent/definition.js.map +1 -1
  7. package/dist/agent/effect-schema.d.ts +2 -0
  8. package/dist/agent/effect-schema.d.ts.map +1 -1
  9. package/dist/agent/effect-schema.js +3 -0
  10. package/dist/agent/effect-schema.js.map +1 -1
  11. package/dist/agent/index.d.ts +1 -1
  12. package/dist/agent/index.d.ts.map +1 -1
  13. package/dist/agent/index.js +1 -1
  14. package/dist/agent/index.js.map +1 -1
  15. package/dist/agent/worker-operation.d.ts +42 -1
  16. package/dist/agent/worker-operation.d.ts.map +1 -1
  17. package/dist/agents/contract.d.ts +27 -0
  18. package/dist/agents/contract.d.ts.map +1 -1
  19. package/dist/agents/contract.js +4 -1
  20. package/dist/agents/contract.js.map +1 -1
  21. package/dist/agents/effect-schema.d.ts +53 -2
  22. package/dist/agents/effect-schema.d.ts.map +1 -1
  23. package/dist/agents/effect-schema.js +51 -10
  24. package/dist/agents/effect-schema.js.map +1 -1
  25. package/dist/agents/feature.d.ts +54 -4
  26. package/dist/agents/feature.d.ts.map +1 -1
  27. package/dist/agents/feature.js +52 -4
  28. package/dist/agents/feature.js.map +1 -1
  29. package/dist/agents/index.d.ts +1 -1
  30. package/dist/agents/index.d.ts.map +1 -1
  31. package/dist/agents/index.js +1 -1
  32. package/dist/agents/index.js.map +1 -1
  33. package/dist/approval/contract.d.ts +21 -5
  34. package/dist/approval/contract.d.ts.map +1 -1
  35. package/dist/approval/contract.js +2 -1
  36. package/dist/approval/contract.js.map +1 -1
  37. package/dist/approval/effect-schema.d.ts +1 -1
  38. package/dist/approval/effect-schema.d.ts.map +1 -1
  39. package/dist/approval/effect-schema.js +1 -1
  40. package/dist/approval/effect-schema.js.map +1 -1
  41. package/dist/approval/feature.d.ts +21 -2
  42. package/dist/approval/feature.d.ts.map +1 -1
  43. package/dist/approval/feature.js +21 -2
  44. package/dist/approval/feature.js.map +1 -1
  45. package/dist/approval/index.d.ts +1 -1
  46. package/dist/approval/index.d.ts.map +1 -1
  47. package/dist/approval/index.js +1 -1
  48. package/dist/approval/index.js.map +1 -1
  49. package/dist/approval/request-effect-schema.d.ts +40 -5
  50. package/dist/approval/request-effect-schema.d.ts.map +1 -1
  51. package/dist/approval/request-effect-schema.js +30 -7
  52. package/dist/approval/request-effect-schema.js.map +1 -1
  53. package/dist/approval/result-effect-schema.d.ts +14 -6
  54. package/dist/approval/result-effect-schema.d.ts.map +1 -1
  55. package/dist/board/contract.d.ts +1668 -0
  56. package/dist/board/contract.d.ts.map +1 -0
  57. package/dist/board/contract.js +108 -0
  58. package/dist/board/contract.js.map +1 -0
  59. package/dist/board/effect-schema.d.ts +6 -0
  60. package/dist/board/effect-schema.d.ts.map +1 -0
  61. package/dist/board/effect-schema.js +6 -0
  62. package/dist/board/effect-schema.js.map +1 -0
  63. package/dist/board/feature.d.ts +565 -0
  64. package/dist/board/feature.d.ts.map +1 -0
  65. package/dist/board/feature.js +535 -0
  66. package/dist/board/feature.js.map +1 -0
  67. package/dist/board/index.d.ts +3 -0
  68. package/dist/board/index.d.ts.map +1 -0
  69. package/dist/board/index.js +3 -0
  70. package/dist/board/index.js.map +1 -0
  71. package/dist/board/manage-effect-schema.d.ts +493 -0
  72. package/dist/board/manage-effect-schema.d.ts.map +1 -0
  73. package/dist/board/manage-effect-schema.js +73 -0
  74. package/dist/board/manage-effect-schema.js.map +1 -0
  75. package/dist/board/model-effect-schema.d.ts +111 -0
  76. package/dist/board/model-effect-schema.d.ts.map +1 -0
  77. package/dist/board/model-effect-schema.js +120 -0
  78. package/dist/board/model-effect-schema.js.map +1 -0
  79. package/dist/board/plan-effect-schema.d.ts +120 -0
  80. package/dist/board/plan-effect-schema.d.ts.map +1 -0
  81. package/dist/board/plan-effect-schema.js +108 -0
  82. package/dist/board/plan-effect-schema.js.map +1 -0
  83. package/dist/board/task-effect-schema.d.ts +1835 -0
  84. package/dist/board/task-effect-schema.d.ts.map +1 -0
  85. package/dist/board/task-effect-schema.js +275 -0
  86. package/dist/board/task-effect-schema.js.map +1 -0
  87. package/dist/board/thread-effect-schema.d.ts +633 -0
  88. package/dist/board/thread-effect-schema.d.ts.map +1 -0
  89. package/dist/board/thread-effect-schema.js +116 -0
  90. package/dist/board/thread-effect-schema.js.map +1 -0
  91. package/dist/command-receipt/contract.d.ts +3 -0
  92. package/dist/command-receipt/contract.d.ts.map +1 -1
  93. package/dist/command-receipt/effect-schema.d.ts +12 -0
  94. package/dist/command-receipt/effect-schema.d.ts.map +1 -1
  95. package/dist/command-receipt/effect-schema.js +7 -0
  96. package/dist/command-receipt/effect-schema.js.map +1 -1
  97. package/dist/command-receipt/feature.d.ts +10 -0
  98. package/dist/command-receipt/feature.d.ts.map +1 -1
  99. package/dist/command-receipt/feature.js +10 -0
  100. package/dist/command-receipt/feature.js.map +1 -1
  101. package/dist/connection/access-effect-schema.d.ts +4 -0
  102. package/dist/connection/access-effect-schema.d.ts.map +1 -1
  103. package/dist/connection/contract.d.ts +154 -2
  104. package/dist/connection/contract.d.ts.map +1 -1
  105. package/dist/connection/contract.js +7 -0
  106. package/dist/connection/contract.js.map +1 -1
  107. package/dist/connection/effect-schema.d.ts +149 -2
  108. package/dist/connection/effect-schema.d.ts.map +1 -1
  109. package/dist/connection/effect-schema.js +3 -0
  110. package/dist/connection/effect-schema.js.map +1 -1
  111. package/dist/connection/executors-effect-schema.d.ts +259 -0
  112. package/dist/connection/executors-effect-schema.d.ts.map +1 -0
  113. package/dist/connection/executors-effect-schema.js +80 -0
  114. package/dist/connection/executors-effect-schema.js.map +1 -0
  115. package/dist/connection/feature.d.ts +301 -10
  116. package/dist/connection/feature.d.ts.map +1 -1
  117. package/dist/connection/feature.js +381 -46
  118. package/dist/connection/feature.js.map +1 -1
  119. package/dist/connection/gateway-effect-schema.d.ts +7 -0
  120. package/dist/connection/gateway-effect-schema.d.ts.map +1 -1
  121. package/dist/connection/gateway-effect-schema.js +7 -0
  122. package/dist/connection/gateway-effect-schema.js.map +1 -1
  123. package/dist/connection/index.d.ts +1 -1
  124. package/dist/connection/index.d.ts.map +1 -1
  125. package/dist/connection/index.js +1 -1
  126. package/dist/connection/index.js.map +1 -1
  127. package/dist/connection/request-effect-schema.d.ts +11 -4
  128. package/dist/connection/request-effect-schema.d.ts.map +1 -1
  129. package/dist/connection/request-effect-schema.js +19 -12
  130. package/dist/connection/request-effect-schema.js.map +1 -1
  131. package/dist/connection/result-effect-schema.d.ts +34 -6
  132. package/dist/connection/result-effect-schema.d.ts.map +1 -1
  133. package/dist/connection/result-effect-schema.js +4 -3
  134. package/dist/connection/result-effect-schema.js.map +1 -1
  135. package/dist/connection/system-effect-schema.d.ts +8 -0
  136. package/dist/connection/system-effect-schema.d.ts.map +1 -1
  137. package/dist/connection/system-effect-schema.js +4 -2
  138. package/dist/connection/system-effect-schema.js.map +1 -1
  139. package/dist/container/contract.d.ts +2 -0
  140. package/dist/container/contract.d.ts.map +1 -1
  141. package/dist/container/effect-schema.d.ts +4 -0
  142. package/dist/container/effect-schema.d.ts.map +1 -1
  143. package/dist/container/portfolio-feature.d.ts +286 -0
  144. package/dist/container/portfolio-feature.d.ts.map +1 -1
  145. package/dist/container/portfolio-feature.js +131 -0
  146. package/dist/container/portfolio-feature.js.map +1 -1
  147. package/dist/coordinator-tool/index.d.ts +1 -1
  148. package/dist/coordinator-tool/index.d.ts.map +1 -1
  149. package/dist/coordinator-tool/index.js +1 -1
  150. package/dist/coordinator-tool/index.js.map +1 -1
  151. package/dist/coordinator-tool/input-schema.d.ts +0 -7
  152. package/dist/coordinator-tool/input-schema.d.ts.map +1 -1
  153. package/dist/coordinator-tool/input-schema.js +0 -38
  154. package/dist/coordinator-tool/input-schema.js.map +1 -1
  155. package/dist/coordinator-tool/registry.d.ts +21 -0
  156. package/dist/coordinator-tool/registry.d.ts.map +1 -1
  157. package/dist/coordinator-tool/registry.js +175 -4
  158. package/dist/coordinator-tool/registry.js.map +1 -1
  159. package/dist/discovery/contract.d.ts +140 -2
  160. package/dist/discovery/contract.d.ts.map +1 -1
  161. package/dist/discovery/contract.js +11 -1
  162. package/dist/discovery/contract.js.map +1 -1
  163. package/dist/discovery/effect-schema.d.ts +323 -6
  164. package/dist/discovery/effect-schema.d.ts.map +1 -1
  165. package/dist/discovery/effect-schema.js +157 -8
  166. package/dist/discovery/effect-schema.js.map +1 -1
  167. package/dist/discovery/feature.d.ts +82 -2
  168. package/dist/discovery/feature.d.ts.map +1 -1
  169. package/dist/discovery/feature.js +78 -2
  170. package/dist/discovery/feature.js.map +1 -1
  171. package/dist/discovery/index.d.ts +1 -1
  172. package/dist/discovery/index.d.ts.map +1 -1
  173. package/dist/discovery/index.js +1 -1
  174. package/dist/discovery/index.js.map +1 -1
  175. package/dist/envelope/effect-schema.d.ts +38 -17
  176. package/dist/envelope/effect-schema.d.ts.map +1 -1
  177. package/dist/envelope/effect-schema.js +30 -8
  178. package/dist/envelope/effect-schema.js.map +1 -1
  179. package/dist/envelope/envelope.d.ts +25 -3
  180. package/dist/envelope/envelope.d.ts.map +1 -1
  181. package/dist/envelope/envelope.js +37 -1
  182. package/dist/envelope/envelope.js.map +1 -1
  183. package/dist/envelope/index.d.ts +2 -2
  184. package/dist/envelope/index.d.ts.map +1 -1
  185. package/dist/envelope/index.js +2 -2
  186. package/dist/envelope/index.js.map +1 -1
  187. package/dist/envelope/policy.d.ts +11 -0
  188. package/dist/envelope/policy.d.ts.map +1 -1
  189. package/dist/envelope/policy.js +13 -0
  190. package/dist/envelope/policy.js.map +1 -1
  191. package/dist/event/contract.d.ts +47 -0
  192. package/dist/event/contract.d.ts.map +1 -1
  193. package/dist/event/contract.js +3 -0
  194. package/dist/event/contract.js.map +1 -1
  195. package/dist/event/effect-schema.d.ts +3 -1
  196. package/dist/event/effect-schema.d.ts.map +1 -1
  197. package/dist/event/effect-schema.js +3 -1
  198. package/dist/event/effect-schema.js.map +1 -1
  199. package/dist/event/envelope-effect-schema.d.ts +2 -0
  200. package/dist/event/envelope-effect-schema.d.ts.map +1 -1
  201. package/dist/event/envelope-effect-schema.js +2 -0
  202. package/dist/event/envelope-effect-schema.js.map +1 -1
  203. package/dist/event/feature.d.ts +35 -0
  204. package/dist/event/feature.d.ts.map +1 -0
  205. package/dist/event/feature.js +39 -0
  206. package/dist/event/feature.js.map +1 -0
  207. package/dist/event/format.d.ts +6 -0
  208. package/dist/event/format.d.ts.map +1 -1
  209. package/dist/event/format.js +6 -0
  210. package/dist/event/format.js.map +1 -1
  211. package/dist/event/index.d.ts +4 -1
  212. package/dist/event/index.d.ts.map +1 -1
  213. package/dist/event/index.js +4 -1
  214. package/dist/event/index.js.map +1 -1
  215. package/dist/event/lifecycle/effect-schema.d.ts +31 -0
  216. package/dist/event/lifecycle/effect-schema.d.ts.map +1 -0
  217. package/dist/event/lifecycle/effect-schema.js +36 -0
  218. package/dist/event/lifecycle/effect-schema.js.map +1 -0
  219. package/dist/event/lifecycle/index.d.ts +2 -0
  220. package/dist/event/lifecycle/index.d.ts.map +1 -0
  221. package/dist/event/lifecycle/index.js +2 -0
  222. package/dist/event/lifecycle/index.js.map +1 -0
  223. package/dist/event/lifecycle/schema.d.ts +20 -0
  224. package/dist/event/lifecycle/schema.d.ts.map +1 -0
  225. package/dist/event/lifecycle/schema.js +7 -0
  226. package/dist/event/lifecycle/schema.js.map +1 -0
  227. package/dist/event/read-effect-schema.d.ts +105 -0
  228. package/dist/event/read-effect-schema.d.ts.map +1 -0
  229. package/dist/event/read-effect-schema.js +64 -0
  230. package/dist/event/read-effect-schema.js.map +1 -0
  231. package/dist/event/registry.d.ts +5 -0
  232. package/dist/event/registry.d.ts.map +1 -1
  233. package/dist/event/registry.js +288 -8
  234. package/dist/event/registry.js.map +1 -1
  235. package/dist/event/session-activity-effect-schema.d.ts +36 -0
  236. package/dist/event/session-activity-effect-schema.d.ts.map +1 -0
  237. package/dist/event/session-activity-effect-schema.js +58 -0
  238. package/dist/event/session-activity-effect-schema.js.map +1 -0
  239. package/dist/event/session-activity.d.ts +30 -0
  240. package/dist/event/session-activity.d.ts.map +1 -0
  241. package/dist/event/session-activity.js +19 -0
  242. package/dist/event/session-activity.js.map +1 -0
  243. package/dist/event/update-effect-schema.d.ts +20 -0
  244. package/dist/event/update-effect-schema.d.ts.map +1 -0
  245. package/dist/event/update-effect-schema.js +29 -0
  246. package/dist/event/update-effect-schema.js.map +1 -0
  247. package/dist/event/update.d.ts +16 -0
  248. package/dist/event/update.d.ts.map +1 -0
  249. package/dist/event/update.js +6 -0
  250. package/dist/event/update.js.map +1 -0
  251. package/dist/event/waiting/effect-schema.d.ts +42 -0
  252. package/dist/event/waiting/effect-schema.d.ts.map +1 -0
  253. package/dist/event/waiting/effect-schema.js +51 -0
  254. package/dist/event/waiting/effect-schema.js.map +1 -0
  255. package/dist/event/waiting/index.d.ts +2 -0
  256. package/dist/event/waiting/index.d.ts.map +1 -0
  257. package/dist/event/waiting/index.js +2 -0
  258. package/dist/event/waiting/index.js.map +1 -0
  259. package/dist/event/waiting/schema.d.ts +23 -0
  260. package/dist/event/waiting/schema.d.ts.map +1 -0
  261. package/dist/event/waiting/schema.js +6 -0
  262. package/dist/event/waiting/schema.js.map +1 -0
  263. package/dist/event-stream/contract.d.ts +121 -0
  264. package/dist/event-stream/contract.d.ts.map +1 -0
  265. package/dist/event-stream/contract.js +5 -0
  266. package/dist/event-stream/contract.js.map +1 -0
  267. package/dist/event-stream/effect-schema.d.ts +118 -0
  268. package/dist/event-stream/effect-schema.d.ts.map +1 -0
  269. package/dist/event-stream/effect-schema.js +90 -0
  270. package/dist/event-stream/effect-schema.js.map +1 -0
  271. package/dist/event-stream/index.d.ts +2 -0
  272. package/dist/event-stream/index.d.ts.map +1 -0
  273. package/dist/event-stream/index.js +2 -0
  274. package/dist/event-stream/index.js.map +1 -0
  275. package/dist/execution/contract.d.ts +1 -0
  276. package/dist/execution/contract.d.ts.map +1 -1
  277. package/dist/execution/effect-schema.d.ts +6 -0
  278. package/dist/execution/effect-schema.d.ts.map +1 -1
  279. package/dist/execution/feature.d.ts +575 -0
  280. package/dist/execution/feature.d.ts.map +1 -0
  281. package/dist/execution/feature.js +543 -0
  282. package/dist/execution/feature.js.map +1 -0
  283. package/dist/execution/file-operation-contract.d.ts +1 -0
  284. package/dist/execution/file-operation-contract.d.ts.map +1 -1
  285. package/dist/execution/file-operation-effect-schema.d.ts +1 -0
  286. package/dist/execution/file-operation-effect-schema.d.ts.map +1 -1
  287. package/dist/execution/index.d.ts +1 -0
  288. package/dist/execution/index.d.ts.map +1 -1
  289. package/dist/execution/index.js +1 -0
  290. package/dist/execution/index.js.map +1 -1
  291. package/dist/execution/operation-contract.d.ts +1 -0
  292. package/dist/execution/operation-contract.d.ts.map +1 -1
  293. package/dist/execution/operation-effect-schema.d.ts +1 -0
  294. package/dist/execution/operation-effect-schema.d.ts.map +1 -1
  295. package/dist/execution/placement/contract.d.ts +4 -0
  296. package/dist/execution/placement/contract.d.ts.map +1 -1
  297. package/dist/execution/placement/effect-schema.d.ts +4 -0
  298. package/dist/execution/placement/effect-schema.d.ts.map +1 -1
  299. package/dist/execution/relocation/contract.d.ts +2 -0
  300. package/dist/execution/relocation/contract.d.ts.map +1 -1
  301. package/dist/execution/relocation/effect-schema.d.ts +4 -0
  302. package/dist/execution/relocation/effect-schema.d.ts.map +1 -1
  303. package/dist/execution/worktree/contract.d.ts +12 -0
  304. package/dist/execution/worktree/contract.d.ts.map +1 -1
  305. package/dist/execution/worktree/effect-schema.d.ts +20 -0
  306. package/dist/execution/worktree/effect-schema.d.ts.map +1 -1
  307. package/dist/execution/worktree/effect-schema.js +11 -0
  308. package/dist/execution/worktree/effect-schema.js.map +1 -1
  309. package/dist/executor/index.d.ts +2 -0
  310. package/dist/executor/index.d.ts.map +1 -0
  311. package/dist/executor/index.js +2 -0
  312. package/dist/executor/index.js.map +1 -0
  313. package/dist/executor/policy.d.ts +27 -0
  314. package/dist/executor/policy.d.ts.map +1 -0
  315. package/dist/executor/policy.js +47 -0
  316. package/dist/executor/policy.js.map +1 -0
  317. package/dist/feature/descriptor/descriptor.d.ts +42 -2
  318. package/dist/feature/descriptor/descriptor.d.ts.map +1 -1
  319. package/dist/feature/descriptor/descriptor.js.map +1 -1
  320. package/dist/feature/descriptor/index.d.ts +1 -1
  321. package/dist/feature/descriptor/index.d.ts.map +1 -1
  322. package/dist/feature/descriptor/index.js.map +1 -1
  323. package/dist/feature/index.d.ts +1 -1
  324. package/dist/feature/index.d.ts.map +1 -1
  325. package/dist/feature/index.js +1 -1
  326. package/dist/feature/index.js.map +1 -1
  327. package/dist/feature/node-status.d.ts +65 -1
  328. package/dist/feature/node-status.d.ts.map +1 -1
  329. package/dist/feature/node-status.js +59 -1
  330. package/dist/feature/node-status.js.map +1 -1
  331. package/dist/feature/registry.d.ts +59 -4
  332. package/dist/feature/registry.d.ts.map +1 -1
  333. package/dist/feature/registry.js +53 -0
  334. package/dist/feature/registry.js.map +1 -1
  335. package/dist/github/contract.d.ts +266 -0
  336. package/dist/github/contract.d.ts.map +1 -0
  337. package/dist/github/contract.js +30 -0
  338. package/dist/github/contract.js.map +1 -0
  339. package/dist/github/effect-schema.d.ts +488 -0
  340. package/dist/github/effect-schema.d.ts.map +1 -0
  341. package/dist/github/effect-schema.js +231 -0
  342. package/dist/github/effect-schema.js.map +1 -0
  343. package/dist/github/feature.d.ts +201 -0
  344. package/dist/github/feature.d.ts.map +1 -0
  345. package/dist/github/feature.js +195 -0
  346. package/dist/github/feature.js.map +1 -0
  347. package/dist/github/index.d.ts +3 -0
  348. package/dist/github/index.d.ts.map +1 -0
  349. package/dist/github/index.js +3 -0
  350. package/dist/github/index.js.map +1 -0
  351. package/dist/goal/contract.d.ts +449 -0
  352. package/dist/goal/contract.d.ts.map +1 -0
  353. package/dist/goal/contract.js +37 -0
  354. package/dist/goal/contract.js.map +1 -0
  355. package/dist/goal/effect-schema.d.ts +870 -0
  356. package/dist/goal/effect-schema.d.ts.map +1 -0
  357. package/dist/goal/effect-schema.js +349 -0
  358. package/dist/goal/effect-schema.js.map +1 -0
  359. package/dist/goal/feature.d.ts +256 -0
  360. package/dist/goal/feature.d.ts.map +1 -0
  361. package/dist/goal/feature.js +237 -0
  362. package/dist/goal/feature.js.map +1 -0
  363. package/dist/goal/index.d.ts +3 -0
  364. package/dist/goal/index.d.ts.map +1 -0
  365. package/dist/goal/index.js +3 -0
  366. package/dist/goal/index.js.map +1 -0
  367. package/dist/harness/installed/effect-schema.d.ts.map +1 -1
  368. package/dist/harness/installed/effect-schema.js +2 -1
  369. package/dist/harness/installed/effect-schema.js.map +1 -1
  370. package/dist/harness/installed/feature.d.ts +35 -0
  371. package/dist/harness/installed/feature.d.ts.map +1 -0
  372. package/dist/harness/installed/feature.js +39 -0
  373. package/dist/harness/installed/feature.js.map +1 -0
  374. package/dist/harness/installed/index.d.ts +1 -0
  375. package/dist/harness/installed/index.d.ts.map +1 -1
  376. package/dist/harness/installed/index.js +1 -0
  377. package/dist/harness/installed/index.js.map +1 -1
  378. package/dist/hold/contract.d.ts +2 -0
  379. package/dist/hold/contract.d.ts.map +1 -1
  380. package/dist/hold/effect-schema.d.ts +4 -0
  381. package/dist/hold/effect-schema.d.ts.map +1 -1
  382. package/dist/hold/feature.d.ts +155 -0
  383. package/dist/hold/feature.d.ts.map +1 -0
  384. package/dist/hold/feature.js +151 -0
  385. package/dist/hold/feature.js.map +1 -0
  386. package/dist/hold/index.d.ts +1 -0
  387. package/dist/hold/index.d.ts.map +1 -1
  388. package/dist/hold/index.js +1 -0
  389. package/dist/hold/index.js.map +1 -1
  390. package/dist/inbox/contract.d.ts +386 -0
  391. package/dist/inbox/contract.d.ts.map +1 -0
  392. package/dist/inbox/contract.js +20 -0
  393. package/dist/inbox/contract.js.map +1 -0
  394. package/dist/inbox/effect-schema.d.ts +750 -0
  395. package/dist/inbox/effect-schema.d.ts.map +1 -0
  396. package/dist/inbox/effect-schema.js +246 -0
  397. package/dist/inbox/effect-schema.js.map +1 -0
  398. package/dist/inbox/feature.d.ts +164 -0
  399. package/dist/inbox/feature.d.ts.map +1 -0
  400. package/dist/inbox/feature.js +160 -0
  401. package/dist/inbox/feature.js.map +1 -0
  402. package/dist/inbox/index.d.ts +3 -0
  403. package/dist/inbox/index.d.ts.map +1 -0
  404. package/dist/inbox/index.js +3 -0
  405. package/dist/inbox/index.js.map +1 -0
  406. package/dist/index.d.ts +28 -15
  407. package/dist/index.d.ts.map +1 -1
  408. package/dist/index.js +28 -15
  409. package/dist/index.js.map +1 -1
  410. package/dist/integration-authorization/claude-code-contract.d.ts +3 -0
  411. package/dist/integration-authorization/claude-code-contract.d.ts.map +1 -1
  412. package/dist/integration-authorization/contract.d.ts +113 -12
  413. package/dist/integration-authorization/contract.d.ts.map +1 -1
  414. package/dist/integration-authorization/contract.js +28 -1
  415. package/dist/integration-authorization/contract.js.map +1 -1
  416. package/dist/integration-authorization/effect-schema.d.ts +4539 -1251
  417. package/dist/integration-authorization/effect-schema.d.ts.map +1 -1
  418. package/dist/integration-authorization/effect-schema.js +119 -6
  419. package/dist/integration-authorization/effect-schema.js.map +1 -1
  420. package/dist/integration-authorization/feature.d.ts +725 -0
  421. package/dist/integration-authorization/feature.d.ts.map +1 -0
  422. package/dist/integration-authorization/feature.js +683 -0
  423. package/dist/integration-authorization/feature.js.map +1 -0
  424. package/dist/integration-authorization/index.d.ts +4 -0
  425. package/dist/integration-authorization/index.d.ts.map +1 -1
  426. package/dist/integration-authorization/index.js +4 -0
  427. package/dist/integration-authorization/index.js.map +1 -1
  428. package/dist/integration-authorization/pi-rpc-contract.d.ts +3 -0
  429. package/dist/integration-authorization/pi-rpc-contract.d.ts.map +1 -1
  430. package/dist/integration-authorization/policy.d.ts +6 -1
  431. package/dist/integration-authorization/policy.d.ts.map +1 -1
  432. package/dist/integration-authorization/policy.js +6 -1
  433. package/dist/integration-authorization/policy.js.map +1 -1
  434. package/dist/interaction/effect-schema.d.ts +1 -1
  435. package/dist/interaction/effect-schema.d.ts.map +1 -1
  436. package/dist/interaction/effect-schema.js +1 -1
  437. package/dist/interaction/effect-schema.js.map +1 -1
  438. package/dist/interaction/feature.d.ts +50 -0
  439. package/dist/interaction/feature.d.ts.map +1 -1
  440. package/dist/interaction/feature.js +48 -0
  441. package/dist/interaction/feature.js.map +1 -1
  442. package/dist/interaction/result-contract.d.ts +3 -0
  443. package/dist/interaction/result-contract.d.ts.map +1 -1
  444. package/dist/interaction/result-effect-schema.d.ts +6 -0
  445. package/dist/interaction/result-effect-schema.d.ts.map +1 -1
  446. package/dist/invocation-context/contract.d.ts +2 -1
  447. package/dist/invocation-context/contract.d.ts.map +1 -1
  448. package/dist/invocation-context/effect-schema.d.ts +12 -2
  449. package/dist/invocation-context/effect-schema.d.ts.map +1 -1
  450. package/dist/invocation-context/effect-schema.js +24 -3
  451. package/dist/invocation-context/effect-schema.js.map +1 -1
  452. package/dist/invocation-context/feature.d.ts +35 -0
  453. package/dist/invocation-context/feature.d.ts.map +1 -0
  454. package/dist/invocation-context/feature.js +39 -0
  455. package/dist/invocation-context/feature.js.map +1 -0
  456. package/dist/invocation-context/index.d.ts +1 -0
  457. package/dist/invocation-context/index.d.ts.map +1 -1
  458. package/dist/invocation-context/index.js +1 -0
  459. package/dist/invocation-context/index.js.map +1 -1
  460. package/dist/invocation-context/policy.d.ts +6 -1
  461. package/dist/invocation-context/policy.d.ts.map +1 -1
  462. package/dist/invocation-context/policy.js +7 -1
  463. package/dist/invocation-context/policy.js.map +1 -1
  464. package/dist/local-node/contract.d.ts +57 -18
  465. package/dist/local-node/contract.d.ts.map +1 -1
  466. package/dist/local-node/contract.js +3 -1
  467. package/dist/local-node/contract.js.map +1 -1
  468. package/dist/local-node/effect-schema.d.ts +3881 -1273
  469. package/dist/local-node/effect-schema.d.ts.map +1 -1
  470. package/dist/local-node/effect-schema.js +122 -10
  471. package/dist/local-node/effect-schema.js.map +1 -1
  472. package/dist/local-node/index.d.ts +2 -2
  473. package/dist/local-node/index.d.ts.map +1 -1
  474. package/dist/local-node/index.js +2 -2
  475. package/dist/local-node/index.js.map +1 -1
  476. package/dist/local-node/node-api/index.d.ts +2 -2
  477. package/dist/local-node/node-api/index.d.ts.map +1 -1
  478. package/dist/local-node/node-api/index.js +2 -2
  479. package/dist/local-node/node-api/index.js.map +1 -1
  480. package/dist/local-node/node-api/methods.d.ts +11 -214
  481. package/dist/local-node/node-api/methods.d.ts.map +1 -1
  482. package/dist/local-node/node-api/methods.js +145 -214
  483. package/dist/local-node/node-api/methods.js.map +1 -1
  484. package/dist/local-node/node-api/policy.d.ts +33 -0
  485. package/dist/local-node/node-api/policy.d.ts.map +1 -1
  486. package/dist/local-node/node-api/policy.js +33 -0
  487. package/dist/local-node/node-api/policy.js.map +1 -1
  488. package/dist/local-node/receipt-list.d.ts +6 -7
  489. package/dist/local-node/receipt-list.d.ts.map +1 -1
  490. package/dist/local-node/receipt-list.js +62 -7
  491. package/dist/local-node/receipt-list.js.map +1 -1
  492. package/dist/node-update/contract.d.ts +198 -0
  493. package/dist/node-update/contract.d.ts.map +1 -0
  494. package/dist/node-update/contract.js +22 -0
  495. package/dist/node-update/contract.js.map +1 -0
  496. package/dist/node-update/effect-schema.d.ts +435 -0
  497. package/dist/node-update/effect-schema.d.ts.map +1 -0
  498. package/dist/node-update/effect-schema.js +307 -0
  499. package/dist/node-update/effect-schema.js.map +1 -0
  500. package/dist/node-update/feature.d.ts +379 -0
  501. package/dist/node-update/feature.d.ts.map +1 -0
  502. package/dist/node-update/feature.js +363 -0
  503. package/dist/node-update/feature.js.map +1 -0
  504. package/dist/node-update/index.d.ts +3 -0
  505. package/dist/node-update/index.d.ts.map +1 -0
  506. package/dist/node-update/index.js +3 -0
  507. package/dist/node-update/index.js.map +1 -0
  508. package/dist/orchestration/contract.d.ts +6 -0
  509. package/dist/orchestration/contract.d.ts.map +1 -1
  510. package/dist/orchestration/effect-schema.d.ts +14 -2
  511. package/dist/orchestration/effect-schema.d.ts.map +1 -1
  512. package/dist/orchestration/effect-schema.js +2 -2
  513. package/dist/orchestration/effect-schema.js.map +1 -1
  514. package/dist/orchestration/feature.d.ts +235 -0
  515. package/dist/orchestration/feature.d.ts.map +1 -1
  516. package/dist/orchestration/feature.js +227 -0
  517. package/dist/orchestration/feature.js.map +1 -1
  518. package/dist/orchestration/topology.d.ts +11 -1
  519. package/dist/orchestration/topology.d.ts.map +1 -1
  520. package/dist/orchestration/topology.js +38 -29
  521. package/dist/orchestration/topology.js.map +1 -1
  522. package/dist/pairing/contract.d.ts +86 -0
  523. package/dist/pairing/contract.d.ts.map +1 -0
  524. package/dist/pairing/contract.js +12 -0
  525. package/dist/pairing/contract.js.map +1 -0
  526. package/dist/pairing/effect-schema.d.ts +166 -0
  527. package/dist/pairing/effect-schema.d.ts.map +1 -0
  528. package/dist/pairing/effect-schema.js +94 -0
  529. package/dist/pairing/effect-schema.js.map +1 -0
  530. package/dist/pairing/feature.d.ts +141 -0
  531. package/dist/pairing/feature.d.ts.map +1 -0
  532. package/dist/pairing/feature.js +139 -0
  533. package/dist/pairing/feature.js.map +1 -0
  534. package/dist/pairing/index.d.ts +3 -0
  535. package/dist/pairing/index.d.ts.map +1 -0
  536. package/dist/pairing/index.js +3 -0
  537. package/dist/pairing/index.js.map +1 -0
  538. package/dist/port-lease/contract.d.ts +3 -0
  539. package/dist/port-lease/contract.d.ts.map +1 -1
  540. package/dist/port-lease/feature.d.ts +21 -0
  541. package/dist/port-lease/feature.d.ts.map +1 -1
  542. package/dist/port-lease/feature.js +21 -0
  543. package/dist/port-lease/feature.js.map +1 -1
  544. package/dist/port-lease/result-effect-schema.d.ts +6 -0
  545. package/dist/port-lease/result-effect-schema.d.ts.map +1 -1
  546. package/dist/presentation/contract.d.ts +41 -2
  547. package/dist/presentation/contract.d.ts.map +1 -1
  548. package/dist/presentation/effect-schema.d.ts +37 -2
  549. package/dist/presentation/effect-schema.d.ts.map +1 -1
  550. package/dist/presentation/feature.d.ts +20 -0
  551. package/dist/presentation/feature.d.ts.map +1 -1
  552. package/dist/presentation/feature.js +20 -0
  553. package/dist/presentation/feature.js.map +1 -1
  554. package/dist/presentation/session-list-effect-schema.d.ts +37 -2
  555. package/dist/presentation/session-list-effect-schema.d.ts.map +1 -1
  556. package/dist/principal/contract.d.ts +104 -0
  557. package/dist/principal/contract.d.ts.map +1 -0
  558. package/dist/principal/contract.js +18 -0
  559. package/dist/principal/contract.js.map +1 -0
  560. package/dist/principal/effect-schema.d.ts +166 -0
  561. package/dist/principal/effect-schema.d.ts.map +1 -0
  562. package/dist/principal/effect-schema.js +93 -0
  563. package/dist/principal/effect-schema.js.map +1 -0
  564. package/dist/principal/feature.d.ts +111 -0
  565. package/dist/principal/feature.d.ts.map +1 -0
  566. package/dist/principal/feature.js +111 -0
  567. package/dist/principal/feature.js.map +1 -0
  568. package/dist/principal/index.d.ts +3 -0
  569. package/dist/principal/index.d.ts.map +1 -0
  570. package/dist/principal/index.js +3 -0
  571. package/dist/principal/index.js.map +1 -0
  572. package/dist/project-workspace/contract.d.ts +351 -2
  573. package/dist/project-workspace/contract.d.ts.map +1 -1
  574. package/dist/project-workspace/contract.js +34 -2
  575. package/dist/project-workspace/contract.js.map +1 -1
  576. package/dist/project-workspace/effect-schema.d.ts +403 -0
  577. package/dist/project-workspace/effect-schema.d.ts.map +1 -1
  578. package/dist/project-workspace/effect-schema.js +105 -1
  579. package/dist/project-workspace/effect-schema.js.map +1 -1
  580. package/dist/project-workspace/feature.d.ts +659 -1
  581. package/dist/project-workspace/feature.d.ts.map +1 -1
  582. package/dist/project-workspace/feature.js +625 -1
  583. package/dist/project-workspace/feature.js.map +1 -1
  584. package/dist/project-workspace/git-effect-schema.d.ts +93 -0
  585. package/dist/project-workspace/git-effect-schema.d.ts.map +1 -0
  586. package/dist/project-workspace/git-effect-schema.js +81 -0
  587. package/dist/project-workspace/git-effect-schema.js.map +1 -0
  588. package/dist/project-workspace/index.d.ts +2 -2
  589. package/dist/project-workspace/index.d.ts.map +1 -1
  590. package/dist/project-workspace/index.js +2 -2
  591. package/dist/project-workspace/index.js.map +1 -1
  592. package/dist/project-workspace/knowledge-effect-schema.d.ts +413 -0
  593. package/dist/project-workspace/knowledge-effect-schema.d.ts.map +1 -0
  594. package/dist/project-workspace/knowledge-effect-schema.js +232 -0
  595. package/dist/project-workspace/knowledge-effect-schema.js.map +1 -0
  596. package/dist/project-workspace/policy.d.ts +40 -0
  597. package/dist/project-workspace/policy.d.ts.map +1 -1
  598. package/dist/project-workspace/policy.js +39 -0
  599. package/dist/project-workspace/policy.js.map +1 -1
  600. package/dist/provider/feature.d.ts +35 -0
  601. package/dist/provider/feature.d.ts.map +1 -0
  602. package/dist/provider/feature.js +39 -0
  603. package/dist/provider/feature.js.map +1 -0
  604. package/dist/provider/index.d.ts +1 -0
  605. package/dist/provider/index.d.ts.map +1 -1
  606. package/dist/provider/index.js +1 -0
  607. package/dist/provider/index.js.map +1 -1
  608. package/dist/reach/address.d.ts +18 -0
  609. package/dist/reach/address.d.ts.map +1 -0
  610. package/dist/reach/address.js +42 -0
  611. package/dist/reach/address.js.map +1 -0
  612. package/dist/reach/contract.d.ts +68 -0
  613. package/dist/reach/contract.d.ts.map +1 -0
  614. package/dist/reach/contract.js +8 -0
  615. package/dist/reach/contract.js.map +1 -0
  616. package/dist/reach/effect-schema.d.ts +133 -0
  617. package/dist/reach/effect-schema.d.ts.map +1 -0
  618. package/dist/reach/effect-schema.js +68 -0
  619. package/dist/reach/effect-schema.js.map +1 -0
  620. package/dist/reach/feature.d.ts +106 -0
  621. package/dist/reach/feature.d.ts.map +1 -0
  622. package/dist/reach/feature.js +106 -0
  623. package/dist/reach/feature.js.map +1 -0
  624. package/dist/reach/index.d.ts +4 -0
  625. package/dist/reach/index.d.ts.map +1 -0
  626. package/dist/reach/index.js +4 -0
  627. package/dist/reach/index.js.map +1 -0
  628. package/dist/reference/feature.d.ts +5 -0
  629. package/dist/reference/feature.d.ts.map +1 -1
  630. package/dist/reference/feature.js +5 -0
  631. package/dist/reference/feature.js.map +1 -1
  632. package/dist/release/version.d.ts +2 -2
  633. package/dist/release/version.d.ts.map +1 -1
  634. package/dist/release/version.js +2 -2
  635. package/dist/release/version.js.map +1 -1
  636. package/dist/remote-node/bridge-effect-schema.js +2 -2
  637. package/dist/remote-node/contract.d.ts +103 -2
  638. package/dist/remote-node/contract.d.ts.map +1 -1
  639. package/dist/remote-node/effect-schema.d.ts +1 -1
  640. package/dist/remote-node/effect-schema.d.ts.map +1 -1
  641. package/dist/remote-node/effect-schema.js +1 -1
  642. package/dist/remote-node/effect-schema.js.map +1 -1
  643. package/dist/remote-node/feature.d.ts +185 -0
  644. package/dist/remote-node/feature.d.ts.map +1 -1
  645. package/dist/remote-node/feature.js +173 -0
  646. package/dist/remote-node/feature.js.map +1 -1
  647. package/dist/remote-node/request-effect-schema.d.ts +4 -4
  648. package/dist/remote-node/request-effect-schema.d.ts.map +1 -1
  649. package/dist/remote-node/request-effect-schema.js +2 -1
  650. package/dist/remote-node/request-effect-schema.js.map +1 -1
  651. package/dist/remote-node/result-effect-schema.d.ts +194 -1
  652. package/dist/remote-node/result-effect-schema.d.ts.map +1 -1
  653. package/dist/remote-node/result-effect-schema.js +13 -2
  654. package/dist/remote-node/result-effect-schema.js.map +1 -1
  655. package/dist/routine/contract.d.ts +644 -18
  656. package/dist/routine/contract.d.ts.map +1 -1
  657. package/dist/routine/contract.js +28 -2
  658. package/dist/routine/contract.js.map +1 -1
  659. package/dist/routine/effect-schema.d.ts +1489 -218
  660. package/dist/routine/effect-schema.d.ts.map +1 -1
  661. package/dist/routine/effect-schema.js +358 -20
  662. package/dist/routine/effect-schema.js.map +1 -1
  663. package/dist/routine/feature.d.ts +336 -11
  664. package/dist/routine/feature.d.ts.map +1 -1
  665. package/dist/routine/feature.js +318 -11
  666. package/dist/routine/feature.js.map +1 -1
  667. package/dist/routine/index.d.ts +1 -1
  668. package/dist/routine/index.d.ts.map +1 -1
  669. package/dist/routine/index.js +1 -1
  670. package/dist/routine/index.js.map +1 -1
  671. package/dist/routine/policy.d.ts +55 -3
  672. package/dist/routine/policy.d.ts.map +1 -1
  673. package/dist/routine/policy.js +46 -1
  674. package/dist/routine/policy.js.map +1 -1
  675. package/dist/run-ledger/contract.d.ts +47 -0
  676. package/dist/run-ledger/contract.d.ts.map +1 -1
  677. package/dist/run-ledger/feature.d.ts +32 -0
  678. package/dist/run-ledger/feature.d.ts.map +1 -1
  679. package/dist/run-ledger/feature.js +32 -0
  680. package/dist/run-ledger/feature.js.map +1 -1
  681. package/dist/run-ledger/result-effect-schema.d.ts +94 -0
  682. package/dist/run-ledger/result-effect-schema.d.ts.map +1 -1
  683. package/dist/runtime/effect-schema.d.ts.map +1 -1
  684. package/dist/runtime/effect-schema.js +2 -1
  685. package/dist/runtime/effect-schema.js.map +1 -1
  686. package/dist/runtime/feature.d.ts +35 -0
  687. package/dist/runtime/feature.d.ts.map +1 -0
  688. package/dist/runtime/feature.js +39 -0
  689. package/dist/runtime/feature.js.map +1 -0
  690. package/dist/runtime/index.d.ts +1 -0
  691. package/dist/runtime/index.d.ts.map +1 -1
  692. package/dist/runtime/index.js +1 -0
  693. package/dist/runtime/index.js.map +1 -1
  694. package/dist/runtime-schema/effect-json-schema.d.ts +9 -0
  695. package/dist/runtime-schema/effect-json-schema.d.ts.map +1 -0
  696. package/dist/runtime-schema/effect-json-schema.js +41 -0
  697. package/dist/runtime-schema/effect-json-schema.js.map +1 -0
  698. package/dist/runtime-schema/effect-schema.d.ts +1 -0
  699. package/dist/runtime-schema/effect-schema.d.ts.map +1 -1
  700. package/dist/runtime-schema/effect-schema.js +1 -0
  701. package/dist/runtime-schema/effect-schema.js.map +1 -1
  702. package/dist/secret/contract.d.ts +107 -0
  703. package/dist/secret/contract.d.ts.map +1 -0
  704. package/dist/secret/contract.js +34 -0
  705. package/dist/secret/contract.js.map +1 -0
  706. package/dist/secret/effect-schema.d.ts +185 -0
  707. package/dist/secret/effect-schema.d.ts.map +1 -0
  708. package/dist/secret/effect-schema.js +113 -0
  709. package/dist/secret/effect-schema.js.map +1 -0
  710. package/dist/secret/feature.d.ts +103 -0
  711. package/dist/secret/feature.d.ts.map +1 -0
  712. package/dist/secret/feature.js +103 -0
  713. package/dist/secret/feature.js.map +1 -0
  714. package/dist/secret/index.d.ts +3 -0
  715. package/dist/secret/index.d.ts.map +1 -0
  716. package/dist/secret/index.js +3 -0
  717. package/dist/secret/index.js.map +1 -0
  718. package/dist/session/agent-permission-contract.d.ts +6 -5
  719. package/dist/session/agent-permission-contract.d.ts.map +1 -1
  720. package/dist/session/agent-permission-effect-schema.d.ts +11 -9
  721. package/dist/session/agent-permission-effect-schema.d.ts.map +1 -1
  722. package/dist/session/agent-permission-effect-schema.js +2 -2
  723. package/dist/session/agent-permission-effect-schema.js.map +1 -1
  724. package/dist/session/contract.d.ts +980 -46
  725. package/dist/session/contract.d.ts.map +1 -1
  726. package/dist/session/contract.js +35 -4
  727. package/dist/session/contract.js.map +1 -1
  728. package/dist/session/effect-schema.d.ts +2954 -176
  729. package/dist/session/effect-schema.d.ts.map +1 -1
  730. package/dist/session/effect-schema.js +593 -47
  731. package/dist/session/effect-schema.js.map +1 -1
  732. package/dist/session/feature.d.ts +801 -21
  733. package/dist/session/feature.d.ts.map +1 -1
  734. package/dist/session/feature.js +735 -3
  735. package/dist/session/feature.js.map +1 -1
  736. package/dist/session/index.d.ts +5 -3
  737. package/dist/session/index.d.ts.map +1 -1
  738. package/dist/session/index.js +5 -3
  739. package/dist/session/index.js.map +1 -1
  740. package/dist/session/observation-contract.d.ts +2 -2
  741. package/dist/session/observation-effect-schema.d.ts +7 -2
  742. package/dist/session/observation-effect-schema.d.ts.map +1 -1
  743. package/dist/session/observation-effect-schema.js +6 -1
  744. package/dist/session/observation-effect-schema.js.map +1 -1
  745. package/dist/session/placement/contract.d.ts +35 -0
  746. package/dist/session/placement/contract.d.ts.map +1 -0
  747. package/dist/session/placement/contract.js +5 -0
  748. package/dist/session/placement/contract.js.map +1 -0
  749. package/dist/session/placement/effect-schema.d.ts +55 -0
  750. package/dist/session/placement/effect-schema.d.ts.map +1 -0
  751. package/dist/session/placement/effect-schema.js +76 -0
  752. package/dist/session/placement/effect-schema.js.map +1 -0
  753. package/dist/session/placement/index.d.ts +2 -0
  754. package/dist/session/placement/index.d.ts.map +1 -0
  755. package/dist/session/placement/index.js +2 -0
  756. package/dist/session/placement/index.js.map +1 -0
  757. package/dist/session/policy.d.ts +158 -0
  758. package/dist/session/policy.d.ts.map +1 -1
  759. package/dist/session/policy.js +186 -2
  760. package/dist/session/policy.js.map +1 -1
  761. package/dist/session/stop-resume-contract.d.ts +127 -2
  762. package/dist/session/stop-resume-contract.d.ts.map +1 -1
  763. package/dist/session/stop-resume-contract.js +5 -1
  764. package/dist/session/stop-resume-contract.js.map +1 -1
  765. package/dist/session/worktree-effect-schema.d.ts +55 -1
  766. package/dist/session/worktree-effect-schema.d.ts.map +1 -1
  767. package/dist/session/worktree-effect-schema.js +79 -3
  768. package/dist/session/worktree-effect-schema.js.map +1 -1
  769. package/dist/session-command/contract.d.ts +442 -0
  770. package/dist/session-command/contract.d.ts.map +1 -0
  771. package/dist/session-command/contract.js +12 -0
  772. package/dist/session-command/contract.js.map +1 -0
  773. package/dist/session-command/effect-schema.d.ts +875 -0
  774. package/dist/session-command/effect-schema.d.ts.map +1 -0
  775. package/dist/session-command/effect-schema.js +125 -0
  776. package/dist/session-command/effect-schema.js.map +1 -0
  777. package/dist/session-command/feature.d.ts +141 -0
  778. package/dist/session-command/feature.d.ts.map +1 -0
  779. package/dist/session-command/feature.js +137 -0
  780. package/dist/session-command/feature.js.map +1 -0
  781. package/dist/session-command/index.d.ts +4 -0
  782. package/dist/session-command/index.d.ts.map +1 -0
  783. package/dist/session-command/index.js +4 -0
  784. package/dist/session-command/index.js.map +1 -0
  785. package/dist/session-command/policy.d.ts +33 -0
  786. package/dist/session-command/policy.d.ts.map +1 -0
  787. package/dist/session-command/policy.js +60 -0
  788. package/dist/session-command/policy.js.map +1 -0
  789. package/dist/session-guard/contract.d.ts +35 -4
  790. package/dist/session-guard/contract.d.ts.map +1 -1
  791. package/dist/session-guard/contract.js +34 -5
  792. package/dist/session-guard/contract.js.map +1 -1
  793. package/dist/session-guard/feature.d.ts +66 -1
  794. package/dist/session-guard/feature.d.ts.map +1 -1
  795. package/dist/session-guard/feature.js +62 -1
  796. package/dist/session-guard/feature.js.map +1 -1
  797. package/dist/session-guard/index.d.ts +1 -1
  798. package/dist/session-guard/index.d.ts.map +1 -1
  799. package/dist/session-guard/index.js +1 -1
  800. package/dist/session-guard/index.js.map +1 -1
  801. package/dist/session-guard/request-effect-schema.d.ts +33 -0
  802. package/dist/session-guard/request-effect-schema.d.ts.map +1 -1
  803. package/dist/session-guard/request-effect-schema.js +22 -0
  804. package/dist/session-guard/request-effect-schema.js.map +1 -1
  805. package/dist/session-guard/result-effect-schema.d.ts +28 -0
  806. package/dist/session-guard/result-effect-schema.d.ts.map +1 -1
  807. package/dist/session-guard/result-effect-schema.js +3 -1
  808. package/dist/session-guard/result-effect-schema.js.map +1 -1
  809. package/dist/session-stream/contract.d.ts +2 -1
  810. package/dist/session-stream/contract.d.ts.map +1 -1
  811. package/dist/session-stream/effect-schema.d.ts +9 -8
  812. package/dist/session-stream/effect-schema.d.ts.map +1 -1
  813. package/dist/skills-sync/contract.d.ts +142 -0
  814. package/dist/skills-sync/contract.d.ts.map +1 -0
  815. package/dist/skills-sync/contract.js +13 -0
  816. package/dist/skills-sync/contract.js.map +1 -0
  817. package/dist/skills-sync/effect-schema.d.ts +312 -0
  818. package/dist/skills-sync/effect-schema.d.ts.map +1 -0
  819. package/dist/skills-sync/effect-schema.js +160 -0
  820. package/dist/skills-sync/effect-schema.js.map +1 -0
  821. package/dist/skills-sync/feature.d.ts +102 -0
  822. package/dist/skills-sync/feature.d.ts.map +1 -0
  823. package/dist/skills-sync/feature.js +102 -0
  824. package/dist/skills-sync/feature.js.map +1 -0
  825. package/dist/skills-sync/index.d.ts +3 -0
  826. package/dist/skills-sync/index.d.ts.map +1 -0
  827. package/dist/skills-sync/index.js +3 -0
  828. package/dist/skills-sync/index.js.map +1 -0
  829. package/dist/team-workspace/contract.d.ts +1 -0
  830. package/dist/team-workspace/contract.d.ts.map +1 -1
  831. package/dist/team-workspace/effect-schema.d.ts +2 -0
  832. package/dist/team-workspace/effect-schema.d.ts.map +1 -1
  833. package/dist/team-workspace/feature.d.ts +10 -0
  834. package/dist/team-workspace/feature.d.ts.map +1 -1
  835. package/dist/team-workspace/feature.js +10 -0
  836. package/dist/team-workspace/feature.js.map +1 -1
  837. package/dist/terminal/contract.d.ts +2 -0
  838. package/dist/terminal/contract.d.ts.map +1 -1
  839. package/dist/terminal/effect-schema.d.ts +6 -0
  840. package/dist/terminal/effect-schema.d.ts.map +1 -1
  841. package/dist/terminal/effect-schema.js +2 -0
  842. package/dist/terminal/effect-schema.js.map +1 -1
  843. package/dist/terminal/feature.d.ts +281 -0
  844. package/dist/terminal/feature.d.ts.map +1 -1
  845. package/dist/terminal/feature.js +289 -0
  846. package/dist/terminal/feature.js.map +1 -1
  847. package/dist/turn/contract.d.ts +633 -4
  848. package/dist/turn/contract.d.ts.map +1 -1
  849. package/dist/turn/contract.js +18 -4
  850. package/dist/turn/contract.js.map +1 -1
  851. package/dist/turn/effect-schema.d.ts +1507 -161
  852. package/dist/turn/effect-schema.d.ts.map +1 -1
  853. package/dist/turn/effect-schema.js +123 -10
  854. package/dist/turn/effect-schema.js.map +1 -1
  855. package/dist/turn/index.d.ts +2 -2
  856. package/dist/turn/index.d.ts.map +1 -1
  857. package/dist/turn/index.js +2 -2
  858. package/dist/turn/index.js.map +1 -1
  859. package/dist/turn/policy.d.ts +54 -0
  860. package/dist/turn/policy.d.ts.map +1 -1
  861. package/dist/turn/policy.js +74 -0
  862. package/dist/turn/policy.js.map +1 -1
  863. package/dist/voice/contract.d.ts +6 -6
  864. package/dist/voice/effect-schema.d.ts +10 -9
  865. package/dist/voice/effect-schema.d.ts.map +1 -1
  866. package/dist/voice/effect-schema.js +3 -1
  867. package/dist/voice/effect-schema.js.map +1 -1
  868. package/dist/voice/feature.d.ts +70 -2
  869. package/dist/voice/feature.d.ts.map +1 -1
  870. package/dist/voice/feature.js +32 -0
  871. package/dist/voice/feature.js.map +1 -1
  872. package/dist/voice/orchestrator-system-prompt.d.ts +2 -2
  873. package/dist/voice/orchestrator-system-prompt.js +2 -2
  874. package/dist/voice/relay-contract.d.ts +1 -0
  875. package/dist/voice/relay-contract.d.ts.map +1 -1
  876. package/dist/voice/relay-effect-schema.d.ts +2 -0
  877. package/dist/voice/relay-effect-schema.d.ts.map +1 -1
  878. package/dist/webhooks/contract.d.ts +358 -0
  879. package/dist/webhooks/contract.d.ts.map +1 -0
  880. package/dist/webhooks/contract.js +26 -0
  881. package/dist/webhooks/contract.js.map +1 -0
  882. package/dist/webhooks/effect-schema.d.ts +550 -0
  883. package/dist/webhooks/effect-schema.d.ts.map +1 -0
  884. package/dist/webhooks/effect-schema.js +197 -0
  885. package/dist/webhooks/effect-schema.js.map +1 -0
  886. package/dist/webhooks/feature.d.ts +125 -0
  887. package/dist/webhooks/feature.d.ts.map +1 -0
  888. package/dist/webhooks/feature.js +123 -0
  889. package/dist/webhooks/feature.js.map +1 -0
  890. package/dist/webhooks/hook-effect-schema.d.ts +69 -0
  891. package/dist/webhooks/hook-effect-schema.d.ts.map +1 -0
  892. package/dist/webhooks/hook-effect-schema.js +107 -0
  893. package/dist/webhooks/hook-effect-schema.js.map +1 -0
  894. package/dist/webhooks/index.d.ts +4 -0
  895. package/dist/webhooks/index.d.ts.map +1 -0
  896. package/dist/webhooks/index.js +4 -0
  897. package/dist/webhooks/index.js.map +1 -0
  898. package/dist/webhooks/policy.d.ts +16 -0
  899. package/dist/webhooks/policy.d.ts.map +1 -0
  900. package/dist/webhooks/policy.js +16 -0
  901. package/dist/webhooks/policy.js.map +1 -0
  902. package/package.json +9 -3
  903. package/dist/configuration/configuration.d.ts +0 -63
  904. package/dist/configuration/configuration.d.ts.map +0 -1
  905. package/dist/configuration/configuration.js +0 -93
  906. package/dist/configuration/configuration.js.map +0 -1
  907. package/dist/configuration/index.d.ts +0 -2
  908. package/dist/configuration/index.d.ts.map +0 -1
  909. package/dist/configuration/index.js +0 -2
  910. package/dist/configuration/index.js.map +0 -1
@@ -1,18 +1,25 @@
1
1
  import * as Schema from "effect/Schema";
2
- import { SESSION_EFFORT_LEVELS } from "./policy.js";
3
2
  /**
4
3
  * A person-readable Session name: one line of 1 to 80 characters without
5
4
  * surrounding spaces. Titles need not be unique; a reference to one fails
6
5
  * when it matches more than one Session.
7
6
  */
8
7
  export declare const sessionTitleEffectSchema: Schema.String;
8
+ /**
9
+ * Up to 8 labels that tell a person or a bot which lane a Session belongs to
10
+ * (owner, lane, goal). A key is a lower-case name of up to 32 characters; a
11
+ * value is 1 to 64 printable ASCII characters without spaces or commas. A
12
+ * label is not a place for secrets: it shows in every Session list.
13
+ */
14
+ export declare const sessionLabelsEffectSchema: Schema.$Record<Schema.String, Schema.String>;
9
15
  /** 1 to 100 items. */
10
16
  export declare const pageSizeEffectSchema: Schema.Int;
11
- export declare const sessionExecutorKindEffectSchema: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
12
- /** The Node issues an Agent's identifier when a person previews its creation. */
13
- export declare const agentIdentifierEffectSchema: Schema.String;
17
+ export declare const sessionStateEffectSchema: Schema.Literals<readonly ["idle", "starting", "running", "waiting-approval", "interrupted", "recovering", "stopping", "stopped", "failed"]>;
14
18
  export declare const sessionEffortEffectSchema: Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>;
15
- export declare const supportsEffort: (kind: keyof typeof SESSION_EFFORT_LEVELS, effort: string) => boolean;
19
+ export declare const supportsEffort: (kind: string, effort: string) => boolean;
20
+ /** A permission mode either vendor CLI documents; the Node checks it against the Session's executor kind. */
21
+ export declare const sessionPermissionEffectSchema: Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>;
22
+ export declare const supportsPermission: (kind: string, permission: string) => boolean;
16
23
  export declare const sessionEffectSchema: Schema.Struct<{
17
24
  readonly createdAt: Schema.String;
18
25
  readonly id: Schema.String;
@@ -22,15 +29,23 @@ export declare const sessionEffectSchema: Schema.Struct<{
22
29
  readonly updatedAt: Schema.String;
23
30
  readonly workspaceId: Schema.String;
24
31
  readonly workspaceRevision: Schema.String;
32
+ /** What the Session is doing; present on `session.list` and `session.show`. */
33
+ readonly activity: Schema.optional<Schema.Literals<readonly ["stopped", "waiting_approval", "working", "idle"]>>;
25
34
  readonly agentDefinitionRef: Schema.optional<Schema.Struct<{
26
35
  readonly contentDigest: Schema.String;
27
36
  readonly key: Schema.String;
28
37
  readonly version: Schema.String;
29
38
  }>>;
39
+ /**
40
+ * `none` for a host-authority Session: the vendor harness runs as the
41
+ * Node's user with no Maia sandbox ([D-198](https://maia-os.vllnt.com/en/docs/decisions#d-198)).
42
+ * A sandboxed Session carries none.
43
+ */
44
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
30
45
  readonly executor: Schema.optional<Schema.Struct<{
31
46
  readonly connectionId: Schema.String;
32
47
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
33
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
48
+ readonly kind: Schema.String;
34
49
  readonly model: Schema.optional<Schema.String>;
35
50
  }>>;
36
51
  /** Why the runtime of a failed Session failed, when Maia knows. */
@@ -38,7 +53,61 @@ export declare const sessionEffectSchema: Schema.Struct<{
38
53
  readonly code: Schema.String;
39
54
  readonly message: Schema.String;
40
55
  }>>;
56
+ /** The count of board tasks the Session holds now; present on `session.list`, `session.show` and `session.wait`, with `heldTasks`. */
57
+ readonly heldTaskCount: Schema.optional<Schema.Int>;
58
+ /**
59
+ * The board tasks the Session holds now, newest claim first, at most
60
+ * `MAX_BOARD_HELD_TASKS`; `heldTaskCount` counts every one.
61
+ */
62
+ readonly heldTasks: Schema.optional<Schema.$Array<Schema.Struct<{
63
+ readonly claimedAt: Schema.String;
64
+ readonly id: Schema.String;
65
+ readonly leaseExpiresAt: Schema.String;
66
+ readonly state: Schema.Literal<"claimed">;
67
+ readonly title: Schema.String;
68
+ }>>>;
69
+ /** Set at creation; absent when the Session has no labels. */
70
+ readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
71
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
72
+ readonly latestTurnId: Schema.optional<Schema.String>;
73
+ /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
74
+ readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
75
+ /** The Session that spawned or created this one, fixed at creation; absent for a top-level Session. */
76
+ readonly parentSessionId: Schema.optional<Schema.String>;
77
+ /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
78
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
79
+ /**
80
+ * The prompt a `question` or `approval` Session waits on, with its text and
81
+ * options. `session.list` and `session.show` return it while `status` is
82
+ * one of the two and never otherwise: a `question` names a question
83
+ * prompt, an `approval` any other kind. A reader who may not read the
84
+ * approval (a Session principal listing its Project) gets the status without
85
+ * it.
86
+ */
87
+ readonly prompt: Schema.optional<Schema.Struct<{
88
+ readonly approvalId: Schema.String;
89
+ readonly expiresAt: Schema.String;
90
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
91
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
92
+ readonly label: Schema.String;
93
+ readonly optionId: Schema.String;
94
+ }>>>;
95
+ readonly summary: Schema.optional<Schema.String>;
96
+ }>>;
97
+ /**
98
+ * Why a recovering Session stopped retrying: its retries ran out and it waits
99
+ * for `session.resume` or a Node start. Absent while it still retries and in
100
+ * every other state.
101
+ */
102
+ readonly recovery: Schema.optional<Schema.Struct<{
103
+ readonly code: Schema.String;
104
+ readonly message: Schema.String;
105
+ }>>;
41
106
  readonly schemaVersion: Schema.Literal<4>;
107
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
108
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
109
+ /** What the Session is doing; present on `session.list` and `session.show`. */
110
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "compacting", "rate_limited", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
42
111
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
43
112
  readonly title: Schema.optional<Schema.String>;
44
113
  /** A coding Session's own worktree; a reading Session has none. */
@@ -69,13 +138,21 @@ export declare const sessionEventEffectSchema: Schema.Union<readonly [Schema.Str
69
138
  readonly key: Schema.String;
70
139
  readonly version: Schema.String;
71
140
  }>>;
141
+ /** The actor that opted a host-authority Session out of the sandbox. */
142
+ readonly authorizedBy: Schema.optional<Schema.String>;
143
+ /** `none` when the Session runs with host authority. */
144
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
145
+ /** Where a host-authority Session starts, as the caller asked. */
146
+ readonly cwd: Schema.optional<Schema.String>;
72
147
  /** The account the Session binds to, named or picked by the Node. */
73
148
  readonly executor: Schema.optional<Schema.Struct<{
74
149
  readonly connectionId: Schema.String;
75
150
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
76
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
151
+ readonly kind: Schema.String;
77
152
  readonly model: Schema.optional<Schema.String>;
78
153
  }>>;
154
+ /** The permission mode a host-authority Session passes to its vendor CLI. */
155
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
79
156
  readonly projectId: Schema.String;
80
157
  readonly workspaceId: Schema.String;
81
158
  readonly workspaceRevision: Schema.String;
@@ -119,6 +196,20 @@ export declare const sessionEventEffectSchema: Schema.Union<readonly [Schema.Str
119
196
  readonly schemaVersion: Schema.Literal<4>;
120
197
  readonly sessionCursor: Schema.String;
121
198
  readonly sessionId: Schema.String;
199
+ }>, Schema.Struct<{
200
+ readonly commandId: Schema.String;
201
+ readonly eventType: Schema.Literal<"session.runtime.recovery.updated">;
202
+ readonly globalCursor: Schema.String;
203
+ readonly payload: Schema.Struct<{
204
+ readonly recovery: Schema.optional<Schema.Struct<{
205
+ readonly code: Schema.String;
206
+ readonly message: Schema.String;
207
+ }>>;
208
+ }>;
209
+ readonly recordedAt: Schema.String;
210
+ readonly schemaVersion: Schema.Literal<4>;
211
+ readonly sessionCursor: Schema.String;
212
+ readonly sessionId: Schema.String;
122
213
  }>, Schema.Struct<{
123
214
  readonly commandId: Schema.String;
124
215
  readonly eventType: Schema.Literal<"session.runtime.resumed">;
@@ -276,9 +367,13 @@ export declare const sessionEventEffectSchema: Schema.Union<readonly [Schema.Str
276
367
  * both `connectionId` and `executor`, and optionally the `model`. An Agent
277
368
  * (`agentId`) supplies the harness, Connection, model and effort itself, so it
278
369
  * excludes every one of them. `role` (default `worker`) bounds what the
279
- * Session's own credential reaches. A vendor executor Session with `worktree`
280
- * is a coding Session: it gets its own worktree from the base ref of the
281
- * Workspace's repository and may write inside it.
370
+ * Session's own credential reaches. `hostAuthority` opts one executor Session
371
+ * out of the Maia sandbox ([D-198](https://maia-os.vllnt.com/en/docs/decisions#d-198)): it
372
+ * runs in an existing `cwd` as the Node's user, takes no worktree, Agent or
373
+ * role, and passes `permission` to its vendor CLI unchanged. A vendor
374
+ * executor Session with `worktree` is a coding Session: it gets its own
375
+ * worktree from the base ref of the Workspace's repository and may write
376
+ * inside it.
282
377
  */
283
378
  export declare const sessionCreateParametersEffectSchema: Schema.Struct<{
284
379
  readonly commandId: Schema.String;
@@ -286,49 +381,59 @@ export declare const sessionCreateParametersEffectSchema: Schema.Struct<{
286
381
  readonly workspaceId: Schema.String;
287
382
  readonly agentId: Schema.optional<Schema.String>;
288
383
  readonly connectionId: Schema.optional<Schema.String>;
384
+ /** Where the Session starts; the Node checks it against the Workspace root. */
385
+ readonly cwd: Schema.optional<Schema.String>;
289
386
  readonly definitionRef: Schema.optional<Schema.Struct<{
290
387
  readonly contentDigest: Schema.String;
291
388
  readonly key: Schema.String;
292
389
  readonly version: Schema.String;
293
390
  }>>;
294
391
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
295
- readonly executor: Schema.optional<Schema.Literals<readonly ["claude-code", "codex-cli"]>>;
392
+ readonly executor: Schema.optional<Schema.String>;
393
+ readonly hostAuthority: Schema.optional<Schema.Literal<true>>;
394
+ readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
296
395
  readonly model: Schema.optional<Schema.String>;
396
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
297
397
  readonly role: Schema.optional<Schema.Literals<readonly ["orchestrator", "worker"]>>;
298
398
  readonly title: Schema.optional<Schema.String>;
299
399
  readonly worktree: Schema.optional<Schema.Struct<{
300
400
  readonly baseRef: Schema.String;
401
+ readonly branch: Schema.optional<Schema.String>;
301
402
  }>>;
302
403
  }>;
303
- export declare const sessionSpawnParametersEffectSchema: Schema.Struct<{
304
- readonly commandId: Schema.String;
305
- readonly expectedRevision: Schema.Literal<"0">;
306
- readonly workspaceId: Schema.String;
307
- readonly definitionRef: Schema.optional<Schema.Struct<{
308
- readonly contentDigest: Schema.String;
309
- readonly key: Schema.String;
310
- readonly version: Schema.String;
311
- }>>;
312
- readonly harness: Schema.Literals<readonly ["maia-agent", "pi"]>;
313
- readonly parentSessionId: Schema.String;
314
- }>;
315
404
  /**
316
405
  * One page of Sessions in creation order: of one Project, or of the whole
317
406
  * Node without `projectId`; without `afterCursor` the first page and without
318
407
  * `limit` `DEFAULT_SESSION_LIST_PAGE_SIZE` Sessions. `states` keeps Sessions
319
408
  * in those states; `attention` keeps Sessions the Node reports an attention
320
- * value for.
409
+ * value for; `parentSessionId` keeps the direct children of that Session.
321
410
  */
322
411
  export declare const sessionListParametersEffectSchema: Schema.Struct<{
323
412
  readonly afterCursor: Schema.optional<Schema.String>;
324
413
  readonly attention: Schema.optional<Schema.Boolean>;
414
+ /** With `settled`: how long a Session is idle before it counts as settled; the Node's default is one day. */
415
+ readonly idleForSeconds: Schema.optional<Schema.Int>;
416
+ /** Sessions that carry these labels, each with the given value. */
417
+ readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
325
418
  readonly limit: Schema.optional<Schema.Int>;
419
+ /** Keeps the direct children of this Session; an unknown Session has none. */
420
+ readonly parentSessionId: Schema.optional<Schema.String>;
326
421
  readonly projectId: Schema.optional<Schema.String>;
422
+ /** Keeps non-archived Sessions that stopped, failed or sat idle for `idleForSeconds`. */
423
+ readonly settled: Schema.optional<Schema.Literal<true>>;
327
424
  readonly states: Schema.optional<Schema.$Array<Schema.Literals<readonly ["idle", "starting", "running", "waiting-approval", "interrupted", "recovering", "stopping", "stopped", "failed"]>>>;
328
425
  }>;
329
426
  export declare const sessionShowParametersEffectSchema: Schema.Struct<{
330
427
  readonly sessionId: Schema.String;
331
428
  }>;
429
+ export declare const sessionWaitParametersEffectSchema: Schema.Struct<{
430
+ /** The wait ends when the Session is in any of these activities. */
431
+ readonly activities: Schema.optional<Schema.$Array<Schema.Literals<readonly ["stopped", "waiting_approval", "working", "idle"]>>>;
432
+ readonly sessionId: Schema.String;
433
+ /** The wait ends when the Session is in any of these states. */
434
+ readonly states: Schema.optional<Schema.$Array<Schema.Literals<readonly ["idle", "starting", "running", "waiting-approval", "interrupted", "recovering", "stopping", "stopped", "failed"]>>>;
435
+ readonly waitMilliseconds: Schema.Int;
436
+ }>;
332
437
  export declare const sessionEventsListParametersEffectSchema: Schema.Struct<{
333
438
  readonly afterSessionCursor: Schema.String;
334
439
  readonly limit: Schema.Int;
@@ -339,6 +444,342 @@ export declare const sessionStartParametersEffectSchema: Schema.Struct<{
339
444
  readonly expectedRevision: Schema.String;
340
445
  readonly sessionId: Schema.String;
341
446
  }>;
447
+ /** A fork stops at a completed turn of the Session; without `turnId` it takes the newest one. */
448
+ export declare const sessionForkPreviewParametersEffectSchema: Schema.Struct<{
449
+ readonly commandId: Schema.String;
450
+ readonly sessionId: Schema.String;
451
+ readonly turnId: Schema.optional<Schema.String>;
452
+ }>;
453
+ export declare const sessionForkConfirmParametersEffectSchema: Schema.Struct<{
454
+ inputDigest: Schema.String;
455
+ proof: Schema.String;
456
+ validUntil: Schema.String;
457
+ checkpoint: Schema.optional<Schema.String>;
458
+ commandId: Schema.String;
459
+ expectedRevision: Schema.String;
460
+ sessionId: Schema.String;
461
+ turnId: Schema.String;
462
+ }>;
463
+ export declare const sessionSwitchPreviewParametersEffectSchema: Schema.Struct<{
464
+ readonly commandId: Schema.String;
465
+ readonly sessionId: Schema.String;
466
+ readonly target: Schema.Struct<{
467
+ readonly connectionId: Schema.optional<Schema.String>;
468
+ readonly executor: Schema.optional<Schema.String>;
469
+ readonly model: Schema.optional<Schema.String>;
470
+ }>;
471
+ }>;
472
+ export declare const sessionSwitchConfirmParametersEffectSchema: Schema.Struct<{
473
+ inputDigest: Schema.String;
474
+ proof: Schema.String;
475
+ validUntil: Schema.String;
476
+ commandId: Schema.String;
477
+ expectedRevision: Schema.String;
478
+ sessionId: Schema.String;
479
+ target: Schema.Struct<{
480
+ readonly connectionId: Schema.optional<Schema.String>;
481
+ readonly executor: Schema.optional<Schema.String>;
482
+ readonly model: Schema.optional<Schema.String>;
483
+ }>;
484
+ }>;
485
+ export declare const sessionSetupPreviewParametersEffectSchema: Schema.Struct<{
486
+ readonly commandId: Schema.String;
487
+ readonly sessionId: Schema.String;
488
+ }>;
489
+ export declare const sessionSetupConfirmParametersEffectSchema: Schema.Struct<{
490
+ inputDigest: Schema.String;
491
+ proof: Schema.String;
492
+ validUntil: Schema.String;
493
+ commandId: Schema.String;
494
+ expectedRevision: Schema.String;
495
+ sessionId: Schema.String;
496
+ setupDigest: Schema.String;
497
+ }>;
498
+ /** The three numbers a Node holds every spawned child to (CAP). */
499
+ export declare const sessionSpawnCapsEffectSchema: Schema.Struct<{
500
+ readonly concurrency: Schema.Int;
501
+ readonly depth: Schema.Int;
502
+ readonly fanOut: Schema.Int;
503
+ }>;
504
+ /** Revision `0` is the defaults of a Node whose caps no person has changed. */
505
+ export declare const sessionSpawnCapsRecordEffectSchema: Schema.Struct<{
506
+ readonly caps: Schema.Struct<{
507
+ readonly concurrency: Schema.Int;
508
+ readonly depth: Schema.Int;
509
+ readonly fanOut: Schema.Int;
510
+ }>;
511
+ readonly revision: Schema.String;
512
+ readonly source: Schema.Literals<readonly ["default", "node"]>;
513
+ readonly updatedAt: Schema.optional<Schema.String>;
514
+ }>;
515
+ /** A parent's children: every one it spawned (`total`), and those that have not ended (`live`). */
516
+ export declare const sessionSpawnChildrenEffectSchema: Schema.Struct<{
517
+ readonly live: Schema.Int;
518
+ readonly total: Schema.Int;
519
+ }>;
520
+ /** A Session's spawn depth: the spawns between it and the Session at the root of its tree, which has depth 0. */
521
+ export declare const sessionSpawnDepthEffectSchema: Schema.Int;
522
+ export declare const sessionSpawnCapsShowParametersEffectSchema: Schema.Struct<{
523
+ readonly sessionId: Schema.optional<Schema.String>;
524
+ }>;
525
+ /**
526
+ * What one Session uses of the caps on this Node: its children here, and its
527
+ * depth and role when this Node holds it. A client adds the children of every
528
+ * Node; an orchestrator's children all live on its own Node (D-346).
529
+ */
530
+ export declare const sessionSpawnStandingEffectSchema: Schema.Struct<{
531
+ readonly children: Schema.Struct<{
532
+ readonly live: Schema.Int;
533
+ readonly total: Schema.Int;
534
+ }>;
535
+ readonly depth: Schema.optional<Schema.Int>;
536
+ readonly role: Schema.optional<Schema.Literals<readonly ["orchestrator", "worker"]>>;
537
+ readonly sessionId: Schema.String;
538
+ }>;
539
+ export declare const sessionSpawnCapsShowResultEffectSchema: Schema.Struct<{
540
+ readonly caps: Schema.Struct<{
541
+ readonly caps: Schema.Struct<{
542
+ readonly concurrency: Schema.Int;
543
+ readonly depth: Schema.Int;
544
+ readonly fanOut: Schema.Int;
545
+ }>;
546
+ readonly revision: Schema.String;
547
+ readonly source: Schema.Literals<readonly ["default", "node"]>;
548
+ readonly updatedAt: Schema.optional<Schema.String>;
549
+ }>;
550
+ readonly method: Schema.Literal<"session.spawn-caps.show">;
551
+ readonly standing: Schema.optional<Schema.Struct<{
552
+ readonly children: Schema.Struct<{
553
+ readonly live: Schema.Int;
554
+ readonly total: Schema.Int;
555
+ }>;
556
+ readonly depth: Schema.optional<Schema.Int>;
557
+ readonly role: Schema.optional<Schema.Literals<readonly ["orchestrator", "worker"]>>;
558
+ readonly sessionId: Schema.String;
559
+ }>>;
560
+ }>;
561
+ /** A person previews new caps at the revision they read, then confirms that exact preview. */
562
+ export declare const sessionSpawnCapsPreviewParametersEffectSchema: Schema.Struct<{
563
+ caps: Schema.Struct<{
564
+ readonly concurrency: Schema.Int;
565
+ readonly depth: Schema.Int;
566
+ readonly fanOut: Schema.Int;
567
+ }>;
568
+ commandId: Schema.String;
569
+ expectedRevision: Schema.String;
570
+ }>;
571
+ export declare const sessionSpawnCapsConfirmParametersEffectSchema: Schema.Struct<{
572
+ readonly caps: Schema.Struct<{
573
+ readonly concurrency: Schema.Int;
574
+ readonly depth: Schema.Int;
575
+ readonly fanOut: Schema.Int;
576
+ }>;
577
+ readonly commandId: Schema.String;
578
+ readonly expectedRevision: Schema.String;
579
+ readonly inputDigest: Schema.String;
580
+ readonly proof: Schema.String;
581
+ readonly validUntil: Schema.String;
582
+ }>;
583
+ /** The caps now and the caps the confirmation would leave, sealed for it. */
584
+ export declare const sessionSpawnCapsPreviewResultEffectSchema: Schema.Struct<{
585
+ readonly caps: Schema.Struct<{
586
+ readonly concurrency: Schema.Int;
587
+ readonly depth: Schema.Int;
588
+ readonly fanOut: Schema.Int;
589
+ }>;
590
+ readonly commandId: Schema.String;
591
+ readonly expectedRevision: Schema.String;
592
+ readonly inputDigest: Schema.String;
593
+ readonly proof: Schema.String;
594
+ readonly validUntil: Schema.String;
595
+ readonly current: Schema.Struct<{
596
+ readonly caps: Schema.Struct<{
597
+ readonly concurrency: Schema.Int;
598
+ readonly depth: Schema.Int;
599
+ readonly fanOut: Schema.Int;
600
+ }>;
601
+ readonly revision: Schema.String;
602
+ readonly source: Schema.Literals<readonly ["default", "node"]>;
603
+ readonly updatedAt: Schema.optional<Schema.String>;
604
+ }>;
605
+ readonly method: Schema.Literal<"session.spawn-caps.preview">;
606
+ }>;
607
+ export declare const sessionSpawnCapsConfirmResultEffectSchema: Schema.Struct<{
608
+ readonly caps: Schema.Struct<{
609
+ readonly caps: Schema.Struct<{
610
+ readonly concurrency: Schema.Int;
611
+ readonly depth: Schema.Int;
612
+ readonly fanOut: Schema.Int;
613
+ }>;
614
+ readonly revision: Schema.String;
615
+ readonly source: Schema.Literals<readonly ["default", "node"]>;
616
+ readonly updatedAt: Schema.optional<Schema.String>;
617
+ }>;
618
+ readonly delivery: Schema.Literals<readonly ["new", "duplicate"]>;
619
+ readonly method: Schema.Literal<"session.spawn-caps.confirm">;
620
+ readonly receipt: Schema.Struct<{
621
+ readonly actorId: Schema.String;
622
+ readonly aggregateRevision: Schema.String;
623
+ readonly commandId: Schema.String;
624
+ readonly createdAt: Schema.String;
625
+ readonly eventCursor: Schema.String;
626
+ readonly method: Schema.String;
627
+ readonly proposedBy: Schema.optional<Schema.String>;
628
+ readonly receiptId: Schema.String;
629
+ readonly schemaVersion: Schema.Literal<1>;
630
+ readonly state: Schema.Literal<"succeeded">;
631
+ readonly target: Schema.Struct<{
632
+ readonly id: Schema.String;
633
+ readonly type: Schema.String;
634
+ }>;
635
+ readonly updatedAt: Schema.String;
636
+ }>;
637
+ }>;
638
+ export declare const sessionSpawnCapsRequestEffectSchema: Schema.Union<readonly [Schema.Struct<{
639
+ readonly method: Schema.Literal<"session.spawn-caps.show">;
640
+ readonly parameters: Schema.Struct<{
641
+ readonly sessionId: Schema.optional<Schema.String>;
642
+ }>;
643
+ }>, Schema.Struct<{
644
+ readonly method: Schema.Literal<"session.spawn-caps.preview">;
645
+ readonly parameters: Schema.Struct<{
646
+ caps: Schema.Struct<{
647
+ readonly concurrency: Schema.Int;
648
+ readonly depth: Schema.Int;
649
+ readonly fanOut: Schema.Int;
650
+ }>;
651
+ commandId: Schema.String;
652
+ expectedRevision: Schema.String;
653
+ }>;
654
+ }>, Schema.Struct<{
655
+ readonly method: Schema.Literal<"session.spawn-caps.confirm">;
656
+ readonly parameters: Schema.Struct<{
657
+ readonly caps: Schema.Struct<{
658
+ readonly concurrency: Schema.Int;
659
+ readonly depth: Schema.Int;
660
+ readonly fanOut: Schema.Int;
661
+ }>;
662
+ readonly commandId: Schema.String;
663
+ readonly expectedRevision: Schema.String;
664
+ readonly inputDigest: Schema.String;
665
+ readonly proof: Schema.String;
666
+ readonly validUntil: Schema.String;
667
+ }>;
668
+ }>]>;
669
+ export declare const sessionSpawnCapsResultEffectSchema: Schema.Union<readonly [Schema.Struct<{
670
+ readonly caps: Schema.Struct<{
671
+ readonly caps: Schema.Struct<{
672
+ readonly concurrency: Schema.Int;
673
+ readonly depth: Schema.Int;
674
+ readonly fanOut: Schema.Int;
675
+ }>;
676
+ readonly revision: Schema.String;
677
+ readonly source: Schema.Literals<readonly ["default", "node"]>;
678
+ readonly updatedAt: Schema.optional<Schema.String>;
679
+ }>;
680
+ readonly method: Schema.Literal<"session.spawn-caps.show">;
681
+ readonly standing: Schema.optional<Schema.Struct<{
682
+ readonly children: Schema.Struct<{
683
+ readonly live: Schema.Int;
684
+ readonly total: Schema.Int;
685
+ }>;
686
+ readonly depth: Schema.optional<Schema.Int>;
687
+ readonly role: Schema.optional<Schema.Literals<readonly ["orchestrator", "worker"]>>;
688
+ readonly sessionId: Schema.String;
689
+ }>>;
690
+ }>, Schema.Struct<{
691
+ readonly caps: Schema.Struct<{
692
+ readonly concurrency: Schema.Int;
693
+ readonly depth: Schema.Int;
694
+ readonly fanOut: Schema.Int;
695
+ }>;
696
+ readonly commandId: Schema.String;
697
+ readonly expectedRevision: Schema.String;
698
+ readonly inputDigest: Schema.String;
699
+ readonly proof: Schema.String;
700
+ readonly validUntil: Schema.String;
701
+ readonly current: Schema.Struct<{
702
+ readonly caps: Schema.Struct<{
703
+ readonly concurrency: Schema.Int;
704
+ readonly depth: Schema.Int;
705
+ readonly fanOut: Schema.Int;
706
+ }>;
707
+ readonly revision: Schema.String;
708
+ readonly source: Schema.Literals<readonly ["default", "node"]>;
709
+ readonly updatedAt: Schema.optional<Schema.String>;
710
+ }>;
711
+ readonly method: Schema.Literal<"session.spawn-caps.preview">;
712
+ }>, Schema.Struct<{
713
+ readonly caps: Schema.Struct<{
714
+ readonly caps: Schema.Struct<{
715
+ readonly concurrency: Schema.Int;
716
+ readonly depth: Schema.Int;
717
+ readonly fanOut: Schema.Int;
718
+ }>;
719
+ readonly revision: Schema.String;
720
+ readonly source: Schema.Literals<readonly ["default", "node"]>;
721
+ readonly updatedAt: Schema.optional<Schema.String>;
722
+ }>;
723
+ readonly delivery: Schema.Literals<readonly ["new", "duplicate"]>;
724
+ readonly method: Schema.Literal<"session.spawn-caps.confirm">;
725
+ readonly receipt: Schema.Struct<{
726
+ readonly actorId: Schema.String;
727
+ readonly aggregateRevision: Schema.String;
728
+ readonly commandId: Schema.String;
729
+ readonly createdAt: Schema.String;
730
+ readonly eventCursor: Schema.String;
731
+ readonly method: Schema.String;
732
+ readonly proposedBy: Schema.optional<Schema.String>;
733
+ readonly receiptId: Schema.String;
734
+ readonly schemaVersion: Schema.Literal<1>;
735
+ readonly state: Schema.Literal<"succeeded">;
736
+ readonly target: Schema.Struct<{
737
+ readonly id: Schema.String;
738
+ readonly type: Schema.String;
739
+ }>;
740
+ readonly updatedAt: Schema.String;
741
+ }>;
742
+ }>]>;
743
+ export declare const sessionSpawnPreviewParametersEffectSchema: Schema.Struct<{
744
+ commandId: Schema.String;
745
+ executor: Schema.String;
746
+ hostAuthority: Schema.optional<Schema.Literal<true>>;
747
+ parent: Schema.Struct<{
748
+ readonly children: Schema.Struct<{
749
+ readonly live: Schema.Int;
750
+ readonly total: Schema.Int;
751
+ }>;
752
+ readonly depth: Schema.Int;
753
+ readonly hostAuthority: Schema.optional<Schema.Literal<true>>;
754
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
755
+ readonly role: Schema.Literals<readonly ["orchestrator", "worker"]>;
756
+ readonly sessionId: Schema.String;
757
+ }>;
758
+ permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
759
+ workspaceId: Schema.String;
760
+ }>;
761
+ export declare const sessionSpawnConfirmParametersEffectSchema: Schema.Struct<{
762
+ inputDigest: Schema.String;
763
+ proof: Schema.String;
764
+ validUntil: Schema.String;
765
+ commandId: Schema.String;
766
+ executor: Schema.String;
767
+ hostAuthority: Schema.optional<Schema.Literal<true>>;
768
+ parent: Schema.Struct<{
769
+ readonly children: Schema.Struct<{
770
+ readonly live: Schema.Int;
771
+ readonly total: Schema.Int;
772
+ }>;
773
+ readonly depth: Schema.Int;
774
+ readonly hostAuthority: Schema.optional<Schema.Literal<true>>;
775
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
776
+ readonly role: Schema.Literals<readonly ["orchestrator", "worker"]>;
777
+ readonly sessionId: Schema.String;
778
+ }>;
779
+ permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
780
+ workspaceId: Schema.String;
781
+ expectedRevision: Schema.Literal<"0">;
782
+ }>;
342
783
  /** A new title at the Session's current revision. */
343
784
  export declare const sessionRenameParametersEffectSchema: Schema.Struct<{
344
785
  readonly commandId: Schema.String;
@@ -346,16 +787,24 @@ export declare const sessionRenameParametersEffectSchema: Schema.Struct<{
346
787
  readonly sessionId: Schema.String;
347
788
  readonly title: Schema.String;
348
789
  }>;
349
- /** Stop and resume take the same compare-and-set input as start. */
790
+ /** Stop takes the same compare-and-set input as start. */
350
791
  export declare const sessionStopParametersEffectSchema: Schema.Struct<{
351
792
  readonly commandId: Schema.String;
352
793
  readonly expectedRevision: Schema.String;
353
794
  readonly sessionId: Schema.String;
354
795
  }>;
796
+ /** Resume takes the compare-and-set input of start, and the parent claim of a child. */
355
797
  export declare const sessionResumeParametersEffectSchema: Schema.Struct<{
356
798
  readonly commandId: Schema.String;
357
799
  readonly expectedRevision: Schema.String;
358
800
  readonly sessionId: Schema.String;
801
+ readonly parent: Schema.optional<Schema.Struct<{
802
+ readonly children: Schema.Struct<{
803
+ readonly live: Schema.Int;
804
+ readonly total: Schema.Int;
805
+ }>;
806
+ readonly sessionId: Schema.String;
807
+ }>>;
359
808
  }>;
360
809
  export declare const sessionMessageSendParametersEffectSchema: Schema.Struct<{
361
810
  readonly body: Schema.String;
@@ -495,6 +944,7 @@ export declare const sessionMessageSendResultEffectSchema: Schema.Struct<{
495
944
  readonly createdAt: Schema.String;
496
945
  readonly eventCursor: Schema.String;
497
946
  readonly method: Schema.String;
947
+ readonly proposedBy: Schema.optional<Schema.String>;
498
948
  readonly receiptId: Schema.String;
499
949
  readonly schemaVersion: Schema.Literal<1>;
500
950
  readonly state: Schema.Literal<"succeeded">;
@@ -541,6 +991,7 @@ export declare const sessionInboxAckResultEffectSchema: Schema.Struct<{
541
991
  readonly createdAt: Schema.String;
542
992
  readonly eventCursor: Schema.String;
543
993
  readonly method: Schema.String;
994
+ readonly proposedBy: Schema.optional<Schema.String>;
544
995
  readonly receiptId: Schema.String;
545
996
  readonly schemaVersion: Schema.Literal<1>;
546
997
  readonly state: Schema.Literal<"succeeded">;
@@ -561,6 +1012,7 @@ export declare const sessionCreateResultEffectSchema: Schema.Struct<{
561
1012
  readonly createdAt: Schema.String;
562
1013
  readonly eventCursor: Schema.String;
563
1014
  readonly method: Schema.String;
1015
+ readonly proposedBy: Schema.optional<Schema.String>;
564
1016
  readonly receiptId: Schema.String;
565
1017
  readonly schemaVersion: Schema.Literal<1>;
566
1018
  readonly state: Schema.Literal<"succeeded">;
@@ -579,15 +1031,23 @@ export declare const sessionCreateResultEffectSchema: Schema.Struct<{
579
1031
  readonly updatedAt: Schema.String;
580
1032
  readonly workspaceId: Schema.String;
581
1033
  readonly workspaceRevision: Schema.String;
1034
+ /** What the Session is doing; present on `session.list` and `session.show`. */
1035
+ readonly activity: Schema.optional<Schema.Literals<readonly ["stopped", "waiting_approval", "working", "idle"]>>;
582
1036
  readonly agentDefinitionRef: Schema.optional<Schema.Struct<{
583
1037
  readonly contentDigest: Schema.String;
584
1038
  readonly key: Schema.String;
585
1039
  readonly version: Schema.String;
586
1040
  }>>;
1041
+ /**
1042
+ * `none` for a host-authority Session: the vendor harness runs as the
1043
+ * Node's user with no Maia sandbox ([D-198](https://maia-os.vllnt.com/en/docs/decisions#d-198)).
1044
+ * A sandboxed Session carries none.
1045
+ */
1046
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
587
1047
  readonly executor: Schema.optional<Schema.Struct<{
588
1048
  readonly connectionId: Schema.String;
589
1049
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
590
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
1050
+ readonly kind: Schema.String;
591
1051
  readonly model: Schema.optional<Schema.String>;
592
1052
  }>>;
593
1053
  /** Why the runtime of a failed Session failed, when Maia knows. */
@@ -595,7 +1055,61 @@ export declare const sessionCreateResultEffectSchema: Schema.Struct<{
595
1055
  readonly code: Schema.String;
596
1056
  readonly message: Schema.String;
597
1057
  }>>;
1058
+ /** The count of board tasks the Session holds now; present on `session.list`, `session.show` and `session.wait`, with `heldTasks`. */
1059
+ readonly heldTaskCount: Schema.optional<Schema.Int>;
1060
+ /**
1061
+ * The board tasks the Session holds now, newest claim first, at most
1062
+ * `MAX_BOARD_HELD_TASKS`; `heldTaskCount` counts every one.
1063
+ */
1064
+ readonly heldTasks: Schema.optional<Schema.$Array<Schema.Struct<{
1065
+ readonly claimedAt: Schema.String;
1066
+ readonly id: Schema.String;
1067
+ readonly leaseExpiresAt: Schema.String;
1068
+ readonly state: Schema.Literal<"claimed">;
1069
+ readonly title: Schema.String;
1070
+ }>>>;
1071
+ /** Set at creation; absent when the Session has no labels. */
1072
+ readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
1073
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
1074
+ readonly latestTurnId: Schema.optional<Schema.String>;
1075
+ /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
1076
+ readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
1077
+ /** The Session that spawned or created this one, fixed at creation; absent for a top-level Session. */
1078
+ readonly parentSessionId: Schema.optional<Schema.String>;
1079
+ /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
1080
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
1081
+ /**
1082
+ * The prompt a `question` or `approval` Session waits on, with its text and
1083
+ * options. `session.list` and `session.show` return it while `status` is
1084
+ * one of the two and never otherwise: a `question` names a question
1085
+ * prompt, an `approval` any other kind. A reader who may not read the
1086
+ * approval (a Session principal listing its Project) gets the status without
1087
+ * it.
1088
+ */
1089
+ readonly prompt: Schema.optional<Schema.Struct<{
1090
+ readonly approvalId: Schema.String;
1091
+ readonly expiresAt: Schema.String;
1092
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
1093
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
1094
+ readonly label: Schema.String;
1095
+ readonly optionId: Schema.String;
1096
+ }>>>;
1097
+ readonly summary: Schema.optional<Schema.String>;
1098
+ }>>;
1099
+ /**
1100
+ * Why a recovering Session stopped retrying: its retries ran out and it waits
1101
+ * for `session.resume` or a Node start. Absent while it still retries and in
1102
+ * every other state.
1103
+ */
1104
+ readonly recovery: Schema.optional<Schema.Struct<{
1105
+ readonly code: Schema.String;
1106
+ readonly message: Schema.String;
1107
+ }>>;
598
1108
  readonly schemaVersion: Schema.Literal<4>;
1109
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
1110
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
1111
+ /** What the Session is doing; present on `session.list` and `session.show`. */
1112
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "compacting", "rate_limited", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
599
1113
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
600
1114
  readonly title: Schema.optional<Schema.String>;
601
1115
  /** A coding Session's own worktree; a reading Session has none. */
@@ -612,11 +1126,24 @@ export declare const sessionCreateResultEffectSchema: Schema.Struct<{
612
1126
  }>>;
613
1127
  }>;
614
1128
  }>;
615
- export declare const sessionSpawnResultEffectSchema: Schema.Struct<{
1129
+ /** What a fork will do: the Session revision and turn it starts from, the commit a coding Session's worktree starts at, and the path that carries the context over. */
1130
+ export declare const sessionForkPreviewResultEffectSchema: Schema.Struct<{
1131
+ readonly inputDigest: Schema.String;
1132
+ readonly proof: Schema.String;
1133
+ readonly validUntil: Schema.String;
1134
+ readonly checkpoint: Schema.optional<Schema.String>;
1135
+ readonly commandId: Schema.String;
1136
+ readonly expectedRevision: Schema.String;
1137
+ readonly sessionId: Schema.String;
1138
+ readonly turnId: Schema.String;
1139
+ readonly method: Schema.Literal<"session.fork.preview">;
1140
+ readonly path: Schema.Literal<"context-handoff">;
1141
+ }>;
1142
+ /** The fork's Session: the source keeps its binding, its worktree and its history. */
1143
+ export declare const sessionForkConfirmResultEffectSchema: Schema.Struct<{
616
1144
  readonly delivery: Schema.Literals<readonly ["new", "duplicate"]>;
617
- readonly harness: Schema.Literals<readonly ["maia-agent", "pi"]>;
618
- readonly method: Schema.Literal<"session.spawn">;
619
- readonly parentSessionId: Schema.String;
1145
+ readonly handoff: Schema.String;
1146
+ readonly path: Schema.Literal<"context-handoff">;
620
1147
  readonly receipt: Schema.Struct<{
621
1148
  readonly actorId: Schema.String;
622
1149
  readonly aggregateRevision: Schema.String;
@@ -624,6 +1151,7 @@ export declare const sessionSpawnResultEffectSchema: Schema.Struct<{
624
1151
  readonly createdAt: Schema.String;
625
1152
  readonly eventCursor: Schema.String;
626
1153
  readonly method: Schema.String;
1154
+ readonly proposedBy: Schema.optional<Schema.String>;
627
1155
  readonly receiptId: Schema.String;
628
1156
  readonly schemaVersion: Schema.Literal<1>;
629
1157
  readonly state: Schema.Literal<"succeeded">;
@@ -642,15 +1170,23 @@ export declare const sessionSpawnResultEffectSchema: Schema.Struct<{
642
1170
  readonly updatedAt: Schema.String;
643
1171
  readonly workspaceId: Schema.String;
644
1172
  readonly workspaceRevision: Schema.String;
1173
+ /** What the Session is doing; present on `session.list` and `session.show`. */
1174
+ readonly activity: Schema.optional<Schema.Literals<readonly ["stopped", "waiting_approval", "working", "idle"]>>;
645
1175
  readonly agentDefinitionRef: Schema.optional<Schema.Struct<{
646
1176
  readonly contentDigest: Schema.String;
647
1177
  readonly key: Schema.String;
648
1178
  readonly version: Schema.String;
649
1179
  }>>;
1180
+ /**
1181
+ * `none` for a host-authority Session: the vendor harness runs as the
1182
+ * Node's user with no Maia sandbox ([D-198](https://maia-os.vllnt.com/en/docs/decisions#d-198)).
1183
+ * A sandboxed Session carries none.
1184
+ */
1185
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
650
1186
  readonly executor: Schema.optional<Schema.Struct<{
651
1187
  readonly connectionId: Schema.String;
652
1188
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
653
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
1189
+ readonly kind: Schema.String;
654
1190
  readonly model: Schema.optional<Schema.String>;
655
1191
  }>>;
656
1192
  /** Why the runtime of a failed Session failed, when Maia knows. */
@@ -658,7 +1194,61 @@ export declare const sessionSpawnResultEffectSchema: Schema.Struct<{
658
1194
  readonly code: Schema.String;
659
1195
  readonly message: Schema.String;
660
1196
  }>>;
1197
+ /** The count of board tasks the Session holds now; present on `session.list`, `session.show` and `session.wait`, with `heldTasks`. */
1198
+ readonly heldTaskCount: Schema.optional<Schema.Int>;
1199
+ /**
1200
+ * The board tasks the Session holds now, newest claim first, at most
1201
+ * `MAX_BOARD_HELD_TASKS`; `heldTaskCount` counts every one.
1202
+ */
1203
+ readonly heldTasks: Schema.optional<Schema.$Array<Schema.Struct<{
1204
+ readonly claimedAt: Schema.String;
1205
+ readonly id: Schema.String;
1206
+ readonly leaseExpiresAt: Schema.String;
1207
+ readonly state: Schema.Literal<"claimed">;
1208
+ readonly title: Schema.String;
1209
+ }>>>;
1210
+ /** Set at creation; absent when the Session has no labels. */
1211
+ readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
1212
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
1213
+ readonly latestTurnId: Schema.optional<Schema.String>;
1214
+ /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
1215
+ readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
1216
+ /** The Session that spawned or created this one, fixed at creation; absent for a top-level Session. */
1217
+ readonly parentSessionId: Schema.optional<Schema.String>;
1218
+ /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
1219
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
1220
+ /**
1221
+ * The prompt a `question` or `approval` Session waits on, with its text and
1222
+ * options. `session.list` and `session.show` return it while `status` is
1223
+ * one of the two and never otherwise: a `question` names a question
1224
+ * prompt, an `approval` any other kind. A reader who may not read the
1225
+ * approval (a Session principal listing its Project) gets the status without
1226
+ * it.
1227
+ */
1228
+ readonly prompt: Schema.optional<Schema.Struct<{
1229
+ readonly approvalId: Schema.String;
1230
+ readonly expiresAt: Schema.String;
1231
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
1232
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
1233
+ readonly label: Schema.String;
1234
+ readonly optionId: Schema.String;
1235
+ }>>>;
1236
+ readonly summary: Schema.optional<Schema.String>;
1237
+ }>>;
1238
+ /**
1239
+ * Why a recovering Session stopped retrying: its retries ran out and it waits
1240
+ * for `session.resume` or a Node start. Absent while it still retries and in
1241
+ * every other state.
1242
+ */
1243
+ readonly recovery: Schema.optional<Schema.Struct<{
1244
+ readonly code: Schema.String;
1245
+ readonly message: Schema.String;
1246
+ }>>;
661
1247
  readonly schemaVersion: Schema.Literal<4>;
1248
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
1249
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
1250
+ /** What the Session is doing; present on `session.list` and `session.show`. */
1251
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "compacting", "rate_limited", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
662
1252
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
663
1253
  readonly title: Schema.optional<Schema.String>;
664
1254
  /** A coding Session's own worktree; a reading Session has none. */
@@ -674,13 +1264,48 @@ export declare const sessionSpawnResultEffectSchema: Schema.Struct<{
674
1264
  readonly state: Schema.Literals<readonly ["active", "archived", "removed"]>;
675
1265
  }>>;
676
1266
  }>;
1267
+ readonly sourceSessionId: Schema.String;
1268
+ readonly method: Schema.Literal<"session.fork.confirm">;
677
1269
  }>;
678
- export declare const sessionListResultEffectSchema: Schema.Struct<{
679
- readonly attention: Schema.optional<Schema.$Array<Schema.Struct<{
680
- readonly attention: Schema.Literals<readonly ["failed", "approval_pending", "question", "turn_failed", "stalled", "settled_unreviewed"]>;
681
- readonly sessionId: Schema.String;
682
- }>>>;
683
- readonly items: Schema.$Array<Schema.Struct<{
1270
+ /** What a switch will do: the Session revision it starts from, and the path that carries the context over. */
1271
+ export declare const sessionSwitchPreviewResultEffectSchema: Schema.Struct<{
1272
+ readonly inputDigest: Schema.String;
1273
+ readonly proof: Schema.String;
1274
+ readonly validUntil: Schema.String;
1275
+ readonly commandId: Schema.String;
1276
+ readonly expectedRevision: Schema.String;
1277
+ readonly sessionId: Schema.String;
1278
+ readonly target: Schema.Struct<{
1279
+ readonly connectionId: Schema.optional<Schema.String>;
1280
+ readonly executor: Schema.optional<Schema.String>;
1281
+ readonly model: Schema.optional<Schema.String>;
1282
+ }>;
1283
+ readonly method: Schema.Literal<"session.switch.preview">;
1284
+ readonly path: Schema.Literal<"context-handoff">;
1285
+ }>;
1286
+ /** The successor Session, shaped as a fork's result: the source keeps its binding and its history. */
1287
+ export declare const sessionSwitchConfirmResultEffectSchema: Schema.Struct<{
1288
+ readonly delivery: Schema.Literals<readonly ["new", "duplicate"]>;
1289
+ readonly handoff: Schema.String;
1290
+ readonly path: Schema.Literal<"context-handoff">;
1291
+ readonly receipt: Schema.Struct<{
1292
+ readonly actorId: Schema.String;
1293
+ readonly aggregateRevision: Schema.String;
1294
+ readonly commandId: Schema.String;
1295
+ readonly createdAt: Schema.String;
1296
+ readonly eventCursor: Schema.String;
1297
+ readonly method: Schema.String;
1298
+ readonly proposedBy: Schema.optional<Schema.String>;
1299
+ readonly receiptId: Schema.String;
1300
+ readonly schemaVersion: Schema.Literal<1>;
1301
+ readonly state: Schema.Literal<"succeeded">;
1302
+ readonly target: Schema.Struct<{
1303
+ readonly id: Schema.String;
1304
+ readonly type: Schema.String;
1305
+ }>;
1306
+ readonly updatedAt: Schema.String;
1307
+ }>;
1308
+ readonly session: Schema.Struct<{
684
1309
  readonly createdAt: Schema.String;
685
1310
  readonly id: Schema.String;
686
1311
  readonly projectId: Schema.String;
@@ -689,15 +1314,23 @@ export declare const sessionListResultEffectSchema: Schema.Struct<{
689
1314
  readonly updatedAt: Schema.String;
690
1315
  readonly workspaceId: Schema.String;
691
1316
  readonly workspaceRevision: Schema.String;
1317
+ /** What the Session is doing; present on `session.list` and `session.show`. */
1318
+ readonly activity: Schema.optional<Schema.Literals<readonly ["stopped", "waiting_approval", "working", "idle"]>>;
692
1319
  readonly agentDefinitionRef: Schema.optional<Schema.Struct<{
693
1320
  readonly contentDigest: Schema.String;
694
1321
  readonly key: Schema.String;
695
1322
  readonly version: Schema.String;
696
1323
  }>>;
1324
+ /**
1325
+ * `none` for a host-authority Session: the vendor harness runs as the
1326
+ * Node's user with no Maia sandbox ([D-198](https://maia-os.vllnt.com/en/docs/decisions#d-198)).
1327
+ * A sandboxed Session carries none.
1328
+ */
1329
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
697
1330
  readonly executor: Schema.optional<Schema.Struct<{
698
1331
  readonly connectionId: Schema.String;
699
1332
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
700
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
1333
+ readonly kind: Schema.String;
701
1334
  readonly model: Schema.optional<Schema.String>;
702
1335
  }>>;
703
1336
  /** Why the runtime of a failed Session failed, when Maia knows. */
@@ -705,7 +1338,61 @@ export declare const sessionListResultEffectSchema: Schema.Struct<{
705
1338
  readonly code: Schema.String;
706
1339
  readonly message: Schema.String;
707
1340
  }>>;
1341
+ /** The count of board tasks the Session holds now; present on `session.list`, `session.show` and `session.wait`, with `heldTasks`. */
1342
+ readonly heldTaskCount: Schema.optional<Schema.Int>;
1343
+ /**
1344
+ * The board tasks the Session holds now, newest claim first, at most
1345
+ * `MAX_BOARD_HELD_TASKS`; `heldTaskCount` counts every one.
1346
+ */
1347
+ readonly heldTasks: Schema.optional<Schema.$Array<Schema.Struct<{
1348
+ readonly claimedAt: Schema.String;
1349
+ readonly id: Schema.String;
1350
+ readonly leaseExpiresAt: Schema.String;
1351
+ readonly state: Schema.Literal<"claimed">;
1352
+ readonly title: Schema.String;
1353
+ }>>>;
1354
+ /** Set at creation; absent when the Session has no labels. */
1355
+ readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
1356
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
1357
+ readonly latestTurnId: Schema.optional<Schema.String>;
1358
+ /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
1359
+ readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
1360
+ /** The Session that spawned or created this one, fixed at creation; absent for a top-level Session. */
1361
+ readonly parentSessionId: Schema.optional<Schema.String>;
1362
+ /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
1363
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
1364
+ /**
1365
+ * The prompt a `question` or `approval` Session waits on, with its text and
1366
+ * options. `session.list` and `session.show` return it while `status` is
1367
+ * one of the two and never otherwise: a `question` names a question
1368
+ * prompt, an `approval` any other kind. A reader who may not read the
1369
+ * approval (a Session principal listing its Project) gets the status without
1370
+ * it.
1371
+ */
1372
+ readonly prompt: Schema.optional<Schema.Struct<{
1373
+ readonly approvalId: Schema.String;
1374
+ readonly expiresAt: Schema.String;
1375
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
1376
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
1377
+ readonly label: Schema.String;
1378
+ readonly optionId: Schema.String;
1379
+ }>>>;
1380
+ readonly summary: Schema.optional<Schema.String>;
1381
+ }>>;
1382
+ /**
1383
+ * Why a recovering Session stopped retrying: its retries ran out and it waits
1384
+ * for `session.resume` or a Node start. Absent while it still retries and in
1385
+ * every other state.
1386
+ */
1387
+ readonly recovery: Schema.optional<Schema.Struct<{
1388
+ readonly code: Schema.String;
1389
+ readonly message: Schema.String;
1390
+ }>>;
708
1391
  readonly schemaVersion: Schema.Literal<4>;
1392
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
1393
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
1394
+ /** What the Session is doing; present on `session.list` and `session.show`. */
1395
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "compacting", "rate_limited", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
709
1396
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
710
1397
  readonly title: Schema.optional<Schema.String>;
711
1398
  /** A coding Session's own worktree; a reading Session has none. */
@@ -720,38 +1407,595 @@ export declare const sessionListResultEffectSchema: Schema.Struct<{
720
1407
  }>>>;
721
1408
  readonly state: Schema.Literals<readonly ["active", "archived", "removed"]>;
722
1409
  }>>;
723
- }>>;
724
- readonly method: Schema.Literal<"session.list">;
725
- readonly nextCursor: Schema.optional<Schema.String>;
1410
+ }>;
1411
+ readonly sourceSessionId: Schema.String;
1412
+ readonly method: Schema.Literal<"session.switch.confirm">;
726
1413
  }>;
727
- export declare const sessionShowResultEffectSchema: Schema.Struct<{
728
- readonly method: Schema.Literal<"session.show">;
729
- readonly session: Schema.Struct<{
730
- readonly createdAt: Schema.String;
731
- readonly id: Schema.String;
732
- readonly projectId: Schema.String;
733
- readonly revision: Schema.String;
734
- readonly state: Schema.Literals<readonly ["idle", "starting", "running", "waiting-approval", "interrupted", "recovering", "stopping", "stopped", "failed"]>;
735
- readonly updatedAt: Schema.String;
736
- readonly workspaceId: Schema.String;
737
- readonly workspaceRevision: Schema.String;
738
- readonly agentDefinitionRef: Schema.optional<Schema.Struct<{
739
- readonly contentDigest: Schema.String;
740
- readonly key: Schema.String;
741
- readonly version: Schema.String;
742
- }>>;
743
- readonly executor: Schema.optional<Schema.Struct<{
744
- readonly connectionId: Schema.String;
745
- readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
746
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
747
- readonly model: Schema.optional<Schema.String>;
1414
+ /** What confirming will approve: the script and its digest, and whether the Project has approved that digest already. */
1415
+ export declare const sessionSetupPreviewResultEffectSchema: Schema.Struct<{
1416
+ readonly inputDigest: Schema.String;
1417
+ readonly proof: Schema.String;
1418
+ readonly validUntil: Schema.String;
1419
+ readonly commandId: Schema.String;
1420
+ readonly expectedRevision: Schema.String;
1421
+ readonly sessionId: Schema.String;
1422
+ readonly setupDigest: Schema.String;
1423
+ readonly approved: Schema.Boolean;
1424
+ readonly method: Schema.Literal<"session.setup.preview">;
1425
+ readonly setup: Schema.Struct<{
1426
+ readonly command: Schema.$Array<Schema.String>;
1427
+ readonly files: Schema.$Array<Schema.Struct<{
1428
+ readonly path: Schema.String;
1429
+ readonly sha256: Schema.String;
748
1430
  }>>;
749
- /** Why the runtime of a failed Session failed, when Maia knows. */
750
- readonly failure: Schema.optional<Schema.Struct<{
1431
+ }>;
1432
+ }>;
1433
+ /** The approval under its receipt: the Project runs a script with this digest without asking again. */
1434
+ export declare const sessionSetupConfirmResultEffectSchema: Schema.Struct<{
1435
+ readonly delivery: Schema.Literals<readonly ["new", "duplicate"]>;
1436
+ readonly method: Schema.Literal<"session.setup.confirm">;
1437
+ readonly receipt: Schema.Struct<{
1438
+ readonly actorId: Schema.String;
1439
+ readonly aggregateRevision: Schema.String;
1440
+ readonly commandId: Schema.String;
1441
+ readonly createdAt: Schema.String;
1442
+ readonly eventCursor: Schema.String;
1443
+ readonly method: Schema.String;
1444
+ readonly proposedBy: Schema.optional<Schema.String>;
1445
+ readonly receiptId: Schema.String;
1446
+ readonly schemaVersion: Schema.Literal<1>;
1447
+ readonly state: Schema.Literal<"succeeded">;
1448
+ readonly target: Schema.Struct<{
1449
+ readonly id: Schema.String;
1450
+ readonly type: Schema.String;
1451
+ }>;
1452
+ readonly updatedAt: Schema.String;
1453
+ }>;
1454
+ readonly sessionId: Schema.String;
1455
+ readonly setupDigest: Schema.String;
1456
+ }>;
1457
+ /** What a spawn will do: the child, its grant and its parent, sealed for the confirmation. */
1458
+ export declare const sessionSpawnPreviewResultEffectSchema: Schema.Struct<{
1459
+ readonly inputDigest: Schema.String;
1460
+ readonly proof: Schema.String;
1461
+ readonly validUntil: Schema.String;
1462
+ readonly commandId: Schema.String;
1463
+ readonly executor: Schema.String;
1464
+ readonly hostAuthority: Schema.optional<Schema.Literal<true>>;
1465
+ readonly parent: Schema.Struct<{
1466
+ readonly children: Schema.Struct<{
1467
+ readonly live: Schema.Int;
1468
+ readonly total: Schema.Int;
1469
+ }>;
1470
+ readonly depth: Schema.Int;
1471
+ readonly hostAuthority: Schema.optional<Schema.Literal<true>>;
1472
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
1473
+ readonly role: Schema.Literals<readonly ["orchestrator", "worker"]>;
1474
+ readonly sessionId: Schema.String;
1475
+ }>;
1476
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
1477
+ readonly workspaceId: Schema.String;
1478
+ readonly expectedRevision: Schema.Literal<"0">;
1479
+ readonly method: Schema.Literal<"session.spawn.preview">;
1480
+ }>;
1481
+ /** The child Session, created under a create receipt, and the parent it names. */
1482
+ export declare const sessionSpawnConfirmResultEffectSchema: Schema.Struct<{
1483
+ readonly delivery: Schema.Literals<readonly ["new", "duplicate"]>;
1484
+ readonly method: Schema.Literal<"session.spawn.confirm">;
1485
+ readonly parentSessionId: Schema.String;
1486
+ readonly receipt: Schema.Struct<{
1487
+ readonly actorId: Schema.String;
1488
+ readonly aggregateRevision: Schema.String;
1489
+ readonly commandId: Schema.String;
1490
+ readonly createdAt: Schema.String;
1491
+ readonly eventCursor: Schema.String;
1492
+ readonly method: Schema.String;
1493
+ readonly proposedBy: Schema.optional<Schema.String>;
1494
+ readonly receiptId: Schema.String;
1495
+ readonly schemaVersion: Schema.Literal<1>;
1496
+ readonly state: Schema.Literal<"succeeded">;
1497
+ readonly target: Schema.Struct<{
1498
+ readonly id: Schema.String;
1499
+ readonly type: Schema.String;
1500
+ }>;
1501
+ readonly updatedAt: Schema.String;
1502
+ }>;
1503
+ readonly session: Schema.Struct<{
1504
+ readonly createdAt: Schema.String;
1505
+ readonly id: Schema.String;
1506
+ readonly projectId: Schema.String;
1507
+ readonly revision: Schema.String;
1508
+ readonly state: Schema.Literals<readonly ["idle", "starting", "running", "waiting-approval", "interrupted", "recovering", "stopping", "stopped", "failed"]>;
1509
+ readonly updatedAt: Schema.String;
1510
+ readonly workspaceId: Schema.String;
1511
+ readonly workspaceRevision: Schema.String;
1512
+ /** What the Session is doing; present on `session.list` and `session.show`. */
1513
+ readonly activity: Schema.optional<Schema.Literals<readonly ["stopped", "waiting_approval", "working", "idle"]>>;
1514
+ readonly agentDefinitionRef: Schema.optional<Schema.Struct<{
1515
+ readonly contentDigest: Schema.String;
1516
+ readonly key: Schema.String;
1517
+ readonly version: Schema.String;
1518
+ }>>;
1519
+ /**
1520
+ * `none` for a host-authority Session: the vendor harness runs as the
1521
+ * Node's user with no Maia sandbox ([D-198](https://maia-os.vllnt.com/en/docs/decisions#d-198)).
1522
+ * A sandboxed Session carries none.
1523
+ */
1524
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
1525
+ readonly executor: Schema.optional<Schema.Struct<{
1526
+ readonly connectionId: Schema.String;
1527
+ readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
1528
+ readonly kind: Schema.String;
1529
+ readonly model: Schema.optional<Schema.String>;
1530
+ }>>;
1531
+ /** Why the runtime of a failed Session failed, when Maia knows. */
1532
+ readonly failure: Schema.optional<Schema.Struct<{
1533
+ readonly code: Schema.String;
1534
+ readonly message: Schema.String;
1535
+ }>>;
1536
+ /** The count of board tasks the Session holds now; present on `session.list`, `session.show` and `session.wait`, with `heldTasks`. */
1537
+ readonly heldTaskCount: Schema.optional<Schema.Int>;
1538
+ /**
1539
+ * The board tasks the Session holds now, newest claim first, at most
1540
+ * `MAX_BOARD_HELD_TASKS`; `heldTaskCount` counts every one.
1541
+ */
1542
+ readonly heldTasks: Schema.optional<Schema.$Array<Schema.Struct<{
1543
+ readonly claimedAt: Schema.String;
1544
+ readonly id: Schema.String;
1545
+ readonly leaseExpiresAt: Schema.String;
1546
+ readonly state: Schema.Literal<"claimed">;
1547
+ readonly title: Schema.String;
1548
+ }>>>;
1549
+ /** Set at creation; absent when the Session has no labels. */
1550
+ readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
1551
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
1552
+ readonly latestTurnId: Schema.optional<Schema.String>;
1553
+ /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
1554
+ readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
1555
+ /** The Session that spawned or created this one, fixed at creation; absent for a top-level Session. */
1556
+ readonly parentSessionId: Schema.optional<Schema.String>;
1557
+ /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
1558
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
1559
+ /**
1560
+ * The prompt a `question` or `approval` Session waits on, with its text and
1561
+ * options. `session.list` and `session.show` return it while `status` is
1562
+ * one of the two and never otherwise: a `question` names a question
1563
+ * prompt, an `approval` any other kind. A reader who may not read the
1564
+ * approval (a Session principal listing its Project) gets the status without
1565
+ * it.
1566
+ */
1567
+ readonly prompt: Schema.optional<Schema.Struct<{
1568
+ readonly approvalId: Schema.String;
1569
+ readonly expiresAt: Schema.String;
1570
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
1571
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
1572
+ readonly label: Schema.String;
1573
+ readonly optionId: Schema.String;
1574
+ }>>>;
1575
+ readonly summary: Schema.optional<Schema.String>;
1576
+ }>>;
1577
+ /**
1578
+ * Why a recovering Session stopped retrying: its retries ran out and it waits
1579
+ * for `session.resume` or a Node start. Absent while it still retries and in
1580
+ * every other state.
1581
+ */
1582
+ readonly recovery: Schema.optional<Schema.Struct<{
1583
+ readonly code: Schema.String;
1584
+ readonly message: Schema.String;
1585
+ }>>;
1586
+ readonly schemaVersion: Schema.Literal<4>;
1587
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
1588
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
1589
+ /** What the Session is doing; present on `session.list` and `session.show`. */
1590
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "compacting", "rate_limited", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
1591
+ /** Set at creation or by a rename; otherwise the first line of the first turn. */
1592
+ readonly title: Schema.optional<Schema.String>;
1593
+ /** A coding Session's own worktree; a reading Session has none. */
1594
+ readonly worktree: Schema.optional<Schema.Struct<{
1595
+ readonly baseRef: Schema.String;
1596
+ readonly baseRevision: Schema.String;
1597
+ readonly branch: Schema.String;
1598
+ readonly setup: Schema.Literals<readonly ["none", "pending", "succeeded", "failed"]>;
1599
+ readonly skills: Schema.optional<Schema.$Array<Schema.Struct<{
1600
+ readonly digest: Schema.String;
1601
+ readonly name: Schema.String;
1602
+ }>>>;
1603
+ readonly state: Schema.Literals<readonly ["active", "archived", "removed"]>;
1604
+ }>>;
1605
+ }>;
1606
+ }>;
1607
+ export declare const sessionListResultEffectSchema: Schema.Struct<{
1608
+ readonly attention: Schema.optional<Schema.$Array<Schema.Struct<{
1609
+ readonly attention: Schema.Literals<readonly ["failed", "approval_pending", "question", "turn_failed", "stalled", "settled_unreviewed"]>;
1610
+ readonly sessionId: Schema.String;
1611
+ }>>>;
1612
+ readonly items: Schema.$Array<Schema.Struct<{
1613
+ readonly createdAt: Schema.String;
1614
+ readonly id: Schema.String;
1615
+ readonly projectId: Schema.String;
1616
+ readonly revision: Schema.String;
1617
+ readonly state: Schema.Literals<readonly ["idle", "starting", "running", "waiting-approval", "interrupted", "recovering", "stopping", "stopped", "failed"]>;
1618
+ readonly updatedAt: Schema.String;
1619
+ readonly workspaceId: Schema.String;
1620
+ readonly workspaceRevision: Schema.String;
1621
+ /** What the Session is doing; present on `session.list` and `session.show`. */
1622
+ readonly activity: Schema.optional<Schema.Literals<readonly ["stopped", "waiting_approval", "working", "idle"]>>;
1623
+ readonly agentDefinitionRef: Schema.optional<Schema.Struct<{
1624
+ readonly contentDigest: Schema.String;
1625
+ readonly key: Schema.String;
1626
+ readonly version: Schema.String;
1627
+ }>>;
1628
+ /**
1629
+ * `none` for a host-authority Session: the vendor harness runs as the
1630
+ * Node's user with no Maia sandbox ([D-198](https://maia-os.vllnt.com/en/docs/decisions#d-198)).
1631
+ * A sandboxed Session carries none.
1632
+ */
1633
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
1634
+ readonly executor: Schema.optional<Schema.Struct<{
1635
+ readonly connectionId: Schema.String;
1636
+ readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
1637
+ readonly kind: Schema.String;
1638
+ readonly model: Schema.optional<Schema.String>;
1639
+ }>>;
1640
+ /** Why the runtime of a failed Session failed, when Maia knows. */
1641
+ readonly failure: Schema.optional<Schema.Struct<{
1642
+ readonly code: Schema.String;
1643
+ readonly message: Schema.String;
1644
+ }>>;
1645
+ /** The count of board tasks the Session holds now; present on `session.list`, `session.show` and `session.wait`, with `heldTasks`. */
1646
+ readonly heldTaskCount: Schema.optional<Schema.Int>;
1647
+ /**
1648
+ * The board tasks the Session holds now, newest claim first, at most
1649
+ * `MAX_BOARD_HELD_TASKS`; `heldTaskCount` counts every one.
1650
+ */
1651
+ readonly heldTasks: Schema.optional<Schema.$Array<Schema.Struct<{
1652
+ readonly claimedAt: Schema.String;
1653
+ readonly id: Schema.String;
1654
+ readonly leaseExpiresAt: Schema.String;
1655
+ readonly state: Schema.Literal<"claimed">;
1656
+ readonly title: Schema.String;
1657
+ }>>>;
1658
+ /** Set at creation; absent when the Session has no labels. */
1659
+ readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
1660
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
1661
+ readonly latestTurnId: Schema.optional<Schema.String>;
1662
+ /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
1663
+ readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
1664
+ /** The Session that spawned or created this one, fixed at creation; absent for a top-level Session. */
1665
+ readonly parentSessionId: Schema.optional<Schema.String>;
1666
+ /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
1667
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
1668
+ /**
1669
+ * The prompt a `question` or `approval` Session waits on, with its text and
1670
+ * options. `session.list` and `session.show` return it while `status` is
1671
+ * one of the two and never otherwise: a `question` names a question
1672
+ * prompt, an `approval` any other kind. A reader who may not read the
1673
+ * approval (a Session principal listing its Project) gets the status without
1674
+ * it.
1675
+ */
1676
+ readonly prompt: Schema.optional<Schema.Struct<{
1677
+ readonly approvalId: Schema.String;
1678
+ readonly expiresAt: Schema.String;
1679
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
1680
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
1681
+ readonly label: Schema.String;
1682
+ readonly optionId: Schema.String;
1683
+ }>>>;
1684
+ readonly summary: Schema.optional<Schema.String>;
1685
+ }>>;
1686
+ /**
1687
+ * Why a recovering Session stopped retrying: its retries ran out and it waits
1688
+ * for `session.resume` or a Node start. Absent while it still retries and in
1689
+ * every other state.
1690
+ */
1691
+ readonly recovery: Schema.optional<Schema.Struct<{
1692
+ readonly code: Schema.String;
1693
+ readonly message: Schema.String;
1694
+ }>>;
1695
+ readonly schemaVersion: Schema.Literal<4>;
1696
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
1697
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
1698
+ /** What the Session is doing; present on `session.list` and `session.show`. */
1699
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "compacting", "rate_limited", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
1700
+ /** Set at creation or by a rename; otherwise the first line of the first turn. */
1701
+ readonly title: Schema.optional<Schema.String>;
1702
+ /** A coding Session's own worktree; a reading Session has none. */
1703
+ readonly worktree: Schema.optional<Schema.Struct<{
1704
+ readonly baseRef: Schema.String;
1705
+ readonly baseRevision: Schema.String;
1706
+ readonly branch: Schema.String;
1707
+ readonly setup: Schema.Literals<readonly ["none", "pending", "succeeded", "failed"]>;
1708
+ readonly skills: Schema.optional<Schema.$Array<Schema.Struct<{
1709
+ readonly digest: Schema.String;
1710
+ readonly name: Schema.String;
1711
+ }>>>;
1712
+ readonly state: Schema.Literals<readonly ["active", "archived", "removed"]>;
1713
+ }>>;
1714
+ }>>;
1715
+ readonly method: Schema.Literal<"session.list">;
1716
+ readonly nextCursor: Schema.optional<Schema.String>;
1717
+ }>;
1718
+ /**
1719
+ * A child on another Node, as the Node that holds its parent records it
1720
+ * (D-SPAWN, D-236). The client that created the child links it; a cancel its
1721
+ * Node did not answer by the fleet ask deadline marks it `orphaned`, never
1722
+ * stopped; a client that reached its Node again reconciles it, recording the
1723
+ * state that Node reported. `observedState` is always a state the child's own
1724
+ * Node reported.
1725
+ */
1726
+ export declare const sessionRemoteChildEffectSchema: Schema.Struct<{
1727
+ readonly linkedAt: Schema.String;
1728
+ readonly node: Schema.String;
1729
+ readonly observedState: Schema.optional<Schema.Literals<readonly ["idle", "starting", "running", "waiting-approval", "interrupted", "recovering", "stopping", "stopped", "failed"]>>;
1730
+ readonly orphanedAt: Schema.optional<Schema.String>;
1731
+ readonly sessionId: Schema.String;
1732
+ readonly state: Schema.Literals<readonly ["linked", "orphaned"]>;
1733
+ }>;
1734
+ /** `remoteChildren`: the parent's children on other Nodes this Node recorded, oldest link first; absent when there are none. */
1735
+ export declare const sessionShowResultEffectSchema: Schema.Struct<{
1736
+ readonly method: Schema.Literal<"session.show">;
1737
+ readonly remoteChildren: Schema.optional<Schema.$Array<Schema.Struct<{
1738
+ readonly linkedAt: Schema.String;
1739
+ readonly node: Schema.String;
1740
+ readonly observedState: Schema.optional<Schema.Literals<readonly ["idle", "starting", "running", "waiting-approval", "interrupted", "recovering", "stopping", "stopped", "failed"]>>;
1741
+ readonly orphanedAt: Schema.optional<Schema.String>;
1742
+ readonly sessionId: Schema.String;
1743
+ readonly state: Schema.Literals<readonly ["linked", "orphaned"]>;
1744
+ }>>>;
1745
+ readonly session: Schema.Struct<{
1746
+ readonly createdAt: Schema.String;
1747
+ readonly id: Schema.String;
1748
+ readonly projectId: Schema.String;
1749
+ readonly revision: Schema.String;
1750
+ readonly state: Schema.Literals<readonly ["idle", "starting", "running", "waiting-approval", "interrupted", "recovering", "stopping", "stopped", "failed"]>;
1751
+ readonly updatedAt: Schema.String;
1752
+ readonly workspaceId: Schema.String;
1753
+ readonly workspaceRevision: Schema.String;
1754
+ /** What the Session is doing; present on `session.list` and `session.show`. */
1755
+ readonly activity: Schema.optional<Schema.Literals<readonly ["stopped", "waiting_approval", "working", "idle"]>>;
1756
+ readonly agentDefinitionRef: Schema.optional<Schema.Struct<{
1757
+ readonly contentDigest: Schema.String;
1758
+ readonly key: Schema.String;
1759
+ readonly version: Schema.String;
1760
+ }>>;
1761
+ /**
1762
+ * `none` for a host-authority Session: the vendor harness runs as the
1763
+ * Node's user with no Maia sandbox ([D-198](https://maia-os.vllnt.com/en/docs/decisions#d-198)).
1764
+ * A sandboxed Session carries none.
1765
+ */
1766
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
1767
+ readonly executor: Schema.optional<Schema.Struct<{
1768
+ readonly connectionId: Schema.String;
1769
+ readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
1770
+ readonly kind: Schema.String;
1771
+ readonly model: Schema.optional<Schema.String>;
1772
+ }>>;
1773
+ /** Why the runtime of a failed Session failed, when Maia knows. */
1774
+ readonly failure: Schema.optional<Schema.Struct<{
1775
+ readonly code: Schema.String;
1776
+ readonly message: Schema.String;
1777
+ }>>;
1778
+ /** The count of board tasks the Session holds now; present on `session.list`, `session.show` and `session.wait`, with `heldTasks`. */
1779
+ readonly heldTaskCount: Schema.optional<Schema.Int>;
1780
+ /**
1781
+ * The board tasks the Session holds now, newest claim first, at most
1782
+ * `MAX_BOARD_HELD_TASKS`; `heldTaskCount` counts every one.
1783
+ */
1784
+ readonly heldTasks: Schema.optional<Schema.$Array<Schema.Struct<{
1785
+ readonly claimedAt: Schema.String;
1786
+ readonly id: Schema.String;
1787
+ readonly leaseExpiresAt: Schema.String;
1788
+ readonly state: Schema.Literal<"claimed">;
1789
+ readonly title: Schema.String;
1790
+ }>>>;
1791
+ /** Set at creation; absent when the Session has no labels. */
1792
+ readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
1793
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
1794
+ readonly latestTurnId: Schema.optional<Schema.String>;
1795
+ /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
1796
+ readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
1797
+ /** The Session that spawned or created this one, fixed at creation; absent for a top-level Session. */
1798
+ readonly parentSessionId: Schema.optional<Schema.String>;
1799
+ /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
1800
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
1801
+ /**
1802
+ * The prompt a `question` or `approval` Session waits on, with its text and
1803
+ * options. `session.list` and `session.show` return it while `status` is
1804
+ * one of the two and never otherwise: a `question` names a question
1805
+ * prompt, an `approval` any other kind. A reader who may not read the
1806
+ * approval (a Session principal listing its Project) gets the status without
1807
+ * it.
1808
+ */
1809
+ readonly prompt: Schema.optional<Schema.Struct<{
1810
+ readonly approvalId: Schema.String;
1811
+ readonly expiresAt: Schema.String;
1812
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
1813
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
1814
+ readonly label: Schema.String;
1815
+ readonly optionId: Schema.String;
1816
+ }>>>;
1817
+ readonly summary: Schema.optional<Schema.String>;
1818
+ }>>;
1819
+ /**
1820
+ * Why a recovering Session stopped retrying: its retries ran out and it waits
1821
+ * for `session.resume` or a Node start. Absent while it still retries and in
1822
+ * every other state.
1823
+ */
1824
+ readonly recovery: Schema.optional<Schema.Struct<{
1825
+ readonly code: Schema.String;
1826
+ readonly message: Schema.String;
1827
+ }>>;
1828
+ readonly schemaVersion: Schema.Literal<4>;
1829
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
1830
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
1831
+ /** What the Session is doing; present on `session.list` and `session.show`. */
1832
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "compacting", "rate_limited", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
1833
+ /** Set at creation or by a rename; otherwise the first line of the first turn. */
1834
+ readonly title: Schema.optional<Schema.String>;
1835
+ /** A coding Session's own worktree; a reading Session has none. */
1836
+ readonly worktree: Schema.optional<Schema.Struct<{
1837
+ readonly baseRef: Schema.String;
1838
+ readonly baseRevision: Schema.String;
1839
+ readonly branch: Schema.String;
1840
+ readonly setup: Schema.Literals<readonly ["none", "pending", "succeeded", "failed"]>;
1841
+ readonly skills: Schema.optional<Schema.$Array<Schema.Struct<{
1842
+ readonly digest: Schema.String;
1843
+ readonly name: Schema.String;
1844
+ }>>>;
1845
+ readonly state: Schema.Literals<readonly ["active", "archived", "removed"]>;
1846
+ }>>;
1847
+ }>;
1848
+ }>;
1849
+ /**
1850
+ * What a client records of a child on another Node on the Node that holds
1851
+ * its parent: `linked` after it created the child, `orphaned` when the
1852
+ * child's Node gave no reply to a cancel by the fleet ask deadline, and
1853
+ * `reconciled` with the state the child's Node reported once it answered
1854
+ * again. `reconciled` must carry a state and `linked` may, each a state the
1855
+ * child's Node reported; `orphaned` carries none.
1856
+ */
1857
+ export declare const sessionSpawnRecordParametersEffectSchema: Schema.Struct<{
1858
+ readonly childSessionId: Schema.String;
1859
+ readonly commandId: Schema.String;
1860
+ readonly node: Schema.String;
1861
+ readonly outcome: Schema.Literals<readonly ["linked", "orphaned", "reconciled"]>;
1862
+ readonly parentSessionId: Schema.String;
1863
+ readonly state: Schema.optional<Schema.Literals<readonly ["idle", "starting", "running", "waiting-approval", "interrupted", "recovering", "stopping", "stopped", "failed"]>>;
1864
+ }>;
1865
+ /** The child record after the change, under its own receipt on the child. */
1866
+ export declare const sessionSpawnRecordResultEffectSchema: Schema.Struct<{
1867
+ readonly child: Schema.Struct<{
1868
+ readonly linkedAt: Schema.String;
1869
+ readonly node: Schema.String;
1870
+ readonly observedState: Schema.optional<Schema.Literals<readonly ["idle", "starting", "running", "waiting-approval", "interrupted", "recovering", "stopping", "stopped", "failed"]>>;
1871
+ readonly orphanedAt: Schema.optional<Schema.String>;
1872
+ readonly sessionId: Schema.String;
1873
+ readonly state: Schema.Literals<readonly ["linked", "orphaned"]>;
1874
+ }>;
1875
+ readonly delivery: Schema.Literals<readonly ["new", "duplicate"]>;
1876
+ readonly method: Schema.Literal<"session.spawn.record">;
1877
+ readonly parentSessionId: Schema.String;
1878
+ readonly receipt: Schema.Struct<{
1879
+ readonly actorId: Schema.String;
1880
+ readonly aggregateRevision: Schema.String;
1881
+ readonly commandId: Schema.String;
1882
+ readonly createdAt: Schema.String;
1883
+ readonly eventCursor: Schema.String;
1884
+ readonly method: Schema.String;
1885
+ readonly proposedBy: Schema.optional<Schema.String>;
1886
+ readonly receiptId: Schema.String;
1887
+ readonly schemaVersion: Schema.Literal<1>;
1888
+ readonly state: Schema.Literal<"succeeded">;
1889
+ readonly target: Schema.Struct<{
1890
+ readonly id: Schema.String;
1891
+ readonly type: Schema.String;
1892
+ }>;
1893
+ readonly updatedAt: Schema.String;
1894
+ }>;
1895
+ }>;
1896
+ export declare const sessionSpawnRecordRequestEffectSchema: Schema.Struct<{
1897
+ readonly method: Schema.Literal<"session.spawn.record">;
1898
+ readonly parameters: Schema.Struct<{
1899
+ readonly childSessionId: Schema.String;
1900
+ readonly commandId: Schema.String;
1901
+ readonly node: Schema.String;
1902
+ readonly outcome: Schema.Literals<readonly ["linked", "orphaned", "reconciled"]>;
1903
+ readonly parentSessionId: Schema.String;
1904
+ readonly state: Schema.optional<Schema.Literals<readonly ["idle", "starting", "running", "waiting-approval", "interrupted", "recovering", "stopping", "stopped", "failed"]>>;
1905
+ }>;
1906
+ }>;
1907
+ /** `satisfied` is false when the bounded wait ended first; `session` is then its last read. */
1908
+ export declare const sessionWaitResultEffectSchema: Schema.Struct<{
1909
+ readonly method: Schema.Literal<"session.wait">;
1910
+ readonly satisfied: Schema.Boolean;
1911
+ readonly session: Schema.Struct<{
1912
+ readonly createdAt: Schema.String;
1913
+ readonly id: Schema.String;
1914
+ readonly projectId: Schema.String;
1915
+ readonly revision: Schema.String;
1916
+ readonly state: Schema.Literals<readonly ["idle", "starting", "running", "waiting-approval", "interrupted", "recovering", "stopping", "stopped", "failed"]>;
1917
+ readonly updatedAt: Schema.String;
1918
+ readonly workspaceId: Schema.String;
1919
+ readonly workspaceRevision: Schema.String;
1920
+ /** What the Session is doing; present on `session.list` and `session.show`. */
1921
+ readonly activity: Schema.optional<Schema.Literals<readonly ["stopped", "waiting_approval", "working", "idle"]>>;
1922
+ readonly agentDefinitionRef: Schema.optional<Schema.Struct<{
1923
+ readonly contentDigest: Schema.String;
1924
+ readonly key: Schema.String;
1925
+ readonly version: Schema.String;
1926
+ }>>;
1927
+ /**
1928
+ * `none` for a host-authority Session: the vendor harness runs as the
1929
+ * Node's user with no Maia sandbox ([D-198](https://maia-os.vllnt.com/en/docs/decisions#d-198)).
1930
+ * A sandboxed Session carries none.
1931
+ */
1932
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
1933
+ readonly executor: Schema.optional<Schema.Struct<{
1934
+ readonly connectionId: Schema.String;
1935
+ readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
1936
+ readonly kind: Schema.String;
1937
+ readonly model: Schema.optional<Schema.String>;
1938
+ }>>;
1939
+ /** Why the runtime of a failed Session failed, when Maia knows. */
1940
+ readonly failure: Schema.optional<Schema.Struct<{
1941
+ readonly code: Schema.String;
1942
+ readonly message: Schema.String;
1943
+ }>>;
1944
+ /** The count of board tasks the Session holds now; present on `session.list`, `session.show` and `session.wait`, with `heldTasks`. */
1945
+ readonly heldTaskCount: Schema.optional<Schema.Int>;
1946
+ /**
1947
+ * The board tasks the Session holds now, newest claim first, at most
1948
+ * `MAX_BOARD_HELD_TASKS`; `heldTaskCount` counts every one.
1949
+ */
1950
+ readonly heldTasks: Schema.optional<Schema.$Array<Schema.Struct<{
1951
+ readonly claimedAt: Schema.String;
1952
+ readonly id: Schema.String;
1953
+ readonly leaseExpiresAt: Schema.String;
1954
+ readonly state: Schema.Literal<"claimed">;
1955
+ readonly title: Schema.String;
1956
+ }>>>;
1957
+ /** Set at creation; absent when the Session has no labels. */
1958
+ readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
1959
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
1960
+ readonly latestTurnId: Schema.optional<Schema.String>;
1961
+ /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
1962
+ readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
1963
+ /** The Session that spawned or created this one, fixed at creation; absent for a top-level Session. */
1964
+ readonly parentSessionId: Schema.optional<Schema.String>;
1965
+ /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
1966
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
1967
+ /**
1968
+ * The prompt a `question` or `approval` Session waits on, with its text and
1969
+ * options. `session.list` and `session.show` return it while `status` is
1970
+ * one of the two and never otherwise: a `question` names a question
1971
+ * prompt, an `approval` any other kind. A reader who may not read the
1972
+ * approval (a Session principal listing its Project) gets the status without
1973
+ * it.
1974
+ */
1975
+ readonly prompt: Schema.optional<Schema.Struct<{
1976
+ readonly approvalId: Schema.String;
1977
+ readonly expiresAt: Schema.String;
1978
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
1979
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
1980
+ readonly label: Schema.String;
1981
+ readonly optionId: Schema.String;
1982
+ }>>>;
1983
+ readonly summary: Schema.optional<Schema.String>;
1984
+ }>>;
1985
+ /**
1986
+ * Why a recovering Session stopped retrying: its retries ran out and it waits
1987
+ * for `session.resume` or a Node start. Absent while it still retries and in
1988
+ * every other state.
1989
+ */
1990
+ readonly recovery: Schema.optional<Schema.Struct<{
751
1991
  readonly code: Schema.String;
752
1992
  readonly message: Schema.String;
753
1993
  }>>;
754
1994
  readonly schemaVersion: Schema.Literal<4>;
1995
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
1996
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
1997
+ /** What the Session is doing; present on `session.list` and `session.show`. */
1998
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "compacting", "rate_limited", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
755
1999
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
756
2000
  readonly title: Schema.optional<Schema.String>;
757
2001
  /** A coding Session's own worktree; a reading Session has none. */
@@ -785,13 +2029,21 @@ export declare const sessionEventsListResultEffectSchema: Schema.Struct<{
785
2029
  readonly key: Schema.String;
786
2030
  readonly version: Schema.String;
787
2031
  }>>;
2032
+ /** The actor that opted a host-authority Session out of the sandbox. */
2033
+ readonly authorizedBy: Schema.optional<Schema.String>;
2034
+ /** `none` when the Session runs with host authority. */
2035
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
2036
+ /** Where a host-authority Session starts, as the caller asked. */
2037
+ readonly cwd: Schema.optional<Schema.String>;
788
2038
  /** The account the Session binds to, named or picked by the Node. */
789
2039
  readonly executor: Schema.optional<Schema.Struct<{
790
2040
  readonly connectionId: Schema.String;
791
2041
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
792
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
2042
+ readonly kind: Schema.String;
793
2043
  readonly model: Schema.optional<Schema.String>;
794
2044
  }>>;
2045
+ /** The permission mode a host-authority Session passes to its vendor CLI. */
2046
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
795
2047
  readonly projectId: Schema.String;
796
2048
  readonly workspaceId: Schema.String;
797
2049
  readonly workspaceRevision: Schema.String;
@@ -835,6 +2087,20 @@ export declare const sessionEventsListResultEffectSchema: Schema.Struct<{
835
2087
  readonly schemaVersion: Schema.Literal<4>;
836
2088
  readonly sessionCursor: Schema.String;
837
2089
  readonly sessionId: Schema.String;
2090
+ }>, Schema.Struct<{
2091
+ readonly commandId: Schema.String;
2092
+ readonly eventType: Schema.Literal<"session.runtime.recovery.updated">;
2093
+ readonly globalCursor: Schema.String;
2094
+ readonly payload: Schema.Struct<{
2095
+ readonly recovery: Schema.optional<Schema.Struct<{
2096
+ readonly code: Schema.String;
2097
+ readonly message: Schema.String;
2098
+ }>>;
2099
+ }>;
2100
+ readonly recordedAt: Schema.String;
2101
+ readonly schemaVersion: Schema.Literal<4>;
2102
+ readonly sessionCursor: Schema.String;
2103
+ readonly sessionId: Schema.String;
838
2104
  }>, Schema.Struct<{
839
2105
  readonly commandId: Schema.String;
840
2106
  readonly eventType: Schema.Literal<"session.runtime.resumed">;
@@ -987,6 +2253,8 @@ export declare const sessionEventsListResultEffectSchema: Schema.Struct<{
987
2253
  }>]>]>>;
988
2254
  readonly method: Schema.Literal<"session.events.list">;
989
2255
  readonly nextSessionCursor: Schema.optional<Schema.String>;
2256
+ /** Set when a prune removed events after the caller's cursor. Send `nextSessionCursor` as `afterSessionCursor`; with none, send the last item's cursor. On an empty page keep the cursor you sent, and send "0" if you have none. Never send this marker. */
2257
+ readonly oldestRetainedCursor: Schema.optional<Schema.String>;
990
2258
  readonly sessionId: Schema.String;
991
2259
  }>;
992
2260
  export declare const sessionStartResultEffectSchema: Schema.Struct<{
@@ -999,6 +2267,7 @@ export declare const sessionStartResultEffectSchema: Schema.Struct<{
999
2267
  readonly createdAt: Schema.String;
1000
2268
  readonly eventCursor: Schema.String;
1001
2269
  readonly method: Schema.String;
2270
+ readonly proposedBy: Schema.optional<Schema.String>;
1002
2271
  readonly receiptId: Schema.String;
1003
2272
  readonly schemaVersion: Schema.Literal<1>;
1004
2273
  readonly state: Schema.Literal<"succeeded">;
@@ -1017,15 +2286,23 @@ export declare const sessionStartResultEffectSchema: Schema.Struct<{
1017
2286
  readonly updatedAt: Schema.String;
1018
2287
  readonly workspaceId: Schema.String;
1019
2288
  readonly workspaceRevision: Schema.String;
2289
+ /** What the Session is doing; present on `session.list` and `session.show`. */
2290
+ readonly activity: Schema.optional<Schema.Literals<readonly ["stopped", "waiting_approval", "working", "idle"]>>;
1020
2291
  readonly agentDefinitionRef: Schema.optional<Schema.Struct<{
1021
2292
  readonly contentDigest: Schema.String;
1022
2293
  readonly key: Schema.String;
1023
2294
  readonly version: Schema.String;
1024
2295
  }>>;
2296
+ /**
2297
+ * `none` for a host-authority Session: the vendor harness runs as the
2298
+ * Node's user with no Maia sandbox ([D-198](https://maia-os.vllnt.com/en/docs/decisions#d-198)).
2299
+ * A sandboxed Session carries none.
2300
+ */
2301
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
1025
2302
  readonly executor: Schema.optional<Schema.Struct<{
1026
2303
  readonly connectionId: Schema.String;
1027
2304
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
1028
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
2305
+ readonly kind: Schema.String;
1029
2306
  readonly model: Schema.optional<Schema.String>;
1030
2307
  }>>;
1031
2308
  /** Why the runtime of a failed Session failed, when Maia knows. */
@@ -1033,7 +2310,61 @@ export declare const sessionStartResultEffectSchema: Schema.Struct<{
1033
2310
  readonly code: Schema.String;
1034
2311
  readonly message: Schema.String;
1035
2312
  }>>;
2313
+ /** The count of board tasks the Session holds now; present on `session.list`, `session.show` and `session.wait`, with `heldTasks`. */
2314
+ readonly heldTaskCount: Schema.optional<Schema.Int>;
2315
+ /**
2316
+ * The board tasks the Session holds now, newest claim first, at most
2317
+ * `MAX_BOARD_HELD_TASKS`; `heldTaskCount` counts every one.
2318
+ */
2319
+ readonly heldTasks: Schema.optional<Schema.$Array<Schema.Struct<{
2320
+ readonly claimedAt: Schema.String;
2321
+ readonly id: Schema.String;
2322
+ readonly leaseExpiresAt: Schema.String;
2323
+ readonly state: Schema.Literal<"claimed">;
2324
+ readonly title: Schema.String;
2325
+ }>>>;
2326
+ /** Set at creation; absent when the Session has no labels. */
2327
+ readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
2328
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
2329
+ readonly latestTurnId: Schema.optional<Schema.String>;
2330
+ /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
2331
+ readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
2332
+ /** The Session that spawned or created this one, fixed at creation; absent for a top-level Session. */
2333
+ readonly parentSessionId: Schema.optional<Schema.String>;
2334
+ /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
2335
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
2336
+ /**
2337
+ * The prompt a `question` or `approval` Session waits on, with its text and
2338
+ * options. `session.list` and `session.show` return it while `status` is
2339
+ * one of the two and never otherwise: a `question` names a question
2340
+ * prompt, an `approval` any other kind. A reader who may not read the
2341
+ * approval (a Session principal listing its Project) gets the status without
2342
+ * it.
2343
+ */
2344
+ readonly prompt: Schema.optional<Schema.Struct<{
2345
+ readonly approvalId: Schema.String;
2346
+ readonly expiresAt: Schema.String;
2347
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
2348
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
2349
+ readonly label: Schema.String;
2350
+ readonly optionId: Schema.String;
2351
+ }>>>;
2352
+ readonly summary: Schema.optional<Schema.String>;
2353
+ }>>;
2354
+ /**
2355
+ * Why a recovering Session stopped retrying: its retries ran out and it waits
2356
+ * for `session.resume` or a Node start. Absent while it still retries and in
2357
+ * every other state.
2358
+ */
2359
+ readonly recovery: Schema.optional<Schema.Struct<{
2360
+ readonly code: Schema.String;
2361
+ readonly message: Schema.String;
2362
+ }>>;
1036
2363
  readonly schemaVersion: Schema.Literal<4>;
2364
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
2365
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
2366
+ /** What the Session is doing; present on `session.list` and `session.show`. */
2367
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "compacting", "rate_limited", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
1037
2368
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
1038
2369
  readonly title: Schema.optional<Schema.String>;
1039
2370
  /** A coding Session's own worktree; a reading Session has none. */
@@ -1060,6 +2391,7 @@ export declare const sessionStopResultEffectSchema: Schema.Struct<{
1060
2391
  readonly createdAt: Schema.String;
1061
2392
  readonly eventCursor: Schema.String;
1062
2393
  readonly method: Schema.String;
2394
+ readonly proposedBy: Schema.optional<Schema.String>;
1063
2395
  readonly receiptId: Schema.String;
1064
2396
  readonly schemaVersion: Schema.Literal<1>;
1065
2397
  readonly state: Schema.Literal<"succeeded">;
@@ -1078,15 +2410,23 @@ export declare const sessionStopResultEffectSchema: Schema.Struct<{
1078
2410
  readonly updatedAt: Schema.String;
1079
2411
  readonly workspaceId: Schema.String;
1080
2412
  readonly workspaceRevision: Schema.String;
2413
+ /** What the Session is doing; present on `session.list` and `session.show`. */
2414
+ readonly activity: Schema.optional<Schema.Literals<readonly ["stopped", "waiting_approval", "working", "idle"]>>;
1081
2415
  readonly agentDefinitionRef: Schema.optional<Schema.Struct<{
1082
2416
  readonly contentDigest: Schema.String;
1083
2417
  readonly key: Schema.String;
1084
2418
  readonly version: Schema.String;
1085
2419
  }>>;
2420
+ /**
2421
+ * `none` for a host-authority Session: the vendor harness runs as the
2422
+ * Node's user with no Maia sandbox ([D-198](https://maia-os.vllnt.com/en/docs/decisions#d-198)).
2423
+ * A sandboxed Session carries none.
2424
+ */
2425
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
1086
2426
  readonly executor: Schema.optional<Schema.Struct<{
1087
2427
  readonly connectionId: Schema.String;
1088
2428
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
1089
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
2429
+ readonly kind: Schema.String;
1090
2430
  readonly model: Schema.optional<Schema.String>;
1091
2431
  }>>;
1092
2432
  /** Why the runtime of a failed Session failed, when Maia knows. */
@@ -1094,7 +2434,61 @@ export declare const sessionStopResultEffectSchema: Schema.Struct<{
1094
2434
  readonly code: Schema.String;
1095
2435
  readonly message: Schema.String;
1096
2436
  }>>;
2437
+ /** The count of board tasks the Session holds now; present on `session.list`, `session.show` and `session.wait`, with `heldTasks`. */
2438
+ readonly heldTaskCount: Schema.optional<Schema.Int>;
2439
+ /**
2440
+ * The board tasks the Session holds now, newest claim first, at most
2441
+ * `MAX_BOARD_HELD_TASKS`; `heldTaskCount` counts every one.
2442
+ */
2443
+ readonly heldTasks: Schema.optional<Schema.$Array<Schema.Struct<{
2444
+ readonly claimedAt: Schema.String;
2445
+ readonly id: Schema.String;
2446
+ readonly leaseExpiresAt: Schema.String;
2447
+ readonly state: Schema.Literal<"claimed">;
2448
+ readonly title: Schema.String;
2449
+ }>>>;
2450
+ /** Set at creation; absent when the Session has no labels. */
2451
+ readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
2452
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
2453
+ readonly latestTurnId: Schema.optional<Schema.String>;
2454
+ /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
2455
+ readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
2456
+ /** The Session that spawned or created this one, fixed at creation; absent for a top-level Session. */
2457
+ readonly parentSessionId: Schema.optional<Schema.String>;
2458
+ /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
2459
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
2460
+ /**
2461
+ * The prompt a `question` or `approval` Session waits on, with its text and
2462
+ * options. `session.list` and `session.show` return it while `status` is
2463
+ * one of the two and never otherwise: a `question` names a question
2464
+ * prompt, an `approval` any other kind. A reader who may not read the
2465
+ * approval (a Session principal listing its Project) gets the status without
2466
+ * it.
2467
+ */
2468
+ readonly prompt: Schema.optional<Schema.Struct<{
2469
+ readonly approvalId: Schema.String;
2470
+ readonly expiresAt: Schema.String;
2471
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
2472
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
2473
+ readonly label: Schema.String;
2474
+ readonly optionId: Schema.String;
2475
+ }>>>;
2476
+ readonly summary: Schema.optional<Schema.String>;
2477
+ }>>;
2478
+ /**
2479
+ * Why a recovering Session stopped retrying: its retries ran out and it waits
2480
+ * for `session.resume` or a Node start. Absent while it still retries and in
2481
+ * every other state.
2482
+ */
2483
+ readonly recovery: Schema.optional<Schema.Struct<{
2484
+ readonly code: Schema.String;
2485
+ readonly message: Schema.String;
2486
+ }>>;
1097
2487
  readonly schemaVersion: Schema.Literal<4>;
2488
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
2489
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
2490
+ /** What the Session is doing; present on `session.list` and `session.show`. */
2491
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "compacting", "rate_limited", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
1098
2492
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
1099
2493
  readonly title: Schema.optional<Schema.String>;
1100
2494
  /** A coding Session's own worktree; a reading Session has none. */
@@ -1121,6 +2515,7 @@ export declare const sessionResumeResultEffectSchema: Schema.Struct<{
1121
2515
  readonly createdAt: Schema.String;
1122
2516
  readonly eventCursor: Schema.String;
1123
2517
  readonly method: Schema.String;
2518
+ readonly proposedBy: Schema.optional<Schema.String>;
1124
2519
  readonly receiptId: Schema.String;
1125
2520
  readonly schemaVersion: Schema.Literal<1>;
1126
2521
  readonly state: Schema.Literal<"succeeded">;
@@ -1139,15 +2534,23 @@ export declare const sessionResumeResultEffectSchema: Schema.Struct<{
1139
2534
  readonly updatedAt: Schema.String;
1140
2535
  readonly workspaceId: Schema.String;
1141
2536
  readonly workspaceRevision: Schema.String;
2537
+ /** What the Session is doing; present on `session.list` and `session.show`. */
2538
+ readonly activity: Schema.optional<Schema.Literals<readonly ["stopped", "waiting_approval", "working", "idle"]>>;
1142
2539
  readonly agentDefinitionRef: Schema.optional<Schema.Struct<{
1143
2540
  readonly contentDigest: Schema.String;
1144
2541
  readonly key: Schema.String;
1145
2542
  readonly version: Schema.String;
1146
2543
  }>>;
2544
+ /**
2545
+ * `none` for a host-authority Session: the vendor harness runs as the
2546
+ * Node's user with no Maia sandbox ([D-198](https://maia-os.vllnt.com/en/docs/decisions#d-198)).
2547
+ * A sandboxed Session carries none.
2548
+ */
2549
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
1147
2550
  readonly executor: Schema.optional<Schema.Struct<{
1148
2551
  readonly connectionId: Schema.String;
1149
2552
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
1150
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
2553
+ readonly kind: Schema.String;
1151
2554
  readonly model: Schema.optional<Schema.String>;
1152
2555
  }>>;
1153
2556
  /** Why the runtime of a failed Session failed, when Maia knows. */
@@ -1155,7 +2558,61 @@ export declare const sessionResumeResultEffectSchema: Schema.Struct<{
1155
2558
  readonly code: Schema.String;
1156
2559
  readonly message: Schema.String;
1157
2560
  }>>;
2561
+ /** The count of board tasks the Session holds now; present on `session.list`, `session.show` and `session.wait`, with `heldTasks`. */
2562
+ readonly heldTaskCount: Schema.optional<Schema.Int>;
2563
+ /**
2564
+ * The board tasks the Session holds now, newest claim first, at most
2565
+ * `MAX_BOARD_HELD_TASKS`; `heldTaskCount` counts every one.
2566
+ */
2567
+ readonly heldTasks: Schema.optional<Schema.$Array<Schema.Struct<{
2568
+ readonly claimedAt: Schema.String;
2569
+ readonly id: Schema.String;
2570
+ readonly leaseExpiresAt: Schema.String;
2571
+ readonly state: Schema.Literal<"claimed">;
2572
+ readonly title: Schema.String;
2573
+ }>>>;
2574
+ /** Set at creation; absent when the Session has no labels. */
2575
+ readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
2576
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
2577
+ readonly latestTurnId: Schema.optional<Schema.String>;
2578
+ /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
2579
+ readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
2580
+ /** The Session that spawned or created this one, fixed at creation; absent for a top-level Session. */
2581
+ readonly parentSessionId: Schema.optional<Schema.String>;
2582
+ /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
2583
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
2584
+ /**
2585
+ * The prompt a `question` or `approval` Session waits on, with its text and
2586
+ * options. `session.list` and `session.show` return it while `status` is
2587
+ * one of the two and never otherwise: a `question` names a question
2588
+ * prompt, an `approval` any other kind. A reader who may not read the
2589
+ * approval (a Session principal listing its Project) gets the status without
2590
+ * it.
2591
+ */
2592
+ readonly prompt: Schema.optional<Schema.Struct<{
2593
+ readonly approvalId: Schema.String;
2594
+ readonly expiresAt: Schema.String;
2595
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
2596
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
2597
+ readonly label: Schema.String;
2598
+ readonly optionId: Schema.String;
2599
+ }>>>;
2600
+ readonly summary: Schema.optional<Schema.String>;
2601
+ }>>;
2602
+ /**
2603
+ * Why a recovering Session stopped retrying: its retries ran out and it waits
2604
+ * for `session.resume` or a Node start. Absent while it still retries and in
2605
+ * every other state.
2606
+ */
2607
+ readonly recovery: Schema.optional<Schema.Struct<{
2608
+ readonly code: Schema.String;
2609
+ readonly message: Schema.String;
2610
+ }>>;
1158
2611
  readonly schemaVersion: Schema.Literal<4>;
2612
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
2613
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
2614
+ /** What the Session is doing; present on `session.list` and `session.show`. */
2615
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "compacting", "rate_limited", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
1159
2616
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
1160
2617
  readonly title: Schema.optional<Schema.String>;
1161
2618
  /** A coding Session's own worktree; a reading Session has none. */
@@ -1182,6 +2639,7 @@ export declare const sessionRenameResultEffectSchema: Schema.Struct<{
1182
2639
  readonly createdAt: Schema.String;
1183
2640
  readonly eventCursor: Schema.String;
1184
2641
  readonly method: Schema.String;
2642
+ readonly proposedBy: Schema.optional<Schema.String>;
1185
2643
  readonly receiptId: Schema.String;
1186
2644
  readonly schemaVersion: Schema.Literal<1>;
1187
2645
  readonly state: Schema.Literal<"succeeded">;
@@ -1200,15 +2658,23 @@ export declare const sessionRenameResultEffectSchema: Schema.Struct<{
1200
2658
  readonly updatedAt: Schema.String;
1201
2659
  readonly workspaceId: Schema.String;
1202
2660
  readonly workspaceRevision: Schema.String;
2661
+ /** What the Session is doing; present on `session.list` and `session.show`. */
2662
+ readonly activity: Schema.optional<Schema.Literals<readonly ["stopped", "waiting_approval", "working", "idle"]>>;
1203
2663
  readonly agentDefinitionRef: Schema.optional<Schema.Struct<{
1204
2664
  readonly contentDigest: Schema.String;
1205
2665
  readonly key: Schema.String;
1206
2666
  readonly version: Schema.String;
1207
2667
  }>>;
2668
+ /**
2669
+ * `none` for a host-authority Session: the vendor harness runs as the
2670
+ * Node's user with no Maia sandbox ([D-198](https://maia-os.vllnt.com/en/docs/decisions#d-198)).
2671
+ * A sandboxed Session carries none.
2672
+ */
2673
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
1208
2674
  readonly executor: Schema.optional<Schema.Struct<{
1209
2675
  readonly connectionId: Schema.String;
1210
2676
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
1211
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
2677
+ readonly kind: Schema.String;
1212
2678
  readonly model: Schema.optional<Schema.String>;
1213
2679
  }>>;
1214
2680
  /** Why the runtime of a failed Session failed, when Maia knows. */
@@ -1216,7 +2682,61 @@ export declare const sessionRenameResultEffectSchema: Schema.Struct<{
1216
2682
  readonly code: Schema.String;
1217
2683
  readonly message: Schema.String;
1218
2684
  }>>;
2685
+ /** The count of board tasks the Session holds now; present on `session.list`, `session.show` and `session.wait`, with `heldTasks`. */
2686
+ readonly heldTaskCount: Schema.optional<Schema.Int>;
2687
+ /**
2688
+ * The board tasks the Session holds now, newest claim first, at most
2689
+ * `MAX_BOARD_HELD_TASKS`; `heldTaskCount` counts every one.
2690
+ */
2691
+ readonly heldTasks: Schema.optional<Schema.$Array<Schema.Struct<{
2692
+ readonly claimedAt: Schema.String;
2693
+ readonly id: Schema.String;
2694
+ readonly leaseExpiresAt: Schema.String;
2695
+ readonly state: Schema.Literal<"claimed">;
2696
+ readonly title: Schema.String;
2697
+ }>>>;
2698
+ /** Set at creation; absent when the Session has no labels. */
2699
+ readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
2700
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
2701
+ readonly latestTurnId: Schema.optional<Schema.String>;
2702
+ /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
2703
+ readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
2704
+ /** The Session that spawned or created this one, fixed at creation; absent for a top-level Session. */
2705
+ readonly parentSessionId: Schema.optional<Schema.String>;
2706
+ /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
2707
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
2708
+ /**
2709
+ * The prompt a `question` or `approval` Session waits on, with its text and
2710
+ * options. `session.list` and `session.show` return it while `status` is
2711
+ * one of the two and never otherwise: a `question` names a question
2712
+ * prompt, an `approval` any other kind. A reader who may not read the
2713
+ * approval (a Session principal listing its Project) gets the status without
2714
+ * it.
2715
+ */
2716
+ readonly prompt: Schema.optional<Schema.Struct<{
2717
+ readonly approvalId: Schema.String;
2718
+ readonly expiresAt: Schema.String;
2719
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
2720
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
2721
+ readonly label: Schema.String;
2722
+ readonly optionId: Schema.String;
2723
+ }>>>;
2724
+ readonly summary: Schema.optional<Schema.String>;
2725
+ }>>;
2726
+ /**
2727
+ * Why a recovering Session stopped retrying: its retries ran out and it waits
2728
+ * for `session.resume` or a Node start. Absent while it still retries and in
2729
+ * every other state.
2730
+ */
2731
+ readonly recovery: Schema.optional<Schema.Struct<{
2732
+ readonly code: Schema.String;
2733
+ readonly message: Schema.String;
2734
+ }>>;
1219
2735
  readonly schemaVersion: Schema.Literal<4>;
2736
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
2737
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
2738
+ /** What the Session is doing; present on `session.list` and `session.show`. */
2739
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "compacting", "rate_limited", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
1220
2740
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
1221
2741
  readonly title: Schema.optional<Schema.String>;
1222
2742
  /** A coding Session's own worktree; a reading Session has none. */
@@ -1254,6 +2774,7 @@ export declare const sessionArchiveResultEffectSchema: Schema.Struct<{
1254
2774
  readonly createdAt: Schema.String;
1255
2775
  readonly eventCursor: Schema.String;
1256
2776
  readonly method: Schema.String;
2777
+ readonly proposedBy: Schema.optional<Schema.String>;
1257
2778
  readonly receiptId: Schema.String;
1258
2779
  readonly schemaVersion: Schema.Literal<1>;
1259
2780
  readonly state: Schema.Literal<"succeeded">;
@@ -1272,15 +2793,23 @@ export declare const sessionArchiveResultEffectSchema: Schema.Struct<{
1272
2793
  readonly updatedAt: Schema.String;
1273
2794
  readonly workspaceId: Schema.String;
1274
2795
  readonly workspaceRevision: Schema.String;
2796
+ /** What the Session is doing; present on `session.list` and `session.show`. */
2797
+ readonly activity: Schema.optional<Schema.Literals<readonly ["stopped", "waiting_approval", "working", "idle"]>>;
1275
2798
  readonly agentDefinitionRef: Schema.optional<Schema.Struct<{
1276
2799
  readonly contentDigest: Schema.String;
1277
2800
  readonly key: Schema.String;
1278
2801
  readonly version: Schema.String;
1279
2802
  }>>;
2803
+ /**
2804
+ * `none` for a host-authority Session: the vendor harness runs as the
2805
+ * Node's user with no Maia sandbox ([D-198](https://maia-os.vllnt.com/en/docs/decisions#d-198)).
2806
+ * A sandboxed Session carries none.
2807
+ */
2808
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
1280
2809
  readonly executor: Schema.optional<Schema.Struct<{
1281
2810
  readonly connectionId: Schema.String;
1282
2811
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
1283
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
2812
+ readonly kind: Schema.String;
1284
2813
  readonly model: Schema.optional<Schema.String>;
1285
2814
  }>>;
1286
2815
  /** Why the runtime of a failed Session failed, when Maia knows. */
@@ -1288,7 +2817,61 @@ export declare const sessionArchiveResultEffectSchema: Schema.Struct<{
1288
2817
  readonly code: Schema.String;
1289
2818
  readonly message: Schema.String;
1290
2819
  }>>;
2820
+ /** The count of board tasks the Session holds now; present on `session.list`, `session.show` and `session.wait`, with `heldTasks`. */
2821
+ readonly heldTaskCount: Schema.optional<Schema.Int>;
2822
+ /**
2823
+ * The board tasks the Session holds now, newest claim first, at most
2824
+ * `MAX_BOARD_HELD_TASKS`; `heldTaskCount` counts every one.
2825
+ */
2826
+ readonly heldTasks: Schema.optional<Schema.$Array<Schema.Struct<{
2827
+ readonly claimedAt: Schema.String;
2828
+ readonly id: Schema.String;
2829
+ readonly leaseExpiresAt: Schema.String;
2830
+ readonly state: Schema.Literal<"claimed">;
2831
+ readonly title: Schema.String;
2832
+ }>>>;
2833
+ /** Set at creation; absent when the Session has no labels. */
2834
+ readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
2835
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
2836
+ readonly latestTurnId: Schema.optional<Schema.String>;
2837
+ /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
2838
+ readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
2839
+ /** The Session that spawned or created this one, fixed at creation; absent for a top-level Session. */
2840
+ readonly parentSessionId: Schema.optional<Schema.String>;
2841
+ /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
2842
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
2843
+ /**
2844
+ * The prompt a `question` or `approval` Session waits on, with its text and
2845
+ * options. `session.list` and `session.show` return it while `status` is
2846
+ * one of the two and never otherwise: a `question` names a question
2847
+ * prompt, an `approval` any other kind. A reader who may not read the
2848
+ * approval (a Session principal listing its Project) gets the status without
2849
+ * it.
2850
+ */
2851
+ readonly prompt: Schema.optional<Schema.Struct<{
2852
+ readonly approvalId: Schema.String;
2853
+ readonly expiresAt: Schema.String;
2854
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
2855
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
2856
+ readonly label: Schema.String;
2857
+ readonly optionId: Schema.String;
2858
+ }>>>;
2859
+ readonly summary: Schema.optional<Schema.String>;
2860
+ }>>;
2861
+ /**
2862
+ * Why a recovering Session stopped retrying: its retries ran out and it waits
2863
+ * for `session.resume` or a Node start. Absent while it still retries and in
2864
+ * every other state.
2865
+ */
2866
+ readonly recovery: Schema.optional<Schema.Struct<{
2867
+ readonly code: Schema.String;
2868
+ readonly message: Schema.String;
2869
+ }>>;
1291
2870
  readonly schemaVersion: Schema.Literal<4>;
2871
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
2872
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
2873
+ /** What the Session is doing; present on `session.list` and `session.show`. */
2874
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "compacting", "rate_limited", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
1292
2875
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
1293
2876
  readonly title: Schema.optional<Schema.String>;
1294
2877
  /** A coding Session's own worktree; a reading Session has none. */
@@ -1304,6 +2887,9 @@ export declare const sessionArchiveResultEffectSchema: Schema.Struct<{
1304
2887
  readonly state: Schema.Literals<readonly ["active", "archived", "removed"]>;
1305
2888
  }>>;
1306
2889
  }>;
2890
+ /** The caller's summary and transcript path, as the archive recorded them. */
2891
+ readonly summary: Schema.optional<Schema.String>;
2892
+ readonly transcriptPath: Schema.optional<Schema.String>;
1307
2893
  }>;
1308
2894
  export declare const sessionRequestPayloadEffectSchema: Schema.Union<readonly [Schema.Struct<{
1309
2895
  readonly method: Schema.Literal<"session.create">;
@@ -1313,18 +2899,24 @@ export declare const sessionRequestPayloadEffectSchema: Schema.Union<readonly [S
1313
2899
  readonly workspaceId: Schema.String;
1314
2900
  readonly agentId: Schema.optional<Schema.String>;
1315
2901
  readonly connectionId: Schema.optional<Schema.String>;
2902
+ /** Where the Session starts; the Node checks it against the Workspace root. */
2903
+ readonly cwd: Schema.optional<Schema.String>;
1316
2904
  readonly definitionRef: Schema.optional<Schema.Struct<{
1317
2905
  readonly contentDigest: Schema.String;
1318
2906
  readonly key: Schema.String;
1319
2907
  readonly version: Schema.String;
1320
2908
  }>>;
1321
2909
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
1322
- readonly executor: Schema.optional<Schema.Literals<readonly ["claude-code", "codex-cli"]>>;
2910
+ readonly executor: Schema.optional<Schema.String>;
2911
+ readonly hostAuthority: Schema.optional<Schema.Literal<true>>;
2912
+ readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
1323
2913
  readonly model: Schema.optional<Schema.String>;
2914
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
1324
2915
  readonly role: Schema.optional<Schema.Literals<readonly ["orchestrator", "worker"]>>;
1325
2916
  readonly title: Schema.optional<Schema.String>;
1326
2917
  readonly worktree: Schema.optional<Schema.Struct<{
1327
2918
  readonly baseRef: Schema.String;
2919
+ readonly branch: Schema.optional<Schema.String>;
1328
2920
  }>>;
1329
2921
  }>;
1330
2922
  }>, Schema.Struct<{
@@ -1332,28 +2924,32 @@ export declare const sessionRequestPayloadEffectSchema: Schema.Union<readonly [S
1332
2924
  readonly parameters: Schema.Struct<{
1333
2925
  readonly afterCursor: Schema.optional<Schema.String>;
1334
2926
  readonly attention: Schema.optional<Schema.Boolean>;
2927
+ /** With `settled`: how long a Session is idle before it counts as settled; the Node's default is one day. */
2928
+ readonly idleForSeconds: Schema.optional<Schema.Int>;
2929
+ /** Sessions that carry these labels, each with the given value. */
2930
+ readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
1335
2931
  readonly limit: Schema.optional<Schema.Int>;
2932
+ /** Keeps the direct children of this Session; an unknown Session has none. */
2933
+ readonly parentSessionId: Schema.optional<Schema.String>;
1336
2934
  readonly projectId: Schema.optional<Schema.String>;
2935
+ /** Keeps non-archived Sessions that stopped, failed or sat idle for `idleForSeconds`. */
2936
+ readonly settled: Schema.optional<Schema.Literal<true>>;
1337
2937
  readonly states: Schema.optional<Schema.$Array<Schema.Literals<readonly ["idle", "starting", "running", "waiting-approval", "interrupted", "recovering", "stopping", "stopped", "failed"]>>>;
1338
2938
  }>;
1339
- }>, Schema.Struct<{
1340
- readonly method: Schema.Literal<"session.show">;
1341
- readonly parameters: Schema.Struct<{
1342
- readonly sessionId: Schema.String;
1343
- }>;
1344
- }>, Schema.Struct<{
1345
- readonly method: Schema.Literal<"session.spawn">;
1346
- readonly parameters: Schema.Struct<{
1347
- readonly commandId: Schema.String;
1348
- readonly expectedRevision: Schema.Literal<"0">;
1349
- readonly workspaceId: Schema.String;
1350
- readonly definitionRef: Schema.optional<Schema.Struct<{
1351
- readonly contentDigest: Schema.String;
1352
- readonly key: Schema.String;
1353
- readonly version: Schema.String;
1354
- }>>;
1355
- readonly harness: Schema.Literals<readonly ["maia-agent", "pi"]>;
1356
- readonly parentSessionId: Schema.String;
2939
+ }>, Schema.Struct<{
2940
+ readonly method: Schema.Literal<"session.show">;
2941
+ readonly parameters: Schema.Struct<{
2942
+ readonly sessionId: Schema.String;
2943
+ }>;
2944
+ }>, Schema.Struct<{
2945
+ readonly method: Schema.Literal<"session.wait">;
2946
+ readonly parameters: Schema.Struct<{
2947
+ /** The wait ends when the Session is in any of these activities. */
2948
+ readonly activities: Schema.optional<Schema.$Array<Schema.Literals<readonly ["stopped", "waiting_approval", "working", "idle"]>>>;
2949
+ readonly sessionId: Schema.String;
2950
+ /** The wait ends when the Session is in any of these states. */
2951
+ readonly states: Schema.optional<Schema.$Array<Schema.Literals<readonly ["idle", "starting", "running", "waiting-approval", "interrupted", "recovering", "stopping", "stopped", "failed"]>>>;
2952
+ readonly waitMilliseconds: Schema.Int;
1357
2953
  }>;
1358
2954
  }>, Schema.Struct<{
1359
2955
  readonly method: Schema.Literal<"session.events.list">;
@@ -1408,6 +3004,13 @@ export declare const sessionRequestPayloadEffectSchema: Schema.Union<readonly [S
1408
3004
  readonly commandId: Schema.String;
1409
3005
  readonly expectedRevision: Schema.String;
1410
3006
  readonly sessionId: Schema.String;
3007
+ readonly parent: Schema.optional<Schema.Struct<{
3008
+ readonly children: Schema.Struct<{
3009
+ readonly live: Schema.Int;
3010
+ readonly total: Schema.Int;
3011
+ }>;
3012
+ readonly sessionId: Schema.String;
3013
+ }>>;
1411
3014
  }>;
1412
3015
  }>, Schema.Struct<{
1413
3016
  readonly method: Schema.Literal<"session.diff">;
@@ -1415,12 +3018,19 @@ export declare const sessionRequestPayloadEffectSchema: Schema.Union<readonly [S
1415
3018
  readonly sessionId: Schema.String;
1416
3019
  readonly stat: Schema.optional<Schema.Boolean>;
1417
3020
  }>;
3021
+ }>, Schema.Struct<{
3022
+ readonly method: Schema.Literal<"session.git.status">;
3023
+ readonly parameters: Schema.Struct<{
3024
+ readonly sessionId: Schema.String;
3025
+ }>;
1418
3026
  }>, Schema.Struct<{
1419
3027
  readonly method: Schema.Literal<"session.archive">;
1420
3028
  readonly parameters: Schema.Struct<{
1421
3029
  readonly commandId: Schema.String;
1422
3030
  readonly expectedRevision: Schema.String;
1423
3031
  readonly sessionId: Schema.String;
3032
+ readonly summary: Schema.optional<Schema.String>;
3033
+ readonly transcriptPath: Schema.optional<Schema.String>;
1424
3034
  }>;
1425
3035
  }>, Schema.Struct<{
1426
3036
  readonly method: Schema.Literal<"session.rename">;
@@ -1430,6 +3040,112 @@ export declare const sessionRequestPayloadEffectSchema: Schema.Union<readonly [S
1430
3040
  readonly sessionId: Schema.String;
1431
3041
  readonly title: Schema.String;
1432
3042
  }>;
3043
+ }>, Schema.Struct<{
3044
+ readonly method: Schema.Literal<"session.fork.preview">;
3045
+ readonly parameters: Schema.Struct<{
3046
+ readonly commandId: Schema.String;
3047
+ readonly sessionId: Schema.String;
3048
+ readonly turnId: Schema.optional<Schema.String>;
3049
+ }>;
3050
+ }>, Schema.Struct<{
3051
+ readonly method: Schema.Literal<"session.fork.confirm">;
3052
+ readonly parameters: Schema.Struct<{
3053
+ inputDigest: Schema.String;
3054
+ proof: Schema.String;
3055
+ validUntil: Schema.String;
3056
+ checkpoint: Schema.optional<Schema.String>;
3057
+ commandId: Schema.String;
3058
+ expectedRevision: Schema.String;
3059
+ sessionId: Schema.String;
3060
+ turnId: Schema.String;
3061
+ }>;
3062
+ }>, Schema.Struct<{
3063
+ readonly method: Schema.Literal<"session.switch.preview">;
3064
+ readonly parameters: Schema.Struct<{
3065
+ readonly commandId: Schema.String;
3066
+ readonly sessionId: Schema.String;
3067
+ readonly target: Schema.Struct<{
3068
+ readonly connectionId: Schema.optional<Schema.String>;
3069
+ readonly executor: Schema.optional<Schema.String>;
3070
+ readonly model: Schema.optional<Schema.String>;
3071
+ }>;
3072
+ }>;
3073
+ }>, Schema.Struct<{
3074
+ readonly method: Schema.Literal<"session.switch.confirm">;
3075
+ readonly parameters: Schema.Struct<{
3076
+ inputDigest: Schema.String;
3077
+ proof: Schema.String;
3078
+ validUntil: Schema.String;
3079
+ commandId: Schema.String;
3080
+ expectedRevision: Schema.String;
3081
+ sessionId: Schema.String;
3082
+ target: Schema.Struct<{
3083
+ readonly connectionId: Schema.optional<Schema.String>;
3084
+ readonly executor: Schema.optional<Schema.String>;
3085
+ readonly model: Schema.optional<Schema.String>;
3086
+ }>;
3087
+ }>;
3088
+ }>, Schema.Struct<{
3089
+ readonly method: Schema.Literal<"session.setup.preview">;
3090
+ readonly parameters: Schema.Struct<{
3091
+ readonly commandId: Schema.String;
3092
+ readonly sessionId: Schema.String;
3093
+ }>;
3094
+ }>, Schema.Struct<{
3095
+ readonly method: Schema.Literal<"session.setup.confirm">;
3096
+ readonly parameters: Schema.Struct<{
3097
+ inputDigest: Schema.String;
3098
+ proof: Schema.String;
3099
+ validUntil: Schema.String;
3100
+ commandId: Schema.String;
3101
+ expectedRevision: Schema.String;
3102
+ sessionId: Schema.String;
3103
+ setupDigest: Schema.String;
3104
+ }>;
3105
+ }>, Schema.Struct<{
3106
+ readonly method: Schema.Literal<"session.spawn.preview">;
3107
+ readonly parameters: Schema.Struct<{
3108
+ commandId: Schema.String;
3109
+ executor: Schema.String;
3110
+ hostAuthority: Schema.optional<Schema.Literal<true>>;
3111
+ parent: Schema.Struct<{
3112
+ readonly children: Schema.Struct<{
3113
+ readonly live: Schema.Int;
3114
+ readonly total: Schema.Int;
3115
+ }>;
3116
+ readonly depth: Schema.Int;
3117
+ readonly hostAuthority: Schema.optional<Schema.Literal<true>>;
3118
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
3119
+ readonly role: Schema.Literals<readonly ["orchestrator", "worker"]>;
3120
+ readonly sessionId: Schema.String;
3121
+ }>;
3122
+ permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
3123
+ workspaceId: Schema.String;
3124
+ }>;
3125
+ }>, Schema.Struct<{
3126
+ readonly method: Schema.Literal<"session.spawn.confirm">;
3127
+ readonly parameters: Schema.Struct<{
3128
+ inputDigest: Schema.String;
3129
+ proof: Schema.String;
3130
+ validUntil: Schema.String;
3131
+ commandId: Schema.String;
3132
+ executor: Schema.String;
3133
+ hostAuthority: Schema.optional<Schema.Literal<true>>;
3134
+ parent: Schema.Struct<{
3135
+ readonly children: Schema.Struct<{
3136
+ readonly live: Schema.Int;
3137
+ readonly total: Schema.Int;
3138
+ }>;
3139
+ readonly depth: Schema.Int;
3140
+ readonly hostAuthority: Schema.optional<Schema.Literal<true>>;
3141
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
3142
+ readonly role: Schema.Literals<readonly ["orchestrator", "worker"]>;
3143
+ readonly sessionId: Schema.String;
3144
+ }>;
3145
+ permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
3146
+ workspaceId: Schema.String;
3147
+ expectedRevision: Schema.Literal<"0">;
3148
+ }>;
1433
3149
  }>]>;
1434
3150
  export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Schema.Struct<{
1435
3151
  readonly delivery: Schema.Literals<readonly ["new", "duplicate"]>;
@@ -1441,6 +3157,7 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
1441
3157
  readonly createdAt: Schema.String;
1442
3158
  readonly eventCursor: Schema.String;
1443
3159
  readonly method: Schema.String;
3160
+ readonly proposedBy: Schema.optional<Schema.String>;
1444
3161
  readonly receiptId: Schema.String;
1445
3162
  readonly schemaVersion: Schema.Literal<1>;
1446
3163
  readonly state: Schema.Literal<"succeeded">;
@@ -1459,15 +3176,23 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
1459
3176
  readonly updatedAt: Schema.String;
1460
3177
  readonly workspaceId: Schema.String;
1461
3178
  readonly workspaceRevision: Schema.String;
3179
+ /** What the Session is doing; present on `session.list` and `session.show`. */
3180
+ readonly activity: Schema.optional<Schema.Literals<readonly ["stopped", "waiting_approval", "working", "idle"]>>;
1462
3181
  readonly agentDefinitionRef: Schema.optional<Schema.Struct<{
1463
3182
  readonly contentDigest: Schema.String;
1464
3183
  readonly key: Schema.String;
1465
3184
  readonly version: Schema.String;
1466
3185
  }>>;
3186
+ /**
3187
+ * `none` for a host-authority Session: the vendor harness runs as the
3188
+ * Node's user with no Maia sandbox ([D-198](https://maia-os.vllnt.com/en/docs/decisions#d-198)).
3189
+ * A sandboxed Session carries none.
3190
+ */
3191
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
1467
3192
  readonly executor: Schema.optional<Schema.Struct<{
1468
3193
  readonly connectionId: Schema.String;
1469
3194
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
1470
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
3195
+ readonly kind: Schema.String;
1471
3196
  readonly model: Schema.optional<Schema.String>;
1472
3197
  }>>;
1473
3198
  /** Why the runtime of a failed Session failed, when Maia knows. */
@@ -1475,7 +3200,61 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
1475
3200
  readonly code: Schema.String;
1476
3201
  readonly message: Schema.String;
1477
3202
  }>>;
3203
+ /** The count of board tasks the Session holds now; present on `session.list`, `session.show` and `session.wait`, with `heldTasks`. */
3204
+ readonly heldTaskCount: Schema.optional<Schema.Int>;
3205
+ /**
3206
+ * The board tasks the Session holds now, newest claim first, at most
3207
+ * `MAX_BOARD_HELD_TASKS`; `heldTaskCount` counts every one.
3208
+ */
3209
+ readonly heldTasks: Schema.optional<Schema.$Array<Schema.Struct<{
3210
+ readonly claimedAt: Schema.String;
3211
+ readonly id: Schema.String;
3212
+ readonly leaseExpiresAt: Schema.String;
3213
+ readonly state: Schema.Literal<"claimed">;
3214
+ readonly title: Schema.String;
3215
+ }>>>;
3216
+ /** Set at creation; absent when the Session has no labels. */
3217
+ readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
3218
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
3219
+ readonly latestTurnId: Schema.optional<Schema.String>;
3220
+ /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
3221
+ readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
3222
+ /** The Session that spawned or created this one, fixed at creation; absent for a top-level Session. */
3223
+ readonly parentSessionId: Schema.optional<Schema.String>;
3224
+ /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
3225
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
3226
+ /**
3227
+ * The prompt a `question` or `approval` Session waits on, with its text and
3228
+ * options. `session.list` and `session.show` return it while `status` is
3229
+ * one of the two and never otherwise: a `question` names a question
3230
+ * prompt, an `approval` any other kind. A reader who may not read the
3231
+ * approval (a Session principal listing its Project) gets the status without
3232
+ * it.
3233
+ */
3234
+ readonly prompt: Schema.optional<Schema.Struct<{
3235
+ readonly approvalId: Schema.String;
3236
+ readonly expiresAt: Schema.String;
3237
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
3238
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
3239
+ readonly label: Schema.String;
3240
+ readonly optionId: Schema.String;
3241
+ }>>>;
3242
+ readonly summary: Schema.optional<Schema.String>;
3243
+ }>>;
3244
+ /**
3245
+ * Why a recovering Session stopped retrying: its retries ran out and it waits
3246
+ * for `session.resume` or a Node start. Absent while it still retries and in
3247
+ * every other state.
3248
+ */
3249
+ readonly recovery: Schema.optional<Schema.Struct<{
3250
+ readonly code: Schema.String;
3251
+ readonly message: Schema.String;
3252
+ }>>;
1478
3253
  readonly schemaVersion: Schema.Literal<4>;
3254
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
3255
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
3256
+ /** What the Session is doing; present on `session.list` and `session.show`. */
3257
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "compacting", "rate_limited", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
1479
3258
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
1480
3259
  readonly title: Schema.optional<Schema.String>;
1481
3260
  /** A coding Session's own worktree; a reading Session has none. */
@@ -1526,6 +3305,7 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
1526
3305
  readonly createdAt: Schema.String;
1527
3306
  readonly eventCursor: Schema.String;
1528
3307
  readonly method: Schema.String;
3308
+ readonly proposedBy: Schema.optional<Schema.String>;
1529
3309
  readonly receiptId: Schema.String;
1530
3310
  readonly schemaVersion: Schema.Literal<1>;
1531
3311
  readonly state: Schema.Literal<"succeeded">;
@@ -1584,15 +3364,23 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
1584
3364
  readonly updatedAt: Schema.String;
1585
3365
  readonly workspaceId: Schema.String;
1586
3366
  readonly workspaceRevision: Schema.String;
3367
+ /** What the Session is doing; present on `session.list` and `session.show`. */
3368
+ readonly activity: Schema.optional<Schema.Literals<readonly ["stopped", "waiting_approval", "working", "idle"]>>;
1587
3369
  readonly agentDefinitionRef: Schema.optional<Schema.Struct<{
1588
3370
  readonly contentDigest: Schema.String;
1589
3371
  readonly key: Schema.String;
1590
3372
  readonly version: Schema.String;
1591
3373
  }>>;
3374
+ /**
3375
+ * `none` for a host-authority Session: the vendor harness runs as the
3376
+ * Node's user with no Maia sandbox ([D-198](https://maia-os.vllnt.com/en/docs/decisions#d-198)).
3377
+ * A sandboxed Session carries none.
3378
+ */
3379
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
1592
3380
  readonly executor: Schema.optional<Schema.Struct<{
1593
3381
  readonly connectionId: Schema.String;
1594
3382
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
1595
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
3383
+ readonly kind: Schema.String;
1596
3384
  readonly model: Schema.optional<Schema.String>;
1597
3385
  }>>;
1598
3386
  /** Why the runtime of a failed Session failed, when Maia knows. */
@@ -1600,7 +3388,61 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
1600
3388
  readonly code: Schema.String;
1601
3389
  readonly message: Schema.String;
1602
3390
  }>>;
3391
+ /** The count of board tasks the Session holds now; present on `session.list`, `session.show` and `session.wait`, with `heldTasks`. */
3392
+ readonly heldTaskCount: Schema.optional<Schema.Int>;
3393
+ /**
3394
+ * The board tasks the Session holds now, newest claim first, at most
3395
+ * `MAX_BOARD_HELD_TASKS`; `heldTaskCount` counts every one.
3396
+ */
3397
+ readonly heldTasks: Schema.optional<Schema.$Array<Schema.Struct<{
3398
+ readonly claimedAt: Schema.String;
3399
+ readonly id: Schema.String;
3400
+ readonly leaseExpiresAt: Schema.String;
3401
+ readonly state: Schema.Literal<"claimed">;
3402
+ readonly title: Schema.String;
3403
+ }>>>;
3404
+ /** Set at creation; absent when the Session has no labels. */
3405
+ readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
3406
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
3407
+ readonly latestTurnId: Schema.optional<Schema.String>;
3408
+ /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
3409
+ readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
3410
+ /** The Session that spawned or created this one, fixed at creation; absent for a top-level Session. */
3411
+ readonly parentSessionId: Schema.optional<Schema.String>;
3412
+ /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
3413
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
3414
+ /**
3415
+ * The prompt a `question` or `approval` Session waits on, with its text and
3416
+ * options. `session.list` and `session.show` return it while `status` is
3417
+ * one of the two and never otherwise: a `question` names a question
3418
+ * prompt, an `approval` any other kind. A reader who may not read the
3419
+ * approval (a Session principal listing its Project) gets the status without
3420
+ * it.
3421
+ */
3422
+ readonly prompt: Schema.optional<Schema.Struct<{
3423
+ readonly approvalId: Schema.String;
3424
+ readonly expiresAt: Schema.String;
3425
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
3426
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
3427
+ readonly label: Schema.String;
3428
+ readonly optionId: Schema.String;
3429
+ }>>>;
3430
+ readonly summary: Schema.optional<Schema.String>;
3431
+ }>>;
3432
+ /**
3433
+ * Why a recovering Session stopped retrying: its retries ran out and it waits
3434
+ * for `session.resume` or a Node start. Absent while it still retries and in
3435
+ * every other state.
3436
+ */
3437
+ readonly recovery: Schema.optional<Schema.Struct<{
3438
+ readonly code: Schema.String;
3439
+ readonly message: Schema.String;
3440
+ }>>;
1603
3441
  readonly schemaVersion: Schema.Literal<4>;
3442
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
3443
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
3444
+ /** What the Session is doing; present on `session.list` and `session.show`. */
3445
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "compacting", "rate_limited", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
1604
3446
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
1605
3447
  readonly title: Schema.optional<Schema.String>;
1606
3448
  /** A coding Session's own worktree; a reading Session has none. */
@@ -1641,6 +3483,7 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
1641
3483
  readonly createdAt: Schema.String;
1642
3484
  readonly eventCursor: Schema.String;
1643
3485
  readonly method: Schema.String;
3486
+ readonly proposedBy: Schema.optional<Schema.String>;
1644
3487
  readonly receiptId: Schema.String;
1645
3488
  readonly schemaVersion: Schema.Literal<1>;
1646
3489
  readonly state: Schema.Literal<"succeeded">;
@@ -1669,7 +3512,7 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
1669
3512
  readonly rssBytes: Schema.optional<Schema.Int>;
1670
3513
  readonly wallTimeMilliseconds: Schema.optional<Schema.Int>;
1671
3514
  }>>;
1672
- readonly runtime: Schema.Literals<readonly ["claude-code", "codex-cli", "pi"]>;
3515
+ readonly runtime: Schema.String;
1673
3516
  readonly runtimeThreadId: Schema.String;
1674
3517
  readonly startedAt: Schema.String;
1675
3518
  readonly turn: Schema.optional<Schema.Struct<{
@@ -1686,6 +3529,14 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
1686
3529
  readonly stallAfterSeconds: Schema.Int;
1687
3530
  }>, Schema.Struct<{
1688
3531
  readonly method: Schema.Literal<"session.show">;
3532
+ readonly remoteChildren: Schema.optional<Schema.$Array<Schema.Struct<{
3533
+ readonly linkedAt: Schema.String;
3534
+ readonly node: Schema.String;
3535
+ readonly observedState: Schema.optional<Schema.Literals<readonly ["idle", "starting", "running", "waiting-approval", "interrupted", "recovering", "stopping", "stopped", "failed"]>>;
3536
+ readonly orphanedAt: Schema.optional<Schema.String>;
3537
+ readonly sessionId: Schema.String;
3538
+ readonly state: Schema.Literals<readonly ["linked", "orphaned"]>;
3539
+ }>>>;
1689
3540
  readonly session: Schema.Struct<{
1690
3541
  readonly createdAt: Schema.String;
1691
3542
  readonly id: Schema.String;
@@ -1695,15 +3546,23 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
1695
3546
  readonly updatedAt: Schema.String;
1696
3547
  readonly workspaceId: Schema.String;
1697
3548
  readonly workspaceRevision: Schema.String;
3549
+ /** What the Session is doing; present on `session.list` and `session.show`. */
3550
+ readonly activity: Schema.optional<Schema.Literals<readonly ["stopped", "waiting_approval", "working", "idle"]>>;
1698
3551
  readonly agentDefinitionRef: Schema.optional<Schema.Struct<{
1699
3552
  readonly contentDigest: Schema.String;
1700
3553
  readonly key: Schema.String;
1701
3554
  readonly version: Schema.String;
1702
3555
  }>>;
3556
+ /**
3557
+ * `none` for a host-authority Session: the vendor harness runs as the
3558
+ * Node's user with no Maia sandbox ([D-198](https://maia-os.vllnt.com/en/docs/decisions#d-198)).
3559
+ * A sandboxed Session carries none.
3560
+ */
3561
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
1703
3562
  readonly executor: Schema.optional<Schema.Struct<{
1704
3563
  readonly connectionId: Schema.String;
1705
3564
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
1706
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
3565
+ readonly kind: Schema.String;
1707
3566
  readonly model: Schema.optional<Schema.String>;
1708
3567
  }>>;
1709
3568
  /** Why the runtime of a failed Session failed, when Maia knows. */
@@ -1711,7 +3570,61 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
1711
3570
  readonly code: Schema.String;
1712
3571
  readonly message: Schema.String;
1713
3572
  }>>;
3573
+ /** The count of board tasks the Session holds now; present on `session.list`, `session.show` and `session.wait`, with `heldTasks`. */
3574
+ readonly heldTaskCount: Schema.optional<Schema.Int>;
3575
+ /**
3576
+ * The board tasks the Session holds now, newest claim first, at most
3577
+ * `MAX_BOARD_HELD_TASKS`; `heldTaskCount` counts every one.
3578
+ */
3579
+ readonly heldTasks: Schema.optional<Schema.$Array<Schema.Struct<{
3580
+ readonly claimedAt: Schema.String;
3581
+ readonly id: Schema.String;
3582
+ readonly leaseExpiresAt: Schema.String;
3583
+ readonly state: Schema.Literal<"claimed">;
3584
+ readonly title: Schema.String;
3585
+ }>>>;
3586
+ /** Set at creation; absent when the Session has no labels. */
3587
+ readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
3588
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
3589
+ readonly latestTurnId: Schema.optional<Schema.String>;
3590
+ /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
3591
+ readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
3592
+ /** The Session that spawned or created this one, fixed at creation; absent for a top-level Session. */
3593
+ readonly parentSessionId: Schema.optional<Schema.String>;
3594
+ /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
3595
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
3596
+ /**
3597
+ * The prompt a `question` or `approval` Session waits on, with its text and
3598
+ * options. `session.list` and `session.show` return it while `status` is
3599
+ * one of the two and never otherwise: a `question` names a question
3600
+ * prompt, an `approval` any other kind. A reader who may not read the
3601
+ * approval (a Session principal listing its Project) gets the status without
3602
+ * it.
3603
+ */
3604
+ readonly prompt: Schema.optional<Schema.Struct<{
3605
+ readonly approvalId: Schema.String;
3606
+ readonly expiresAt: Schema.String;
3607
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
3608
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
3609
+ readonly label: Schema.String;
3610
+ readonly optionId: Schema.String;
3611
+ }>>>;
3612
+ readonly summary: Schema.optional<Schema.String>;
3613
+ }>>;
3614
+ /**
3615
+ * Why a recovering Session stopped retrying: its retries ran out and it waits
3616
+ * for `session.resume` or a Node start. Absent while it still retries and in
3617
+ * every other state.
3618
+ */
3619
+ readonly recovery: Schema.optional<Schema.Struct<{
3620
+ readonly code: Schema.String;
3621
+ readonly message: Schema.String;
3622
+ }>>;
1714
3623
  readonly schemaVersion: Schema.Literal<4>;
3624
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
3625
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
3626
+ /** What the Session is doing; present on `session.list` and `session.show`. */
3627
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "compacting", "rate_limited", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
1715
3628
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
1716
3629
  readonly title: Schema.optional<Schema.String>;
1717
3630
  /** A coding Session's own worktree; a reading Session has none. */
@@ -1728,26 +3641,8 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
1728
3641
  }>>;
1729
3642
  }>;
1730
3643
  }>, Schema.Struct<{
1731
- readonly delivery: Schema.Literals<readonly ["new", "duplicate"]>;
1732
- readonly harness: Schema.Literals<readonly ["maia-agent", "pi"]>;
1733
- readonly method: Schema.Literal<"session.spawn">;
1734
- readonly parentSessionId: Schema.String;
1735
- readonly receipt: Schema.Struct<{
1736
- readonly actorId: Schema.String;
1737
- readonly aggregateRevision: Schema.String;
1738
- readonly commandId: Schema.String;
1739
- readonly createdAt: Schema.String;
1740
- readonly eventCursor: Schema.String;
1741
- readonly method: Schema.String;
1742
- readonly receiptId: Schema.String;
1743
- readonly schemaVersion: Schema.Literal<1>;
1744
- readonly state: Schema.Literal<"succeeded">;
1745
- readonly target: Schema.Struct<{
1746
- readonly id: Schema.String;
1747
- readonly type: Schema.String;
1748
- }>;
1749
- readonly updatedAt: Schema.String;
1750
- }>;
3644
+ readonly method: Schema.Literal<"session.wait">;
3645
+ readonly satisfied: Schema.Boolean;
1751
3646
  readonly session: Schema.Struct<{
1752
3647
  readonly createdAt: Schema.String;
1753
3648
  readonly id: Schema.String;
@@ -1757,15 +3652,23 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
1757
3652
  readonly updatedAt: Schema.String;
1758
3653
  readonly workspaceId: Schema.String;
1759
3654
  readonly workspaceRevision: Schema.String;
3655
+ /** What the Session is doing; present on `session.list` and `session.show`. */
3656
+ readonly activity: Schema.optional<Schema.Literals<readonly ["stopped", "waiting_approval", "working", "idle"]>>;
1760
3657
  readonly agentDefinitionRef: Schema.optional<Schema.Struct<{
1761
3658
  readonly contentDigest: Schema.String;
1762
3659
  readonly key: Schema.String;
1763
3660
  readonly version: Schema.String;
1764
3661
  }>>;
3662
+ /**
3663
+ * `none` for a host-authority Session: the vendor harness runs as the
3664
+ * Node's user with no Maia sandbox ([D-198](https://maia-os.vllnt.com/en/docs/decisions#d-198)).
3665
+ * A sandboxed Session carries none.
3666
+ */
3667
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
1765
3668
  readonly executor: Schema.optional<Schema.Struct<{
1766
3669
  readonly connectionId: Schema.String;
1767
3670
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
1768
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
3671
+ readonly kind: Schema.String;
1769
3672
  readonly model: Schema.optional<Schema.String>;
1770
3673
  }>>;
1771
3674
  /** Why the runtime of a failed Session failed, when Maia knows. */
@@ -1773,7 +3676,61 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
1773
3676
  readonly code: Schema.String;
1774
3677
  readonly message: Schema.String;
1775
3678
  }>>;
3679
+ /** The count of board tasks the Session holds now; present on `session.list`, `session.show` and `session.wait`, with `heldTasks`. */
3680
+ readonly heldTaskCount: Schema.optional<Schema.Int>;
3681
+ /**
3682
+ * The board tasks the Session holds now, newest claim first, at most
3683
+ * `MAX_BOARD_HELD_TASKS`; `heldTaskCount` counts every one.
3684
+ */
3685
+ readonly heldTasks: Schema.optional<Schema.$Array<Schema.Struct<{
3686
+ readonly claimedAt: Schema.String;
3687
+ readonly id: Schema.String;
3688
+ readonly leaseExpiresAt: Schema.String;
3689
+ readonly state: Schema.Literal<"claimed">;
3690
+ readonly title: Schema.String;
3691
+ }>>>;
3692
+ /** Set at creation; absent when the Session has no labels. */
3693
+ readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
3694
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
3695
+ readonly latestTurnId: Schema.optional<Schema.String>;
3696
+ /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
3697
+ readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
3698
+ /** The Session that spawned or created this one, fixed at creation; absent for a top-level Session. */
3699
+ readonly parentSessionId: Schema.optional<Schema.String>;
3700
+ /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
3701
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
3702
+ /**
3703
+ * The prompt a `question` or `approval` Session waits on, with its text and
3704
+ * options. `session.list` and `session.show` return it while `status` is
3705
+ * one of the two and never otherwise: a `question` names a question
3706
+ * prompt, an `approval` any other kind. A reader who may not read the
3707
+ * approval (a Session principal listing its Project) gets the status without
3708
+ * it.
3709
+ */
3710
+ readonly prompt: Schema.optional<Schema.Struct<{
3711
+ readonly approvalId: Schema.String;
3712
+ readonly expiresAt: Schema.String;
3713
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
3714
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
3715
+ readonly label: Schema.String;
3716
+ readonly optionId: Schema.String;
3717
+ }>>>;
3718
+ readonly summary: Schema.optional<Schema.String>;
3719
+ }>>;
3720
+ /**
3721
+ * Why a recovering Session stopped retrying: its retries ran out and it waits
3722
+ * for `session.resume` or a Node start. Absent while it still retries and in
3723
+ * every other state.
3724
+ */
3725
+ readonly recovery: Schema.optional<Schema.Struct<{
3726
+ readonly code: Schema.String;
3727
+ readonly message: Schema.String;
3728
+ }>>;
1776
3729
  readonly schemaVersion: Schema.Literal<4>;
3730
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
3731
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
3732
+ /** What the Session is doing; present on `session.list` and `session.show`. */
3733
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "compacting", "rate_limited", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
1777
3734
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
1778
3735
  readonly title: Schema.optional<Schema.String>;
1779
3736
  /** A coding Session's own worktree; a reading Session has none. */
@@ -1806,13 +3763,21 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
1806
3763
  readonly key: Schema.String;
1807
3764
  readonly version: Schema.String;
1808
3765
  }>>;
3766
+ /** The actor that opted a host-authority Session out of the sandbox. */
3767
+ readonly authorizedBy: Schema.optional<Schema.String>;
3768
+ /** `none` when the Session runs with host authority. */
3769
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
3770
+ /** Where a host-authority Session starts, as the caller asked. */
3771
+ readonly cwd: Schema.optional<Schema.String>;
1809
3772
  /** The account the Session binds to, named or picked by the Node. */
1810
3773
  readonly executor: Schema.optional<Schema.Struct<{
1811
3774
  readonly connectionId: Schema.String;
1812
3775
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
1813
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
3776
+ readonly kind: Schema.String;
1814
3777
  readonly model: Schema.optional<Schema.String>;
1815
3778
  }>>;
3779
+ /** The permission mode a host-authority Session passes to its vendor CLI. */
3780
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
1816
3781
  readonly projectId: Schema.String;
1817
3782
  readonly workspaceId: Schema.String;
1818
3783
  readonly workspaceRevision: Schema.String;
@@ -1856,6 +3821,20 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
1856
3821
  readonly schemaVersion: Schema.Literal<4>;
1857
3822
  readonly sessionCursor: Schema.String;
1858
3823
  readonly sessionId: Schema.String;
3824
+ }>, Schema.Struct<{
3825
+ readonly commandId: Schema.String;
3826
+ readonly eventType: Schema.Literal<"session.runtime.recovery.updated">;
3827
+ readonly globalCursor: Schema.String;
3828
+ readonly payload: Schema.Struct<{
3829
+ readonly recovery: Schema.optional<Schema.Struct<{
3830
+ readonly code: Schema.String;
3831
+ readonly message: Schema.String;
3832
+ }>>;
3833
+ }>;
3834
+ readonly recordedAt: Schema.String;
3835
+ readonly schemaVersion: Schema.Literal<4>;
3836
+ readonly sessionCursor: Schema.String;
3837
+ readonly sessionId: Schema.String;
1859
3838
  }>, Schema.Struct<{
1860
3839
  readonly commandId: Schema.String;
1861
3840
  readonly eventType: Schema.Literal<"session.runtime.resumed">;
@@ -1977,41 +3956,452 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
1977
3956
  readonly globalCursor: Schema.String;
1978
3957
  readonly recordedAt: Schema.String;
1979
3958
  readonly schemaVersion: Schema.Literal<4>;
1980
- readonly sessionCursor: Schema.String;
1981
- readonly sessionId: Schema.String;
1982
- readonly eventType: Schema.Literal<"turn.completed">;
1983
- readonly payload: Schema.Struct<{
1984
- readonly turnId: Schema.String;
1985
- }>;
1986
- }>, Schema.Struct<{
3959
+ readonly sessionCursor: Schema.String;
3960
+ readonly sessionId: Schema.String;
3961
+ readonly eventType: Schema.Literal<"turn.completed">;
3962
+ readonly payload: Schema.Struct<{
3963
+ readonly turnId: Schema.String;
3964
+ }>;
3965
+ }>, Schema.Struct<{
3966
+ readonly commandId: Schema.String;
3967
+ readonly globalCursor: Schema.String;
3968
+ readonly recordedAt: Schema.String;
3969
+ readonly schemaVersion: Schema.Literal<4>;
3970
+ readonly sessionCursor: Schema.String;
3971
+ readonly sessionId: Schema.String;
3972
+ readonly eventType: Schema.Literal<"turn.interrupted">;
3973
+ readonly payload: Schema.Struct<{
3974
+ readonly turnId: Schema.String;
3975
+ }>;
3976
+ }>, Schema.Struct<{
3977
+ readonly commandId: Schema.String;
3978
+ readonly globalCursor: Schema.String;
3979
+ readonly recordedAt: Schema.String;
3980
+ readonly schemaVersion: Schema.Literal<4>;
3981
+ readonly sessionCursor: Schema.String;
3982
+ readonly sessionId: Schema.String;
3983
+ readonly eventType: Schema.Literal<"turn.failed">;
3984
+ readonly payload: Schema.Struct<{
3985
+ readonly turnId: Schema.String;
3986
+ }>;
3987
+ }>]>]>>;
3988
+ readonly method: Schema.Literal<"session.events.list">;
3989
+ readonly nextSessionCursor: Schema.optional<Schema.String>;
3990
+ /** Set when a prune removed events after the caller's cursor. Send `nextSessionCursor` as `afterSessionCursor`; with none, send the last item's cursor. On an empty page keep the cursor you sent, and send "0" if you have none. Never send this marker. */
3991
+ readonly oldestRetainedCursor: Schema.optional<Schema.String>;
3992
+ readonly sessionId: Schema.String;
3993
+ }>, Schema.Struct<{
3994
+ readonly delivery: Schema.Literals<readonly ["new", "duplicate"]>;
3995
+ readonly method: Schema.Literal<"session.start">;
3996
+ readonly receipt: Schema.Struct<{
3997
+ readonly actorId: Schema.String;
3998
+ readonly aggregateRevision: Schema.String;
3999
+ readonly commandId: Schema.String;
4000
+ readonly createdAt: Schema.String;
4001
+ readonly eventCursor: Schema.String;
4002
+ readonly method: Schema.String;
4003
+ readonly proposedBy: Schema.optional<Schema.String>;
4004
+ readonly receiptId: Schema.String;
4005
+ readonly schemaVersion: Schema.Literal<1>;
4006
+ readonly state: Schema.Literal<"succeeded">;
4007
+ readonly target: Schema.Struct<{
4008
+ readonly id: Schema.String;
4009
+ readonly type: Schema.String;
4010
+ }>;
4011
+ readonly updatedAt: Schema.String;
4012
+ }>;
4013
+ readonly session: Schema.Struct<{
4014
+ readonly createdAt: Schema.String;
4015
+ readonly id: Schema.String;
4016
+ readonly projectId: Schema.String;
4017
+ readonly revision: Schema.String;
4018
+ readonly state: Schema.Literals<readonly ["idle", "starting", "running", "waiting-approval", "interrupted", "recovering", "stopping", "stopped", "failed"]>;
4019
+ readonly updatedAt: Schema.String;
4020
+ readonly workspaceId: Schema.String;
4021
+ readonly workspaceRevision: Schema.String;
4022
+ /** What the Session is doing; present on `session.list` and `session.show`. */
4023
+ readonly activity: Schema.optional<Schema.Literals<readonly ["stopped", "waiting_approval", "working", "idle"]>>;
4024
+ readonly agentDefinitionRef: Schema.optional<Schema.Struct<{
4025
+ readonly contentDigest: Schema.String;
4026
+ readonly key: Schema.String;
4027
+ readonly version: Schema.String;
4028
+ }>>;
4029
+ /**
4030
+ * `none` for a host-authority Session: the vendor harness runs as the
4031
+ * Node's user with no Maia sandbox ([D-198](https://maia-os.vllnt.com/en/docs/decisions#d-198)).
4032
+ * A sandboxed Session carries none.
4033
+ */
4034
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
4035
+ readonly executor: Schema.optional<Schema.Struct<{
4036
+ readonly connectionId: Schema.String;
4037
+ readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
4038
+ readonly kind: Schema.String;
4039
+ readonly model: Schema.optional<Schema.String>;
4040
+ }>>;
4041
+ /** Why the runtime of a failed Session failed, when Maia knows. */
4042
+ readonly failure: Schema.optional<Schema.Struct<{
4043
+ readonly code: Schema.String;
4044
+ readonly message: Schema.String;
4045
+ }>>;
4046
+ /** The count of board tasks the Session holds now; present on `session.list`, `session.show` and `session.wait`, with `heldTasks`. */
4047
+ readonly heldTaskCount: Schema.optional<Schema.Int>;
4048
+ /**
4049
+ * The board tasks the Session holds now, newest claim first, at most
4050
+ * `MAX_BOARD_HELD_TASKS`; `heldTaskCount` counts every one.
4051
+ */
4052
+ readonly heldTasks: Schema.optional<Schema.$Array<Schema.Struct<{
4053
+ readonly claimedAt: Schema.String;
4054
+ readonly id: Schema.String;
4055
+ readonly leaseExpiresAt: Schema.String;
4056
+ readonly state: Schema.Literal<"claimed">;
4057
+ readonly title: Schema.String;
4058
+ }>>>;
4059
+ /** Set at creation; absent when the Session has no labels. */
4060
+ readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
4061
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
4062
+ readonly latestTurnId: Schema.optional<Schema.String>;
4063
+ /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
4064
+ readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
4065
+ /** The Session that spawned or created this one, fixed at creation; absent for a top-level Session. */
4066
+ readonly parentSessionId: Schema.optional<Schema.String>;
4067
+ /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
4068
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
4069
+ /**
4070
+ * The prompt a `question` or `approval` Session waits on, with its text and
4071
+ * options. `session.list` and `session.show` return it while `status` is
4072
+ * one of the two and never otherwise: a `question` names a question
4073
+ * prompt, an `approval` any other kind. A reader who may not read the
4074
+ * approval (a Session principal listing its Project) gets the status without
4075
+ * it.
4076
+ */
4077
+ readonly prompt: Schema.optional<Schema.Struct<{
4078
+ readonly approvalId: Schema.String;
4079
+ readonly expiresAt: Schema.String;
4080
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
4081
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
4082
+ readonly label: Schema.String;
4083
+ readonly optionId: Schema.String;
4084
+ }>>>;
4085
+ readonly summary: Schema.optional<Schema.String>;
4086
+ }>>;
4087
+ /**
4088
+ * Why a recovering Session stopped retrying: its retries ran out and it waits
4089
+ * for `session.resume` or a Node start. Absent while it still retries and in
4090
+ * every other state.
4091
+ */
4092
+ readonly recovery: Schema.optional<Schema.Struct<{
4093
+ readonly code: Schema.String;
4094
+ readonly message: Schema.String;
4095
+ }>>;
4096
+ readonly schemaVersion: Schema.Literal<4>;
4097
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
4098
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
4099
+ /** What the Session is doing; present on `session.list` and `session.show`. */
4100
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "compacting", "rate_limited", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
4101
+ /** Set at creation or by a rename; otherwise the first line of the first turn. */
4102
+ readonly title: Schema.optional<Schema.String>;
4103
+ /** A coding Session's own worktree; a reading Session has none. */
4104
+ readonly worktree: Schema.optional<Schema.Struct<{
4105
+ readonly baseRef: Schema.String;
4106
+ readonly baseRevision: Schema.String;
4107
+ readonly branch: Schema.String;
4108
+ readonly setup: Schema.Literals<readonly ["none", "pending", "succeeded", "failed"]>;
4109
+ readonly skills: Schema.optional<Schema.$Array<Schema.Struct<{
4110
+ readonly digest: Schema.String;
4111
+ readonly name: Schema.String;
4112
+ }>>>;
4113
+ readonly state: Schema.Literals<readonly ["active", "archived", "removed"]>;
4114
+ }>>;
4115
+ }>;
4116
+ }>, Schema.Struct<{
4117
+ readonly delivery: Schema.Literals<readonly ["new", "duplicate"]>;
4118
+ readonly method: Schema.Literal<"session.stop">;
4119
+ readonly receipt: Schema.Struct<{
4120
+ readonly actorId: Schema.String;
4121
+ readonly aggregateRevision: Schema.String;
4122
+ readonly commandId: Schema.String;
4123
+ readonly createdAt: Schema.String;
4124
+ readonly eventCursor: Schema.String;
4125
+ readonly method: Schema.String;
4126
+ readonly proposedBy: Schema.optional<Schema.String>;
4127
+ readonly receiptId: Schema.String;
4128
+ readonly schemaVersion: Schema.Literal<1>;
4129
+ readonly state: Schema.Literal<"succeeded">;
4130
+ readonly target: Schema.Struct<{
4131
+ readonly id: Schema.String;
4132
+ readonly type: Schema.String;
4133
+ }>;
4134
+ readonly updatedAt: Schema.String;
4135
+ }>;
4136
+ readonly session: Schema.Struct<{
4137
+ readonly createdAt: Schema.String;
4138
+ readonly id: Schema.String;
4139
+ readonly projectId: Schema.String;
4140
+ readonly revision: Schema.String;
4141
+ readonly state: Schema.Literals<readonly ["idle", "starting", "running", "waiting-approval", "interrupted", "recovering", "stopping", "stopped", "failed"]>;
4142
+ readonly updatedAt: Schema.String;
4143
+ readonly workspaceId: Schema.String;
4144
+ readonly workspaceRevision: Schema.String;
4145
+ /** What the Session is doing; present on `session.list` and `session.show`. */
4146
+ readonly activity: Schema.optional<Schema.Literals<readonly ["stopped", "waiting_approval", "working", "idle"]>>;
4147
+ readonly agentDefinitionRef: Schema.optional<Schema.Struct<{
4148
+ readonly contentDigest: Schema.String;
4149
+ readonly key: Schema.String;
4150
+ readonly version: Schema.String;
4151
+ }>>;
4152
+ /**
4153
+ * `none` for a host-authority Session: the vendor harness runs as the
4154
+ * Node's user with no Maia sandbox ([D-198](https://maia-os.vllnt.com/en/docs/decisions#d-198)).
4155
+ * A sandboxed Session carries none.
4156
+ */
4157
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
4158
+ readonly executor: Schema.optional<Schema.Struct<{
4159
+ readonly connectionId: Schema.String;
4160
+ readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
4161
+ readonly kind: Schema.String;
4162
+ readonly model: Schema.optional<Schema.String>;
4163
+ }>>;
4164
+ /** Why the runtime of a failed Session failed, when Maia knows. */
4165
+ readonly failure: Schema.optional<Schema.Struct<{
4166
+ readonly code: Schema.String;
4167
+ readonly message: Schema.String;
4168
+ }>>;
4169
+ /** The count of board tasks the Session holds now; present on `session.list`, `session.show` and `session.wait`, with `heldTasks`. */
4170
+ readonly heldTaskCount: Schema.optional<Schema.Int>;
4171
+ /**
4172
+ * The board tasks the Session holds now, newest claim first, at most
4173
+ * `MAX_BOARD_HELD_TASKS`; `heldTaskCount` counts every one.
4174
+ */
4175
+ readonly heldTasks: Schema.optional<Schema.$Array<Schema.Struct<{
4176
+ readonly claimedAt: Schema.String;
4177
+ readonly id: Schema.String;
4178
+ readonly leaseExpiresAt: Schema.String;
4179
+ readonly state: Schema.Literal<"claimed">;
4180
+ readonly title: Schema.String;
4181
+ }>>>;
4182
+ /** Set at creation; absent when the Session has no labels. */
4183
+ readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
4184
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
4185
+ readonly latestTurnId: Schema.optional<Schema.String>;
4186
+ /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
4187
+ readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
4188
+ /** The Session that spawned or created this one, fixed at creation; absent for a top-level Session. */
4189
+ readonly parentSessionId: Schema.optional<Schema.String>;
4190
+ /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
4191
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
4192
+ /**
4193
+ * The prompt a `question` or `approval` Session waits on, with its text and
4194
+ * options. `session.list` and `session.show` return it while `status` is
4195
+ * one of the two and never otherwise: a `question` names a question
4196
+ * prompt, an `approval` any other kind. A reader who may not read the
4197
+ * approval (a Session principal listing its Project) gets the status without
4198
+ * it.
4199
+ */
4200
+ readonly prompt: Schema.optional<Schema.Struct<{
4201
+ readonly approvalId: Schema.String;
4202
+ readonly expiresAt: Schema.String;
4203
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
4204
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
4205
+ readonly label: Schema.String;
4206
+ readonly optionId: Schema.String;
4207
+ }>>>;
4208
+ readonly summary: Schema.optional<Schema.String>;
4209
+ }>>;
4210
+ /**
4211
+ * Why a recovering Session stopped retrying: its retries ran out and it waits
4212
+ * for `session.resume` or a Node start. Absent while it still retries and in
4213
+ * every other state.
4214
+ */
4215
+ readonly recovery: Schema.optional<Schema.Struct<{
4216
+ readonly code: Schema.String;
4217
+ readonly message: Schema.String;
4218
+ }>>;
4219
+ readonly schemaVersion: Schema.Literal<4>;
4220
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
4221
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
4222
+ /** What the Session is doing; present on `session.list` and `session.show`. */
4223
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "compacting", "rate_limited", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
4224
+ /** Set at creation or by a rename; otherwise the first line of the first turn. */
4225
+ readonly title: Schema.optional<Schema.String>;
4226
+ /** A coding Session's own worktree; a reading Session has none. */
4227
+ readonly worktree: Schema.optional<Schema.Struct<{
4228
+ readonly baseRef: Schema.String;
4229
+ readonly baseRevision: Schema.String;
4230
+ readonly branch: Schema.String;
4231
+ readonly setup: Schema.Literals<readonly ["none", "pending", "succeeded", "failed"]>;
4232
+ readonly skills: Schema.optional<Schema.$Array<Schema.Struct<{
4233
+ readonly digest: Schema.String;
4234
+ readonly name: Schema.String;
4235
+ }>>>;
4236
+ readonly state: Schema.Literals<readonly ["active", "archived", "removed"]>;
4237
+ }>>;
4238
+ }>;
4239
+ }>, Schema.Struct<{
4240
+ readonly delivery: Schema.Literals<readonly ["new", "duplicate"]>;
4241
+ readonly method: Schema.Literal<"session.resume">;
4242
+ readonly receipt: Schema.Struct<{
4243
+ readonly actorId: Schema.String;
4244
+ readonly aggregateRevision: Schema.String;
1987
4245
  readonly commandId: Schema.String;
1988
- readonly globalCursor: Schema.String;
1989
- readonly recordedAt: Schema.String;
1990
- readonly schemaVersion: Schema.Literal<4>;
1991
- readonly sessionCursor: Schema.String;
1992
- readonly sessionId: Schema.String;
1993
- readonly eventType: Schema.Literal<"turn.interrupted">;
1994
- readonly payload: Schema.Struct<{
1995
- readonly turnId: Schema.String;
4246
+ readonly createdAt: Schema.String;
4247
+ readonly eventCursor: Schema.String;
4248
+ readonly method: Schema.String;
4249
+ readonly proposedBy: Schema.optional<Schema.String>;
4250
+ readonly receiptId: Schema.String;
4251
+ readonly schemaVersion: Schema.Literal<1>;
4252
+ readonly state: Schema.Literal<"succeeded">;
4253
+ readonly target: Schema.Struct<{
4254
+ readonly id: Schema.String;
4255
+ readonly type: Schema.String;
1996
4256
  }>;
1997
- }>, Schema.Struct<{
1998
- readonly commandId: Schema.String;
1999
- readonly globalCursor: Schema.String;
2000
- readonly recordedAt: Schema.String;
4257
+ readonly updatedAt: Schema.String;
4258
+ }>;
4259
+ readonly session: Schema.Struct<{
4260
+ readonly createdAt: Schema.String;
4261
+ readonly id: Schema.String;
4262
+ readonly projectId: Schema.String;
4263
+ readonly revision: Schema.String;
4264
+ readonly state: Schema.Literals<readonly ["idle", "starting", "running", "waiting-approval", "interrupted", "recovering", "stopping", "stopped", "failed"]>;
4265
+ readonly updatedAt: Schema.String;
4266
+ readonly workspaceId: Schema.String;
4267
+ readonly workspaceRevision: Schema.String;
4268
+ /** What the Session is doing; present on `session.list` and `session.show`. */
4269
+ readonly activity: Schema.optional<Schema.Literals<readonly ["stopped", "waiting_approval", "working", "idle"]>>;
4270
+ readonly agentDefinitionRef: Schema.optional<Schema.Struct<{
4271
+ readonly contentDigest: Schema.String;
4272
+ readonly key: Schema.String;
4273
+ readonly version: Schema.String;
4274
+ }>>;
4275
+ /**
4276
+ * `none` for a host-authority Session: the vendor harness runs as the
4277
+ * Node's user with no Maia sandbox ([D-198](https://maia-os.vllnt.com/en/docs/decisions#d-198)).
4278
+ * A sandboxed Session carries none.
4279
+ */
4280
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
4281
+ readonly executor: Schema.optional<Schema.Struct<{
4282
+ readonly connectionId: Schema.String;
4283
+ readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
4284
+ readonly kind: Schema.String;
4285
+ readonly model: Schema.optional<Schema.String>;
4286
+ }>>;
4287
+ /** Why the runtime of a failed Session failed, when Maia knows. */
4288
+ readonly failure: Schema.optional<Schema.Struct<{
4289
+ readonly code: Schema.String;
4290
+ readonly message: Schema.String;
4291
+ }>>;
4292
+ /** The count of board tasks the Session holds now; present on `session.list`, `session.show` and `session.wait`, with `heldTasks`. */
4293
+ readonly heldTaskCount: Schema.optional<Schema.Int>;
4294
+ /**
4295
+ * The board tasks the Session holds now, newest claim first, at most
4296
+ * `MAX_BOARD_HELD_TASKS`; `heldTaskCount` counts every one.
4297
+ */
4298
+ readonly heldTasks: Schema.optional<Schema.$Array<Schema.Struct<{
4299
+ readonly claimedAt: Schema.String;
4300
+ readonly id: Schema.String;
4301
+ readonly leaseExpiresAt: Schema.String;
4302
+ readonly state: Schema.Literal<"claimed">;
4303
+ readonly title: Schema.String;
4304
+ }>>>;
4305
+ /** Set at creation; absent when the Session has no labels. */
4306
+ readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
4307
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
4308
+ readonly latestTurnId: Schema.optional<Schema.String>;
4309
+ /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
4310
+ readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
4311
+ /** The Session that spawned or created this one, fixed at creation; absent for a top-level Session. */
4312
+ readonly parentSessionId: Schema.optional<Schema.String>;
4313
+ /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
4314
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
4315
+ /**
4316
+ * The prompt a `question` or `approval` Session waits on, with its text and
4317
+ * options. `session.list` and `session.show` return it while `status` is
4318
+ * one of the two and never otherwise: a `question` names a question
4319
+ * prompt, an `approval` any other kind. A reader who may not read the
4320
+ * approval (a Session principal listing its Project) gets the status without
4321
+ * it.
4322
+ */
4323
+ readonly prompt: Schema.optional<Schema.Struct<{
4324
+ readonly approvalId: Schema.String;
4325
+ readonly expiresAt: Schema.String;
4326
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
4327
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
4328
+ readonly label: Schema.String;
4329
+ readonly optionId: Schema.String;
4330
+ }>>>;
4331
+ readonly summary: Schema.optional<Schema.String>;
4332
+ }>>;
4333
+ /**
4334
+ * Why a recovering Session stopped retrying: its retries ran out and it waits
4335
+ * for `session.resume` or a Node start. Absent while it still retries and in
4336
+ * every other state.
4337
+ */
4338
+ readonly recovery: Schema.optional<Schema.Struct<{
4339
+ readonly code: Schema.String;
4340
+ readonly message: Schema.String;
4341
+ }>>;
2001
4342
  readonly schemaVersion: Schema.Literal<4>;
2002
- readonly sessionCursor: Schema.String;
2003
- readonly sessionId: Schema.String;
2004
- readonly eventType: Schema.Literal<"turn.failed">;
2005
- readonly payload: Schema.Struct<{
2006
- readonly turnId: Schema.String;
2007
- }>;
2008
- }>]>]>>;
2009
- readonly method: Schema.Literal<"session.events.list">;
2010
- readonly nextSessionCursor: Schema.optional<Schema.String>;
4343
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
4344
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
4345
+ /** What the Session is doing; present on `session.list` and `session.show`. */
4346
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "compacting", "rate_limited", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
4347
+ /** Set at creation or by a rename; otherwise the first line of the first turn. */
4348
+ readonly title: Schema.optional<Schema.String>;
4349
+ /** A coding Session's own worktree; a reading Session has none. */
4350
+ readonly worktree: Schema.optional<Schema.Struct<{
4351
+ readonly baseRef: Schema.String;
4352
+ readonly baseRevision: Schema.String;
4353
+ readonly branch: Schema.String;
4354
+ readonly setup: Schema.Literals<readonly ["none", "pending", "succeeded", "failed"]>;
4355
+ readonly skills: Schema.optional<Schema.$Array<Schema.Struct<{
4356
+ readonly digest: Schema.String;
4357
+ readonly name: Schema.String;
4358
+ }>>>;
4359
+ readonly state: Schema.Literals<readonly ["active", "archived", "removed"]>;
4360
+ }>>;
4361
+ }>;
4362
+ }>, Schema.Struct<{
4363
+ readonly baseRevision: Schema.String;
4364
+ readonly branch: Schema.String;
4365
+ readonly deletions: Schema.Int;
4366
+ readonly files: Schema.$Array<Schema.Struct<{
4367
+ readonly deletions: Schema.optional<Schema.Int>;
4368
+ readonly insertions: Schema.optional<Schema.Int>;
4369
+ readonly path: Schema.String;
4370
+ readonly previousPath: Schema.optional<Schema.String>;
4371
+ readonly status: Schema.Literals<readonly ["added", "copied", "deleted", "modified", "renamed", "type_changed"]>;
4372
+ }>>;
4373
+ readonly insertions: Schema.Int;
4374
+ readonly method: Schema.Literal<"session.diff">;
4375
+ readonly patch: Schema.optional<Schema.String>;
4376
+ readonly patchTruncated: Schema.optional<Schema.Literal<true>>;
4377
+ readonly sessionId: Schema.String;
4378
+ readonly totalFiles: Schema.Int;
4379
+ }>, Schema.Struct<{
4380
+ readonly ahead: Schema.optional<Schema.Int>;
4381
+ readonly baseRef: Schema.String;
4382
+ readonly baseRevision: Schema.optional<Schema.String>;
4383
+ readonly behind: Schema.optional<Schema.Int>;
4384
+ readonly branch: Schema.optional<Schema.String>;
4385
+ readonly changedFiles: Schema.Int;
4386
+ readonly dirty: Schema.Boolean;
4387
+ readonly headRevision: Schema.String;
4388
+ readonly method: Schema.Literal<"session.git.status">;
4389
+ readonly observedAt: Schema.String;
2011
4390
  readonly sessionId: Schema.String;
4391
+ readonly upstream: Schema.optional<Schema.Struct<{
4392
+ readonly ahead: Schema.optional<Schema.Int>;
4393
+ readonly behind: Schema.optional<Schema.Int>;
4394
+ readonly name: Schema.String;
4395
+ }>>;
2012
4396
  }>, Schema.Struct<{
4397
+ readonly archive: Schema.optional<Schema.Struct<{
4398
+ readonly branch: Schema.String;
4399
+ readonly branchRevision: Schema.String;
4400
+ readonly pruneAfter: Schema.String;
4401
+ readonly snapshot: Schema.Literals<readonly ["clean", "committed"]>;
4402
+ }>>;
2013
4403
  readonly delivery: Schema.Literals<readonly ["new", "duplicate"]>;
2014
- readonly method: Schema.Literal<"session.start">;
4404
+ readonly method: Schema.Literal<"session.archive">;
2015
4405
  readonly receipt: Schema.Struct<{
2016
4406
  readonly actorId: Schema.String;
2017
4407
  readonly aggregateRevision: Schema.String;
@@ -2019,6 +4409,7 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2019
4409
  readonly createdAt: Schema.String;
2020
4410
  readonly eventCursor: Schema.String;
2021
4411
  readonly method: Schema.String;
4412
+ readonly proposedBy: Schema.optional<Schema.String>;
2022
4413
  readonly receiptId: Schema.String;
2023
4414
  readonly schemaVersion: Schema.Literal<1>;
2024
4415
  readonly state: Schema.Literal<"succeeded">;
@@ -2037,15 +4428,23 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2037
4428
  readonly updatedAt: Schema.String;
2038
4429
  readonly workspaceId: Schema.String;
2039
4430
  readonly workspaceRevision: Schema.String;
4431
+ /** What the Session is doing; present on `session.list` and `session.show`. */
4432
+ readonly activity: Schema.optional<Schema.Literals<readonly ["stopped", "waiting_approval", "working", "idle"]>>;
2040
4433
  readonly agentDefinitionRef: Schema.optional<Schema.Struct<{
2041
4434
  readonly contentDigest: Schema.String;
2042
4435
  readonly key: Schema.String;
2043
4436
  readonly version: Schema.String;
2044
4437
  }>>;
4438
+ /**
4439
+ * `none` for a host-authority Session: the vendor harness runs as the
4440
+ * Node's user with no Maia sandbox ([D-198](https://maia-os.vllnt.com/en/docs/decisions#d-198)).
4441
+ * A sandboxed Session carries none.
4442
+ */
4443
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
2045
4444
  readonly executor: Schema.optional<Schema.Struct<{
2046
4445
  readonly connectionId: Schema.String;
2047
4446
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
2048
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
4447
+ readonly kind: Schema.String;
2049
4448
  readonly model: Schema.optional<Schema.String>;
2050
4449
  }>>;
2051
4450
  /** Why the runtime of a failed Session failed, when Maia knows. */
@@ -2053,7 +4452,61 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2053
4452
  readonly code: Schema.String;
2054
4453
  readonly message: Schema.String;
2055
4454
  }>>;
4455
+ /** The count of board tasks the Session holds now; present on `session.list`, `session.show` and `session.wait`, with `heldTasks`. */
4456
+ readonly heldTaskCount: Schema.optional<Schema.Int>;
4457
+ /**
4458
+ * The board tasks the Session holds now, newest claim first, at most
4459
+ * `MAX_BOARD_HELD_TASKS`; `heldTaskCount` counts every one.
4460
+ */
4461
+ readonly heldTasks: Schema.optional<Schema.$Array<Schema.Struct<{
4462
+ readonly claimedAt: Schema.String;
4463
+ readonly id: Schema.String;
4464
+ readonly leaseExpiresAt: Schema.String;
4465
+ readonly state: Schema.Literal<"claimed">;
4466
+ readonly title: Schema.String;
4467
+ }>>>;
4468
+ /** Set at creation; absent when the Session has no labels. */
4469
+ readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
4470
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
4471
+ readonly latestTurnId: Schema.optional<Schema.String>;
4472
+ /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
4473
+ readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
4474
+ /** The Session that spawned or created this one, fixed at creation; absent for a top-level Session. */
4475
+ readonly parentSessionId: Schema.optional<Schema.String>;
4476
+ /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
4477
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
4478
+ /**
4479
+ * The prompt a `question` or `approval` Session waits on, with its text and
4480
+ * options. `session.list` and `session.show` return it while `status` is
4481
+ * one of the two and never otherwise: a `question` names a question
4482
+ * prompt, an `approval` any other kind. A reader who may not read the
4483
+ * approval (a Session principal listing its Project) gets the status without
4484
+ * it.
4485
+ */
4486
+ readonly prompt: Schema.optional<Schema.Struct<{
4487
+ readonly approvalId: Schema.String;
4488
+ readonly expiresAt: Schema.String;
4489
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
4490
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
4491
+ readonly label: Schema.String;
4492
+ readonly optionId: Schema.String;
4493
+ }>>>;
4494
+ readonly summary: Schema.optional<Schema.String>;
4495
+ }>>;
4496
+ /**
4497
+ * Why a recovering Session stopped retrying: its retries ran out and it waits
4498
+ * for `session.resume` or a Node start. Absent while it still retries and in
4499
+ * every other state.
4500
+ */
4501
+ readonly recovery: Schema.optional<Schema.Struct<{
4502
+ readonly code: Schema.String;
4503
+ readonly message: Schema.String;
4504
+ }>>;
2056
4505
  readonly schemaVersion: Schema.Literal<4>;
4506
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
4507
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
4508
+ /** What the Session is doing; present on `session.list` and `session.show`. */
4509
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "compacting", "rate_limited", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
2057
4510
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
2058
4511
  readonly title: Schema.optional<Schema.String>;
2059
4512
  /** A coding Session's own worktree; a reading Session has none. */
@@ -2069,9 +4522,12 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2069
4522
  readonly state: Schema.Literals<readonly ["active", "archived", "removed"]>;
2070
4523
  }>>;
2071
4524
  }>;
4525
+ /** The caller's summary and transcript path, as the archive recorded them. */
4526
+ readonly summary: Schema.optional<Schema.String>;
4527
+ readonly transcriptPath: Schema.optional<Schema.String>;
2072
4528
  }>, Schema.Struct<{
2073
4529
  readonly delivery: Schema.Literals<readonly ["new", "duplicate"]>;
2074
- readonly method: Schema.Literal<"session.stop">;
4530
+ readonly method: Schema.Literal<"session.rename">;
2075
4531
  readonly receipt: Schema.Struct<{
2076
4532
  readonly actorId: Schema.String;
2077
4533
  readonly aggregateRevision: Schema.String;
@@ -2079,6 +4535,7 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2079
4535
  readonly createdAt: Schema.String;
2080
4536
  readonly eventCursor: Schema.String;
2081
4537
  readonly method: Schema.String;
4538
+ readonly proposedBy: Schema.optional<Schema.String>;
2082
4539
  readonly receiptId: Schema.String;
2083
4540
  readonly schemaVersion: Schema.Literal<1>;
2084
4541
  readonly state: Schema.Literal<"succeeded">;
@@ -2097,15 +4554,23 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2097
4554
  readonly updatedAt: Schema.String;
2098
4555
  readonly workspaceId: Schema.String;
2099
4556
  readonly workspaceRevision: Schema.String;
4557
+ /** What the Session is doing; present on `session.list` and `session.show`. */
4558
+ readonly activity: Schema.optional<Schema.Literals<readonly ["stopped", "waiting_approval", "working", "idle"]>>;
2100
4559
  readonly agentDefinitionRef: Schema.optional<Schema.Struct<{
2101
4560
  readonly contentDigest: Schema.String;
2102
4561
  readonly key: Schema.String;
2103
4562
  readonly version: Schema.String;
2104
4563
  }>>;
4564
+ /**
4565
+ * `none` for a host-authority Session: the vendor harness runs as the
4566
+ * Node's user with no Maia sandbox ([D-198](https://maia-os.vllnt.com/en/docs/decisions#d-198)).
4567
+ * A sandboxed Session carries none.
4568
+ */
4569
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
2105
4570
  readonly executor: Schema.optional<Schema.Struct<{
2106
4571
  readonly connectionId: Schema.String;
2107
4572
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
2108
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
4573
+ readonly kind: Schema.String;
2109
4574
  readonly model: Schema.optional<Schema.String>;
2110
4575
  }>>;
2111
4576
  /** Why the runtime of a failed Session failed, when Maia knows. */
@@ -2113,7 +4578,61 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2113
4578
  readonly code: Schema.String;
2114
4579
  readonly message: Schema.String;
2115
4580
  }>>;
4581
+ /** The count of board tasks the Session holds now; present on `session.list`, `session.show` and `session.wait`, with `heldTasks`. */
4582
+ readonly heldTaskCount: Schema.optional<Schema.Int>;
4583
+ /**
4584
+ * The board tasks the Session holds now, newest claim first, at most
4585
+ * `MAX_BOARD_HELD_TASKS`; `heldTaskCount` counts every one.
4586
+ */
4587
+ readonly heldTasks: Schema.optional<Schema.$Array<Schema.Struct<{
4588
+ readonly claimedAt: Schema.String;
4589
+ readonly id: Schema.String;
4590
+ readonly leaseExpiresAt: Schema.String;
4591
+ readonly state: Schema.Literal<"claimed">;
4592
+ readonly title: Schema.String;
4593
+ }>>>;
4594
+ /** Set at creation; absent when the Session has no labels. */
4595
+ readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
4596
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
4597
+ readonly latestTurnId: Schema.optional<Schema.String>;
4598
+ /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
4599
+ readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
4600
+ /** The Session that spawned or created this one, fixed at creation; absent for a top-level Session. */
4601
+ readonly parentSessionId: Schema.optional<Schema.String>;
4602
+ /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
4603
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
4604
+ /**
4605
+ * The prompt a `question` or `approval` Session waits on, with its text and
4606
+ * options. `session.list` and `session.show` return it while `status` is
4607
+ * one of the two and never otherwise: a `question` names a question
4608
+ * prompt, an `approval` any other kind. A reader who may not read the
4609
+ * approval (a Session principal listing its Project) gets the status without
4610
+ * it.
4611
+ */
4612
+ readonly prompt: Schema.optional<Schema.Struct<{
4613
+ readonly approvalId: Schema.String;
4614
+ readonly expiresAt: Schema.String;
4615
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
4616
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
4617
+ readonly label: Schema.String;
4618
+ readonly optionId: Schema.String;
4619
+ }>>>;
4620
+ readonly summary: Schema.optional<Schema.String>;
4621
+ }>>;
4622
+ /**
4623
+ * Why a recovering Session stopped retrying: its retries ran out and it waits
4624
+ * for `session.resume` or a Node start. Absent while it still retries and in
4625
+ * every other state.
4626
+ */
4627
+ readonly recovery: Schema.optional<Schema.Struct<{
4628
+ readonly code: Schema.String;
4629
+ readonly message: Schema.String;
4630
+ }>>;
2116
4631
  readonly schemaVersion: Schema.Literal<4>;
4632
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
4633
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
4634
+ /** What the Session is doing; present on `session.list` and `session.show`. */
4635
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "compacting", "rate_limited", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
2117
4636
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
2118
4637
  readonly title: Schema.optional<Schema.String>;
2119
4638
  /** A coding Session's own worktree; a reading Session has none. */
@@ -2129,9 +4648,21 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2129
4648
  readonly state: Schema.Literals<readonly ["active", "archived", "removed"]>;
2130
4649
  }>>;
2131
4650
  }>;
4651
+ }>, Schema.Struct<{
4652
+ readonly inputDigest: Schema.String;
4653
+ readonly proof: Schema.String;
4654
+ readonly validUntil: Schema.String;
4655
+ readonly checkpoint: Schema.optional<Schema.String>;
4656
+ readonly commandId: Schema.String;
4657
+ readonly expectedRevision: Schema.String;
4658
+ readonly sessionId: Schema.String;
4659
+ readonly turnId: Schema.String;
4660
+ readonly method: Schema.Literal<"session.fork.preview">;
4661
+ readonly path: Schema.Literal<"context-handoff">;
2132
4662
  }>, Schema.Struct<{
2133
4663
  readonly delivery: Schema.Literals<readonly ["new", "duplicate"]>;
2134
- readonly method: Schema.Literal<"session.resume">;
4664
+ readonly handoff: Schema.String;
4665
+ readonly path: Schema.Literal<"context-handoff">;
2135
4666
  readonly receipt: Schema.Struct<{
2136
4667
  readonly actorId: Schema.String;
2137
4668
  readonly aggregateRevision: Schema.String;
@@ -2139,6 +4670,7 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2139
4670
  readonly createdAt: Schema.String;
2140
4671
  readonly eventCursor: Schema.String;
2141
4672
  readonly method: Schema.String;
4673
+ readonly proposedBy: Schema.optional<Schema.String>;
2142
4674
  readonly receiptId: Schema.String;
2143
4675
  readonly schemaVersion: Schema.Literal<1>;
2144
4676
  readonly state: Schema.Literal<"succeeded">;
@@ -2157,15 +4689,23 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2157
4689
  readonly updatedAt: Schema.String;
2158
4690
  readonly workspaceId: Schema.String;
2159
4691
  readonly workspaceRevision: Schema.String;
4692
+ /** What the Session is doing; present on `session.list` and `session.show`. */
4693
+ readonly activity: Schema.optional<Schema.Literals<readonly ["stopped", "waiting_approval", "working", "idle"]>>;
2160
4694
  readonly agentDefinitionRef: Schema.optional<Schema.Struct<{
2161
4695
  readonly contentDigest: Schema.String;
2162
4696
  readonly key: Schema.String;
2163
4697
  readonly version: Schema.String;
2164
4698
  }>>;
4699
+ /**
4700
+ * `none` for a host-authority Session: the vendor harness runs as the
4701
+ * Node's user with no Maia sandbox ([D-198](https://maia-os.vllnt.com/en/docs/decisions#d-198)).
4702
+ * A sandboxed Session carries none.
4703
+ */
4704
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
2165
4705
  readonly executor: Schema.optional<Schema.Struct<{
2166
4706
  readonly connectionId: Schema.String;
2167
4707
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
2168
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
4708
+ readonly kind: Schema.String;
2169
4709
  readonly model: Schema.optional<Schema.String>;
2170
4710
  }>>;
2171
4711
  /** Why the runtime of a failed Session failed, when Maia knows. */
@@ -2173,7 +4713,61 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2173
4713
  readonly code: Schema.String;
2174
4714
  readonly message: Schema.String;
2175
4715
  }>>;
4716
+ /** The count of board tasks the Session holds now; present on `session.list`, `session.show` and `session.wait`, with `heldTasks`. */
4717
+ readonly heldTaskCount: Schema.optional<Schema.Int>;
4718
+ /**
4719
+ * The board tasks the Session holds now, newest claim first, at most
4720
+ * `MAX_BOARD_HELD_TASKS`; `heldTaskCount` counts every one.
4721
+ */
4722
+ readonly heldTasks: Schema.optional<Schema.$Array<Schema.Struct<{
4723
+ readonly claimedAt: Schema.String;
4724
+ readonly id: Schema.String;
4725
+ readonly leaseExpiresAt: Schema.String;
4726
+ readonly state: Schema.Literal<"claimed">;
4727
+ readonly title: Schema.String;
4728
+ }>>>;
4729
+ /** Set at creation; absent when the Session has no labels. */
4730
+ readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
4731
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
4732
+ readonly latestTurnId: Schema.optional<Schema.String>;
4733
+ /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
4734
+ readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
4735
+ /** The Session that spawned or created this one, fixed at creation; absent for a top-level Session. */
4736
+ readonly parentSessionId: Schema.optional<Schema.String>;
4737
+ /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
4738
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
4739
+ /**
4740
+ * The prompt a `question` or `approval` Session waits on, with its text and
4741
+ * options. `session.list` and `session.show` return it while `status` is
4742
+ * one of the two and never otherwise: a `question` names a question
4743
+ * prompt, an `approval` any other kind. A reader who may not read the
4744
+ * approval (a Session principal listing its Project) gets the status without
4745
+ * it.
4746
+ */
4747
+ readonly prompt: Schema.optional<Schema.Struct<{
4748
+ readonly approvalId: Schema.String;
4749
+ readonly expiresAt: Schema.String;
4750
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
4751
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
4752
+ readonly label: Schema.String;
4753
+ readonly optionId: Schema.String;
4754
+ }>>>;
4755
+ readonly summary: Schema.optional<Schema.String>;
4756
+ }>>;
4757
+ /**
4758
+ * Why a recovering Session stopped retrying: its retries ran out and it waits
4759
+ * for `session.resume` or a Node start. Absent while it still retries and in
4760
+ * every other state.
4761
+ */
4762
+ readonly recovery: Schema.optional<Schema.Struct<{
4763
+ readonly code: Schema.String;
4764
+ readonly message: Schema.String;
4765
+ }>>;
2176
4766
  readonly schemaVersion: Schema.Literal<4>;
4767
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
4768
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
4769
+ /** What the Session is doing; present on `session.list` and `session.show`. */
4770
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "compacting", "rate_limited", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
2177
4771
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
2178
4772
  readonly title: Schema.optional<Schema.String>;
2179
4773
  /** A coding Session's own worktree; a reading Session has none. */
@@ -2189,32 +4783,26 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2189
4783
  readonly state: Schema.Literals<readonly ["active", "archived", "removed"]>;
2190
4784
  }>>;
2191
4785
  }>;
4786
+ readonly sourceSessionId: Schema.String;
4787
+ readonly method: Schema.Literal<"session.fork.confirm">;
2192
4788
  }>, Schema.Struct<{
2193
- readonly baseRevision: Schema.String;
2194
- readonly branch: Schema.String;
2195
- readonly deletions: Schema.Int;
2196
- readonly files: Schema.$Array<Schema.Struct<{
2197
- readonly deletions: Schema.optional<Schema.Int>;
2198
- readonly insertions: Schema.optional<Schema.Int>;
2199
- readonly path: Schema.String;
2200
- readonly previousPath: Schema.optional<Schema.String>;
2201
- readonly status: Schema.Literals<readonly ["added", "copied", "deleted", "modified", "renamed", "type_changed"]>;
2202
- }>>;
2203
- readonly insertions: Schema.Int;
2204
- readonly method: Schema.Literal<"session.diff">;
2205
- readonly patch: Schema.optional<Schema.String>;
2206
- readonly patchTruncated: Schema.optional<Schema.Literal<true>>;
4789
+ readonly inputDigest: Schema.String;
4790
+ readonly proof: Schema.String;
4791
+ readonly validUntil: Schema.String;
4792
+ readonly commandId: Schema.String;
4793
+ readonly expectedRevision: Schema.String;
2207
4794
  readonly sessionId: Schema.String;
2208
- readonly totalFiles: Schema.Int;
4795
+ readonly target: Schema.Struct<{
4796
+ readonly connectionId: Schema.optional<Schema.String>;
4797
+ readonly executor: Schema.optional<Schema.String>;
4798
+ readonly model: Schema.optional<Schema.String>;
4799
+ }>;
4800
+ readonly method: Schema.Literal<"session.switch.preview">;
4801
+ readonly path: Schema.Literal<"context-handoff">;
2209
4802
  }>, Schema.Struct<{
2210
- readonly archive: Schema.optional<Schema.Struct<{
2211
- readonly branch: Schema.String;
2212
- readonly branchRevision: Schema.String;
2213
- readonly pruneAfter: Schema.String;
2214
- readonly snapshot: Schema.Literals<readonly ["clean", "committed"]>;
2215
- }>>;
2216
4803
  readonly delivery: Schema.Literals<readonly ["new", "duplicate"]>;
2217
- readonly method: Schema.Literal<"session.archive">;
4804
+ readonly handoff: Schema.String;
4805
+ readonly path: Schema.Literal<"context-handoff">;
2218
4806
  readonly receipt: Schema.Struct<{
2219
4807
  readonly actorId: Schema.String;
2220
4808
  readonly aggregateRevision: Schema.String;
@@ -2222,6 +4810,7 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2222
4810
  readonly createdAt: Schema.String;
2223
4811
  readonly eventCursor: Schema.String;
2224
4812
  readonly method: Schema.String;
4813
+ readonly proposedBy: Schema.optional<Schema.String>;
2225
4814
  readonly receiptId: Schema.String;
2226
4815
  readonly schemaVersion: Schema.Literal<1>;
2227
4816
  readonly state: Schema.Literal<"succeeded">;
@@ -2240,15 +4829,23 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2240
4829
  readonly updatedAt: Schema.String;
2241
4830
  readonly workspaceId: Schema.String;
2242
4831
  readonly workspaceRevision: Schema.String;
4832
+ /** What the Session is doing; present on `session.list` and `session.show`. */
4833
+ readonly activity: Schema.optional<Schema.Literals<readonly ["stopped", "waiting_approval", "working", "idle"]>>;
2243
4834
  readonly agentDefinitionRef: Schema.optional<Schema.Struct<{
2244
4835
  readonly contentDigest: Schema.String;
2245
4836
  readonly key: Schema.String;
2246
4837
  readonly version: Schema.String;
2247
4838
  }>>;
4839
+ /**
4840
+ * `none` for a host-authority Session: the vendor harness runs as the
4841
+ * Node's user with no Maia sandbox ([D-198](https://maia-os.vllnt.com/en/docs/decisions#d-198)).
4842
+ * A sandboxed Session carries none.
4843
+ */
4844
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
2248
4845
  readonly executor: Schema.optional<Schema.Struct<{
2249
4846
  readonly connectionId: Schema.String;
2250
4847
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
2251
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
4848
+ readonly kind: Schema.String;
2252
4849
  readonly model: Schema.optional<Schema.String>;
2253
4850
  }>>;
2254
4851
  /** Why the runtime of a failed Session failed, when Maia knows. */
@@ -2256,7 +4853,61 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2256
4853
  readonly code: Schema.String;
2257
4854
  readonly message: Schema.String;
2258
4855
  }>>;
4856
+ /** The count of board tasks the Session holds now; present on `session.list`, `session.show` and `session.wait`, with `heldTasks`. */
4857
+ readonly heldTaskCount: Schema.optional<Schema.Int>;
4858
+ /**
4859
+ * The board tasks the Session holds now, newest claim first, at most
4860
+ * `MAX_BOARD_HELD_TASKS`; `heldTaskCount` counts every one.
4861
+ */
4862
+ readonly heldTasks: Schema.optional<Schema.$Array<Schema.Struct<{
4863
+ readonly claimedAt: Schema.String;
4864
+ readonly id: Schema.String;
4865
+ readonly leaseExpiresAt: Schema.String;
4866
+ readonly state: Schema.Literal<"claimed">;
4867
+ readonly title: Schema.String;
4868
+ }>>>;
4869
+ /** Set at creation; absent when the Session has no labels. */
4870
+ readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
4871
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
4872
+ readonly latestTurnId: Schema.optional<Schema.String>;
4873
+ /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
4874
+ readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
4875
+ /** The Session that spawned or created this one, fixed at creation; absent for a top-level Session. */
4876
+ readonly parentSessionId: Schema.optional<Schema.String>;
4877
+ /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
4878
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
4879
+ /**
4880
+ * The prompt a `question` or `approval` Session waits on, with its text and
4881
+ * options. `session.list` and `session.show` return it while `status` is
4882
+ * one of the two and never otherwise: a `question` names a question
4883
+ * prompt, an `approval` any other kind. A reader who may not read the
4884
+ * approval (a Session principal listing its Project) gets the status without
4885
+ * it.
4886
+ */
4887
+ readonly prompt: Schema.optional<Schema.Struct<{
4888
+ readonly approvalId: Schema.String;
4889
+ readonly expiresAt: Schema.String;
4890
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
4891
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
4892
+ readonly label: Schema.String;
4893
+ readonly optionId: Schema.String;
4894
+ }>>>;
4895
+ readonly summary: Schema.optional<Schema.String>;
4896
+ }>>;
4897
+ /**
4898
+ * Why a recovering Session stopped retrying: its retries ran out and it waits
4899
+ * for `session.resume` or a Node start. Absent while it still retries and in
4900
+ * every other state.
4901
+ */
4902
+ readonly recovery: Schema.optional<Schema.Struct<{
4903
+ readonly code: Schema.String;
4904
+ readonly message: Schema.String;
4905
+ }>>;
2259
4906
  readonly schemaVersion: Schema.Literal<4>;
4907
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
4908
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
4909
+ /** What the Session is doing; present on `session.list` and `session.show`. */
4910
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "compacting", "rate_limited", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
2260
4911
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
2261
4912
  readonly title: Schema.optional<Schema.String>;
2262
4913
  /** A coding Session's own worktree; a reading Session has none. */
@@ -2272,9 +4923,73 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2272
4923
  readonly state: Schema.Literals<readonly ["active", "archived", "removed"]>;
2273
4924
  }>>;
2274
4925
  }>;
4926
+ readonly sourceSessionId: Schema.String;
4927
+ readonly method: Schema.Literal<"session.switch.confirm">;
4928
+ }>, Schema.Struct<{
4929
+ readonly inputDigest: Schema.String;
4930
+ readonly proof: Schema.String;
4931
+ readonly validUntil: Schema.String;
4932
+ readonly commandId: Schema.String;
4933
+ readonly expectedRevision: Schema.String;
4934
+ readonly sessionId: Schema.String;
4935
+ readonly setupDigest: Schema.String;
4936
+ readonly approved: Schema.Boolean;
4937
+ readonly method: Schema.Literal<"session.setup.preview">;
4938
+ readonly setup: Schema.Struct<{
4939
+ readonly command: Schema.$Array<Schema.String>;
4940
+ readonly files: Schema.$Array<Schema.Struct<{
4941
+ readonly path: Schema.String;
4942
+ readonly sha256: Schema.String;
4943
+ }>>;
4944
+ }>;
2275
4945
  }>, Schema.Struct<{
2276
4946
  readonly delivery: Schema.Literals<readonly ["new", "duplicate"]>;
2277
- readonly method: Schema.Literal<"session.rename">;
4947
+ readonly method: Schema.Literal<"session.setup.confirm">;
4948
+ readonly receipt: Schema.Struct<{
4949
+ readonly actorId: Schema.String;
4950
+ readonly aggregateRevision: Schema.String;
4951
+ readonly commandId: Schema.String;
4952
+ readonly createdAt: Schema.String;
4953
+ readonly eventCursor: Schema.String;
4954
+ readonly method: Schema.String;
4955
+ readonly proposedBy: Schema.optional<Schema.String>;
4956
+ readonly receiptId: Schema.String;
4957
+ readonly schemaVersion: Schema.Literal<1>;
4958
+ readonly state: Schema.Literal<"succeeded">;
4959
+ readonly target: Schema.Struct<{
4960
+ readonly id: Schema.String;
4961
+ readonly type: Schema.String;
4962
+ }>;
4963
+ readonly updatedAt: Schema.String;
4964
+ }>;
4965
+ readonly sessionId: Schema.String;
4966
+ readonly setupDigest: Schema.String;
4967
+ }>, Schema.Struct<{
4968
+ readonly inputDigest: Schema.String;
4969
+ readonly proof: Schema.String;
4970
+ readonly validUntil: Schema.String;
4971
+ readonly commandId: Schema.String;
4972
+ readonly executor: Schema.String;
4973
+ readonly hostAuthority: Schema.optional<Schema.Literal<true>>;
4974
+ readonly parent: Schema.Struct<{
4975
+ readonly children: Schema.Struct<{
4976
+ readonly live: Schema.Int;
4977
+ readonly total: Schema.Int;
4978
+ }>;
4979
+ readonly depth: Schema.Int;
4980
+ readonly hostAuthority: Schema.optional<Schema.Literal<true>>;
4981
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
4982
+ readonly role: Schema.Literals<readonly ["orchestrator", "worker"]>;
4983
+ readonly sessionId: Schema.String;
4984
+ }>;
4985
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
4986
+ readonly workspaceId: Schema.String;
4987
+ readonly expectedRevision: Schema.Literal<"0">;
4988
+ readonly method: Schema.Literal<"session.spawn.preview">;
4989
+ }>, Schema.Struct<{
4990
+ readonly delivery: Schema.Literals<readonly ["new", "duplicate"]>;
4991
+ readonly method: Schema.Literal<"session.spawn.confirm">;
4992
+ readonly parentSessionId: Schema.String;
2278
4993
  readonly receipt: Schema.Struct<{
2279
4994
  readonly actorId: Schema.String;
2280
4995
  readonly aggregateRevision: Schema.String;
@@ -2282,6 +4997,7 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2282
4997
  readonly createdAt: Schema.String;
2283
4998
  readonly eventCursor: Schema.String;
2284
4999
  readonly method: Schema.String;
5000
+ readonly proposedBy: Schema.optional<Schema.String>;
2285
5001
  readonly receiptId: Schema.String;
2286
5002
  readonly schemaVersion: Schema.Literal<1>;
2287
5003
  readonly state: Schema.Literal<"succeeded">;
@@ -2300,15 +5016,23 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2300
5016
  readonly updatedAt: Schema.String;
2301
5017
  readonly workspaceId: Schema.String;
2302
5018
  readonly workspaceRevision: Schema.String;
5019
+ /** What the Session is doing; present on `session.list` and `session.show`. */
5020
+ readonly activity: Schema.optional<Schema.Literals<readonly ["stopped", "waiting_approval", "working", "idle"]>>;
2303
5021
  readonly agentDefinitionRef: Schema.optional<Schema.Struct<{
2304
5022
  readonly contentDigest: Schema.String;
2305
5023
  readonly key: Schema.String;
2306
5024
  readonly version: Schema.String;
2307
5025
  }>>;
5026
+ /**
5027
+ * `none` for a host-authority Session: the vendor harness runs as the
5028
+ * Node's user with no Maia sandbox ([D-198](https://maia-os.vllnt.com/en/docs/decisions#d-198)).
5029
+ * A sandboxed Session carries none.
5030
+ */
5031
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
2308
5032
  readonly executor: Schema.optional<Schema.Struct<{
2309
5033
  readonly connectionId: Schema.String;
2310
5034
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
2311
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
5035
+ readonly kind: Schema.String;
2312
5036
  readonly model: Schema.optional<Schema.String>;
2313
5037
  }>>;
2314
5038
  /** Why the runtime of a failed Session failed, when Maia knows. */
@@ -2316,7 +5040,61 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2316
5040
  readonly code: Schema.String;
2317
5041
  readonly message: Schema.String;
2318
5042
  }>>;
5043
+ /** The count of board tasks the Session holds now; present on `session.list`, `session.show` and `session.wait`, with `heldTasks`. */
5044
+ readonly heldTaskCount: Schema.optional<Schema.Int>;
5045
+ /**
5046
+ * The board tasks the Session holds now, newest claim first, at most
5047
+ * `MAX_BOARD_HELD_TASKS`; `heldTaskCount` counts every one.
5048
+ */
5049
+ readonly heldTasks: Schema.optional<Schema.$Array<Schema.Struct<{
5050
+ readonly claimedAt: Schema.String;
5051
+ readonly id: Schema.String;
5052
+ readonly leaseExpiresAt: Schema.String;
5053
+ readonly state: Schema.Literal<"claimed">;
5054
+ readonly title: Schema.String;
5055
+ }>>>;
5056
+ /** Set at creation; absent when the Session has no labels. */
5057
+ readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
5058
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
5059
+ readonly latestTurnId: Schema.optional<Schema.String>;
5060
+ /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
5061
+ readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
5062
+ /** The Session that spawned or created this one, fixed at creation; absent for a top-level Session. */
5063
+ readonly parentSessionId: Schema.optional<Schema.String>;
5064
+ /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
5065
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
5066
+ /**
5067
+ * The prompt a `question` or `approval` Session waits on, with its text and
5068
+ * options. `session.list` and `session.show` return it while `status` is
5069
+ * one of the two and never otherwise: a `question` names a question
5070
+ * prompt, an `approval` any other kind. A reader who may not read the
5071
+ * approval (a Session principal listing its Project) gets the status without
5072
+ * it.
5073
+ */
5074
+ readonly prompt: Schema.optional<Schema.Struct<{
5075
+ readonly approvalId: Schema.String;
5076
+ readonly expiresAt: Schema.String;
5077
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
5078
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
5079
+ readonly label: Schema.String;
5080
+ readonly optionId: Schema.String;
5081
+ }>>>;
5082
+ readonly summary: Schema.optional<Schema.String>;
5083
+ }>>;
5084
+ /**
5085
+ * Why a recovering Session stopped retrying: its retries ran out and it waits
5086
+ * for `session.resume` or a Node start. Absent while it still retries and in
5087
+ * every other state.
5088
+ */
5089
+ readonly recovery: Schema.optional<Schema.Struct<{
5090
+ readonly code: Schema.String;
5091
+ readonly message: Schema.String;
5092
+ }>>;
2319
5093
  readonly schemaVersion: Schema.Literal<4>;
5094
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
5095
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
5096
+ /** What the Session is doing; present on `session.list` and `session.show`. */
5097
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "compacting", "rate_limited", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
2320
5098
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
2321
5099
  readonly title: Schema.optional<Schema.String>;
2322
5100
  /** A coding Session's own worktree; a reading Session has none. */
@@ -2334,6 +5112,6 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2334
5112
  }>;
2335
5113
  }>]>;
2336
5114
  export { agentPermissionRequestEffectSchema, agentPermissionResultEffectSchema, } from "./agent-permission-effect-schema.js";
2337
- export { sessionObservationEffectSchema, sessionObserveResultEffectSchema, } from "./observation-effect-schema.js";
2338
- export { sessionArchiveParametersEffectSchema, sessionDiffParametersEffectSchema, sessionDiffResultEffectSchema, } from "./worktree-effect-schema.js";
5115
+ export { sessionExecutorKindEffectSchema, sessionObservationEffectSchema, sessionObserveResultEffectSchema, } from "./observation-effect-schema.js";
5116
+ export { sessionArchiveParametersEffectSchema, sessionDiffParametersEffectSchema, sessionDiffResultEffectSchema, sessionGitStatusParametersEffectSchema, sessionGitStatusResultEffectSchema, } from "./worktree-effect-schema.js";
2339
5117
  //# sourceMappingURL=effect-schema.d.ts.map