@maiaos/protocol 0.1.0-canary.63 → 0.1.0-canary.65

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 (825) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +8 -0
  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 +18 -1
  16. package/dist/agent/worker-operation.d.ts.map +1 -1
  17. package/dist/agents/contract.d.ts +2 -0
  18. package/dist/agents/contract.d.ts.map +1 -1
  19. package/dist/agents/contract.js +2 -1
  20. package/dist/agents/contract.js.map +1 -1
  21. package/dist/agents/effect-schema.d.ts +8 -2
  22. package/dist/agents/effect-schema.d.ts.map +1 -1
  23. package/dist/agents/effect-schema.js +14 -11
  24. package/dist/agents/effect-schema.js.map +1 -1
  25. package/dist/agents/feature.d.ts +29 -4
  26. package/dist/agents/feature.d.ts.map +1 -1
  27. package/dist/agents/feature.js +29 -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 +6 -5
  34. package/dist/approval/contract.d.ts.map +1 -1
  35. package/dist/approval/effect-schema.d.ts +1 -1
  36. package/dist/approval/effect-schema.d.ts.map +1 -1
  37. package/dist/approval/effect-schema.js +1 -1
  38. package/dist/approval/effect-schema.js.map +1 -1
  39. package/dist/approval/feature.d.ts +15 -0
  40. package/dist/approval/feature.d.ts.map +1 -1
  41. package/dist/approval/feature.js +15 -0
  42. package/dist/approval/feature.js.map +1 -1
  43. package/dist/approval/request-effect-schema.d.ts +17 -5
  44. package/dist/approval/request-effect-schema.d.ts.map +1 -1
  45. package/dist/approval/request-effect-schema.js +11 -5
  46. package/dist/approval/request-effect-schema.js.map +1 -1
  47. package/dist/approval/result-effect-schema.d.ts +8 -6
  48. package/dist/approval/result-effect-schema.d.ts.map +1 -1
  49. package/dist/board/contract.d.ts +1668 -0
  50. package/dist/board/contract.d.ts.map +1 -0
  51. package/dist/board/contract.js +108 -0
  52. package/dist/board/contract.js.map +1 -0
  53. package/dist/board/effect-schema.d.ts +6 -0
  54. package/dist/board/effect-schema.d.ts.map +1 -0
  55. package/dist/board/effect-schema.js +6 -0
  56. package/dist/board/effect-schema.js.map +1 -0
  57. package/dist/board/feature.d.ts +565 -0
  58. package/dist/board/feature.d.ts.map +1 -0
  59. package/dist/board/feature.js +535 -0
  60. package/dist/board/feature.js.map +1 -0
  61. package/dist/board/index.d.ts +3 -0
  62. package/dist/board/index.d.ts.map +1 -0
  63. package/dist/board/index.js +3 -0
  64. package/dist/board/index.js.map +1 -0
  65. package/dist/board/manage-effect-schema.d.ts +493 -0
  66. package/dist/board/manage-effect-schema.d.ts.map +1 -0
  67. package/dist/board/manage-effect-schema.js +73 -0
  68. package/dist/board/manage-effect-schema.js.map +1 -0
  69. package/dist/board/model-effect-schema.d.ts +111 -0
  70. package/dist/board/model-effect-schema.d.ts.map +1 -0
  71. package/dist/board/model-effect-schema.js +120 -0
  72. package/dist/board/model-effect-schema.js.map +1 -0
  73. package/dist/board/plan-effect-schema.d.ts +120 -0
  74. package/dist/board/plan-effect-schema.d.ts.map +1 -0
  75. package/dist/board/plan-effect-schema.js +108 -0
  76. package/dist/board/plan-effect-schema.js.map +1 -0
  77. package/dist/board/task-effect-schema.d.ts +1835 -0
  78. package/dist/board/task-effect-schema.d.ts.map +1 -0
  79. package/dist/board/task-effect-schema.js +275 -0
  80. package/dist/board/task-effect-schema.js.map +1 -0
  81. package/dist/board/thread-effect-schema.d.ts +633 -0
  82. package/dist/board/thread-effect-schema.d.ts.map +1 -0
  83. package/dist/board/thread-effect-schema.js +116 -0
  84. package/dist/board/thread-effect-schema.js.map +1 -0
  85. package/dist/command-receipt/contract.d.ts +2 -0
  86. package/dist/command-receipt/contract.d.ts.map +1 -1
  87. package/dist/command-receipt/effect-schema.d.ts +10 -0
  88. package/dist/command-receipt/effect-schema.d.ts.map +1 -1
  89. package/dist/command-receipt/effect-schema.js +5 -0
  90. package/dist/command-receipt/effect-schema.js.map +1 -1
  91. package/dist/command-receipt/feature.d.ts +10 -0
  92. package/dist/command-receipt/feature.d.ts.map +1 -1
  93. package/dist/command-receipt/feature.js +10 -0
  94. package/dist/command-receipt/feature.js.map +1 -1
  95. package/dist/connection/access-effect-schema.d.ts +4 -0
  96. package/dist/connection/access-effect-schema.d.ts.map +1 -1
  97. package/dist/connection/contract.d.ts +154 -2
  98. package/dist/connection/contract.d.ts.map +1 -1
  99. package/dist/connection/contract.js +7 -0
  100. package/dist/connection/contract.js.map +1 -1
  101. package/dist/connection/effect-schema.d.ts +149 -2
  102. package/dist/connection/effect-schema.d.ts.map +1 -1
  103. package/dist/connection/effect-schema.js +3 -0
  104. package/dist/connection/effect-schema.js.map +1 -1
  105. package/dist/connection/executors-effect-schema.d.ts +259 -0
  106. package/dist/connection/executors-effect-schema.d.ts.map +1 -0
  107. package/dist/connection/executors-effect-schema.js +80 -0
  108. package/dist/connection/executors-effect-schema.js.map +1 -0
  109. package/dist/connection/feature.d.ts +301 -10
  110. package/dist/connection/feature.d.ts.map +1 -1
  111. package/dist/connection/feature.js +381 -46
  112. package/dist/connection/feature.js.map +1 -1
  113. package/dist/connection/gateway-effect-schema.d.ts +7 -0
  114. package/dist/connection/gateway-effect-schema.d.ts.map +1 -1
  115. package/dist/connection/gateway-effect-schema.js +7 -0
  116. package/dist/connection/gateway-effect-schema.js.map +1 -1
  117. package/dist/connection/index.d.ts +1 -1
  118. package/dist/connection/index.d.ts.map +1 -1
  119. package/dist/connection/index.js +1 -1
  120. package/dist/connection/index.js.map +1 -1
  121. package/dist/connection/request-effect-schema.d.ts +10 -3
  122. package/dist/connection/request-effect-schema.d.ts.map +1 -1
  123. package/dist/connection/request-effect-schema.js +18 -11
  124. package/dist/connection/request-effect-schema.js.map +1 -1
  125. package/dist/connection/result-effect-schema.d.ts +34 -6
  126. package/dist/connection/result-effect-schema.d.ts.map +1 -1
  127. package/dist/connection/result-effect-schema.js +4 -3
  128. package/dist/connection/result-effect-schema.js.map +1 -1
  129. package/dist/connection/system-effect-schema.d.ts +8 -0
  130. package/dist/connection/system-effect-schema.d.ts.map +1 -1
  131. package/dist/connection/system-effect-schema.js +4 -2
  132. package/dist/connection/system-effect-schema.js.map +1 -1
  133. package/dist/container/contract.d.ts +2 -0
  134. package/dist/container/contract.d.ts.map +1 -1
  135. package/dist/container/effect-schema.d.ts +4 -0
  136. package/dist/container/effect-schema.d.ts.map +1 -1
  137. package/dist/container/portfolio-feature.d.ts +286 -0
  138. package/dist/container/portfolio-feature.d.ts.map +1 -1
  139. package/dist/container/portfolio-feature.js +131 -0
  140. package/dist/container/portfolio-feature.js.map +1 -1
  141. package/dist/coordinator-tool/index.d.ts +1 -1
  142. package/dist/coordinator-tool/index.d.ts.map +1 -1
  143. package/dist/coordinator-tool/index.js +1 -1
  144. package/dist/coordinator-tool/index.js.map +1 -1
  145. package/dist/coordinator-tool/registry.d.ts +16 -0
  146. package/dist/coordinator-tool/registry.d.ts.map +1 -1
  147. package/dist/coordinator-tool/registry.js +152 -2
  148. package/dist/coordinator-tool/registry.js.map +1 -1
  149. package/dist/discovery/contract.d.ts +84 -2
  150. package/dist/discovery/contract.d.ts.map +1 -1
  151. package/dist/discovery/contract.js +9 -1
  152. package/dist/discovery/contract.js.map +1 -1
  153. package/dist/discovery/effect-schema.d.ts +190 -6
  154. package/dist/discovery/effect-schema.d.ts.map +1 -1
  155. package/dist/discovery/effect-schema.js +87 -6
  156. package/dist/discovery/effect-schema.js.map +1 -1
  157. package/dist/discovery/feature.d.ts +81 -1
  158. package/dist/discovery/feature.d.ts.map +1 -1
  159. package/dist/discovery/feature.js +77 -1
  160. package/dist/discovery/feature.js.map +1 -1
  161. package/dist/discovery/index.d.ts +1 -1
  162. package/dist/discovery/index.d.ts.map +1 -1
  163. package/dist/discovery/index.js +1 -1
  164. package/dist/discovery/index.js.map +1 -1
  165. package/dist/envelope/effect-schema.d.ts +38 -17
  166. package/dist/envelope/effect-schema.d.ts.map +1 -1
  167. package/dist/envelope/effect-schema.js +30 -8
  168. package/dist/envelope/effect-schema.js.map +1 -1
  169. package/dist/envelope/envelope.d.ts +25 -3
  170. package/dist/envelope/envelope.d.ts.map +1 -1
  171. package/dist/envelope/envelope.js +37 -1
  172. package/dist/envelope/envelope.js.map +1 -1
  173. package/dist/envelope/index.d.ts +2 -2
  174. package/dist/envelope/index.d.ts.map +1 -1
  175. package/dist/envelope/index.js +2 -2
  176. package/dist/envelope/index.js.map +1 -1
  177. package/dist/envelope/policy.d.ts +11 -0
  178. package/dist/envelope/policy.d.ts.map +1 -1
  179. package/dist/envelope/policy.js +13 -0
  180. package/dist/envelope/policy.js.map +1 -1
  181. package/dist/event/effect-schema.d.ts +1 -1
  182. package/dist/event/effect-schema.d.ts.map +1 -1
  183. package/dist/event/effect-schema.js +1 -1
  184. package/dist/event/effect-schema.js.map +1 -1
  185. package/dist/event/feature.d.ts +5 -0
  186. package/dist/event/feature.d.ts.map +1 -1
  187. package/dist/event/feature.js +5 -0
  188. package/dist/event/feature.js.map +1 -1
  189. package/dist/event/lifecycle/effect-schema.d.ts +11 -0
  190. package/dist/event/lifecycle/effect-schema.d.ts.map +1 -1
  191. package/dist/event/lifecycle/effect-schema.js +13 -0
  192. package/dist/event/lifecycle/effect-schema.js.map +1 -1
  193. package/dist/event/lifecycle/index.d.ts +1 -1
  194. package/dist/event/lifecycle/index.d.ts.map +1 -1
  195. package/dist/event/lifecycle/index.js +1 -1
  196. package/dist/event/lifecycle/index.js.map +1 -1
  197. package/dist/event/lifecycle/schema.d.ts +6 -0
  198. package/dist/event/lifecycle/schema.d.ts.map +1 -1
  199. package/dist/event/lifecycle/schema.js +2 -1
  200. package/dist/event/lifecycle/schema.js.map +1 -1
  201. package/dist/event/registry.d.ts.map +1 -1
  202. package/dist/event/registry.js +198 -4
  203. package/dist/event/registry.js.map +1 -1
  204. package/dist/event/waiting/effect-schema.d.ts +42 -0
  205. package/dist/event/waiting/effect-schema.d.ts.map +1 -0
  206. package/dist/event/waiting/effect-schema.js +51 -0
  207. package/dist/event/waiting/effect-schema.js.map +1 -0
  208. package/dist/event/waiting/index.d.ts +2 -0
  209. package/dist/event/waiting/index.d.ts.map +1 -0
  210. package/dist/event/waiting/index.js +2 -0
  211. package/dist/event/waiting/index.js.map +1 -0
  212. package/dist/event/waiting/schema.d.ts +23 -0
  213. package/dist/event/waiting/schema.d.ts.map +1 -0
  214. package/dist/event/waiting/schema.js +6 -0
  215. package/dist/event/waiting/schema.js.map +1 -0
  216. package/dist/event-stream/contract.d.ts +2 -1
  217. package/dist/event-stream/contract.d.ts.map +1 -1
  218. package/dist/event-stream/effect-schema.d.ts +9 -8
  219. package/dist/event-stream/effect-schema.d.ts.map +1 -1
  220. package/dist/execution/contract.d.ts +1 -0
  221. package/dist/execution/contract.d.ts.map +1 -1
  222. package/dist/execution/effect-schema.d.ts +6 -0
  223. package/dist/execution/effect-schema.d.ts.map +1 -1
  224. package/dist/execution/feature.d.ts +575 -0
  225. package/dist/execution/feature.d.ts.map +1 -0
  226. package/dist/execution/feature.js +543 -0
  227. package/dist/execution/feature.js.map +1 -0
  228. package/dist/execution/file-operation-contract.d.ts +1 -0
  229. package/dist/execution/file-operation-contract.d.ts.map +1 -1
  230. package/dist/execution/file-operation-effect-schema.d.ts +1 -0
  231. package/dist/execution/file-operation-effect-schema.d.ts.map +1 -1
  232. package/dist/execution/index.d.ts +1 -0
  233. package/dist/execution/index.d.ts.map +1 -1
  234. package/dist/execution/index.js +1 -0
  235. package/dist/execution/index.js.map +1 -1
  236. package/dist/execution/operation-contract.d.ts +1 -0
  237. package/dist/execution/operation-contract.d.ts.map +1 -1
  238. package/dist/execution/operation-effect-schema.d.ts +1 -0
  239. package/dist/execution/operation-effect-schema.d.ts.map +1 -1
  240. package/dist/execution/placement/contract.d.ts +4 -0
  241. package/dist/execution/placement/contract.d.ts.map +1 -1
  242. package/dist/execution/placement/effect-schema.d.ts +4 -0
  243. package/dist/execution/placement/effect-schema.d.ts.map +1 -1
  244. package/dist/execution/relocation/contract.d.ts +2 -0
  245. package/dist/execution/relocation/contract.d.ts.map +1 -1
  246. package/dist/execution/relocation/effect-schema.d.ts +4 -0
  247. package/dist/execution/relocation/effect-schema.d.ts.map +1 -1
  248. package/dist/execution/worktree/contract.d.ts +12 -0
  249. package/dist/execution/worktree/contract.d.ts.map +1 -1
  250. package/dist/execution/worktree/effect-schema.d.ts +20 -0
  251. package/dist/execution/worktree/effect-schema.d.ts.map +1 -1
  252. package/dist/execution/worktree/effect-schema.js +11 -0
  253. package/dist/execution/worktree/effect-schema.js.map +1 -1
  254. package/dist/executor/index.d.ts +2 -0
  255. package/dist/executor/index.d.ts.map +1 -0
  256. package/dist/executor/index.js +2 -0
  257. package/dist/executor/index.js.map +1 -0
  258. package/dist/executor/policy.d.ts +26 -0
  259. package/dist/executor/policy.d.ts.map +1 -0
  260. package/dist/executor/policy.js +45 -0
  261. package/dist/executor/policy.js.map +1 -0
  262. package/dist/feature/descriptor/descriptor.d.ts +42 -2
  263. package/dist/feature/descriptor/descriptor.d.ts.map +1 -1
  264. package/dist/feature/descriptor/descriptor.js.map +1 -1
  265. package/dist/feature/descriptor/index.d.ts +1 -1
  266. package/dist/feature/descriptor/index.d.ts.map +1 -1
  267. package/dist/feature/descriptor/index.js.map +1 -1
  268. package/dist/feature/index.d.ts +1 -1
  269. package/dist/feature/index.d.ts.map +1 -1
  270. package/dist/feature/index.js +1 -1
  271. package/dist/feature/index.js.map +1 -1
  272. package/dist/feature/node-status.d.ts +65 -1
  273. package/dist/feature/node-status.d.ts.map +1 -1
  274. package/dist/feature/node-status.js +59 -1
  275. package/dist/feature/node-status.js.map +1 -1
  276. package/dist/feature/registry.d.ts +55 -4
  277. package/dist/feature/registry.d.ts.map +1 -1
  278. package/dist/feature/registry.js +49 -0
  279. package/dist/feature/registry.js.map +1 -1
  280. package/dist/github/contract.d.ts +266 -0
  281. package/dist/github/contract.d.ts.map +1 -0
  282. package/dist/github/contract.js +30 -0
  283. package/dist/github/contract.js.map +1 -0
  284. package/dist/github/effect-schema.d.ts +488 -0
  285. package/dist/github/effect-schema.d.ts.map +1 -0
  286. package/dist/github/effect-schema.js +231 -0
  287. package/dist/github/effect-schema.js.map +1 -0
  288. package/dist/github/feature.d.ts +201 -0
  289. package/dist/github/feature.d.ts.map +1 -0
  290. package/dist/github/feature.js +195 -0
  291. package/dist/github/feature.js.map +1 -0
  292. package/dist/github/index.d.ts +3 -0
  293. package/dist/github/index.d.ts.map +1 -0
  294. package/dist/github/index.js +3 -0
  295. package/dist/github/index.js.map +1 -0
  296. package/dist/goal/contract.d.ts +449 -0
  297. package/dist/goal/contract.d.ts.map +1 -0
  298. package/dist/goal/contract.js +37 -0
  299. package/dist/goal/contract.js.map +1 -0
  300. package/dist/goal/effect-schema.d.ts +870 -0
  301. package/dist/goal/effect-schema.d.ts.map +1 -0
  302. package/dist/goal/effect-schema.js +349 -0
  303. package/dist/goal/effect-schema.js.map +1 -0
  304. package/dist/goal/feature.d.ts +256 -0
  305. package/dist/goal/feature.d.ts.map +1 -0
  306. package/dist/goal/feature.js +237 -0
  307. package/dist/goal/feature.js.map +1 -0
  308. package/dist/goal/index.d.ts +3 -0
  309. package/dist/goal/index.d.ts.map +1 -0
  310. package/dist/goal/index.js +3 -0
  311. package/dist/goal/index.js.map +1 -0
  312. package/dist/harness/installed/effect-schema.d.ts.map +1 -1
  313. package/dist/harness/installed/effect-schema.js +2 -1
  314. package/dist/harness/installed/effect-schema.js.map +1 -1
  315. package/dist/harness/installed/feature.d.ts +35 -0
  316. package/dist/harness/installed/feature.d.ts.map +1 -0
  317. package/dist/harness/installed/feature.js +39 -0
  318. package/dist/harness/installed/feature.js.map +1 -0
  319. package/dist/harness/installed/index.d.ts +1 -0
  320. package/dist/harness/installed/index.d.ts.map +1 -1
  321. package/dist/harness/installed/index.js +1 -0
  322. package/dist/harness/installed/index.js.map +1 -1
  323. package/dist/hold/contract.d.ts +2 -0
  324. package/dist/hold/contract.d.ts.map +1 -1
  325. package/dist/hold/effect-schema.d.ts +4 -0
  326. package/dist/hold/effect-schema.d.ts.map +1 -1
  327. package/dist/hold/feature.d.ts +155 -0
  328. package/dist/hold/feature.d.ts.map +1 -0
  329. package/dist/hold/feature.js +151 -0
  330. package/dist/hold/feature.js.map +1 -0
  331. package/dist/hold/index.d.ts +1 -0
  332. package/dist/hold/index.d.ts.map +1 -1
  333. package/dist/hold/index.js +1 -0
  334. package/dist/hold/index.js.map +1 -1
  335. package/dist/inbox/contract.d.ts +386 -0
  336. package/dist/inbox/contract.d.ts.map +1 -0
  337. package/dist/inbox/contract.js +20 -0
  338. package/dist/inbox/contract.js.map +1 -0
  339. package/dist/inbox/effect-schema.d.ts +750 -0
  340. package/dist/inbox/effect-schema.d.ts.map +1 -0
  341. package/dist/inbox/effect-schema.js +246 -0
  342. package/dist/inbox/effect-schema.js.map +1 -0
  343. package/dist/inbox/feature.d.ts +164 -0
  344. package/dist/inbox/feature.d.ts.map +1 -0
  345. package/dist/inbox/feature.js +160 -0
  346. package/dist/inbox/feature.js.map +1 -0
  347. package/dist/inbox/index.d.ts +3 -0
  348. package/dist/inbox/index.d.ts.map +1 -0
  349. package/dist/inbox/index.js +3 -0
  350. package/dist/inbox/index.js.map +1 -0
  351. package/dist/index.d.ts +24 -13
  352. package/dist/index.d.ts.map +1 -1
  353. package/dist/index.js +24 -13
  354. package/dist/index.js.map +1 -1
  355. package/dist/integration-authorization/claude-code-contract.d.ts +3 -0
  356. package/dist/integration-authorization/claude-code-contract.d.ts.map +1 -1
  357. package/dist/integration-authorization/contract.d.ts +85 -12
  358. package/dist/integration-authorization/contract.d.ts.map +1 -1
  359. package/dist/integration-authorization/contract.js +19 -1
  360. package/dist/integration-authorization/contract.js.map +1 -1
  361. package/dist/integration-authorization/effect-schema.d.ts +3678 -1480
  362. package/dist/integration-authorization/effect-schema.d.ts.map +1 -1
  363. package/dist/integration-authorization/effect-schema.js +81 -6
  364. package/dist/integration-authorization/effect-schema.js.map +1 -1
  365. package/dist/integration-authorization/feature.d.ts +605 -0
  366. package/dist/integration-authorization/feature.d.ts.map +1 -0
  367. package/dist/integration-authorization/feature.js +571 -0
  368. package/dist/integration-authorization/feature.js.map +1 -0
  369. package/dist/integration-authorization/index.d.ts +3 -0
  370. package/dist/integration-authorization/index.d.ts.map +1 -1
  371. package/dist/integration-authorization/index.js +3 -0
  372. package/dist/integration-authorization/index.js.map +1 -1
  373. package/dist/integration-authorization/pi-rpc-contract.d.ts +3 -0
  374. package/dist/integration-authorization/pi-rpc-contract.d.ts.map +1 -1
  375. package/dist/integration-authorization/policy.d.ts +6 -1
  376. package/dist/integration-authorization/policy.d.ts.map +1 -1
  377. package/dist/integration-authorization/policy.js +6 -1
  378. package/dist/integration-authorization/policy.js.map +1 -1
  379. package/dist/interaction/effect-schema.d.ts +1 -1
  380. package/dist/interaction/effect-schema.d.ts.map +1 -1
  381. package/dist/interaction/effect-schema.js +1 -1
  382. package/dist/interaction/effect-schema.js.map +1 -1
  383. package/dist/interaction/feature.d.ts +50 -0
  384. package/dist/interaction/feature.d.ts.map +1 -1
  385. package/dist/interaction/feature.js +48 -0
  386. package/dist/interaction/feature.js.map +1 -1
  387. package/dist/interaction/result-contract.d.ts +3 -0
  388. package/dist/interaction/result-contract.d.ts.map +1 -1
  389. package/dist/interaction/result-effect-schema.d.ts +6 -0
  390. package/dist/interaction/result-effect-schema.d.ts.map +1 -1
  391. package/dist/invocation-context/contract.d.ts +2 -1
  392. package/dist/invocation-context/contract.d.ts.map +1 -1
  393. package/dist/invocation-context/effect-schema.d.ts +12 -2
  394. package/dist/invocation-context/effect-schema.d.ts.map +1 -1
  395. package/dist/invocation-context/effect-schema.js +24 -3
  396. package/dist/invocation-context/effect-schema.js.map +1 -1
  397. package/dist/invocation-context/feature.d.ts +35 -0
  398. package/dist/invocation-context/feature.d.ts.map +1 -0
  399. package/dist/invocation-context/feature.js +39 -0
  400. package/dist/invocation-context/feature.js.map +1 -0
  401. package/dist/invocation-context/index.d.ts +1 -0
  402. package/dist/invocation-context/index.d.ts.map +1 -1
  403. package/dist/invocation-context/index.js +1 -0
  404. package/dist/invocation-context/index.js.map +1 -1
  405. package/dist/invocation-context/policy.d.ts +6 -1
  406. package/dist/invocation-context/policy.d.ts.map +1 -1
  407. package/dist/invocation-context/policy.js +7 -1
  408. package/dist/invocation-context/policy.js.map +1 -1
  409. package/dist/local-node/contract.d.ts +40 -14
  410. package/dist/local-node/contract.d.ts.map +1 -1
  411. package/dist/local-node/contract.js +3 -1
  412. package/dist/local-node/contract.js.map +1 -1
  413. package/dist/local-node/effect-schema.d.ts +3694 -1398
  414. package/dist/local-node/effect-schema.d.ts.map +1 -1
  415. package/dist/local-node/effect-schema.js +87 -4
  416. package/dist/local-node/effect-schema.js.map +1 -1
  417. package/dist/local-node/index.d.ts +2 -2
  418. package/dist/local-node/index.d.ts.map +1 -1
  419. package/dist/local-node/index.js +2 -2
  420. package/dist/local-node/index.js.map +1 -1
  421. package/dist/local-node/node-api/index.d.ts +2 -2
  422. package/dist/local-node/node-api/index.d.ts.map +1 -1
  423. package/dist/local-node/node-api/index.js +2 -2
  424. package/dist/local-node/node-api/index.js.map +1 -1
  425. package/dist/local-node/node-api/methods.d.ts +10 -220
  426. package/dist/local-node/node-api/methods.d.ts.map +1 -1
  427. package/dist/local-node/node-api/methods.js +133 -221
  428. package/dist/local-node/node-api/methods.js.map +1 -1
  429. package/dist/local-node/node-api/policy.d.ts +33 -0
  430. package/dist/local-node/node-api/policy.d.ts.map +1 -1
  431. package/dist/local-node/node-api/policy.js +33 -0
  432. package/dist/local-node/node-api/policy.js.map +1 -1
  433. package/dist/local-node/receipt-list.d.ts +6 -7
  434. package/dist/local-node/receipt-list.d.ts.map +1 -1
  435. package/dist/local-node/receipt-list.js +59 -7
  436. package/dist/local-node/receipt-list.js.map +1 -1
  437. package/dist/node-update/contract.d.ts +198 -0
  438. package/dist/node-update/contract.d.ts.map +1 -0
  439. package/dist/node-update/contract.js +22 -0
  440. package/dist/node-update/contract.js.map +1 -0
  441. package/dist/node-update/effect-schema.d.ts +435 -0
  442. package/dist/node-update/effect-schema.d.ts.map +1 -0
  443. package/dist/node-update/effect-schema.js +307 -0
  444. package/dist/node-update/effect-schema.js.map +1 -0
  445. package/dist/node-update/feature.d.ts +379 -0
  446. package/dist/node-update/feature.d.ts.map +1 -0
  447. package/dist/node-update/feature.js +363 -0
  448. package/dist/node-update/feature.js.map +1 -0
  449. package/dist/node-update/index.d.ts +3 -0
  450. package/dist/node-update/index.d.ts.map +1 -0
  451. package/dist/node-update/index.js +3 -0
  452. package/dist/node-update/index.js.map +1 -0
  453. package/dist/orchestration/contract.d.ts +6 -0
  454. package/dist/orchestration/contract.d.ts.map +1 -1
  455. package/dist/orchestration/effect-schema.d.ts +14 -2
  456. package/dist/orchestration/effect-schema.d.ts.map +1 -1
  457. package/dist/orchestration/effect-schema.js +2 -2
  458. package/dist/orchestration/effect-schema.js.map +1 -1
  459. package/dist/orchestration/feature.d.ts +235 -0
  460. package/dist/orchestration/feature.d.ts.map +1 -1
  461. package/dist/orchestration/feature.js +227 -0
  462. package/dist/orchestration/feature.js.map +1 -1
  463. package/dist/orchestration/topology.d.ts +11 -1
  464. package/dist/orchestration/topology.d.ts.map +1 -1
  465. package/dist/orchestration/topology.js +38 -29
  466. package/dist/orchestration/topology.js.map +1 -1
  467. package/dist/pairing/contract.d.ts +86 -0
  468. package/dist/pairing/contract.d.ts.map +1 -0
  469. package/dist/pairing/contract.js +12 -0
  470. package/dist/pairing/contract.js.map +1 -0
  471. package/dist/pairing/effect-schema.d.ts +166 -0
  472. package/dist/pairing/effect-schema.d.ts.map +1 -0
  473. package/dist/pairing/effect-schema.js +94 -0
  474. package/dist/pairing/effect-schema.js.map +1 -0
  475. package/dist/pairing/feature.d.ts +141 -0
  476. package/dist/pairing/feature.d.ts.map +1 -0
  477. package/dist/pairing/feature.js +139 -0
  478. package/dist/pairing/feature.js.map +1 -0
  479. package/dist/pairing/index.d.ts +3 -0
  480. package/dist/pairing/index.d.ts.map +1 -0
  481. package/dist/pairing/index.js +3 -0
  482. package/dist/pairing/index.js.map +1 -0
  483. package/dist/port-lease/contract.d.ts +3 -0
  484. package/dist/port-lease/contract.d.ts.map +1 -1
  485. package/dist/port-lease/feature.d.ts +21 -0
  486. package/dist/port-lease/feature.d.ts.map +1 -1
  487. package/dist/port-lease/feature.js +21 -0
  488. package/dist/port-lease/feature.js.map +1 -1
  489. package/dist/port-lease/result-effect-schema.d.ts +6 -0
  490. package/dist/port-lease/result-effect-schema.d.ts.map +1 -1
  491. package/dist/presentation/contract.d.ts +12 -2
  492. package/dist/presentation/contract.d.ts.map +1 -1
  493. package/dist/presentation/effect-schema.d.ts +12 -2
  494. package/dist/presentation/effect-schema.d.ts.map +1 -1
  495. package/dist/presentation/feature.d.ts +20 -0
  496. package/dist/presentation/feature.d.ts.map +1 -1
  497. package/dist/presentation/feature.js +20 -0
  498. package/dist/presentation/feature.js.map +1 -1
  499. package/dist/presentation/session-list-effect-schema.d.ts +12 -2
  500. package/dist/presentation/session-list-effect-schema.d.ts.map +1 -1
  501. package/dist/principal/contract.d.ts +104 -0
  502. package/dist/principal/contract.d.ts.map +1 -0
  503. package/dist/principal/contract.js +18 -0
  504. package/dist/principal/contract.js.map +1 -0
  505. package/dist/principal/effect-schema.d.ts +166 -0
  506. package/dist/principal/effect-schema.d.ts.map +1 -0
  507. package/dist/principal/effect-schema.js +93 -0
  508. package/dist/principal/effect-schema.js.map +1 -0
  509. package/dist/principal/feature.d.ts +111 -0
  510. package/dist/principal/feature.d.ts.map +1 -0
  511. package/dist/principal/feature.js +111 -0
  512. package/dist/principal/feature.js.map +1 -0
  513. package/dist/principal/index.d.ts +3 -0
  514. package/dist/principal/index.d.ts.map +1 -0
  515. package/dist/principal/index.js +3 -0
  516. package/dist/principal/index.js.map +1 -0
  517. package/dist/project-workspace/contract.d.ts +351 -2
  518. package/dist/project-workspace/contract.d.ts.map +1 -1
  519. package/dist/project-workspace/contract.js +34 -2
  520. package/dist/project-workspace/contract.js.map +1 -1
  521. package/dist/project-workspace/effect-schema.d.ts +403 -0
  522. package/dist/project-workspace/effect-schema.d.ts.map +1 -1
  523. package/dist/project-workspace/effect-schema.js +105 -1
  524. package/dist/project-workspace/effect-schema.js.map +1 -1
  525. package/dist/project-workspace/feature.d.ts +659 -1
  526. package/dist/project-workspace/feature.d.ts.map +1 -1
  527. package/dist/project-workspace/feature.js +625 -1
  528. package/dist/project-workspace/feature.js.map +1 -1
  529. package/dist/project-workspace/git-effect-schema.d.ts +93 -0
  530. package/dist/project-workspace/git-effect-schema.d.ts.map +1 -0
  531. package/dist/project-workspace/git-effect-schema.js +81 -0
  532. package/dist/project-workspace/git-effect-schema.js.map +1 -0
  533. package/dist/project-workspace/index.d.ts +2 -2
  534. package/dist/project-workspace/index.d.ts.map +1 -1
  535. package/dist/project-workspace/index.js +2 -2
  536. package/dist/project-workspace/index.js.map +1 -1
  537. package/dist/project-workspace/knowledge-effect-schema.d.ts +413 -0
  538. package/dist/project-workspace/knowledge-effect-schema.d.ts.map +1 -0
  539. package/dist/project-workspace/knowledge-effect-schema.js +232 -0
  540. package/dist/project-workspace/knowledge-effect-schema.js.map +1 -0
  541. package/dist/project-workspace/policy.d.ts +40 -0
  542. package/dist/project-workspace/policy.d.ts.map +1 -1
  543. package/dist/project-workspace/policy.js +39 -0
  544. package/dist/project-workspace/policy.js.map +1 -1
  545. package/dist/provider/feature.d.ts +35 -0
  546. package/dist/provider/feature.d.ts.map +1 -0
  547. package/dist/provider/feature.js +39 -0
  548. package/dist/provider/feature.js.map +1 -0
  549. package/dist/provider/index.d.ts +1 -0
  550. package/dist/provider/index.d.ts.map +1 -1
  551. package/dist/provider/index.js +1 -0
  552. package/dist/provider/index.js.map +1 -1
  553. package/dist/reach/address.d.ts +18 -0
  554. package/dist/reach/address.d.ts.map +1 -0
  555. package/dist/reach/address.js +42 -0
  556. package/dist/reach/address.js.map +1 -0
  557. package/dist/reach/contract.d.ts +68 -0
  558. package/dist/reach/contract.d.ts.map +1 -0
  559. package/dist/reach/contract.js +8 -0
  560. package/dist/reach/contract.js.map +1 -0
  561. package/dist/reach/effect-schema.d.ts +133 -0
  562. package/dist/reach/effect-schema.d.ts.map +1 -0
  563. package/dist/reach/effect-schema.js +68 -0
  564. package/dist/reach/effect-schema.js.map +1 -0
  565. package/dist/reach/feature.d.ts +106 -0
  566. package/dist/reach/feature.d.ts.map +1 -0
  567. package/dist/reach/feature.js +106 -0
  568. package/dist/reach/feature.js.map +1 -0
  569. package/dist/reach/index.d.ts +4 -0
  570. package/dist/reach/index.d.ts.map +1 -0
  571. package/dist/reach/index.js +4 -0
  572. package/dist/reach/index.js.map +1 -0
  573. package/dist/reference/feature.d.ts +5 -0
  574. package/dist/reference/feature.d.ts.map +1 -1
  575. package/dist/reference/feature.js +5 -0
  576. package/dist/reference/feature.js.map +1 -1
  577. package/dist/remote-node/contract.d.ts +103 -2
  578. package/dist/remote-node/contract.d.ts.map +1 -1
  579. package/dist/remote-node/effect-schema.d.ts +1 -1
  580. package/dist/remote-node/effect-schema.d.ts.map +1 -1
  581. package/dist/remote-node/effect-schema.js +1 -1
  582. package/dist/remote-node/effect-schema.js.map +1 -1
  583. package/dist/remote-node/feature.d.ts +185 -0
  584. package/dist/remote-node/feature.d.ts.map +1 -1
  585. package/dist/remote-node/feature.js +173 -0
  586. package/dist/remote-node/feature.js.map +1 -1
  587. package/dist/remote-node/request-effect-schema.d.ts +4 -4
  588. package/dist/remote-node/request-effect-schema.d.ts.map +1 -1
  589. package/dist/remote-node/request-effect-schema.js +2 -1
  590. package/dist/remote-node/request-effect-schema.js.map +1 -1
  591. package/dist/remote-node/result-effect-schema.d.ts +194 -1
  592. package/dist/remote-node/result-effect-schema.d.ts.map +1 -1
  593. package/dist/remote-node/result-effect-schema.js +13 -2
  594. package/dist/remote-node/result-effect-schema.js.map +1 -1
  595. package/dist/routine/contract.d.ts +644 -18
  596. package/dist/routine/contract.d.ts.map +1 -1
  597. package/dist/routine/contract.js +28 -2
  598. package/dist/routine/contract.js.map +1 -1
  599. package/dist/routine/effect-schema.d.ts +1489 -218
  600. package/dist/routine/effect-schema.d.ts.map +1 -1
  601. package/dist/routine/effect-schema.js +358 -20
  602. package/dist/routine/effect-schema.js.map +1 -1
  603. package/dist/routine/feature.d.ts +336 -11
  604. package/dist/routine/feature.d.ts.map +1 -1
  605. package/dist/routine/feature.js +318 -11
  606. package/dist/routine/feature.js.map +1 -1
  607. package/dist/routine/index.d.ts +1 -1
  608. package/dist/routine/index.d.ts.map +1 -1
  609. package/dist/routine/index.js +1 -1
  610. package/dist/routine/index.js.map +1 -1
  611. package/dist/routine/policy.d.ts +55 -3
  612. package/dist/routine/policy.d.ts.map +1 -1
  613. package/dist/routine/policy.js +46 -1
  614. package/dist/routine/policy.js.map +1 -1
  615. package/dist/run-ledger/contract.d.ts +45 -0
  616. package/dist/run-ledger/contract.d.ts.map +1 -1
  617. package/dist/run-ledger/feature.d.ts +32 -0
  618. package/dist/run-ledger/feature.d.ts.map +1 -1
  619. package/dist/run-ledger/feature.js +32 -0
  620. package/dist/run-ledger/feature.js.map +1 -1
  621. package/dist/run-ledger/result-effect-schema.d.ts +90 -0
  622. package/dist/run-ledger/result-effect-schema.d.ts.map +1 -1
  623. package/dist/runtime/effect-schema.d.ts.map +1 -1
  624. package/dist/runtime/effect-schema.js +2 -1
  625. package/dist/runtime/effect-schema.js.map +1 -1
  626. package/dist/runtime/feature.d.ts +35 -0
  627. package/dist/runtime/feature.d.ts.map +1 -0
  628. package/dist/runtime/feature.js +39 -0
  629. package/dist/runtime/feature.js.map +1 -0
  630. package/dist/runtime/index.d.ts +1 -0
  631. package/dist/runtime/index.d.ts.map +1 -1
  632. package/dist/runtime/index.js +1 -0
  633. package/dist/runtime/index.js.map +1 -1
  634. package/dist/secret/contract.d.ts +107 -0
  635. package/dist/secret/contract.d.ts.map +1 -0
  636. package/dist/secret/contract.js +34 -0
  637. package/dist/secret/contract.js.map +1 -0
  638. package/dist/secret/effect-schema.d.ts +185 -0
  639. package/dist/secret/effect-schema.d.ts.map +1 -0
  640. package/dist/secret/effect-schema.js +113 -0
  641. package/dist/secret/effect-schema.js.map +1 -0
  642. package/dist/secret/feature.d.ts +103 -0
  643. package/dist/secret/feature.d.ts.map +1 -0
  644. package/dist/secret/feature.js +103 -0
  645. package/dist/secret/feature.js.map +1 -0
  646. package/dist/secret/index.d.ts +3 -0
  647. package/dist/secret/index.d.ts.map +1 -0
  648. package/dist/secret/index.js +3 -0
  649. package/dist/secret/index.js.map +1 -0
  650. package/dist/session/agent-permission-contract.d.ts +6 -5
  651. package/dist/session/agent-permission-contract.d.ts.map +1 -1
  652. package/dist/session/agent-permission-effect-schema.d.ts +11 -9
  653. package/dist/session/agent-permission-effect-schema.d.ts.map +1 -1
  654. package/dist/session/agent-permission-effect-schema.js +2 -2
  655. package/dist/session/agent-permission-effect-schema.js.map +1 -1
  656. package/dist/session/contract.d.ts +726 -110
  657. package/dist/session/contract.d.ts.map +1 -1
  658. package/dist/session/contract.js +33 -4
  659. package/dist/session/contract.js.map +1 -1
  660. package/dist/session/effect-schema.d.ts +1832 -263
  661. package/dist/session/effect-schema.d.ts.map +1 -1
  662. package/dist/session/effect-schema.js +448 -44
  663. package/dist/session/effect-schema.js.map +1 -1
  664. package/dist/session/feature.d.ts +778 -23
  665. package/dist/session/feature.d.ts.map +1 -1
  666. package/dist/session/feature.js +711 -2
  667. package/dist/session/feature.js.map +1 -1
  668. package/dist/session/index.d.ts +5 -3
  669. package/dist/session/index.d.ts.map +1 -1
  670. package/dist/session/index.js +5 -3
  671. package/dist/session/index.js.map +1 -1
  672. package/dist/session/observation-contract.d.ts +2 -2
  673. package/dist/session/observation-effect-schema.d.ts +7 -2
  674. package/dist/session/observation-effect-schema.d.ts.map +1 -1
  675. package/dist/session/observation-effect-schema.js +6 -1
  676. package/dist/session/observation-effect-schema.js.map +1 -1
  677. package/dist/session/placement/contract.d.ts +35 -0
  678. package/dist/session/placement/contract.d.ts.map +1 -0
  679. package/dist/session/placement/contract.js +5 -0
  680. package/dist/session/placement/contract.js.map +1 -0
  681. package/dist/session/placement/effect-schema.d.ts +55 -0
  682. package/dist/session/placement/effect-schema.d.ts.map +1 -0
  683. package/dist/session/placement/effect-schema.js +76 -0
  684. package/dist/session/placement/effect-schema.js.map +1 -0
  685. package/dist/session/placement/index.d.ts +2 -0
  686. package/dist/session/placement/index.d.ts.map +1 -0
  687. package/dist/session/placement/index.js +2 -0
  688. package/dist/session/placement/index.js.map +1 -0
  689. package/dist/session/policy.d.ts +102 -0
  690. package/dist/session/policy.d.ts.map +1 -1
  691. package/dist/session/policy.js +123 -4
  692. package/dist/session/policy.js.map +1 -1
  693. package/dist/session/stop-resume-contract.d.ts +79 -2
  694. package/dist/session/stop-resume-contract.d.ts.map +1 -1
  695. package/dist/session/stop-resume-contract.js +5 -1
  696. package/dist/session/stop-resume-contract.js.map +1 -1
  697. package/dist/session/worktree-effect-schema.d.ts +37 -1
  698. package/dist/session/worktree-effect-schema.d.ts.map +1 -1
  699. package/dist/session/worktree-effect-schema.js +49 -2
  700. package/dist/session/worktree-effect-schema.js.map +1 -1
  701. package/dist/session-command/contract.d.ts +442 -0
  702. package/dist/session-command/contract.d.ts.map +1 -0
  703. package/dist/session-command/contract.js +12 -0
  704. package/dist/session-command/contract.js.map +1 -0
  705. package/dist/session-command/effect-schema.d.ts +875 -0
  706. package/dist/session-command/effect-schema.d.ts.map +1 -0
  707. package/dist/session-command/effect-schema.js +125 -0
  708. package/dist/session-command/effect-schema.js.map +1 -0
  709. package/dist/session-command/feature.d.ts +141 -0
  710. package/dist/session-command/feature.d.ts.map +1 -0
  711. package/dist/session-command/feature.js +137 -0
  712. package/dist/session-command/feature.js.map +1 -0
  713. package/dist/session-command/index.d.ts +4 -0
  714. package/dist/session-command/index.d.ts.map +1 -0
  715. package/dist/session-command/index.js +4 -0
  716. package/dist/session-command/index.js.map +1 -0
  717. package/dist/session-command/policy.d.ts +33 -0
  718. package/dist/session-command/policy.d.ts.map +1 -0
  719. package/dist/session-command/policy.js +60 -0
  720. package/dist/session-command/policy.js.map +1 -0
  721. package/dist/session-guard/contract.d.ts +6 -4
  722. package/dist/session-guard/contract.d.ts.map +1 -1
  723. package/dist/session-guard/contract.js +25 -4
  724. package/dist/session-guard/contract.js.map +1 -1
  725. package/dist/session-guard/feature.d.ts +66 -1
  726. package/dist/session-guard/feature.d.ts.map +1 -1
  727. package/dist/session-guard/feature.js +62 -1
  728. package/dist/session-guard/feature.js.map +1 -1
  729. package/dist/session-guard/result-effect-schema.d.ts +2 -0
  730. package/dist/session-guard/result-effect-schema.d.ts.map +1 -1
  731. package/dist/session-stream/contract.d.ts +2 -1
  732. package/dist/session-stream/contract.d.ts.map +1 -1
  733. package/dist/session-stream/effect-schema.d.ts +9 -8
  734. package/dist/session-stream/effect-schema.d.ts.map +1 -1
  735. package/dist/skills-sync/contract.d.ts +142 -0
  736. package/dist/skills-sync/contract.d.ts.map +1 -0
  737. package/dist/skills-sync/contract.js +13 -0
  738. package/dist/skills-sync/contract.js.map +1 -0
  739. package/dist/skills-sync/effect-schema.d.ts +312 -0
  740. package/dist/skills-sync/effect-schema.d.ts.map +1 -0
  741. package/dist/skills-sync/effect-schema.js +160 -0
  742. package/dist/skills-sync/effect-schema.js.map +1 -0
  743. package/dist/skills-sync/feature.d.ts +102 -0
  744. package/dist/skills-sync/feature.d.ts.map +1 -0
  745. package/dist/skills-sync/feature.js +102 -0
  746. package/dist/skills-sync/feature.js.map +1 -0
  747. package/dist/skills-sync/index.d.ts +3 -0
  748. package/dist/skills-sync/index.d.ts.map +1 -0
  749. package/dist/skills-sync/index.js +3 -0
  750. package/dist/skills-sync/index.js.map +1 -0
  751. package/dist/team-workspace/contract.d.ts +1 -0
  752. package/dist/team-workspace/contract.d.ts.map +1 -1
  753. package/dist/team-workspace/effect-schema.d.ts +2 -0
  754. package/dist/team-workspace/effect-schema.d.ts.map +1 -1
  755. package/dist/team-workspace/feature.d.ts +10 -0
  756. package/dist/team-workspace/feature.d.ts.map +1 -1
  757. package/dist/team-workspace/feature.js +10 -0
  758. package/dist/team-workspace/feature.js.map +1 -1
  759. package/dist/terminal/contract.d.ts +1 -0
  760. package/dist/terminal/contract.d.ts.map +1 -1
  761. package/dist/terminal/effect-schema.d.ts +2 -0
  762. package/dist/terminal/effect-schema.d.ts.map +1 -1
  763. package/dist/terminal/feature.d.ts +281 -0
  764. package/dist/terminal/feature.d.ts.map +1 -1
  765. package/dist/terminal/feature.js +289 -0
  766. package/dist/terminal/feature.js.map +1 -1
  767. package/dist/turn/contract.d.ts +621 -4
  768. package/dist/turn/contract.d.ts.map +1 -1
  769. package/dist/turn/contract.js +18 -4
  770. package/dist/turn/contract.js.map +1 -1
  771. package/dist/turn/effect-schema.d.ts +1461 -158
  772. package/dist/turn/effect-schema.d.ts.map +1 -1
  773. package/dist/turn/effect-schema.js +107 -1
  774. package/dist/turn/effect-schema.js.map +1 -1
  775. package/dist/turn/index.d.ts +2 -2
  776. package/dist/turn/index.d.ts.map +1 -1
  777. package/dist/turn/index.js +2 -2
  778. package/dist/turn/index.js.map +1 -1
  779. package/dist/turn/policy.d.ts +54 -0
  780. package/dist/turn/policy.d.ts.map +1 -1
  781. package/dist/turn/policy.js +74 -0
  782. package/dist/turn/policy.js.map +1 -1
  783. package/dist/voice/effect-schema.d.ts +1 -0
  784. package/dist/voice/effect-schema.d.ts.map +1 -1
  785. package/dist/voice/feature.d.ts +68 -0
  786. package/dist/voice/feature.d.ts.map +1 -1
  787. package/dist/voice/feature.js +32 -0
  788. package/dist/voice/feature.js.map +1 -1
  789. package/dist/voice/relay-contract.d.ts +1 -0
  790. package/dist/voice/relay-contract.d.ts.map +1 -1
  791. package/dist/voice/relay-effect-schema.d.ts +2 -0
  792. package/dist/voice/relay-effect-schema.d.ts.map +1 -1
  793. package/dist/webhooks/contract.d.ts +37 -21
  794. package/dist/webhooks/contract.d.ts.map +1 -1
  795. package/dist/webhooks/contract.js +2 -1
  796. package/dist/webhooks/contract.js.map +1 -1
  797. package/dist/webhooks/effect-schema.d.ts +46 -32
  798. package/dist/webhooks/effect-schema.d.ts.map +1 -1
  799. package/dist/webhooks/effect-schema.js +27 -7
  800. package/dist/webhooks/effect-schema.js.map +1 -1
  801. package/dist/webhooks/feature.d.ts +23 -3
  802. package/dist/webhooks/feature.d.ts.map +1 -1
  803. package/dist/webhooks/feature.js +23 -3
  804. package/dist/webhooks/feature.js.map +1 -1
  805. package/dist/webhooks/hook-effect-schema.d.ts +34 -3
  806. package/dist/webhooks/hook-effect-schema.d.ts.map +1 -1
  807. package/dist/webhooks/hook-effect-schema.js +46 -3
  808. package/dist/webhooks/hook-effect-schema.js.map +1 -1
  809. package/dist/webhooks/index.d.ts +2 -1
  810. package/dist/webhooks/index.d.ts.map +1 -1
  811. package/dist/webhooks/index.js +2 -1
  812. package/dist/webhooks/index.js.map +1 -1
  813. package/dist/webhooks/policy.d.ts +16 -0
  814. package/dist/webhooks/policy.d.ts.map +1 -0
  815. package/dist/webhooks/policy.js +16 -0
  816. package/dist/webhooks/policy.js.map +1 -0
  817. package/package.json +9 -3
  818. package/dist/configuration/configuration.d.ts +0 -65
  819. package/dist/configuration/configuration.d.ts.map +0 -1
  820. package/dist/configuration/configuration.js +0 -101
  821. package/dist/configuration/configuration.js.map +0 -1
  822. package/dist/configuration/index.d.ts +0 -2
  823. package/dist/configuration/index.d.ts.map +0 -1
  824. package/dist/configuration/index.js +0 -2
  825. package/dist/configuration/index.js.map +0 -1
