@cotal-ai/cli 0.100.2 → 0.101.1

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 (626) hide show
  1. package/dist/chat/chat-view.d.ts.map +1 -1
  2. package/dist/chat/chat-view.js +5 -1
  3. package/dist/chat/chat-view.js.map +1 -1
  4. package/dist/chat/engine.d.ts +2 -1
  5. package/dist/chat/engine.d.ts.map +1 -1
  6. package/dist/chat/engine.js +2 -1
  7. package/dist/chat/engine.js.map +1 -1
  8. package/dist/chat/frontend.d.ts.map +1 -1
  9. package/dist/chat/frontend.js +13 -7
  10. package/dist/chat/frontend.js.map +1 -1
  11. package/dist/chat/native-session.d.ts +22 -3
  12. package/dist/chat/native-session.d.ts.map +1 -1
  13. package/dist/chat/native-session.js +91 -19
  14. package/dist/chat/native-session.js.map +1 -1
  15. package/dist/chat/open-session.d.ts +1 -0
  16. package/dist/chat/open-session.d.ts.map +1 -1
  17. package/dist/chat/open-session.js +1 -1
  18. package/dist/chat/open-session.js.map +1 -1
  19. package/dist/chat/picker.d.ts +5 -0
  20. package/dist/chat/picker.d.ts.map +1 -1
  21. package/dist/chat/picker.js +23 -10
  22. package/dist/chat/picker.js.map +1 -1
  23. package/dist/chat/plain.d.ts.map +1 -1
  24. package/dist/chat/plain.js +36 -10
  25. package/dist/chat/plain.js.map +1 -1
  26. package/dist/chat/session.d.ts +5 -0
  27. package/dist/chat/session.d.ts.map +1 -1
  28. package/dist/chat/static-session.d.ts +1 -0
  29. package/dist/chat/static-session.d.ts.map +1 -1
  30. package/dist/chat/static-session.js +24 -8
  31. package/dist/chat/static-session.js.map +1 -1
  32. package/dist/chat/stdio-io.d.ts +2 -0
  33. package/dist/chat/stdio-io.d.ts.map +1 -1
  34. package/dist/chat/stdio-io.js +6 -6
  35. package/dist/chat/stdio-io.js.map +1 -1
  36. package/dist/chat/stdio.d.ts +3 -2
  37. package/dist/chat/stdio.d.ts.map +1 -1
  38. package/dist/chat/stdio.js +26 -25
  39. package/dist/chat/stdio.js.map +1 -1
  40. package/dist/chat/user-session.d.ts +1 -0
  41. package/dist/chat/user-session.d.ts.map +1 -1
  42. package/dist/chat/user-session.js +1 -1
  43. package/dist/chat/user-session.js.map +1 -1
  44. package/dist/chat/view.d.ts +5 -4
  45. package/dist/chat/view.d.ts.map +1 -1
  46. package/dist/chat/view.js +10 -8
  47. package/dist/chat/view.js.map +1 -1
  48. package/dist/command.d.ts +5 -0
  49. package/dist/command.d.ts.map +1 -1
  50. package/dist/command.js +295 -82
  51. package/dist/command.js.map +1 -1
  52. package/dist/commands/agents.d.ts +29 -5
  53. package/dist/commands/agents.d.ts.map +1 -1
  54. package/dist/commands/agents.js +100 -35
  55. package/dist/commands/agents.js.map +1 -1
  56. package/dist/commands/backup-maintenance.d.ts.map +1 -1
  57. package/dist/commands/backup-maintenance.js +54 -21
  58. package/dist/commands/backup-maintenance.js.map +1 -1
  59. package/dist/commands/backup-read.d.ts.map +1 -1
  60. package/dist/commands/backup-read.js +12 -15
  61. package/dist/commands/backup-read.js.map +1 -1
  62. package/dist/commands/backup-restore.d.ts.map +1 -1
  63. package/dist/commands/backup-restore.js +20 -4
  64. package/dist/commands/backup-restore.js.map +1 -1
  65. package/dist/commands/backup.d.ts.map +1 -1
  66. package/dist/commands/backup.js +156 -28
  67. package/dist/commands/backup.js.map +1 -1
  68. package/dist/commands/channel-members.d.ts +1 -1
  69. package/dist/commands/channel-members.d.ts.map +1 -1
  70. package/dist/commands/channel-members.js +115 -29
  71. package/dist/commands/channel-members.js.map +1 -1
  72. package/dist/commands/channels.d.ts +11 -1
  73. package/dist/commands/channels.d.ts.map +1 -1
  74. package/dist/commands/channels.js +109 -20
  75. package/dist/commands/channels.js.map +1 -1
  76. package/dist/commands/chat.d.ts +11 -3
  77. package/dist/commands/chat.d.ts.map +1 -1
  78. package/dist/commands/chat.js +50 -22
  79. package/dist/commands/chat.js.map +1 -1
  80. package/dist/commands/clean.d.ts +10 -5
  81. package/dist/commands/clean.d.ts.map +1 -1
  82. package/dist/commands/clean.js +245 -42
  83. package/dist/commands/clean.js.map +1 -1
  84. package/dist/commands/completion.d.ts +15 -2
  85. package/dist/commands/completion.d.ts.map +1 -1
  86. package/dist/commands/completion.js +91 -26
  87. package/dist/commands/completion.js.map +1 -1
  88. package/dist/commands/config.d.ts +24 -1
  89. package/dist/commands/config.d.ts.map +1 -1
  90. package/dist/commands/config.js +65 -13
  91. package/dist/commands/config.js.map +1 -1
  92. package/dist/commands/console.d.ts.map +1 -1
  93. package/dist/commands/console.js +5 -4
  94. package/dist/commands/console.js.map +1 -1
  95. package/dist/commands/describe.d.ts +4 -2
  96. package/dist/commands/describe.d.ts.map +1 -1
  97. package/dist/commands/describe.js +4 -4
  98. package/dist/commands/describe.js.map +1 -1
  99. package/dist/commands/doctor.d.ts +1 -1
  100. package/dist/commands/doctor.d.ts.map +1 -1
  101. package/dist/commands/doctor.js +261 -34
  102. package/dist/commands/doctor.js.map +1 -1
  103. package/dist/commands/down-manifest.d.ts.map +1 -1
  104. package/dist/commands/down-manifest.js +9 -6
  105. package/dist/commands/down-manifest.js.map +1 -1
  106. package/dist/commands/down-services.d.ts +17 -16
  107. package/dist/commands/down-services.d.ts.map +1 -1
  108. package/dist/commands/down-services.js +29 -53
  109. package/dist/commands/down-services.js.map +1 -1
  110. package/dist/commands/down.d.ts +2 -2
  111. package/dist/commands/down.d.ts.map +1 -1
  112. package/dist/commands/down.js +96 -67
  113. package/dist/commands/down.js.map +1 -1
  114. package/dist/commands/endpoint-deregister.d.ts.map +1 -1
  115. package/dist/commands/endpoint-deregister.js +2 -2
  116. package/dist/commands/endpoint-deregister.js.map +1 -1
  117. package/dist/commands/endpoint.d.ts +2 -1
  118. package/dist/commands/endpoint.d.ts.map +1 -1
  119. package/dist/commands/endpoint.js +2 -2
  120. package/dist/commands/endpoint.js.map +1 -1
  121. package/dist/commands/endpoints.d.ts +1 -0
  122. package/dist/commands/endpoints.d.ts.map +1 -1
  123. package/dist/commands/endpoints.js +20 -5
  124. package/dist/commands/endpoints.js.map +1 -1
  125. package/dist/commands/feedback.d.ts.map +1 -1
  126. package/dist/commands/feedback.js +40 -2
  127. package/dist/commands/feedback.js.map +1 -1
  128. package/dist/commands/help.d.ts.map +1 -1
  129. package/dist/commands/help.js +2 -1
  130. package/dist/commands/help.js.map +1 -1
  131. package/dist/commands/history-clear.d.ts.map +1 -1
  132. package/dist/commands/history-clear.js +67 -51
  133. package/dist/commands/history-clear.js.map +1 -1
  134. package/dist/commands/history.d.ts +17 -2
  135. package/dist/commands/history.d.ts.map +1 -1
  136. package/dist/commands/history.js +221 -34
  137. package/dist/commands/history.js.map +1 -1
  138. package/dist/commands/join.d.ts +2 -0
  139. package/dist/commands/join.d.ts.map +1 -1
  140. package/dist/commands/join.js +132 -80
  141. package/dist/commands/join.js.map +1 -1
  142. package/dist/commands/meshes-add.d.ts +19 -4
  143. package/dist/commands/meshes-add.d.ts.map +1 -1
  144. package/dist/commands/meshes-add.js +114 -15
  145. package/dist/commands/meshes-add.js.map +1 -1
  146. package/dist/commands/meshes-wizard.d.ts +1 -0
  147. package/dist/commands/meshes-wizard.d.ts.map +1 -1
  148. package/dist/commands/meshes-wizard.js +45 -13
  149. package/dist/commands/meshes-wizard.js.map +1 -1
  150. package/dist/commands/meshes.d.ts +1 -1
  151. package/dist/commands/meshes.d.ts.map +1 -1
  152. package/dist/commands/meshes.js +76 -47
  153. package/dist/commands/meshes.js.map +1 -1
  154. package/dist/commands/mint.d.ts.map +1 -1
  155. package/dist/commands/mint.js +212 -19
  156. package/dist/commands/mint.js.map +1 -1
  157. package/dist/commands/models.d.ts +5 -1
  158. package/dist/commands/models.d.ts.map +1 -1
  159. package/dist/commands/models.js +21 -13
  160. package/dist/commands/models.js.map +1 -1
  161. package/dist/commands/persona-remote.d.ts.map +1 -1
  162. package/dist/commands/persona-remote.js +24 -13
  163. package/dist/commands/persona-remote.js.map +1 -1
  164. package/dist/commands/persona.d.ts +1 -1
  165. package/dist/commands/persona.d.ts.map +1 -1
  166. package/dist/commands/persona.js +92 -23
  167. package/dist/commands/persona.js.map +1 -1
  168. package/dist/commands/personas.d.ts.map +1 -1
  169. package/dist/commands/personas.js +59 -40
  170. package/dist/commands/personas.js.map +1 -1
  171. package/dist/commands/reset-space-apply.d.ts.map +1 -1
  172. package/dist/commands/reset-space-apply.js +69 -17
  173. package/dist/commands/reset-space-apply.js.map +1 -1
  174. package/dist/commands/reset-store-apply.d.ts +16 -0
  175. package/dist/commands/reset-store-apply.d.ts.map +1 -1
  176. package/dist/commands/reset-store-apply.js +122 -23
  177. package/dist/commands/reset-store-apply.js.map +1 -1
  178. package/dist/commands/reset.d.ts.map +1 -1
  179. package/dist/commands/reset.js +8 -7
  180. package/dist/commands/reset.js.map +1 -1
  181. package/dist/commands/revoke-credential.d.ts +5 -0
  182. package/dist/commands/revoke-credential.d.ts.map +1 -0
  183. package/dist/commands/revoke-credential.js +128 -0
  184. package/dist/commands/revoke-credential.js.map +1 -0
  185. package/dist/commands/send.d.ts +11 -3
  186. package/dist/commands/send.d.ts.map +1 -1
  187. package/dist/commands/send.js +284 -47
  188. package/dist/commands/send.js.map +1 -1
  189. package/dist/commands/service-actions.d.ts +2 -1
  190. package/dist/commands/service-actions.d.ts.map +1 -1
  191. package/dist/commands/service-actions.js +117 -21
  192. package/dist/commands/service-actions.js.map +1 -1
  193. package/dist/commands/service-log-follow.js +1 -1
  194. package/dist/commands/service-log-follow.js.map +1 -1
  195. package/dist/commands/service-registry.d.ts +1 -1
  196. package/dist/commands/service-registry.d.ts.map +1 -1
  197. package/dist/commands/service-registry.js +74 -30
  198. package/dist/commands/service-registry.js.map +1 -1
  199. package/dist/commands/service-set-stop.d.ts.map +1 -1
  200. package/dist/commands/service-set-stop.js +3 -2
  201. package/dist/commands/service-set-stop.js.map +1 -1
  202. package/dist/commands/setup-start.d.ts.map +1 -1
  203. package/dist/commands/setup-start.js +46 -5
  204. package/dist/commands/setup-start.js.map +1 -1
  205. package/dist/commands/setup.d.ts.map +1 -1
  206. package/dist/commands/setup.js +28 -13
  207. package/dist/commands/setup.js.map +1 -1
  208. package/dist/commands/space-delete.d.ts.map +1 -1
  209. package/dist/commands/space-delete.js +130 -41
  210. package/dist/commands/space-delete.js.map +1 -1
  211. package/dist/commands/space-registration.d.ts +13 -6
  212. package/dist/commands/space-registration.d.ts.map +1 -1
  213. package/dist/commands/space-registration.js +167 -46
  214. package/dist/commands/space-registration.js.map +1 -1
  215. package/dist/commands/space.d.ts +15 -1
  216. package/dist/commands/space.d.ts.map +1 -1
  217. package/dist/commands/space.js +66 -24
  218. package/dist/commands/space.js.map +1 -1
  219. package/dist/commands/spawn-preview.d.ts.map +1 -1
  220. package/dist/commands/spawn-preview.js +48 -10
  221. package/dist/commands/spawn-preview.js.map +1 -1
  222. package/dist/commands/spawn.d.ts +36 -13
  223. package/dist/commands/spawn.d.ts.map +1 -1
  224. package/dist/commands/spawn.js +306 -130
  225. package/dist/commands/spawn.js.map +1 -1
  226. package/dist/commands/stack-down.d.ts +9 -3
  227. package/dist/commands/stack-down.d.ts.map +1 -1
  228. package/dist/commands/stack-down.js +348 -64
  229. package/dist/commands/stack-down.js.map +1 -1
  230. package/dist/commands/stack-gone.d.ts +17 -0
  231. package/dist/commands/stack-gone.d.ts.map +1 -0
  232. package/dist/commands/stack-gone.js +218 -0
  233. package/dist/commands/stack-gone.js.map +1 -0
  234. package/dist/commands/stack-up.d.ts +64 -4
  235. package/dist/commands/stack-up.d.ts.map +1 -1
  236. package/dist/commands/stack-up.js +482 -55
  237. package/dist/commands/stack-up.js.map +1 -1
  238. package/dist/commands/status.d.ts +76 -2
  239. package/dist/commands/status.d.ts.map +1 -1
  240. package/dist/commands/status.js +550 -112
  241. package/dist/commands/status.js.map +1 -1
  242. package/dist/commands/team-agent-apply.d.ts.map +1 -1
  243. package/dist/commands/team-agent-apply.js +4 -3
  244. package/dist/commands/team-agent-apply.js.map +1 -1
  245. package/dist/commands/team-agent-remove.d.ts.map +1 -1
  246. package/dist/commands/team-agent-remove.js +4 -4
  247. package/dist/commands/team-agent-remove.js.map +1 -1
  248. package/dist/commands/team-boot-controller.d.ts.map +1 -1
  249. package/dist/commands/team-boot-controller.js +8 -2
  250. package/dist/commands/team-boot-controller.js.map +1 -1
  251. package/dist/commands/team-channel-remove.d.ts.map +1 -1
  252. package/dist/commands/team-channel-remove.js +26 -10
  253. package/dist/commands/team-channel-remove.js.map +1 -1
  254. package/dist/commands/team-deploy-apply.d.ts.map +1 -1
  255. package/dist/commands/team-deploy-apply.js +4 -3
  256. package/dist/commands/team-deploy-apply.js.map +1 -1
  257. package/dist/commands/team-mixed-remove.js +5 -5
  258. package/dist/commands/team-mixed-remove.js.map +1 -1
  259. package/dist/commands/team.d.ts.map +1 -1
  260. package/dist/commands/team.js +94 -32
  261. package/dist/commands/team.js.map +1 -1
  262. package/dist/commands/telemetry.d.ts.map +1 -1
  263. package/dist/commands/telemetry.js +3 -1
  264. package/dist/commands/telemetry.js.map +1 -1
  265. package/dist/commands/topology.d.ts.map +1 -1
  266. package/dist/commands/topology.js +11 -7
  267. package/dist/commands/topology.js.map +1 -1
  268. package/dist/commands/up.d.ts +6 -6
  269. package/dist/commands/up.d.ts.map +1 -1
  270. package/dist/commands/up.js +963 -240
  271. package/dist/commands/up.js.map +1 -1
  272. package/dist/commands/update.d.ts.map +1 -1
  273. package/dist/commands/update.js +9 -3
  274. package/dist/commands/update.js.map +1 -1
  275. package/dist/commands/use.d.ts +5 -1
  276. package/dist/commands/use.d.ts.map +1 -1
  277. package/dist/commands/use.js +55 -12
  278. package/dist/commands/use.js.map +1 -1
  279. package/dist/commands/watch.d.ts +4 -1
  280. package/dist/commands/watch.d.ts.map +1 -1
  281. package/dist/commands/watch.js +15 -3
  282. package/dist/commands/watch.js.map +1 -1
  283. package/dist/commands/who.d.ts +2 -0
  284. package/dist/commands/who.d.ts.map +1 -1
  285. package/dist/commands/who.js +18 -5
  286. package/dist/commands/who.js.map +1 -1
  287. package/dist/commands/whoami.d.ts +44 -5
  288. package/dist/commands/whoami.d.ts.map +1 -1
  289. package/dist/commands/whoami.js +168 -16
  290. package/dist/commands/whoami.js.map +1 -1
  291. package/dist/console/app.d.ts +1 -1
  292. package/dist/console/app.d.ts.map +1 -1
  293. package/dist/console/app.js +15 -9
  294. package/dist/console/app.js.map +1 -1
  295. package/dist/console/launch.d.ts +25 -0
  296. package/dist/console/launch.d.ts.map +1 -0
  297. package/dist/console/launch.js +56 -0
  298. package/dist/console/launch.js.map +1 -0
  299. package/dist/console/ui/CommandPalette.d.ts +5 -4
  300. package/dist/console/ui/CommandPalette.d.ts.map +1 -1
  301. package/dist/console/ui/CommandPalette.js +136 -45
  302. package/dist/console/ui/CommandPalette.js.map +1 -1
  303. package/dist/console/ui/Help.js +1 -1
  304. package/dist/console/ui/Help.js.map +1 -1
  305. package/dist/console/ui/Modal.d.ts +10 -0
  306. package/dist/console/ui/Modal.d.ts.map +1 -0
  307. package/dist/console/ui/Modal.js +8 -0
  308. package/dist/console/ui/Modal.js.map +1 -0
  309. package/dist/console/ui/NewAgent.d.ts +14 -0
  310. package/dist/console/ui/NewAgent.d.ts.map +1 -0
  311. package/dist/console/ui/NewAgent.js +114 -0
  312. package/dist/console/ui/NewAgent.js.map +1 -0
  313. package/dist/console/ui/StatusBar.d.ts +1 -2
  314. package/dist/console/ui/StatusBar.d.ts.map +1 -1
  315. package/dist/console/ui/StatusBar.js +6 -8
  316. package/dist/console/ui/StatusBar.js.map +1 -1
  317. package/dist/console/ui/topo/Map.d.ts.map +1 -1
  318. package/dist/console/ui/topo/Map.js +1 -2
  319. package/dist/console/ui/topo/Map.js.map +1 -1
  320. package/dist/console/ui/topo/Matrix.js +2 -2
  321. package/dist/console/ui/topo/Matrix.js.map +1 -1
  322. package/dist/console/ui/topo/Sequence.d.ts.map +1 -1
  323. package/dist/console/ui/topo/Sequence.js +5 -4
  324. package/dist/console/ui/topo/Sequence.js.map +1 -1
  325. package/dist/console/ui/topo/model.d.ts +2 -1
  326. package/dist/console/ui/topo/model.d.ts.map +1 -1
  327. package/dist/console/ui/topo/model.js +4 -3
  328. package/dist/console/ui/topo/model.js.map +1 -1
  329. package/dist/exec-endpoint/service-adapter.d.ts.map +1 -1
  330. package/dist/exec-endpoint/service-adapter.js +13 -3
  331. package/dist/exec-endpoint/service-adapter.js.map +1 -1
  332. package/dist/ext-loader.d.ts +4 -0
  333. package/dist/ext-loader.d.ts.map +1 -1
  334. package/dist/ext-loader.js +6 -0
  335. package/dist/ext-loader.js.map +1 -1
  336. package/dist/help.d.ts.map +1 -1
  337. package/dist/help.js +44 -23
  338. package/dist/help.js.map +1 -1
  339. package/dist/index.d.ts.map +1 -1
  340. package/dist/index.js +59 -54
  341. package/dist/index.js.map +1 -1
  342. package/dist/lib/agent-skills.d.ts.map +1 -1
  343. package/dist/lib/agent-skills.js +2 -1
  344. package/dist/lib/agent-skills.js.map +1 -1
  345. package/dist/lib/attach-client.js +2 -2
  346. package/dist/lib/attach-client.js.map +1 -1
  347. package/dist/lib/backup-artifact.d.ts +29 -8
  348. package/dist/lib/backup-artifact.d.ts.map +1 -1
  349. package/dist/lib/backup-artifact.js +147 -26
  350. package/dist/lib/backup-artifact.js.map +1 -1
  351. package/dist/lib/broker-service.d.ts +27 -3
  352. package/dist/lib/broker-service.d.ts.map +1 -1
  353. package/dist/lib/broker-service.js +142 -29
  354. package/dist/lib/broker-service.js.map +1 -1
  355. package/dist/lib/broker-store-health.d.ts +89 -0
  356. package/dist/lib/broker-store-health.d.ts.map +1 -0
  357. package/dist/lib/broker-store-health.js +171 -0
  358. package/dist/lib/broker-store-health.js.map +1 -0
  359. package/dist/lib/cancel.d.ts +4 -4
  360. package/dist/lib/cancel.d.ts.map +1 -1
  361. package/dist/lib/cancel.js +5 -5
  362. package/dist/lib/cancel.js.map +1 -1
  363. package/dist/lib/completion-install.d.ts +11 -2
  364. package/dist/lib/completion-install.d.ts.map +1 -1
  365. package/dist/lib/completion-install.js +79 -21
  366. package/dist/lib/completion-install.js.map +1 -1
  367. package/dist/lib/completion-scripts.d.ts.map +1 -1
  368. package/dist/lib/completion-scripts.js +2 -2
  369. package/dist/lib/completion-scripts.js.map +1 -1
  370. package/dist/lib/completion.d.ts +5 -1
  371. package/dist/lib/completion.d.ts.map +1 -1
  372. package/dist/lib/completion.js +10 -0
  373. package/dist/lib/completion.js.map +1 -1
  374. package/dist/lib/concrete-channel.d.ts +6 -0
  375. package/dist/lib/concrete-channel.d.ts.map +1 -0
  376. package/dist/lib/concrete-channel.js +17 -0
  377. package/dist/lib/concrete-channel.js.map +1 -0
  378. package/dist/lib/confirmation-required.d.ts +3 -12
  379. package/dist/lib/confirmation-required.d.ts.map +1 -1
  380. package/dist/lib/confirmation-required.js +9 -8
  381. package/dist/lib/confirmation-required.js.map +1 -1
  382. package/dist/lib/connect.d.ts +9 -0
  383. package/dist/lib/connect.d.ts.map +1 -1
  384. package/dist/lib/connect.js +27 -0
  385. package/dist/lib/connect.js.map +1 -1
  386. package/dist/lib/control.d.ts +42 -12
  387. package/dist/lib/control.d.ts.map +1 -1
  388. package/dist/lib/control.js +148 -34
  389. package/dist/lib/control.js.map +1 -1
  390. package/dist/lib/controller-restore.d.ts.map +1 -1
  391. package/dist/lib/controller-restore.js +12 -7
  392. package/dist/lib/controller-restore.js.map +1 -1
  393. package/dist/lib/credential-authority.d.ts.map +1 -1
  394. package/dist/lib/credential-authority.js +3 -0
  395. package/dist/lib/credential-authority.js.map +1 -1
  396. package/dist/lib/credential-exports.d.ts +17 -0
  397. package/dist/lib/credential-exports.d.ts.map +1 -0
  398. package/dist/lib/credential-exports.js +21 -0
  399. package/dist/lib/credential-exports.js.map +1 -0
  400. package/dist/lib/debug-flag.d.ts +4 -0
  401. package/dist/lib/debug-flag.d.ts.map +1 -0
  402. package/dist/lib/debug-flag.js +7 -0
  403. package/dist/lib/debug-flag.js.map +1 -0
  404. package/dist/lib/default-persona.d.ts +2 -0
  405. package/dist/lib/default-persona.d.ts.map +1 -1
  406. package/dist/lib/default-persona.js +2 -0
  407. package/dist/lib/default-persona.js.map +1 -1
  408. package/dist/lib/delivery-proc.d.ts +1 -1
  409. package/dist/lib/delivery-proc.d.ts.map +1 -1
  410. package/dist/lib/delivery-proc.js +5 -4
  411. package/dist/lib/delivery-proc.js.map +1 -1
  412. package/dist/lib/delivery-responder.d.ts +7 -3
  413. package/dist/lib/delivery-responder.d.ts.map +1 -1
  414. package/dist/lib/delivery-responder.js +8 -4
  415. package/dist/lib/delivery-responder.js.map +1 -1
  416. package/dist/lib/denied-write.d.ts +8 -0
  417. package/dist/lib/denied-write.d.ts.map +1 -0
  418. package/dist/lib/denied-write.js +24 -0
  419. package/dist/lib/denied-write.js.map +1 -0
  420. package/dist/lib/endpoint-capability-gates.js +2 -2
  421. package/dist/lib/endpoint-capability-gates.js.map +1 -1
  422. package/dist/lib/flag-value-refusal.d.ts +8 -0
  423. package/dist/lib/flag-value-refusal.d.ts.map +1 -0
  424. package/dist/lib/flag-value-refusal.js +10 -0
  425. package/dist/lib/flag-value-refusal.js.map +1 -0
  426. package/dist/lib/install-umask.d.ts +5 -0
  427. package/dist/lib/install-umask.d.ts.map +1 -1
  428. package/dist/lib/install-umask.js +25 -0
  429. package/dist/lib/install-umask.js.map +1 -1
  430. package/dist/lib/interrupt-notice.d.ts +23 -1
  431. package/dist/lib/interrupt-notice.d.ts.map +1 -1
  432. package/dist/lib/interrupt-notice.js +27 -6
  433. package/dist/lib/interrupt-notice.js.map +1 -1
  434. package/dist/lib/interrupt-report.d.ts +7 -0
  435. package/dist/lib/interrupt-report.d.ts.map +1 -0
  436. package/dist/lib/interrupt-report.js +24 -0
  437. package/dist/lib/interrupt-report.js.map +1 -0
  438. package/dist/lib/isolated-broker.d.ts +1 -1
  439. package/dist/lib/isolated-broker.d.ts.map +1 -1
  440. package/dist/lib/isolated-broker.js +17 -8
  441. package/dist/lib/isolated-broker.js.map +1 -1
  442. package/dist/lib/legacy-start.d.ts +8 -6
  443. package/dist/lib/legacy-start.d.ts.map +1 -1
  444. package/dist/lib/legacy-start.js +36 -36
  445. package/dist/lib/legacy-start.js.map +1 -1
  446. package/dist/lib/manager-choice.d.ts +92 -4
  447. package/dist/lib/manager-choice.d.ts.map +1 -1
  448. package/dist/lib/manager-choice.js +338 -23
  449. package/dist/lib/manager-choice.js.map +1 -1
  450. package/dist/lib/manager-proc.d.ts.map +1 -1
  451. package/dist/lib/manager-proc.js +7 -6
  452. package/dist/lib/manager-proc.js.map +1 -1
  453. package/dist/lib/manifest/index.d.ts +5 -1
  454. package/dist/lib/manifest/index.d.ts.map +1 -1
  455. package/dist/lib/manifest/index.js +50 -5
  456. package/dist/lib/manifest/index.js.map +1 -1
  457. package/dist/lib/manifest/preflight.d.ts +4 -0
  458. package/dist/lib/manifest/preflight.d.ts.map +1 -1
  459. package/dist/lib/manifest/preflight.js +18 -1
  460. package/dist/lib/manifest/preflight.js.map +1 -1
  461. package/dist/lib/manifest/resolve.d.ts +8 -0
  462. package/dist/lib/manifest/resolve.d.ts.map +1 -1
  463. package/dist/lib/manifest/resolve.js +104 -11
  464. package/dist/lib/manifest/resolve.js.map +1 -1
  465. package/dist/lib/missing-flags.js +1 -1
  466. package/dist/lib/missing-flags.js.map +1 -1
  467. package/dist/lib/nats-bin.d.ts +28 -5
  468. package/dist/lib/nats-bin.d.ts.map +1 -1
  469. package/dist/lib/nats-bin.js +85 -7
  470. package/dist/lib/nats-bin.js.map +1 -1
  471. package/dist/lib/nearest-word.d.ts +14 -0
  472. package/dist/lib/nearest-word.d.ts.map +1 -0
  473. package/dist/lib/nearest-word.js +76 -0
  474. package/dist/lib/nearest-word.js.map +1 -0
  475. package/dist/lib/no-expiry-record.d.ts +8 -0
  476. package/dist/lib/no-expiry-record.d.ts.map +1 -0
  477. package/dist/lib/no-expiry-record.js +27 -0
  478. package/dist/lib/no-expiry-record.js.map +1 -0
  479. package/dist/lib/paths.d.ts +31 -0
  480. package/dist/lib/paths.d.ts.map +1 -1
  481. package/dist/lib/paths.js +92 -2
  482. package/dist/lib/paths.js.map +1 -1
  483. package/dist/lib/persona-files.d.ts +29 -6
  484. package/dist/lib/persona-files.d.ts.map +1 -1
  485. package/dist/lib/persona-files.js +179 -36
  486. package/dist/lib/persona-files.js.map +1 -1
  487. package/dist/lib/personas.d.ts +18 -1
  488. package/dist/lib/personas.d.ts.map +1 -1
  489. package/dist/lib/personas.js +65 -6
  490. package/dist/lib/personas.js.map +1 -1
  491. package/dist/lib/prompts.d.ts +7 -1
  492. package/dist/lib/prompts.d.ts.map +1 -1
  493. package/dist/lib/prompts.js +43 -3
  494. package/dist/lib/prompts.js.map +1 -1
  495. package/dist/lib/registry-errors.d.ts +2 -1
  496. package/dist/lib/registry-errors.d.ts.map +1 -1
  497. package/dist/lib/registry-errors.js +6 -2
  498. package/dist/lib/registry-errors.js.map +1 -1
  499. package/dist/lib/reset-space-plan.d.ts +2 -0
  500. package/dist/lib/reset-space-plan.d.ts.map +1 -1
  501. package/dist/lib/reset-space-plan.js +1 -1
  502. package/dist/lib/reset-space-plan.js.map +1 -1
  503. package/dist/lib/restore.d.ts +45 -3
  504. package/dist/lib/restore.d.ts.map +1 -1
  505. package/dist/lib/restore.js +233 -39
  506. package/dist/lib/restore.js.map +1 -1
  507. package/dist/lib/rolled-back-runs.d.ts +36 -0
  508. package/dist/lib/rolled-back-runs.d.ts.map +1 -0
  509. package/dist/lib/rolled-back-runs.js +96 -0
  510. package/dist/lib/rolled-back-runs.js.map +1 -0
  511. package/dist/lib/service-custody-win32.d.ts +25 -0
  512. package/dist/lib/service-custody-win32.d.ts.map +1 -0
  513. package/dist/lib/service-custody-win32.js +67 -0
  514. package/dist/lib/service-custody-win32.js.map +1 -0
  515. package/dist/lib/service-definitions.d.ts +16 -3
  516. package/dist/lib/service-definitions.d.ts.map +1 -1
  517. package/dist/lib/service-definitions.js +99 -27
  518. package/dist/lib/service-definitions.js.map +1 -1
  519. package/dist/lib/service-instances.d.ts +46 -5
  520. package/dist/lib/service-instances.d.ts.map +1 -1
  521. package/dist/lib/service-instances.js +112 -18
  522. package/dist/lib/service-instances.js.map +1 -1
  523. package/dist/lib/service-journal.js +1 -1
  524. package/dist/lib/service-journal.js.map +1 -1
  525. package/dist/lib/service-presets.d.ts.map +1 -1
  526. package/dist/lib/service-presets.js +16 -0
  527. package/dist/lib/service-presets.js.map +1 -1
  528. package/dist/lib/service-process.d.ts +53 -15
  529. package/dist/lib/service-process.d.ts.map +1 -1
  530. package/dist/lib/service-process.js +533 -86
  531. package/dist/lib/service-process.js.map +1 -1
  532. package/dist/lib/service-systemd-install.js +1 -1
  533. package/dist/lib/service-systemd-install.js.map +1 -1
  534. package/dist/lib/space-streams.d.ts +18 -0
  535. package/dist/lib/space-streams.d.ts.map +1 -0
  536. package/dist/lib/space-streams.js +35 -0
  537. package/dist/lib/space-streams.js.map +1 -0
  538. package/dist/lib/spawn-defaults.d.ts +25 -1
  539. package/dist/lib/spawn-defaults.d.ts.map +1 -1
  540. package/dist/lib/spawn-defaults.js +37 -1
  541. package/dist/lib/spawn-defaults.js.map +1 -1
  542. package/dist/lib/stack-journal.d.ts +157 -14
  543. package/dist/lib/stack-journal.d.ts.map +1 -1
  544. package/dist/lib/stack-journal.js +406 -49
  545. package/dist/lib/stack-journal.js.map +1 -1
  546. package/dist/lib/stack-listeners.d.ts +17 -0
  547. package/dist/lib/stack-listeners.d.ts.map +1 -0
  548. package/dist/lib/stack-listeners.js +54 -0
  549. package/dist/lib/stack-listeners.js.map +1 -0
  550. package/dist/lib/stack-members.d.ts +13 -0
  551. package/dist/lib/stack-members.d.ts.map +1 -0
  552. package/dist/lib/stack-members.js +24 -0
  553. package/dist/lib/stack-members.js.map +1 -0
  554. package/dist/lib/stack-resume.d.ts.map +1 -1
  555. package/dist/lib/stack-resume.js +5 -2
  556. package/dist/lib/stack-resume.js.map +1 -1
  557. package/dist/lib/stack-runs.d.ts +34 -0
  558. package/dist/lib/stack-runs.d.ts.map +1 -0
  559. package/dist/lib/stack-runs.js +75 -0
  560. package/dist/lib/stack-runs.js.map +1 -0
  561. package/dist/lib/status.d.ts +11 -0
  562. package/dist/lib/status.d.ts.map +1 -1
  563. package/dist/lib/status.js +4 -5
  564. package/dist/lib/status.js.map +1 -1
  565. package/dist/lib/stdout-owner.d.ts +12 -3
  566. package/dist/lib/stdout-owner.d.ts.map +1 -1
  567. package/dist/lib/stdout-owner.js +33 -5
  568. package/dist/lib/stdout-owner.js.map +1 -1
  569. package/dist/lib/store-dir.d.ts +68 -4
  570. package/dist/lib/store-dir.d.ts.map +1 -1
  571. package/dist/lib/store-dir.js +253 -17
  572. package/dist/lib/store-dir.js.map +1 -1
  573. package/dist/lib/team-additive-attempt.d.ts +1 -1
  574. package/dist/lib/team-channel-removal.d.ts.map +1 -1
  575. package/dist/lib/team-channel-removal.js +4 -0
  576. package/dist/lib/team-channel-removal.js.map +1 -1
  577. package/dist/lib/team-deploy-inspection.d.ts +13 -0
  578. package/dist/lib/team-deploy-inspection.d.ts.map +1 -1
  579. package/dist/lib/team-deploy-inspection.js +12 -0
  580. package/dist/lib/team-deploy-inspection.js.map +1 -1
  581. package/dist/lib/team-text.d.ts +6 -0
  582. package/dist/lib/team-text.d.ts.map +1 -0
  583. package/dist/lib/team-text.js +36 -0
  584. package/dist/lib/team-text.js.map +1 -0
  585. package/dist/lib/transient.d.ts +14 -8
  586. package/dist/lib/transient.d.ts.map +1 -1
  587. package/dist/lib/transient.js +72 -11
  588. package/dist/lib/transient.js.map +1 -1
  589. package/dist/lib/unusable-file.d.ts +13 -0
  590. package/dist/lib/unusable-file.d.ts.map +1 -0
  591. package/dist/lib/unusable-file.js +12 -0
  592. package/dist/lib/unusable-file.js.map +1 -0
  593. package/dist/lib/up-report.d.ts +6 -0
  594. package/dist/lib/up-report.d.ts.map +1 -1
  595. package/dist/lib/up-report.js +13 -0
  596. package/dist/lib/up-report.js.map +1 -1
  597. package/dist/lib/verdict.d.ts +14 -0
  598. package/dist/lib/verdict.d.ts.map +1 -0
  599. package/dist/lib/verdict.js +15 -0
  600. package/dist/lib/verdict.js.map +1 -0
  601. package/dist/managed-handoff.d.ts +11 -6
  602. package/dist/managed-handoff.d.ts.map +1 -1
  603. package/dist/managed-handoff.js +27 -18
  604. package/dist/managed-handoff.js.map +1 -1
  605. package/dist/render.d.ts +5 -2
  606. package/dist/render.d.ts.map +1 -1
  607. package/dist/render.js +44 -10
  608. package/dist/render.js.map +1 -1
  609. package/dist/telemetry.d.ts +4 -3
  610. package/dist/telemetry.d.ts.map +1 -1
  611. package/dist/telemetry.js +14 -6
  612. package/dist/telemetry.js.map +1 -1
  613. package/dist/ui.d.ts +3 -2
  614. package/dist/ui.d.ts.map +1 -1
  615. package/dist/ui.js +6 -4
  616. package/dist/ui.js.map +1 -1
  617. package/dist/view/mesh-view.d.ts.map +1 -1
  618. package/dist/view/mesh-view.js +4 -1
  619. package/dist/view/mesh-view.js.map +1 -1
  620. package/dist/watch-data.d.ts +9 -1
  621. package/dist/watch-data.d.ts.map +1 -1
  622. package/dist/watch-data.js +17 -3
  623. package/dist/watch-data.js.map +1 -1
  624. package/dist/watch-json.js +4 -3
  625. package/dist/watch-json.js.map +1 -1
  626. package/package.json +5 -5
