@ours.network/fleet 1.2.0-nightly.6 → 1.2.0-nightly.60

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 (389) hide show
  1. package/README.md +287 -65
  2. package/dist/account-origin.d.ts +2 -0
  3. package/dist/account-origin.js +6 -0
  4. package/dist/agent-ours/bridge.js +35 -9
  5. package/dist/agent-ours/correspondence.d.ts +10 -0
  6. package/dist/agent-ours/correspondence.js +1 -0
  7. package/dist/agent-ours/file-rpc.d.ts +12 -0
  8. package/dist/agent-ours/file-rpc.js +18 -4
  9. package/dist/agent-ours/harness.js +9 -1
  10. package/dist/agent-ours/mcp-endpoint.d.ts +4 -0
  11. package/dist/agent-ours/mcp-endpoint.js +5 -0
  12. package/dist/agent-ours/runtime.d.ts +9 -1
  13. package/dist/agent-ours/runtime.js +50 -2
  14. package/dist/agent-ours/service.d.ts +21 -1
  15. package/dist/agent-ours/service.js +94 -14
  16. package/dist/application/codex-models.d.ts +15 -0
  17. package/dist/application/codex-models.js +56 -0
  18. package/dist/application/conversation-history.d.ts +27 -0
  19. package/dist/application/conversation-history.js +212 -0
  20. package/dist/application/fleet-query-service.d.ts +1 -1
  21. package/dist/application/fleet-query-service.js +2 -2
  22. package/dist/application/legacy-supervisor-identity.d.ts +7 -0
  23. package/dist/application/legacy-supervisor-identity.js +43 -0
  24. package/dist/application/log-service.js +8 -8
  25. package/dist/application/model-catalog.d.ts +1 -1
  26. package/dist/application/model-catalog.js +5 -2
  27. package/dist/application/preset-provenance.d.ts +19 -0
  28. package/dist/application/preset-provenance.js +59 -0
  29. package/dist/application/role-creation-service.js +3 -2
  30. package/dist/application/role-removal-service.js +9 -1
  31. package/dist/application/role-repository.js +19 -2
  32. package/dist/application/room-layout-definitions.d.ts +45 -0
  33. package/dist/application/room-layout-definitions.js +130 -0
  34. package/dist/application/session-control.d.ts +30 -0
  35. package/dist/application/session-control.js +72 -3
  36. package/dist/application/supervisor-ours-tools.d.ts +159 -0
  37. package/dist/application/supervisor-ours-tools.js +115 -0
  38. package/dist/application/task-layouts.d.ts +91 -0
  39. package/dist/application/task-layouts.js +259 -0
  40. package/dist/application/task-room-service.d.ts +99 -3
  41. package/dist/application/task-room-service.js +285 -32
  42. package/dist/application/types.d.ts +2 -0
  43. package/dist/atomic-file.d.ts +5 -0
  44. package/dist/atomic-file.js +62 -1
  45. package/dist/briefing.d.ts +3 -1
  46. package/dist/briefing.js +70 -30
  47. package/dist/build-info.json +7 -4
  48. package/dist/capabilities.d.ts +6 -1
  49. package/dist/capabilities.js +8 -0
  50. package/dist/cli.js +407 -37
  51. package/dist/client-profile.d.ts +5 -17
  52. package/dist/client-profile.js +4 -127
  53. package/dist/config.d.ts +45 -0
  54. package/dist/config.js +57 -6
  55. package/dist/creation.d.ts +1 -1
  56. package/dist/creation.js +4 -4
  57. package/dist/daemon-recovery.d.ts +1 -8
  58. package/dist/daemon-recovery.js +8 -113
  59. package/dist/docs.d.ts +1 -1
  60. package/dist/docs.js +123 -19
  61. package/dist/doctor.d.ts +1 -1
  62. package/dist/doctor.js +55 -60
  63. package/dist/erased-resources.d.ts +9 -0
  64. package/dist/erased-resources.js +87 -0
  65. package/dist/file-delivery/reader.d.ts +15 -0
  66. package/dist/file-delivery/reader.js +63 -0
  67. package/dist/file-delivery/store.d.ts +15 -0
  68. package/dist/file-delivery/store.js +124 -0
  69. package/dist/file-delivery/types.d.ts +19 -0
  70. package/dist/file-delivery/types.js +1 -0
  71. package/dist/fleet-command-audit.d.ts +7 -0
  72. package/dist/fleet-command-audit.js +26 -9
  73. package/dist/harness/agent-session.d.ts +2 -0
  74. package/dist/harness/claude-code-session.js +1 -1
  75. package/dist/harness/claude-code.js +20 -11
  76. package/dist/harness/claude-runtime.d.ts +12 -0
  77. package/dist/harness/claude-runtime.js +43 -0
  78. package/dist/harness/codex-app-server-proxy.d.ts +4 -1
  79. package/dist/harness/codex-app-server-proxy.js +41 -5
  80. package/dist/harness/codex-reasoning.d.ts +5 -0
  81. package/dist/harness/codex-reasoning.js +12 -0
  82. package/dist/harness/codex-runtime.d.ts +11 -1
  83. package/dist/harness/codex-runtime.js +31 -4
  84. package/dist/harness/codex-session.js +2 -2
  85. package/dist/harness/codex.js +23 -12
  86. package/dist/init-wizard.d.ts +2 -0
  87. package/dist/init-wizard.js +38 -19
  88. package/dist/isolation/policy.js +6 -1
  89. package/dist/isolation/types.d.ts +5 -0
  90. package/dist/managed-cli.d.ts +253 -0
  91. package/dist/managed-cli.js +923 -0
  92. package/dist/managed-recovery.d.ts +13 -0
  93. package/dist/managed-recovery.js +31 -0
  94. package/dist/minimal-setup.d.ts +2 -0
  95. package/dist/minimal-setup.js +44 -0
  96. package/dist/monitor.d.ts +8 -34
  97. package/dist/monitor.js +89 -152
  98. package/dist/notifications/fleet-producer.d.ts +19 -0
  99. package/dist/notifications/fleet-producer.js +208 -0
  100. package/dist/notifications/outbox.d.ts +46 -0
  101. package/dist/notifications/outbox.js +158 -0
  102. package/dist/notifications/target-cleanup.d.ts +8 -0
  103. package/dist/notifications/target-cleanup.js +41 -0
  104. package/dist/notifications/task-producer.d.ts +18 -0
  105. package/dist/notifications/task-producer.js +67 -0
  106. package/dist/ops.d.ts +2 -0
  107. package/dist/ops.js +20 -3
  108. package/dist/owner-channel/channel.js +17 -6
  109. package/dist/owner-channel/commands.d.ts +4 -0
  110. package/dist/owner-channel/commands.js +8 -0
  111. package/dist/owner-channel/lifecycle-outbox.js +4 -3
  112. package/dist/owner-channel/ours-client.js +2 -17
  113. package/dist/paths.d.ts +2 -0
  114. package/dist/paths.js +2 -0
  115. package/dist/preset-migration.js +25 -0
  116. package/dist/resolved-plan.js +1 -0
  117. package/dist/rooms-tasks/add-member.d.ts +48 -0
  118. package/dist/rooms-tasks/add-member.js +83 -0
  119. package/dist/rooms-tasks/archived-absence.d.ts +8 -0
  120. package/dist/rooms-tasks/archived-absence.js +48 -0
  121. package/dist/rooms-tasks/cli.js +65 -5
  122. package/dist/rooms-tasks/close.d.ts +6 -2
  123. package/dist/rooms-tasks/close.js +246 -37
  124. package/dist/rooms-tasks/config.d.ts +1 -1
  125. package/dist/rooms-tasks/config.js +11 -4
  126. package/dist/rooms-tasks/cowork-adapter.d.ts +2 -4
  127. package/dist/rooms-tasks/cowork-adapter.js +7 -121
  128. package/dist/rooms-tasks/cowork-http.js +29 -1
  129. package/dist/rooms-tasks/deletion.d.ts +1 -1
  130. package/dist/rooms-tasks/deletion.js +84 -5
  131. package/dist/rooms-tasks/erasure.d.ts +6 -0
  132. package/dist/rooms-tasks/erasure.js +173 -0
  133. package/dist/rooms-tasks/external-worker.d.ts +1 -1
  134. package/dist/rooms-tasks/external-worker.js +3 -4
  135. package/dist/rooms-tasks/layout-binding-client.d.ts +11 -0
  136. package/dist/rooms-tasks/layout-binding-client.js +56 -0
  137. package/dist/rooms-tasks/layout-binding-grants.d.ts +21 -0
  138. package/dist/rooms-tasks/layout-binding-grants.js +128 -0
  139. package/dist/rooms-tasks/layout-cli.d.ts +4 -0
  140. package/dist/rooms-tasks/layout-cli.js +107 -0
  141. package/dist/rooms-tasks/layout-config.d.ts +11 -0
  142. package/dist/rooms-tasks/layout-config.js +89 -0
  143. package/dist/rooms-tasks/layout-control.d.ts +21 -0
  144. package/dist/rooms-tasks/layout-control.js +52 -0
  145. package/dist/rooms-tasks/layout-member-retirement.d.ts +10 -0
  146. package/dist/rooms-tasks/layout-member-retirement.js +90 -0
  147. package/dist/rooms-tasks/layout-service.d.ts +43 -0
  148. package/dist/rooms-tasks/layout-service.js +203 -0
  149. package/dist/rooms-tasks/layout.d.ts +121 -0
  150. package/dist/rooms-tasks/layout.js +285 -0
  151. package/dist/rooms-tasks/legacy-task-member.d.ts +19 -0
  152. package/dist/rooms-tasks/legacy-task-member.js +116 -0
  153. package/dist/rooms-tasks/live-readiness.d.ts +18 -0
  154. package/dist/rooms-tasks/live-readiness.js +85 -0
  155. package/dist/rooms-tasks/member-ownership.d.ts +5 -0
  156. package/dist/rooms-tasks/member-ownership.js +40 -0
  157. package/dist/rooms-tasks/member-startup.d.ts +1 -0
  158. package/dist/rooms-tasks/member-startup.js +2 -0
  159. package/dist/rooms-tasks/provision.d.ts +3 -0
  160. package/dist/rooms-tasks/provision.js +101 -49
  161. package/dist/rooms-tasks/recovery.d.ts +19 -0
  162. package/dist/rooms-tasks/recovery.js +110 -0
  163. package/dist/rooms-tasks/room-state.d.ts +4 -2
  164. package/dist/rooms-tasks/room-state.js +47 -8
  165. package/dist/rooms-tasks/task-service-retirement.d.ts +11 -0
  166. package/dist/rooms-tasks/task-service-retirement.js +21 -0
  167. package/dist/rooms-tasks/task-state.d.ts +51 -8
  168. package/dist/rooms-tasks/task-state.js +245 -25
  169. package/dist/rooms-tasks/types.d.ts +40 -0
  170. package/dist/rooms-tasks/workspace-artifacts.d.ts +6 -0
  171. package/dist/rooms-tasks/workspace-artifacts.js +93 -0
  172. package/dist/rooms-tasks/workspace.d.ts +35 -0
  173. package/dist/rooms-tasks/workspace.js +325 -0
  174. package/dist/runner.d.ts +25 -3
  175. package/dist/runner.js +291 -49
  176. package/dist/session/acp.d.ts +53 -1
  177. package/dist/session/acp.js +216 -40
  178. package/dist/session/arbiter.d.ts +11 -0
  179. package/dist/session/arbiter.js +43 -2
  180. package/dist/session/codex-app-server.d.ts +32 -0
  181. package/dist/session/codex-app-server.js +137 -23
  182. package/dist/session/control.d.ts +12 -1
  183. package/dist/session/control.js +68 -3
  184. package/dist/session/conversation-normalizer.d.ts +2 -1
  185. package/dist/session/conversation-normalizer.js +1 -1
  186. package/dist/session/conversation-store.d.ts +1 -1
  187. package/dist/session/conversation-store.js +7 -11
  188. package/dist/session/conversation-types.d.ts +28 -3
  189. package/dist/session/prompt-batch.d.ts +63 -0
  190. package/dist/session/prompt-batch.js +86 -0
  191. package/dist/session/task-notice.d.ts +14 -0
  192. package/dist/session/task-notice.js +13 -0
  193. package/dist/session/types.d.ts +14 -0
  194. package/dist/setup-tunnel-preflight.d.ts +34 -0
  195. package/dist/setup-tunnel-preflight.js +62 -0
  196. package/dist/socket-path.d.ts +2 -0
  197. package/dist/socket-path.js +22 -0
  198. package/dist/spawn.d.ts +5 -1
  199. package/dist/spawn.js +40 -4
  200. package/dist/startup-prompt.d.ts +4 -0
  201. package/dist/startup-prompt.js +36 -0
  202. package/dist/startup-readiness.d.ts +13 -0
  203. package/dist/startup-readiness.js +38 -0
  204. package/dist/startup-telemetry.d.ts +16 -0
  205. package/dist/startup-telemetry.js +46 -0
  206. package/dist/subscriptions/cli.d.ts +91 -0
  207. package/dist/subscriptions/cli.js +223 -0
  208. package/dist/subscriptions/launch.d.ts +37 -0
  209. package/dist/subscriptions/launch.js +93 -0
  210. package/dist/subscriptions/login.d.ts +75 -0
  211. package/dist/subscriptions/login.js +182 -0
  212. package/dist/subscriptions/observed.d.ts +7 -0
  213. package/dist/subscriptions/observed.js +44 -0
  214. package/dist/subscriptions/probe.d.ts +10 -0
  215. package/dist/subscriptions/probe.js +73 -0
  216. package/dist/subscriptions/service.d.ts +102 -0
  217. package/dist/subscriptions/service.js +364 -0
  218. package/dist/subscriptions/store.d.ts +71 -0
  219. package/dist/subscriptions/store.js +140 -0
  220. package/dist/supervisor/adoption.d.ts +8 -0
  221. package/dist/supervisor/adoption.js +78 -0
  222. package/dist/supervisor/catalog.d.ts +62 -0
  223. package/dist/supervisor/catalog.js +254 -0
  224. package/dist/supervisor/fleet.d.ts +8 -0
  225. package/dist/supervisor/fleet.js +89 -0
  226. package/dist/supervisor/index.js +3 -6
  227. package/dist/supervisor/launchd.d.ts +1 -1
  228. package/dist/supervisor/launchd.js +26 -13
  229. package/dist/supervisor/legacy.d.ts +35 -0
  230. package/dist/supervisor/legacy.js +524 -0
  231. package/dist/supervisor/manager.d.ts +15 -0
  232. package/dist/supervisor/manager.js +270 -0
  233. package/dist/supervisor/scope.d.ts +4 -0
  234. package/dist/supervisor/scope.js +10 -0
  235. package/dist/supervisor/systemd.d.ts +2 -2
  236. package/dist/supervisor/systemd.js +19 -33
  237. package/dist/task-supervision.d.ts +9 -0
  238. package/dist/task-supervision.js +145 -0
  239. package/dist/temp-idle.d.ts +17 -0
  240. package/dist/temp-idle.js +42 -0
  241. package/dist/temp-lifecycle.d.ts +23 -8
  242. package/dist/temp-lifecycle.js +113 -65
  243. package/dist/temp-supervisor-recovery.d.ts +1 -1
  244. package/dist/temp-supervisor-recovery.js +2 -2
  245. package/dist/tunnel-setup-completion.d.ts +7 -0
  246. package/dist/tunnel-setup-completion.js +13 -0
  247. package/dist/tunnel-setup-input.d.ts +19 -0
  248. package/dist/tunnel-setup-input.js +124 -0
  249. package/dist/web/agent-attachments.d.ts +29 -0
  250. package/dist/web/agent-attachments.js +162 -0
  251. package/dist/web/auth.d.ts +63 -2
  252. package/dist/web/auth.js +191 -10
  253. package/dist/web/available-port.d.ts +2 -0
  254. package/dist/web/available-port.js +23 -0
  255. package/dist/web/control.d.ts +3 -3
  256. package/dist/web/control.js +10 -8
  257. package/dist/web/fleet-config-service.d.ts +4 -1
  258. package/dist/web/fleet-config-service.js +46 -15
  259. package/dist/web/prefix-gateway.d.ts +32 -0
  260. package/dist/web/prefix-gateway.js +238 -0
  261. package/dist/web/runtime.d.ts +3 -1
  262. package/dist/web/runtime.js +116 -31
  263. package/dist/web/server.d.ts +16 -0
  264. package/dist/web/server.js +654 -55
  265. package/dist/web/service.d.ts +11 -2
  266. package/dist/web/service.js +30 -4
  267. package/dist/web/workspace-devices.d.ts +107 -0
  268. package/dist/web/workspace-devices.js +277 -0
  269. package/dist/web/workspace-tunnel.d.ts +1 -0
  270. package/dist/web/workspace-tunnel.js +34 -0
  271. package/dist/workspace-enrollment.d.ts +82 -0
  272. package/dist/workspace-enrollment.js +566 -0
  273. package/dist/workspace-replacement.d.ts +66 -0
  274. package/dist/workspace-replacement.js +220 -0
  275. package/docs/acp-files.md +146 -0
  276. package/docs/fleet-migration.md +54 -0
  277. package/docs/live-voice.md +13 -0
  278. package/docs/room-layouts.md +227 -0
  279. package/docs/task-workspaces.md +225 -0
  280. package/docs/validation/managed-cli-permissions.md +421 -0
  281. package/examples/room-layouts/fresh.yaml +27 -0
  282. package/examples/room-layouts/scoped.yaml +21 -0
  283. package/examples/room-layouts/shared.yaml +19 -0
  284. package/package.json +20 -19
  285. package/presets/README.md +78 -0
  286. package/presets/brain-catalog.json +8 -2
  287. package/presets/fleet/agent_templates/Critic.yaml +1 -1
  288. package/presets/fleet/agent_templates/Developer.yaml +1 -1
  289. package/presets/fleet/agent_templates/Engineer.yaml +5 -0
  290. package/presets/fleet/agent_templates/LocalCoordinator.yaml +1 -1
  291. package/presets/fleet/agents/FleetCoordinator.yaml +1 -1
  292. package/presets/fleet/brains/claude-fable-5-1-high.yaml +5 -0
  293. package/presets/fleet/brains/claude-fable-5-1-low.yaml +5 -0
  294. package/presets/fleet/brains/claude-fable-5-1-max.yaml +5 -0
  295. package/presets/fleet/brains/claude-fable-5-1-medium.yaml +5 -0
  296. package/presets/fleet/brains/claude-fable-5-1-xhigh.yaml +5 -0
  297. package/presets/fleet/brains/claude-fable-5-high.yaml +1 -1
  298. package/presets/fleet/brains/claude-fable-5-low.yaml +1 -1
  299. package/presets/fleet/brains/claude-fable-5-max.yaml +1 -1
  300. package/presets/fleet/brains/claude-fable-5-medium.yaml +1 -1
  301. package/presets/fleet/brains/claude-fable-5-xhigh.yaml +1 -1
  302. package/presets/fleet/brains/claude-haiku-4-5-20251001-default.yaml +4 -0
  303. package/presets/fleet/brains/claude-opus-5-5-high.yaml +5 -0
  304. package/presets/fleet/brains/claude-opus-5-5-low.yaml +5 -0
  305. package/presets/fleet/brains/claude-opus-5-5-max.yaml +5 -0
  306. package/presets/fleet/brains/claude-opus-5-5-medium.yaml +5 -0
  307. package/presets/fleet/brains/claude-opus-5-5-xhigh.yaml +5 -0
  308. package/presets/fleet/brains/claude-opus-5-high.yaml +1 -1
  309. package/presets/fleet/brains/claude-opus-5-low.yaml +1 -1
  310. package/presets/fleet/brains/claude-opus-5-max.yaml +1 -1
  311. package/presets/fleet/brains/claude-opus-5-medium.yaml +1 -1
  312. package/presets/fleet/brains/claude-opus-5-xhigh.yaml +1 -1
  313. package/presets/fleet/brains/claude-sonnet-5-high.yaml +1 -1
  314. package/presets/fleet/brains/claude-sonnet-5-low.yaml +1 -1
  315. package/presets/fleet/brains/claude-sonnet-5-max.yaml +1 -1
  316. package/presets/fleet/brains/claude-sonnet-5-medium.yaml +1 -1
  317. package/presets/fleet/brains/claude-sonnet-5-xhigh.yaml +1 -1
  318. package/presets/fleet/brains/codex-gpt-5-3-codex-spark-high.yaml +1 -1
  319. package/presets/fleet/brains/codex-gpt-5-3-codex-spark-low.yaml +1 -1
  320. package/presets/fleet/brains/codex-gpt-5-3-codex-spark-medium.yaml +1 -1
  321. package/presets/fleet/brains/codex-gpt-5-3-codex-spark-xhigh.yaml +1 -1
  322. package/presets/fleet/brains/codex-gpt-5-4-high.yaml +1 -1
  323. package/presets/fleet/brains/codex-gpt-5-4-low.yaml +1 -1
  324. package/presets/fleet/brains/codex-gpt-5-4-medium.yaml +1 -1
  325. package/presets/fleet/brains/codex-gpt-5-4-mini-high.yaml +1 -1
  326. package/presets/fleet/brains/codex-gpt-5-4-mini-low.yaml +1 -1
  327. package/presets/fleet/brains/codex-gpt-5-4-mini-medium.yaml +1 -1
  328. package/presets/fleet/brains/codex-gpt-5-4-mini-xhigh.yaml +1 -1
  329. package/presets/fleet/brains/codex-gpt-5-4-xhigh.yaml +1 -1
  330. package/presets/fleet/brains/codex-gpt-5-5-high.yaml +1 -1
  331. package/presets/fleet/brains/codex-gpt-5-5-low.yaml +1 -1
  332. package/presets/fleet/brains/codex-gpt-5-5-medium.yaml +1 -1
  333. package/presets/fleet/brains/codex-gpt-5-5-xhigh.yaml +1 -1
  334. package/presets/fleet/brains/codex-gpt-5-6-luna-high.yaml +1 -1
  335. package/presets/fleet/brains/codex-gpt-5-6-luna-low.yaml +1 -1
  336. package/presets/fleet/brains/codex-gpt-5-6-luna-max.yaml +1 -1
  337. package/presets/fleet/brains/codex-gpt-5-6-luna-medium.yaml +1 -1
  338. package/presets/fleet/brains/codex-gpt-5-6-luna-xhigh.yaml +1 -1
  339. package/presets/fleet/brains/codex-gpt-5-6-sol-high.yaml +1 -1
  340. package/presets/fleet/brains/codex-gpt-5-6-sol-low.yaml +1 -1
  341. package/presets/fleet/brains/codex-gpt-5-6-sol-max.yaml +1 -1
  342. package/presets/fleet/brains/codex-gpt-5-6-sol-medium.yaml +1 -1
  343. package/presets/fleet/brains/codex-gpt-5-6-sol-ultra.yaml +1 -1
  344. package/presets/fleet/brains/codex-gpt-5-6-sol-xhigh.yaml +1 -1
  345. package/presets/fleet/brains/codex-gpt-5-6-terra-high.yaml +1 -1
  346. package/presets/fleet/brains/codex-gpt-5-6-terra-low.yaml +1 -1
  347. package/presets/fleet/brains/codex-gpt-5-6-terra-max.yaml +1 -1
  348. package/presets/fleet/brains/codex-gpt-5-6-terra-medium.yaml +1 -1
  349. package/presets/fleet/brains/codex-gpt-5-6-terra-ultra.yaml +1 -1
  350. package/presets/fleet/brains/codex-gpt-5-6-terra-xhigh.yaml +1 -1
  351. package/presets/fleet/brains/codex-gpt-6-1-sol-high.yaml +5 -0
  352. package/presets/fleet/brains/codex-gpt-6-1-sol-low.yaml +5 -0
  353. package/presets/fleet/brains/codex-gpt-6-1-sol-max.yaml +5 -0
  354. package/presets/fleet/brains/codex-gpt-6-1-sol-medium.yaml +5 -0
  355. package/presets/fleet/brains/codex-gpt-6-1-sol-ultra.yaml +5 -0
  356. package/presets/fleet/brains/codex-gpt-6-1-sol-xhigh.yaml +5 -0
  357. package/presets/fleet/brains/codex-gpt-6-astra-high.yaml +1 -1
  358. package/presets/fleet/brains/codex-gpt-6-astra-low.yaml +1 -1
  359. package/presets/fleet/brains/codex-gpt-6-astra-max.yaml +1 -1
  360. package/presets/fleet/brains/codex-gpt-6-astra-medium.yaml +1 -1
  361. package/presets/fleet/brains/codex-gpt-6-astra-ultra.yaml +1 -1
  362. package/presets/fleet/brains/codex-gpt-6-astra-xhigh.yaml +1 -1
  363. package/presets/fleet/brains/codex-gpt-6-luna-high.yaml +5 -0
  364. package/presets/fleet/brains/codex-gpt-6-luna-low.yaml +5 -0
  365. package/presets/fleet/brains/codex-gpt-6-luna-max.yaml +5 -0
  366. package/presets/fleet/brains/codex-gpt-6-luna-medium.yaml +5 -0
  367. package/presets/fleet/brains/codex-gpt-6-luna-xhigh.yaml +5 -0
  368. package/presets/fleet/brains/codex-gpt-6-sol-high.yaml +5 -0
  369. package/presets/fleet/brains/codex-gpt-6-sol-low.yaml +5 -0
  370. package/presets/fleet/brains/codex-gpt-6-sol-max.yaml +5 -0
  371. package/presets/fleet/brains/codex-gpt-6-sol-medium.yaml +5 -0
  372. package/presets/fleet/brains/codex-gpt-6-sol-ultra.yaml +5 -0
  373. package/presets/fleet/brains/codex-gpt-6-sol-xhigh.yaml +5 -0
  374. package/presets/fleet/roles/Coordinator.yaml +34 -11
  375. package/presets/fleet/roles/Engineer.yaml +40 -0
  376. package/presets/fleet/room_layouts/engineering.yaml +25 -0
  377. package/presets/fleet/room_layouts/pair.yaml +24 -0
  378. package/presets/fleet/room_layouts/single.yaml +17 -0
  379. package/presets/fleet/room_layouts/team.yaml +30 -0
  380. package/presets/fleet/room_templates/engineering.yaml +19 -0
  381. package/presets/manifest.json +2 -2
  382. package/dist/web-app/assets/index-59GF-gsZ.css +0 -1
  383. package/dist/web-app/assets/index-C0h3ALvs.js +0 -10
  384. package/dist/web-app/icons/ours-fleet-maskable.svg +0 -4
  385. package/dist/web-app/icons/ours-fleet.svg +0 -4
  386. package/dist/web-app/index.html +0 -17
  387. package/dist/web-app/manifest.webmanifest +0 -15
  388. package/dist/web-app/offline.html +0 -18
  389. package/dist/web-app/sw.js +0 -51