@@ -1,5 +1,4 @@
1
1
  import * as Schema from "effect/Schema";
2
- import { SESSION_EFFORT_LEVELS, SESSION_PERMISSION_MODES } 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
@@ -15,14 +14,12 @@ export declare const sessionTitleEffectSchema: Schema.String;
15
14
  export declare const sessionLabelsEffectSchema: Schema.$Record<Schema.String, Schema.String>;
16
15
  /** 1 to 100 items. */
17
16
  export declare const pageSizeEffectSchema: Schema.Int;
18
- export declare const sessionExecutorKindEffectSchema: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
19
- /** The Node issues an Agent's identifier when a person previews its creation. */
20
- export declare const agentIdentifierEffectSchema: Schema.String;
17
+ export declare const sessionStateEffectSchema: Schema.Literals<readonly ["idle", "starting", "running", "waiting-approval", "interrupted", "recovering", "stopping", "stopped", "failed"]>;
21
18
  export declare const sessionEffortEffectSchema: Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>;
22
- export declare const supportsEffort: (kind: keyof typeof SESSION_EFFORT_LEVELS, effort: string) => boolean;
19
+ export declare const supportsEffort: (kind: string, effort: string) => boolean;
23
20
  /** A permission mode either vendor CLI documents; the Node checks it against the Session's executor kind. */