@@ -1,14 +1,16 @@
1
1
  import { basename, join, resolve } from "node:path";
2
2
  import { CotalEndpoint, DEFAULT_SERVER, isReachable, realDirNoSymlink, subjectMatches } from "@cotal-ai/core";
3
- import { assertSingleSpaceBroker, recordOperationSpace, authDir, CommandFailure, credentialRefusalMessage, brokerAddressForDisplay, canonicalRoot, connectOrThrow, findMesh, findPreparedSpace, jsonFlag, loadMeshes, localMeshesForRoot, plainFlag, presentationOf, readMaintenanceJournal, spaceFlag, userViewAuth, writeResult } from "@cotal-ai/workspace";
3
+ import { assertSingleSpaceBroker, recordOperationSpace, authDir, CommandFailure, oneLine, credentialRefusalMessage, brokerAddressForDisplay, canonicalRoot, connectOrThrow, findMesh, findPreparedSpace, preparedSpaceAt, jsonFlag, loadMeshes, localMeshesForRoot, plainFlag, presentationOf, readMaintenanceJournal, spaceFlag, userViewAuth, writeResult } from "@cotal-ai/workspace";
4
4
  import { personaCatalog } from "../lib/persona-files.js";
5
5
  import { formatIssue, loadManifest, ManifestError } from "../lib/manifest/index.js";
