@maiaos/protocol 0.1.0-canary.64 → 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,19 +1,22 @@
1
1
  import * as Schema from "effect/Schema";
2
- import { agentDefinitionReferenceEffectSchema } from "../agent/effect-schema.js";
2
+ import { agentDefinitionReferenceEffectSchema, agentIdentifierEffectSchema, } from "../agent/effect-schema.js";
3
3
  import { approvalPromptEffectSchema } from "../approval/effect-schema.js";
4
+ import { boardHeldTaskEffectSchema, MAX_BOARD_HELD_TASKS, } from "../board/effect-schema.js";
4
5
  import { commandReceiptEffectSchema } from "../command-receipt/effect-schema.js";
5
6
  import { connectionModelIdEffectSchema } from "../connection/effect-schema.js";
6
7
  import { aggregateRevisionEffectSchema, failureDetailEffectSchema, protocolIdentifierEffectSchema, recordedAtEffectSchema, } from "../envelope/effect-schema.js";
7
8
  import { hasControlCharacter } from "../envelope/index.js";
8
9
  import { sessionActivityEffectSchema, sessionStatusEffectSchema, } from "../event/effect-schema.js";
10
+ import { EXECUTOR_IDS } from "../executor/index.js";
9
11
  import { holdIdentifierEffectSchema } from "../hold/effect-schema.js";
12
+ import { remoteNodeNameEffectSchema } from "../remote-node/effect-schema.js";
10
13
  import { sessionRoleEffectSchema } from "../session-guard/effect-schema.js";
11
14
  import { turnStateEffectSchema } from "../turn/effect-schema.js";
12
- import { sessionObserveParametersEffectSchema, sessionObserveResultEffectSchema, } from "./observation-effect-schema.js";
13
- import { MAX_SESSION_INBOX_CHECK_LIMIT, MAX_SESSION_LABEL_KEY_LENGTH, MAX_SESSION_LABEL_VALUE_LENGTH, MAX_SESSION_LABELS, MAX_SESSION_MESSAGE_BODY_BYTES, MAX_SESSION_MESSAGE_SUBJECT_BYTES, MAX_SESSION_SETTLED_IDLE_SECONDS, MAX_SESSION_TITLE_LENGTH, MAX_SESSION_WAIT_MILLISECONDS, MAX_SESSION_WAIT_STATES, SESSION_ATTENTION_VALUES, SESSION_EFFORT_LEVELS, SESSION_PERMISSION_MODES, } from "./policy.js";
15
+ import { sessionExecutorKindEffectSchema, sessionObserveParametersEffectSchema, sessionObserveResultEffectSchema, } from "./observation-effect-schema.js";
16
+ import { DEFAULT_SESSION_SPAWN_CAPS, MAX_SESSION_INBOX_CHECK_LIMIT, MAX_SESSION_LABEL_KEY_LENGTH, MAX_SESSION_LABEL_VALUE_LENGTH, MAX_SESSION_LABELS, MAX_SESSION_MESSAGE_BODY_BYTES, MAX_SESSION_MESSAGE_SUBJECT_BYTES, MAX_SESSION_SETTLED_IDLE_SECONDS, MAX_SESSION_SPAWN_CHILD_COUNT, MAX_SESSION_SPAWN_DEPTH, MAX_SESSION_TITLE_LENGTH, MAX_SESSION_WAIT_MILLISECONDS, MAX_SESSION_WAIT_STATES, SESSION_ATTENTION_VALUES, SESSION_CHILD_TARGET_TYPE, SESSION_EFFORT_LEVELS, SESSION_PERMISSION_MODES, SESSION_SPAWN_CAP_BOUNDS, SESSION_SPAWN_CAPS_TARGET, sessionEffortLevels, sessionPermissionModes, } from "./policy.js";
14
17
  import { sessionTurnEventEffectSchema } from "./turn-event-effect-schema.js";
15
18
  import { SESSION_EVENT_SCHEMA_VERSION, SESSION_SCHEMA_VERSION, } from "./version.js";
16
- import { sessionArchiveEffectSchema, sessionArchiveParametersEffectSchema, sessionArchiveSummaryEffectSchema, sessionDiffParametersEffectSchema, sessionDiffResultEffectSchema, sessionStartDirectoryEffectSchema, sessionTranscriptPathEffectSchema, sessionWorktreeCreatedEffectSchema, sessionWorktreeEffectSchema, sessionWorktreeRemovedEffectSchema, sessionWorktreeRequestEffectSchema, } from "./worktree-effect-schema.js";
19
+ import { gitRevisionEffectSchema, sessionArchiveEffectSchema, sessionArchiveParametersEffectSchema, sessionArchiveSummaryEffectSchema, sessionDiffParametersEffectSchema, sessionDiffResultEffectSchema, sessionGitStatusParametersEffectSchema, sessionGitStatusResultEffectSchema, sessionStartDirectoryEffectSchema, sessionTranscriptPathEffectSchema, sessionWorktreeCreatedEffectSchema, sessionWorktreeEffectSchema, sessionWorktreeRemovedEffectSchema, sessionWorktreeRequestEffectSchema, } from "./worktree-effect-schema.js";
17
20
  const MAX_PAGE_SIZE = 100;
18
21
  const MAX_EVENT_PAGE_SIZE = 32;
19
22
  const utf8 = new TextEncoder();