24
21
  export declare const sessionPermissionEffectSchema: Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>;
25
- export declare const supportsPermission: (kind: keyof typeof SESSION_PERMISSION_MODES, permission: string) => boolean;
22
+ export declare const supportsPermission: (kind: string, permission: string) => boolean;
26
23
  export declare const sessionEffectSchema: Schema.Struct<{
27
24
  readonly createdAt: Schema.String;
28
25
  readonly id: Schema.String;
@@ -48,7 +45,7 @@ export declare const sessionEffectSchema: Schema.Struct<{
48
45
  readonly executor: Schema.optional<Schema.Struct<{
49
46
  readonly connectionId: Schema.String;
50
47
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
51
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
48
+ readonly kind: Schema.String;
52
49
  readonly model: Schema.optional<Schema.String>;
53
50
  }>>;
54
51
  /** Why the runtime of a failed Session failed, when Maia knows. */
@@ -56,12 +53,27 @@ export declare const sessionEffectSchema: Schema.Struct<{
56
53
  readonly code: Schema.String;
57
54
  readonly message: Schema.String;
58
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
+ }>>>;
59
69
  /** Set at creation; absent when the Session has no labels. */
60
70
  readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
61
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. */
62
72
  readonly latestTurnId: Schema.optional<Schema.String>;
63
73
  /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
64
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>;
65
77
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
66
78
  readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
67
79
  /**
@@ -136,7 +148,7 @@ export declare const sessionEventEffectSchema: Schema.Union<readonly [Schema.Str
136
148
  readonly executor: Schema.optional<Schema.Struct<{
137
149
  readonly connectionId: Schema.String;
138
150
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
139
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
151
+ readonly kind: Schema.String;
140
152
  readonly model: Schema.optional<Schema.String>;
141
153
  }>>;
142
154
  /** The permission mode a host-authority Session passes to its vendor CLI. */
@@ -377,7 +389,7 @@ export declare const sessionCreateParametersEffectSchema: Schema.Struct<{
377
389
  readonly version: Schema.String;
378
390
  }>>;
379
391
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
380
- readonly executor: Schema.optional<Schema.Literals<readonly ["claude-code", "codex-cli"]>>;
392
+ readonly executor: Schema.optional<Schema.String>;
381
393
  readonly hostAuthority: Schema.optional<Schema.Literal<true>>;
382
394
  readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
383
395
  readonly model: Schema.optional<Schema.String>;
@@ -386,26 +398,15 @@ export declare const sessionCreateParametersEffectSchema: Schema.Struct<{
386
398
  readonly title: Schema.optional<Schema.String>;
387
399
  readonly worktree: Schema.optional<Schema.Struct<{
388
400
  readonly baseRef: Schema.String;
401
+ readonly branch: Schema.optional<Schema.String>;
389
402
  }>>;
390
403
  }>;
391
- export declare const sessionSpawnParametersEffectSchema: Schema.Struct<{
392
- readonly commandId: Schema.String;
393
- readonly expectedRevision: Schema.Literal<"0">;
394
- readonly workspaceId: Schema.String;
395
- readonly definitionRef: Schema.optional<Schema.Struct<{
396
- readonly contentDigest: Schema.String;
397
- readonly key: Schema.String;
398
- readonly version: Schema.String;
399
- }>>;
400
- readonly harness: Schema.Literals<readonly ["maia-agent", "pi"]>;
401
- readonly parentSessionId: Schema.String;
402
- }>;
403
404
  /**
404
405
  * One page of Sessions in creation order: of one Project, or of the whole
405
406
  * Node without `projectId`; without `afterCursor` the first page and without
406
407
  * `limit` `DEFAULT_SESSION_LIST_PAGE_SIZE` Sessions. `states` keeps Sessions
407
408
  * in those states; `attention` keeps Sessions the Node reports an attention
408
- * value for.
409
+ * value for; `parentSessionId` keeps the direct children of that Session.
409
410
  */
410
411
  export declare const sessionListParametersEffectSchema: Schema.Struct<{
411
412
  readonly afterCursor: Schema.optional<Schema.String>;
@@ -415,6 +416,8 @@ export declare const sessionListParametersEffectSchema: Schema.Struct<{
415
416
  /** Sessions that carry these labels, each with the given value. */
416
417
  readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
417
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>;
418
421
  readonly projectId: Schema.optional<Schema.String>;
419
422
  /** Keeps non-archived Sessions that stopped, failed or sat idle for `idleForSeconds`. */
420
423
  readonly settled: Schema.optional<Schema.Literal<true>>;
@@ -441,6 +444,342 @@ export declare const sessionStartParametersEffectSchema: Schema.Struct<{
441
444
  readonly expectedRevision: Schema.String;
442
445
  readonly sessionId: Schema.String;
443
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
+ }>;
444
783
  /** A new title at the Session's current revision. */
445
784
  export declare const sessionRenameParametersEffectSchema: Schema.Struct<{
446
785
  readonly commandId: Schema.String;
@@ -448,16 +787,24 @@ export declare const sessionRenameParametersEffectSchema: Schema.Struct<{
448
787
  readonly sessionId: Schema.String;
449
788
  readonly title: Schema.String;
450
789
  }>;
451
- /** Stop and resume take the same compare-and-set input as start. */
790
+ /** Stop takes the same compare-and-set input as start. */
452
791
  export declare const sessionStopParametersEffectSchema: Schema.Struct<{
453
792
  readonly commandId: Schema.String;
454
793
  readonly expectedRevision: Schema.String;
455
794
  readonly sessionId: Schema.String;
456
795
  }>;
796
+ /** Resume takes the compare-and-set input of start, and the parent claim of a child. */
457
797
  export declare const sessionResumeParametersEffectSchema: Schema.Struct<{
458
798
  readonly commandId: Schema.String;
459
799
  readonly expectedRevision: Schema.String;
460
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
+ }>>;
461
808
  }>;
462
809
  export declare const sessionMessageSendParametersEffectSchema: Schema.Struct<{
463
810
  readonly body: Schema.String;
@@ -597,6 +944,7 @@ export declare const sessionMessageSendResultEffectSchema: Schema.Struct<{
597
944
  readonly createdAt: Schema.String;
598
945
  readonly eventCursor: Schema.String;
599
946
  readonly method: Schema.String;
947
+ readonly proposedBy: Schema.optional<Schema.String>;
600
948
  readonly receiptId: Schema.String;
601
949
  readonly schemaVersion: Schema.Literal<1>;
602
950
  readonly state: Schema.Literal<"succeeded">;
@@ -643,6 +991,7 @@ export declare const sessionInboxAckResultEffectSchema: Schema.Struct<{
643
991
  readonly createdAt: Schema.String;
644
992
  readonly eventCursor: Schema.String;
645
993
  readonly method: Schema.String;
994
+ readonly proposedBy: Schema.optional<Schema.String>;
646
995
  readonly receiptId: Schema.String;
647
996
  readonly schemaVersion: Schema.Literal<1>;
648
997
  readonly state: Schema.Literal<"succeeded">;
@@ -663,6 +1012,7 @@ export declare const sessionCreateResultEffectSchema: Schema.Struct<{
663
1012
  readonly createdAt: Schema.String;
664
1013
  readonly eventCursor: Schema.String;
665
1014
  readonly method: Schema.String;
1015
+ readonly proposedBy: Schema.optional<Schema.String>;
666
1016
  readonly receiptId: Schema.String;
667
1017
  readonly schemaVersion: Schema.Literal<1>;
668
1018
  readonly state: Schema.Literal<"succeeded">;
@@ -697,7 +1047,7 @@ export declare const sessionCreateResultEffectSchema: Schema.Struct<{
697
1047
  readonly executor: Schema.optional<Schema.Struct<{
698
1048
  readonly connectionId: Schema.String;
699
1049
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
700
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
1050
+ readonly kind: Schema.String;
701
1051
  readonly model: Schema.optional<Schema.String>;
702
1052
  }>>;
703
1053
  /** Why the runtime of a failed Session failed, when Maia knows. */
@@ -705,12 +1055,27 @@ export declare const sessionCreateResultEffectSchema: Schema.Struct<{
705
1055
  readonly code: Schema.String;
706
1056
  readonly message: Schema.String;
707
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
+ }>>>;
708
1071
  /** Set at creation; absent when the Session has no labels. */
709
1072
  readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
710
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. */
711
1074
  readonly latestTurnId: Schema.optional<Schema.String>;
712
1075
  /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
713
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>;
714
1079
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
715
1080
  readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
716
1081
  /**
@@ -761,11 +1126,24 @@ export declare const sessionCreateResultEffectSchema: Schema.Struct<{
761
1126
  }>>;
762
1127
  }>;
763
1128
  }>;
764
- 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<{
765
1144
  readonly delivery: Schema.Literals<readonly ["new", "duplicate"]>;
766
- readonly harness: Schema.Literals<readonly ["maia-agent", "pi"]>;
767
- readonly method: Schema.Literal<"session.spawn">;
768
- readonly parentSessionId: Schema.String;
1145
+ readonly handoff: Schema.String;
1146
+ readonly path: Schema.Literal<"context-handoff">;
769
1147
  readonly receipt: Schema.Struct<{
770
1148
  readonly actorId: Schema.String;
771
1149
  readonly aggregateRevision: Schema.String;
@@ -773,6 +1151,7 @@ export declare const sessionSpawnResultEffectSchema: Schema.Struct<{
773
1151
  readonly createdAt: Schema.String;
774
1152
  readonly eventCursor: Schema.String;
775
1153
  readonly method: Schema.String;
1154
+ readonly proposedBy: Schema.optional<Schema.String>;
776
1155
  readonly receiptId: Schema.String;
777
1156
  readonly schemaVersion: Schema.Literal<1>;
778
1157
  readonly state: Schema.Literal<"succeeded">;
@@ -807,7 +1186,7 @@ export declare const sessionSpawnResultEffectSchema: Schema.Struct<{
807
1186
  readonly executor: Schema.optional<Schema.Struct<{
808
1187
  readonly connectionId: Schema.String;
809
1188
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
810
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
1189
+ readonly kind: Schema.String;
811
1190
  readonly model: Schema.optional<Schema.String>;
812
1191
  }>>;
813
1192
  /** Why the runtime of a failed Session failed, when Maia knows. */
@@ -815,12 +1194,27 @@ export declare const sessionSpawnResultEffectSchema: Schema.Struct<{
815
1194
  readonly code: Schema.String;
816
1195
  readonly message: Schema.String;
817
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
+ }>>>;
818
1210
  /** Set at creation; absent when the Session has no labels. */
819
1211
  readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
820
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. */
821
1213
  readonly latestTurnId: Schema.optional<Schema.String>;
822
1214
  /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
823
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>;
824
1218
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
825
1219
  readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
826
1220
  /**
@@ -870,13 +1264,48 @@ export declare const sessionSpawnResultEffectSchema: Schema.Struct<{
870
1264
  readonly state: Schema.Literals<readonly ["active", "archived", "removed"]>;
871
1265
  }>>;
872
1266
  }>;
1267
+ readonly sourceSessionId: Schema.String;
1268
+ readonly method: Schema.Literal<"session.fork.confirm">;
873
1269
  }>;
874
- export declare const sessionListResultEffectSchema: Schema.Struct<{
875
- readonly attention: Schema.optional<Schema.$Array<Schema.Struct<{
876
- readonly attention: Schema.Literals<readonly ["failed", "approval_pending", "question", "turn_failed", "stalled", "settled_unreviewed"]>;
877
- readonly sessionId: Schema.String;
878
- }>>>;
879
- 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<{
880
1309
  readonly createdAt: Schema.String;
881
1310
  readonly id: Schema.String;
882
1311
  readonly projectId: Schema.String;
@@ -901,7 +1330,7 @@ export declare const sessionListResultEffectSchema: Schema.Struct<{
901
1330
  readonly executor: Schema.optional<Schema.Struct<{
902
1331
  readonly connectionId: Schema.String;
903
1332
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
904
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
1333
+ readonly kind: Schema.String;
905
1334
  readonly model: Schema.optional<Schema.String>;
906
1335
  }>>;
907
1336
  /** Why the runtime of a failed Session failed, when Maia knows. */
@@ -909,12 +1338,27 @@ export declare const sessionListResultEffectSchema: Schema.Struct<{
909
1338
  readonly code: Schema.String;
910
1339
  readonly message: Schema.String;
911
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
+ }>>>;
912
1354
  /** Set at creation; absent when the Session has no labels. */
913
1355
  readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
914
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. */
915
1357
  readonly latestTurnId: Schema.optional<Schema.String>;
916
1358
  /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
917
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>;
918
1362
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
919
1363
  readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
920
1364
  /**
@@ -963,51 +1407,153 @@ export declare const sessionListResultEffectSchema: Schema.Struct<{
963
1407
  }>>>;
964
1408
  readonly state: Schema.Literals<readonly ["active", "archived", "removed"]>;
965
1409
  }>>;
966
- }>>;
967
- readonly method: Schema.Literal<"session.list">;
968
- readonly nextCursor: Schema.optional<Schema.String>;
1410
+ }>;
1411
+ readonly sourceSessionId: Schema.String;
1412
+ readonly method: Schema.Literal<"session.switch.confirm">;
969
1413
  }>;
970
- export declare const sessionShowResultEffectSchema: Schema.Struct<{
971
- readonly method: Schema.Literal<"session.show">;
972
- readonly session: Schema.Struct<{
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;
1430
+ }>>;
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;
973
1441
  readonly createdAt: Schema.String;
974
- readonly id: Schema.String;
975
- readonly projectId: Schema.String;
976
- readonly revision: Schema.String;
977
- readonly state: Schema.Literals<readonly ["idle", "starting", "running", "waiting-approval", "interrupted", "recovering", "stopping", "stopped", "failed"]>;
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
+ }>;
978
1452
  readonly updatedAt: Schema.String;
979
- readonly workspaceId: Schema.String;
980
- readonly workspaceRevision: Schema.String;
981
- /** What the Session is doing; present on `session.list` and `session.show`. */
982
- readonly activity: Schema.optional<Schema.Literals<readonly ["stopped", "waiting_approval", "working", "idle"]>>;
983
- readonly agentDefinitionRef: Schema.optional<Schema.Struct<{
984
- readonly contentDigest: Schema.String;
985
- readonly key: Schema.String;
986
- readonly version: Schema.String;
987
- }>>;
988
- /**
989
- * `none` for a host-authority Session: the vendor harness runs as the
990
- * Node's user with no Maia sandbox ([D-198](https://maia-os.vllnt.com/en/docs/decisions#d-198)).
991
- * A sandboxed Session carries none.
992
- */
993
- readonly containment: Schema.optional<Schema.Literal<"none">>;
994
- readonly executor: Schema.optional<Schema.Struct<{
995
- readonly connectionId: Schema.String;
996
- readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
997
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
998
- readonly model: Schema.optional<Schema.String>;
999
- }>>;
1000
- /** Why the runtime of a failed Session failed, when Maia knows. */
1001
- readonly failure: Schema.optional<Schema.Struct<{
1002
- readonly code: 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;
1003
1534
  readonly message: Schema.String;
1004
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
+ }>>>;
1005
1549
  /** Set at creation; absent when the Session has no labels. */
1006
1550
  readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
1007
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. */
1008
1552
  readonly latestTurnId: Schema.optional<Schema.String>;
1009
1553
  /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
1010
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>;
1011
1557
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
1012
1558
  readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
1013
1559
  /**
@@ -1058,6 +1604,306 @@ export declare const sessionShowResultEffectSchema: Schema.Struct<{
1058
1604
  }>>;
1059
1605
  }>;
1060
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
+ }>;
1061
1907
  /** `satisfied` is false when the bounded wait ended first; `session` is then its last read. */
1062
1908
  export declare const sessionWaitResultEffectSchema: Schema.Struct<{
1063
1909
  readonly method: Schema.Literal<"session.wait">;
@@ -1087,7 +1933,7 @@ export declare const sessionWaitResultEffectSchema: Schema.Struct<{
1087
1933
  readonly executor: Schema.optional<Schema.Struct<{
1088
1934
  readonly connectionId: Schema.String;
1089
1935
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
1090
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
1936
+ readonly kind: Schema.String;
1091
1937
  readonly model: Schema.optional<Schema.String>;
1092
1938
  }>>;
1093
1939
  /** Why the runtime of a failed Session failed, when Maia knows. */
@@ -1095,12 +1941,27 @@ export declare const sessionWaitResultEffectSchema: Schema.Struct<{
1095
1941
  readonly code: Schema.String;
1096
1942
  readonly message: Schema.String;
1097
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
+ }>>>;
1098
1957
  /** Set at creation; absent when the Session has no labels. */
1099
1958
  readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
1100
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. */
1101
1960
  readonly latestTurnId: Schema.optional<Schema.String>;
1102
1961
  /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
1103
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>;
1104
1965
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
1105
1966
  readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
1106
1967
  /**
@@ -1178,7 +2039,7 @@ export declare const sessionEventsListResultEffectSchema: Schema.Struct<{
1178
2039
  readonly executor: Schema.optional<Schema.Struct<{
1179
2040
  readonly connectionId: Schema.String;
1180
2041
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
1181
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
2042
+ readonly kind: Schema.String;
1182
2043
  readonly model: Schema.optional<Schema.String>;
1183
2044
  }>>;
1184
2045
  /** The permission mode a host-authority Session passes to its vendor CLI. */
@@ -1406,6 +2267,7 @@ export declare const sessionStartResultEffectSchema: Schema.Struct<{
1406
2267
  readonly createdAt: Schema.String;
1407
2268
  readonly eventCursor: Schema.String;
1408
2269
  readonly method: Schema.String;
2270
+ readonly proposedBy: Schema.optional<Schema.String>;
1409
2271
  readonly receiptId: Schema.String;
1410
2272
  readonly schemaVersion: Schema.Literal<1>;
1411
2273
  readonly state: Schema.Literal<"succeeded">;
@@ -1440,7 +2302,7 @@ export declare const sessionStartResultEffectSchema: Schema.Struct<{
1440
2302
  readonly executor: Schema.optional<Schema.Struct<{
1441
2303
  readonly connectionId: Schema.String;
1442
2304
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
1443
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
2305
+ readonly kind: Schema.String;
1444
2306
  readonly model: Schema.optional<Schema.String>;
1445
2307
  }>>;
1446
2308
  /** Why the runtime of a failed Session failed, when Maia knows. */
@@ -1448,12 +2310,27 @@ export declare const sessionStartResultEffectSchema: Schema.Struct<{
1448
2310
  readonly code: Schema.String;
1449
2311
  readonly message: Schema.String;
1450
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
+ }>>>;
1451
2326
  /** Set at creation; absent when the Session has no labels. */
1452
2327
  readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
1453
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. */
1454
2329
  readonly latestTurnId: Schema.optional<Schema.String>;
1455
2330
  /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
1456
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>;
1457
2334
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
1458
2335
  readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
1459
2336
  /**
@@ -1514,6 +2391,7 @@ export declare const sessionStopResultEffectSchema: Schema.Struct<{
1514
2391
  readonly createdAt: Schema.String;
1515
2392
  readonly eventCursor: Schema.String;
1516
2393
  readonly method: Schema.String;
2394
+ readonly proposedBy: Schema.optional<Schema.String>;
1517
2395
  readonly receiptId: Schema.String;
1518
2396
  readonly schemaVersion: Schema.Literal<1>;
1519
2397
  readonly state: Schema.Literal<"succeeded">;
@@ -1548,7 +2426,7 @@ export declare const sessionStopResultEffectSchema: Schema.Struct<{
1548
2426
  readonly executor: Schema.optional<Schema.Struct<{
1549
2427
  readonly connectionId: Schema.String;
1550
2428
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
1551
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
2429
+ readonly kind: Schema.String;
1552
2430
  readonly model: Schema.optional<Schema.String>;
1553
2431
  }>>;
1554
2432
  /** Why the runtime of a failed Session failed, when Maia knows. */
@@ -1556,12 +2434,27 @@ export declare const sessionStopResultEffectSchema: Schema.Struct<{
1556
2434
  readonly code: Schema.String;
1557
2435
  readonly message: Schema.String;
1558
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
+ }>>>;
1559
2450
  /** Set at creation; absent when the Session has no labels. */
1560
2451
  readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
1561
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. */
1562
2453
  readonly latestTurnId: Schema.optional<Schema.String>;
1563
2454
  /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
1564
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>;
1565
2458
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
1566
2459
  readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
1567
2460
  /**
@@ -1622,6 +2515,7 @@ export declare const sessionResumeResultEffectSchema: Schema.Struct<{
1622
2515
  readonly createdAt: Schema.String;
1623
2516
  readonly eventCursor: Schema.String;
1624
2517
  readonly method: Schema.String;
2518
+ readonly proposedBy: Schema.optional<Schema.String>;
1625
2519
  readonly receiptId: Schema.String;
1626
2520
  readonly schemaVersion: Schema.Literal<1>;
1627
2521
  readonly state: Schema.Literal<"succeeded">;
@@ -1656,7 +2550,7 @@ export declare const sessionResumeResultEffectSchema: Schema.Struct<{
1656
2550
  readonly executor: Schema.optional<Schema.Struct<{
1657
2551
  readonly connectionId: Schema.String;
1658
2552
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
1659
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
2553
+ readonly kind: Schema.String;
1660
2554
  readonly model: Schema.optional<Schema.String>;
1661
2555
  }>>;
1662
2556
  /** Why the runtime of a failed Session failed, when Maia knows. */
@@ -1664,12 +2558,27 @@ export declare const sessionResumeResultEffectSchema: Schema.Struct<{
1664
2558
  readonly code: Schema.String;
1665
2559
  readonly message: Schema.String;
1666
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
+ }>>>;
1667
2574
  /** Set at creation; absent when the Session has no labels. */
1668
2575
  readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
1669
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. */
1670
2577
  readonly latestTurnId: Schema.optional<Schema.String>;
1671
2578
  /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
1672
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>;
1673
2582
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
1674
2583
  readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
1675
2584
  /**
@@ -1730,6 +2639,7 @@ export declare const sessionRenameResultEffectSchema: Schema.Struct<{
1730
2639
  readonly createdAt: Schema.String;
1731
2640
  readonly eventCursor: Schema.String;
1732
2641
  readonly method: Schema.String;
2642
+ readonly proposedBy: Schema.optional<Schema.String>;
1733
2643
  readonly receiptId: Schema.String;
1734
2644
  readonly schemaVersion: Schema.Literal<1>;
1735
2645
  readonly state: Schema.Literal<"succeeded">;
@@ -1764,7 +2674,7 @@ export declare const sessionRenameResultEffectSchema: Schema.Struct<{
1764
2674
  readonly executor: Schema.optional<Schema.Struct<{
1765
2675
  readonly connectionId: Schema.String;
1766
2676
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
1767
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
2677
+ readonly kind: Schema.String;
1768
2678
  readonly model: Schema.optional<Schema.String>;
1769
2679
  }>>;
1770
2680
  /** Why the runtime of a failed Session failed, when Maia knows. */
@@ -1772,12 +2682,27 @@ export declare const sessionRenameResultEffectSchema: Schema.Struct<{
1772
2682
  readonly code: Schema.String;
1773
2683
  readonly message: Schema.String;
1774
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
+ }>>>;
1775
2698
  /** Set at creation; absent when the Session has no labels. */
1776
2699
  readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
1777
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. */
1778
2701
  readonly latestTurnId: Schema.optional<Schema.String>;
1779
2702
  /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
1780
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>;
1781
2706
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
1782
2707
  readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
1783
2708
  /**
@@ -1849,6 +2774,7 @@ export declare const sessionArchiveResultEffectSchema: Schema.Struct<{
1849
2774
  readonly createdAt: Schema.String;
1850
2775
  readonly eventCursor: Schema.String;
1851
2776
  readonly method: Schema.String;
2777
+ readonly proposedBy: Schema.optional<Schema.String>;
1852
2778
  readonly receiptId: Schema.String;
1853
2779
  readonly schemaVersion: Schema.Literal<1>;
1854
2780
  readonly state: Schema.Literal<"succeeded">;
@@ -1883,7 +2809,7 @@ export declare const sessionArchiveResultEffectSchema: Schema.Struct<{
1883
2809
  readonly executor: Schema.optional<Schema.Struct<{
1884
2810
  readonly connectionId: Schema.String;
1885
2811
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
1886
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
2812
+ readonly kind: Schema.String;
1887
2813
  readonly model: Schema.optional<Schema.String>;
1888
2814
  }>>;
1889
2815
  /** Why the runtime of a failed Session failed, when Maia knows. */
@@ -1891,12 +2817,27 @@ export declare const sessionArchiveResultEffectSchema: Schema.Struct<{
1891
2817
  readonly code: Schema.String;
1892
2818
  readonly message: Schema.String;
1893
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
+ }>>>;
1894
2833
  /** Set at creation; absent when the Session has no labels. */
1895
2834
  readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
1896
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. */
1897
2836
  readonly latestTurnId: Schema.optional<Schema.String>;
1898
2837
  /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
1899
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>;
1900
2841
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
1901
2842
  readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
1902
2843
  /**
@@ -1966,7 +2907,7 @@ export declare const sessionRequestPayloadEffectSchema: Schema.Union<readonly [S
1966
2907
  readonly version: Schema.String;
1967
2908
  }>>;
1968
2909
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
1969
- readonly executor: Schema.optional<Schema.Literals<readonly ["claude-code", "codex-cli"]>>;
2910
+ readonly executor: Schema.optional<Schema.String>;
1970
2911
  readonly hostAuthority: Schema.optional<Schema.Literal<true>>;
1971
2912
  readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
1972
2913
  readonly model: Schema.optional<Schema.String>;
@@ -1975,6 +2916,7 @@ export declare const sessionRequestPayloadEffectSchema: Schema.Union<readonly [S
1975
2916
  readonly title: Schema.optional<Schema.String>;
1976
2917
  readonly worktree: Schema.optional<Schema.Struct<{
1977
2918
  readonly baseRef: Schema.String;
2919
+ readonly branch: Schema.optional<Schema.String>;
1978
2920
  }>>;
1979
2921
  }>;
1980
2922
  }>, Schema.Struct<{
@@ -1987,6 +2929,8 @@ export declare const sessionRequestPayloadEffectSchema: Schema.Union<readonly [S
1987
2929
  /** Sessions that carry these labels, each with the given value. */
1988
2930
  readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
1989
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>;
1990
2934
  readonly projectId: Schema.optional<Schema.String>;
1991
2935
  /** Keeps non-archived Sessions that stopped, failed or sat idle for `idleForSeconds`. */
1992
2936
  readonly settled: Schema.optional<Schema.Literal<true>>;
@@ -2007,20 +2951,6 @@ export declare const sessionRequestPayloadEffectSchema: Schema.Union<readonly [S
2007
2951
  readonly states: Schema.optional<Schema.$Array<Schema.Literals<readonly ["idle", "starting", "running", "waiting-approval", "interrupted", "recovering", "stopping", "stopped", "failed"]>>>;
2008
2952
  readonly waitMilliseconds: Schema.Int;
2009
2953
  }>;
2010
- }>, Schema.Struct<{
2011
- readonly method: Schema.Literal<"session.spawn">;
2012
- readonly parameters: Schema.Struct<{
2013
- readonly commandId: Schema.String;
2014
- readonly expectedRevision: Schema.Literal<"0">;
2015
- readonly workspaceId: Schema.String;
2016
- readonly definitionRef: Schema.optional<Schema.Struct<{
2017
- readonly contentDigest: Schema.String;
2018
- readonly key: Schema.String;
2019
- readonly version: Schema.String;
2020
- }>>;
2021
- readonly harness: Schema.Literals<readonly ["maia-agent", "pi"]>;
2022
- readonly parentSessionId: Schema.String;
2023
- }>;
2024
2954
  }>, Schema.Struct<{
2025
2955
  readonly method: Schema.Literal<"session.events.list">;
2026
2956
  readonly parameters: Schema.Struct<{
@@ -2074,6 +3004,13 @@ export declare const sessionRequestPayloadEffectSchema: Schema.Union<readonly [S
2074
3004
  readonly commandId: Schema.String;
2075
3005
  readonly expectedRevision: Schema.String;
2076
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
+ }>>;
2077
3014
  }>;
2078
3015
  }>, Schema.Struct<{
2079
3016
  readonly method: Schema.Literal<"session.diff">;
@@ -2081,6 +3018,11 @@ export declare const sessionRequestPayloadEffectSchema: Schema.Union<readonly [S
2081
3018
  readonly sessionId: Schema.String;
2082
3019
  readonly stat: Schema.optional<Schema.Boolean>;
2083
3020
  }>;
3021
+ }>, Schema.Struct<{
3022
+ readonly method: Schema.Literal<"session.git.status">;
3023
+ readonly parameters: Schema.Struct<{
3024
+ readonly sessionId: Schema.String;
3025
+ }>;
2084
3026
  }>, Schema.Struct<{
2085
3027
  readonly method: Schema.Literal<"session.archive">;
2086
3028
  readonly parameters: Schema.Struct<{
@@ -2098,6 +3040,112 @@ export declare const sessionRequestPayloadEffectSchema: Schema.Union<readonly [S
2098
3040
  readonly sessionId: Schema.String;
2099
3041
  readonly title: Schema.String;
2100
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
+ }>;
2101
3149
  }>]>;
2102
3150
  export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Schema.Struct<{
2103
3151
  readonly delivery: Schema.Literals<readonly ["new", "duplicate"]>;
@@ -2109,6 +3157,7 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2109
3157
  readonly createdAt: Schema.String;
2110
3158
  readonly eventCursor: Schema.String;
2111
3159
  readonly method: Schema.String;
3160
+ readonly proposedBy: Schema.optional<Schema.String>;
2112
3161
  readonly receiptId: Schema.String;
2113
3162
  readonly schemaVersion: Schema.Literal<1>;
2114
3163
  readonly state: Schema.Literal<"succeeded">;
@@ -2143,7 +3192,7 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2143
3192
  readonly executor: Schema.optional<Schema.Struct<{
2144
3193
  readonly connectionId: Schema.String;
2145
3194
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
2146
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
3195
+ readonly kind: Schema.String;
2147
3196
  readonly model: Schema.optional<Schema.String>;
2148
3197
  }>>;
2149
3198
  /** Why the runtime of a failed Session failed, when Maia knows. */
@@ -2151,12 +3200,27 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2151
3200
  readonly code: Schema.String;
2152
3201
  readonly message: Schema.String;
2153
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
+ }>>>;
2154
3216
  /** Set at creation; absent when the Session has no labels. */
2155
3217
  readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
2156
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. */
2157
3219
  readonly latestTurnId: Schema.optional<Schema.String>;
2158
3220
  /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
2159
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>;
2160
3224
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
2161
3225
  readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
2162
3226
  /**
@@ -2241,6 +3305,7 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2241
3305
  readonly createdAt: Schema.String;
2242
3306
  readonly eventCursor: Schema.String;
2243
3307
  readonly method: Schema.String;
3308
+ readonly proposedBy: Schema.optional<Schema.String>;
2244
3309
  readonly receiptId: Schema.String;
2245
3310
  readonly schemaVersion: Schema.Literal<1>;
2246
3311
  readonly state: Schema.Literal<"succeeded">;
@@ -2315,7 +3380,7 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2315
3380
  readonly executor: Schema.optional<Schema.Struct<{
2316
3381
  readonly connectionId: Schema.String;
2317
3382
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
2318
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
3383
+ readonly kind: Schema.String;
2319
3384
  readonly model: Schema.optional<Schema.String>;
2320
3385
  }>>;
2321
3386
  /** Why the runtime of a failed Session failed, when Maia knows. */
@@ -2323,12 +3388,27 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2323
3388
  readonly code: Schema.String;
2324
3389
  readonly message: Schema.String;
2325
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
+ }>>>;
2326
3404
  /** Set at creation; absent when the Session has no labels. */
2327
3405
  readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
2328
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. */
2329
3407
  readonly latestTurnId: Schema.optional<Schema.String>;
2330
3408
  /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
2331
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>;
2332
3412
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
2333
3413
  readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
2334
3414
  /**
@@ -2403,6 +3483,7 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2403
3483
  readonly createdAt: Schema.String;
2404
3484
  readonly eventCursor: Schema.String;
2405
3485
  readonly method: Schema.String;
3486
+ readonly proposedBy: Schema.optional<Schema.String>;
2406
3487
  readonly receiptId: Schema.String;
2407
3488
  readonly schemaVersion: Schema.Literal<1>;
2408
3489
  readonly state: Schema.Literal<"succeeded">;
@@ -2431,7 +3512,7 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2431
3512
  readonly rssBytes: Schema.optional<Schema.Int>;
2432
3513
  readonly wallTimeMilliseconds: Schema.optional<Schema.Int>;
2433
3514
  }>>;
2434
- readonly runtime: Schema.Literals<readonly ["claude-code", "codex-cli", "pi"]>;
3515
+ readonly runtime: Schema.String;
2435
3516
  readonly runtimeThreadId: Schema.String;
2436
3517
  readonly startedAt: Schema.String;
2437
3518
  readonly turn: Schema.optional<Schema.Struct<{
@@ -2448,6 +3529,14 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2448
3529
  readonly stallAfterSeconds: Schema.Int;
2449
3530
  }>, Schema.Struct<{
2450
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
+ }>>>;
2451
3540
  readonly session: Schema.Struct<{
2452
3541
  readonly createdAt: Schema.String;
2453
3542
  readonly id: Schema.String;
@@ -2473,7 +3562,7 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2473
3562
  readonly executor: Schema.optional<Schema.Struct<{
2474
3563
  readonly connectionId: Schema.String;
2475
3564
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
2476
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
3565
+ readonly kind: Schema.String;
2477
3566
  readonly model: Schema.optional<Schema.String>;
2478
3567
  }>>;
2479
3568
  /** Why the runtime of a failed Session failed, when Maia knows. */
@@ -2481,12 +3570,27 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2481
3570
  readonly code: Schema.String;
2482
3571
  readonly message: Schema.String;
2483
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
+ }>>>;
2484
3586
  /** Set at creation; absent when the Session has no labels. */
2485
3587
  readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
2486
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. */
2487
3589
  readonly latestTurnId: Schema.optional<Schema.String>;
2488
3590
  /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
2489
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>;
2490
3594
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
2491
3595
  readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
2492
3596
  /**
@@ -2564,7 +3668,7 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2564
3668
  readonly executor: Schema.optional<Schema.Struct<{
2565
3669
  readonly connectionId: Schema.String;
2566
3670
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
2567
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
3671
+ readonly kind: Schema.String;
2568
3672
  readonly model: Schema.optional<Schema.String>;
2569
3673
  }>>;
2570
3674
  /** Why the runtime of a failed Session failed, when Maia knows. */
@@ -2572,121 +3676,27 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2572
3676
  readonly code: Schema.String;
2573
3677
  readonly message: Schema.String;
2574
3678
  }>>;
2575
- /** Set at creation; absent when the Session has no labels. */
2576
- readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
2577
- /** 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. */
2578
- readonly latestTurnId: Schema.optional<Schema.String>;
2579
- /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
2580
- readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
2581
- /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
2582
- readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
2583
- /**
2584
- * The prompt a `question` or `approval` Session waits on, with its text and
2585
- * options. `session.list` and `session.show` return it while `status` is
2586
- * one of the two and never otherwise: a `question` names a question
2587
- * prompt, an `approval` any other kind. A reader who may not read the
2588
- * approval (a Session principal listing its Project) gets the status without
2589
- * it.
2590
- */
2591
- readonly prompt: Schema.optional<Schema.Struct<{
2592
- readonly approvalId: Schema.String;
2593
- readonly expiresAt: Schema.String;
2594
- readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
2595
- readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
2596
- readonly label: Schema.String;
2597
- readonly optionId: Schema.String;
2598
- }>>>;
2599
- readonly summary: Schema.optional<Schema.String>;
2600
- }>>;
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>;
2601
3681
  /**
2602
- * Why a recovering Session stopped retrying: its retries ran out and it waits
2603
- * for `session.resume` or a Node start. Absent while it still retries and in
2604
- * every other state.
3682
+ * The board tasks the Session holds now, newest claim first, at most
3683
+ * `MAX_BOARD_HELD_TASKS`; `heldTaskCount` counts every one.
2605
3684
  */
2606
- readonly recovery: Schema.optional<Schema.Struct<{
2607
- readonly code: Schema.String;
2608
- readonly message: Schema.String;
2609
- }>>;
2610
- readonly schemaVersion: Schema.Literal<4>;
2611
- /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
2612
- readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
2613
- /** What the Session is doing; present on `session.list` and `session.show`. */
2614
- readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "compacting", "rate_limited", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
2615
- /** Set at creation or by a rename; otherwise the first line of the first turn. */
2616
- readonly title: Schema.optional<Schema.String>;
2617
- /** A coding Session's own worktree; a reading Session has none. */
2618
- readonly worktree: Schema.optional<Schema.Struct<{
2619
- readonly baseRef: Schema.String;
2620
- readonly baseRevision: Schema.String;
2621
- readonly branch: Schema.String;
2622
- readonly setup: Schema.Literals<readonly ["none", "pending", "succeeded", "failed"]>;
2623
- readonly skills: Schema.optional<Schema.$Array<Schema.Struct<{
2624
- readonly digest: Schema.String;
2625
- readonly name: Schema.String;
2626
- }>>>;
2627
- readonly state: Schema.Literals<readonly ["active", "archived", "removed"]>;
2628
- }>>;
2629
- }>;
2630
- }>, Schema.Struct<{
2631
- readonly delivery: Schema.Literals<readonly ["new", "duplicate"]>;
2632
- readonly harness: Schema.Literals<readonly ["maia-agent", "pi"]>;
2633
- readonly method: Schema.Literal<"session.spawn">;
2634
- readonly parentSessionId: Schema.String;
2635
- readonly receipt: Schema.Struct<{
2636
- readonly actorId: Schema.String;
2637
- readonly aggregateRevision: Schema.String;
2638
- readonly commandId: Schema.String;
2639
- readonly createdAt: Schema.String;
2640
- readonly eventCursor: Schema.String;
2641
- readonly method: Schema.String;
2642
- readonly receiptId: Schema.String;
2643
- readonly schemaVersion: Schema.Literal<1>;
2644
- readonly state: Schema.Literal<"succeeded">;
2645
- readonly target: Schema.Struct<{
3685
+ readonly heldTasks: Schema.optional<Schema.$Array<Schema.Struct<{
3686
+ readonly claimedAt: Schema.String;
2646
3687
  readonly id: Schema.String;
2647
- readonly type: Schema.String;
2648
- }>;
2649
- readonly updatedAt: Schema.String;
2650
- }>;
2651
- readonly session: Schema.Struct<{
2652
- readonly createdAt: Schema.String;
2653
- readonly id: Schema.String;
2654
- readonly projectId: Schema.String;
2655
- readonly revision: Schema.String;
2656
- readonly state: Schema.Literals<readonly ["idle", "starting", "running", "waiting-approval", "interrupted", "recovering", "stopping", "stopped", "failed"]>;
2657
- readonly updatedAt: Schema.String;
2658
- readonly workspaceId: Schema.String;
2659
- readonly workspaceRevision: Schema.String;
2660
- /** What the Session is doing; present on `session.list` and `session.show`. */
2661
- readonly activity: Schema.optional<Schema.Literals<readonly ["stopped", "waiting_approval", "working", "idle"]>>;
2662
- readonly agentDefinitionRef: Schema.optional<Schema.Struct<{
2663
- readonly contentDigest: Schema.String;
2664
- readonly key: Schema.String;
2665
- readonly version: Schema.String;
2666
- }>>;
2667
- /**
2668
- * `none` for a host-authority Session: the vendor harness runs as the
2669
- * Node's user with no Maia sandbox ([D-198](https://maia-os.vllnt.com/en/docs/decisions#d-198)).
2670
- * A sandboxed Session carries none.
2671
- */
2672
- readonly containment: Schema.optional<Schema.Literal<"none">>;
2673
- readonly executor: Schema.optional<Schema.Struct<{
2674
- readonly connectionId: Schema.String;
2675
- readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
2676
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
2677
- readonly model: Schema.optional<Schema.String>;
2678
- }>>;
2679
- /** Why the runtime of a failed Session failed, when Maia knows. */
2680
- readonly failure: Schema.optional<Schema.Struct<{
2681
- readonly code: Schema.String;
2682
- readonly message: Schema.String;
2683
- }>>;
3688
+ readonly leaseExpiresAt: Schema.String;
3689
+ readonly state: Schema.Literal<"claimed">;
3690
+ readonly title: Schema.String;
3691
+ }>>>;
2684
3692
  /** Set at creation; absent when the Session has no labels. */
2685
3693
  readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
2686
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. */
2687
3695
  readonly latestTurnId: Schema.optional<Schema.String>;
2688
3696
  /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
2689
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>;
2690
3700
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
2691
3701
  readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
2692
3702
  /**
@@ -2763,7 +3773,7 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2763
3773
  readonly executor: Schema.optional<Schema.Struct<{
2764
3774
  readonly connectionId: Schema.String;
2765
3775
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
2766
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
3776
+ readonly kind: Schema.String;
2767
3777
  readonly model: Schema.optional<Schema.String>;
2768
3778
  }>>;
2769
3779
  /** The permission mode a host-authority Session passes to its vendor CLI. */
@@ -2954,35 +3964,444 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2954
3964
  }>;
2955
3965
  }>, Schema.Struct<{
2956
3966
  readonly commandId: Schema.String;
2957
- readonly globalCursor: Schema.String;
2958
- readonly recordedAt: Schema.String;
2959
- readonly schemaVersion: Schema.Literal<4>;
2960
- readonly sessionCursor: Schema.String;
2961
- readonly sessionId: Schema.String;
2962
- readonly eventType: Schema.Literal<"turn.interrupted">;
2963
- readonly payload: Schema.Struct<{
2964
- readonly turnId: 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;
4245
+ readonly commandId: 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;
2965
4256
  }>;
2966
- }>, Schema.Struct<{
2967
- readonly commandId: Schema.String;
2968
- readonly globalCursor: Schema.String;
2969
- 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
+ }>>;
2970
4342
  readonly schemaVersion: Schema.Literal<4>;
2971
- readonly sessionCursor: Schema.String;
2972
- readonly sessionId: Schema.String;
2973
- readonly eventType: Schema.Literal<"turn.failed">;
2974
- readonly payload: Schema.Struct<{
2975
- readonly turnId: Schema.String;
2976
- }>;
2977
- }>]>]>>;
2978
- readonly method: Schema.Literal<"session.events.list">;
2979
- readonly nextSessionCursor: Schema.optional<Schema.String>;
2980
- /** 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. */
2981
- readonly oldestRetainedCursor: 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;
2982
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
+ }>>;
2983
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
+ }>>;
2984
4403
  readonly delivery: Schema.Literals<readonly ["new", "duplicate"]>;
2985
- readonly method: Schema.Literal<"session.start">;
4404
+ readonly method: Schema.Literal<"session.archive">;
2986
4405
  readonly receipt: Schema.Struct<{
2987
4406
  readonly actorId: Schema.String;
2988
4407
  readonly aggregateRevision: Schema.String;
@@ -2990,6 +4409,7 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2990
4409
  readonly createdAt: Schema.String;
2991
4410
  readonly eventCursor: Schema.String;
2992
4411
  readonly method: Schema.String;
4412
+ readonly proposedBy: Schema.optional<Schema.String>;
2993
4413
  readonly receiptId: Schema.String;
2994
4414
  readonly schemaVersion: Schema.Literal<1>;
2995
4415
  readonly state: Schema.Literal<"succeeded">;
@@ -3024,7 +4444,7 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
3024
4444
  readonly executor: Schema.optional<Schema.Struct<{
3025
4445
  readonly connectionId: Schema.String;
3026
4446
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
3027
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
4447
+ readonly kind: Schema.String;
3028
4448
  readonly model: Schema.optional<Schema.String>;
3029
4449
  }>>;
3030
4450
  /** Why the runtime of a failed Session failed, when Maia knows. */
@@ -3032,12 +4452,27 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
3032
4452
  readonly code: Schema.String;
3033
4453
  readonly message: Schema.String;
3034
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
+ }>>>;
3035
4468
  /** Set at creation; absent when the Session has no labels. */
3036
4469
  readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
3037
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. */
3038
4471
  readonly latestTurnId: Schema.optional<Schema.String>;
3039
4472
  /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
3040
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>;
3041
4476
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
3042
4477
  readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
3043
4478
  /**
@@ -3087,9 +4522,12 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
3087
4522
  readonly state: Schema.Literals<readonly ["active", "archived", "removed"]>;
3088
4523
  }>>;
3089
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>;
3090
4528
  }>, Schema.Struct<{
3091
4529
  readonly delivery: Schema.Literals<readonly ["new", "duplicate"]>;
3092
- readonly method: Schema.Literal<"session.stop">;
4530
+ readonly method: Schema.Literal<"session.rename">;
3093
4531
  readonly receipt: Schema.Struct<{
3094
4532
  readonly actorId: Schema.String;
3095
4533
  readonly aggregateRevision: Schema.String;
@@ -3097,6 +4535,7 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
3097
4535
  readonly createdAt: Schema.String;
3098
4536
  readonly eventCursor: Schema.String;
3099
4537
  readonly method: Schema.String;
4538
+ readonly proposedBy: Schema.optional<Schema.String>;
3100
4539
  readonly receiptId: Schema.String;
3101
4540
  readonly schemaVersion: Schema.Literal<1>;
3102
4541
  readonly state: Schema.Literal<"succeeded">;
@@ -3131,7 +4570,7 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
3131
4570
  readonly executor: Schema.optional<Schema.Struct<{
3132
4571
  readonly connectionId: Schema.String;
3133
4572
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
3134
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
4573
+ readonly kind: Schema.String;
3135
4574
  readonly model: Schema.optional<Schema.String>;
3136
4575
  }>>;
3137
4576
  /** Why the runtime of a failed Session failed, when Maia knows. */
@@ -3139,12 +4578,27 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
3139
4578
  readonly code: Schema.String;
3140
4579
  readonly message: Schema.String;
3141
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
+ }>>>;
3142
4594
  /** Set at creation; absent when the Session has no labels. */
