@ours.network/fleet 1.2.0-nightly.8 → 1.2.0-nightly.81

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 (429) hide show
  1. package/README.md +280 -68
  2. package/dist/account-origin.d.ts +5 -0
  3. package/dist/account-origin.js +31 -0
  4. package/dist/agent-ours/bridge.js +26 -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 +22 -0
  11. package/dist/agent-ours/mcp-endpoint.js +101 -25
  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 +27 -1
  15. package/dist/agent-ours/service.js +107 -13
  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 +34 -0
  19. package/dist/application/conversation-history.js +294 -0
  20. package/dist/application/conversation-role-observer.d.ts +62 -0
  21. package/dist/application/conversation-role-observer.js +206 -0
  22. package/dist/application/fleet-query-service.d.ts +1 -1
  23. package/dist/application/fleet-query-service.js +3 -3
  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/resource-observer.d.ts +43 -0
  30. package/dist/application/resource-observer.js +323 -0
  31. package/dist/application/role-creation-service.js +3 -2
  32. package/dist/application/role-removal-service.js +17 -3
  33. package/dist/application/role-repository.d.ts +1 -1
  34. package/dist/application/role-repository.js +30 -7
  35. package/dist/application/room-layout-definitions.d.ts +45 -0
  36. package/dist/application/room-layout-definitions.js +130 -0
  37. package/dist/application/session-control.d.ts +63 -17
  38. package/dist/application/session-control.js +221 -23
  39. package/dist/application/supervisor-ours-tools.js +5 -11
  40. package/dist/application/task-layouts.d.ts +91 -0
  41. package/dist/application/task-layouts.js +261 -0
  42. package/dist/application/task-room-service.d.ts +101 -3
  43. package/dist/application/task-room-service.js +286 -33
  44. package/dist/application/types.d.ts +2 -0
  45. package/dist/atomic-file.d.ts +34 -1
  46. package/dist/atomic-file.js +161 -18
  47. package/dist/briefing.d.ts +3 -1
  48. package/dist/briefing.js +120 -31
  49. package/dist/build-info.json +9 -4
  50. package/dist/capabilities.d.ts +9 -1
  51. package/dist/capabilities.js +13 -0
  52. package/dist/cli.js +402 -38
  53. package/dist/client-profile.d.ts +5 -17
  54. package/dist/client-profile.js +4 -127
  55. package/dist/config.d.ts +45 -0
  56. package/dist/config.js +57 -6
  57. package/dist/creation.d.ts +1 -1
  58. package/dist/creation.js +4 -4
  59. package/dist/daemon-recovery.d.ts +14 -9
  60. package/dist/daemon-recovery.js +124 -115
  61. package/dist/docs.d.ts +1 -1
  62. package/dist/docs.js +227 -19
  63. package/dist/doctor.d.ts +4 -1
  64. package/dist/doctor.js +75 -60
  65. package/dist/erased-resources.d.ts +9 -0
  66. package/dist/erased-resources.js +87 -0
  67. package/dist/file-delivery/reader.d.ts +15 -0
  68. package/dist/file-delivery/reader.js +63 -0
  69. package/dist/file-delivery/store.d.ts +15 -0
  70. package/dist/file-delivery/store.js +124 -0
  71. package/dist/file-delivery/types.d.ts +19 -0
  72. package/dist/file-delivery/types.js +1 -0
  73. package/dist/fleet-command-audit.d.ts +13 -0
  74. package/dist/fleet-command-audit.js +31 -9
  75. package/dist/harness/agent-session.d.ts +4 -0
  76. package/dist/harness/claude-code-session.js +1 -1
  77. package/dist/harness/claude-code.js +21 -11
  78. package/dist/harness/claude-runtime.d.ts +12 -0
  79. package/dist/harness/claude-runtime.js +43 -0
  80. package/dist/harness/codex-app-server-proxy.d.ts +4 -1
  81. package/dist/harness/codex-app-server-proxy.js +41 -5
  82. package/dist/harness/codex-reasoning.d.ts +5 -0
  83. package/dist/harness/codex-reasoning.js +12 -0
  84. package/dist/harness/codex-runtime.d.ts +11 -1
  85. package/dist/harness/codex-runtime.js +31 -4
  86. package/dist/harness/codex-session.js +2 -2
  87. package/dist/harness/codex.js +24 -12
  88. package/dist/init-wizard.d.ts +2 -0
  89. package/dist/init-wizard.js +38 -19
  90. package/dist/isolation/policy.js +6 -1
  91. package/dist/isolation/types.d.ts +5 -0
  92. package/dist/managed-cli.d.ts +253 -0
  93. package/dist/managed-cli.js +923 -0
  94. package/dist/managed-recovery.d.ts +13 -0
  95. package/dist/managed-recovery.js +31 -0
  96. package/dist/minimal-setup.d.ts +2 -0
  97. package/dist/minimal-setup.js +44 -0
  98. package/dist/monitor.d.ts +9 -34
  99. package/dist/monitor.js +90 -153
  100. package/dist/notifications/fleet-producer.d.ts +31 -0
  101. package/dist/notifications/fleet-producer.js +351 -0
  102. package/dist/notifications/outbox.d.ts +59 -0
  103. package/dist/notifications/outbox.js +199 -0
  104. package/dist/notifications/target-cleanup.d.ts +16 -0
  105. package/dist/notifications/target-cleanup.js +75 -0
  106. package/dist/notifications/task-producer.d.ts +20 -0
  107. package/dist/notifications/task-producer.js +100 -0
  108. package/dist/ops.d.ts +2 -0
  109. package/dist/ops.js +20 -3
  110. package/dist/owner-channel/channel.js +17 -6
  111. package/dist/owner-channel/commands.d.ts +4 -0
  112. package/dist/owner-channel/commands.js +8 -0
  113. package/dist/owner-channel/lifecycle-outbox.js +4 -3
  114. package/dist/owner-channel/ours-client.js +2 -17
  115. package/dist/paths.d.ts +5 -0
  116. package/dist/paths.js +5 -0
  117. package/dist/preset-migration.js +55 -0
  118. package/dist/process-incarnation.d.ts +23 -0
  119. package/dist/process-incarnation.js +42 -0
  120. package/dist/reminders/manager.d.ts +75 -0
  121. package/dist/reminders/manager.js +278 -0
  122. package/dist/reminders/runtime.d.ts +27 -0
  123. package/dist/reminders/runtime.js +32 -0
  124. package/dist/reminders/schedule.d.ts +37 -0
  125. package/dist/reminders/schedule.js +104 -0
  126. package/dist/reminders/store.d.ts +341 -0
  127. package/dist/reminders/store.js +762 -0
  128. package/dist/reminders/tools.d.ts +20 -0
  129. package/dist/reminders/tools.js +114 -0
  130. package/dist/resolved-plan.js +1 -0
  131. package/dist/rooms-tasks/add-member.d.ts +48 -0
  132. package/dist/rooms-tasks/add-member.js +84 -0
  133. package/dist/rooms-tasks/archived-absence.d.ts +4 -0
  134. package/dist/rooms-tasks/archived-absence.js +11 -0
  135. package/dist/rooms-tasks/cli.js +182 -5
  136. package/dist/rooms-tasks/close.d.ts +5 -2
  137. package/dist/rooms-tasks/close.js +224 -36
  138. package/dist/rooms-tasks/config.d.ts +1 -1
  139. package/dist/rooms-tasks/config.js +11 -4
  140. package/dist/rooms-tasks/cowork-adapter.d.ts +12 -5
  141. package/dist/rooms-tasks/cowork-adapter.js +15 -121
  142. package/dist/rooms-tasks/cowork-http.js +56 -6
  143. package/dist/rooms-tasks/deletion.d.ts +1 -1
  144. package/dist/rooms-tasks/deletion.js +66 -10
  145. package/dist/rooms-tasks/erasure.d.ts +6 -0
  146. package/dist/rooms-tasks/erasure.js +173 -0
  147. package/dist/rooms-tasks/external-worker.d.ts +1 -1
  148. package/dist/rooms-tasks/external-worker.js +3 -4
  149. package/dist/rooms-tasks/layout-binding-client.d.ts +11 -0
  150. package/dist/rooms-tasks/layout-binding-client.js +56 -0
  151. package/dist/rooms-tasks/layout-binding-grants.d.ts +21 -0
  152. package/dist/rooms-tasks/layout-binding-grants.js +128 -0
  153. package/dist/rooms-tasks/layout-cli.d.ts +4 -0
  154. package/dist/rooms-tasks/layout-cli.js +107 -0
  155. package/dist/rooms-tasks/layout-config.d.ts +11 -0
  156. package/dist/rooms-tasks/layout-config.js +89 -0
  157. package/dist/rooms-tasks/layout-control.d.ts +21 -0
  158. package/dist/rooms-tasks/layout-control.js +52 -0
  159. package/dist/rooms-tasks/layout-member-retirement.d.ts +10 -0
  160. package/dist/rooms-tasks/layout-member-retirement.js +90 -0
  161. package/dist/rooms-tasks/layout-service.d.ts +43 -0
  162. package/dist/rooms-tasks/layout-service.js +203 -0
  163. package/dist/rooms-tasks/layout.d.ts +121 -0
  164. package/dist/rooms-tasks/layout.js +286 -0
  165. package/dist/rooms-tasks/legacy-task-member.d.ts +19 -0
  166. package/dist/rooms-tasks/legacy-task-member.js +116 -0
  167. package/dist/rooms-tasks/live-readiness.d.ts +18 -0
  168. package/dist/rooms-tasks/live-readiness.js +85 -0
  169. package/dist/rooms-tasks/member-ownership.d.ts +5 -0
  170. package/dist/rooms-tasks/member-ownership.js +40 -0
  171. package/dist/rooms-tasks/member-startup.d.ts +1 -0
  172. package/dist/rooms-tasks/member-startup.js +2 -0
  173. package/dist/rooms-tasks/provision.d.ts +3 -0
  174. package/dist/rooms-tasks/provision.js +101 -49
  175. package/dist/rooms-tasks/recovery.d.ts +19 -0
  176. package/dist/rooms-tasks/recovery.js +110 -0
  177. package/dist/rooms-tasks/room-state.d.ts +4 -2
  178. package/dist/rooms-tasks/room-state.js +47 -8
  179. package/dist/rooms-tasks/task-review.d.ts +113 -0
  180. package/dist/rooms-tasks/task-review.js +561 -0
  181. package/dist/rooms-tasks/task-service-retirement.d.ts +11 -0
  182. package/dist/rooms-tasks/task-service-retirement.js +21 -0
  183. package/dist/rooms-tasks/task-state.d.ts +51 -5
  184. package/dist/rooms-tasks/task-state.js +358 -50
  185. package/dist/rooms-tasks/task-tools.d.ts +35 -0
  186. package/dist/rooms-tasks/task-tools.js +134 -0
  187. package/dist/rooms-tasks/types.d.ts +78 -0
  188. package/dist/rooms-tasks/workspace-artifacts.d.ts +6 -0
  189. package/dist/rooms-tasks/workspace-artifacts.js +93 -0
  190. package/dist/rooms-tasks/workspace.d.ts +35 -0
  191. package/dist/rooms-tasks/workspace.js +325 -0
  192. package/dist/runner.d.ts +33 -4
  193. package/dist/runner.js +410 -62
  194. package/dist/session/acp.d.ts +75 -2
  195. package/dist/session/acp.js +345 -82
  196. package/dist/session/arbiter.d.ts +98 -0
  197. package/dist/session/arbiter.js +272 -3
  198. package/dist/session/codex-app-server.d.ts +45 -1
  199. package/dist/session/codex-app-server.js +225 -32
  200. package/dist/session/control.d.ts +17 -3
  201. package/dist/session/control.js +219 -23
  202. package/dist/session/conversation-normalizer.d.ts +2 -1
  203. package/dist/session/conversation-normalizer.js +1 -1
  204. package/dist/session/conversation-observation.d.ts +25 -0
  205. package/dist/session/conversation-observation.js +100 -0
  206. package/dist/session/conversation-replay.d.ts +50 -0
  207. package/dist/session/conversation-replay.js +203 -0
  208. package/dist/session/conversation-store.d.ts +15 -1
  209. package/dist/session/conversation-store.js +213 -26
  210. package/dist/session/conversation-types.d.ts +57 -4
  211. package/dist/session/prompt-batch.d.ts +79 -0
  212. package/dist/session/prompt-batch.js +120 -0
  213. package/dist/session/task-notice.d.ts +14 -0
  214. package/dist/session/task-notice.js +13 -0
  215. package/dist/session/types.d.ts +42 -1
  216. package/dist/setup-tunnel-preflight.d.ts +34 -0
  217. package/dist/setup-tunnel-preflight.js +62 -0
  218. package/dist/socket-path.d.ts +2 -0
  219. package/dist/socket-path.js +22 -0
  220. package/dist/spawn.d.ts +5 -1
  221. package/dist/spawn.js +40 -4
  222. package/dist/startup-prompt.d.ts +15 -0
  223. package/dist/startup-prompt.js +71 -0
  224. package/dist/startup-readiness.d.ts +32 -0
  225. package/dist/startup-readiness.js +101 -0
  226. package/dist/startup-telemetry.d.ts +16 -0
  227. package/dist/startup-telemetry.js +46 -0
  228. package/dist/subscriptions/cli.d.ts +91 -0
  229. package/dist/subscriptions/cli.js +223 -0
  230. package/dist/subscriptions/launch.d.ts +37 -0
  231. package/dist/subscriptions/launch.js +93 -0
  232. package/dist/subscriptions/login.d.ts +77 -0
  233. package/dist/subscriptions/login.js +215 -0
  234. package/dist/subscriptions/observed.d.ts +7 -0
  235. package/dist/subscriptions/observed.js +44 -0
  236. package/dist/subscriptions/probe.d.ts +10 -0
  237. package/dist/subscriptions/probe.js +73 -0
  238. package/dist/subscriptions/service.d.ts +102 -0
  239. package/dist/subscriptions/service.js +364 -0
  240. package/dist/subscriptions/store.d.ts +71 -0
  241. package/dist/subscriptions/store.js +143 -0
  242. package/dist/supervisor/adoption.d.ts +8 -0
  243. package/dist/supervisor/adoption.js +78 -0
  244. package/dist/supervisor/catalog.d.ts +62 -0
  245. package/dist/supervisor/catalog.js +254 -0
  246. package/dist/supervisor/fleet.d.ts +8 -0
  247. package/dist/supervisor/fleet.js +89 -0
  248. package/dist/supervisor/index.js +3 -6
  249. package/dist/supervisor/launchd.d.ts +1 -1
  250. package/dist/supervisor/launchd.js +26 -13
  251. package/dist/supervisor/legacy.d.ts +35 -0
  252. package/dist/supervisor/legacy.js +524 -0
  253. package/dist/supervisor/manager.d.ts +15 -0
  254. package/dist/supervisor/manager.js +270 -0
  255. package/dist/supervisor/registration-refresh.d.ts +45 -0
  256. package/dist/supervisor/registration-refresh.js +266 -0
  257. package/dist/supervisor/scope.d.ts +4 -0
  258. package/dist/supervisor/scope.js +10 -0
  259. package/dist/supervisor/systemd.d.ts +2 -2
  260. package/dist/supervisor/systemd.js +19 -33
  261. package/dist/task-supervision.d.ts +9 -0
  262. package/dist/task-supervision.js +145 -0
  263. package/dist/temp-idle.d.ts +17 -0
  264. package/dist/temp-idle.js +42 -0
  265. package/dist/temp-lifecycle.d.ts +23 -8
  266. package/dist/temp-lifecycle.js +123 -66
  267. package/dist/temp-supervisor-recovery.d.ts +1 -1
  268. package/dist/temp-supervisor-recovery.js +2 -2
  269. package/dist/tunnel-setup-completion.d.ts +7 -0
  270. package/dist/tunnel-setup-completion.js +13 -0
  271. package/dist/tunnel-setup-input.d.ts +19 -0
  272. package/dist/tunnel-setup-input.js +130 -0
  273. package/dist/watchdog/query.d.ts +3 -1
  274. package/dist/watchdog/query.js +2 -1
  275. package/dist/web/agent-attachments.d.ts +29 -0
  276. package/dist/web/agent-attachments.js +162 -0
  277. package/dist/web/auth.d.ts +65 -2
  278. package/dist/web/auth.js +201 -11
  279. package/dist/web/available-port.d.ts +2 -0
  280. package/dist/web/available-port.js +23 -0
  281. package/dist/web/control.d.ts +3 -3
  282. package/dist/web/control.js +10 -8
  283. package/dist/web/conversation-stream-codec.d.ts +23 -0
  284. package/dist/web/conversation-stream-codec.js +110 -0
  285. package/dist/web/conversation-stream.d.ts +26 -0
  286. package/dist/web/conversation-stream.js +239 -0
  287. package/dist/web/events.d.ts +2 -0
  288. package/dist/web/events.js +9 -0
  289. package/dist/web/fleet-config-service.d.ts +7 -1
  290. package/dist/web/fleet-config-service.js +61 -16
  291. package/dist/web/prefix-gateway.d.ts +32 -0
  292. package/dist/web/prefix-gateway.js +248 -0
  293. package/dist/web/resource-views.d.ts +135 -0
  294. package/dist/web/resource-views.js +494 -0
  295. package/dist/web/runtime.d.ts +3 -1
  296. package/dist/web/runtime.js +132 -34
  297. package/dist/web/server.d.ts +19 -0
  298. package/dist/web/server.js +893 -71
  299. package/dist/web/service.d.ts +11 -2
  300. package/dist/web/service.js +30 -4
  301. package/dist/web/workspace-devices.d.ts +107 -0
  302. package/dist/web/workspace-devices.js +277 -0
  303. package/dist/web/workspace-tunnel.d.ts +1 -0
  304. package/dist/web/workspace-tunnel.js +34 -0
  305. package/dist/workspace-enrollment.d.ts +83 -0
  306. package/dist/workspace-enrollment.js +605 -0
  307. package/dist/workspace-replacement.d.ts +66 -0
  308. package/dist/workspace-replacement.js +238 -0
  309. package/docs/acp-files.md +146 -0
  310. package/docs/conversation-stream.md +216 -0
  311. package/docs/fleet-migration.md +54 -0
  312. package/docs/live-voice.md +13 -0
  313. package/docs/room-layouts.md +227 -0
  314. package/docs/self-reminders.md +374 -0
  315. package/docs/task-progress-review.md +143 -0
  316. package/docs/task-workspaces.md +225 -0
  317. package/docs/validation/managed-cli-permissions.md +421 -0
  318. package/examples/room-layouts/fresh.yaml +27 -0
  319. package/examples/room-layouts/scoped.yaml +21 -0
  320. package/examples/room-layouts/shared.yaml +19 -0
  321. package/package.json +25 -20
  322. package/presets/README.md +78 -0
  323. package/presets/brain-catalog.json +8 -2
  324. package/presets/fleet/agent_templates/Critic.yaml +1 -1
  325. package/presets/fleet/agent_templates/Developer.yaml +1 -1
  326. package/presets/fleet/agent_templates/Engineer.yaml +5 -0
  327. package/presets/fleet/agent_templates/LocalCoordinator.yaml +6 -3
  328. package/presets/fleet/agents/FleetCoordinator.yaml +1 -1
  329. package/presets/fleet/brains/claude-fable-5-1-high.yaml +5 -0
  330. package/presets/fleet/brains/claude-fable-5-1-low.yaml +5 -0
  331. package/presets/fleet/brains/claude-fable-5-1-max.yaml +5 -0
  332. package/presets/fleet/brains/claude-fable-5-1-medium.yaml +5 -0
  333. package/presets/fleet/brains/claude-fable-5-1-xhigh.yaml +5 -0
  334. package/presets/fleet/brains/claude-fable-5-high.yaml +1 -1
  335. package/presets/fleet/brains/claude-fable-5-low.yaml +1 -1
  336. package/presets/fleet/brains/claude-fable-5-max.yaml +1 -1
  337. package/presets/fleet/brains/claude-fable-5-medium.yaml +1 -1
  338. package/presets/fleet/brains/claude-fable-5-xhigh.yaml +1 -1
  339. package/presets/fleet/brains/claude-haiku-4-5-20251001-default.yaml +4 -0
  340. package/presets/fleet/brains/claude-opus-5-5-high.yaml +5 -0
  341. package/presets/fleet/brains/claude-opus-5-5-low.yaml +5 -0
  342. package/presets/fleet/brains/claude-opus-5-5-max.yaml +5 -0
  343. package/presets/fleet/brains/claude-opus-5-5-medium.yaml +5 -0
  344. package/presets/fleet/brains/claude-opus-5-5-xhigh.yaml +5 -0
  345. package/presets/fleet/brains/claude-opus-5-high.yaml +1 -1
  346. package/presets/fleet/brains/claude-opus-5-low.yaml +1 -1
  347. package/presets/fleet/brains/claude-opus-5-max.yaml +1 -1
  348. package/presets/fleet/brains/claude-opus-5-medium.yaml +1 -1
  349. package/presets/fleet/brains/claude-opus-5-xhigh.yaml +1 -1
  350. package/presets/fleet/brains/claude-sonnet-5-high.yaml +1 -1
  351. package/presets/fleet/brains/claude-sonnet-5-low.yaml +1 -1
  352. package/presets/fleet/brains/claude-sonnet-5-max.yaml +1 -1
  353. package/presets/fleet/brains/claude-sonnet-5-medium.yaml +1 -1
  354. package/presets/fleet/brains/claude-sonnet-5-xhigh.yaml +1 -1
  355. package/presets/fleet/brains/codex-gpt-5-3-codex-spark-high.yaml +1 -1
  356. package/presets/fleet/brains/codex-gpt-5-3-codex-spark-low.yaml +1 -1
  357. package/presets/fleet/brains/codex-gpt-5-3-codex-spark-medium.yaml +1 -1
  358. package/presets/fleet/brains/codex-gpt-5-3-codex-spark-xhigh.yaml +1 -1
  359. package/presets/fleet/brains/codex-gpt-5-4-high.yaml +1 -1
  360. package/presets/fleet/brains/codex-gpt-5-4-low.yaml +1 -1
  361. package/presets/fleet/brains/codex-gpt-5-4-medium.yaml +1 -1
  362. package/presets/fleet/brains/codex-gpt-5-4-mini-high.yaml +1 -1
  363. package/presets/fleet/brains/codex-gpt-5-4-mini-low.yaml +1 -1
  364. package/presets/fleet/brains/codex-gpt-5-4-mini-medium.yaml +1 -1
  365. package/presets/fleet/brains/codex-gpt-5-4-mini-xhigh.yaml +1 -1
  366. package/presets/fleet/brains/codex-gpt-5-4-xhigh.yaml +1 -1
  367. package/presets/fleet/brains/codex-gpt-5-5-high.yaml +1 -1
  368. package/presets/fleet/brains/codex-gpt-5-5-low.yaml +1 -1
  369. package/presets/fleet/brains/codex-gpt-5-5-medium.yaml +1 -1
  370. package/presets/fleet/brains/codex-gpt-5-5-xhigh.yaml +1 -1
  371. package/presets/fleet/brains/codex-gpt-5-6-luna-high.yaml +1 -1
  372. package/presets/fleet/brains/codex-gpt-5-6-luna-low.yaml +1 -1
  373. package/presets/fleet/brains/codex-gpt-5-6-luna-max.yaml +1 -1
  374. package/presets/fleet/brains/codex-gpt-5-6-luna-medium.yaml +1 -1
  375. package/presets/fleet/brains/codex-gpt-5-6-luna-xhigh.yaml +1 -1
  376. package/presets/fleet/brains/codex-gpt-5-6-sol-high.yaml +1 -1
  377. package/presets/fleet/brains/codex-gpt-5-6-sol-low.yaml +1 -1
  378. package/presets/fleet/brains/codex-gpt-5-6-sol-max.yaml +1 -1
  379. package/presets/fleet/brains/codex-gpt-5-6-sol-medium.yaml +1 -1
  380. package/presets/fleet/brains/codex-gpt-5-6-sol-ultra.yaml +1 -1
  381. package/presets/fleet/brains/codex-gpt-5-6-sol-xhigh.yaml +1 -1
  382. package/presets/fleet/brains/codex-gpt-5-6-terra-high.yaml +1 -1
  383. package/presets/fleet/brains/codex-gpt-5-6-terra-low.yaml +1 -1
  384. package/presets/fleet/brains/codex-gpt-5-6-terra-max.yaml +1 -1
  385. package/presets/fleet/brains/codex-gpt-5-6-terra-medium.yaml +1 -1
  386. package/presets/fleet/brains/codex-gpt-5-6-terra-ultra.yaml +1 -1
  387. package/presets/fleet/brains/codex-gpt-5-6-terra-xhigh.yaml +1 -1
  388. package/presets/fleet/brains/codex-gpt-6-1-sol-high.yaml +5 -0
  389. package/presets/fleet/brains/codex-gpt-6-1-sol-low.yaml +5 -0
  390. package/presets/fleet/brains/codex-gpt-6-1-sol-max.yaml +5 -0
  391. package/presets/fleet/brains/codex-gpt-6-1-sol-medium.yaml +5 -0
  392. package/presets/fleet/brains/codex-gpt-6-1-sol-ultra.yaml +5 -0
  393. package/presets/fleet/brains/codex-gpt-6-1-sol-xhigh.yaml +5 -0
  394. package/presets/fleet/brains/codex-gpt-6-astra-high.yaml +1 -1
  395. package/presets/fleet/brains/codex-gpt-6-astra-low.yaml +1 -1
  396. package/presets/fleet/brains/codex-gpt-6-astra-max.yaml +1 -1
  397. package/presets/fleet/brains/codex-gpt-6-astra-medium.yaml +1 -1
  398. package/presets/fleet/brains/codex-gpt-6-astra-ultra.yaml +1 -1
  399. package/presets/fleet/brains/codex-gpt-6-astra-xhigh.yaml +1 -1
  400. package/presets/fleet/brains/codex-gpt-6-luna-high.yaml +5 -0
  401. package/presets/fleet/brains/codex-gpt-6-luna-low.yaml +5 -0
  402. package/presets/fleet/brains/codex-gpt-6-luna-max.yaml +5 -0
  403. package/presets/fleet/brains/codex-gpt-6-luna-medium.yaml +5 -0
  404. package/presets/fleet/brains/codex-gpt-6-luna-xhigh.yaml +5 -0
  405. package/presets/fleet/brains/codex-gpt-6-sol-high.yaml +5 -0
  406. package/presets/fleet/brains/codex-gpt-6-sol-low.yaml +5 -0
  407. package/presets/fleet/brains/codex-gpt-6-sol-max.yaml +5 -0
  408. package/presets/fleet/brains/codex-gpt-6-sol-medium.yaml +5 -0
  409. package/presets/fleet/brains/codex-gpt-6-sol-ultra.yaml +5 -0
  410. package/presets/fleet/brains/codex-gpt-6-sol-xhigh.yaml +5 -0
  411. package/presets/fleet/roles/Coordinator.yaml +21 -13
  412. package/presets/fleet/roles/Critic.yaml +24 -0
  413. package/presets/fleet/roles/Developer.yaml +32 -0
  414. package/presets/fleet/roles/Engineer.yaml +72 -0
  415. package/presets/fleet/roles/LocalCoordinator.yaml +17 -0
  416. package/presets/fleet/room_layouts/engineering.yaml +25 -0
  417. package/presets/fleet/room_layouts/pair.yaml +24 -0
  418. package/presets/fleet/room_layouts/single.yaml +17 -0
  419. package/presets/fleet/room_layouts/team.yaml +30 -0
  420. package/presets/fleet/room_templates/engineering.yaml +19 -0
  421. package/presets/manifest.json +2 -2
  422. package/dist/web-app/assets/index-59GF-gsZ.css +0 -1
  423. package/dist/web-app/assets/index-C0h3ALvs.js +0 -10
  424. package/dist/web-app/icons/ours-fleet-maskable.svg +0 -4
  425. package/dist/web-app/icons/ours-fleet.svg +0 -4
  426. package/dist/web-app/index.html +0 -17
  427. package/dist/web-app/manifest.webmanifest +0 -15
  428. package/dist/web-app/offline.html +0 -18
  429. package/dist/web-app/sw.js +0 -51