@@ -40,7 +43,7 @@ export const sessionTitleEffectSchema = Schema.String.check(Schema.isBetweenLeng
40
43
  export const sessionLabelsEffectSchema = Schema.Record(Schema.String.check(Schema.isPattern(new RegExp(`^[a-z][a-z0-9_-]{0,${String(MAX_SESSION_LABEL_KEY_LENGTH - 1)}}$`, "u"))), Schema.String.check(Schema.isPattern(new RegExp(`^[\\x21-\\x2b\\x2d-\\x7e]{1,${String(MAX_SESSION_LABEL_VALUE_LENGTH)}}$`, "u")))).check(Schema.makeFilter((value) => Object.keys(value).length <= MAX_SESSION_LABELS, { expected: "at most 8 labels" }));
41
44
  /** 1 to 100 items. */
42
45
  export const pageSizeEffectSchema = Schema.Int.check(Schema.isGreaterThanOrEqualTo(1), Schema.isLessThanOrEqualTo(MAX_PAGE_SIZE));
43
- const sessionStateEffectSchema = Schema.Literals([
46
+ export const sessionStateEffectSchema = Schema.Literals([
44
47
  "idle",
45
48
  "starting",
46
49
  "running",
@@ -61,20 +64,14 @@ const sessionBaseFields = {
61
64
  workspaceId: protocolIdentifierEffectSchema,
62
65
  workspaceRevision: revisionEffectSchema,
63
66
  };
64
- export const sessionExecutorKindEffectSchema = Schema.Literals([
65
- "claude-code",
66
- "codex-cli",
67
- ]);
68
- /** The Node issues an Agent's identifier when a person previews its creation. */
69
- export const agentIdentifierEffectSchema = protocolIdentifierEffectSchema.check(Schema.isPattern(/^agent_[a-f0-9]{32}$/u));
70
- export const sessionEffortEffectSchema = Schema.Literals(SESSION_EFFORT_LEVELS["codex-cli"]);
71
- export const supportsEffort = (kind, effort) => SESSION_EFFORT_LEVELS[kind].includes(effort);
67
+ export const sessionEffortEffectSchema = Schema.Literals(SESSION_EFFORT_LEVELS[EXECUTOR_IDS.codex]);
68
+ export const supportsEffort = (kind, effort) => sessionEffortLevels(kind).includes(effort);
72
69
  /** A permission mode either vendor CLI documents; the Node checks it against the Session's executor kind. */
73
70
  export const sessionPermissionEffectSchema = Schema.Literals([
74
- ...SESSION_PERMISSION_MODES["claude-code"],
75
- ...SESSION_PERMISSION_MODES["codex-cli"],
71
+ ...SESSION_PERMISSION_MODES[EXECUTOR_IDS.claudeCode],
72
+ ...SESSION_PERMISSION_MODES[EXECUTOR_IDS.codex],
76
73
  ]);
77
- export const supportsPermission = (kind, permission) => SESSION_PERMISSION_MODES[kind].includes(permission);
74
+ export const supportsPermission = (kind, permission) => sessionPermissionModes(kind).includes(permission);
78
75
  /** A prompt, when a reader may see it, goes with a status that says the Session waits on one, and its kind matches; options belong to a question. */
79
76
  const promptMatchesStatus = (value) => {
80
77
  if (value.prompt === undefined)
@@ -85,6 +82,11 @@ const promptMatchesStatus = (value) => {
85
82
  value.prompt.kind !== "question" &&
86
83
  value.prompt.options === undefined;
87
84
  };
85
+ /** Held tasks come with their count: every one up to the bound, the bound's worth past it. */
86
+ const heldTasksMatchCount = (value) => value.heldTasks === undefined || value.heldTaskCount === undefined
87
+ ? value.heldTasks === value.heldTaskCount
88
+ : value.heldTasks.length ===
89
+ Math.min(value.heldTaskCount, MAX_BOARD_HELD_TASKS);
88
90
  /**
89
91
  * Creation binds a vendor executor Session to one named account, once. A
90
92
  * Session on a gateway Connection may also fix the model the gateway serves,
@@ -110,12 +112,21 @@ export const sessionEffectSchema = Schema.Struct({
110
112
  executor: Schema.optional(sessionExecutorEffectSchema),
111
113
  /** Why the runtime of a failed Session failed, when Maia knows. */
112
114
  failure: Schema.optional(failureDetailEffectSchema),
115
+ /** The count of board tasks the Session holds now; present on `session.list`, `session.show` and `session.wait`, with `heldTasks`. */
116
+ heldTaskCount: Schema.optional(Schema.Int.check(Schema.isGreaterThanOrEqualTo(0))),
117
+ /**
118
+ * The board tasks the Session holds now, newest claim first, at most
119
+ * `MAX_BOARD_HELD_TASKS`; `heldTaskCount` counts every one.
120
+ */
121
+ heldTasks: Schema.optional(Schema.Array(boardHeldTaskEffectSchema).check(Schema.isMaxLength(MAX_BOARD_HELD_TASKS))),
113
122
  /** Set at creation; absent when the Session has no labels. */
114
123
  labels: Schema.optional(sessionLabelsEffectSchema),
115
124
  /** 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. */
116
125
  latestTurnId: Schema.optional(protocolIdentifierEffectSchema),
117
126
  /** How `latestTurnId` ended or is going; present on `session.list` and `session.show`. */
118
127
  latestTurnState: Schema.optional(turnStateEffectSchema),
128
+ /** The Session that spawned or created this one, fixed at creation; absent for a top-level Session. */
129
+ parentSessionId: Schema.optional(protocolIdentifierEffectSchema),
119
130
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
120
131
  permission: Schema.optional(sessionPermissionEffectSchema),
121
132
  /**
@@ -147,8 +158,9 @@ export const sessionEffectSchema = Schema.Struct({
147
158
  (value.worktree === undefined || value.executor !== undefined) &&
148
159
  (value.failure === undefined || value.state === "failed") &&
149
160
  (value.recovery === undefined || value.state === "recovering") &&
150
- promptMatchesStatus(value), {
151
- expected: "an executor Session without an Agent definition, a worktree only for an executor Session, a recovery reason only while recovering, and a prompt only with its status",
161
+ promptMatchesStatus(value) &&
162
+ heldTasksMatchCount(value), {
163
+ expected: "an executor Session without an Agent definition, a worktree only for an executor Session, a recovery reason only while recovering, a prompt only with its status, and held tasks with their count",
152
164
  }));
153
165
  const emptyPayloadEffectSchema = Schema.Record(Schema.String, Schema.Never);
154
166
  const createdPayloadEffectSchema = Schema.Struct({
@@ -311,19 +323,12 @@ export const sessionCreateParametersEffectSchema = Schema.Struct({
311
323
  hostAuthorityAllowed(value), {
312
324
  expected: "an Agent alone, an Agent definition alone, or an executor connection or kind; a model only with a connection; an effort only for an executor Session, at a level its kind supports; a worktree only for an executor Session or an Agent; a start directory only for an executor Session, relative to the worktree when there is one; host authority only for an executor Session without a worktree or Agent (its one role is orchestrator, with an owner label), and a permission mode only with it, at a value its kind supports",
313
325
  }));
314
- const sessionSpawnHarnessEffectSchema = Schema.Literals(["maia-agent", "pi"]);
315
- export const sessionSpawnParametersEffectSchema = Schema.Struct({
316
- ...sessionCreateBaseFields,
317
- definitionRef: Schema.optional(agentDefinitionReferenceEffectSchema),
318
- harness: sessionSpawnHarnessEffectSchema,
319
- parentSessionId: protocolIdentifierEffectSchema,
320
- });
321
326
  /**
322
327
  * One page of Sessions in creation order: of one Project, or of the whole
323
328
  * Node without `projectId`; without `afterCursor` the first page and without
324
329
  * `limit` `DEFAULT_SESSION_LIST_PAGE_SIZE` Sessions. `states` keeps Sessions
325
330
  * in those states; `attention` keeps Sessions the Node reports an attention
326
- * value for.
331
+ * value for; `parentSessionId` keeps the direct children of that Session.
327
332
  */
328
333
  export const sessionListParametersEffectSchema = Schema.Struct({
329
334
  afterCursor: Schema.optional(revisionEffectSchema),
@@ -333,6 +338,8 @@ export const sessionListParametersEffectSchema = Schema.Struct({
333
338
  /** Sessions that carry these labels, each with the given value. */
334
339
  labels: Schema.optional(sessionLabelsEffectSchema),
335
340
  limit: Schema.optional(pageSizeEffectSchema),
341
+ /** Keeps the direct children of this Session; an unknown Session has none. */
342
+ parentSessionId: Schema.optional(protocolIdentifierEffectSchema),
336
343
  projectId: Schema.optional(protocolIdentifierEffectSchema),
337
344
  /** Keeps non-archived Sessions that stopped, failed or sat idle for `idleForSeconds`. */
338
345
  settled: Schema.optional(Schema.Literal(true)),
@@ -359,6 +366,237 @@ export const sessionStartParametersEffectSchema = Schema.Struct({
359
366
  expectedRevision: revisionEffectSchema,
360
367
  sessionId: protocolIdentifierEffectSchema,
361
368
  });
369
+ /** The command ID leaves room for the `.start` and `.send` IDs a client derives from it. */
370
+ const sessionSuccessorCommandIdEffectSchema = protocolIdentifierEffectSchema.check(Schema.isMaxLength(122));
371
+ /** What a preview seals and its confirmation repeats: the input digest, its proof and the instant the proof expires. */
372
+ const sessionPreviewProof = {
373
+ inputDigest: Schema.String.check(Schema.isPattern(/^[a-f0-9]{64}$/u)),
374
+ proof: Schema.String.check(Schema.isPattern(/^[A-Za-z0-9_-]{43}$/u)),
375
+ validUntil: recordedAtEffectSchema,
376
+ };
377
+ /**
378
+ * What a person repeats to confirm a fork: the preview's digest and proof,
379
+ * bound to the Session revision it saw, the turn the fork stops at and, for a
380
+ * coding Session, the commit its new worktree starts from.
381
+ */
382
+ const sessionForkConfirmation = {
383
+ checkpoint: Schema.optional(gitRevisionEffectSchema),
384
+ commandId: sessionSuccessorCommandIdEffectSchema,
385
+ expectedRevision: revisionEffectSchema,
386
+ ...sessionPreviewProof,
387
+ sessionId: protocolIdentifierEffectSchema,
388
+ turnId: protocolIdentifierEffectSchema,
389
+ };
390
+ /** A fork stops at a completed turn of the Session; without `turnId` it takes the newest one. */
391
+ export const sessionForkPreviewParametersEffectSchema = Schema.Struct({
392
+ commandId: sessionSuccessorCommandIdEffectSchema,
393
+ sessionId: protocolIdentifierEffectSchema,
394
+ turnId: Schema.optional(protocolIdentifierEffectSchema),
395
+ });
396
+ export const sessionForkConfirmParametersEffectSchema = Schema.Struct(sessionForkConfirmation);
397
+ /**
398
+ * What a switch moves a Session to: an executor, a connection, a model or any
399
+ * mix. What the target leaves out stays as the Session has it, except that a
400
+ * new executor takes the Node's pick of its accounts, not the old account.
401
+ */
402
+ const sessionSwitchTargetEffectSchema = Schema.Struct({
403
+ connectionId: Schema.optional(protocolIdentifierEffectSchema),
404
+ executor: Schema.optional(sessionExecutorKindEffectSchema),
405
+ model: Schema.optional(connectionModelIdEffectSchema),
406
+ }).check(Schema.makeFilter((value) => value.connectionId !== undefined ||
407
+ value.executor !== undefined ||
408
+ value.model !== undefined, { expected: "an executor, a connection or a model to switch to" }));
409
+ /** What a person repeats to confirm a switch: the preview's digest and proof, bound to the Session revision it saw. */
410
+ const sessionSwitchConfirmation = {
411
+ commandId: sessionSuccessorCommandIdEffectSchema,
412
+ expectedRevision: revisionEffectSchema,
413
+ ...sessionPreviewProof,
414
+ sessionId: protocolIdentifierEffectSchema,
415
+ target: sessionSwitchTargetEffectSchema,
416
+ };
417
+ export const sessionSwitchPreviewParametersEffectSchema = Schema.Struct({
418
+ commandId: sessionSwitchConfirmation.commandId,
419
+ sessionId: protocolIdentifierEffectSchema,
420
+ target: sessionSwitchTargetEffectSchema,
421
+ });
422
+ export const sessionSwitchConfirmParametersEffectSchema = Schema.Struct(sessionSwitchConfirmation);
423
+ const sha256HexEffectSchema = Schema.String.check(Schema.isPattern(/^[a-f0-9]{64}$/u));
424
+ /**
425
+ * What a person repeats to confirm a Project setup script: the preview's
426
+ * digest and proof, bound to the Session revision it saw and to the digest of
427
+ * the script as the worktree holds it.
428
+ */
429
+ const sessionSetupConfirmation = {
430
+ commandId: protocolIdentifierEffectSchema,
431
+ expectedRevision: revisionEffectSchema,
432
+ ...sessionPreviewProof,
433
+ sessionId: protocolIdentifierEffectSchema,
434
+ setupDigest: sha256HexEffectSchema,
435
+ };
436
+ /** The script a coding Session's worktree would run: its command and the digest of each worktree file the command names. */
437
+ const sessionSetupScriptEffectSchema = Schema.Struct({
438
+ command: Schema.Array(Schema.String.check(Schema.isMaxLength(1024))).check(Schema.isBetweenLength(1, 32)),
439
+ files: Schema.Array(Schema.Struct({
440
+ path: Schema.String.check(Schema.isMaxLength(1024)),
441
+ sha256: sha256HexEffectSchema,
442
+ })).check(Schema.isMaxLength(32)),
443
+ });
444
+ export const sessionSetupPreviewParametersEffectSchema = Schema.Struct({
445
+ commandId: protocolIdentifierEffectSchema,
446
+ sessionId: protocolIdentifierEffectSchema,
447
+ });
448
+ export const sessionSetupConfirmParametersEffectSchema = Schema.Struct(sessionSetupConfirmation);
449
+ const spawnCapBounded = (bounds) => Schema.Int.check(Schema.isBetween(bounds));
450
+ /** The three numbers a Node holds every spawned child to (CAP). */
451
+ export const sessionSpawnCapsEffectSchema = Schema.Struct({
452
+ concurrency: spawnCapBounded(SESSION_SPAWN_CAP_BOUNDS.concurrency),
453
+ depth: spawnCapBounded(SESSION_SPAWN_CAP_BOUNDS.depth),
454
+ fanOut: spawnCapBounded(SESSION_SPAWN_CAP_BOUNDS.fanOut),
455
+ });
456
+ /** Revision `0` is the defaults of a Node whose caps no person has changed. */
457
+ export const sessionSpawnCapsRecordEffectSchema = Schema.Struct({
458
+ caps: sessionSpawnCapsEffectSchema,
459
+ revision: aggregateRevisionEffectSchema,
460
+ source: Schema.Literals(["default", "node"]),
461
+ updatedAt: Schema.optional(recordedAtEffectSchema),
462
+ }).check(Schema.makeFilter((value) => value.source === "default"
463
+ ? value.revision === "0" &&
464
+ value.updatedAt === undefined &&
465
+ value.caps.concurrency === DEFAULT_SESSION_SPAWN_CAPS.concurrency &&
466
+ value.caps.depth === DEFAULT_SESSION_SPAWN_CAPS.depth &&
467
+ value.caps.fanOut === DEFAULT_SESSION_SPAWN_CAPS.fanOut
468
+ : value.revision !== "0" && value.updatedAt !== undefined, {
469
+ expected: "the default caps at revision 0 without updatedAt, or changed caps with both",
470
+ }));
471
+ const childCount = Schema.Int.check(Schema.isBetween({ maximum: MAX_SESSION_SPAWN_CHILD_COUNT, minimum: 0 }));
472
+ /** A parent's children: every one it spawned (`total`), and those that have not ended (`live`). */
473
+ export const sessionSpawnChildrenEffectSchema = Schema.Struct({
474
+ live: childCount,
475
+ total: childCount,
476
+ }).check(Schema.makeFilter((value) => value.live <= value.total, {
477
+ expected: "no more live children than children",
478
+ }));
479
+ /** A Session's spawn depth: the spawns between it and the Session at the root of its tree, which has depth 0. */
480
+ export const sessionSpawnDepthEffectSchema = Schema.Int.check(Schema.isBetween({ maximum: MAX_SESSION_SPAWN_DEPTH, minimum: 0 }));
481
+ export const sessionSpawnCapsShowParametersEffectSchema = Schema.Struct({
482
+ sessionId: Schema.optional(protocolIdentifierEffectSchema),
483
+ });
484
+ /**
485
+ * What one Session uses of the caps on this Node: its children here, and its
486
+ * depth and role when this Node holds it. A client adds the children of every
487
+ * Node; an orchestrator's children all live on its own Node (D-346).
488
+ */
489
+ export const sessionSpawnStandingEffectSchema = Schema.Struct({
490
+ children: sessionSpawnChildrenEffectSchema,
491
+ depth: Schema.optional(sessionSpawnDepthEffectSchema),
492
+ role: Schema.optional(sessionRoleEffectSchema),
493
+ sessionId: protocolIdentifierEffectSchema,
494
+ });
495
+ export const sessionSpawnCapsShowResultEffectSchema = Schema.Struct({
496
+ caps: sessionSpawnCapsRecordEffectSchema,
497
+ method: Schema.Literal("session.spawn-caps.show"),
498
+ standing: Schema.optional(sessionSpawnStandingEffectSchema),
499
+ });
500
+ const spawnCapsChange = {
501
+ caps: sessionSpawnCapsEffectSchema,
502
+ commandId: protocolIdentifierEffectSchema,
503
+ expectedRevision: aggregateRevisionEffectSchema,
504
+ };
505
+ /** What a caps preview seals and its confirmation repeats. */
506
+ const spawnCapsConfirmation = {
507
+ inputDigest: Schema.String.check(Schema.isPattern(/^[a-f0-9]{64}$/u)),
508
+ proof: Schema.String.check(Schema.isPattern(/^[A-Za-z0-9_-]{43}$/u)),
509
+ validUntil: recordedAtEffectSchema,
510
+ };
511
+ /** A person previews new caps at the revision they read, then confirms that exact preview. */
512
+ export const sessionSpawnCapsPreviewParametersEffectSchema = Schema.Struct(spawnCapsChange);
513
+ export const sessionSpawnCapsConfirmParametersEffectSchema = Schema.Struct({
514
+ ...spawnCapsChange,
515
+ ...spawnCapsConfirmation,
516
+ });
517
+ /** The caps now and the caps the confirmation would leave, sealed for it. */
518
+ export const sessionSpawnCapsPreviewResultEffectSchema = Schema.Struct({
519
+ ...spawnCapsChange,
520
+ ...spawnCapsConfirmation,
521
+ current: sessionSpawnCapsRecordEffectSchema,
522
+ method: Schema.Literal("session.spawn-caps.preview"),
523
+ });
524
+ export const sessionSpawnCapsConfirmResultEffectSchema = Schema.Struct({
525
+ caps: sessionSpawnCapsRecordEffectSchema,
526
+ delivery: Schema.Literals(["new", "duplicate"]),
527
+ method: Schema.Literal("session.spawn-caps.confirm"),
528
+ receipt: commandReceiptEffectSchema,
529
+ }).check(Schema.makeFilter((result) => result.caps.source === "node" &&
530
+ result.receipt.method === result.method &&
531
+ result.receipt.target.type === SESSION_SPAWN_CAPS_TARGET.type &&
532
+ result.receipt.target.id === SESSION_SPAWN_CAPS_TARGET.id &&
533
+ result.receipt.aggregateRevision === result.caps.revision, { expected: "changed caps under their own receipt" }));
534
+ export const sessionSpawnCapsRequestEffectSchema = Schema.Union([
535
+ Schema.Struct({
536
+ method: Schema.Literal("session.spawn-caps.show"),
537
+ parameters: sessionSpawnCapsShowParametersEffectSchema,
538
+ }),
539
+ Schema.Struct({
540
+ method: Schema.Literal("session.spawn-caps.preview"),
541
+ parameters: sessionSpawnCapsPreviewParametersEffectSchema,
542
+ }),
543
+ Schema.Struct({
544
+ method: Schema.Literal("session.spawn-caps.confirm"),
545
+ parameters: sessionSpawnCapsConfirmParametersEffectSchema,
546
+ }),
547
+ ]);
548
+ export const sessionSpawnCapsResultEffectSchema = Schema.Union([
549
+ sessionSpawnCapsShowResultEffectSchema,
550
+ sessionSpawnCapsPreviewResultEffectSchema,
551
+ sessionSpawnCapsConfirmResultEffectSchema,
552
+ ]);
553
+ /**
554
+ * The grant a child's parent holds: host authority and the permission mode it
555
+ * passes to its vendor CLI. The caller read it from the parent's own Node. A
556
+ * Node that holds the parent checks it against the parent's record, and one
557
+ * that does not cannot, so it applies the grant as given. The parent's spawn
558
+ * depth and its children on every other Node come the same way, for the caps
559
+ * (CAP): a Node adds its own children of the parent to the claimed ones, and
560
+ * holds the depth to the larger of the claim and its own (D-329). The role
561
+ * comes from the parent's Node too: a Node that does not hold an orchestrator
562
+ * parent refuses its child, since an orchestrator's own Node counts every
563
+ * child it has (D-346).
564
+ */
565
+ const sessionSpawnParentEffectSchema = Schema.Struct({
566
+ children: sessionSpawnChildrenEffectSchema,
567
+ depth: sessionSpawnDepthEffectSchema,
568
+ hostAuthority: Schema.optional(Schema.Literal(true)),
569
+ permission: Schema.optional(sessionPermissionEffectSchema),
570
+ role: sessionRoleEffectSchema,
571
+ sessionId: protocolIdentifierEffectSchema,
572
+ }).check(Schema.makeFilter((value) => value.permission === undefined || value.hostAuthority === true, { expected: "a permission mode only with host authority" }));
573
+ /**
574
+ * An executor Session spawned under a parent that may live on another Node:
575
+ * the Workspace on this Node, the executor kind, and the grant the child asks
576
+ * for, which may not be wider than the parent's.
577
+ */
578
+ const sessionSpawnChild = {
579
+ commandId: sessionSuccessorCommandIdEffectSchema,
580
+ executor: sessionExecutorKindEffectSchema,
581
+ hostAuthority: Schema.optional(Schema.Literal(true)),
582
+ parent: sessionSpawnParentEffectSchema,
583
+ permission: Schema.optional(sessionPermissionEffectSchema),
584
+ workspaceId: protocolIdentifierEffectSchema,
585
+ };
586
+ const sessionSpawnGrantAllowed = (value) => value.permission === undefined ||
587
+ (value.hostAuthority === true &&
588
+ supportsPermission(value.executor, value.permission));
589
+ const sessionSpawnGrantFilter = Schema.makeFilter(sessionSpawnGrantAllowed, {
590
+ expected: "a permission mode only with host authority, at a value the executor kind supports",
591
+ });
592
+ /** What a person repeats to confirm a spawn: the preview's digest and proof, bound to the child, its grant and its parent. */
593
+ const sessionSpawnConfirmation = {
594
+ ...sessionSpawnChild,
595
+ expectedRevision: Schema.Literal("0"),
596
+ ...sessionPreviewProof,
597
+ };
598
+ export const sessionSpawnPreviewParametersEffectSchema = Schema.Struct(sessionSpawnChild).check(sessionSpawnGrantFilter);
599
+ export const sessionSpawnConfirmParametersEffectSchema = Schema.Struct(sessionSpawnConfirmation).check(sessionSpawnGrantFilter);
362
600
  /** A new title at the Session's current revision. */
363
601
  export const sessionRenameParametersEffectSchema = Schema.Struct({
364
602
  commandId: protocolIdentifierEffectSchema,
@@ -366,9 +604,24 @@ export const sessionRenameParametersEffectSchema = Schema.Struct({
366
604
  sessionId: protocolIdentifierEffectSchema,
367
605
  title: sessionTitleEffectSchema,
368
606
  });
369
- /** Stop and resume take the same compare-and-set input as start. */
607
+ /** Stop takes the same compare-and-set input as start. */
370
608
  export const sessionStopParametersEffectSchema = sessionStartParametersEffectSchema;
371
- export const sessionResumeParametersEffectSchema = sessionStartParametersEffectSchema;
609
+ /**
610
+ * A stopped or failed child that resumes is live again, so it counts against
611
+ * its parent's concurrency cap (D-336). The caller reads the parent's children
612
+ * on every Node but the one that holds the child, as a spawn does, and the
613
+ * Node adds the live children it holds. The Node refuses a child without this
614
+ * claim; a Session with no parent needs none.
615
+ */
616
+ const sessionResumeParentEffectSchema = Schema.Struct({
617
+ children: sessionSpawnChildrenEffectSchema,
618
+ sessionId: protocolIdentifierEffectSchema,
619
+ });
620
+ /** Resume takes the compare-and-set input of start, and the parent claim of a child. */
621
+ export const sessionResumeParametersEffectSchema = Schema.Struct({
622
+ ...sessionStartParametersEffectSchema.fields,
623
+ parent: Schema.optional(sessionResumeParentEffectSchema),
624
+ });
372
625
  export const sessionMessageSendParametersEffectSchema = Schema.Struct({
373
626
  body: mailboxBodyEffectSchema,
374
627
  commandId: protocolIdentifierEffectSchema,
@@ -474,21 +727,74 @@ export const sessionCreateResultEffectSchema = Schema.Struct({
474
727
  receipt: commandReceiptEffectSchema,
475
728
  session: sessionEffectSchema,
476
729
  });
477
- const sessionSpawnResultStructEffectSchema = Schema.Struct({
730
+ /** 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. */
731
+ export const sessionForkPreviewResultEffectSchema = Schema.Struct({
732
+ ...sessionForkConfirmation,
733
+ method: Schema.Literal("session.fork.preview"),
734
+ path: Schema.Literal("context-handoff"),
735
+ });
736
+ /** The new Session under its create receipt, and `handoff`, the text of its first turn. */
737
+ const sessionSuccessorEffectFields = {
478
738
  delivery: Schema.Literals(["new", "duplicate"]),
479
- harness: sessionSpawnHarnessEffectSchema,
480
- method: Schema.Literal("session.spawn"),
481
- parentSessionId: protocolIdentifierEffectSchema,
739
+ handoff: Schema.String,
740
+ path: Schema.Literal("context-handoff"),
482
741
  receipt: commandReceiptEffectSchema,
483
742
  session: sessionEffectSchema,
743
+ sourceSessionId: protocolIdentifierEffectSchema,
744
+ };
745
+ /** The fork's Session: the source keeps its binding, its worktree and its history. */
746
+ export const sessionForkConfirmResultEffectSchema = Schema.Struct({
747
+ ...sessionSuccessorEffectFields,
748
+ method: Schema.Literal("session.fork.confirm"),
749
+ });
750
+ /** What a switch will do: the Session revision it starts from, and the path that carries the context over. */
751
+ export const sessionSwitchPreviewResultEffectSchema = Schema.Struct({
752
+ ...sessionSwitchConfirmation,
753
+ method: Schema.Literal("session.switch.preview"),
754
+ path: Schema.Literal("context-handoff"),
755
+ });
756
+ /** The successor Session, shaped as a fork's result: the source keeps its binding and its history. */
757
+ export const sessionSwitchConfirmResultEffectSchema = Schema.Struct({
758
+ ...sessionSuccessorEffectFields,
759
+ method: Schema.Literal("session.switch.confirm"),
760
+ });
761
+ /** What confirming will approve: the script and its digest, and whether the Project has approved that digest already. */
762
+ export const sessionSetupPreviewResultEffectSchema = Schema.Struct({
763
+ ...sessionSetupConfirmation,
764
+ approved: Schema.Boolean,
765
+ method: Schema.Literal("session.setup.preview"),
766
+ setup: sessionSetupScriptEffectSchema,
484
767
  });
485
- export const sessionSpawnResultEffectSchema = sessionSpawnResultStructEffectSchema.check(Schema.makeFilter((value) => value.receipt.method === "session.spawn" &&
768
+ /** The approval under its receipt: the Project runs a script with this digest without asking again. */
769
+ export const sessionSetupConfirmResultEffectSchema = Schema.Struct({
770
+ delivery: Schema.Literals(["new", "duplicate"]),
771
+ method: Schema.Literal("session.setup.confirm"),
772
+ receipt: commandReceiptEffectSchema,
773
+ sessionId: protocolIdentifierEffectSchema,
774
+ setupDigest: sha256HexEffectSchema,
775
+ }).check(Schema.makeFilter((result) => result.receipt.state === "succeeded" &&
776
+ result.receipt.method === result.method &&
777
+ result.receipt.target.type === "session" &&
778
+ result.receipt.target.id === result.sessionId, { expected: "a setup approval matching its receipt" }));
779
+ /** What a spawn will do: the child, its grant and its parent, sealed for the confirmation. */
780
+ export const sessionSpawnPreviewResultEffectSchema = Schema.Struct({
781
+ ...sessionSpawnConfirmation,
782
+ method: Schema.Literal("session.spawn.preview"),
783
+ }).check(sessionSpawnGrantFilter);
784
+ /** The child Session, created under a create receipt, and the parent it names. */
785
+ export const sessionSpawnConfirmResultEffectSchema = Schema.Struct({
786
+ delivery: Schema.Literals(["new", "duplicate"]),
787
+ method: Schema.Literal("session.spawn.confirm"),
788
+ parentSessionId: protocolIdentifierEffectSchema,
789
+ receipt: commandReceiptEffectSchema,
790
+ session: sessionEffectSchema,
791
+ }).check(Schema.makeFilter((value) => value.receipt.method === "session.create" &&
486
792
  value.receipt.state === "succeeded" &&
487
- value.receipt.target.id === value.session.id &&
488
793
  value.receipt.target.type === "session" &&
489
- value.session.id !== value.parentSessionId &&
490
- value.session.workspaceId.length > 0, {
491
- expected: "a spawned child Session receipt matching its parent and harness",
794
+ value.receipt.target.id === value.session.id &&
795
+ value.session.executor !== undefined &&
796
+ value.session.parentSessionId === value.parentSessionId, {
797
+ expected: "a spawned executor Session whose create receipt and parent match",
492
798
  }));
493
799
  /** Why a listed Session needs a person now; a listed Session that needs nothing is absent. */
494
800
  const sessionListAttentionEffectSchema = Schema.Struct({
@@ -506,10 +812,68 @@ export const sessionListResultEffectSchema = Schema.Struct({
506
812
  return (new Set(flagged).size === flagged.length &&
507
813
  flagged.every((id) => listed.has(id)));
508
814
  }, { expected: "attention only for listed Sessions, once each" }));
815
+ /**
816
+ * A child on another Node, as the Node that holds its parent records it
817
+ * (D-SPAWN, D-236). The client that created the child links it; a cancel its
818
+ * Node did not answer by the fleet ask deadline marks it `orphaned`, never
819
+ * stopped; a client that reached its Node again reconciles it, recording the
820
+ * state that Node reported. `observedState` is always a state the child's own
821
+ * Node reported.
822
+ */
823
+ export const sessionRemoteChildEffectSchema = Schema.Struct({
824
+ linkedAt: recordedAtEffectSchema,
825
+ node: remoteNodeNameEffectSchema,
826
+ observedState: Schema.optional(sessionStateEffectSchema),
827
+ orphanedAt: Schema.optional(recordedAtEffectSchema),
828
+ sessionId: protocolIdentifierEffectSchema,
829
+ state: Schema.Literals(["linked", "orphaned"]),
830
+ }).check(Schema.makeFilter((value) => (value.state === "orphaned") === (value.orphanedAt !== undefined), {
831
+ expected: "an orphaned child with the instant it was orphaned, and only then",
832
+ }));
833
+ /** The most children on other Nodes one parent records: the highest fan-out cap. */
834
+ const MAX_REMOTE_CHILDREN = SESSION_SPAWN_CAP_BOUNDS.fanOut.maximum;
835
+ /** `remoteChildren`: the parent's children on other Nodes this Node recorded, oldest link first; absent when there are none. */
509
836
  export const sessionShowResultEffectSchema = Schema.Struct({
510
837
  method: Schema.Literal("session.show"),
838
+ remoteChildren: Schema.optional(Schema.Array(sessionRemoteChildEffectSchema).check(Schema.isBetweenLength(1, MAX_REMOTE_CHILDREN))),
511
839
  session: sessionEffectSchema,
512
840
  });
841
+ /**
842
+ * What a client records of a child on another Node on the Node that holds
843
+ * its parent: `linked` after it created the child, `orphaned` when the
844
+ * child's Node gave no reply to a cancel by the fleet ask deadline, and
845
+ * `reconciled` with the state the child's Node reported once it answered
846
+ * again. `reconciled` must carry a state and `linked` may, each a state the
847
+ * child's Node reported; `orphaned` carries none.
848
+ */
849
+ export const sessionSpawnRecordParametersEffectSchema = Schema.Struct({
850
+ childSessionId: protocolIdentifierEffectSchema,
851
+ commandId: protocolIdentifierEffectSchema,
852
+ node: remoteNodeNameEffectSchema,
853
+ outcome: Schema.Literals(["linked", "orphaned", "reconciled"]),
854
+ parentSessionId: protocolIdentifierEffectSchema,
855
+ state: Schema.optional(sessionStateEffectSchema),
856
+ }).check(Schema.makeFilter((value) => value.childSessionId !== value.parentSessionId &&
857
+ (value.outcome === "reconciled"
858
+ ? value.state !== undefined
859
+ : value.outcome === "linked" || value.state === undefined), {
860
+ expected: "a child other than its parent; a state with reconciled, none with orphaned",
861
+ }));
862
+ /** The child record after the change, under its own receipt on the child. */
863
+ export const sessionSpawnRecordResultEffectSchema = Schema.Struct({
864
+ child: sessionRemoteChildEffectSchema,
865
+ delivery: Schema.Literals(["new", "duplicate"]),
866
+ method: Schema.Literal("session.spawn.record"),
867
+ parentSessionId: protocolIdentifierEffectSchema,
868
+ receipt: commandReceiptEffectSchema,
869
+ }).check(Schema.makeFilter((value) => value.receipt.state === "succeeded" &&
870
+ value.receipt.method === value.method &&
871
+ value.receipt.target.type === SESSION_CHILD_TARGET_TYPE &&
872
+ value.receipt.target.id === value.child.sessionId, { expected: "a child record under its own receipt" }));
873
+ export const sessionSpawnRecordRequestEffectSchema = Schema.Struct({
874
+ method: Schema.Literal("session.spawn.record"),
875
+ parameters: sessionSpawnRecordParametersEffectSchema,
876
+ });
513
877
  /** `satisfied` is false when the bounded wait ended first; `session` is then its last read. */
514
878
  export const sessionWaitResultEffectSchema = Schema.Struct({
515
879
  method: Schema.Literal("session.wait"),
@@ -592,10 +956,6 @@ export const sessionRequestPayloadEffectSchema = Schema.Union([
592
956
  method: Schema.Literal("session.wait"),
593
957
  parameters: sessionWaitParametersEffectSchema,
594
958
  }),
595
- Schema.Struct({
596
- method: Schema.Literal("session.spawn"),
597
- parameters: sessionSpawnParametersEffectSchema,
598
- }),
599
959
  Schema.Struct({
600
960
  method: Schema.Literal("session.events.list"),
601
961
  parameters: sessionEventsListParametersEffectSchema,
@@ -632,6 +992,10 @@ export const sessionRequestPayloadEffectSchema = Schema.Union([
632
992
  method: Schema.Literal("session.diff"),
633
993
  parameters: sessionDiffParametersEffectSchema,
634
994
  }),
995
+ Schema.Struct({
996
+ method: Schema.Literal("session.git.status"),
997
+ parameters: sessionGitStatusParametersEffectSchema,
998
+ }),
635
999
  Schema.Struct({
636
1000
  method: Schema.Literal("session.archive"),
637
1001
  parameters: sessionArchiveParametersEffectSchema,
@@ -640,6 +1004,38 @@ export const sessionRequestPayloadEffectSchema = Schema.Union([
640
1004
  method: Schema.Literal("session.rename"),
641
1005
  parameters: sessionRenameParametersEffectSchema,
642
1006
  }),
1007
+ Schema.Struct({
1008
+ method: Schema.Literal("session.fork.preview"),
1009
+ parameters: sessionForkPreviewParametersEffectSchema,
1010
+ }),
1011
+ Schema.Struct({
1012
+ method: Schema.Literal("session.fork.confirm"),
1013
+ parameters: sessionForkConfirmParametersEffectSchema,
1014
+ }),
1015
+ Schema.Struct({
1016
+ method: Schema.Literal("session.switch.preview"),
1017
+ parameters: sessionSwitchPreviewParametersEffectSchema,
1018
+ }),
1019
+ Schema.Struct({
1020
+ method: Schema.Literal("session.switch.confirm"),
1021
+ parameters: sessionSwitchConfirmParametersEffectSchema,
1022
+ }),
1023
+ Schema.Struct({
1024
+ method: Schema.Literal("session.setup.preview"),
1025
+ parameters: sessionSetupPreviewParametersEffectSchema,
1026
+ }),
1027
+ Schema.Struct({
1028
+ method: Schema.Literal("session.setup.confirm"),
1029
+ parameters: sessionSetupConfirmParametersEffectSchema,
1030
+ }),
1031
+ Schema.Struct({
1032
+ method: Schema.Literal("session.spawn.preview"),
1033
+ parameters: sessionSpawnPreviewParametersEffectSchema,
1034
+ }),
1035
+ Schema.Struct({
1036
+ method: Schema.Literal("session.spawn.confirm"),
1037
+ parameters: sessionSpawnConfirmParametersEffectSchema,
1038
+ }),
643
1039
  ]);
644
1040
  export const sessionSuccessResultEffectSchema = Schema.Union([
645
1041
  sessionCreateResultEffectSchema,
@@ -650,16 +1046,24 @@ export const sessionSuccessResultEffectSchema = Schema.Union([
650
1046
  sessionObserveResultEffectSchema,
651
1047
  sessionShowResultEffectSchema,
652
1048
  sessionWaitResultEffectSchema,
653
- sessionSpawnResultEffectSchema,
654
1049
  sessionEventsListResultEffectSchema,
655
1050
  sessionStartResultEffectSchema,
656
1051
  sessionStopResultEffectSchema,
657
1052
  sessionResumeResultEffectSchema,
658
1053
  sessionDiffResultEffectSchema,
1054
+ sessionGitStatusResultEffectSchema,
659
1055
  sessionArchiveResultEffectSchema,
660
1056
  sessionRenameResultEffectSchema,
1057
+ sessionForkPreviewResultEffectSchema,
1058
+ sessionForkConfirmResultEffectSchema,
1059
+ sessionSwitchPreviewResultEffectSchema,
1060
+ sessionSwitchConfirmResultEffectSchema,
1061
+ sessionSetupPreviewResultEffectSchema,
1062
+ sessionSetupConfirmResultEffectSchema,
1063
+ sessionSpawnPreviewResultEffectSchema,
1064
+ sessionSpawnConfirmResultEffectSchema,
661
1065
  ]);
662
1066
  export { agentPermissionRequestEffectSchema, agentPermissionResultEffectSchema, } from "./agent-permission-effect-schema.js";
663
- export { sessionObservationEffectSchema, sessionObserveResultEffectSchema, } from "./observation-effect-schema.js";
664
- export { sessionArchiveParametersEffectSchema, sessionDiffParametersEffectSchema, sessionDiffResultEffectSchema, } from "./worktree-effect-schema.js";
1067
+ export { sessionExecutorKindEffectSchema, sessionObservationEffectSchema, sessionObserveResultEffectSchema, } from "./observation-effect-schema.js";
1068
+ export { sessionArchiveParametersEffectSchema, sessionDiffParametersEffectSchema, sessionDiffResultEffectSchema, sessionGitStatusParametersEffectSchema, sessionGitStatusResultEffectSchema, } from "./worktree-effect-schema.js";
665
1069
  //# sourceMappingURL=effect-schema.js.map