3143
4595
  readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
3144
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. */
3145
4597
  readonly latestTurnId: Schema.optional<Schema.String>;
3146
4598
  /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
3147
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>;
3148
4602
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
3149
4603
  readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
3150
4604
  /**
@@ -3194,9 +4648,21 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
3194
4648
  readonly state: Schema.Literals<readonly ["active", "archived", "removed"]>;
3195
4649
  }>>;
3196
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">;
3197
4662
  }>, Schema.Struct<{
3198
4663
  readonly delivery: Schema.Literals<readonly ["new", "duplicate"]>;
3199
- readonly method: Schema.Literal<"session.resume">;
4664
+ readonly handoff: Schema.String;
4665
+ readonly path: Schema.Literal<"context-handoff">;
3200
4666
  readonly receipt: Schema.Struct<{
3201
4667
  readonly actorId: Schema.String;
3202
4668
  readonly aggregateRevision: Schema.String;
@@ -3204,6 +4670,7 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
3204
4670
  readonly createdAt: Schema.String;
3205
4671
  readonly eventCursor: Schema.String;
3206
4672
  readonly method: Schema.String;
4673
+ readonly proposedBy: Schema.optional<Schema.String>;
3207
4674
  readonly receiptId: Schema.String;
3208
4675
  readonly schemaVersion: Schema.Literal<1>;
3209
4676
  readonly state: Schema.Literal<"succeeded">;
@@ -3238,7 +4705,7 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
3238
4705
  readonly executor: Schema.optional<Schema.Struct<{
3239
4706
  readonly connectionId: Schema.String;
3240
4707
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
3241
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
4708
+ readonly kind: Schema.String;
3242
4709
  readonly model: Schema.optional<Schema.String>;
3243
4710
  }>>;
3244
4711
  /** Why the runtime of a failed Session failed, when Maia knows. */