@@ -7,13 +7,19 @@ import { packagedPresetRoot } from './preset-bootstrap.js';
7
7
  import { listTemplates } from './rooms-tasks/templates.js';
8
8
  const WORK_KINDS = ['development', 'review', 'coordination'];
9
9
  const ROLE_WORK = {
10
- Developer: 'development', Critic: 'review',
10
+ Developer: 'development', Engineer: 'development', Critic: 'review',
11
11
  LocalCoordinator: 'coordination', Coordinator: 'coordination', FleetCoordinator: 'coordination',
12
12
  };
13
13
  const REASONING_EFFORT = {
14
14
  quick: 'low', balanced: 'medium', thorough: 'high',
15
15
  };
16
16
  const MODEL_LABELS = {
17
+ 'gpt-6.1-sol': 'GPT-6.1 Sol',
18
+ 'gpt-6-sol': 'GPT-6 Sol',
19
+ 'gpt-6-luna': 'GPT-6 Luna',
20
+ 'claude-fable-5-1': 'Claude Fable 5.1',
21
+ 'claude-opus-5-5': 'Claude Opus 5.5',
22
+ 'claude-haiku-4-5-20251001': 'Claude Haiku 4.5',
17
23
  'gpt-6-astra': 'GPT-6 Astra',
18
24
  'gpt-5.6-sol': 'GPT-5.6 Sol',
19
25
  'gpt-5.6-terra': 'GPT-5.6 Terra',
@@ -33,10 +39,10 @@ export function validateCatalog(value, path = 'supported model catalog') {
33
39
  for (const model of value.models) {
34
40
  if (!['codex', 'claude-code'].includes(model.harness) || model.session !== 'acp'
35
41
  || typeof model.model !== 'string' || !MODEL_LABELS[model.model]
36
- || !Array.isArray(model.efforts) || model.efforts.length === 0
42
+ || !Array.isArray(model.efforts)
37
43
  || new Set(model.efforts).size !== model.efforts.length
38
44
  || model.efforts.some(effort => !['low', 'medium', 'high', 'xhigh', 'max', 'ultra'].includes(effort))
39
- || !['low', 'medium', 'high'].every(effort => model.efforts.includes(effort)))
45
+ || (model.efforts.length > 0 && !['low', 'medium', 'high'].every(effort => model.efforts.includes(effort))))
40
46
  throw new Error(`unsupported model state in ${path}`);
41
47
  const tuple = `${model.harness}\0${model.session}\0${model.model}`;
42
48
  if (tuples.has(tuple))
@@ -90,7 +96,9 @@ export async function askInitQuestions(prompter, configuration) {
90
96
  return undefined;
91
97
  if (subscriptions.length === 0)
92
98
  throw new Error('Select at least one subscription.');
93
- const available = catalog().models.filter(model => subscriptions.includes(subscriptionFor(model)));
99
+ // The wizard assigns low/medium/high; no-effort models remain available as named presets.
100
+ const available = catalog().models.filter(model => subscriptions.includes(subscriptionFor(model))
101
+ && model.efforts.length > 0);
94
102
  if (!available.length)
95
103
  throw new Error('None of the selected subscriptions has a supported model.');
96
104
  prompter.note([
@@ -163,7 +171,9 @@ export function formatSetupSummary(answers, configuration) {
163
171
  ' One-agent work: one Developer',
164
172
  ' Reviewed pair: Developer + independent Critic',
165
173
  ' Team: LocalCoordinator + Developer + Critic',
174
+ ' Gated engineering: Engineer (gate pipeline) + independent Critic',
166
175
  ' FleetCoordinator: coordination model',
176
+ ' Brains: the packaged presets; each prepared agent references the preset of its chosen model',
167
177
  '',
168
178
  'After the final Yes, Fleet performs host service setup before publishing the complete configuration.',
169
179
  'A hard termination after that Yes can leave host integration or private stage/recovery evidence to inspect.',
@@ -172,6 +182,11 @@ export function formatSetupSummary(answers, configuration) {
172
182
  function preset(relative) {
173
183
  return readFileSync(join(packagedPresetRoot(), 'fleet', relative), 'utf8');
174
184
  }
185
+ /** The packaged Brain preset for a catalog model at one effort; the same naming the presets are generated with. */
186
+ export function brainPresetId(model, effort) {
187
+ return `${model.harness === 'claude-code' ? 'claude' : 'codex'}-${model.model
188
+ .replace(/^claude-/, '').replace(/\./g, '-').toLowerCase()}-${effort}`;
189
+ }
175
190
  /** Build the exact, deterministic default experience without writing to disk. */
176
191
  export function generateSetup(answers) {
177
192
  const effort = REASONING_EFFORT[answers.reasoning];
@@ -192,6 +207,7 @@ export function generateSetup(answers) {
192
207
  ' permissions: { approval: ask, filesystem: workspace, unattended: deny }',
193
208
  '',
194
209
  ].join('\n'));
210
+ const assigned = {};
195
211
  for (const work of WORK_KINDS) {
196
212
  const proposed = answers.models[work];
197
213
  if (!proposed || !answers.subscriptions.includes(subscriptionFor(proposed)))
@@ -205,14 +221,14 @@ export function generateSetup(answers) {
205
221
  throw new Error(`${work} contains tampered model capabilities`);
206
222
  if (!model.efforts.includes(effort))
207
223
  throw new Error(`${MODEL_LABELS[model.model]} does not support ${answers.reasoning} reasoning`);
208
- files.set(`brains/${work}.yaml`, [
209
- `harness: ${model.harness}`,
210
- `session: ${model.session}`,
211
- `model: ${model.model}`,
212
- `effort: ${effort}`,
213
- '',
214
- ].join('\n'));
224
+ // The chosen model is assigned by reference to its packaged Brain preset; setup defines no Brain of its own.
225
+ const id = brainPresetId(model, effort);
226
+ if (!existsSync(join(packagedPresetRoot(), 'fleet', 'brains', `${id}.yaml`)))
227
+ throw new Error(`no packaged Brain preset for ${MODEL_LABELS[model.model]} at ${effort} reasoning`);
228
+ assigned[work] = id;
215
229
  }
230
+ for (const name of readdirSync(join(packagedPresetRoot(), 'fleet', 'brains')).filter(name => name.endsWith('.yaml')).sort())
231
+ files.set(`brains/${name}`, preset(`brains/${name}`));
216
232
  if (answers.assignmentStrategy === 'one-model') {
217
233
  const tuples = new Set(WORK_KINDS.map(work => {
218
234
  const model = answers.models[work];
@@ -221,23 +237,26 @@ export function generateSetup(answers) {
221
237
  if (tuples.size !== 1)
222
238
  throw new Error('one-model assignment requires the same exact model for development, review, and coordination');
223
239
  }
224
- for (const role of ['Coordinator', 'LocalCoordinator', 'Developer', 'Critic']) {
240
+ for (const role of ['Coordinator', 'LocalCoordinator', 'Developer', 'Engineer', 'Critic']) {
225
241
  files.set(`roles/${role}.yaml`, preset(`roles/${role}.yaml`));
226
242
  if (role === 'Coordinator')
227
243
  continue;
228
244
  files.set(`agent_templates/${role}.yaml`, [
229
245
  `role: { ref: ${role} }`,
230
- `brain: { ref: ${ROLE_WORK[role]} }`,
246
+ `brain: { ref: ${assigned[ROLE_WORK[role]]} }`,
231
247
  'coordinator: FleetCoordinator',
232
- 'permissions: { approval: ask, filesystem: workspace, unattended: deny }',
248
+ // Temporary default while the product is being tested: prepared agents work without asking.
249
+ 'permissions: { approval: allow, filesystem: unrestricted, unattended: deny }',
233
250
  'monitor: { mode: fleet, interrupt: after_tool }',
234
251
  '',
235
252
  ].join('\n'));
236
253
  }
237
254
  files.set('agents/FleetCoordinator.yaml', preset('agents/FleetCoordinator.yaml')
238
- .replace('brain: { ref: claude-default }', 'brain: { ref: coordination }'));
239
- for (const name of ['single', 'pair', 'team'])
255
+ .replace('brain: { ref: claude-default }', `brain: { ref: ${assigned.coordination} }`));
256
+ for (const name of ['single', 'pair', 'team', 'engineering']) {
240
257
  files.set(`room_templates/${name}.yaml`, preset(`room_templates/${name}.yaml`));
258
+ files.set(`room_layouts/${name}.yaml`, preset(`room_layouts/${name}.yaml`));
259
+ }
241
260
  return { files, answers };
242
261
  }
243
262
  /** Run the mutation boundary only after the complete questionnaire is accepted. */
@@ -385,7 +404,7 @@ function writeStaged(stageManifest, setup) {
385
404
  replaceFileAtomically(target, contents, 0o600);
386
405
  fsyncPath(target);
387
406
  }
388
- for (const kind of ['agents', 'agent_templates', 'roles', 'brains', 'room_templates'])
407
+ for (const kind of ['agents', 'agent_templates', 'roles', 'brains', 'room_templates', 'room_layouts'])
389
408
  fsyncPath(join(stageRoot, kind));
390
409
  fsyncPath(stageRoot);
391
410
  fsyncPath(dirname(stageManifest));
@@ -394,8 +413,8 @@ function validateStaged(stageManifest) {
394
413
  const config = loadConfig(stageManifest, { yamlMode: 'strict' });
395
414
  const templates = listTemplates(config.roomTemplates ?? {});
396
415
  const names = new Set(templates.map(template => template.name));
397
- if (!['pair', 'single', 'team'].every(name => names.has(name)))
398
- throw new Error('generated setup did not resolve the default single, pair, and team experiences');
416
+ if (!['pair', 'single', 'team', 'engineering'].every(name => names.has(name)))
417
+ throw new Error('generated setup did not resolve the default single, pair, team, and engineering experiences');
399
418
  for (const template of templates)
400
419
  for (const member of template.members)
401
420
  if (!config.agentTemplates?.[member.agent_template])
@@ -1,3 +1,4 @@
1
+ import { stateRoot } from '../paths.js';
1
2
  import { realpathSync } from 'node:fs';
2
3
  import { basename, dirname, join, resolve, sep } from 'node:path';
3
4
  import { BACKENDS, ON_UNAVAILABLE, NETWORK_MODES, } from './types.js';
@@ -57,7 +58,7 @@ const SYSTEM_RO = ['/usr', '/bin', '/sbin', '/lib', '/lib64', '/etc'];
57
58
  /** Ephemeral scratch mounts. */
58
59
  const scratchTmpfs = (home) => ['/tmp', join(home, '.cache')];
59
60
  /** Home-relative sensitive paths never exposed (the blocklist's teeth). */
60
- const SENSITIVE_HOME = ['.ssh', '.aws', '.docker', '.gnupg', '.ours', 'fleet.yaml', 'fleet.d'];
61
+ const SENSITIVE_HOME = ['.ssh', '.aws', '.docker', '.gnupg', '.ours', '.ours-fleet/private-ours', '.ours-fleet/private-file-delivery', 'fleet.yaml', 'fleet.d'];
61
62
  const ISOLATION_KEYS = ['backend', 'on_unavailable', 'fs', 'network', 'allow_hosts', 'resources', 'secrets'];
62
63
  const FS_KEYS = ['read', 'write'];
63
64
  const RESOURCE_KEYS = ['cpu', 'mem', 'pids'];
@@ -168,6 +169,8 @@ export function resolveIsolation(cfg, ctx) {
168
169
  }
169
170
  for (const dir of ctx.additionalWriteDirs ?? [])
170
171
  addRw(dir);
172
+ if (ctx.subscriptionHome)
173
+ addRw(ctx.subscriptionHome);
171
174
  // The selected harness/session command may live outside the system allowlist
172
175
  // (for example Node and a bundled ACP adapter under ~/.local). The runner
173
176
  // resolves its exact executable/package closure; keep every such bind RO.
@@ -187,6 +190,8 @@ export function resolveIsolation(cfg, ctx) {
187
190
  const agentsRoot = dirname(stateDir);
188
191
  const blocklist = [
189
192
  ...SENSITIVE_HOME.map(p => join(home, p)),
193
+ join(stateRoot(), 'private-ours'),
194
+ join(stateRoot(), 'private-file-delivery'),
190
195
  agentsRoot, // sibling agents' state dirs (this agent's own is explicitly mounted)
191
196
  ];
192
197
  // ENFORCE the list, before anything builds a backend argv. Until now it was
@@ -63,6 +63,11 @@ export interface WrapContext {
63
63
  * them for itself or for its peers.
64
64
  */
65
65
  harnessSharedPaths?: string[];
66
+ /**
67
+ * The pinned subscription profile home (CLAUDE_CONFIG_DIR / CODEX_HOME), mounted
68
+ * read-write so the CLI can refresh that profile's login. Absent for the default.
69
+ */
70
+ subscriptionHome?: string;
66
71
  /** Exact launcher/interpreter/module closure required by the selected command. */
67
72
  runtimeReadPaths?: string[];
68
73
  brokerEndpoint?: string;
@@ -0,0 +1,253 @@
1
+ import { type FleetConfig, type ManagedCliWorkflowId, type ResolvedRole } from './config.js';
2
+ import type { SessionPrep } from './harness/types.js';
3
+ /** Capability-gated by the installer; see src/capabilities.ts. */
4
+ export declare const MANAGED_CONFIGURATION_FLAG = "--managed-configuration";
5
+ /** What the last launch of a role actually prepared. Lives in the role's state dir. */
6
+ export declare const MANAGED_CLI_RECORD = ".managed-cli.json";
7
+ /** Quoted path tokens were refused by Codex 0.159.0 (#231) and granted by 0.160.0. */
8
+ export declare const CODEX_QUOTED_PATH_MINIMUM = "0.160.0";
9
+ export interface ManagedCliForm {
10
+ /** Argv tokens after the pin, matched exactly. */
11
+ tokens: readonly string[];
12
+ /** `lifecycle` forms create, change or retire tasks, rooms and agents. */
13
+ effect: 'help' | 'read' | 'lifecycle';
14
+ /** Whether the command itself takes -c/--configuration, where the pin is injected. */
15
+ configuration: boolean;
16
+ }
17
+ export interface ManagedCliWorkflow {
18
+ description: string;
19
+ forms: readonly ManagedCliForm[];
20
+ /** Named so nobody reads their absence as an oversight. */
21
+ excluded: readonly string[];
22
+ }
23
+ export declare const MANAGED_CLI_WORKFLOWS: Readonly<Record<ManagedCliWorkflowId, ManagedCliWorkflow>>;
24
+ export type ManagedEntry = {
25
+ kind: 'none';
26
+ } | {
27
+ kind: 'error';
28
+ message: string;
29
+ } | {
30
+ kind: 'pinned';
31
+ configuration: string;
32
+ form: ManagedCliForm;
33
+ argv: string[];
34
+ };
35
+ /**
36
+ * Recognise the pinned entry form in `argv` (process.argv.slice(2)) and return
37
+ * the ordinary argv Commander should parse.
38
+ *
39
+ * The pin must be the first argument: that is the only position a native prefix
40
+ * rule can fix. For a command that takes `--configuration`, the pinned file is
41
+ * injected directly after the command tokens; a later, different value is
42
+ * refused by `assertPinnedConfiguration` on the PARSED option, so `-c`,
43
+ * `-cFILE`, `--configuration=FILE` and repeats need no token heuristics here.
44
+ */
45
+ export declare function parseManagedEntry(argv: readonly string[]): ManagedEntry;
46
+ /** Refuse a parsed `--configuration` that is not the pinned file. Throws a plain Error. */
47
+ export declare function assertPinnedConfiguration(pinned: string, parsed: unknown): void;
48
+ export interface ManagedCliPaths {
49
+ node: string;
50
+ cli: string;
51
+ configuration: string;
52
+ }
53
+ /** The exact tokens a rule fixes: this process's node, this installation's CLI, this configuration. */
54
+ export declare function managedCliPaths(configPath?: string, overrides?: Partial<ManagedCliPaths>): ManagedCliPaths;
55
+ /** The canonical shell spelling of one path token, or undefined when none is qualified. */
56
+ export declare function shellSpelling(token: string): string | undefined;
57
+ export declare const needsQuoting: (paths: ManagedCliPaths) => boolean;
58
+ /** The argv prefix every prepared invocation starts with. */
59
+ export declare function managedCliPrefix(paths: ManagedCliPaths): string[];
60
+ /** The same prefix as the agent must type it. Undefined when a path cannot be spelled. */
61
+ export declare function managedCliCommandPrefix(paths: ManagedCliPaths): string | undefined;
62
+ /** Codex execution rules: one `prefix_rule` per form. JSON strings are valid Starlark strings. */
63
+ export declare function renderCodexRules(paths: ManagedCliPaths, workflows: readonly ManagedCliWorkflowId[]): string;
64
+ export interface ClaudeManagedCliSettings {
65
+ permissions: {
66
+ allow: string[];
67
+ };
68
+ sandbox: {
69
+ excludedCommands: string[];
70
+ };
71
+ }
72
+ /**
73
+ * Claude needs BOTH halves: `permissions.allow` authorizes the Bash call and
74
+ * `sandbox.excludedCommands` places it outside the OS sandbox when one is
75
+ * enabled. Each form is listed bare and with ` *` because the wildcard form
76
+ * alone is not relied on to match an invocation without arguments.
77
+ */
78
+ export declare function claudeManagedCliSettings(paths: ManagedCliPaths, workflows: readonly ManagedCliWorkflowId[]): ClaudeManagedCliSettings | undefined;
79
+ /**
80
+ * Merge the fragment into Fleet's own per-role settings overlay. Entries from a
81
+ * previous launch are dropped first, so a moved node, CLI or configuration
82
+ * leaves nothing stale behind. `sandbox.enabled` is never written: whether
83
+ * Claude's OS sandbox is on stays the operator's setting.
84
+ */
85
+ export declare function mergeClaudeOverlay(base: Record<string, unknown>, fragment: ClaudeManagedCliSettings | undefined): Record<string, unknown>;
86
+ export type ManagedCliMechanism = 'codex-workspace-rules' | 'claude-session-settings';
87
+ export interface ManagedCliAnalysis {
88
+ role: string;
89
+ harness: string;
90
+ session: string;
91
+ workflows: ManagedCliWorkflowId[];
92
+ state: 'not-declared' | 'not-required' | 'unsupported' | 'supported';
93
+ mechanism?: ManagedCliMechanism;
94
+ /** Why the state is not-required or unsupported. Actionable, one per line. */
95
+ reasons: string[];
96
+ /** What the prepared policy actually grants, for disclosure. */
97
+ scope: string[];
98
+ workspace: string;
99
+ paths: ManagedCliPaths;
100
+ /** The prefix the agent types; absent unless supported. */
101
+ commandPrefix?: string;
102
+ }
103
+ export interface ManagedCliDeps {
104
+ platform?: NodeJS.Platform;
105
+ paths?: Partial<ManagedCliPaths>;
106
+ /** Codex version for the quoted-path qualification; read from the role's Codex when omitted. */
107
+ codexVersion?: string;
108
+ }
109
+ export declare function roleWorkspace(role: ResolvedRole, temp?: boolean): string;
110
+ /** Decide, without touching the filesystem, what Fleet prepares for one role. */
111
+ export declare function analyzeManagedCli(role: ResolvedRole, configPath: string | undefined, options?: ManagedCliDeps & {
112
+ temp?: boolean;
113
+ workspace?: string;
114
+ }): ManagedCliAnalysis;
115
+ export declare function codexRulesPath(workspace: string, configuration: string): string;
116
+ export type RulesAction = 'created' | 'updated' | 'unchanged' | 'removed' | 'conflict';
117
+ export interface RulesResult {
118
+ path: string;
119
+ action: RulesAction;
120
+ detail?: string;
121
+ }
122
+ /** Write this workspace's rules file and record `holder` as needing it. */
123
+ export declare function acquireCodexRules(workspace: string, paths: ManagedCliPaths, workflows: readonly ManagedCliWorkflowId[], holder: string): RulesResult;
124
+ /**
125
+ * Drop `holder` from every rules file except `keep`. A file left without a
126
+ * holder is removed when Fleet still owns it; a file other agents hold is left
127
+ * exactly as it is. This is what a launch does when the role stopped declaring
128
+ * the workflow, lost support, or moved to another workspace or configuration.
129
+ */
130
+ export declare function releaseCodexRules(holder: string, keep?: string): RulesResult[];
131
+ /**
132
+ * Bring every registered rules file of `configuration` in line with `expected`
133
+ * (path → persistent holders). Temporary holders stay while their state dir
134
+ * exists. A file nobody holds is removed if — and only if — Fleet still owns
135
+ * it; a file whose configuration no longer exists is obsolete and goes too.
136
+ */
137
+ export declare function reconcileCodexRules(configuration: string, expected: ReadonlyMap<string, readonly string[]>, write: boolean): RulesResult[];
138
+ /** Static comparison of the rules file with what this installation would generate. */
139
+ export declare function inspectCodexRules(workspace: string, paths: ManagedCliPaths, workflows: readonly ManagedCliWorkflowId[]): {
140
+ path: string;
141
+ state: 'prepared' | 'missing' | 'stale' | 'conflict';
142
+ detail: string;
143
+ };
144
+ /** Whether Codex treats the workspace as trusted, which is what loads project rules. */
145
+ export declare function codexWorkspaceTrust(workspace: string, env?: NodeJS.ProcessEnv): {
146
+ state: 'trusted' | 'untrusted' | 'unknown';
147
+ source: string;
148
+ };
149
+ export interface ClaudeSettingsInspection {
150
+ /** `unknown` when no readable source states it; Claude's default is then off. */
151
+ sandbox: 'enabled' | 'disabled' | 'unknown';
152
+ sources: string[];
153
+ /** Bash deny rules, which take precedence over Fleet's allow entries. */
154
+ bashDeny: string[];
155
+ unreadable: string[];
156
+ }
157
+ export declare function inspectClaudeSettings(workspace: string, env?: NodeJS.ProcessEnv, platform?: NodeJS.Platform): ClaudeSettingsInspection;
158
+ export interface ManagedCliRecord {
159
+ version: 1;
160
+ state: ManagedCliAnalysis['state'] | 'conflict';
161
+ mechanism?: ManagedCliMechanism;
162
+ workflows: ManagedCliWorkflowId[];
163
+ paths: ManagedCliPaths;
164
+ workspace: string;
165
+ /** Hash of everything that decides the generated policy; equal digests mean the same policy. */
166
+ digest: string;
167
+ /** When a policy with this digest was first loaded into a launch. */
168
+ preparedAt: string;
169
+ artifact?: string;
170
+ reasons: string[];
171
+ }
172
+ export declare function managedCliDigest(analysis: ManagedCliAnalysis): string;
173
+ export declare function readManagedCliRecord(stateDir: string): ManagedCliRecord | undefined;
174
+ /**
175
+ * Prepare the native policy for one launch and return the session prep to use.
176
+ * Never throws: a role whose policy cannot be prepared still launches, exactly
177
+ * as sandboxed as it was, and the reason is logged and recorded.
178
+ */
179
+ export declare function prepareManagedCliLaunch(role: ResolvedRole, options: {
180
+ stateDir: string;
181
+ runCwd: string;
182
+ configPath?: string;
183
+ temp?: boolean;
184
+ prep: SessionPrep;
185
+ log(line: string): void;
186
+ deps?: ManagedCliDeps;
187
+ now?(): Date;
188
+ }): SessionPrep;
189
+ export interface ManagedCliObservation {
190
+ /** Per form, the best completed pinned invocation recorded after the current policy was loaded. */
191
+ current: {
192
+ form: string;
193
+ effect: ManagedCliForm['effect'];
194
+ at: string;
195
+ class: string;
196
+ }[];
197
+ /** Pinned invocations that predate the current policy: history, not verification. */
198
+ historical: number;
199
+ /** Rows pinned to a configuration other than the one this policy was prepared for. */
200
+ foreign: number;
201
+ summary: string;
202
+ }
203
+ /** Read the role's audit ledger without mutating or recovering it. */
204
+ export declare function observeManagedCli(stateDir: string, record: ManagedCliRecord | undefined): ManagedCliObservation;
205
+ export interface ManagedCliRoleReport {
206
+ role: string;
207
+ harness: string;
208
+ session: string;
209
+ workflows: ManagedCliWorkflowId[];
210
+ /** Generated configuration compared with this installation. Static. */
211
+ setup: {
212
+ state: 'not-declared' | 'not-required' | 'unsupported' | 'prepared' | 'missing' | 'stale' | 'conflict' | 'generated-at-launch';
213
+ mechanism?: ManagedCliMechanism;
214
+ artifact?: string;
215
+ action?: RulesAction;
216
+ detail: string;
217
+ };
218
+ /** Whether the session that is (or was last) running loaded the current policy. */
219
+ session_policy: 'not-applicable' | 'never-launched' | 'current' | 'restart-required';
220
+ /** From the audit ledger. Never inferred from `setup`. */
221
+ observed: ManagedCliObservation;
222
+ commandPrefix?: string;
223
+ scope: string[];
224
+ warnings: string[];
225
+ }
226
+ export interface ManagedCliReport {
227
+ version: 1;
228
+ configuration: string;
229
+ node: string;
230
+ cli: string;
231
+ platform: {
232
+ os: NodeJS.Platform;
233
+ declared: boolean;
234
+ };
235
+ wrote: boolean;
236
+ roles: ManagedCliRoleReport[];
237
+ removed: RulesResult[];
238
+ disclosure: string[];
239
+ }
240
+ export declare function managedCliReport(cfg: Pick<FleetConfig, 'roles'>, configPath: string | undefined, options: ManagedCliDeps & {
241
+ write: boolean;
242
+ env?: NodeJS.ProcessEnv;
243
+ }): ManagedCliReport;
244
+ /**
245
+ * Add a workflow to an existing Agent file, and nothing else. Comments, key
246
+ * order and every other setting — permissions included — are preserved.
247
+ */
248
+ export declare function enableManagedCli(configPath: string | undefined, agent: string, workflow: ManagedCliWorkflowId): {
249
+ file: string;
250
+ changed: boolean;
251
+ };
252
+ /** The briefing section for a role, or nothing when it declares no workflow. */
253
+ export declare function managedCliBriefing(role: ResolvedRole, configPath: string | undefined, temp?: boolean): string[];