6
+ import { UnusableFile } from "../lib/unusable-file.js";
6
7
  import { findLedgerByRun, listLedgerFiles } from "../lib/manifest/ledger.js";
7
8
  import { findFreshTeamAttempt, findFreshTeamSummary, freshTeamAttemptSettled, freshTeamSummaryRecordedElsewhere, listFreshTeamAttempts, listFreshTeamSummaries } from "../lib/team-fresh.js";
8
9
  import { additiveTeamRecordedState, findAdditiveTeamAttempt, listAdditiveTeamAttempts, removedAdditiveDeploymentIds } from "../lib/team-additive-attempt.js";
9
10
  import { completedFlagValue, completingFlagValue, positionalsForCompletion } from "../lib/completion.js";
10
- import { inspectTeamDeployment, readOwnedChannelRevisions } from "../lib/team-deploy-inspection.js";
11
+ import { cardsWithoutLiveDelivery, inspectTeamDeployment, LIVE_DELIVERY_REMEDY, readOwnedChannelRevisions } from "../lib/team-deploy-inspection.js";
11
12
  import { managerRecordState } from "../lib/manager-proc.js";
13
+ import { authModeText, teamText } from "../lib/team-text.js";
12
14
  import { readLocalServiceCensus } from "../lib/service-census.js";
13
15
  import { liveMeshProcesses } from "./clean.js";
14
16
  import { preparedUpRoot, recordedBrokerTransport } from "./up.js";
