@ours.network/fleet 1.2.0-nightly.9 → 2.0.0
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.
- package/README.md +280 -68
- package/dist/account-origin.d.ts +5 -0
- package/dist/account-origin.js +31 -0
- package/dist/agent-ours/bridge.js +26 -9
- package/dist/agent-ours/correspondence.d.ts +10 -0
- package/dist/agent-ours/correspondence.js +1 -0
- package/dist/agent-ours/file-rpc.d.ts +12 -0
- package/dist/agent-ours/file-rpc.js +18 -4
- package/dist/agent-ours/harness.js +9 -1
- package/dist/agent-ours/mcp-endpoint.d.ts +22 -0
- package/dist/agent-ours/mcp-endpoint.js +101 -25
- package/dist/agent-ours/runtime.d.ts +9 -1
- package/dist/agent-ours/runtime.js +50 -2
- package/dist/agent-ours/service.d.ts +27 -1
- package/dist/agent-ours/service.js +107 -13
- package/dist/application/codex-models.d.ts +15 -0
- package/dist/application/codex-models.js +56 -0
- package/dist/application/conversation-history.d.ts +31 -0
- package/dist/application/conversation-history.js +339 -0
- package/dist/application/conversation-role-observer.d.ts +62 -0
- package/dist/application/conversation-role-observer.js +206 -0
- package/dist/application/fleet-query-service.d.ts +1 -1
- package/dist/application/fleet-query-service.js +3 -3
- package/dist/application/log-service.js +8 -8
- package/dist/application/model-catalog.d.ts +1 -1
- package/dist/application/model-catalog.js +5 -2
- package/dist/application/preset-provenance.d.ts +19 -0
- package/dist/application/preset-provenance.js +59 -0
- package/dist/application/resource-observer.d.ts +43 -0
- package/dist/application/resource-observer.js +323 -0
- package/dist/application/role-creation-service.js +3 -2
- package/dist/application/role-removal-service.js +17 -3
- package/dist/application/role-repository.d.ts +3 -1
- package/dist/application/role-repository.js +89 -54
- package/dist/application/room-layout-definitions.d.ts +45 -0
- package/dist/application/room-layout-definitions.js +130 -0
- package/dist/application/session-control.d.ts +63 -17
- package/dist/application/session-control.js +221 -23
- package/dist/application/supervisor-ours-tools.js +5 -11
- package/dist/application/task-layouts.d.ts +91 -0
- package/dist/application/task-layouts.js +261 -0
- package/dist/application/task-room-service.d.ts +101 -3
- package/dist/application/task-room-service.js +286 -33
- package/dist/application/types.d.ts +2 -0
- package/dist/atomic-file.d.ts +34 -1
- package/dist/atomic-file.js +161 -18
- package/dist/briefing.d.ts +3 -1
- package/dist/briefing.js +120 -31
- package/dist/build-info.json +10 -5
- package/dist/capabilities.d.ts +9 -1
- package/dist/capabilities.js +13 -0
- package/dist/cli.js +391 -38
- package/dist/client-profile.d.ts +5 -17
- package/dist/client-profile.js +4 -127
- package/dist/config.d.ts +45 -0
- package/dist/config.js +57 -6
- package/dist/creation.d.ts +1 -1
- package/dist/creation.js +4 -4
- package/dist/daemon-recovery.d.ts +14 -9
- package/dist/daemon-recovery.js +124 -115
- package/dist/docs.d.ts +1 -1
- package/dist/docs.js +214 -20
- package/dist/doctor.d.ts +4 -1
- package/dist/doctor.js +75 -60
- package/dist/erased-resources.d.ts +9 -0
- package/dist/erased-resources.js +87 -0
- package/dist/file-delivery/reader.d.ts +15 -0
- package/dist/file-delivery/reader.js +63 -0
- package/dist/file-delivery/store.d.ts +15 -0
- package/dist/file-delivery/store.js +124 -0
- package/dist/file-delivery/types.d.ts +19 -0
- package/dist/file-delivery/types.js +1 -0
- package/dist/fleet-command-audit.d.ts +13 -0
- package/dist/fleet-command-audit.js +31 -9
- package/dist/harness/agent-session.d.ts +4 -0
- package/dist/harness/claude-code-session.js +1 -1
- package/dist/harness/claude-code.js +21 -11
- package/dist/harness/claude-runtime.d.ts +12 -0
- package/dist/harness/claude-runtime.js +43 -0
- package/dist/harness/codex-app-server-proxy.d.ts +4 -1
- package/dist/harness/codex-app-server-proxy.js +41 -5
- package/dist/harness/codex-reasoning.d.ts +5 -0
- package/dist/harness/codex-reasoning.js +12 -0
- package/dist/harness/codex-runtime.d.ts +11 -1
- package/dist/harness/codex-runtime.js +31 -4
- package/dist/harness/codex-session.js +2 -2
- package/dist/harness/codex.js +24 -12
- package/dist/init-wizard.d.ts +2 -0
- package/dist/init-wizard.js +38 -19
- package/dist/isolation/policy.js +6 -1
- package/dist/isolation/types.d.ts +5 -0
- package/dist/managed-cli.d.ts +253 -0
- package/dist/managed-cli.js +923 -0
- package/dist/managed-recovery.d.ts +13 -0
- package/dist/managed-recovery.js +31 -0
- package/dist/minimal-setup.d.ts +2 -0
- package/dist/minimal-setup.js +44 -0
- package/dist/monitor.d.ts +9 -34
- package/dist/monitor.js +90 -153
- package/dist/notifications/fleet-producer.d.ts +31 -0
- package/dist/notifications/fleet-producer.js +351 -0
- package/dist/notifications/outbox.d.ts +59 -0
- package/dist/notifications/outbox.js +199 -0
- package/dist/notifications/target-cleanup.d.ts +16 -0
- package/dist/notifications/target-cleanup.js +75 -0
- package/dist/notifications/task-producer.d.ts +20 -0
- package/dist/notifications/task-producer.js +100 -0
- package/dist/ops.d.ts +2 -0
- package/dist/ops.js +20 -3
- package/dist/owner-channel/channel.js +17 -6
- package/dist/owner-channel/commands.d.ts +4 -0
- package/dist/owner-channel/commands.js +8 -0
- package/dist/owner-channel/lifecycle-outbox.js +4 -3
- package/dist/owner-channel/ours-client.js +2 -17
- package/dist/paths.d.ts +5 -0
- package/dist/paths.js +5 -0
- package/dist/preset-migration.js +55 -0
- package/dist/process-incarnation.d.ts +23 -0
- package/dist/process-incarnation.js +42 -0
- package/dist/reminders/manager.d.ts +75 -0
- package/dist/reminders/manager.js +278 -0
- package/dist/reminders/runtime.d.ts +27 -0
- package/dist/reminders/runtime.js +32 -0
- package/dist/reminders/schedule.d.ts +37 -0
- package/dist/reminders/schedule.js +104 -0
- package/dist/reminders/store.d.ts +341 -0
- package/dist/reminders/store.js +762 -0
- package/dist/reminders/tools.d.ts +20 -0
- package/dist/reminders/tools.js +114 -0
- package/dist/resolved-plan.js +1 -0
- package/dist/rooms-tasks/add-member.d.ts +48 -0
- package/dist/rooms-tasks/add-member.js +84 -0
- package/dist/rooms-tasks/archived-absence.d.ts +4 -0
- package/dist/rooms-tasks/archived-absence.js +11 -0
- package/dist/rooms-tasks/cli.js +182 -5
- package/dist/rooms-tasks/close.d.ts +5 -2
- package/dist/rooms-tasks/close.js +224 -36
- package/dist/rooms-tasks/config.d.ts +1 -1
- package/dist/rooms-tasks/config.js +11 -4
- package/dist/rooms-tasks/cowork-adapter.d.ts +12 -5
- package/dist/rooms-tasks/cowork-adapter.js +15 -121
- package/dist/rooms-tasks/cowork-http.js +56 -6
- package/dist/rooms-tasks/deletion.d.ts +1 -1
- package/dist/rooms-tasks/deletion.js +66 -10
- package/dist/rooms-tasks/erasure.d.ts +6 -0
- package/dist/rooms-tasks/erasure.js +173 -0
- package/dist/rooms-tasks/external-worker.d.ts +1 -1
- package/dist/rooms-tasks/external-worker.js +3 -4
- package/dist/rooms-tasks/layout-binding-client.d.ts +11 -0
- package/dist/rooms-tasks/layout-binding-client.js +56 -0
- package/dist/rooms-tasks/layout-binding-grants.d.ts +21 -0
- package/dist/rooms-tasks/layout-binding-grants.js +128 -0
- package/dist/rooms-tasks/layout-cli.d.ts +4 -0
- package/dist/rooms-tasks/layout-cli.js +107 -0
- package/dist/rooms-tasks/layout-config.d.ts +11 -0
- package/dist/rooms-tasks/layout-config.js +89 -0
- package/dist/rooms-tasks/layout-control.d.ts +21 -0
- package/dist/rooms-tasks/layout-control.js +52 -0
- package/dist/rooms-tasks/layout-member-retirement.d.ts +10 -0
- package/dist/rooms-tasks/layout-member-retirement.js +90 -0
- package/dist/rooms-tasks/layout-service.d.ts +43 -0
- package/dist/rooms-tasks/layout-service.js +203 -0
- package/dist/rooms-tasks/layout.d.ts +121 -0
- package/dist/rooms-tasks/layout.js +286 -0
- package/dist/rooms-tasks/legacy-task-member.d.ts +19 -0
- package/dist/rooms-tasks/legacy-task-member.js +116 -0
- package/dist/rooms-tasks/live-readiness.d.ts +18 -0
- package/dist/rooms-tasks/live-readiness.js +85 -0
- package/dist/rooms-tasks/member-ownership.d.ts +5 -0
- package/dist/rooms-tasks/member-ownership.js +40 -0
- package/dist/rooms-tasks/member-startup.d.ts +1 -0
- package/dist/rooms-tasks/member-startup.js +2 -0
- package/dist/rooms-tasks/provision.d.ts +3 -0
- package/dist/rooms-tasks/provision.js +101 -49
- package/dist/rooms-tasks/recovery.d.ts +19 -0
- package/dist/rooms-tasks/recovery.js +110 -0
- package/dist/rooms-tasks/room-state.d.ts +4 -2
- package/dist/rooms-tasks/room-state.js +47 -8
- package/dist/rooms-tasks/task-review.d.ts +113 -0
- package/dist/rooms-tasks/task-review.js +561 -0
- package/dist/rooms-tasks/task-service-retirement.d.ts +11 -0
- package/dist/rooms-tasks/task-service-retirement.js +21 -0
- package/dist/rooms-tasks/task-state.d.ts +51 -5
- package/dist/rooms-tasks/task-state.js +358 -50
- package/dist/rooms-tasks/task-tools.d.ts +35 -0
- package/dist/rooms-tasks/task-tools.js +134 -0
- package/dist/rooms-tasks/types.d.ts +78 -0
- package/dist/rooms-tasks/workspace-artifacts.d.ts +6 -0
- package/dist/rooms-tasks/workspace-artifacts.js +93 -0
- package/dist/rooms-tasks/workspace.d.ts +35 -0
- package/dist/rooms-tasks/workspace.js +325 -0
- package/dist/runner.d.ts +23 -4
- package/dist/runner.js +409 -61
- package/dist/session/acp.d.ts +75 -2
- package/dist/session/acp.js +345 -82
- package/dist/session/arbiter.d.ts +98 -0
- package/dist/session/arbiter.js +272 -3
- package/dist/session/codex-app-server.d.ts +45 -1
- package/dist/session/codex-app-server.js +225 -32
- package/dist/session/control.d.ts +17 -3
- package/dist/session/control.js +219 -23
- package/dist/session/conversation-normalizer.d.ts +2 -1
- package/dist/session/conversation-normalizer.js +1 -1
- package/dist/session/conversation-observation.d.ts +25 -0
- package/dist/session/conversation-observation.js +100 -0
- package/dist/session/conversation-replay.d.ts +50 -0
- package/dist/session/conversation-replay.js +203 -0
- package/dist/session/conversation-store.d.ts +15 -1
- package/dist/session/conversation-store.js +213 -26
- package/dist/session/conversation-types.d.ts +57 -4
- package/dist/session/prompt-batch.d.ts +79 -0
- package/dist/session/prompt-batch.js +120 -0
- package/dist/session/task-notice.d.ts +14 -0
- package/dist/session/task-notice.js +13 -0
- package/dist/session/types.d.ts +42 -1
- package/dist/setup-tunnel-preflight.d.ts +34 -0
- package/dist/setup-tunnel-preflight.js +62 -0
- package/dist/socket-path.d.ts +2 -0
- package/dist/socket-path.js +22 -0
- package/dist/spawn.d.ts +5 -1
- package/dist/spawn.js +40 -4
- package/dist/startup-prompt.d.ts +15 -0
- package/dist/startup-prompt.js +71 -0
- package/dist/startup-readiness.d.ts +20 -1
- package/dist/startup-readiness.js +66 -3
- package/dist/startup-telemetry.d.ts +16 -0
- package/dist/startup-telemetry.js +46 -0
- package/dist/subscriptions/cli.d.ts +91 -0
- package/dist/subscriptions/cli.js +223 -0
- package/dist/subscriptions/launch.d.ts +37 -0
- package/dist/subscriptions/launch.js +93 -0
- package/dist/subscriptions/login.d.ts +77 -0
- package/dist/subscriptions/login.js +215 -0
- package/dist/subscriptions/observed.d.ts +7 -0
- package/dist/subscriptions/observed.js +44 -0
- package/dist/subscriptions/probe.d.ts +10 -0
- package/dist/subscriptions/probe.js +73 -0
- package/dist/subscriptions/service.d.ts +102 -0
- package/dist/subscriptions/service.js +364 -0
- package/dist/subscriptions/store.d.ts +71 -0
- package/dist/subscriptions/store.js +143 -0
- package/dist/supervisor/adoption.d.ts +8 -0
- package/dist/supervisor/adoption.js +78 -0
- package/dist/supervisor/catalog.d.ts +62 -0
- package/dist/supervisor/catalog.js +254 -0
- package/dist/supervisor/fleet.d.ts +8 -0
- package/dist/supervisor/fleet.js +89 -0
- package/dist/supervisor/index.js +3 -6
- package/dist/supervisor/launchd.d.ts +1 -1
- package/dist/supervisor/launchd.js +26 -13
- package/dist/supervisor/legacy.d.ts +35 -0
- package/dist/supervisor/legacy.js +524 -0
- package/dist/supervisor/manager.d.ts +15 -0
- package/dist/supervisor/manager.js +270 -0
- package/dist/supervisor/registration-refresh.d.ts +45 -0
- package/dist/supervisor/registration-refresh.js +266 -0
- package/dist/supervisor/scope.d.ts +4 -0
- package/dist/supervisor/scope.js +10 -0
- package/dist/supervisor/systemd.d.ts +2 -2
- package/dist/supervisor/systemd.js +18 -37
- package/dist/task-supervision.d.ts +9 -0
- package/dist/task-supervision.js +145 -0
- package/dist/temp-idle.d.ts +17 -0
- package/dist/temp-idle.js +42 -0
- package/dist/temp-lifecycle.d.ts +23 -8
- package/dist/temp-lifecycle.js +123 -66
- package/dist/temp-supervisor-recovery.d.ts +1 -1
- package/dist/temp-supervisor-recovery.js +2 -2
- package/dist/tunnel-setup-completion.d.ts +7 -0
- package/dist/tunnel-setup-completion.js +13 -0
- package/dist/tunnel-setup-input.d.ts +19 -0
- package/dist/tunnel-setup-input.js +130 -0
- package/dist/watchdog/query.d.ts +3 -1
- package/dist/watchdog/query.js +2 -1
- package/dist/web/agent-attachments.d.ts +29 -0
- package/dist/web/agent-attachments.js +162 -0
- package/dist/web/auth.d.ts +65 -2
- package/dist/web/auth.js +201 -11
- package/dist/web/available-port.d.ts +2 -0
- package/dist/web/available-port.js +23 -0
- package/dist/web/control.d.ts +3 -3
- package/dist/web/control.js +10 -8
- package/dist/web/conversation-stream-codec.d.ts +23 -0
- package/dist/web/conversation-stream-codec.js +110 -0
- package/dist/web/conversation-stream.d.ts +26 -0
- package/dist/web/conversation-stream.js +239 -0
- package/dist/web/events.d.ts +2 -0
- package/dist/web/events.js +9 -0
- package/dist/web/fleet-config-service.d.ts +7 -1
- package/dist/web/fleet-config-service.js +61 -16
- package/dist/web/prefix-gateway.d.ts +32 -0
- package/dist/web/prefix-gateway.js +248 -0
- package/dist/web/resource-views.d.ts +138 -0
- package/dist/web/resource-views.js +519 -0
- package/dist/web/runtime.d.ts +3 -1
- package/dist/web/runtime.js +132 -34
- package/dist/web/server.d.ts +19 -0
- package/dist/web/server.js +893 -71
- package/dist/web/service.d.ts +11 -2
- package/dist/web/service.js +30 -4
- package/dist/web/workspace-devices.d.ts +107 -0
- package/dist/web/workspace-devices.js +277 -0
- package/dist/web/workspace-tunnel.d.ts +1 -0
- package/dist/web/workspace-tunnel.js +34 -0
- package/dist/workspace-enrollment.d.ts +83 -0
- package/dist/workspace-enrollment.js +605 -0
- package/dist/workspace-replacement.d.ts +66 -0
- package/dist/workspace-replacement.js +238 -0
- package/docs/acp-files.md +146 -0
- package/docs/conversation-stream.md +216 -0
- package/docs/fleet-migration.md +54 -0
- package/docs/live-voice.md +13 -0
- package/docs/room-layouts.md +227 -0
- package/docs/self-reminders.md +374 -0
- package/docs/task-progress-review.md +143 -0
- package/docs/task-workspaces.md +225 -0
- package/docs/validation/managed-cli-permissions.md +421 -0
- package/examples/room-layouts/fresh.yaml +27 -0
- package/examples/room-layouts/scoped.yaml +21 -0
- package/examples/room-layouts/shared.yaml +19 -0
- package/package.json +25 -20
- package/presets/README.md +78 -0
- package/presets/brain-catalog.json +8 -2
- package/presets/fleet/agent_templates/Critic.yaml +1 -1
- package/presets/fleet/agent_templates/Developer.yaml +1 -1
- package/presets/fleet/agent_templates/Engineer.yaml +5 -0
- package/presets/fleet/agent_templates/LocalCoordinator.yaml +6 -3
- package/presets/fleet/agents/FleetCoordinator.yaml +1 -1
- package/presets/fleet/brains/claude-fable-5-1-high.yaml +5 -0
- package/presets/fleet/brains/claude-fable-5-1-low.yaml +5 -0
- package/presets/fleet/brains/claude-fable-5-1-max.yaml +5 -0
- package/presets/fleet/brains/claude-fable-5-1-medium.yaml +5 -0
- package/presets/fleet/brains/claude-fable-5-1-xhigh.yaml +5 -0
- package/presets/fleet/brains/claude-fable-5-high.yaml +1 -1
- package/presets/fleet/brains/claude-fable-5-low.yaml +1 -1
- package/presets/fleet/brains/claude-fable-5-max.yaml +1 -1
- package/presets/fleet/brains/claude-fable-5-medium.yaml +1 -1
- package/presets/fleet/brains/claude-fable-5-xhigh.yaml +1 -1
- package/presets/fleet/brains/claude-haiku-4-5-20251001-default.yaml +4 -0
- package/presets/fleet/brains/claude-opus-5-5-high.yaml +5 -0
- package/presets/fleet/brains/claude-opus-5-5-low.yaml +5 -0
- package/presets/fleet/brains/claude-opus-5-5-max.yaml +5 -0
- package/presets/fleet/brains/claude-opus-5-5-medium.yaml +5 -0
- package/presets/fleet/brains/claude-opus-5-5-xhigh.yaml +5 -0
- package/presets/fleet/brains/claude-opus-5-high.yaml +1 -1
- package/presets/fleet/brains/claude-opus-5-low.yaml +1 -1
- package/presets/fleet/brains/claude-opus-5-max.yaml +1 -1
- package/presets/fleet/brains/claude-opus-5-medium.yaml +1 -1
- package/presets/fleet/brains/claude-opus-5-xhigh.yaml +1 -1
- package/presets/fleet/brains/claude-sonnet-5-high.yaml +1 -1
- package/presets/fleet/brains/claude-sonnet-5-low.yaml +1 -1
- package/presets/fleet/brains/claude-sonnet-5-max.yaml +1 -1
- package/presets/fleet/brains/claude-sonnet-5-medium.yaml +1 -1
- package/presets/fleet/brains/claude-sonnet-5-xhigh.yaml +1 -1
- package/presets/fleet/brains/codex-gpt-5-3-codex-spark-high.yaml +1 -1
- package/presets/fleet/brains/codex-gpt-5-3-codex-spark-low.yaml +1 -1
- package/presets/fleet/brains/codex-gpt-5-3-codex-spark-medium.yaml +1 -1
- package/presets/fleet/brains/codex-gpt-5-3-codex-spark-xhigh.yaml +1 -1
- package/presets/fleet/brains/codex-gpt-5-4-high.yaml +1 -1
- package/presets/fleet/brains/codex-gpt-5-4-low.yaml +1 -1
- package/presets/fleet/brains/codex-gpt-5-4-medium.yaml +1 -1
- package/presets/fleet/brains/codex-gpt-5-4-mini-high.yaml +1 -1
- package/presets/fleet/brains/codex-gpt-5-4-mini-low.yaml +1 -1
- package/presets/fleet/brains/codex-gpt-5-4-mini-medium.yaml +1 -1
- package/presets/fleet/brains/codex-gpt-5-4-mini-xhigh.yaml +1 -1
- package/presets/fleet/brains/codex-gpt-5-4-xhigh.yaml +1 -1
- package/presets/fleet/brains/codex-gpt-5-5-high.yaml +1 -1
- package/presets/fleet/brains/codex-gpt-5-5-low.yaml +1 -1
- package/presets/fleet/brains/codex-gpt-5-5-medium.yaml +1 -1
- package/presets/fleet/brains/codex-gpt-5-5-xhigh.yaml +1 -1
- package/presets/fleet/brains/codex-gpt-5-6-luna-high.yaml +1 -1
- package/presets/fleet/brains/codex-gpt-5-6-luna-low.yaml +1 -1
- package/presets/fleet/brains/codex-gpt-5-6-luna-max.yaml +1 -1
- package/presets/fleet/brains/codex-gpt-5-6-luna-medium.yaml +1 -1
- package/presets/fleet/brains/codex-gpt-5-6-luna-xhigh.yaml +1 -1
- package/presets/fleet/brains/codex-gpt-5-6-sol-high.yaml +1 -1
- package/presets/fleet/brains/codex-gpt-5-6-sol-low.yaml +1 -1
- package/presets/fleet/brains/codex-gpt-5-6-sol-max.yaml +1 -1
- package/presets/fleet/brains/codex-gpt-5-6-sol-medium.yaml +1 -1
- package/presets/fleet/brains/codex-gpt-5-6-sol-ultra.yaml +1 -1
- package/presets/fleet/brains/codex-gpt-5-6-sol-xhigh.yaml +1 -1
- package/presets/fleet/brains/codex-gpt-5-6-terra-high.yaml +1 -1
- package/presets/fleet/brains/codex-gpt-5-6-terra-low.yaml +1 -1
- package/presets/fleet/brains/codex-gpt-5-6-terra-max.yaml +1 -1
- package/presets/fleet/brains/codex-gpt-5-6-terra-medium.yaml +1 -1
- package/presets/fleet/brains/codex-gpt-5-6-terra-ultra.yaml +1 -1
- package/presets/fleet/brains/codex-gpt-5-6-terra-xhigh.yaml +1 -1
- package/presets/fleet/brains/codex-gpt-6-1-sol-high.yaml +5 -0
- package/presets/fleet/brains/codex-gpt-6-1-sol-low.yaml +5 -0
- package/presets/fleet/brains/codex-gpt-6-1-sol-max.yaml +5 -0
- package/presets/fleet/brains/codex-gpt-6-1-sol-medium.yaml +5 -0
- package/presets/fleet/brains/codex-gpt-6-1-sol-ultra.yaml +5 -0
- package/presets/fleet/brains/codex-gpt-6-1-sol-xhigh.yaml +5 -0
- package/presets/fleet/brains/codex-gpt-6-astra-high.yaml +1 -1
- package/presets/fleet/brains/codex-gpt-6-astra-low.yaml +1 -1
- package/presets/fleet/brains/codex-gpt-6-astra-max.yaml +1 -1
- package/presets/fleet/brains/codex-gpt-6-astra-medium.yaml +1 -1
- package/presets/fleet/brains/codex-gpt-6-astra-ultra.yaml +1 -1
- package/presets/fleet/brains/codex-gpt-6-astra-xhigh.yaml +1 -1
- package/presets/fleet/brains/codex-gpt-6-luna-high.yaml +5 -0
- package/presets/fleet/brains/codex-gpt-6-luna-low.yaml +5 -0
- package/presets/fleet/brains/codex-gpt-6-luna-max.yaml +5 -0
- package/presets/fleet/brains/codex-gpt-6-luna-medium.yaml +5 -0
- package/presets/fleet/brains/codex-gpt-6-luna-xhigh.yaml +5 -0
- package/presets/fleet/brains/codex-gpt-6-sol-high.yaml +5 -0
- package/presets/fleet/brains/codex-gpt-6-sol-low.yaml +5 -0
- package/presets/fleet/brains/codex-gpt-6-sol-max.yaml +5 -0
- package/presets/fleet/brains/codex-gpt-6-sol-medium.yaml +5 -0
- package/presets/fleet/brains/codex-gpt-6-sol-ultra.yaml +5 -0
- package/presets/fleet/brains/codex-gpt-6-sol-xhigh.yaml +5 -0
- package/presets/fleet/roles/Coordinator.yaml +21 -13
- package/presets/fleet/roles/Critic.yaml +24 -0
- package/presets/fleet/roles/Developer.yaml +32 -0
- package/presets/fleet/roles/Engineer.yaml +72 -0
- package/presets/fleet/roles/LocalCoordinator.yaml +17 -0
- package/presets/fleet/room_layouts/engineering.yaml +25 -0
- package/presets/fleet/room_layouts/pair.yaml +24 -0
- package/presets/fleet/room_layouts/single.yaml +17 -0
- package/presets/fleet/room_layouts/team.yaml +30 -0
- package/presets/fleet/room_templates/engineering.yaml +19 -0
- package/presets/manifest.json +2 -2
- package/dist/web-app/assets/index-59GF-gsZ.css +0 -1
- package/dist/web-app/assets/index-C0h3ALvs.js +0 -10
- package/dist/web-app/icons/ours-fleet-maskable.svg +0 -4
- package/dist/web-app/icons/ours-fleet.svg +0 -4
- package/dist/web-app/index.html +0 -17
- package/dist/web-app/manifest.webmanifest +0 -15
- package/dist/web-app/offline.html +0 -18
- package/dist/web-app/sw.js +0 -51
package/dist/web/runtime.js
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ConversationRoleObserver } from '../application/conversation-role-observer.js';
|
|
2
|
+
import { replaceFileAtomically } from '../atomic-file.js';
|
|
3
|
+
import { validateAccountOrigin } from '../account-origin.js';
|
|
4
|
+
import { startWorkspaceTunnel } from './workspace-tunnel.js';
|
|
5
|
+
import { createPrefixGateway } from './prefix-gateway.js';
|
|
6
|
+
import { readClientProfile } from '../client-profile.js';
|
|
7
|
+
import { readPrivateFile } from '@ours.network/sdk/connector';
|
|
8
|
+
import { LayoutBindingGrants } from '../rooms-tasks/layout-binding-grants.js';
|
|
9
|
+
import { RoomLayoutService } from '../rooms-tasks/layout-service.js';
|
|
10
|
+
import { FleetNotificationProducer } from '../notifications/fleet-producer.js';
|
|
11
|
+
import { producerConfig } from '../notifications/outbox.js';
|
|
12
|
+
import { SubscriptionService } from '../subscriptions/service.js';
|
|
13
|
+
import { createCodexModelDiscovery } from '../application/codex-models.js';
|
|
14
|
+
import { existsSync, mkdirSync, realpathSync, readFileSync } from 'node:fs';
|
|
3
15
|
import { resolve } from 'node:path';
|
|
4
16
|
import { loadConfig } from '../config.js';
|
|
5
17
|
import { RoleRepository } from '../application/role-repository.js';
|
|
@@ -13,7 +25,8 @@ import { FleetError } from '../application/errors.js';
|
|
|
13
25
|
import { controlRequest, controlSocketPath } from '../session/control.js';
|
|
14
26
|
import { pickBackend } from '../supervisor/index.js';
|
|
15
27
|
import { realExec } from '../exec.js';
|
|
16
|
-
import { home, stateRoot } from '../paths.js';
|
|
28
|
+
import { home, stateRoot, agentsRoot, tmpRoot, logsRoot } from '../paths.js';
|
|
29
|
+
import { executeInitAnswers, publishSetup } from '../init-wizard.js';
|
|
17
30
|
import { AuditSink } from './audit.js';
|
|
18
31
|
import { FleetEventBus } from './events.js';
|
|
19
32
|
import { buildWebServer } from './server.js';
|
|
@@ -21,8 +34,11 @@ import { FleetConfigService } from './fleet-config-service.js';
|
|
|
21
34
|
import { mergeTopology } from './topology-model.js';
|
|
22
35
|
import { TopologyDraftStore } from './topology-draft-store.js';
|
|
23
36
|
import { TopologyPromoteService } from './topology-promote.js';
|
|
37
|
+
import { RoomLayoutDefinitions } from '../application/room-layout-definitions.js';
|
|
38
|
+
import { PresetProvenance } from '../application/preset-provenance.js';
|
|
24
39
|
import { doctor } from '../doctor.js';
|
|
25
40
|
import { acquireWebServerLock } from './lock.js';
|
|
41
|
+
import { WorkspaceDeviceStore } from './workspace-devices.js';
|
|
26
42
|
import { TrustedDeviceStore } from './device-store.js';
|
|
27
43
|
import { WebAuth } from './auth.js';
|
|
28
44
|
import { startWebControlServer } from './control.js';
|
|
@@ -39,27 +55,40 @@ const CONFIG_CACHE_TTL_MS = 5_000;
|
|
|
39
55
|
*/
|
|
40
56
|
function cachedConfigProvider(configPath) {
|
|
41
57
|
let cached;
|
|
42
|
-
|
|
58
|
+
const read = () => {
|
|
43
59
|
const now = Date.now();
|
|
44
60
|
if (!cached || now - cached.at >= CONFIG_CACHE_TTL_MS)
|
|
45
61
|
cached = { at: now, cfg: loadConfig(configPath) };
|
|
46
62
|
return cached.cfg;
|
|
47
63
|
};
|
|
64
|
+
return Object.assign(read, { invalidate: () => { cached = undefined; } });
|
|
48
65
|
}
|
|
49
66
|
export async function startWebConsole(options) {
|
|
50
|
-
const
|
|
67
|
+
const notificationConfig = producerConfig(process.env, undefined, options.log);
|
|
68
|
+
let requestedPort = options.port ?? 49_271;
|
|
51
69
|
if (!Number.isInteger(requestedPort) || requestedPort < 0 || requestedPort > 65_535)
|
|
52
70
|
throw new FleetError('invalid_request', 'port must be between 0 and 65535');
|
|
53
|
-
const
|
|
54
|
-
const
|
|
71
|
+
const webDir = options.webStateDir ?? resolve(stateRoot(), 'web');
|
|
72
|
+
const lock = acquireWebServerLock(webDir);
|
|
55
73
|
const bind = options.bind ?? '127.0.0.1';
|
|
56
74
|
const publicOrigin = options.publicOrigin ? validatePublicOrigin(options.publicOrigin) : undefined;
|
|
75
|
+
const workspaceGateway = Boolean(publicOrigin && existsSync(resolve(stateRoot(), 'workspace', 'binding.json')));
|
|
57
76
|
if (!isLoopback(bind) && !publicOrigin) {
|
|
58
77
|
lock.release();
|
|
59
78
|
throw new FleetError('forbidden', 'a non-loopback bind requires an explicit --public-origin');
|
|
60
79
|
}
|
|
61
80
|
const access = options.access ?? new WebAccessStore(webDir).read();
|
|
62
|
-
const
|
|
81
|
+
const bindingFile = resolve(stateRoot(), 'workspace', 'binding.json');
|
|
82
|
+
let appOrigin;
|
|
83
|
+
try {
|
|
84
|
+
if (existsSync(bindingFile))
|
|
85
|
+
appOrigin = validateAccountOrigin(JSON.parse(readFileSync(bindingFile, 'utf8')).appOrigin);
|
|
86
|
+
}
|
|
87
|
+
catch (error) {
|
|
88
|
+
lock.release();
|
|
89
|
+
throw error;
|
|
90
|
+
}
|
|
91
|
+
const auth = new WebAuth(publicOrigin?.origin ?? `http://127.0.0.1:${requestedPort}`, publicOrigin?.host ?? `127.0.0.1:${requestedPort}`, Date.now, new TrustedDeviceStore(webDir), access, new WorkspaceDeviceStore(webDir), appOrigin);
|
|
63
92
|
const backend = pickBackend();
|
|
64
93
|
const repository = new RoleRepository({
|
|
65
94
|
configPath: options.configPath,
|
|
@@ -83,6 +112,13 @@ export async function startWebConsole(options) {
|
|
|
83
112
|
},
|
|
84
113
|
});
|
|
85
114
|
const events = new FleetEventBus();
|
|
115
|
+
const roleMutations = new Set();
|
|
116
|
+
const signalRoleMutation = () => { for (const listener of roleMutations)
|
|
117
|
+
listener(); };
|
|
118
|
+
const observeRole = (roleId, listener) => new ConversationRoleObserver({
|
|
119
|
+
roleId, configPath: options.configPath,
|
|
120
|
+
subscribeMutations: changed => { roleMutations.add(changed); return () => { roleMutations.delete(changed); }; },
|
|
121
|
+
}, listener);
|
|
86
122
|
const audit = new AuditSink();
|
|
87
123
|
const watchdogConfigProvider = cachedConfigProvider(options.configPath);
|
|
88
124
|
const log = options.log ?? (() => { });
|
|
@@ -122,6 +158,7 @@ export async function startWebConsole(options) {
|
|
|
122
158
|
? 'ready' : detail?.status.overall === 'attention' ? 'attention' : 'unknown';
|
|
123
159
|
},
|
|
124
160
|
onProgress: action => {
|
|
161
|
+
signalRoleMutation();
|
|
125
162
|
events.publish('creation.changed', action, action.roleId);
|
|
126
163
|
void audit.record({
|
|
127
164
|
roleId: action.roleId, action: `creation.${action.state}`,
|
|
@@ -137,6 +174,7 @@ export async function startWebConsole(options) {
|
|
|
137
174
|
repository, ops, configPath: options.configPath,
|
|
138
175
|
status: async (roleId) => (await query.detail(roleId)).status,
|
|
139
176
|
onProgress: receipt => {
|
|
177
|
+
signalRoleMutation();
|
|
140
178
|
events.publish('action.changed', receipt, receipt.roleId);
|
|
141
179
|
void audit.record({
|
|
142
180
|
roleId: receipt.roleId, action: `lifecycle.${receipt.action}`,
|
|
@@ -158,9 +196,32 @@ export async function startWebConsole(options) {
|
|
|
158
196
|
let server;
|
|
159
197
|
try {
|
|
160
198
|
server = await buildWebServer({
|
|
161
|
-
query, repository, logs, commands, creation, removal, audit, events, watchdogs, configuration,
|
|
162
|
-
|
|
199
|
+
query, repository, logs, commands, creation, removal, audit, events, watchdogs, configuration, observeRole,
|
|
200
|
+
resourceScope: { configPath: configuration.path, subscribeMutations: listener => events.subscribeResources(listener) },
|
|
201
|
+
invalidateResourceCaches: () => { watchdogConfigProvider.invalidate(); watchdogFindings.invalidate(); },
|
|
202
|
+
taskRooms: new TaskRoomApplicationService(options.configPath, { binPath: () => options.binPath }),
|
|
203
|
+
roomLayouts: new RoomLayoutDefinitions(options.configPath),
|
|
204
|
+
layoutBindings: new LayoutBindingGrants(new RoomLayoutService(options.configPath).supervisor()),
|
|
205
|
+
presetProvenance: new PresetProvenance(options.configPath),
|
|
163
206
|
topology: readTopology, topologyDrafts, topologyPromote,
|
|
207
|
+
// Same boundary as `ours-fleet init --settings`: existing files are preserved, missing defaults are added.
|
|
208
|
+
onboardingSetup: async (answers) => {
|
|
209
|
+
await executeInitAnswers(answers, configuration.path, {
|
|
210
|
+
async hostSetup() {
|
|
211
|
+
for (const directory of [agentsRoot(), tmpRoot(), logsRoot()])
|
|
212
|
+
mkdirSync(directory, { recursive: true });
|
|
213
|
+
await pickBackend().init(options.binPath);
|
|
214
|
+
},
|
|
215
|
+
publish: publishSetup,
|
|
216
|
+
});
|
|
217
|
+
},
|
|
218
|
+
codexModels: createCodexModelDiscovery(),
|
|
219
|
+
subscriptions: new SubscriptionService({
|
|
220
|
+
agents: async () => (await query.list(true)).map(({ role, status }) => ({
|
|
221
|
+
roleId: role.id, stateDir: repository.stateDir(role), running: status.supervisor.liveness === 'running',
|
|
222
|
+
})),
|
|
223
|
+
onChange: () => events.publish('subscription.changed', {}),
|
|
224
|
+
}),
|
|
164
225
|
async session(roleId) {
|
|
165
226
|
const role = await repository.get(roleId);
|
|
166
227
|
if (!role)
|
|
@@ -170,7 +231,7 @@ export async function startWebConsole(options) {
|
|
|
170
231
|
const dir = repository.stateDir(role);
|
|
171
232
|
if (!dir)
|
|
172
233
|
throw new FleetError('control_unavailable', 'role state directory is unavailable');
|
|
173
|
-
return new RoleSessionControlAdapter(dir);
|
|
234
|
+
return new RoleSessionControlAdapter(dir, undefined, undefined, listener => observeRole(roleId, listener));
|
|
174
235
|
}
|
|
175
236
|
throw new FleetError('capability_unavailable', 'role session backend is unavailable');
|
|
176
237
|
},
|
|
@@ -182,7 +243,7 @@ export async function startWebConsole(options) {
|
|
|
182
243
|
}
|
|
183
244
|
let address;
|
|
184
245
|
try {
|
|
185
|
-
address = await server.app.listen({ host: bind, port: requestedPort });
|
|
246
|
+
address = await server.app.listen({ host: workspaceGateway ? '127.0.0.1' : bind, port: workspaceGateway ? 0 : requestedPort });
|
|
186
247
|
}
|
|
187
248
|
catch (error) {
|
|
188
249
|
await server.close();
|
|
@@ -193,39 +254,84 @@ export async function startWebConsole(options) {
|
|
|
193
254
|
const localHost = `127.0.0.1:${actual.port}`;
|
|
194
255
|
const browserOrigin = publicOrigin?.origin ?? `http://${localHost}`;
|
|
195
256
|
const browserHost = publicOrigin?.host ?? localHost;
|
|
257
|
+
let gateway;
|
|
258
|
+
if (workspaceGateway)
|
|
259
|
+
try {
|
|
260
|
+
const profile = readClientProfile(), provider = new URL(profile.serverUrl), credential = readPrivateFile(profile.credentialPath, 4096).toString('utf8').trim();
|
|
261
|
+
const basePath = provider.pathname.replace(/\/$/, '');
|
|
262
|
+
const services = ['daemon', 'cowork', 'messenger', 'notifications'].map(name => ({ prefix: '/' + name, origin: provider.origin, upstreamPrefix: basePath + '/' + name, stripBrowserContext: true, headers: { 'X-Ours-Api-Token': credential, ...(name === 'messenger' ? { Origin: provider.origin, 'X-Ours-Messenger-CSRF': '1' } : name === 'cowork' ? { Origin: provider.origin } : {}) },
|
|
263
|
+
// The App reports a visible page to the notification service, so an open app is not sent a push.
|
|
264
|
+
...(name === 'notifications' ? { deviceSocketPaths: ['/api/v1/presence'] } : {}) }));
|
|
265
|
+
gateway = createPrefixGateway({ auth: server.auth, fleetOrigin: address, services, audit });
|
|
266
|
+
const listen = (port) => new Promise((resolve, reject) => { gateway.server.once('error', reject); gateway.server.listen(port, bind, () => { gateway.server.off('error', reject); resolve(); }); });
|
|
267
|
+
try {
|
|
268
|
+
await listen(requestedPort);
|
|
269
|
+
}
|
|
270
|
+
catch (error) {
|
|
271
|
+
const selection = resolve(webDir, 'port-selection.json');
|
|
272
|
+
if (error.code !== 'EADDRINUSE' || !existsSync(selection) || JSON.parse(readPrivateFile(selection, 4096).toString()).expiresAt <= Date.now())
|
|
273
|
+
throw error;
|
|
274
|
+
await listen(0);
|
|
275
|
+
}
|
|
276
|
+
const bound = gateway.server.address();
|
|
277
|
+
if (!bound || typeof bound === 'string')
|
|
278
|
+
throw Error('Workspace listener did not bind');
|
|
279
|
+
requestedPort = bound.port;
|
|
280
|
+
replaceFileAtomically(resolve(webDir, 'workspace-port.json'), JSON.stringify({ port: requestedPort }) + '\n', 0o600);
|
|
281
|
+
}
|
|
282
|
+
catch (error) {
|
|
283
|
+
await gateway?.close().catch(() => { });
|
|
284
|
+
await server.close();
|
|
285
|
+
lock.release();
|
|
286
|
+
throw error;
|
|
287
|
+
}
|
|
196
288
|
server.auth.setBoundary(browserOrigin, browserHost, publicOrigin ? {
|
|
197
289
|
// nginx's safe default uses the loopback upstream as Host. The declared
|
|
198
290
|
// browser Origin remains mandatory for auth/mutations and WebSocket hello,
|
|
199
291
|
// so operators do not need a fragile Host-rewrite incantation.
|
|
200
|
-
hosts: [localHost, `localhost:${actual.port}`],
|
|
292
|
+
hosts: [localHost, `localhost:${actual.port}`, ...(workspaceGateway ? [`127.0.0.1:${requestedPort}`, `localhost:${requestedPort}`] : [])],
|
|
201
293
|
} : {
|
|
202
294
|
hosts: [`localhost:${actual.port}`], origins: [`http://localhost:${actual.port}`],
|
|
203
295
|
});
|
|
204
296
|
let control;
|
|
205
297
|
try {
|
|
206
|
-
control
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
},
|
|
213
|
-
onRevokeAll() { server.auth.revokeAllTrustedDevices(); },
|
|
214
|
-
});
|
|
298
|
+
if (options.control !== false)
|
|
299
|
+
control = await startWebControlServer({
|
|
300
|
+
dir: webDir,
|
|
301
|
+
onLinkDevice() { return { version: 1, origin: browserOrigin, ...server.auth.workspaceEnrollment() }; },
|
|
302
|
+
onRevokeAll() { server.auth.revokeAllTrustedDevices(); },
|
|
303
|
+
});
|
|
215
304
|
}
|
|
216
305
|
catch (error) {
|
|
306
|
+
await gateway?.close();
|
|
217
307
|
await server.close();
|
|
218
308
|
lock.release();
|
|
219
309
|
throw error;
|
|
220
310
|
}
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
311
|
+
let stopTunnel;
|
|
312
|
+
try {
|
|
313
|
+
stopTunnel = startWorkspaceTunnel(browserOrigin);
|
|
314
|
+
}
|
|
315
|
+
catch (error) {
|
|
316
|
+
try {
|
|
317
|
+
await control?.close();
|
|
318
|
+
await gateway?.close();
|
|
319
|
+
await server.close();
|
|
320
|
+
}
|
|
321
|
+
finally {
|
|
322
|
+
lock.release();
|
|
323
|
+
}
|
|
324
|
+
throw error;
|
|
325
|
+
}
|
|
326
|
+
const notifications = notificationConfig ? new FleetNotificationProducer([agentsRoot(), tmpRoot()], resolve(webDir, 'notification-outboxes'), notificationConfig, options.log) : undefined;
|
|
224
327
|
return {
|
|
225
328
|
...server, address: browserOrigin,
|
|
226
329
|
async close() {
|
|
227
330
|
try {
|
|
228
|
-
await
|
|
331
|
+
await stopTunnel();
|
|
332
|
+
await notifications?.close();
|
|
333
|
+
await control?.close();
|
|
334
|
+
await gateway?.close();
|
|
229
335
|
await server.close();
|
|
230
336
|
}
|
|
231
337
|
finally {
|
|
@@ -237,11 +343,3 @@ export async function startWebConsole(options) {
|
|
|
237
343
|
function isLoopback(host) {
|
|
238
344
|
return ['127.0.0.1', 'localhost', '::1'].includes(host);
|
|
239
345
|
}
|
|
240
|
-
function openBrowser(url) {
|
|
241
|
-
const command = process.platform === 'darwin' ? 'open'
|
|
242
|
-
: process.platform === 'win32' ? 'cmd' : 'xdg-open';
|
|
243
|
-
const args = process.platform === 'win32' ? ['/c', 'start', '', url] : [url];
|
|
244
|
-
const child = spawn(command, args, { stdio: 'ignore', detached: true, shell: false });
|
|
245
|
-
child.on('error', () => undefined);
|
|
246
|
-
child.unref();
|
|
247
|
-
}
|
package/dist/web/server.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import type { FleetResourceScope } from '../application/resource-observer.js';
|
|
2
|
+
import type { ConversationRoleObservation, ConversationRoleState } from '../application/conversation-role-observer.js';
|
|
3
|
+
import { type InitAnswers } from '../init-wizard.js';
|
|
1
4
|
import { SupervisorOursTools } from '../application/supervisor-ours-tools.js';
|
|
2
5
|
import { type FastifyInstance } from 'fastify';
|
|
3
6
|
import type { FleetQueryService } from '../application/fleet-query-service.js';
|
|
@@ -16,7 +19,16 @@ import type { TopologyDraftStore } from './topology-draft-store.js';
|
|
|
16
19
|
import type { TopologyPromoteService } from './topology-promote.js';
|
|
17
20
|
import type { RoleRemovalService } from '../application/role-removal-service.js';
|
|
18
21
|
import type { TaskRoomApplicationService } from '../application/task-room-service.js';
|
|
22
|
+
import type { RoomLayoutDefinitions } from '../application/room-layout-definitions.js';
|
|
23
|
+
import type { PresetProvenance } from '../application/preset-provenance.js';
|
|
24
|
+
import type { OfferedModels } from '../subscriptions/cli.js';
|
|
25
|
+
import type { SubscriptionService } from '../subscriptions/service.js';
|
|
26
|
+
import type { LayoutBindingGrants } from '../rooms-tasks/layout-binding-grants.js';
|
|
19
27
|
export interface WebServices {
|
|
28
|
+
resourceScope?: FleetResourceScope;
|
|
29
|
+
invalidateResourceCaches?(): void;
|
|
30
|
+
observeRole?(roleId: string, listener: (state: ConversationRoleState) => void): ConversationRoleObservation;
|
|
31
|
+
layoutBindings?: Pick<LayoutBindingGrants, 'control'>;
|
|
20
32
|
query: FleetQueryService;
|
|
21
33
|
repository: RoleRepository;
|
|
22
34
|
session(roleId: string): Promise<RoleSessionControl>;
|
|
@@ -32,7 +44,14 @@ export interface WebServices {
|
|
|
32
44
|
topologyPromote?: TopologyPromoteService;
|
|
33
45
|
removal?: RoleRemovalService;
|
|
34
46
|
taskRooms?: TaskRoomApplicationService;
|
|
47
|
+
roomLayouts?: RoomLayoutDefinitions;
|
|
48
|
+
presetProvenance?: PresetProvenance;
|
|
35
49
|
oursTools?: Pick<SupervisorOursTools, 'list' | 'call'>;
|
|
50
|
+
subscriptions?: SubscriptionService;
|
|
51
|
+
/** First-time setup from the packaged presets; the account App supplies only the model choices. */
|
|
52
|
+
onboardingSetup?(answers: InitAnswers): Promise<void>;
|
|
53
|
+
/** The Codex models the runtime that sessions will use offers the active account. Absent: this server cannot tell, and filters nothing. */
|
|
54
|
+
codexModels?(): Promise<OfferedModels>;
|
|
36
55
|
}
|
|
37
56
|
export interface WebServer {
|
|
38
57
|
app: FastifyInstance;
|