@@ -0,0 +1,216 @@
1
+ # Conversation event stream (wire version 1)
2
+
3
+ Initial `conversation?latest=1&limit=200` history uses the captured command and
4
+ pending-permission inventories when the supervisor supplies a complete observation
5
+ snapshot with its revision and ledger barrier. Empty inventories are authoritative.
6
+ This avoids scanning the current generation for old context events after the
7
+ latest page is full. Legacy, failed or incomplete captures retain ledger context
8
+ recovery. Generation checks, resumed-session filtering and event cursors still apply.
9
+ The private snapshot checks also use the store's recovered/appended segment ranges
10
+ to skip healthy segments ending at or before their cursor. A retained prior
11
+ generation therefore does not require rereading its whole prefix merely because
12
+ the current-generation cursor is outside the in-memory tail. Degraded stores and
13
+ unknown or damaged ranges retain conservative reads.
14
+ Older pages can scan intervening newer ledger segments; the event count alone is
15
+ not a disk-read byte bound.
16
+
17
+ Disconnecting a latest/before HTTP history request cancels its disk tail reader
18
+ at asynchronous read boundaries and prevents further orchestration or publication.
19
+ An already admitted private-control RPC retains its existing timeout; disconnect
20
+ does not interrupt the agent or its work. Forward-history reads and passive SSE
21
+ retain their separate lifetimes.
22
+
23
+ `GET /api/v1/roles/:id/conversation/events?expectedGeneration=GENERATION&after=CURSOR`
24
+ uses the existing Fleet route boundary, including `/fleet/api/v1/...` through the
25
+ prefix gateway. Use authenticated `fetch`, then read the response body. Cookies
26
+ work for standalone and same-origin frame access; the hosted App sends its current
27
+ workspace access bearer in `Authorization`. Query parameters are data, never
28
+ credentials. `after` is a nonnegative safe integer; generation is required.
29
+ No new WebSocket path, controller lease, notification acknowledgement, work
30
+ submission, or read receipt is introduced.
31
+
32
+ ## Framing
33
+
34
+ Content type is `text/event-stream; charset=utf-8`, with `Cache-Control: no-store`
35
+ and `X-Accel-Buffering: no`. Every frame is exactly:
36
+
37
+ ```text
38
+ event: conversation
39
+ data: {"version":1,"type":"TYPE","payload":...}
40
+
41
+ ```
42
+
43
+ The six logical types are:
44
+
45
+ - `role`: complete public role replacement (`roleId`, `roleRevision`,
46
+ `roleLifetime`, `availability`, `health`, optional backend/fallback/failure).
47
+ Local state paths are omitted. This ordering is independent of session state.
48
+ - `ledger`: either a single durable conversation event, or a coverage marker
49
+ `{coveredThrough:number}`. All events covered by a marker precede it. Replay
50
+ can legitimately advance coverage without visible events. Never advance a
51
+ recovery cursor from maximum rendered event sequence alone.
52
+ - `ready`: `{sessionGeneration,stateRevision,ledgerBarrier,coveredThrough,
53
+ capability:"complete",authorizedUntil}`. The coherent initial snapshot arrives
54
+ as a preceding `state` record, keeping its full 16 MiB payload budget. Hold
55
+ initial state/replay as provisional until matching ready; validate generation,
56
+ stateRevision and ledgerBarrier against the staged state and coverage against
57
+ delivered replay. Only successful private replay certifies `coveredThrough`;
58
+ the snapshot barrier alone does not. Disconnect between state and ready must
59
+ not publish live initial state or advance the certified cursor. Reconnect with
60
+ same-generation certified coverage. State revision and event sequence differ.
61
+ - `state`: complete conversation observation replacement, including
62
+ `sessionGeneration`, `stateRevision` and `ledgerBarrier`. Do not merge it as a
63
+ patch or use its barrier as coverage.
64
+ - `resync`: `{reason,retry,capability}`. Clear partial assembly and resynchronize
65
+ explicitly or enter supported fallback. Temporary role read/watch failure is
66
+ retryable; a fresh observer can recover after repair. `retry:false` alone does
67
+ not establish permanent incapability on older servers. Explicit unsupported
68
+ capability or persistent oversize remains supported fallback without tight reconnects. `capability` is
69
+ `degraded`, except `auth-expired` below.
70
+ - `keepalive`: `{at:number}`. Transport liveness only; it cannot certify role,
71
+ session, replay, or private-control health.
72
+
73
+ A large logical payload uses `start`, ordered `chunk`, then `commit` frames,
74
+ without the `payload` field:
75
+
76
+ ```json
77
+ {"version":1,"type":"start","id":"3","recordType":"state","totalBytes":1048576,"generation":"g","revision":7}
78
+ {"version":1,"type":"chunk","id":"3","index":0,"data":"a slice of the serialized payload JSON"}
79
+ {"version":1,"type":"commit","id":"3","totalBytes":1048576,"generation":"g","revision":7}
80
+ ```
81
+
82
+ Chunks contain JSON text, **not base64**. Concatenate `data`, UTF-8 count it,
83
+ then JSON-parse only after commit. The optional generation/revision are derived
84
+ from payload sessionGeneration/stateRevision or roleRevision;
85
+ commit and reconstructed payload must match start. Reject duplicate/out-of-order
86
+ chunks, empty chunks, mismatched identities/revisions/lengths, overlapping assemblies, invalid
87
+ UTF-8, over-budget frames, and an incomplete end. Never publish partial snapshots.
88
+ `ConversationStreamDecoder` implements these framing checks without Node APIs.
89
+ It is not a domain reducer: consumers must additionally enforce current workspace,
90
+ generation and monotonic state/role revisions before applying records.
91
+
92
+ ## Limits and ownership
93
+
94
+ Encoded frames, including SSE and JSON overhead, are at most 512 KiB. Payload JSON
95
+ is at most 16 MiB; one assembly is allowed at a time. The encoder splits at safe
96
+ UTF-16 boundaries into at most 48 Ki code units, so JSON escaping still fits the
97
+ encoded-frame bound. The active logical record is streamed progressively while
98
+ waiting encoded records are capped at 8 MiB per web connection. A valid 16 MiB
99
+ ledger event is sent independently of its coverage marker so the page envelope
100
+ does not consume its logical-record budget. Oversize records explicitly degrade.
101
+ The writer waits for socket drain before writing another frame; overflow sends a
102
+ resync when writable, otherwise closes. Ledger delivery has no batching delay
103
+ (therefore no intentional wait beyond the required 50 ms); network backpressure
104
+ can delay actual receipt.
105
+
106
+ The private supervisor separately owns its 8 MiB live replay backlog and writes
107
+ 64 KiB slices under socket backpressure. The adapter bounds each raw NDJSON line
108
+ at 16 MiB plus the maximum computed serialized replay/ready/state/event envelope
109
+ (replay has an empty events array; ready omits its null placeholder; coverage uses
110
+ `Number.MAX_SAFE_INTEGER`). This admits one exact 16 MiB event;
111
+ malformed or oversized passive input closes the stream. The receiving browser
112
+ owns its 16 MiB assembly limit. A parsed record, serialized UTF-16 string, encoded
113
+ frame, and socket buffers can coexist: these are logical budgets, not an RSS cap.
114
+ Aggregate memory scales with connections, as do role watchers and private sockets.
115
+ There is no global subscriber cap. HTTP/1 browsers commonly share about six
116
+ connections per origin; multiple tabs, pane consumers and voice can exhaust that
117
+ pool. Dispose surplus consumers; HTTP/2 deployment and browser pooling vary.
118
+
119
+ Each web connection owns one role observer, including while the role is missing.
120
+ Session describe/follow borrow it. Missing/replaced roles stop the old follow;
121
+ reappearance can open another follow, still bound to the requested generation.
122
+ Abort, revocation, server shutdown and late connector completion release owners
123
+ idempotently. Pane observation does not acquire or release voice's independent
124
+ controller. Private heartbeats remain serialized every two seconds; six seconds
125
+ without one ends private health even if SSE keepalives continue.
126
+
127
+ Fleet emits browser keepalives every second. Each App pane/voice attempt independently
128
+ bounds opening through complete ready to ten seconds, regardless of incoming activity.
129
+ After ready, nonempty byte chunks (including keepalives/comments and partial records)
130
+ reset a ten-second silence deadline. Elapsed checks before activity and on browser
131
+ visibility/pageshow resume give no hidden grace; suspended code expires at its first
132
+ subsequent check. Expiry retires health and aborts the old attempt before bounded
133
+ recovery/fallback. These browser clocks do not renew or replace credential deadlines.
134
+ Comment-only/blank SSE frames are transport activity and publish no domain record.
135
+
136
+ ## Authentication, fallback and filesystem assumptions
137
+
138
+ The stream is bound to its **opening** credential deadline. Rotating access lasts
139
+ at most five minutes; it is not renewable in place. On `auth-expired`, obtain the
140
+ renewed access credential and reconnect using only same-generation certified
141
+ coverage. Count this normal auth reconnect separately from degraded operation.
142
+ Fixed credentials use their device/sunset deadline. Cookie idle expiry is checked
143
+ without updating lastSeenAt, including the exact 30-minute boundary; ordinary
144
+ requests still update activity. Absolute expiry and revocation also end streams.
145
+ The terminal resync uses `capability:"auth-expired"`, with retry `"authenticate"`
146
+ for rotating credentials or `"reauthenticate"` for cookies/fixed credentials.
147
+ Actions after expiry must reauthenticate; heartbeats cannot refresh session policy.
148
+
149
+ `conversation_live_complete` describes current intersection of healthy role
150
+ observation and private replay/heartbeat capability. It never certifies requested
151
+ history. REST remains for initial latest history, user-requested older pages,
152
+ explicit recovery, and older/unsupported/degraded server fallback. Healthy active
153
+ consumers must not periodically fetch role details or history.
154
+
155
+ Active pane and independent voice consumers recover transient transport, temporary observer or
156
+ bootstrap failures after their bounded fast attempts: one delayed attempt after 10 seconds,
157
+ then 20 seconds, then capped 30 seconds between failed settled attempts. Fallback refresh ticks
158
+ do not start probes. Retire/abort the fallback request and timer before recovery takes cursor
159
+ ownership; fence late responses without waiting indefinitely for cancellation. Resume only
160
+ same-generation certified coverage; otherwise establish a canonical latest baseline. Ordinary
161
+ REST progress and identical unsuccessful resync never reset the fast restart budget. Complete
162
+ ready ends fallback polling and resets delayed backoff. Pane generation replacement may load a
163
+ new baseline; voice generation replacement stops that session until explicit Start, without
164
+ transferring controller/provider leases. Auth-required/expired ends automatic reads/probes.
165
+
166
+
167
+ Complete role delivery relies on native directory notifications for fleet config,
168
+ role manifests and session files. Qualified native host filesystems are the
169
+ intended deployment (macOS local APFS or Linux local filesystems with functional
170
+ inotify). Watch errors, unexpected closure, unsupported watching, or invalid
171
+ current role reads withdraw completeness. Silent event loss is not detectable
172
+ without polling and is not promised away. Docker must expose the same state files
173
+ and private socket to the Fleet process, with working directory-change delivery
174
+ across the selected bind mount/volume. Docker Desktop host-to-VM mounts, network
175
+ filesystems and remote/FUSE mounts require deployment-specific notification tests;
176
+ use degraded REST fallback when those assumptions cannot be established. No ACP
177
+ library changes are required.
178
+
179
+ ## Admission receipt provenance
180
+
181
+ Prompt admission responses additionally expose optional `sessionGeneration`: the
182
+ original durable admission generation. Both backend session generations are immutable
183
+ for the admitting lifetime. Cached receipts retain that generation, and reopened command
184
+ indexes derive it from the original `prompt.admitted` event, never a replacement session.
185
+ Historical receipts without provable generation leave the field absent.
186
+
187
+ This permits an explicitly retried pre-change `{text, commandId}` browser draft to settle
188
+ only when matching receipt identity and original generation validate against its captured
189
+ current owner. Missing/old provenance keeps a visible unresolved draft and its idempotency
190
+ ID. Existing generation-bound drafts retain their original fences. `eventCursor` and causal
191
+ coverage/inventory settlement remain unchanged; provenance is not a new settlement watermark.
192
+
193
+ ## Cross-repository qualification
194
+
195
+ `test/web/fixtures/conversation-stack.ts` shares the real HTTP and private-control
196
+ stack with the legacy conversation tests and the matching App checkout's optional
197
+ `tests/fleet-live-data.integration.mjs`. ACP uses the existing child-process protocol
198
+ fixture; native Codex uses the existing app-server protocol driver. Both exercise
199
+ actual session, ledger, control adapter, HTTP framing and App decoder/reconciler/UI.
200
+ Role availability changes are controlled fixture inputs; this does not qualify native
201
+ filesystem event delivery on an arbitrary mount.
202
+
203
+ Run Fleet's full tests and typecheck after integrated changes. Retain the SSE,
204
+ workspace-auth-provenance and workspace-tunnel suites for frame/hosted authentication,
205
+ expiry/revocation, delayed-open disposal and bounded slow consumers. App reports
206
+ healthy content requests separately from bootstrap, paging, credential reconnect,
207
+ explicit recovery and unsupported-host fallback. DOM mutation and fixture latency
208
+ measurements have no claim about real-provider inference or physical-device audio.
209
+ The App and Fleet changes require coordinated upstream delivery; source qualification
210
+ does not establish that installed or serving packages contain them.
211
+
212
+ ## Full resource delivery qualification
213
+
214
+ Directory, configuration/definitions, previews, provider/status, layout and admitted-operation views share the authenticated ephemeral resource connection with per-view epochs. Complete ready requires the canonical subscribed payload; a heartbeat does not certify a failed upstream watcher. User commands remain HTTP. Controller, voice and selected-daemon health are independent owners. The selected-daemon health deadline passes its cancellation signal through the public SDK selection/request API, cancelling underlying HTTP I/O as well as retiring the result.
215
+
216
+ The matching App source qualification composes the existing ACP/Codex browser fixture and records sixty-second healthy windows separately from initial/history/recovery/command/health/lease/long-poll traffic. Unit and HTTP producer checks are not proof of every rendered resource combination or installed deployment. Preserve existing room-layout suite sources and qualify released service/dependency versions separately.
@@ -0,0 +1,54 @@
1
+ # Upgrade to one Fleet service
2
+
3
+ Permanent and task agents share one systemd user service on Linux or one
4
+ LaunchAgent on macOS. Install the package and explicitly run `ours-fleet init`;
5
+ package installation alone does not migrate services. New task/temporary launches
6
+ refuse `FLEET_SERVICE_NOT_INSTALLED` until init succeeds. Native supervision uses
7
+ the OS user's home; a custom `OURS_FLEET_HOME` is refused. Manual/isolated fleets
8
+ can use `OURS_FLEET_SUPERVISOR=none` without boot recovery.
9
+
10
+ Before init, back up Fleet configuration, private member/runtime/session state,
11
+ task/room records and native units/plists. Preserve operator readiness commands,
12
+ timeout/restart settings and environment in the common parent's explicit
13
+ systemd drop-ins (`~/.config/systemd/user/ours-fleet.service.d/`). Conflicting
14
+ per-agent settings need operator resolution. Migration does not copy scripts or
15
+ silently discard hooks. Resolve `OPERATOR_DROPIN_REQUIRED` or `UNSUPPORTED_DROPIN`,
16
+ reload the user manager, verify its effective settings, then retry.
17
+
18
+ Init preflights configured permanent agents, retires only their proven old native
19
+ services and registers them after exact old-process absence. `up NAME` migrates
20
+ only NAME. Existing identity and conversation files remain in place. On Linux,
21
+ enabled legacy roles transfer running boot intent, including enabled inactive
22
+ roles; disabled inactive roles remain untouched. macOS stopped roles stay stopped.
23
+ Interrupted transfers retain receipts; retry with the original state instead of
24
+ deleting proof or starting old and new supervisors together.
25
+
26
+ The parent starts existing agent runners. Adding a member does not restart it.
27
+ Restarting the parent affects every managed agent. Permanent agents resume their
28
+ conversation with their existing readiness/continuity prompts and may receive a
29
+ new private runtime instance after orderly release. Task agents retain their
30
+ original identity, runtime owner and conversation. Managed stop persists across
31
+ parent restart/reboot. Non-resumable temporary agents retire on parent shutdown.
32
+
33
+ ## Existing tasks
34
+
35
+ Running pre-upgrade transient task members remain untouched and report
36
+ `migration_pending`; init does not make them durable. Clean legacy shutdown or
37
+ explicit temporary stop releases/archives them. After abrupt process loss,
38
+ `ours-fleet task recover-members TASK_ID` can adopt a stopped single-room member
39
+ only with its original owner, identity, launch, workspace, conversation and room
40
+ admission intact and exact process absence proven. Missing/mismatched evidence
41
+ and unmarked legacy layouts require reconciliation. There is no automatic live
42
+ handover: let old work retire normally, or preserve and inspect its original
43
+ state before a controlled transition. Do not create replacement identities,
44
+ redeem invitations again or fabricate ownership records to force recovery.
45
+
46
+ ## Rollback
47
+
48
+ Stop the common parent and prove all managed process groups absent. Preserve an
49
+ offline backup of catalog, receipts, private state and operator drop-ins. Restore
50
+ the prior Fleet release and reviewed legacy units/plists, enabling only intended
51
+ running agents. Keep the common parent disabled while legacy supervision runs.
52
+ Re-entering central mode requires retained-proof reconciliation and old-process
53
+ absence. Physical reboot/boot ordering, real macOS launchd and live host migration
54
+ have not been qualified by the isolated process and injected native tests.
@@ -0,0 +1,13 @@
1
+ # Live voice managed-session boundary
2
+
3
+ App Live voice sends transcripts through existing ACP managed sessions and reads the actual agent conversation. Updated ACP and native Codex supervisors advertise `generation_bound_prompts`, `idle_bound_prompts` and `targeted_voice_interrupt`; `/api/v1/roles/:id/voice-capabilities` authenticates the browser and reports whether all are present.
4
+
5
+ `submit_voice_prompt` accepts `requireIdle: true`. Receipt replay precedes the idle check so retrying a lost acknowledgment does not create a second prompt or fail just because the first is running. New admission checks generation and idle/queue/tool/permission state inside the existing turn arbiter before queuing. Unrelated work is never interrupted to make room.
6
+
7
+ `interrupt_voice_v2` requires a command ID, expected session generation and exact prompt ID. A matching active prompt uses normal managed-session cancellation; a settled or different prompt is a harmless no-op. A stale generation is rejected. Receipts are idempotent and conflicting reuse of an interrupt command is rejected. The browser's `/interrupt` route selects this path only when the complete target is present, with no legacy unbound fallback.
8
+
9
+ Authenticated CSRF-protected `POST /api/v1/roles/:id/live-presence` takes `{ expectedSessionGeneration }`, validates the current generation before attaching `followConversation`, and streams NDJSON readiness/heartbeats. The HTTP connection owns one attended controller until disconnect. Close, generation change, auth expiry, slow consumer or attach failure detach it. The browser's ordinary workspace fetch supports this stream without provider credentials in a URL. Existing ACP permission expiry and controller detach grace remain in force.
10
+
11
+ The daemon/App changes and configuration instructions live in the corresponding `ours-app/docs/live-voice.md` and `ours-sdk` Live voice documentation. The daemon owns the OpenAI key and 60-second Realtime credential minting; Fleet never receives the provider key.
12
+
13
+ Coverage includes actual ACP/control-socket busy/retry/targeted-cancel tests, native Codex transport tests, authenticated presence-boundary tests and the App native browser/audio integration with separate Codex/Claude ACP protocol fixtures. Provider inference and physical-device acceptance are separate operator checks.
@@ -0,0 +1,227 @@
1
+ # YAML Room Layouts
2
+
3
+ Room Layout describes room goals, participants and their shared or independent
4
+ sessions. Rooms and agents have independent lifecycles.
5
+
6
+ Place a layout at `fleet/room_layouts/<name>.yaml` beside the split configuration
7
+ for `fleet.yaml`. Agent Templates remain in `fleet/agent_templates/`.
8
+
9
+ ```yaml
10
+ version: 1
11
+ participants:
12
+ product: {agent_template: Product}
13
+ developer: {agent_template: Developer}
14
+ qa: {agent_template: QA}
15
+ rooms:
16
+ discovery:
17
+ goal: Clarify the problem and acceptance criteria
18
+ members: [product, developer, qa]
19
+ design:
20
+ goal: Review implementation choices
21
+ members: [developer, qa]
22
+ amigos:
23
+ goal: Resolve a concrete acceptance question
24
+ members: [product, developer, qa]
25
+ roles: {product: product, developer: developer, qa: qa}
26
+ ```
27
+
28
+ Participant `instance_scope` controls instance reuse:
29
+
30
+ - `layout` (default): repeating a participant key reuses its exact running instance
31
+ and session within this layout run.
32
+ - `room`: each room using the key gets its own identity and session, lazily created
33
+ when that room opens. Repeated opens of the same active room reuse that instance.
34
+
35
+ For example, one shared process doctor and one independent critic per room:
36
+
37
+ ```yaml
38
+ version: 1
39
+ participants:
40
+ doctor: {agent_template: ProcessDoctor, instance_scope: layout}
41
+ critic: {agent_template: Critic, instance_scope: room}
42
+ rooms:
43
+ discovery:
44
+ goal: Agree on the problem
45
+ members: [doctor, critic]
46
+ design:
47
+ goal: Review the design
48
+ members: [doctor, critic]
49
+ ```
50
+
51
+ Different keys using the same Agent Template still create independent instances.
52
+ See the [shared](../examples/room-layouts/shared.yaml) and
53
+ [fresh](../examples/room-layouts/fresh.yaml) examples, and the mixed
54
+ [scoped](../examples/room-layouts/scoped.yaml) example. All choices can coexist.
55
+ Fresh agents receive their room context. Supply relevant evidence through ordinary
56
+ room messages or existing project documents when needed.
57
+
58
+ A participant without `agent_template` requires a binding. `layout instance`
59
+ returns a local exact reference (supervisor, agent, launch, CID and session).
60
+ Pass participant-to-reference YAML to `create --bindings`. A stopped or replaced instance is rejected. Cross-Fleet bindings require
61
+ an explicit owner grant, as described below.
62
+ Room-scoped participants require `agent_template`; an explicit binding for them
63
+ is rejected before creating resources. Bindings for layout-scoped participants
64
+ keep their existing behavior.
65
+
66
+ ```sh
67
+ ours-fleet layout validate work
68
+ ours-fleet layout create work --id example
69
+ ours-fleet layout open example design
70
+ ours-fleet layout open example discovery
71
+ ours-fleet layout open example amigos
72
+ ours-fleet layout close-room example amigos
73
+ ours-fleet layout status example
74
+ ours-fleet layout close example
75
+ ```
76
+
77
+ Any declared room may open first. `create` only saves the definition and resolved
78
+ Agent Templates; `open` lazily starts missing participants and admits all members
79
+ before sending their room context. The membership notification is informational. Existing room rules govern when
80
+ an agent contributes. Each room opens through an explicit command.
81
+
82
+ `close-room` archives a room and keeps agents available to other rooms. `close`
83
+ archives opened rooms and stops only temporary participants created by this layout
84
+ instance. Explicitly bound participants survive. Cleanup processes existing resources. A 3-Amigos room is an ordinary room with
85
+ complementary members.
86
+ Room-scoped instances follow the same cleanup rules: closing a room does not
87
+ retire them, and a closed room cannot reopen. A new layout run creates new instances.
88
+
89
+ Private state keeps the authorable definition unchanged. Its `participants` map
90
+ uses the original key for shared instances and `<room>:<participant>` for
91
+ room-scoped instances, with `participant` and `room` metadata. Declared but unopened
92
+ rooms have no running instance. Status and task read models distinguish these
93
+ entries and resolve their original Agent Template. Existing snapshots without
94
+ `instance_scope` retain their original keys and require no migration. Snapshots
95
+ using `room` require a Fleet version that supports this field; they are not a
96
+ downgrade format for older Fleet versions.
97
+
98
+ Supported room fields: `goal`, `members`, optional `roles`, `contract`,
99
+ `quiet_membership`, `anonymous`. `contract` is briefing text.
100
+ Top-level fields: `version: 1`, optional `description`, `participants`, `rooms`.
101
+ Participant fields: optional `agent_template`, `instance_scope: layout|room`.
102
+ Unknown fields, ambiguous YAML and invalid member references are rejected.
103
+ Existing templates and tasks keep their behavior.
104
+
105
+ Local Fleet control uses the existing authenticated control socket,
106
+ agent runtime, `spawnTemp` and session queue. Cross-Fleet bindings delegate
107
+ membership operations to their owning Fleet as described below. Private state
108
+ snapshots template definitions; public status hides their environment values.
109
+ Existing owner settings apply; owner CID/invite fingerprint are pinned. Unknown
110
+ mutation outcomes stop new work for inspection rather than blindly replaying a
111
+ spawn or room creation. `close` and `close-room` can still clean known resources.
112
+ Cleanup continues after individual errors and does not stop replacement or borrowed
113
+ instances. Confirmed stopped workers need no live control socket. An unknown
114
+ original outcome remains recorded, and cleanup reports incomplete until inspected;
115
+ it never claims that unknown resources were found or removed. Retrying cleanup
116
+ checks known resources and skips completed cleanup. Reopening an active layout room
117
+ checks its native state, CID and required seats and reports drift without repairing it.
118
+
119
+
120
+ Shared sessions retain available conversation context, not guaranteed perfect
121
+ recall or isolation between rooms. Compaction and model judgment still matter.
122
+ Rooms keep their existing turn scheduling.
123
+
124
+ Each layout instance creates distinct native room names, so several instances can
125
+ open the same declared room key. Participant roles must differ from the attached
126
+ owner role; a collision is rejected before creating resources.
127
+
128
+ Definitions are loaded for authoring commands. Retained instances use their saved
129
+ layout and Agent Templates. Status and cleanup operate on saved resources even
130
+ when the source YAML is broken or removed. New agent launches continue to use
131
+ Fleet's normal configuration and launch checks.
132
+
133
+ ## Borrowing an instance from another Fleet on the same host
134
+
135
+ Fleet A can open rooms using standalone temporary or persistent agents supervised
136
+ by Fleet B under another OS user. Both must select the same daemon instance and
137
+ Cowork gateway. An agent's original Fleet keeps its session, identity and lifecycle
138
+ control. This extends layout bindings; it does not add bindings to legacy
139
+ `room create` / RoomTemplate provisioning.
140
+
141
+ On the agent owner's Fleet B, use its existing web server and grant access to an
142
+ exact live standalone instance:
143
+
144
+ ```sh
145
+ ours-fleet web serve --port 49272 --no-open
146
+ # In another terminal belonging to Fleet B's owner:
147
+ ours-fleet layout share Architect --temporary --participant architect \
148
+ --server-url http://127.0.0.1:49272 --output ./architect.binding.yaml
149
+ ```
150
+
151
+ The command prints the grant ID and output path. It creates a binding YAML and
152
+ an adjacent `.token` file, both owner-only. The private owner record stores a
153
+ SHA-256 token digest, not the token. `share` never overwrites an existing export.
154
+ Transfer both files explicitly to Fleet A's user through your existing secure
155
+ file-transfer method, keeping the receiving credential file owned by that user
156
+ with mode `0600`. Do not share Fleet B's console session, client profile, daemon
157
+ credential, private state directory or supervisor socket. This feature creates
158
+ no additional server; Fleet B's existing web server must remain available.
159
+
160
+ Export each specialist under its logical layout participant key, then merge the
161
+ YAML mappings into one bindings document. Keep every adjacent token filename
162
+ unique. Relative credential paths resolve against the bindings file's directory.
163
+ The reusable layout contains participant factories or empty participant mappings,
164
+ never concrete credentials or running-instance references:
165
+
166
+ ```yaml
167
+ version: 1
168
+ participants:
169
+ architect: {}
170
+ developer: {}
171
+ doctor: {}
172
+ rooms:
173
+ product: {goal: Scope, members: [architect, doctor]}
174
+ design: {goal: Design, members: [architect, developer, doctor]}
175
+ delivery: {goal: Delivery, members: [developer, doctor]}
176
+ ```
177
+
178
+ On Fleet A:
179
+
180
+ ```sh
181
+ ours-fleet layout create project --id project-run --bindings ./bindings.yaml
182
+ ours-fleet layout open project-run product
183
+ ours-fleet layout open project-run design
184
+ ours-fleet layout open project-run delivery
185
+ ours-fleet layout close-room project-run product
186
+ ours-fleet layout close project-run
187
+ ```
188
+
189
+ The exact CID, launch and harness session are reused. Reopening an active room
190
+ checks existing membership without delivering duplicate context. Closing rooms
191
+ archives Cowork history and never stops borrowed instances. After acceptance,
192
+ the original Fleet B owner explicitly retires its standalone temporary specialists
193
+ using the existing lifecycle commands. Persistent specialists keep their ordinary
194
+ lifecycle. Mixed local-created and borrowed participants are supported.
195
+
196
+ An exported reference adds `remote` to the existing instance reference:
197
+
198
+ ```yaml
199
+ remote:
200
+ url: http://127.0.0.1:49272
201
+ grant_id: 11111111-1111-4111-8111-111111111111
202
+ credential_file: architect.binding.yaml.token
203
+ daemon_instance_id: 22222222-2222-4222-8222-222222222222
204
+ ```
205
+
206
+ The grant authorizes only `verify`, `join`, and `assign` for that exact instance.
207
+ Room admission validates the requested room ID and CID against shared Cowork and
208
+ uses an invite issued by Cowork on the owner side; caller-supplied contact invites
209
+ are rejected before contact mutation. Context delivery also requires its active seat, expected room CID and role in
210
+ Cowork. It cannot inspect inventory, spawn, stop, reconfigure, export identities,
211
+ or authenticate browser console routes. It grants the holder room admission and
212
+ room-context delivery, so transfer it only to the intended room creator.
213
+
214
+ Owner-side revocation does not stop the agent or remove existing memberships:
215
+
216
+ ```sh
217
+ ours-fleet layout revoke-binding <grant-id>
218
+ ```
219
+
220
+ Stopped/replaced sessions, a different daemon, revoked grants or unavailable
221
+ owner transport produce errors; no replacement is spawned. A lost response to a
222
+ membership/context mutation retains the existing layout `uncertain` marker.
223
+ Inspect the native room and owning Fleet before retrying; no mutation is blindly
224
+ replayed. Only direct loopback HTTP origins (`127.0.0.1`) are supported;
225
+ redirects, external hosts and forwarded requests are rejected. No cross-host
226
+ support, discovery protocol, mission service, or room conversation limits are
227
+ introduced.