@@ -3246,12 +4713,27 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
3246
4713
  readonly code: Schema.String;
3247
4714
  readonly message: Schema.String;
3248
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
+ }>>>;
3249
4729
  /** Set at creation; absent when the Session has no labels. */
3250
4730
  readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
3251
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. */
3252
4732
  readonly latestTurnId: Schema.optional<Schema.String>;
3253
4733
  /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
3254
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>;
3255
4737
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
3256
4738
  readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
3257
4739
  /**
@@ -3301,32 +4783,26 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
3301
4783
  readonly state: Schema.Literals<readonly ["active", "archived", "removed"]>;
3302
4784
  }>>;
3303
4785
  }>;
4786
+ readonly sourceSessionId: Schema.String;
4787
+ readonly method: Schema.Literal<"session.fork.confirm">;
3304
4788
  }>, Schema.Struct<{
3305
- readonly baseRevision: Schema.String;
3306
- readonly branch: Schema.String;
3307
- readonly deletions: Schema.Int;
3308
- readonly files: Schema.$Array<Schema.Struct<{
3309
- readonly deletions: Schema.optional<Schema.Int>;
3310
- readonly insertions: Schema.optional<Schema.Int>;
3311
- readonly path: Schema.String;
3312
- readonly previousPath: Schema.optional<Schema.String>;
3313
- readonly status: Schema.Literals<readonly ["added", "copied", "deleted", "modified", "renamed", "type_changed"]>;
3314
- }>>;
3315
- readonly insertions: Schema.Int;
3316
- readonly method: Schema.Literal<"session.diff">;
3317
- readonly patch: Schema.optional<Schema.String>;
3318
- 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;
3319
4794
  readonly sessionId: Schema.String;
3320
- 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">;
3321
4802
  }>, Schema.Struct<{
3322
- readonly archive: Schema.optional<Schema.Struct<{
3323
- readonly branch: Schema.String;
3324
- readonly branchRevision: Schema.String;
3325
- readonly pruneAfter: Schema.String;
3326
- readonly snapshot: Schema.Literals<readonly ["clean", "committed"]>;
3327
- }>>;
3328
4803
  readonly delivery: Schema.Literals<readonly ["new", "duplicate"]>;
3329
- readonly method: Schema.Literal<"session.archive">;
4804
+ readonly handoff: Schema.String;
4805
+ readonly path: Schema.Literal<"context-handoff">;
3330
4806
  readonly receipt: Schema.Struct<{
3331
4807
  readonly actorId: Schema.String;
3332
4808
  readonly aggregateRevision: Schema.String;
@@ -3334,6 +4810,7 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
3334
4810
  readonly createdAt: Schema.String;
3335
4811
  readonly eventCursor: Schema.String;
3336
4812
  readonly method: Schema.String;
4813
+ readonly proposedBy: Schema.optional<Schema.String>;
3337
4814
  readonly receiptId: Schema.String;
3338
4815
  readonly schemaVersion: Schema.Literal<1>;
3339
4816
  readonly state: Schema.Literal<"succeeded">;
@@ -3368,7 +4845,7 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
3368
4845
  readonly executor: Schema.optional<Schema.Struct<{
3369
4846
  readonly connectionId: Schema.String;
3370
4847
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
3371
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
4848
+ readonly kind: Schema.String;
3372
4849
  readonly model: Schema.optional<Schema.String>;
3373
4850
  }>>;
3374
4851
  /** Why the runtime of a failed Session failed, when Maia knows. */