@@ -26,8 +28,6 @@ export const teamFlags = [spaceFlag, jsonFlag, plainFlag,
26
28
  * An unreadable record cannot become a suggested target or trigger a provider. */
27
29
  export function teamComplete(argv) {
28
30
  const flag = completingFlagValue(argv, teamFlags);
29
- if (flag?.name === "space")
30
- return { items: loadMeshes().map((mesh) => ({ value: mesh.space })), directive: "nofiles" };
31
31
  if (argv.at(-1)?.startsWith("-"))
32
32
  return { items: teamFlags.map((item) => ({ value: `--${item.name}`, description: item.description })), directive: "nofiles" };
33
33
  const positionals = positionalsForCompletion(argv, teamFlags);
@@ -96,6 +96,42 @@ function recorded(root, ledger) {
96
96
  removalScope: "only ledger-owned resources after native ownership and live-incarnation checks",
97
97
  nextAction: "review-scoped-native-teardown" };
98
98
  }
99
+ /** The refusal for a deployment ID that no record at the root names, or undefined when a record
100
+ * names it or a store cannot be read, so the caller's own refusal stands. A deployment ID is 16 hex
101
+ * characters, and a value of another shape says so. */
102
+ function unknownDeployment(root, space, id) {
103
+ const full = /^[a-f0-9]{16}$/.test(id);
104
+ if (full) {
105
+ try {
106
+ if (findFreshTeamSummary(root, id) || findFreshTeamAttempt(root, id) || findAdditiveTeamAttempt(root, id))
107
+ return undefined;
108
+ const ledgers = listLedgerFiles(root, { requireReadable: true });
109
+ if (ledgers.valid.some(({ ledger }) => ledger.runId === id) || ledgers.refused.some(({ path }) => basename(path) === `${id}.json`))
110
+ return undefined;
111
+ }
112
+ catch {
113
+ return undefined;
114
+ }
115
+ }
116
+ return new CommandFailure("refused", "TARGET_NOT_FOUND", `no team deployment "${oneLine(id)}" is recorded in this root${full ? "" : "; a deployment ID is 16 hex characters"}`, { target: { space, root, deploymentId: id }, remedy: "list the deployments recorded here with cotal team" });
117
+ }
118
+ /** The manifest's `defaults:` block for a report row, or that it declares none. */
119
+ function defaultsText(defaults) {
120
+ if (!defaults)
121
+ return "none declared";
122
+ const parts = [...(defaults.deliveryClass ? [`delivery ${defaults.deliveryClass}`] : []), ...(defaults.replay === undefined ? [] : [`replay ${defaults.replay ? "on" : "off"}`]), ...(defaults.replayWindow ? [`window ${defaults.replayWindow}`] : [])];
123
+ return parts.length ? parts.join(", ") : "none declared";
124
+ }
125
+ /** A declared channel's delivery, replay and window cells: its own value, else the manifest
126
+ * default it inherits at boot, marked as one, else not declared. */
127
+ function channelPolicyCells(channel, defaults) {
128
+ const inherited = (value) => value === undefined ? "not declared" : `${value} (default)`;
129
+ return {
130
+ delivery: channel.deliveryClass ?? inherited(defaults?.deliveryClass),
131
+ replay: channel.replay !== null ? channel.replay ? "on" : "off" : inherited(defaults?.replay === undefined ? undefined : defaults.replay ? "on" : "off"),
132
+ window: channel.replayWindow ?? inherited(defaults?.replayWindow),
133
+ };
134
+ }
99
135
  /** One card removal step as `team show` names it. A reconciled observation never claims that the
100
136
  * original delete executed. */
101
137
  function cardStepText(phase) {
@@ -177,8 +213,8 @@ export async function team(args) {
177
213
  throw new CommandFailure("refused", "CONFLICT", "fresh and additive records claim the same deployment ID; neither was used as teardown authority");
178
214
  const row = freshRecorded(summary);
179
215
  writeResult(presentationOf(values), { command: "team", target: { space: row.space, root: row.root, deploymentId: row.deploymentId }, result: row,
180
- ...(row.recordedState !== "broker-boot-returned" ? { completeness: "partial", partial: { message: "The fresh boot summary did not verify every returned startup component, or predates delivery-responder observation; this record proves no current ownership." } } : {}) }, (data) => ({ sections: [
181
- { title: "Recorded fresh boot", blocks: [{ kind: "fields", rows: [["Deployment", data.deploymentId], ["Kind", data.kind], ["Space", data.space], ["Root", data.root], ["Initial broker PID", data.brokerPid === null ? "not recorded" : String(data.brokerPid)], ["Auth mode", data.authMode ?? "not recorded"], ["Recorded state", data.recordedState], ["Next action", data.nextAction], ["Manager requested", data.managerRequested ? "yes" : "no (broker-only)"], ["Control-plane ensure", data.controlPlaneReturned ? "returned" : "did not confirm return"], ["Auth-service command", data.authServiceReturned ? "returned or not required" : "did not confirm return"], ["Delivery responder", data.deliveryResponder.replaceAll("-", " ")], ["Requested agent readiness", "not checked"], ["Live state", "not checked"], ["Source context", data.manifestPath]] }] },
216
+ ...(row.recordedState !== "broker-boot-returned" ? { completeness: "partial" } : {}) }, (data) => ({ sections: [
217
+ { title: "Recorded fresh boot", blocks: [{ kind: "fields", rows: [["Deployment", data.deploymentId], ["Kind", teamText(data.kind)], ["Space", data.space], ["Root", data.root], ["Initial broker PID", data.brokerPid === null ? "not recorded" : String(data.brokerPid)], ["Auth mode", authModeText(data.authMode)], ["Recorded state", teamText(data.recordedState)], ["Next action", teamText(data.nextAction)], ["Manager requested", data.managerRequested ? "yes" : "no (broker-only)"], ["Control-plane ensure", data.controlPlaneReturned ? "returned" : "did not confirm return"], ["Auth-service command", data.authServiceReturned ? "returned or not required" : "did not confirm return"], ["Delivery responder", data.deliveryResponder.replaceAll("-", " ")], ["Requested agent readiness", "not checked"], ["Live state", "not checked"], ["Source context", data.manifestPath]] }] },
182
218
  { title: "Declared at boot", blocks: [
183
219
  { kind: "fields", rows: [["Requested agents", String(data.agents.length)], ["Declared channels", String(data.channels.length)]] },
184
220
  { kind: "lines", lines: data.agents.length ? data.agents.slice(0, 100).map((agent) => `requested agent ${agent.requested} (allocation not checked)`) : ["No agents requested in this fresh boot."] },
@@ -186,7 +222,8 @@ export async function team(args) {
186
222
  ...((data.agents.length > 100 || data.channels.length > 100) ? [{ kind: "lines", lines: ["Additional declared names are not shown; JSON retains the full summary."] }] : []),
187
223
  { kind: "lines", lines: [{ text: "The requested agent names are not allocated identities. A returned boot command does not prove current broker health, agent joins or retained ownership.", tone: "hint" }] },
188
224
  ] },
189
- { title: "Next", blocks: [{ kind: "commands", items: [{ command: "cotal down --space <recorded-space> --dry-run", description: "From the recorded root, inspect local process records without a stop" }] }, { kind: "lines", lines: [`Whole-stack apply from ${data.root} remains unguarded in this source. The preview is incomplete and this summary authorizes no stop.`] }] },
225
+ ...(data.recordedState !== "broker-boot-returned" ? [{ blocks: [{ kind: "lines", lines: ["The fresh boot summary did not verify every returned startup component, or predates delivery-responder observation; this record proves no current ownership."] }] }] : []),
226
+ { title: "Next", blocks: [{ kind: "commands", items: [{ command: `cotal down --space ${data.space} --dry-run`, description: "Preview the guarded whole-stack stop" }] }, { kind: "lines", lines: ["The launch summary is not stop authority; stop the stack with cotal down."] }] },
190
227
  ] }));
191
228
  return;
192
229
  }
@@ -213,7 +250,7 @@ export async function team(args) {
213
250
  }
214
251
  if (ledgers.valid.some(({ ledger }) => ledger.runId === subject) || ledgers.refused.some(({ path }) => basename(path) === `${subject}.json`))
215
252
  throw new CommandFailure("refused", "CONFLICT", "fresh attempt and additive record claim the same deployment ID; neither grants ownership authority");
216
- writeResult(presentationOf(values), { command: "team", target: { space: attempt.space, root: attempt.root, deploymentId: attempt.deploymentId }, result: { ...attempt, kind: "fresh-team-attempt", server: brokerAddressForDisplay(attempt.server) ?? "not displayable", intentPath: join(catalog.root, ".cotal", `team-boot-attempt-${attempt.deploymentId}.json`), launchSpecCandidate: join(catalog.root, ".cotal", "run", `${attempt.deploymentId}.json`), recordedState: "no-matching-summary", nativeOutcome: "unknown", effectAttempted: "not-established" }, completeness: "partial", partial: { message: "A durable fresh boot intent has no matching summary. The launch spec, broker and control plane may have changed; this is not a retry or stop authorization." } }, (data) => ({ sections: [{ title: "Unsettled fresh boot attempt", blocks: [{ kind: "fields", rows: [["Deployment", data.deploymentId], ["Space", data.space], ["Root", data.root], ["Broker", data.server], ["Manifest", data.manifestPath], ["Intent file", data.intentPath], ["Launch spec candidate", data.launchSpecCandidate], ["Intent recorded", data.createdAt], ["Native outcome", "unknown"]] }, { kind: "lines", lines: ["The launch spec path is derived from the run ID, not read or verified. Inspect the original listener and local custody. A missing summary is not proof that the broker never started."] }] }] }));
253
+ writeResult(presentationOf(values), { command: "team", target: { space: attempt.space, root: attempt.root, deploymentId: attempt.deploymentId }, result: { ...attempt, kind: "fresh-team-attempt", server: brokerAddressForDisplay(attempt.server) ?? "not displayable", intentPath: join(catalog.root, ".cotal", `team-boot-attempt-${attempt.deploymentId}.json`), launchSpecCandidate: join(catalog.root, ".cotal", "run", `${attempt.deploymentId}.json`), recordedState: "no-matching-summary", nativeOutcome: "unknown", effectAttempted: "not-established" }, completeness: "partial" }, (data) => ({ sections: [{ title: "Unsettled fresh boot attempt", blocks: [{ kind: "fields", rows: [["Deployment", data.deploymentId], ["Space", data.space], ["Root", data.root], ["Broker", data.server], ["Manifest", data.manifestPath], ["Intent file", data.intentPath], ["Launch spec candidate", data.launchSpecCandidate], ["Intent recorded", data.createdAt], ["Native outcome", "unknown"]] }, { kind: "lines", lines: ["The launch spec path is derived from the run ID, not read or verified. Inspect the original listener and local custody. A missing summary is not proof that the broker never started."] }] }, { blocks: [{ kind: "lines", lines: ["A durable fresh boot intent has no matching summary. The launch spec, broker and control plane may have changed; this is not a retry or stop authorization."] }] }] }));
217
254
  return;
218
255
  }
219
256
  if (additiveAttempt) {
@@ -246,23 +283,27 @@ export async function team(args) {
246
283
  const removalAttempt = inventory.removal?.attempts.find((row) => row.deploymentId === subject) ?? null;
247
284
  const removalSteps = inventory.removal?.steps.filter((row) => row.deploymentId === subject) ?? [];
248
285
  const cardRemoval = mixed ? { receipt: inventory.channelRemoval?.returned.find((row) => row.deploymentId === subject) ?? null, attempt: inventory.channelRemoval?.attempts.find((row) => row.deploymentId === subject) ?? null, steps: inventory.channelRemoval?.steps.filter((row) => row.deploymentId === subject) ?? [] } : null;
286
+ const caveat = removalReceipt ? "All original static agent incarnations have matched native retired slot/head and cleanup receipts. Current alias holders are not rechecked, and the receipt authorizes no further stop." : agentReceipt ? "Declared channel creates and native launch joins have matching historical receipts. Current health, readers and permission to remove an incarnation are not established." : "The original intent and steps do not settle every channel create and launch. A missing acceptance or terminal does not authorize another submission.";
249
287
  const data = { ...additiveAttempt, server: brokerAddressForDisplay(additiveAttempt.server) ?? "not displayable", kind: mixed ? "additive-mixed-deployment" : "additive-agent-deployment", recordedState: additiveTeamRecordedState(additiveAttempt, inventory), agentSteps, steps, removalReceipt, removalAttempt, removalSteps, cardRemoval, remainingRemovalPhase: !removalAttempt ? null : !removalReceipt ? "agent-retirement" : mixed && !cardRemoval?.receipt ? "card-removal" : null, receipt: agentReceipt ? { ...agentReceipt, server: brokerAddressForDisplay(agentReceipt.server) ?? "not displayable" } : null, unreadableSteps: [...new Set([...unreadableSteps, ...inventory.refused.filter(({ path }) => basename(path).startsWith(`team-deploy-agent-step-${subject}-`) || basename(path).startsWith("team-remove-") && basename(path).includes(subject) || basename(path).startsWith("team-channel-remove-") && basename(path).includes(subject)).map(({ path }) => path)])], currentState: "not-rechecked" };
250
- writeResult(presentationOf(values), { command: "team", target: { space: data.space, root: data.root, deploymentId: data.deploymentId }, result: data, completeness: "partial", partial: { message: removalReceipt ? "All original static agent incarnations have matched native retired slot/head and cleanup receipts. Current alias holders are not rechecked, and the receipt authorizes no further stop." : agentReceipt ? "Declared channel creates and native launch joins have matching historical receipts. Current health, readers and permission to remove an incarnation are not established." : "The original intent and steps do not settle every channel create and launch. A missing acceptance or terminal does not authorize another submission." } }, (row) => ({ sections: [
251
- { title: agentReceipt ? "Returned additive team" : "Unsettled additive team", blocks: [{ kind: "fields", rows: [["Deployment", row.deploymentId], ["Root", row.root], ["Manager", row.managerInstanceId ?? "not recorded"], ["Recorded state", row.recordedState], ["Requested agents", String(row.requestedAgents.length)], ["Joined receipts", row.receipt ? String(row.receipt.createdAgents.length) : "incomplete"], ["Declared channels", String(row.declaredChannels.length)], ["Channel create receipts", row.receipt ? String(row.receipt.createdChannels.length) : "incomplete"], ["Current state", row.currentState]] }] },
288
+ writeResult(presentationOf(values), { command: "team", target: { space: data.space, root: data.root, deploymentId: data.deploymentId }, result: data, completeness: "partial" }, (row) => ({ sections: [
289
+ { title: agentReceipt ? "Returned additive team" : "Unsettled additive team", blocks: [{ kind: "fields", rows: [["Deployment", row.deploymentId], ["Root", row.root], ["Manager", row.managerInstanceId ?? "not recorded"], ["Recorded state", teamText(row.recordedState)], ["Requested agents", String(row.requestedAgents.length)], ["Joined receipts", row.receipt ? String(row.receipt.createdAgents.length) : "incomplete"], ["Declared channels", String(row.declaredChannels.length)], ["Channel create receipts", row.receipt ? String(row.receipt.createdChannels.length) : "incomplete"], ["Current state", row.currentState]] }] },
252
290
  ...(row.receipt ? [{ title: "Original joined identities", blocks: [{ kind: "table", columns: [{ key: "requested", label: "Declared" }, { key: "name", label: "Allocated" }, { key: "id", label: "Identity" }, { key: "goal", label: "Accepted goal" }], rows: row.receipt.createdAgents.slice(0, 100).map((agent) => ({ requested: agent.requested, name: agent.name, id: agent.id, goal: agent.request.goalId })) }, ...(row.receipt.createdAgents.length > 100 ? [{ kind: "lines", lines: ["Additional joined identities are in JSON."] }] : [])] }] : [{ title: "Native launch journal", blocks: [{ kind: "table", columns: [{ key: "name", label: "Declared" }, { key: "phase", label: "Phase" }, { key: "request", label: "Original request" }, { key: "goal", label: "Accepted goal" }], rows: row.agentSteps.slice(0, 100).map((step) => ({ name: step.name, phase: step.phase, request: step.requestId, goal: step.request?.goalId ?? "not returned" })) }, { kind: "lines", lines: [...(row.agentSteps.length > 100 ? ["Additional native steps are in JSON."] : []), "Do not retry an unknown launch or infer a fresh incarnation from a reused name."] }] }]),
253
291
  ...(row.declaredChannels.length ? [{ title: row.receipt ? "Created channel receipts" : "Native channel journal", blocks: [{ kind: "table", columns: [{ key: "name", label: "Channel" }, { key: "phase", label: "Phase" }, { key: "revision", label: "Returned revision" }], rows: row.receipt ? row.receipt.createdChannels.slice(0, 100).map((channel) => ({ name: `#${channel.name}`, phase: "accepted", revision: String(channel.revision) })) : row.steps.slice(0, 100).map((step) => ({ name: `#${step.name}`, phase: step.phase, revision: step.phase === "accepted" ? String(step.revision) : "not returned" })) }, { kind: "lines", lines: [...((row.receipt ? row.receipt.createdChannels.length : row.steps.length) > 100 ? ["Additional channel records are in JSON."] : []), "Returned revisions do not prove current cards or exclusive readers."] }] }] : []),
254
292
  ...(row.removalAttempt ? [{ title: row.removalReceipt ? "Recorded native retirements" : "Unsettled removal journal", blocks: [{ kind: "fields", rows: [["Full removal receipt", row.removalReceipt ? "recorded" : "not confirmed"], ["Original-receipt binding", row.removalAttempt.originalReceiptDigest]] }, { kind: "table", columns: [{ key: "name", label: "Original agent" }, { key: "phase", label: "Observation" }, { key: "request", label: "Stop request" }, { key: "revisions", label: "Slot / head revisions" }], rows: row.removalSteps.map((step) => ({ name: step.phase === "retired" ? step.observation.name : row.receipt?.createdAgents[step.ordinal]?.name ?? row.requestedAgents[step.ordinal] ?? "not recorded", phase: step.phase === "retired" ? "native retired and cleaned" : "stop submitted; outcome not implied", request: step.requestId ?? "already retired before stop", revisions: step.phase === "retired" ? `${step.observation.slotRevision} / ${step.observation.headRevision}` : "not confirmed" })) }, { kind: "lines", lines: ["Only a complete matched retirement receipt releases this deployment's known additive blocker. An incomplete intent is not retry authority; stop acceptance is not retirement."] }] }] : []),
255
293
  ...(row.cardRemoval?.attempt ? [{ title: row.cardRemoval.receipt ? "Recorded card removals" : "Unsettled card removal journal", blocks: [{ kind: "fields", rows: [["Full card receipt", row.cardRemoval.receipt ? "recorded" : "not confirmed"], ["Remaining removal phase", row.remainingRemovalPhase ?? "none"]] }, { kind: "table", columns: [{ key: "channel", label: "Channel" }, { key: "phase", label: "Step" }, { key: "marker", label: "Marker revision" }], rows: row.cardRemoval.steps.map((step) => ({ channel: `#${step.name}`, phase: cardStepText(step.phase), marker: "markerRevision" in step && step.markerRevision !== null ? String(step.markerRevision) : "currentRevision" in step ? String(step.currentRevision) : "none" })) }, { kind: "lines", lines: ["Only registry cards are in scope. Retained history, grants and readers were not changed. The mixed deployment is released only when both receipts exist."] }] }] : row.remainingRemovalPhase ? [{ title: "Remaining removal phase", blocks: [{ kind: "lines", lines: [`The ${row.remainingRemovalPhase.replace("-", " ")} phase has not settled. An unsettled intent is not retry authority.`] }] }] : []),
256
294
  ...(row.unreadableSteps.length ? [{ title: "Unreadable records", blocks: [{ kind: "lines", lines: [...row.unreadableSteps.slice(0, 100).map((path) => `Unreadable: ${path}`), ...(row.unreadableSteps.length > 100 ? ["Additional unreadable paths are in JSON."] : [])] }] }] : []),
295
+ { blocks: [{ kind: "lines", lines: [caveat] }] },
257
296
  ] }));
258
297
  return;
259
298
  }
299
+ const caveat = receipt ? "All declared channel creates returned and their revisions were recorded. This is historical, not current broker state; guarded card removal rechecks each revision." : "Submitted and acknowledged channel steps do not settle the entire deployment. Missing or unreadable steps remain unknown; neither intent nor steps grant removal or retry authority.";
260
300
  const channelRemoval = { receipt: inventory.channelRemoval?.returned.find((row) => row.deploymentId === subject) ?? null, attempt: inventory.channelRemoval?.attempts.find((row) => row.deploymentId === subject) ?? null, steps: inventory.channelRemoval?.steps.filter((row) => row.deploymentId === subject) ?? [] };
261
301
  const result = { ...additiveAttempt, server: brokerAddressForDisplay(additiveAttempt.server) ?? "not displayable", intentPath: join(catalog.root, ".cotal", `team-deploy-attempt-${additiveAttempt.deploymentId}.json`), steps, unreadableSteps: [...unreadableSteps, ...inventory.refused.filter(({ path }) => basename(path).startsWith("team-channel-remove-") && basename(path).includes(subject)).map(({ path }) => path)], receipt: receipt ? { ...receipt, server: brokerAddressForDisplay(receipt.server) ?? "not displayable" } : null, channelRemoval, recordedState: channelRemoval.receipt ? "removal-returned" : receipt ? "channel-create-returned" : "unsettled-additive-attempt", nativeOutcome: receipt ? "returned" : "unknown" };
262
- writeResult(presentationOf(values), { command: "team", target: { space: result.space, root: result.root, deploymentId: result.deploymentId }, result, completeness: "partial", partial: { message: receipt ? "All declared channel creates returned and their revisions were recorded. This is historical, not current broker state; guarded card removal rechecks each revision." : "Submitted and acknowledged channel steps do not settle the entire deployment. Missing or unreadable steps remain unknown; neither intent nor steps grant removal or retry authority." } }, (data) => ({ sections: [
263
- { title: data.receipt ? "Returned additive channels" : "Unsettled additive attempt", blocks: [{ kind: "fields", rows: [["Deployment", data.deploymentId], ["Space", data.space], ["Root", data.root], ["Broker", data.server], ["Auth mode", data.authMode], ["TLS", data.tlsRequired ? "required" : "not required"], ["Manifest", data.manifestPath], ["Intent recorded", data.createdAt], ["Recorded state", data.recordedState], ["Created channels", data.receipt ? String(data.receipt.createdChannels.length) : "unknown"]] }, { kind: "lines", lines: [data.receipt ? "The returned revisions are historical. Current cards and readers were not checked here; team remove deletes only cards still at these revisions." : "The intent and partial steps do not prove a complete deployment. Inspect the exact run before any retry or removal."] }] },
302
+ writeResult(presentationOf(values), { command: "team", target: { space: result.space, root: result.root, deploymentId: result.deploymentId }, result, completeness: "partial" }, (data) => ({ sections: [
303
+ { title: data.receipt ? "Returned additive channels" : "Unsettled additive attempt", blocks: [{ kind: "fields", rows: [["Deployment", data.deploymentId], ["Space", data.space], ["Root", data.root], ["Broker", data.server], ["Auth mode", authModeText(data.authMode)], ["TLS", data.tlsRequired ? "required" : "not required"], ["Manifest", data.manifestPath], ["Intent recorded", data.createdAt], ["Recorded state", teamText(data.recordedState)], ["Created channels", data.receipt ? String(data.receipt.createdChannels.length) : "unknown"]] }, { kind: "lines", lines: [data.receipt ? "The returned revisions are historical. Current cards and readers were not checked here; team remove deletes only cards still at these revisions." : "The intent and partial steps do not prove a complete deployment. Inspect the exact run before any retry or removal."] }] },
264
304
  ...(data.receipt ? [{ title: "Created channel receipts", blocks: [{ kind: "table", columns: [{ key: "channel", label: "Channel" }, { key: "revision", label: "Returned revision" }], rows: data.receipt.createdChannels.slice(0, 100).map((row) => ({ channel: `#${row.name}`, revision: String(row.revision) })) }, ...(data.receipt.createdChannels.length > 100 ? [{ kind: "lines", lines: ["Additional returned revisions are in JSON."] }] : [])] }] : data.steps.length || data.unreadableSteps.length ? [{ title: "Unsettled channel steps", blocks: [{ kind: "table", columns: [{ key: "channel", label: "Channel" }, { key: "phase", label: "Step" }, { key: "revision", label: "Returned revision" }], rows: data.steps.slice(0, 100).map((step) => ({ channel: `#${step.name}`, phase: step.phase, revision: step.phase === "accepted" ? String(step.revision) : "not returned" })) }, { kind: "lines", lines: [...data.unreadableSteps.slice(0, 100).map((path) => `Unreadable: ${path}`), ...(data.steps.length > 100 || data.unreadableSteps.length > 100 ? ["Additional steps are in JSON."] : [])] }] }] : []),
265
305
  ...(data.channelRemoval.attempt ? [{ title: data.channelRemoval.receipt ? "Recorded card removals" : "Unsettled card removal journal", blocks: [{ kind: "fields", rows: [["Full removal receipt", data.channelRemoval.receipt ? "recorded" : "not confirmed"], ["Original-receipt binding", data.channelRemoval.attempt.originalReceiptDigest]] }, { kind: "table", columns: [{ key: "channel", label: "Channel" }, { key: "phase", label: "Step" }, { key: "marker", label: "Marker revision" }], rows: data.channelRemoval.steps.map((step) => ({ channel: `#${step.name}`, phase: cardStepText(step.phase), marker: "markerRevision" in step && step.markerRevision !== null ? String(step.markerRevision) : "currentRevision" in step ? String(step.currentRevision) : "none" })) }, { kind: "lines", lines: ["Only registry cards are in scope. Retained history, grants and readers were not changed. An incomplete intent is not retry authority."] }] }] : []),
306
+ { blocks: [{ kind: "lines", lines: [caveat] }] },
266
307
  ] }));
267
308
  return;
268
309
  }
@@ -271,13 +312,13 @@ export async function team(args) {
271
312
  found = findLedgerByRun(catalog.root, subject);
272
313
  }
273
314
  catch {
274
- throw new CommandFailure("refused", "TARGET_UNAVAILABLE", "the selected root has no readable additive ownership ledger for this full ID; no resources were touched", { target: { space: catalog.space, deploymentId: subject }, remedy: "inspect team in the checkout and space that created this deployment" });
315
+ throw unknownDeployment(catalog.root, catalog.space, subject) ?? new CommandFailure("refused", "TARGET_UNAVAILABLE", "the selected root has no readable additive ownership ledger for this full ID; no resources were touched", { target: { space: catalog.space, deploymentId: subject }, remedy: "inspect team in the checkout and space that created this deployment" });
275
316
  }
276
317
  if (found.ledger.space !== catalog.space)
277
318
  throw new CommandFailure("refused", "CONFLICT", "this deployment's recorded space differs from the selected space; it was not rebound", { target: { recordedSpace: found.ledger.space, selectedSpace: catalog.space, deploymentId: subject } });
278
319
  const result = recorded(catalog.root, found.ledger);
279
320
  writeResult(presentationOf(values), { command: "team", target: { space: result.space, root: result.root, deploymentId: result.deploymentId }, result }, (row) => ({ sections: [
280
- { title: "Recorded team deployment", blocks: [{ kind: "fields", rows: [["Deployment", row.deploymentId], ["Kind", row.kind], ["Space", row.space], ["Root", row.root], ["Recorded state", row.recordedState], ["Next action", row.nextAction], ["Live state", "not checked"], ["Source context", row.manifestPath]] }] },
321
+ { title: "Recorded team deployment", blocks: [{ kind: "fields", rows: [["Deployment", row.deploymentId], ["Kind", teamText(row.kind)], ["Space", row.space], ["Root", row.root], ["Recorded state", teamText(row.recordedState)], ["Next action", teamText(row.nextAction)], ["Live state", "not checked"], ["Source context", row.manifestPath]] }] },
281
322
  { title: "Ledger-owned agents", blocks: [row.agents.length ? { kind: "table", columns: [{ key: "requested", label: "Declared" }, { key: "name", label: "Allocated name" }, { key: "id", label: "Identity" }, { key: "lifecycleUid", label: "Lifecycle" }], rows: row.agents.slice(0, 100).map((agent) => ({ ...agent, lifecycleUid: agent.lifecycleUid ?? "not recorded by this ledger" })) } : { kind: "lines", lines: ["No agent entries in this ledger."] }, ...(row.agents.length > 100 ? [{ kind: "lines", lines: ["Additional owned agent records are in JSON."] }] : [])] },
282
323
  { title: "Ledger-owned channels", blocks: [{ kind: "lines", lines: row.channels.length ? row.channels.slice(0, 100).map((name) => `#${name}`) : ["No channel entries in this ledger."] }, ...(row.channels.length > 100 ? [{ kind: "lines", lines: ["Additional owned channel records are in JSON."] }] : []), { kind: "lines", lines: [{ text: "An ownership record is not proof of running agents or permission to stop them. Removal must recheck native identities and retain unresolved entries.", tone: "hint" }] }] },
283
324
  { title: "Next", blocks: [{ kind: "commands", items: [{ command: `cotal down -f <file> --run ${row.deploymentId} --dry-run`, description: "From the recorded root, review only this additive run's native teardown plan" }] }, { kind: "lines", lines: [{ text: "The file is a required command argument, not the authority for --run. Do not apply from another root or infer that this ledger names current live members.", tone: "hint" }] }] },
@@ -333,10 +374,11 @@ export async function team(args) {
333
374
  const unsettledAdditiveAttempts = allAdditiveAttempts.filter((attempt) => !returnedIds.has(attempt.deploymentId))
334
375
  .map((attempt) => ({ deploymentId: attempt.deploymentId, space: attempt.space, root: attempt.root, server: brokerAddressForDisplay(attempt.server) ?? "not displayable", createdAt: attempt.createdAt, recordedState: "unsettled-additive-attempt" }));
335
376
  const warnings = [...records.refused, ...fresh.refused, ...attempts.refused, ...additiveAttempts.refused].map(({ path }) => ({ code: "DEPLOYMENT_RECORD_UNREADABLE", message: "A local deployment record could not be read or validated; it was not reset.", target: { path } }));
336
- writeResult(presentationOf(values), { command: "team", target: catalog, result: { kind: "team-deployments", scope: "selected-root fresh summaries/attempts and additive ledgers/attempts; historical completeness unknown", items, unsettledAttempts, unsettledAdditiveAttempts }, completeness: "partial", partial: { message: "The available local records do not establish a complete historical or live team inventory. An unsettled fresh or additive attempt is not proof that no native effect occurred." }, warnings }, (result) => ({ sections: [
337
- { title: "Recorded teams", blocks: [{ kind: "fields", rows: [["Space", catalog.space], ["Root", catalog.root], ["Scope", "fresh summaries, additive ledgers and returned agent/channel receipts; historical completeness unknown"]] }, result.items.length ? { kind: "table", columns: [{ key: "id", label: "Deployment" }, { key: "kind", label: "Kind" }, { key: "state", label: "Recorded state" }, { key: "next", label: "Next" }, { key: "agents", label: "Agent records" }, { key: "channels", label: "Channel records" }], rows: result.items.slice(0, 100).map((row) => ({ id: row.deploymentId, kind: row.kind, state: row.recordedState, next: row.nextAction, agents: String(row.agents.length), channels: String(row.channels.length) })) } : { kind: "lines", lines: ["No readable fresh summaries or additive ledgers for this selected space."] }, ...(result.items.length > 100 ? [{ kind: "lines", lines: ["Additional deployment records are in JSON."] }] : []), { kind: "lines", lines: [{ text: "Older fresh boots may have no summary. A record is not current live state or removal authority; native observations are still needed.", tone: "waiting" }] }] },
377
+ writeResult(presentationOf(values), { command: "team", target: catalog, result: { kind: "team-deployments", scope: "selected-root fresh summaries/attempts and additive ledgers/attempts; historical completeness unknown", items, unsettledAttempts, unsettledAdditiveAttempts }, completeness: "partial", warnings }, (result) => ({ sections: [
378
+ { title: "Recorded teams", blocks: [{ kind: "fields", rows: [["Space", catalog.space], ["Root", catalog.root], ["Scope", "fresh summaries, additive ledgers and returned agent/channel receipts; historical completeness unknown"]] }, result.items.length ? { kind: "table", columns: [{ key: "id", label: "Deployment" }, { key: "kind", label: "Kind" }, { key: "state", label: "Recorded state" }, { key: "next", label: "Next" }, { key: "agents", label: "Agent records" }, { key: "channels", label: "Channel records" }], rows: result.items.slice(0, 100).map((row) => ({ id: row.deploymentId, kind: teamText(row.kind), state: teamText(row.recordedState), next: teamText(row.nextAction), agents: String(row.agents.length), channels: String(row.channels.length) })) } : { kind: "lines", lines: ["No readable fresh summaries or additive ledgers for this selected space."] }, ...(result.items.length > 100 ? [{ kind: "lines", lines: ["Additional deployment records are in JSON."] }] : []), { kind: "lines", lines: [{ text: "Older fresh boots may have no summary. A record is not current live state or removal authority; native observations are still needed.", tone: "waiting" }] }] },
338
379
  { title: "Unsettled fresh boot attempts", blocks: [result.unsettledAttempts.length ? { kind: "table", columns: [{ key: "id", label: "Deployment" }, { key: "space", label: "Space" }, { key: "broker", label: "Recorded broker" }, { key: "time", label: "Intent recorded" }], rows: result.unsettledAttempts.slice(0, 100).map((row) => ({ id: row.deploymentId, space: row.space, broker: row.server, time: row.createdAt })) } : { kind: "lines", lines: ["No unsettled readable fresh boot attempts in the selected space."] }, { kind: "lines", lines: [...(result.unsettledAttempts.length > 100 ? ["Additional attempts are in JSON."] : []), "An intent without a matching returned summary may have started a broker. Inspect its exact run; do not retry or stop by inference."] }] },
339
380
  { title: "Unsettled additive attempts", blocks: [result.unsettledAdditiveAttempts.length ? { kind: "table", columns: [{ key: "id", label: "Deployment" }, { key: "space", label: "Space" }, { key: "broker", label: "Recorded broker" }, { key: "time", label: "Intent recorded" }], rows: result.unsettledAdditiveAttempts.slice(0, 100).map((row) => ({ id: row.deploymentId, space: row.space, broker: row.server, time: row.createdAt })) } : { kind: "lines", lines: ["No readable additive attempts in the selected space."] }, { kind: "lines", lines: [...(result.unsettledAdditiveAttempts.length > 100 ? ["Additional attempts are in JSON."] : []), "An intent names a request, not resources created. Its native outcome remains unknown until a guarded receipt reconciles it."] }] },
381
+ { blocks: [{ kind: "lines", lines: ["The available local records do not establish a complete historical or live team inventory. An unsettled fresh or additive attempt is not proof that no native effect occurred."] }] },
340
382
  { title: "Next", blocks: [{ kind: "commands", items: [{ command: "cotal t show <deployment-id>", description: "Inspect recorded ownership or an unsettled boot attempt without changing anything" }, { command: "cotal t check <file> --graph", description: "Read the resolved manifest and its access edges offline" }] }] },
341
383
  ] }));
342
384
  }
@@ -373,6 +415,7 @@ async function previewDeploy(file, values) {
373
415
  throw new CommandFailure("refused", "CONFLICT", "prepared and registered records disagree on this space's root; no additive target was chosen", { target: { space } });
374
416
  const runtimeRequest = values.runtime ?? prepared.manifest.runtime ?? "pty";
375
417
  const openDurable = local.mode === "open" && prepared.manifest.channels.some((channel) => channel.deliveryClass === "durable");
418
+ const notLive = cardsWithoutLiveDelivery(prepared.manifest.channels);
376
419
  let attempts;
377
420
  try {
378
421
  attempts = listAdditiveTeamAttempts(canonicalRoot(local.root));
@@ -390,14 +433,15 @@ async function previewDeploy(file, values) {
390
433
  channels: prepared.manifest.channels.map((channel) => ({ name: channel.name, deliveryClass: channel.deliveryClass ?? null, replay: channel.replay ?? null, replayWindow: channel.replayWindow ?? null })),
391
434
  targetReachability: "native-reads-established", brokerPolicy: "not-checked", authorization: "read-established-not-deploy-authority", ownershipClassification: "native-roster-and-registry-snapshot", connectorAvailability: "not-checked", effectAttempted: false, persisted: false };
392
435
  writeResult(presentationOf(values), { command: "team deploy", target: { space, root: local.root, path }, result,
393
- completeness: "partial", partial: { message: "Native roster and channel-registry classification is a non-atomic read, not an authorized deployment plan. Manager readiness, runtime and connector availability, write grants and apply effects remain unchecked." },
394
- warnings: [...prepared.warnings.map((warning) => ({ code: "MANIFEST_WARNING", target: { agent: warning.agent }, message: warning.message })), ...(openDurable ? [{ code: "OPEN_DURABLE_UNSUPPORTED", target: { space }, message: "The selected running mesh is open and has no delivery daemon; this manifest's durable declaration cannot acquire a per-member backstop." }] : []), ...(!native.unmanaged.feedAvailable ? [{ code: "MEMBERSHIP_FEED_UNAVAILABLE", target: { space }, message: "Other readers are a lower bound because the derived membership feed has no observed heartbeat." }] : []), ...(attempts.valid.length || attempts.refused.length ? [{ code: "ADDITIVE_ATTEMPT_REMAINS", target: { root: local.root, space, deploymentIds: attempts.valid.map((attempt) => attempt.deploymentId), unreadable: attempts.refused.map(({ path }) => path) }, message: "An additive deployment intent is retained at this root; the preview does not settle or retry it." }] : [])] }, (data) => ({ sections: [
395
- { title: "Additive team inspection", blocks: [{ kind: "fields", rows: [["Space", data.space], ["Registered root", data.root], ["Registration", data.registrationOrigin], ["Recorded broker", data.recordedBroker ?? "not displayable"], ["Recorded mode", data.recordedMode], ["TLS requirement", data.recordedTlsRequired ? "recorded required" : "not recorded required"], ["Manifest", data.path], ["Runtime request", data.runtimeRequest], ["Prior additive run", data.native.priorDeploymentId ?? "none recorded"], ["Retained additive attempts", String(data.retainedAdditiveAttempts.length)], ["Unreadable additive attempts", String(data.unreadableAdditiveAttempts.length)], ["Native roster", data.native.roster], ["Channel registry", data.native.registry], ["Membership feed", data.native.unmanaged.feedAvailable ? "display-only lower bound" : "unavailable"], ["Durable delivery on open", data.openDurableUnsupported ? "unsupported" : "not a contradiction"]] }, { kind: "lines", lines: [{ text: "The observed registry and roster do not reserve names or authorize creation. Manager readiness, runtime/provider availability and write grants remain unchecked; nothing was added.", tone: "waiting" }] }] },
436
+ completeness: "partial",
437
+ warnings: [...prepared.warnings.map((warning) => ({ code: "MANIFEST_WARNING", target: { agent: warning.agent }, message: warning.message })), ...(openDurable ? [{ code: "OPEN_DURABLE_UNSUPPORTED", target: { space }, message: "The selected running mesh is open and has no delivery daemon; this manifest's durable declaration cannot acquire a per-member backstop." }] : []), ...(notLive ? [{ code: "LIVE_DELIVERY_REQUIRED", target: { space, cards: notLive.names }, message: `Apply refuses: ${notLive.cards} ${notLive.verb} not set deliveryClass: live. To deploy, ${LIVE_DELIVERY_REMEDY}.` }] : []), ...(!native.unmanaged.feedAvailable ? [{ code: "MEMBERSHIP_FEED_UNAVAILABLE", target: { space }, message: "Other readers are a lower bound because the derived membership feed has no observed heartbeat." }] : []), ...(attempts.valid.length || attempts.refused.length ? [{ code: "ADDITIVE_ATTEMPT_REMAINS", target: { root: local.root, space, deploymentIds: attempts.valid.map((attempt) => attempt.deploymentId), unreadable: attempts.refused.map(({ path }) => path) }, message: "An additive deployment intent is retained at this root; the preview does not settle or retry it." }] : [])] }, (data) => ({ sections: [
438
+ { title: "Additive team inspection", blocks: [{ kind: "fields", rows: [["Space", data.space], ["Registered root", data.root], ["Registration", data.registrationOrigin], ["Recorded broker", data.recordedBroker ?? "not displayable"], ["Recorded mode", authModeText(data.recordedMode)], ["TLS", data.recordedTlsRequired ? "required" : "not required"], ["Manifest", data.path], ["Runtime request", data.runtimeRequest], ["Prior additive run", data.native.priorDeploymentId ?? "none recorded"], ["Retained additive attempts", String(data.retainedAdditiveAttempts.length)], ["Unreadable additive attempts", String(data.unreadableAdditiveAttempts.length)], ["Native roster", data.native.roster], ["Channel registry", data.native.registry], ["Membership feed", data.native.unmanaged.feedAvailable ? "display-only lower bound" : "unavailable"], ...(data.recordedMode === "open" ? [["Durable delivery on open", data.openDurableUnsupported ? "unsupported" : "not a contradiction"]] : [])] }, { kind: "lines", lines: [{ text: "The observed registry and roster do not reserve names or authorize creation. Manager readiness, runtime/provider availability and write grants remain unchecked; nothing was added.", tone: "waiting" }] }] },
396
439
  { title: "Requested agents", blocks: [data.agents.length ? { kind: "table", columns: [{ key: "name", label: "Name" }, { key: "application", label: "Application" }, { key: "role", label: "Role" }, { key: "model", label: "Model request" }], rows: data.agents.slice(0, 100).map((agent) => ({ name: agent.name, application: agent.application, role: agent.role ?? "none", model: agent.requestedModel ?? "application default" })) } : { kind: "lines", lines: ["No agents requested."] }, ...(data.agents.length > 100 ? [{ kind: "lines", lines: ["Additional requested agents are in JSON."] }] : [])] },
397
- { title: "Declared channels", blocks: [data.channels.length ? { kind: "table", columns: [{ key: "name", label: "Channel" }, { key: "delivery", label: "Delivery class" }, { key: "replay", label: "Replay" }, { key: "window", label: "Replay window" }], rows: data.channels.slice(0, 100).map((channel) => ({ name: `#${channel.name}`, delivery: channel.deliveryClass ?? "not declared", replay: channel.replay === null ? "not declared" : channel.replay ? "on" : "off", window: channel.replayWindow ?? "not declared" })) } : { kind: "lines", lines: ["No channels declared."] }, { kind: "lines", lines: [...(data.channels.length > 100 ? ["Additional channels are in JSON."] : []), "Declared policy is not a live registry value or permission to overwrite existing metadata. Apply accepts all-new live channels and bounded static/open agent or mixed teams; existing cards and reapply refuse."] }] },
398
- { title: "Retained additive attempts", blocks: [data.retainedAdditiveAttempts.length ? { kind: "table", columns: [{ key: "id", label: "Deployment" }, { key: "space", label: "Space" }, { key: "state", label: "Recorded state" }], rows: data.retainedAdditiveAttempts.slice(0, 100).map((attempt) => ({ id: attempt.deploymentId, space: attempt.space, state: attempt.recordedState })) } : { kind: "lines", lines: ["No readable additive attempt under this root."] }, { kind: "lines", lines: [...data.unreadableAdditiveAttempts.slice(0, 100).map((path) => `Unreadable additive attempt: ${path}`), ...(data.retainedAdditiveAttempts.length > 100 || data.unreadableAdditiveAttempts.length > 100 ? ["Additional records are in JSON."] : []), "A returned receipt records historical channel creation or native agent joins; an unsettled intent remains unknown. Neither grants removal or retry authority."] }] },
440
+ { title: "Declared channels", blocks: [data.channels.length ? { kind: "table", columns: [{ key: "name", label: "Channel" }, { key: "delivery", label: "Delivery class" }, { key: "replay", label: "Replay" }, { key: "window", label: "Replay window" }], rows: data.channels.slice(0, 100).map((channel) => ({ name: `#${channel.name}`, delivery: channel.deliveryClass ?? "not declared", replay: channel.replay === null ? "not declared" : channel.replay ? "on" : "off", window: channel.replayWindow ?? "not declared" })) } : { kind: "lines", lines: ["No channels declared."] }, { kind: "lines", lines: [...(data.channels.length > 100 ? ["Additional channels are in JSON."] : []), "Declared policy is not a live registry value or permission to overwrite existing metadata. Apply accepts all-new live channels and bounded static/open agent or mixed teams. Reapplying an identical settled deployment changes nothing; other existing cards refuse."] }] },
441
+ { title: "Retained additive attempts", blocks: [data.retainedAdditiveAttempts.length ? { kind: "table", columns: [{ key: "id", label: "Deployment" }, { key: "space", label: "Space" }, { key: "state", label: "Recorded state" }], rows: data.retainedAdditiveAttempts.slice(0, 100).map((attempt) => ({ id: attempt.deploymentId, space: attempt.space, state: teamText(attempt.recordedState) })) } : { kind: "lines", lines: ["No readable additive attempt under this root."] }, { kind: "lines", lines: [...data.unreadableAdditiveAttempts.slice(0, 100).map((path) => `Unreadable additive attempt: ${path}`), ...(data.retainedAdditiveAttempts.length > 100 || data.unreadableAdditiveAttempts.length > 100 ? ["Additional records are in JSON."] : []), "A returned receipt records historical channel creation or native agent joins; an unsettled intent remains unknown. Neither grants removal or retry authority."] }] },
399
442
  { title: "Existing unmanaged channel metadata", blocks: [data.native.channels.existsUnmanagedPolicy.length ? { kind: "table", columns: [{ key: "name", label: "Channel" }, { key: "difference", label: "Declared fields differing from live" }], rows: data.native.channels.existsUnmanagedPolicy.slice(0, 100).map((row) => ({ name: `#${row.name}`, difference: row.differingDeclaredFields.join(", ") || "none among declared fields" })) } : { kind: "lines", lines: ["No existing unmanaged declared channel cards in this snapshot."] }, { kind: "lines", lines: [...(data.native.channels.existsUnmanagedPolicy.length > 100 ? ["Additional comparisons are in JSON."] : []), "Only field names are shown, not live instructions or descriptions. Unmanaged cards are not patched or adopted; an omitted declaration is not a difference."] }] },
400
443
  { title: "Native additive classification", blocks: [{ kind: "fields", rows: [["New channel candidates", String(data.native.channels.create.length)], ["Prior-owned channel records", String(data.native.channels.owned.length)], ["Unmanaged existing channels", String(data.native.channels.existsUnmanaged.length)], ["Present unowned agents", String(data.native.unmanaged.presentUnowned.length)]] }, { kind: "table", columns: [{ key: "name", label: "Declared agent" }, { key: "state", label: "Disposition" }, { key: "running", label: "Prior name present" }], rows: data.native.agents.slice(0, 100).map((agent) => ({ name: agent.name, state: agent.disposition, running: agent.runningByName === null ? "not recorded" : agent.runningByName ? "yes" : "no" })) }, ...(data.native.agents.length > 100 ? [{ kind: "lines", lines: ["Additional classifications are in JSON."] }] : []), { kind: "lines", lines: ["Presence is not an ownership claim. The derived membership feed is display-only and may miss silent readers; this read is not a safe-to-apply plan."] }] },
444
+ { blocks: [{ kind: "lines", lines: ["Native roster and channel-registry classification is a non-atomic read, not an authorized deployment plan. Manager readiness, runtime and connector availability, write grants and apply effects remain unchecked."] }] },
401
445
  ] }));
402
446
  }
403
447
  /** A native read for display. Neither PS nor the derived membership feed grants stop authority. */
@@ -468,12 +512,18 @@ async function previewRemove(deploymentId, values) {
468
512
  if (values["dry-run"] !== true) {
469
513
  // The original intent picks the route; each route revalidates its own returned receipt.
470
514
  let routed;
515
+ const catalog = personaCatalog(values);
471
516
  try {
472
- routed = findAdditiveTeamAttempt(personaCatalog(values).root, deploymentId);
517
+ routed = findAdditiveTeamAttempt(catalog.root, deploymentId);
473
518
  }
474
519
  catch {
475
520
  throw new CommandFailure("refused", "SCHEMA_INVALID", "the additive attempt for this ID is unreadable; no removal route was inferred", { target: { deploymentId } });
476
521
  }
522
+ if (!routed) {
523
+ const missing = unknownDeployment(catalog.root, catalog.space, deploymentId);
524
+ if (missing)
525
+ throw missing;
526
+ }
477
527
  if (routed && !routed.requestedAgents.length && routed.declaredChannels.length) {
478
528
  const { removeChannelTeam } = await import("./team-channel-remove.js");
479
529
  return removeChannelTeam(deploymentId, values);
@@ -496,7 +546,7 @@ async function previewRemove(deploymentId, values) {
496
546
  throw new CommandFailure("refused", "SCHEMA_INVALID", "the fresh launch summary for this ID is unreadable; it cannot be treated as absent or as an additive removal target", { target: { space: catalog.space, deploymentId } });
497
547
  }
498
548
  if (summary)
499
- throw new CommandFailure("refused", "CONFLICT", "this ID belongs to a fresh boot summary, not an additive ownership ledger; team remove did not infer whole-stack stop authority", { target: { recordedSpace: summary.space, recordedRoot: summary.root, selectedSpace: catalog.space, deploymentId }, remedy: "from the recorded root, inspect cotal down --space <recorded-space> --dry-run; guarded bare down is not integrated in this source" });
549
+ throw new CommandFailure("refused", "CONFLICT", "this ID belongs to a fresh boot summary, not an additive ownership ledger; team remove did not infer whole-stack stop authority", { target: { recordedSpace: summary.space, recordedRoot: summary.root, selectedSpace: catalog.space, deploymentId }, remedy: `stop the booted stack with cotal down; preview that stop with cotal down --space ${summary.space} --dry-run` });
500
550
  let freshAttempt;
501
551
  try {
502
552
  freshAttempt = findFreshTeamAttempt(catalog.root, deploymentId);
@@ -545,7 +595,7 @@ async function previewRemove(deploymentId, values) {
545
595
  found = findLedgerByRun(catalog.root, deploymentId);
546
596
  }
547
597
  catch {
548
- throw new CommandFailure("refused", "TARGET_UNAVAILABLE", "no readable additive ownership ledger matches this full ID in the selected root; no resources were touched", { target: { space: catalog.space, root: catalog.root, deploymentId }, remedy: "inspect the checkout and space that recorded the additive deployment" });
598
+ throw unknownDeployment(catalog.root, catalog.space, deploymentId) ?? new CommandFailure("refused", "TARGET_UNAVAILABLE", "no readable additive ownership ledger matches this full ID in the selected root; no resources were touched", { target: { space: catalog.space, root: catalog.root, deploymentId }, remedy: "inspect the checkout and space that recorded the additive deployment" });
549
599
  }
550
600
  if (found.ledger.space !== catalog.space)
551
601
  throw new CommandFailure("refused", "CONFLICT", "this additive ledger belongs to another space; it was not rebound", { target: { recordedSpace: found.ledger.space, selectedSpace: catalog.space, deploymentId } });
@@ -560,12 +610,13 @@ async function previewRemove(deploymentId, values) {
560
610
  const result = { ...recorded(catalog.root, found.ledger), kind: "additive-removal-preview",
561
611
  dryRun: true, native, otherRetainedAttempts: otherAttempts.valid.map((row) => ({ deploymentId: row.deploymentId, space: row.space, server: brokerAddressForDisplay(row.server) ?? "not displayable" })), unreadableAttempts: otherAttempts.refused.map(({ path }) => path), authorization: "read-established-not-removal-authority", effectAttempted: false, persisted: false };
562
612
  writeResult(presentationOf(values), { command: "team remove", target: { space: result.space, root: result.root, deploymentId }, result,
563
- completeness: "partial", partial: { message: "Native manager PS, current channel revisions and a derived display-only membership read do not authorize stopping a lifecycle or removing a channel. The legacy ledger has no create revisions; exact ownership, authority and effect impact still need guarded apply checks." },
613
+ completeness: "partial",
564
614
  warnings: [...(native.membershipWarning ? [{ code: "MEMBERSHIP_FEED_UNAVAILABLE", target: { space: result.space, deploymentId }, message: native.membershipWarning }] : []), ...(otherAttempts.valid.length || otherAttempts.refused.length ? [{ code: "ADDITIVE_ATTEMPT_REMAINS", target: { root: catalog.root, deploymentIds: otherAttempts.valid.map((row) => row.deploymentId), unreadable: otherAttempts.refused.map(({ path }) => path) }, message: "Other additive attempts remain in this root; their native effects were not attributed to this ledger." }] : [])] }, (data) => ({ sections: [
565
615
  { title: "Additive removal impact", blocks: [{ kind: "fields", rows: [["Deployment", data.deploymentId], ["Space", data.space], ["Recorded root", data.root], ["Source context", data.manifestPath], ["Manager PS", data.native.managerPs], ["Channel registry", data.native.channelRegistry], ["Other additive attempts", String(data.otherRetainedAttempts.length)], ["Unreadable attempts", String(data.unreadableAttempts.length)], ["Membership feed", data.native.membershipFeed], ["Feed observed at", data.native.membershipObservedAt === null ? "not available" : String(data.native.membershipObservedAt)], ["Removal authority", "not established"]] }, { kind: "lines", lines: [{ text: "Native PS is a snapshot; the derived membership feed is display-only, never an ACL or stop authority. No stop, channel removal or ledger write occurred.", tone: "waiting" }] }] },
566
616
  ...(data.otherRetainedAttempts.length || data.unreadableAttempts.length ? [{ title: "Other retained additive attempts", blocks: [{ kind: "lines", lines: [...data.otherRetainedAttempts.slice(0, 100).map((row) => `${row.deploymentId} (${row.space})`), ...data.unreadableAttempts.slice(0, 100).map((path) => `Unreadable: ${path}`), ...(data.otherRetainedAttempts.length > 100 || data.unreadableAttempts.length > 100 ? ["Additional attempts are in JSON."] : []), "These attempts may have affected the same broker; they are not part of this ledger's owned scope."] }] }] : []),
567
617
  { title: "Ledger-owned agents against manager PS", blocks: [data.native.agents.length ? { kind: "table", columns: [{ key: "name", label: "Allocated" }, { key: "recorded", label: "Recorded identity" }, { key: "observed", label: "Observed identity" }, { key: "state", label: "Incarnation" }], rows: data.native.agents.slice(0, 100).map((agent) => ({ name: agent.name, recorded: agent.recordedId, observed: agent.observedId ?? "not seen", state: agent.state })) } : { kind: "lines", lines: ["No agent entries in this ledger."] }, ...(data.native.agents.length > 100 ? [{ kind: "lines", lines: ["Additional agent observations are in JSON."] }] : [])] },
568
618
  { title: "Ledger-owned channels", blocks: [{ kind: "table", columns: [{ key: "name", label: "Channel" }, { key: "revision", label: "Current revision" }, { key: "members", label: "Other members observed" }], rows: data.native.channels.slice(0, 100).map((channel) => ({ name: `#${channel.name}`, revision: channel.observedRevision === null ? "not live" : String(channel.observedRevision), members: channel.otherMembersObserved === null ? "unknown" : String(channel.otherMembersObserved.length) })) }, ...(data.native.channels.length > 100 ? [{ kind: "lines", lines: ["Additional channel observations are in JSON."] }] : []), { kind: "lines", lines: ["Current KV revisions are read-only snapshots. This ledger did not record create revisions, so matching a channel name does not authorize deleting its current card."] }] },
619
+ { blocks: [{ kind: "lines", lines: ["Native manager PS, current channel revisions and a derived display-only membership read do not authorize stopping a lifecycle or removing a channel. The legacy ledger has no create revisions; exact ownership, authority and effect impact still need guarded apply checks."] }] },
569
620
  ] }));
570
621
  }
571
622
  function accessGraph(prepared) {
@@ -592,6 +643,11 @@ function readTeamFile(file, values) {
592
643
  catch (e) {
593
644
  if (e instanceof ManifestError)
594
645
  throw manifestRefusal(e, path);
646
+ // A folder given as the manifest gets the refusal `up -f` and `topology view` give, naming it.
647
+ if (e instanceof UnusableFile)
648
+ throw e;
649
+ if (e.code === "ENOENT" && e.path === path)
650
+ throw new CommandFailure("refused", "TARGET_NOT_FOUND", `the team manifest ${path} was not found; no broker was contacted`, { target: { path }, remedy: "check the file path and run the command again" });
595
651
  throw new CommandFailure("refused", "SCHEMA_INVALID", "the team manifest or referenced persona could not be read and resolved; no broker was contacted", { target: { path }, remedy: "check the manifest schema, persona paths and permission declarations" });
596
652
  }
597
653
  if (values.space !== undefined && values.space !== prepared.manifest.space)
@@ -698,8 +754,11 @@ async function previewBoot(file, values) {
698
754
  brokerProbe = "probe-failed";
699
755
  }
700
756
  }
757
+ // A space with no root of its own previews this folder, which may already belong to other spaces.
758
+ // The apply refuses both, so the preview names the folder's spaces and the route the apply offers.
759
+ const folderSpaces = waiting || local ? [] : [...new Set([...localState.recordedSpaces, ...(localState.controlDir === "real" ? [preparedSpaceAt(root)?.space] : [])])].filter((name) => name !== undefined && name !== space).sort();
701
760
  const result = { kind: "fresh-team-boot-preview", dryRun: true, path, space, root,
702
- rootSource: waiting ? "prepared-local-record" : local ? "local-up-registration" : "invoking-folder-unprepared",
761
+ rootSource: waiting ? "prepared-local-record" : local ? "local-up-registration" : folderSpaces.length ? "invoking-folder-of-other-space" : "invoking-folder-unprepared",
703
762
  localState, serviceCensus,
704
763
  additiveLedgers: additiveRecords.valid.map(({ ledger }) => ({ deploymentId: ledger.runId, space: ledger.space, agents: ledger.created.agents.length, channels: ledger.created.channels.length })),
705
764
  unreadableAdditiveLedgers: additiveRecords.refused.map(({ path }) => path),
@@ -715,18 +774,20 @@ async function previewBoot(file, values) {
715
774
  runtime: prepared.manifest.runtime ?? "pty",
716
775
  authMode: prepared.manifest.broker?.auth === false ? "open" : prepared.manifest.broker?.auth === "user" ? "user" : "static",
717
776
  agents: prepared.agents.map((agent) => ({ name: agent.name, application: agent.agentType, role: agent.role ?? null, requestedModel: agent.model ?? null })),
777
+ defaults: prepared.manifest.defaults ?? null,
718
778
  channels: prepared.manifest.channels.map((channel) => ({ name: channel.name, deliveryClass: channel.deliveryClass ?? null, replay: channel.replay ?? null, replayWindow: channel.replayWindow ?? null })),
719
779
  nativePreflight: "local-read-and-credless-probe-only", openDurableUnsupported: openDurable, effectAttempted: false, persisted: false };
720
- writeResult(presentationOf(values), { command: "team boot", target: { space, root, path }, result, completeness: "partial", partial: { message: "Local process, additive ledger and selected-space service records, any exact-address registration matches and a credless broker probe were read, but broker exclusivity, service root ownership, native attempt settlement, bind authority, credentials, provider availability and startup readiness have not been checked.", remedy: waiting || local ? "inspect the selected local root and native startup guards before a future apply" : "prepare this folder explicitly with cotal space create <space> --root . before a future apply" }, warnings: [...prepared.warnings.map((warning) => ({ code: "MANIFEST_WARNING", target: { agent: warning.agent }, message: warning.message })), ...(openDurable ? [{ code: "OPEN_DURABLE_UNSUPPORTED", target: { space }, message: "The open manifest declares durable delivery, but its broker has no delivery daemon; fresh apply refuses before writing." }] : []), ...(otherBrokerRegistrations?.length ? [{ code: "BROKER_ADDRESS_SHARED", target: { space, root, otherSpaces: otherBrokerRegistrations.map((row) => row.space) }, message: "Other local registrations name this exact broker address; fresh apply refuses rather than binding over their recorded target." }] : []), ...(additiveRecords.valid.length || additiveRecords.refused.length ? [{ code: "ADDITIVE_OWNERSHIP_REMAINS", target: { space, root, deploymentIds: additiveRecords.valid.map(({ ledger }) => ledger.runId), unreadable: additiveRecords.refused.map(({ path }) => path) }, message: "Additive ledgers remain under this boot root. Fresh apply refuses until their lifecycle is resolved; unreadable ledgers are not absence." }] : []), ...(additiveAttempts.valid.length || additiveAttempts.refused.length ? [{ code: "ADDITIVE_ATTEMPT_REMAINS", target: { space, root, deploymentIds: additiveAttempts.valid.map((attempt) => attempt.deploymentId), unreadable: additiveAttempts.refused.map(({ path }) => path) }, message: "An additive intent is retained under this boot root. Fresh apply cannot infer its native outcome and refuses." }] : [])] }, (data) => ({ sections: [
721
- { title: "Fresh team local impact", blocks: [{ kind: "fields", rows: [["Space", data.space], ["Local root", data.root], ["Root source", data.rootSource], ["Control directory", data.localState.controlDir], ["Other locally recorded spaces", data.localState.recordedSpaces.join(", ") || "none"], ["Maintenance", data.localState.maintenance], ["Manager record", data.localState.managerRecord ? `${data.localState.managerRecord.state}${data.localState.managerRecord.pid === null ? "" : ` (pid ${data.localState.managerRecord.pid})`}` : "not checked"], ["Possibly live recorded processes", data.localState.possibleProcesses.join(", ") || "none found"], ["Broker candidate", data.brokerCandidate ?? "host-derived at apply; not probed"], ["Credless broker probe", data.brokerProbe], ["Other exact-address registrations", data.otherBrokerRegistrations === null ? "not checked" : String(data.otherBrokerRegistrations.length)], ["Manifest", data.path], ["Runtime request", data.runtime], ["Lifetime request", data.lifetimeRequest], ["Auth mode request", data.authMode], ["Durable delivery on open", data.openDurableUnsupported ? "unsupported at apply" : "not a contradiction"], ["Agents requested", String(data.agents.length)], ["Channels declared", String(data.channels.length)], ["Saved service definitions", String(data.serviceCensus.serviceDefinitions.length)], ["Saved service instances", String(data.serviceCensus.serviceRecords.length)], ["Supervisor receipts", String(data.serviceCensus.supervisors.length)], ["Retained native attempts", String(data.serviceCensus.nativeAttempts.length)], ["Additive ledgers", data.additiveInventory === "selected-root-local-ledgers" ? String(data.additiveLedgers.length) : "not checked"], ["Unreadable additive ledgers", data.additiveInventory === "selected-root-local-ledgers" ? String(data.unreadableAdditiveLedgers.length) : "not checked"], ["Additive attempts", data.additiveInventory === "selected-root-local-ledgers" ? String(data.additiveAttempts.length) : "not checked"], ["Unreadable additive attempts", data.additiveInventory === "selected-root-local-ledgers" ? String(data.unreadableAdditiveAttempts.length) : "not checked"], ["Fresh boot attempts", data.additiveInventory === "selected-root-local-ledgers" ? String(data.bootAttempts.length) : "not checked"], ["Unsettled fresh attempts", data.additiveInventory === "selected-root-local-ledgers" ? String(data.bootAttempts.filter((attempt) => !attempt.matchedSummary).length) : "not checked"], ["Unreadable fresh records", data.additiveInventory === "selected-root-local-ledgers" ? String(data.unreadableBootRecords.length) : "not checked"]] }, { kind: "lines", lines: [{ text: "A dead manager PID record remains visible here even when the possibly-live list omits it. Neither that record nor a credless probe proves safe reuse, broker absence on a TLS-first address, or authority to stop a leftover process. Bind authority, credentials, provider readiness and startup ownership remain unproved. No process or native resource was started.", tone: "waiting" }] }] },
780
+ writeResult(presentationOf(values), { command: "team boot", target: { space, root, path }, result, completeness: "partial", warnings: [...prepared.warnings.map((warning) => ({ code: "MANIFEST_WARNING", target: { agent: warning.agent }, message: warning.message })), ...(openDurable ? [{ code: "OPEN_DURABLE_UNSUPPORTED", target: { space }, message: "The open manifest declares durable delivery, but its broker has no delivery daemon; fresh apply refuses before writing." }] : []), ...(otherBrokerRegistrations?.length ? [{ code: "BROKER_ADDRESS_SHARED", target: { space, root, otherSpaces: otherBrokerRegistrations.map((row) => row.space) }, message: "Other local registrations name this exact broker address; fresh apply refuses rather than binding over their recorded target." }] : []), ...(additiveRecords.valid.length || additiveRecords.refused.length ? [{ code: "ADDITIVE_OWNERSHIP_REMAINS", target: { space, root, deploymentIds: additiveRecords.valid.map(({ ledger }) => ledger.runId), unreadable: additiveRecords.refused.map(({ path }) => path) }, message: "Additive ledgers remain under this boot root. Fresh apply refuses until their lifecycle is resolved; unreadable ledgers are not absence." }] : []), ...(additiveAttempts.valid.length || additiveAttempts.refused.length ? [{ code: "ADDITIVE_ATTEMPT_REMAINS", target: { space, root, deploymentIds: additiveAttempts.valid.map((attempt) => attempt.deploymentId), unreadable: additiveAttempts.refused.map(({ path }) => path) }, message: "An additive intent is retained under this boot root. Fresh apply cannot infer its native outcome and refuses." }] : [])] }, (data) => ({ sections: [
781
+ { title: "Fresh team local impact", blocks: [{ kind: "fields", rows: [["Space", data.space], ["Local root", data.root], ["Root source", data.rootSource === "prepared-local-record" ? "prepared for this space" : data.rootSource === "local-up-registration" ? "registered by cotal up" : folderSpaces.length ? `this folder, which belongs to ${folderSpaces.map((name) => `"${name}"`).join(", ")}` : "this folder, not prepared"], ["Control directory", data.localState.controlDir], ["Other locally recorded spaces", data.localState.recordedSpaces.join(", ") || "none"], ["Maintenance", data.localState.maintenance], ["Manager record", data.localState.managerRecord ? `${data.localState.managerRecord.state}${data.localState.managerRecord.pid === null ? "" : ` (pid ${data.localState.managerRecord.pid})`}` : "not checked"], ["Possibly live recorded processes", data.localState.possibleProcesses.join(", ") || "none found"], ["Broker candidate", data.brokerCandidate ?? "host-derived at apply; not probed"], ["Credless broker probe", data.brokerProbe], ["Other exact-address registrations", data.otherBrokerRegistrations === null ? "not checked" : String(data.otherBrokerRegistrations.length)], ["Manifest", data.path], ["Runtime request", data.runtime], ["Lifetime request", data.lifetimeRequest], ["Auth mode request", authModeText(data.authMode)], ...(data.authMode === "open" ? [["Durable delivery on open", data.openDurableUnsupported ? "unsupported at apply" : "not a contradiction"]] : []), ["Agents requested", String(data.agents.length)], ["Channels declared", String(data.channels.length)], ["Saved service definitions", String(data.serviceCensus.serviceDefinitions.length)], ["Saved service instances", String(data.serviceCensus.serviceRecords.length)], ["Supervisor receipts", String(data.serviceCensus.supervisors.length)], ["Retained native attempts", String(data.serviceCensus.nativeAttempts.length)], ["Additive ledgers", data.additiveInventory === "selected-root-local-ledgers" ? String(data.additiveLedgers.length) : "not checked"], ["Unreadable additive ledgers", data.additiveInventory === "selected-root-local-ledgers" ? String(data.unreadableAdditiveLedgers.length) : "not checked"], ["Additive attempts", data.additiveInventory === "selected-root-local-ledgers" ? String(data.additiveAttempts.length) : "not checked"], ["Unreadable additive attempts", data.additiveInventory === "selected-root-local-ledgers" ? String(data.unreadableAdditiveAttempts.length) : "not checked"], ["Fresh boot attempts", data.additiveInventory === "selected-root-local-ledgers" ? String(data.bootAttempts.length) : "not checked"], ["Unsettled fresh attempts", data.additiveInventory === "selected-root-local-ledgers" ? String(data.bootAttempts.filter((attempt) => !attempt.matchedSummary).length) : "not checked"], ["Unreadable fresh records", data.additiveInventory === "selected-root-local-ledgers" ? String(data.unreadableBootRecords.length) : "not checked"]] }, { kind: "lines", lines: [{ text: "A dead manager PID record remains visible here even when the possibly-live list omits it. Neither that record nor a credless probe proves safe reuse, broker absence on a TLS-first address, or authority to stop a leftover process. Bind authority, credentials, provider readiness and startup ownership remain unproved. No process or native resource was started.", tone: "waiting" }] }] },
722
782
  { title: "Recorded additive deployments", blocks: [data.additiveLedgers.length ? { kind: "table", columns: [{ key: "id", label: "Deployment" }, { key: "space", label: "Recorded space" }, { key: "agents", label: "Agent rows" }, { key: "channels", label: "Channel rows" }], rows: data.additiveLedgers.slice(0, 100).map((row) => ({ id: row.deploymentId, space: row.space, agents: String(row.agents), channels: String(row.channels) })) } : { kind: "lines", lines: [data.additiveInventory === "selected-root-local-ledgers" ? "No readable additive deployment ledgers in this root." : "The unprepared root has no control directory; additive ownership was not checked."] }, { kind: "lines", lines: [...(data.additiveLedgers.length > 100 ? ["Additional additive ledgers are in JSON."] : []), ...data.unreadableAdditiveLedgers.slice(0, 100).map((path) => `Unreadable ledger: ${path}`), ...(data.unreadableAdditiveLedgers.length > 100 ? ["Additional unreadable ledger paths are in JSON."] : []), "A recorded or unreadable additive ledger blocks fresh apply. The preview neither adopts nor tears down its resources."] }] },
723
- { title: "Retained additive deployments", blocks: [data.additiveAttempts.length ? { kind: "table", columns: [{ key: "id", label: "Deployment" }, { key: "space", label: "Space" }, { key: "state", label: "Recorded state" }], rows: data.additiveAttempts.slice(0, 100).map((attempt) => ({ id: attempt.deploymentId, space: attempt.space, state: attempt.recordedState })) } : { kind: "lines", lines: ["No readable additive attempts in this root."] }, { kind: "lines", lines: [...data.unreadableAdditiveAttempts.slice(0, 100).map((path) => `Unreadable additive attempt: ${path}`), ...(data.additiveAttempts.length > 100 || data.unreadableAdditiveAttempts.length > 100 ? ["Additional attempts or paths are in JSON."] : []), "An unsettled or unremoved additive deployment blocks a fresh boot. A complete matched removal receipt (static agent retirement or channel card deletion) releases only that known blocker; other service, broker and process custody is still checked."] }] },
783
+ { title: "Retained additive deployments", blocks: [data.additiveAttempts.length ? { kind: "table", columns: [{ key: "id", label: "Deployment" }, { key: "space", label: "Space" }, { key: "state", label: "Recorded state" }], rows: data.additiveAttempts.slice(0, 100).map((attempt) => ({ id: attempt.deploymentId, space: attempt.space, state: teamText(attempt.recordedState) })) } : { kind: "lines", lines: ["No readable additive attempts in this root."] }, { kind: "lines", lines: [...data.unreadableAdditiveAttempts.slice(0, 100).map((path) => `Unreadable additive attempt: ${path}`), ...(data.additiveAttempts.length > 100 || data.unreadableAdditiveAttempts.length > 100 ? ["Additional attempts or paths are in JSON."] : []), "An unsettled or unremoved additive deployment blocks a fresh boot. A complete matched removal receipt (static agent retirement or channel card deletion) releases only that known blocker; other service, broker and process custody is still checked."] }] },
724
784
  { title: "Fresh boot attempts", blocks: [data.bootAttempts.length ? { kind: "table", columns: [{ key: "id", label: "Deployment" }, { key: "space", label: "Space" }, { key: "summary", label: "Returned summary" }], rows: data.bootAttempts.slice(0, 100).map((attempt) => ({ id: attempt.deploymentId, space: attempt.space, summary: attempt.matchedSummary ? "matched" : "unsettled" })) } : { kind: "lines", lines: ["No readable fresh boot attempts under this root."] }, { kind: "lines", lines: [...(data.bootAttempts.length > 100 ? ["Additional attempts are in JSON."] : []), ...data.unreadableBootRecords.slice(0, 100).map((path) => `Unreadable fresh record: ${path}`), ...(data.unreadableBootRecords.length > 100 ? ["Additional unreadable paths are in JSON."] : []), "An unsettled attempt or unreadable fresh record blocks a new boot. Even a matched summary is not current broker or agent liveness."] }] },
725
785
  { title: "Recorded broker address matches", blocks: [data.otherBrokerRegistrations === null ? { kind: "lines", lines: ["Broker address is host-derived at apply; exact local registrations were not compared."] } : data.otherBrokerRegistrations.length ? { kind: "table", columns: [{ key: "space", label: "Other space" }, { key: "root", label: "Recorded root" }, { key: "origin", label: "Registration" }], rows: data.otherBrokerRegistrations.slice(0, 100) } : { kind: "lines", lines: ["No other registration uses this exact candidate address in the local workstation registry."] }, { kind: "lines", lines: [...((data.otherBrokerRegistrations?.length ?? 0) > 100 ? ["Additional exact-address matches are in JSON."] : []), "A match blocks fresh apply. No match does not prove an exclusive broker: address aliases, remote tenants and live attachments were not checked."] }] },
726
786
  { title: "Selected-space service records", blocks: [data.serviceCensus.serviceRecords.length ? { kind: "table", columns: [{ key: "definition", label: "Definition" }, { key: "instance", label: "Full instance" }, { key: "state", label: "Recorded state" }], rows: data.serviceCensus.serviceRecords.slice(0, 100).map((row) => ({ definition: row.definition, instance: row.instanceId, state: row.recordedState })) } : { kind: "lines", lines: ["No service instance records in this space's workstation store."] }, { kind: "lines", lines: [...(data.serviceCensus.serviceRecords.length > 100 ? ["Additional instance records are in JSON."] : []), "Definitions and supervisor receipts are also in JSON. These space-scoped records are not attributed to this boot root or established as live; a future apply must recheck them before writing."] }] },
727
787
  { title: "Retained native attempts", blocks: [data.serviceCensus.nativeAttempts.length ? { kind: "table", columns: [{ key: "kind", label: "Action" }, { key: "instance", label: "Full instance" }, { key: "step", label: "Step" }, { key: "position", label: "Position" }], rows: data.serviceCensus.nativeAttempts.slice(0, 100).map((row) => ({ kind: row.kind, instance: row.instanceId, step: row.step, position: row.position })) } : { kind: "lines", lines: ["No retained native attempts in this space's workstation store."] }, ...(data.serviceCensus.nativeAttempts.length > 100 ? [{ kind: "lines", lines: ["Additional attempts are in JSON."] }] : [])] },
728
788
  { title: "Requested agents", blocks: [data.agents.length ? { kind: "table", columns: [{ key: "name", label: "Name" }, { key: "application", label: "Application" }, { key: "role", label: "Role" }, { key: "model", label: "Model request" }], rows: data.agents.slice(0, 100).map((agent) => ({ name: agent.name, application: agent.application, role: agent.role ?? "none", model: agent.requestedModel ?? "application default" })) } : { kind: "lines", lines: ["No agents requested."] }, ...(data.agents.length > 100 ? [{ kind: "lines", lines: ["Additional requested agents are in JSON."] }] : [])] },
729
- { title: "Declared channels", blocks: [data.channels.length ? { kind: "table", columns: [{ key: "name", label: "Channel" }, { key: "delivery", label: "Delivery class" }, { key: "replay", label: "Replay" }, { key: "window", label: "Replay window" }], rows: data.channels.slice(0, 100).map((channel) => ({ name: `#${channel.name}`, delivery: channel.deliveryClass ?? "not declared", replay: channel.replay === null ? "not declared" : channel.replay ? "on" : "off", window: channel.replayWindow ?? "not declared" })) } : { kind: "lines", lines: ["No channels declared."] }, { kind: "lines", lines: [...(data.channels.length > 100 ? ["Additional channels are in JSON."] : []), "Only declared values are shown. The preview does not read saved channel metadata or infer final effective policy."] }] },
789
+ { title: "Declared channels", blocks: [{ kind: "fields", rows: [["Manifest defaults", defaultsText(data.defaults)]] }, data.channels.length ? { kind: "table", columns: [{ key: "name", label: "Channel" }, { key: "delivery", label: "Delivery class" }, { key: "replay", label: "Replay" }, { key: "window", label: "Replay window" }], rows: data.channels.slice(0, 100).map((channel) => ({ name: `#${channel.name}`, ...channelPolicyCells(channel, data.defaults) })) } : { kind: "lines", lines: ["No channels declared."] }, { kind: "lines", lines: [...(data.channels.length > 100 ? ["Additional channels are in JSON."] : []), "A value marked (default) comes from the manifest's defaults, which boot seeds as the space defaults. The preview does not read saved channel metadata for a value neither declares."] }] },
790
+ { blocks: [{ kind: "lines", lines: ["Local process, additive ledger and selected-space service records, any exact-address registration matches and a credless broker probe were read, but broker exclusivity, service root ownership, native attempt settlement, bind authority, credentials, provider availability and startup readiness have not been checked.", { text: waiting || local ? "inspect the selected local root and native startup guards before a future apply" : folderSpaces.length ? `the apply refuses until "${space}" has its own folder: prepare one with cotal space create ${space} --root <project-directory>` : `the apply refuses until "${space}" is prepared: prepare this folder with cotal space create ${space} --root .`, tone: "hint" }] }] },
730
791
  ] }));
731
792
  }
732
793
  async function checkTeam(file, values) {
@@ -736,11 +797,12 @@ async function checkTeam(file, values) {
736
797
  agents: prepared.agents.map((agent) => ({ name: agent.name, harness: agent.agentType, role: agent.role ?? null, model: agent.model ?? null, policy: agent.policy, inherited: agent.inherited, capabilities: agent.capabilities, capabilitySource: agent.capabilitySource })),
737
798
  channels: prepared.manifest.channels.map((channel) => ({ name: channel.name, subscribe: channel.subscribe, allowSubscribe: channel.allowSubscribe, allowPublish: channel.allowPublish,
738
799
  deliveryClass: channel.deliveryClass ?? null, replay: channel.replay ?? null, replayWindow: channel.replayWindow ?? null })),
800
+ defaults: prepared.manifest.defaults ?? null,
739
801
  graph: values.graph ? accessGraph(prepared) : null,
740
802
  };
741
803
  writeResult(presentationOf(values), { command: "team", target: { space: result.space, path }, result: { ...result, openDurableUnsupported: openDurable }, warnings: [...prepared.warnings.map((warning) => ({ code: "MANIFEST_WARNING", target: { agent: warning.agent }, message: warning.message })), ...(openDurable ? [{ code: "OPEN_DURABLE_UNSUPPORTED", target: { space: result.space }, message: "This open manifest explicitly declares durable delivery, but open mode has no delivery daemon; fresh apply refuses before effects." }] : [])] }, (data) => ({ sections: [
742
- { title: "Team manifest resolved", blocks: [{ kind: "fields", rows: [["File", data.file], ["Space", data.space], ["Runtime", data.runtime], ["Agents", String(data.agents.length)], ["Channels", String(data.channels.length)], ["Durable delivery on open", data.openDurableUnsupported ? "unsupported at fresh apply" : "not a contradiction"]] }, { kind: "table", columns: [{ key: "name", label: "Agent" }, { key: "harness", label: "Application" }, { key: "role", label: "Role" }, { key: "model", label: "Declared model" }], rows: data.agents.slice(0, 100).map((agent) => ({ name: agent.name, harness: agent.harness, role: agent.role ?? "none", model: agent.model ?? "application default" })) }, ...(data.agents.length > 100 ? [{ kind: "lines", lines: ["Additional resolved agents are in JSON."] }] : []), { kind: "lines", lines: [{ text: "File and persona resolution only. No broker, runtime availability, grants, reservations or launch readiness were checked. Persona bodies and kickoff prompts are not printed.", tone: "hint" }] }] },
743
- { title: "Declared channel policy", blocks: [data.channels.length ? { kind: "table", columns: [{ key: "name", label: "Channel" }, { key: "delivery", label: "Delivery class" }, { key: "replay", label: "Replay" }, { key: "window", label: "Replay window" }], rows: data.channels.slice(0, 100).map((channel) => ({ name: `#${channel.name}`, delivery: channel.deliveryClass ?? "not declared", replay: channel.replay === null ? "not declared" : channel.replay ? "on" : "off", window: channel.replayWindow ?? "not declared" })) } : { kind: "lines", lines: ["No channels declared."] }, { kind: "lines", lines: [...(data.channels.length > 100 ? ["Additional channel policies are in JSON."] : []), "Only manifest-declared values are shown. An absent field may inherit saved registry metadata at boot; this offline check does not read the broker."] }] },
804
+ { title: "Team manifest resolved", blocks: [{ kind: "fields", rows: [["File", data.file], ["Space", data.space], ["Runtime", data.runtime], ["Agents", String(data.agents.length)], ["Channels", String(data.channels.length)], ...(prepared.manifest.broker?.auth === false ? [["Durable delivery on open", data.openDurableUnsupported ? "unsupported at fresh apply" : "not a contradiction"]] : [])] }, data.agents.length ? { kind: "table", columns: [{ key: "name", label: "Agent" }, { key: "harness", label: "Application" }, { key: "role", label: "Role" }, { key: "model", label: "Declared model" }], rows: data.agents.slice(0, 100).map((agent) => ({ name: agent.name, harness: agent.harness, role: agent.role ?? "none", model: agent.model ?? "application default" })) } : { kind: "lines", lines: ["No agents declared."] }, ...(data.agents.length > 100 ? [{ kind: "lines", lines: ["Additional resolved agents are in JSON."] }] : []), { kind: "lines", lines: [{ text: "File and persona resolution only. No broker, runtime availability, grants, reservations or launch readiness were checked. Persona bodies and kickoff prompts are not printed.", tone: "hint" }] }] },
805
+ { title: "Declared channel policy", blocks: [{ kind: "fields", rows: [["Manifest defaults", defaultsText(data.defaults)]] }, data.channels.length ? { kind: "table", columns: [{ key: "name", label: "Channel" }, { key: "delivery", label: "Delivery class" }, { key: "replay", label: "Replay" }, { key: "window", label: "Replay window" }], rows: data.channels.slice(0, 100).map((channel) => ({ name: `#${channel.name}`, ...channelPolicyCells(channel, data.defaults) })) } : { kind: "lines", lines: ["No channels declared."] }, { kind: "lines", lines: [...(data.channels.length > 100 ? ["Additional channel policies are in JSON."] : []), "A value marked (default) comes from the manifest's defaults, which boot seeds as the space defaults. A field neither declares may inherit saved registry metadata at boot; this offline check does not read the broker."] }] },
744
806
  ...(values.graph ? [
745
807
  { title: "Effective channel access", blocks: [{ kind: "table", columns: [{ key: "channel", label: "Channel" }, { key: "source", label: "Source" }, { key: "listen", label: "Initially listening" }, { key: "read", label: "May read" }, { key: "post", label: "May post" }], rows: (data.graph ?? []).slice(0, 100).map((channel) => ({ channel: `#${channel.name}`, source: channel.source, listen: channel.subscribe.join(", ") || "none", read: channel.allowSubscribe.join(", ") || "none", post: channel.allowPublish.join(", ") || "none" })) }, { kind: "lines", lines: [...((data.graph?.length ?? 0) > 100 ? ["Additional access edges are in JSON."] : []), "Persona-inherited channels have no manifest card. These are resolved access intentions, not registered channels, observed membership or live grants."] }] },
746
808
  { title: "Agent capability intent", blocks: [data.agents.length ? { kind: "table", columns: [{ key: "agent", label: "Agent" }, { key: "role", label: "Role" }, { key: "capabilities", label: "Capabilities" }, { key: "source", label: "Source" }], rows: data.agents.slice(0, 100).map((agent) => ({ agent: agent.name, role: agent.role ?? "none", capabilities: agent.capabilities.join(", ") || "none", source: agent.capabilitySource })) } : { kind: "lines", lines: ["No agents declared."] }, { kind: "lines", lines: [...(data.agents.length > 100 ? ["Additional capability intentions are in JSON."] : []), "A role or capability in a resolved manifest is not an issued credential. No broker, provider or grant was contacted."] }] },