@ours.network/fleet 1.2.0-nightly.6 → 1.2.0-nightly.61
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 +287 -65
- package/dist/account-origin.d.ts +2 -0
- package/dist/account-origin.js +6 -0
- package/dist/agent-ours/bridge.js +35 -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 +4 -0
- package/dist/agent-ours/mcp-endpoint.js +5 -0
- package/dist/agent-ours/runtime.d.ts +9 -1
- package/dist/agent-ours/runtime.js +50 -2
- package/dist/agent-ours/service.d.ts +21 -1
- package/dist/agent-ours/service.js +94 -14
- package/dist/application/codex-models.d.ts +15 -0
- package/dist/application/codex-models.js +56 -0
- package/dist/application/conversation-history.d.ts +27 -0
- package/dist/application/conversation-history.js +212 -0
- package/dist/application/fleet-query-service.d.ts +1 -1
- package/dist/application/fleet-query-service.js +2 -2
- package/dist/application/legacy-supervisor-identity.d.ts +7 -0
- package/dist/application/legacy-supervisor-identity.js +43 -0
- 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/role-creation-service.js +3 -2
- package/dist/application/role-removal-service.js +9 -1
- package/dist/application/role-repository.js +19 -2
- 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 +30 -0
- package/dist/application/session-control.js +72 -3
- package/dist/application/supervisor-ours-tools.d.ts +159 -0
- package/dist/application/supervisor-ours-tools.js +115 -0
- package/dist/application/task-layouts.d.ts +91 -0
- package/dist/application/task-layouts.js +259 -0
- package/dist/application/task-room-service.d.ts +99 -3
- package/dist/application/task-room-service.js +285 -32
- package/dist/application/types.d.ts +2 -0
- package/dist/atomic-file.d.ts +5 -0
- package/dist/atomic-file.js +62 -1
- package/dist/briefing.d.ts +3 -1
- package/dist/briefing.js +70 -30
- package/dist/build-info.json +7 -4
- package/dist/capabilities.d.ts +6 -1
- package/dist/capabilities.js +8 -0
- package/dist/cli.js +407 -37
- 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 +1 -8
- package/dist/daemon-recovery.js +8 -113
- package/dist/docs.d.ts +1 -1
- package/dist/docs.js +123 -19
- package/dist/doctor.d.ts +1 -1
- package/dist/doctor.js +55 -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 +7 -0
- package/dist/fleet-command-audit.js +26 -9
- package/dist/harness/agent-session.d.ts +2 -0
- package/dist/harness/claude-code-session.js +1 -1
- package/dist/harness/claude-code.js +20 -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 +23 -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 +8 -34
- package/dist/monitor.js +89 -152
- package/dist/notifications/fleet-producer.d.ts +19 -0
- package/dist/notifications/fleet-producer.js +208 -0
- package/dist/notifications/outbox.d.ts +46 -0
- package/dist/notifications/outbox.js +158 -0
- package/dist/notifications/target-cleanup.d.ts +8 -0
- package/dist/notifications/target-cleanup.js +41 -0
- package/dist/notifications/task-producer.d.ts +18 -0
- package/dist/notifications/task-producer.js +67 -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 +2 -0
- package/dist/paths.js +2 -0
- package/dist/preset-migration.js +25 -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 +83 -0
- package/dist/rooms-tasks/archived-absence.d.ts +8 -0
- package/dist/rooms-tasks/archived-absence.js +48 -0
- package/dist/rooms-tasks/cli.js +65 -5
- package/dist/rooms-tasks/close.d.ts +6 -2
- package/dist/rooms-tasks/close.js +246 -37
- 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 +2 -4
- package/dist/rooms-tasks/cowork-adapter.js +7 -121
- package/dist/rooms-tasks/cowork-http.js +29 -1
- package/dist/rooms-tasks/deletion.d.ts +1 -1
- package/dist/rooms-tasks/deletion.js +84 -5
- 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 +285 -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-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 -8
- package/dist/rooms-tasks/task-state.js +245 -25
- package/dist/rooms-tasks/types.d.ts +40 -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 +25 -3
- package/dist/runner.js +291 -49
- package/dist/session/acp.d.ts +53 -1
- package/dist/session/acp.js +216 -40
- package/dist/session/arbiter.d.ts +11 -0
- package/dist/session/arbiter.js +43 -2
- package/dist/session/codex-app-server.d.ts +32 -0
- package/dist/session/codex-app-server.js +137 -23
- package/dist/session/control.d.ts +12 -1
- package/dist/session/control.js +68 -3
- package/dist/session/conversation-normalizer.d.ts +2 -1
- package/dist/session/conversation-normalizer.js +1 -1
- package/dist/session/conversation-store.d.ts +1 -1
- package/dist/session/conversation-store.js +7 -11
- package/dist/session/conversation-types.d.ts +28 -3
- package/dist/session/prompt-batch.d.ts +63 -0
- package/dist/session/prompt-batch.js +86 -0
- package/dist/session/task-notice.d.ts +14 -0
- package/dist/session/task-notice.js +13 -0
- package/dist/session/types.d.ts +14 -0
- 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 +4 -0
- package/dist/startup-prompt.js +36 -0
- package/dist/startup-readiness.d.ts +13 -0
- package/dist/startup-readiness.js +38 -0
- 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 +75 -0
- package/dist/subscriptions/login.js +182 -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 +140 -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/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 +19 -33
- 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 +113 -65
- 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 +124 -0
- package/dist/web/agent-attachments.d.ts +29 -0
- package/dist/web/agent-attachments.js +162 -0
- package/dist/web/auth.d.ts +63 -2
- package/dist/web/auth.js +191 -10
- 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/fleet-config-service.d.ts +4 -1
- package/dist/web/fleet-config-service.js +46 -15
- package/dist/web/prefix-gateway.d.ts +32 -0
- package/dist/web/prefix-gateway.js +238 -0
- package/dist/web/runtime.d.ts +3 -1
- package/dist/web/runtime.js +116 -31
- package/dist/web/server.d.ts +16 -0
- package/dist/web/server.js +654 -55
- 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 +82 -0
- package/dist/workspace-enrollment.js +566 -0
- package/dist/workspace-replacement.d.ts +66 -0
- package/dist/workspace-replacement.js +220 -0
- package/docs/acp-files.md +146 -0
- package/docs/fleet-migration.md +54 -0
- package/docs/live-voice.md +13 -0
- package/docs/room-layouts.md +227 -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 +20 -19
- 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 +1 -1
- 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 +34 -11
- package/presets/fleet/roles/Engineer.yaml +40 -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
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { parse } from 'yaml';
|
|
4
|
+
import { withFileLock } from '../atomic-file.js';
|
|
5
|
+
import { agentDir, stateRoot } from '../paths.js';
|
|
6
|
+
import { readProvenance } from '../creation.js';
|
|
7
|
+
import { readTempSupervisor, tempSupervisorLiveness, requestedTempStopReason } from '../temp-lifecycle.js';
|
|
8
|
+
import { taskSupervisorMayRun } from '../task-supervision.js';
|
|
9
|
+
import { resumeTaskSupervisor } from '../spawn.js';
|
|
10
|
+
import { resetRestartLedger, readRestartLedger } from '../runner.js';
|
|
11
|
+
import { readRoomReadiness } from '../agent-ours/service.js';
|
|
12
|
+
import { getTask } from './task-state.js';
|
|
13
|
+
import { getRoomRecord } from './room-state.js';
|
|
14
|
+
import { roomCloseLockPath, CLOSE_LOCK_STALE_MS } from './close.js';
|
|
15
|
+
import { taskOperationLockPath, TASK_OPERATION_LOCK_STALE_MS } from './terminal.js';
|
|
16
|
+
import { adoptLegacyTaskMember } from './legacy-task-member.js';
|
|
17
|
+
/** Explicit supported recovery; never creates an identity, seat, invite, or session ID. */
|
|
18
|
+
export async function recoverTaskMembers(input) {
|
|
19
|
+
const deps = input.deps ?? {};
|
|
20
|
+
return withFileLock(taskOperationLockPath(input.taskId), async () => {
|
|
21
|
+
const task = getTask(input.taskId);
|
|
22
|
+
if (!['provisioning', 'active', 'review'].includes(task.state) || task.deletion || task.terminal_intent)
|
|
23
|
+
throw Error('Task is not open for member recovery');
|
|
24
|
+
const recover = async (name, roomId) => {
|
|
25
|
+
const dir = agentDir(name, true), metadata = readTempSupervisor(dir);
|
|
26
|
+
if (!metadata || metadata.role !== name)
|
|
27
|
+
throw Error('Exact supervisor state missing; explicit reconciliation required');
|
|
28
|
+
if (requestedTempStopReason(dir))
|
|
29
|
+
throw Error('Task member has an explicit retirement request');
|
|
30
|
+
const live = await (deps.liveness ?? tempSupervisorLiveness)(dir);
|
|
31
|
+
if (live === 'unknown')
|
|
32
|
+
throw Error('Supervisor liveness unknown; refusing recovery');
|
|
33
|
+
if (!metadata.taskOwner) {
|
|
34
|
+
if (live === 'running')
|
|
35
|
+
return { name, status: 'migration_pending' };
|
|
36
|
+
if (!roomId)
|
|
37
|
+
throw Error('Legacy layout member requires explicit reconciliation');
|
|
38
|
+
if (deps.adopt)
|
|
39
|
+
await deps.adopt(input.taskId, roomId, name);
|
|
40
|
+
else {
|
|
41
|
+
const room = getRoomRecord(roomId);
|
|
42
|
+
const seat = room.member_seats.find(member => member.role_name === name);
|
|
43
|
+
const adopted = await adoptLegacyTaskMember({ taskId: input.taskId, roomId,
|
|
44
|
+
roomIdentityCid: room.room_identity_cid, creationActionId: seat.launch.action_id }, name);
|
|
45
|
+
if (adopted === 'running-legacy')
|
|
46
|
+
return { name, status: 'migration_pending' };
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
if (!taskSupervisorMayRun(name))
|
|
50
|
+
throw Error('Task member is retired');
|
|
51
|
+
const reset = readRestartLedger(dir).circuit === 'open';
|
|
52
|
+
if (reset)
|
|
53
|
+
resetRestartLedger(dir);
|
|
54
|
+
if (live === 'running') {
|
|
55
|
+
return { name, status: reset ? 'recovery_reset' : 'running' };
|
|
56
|
+
}
|
|
57
|
+
await (deps.resume ?? resumeTaskSupervisor)(name, input.binPath);
|
|
58
|
+
return { name, status: 'resumed' };
|
|
59
|
+
};
|
|
60
|
+
if (task.layout) {
|
|
61
|
+
const path = join(stateRoot(), 'layouts', `${task.layout.run_id}.json`);
|
|
62
|
+
return withFileLock(path + '.lock', async () => {
|
|
63
|
+
const state = JSON.parse(readFileSync(path, 'utf8'));
|
|
64
|
+
if (state.closed || state.closing || state.uncertain)
|
|
65
|
+
throw Error('Layout requires reconciliation before recovery');
|
|
66
|
+
const result = [];
|
|
67
|
+
for (const member of Object.values(state.participants)) {
|
|
68
|
+
if (!member.owned || member.retired)
|
|
69
|
+
continue;
|
|
70
|
+
if (!member.instance?.agent || member.instance.remote)
|
|
71
|
+
throw Error('Layout owned instance evidence missing');
|
|
72
|
+
result.push(await recover(member.instance.agent));
|
|
73
|
+
}
|
|
74
|
+
return result;
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
if (!task.room_id || !input.cowork)
|
|
78
|
+
throw Error('Task room required for member recovery');
|
|
79
|
+
return withFileLock(roomCloseLockPath(task.room_id), async () => {
|
|
80
|
+
const room = getRoomRecord(task.room_id);
|
|
81
|
+
if (!room || room.task_id !== task.task_id || room.close || !['active', 'provisioning'].includes(room.state)
|
|
82
|
+
|| !room.room_identity_cid || room.room_identity_cid !== task.room_identity_cid)
|
|
83
|
+
throw Error('Exact open task room required');
|
|
84
|
+
const remote = await input.cowork.getRoom(room.room_id);
|
|
85
|
+
if (!remote || remote.identity_cid !== room.room_identity_cid || remote.state !== 'active')
|
|
86
|
+
throw Error('Exact active Cowork room required');
|
|
87
|
+
// Validate the complete admitted roster before any member is resumed.
|
|
88
|
+
for (const seat of room.member_seats) {
|
|
89
|
+
const dir = agentDir(seat.role_name, true), metadata = readTempSupervisor(dir), provenance = readProvenance(dir);
|
|
90
|
+
const role = parse(readFileSync(join(dir, 'role.yaml'), 'utf8')), startup = role.roomMemberStartup;
|
|
91
|
+
const found = remote.seats.filter(item => item.display_name === seat.role_name && item.seat_state !== 'removed');
|
|
92
|
+
const ready = readRoomReadiness(room.room_identity_cid, seat.role_name);
|
|
93
|
+
if (seat.retirement || !seat.identity_cid || !seat.invite_id || !seat.launch?.action_id || !seat.launch.launch_id
|
|
94
|
+
|| metadata?.role !== seat.role_name || metadata.launchId !== seat.launch.launch_id
|
|
95
|
+
|| provenance?.role !== seat.role_name || provenance.creationActionId !== seat.launch.action_id
|
|
96
|
+
|| role.identity !== seat.role_name || startup?.identity_name !== seat.role_name
|
|
97
|
+
|| startup.room_id !== room.room_id || startup.room_identity_cid !== room.room_identity_cid
|
|
98
|
+
|| startup.invite_id !== seat.invite_id || startup.role !== seat.cowork_role
|
|
99
|
+
|| !ready || ready.cid !== seat.identity_cid || ready.room !== room.room_id || ready.invite !== seat.invite_id
|
|
100
|
+
|| found.length !== 1 || found[0].identity_cid !== seat.identity_cid || found[0].invite_id !== seat.invite_id
|
|
101
|
+
|| found[0].role !== seat.cowork_role || found[0].seat_state !== 'active')
|
|
102
|
+
throw Error(`Exact admitted member proof missing: ${seat.role_name}`);
|
|
103
|
+
}
|
|
104
|
+
const result = [];
|
|
105
|
+
for (const seat of room.member_seats)
|
|
106
|
+
result.push(await recover(seat.role_name, room.room_id));
|
|
107
|
+
return result;
|
|
108
|
+
}, {}, CLOSE_LOCK_STALE_MS);
|
|
109
|
+
}, {}, TASK_OPERATION_LOCK_STALE_MS);
|
|
110
|
+
}
|
|
@@ -22,7 +22,7 @@ export declare function advanceSaga(id: string, phase: SagaPhase, stepIndex?: nu
|
|
|
22
22
|
export declare function setSagaError(id: string, error: string, hint?: string, detail?: ProvisioningDetail): RoomOrchestrationRecord;
|
|
23
23
|
export declare function setRoomIdentity(id: string, roomIdentityCid: string): RoomOrchestrationRecord;
|
|
24
24
|
export declare function setOwnerSeat(id: string, ownerSeatCid: string, inviteFingerprint: string): RoomOrchestrationRecord;
|
|
25
|
-
export declare function updateMemberSeats(id: string, seats: RoomMemberSeat[]): RoomOrchestrationRecord;
|
|
25
|
+
export declare function updateMemberSeats(id: string, seats: RoomMemberSeat[], additionalTemplate?: import('./types.js').TemplateSnapshot): RoomOrchestrationRecord;
|
|
26
26
|
export declare function updateRoomRoleBriefing(id: string, role: string, definition: RoomRoleBriefingDefinition): RoomOrchestrationRecord;
|
|
27
27
|
export declare function updateRoomHistoryCursor(id: string, cursor: number): RoomOrchestrationRecord;
|
|
28
28
|
export declare function updateMemberStartup(id: string, roleName: string, update: {
|
|
@@ -31,6 +31,8 @@ export declare function updateMemberStartup(id: string, roleName: string, update
|
|
|
31
31
|
export declare function activateRoom(id: string): RoomOrchestrationRecord;
|
|
32
32
|
export declare function closeRoom(id: string): RoomOrchestrationRecord;
|
|
33
33
|
export declare function beginRoomClose(id: string): RoomOrchestrationRecord;
|
|
34
|
-
export declare function advanceMemberRetirement(id: string, roleName: string, phase: MemberRetirementPhase, launchId: string, archivePath?: string): RoomOrchestrationRecord;
|
|
34
|
+
export declare function advanceMemberRetirement(id: string, roleName: string, phase: MemberRetirementPhase, launchId: string, archivePath?: string, absenceVerified?: boolean): RoomOrchestrationRecord;
|
|
35
35
|
export declare function advanceRoomClose(id: string, phase: RoomClosePhase): RoomOrchestrationRecord;
|
|
36
36
|
export declare function setRoomCloseError(id: string, error: string, recoveryHint: string): RoomOrchestrationRecord;
|
|
37
|
+
/** Settlement-only binding recovery; never publishes a seat or changes a launch. */
|
|
38
|
+
export declare function recordRetirementMemberCids(id: string, recovered: ReadonlyArray<RoomMemberSeat>): RoomOrchestrationRecord;
|
|
@@ -2,17 +2,28 @@ import { existsSync, mkdirSync, readdirSync, readFileSync, rmSync } from 'node:f
|
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { replaceFileAtomically } from '../atomic-file.js';
|
|
4
4
|
import { stateRoot } from '../paths.js';
|
|
5
|
+
import { planWorkspace, ensureWorkspace } from './workspace.js';
|
|
6
|
+
import { getTask } from './task-state.js';
|
|
5
7
|
import { storedRoomLaunchPolicy } from './types.js';
|
|
6
8
|
import { releaseLaunchSnapshot } from './launch-snapshot.js';
|
|
7
9
|
export const roomsDir = () => join(stateRoot(), 'rooms');
|
|
8
|
-
function roomPath(id) {
|
|
10
|
+
function roomPath(id) {
|
|
11
|
+
if (!/^[a-zA-Z0-9_-]{1,120}$/.test(id))
|
|
12
|
+
throw new RoomStateError('Invalid room ID');
|
|
13
|
+
return join(roomsDir(), `${id}.json`);
|
|
14
|
+
}
|
|
9
15
|
export class RoomStateError extends Error {
|
|
10
16
|
}
|
|
11
17
|
function readRoom(id) {
|
|
12
18
|
const p = roomPath(id);
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
19
|
+
try {
|
|
20
|
+
return JSON.parse(readFileSync(p, 'utf8'));
|
|
21
|
+
}
|
|
22
|
+
catch (error) {
|
|
23
|
+
if (error.code === 'ENOENT')
|
|
24
|
+
throw new RoomStateError(`room not found: ${id}`);
|
|
25
|
+
throw error;
|
|
26
|
+
}
|
|
16
27
|
}
|
|
17
28
|
function writeRoom(record) {
|
|
18
29
|
mkdirSync(roomsDir(), { recursive: true });
|
|
@@ -25,6 +36,8 @@ export function createRoomRecord(input) {
|
|
|
25
36
|
const requested = storedRoomLaunchPolicy(input.room_policy);
|
|
26
37
|
if (JSON.stringify(before) !== JSON.stringify(requested))
|
|
27
38
|
throw new RoomStateError(`room ${input.room_id} launch policy mismatch`);
|
|
39
|
+
if (existing.workspace)
|
|
40
|
+
ensureWorkspace(existing.workspace);
|
|
28
41
|
return existing;
|
|
29
42
|
}
|
|
30
43
|
const record = {
|
|
@@ -40,15 +53,20 @@ export function createRoomRecord(input) {
|
|
|
40
53
|
state: 'provisioning',
|
|
41
54
|
created_at: new Date().toISOString(),
|
|
42
55
|
};
|
|
56
|
+
record.workspace = input.task_id ? getTask(input.task_id).workspace : planWorkspace('room', input.room_id);
|
|
43
57
|
writeRoom(record);
|
|
58
|
+
if (record.workspace)
|
|
59
|
+
ensureWorkspace(record.workspace);
|
|
44
60
|
return record;
|
|
45
61
|
}
|
|
46
62
|
export function getRoomRecord(id) {
|
|
47
63
|
try {
|
|
48
64
|
return readRoom(id);
|
|
49
65
|
}
|
|
50
|
-
catch {
|
|
51
|
-
|
|
66
|
+
catch (error) {
|
|
67
|
+
if (error instanceof RoomStateError && error.message === `room not found: ${id}`)
|
|
68
|
+
return undefined;
|
|
69
|
+
throw error;
|
|
52
70
|
}
|
|
53
71
|
}
|
|
54
72
|
/** Remove a terminal orchestration record from the live room inventory. */
|
|
@@ -110,11 +128,13 @@ export function setOwnerSeat(id, ownerSeatCid, inviteFingerprint) {
|
|
|
110
128
|
writeRoom(r);
|
|
111
129
|
return r;
|
|
112
130
|
}
|
|
113
|
-
export function updateMemberSeats(id, seats) {
|
|
131
|
+
export function updateMemberSeats(id, seats, additionalTemplate) {
|
|
114
132
|
const r = readRoom(id);
|
|
115
133
|
if (r.state === 'closing' || r.state === 'closed')
|
|
116
134
|
throw new RoomStateError(`room ${id} is ${r.state}; member provisioning is fenced`);
|
|
117
135
|
r.member_seats = seats;
|
|
136
|
+
if (additionalTemplate)
|
|
137
|
+
r.additional_member_templates = [...(r.additional_member_templates ?? []), additionalTemplate];
|
|
118
138
|
writeRoom(r);
|
|
119
139
|
return r;
|
|
120
140
|
}
|
|
@@ -204,7 +224,7 @@ export function beginRoomClose(id) {
|
|
|
204
224
|
const RETIREMENT_ORDER = [
|
|
205
225
|
'stop_requested', 'liveness_absent', 'archive_secured', 'identity_absent',
|
|
206
226
|
];
|
|
207
|
-
export function advanceMemberRetirement(id, roleName, phase, launchId, archivePath) {
|
|
227
|
+
export function advanceMemberRetirement(id, roleName, phase, launchId, archivePath, absenceVerified = false) {
|
|
208
228
|
const r = readRoom(id);
|
|
209
229
|
if (r.state !== 'closing')
|
|
210
230
|
throw new RoomStateError(`room ${id} is not closing`);
|
|
@@ -221,6 +241,7 @@ export function advanceMemberRetirement(id, roleName, phase, launchId, archivePa
|
|
|
221
241
|
throw new RoomStateError(`room ${id} member ${roleName} retirement cannot move backward to ${phase}`);
|
|
222
242
|
}
|
|
223
243
|
seat.retirement = {
|
|
244
|
+
...(absenceVerified || previous?.absence_verified ? { absence_verified: true } : {}),
|
|
224
245
|
phase,
|
|
225
246
|
launch_id: launchId,
|
|
226
247
|
updated_at: new Date().toISOString(),
|
|
@@ -273,3 +294,21 @@ export function setRoomCloseError(id, error, recoveryHint) {
|
|
|
273
294
|
writeRoom(r);
|
|
274
295
|
return r;
|
|
275
296
|
}
|
|
297
|
+
/** Settlement-only binding recovery; never publishes a seat or changes a launch. */
|
|
298
|
+
export function recordRetirementMemberCids(id, recovered) {
|
|
299
|
+
const room = readRoom(id);
|
|
300
|
+
if (room.state !== 'closing')
|
|
301
|
+
throw new RoomStateError('Room is not closing');
|
|
302
|
+
for (const proof of recovered) {
|
|
303
|
+
const seat = room.member_seats.find(value => value.role_name === proof.role_name);
|
|
304
|
+
if (!seat || seat.launch?.action_id !== proof.launch?.action_id || seat.invite_id !== proof.invite_id)
|
|
305
|
+
throw new RoomStateError('Member changed during identity recovery');
|
|
306
|
+
if (!proof.identity_cid)
|
|
307
|
+
continue;
|
|
308
|
+
if (seat.identity_cid && seat.identity_cid.toLowerCase() !== proof.identity_cid.toLowerCase())
|
|
309
|
+
throw new RoomStateError('Member identity changed during recovery');
|
|
310
|
+
seat.identity_cid = proof.identity_cid;
|
|
311
|
+
}
|
|
312
|
+
writeRoom(room);
|
|
313
|
+
return room;
|
|
314
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Exec } from '../exec.js';
|
|
2
|
+
/** Registration retirement precedes every identity-absence shortcut. A proven
|
|
3
|
+
* legacy transient/detached launch never owned a retained registration.
|
|
4
|
+
* Missing state still requires exact catalog ownership before unregistering.
|
|
5
|
+
*/
|
|
6
|
+
export declare function retireTaskMemberService(name: string, expected: {
|
|
7
|
+
taskId: string;
|
|
8
|
+
creationActionId?: string;
|
|
9
|
+
launchId?: string;
|
|
10
|
+
taskSupervised?: boolean;
|
|
11
|
+
}, exec?: Exec): Promise<void>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { existsSync } from 'node:fs';
|
|
2
|
+
import { agentDir } from '../paths.js';
|
|
3
|
+
import { readTempSupervisor, tempArchiveForCreationAction, tempArchiveForLaunch } from '../temp-lifecycle.js';
|
|
4
|
+
import { unregisterTaskMember, hasTaskMemberRegistration } from '../supervisor/catalog.js';
|
|
5
|
+
import { assertMemberNotPermanent } from './member-ownership.js';
|
|
6
|
+
/** Registration retirement precedes every identity-absence shortcut. A proven
|
|
7
|
+
* legacy transient/detached launch never owned a retained registration.
|
|
8
|
+
* Missing state still requires exact catalog ownership before unregistering.
|
|
9
|
+
*/
|
|
10
|
+
export async function retireTaskMemberService(name, expected, exec) {
|
|
11
|
+
assertMemberNotPermanent(name);
|
|
12
|
+
const archive = expected.creationActionId ? tempArchiveForCreationAction(name, expected.creationActionId)
|
|
13
|
+
: expected.launchId ? { path: tempArchiveForLaunch(name, expected.launchId) } : undefined;
|
|
14
|
+
const source = existsSync(agentDir(name, true)) ? agentDir(name, true) : archive?.path;
|
|
15
|
+
const metadata = source ? readTempSupervisor(source) : undefined;
|
|
16
|
+
const hasServiceEvidence = hasTaskMemberRegistration(name);
|
|
17
|
+
const durableMetadata = metadata?.taskOwner && metadata.kind === 'fleet-managed';
|
|
18
|
+
if (!hasServiceEvidence && !expected.taskSupervised && !durableMetadata)
|
|
19
|
+
return;
|
|
20
|
+
await unregisterTaskMember(name, expected, { exec });
|
|
21
|
+
}
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ArchivedMemberAbsence } from './types.js';
|
|
2
|
+
import type { TaskRecord, TaskState, TaskOrigin, TaskTemplateRef, TaskOutcome, TaskMemberRole, TaskTerminalIntent, TaskDeletionActor, TaskDeletionMemberPhase, TaskNotificationEvent } from './types.js';
|
|
2
3
|
export declare const tasksDir: () => string;
|
|
3
4
|
export declare class TaskStateError extends Error {
|
|
4
5
|
}
|
|
6
|
+
/** Atomic snapshots contain the events, including intermediate states between polls. */
|
|
7
|
+
export declare function pendingTaskNotifications(warn?: (line: string) => void): Array<{
|
|
8
|
+
taskId: string;
|
|
9
|
+
events: TaskNotificationEvent[];
|
|
10
|
+
}>;
|
|
11
|
+
/** Service event-id dedupe covers acceptance followed by a crash before this acknowledgement. */
|
|
12
|
+
export declare function acknowledgeTaskNotification(id: string, eventId: string): void;
|
|
5
13
|
/**
|
|
6
14
|
* Accepted deletion is the per-task epoch guard: once pending, every lifecycle
|
|
7
15
|
* mutation, terminal settlement, and room publication must fail boundedly.
|
|
@@ -17,6 +25,10 @@ export interface CreateTaskInput {
|
|
|
17
25
|
idempotency_key?: string;
|
|
18
26
|
start?: boolean;
|
|
19
27
|
no_room?: boolean;
|
|
28
|
+
layout?: {
|
|
29
|
+
name: string;
|
|
30
|
+
definition_hash: string;
|
|
31
|
+
};
|
|
20
32
|
room_id?: string;
|
|
21
33
|
listId?: string;
|
|
22
34
|
}
|
|
@@ -61,9 +73,8 @@ export declare function getDeletingTask(id: string): TaskRecord;
|
|
|
61
73
|
export declare function taskDeletionState(id: string): 'none' | 'pending' | 'absent';
|
|
62
74
|
/**
|
|
63
75
|
* Durable, surface-independent audit evidence for a permanent deletion. The
|
|
64
|
-
* receipt
|
|
65
|
-
*
|
|
66
|
-
* room content.
|
|
76
|
+
* receipt supports in-flight recovery only: written with acceptance intent,
|
|
77
|
+
* then erased before settlement is reported. It may contain a bounded title.
|
|
67
78
|
*/
|
|
68
79
|
export interface TaskDeletionReceipt {
|
|
69
80
|
schema_version: 1;
|
|
@@ -74,6 +85,7 @@ export interface TaskDeletionReceipt {
|
|
|
74
85
|
original_state: TaskState;
|
|
75
86
|
room_id?: string;
|
|
76
87
|
member_count: number;
|
|
88
|
+
archived_absences?: ArchivedMemberAbsence[];
|
|
77
89
|
settled_at?: string;
|
|
78
90
|
result?: 'deleted';
|
|
79
91
|
}
|
|
@@ -86,7 +98,7 @@ export declare function readTaskDeletionReceipt(id: string): TaskDeletionReceipt
|
|
|
86
98
|
* settlement rather than deleting resources without audit evidence.
|
|
87
99
|
*/
|
|
88
100
|
export declare function ensureTaskDeletionReceipt(id: string): void;
|
|
89
|
-
/**
|
|
101
|
+
/** Erase the in-flight receipt; also heals a crash after task unlink. */
|
|
90
102
|
export declare function completeTaskDeletionReceipt(id: string): void;
|
|
91
103
|
export type TaskDeletionAcceptance = {
|
|
92
104
|
status: 'accepted' | 'pending';
|
|
@@ -122,7 +134,13 @@ export declare function advanceTaskDeletionMember(id: string, name: string, phas
|
|
|
122
134
|
interface SeatEvidence {
|
|
123
135
|
role_name: string;
|
|
124
136
|
identity_cid?: string;
|
|
137
|
+
launch?: {
|
|
138
|
+
launch_id?: string;
|
|
139
|
+
action_id?: string;
|
|
140
|
+
task_supervised?: boolean;
|
|
141
|
+
};
|
|
125
142
|
retirement?: {
|
|
143
|
+
absence_verified?: boolean;
|
|
126
144
|
phase: TaskDeletionMemberPhase;
|
|
127
145
|
launch_id: string;
|
|
128
146
|
archive_path?: string;
|
|
@@ -146,14 +164,39 @@ export declare function upsertTaskDeletionMembersFromSeats(id: string, seats: Re
|
|
|
146
164
|
*
|
|
147
165
|
* The room saga is trusted for phase jumps, but partial or corrupt retained
|
|
148
166
|
* records must not become false success: every seat must be identity_absent;
|
|
149
|
-
* a real launch requires archive evidence; an identity-less seat
|
|
150
|
-
*
|
|
167
|
+
* a real launch requires archive evidence; an identity-less seat requires
|
|
168
|
+
* never-launched proof or a freshly verified archived-absence checkpoint.
|
|
151
169
|
*/
|
|
152
|
-
export declare function importTaskDeletionRetirementEvidence(id: string, seats: ReadonlyArray<SeatEvidence>): TaskRecord;
|
|
170
|
+
export declare function importTaskDeletionRetirementEvidence(id: string, seats: ReadonlyArray<SeatEvidence>, proofs?: ReadonlyArray<ArchivedMemberAbsence>): TaskRecord;
|
|
171
|
+
/** Settlement-only checkpoint, under the task-operation lock after fresh archive verification.
|
|
172
|
+
* From here retries still verify live absence, but owned archives may be consumed.
|
|
173
|
+
*/
|
|
174
|
+
export declare function beginTaskWorkspaceCleanup(id: string): void;
|
|
153
175
|
/**
|
|
154
176
|
* Physically remove a deletion-pending task record. Settlement-only: callers
|
|
155
177
|
* must have completed member retirement and room cleanup first. Missing
|
|
156
178
|
* records are the idempotent already-settled outcome.
|
|
157
179
|
*/
|
|
158
180
|
export declare function unlinkDeletedTask(id: string): boolean;
|
|
181
|
+
/** Called only after current temp and exact identity absence have been checked. */
|
|
182
|
+
export declare function settleAbsentTaskDeletionMember(id: string, name: string): void;
|
|
183
|
+
/** Room-only erasure keeps the parent Task but removes its dead room/member links. */
|
|
184
|
+
export declare function detachDeletedRoom(taskId: string, roomId: string): void;
|
|
185
|
+
/** A completed room may consume its archives while other task members still retire. */
|
|
186
|
+
export declare function beginTaskArchiveCleanup(id: string): void;
|
|
187
|
+
/** Metadata-only edit; compare under the task lock to prevent lost updates. */
|
|
188
|
+
/**
|
|
189
|
+
* Choose, change or clear a Backlog task's Room Layout before it starts.
|
|
190
|
+
* `expected` is the layout name the caller saw (null = none); a different
|
|
191
|
+
* current choice is a stale edit. Choosing a layout drops the sealed room
|
|
192
|
+
* template plan; the caller releases the returned launch snapshot hash.
|
|
193
|
+
*/
|
|
194
|
+
export declare function updateTaskLayout(id: string, expected: string | null, next: {
|
|
195
|
+
name: string;
|
|
196
|
+
definition_hash: string;
|
|
197
|
+
} | null): {
|
|
198
|
+
task: TaskRecord;
|
|
199
|
+
releasedSnapshot?: string;
|
|
200
|
+
};
|
|
201
|
+
export declare function updateTaskBrief(id: string, brief: string, expectedBrief: string): TaskRecord;
|
|
159
202
|
export {};
|