@@ -3376,12 +4853,27 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
3376
4853
  readonly code: Schema.String;
3377
4854
  readonly message: Schema.String;
3378
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
+ }>>>;
3379
4869
  /** Set at creation; absent when the Session has no labels. */
3380
4870
  readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
3381
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. */
3382
4872
  readonly latestTurnId: Schema.optional<Schema.String>;
3383
4873
  /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
3384
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>;
3385
4877
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
3386
4878
  readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
3387
4879
  /**
@@ -3431,12 +4923,73 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
3431
4923
  readonly state: Schema.Literals<readonly ["active", "archived", "removed"]>;
3432
4924
  }>>;
3433
4925
  }>;
3434
- /** The caller's summary and transcript path, as the archive recorded them. */
3435
- readonly summary: Schema.optional<Schema.String>;
3436
- readonly transcriptPath: Schema.optional<Schema.String>;
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
+ }>;
3437
4945
  }>, Schema.Struct<{
3438
4946
  readonly delivery: Schema.Literals<readonly ["new", "duplicate"]>;
3439
- 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;
3440
4993
  readonly receipt: Schema.Struct<{
3441
4994
  readonly actorId: Schema.String;
3442
4995
  readonly aggregateRevision: Schema.String;
@@ -3444,6 +4997,7 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
3444
4997
  readonly createdAt: Schema.String;
3445
4998
  readonly eventCursor: Schema.String;
3446
4999
  readonly method: Schema.String;
5000
+ readonly proposedBy: Schema.optional<Schema.String>;
3447
5001
  readonly receiptId: Schema.String;
3448
5002
  readonly schemaVersion: Schema.Literal<1>;
3449
5003
  readonly state: Schema.Literal<"succeeded">;
@@ -3478,7 +5032,7 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
3478
5032
  readonly executor: Schema.optional<Schema.Struct<{
3479
5033
  readonly connectionId: Schema.String;
3480
5034
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
3481
- readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
5035
+ readonly kind: Schema.String;
3482
5036
  readonly model: Schema.optional<Schema.String>;
3483
5037
  }>>;
3484
5038
  /** Why the runtime of a failed Session failed, when Maia knows. */
@@ -3486,12 +5040,27 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
3486
5040
  readonly code: Schema.String;
3487
5041
  readonly message: Schema.String;
3488
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
+ }>>>;
3489
5056
  /** Set at creation; absent when the Session has no labels. */
3490
5057
  readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
3491
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. */
3492
5059
  readonly latestTurnId: Schema.optional<Schema.String>;
3493
5060
  /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
3494
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>;
3495
5064
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
3496
5065
  readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
3497
5066
  /**
@@ -3543,6 +5112,6 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
3543
5112
  }>;
3544
5113
  }>]>;
3545
5114
  export { agentPermissionRequestEffectSchema, agentPermissionResultEffectSchema, } from "./agent-permission-effect-schema.js";
3546
- export { sessionObservationEffectSchema, sessionObserveResultEffectSchema, } from "./observation-effect-schema.js";
3547
- 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";
3548
5117
  //# sourceMappingURL=effect-schema.d.ts.map