@openrig/cli 0.6.5 → 0.6.7
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 +151 -63
- package/daemon/assets/claude-team-permissions.cjs +262 -0
- package/daemon/assets/onboarding/02-self-and-competent-action.md +46 -2
- package/daemon/assets/plugins/openrig-core/.claude-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig-core/.codex-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig-core/hooks/scripts/refocus-health.cjs +41 -0
- package/daemon/assets/plugins/openrig-core/hooks/scripts/refocus.cjs +69 -12
- package/daemon/assets/plugins/openrig-core/skills/applying-a-permission-policy/SKILL.md +41 -21
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/SKILL.md +24 -7
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/precompact-hook.mjs +4 -0
- package/daemon/assets/plugins/openrig-core/skills/forming-an-openrig-mental-model/SKILL.md +1 -1
- package/daemon/assets/plugins/openrig-core/skills/openrig-skills/SKILL.md +4 -5
- package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +9 -4
- package/daemon/assets/plugins/openrig-core/skills/refocusing/SKILL.md +31 -4
- package/daemon/assets/plugins/openrig-core/skills/refocusing/scripts/trace-to-root.py +24 -13
- package/daemon/assets/plugins/openrig-core/skills/retiring-and-inheriting-a-seat/SKILL.md +3 -0
- package/daemon/assets/plugins/openrig-core/skills/seat-continuity-and-handover/SKILL.md +42 -0
- package/daemon/assets/plugins/openrig-core/skills/session-compaction-and-restore/SKILL.md +6 -0
- package/daemon/assets/skills/rigs/SKILL.md +133 -0
- package/daemon/context-packs/help/help.md +66 -12
- package/daemon/context-packs/help/manifest.yaml +1 -1
- package/daemon/context-packs/onboarding-width/manifest.yaml +1 -1
- package/daemon/context-packs/onboarding-width/public-what-you-can-do.md +218 -38
- package/daemon/context-packs/reference/getting-started.md +593 -139
- package/daemon/context-packs/reference/manifest.yaml +4 -1
- package/daemon/context-packs/reference/rig-spec.md +175 -26
- package/daemon/context-packs/reference/whats-new.md +134 -0
- package/daemon/context-packs/skills/agent-operated-software/manifest.yaml +1 -1
- package/daemon/context-packs/skills/agent-operated-workflows/manifest.yaml +1 -1
- package/daemon/context-packs/skills/applying-a-permission-policy/SKILL.md +41 -21
- package/daemon/context-packs/skills/applying-a-permission-policy/manifest.yaml +1 -1
- package/daemon/context-packs/skills/claude-compaction-restore/SKILL.md +24 -7
- package/daemon/context-packs/skills/claude-compaction-restore/manifest.yaml +1 -1
- package/daemon/context-packs/skills/claude-compaction-restore/scripts/precompact-hook.mjs +4 -0
- package/daemon/context-packs/skills/core/agent-starters/SKILL.md +0 -6
- package/daemon/context-packs/skills/core/agent-starters/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/SKILL.md +1 -8
- package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/cross-host-rig-commands/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/human-in-the-loop/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/messaging-the-human/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-architect/SKILL.md +5 -5
- package/daemon/context-packs/skills/core/openrig-architect/manifest.yaml +3 -3
- package/daemon/context-packs/skills/core/openrig-cmux/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-herdr/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-skills/SKILL.md +4 -5
- package/daemon/context-packs/skills/core/openrig-skills/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-software-factory/SKILL.md +31 -21
- package/daemon/context-packs/skills/core/openrig-software-factory/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-software-factory/references/worked-example.md +31 -31
- package/daemon/context-packs/skills/core/openrig-upgrade/SKILL.md +2 -0
- package/daemon/context-packs/skills/core/openrig-upgrade/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/SKILL.md +0 -1
- package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/rig-lifecycle/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/session-source-fork/SKILL.md +0 -5
- package/daemon/context-packs/skills/core/session-source-fork/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/specification-system/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/watchdog/manifest.yaml +1 -1
- package/daemon/context-packs/skills/delegating-work/manifest.yaml +1 -1
- package/daemon/context-packs/skills/forming-an-openrig-mental-model/SKILL.md +1 -1
- package/daemon/context-packs/skills/forming-an-openrig-mental-model/manifest.yaml +1 -1
- package/daemon/context-packs/skills/loading-addressable-markdown/manifest.yaml +1 -1
- package/daemon/context-packs/skills/mission-slice-sop/manifest.yaml +1 -1
- package/daemon/context-packs/skills/openrig-operating-model/manifest.yaml +1 -1
- package/daemon/context-packs/skills/openrig-user/SKILL.md +9 -4
- package/daemon/context-packs/skills/openrig-user/manifest.yaml +1 -1
- package/daemon/context-packs/skills/orienting-to-an-inherited-seat/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/backlog-capture/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/context-builder/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/exec-summary/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/office-hours/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/plan-review/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/requirements-writer/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/ui-mockup/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/development-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/orchestration-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/oversight-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/review-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/agent-browser/OPENRIG.md +1 -1
- package/daemon/context-packs/skills/process/agent-browser/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/context-engineering/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/dogfood/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/frontend-design/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/systematic-debugging/SKILL.md +0 -2
- package/daemon/context-packs/skills/process/systematic-debugging/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/test-driven-development/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/verification-before-completion/manifest.yaml +1 -1
- package/daemon/context-packs/skills/queue-handoff/manifest.yaml +1 -1
- package/daemon/context-packs/skills/refocusing/SKILL.md +31 -4
- package/daemon/context-packs/skills/refocusing/manifest.yaml +1 -1
- package/daemon/context-packs/skills/refocusing/scripts/trace-to-root.py +24 -13
- package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/SKILL.md +3 -0
- package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/manifest.yaml +1 -1
- package/daemon/context-packs/skills/seat-continuity-and-handover/SKILL.md +42 -0
- package/daemon/context-packs/skills/seat-continuity-and-handover/manifest.yaml +1 -1
- package/daemon/context-packs/skills/session-compaction-and-restore/SKILL.md +6 -0
- package/daemon/context-packs/skills/session-compaction-and-restore/manifest.yaml +1 -1
- package/daemon/context-packs/skills/software-for-agents/manifest.yaml +1 -1
- package/daemon/context-packs/world-example/manifest.yaml +1 -1
- package/daemon/context-packs/world-public/manifest.yaml +1 -1
- package/daemon/dist/adapters/claude-code-adapter.d.ts +2 -2
- package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-code-adapter.js +48 -26
- package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
- package/daemon/dist/adapters/claude-resume.d.ts +1 -1
- package/daemon/dist/adapters/claude-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-resume.js +7 -4
- package/daemon/dist/adapters/claude-resume.js.map +1 -1
- package/daemon/dist/adapters/codex-resume.d.ts +3 -1
- package/daemon/dist/adapters/codex-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-resume.js +27 -4
- package/daemon/dist/adapters/codex-resume.js.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts +3 -0
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.js +61 -63
- package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/compose-services-adapter.js +1 -1
- package/daemon/dist/adapters/compose-services-adapter.js.map +1 -1
- package/daemon/dist/adapters/kernel-authority.d.ts +10 -0
- package/daemon/dist/adapters/kernel-authority.d.ts.map +1 -0
- package/daemon/dist/adapters/kernel-authority.js +71 -0
- package/daemon/dist/adapters/kernel-authority.js.map +1 -0
- package/daemon/dist/adapters/non-interruptive.d.ts +14 -0
- package/daemon/dist/adapters/non-interruptive.d.ts.map +1 -0
- package/daemon/dist/adapters/non-interruptive.js +38 -0
- package/daemon/dist/adapters/non-interruptive.js.map +1 -0
- package/daemon/dist/adapters/pi-readiness.d.ts +15 -0
- package/daemon/dist/adapters/pi-readiness.d.ts.map +1 -0
- package/daemon/dist/adapters/pi-readiness.js +90 -0
- package/daemon/dist/adapters/pi-readiness.js.map +1 -0
- package/daemon/dist/adapters/pi-resume.d.ts +3 -1
- package/daemon/dist/adapters/pi-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-resume.js +8 -1
- package/daemon/dist/adapters/pi-resume.js.map +1 -1
- package/daemon/dist/adapters/pi-runner-protocol.d.ts +15 -0
- package/daemon/dist/adapters/pi-runner-protocol.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runner-protocol.js +28 -0
- package/daemon/dist/adapters/pi-runner-protocol.js.map +1 -1
- package/daemon/dist/adapters/pi-runner.d.ts +3 -0
- package/daemon/dist/adapters/pi-runner.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runner.js +92 -15
- package/daemon/dist/adapters/pi-runner.js.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.d.ts +8 -0
- package/daemon/dist/adapters/pi-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.js +37 -9
- package/daemon/dist/adapters/pi-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/stub-runner-protocol.d.ts +1 -1
- package/daemon/dist/adapters/stub-runner-protocol.d.ts.map +1 -1
- package/daemon/dist/adapters/stub-runner.d.ts +1 -1
- package/daemon/dist/adapters/stub-runner.d.ts.map +1 -1
- package/daemon/dist/adapters/stub-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/stub-runtime-adapter.js +10 -7
- package/daemon/dist/adapters/stub-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/tmux.d.ts +7 -3
- package/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux.js +20 -12
- package/daemon/dist/adapters/tmux.js.map +1 -1
- package/daemon/dist/adapters/yolo-mode.d.ts +1 -1
- package/daemon/dist/adapters/yolo-mode.d.ts.map +1 -1
- package/daemon/dist/adapters/yolo-mode.js +3 -0
- package/daemon/dist/adapters/yolo-mode.js.map +1 -1
- package/daemon/dist/build-info.js +3 -3
- package/daemon/dist/bundle-behaviour-surface.d.ts +2 -0
- package/daemon/dist/bundle-behaviour-surface.d.ts.map +1 -0
- package/daemon/dist/bundle-behaviour-surface.js +2 -0
- package/daemon/dist/bundle-behaviour-surface.js.map +1 -0
- package/daemon/dist/bundle-identity-surface.d.ts +2 -0
- package/daemon/dist/bundle-identity-surface.d.ts.map +1 -0
- package/daemon/dist/bundle-identity-surface.js +4 -0
- package/daemon/dist/bundle-identity-surface.js.map +1 -0
- package/daemon/dist/daemon-shutdown.d.ts +1 -1
- package/daemon/dist/daemon-shutdown.d.ts.map +1 -1
- package/daemon/dist/daemon-shutdown.js +5 -1
- package/daemon/dist/daemon-shutdown.js.map +1 -1
- package/daemon/dist/db/all-migrations.d.ts.map +1 -1
- package/daemon/dist/db/all-migrations.js +6 -0
- package/daemon/dist/db/all-migrations.js.map +1 -1
- package/daemon/dist/db/migrations/095_rig_non_interruptive.d.ts +3 -0
- package/daemon/dist/db/migrations/095_rig_non_interruptive.d.ts.map +1 -0
- package/daemon/dist/db/migrations/095_rig_non_interruptive.js +5 -0
- package/daemon/dist/db/migrations/095_rig_non_interruptive.js.map +1 -0
- package/daemon/dist/db/migrations/096_rig_install_root.d.ts +3 -0
- package/daemon/dist/db/migrations/096_rig_install_root.d.ts.map +1 -0
- package/daemon/dist/db/migrations/096_rig_install_root.js +5 -0
- package/daemon/dist/db/migrations/096_rig_install_root.js.map +1 -0
- package/daemon/dist/db/migrations/097_thread_part_map.d.ts +3 -0
- package/daemon/dist/db/migrations/097_thread_part_map.d.ts.map +1 -0
- package/daemon/dist/db/migrations/097_thread_part_map.js +20 -0
- package/daemon/dist/db/migrations/097_thread_part_map.js.map +1 -0
- package/daemon/dist/domain/activity-taxonomy.d.ts +7 -0
- package/daemon/dist/domain/activity-taxonomy.d.ts.map +1 -1
- package/daemon/dist/domain/activity-taxonomy.js.map +1 -1
- package/daemon/dist/domain/agent-activity-store.d.ts +12 -0
- package/daemon/dist/domain/agent-activity-store.d.ts.map +1 -1
- package/daemon/dist/domain/agent-activity-store.js +55 -30
- package/daemon/dist/domain/agent-activity-store.js.map +1 -1
- package/daemon/dist/domain/agent-images/agent-image-types.d.ts +1 -1
- package/daemon/dist/domain/agent-images/agent-image-types.d.ts.map +1 -1
- package/daemon/dist/domain/agent-manifest.d.ts.map +1 -1
- package/daemon/dist/domain/agent-manifest.js +4 -2
- package/daemon/dist/domain/agent-manifest.js.map +1 -1
- package/daemon/dist/domain/bootstrap-orchestrator.d.ts +10 -0
- package/daemon/dist/domain/bootstrap-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/bootstrap-orchestrator.js +136 -32
- package/daemon/dist/domain/bootstrap-orchestrator.js.map +1 -1
- package/daemon/dist/domain/builtin-policy-reference.d.ts +1 -1
- package/daemon/dist/domain/builtin-policy-reference.d.ts.map +1 -1
- package/daemon/dist/domain/builtin-policy-reference.js +2 -2
- package/daemon/dist/domain/builtin-policy-reference.js.map +1 -1
- package/daemon/dist/domain/bundle-archive.d.ts +24 -0
- package/daemon/dist/domain/bundle-archive.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-archive.js +52 -27
- package/daemon/dist/domain/bundle-archive.js.map +1 -1
- package/daemon/dist/domain/bundle-audit.d.ts +5 -0
- package/daemon/dist/domain/bundle-audit.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-audit.js.map +1 -1
- package/daemon/dist/domain/bundle-behaviour-inspect.d.ts +4 -0
- package/daemon/dist/domain/bundle-behaviour-inspect.d.ts.map +1 -0
- package/daemon/dist/domain/bundle-behaviour-inspect.js +56 -0
- package/daemon/dist/domain/bundle-behaviour-inspect.js.map +1 -0
- package/daemon/dist/domain/bundle-behaviour.d.ts +118 -0
- package/daemon/dist/domain/bundle-behaviour.d.ts.map +1 -0
- package/daemon/dist/domain/bundle-behaviour.js +364 -0
- package/daemon/dist/domain/bundle-behaviour.js.map +1 -0
- package/daemon/dist/domain/bundle-carried-context-pack.d.ts +16 -0
- package/daemon/dist/domain/bundle-carried-context-pack.d.ts.map +1 -0
- package/daemon/dist/domain/bundle-carried-context-pack.js +67 -0
- package/daemon/dist/domain/bundle-carried-context-pack.js.map +1 -0
- package/daemon/dist/domain/bundle-carried-project.d.ts +13 -0
- package/daemon/dist/domain/bundle-carried-project.d.ts.map +1 -0
- package/daemon/dist/domain/bundle-carried-project.js +71 -0
- package/daemon/dist/domain/bundle-carried-project.js.map +1 -0
- package/daemon/dist/domain/bundle-conflict-detector.js +3 -3
- package/daemon/dist/domain/bundle-conflict-detector.js.map +1 -1
- package/daemon/dist/domain/bundle-content-routing.d.ts +49 -0
- package/daemon/dist/domain/bundle-content-routing.d.ts.map +1 -0
- package/daemon/dist/domain/bundle-content-routing.js +246 -0
- package/daemon/dist/domain/bundle-content-routing.js.map +1 -0
- package/daemon/dist/domain/bundle-context-packs-router.d.ts +7 -2
- package/daemon/dist/domain/bundle-context-packs-router.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-context-packs-router.js +19 -0
- package/daemon/dist/domain/bundle-context-packs-router.js.map +1 -1
- package/daemon/dist/domain/bundle-identity.d.ts +27 -0
- package/daemon/dist/domain/bundle-identity.d.ts.map +1 -0
- package/daemon/dist/domain/bundle-identity.js +34 -0
- package/daemon/dist/domain/bundle-identity.js.map +1 -0
- package/daemon/dist/domain/bundle-install-context.d.ts +22 -0
- package/daemon/dist/domain/bundle-install-context.d.ts.map +1 -0
- package/daemon/dist/domain/bundle-install-context.js +64 -0
- package/daemon/dist/domain/bundle-install-context.js.map +1 -0
- package/daemon/dist/domain/bundle-integrity.d.ts +1 -0
- package/daemon/dist/domain/bundle-integrity.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-integrity.js +1 -1
- package/daemon/dist/domain/bundle-integrity.js.map +1 -1
- package/daemon/dist/domain/bundle-source-resolver.d.ts +4 -1
- package/daemon/dist/domain/bundle-source-resolver.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-source-resolver.js +73 -19
- package/daemon/dist/domain/bundle-source-resolver.js.map +1 -1
- package/daemon/dist/domain/bundle-types.d.ts +38 -1
- package/daemon/dist/domain/bundle-types.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-types.js +78 -0
- package/daemon/dist/domain/bundle-types.js.map +1 -1
- package/daemon/dist/domain/chat-repository.d.ts +5 -0
- package/daemon/dist/domain/chat-repository.d.ts.map +1 -1
- package/daemon/dist/domain/chat-repository.js +8 -0
- package/daemon/dist/domain/chat-repository.js.map +1 -1
- package/daemon/dist/domain/claim-service.d.ts.map +1 -1
- package/daemon/dist/domain/claim-service.js +5 -4
- package/daemon/dist/domain/claim-service.js.map +1 -1
- package/daemon/dist/domain/claude-activity-hooks.d.ts +3 -0
- package/daemon/dist/domain/claude-activity-hooks.d.ts.map +1 -1
- package/daemon/dist/domain/claude-activity-hooks.js +8 -1
- package/daemon/dist/domain/claude-activity-hooks.js.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts +15 -1
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.js +87 -23
- package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
- package/daemon/dist/domain/codex-team-workspace.d.ts +8 -0
- package/daemon/dist/domain/codex-team-workspace.d.ts.map +1 -0
- package/daemon/dist/domain/codex-team-workspace.js +54 -0
- package/daemon/dist/domain/codex-team-workspace.js.map +1 -0
- package/daemon/dist/domain/codex-thread-id.d.ts.map +1 -1
- package/daemon/dist/domain/codex-thread-id.js +4 -2
- package/daemon/dist/domain/codex-thread-id.js.map +1 -1
- package/daemon/dist/domain/context-monitor.d.ts.map +1 -1
- package/daemon/dist/domain/context-monitor.js +9 -1
- package/daemon/dist/domain/context-monitor.js.map +1 -1
- package/daemon/dist/domain/daemon-version.d.ts +3 -1
- package/daemon/dist/domain/daemon-version.d.ts.map +1 -1
- package/daemon/dist/domain/daemon-version.js +6 -1
- package/daemon/dist/domain/daemon-version.js.map +1 -1
- package/daemon/dist/domain/event-loop-monitor.d.ts +6 -0
- package/daemon/dist/domain/event-loop-monitor.d.ts.map +1 -1
- package/daemon/dist/domain/event-loop-monitor.js +13 -0
- package/daemon/dist/domain/event-loop-monitor.js.map +1 -1
- package/daemon/dist/domain/execution-view.d.ts.map +1 -1
- package/daemon/dist/domain/execution-view.js +57 -11
- package/daemon/dist/domain/execution-view.js.map +1 -1
- package/daemon/dist/domain/finite-telemetry.d.ts +74 -0
- package/daemon/dist/domain/finite-telemetry.d.ts.map +1 -0
- package/daemon/dist/domain/finite-telemetry.js +236 -0
- package/daemon/dist/domain/finite-telemetry.js.map +1 -0
- package/daemon/dist/domain/gateway/connections-projection.d.ts +5 -1
- package/daemon/dist/domain/gateway/connections-projection.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/connections-projection.js +2 -0
- package/daemon/dist/domain/gateway/connections-projection.js.map +1 -1
- package/daemon/dist/domain/gateway/destination-resolver.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/destination-resolver.js +7 -4
- package/daemon/dist/domain/gateway/destination-resolver.js.map +1 -1
- package/daemon/dist/domain/gateway/gateway-subsystem.d.ts +2 -0
- package/daemon/dist/domain/gateway/gateway-subsystem.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/gateway-subsystem.js +4 -0
- package/daemon/dist/domain/gateway/gateway-subsystem.js.map +1 -1
- package/daemon/dist/domain/gateway/human-readiness.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/human-readiness.js +23 -6
- package/daemon/dist/domain/gateway/human-readiness.js.map +1 -1
- package/daemon/dist/domain/gateway/human-registry.d.ts +2 -2
- package/daemon/dist/domain/gateway/human-registry.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/human-registry.js +2 -2
- package/daemon/dist/domain/gateway/human-registry.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/capabilities.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/capabilities.js +3 -1
- package/daemon/dist/domain/gateway/slack/capabilities.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/channel-map.d.ts +39 -0
- package/daemon/dist/domain/gateway/slack/channel-map.d.ts.map +1 -0
- package/daemon/dist/domain/gateway/slack/channel-map.js +114 -0
- package/daemon/dist/domain/gateway/slack/channel-map.js.map +1 -0
- package/daemon/dist/domain/gateway/slack/channel-recovery.d.ts +45 -0
- package/daemon/dist/domain/gateway/slack/channel-recovery.d.ts.map +1 -0
- package/daemon/dist/domain/gateway/slack/channel-recovery.js +176 -0
- package/daemon/dist/domain/gateway/slack/channel-recovery.js.map +1 -0
- package/daemon/dist/domain/gateway/slack/config.d.ts +7 -0
- package/daemon/dist/domain/gateway/slack/config.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/config.js +19 -2
- package/daemon/dist/domain/gateway/slack/config.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/inbound.d.ts +27 -2
- package/daemon/dist/domain/gateway/slack/inbound.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/inbound.js +123 -11
- package/daemon/dist/domain/gateway/slack/inbound.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/message.d.ts +7 -0
- package/daemon/dist/domain/gateway/slack/message.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/message.js +36 -0
- package/daemon/dist/domain/gateway/slack/message.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-api.d.ts +1 -0
- package/daemon/dist/domain/gateway/slack/slack-api.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-api.js +3 -1
- package/daemon/dist/domain/gateway/slack/slack-api.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts +30 -7
- package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-delivery.js +253 -51
- package/daemon/dist/domain/gateway/slack/slack-delivery.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js +97 -11
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/socket-inbound.d.ts +6 -0
- package/daemon/dist/domain/gateway/slack/socket-inbound.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/socket-inbound.js +51 -1
- package/daemon/dist/domain/gateway/slack/socket-inbound.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/state-store.d.ts +24 -0
- package/daemon/dist/domain/gateway/slack/state-store.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/state-store.js +84 -1
- package/daemon/dist/domain/gateway/slack/state-store.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/thread-routing.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/thread-routing.js +22 -2
- package/daemon/dist/domain/gateway/slack/thread-routing.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/thread-seat-map.d.ts +14 -0
- package/daemon/dist/domain/gateway/slack/thread-seat-map.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/thread-seat-map.js +27 -0
- package/daemon/dist/domain/gateway/slack/thread-seat-map.js.map +1 -1
- package/daemon/dist/domain/generated-file-hygiene.d.ts +3 -0
- package/daemon/dist/domain/generated-file-hygiene.d.ts.map +1 -0
- package/daemon/dist/domain/generated-file-hygiene.js +145 -0
- package/daemon/dist/domain/generated-file-hygiene.js.map +1 -0
- package/daemon/dist/domain/install-planner.d.ts.map +1 -1
- package/daemon/dist/domain/install-planner.js +17 -0
- package/daemon/dist/domain/install-planner.js.map +1 -1
- package/daemon/dist/domain/managed-blocks.d.ts +1 -0
- package/daemon/dist/domain/managed-blocks.d.ts.map +1 -1
- package/daemon/dist/domain/managed-blocks.js +8 -2
- package/daemon/dist/domain/managed-blocks.js.map +1 -1
- package/daemon/dist/domain/markdown-address.d.ts.map +1 -1
- package/daemon/dist/domain/markdown-address.js +23 -6
- package/daemon/dist/domain/markdown-address.js.map +1 -1
- package/daemon/dist/domain/native-permission-store.d.ts +14 -0
- package/daemon/dist/domain/native-permission-store.d.ts.map +1 -1
- package/daemon/dist/domain/native-permission-store.js +168 -4
- package/daemon/dist/domain/native-permission-store.js.map +1 -1
- package/daemon/dist/domain/native-process-executable.d.ts +4 -0
- package/daemon/dist/domain/native-process-executable.d.ts.map +1 -0
- package/daemon/dist/domain/native-process-executable.js +53 -0
- package/daemon/dist/domain/native-process-executable.js.map +1 -0
- package/daemon/dist/domain/native-process-lineage.d.ts +2 -0
- package/daemon/dist/domain/native-process-lineage.d.ts.map +1 -1
- package/daemon/dist/domain/native-process-lineage.js +70 -8
- package/daemon/dist/domain/native-process-lineage.js.map +1 -1
- package/daemon/dist/domain/native-resume-probe.d.ts +3 -1
- package/daemon/dist/domain/native-resume-probe.d.ts.map +1 -1
- package/daemon/dist/domain/native-resume-probe.js +38 -7
- package/daemon/dist/domain/native-resume-probe.js.map +1 -1
- package/daemon/dist/domain/node-inventory.d.ts +2 -2
- package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
- package/daemon/dist/domain/node-inventory.js +30 -4
- package/daemon/dist/domain/node-inventory.js.map +1 -1
- package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/node-launcher.js +1 -0
- package/daemon/dist/domain/node-launcher.js.map +1 -1
- package/daemon/dist/domain/pane-binding-observation.d.ts +1 -0
- package/daemon/dist/domain/pane-binding-observation.d.ts.map +1 -1
- package/daemon/dist/domain/pane-binding-observation.js +3 -1
- package/daemon/dist/domain/pane-binding-observation.js.map +1 -1
- package/daemon/dist/domain/permission-policy/policy-ref.d.ts +6 -1
- package/daemon/dist/domain/permission-policy/policy-ref.d.ts.map +1 -1
- package/daemon/dist/domain/permission-policy/policy-ref.js +16 -4
- package/daemon/dist/domain/permission-policy/policy-ref.js.map +1 -1
- package/daemon/dist/domain/permission-policy/policy-spec.d.ts +1 -1
- package/daemon/dist/domain/permission-policy/policy-spec.d.ts.map +1 -1
- package/daemon/dist/domain/permission-policy/policy-spec.js +2 -2
- package/daemon/dist/domain/permission-policy/policy-spec.js.map +1 -1
- package/daemon/dist/domain/plugin-vendor-service.d.ts +6 -0
- package/daemon/dist/domain/plugin-vendor-service.d.ts.map +1 -1
- package/daemon/dist/domain/plugin-vendor-service.js +12 -0
- package/daemon/dist/domain/plugin-vendor-service.js.map +1 -1
- package/daemon/dist/domain/profile-resolver.d.ts +3 -2
- package/daemon/dist/domain/profile-resolver.d.ts.map +1 -1
- package/daemon/dist/domain/profile-resolver.js +71 -9
- package/daemon/dist/domain/profile-resolver.js.map +1 -1
- package/daemon/dist/domain/projection-planner.d.ts +11 -0
- package/daemon/dist/domain/projection-planner.d.ts.map +1 -1
- package/daemon/dist/domain/projection-planner.js +1 -1
- package/daemon/dist/domain/projection-planner.js.map +1 -1
- package/daemon/dist/domain/ps-projection.d.ts +11 -9
- package/daemon/dist/domain/ps-projection.d.ts.map +1 -1
- package/daemon/dist/domain/ps-projection.js +15 -12
- package/daemon/dist/domain/ps-projection.js.map +1 -1
- package/daemon/dist/domain/queue-repository.d.ts +2 -0
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +75 -24
- package/daemon/dist/domain/queue-repository.js.map +1 -1
- package/daemon/dist/domain/queue-retention.d.ts +2 -2
- package/daemon/dist/domain/queue-retention.js +4 -4
- package/daemon/dist/domain/queue-transition-log.d.ts.map +1 -1
- package/daemon/dist/domain/queue-transition-log.js +12 -10
- package/daemon/dist/domain/queue-transition-log.js.map +1 -1
- package/daemon/dist/domain/queue-wait-backoff.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wait-backoff.js +6 -2
- package/daemon/dist/domain/queue-wait-backoff.js.map +1 -1
- package/daemon/dist/domain/queue-waiting.d.ts.map +1 -1
- package/daemon/dist/domain/queue-waiting.js +7 -2
- package/daemon/dist/domain/queue-waiting.js.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.d.ts +15 -2
- package/daemon/dist/domain/queue-wake-ladder.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.js +29 -6
- package/daemon/dist/domain/queue-wake-ladder.js.map +1 -1
- package/daemon/dist/domain/readiness-timeout.d.ts +7 -0
- package/daemon/dist/domain/readiness-timeout.d.ts.map +1 -0
- package/daemon/dist/domain/readiness-timeout.js +19 -0
- package/daemon/dist/domain/readiness-timeout.js.map +1 -0
- package/daemon/dist/domain/rehydrate-eligibility.d.ts.map +1 -1
- package/daemon/dist/domain/rehydrate-eligibility.js +5 -2
- package/daemon/dist/domain/rehydrate-eligibility.js.map +1 -1
- package/daemon/dist/domain/reply-to-choice.d.ts +6 -2
- package/daemon/dist/domain/reply-to-choice.d.ts.map +1 -1
- package/daemon/dist/domain/reply-to-choice.js +9 -6
- package/daemon/dist/domain/reply-to-choice.js.map +1 -1
- package/daemon/dist/domain/request-phase-observer.d.ts +69 -0
- package/daemon/dist/domain/request-phase-observer.d.ts.map +1 -0
- package/daemon/dist/domain/request-phase-observer.js +206 -0
- package/daemon/dist/domain/request-phase-observer.js.map +1 -0
- package/daemon/dist/domain/restore-check-service.d.ts +5 -1
- package/daemon/dist/domain/restore-check-service.d.ts.map +1 -1
- package/daemon/dist/domain/restore-check-service.js +17 -3
- package/daemon/dist/domain/restore-check-service.js.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.d.ts +2 -0
- package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.js +58 -12
- package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
- package/daemon/dist/domain/rig-mode/operating-posture.d.ts +17 -1
- package/daemon/dist/domain/rig-mode/operating-posture.d.ts.map +1 -1
- package/daemon/dist/domain/rig-mode/operating-posture.js +53 -15
- package/daemon/dist/domain/rig-mode/operating-posture.js.map +1 -1
- package/daemon/dist/domain/rig-repository.d.ts +15 -6
- package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
- package/daemon/dist/domain/rig-repository.js +62 -10
- package/daemon/dist/domain/rig-repository.js.map +1 -1
- package/daemon/dist/domain/rig-teardown.d.ts.map +1 -1
- package/daemon/dist/domain/rig-teardown.js +12 -3
- package/daemon/dist/domain/rig-teardown.js.map +1 -1
- package/daemon/dist/domain/rigspec-codec.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-codec.js +2 -0
- package/daemon/dist/domain/rigspec-codec.js.map +1 -1
- package/daemon/dist/domain/rigspec-exporter.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-exporter.js +1 -0
- package/daemon/dist/domain/rigspec-exporter.js.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.d.ts +9 -3
- package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js +46 -13
- package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.d.ts +3 -2
- package/daemon/dist/domain/rigspec-preflight.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.js +24 -12
- package/daemon/dist/domain/rigspec-preflight.js.map +1 -1
- package/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-schema.js +24 -5
- package/daemon/dist/domain/rigspec-schema.js.map +1 -1
- package/daemon/dist/domain/route-timing-recorder.d.ts.map +1 -1
- package/daemon/dist/domain/route-timing-recorder.js +2 -0
- package/daemon/dist/domain/route-timing-recorder.js.map +1 -1
- package/daemon/dist/domain/runtime-adapter.d.ts +12 -3
- package/daemon/dist/domain/runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/runtime-adapter.js +1 -0
- package/daemon/dist/domain/runtime-adapter.js.map +1 -1
- package/daemon/dist/domain/seat-activity-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-activity-service.js +16 -6
- package/daemon/dist/domain/seat-activity-service.js.map +1 -1
- package/daemon/dist/domain/seat-attention-reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/seat-attention-reconciler.js +10 -4
- package/daemon/dist/domain/seat-attention-reconciler.js.map +1 -1
- package/daemon/dist/domain/seat-handover-service.d.ts +2 -0
- package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-handover-service.js +14 -8
- package/daemon/dist/domain/seat-handover-service.js.map +1 -1
- package/daemon/dist/domain/seat-launch-environment.d.ts.map +1 -1
- package/daemon/dist/domain/seat-launch-environment.js +4 -0
- package/daemon/dist/domain/seat-launch-environment.js.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.d.ts +4 -0
- package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.js +4 -0
- package/daemon/dist/domain/seat-lifecycle-service.js.map +1 -1
- package/daemon/dist/domain/seat-status-service.d.ts +2 -1
- package/daemon/dist/domain/seat-status-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-status-service.js +6 -4
- package/daemon/dist/domain/seat-status-service.js.map +1 -1
- package/daemon/dist/domain/service-orchestrator.d.ts +1 -0
- package/daemon/dist/domain/service-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/service-orchestrator.js +4 -0
- package/daemon/dist/domain/service-orchestrator.js.map +1 -1
- package/daemon/dist/domain/session-jsonl.d.ts.map +1 -1
- package/daemon/dist/domain/session-jsonl.js +10 -4
- package/daemon/dist/domain/session-jsonl.js.map +1 -1
- package/daemon/dist/domain/session-transport.d.ts +9 -20
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +198 -44
- package/daemon/dist/domain/session-transport.js.map +1 -1
- package/daemon/dist/domain/skill-audit.d.ts +19 -0
- package/daemon/dist/domain/skill-audit.d.ts.map +1 -1
- package/daemon/dist/domain/skill-audit.js +97 -5
- package/daemon/dist/domain/skill-audit.js.map +1 -1
- package/daemon/dist/domain/skill-catalog.d.ts +19 -0
- package/daemon/dist/domain/skill-catalog.d.ts.map +1 -1
- package/daemon/dist/domain/skill-catalog.js +175 -17
- package/daemon/dist/domain/skill-catalog.js.map +1 -1
- package/daemon/dist/domain/skill-discovery.d.ts +1 -1
- package/daemon/dist/domain/skill-discovery.d.ts.map +1 -1
- package/daemon/dist/domain/skill-discovery.js +6 -0
- package/daemon/dist/domain/skill-discovery.js.map +1 -1
- package/daemon/dist/domain/skill-mirror-drift.d.ts +6 -1
- package/daemon/dist/domain/skill-mirror-drift.d.ts.map +1 -1
- package/daemon/dist/domain/skill-mirror-drift.js +23 -12
- package/daemon/dist/domain/skill-mirror-drift.js.map +1 -1
- package/daemon/dist/domain/slow-op-recorder.d.ts +5 -0
- package/daemon/dist/domain/slow-op-recorder.d.ts.map +1 -1
- package/daemon/dist/domain/slow-op-recorder.js +34 -1
- package/daemon/dist/domain/slow-op-recorder.js.map +1 -1
- package/daemon/dist/domain/snapshot-repository.d.ts.map +1 -1
- package/daemon/dist/domain/snapshot-repository.js +12 -32
- package/daemon/dist/domain/snapshot-repository.js.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.d.ts +30 -5
- package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.js +143 -43
- package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
- package/daemon/dist/domain/startup-proof.d.ts +7 -0
- package/daemon/dist/domain/startup-proof.d.ts.map +1 -1
- package/daemon/dist/domain/startup-proof.js +7 -0
- package/daemon/dist/domain/startup-proof.js.map +1 -1
- package/daemon/dist/domain/startup-submission-evidence.d.ts +5 -1
- package/daemon/dist/domain/startup-submission-evidence.d.ts.map +1 -1
- package/daemon/dist/domain/startup-submission-evidence.js +19 -2
- package/daemon/dist/domain/startup-submission-evidence.js.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.d.ts +9 -3
- package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.js +12 -4
- package/daemon/dist/domain/successor-session-launcher.js.map +1 -1
- package/daemon/dist/domain/system-world.d.ts +3 -0
- package/daemon/dist/domain/system-world.d.ts.map +1 -1
- package/daemon/dist/domain/system-world.js +24 -21
- package/daemon/dist/domain/system-world.js.map +1 -1
- package/daemon/dist/domain/terminal/cmux-provider-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/cmux-provider-adapter.js +2 -3
- package/daemon/dist/domain/terminal/cmux-provider-adapter.js.map +1 -1
- package/daemon/dist/domain/terminal/herdr-adapter.d.ts +23 -5
- package/daemon/dist/domain/terminal/herdr-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/herdr-adapter.js +116 -15
- package/daemon/dist/domain/terminal/herdr-adapter.js.map +1 -1
- package/daemon/dist/domain/terminal/terminal-provider.d.ts +11 -0
- package/daemon/dist/domain/terminal/terminal-provider.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/terminal-service.d.ts +14 -0
- package/daemon/dist/domain/terminal/terminal-service.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/terminal-service.js +91 -10
- package/daemon/dist/domain/terminal/terminal-service.js.map +1 -1
- package/daemon/dist/domain/terminal/view-composer.d.ts +6 -0
- package/daemon/dist/domain/terminal/view-composer.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/view-composer.js +4 -2
- package/daemon/dist/domain/terminal/view-composer.js.map +1 -1
- package/daemon/dist/domain/topology/remote-up-leaf.d.ts +1 -0
- package/daemon/dist/domain/topology/remote-up-leaf.d.ts.map +1 -1
- package/daemon/dist/domain/topology/remote-up-leaf.js.map +1 -1
- package/daemon/dist/domain/transcript-store.d.ts.map +1 -1
- package/daemon/dist/domain/transcript-store.js +24 -11
- package/daemon/dist/domain/transcript-store.js.map +1 -1
- package/daemon/dist/domain/types.d.ts +8 -0
- package/daemon/dist/domain/types.d.ts.map +1 -1
- package/daemon/dist/domain/types.js.map +1 -1
- package/daemon/dist/domain/usage-samples-store.js +2 -2
- package/daemon/dist/domain/usage-samples-store.js.map +1 -1
- package/daemon/dist/domain/usage-series.d.ts.map +1 -1
- package/daemon/dist/domain/usage-series.js +42 -10
- package/daemon/dist/domain/usage-series.js.map +1 -1
- package/daemon/dist/domain/user-settings/settings-browser.d.ts.map +1 -1
- package/daemon/dist/domain/user-settings/settings-browser.js +2 -0
- package/daemon/dist/domain/user-settings/settings-browser.js.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.d.ts +1 -1
- package/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.js +14 -1
- package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
- package/daemon/dist/domain/watchdog-due.d.ts +17 -0
- package/daemon/dist/domain/watchdog-due.d.ts.map +1 -0
- package/daemon/dist/domain/watchdog-due.js +45 -0
- package/daemon/dist/domain/watchdog-due.js.map +1 -0
- package/daemon/dist/domain/watchdog-scheduler.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-scheduler.js +3 -7
- package/daemon/dist/domain/watchdog-scheduler.js.map +1 -1
- package/daemon/dist/domain/workflow-projector.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-projector.js +15 -5
- package/daemon/dist/domain/workflow-projector.js.map +1 -1
- package/daemon/dist/domain/workflow-runtime.d.ts +1 -1
- package/daemon/dist/domain/workflow-runtime.js +1 -1
- package/daemon/dist/domain/workflow-runtime.js.map +1 -1
- package/daemon/dist/domain/workflow-step-trail-log.d.ts +6 -0
- package/daemon/dist/domain/workflow-step-trail-log.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-step-trail-log.js +11 -0
- package/daemon/dist/domain/workflow-step-trail-log.js.map +1 -1
- package/daemon/dist/domain/workspace/project-catalog.d.ts +20 -0
- package/daemon/dist/domain/workspace/project-catalog.d.ts.map +1 -1
- package/daemon/dist/domain/workspace/project-catalog.js +92 -0
- package/daemon/dist/domain/workspace/project-catalog.js.map +1 -1
- package/daemon/dist/domain/workspace/project-registration.d.ts +49 -0
- package/daemon/dist/domain/workspace/project-registration.d.ts.map +1 -0
- package/daemon/dist/domain/workspace/project-registration.js +251 -0
- package/daemon/dist/domain/workspace/project-registration.js.map +1 -0
- package/daemon/dist/gateway-slack-surface.d.ts +1 -0
- package/daemon/dist/gateway-slack-surface.d.ts.map +1 -1
- package/daemon/dist/gateway-slack-surface.js +2 -1
- package/daemon/dist/gateway-slack-surface.js.map +1 -1
- package/daemon/dist/index.d.ts +1 -0
- package/daemon/dist/index.d.ts.map +1 -1
- package/daemon/dist/index.js +9 -8
- package/daemon/dist/index.js.map +1 -1
- package/daemon/dist/project-catalog-surface.d.ts +2 -1
- package/daemon/dist/project-catalog-surface.d.ts.map +1 -1
- package/daemon/dist/project-catalog-surface.js +1 -1
- package/daemon/dist/project-catalog-surface.js.map +1 -1
- package/daemon/dist/routes/agent-images.js +5 -5
- package/daemon/dist/routes/agent-images.js.map +1 -1
- package/daemon/dist/routes/bootstrap-failure-response.d.ts +13 -0
- package/daemon/dist/routes/bootstrap-failure-response.d.ts.map +1 -0
- package/daemon/dist/routes/bootstrap-failure-response.js +52 -0
- package/daemon/dist/routes/bootstrap-failure-response.js.map +1 -0
- package/daemon/dist/routes/bundles.d.ts.map +1 -1
- package/daemon/dist/routes/bundles.js +197 -449
- package/daemon/dist/routes/bundles.js.map +1 -1
- package/daemon/dist/routes/chat.d.ts.map +1 -1
- package/daemon/dist/routes/chat.js +16 -1
- package/daemon/dist/routes/chat.js.map +1 -1
- package/daemon/dist/routes/compaction.d.ts.map +1 -1
- package/daemon/dist/routes/compaction.js +14 -2
- package/daemon/dist/routes/compaction.js.map +1 -1
- package/daemon/dist/routes/env.d.ts.map +1 -1
- package/daemon/dist/routes/env.js +14 -4
- package/daemon/dist/routes/env.js.map +1 -1
- package/daemon/dist/routes/gateway.d.ts.map +1 -1
- package/daemon/dist/routes/gateway.js +5 -0
- package/daemon/dist/routes/gateway.js.map +1 -1
- package/daemon/dist/routes/projects.d.ts.map +1 -1
- package/daemon/dist/routes/projects.js +4 -2
- package/daemon/dist/routes/projects.js.map +1 -1
- package/daemon/dist/routes/restore-check.d.ts.map +1 -1
- package/daemon/dist/routes/restore-check.js +2 -0
- package/daemon/dist/routes/restore-check.js.map +1 -1
- package/daemon/dist/routes/rigs.d.ts.map +1 -1
- package/daemon/dist/routes/rigs.js +5 -4
- package/daemon/dist/routes/rigs.js.map +1 -1
- package/daemon/dist/routes/rigspec.js +4 -2
- package/daemon/dist/routes/rigspec.js.map +1 -1
- package/daemon/dist/routes/seat.js +23 -16
- package/daemon/dist/routes/seat.js.map +1 -1
- package/daemon/dist/routes/sessions.d.ts.map +1 -1
- package/daemon/dist/routes/sessions.js +12 -11
- package/daemon/dist/routes/sessions.js.map +1 -1
- package/daemon/dist/routes/skills.d.ts.map +1 -1
- package/daemon/dist/routes/skills.js +15 -7
- package/daemon/dist/routes/skills.js.map +1 -1
- package/daemon/dist/routes/telemetry.d.ts +2 -0
- package/daemon/dist/routes/telemetry.d.ts.map +1 -1
- package/daemon/dist/routes/telemetry.js +16 -0
- package/daemon/dist/routes/telemetry.js.map +1 -1
- package/daemon/dist/routes/terminal-ws.js +15 -2
- package/daemon/dist/routes/terminal-ws.js.map +1 -1
- package/daemon/dist/routes/terminal.d.ts.map +1 -1
- package/daemon/dist/routes/terminal.js +6 -4
- package/daemon/dist/routes/terminal.js.map +1 -1
- package/daemon/dist/routes/up.d.ts.map +1 -1
- package/daemon/dist/routes/up.js +12 -59
- package/daemon/dist/routes/up.js.map +1 -1
- package/daemon/dist/server.d.ts +1 -0
- package/daemon/dist/server.d.ts.map +1 -1
- package/daemon/dist/server.js +4 -1
- package/daemon/dist/server.js.map +1 -1
- package/daemon/dist/spec-validation-surface.d.ts +2 -0
- package/daemon/dist/spec-validation-surface.d.ts.map +1 -1
- package/daemon/dist/spec-validation-surface.js +2 -0
- package/daemon/dist/spec-validation-surface.js.map +1 -1
- package/daemon/dist/startup.d.ts.map +1 -1
- package/daemon/dist/startup.js +65 -18
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/dist/system-world-surface.d.ts +1 -1
- package/daemon/dist/system-world-surface.d.ts.map +1 -1
- package/daemon/dist/system-world-surface.js +1 -1
- package/daemon/dist/system-world-surface.js.map +1 -1
- package/daemon/dist/terminal/TerminalSessionBroker.d.ts.map +1 -1
- package/daemon/dist/terminal/TerminalSessionBroker.js +9 -1
- package/daemon/dist/terminal/TerminalSessionBroker.js.map +1 -1
- package/daemon/docs/reference/agent-spec.md +114 -68
- package/daemon/docs/reference/agent-startup-guide.md +111 -33
- package/daemon/docs/reference/agent-state-taxonomy.md +44 -13
- package/daemon/docs/reference/browser-access.md +8 -7
- package/daemon/docs/reference/bundle-formats.md +209 -0
- package/daemon/docs/reference/chain-file-convention.md +18 -9
- package/daemon/docs/reference/developing.md +8 -1
- package/daemon/docs/reference/edge-types.md +18 -10
- package/daemon/docs/reference/getting-started.md +593 -139
- package/daemon/docs/reference/health-diagnosis.md +14 -6
- package/daemon/docs/reference/help.md +66 -12
- package/daemon/docs/reference/host-resources.md +3 -2
- package/daemon/docs/reference/inventory-request-diagnostics.md +75 -0
- package/daemon/docs/reference/knowledge-maturity.md +3 -1
- package/daemon/docs/reference/legacy-topology-migration.md +4 -2
- package/daemon/docs/reference/lore-routing.md +3 -1
- package/daemon/docs/reference/mission-install.md +3 -1
- package/daemon/docs/reference/non-interruptive-mode.md +63 -0
- package/daemon/docs/reference/planning-dial.md +2 -1
- package/daemon/docs/reference/product-journey-sdlc.md +11 -6
- package/daemon/docs/reference/product-management-pass.md +3 -1
- package/daemon/docs/reference/project-workspace.md +81 -4
- package/daemon/docs/reference/publishing-a-rig-bundle.md +147 -0
- package/daemon/docs/reference/refocus-channel.md +28 -7
- package/daemon/docs/reference/release-boundary.md +7 -3
- package/daemon/docs/reference/rig-bundle.md +292 -43
- package/daemon/docs/reference/rig-spec.md +175 -26
- package/daemon/docs/reference/rosters.md +61 -0
- package/daemon/docs/reference/schemas/bundle-behaviour.v1.schema.json +546 -0
- package/daemon/docs/reference/schemas/bundle-common.v1.schema.json +110 -0
- package/daemon/docs/reference/schemas/bundle-configurations.v1.schema.json +67 -0
- package/daemon/docs/reference/schemas/bundle-status.v1.schema.json +323 -0
- package/daemon/docs/reference/schemas/fixtures/identity-vectors.json +80 -0
- package/daemon/docs/reference/schemas/fixtures/invalid/behaviour/not-generated-with-sections.json +60 -0
- package/daemon/docs/reference/schemas/fixtures/invalid/configurations/spaced-member.configurations.yaml +6 -0
- package/daemon/docs/reference/schemas/fixtures/invalid/registry/listed-with-withdrawn-on.yaml +21 -0
- package/daemon/docs/reference/schemas/fixtures/invalid/registry/missing-source.yaml +16 -0
- package/daemon/docs/reference/schemas/fixtures/invalid/registry/parent-folder.yaml +20 -0
- package/daemon/docs/reference/schemas/fixtures/invalid/registry/short-commit.yaml +20 -0
- package/daemon/docs/reference/schemas/fixtures/invalid/registry/withdrawn-without-date.yaml +20 -0
- package/daemon/docs/reference/schemas/fixtures/invalid/run-record/harness-check-with-configuration.json +75 -0
- package/daemon/docs/reference/schemas/fixtures/invalid/run-record/unlabelable-platform.json +97 -0
- package/daemon/docs/reference/schemas/fixtures/invalid/status/hand-edited-notice.json +61 -0
- package/daemon/docs/reference/schemas/fixtures/invalid/status/tested-with-assistance.json +62 -0
- package/daemon/docs/reference/schemas/fixtures/invalid/status/tested-without-records.json +59 -0
- package/daemon/docs/reference/schemas/fixtures/invalid/status/unavailable-harness-with-result.json +61 -0
- package/daemon/docs/reference/schemas/fixtures/invalid/status/unavailable-listing-with-label.json +61 -0
- package/daemon/docs/reference/schemas/fixtures/valid/behaviour/custom-not-generated.json +22 -0
- package/daemon/docs/reference/schemas/fixtures/valid/behaviour/legacy-archive-unknown-identity.json +53 -0
- package/daemon/docs/reference/schemas/fixtures/valid/behaviour/mixed-runtimes-default.json +101 -0
- package/daemon/docs/reference/schemas/fixtures/valid/behaviour/mixed-runtimes-yolo.json +102 -0
- package/daemon/docs/reference/schemas/fixtures/valid/behaviour/openrig-dev.recommended.json +258 -0
- package/daemon/docs/reference/schemas/fixtures/valid/configurations/openrig-dev.configurations.yaml +12 -0
- package/daemon/docs/reference/schemas/fixtures/valid/registry/openrig-dev.yaml +20 -0
- package/daemon/docs/reference/schemas/fixtures/valid/registry/withdrawn.yaml +21 -0
- package/daemon/docs/reference/schemas/fixtures/valid/run-record/pi-harness-check-blocked.json +74 -0
- package/daemon/docs/reference/schemas/fixtures/valid/run-record/team-assisted-pass.json +97 -0
- package/daemon/docs/reference/schemas/fixtures/valid/run-record/team-pass.json +97 -0
- package/daemon/docs/reference/schemas/fixtures/valid/run-record/withdraws-earlier.json +99 -0
- package/daemon/docs/reference/schemas/fixtures/valid/status/status.json +61 -0
- package/daemon/docs/reference/schemas/registry-entry.v1.schema.json +139 -0
- package/daemon/docs/reference/schemas/run-record.v1.schema.json +315 -0
- package/daemon/docs/reference/scoped-operating-posture.md +17 -9
- package/daemon/docs/reference/sdlc-conventions.md +46 -28
- package/daemon/docs/reference/slack-app-setup.md +112 -11
- package/daemon/docs/reference/stream-classifier-worker.md +21 -8
- package/daemon/docs/reference/telemetry.md +114 -0
- package/daemon/docs/reference/whats-new.md +134 -0
- package/daemon/docs/reference/worktree-builds.md +12 -6
- package/daemon/policies/builtin/auto.policy.md +24 -0
- package/daemon/specs/agents/development/implementer/agent.yaml +2 -2
- package/daemon/specs/agents/development/qa/agent.yaml +1 -1
- package/daemon/specs/agents/product-management/pm/agent.yaml +10 -0
- package/daemon/specs/agents/shared/skills/core/agent-starters/SKILL.md +0 -6
- package/daemon/specs/agents/shared/skills/core/agent-startup-and-context-ingestion/SKILL.md +1 -8
- package/daemon/specs/agents/shared/skills/core/openrig-architect/SKILL.md +5 -5
- package/daemon/specs/agents/shared/skills/core/openrig-skills/SKILL.md +4 -5
- package/daemon/specs/agents/shared/skills/core/openrig-software-factory/SKILL.md +31 -21
- package/daemon/specs/agents/shared/skills/core/openrig-software-factory/references/worked-example.md +31 -31
- package/daemon/specs/agents/shared/skills/core/openrig-upgrade/SKILL.md +2 -0
- package/daemon/specs/agents/shared/skills/core/rig-bundles-and-shareable-artifacts/SKILL.md +0 -1
- package/daemon/specs/agents/shared/skills/core/session-source-fork/SKILL.md +0 -5
- package/daemon/specs/agents/shared/skills/process/agent-browser/OPENRIG.md +1 -1
- package/daemon/specs/agents/shared/skills/process/systematic-debugging/SKILL.md +0 -2
- package/daemon/specs/rigs/focused/{adversarial-review → code-review}/rig.yaml +1 -1
- package/daemon/specs/rigs/focused/pm/CULTURE.md +21 -0
- package/daemon/specs/rigs/focused/{pm-team → pm}/rig.yaml +5 -5
- package/daemon/specs/rigs/focused/{research-team → research}/rig.yaml +1 -1
- package/daemon/specs/rigs/launch/factory/CULTURE.md +96 -0
- package/daemon/specs/rigs/launch/factory/guidance/advisor-role.md +10 -0
- package/daemon/specs/rigs/launch/factory/guidance/lead-first-move.md +83 -0
- package/daemon/specs/rigs/launch/{demo → factory}/rig.yaml +46 -35
- package/daemon/specs/rigs/{preview/product-team → launch/factory}/topology/instance/CRAFT.md +1 -1
- package/daemon/specs/rigs/{preview/product-team → launch/factory}/topology/rig/CRAFT.md +2 -2
- package/daemon/specs/rigs/{preview/product-team → launch/factory}/topology/rig/ORCHESTRATION-CRAFT.md +2 -2
- package/daemon/specs/rigs/{preview/product-team/topology/seats/dev1-qa → launch/factory/topology/seats/dev-qa}/CRAFT.md +1 -1
- package/daemon/specs/rigs/{preview/product-team/topology/seats/orch1-lead → launch/factory/topology/seats/orch-lead}/CRAFT.md +1 -1
- package/daemon/specs/rigs/{preview/product-team/topology/seats/rev1-r1 → launch/factory/topology/seats/review-r1}/CRAFT.md +1 -1
- package/daemon/specs/rigs/{preview/product-team/topology/seats/rev1-r2 → launch/factory/topology/seats/review-r2}/CRAFT.md +1 -1
- package/daemon/specs/rigs/launch/kernel/agents/advisor/lead/guidance/role.md +37 -0
- package/daemon/specs/rigs/launch/kernel/agents/advisor/lead/startup/context.md +12 -13
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +258 -9
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/startup/context.md +30 -7
- package/daemon/specs/rigs/launch/kernel/agents/queue/worker/guidance/role.md +37 -0
- package/daemon/specs/rigs/launch/kernel/culture/CULTURE.md +46 -2
- package/daemon/specs/rigs/launch/starter/CULTURE.md +39 -0
- package/daemon/specs/rigs/launch/starter/guidance/lead-first-move.md +67 -0
- package/daemon/specs/rigs/launch/{first-project-mixed → starter}/rig.yaml +11 -8
- package/dist/build-info.js +3 -3
- package/dist/bundle-behaviour.d.ts +10 -0
- package/dist/bundle-behaviour.d.ts.map +1 -0
- package/dist/bundle-behaviour.js +72 -0
- package/dist/bundle-behaviour.js.map +1 -0
- package/dist/cli-error.d.ts.map +1 -1
- package/dist/cli-error.js +11 -3
- package/dist/cli-error.js.map +1 -1
- package/dist/client.d.ts +2 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +2 -0
- package/dist/client.js.map +1 -1
- package/dist/commands/agent-image.js +2 -2
- package/dist/commands/agent-image.js.map +1 -1
- package/dist/commands/bootstrap.d.ts.map +1 -1
- package/dist/commands/bootstrap.js +30 -5
- package/dist/commands/bootstrap.js.map +1 -1
- package/dist/commands/bundle.d.ts +12 -0
- package/dist/commands/bundle.d.ts.map +1 -1
- package/dist/commands/bundle.js +288 -22
- package/dist/commands/bundle.js.map +1 -1
- package/dist/commands/capture.js +4 -4
- package/dist/commands/capture.js.map +1 -1
- package/dist/commands/chatroom.d.ts.map +1 -1
- package/dist/commands/chatroom.js +21 -1
- package/dist/commands/chatroom.js.map +1 -1
- package/dist/commands/compact-plan.js +2 -2
- package/dist/commands/compact-plan.js.map +1 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +3 -0
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/context.d.ts +3 -1
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +70 -20
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/daemon.js +1 -1
- package/dist/commands/daemon.js.map +1 -1
- package/dist/commands/doctor.d.ts +3 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +17 -5
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/down.d.ts.map +1 -1
- package/dist/commands/down.js +49 -1
- package/dist/commands/down.js.map +1 -1
- package/dist/commands/env.js +1 -1
- package/dist/commands/env.js.map +1 -1
- package/dist/commands/gateway.d.ts.map +1 -1
- package/dist/commands/gateway.js +4 -3
- package/dist/commands/gateway.js.map +1 -1
- package/dist/commands/health.d.ts.map +1 -1
- package/dist/commands/health.js +4 -1
- package/dist/commands/health.js.map +1 -1
- package/dist/commands/host.d.ts +11 -0
- package/dist/commands/host.d.ts.map +1 -1
- package/dist/commands/host.js +25 -1
- package/dist/commands/host.js.map +1 -1
- package/dist/commands/import.d.ts.map +1 -1
- package/dist/commands/import.js +2 -0
- package/dist/commands/import.js.map +1 -1
- package/dist/commands/mcp.d.ts.map +1 -1
- package/dist/commands/mcp.js +25 -12
- package/dist/commands/mcp.js.map +1 -1
- package/dist/commands/package.d.ts.map +1 -1
- package/dist/commands/package.js +6 -3
- package/dist/commands/package.js.map +1 -1
- package/dist/commands/policy.d.ts.map +1 -1
- package/dist/commands/policy.js +9 -7
- package/dist/commands/policy.js.map +1 -1
- package/dist/commands/project-jev.js +1 -1
- package/dist/commands/project-jev.js.map +1 -1
- package/dist/commands/project.d.ts.map +1 -1
- package/dist/commands/project.js +5 -3
- package/dist/commands/project.js.map +1 -1
- package/dist/commands/ps.d.ts +1 -0
- package/dist/commands/ps.d.ts.map +1 -1
- package/dist/commands/ps.js +12 -2
- package/dist/commands/ps.js.map +1 -1
- package/dist/commands/queue.d.ts.map +1 -1
- package/dist/commands/queue.js +10 -5
- package/dist/commands/queue.js.map +1 -1
- package/dist/commands/restore-packet.d.ts.map +1 -1
- package/dist/commands/restore-packet.js +6 -4
- package/dist/commands/restore-packet.js.map +1 -1
- package/dist/commands/restore.d.ts.map +1 -1
- package/dist/commands/restore.js +5 -0
- package/dist/commands/restore.js.map +1 -1
- package/dist/commands/roster.d.ts +63 -0
- package/dist/commands/roster.d.ts.map +1 -0
- package/dist/commands/roster.js +169 -0
- package/dist/commands/roster.js.map +1 -0
- package/dist/commands/scope.js +5 -5
- package/dist/commands/scope.js.map +1 -1
- package/dist/commands/seat.d.ts.map +1 -1
- package/dist/commands/seat.js +57 -8
- package/dist/commands/seat.js.map +1 -1
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +20 -6
- package/dist/commands/send.js.map +1 -1
- package/dist/commands/setup.d.ts +7 -16
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +174 -338
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/skill.d.ts.map +1 -1
- package/dist/commands/skill.js +6 -1
- package/dist/commands/skill.js.map +1 -1
- package/dist/commands/slack.d.ts +6 -2
- package/dist/commands/slack.d.ts.map +1 -1
- package/dist/commands/slack.js +192 -10
- package/dist/commands/slack.js.map +1 -1
- package/dist/commands/specs.d.ts.map +1 -1
- package/dist/commands/specs.js +19 -2
- package/dist/commands/specs.js.map +1 -1
- package/dist/commands/start.js +1 -1
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/stream.js +1 -1
- package/dist/commands/stream.js.map +1 -1
- package/dist/commands/telemetry.d.ts +5 -0
- package/dist/commands/telemetry.d.ts.map +1 -0
- package/dist/commands/telemetry.js +58 -0
- package/dist/commands/telemetry.js.map +1 -0
- package/dist/commands/terminal.d.ts +33 -0
- package/dist/commands/terminal.d.ts.map +1 -1
- package/dist/commands/terminal.js +30 -12
- package/dist/commands/terminal.js.map +1 -1
- package/dist/commands/tui.js +4 -4
- package/dist/commands/tui.js.map +1 -1
- package/dist/commands/up.d.ts.map +1 -1
- package/dist/commands/up.js +115 -68
- package/dist/commands/up.js.map +1 -1
- package/dist/commands/whoami.d.ts +3 -0
- package/dist/commands/whoami.d.ts.map +1 -1
- package/dist/commands/whoami.js +29 -2
- package/dist/commands/whoami.js.map +1 -1
- package/dist/commands/workflow-follow.d.ts +1 -1
- package/dist/commands/workflow-follow.d.ts.map +1 -1
- package/dist/commands/workflow-follow.js +4 -3
- package/dist/commands/workflow-follow.js.map +1 -1
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +30 -18
- package/dist/commands/workflow.js.map +1 -1
- package/dist/config-store.d.ts +5 -1
- package/dist/config-store.d.ts.map +1 -1
- package/dist/config-store.js +17 -2
- package/dist/config-store.js.map +1 -1
- package/dist/daemon-auto-start.d.ts +8 -0
- package/dist/daemon-auto-start.d.ts.map +1 -0
- package/dist/daemon-auto-start.js +39 -0
- package/dist/daemon-auto-start.js.map +1 -0
- package/dist/front-door.d.ts.map +1 -1
- package/dist/front-door.js +5 -2
- package/dist/front-door.js.map +1 -1
- package/dist/herdr-launch-config.d.ts +3 -0
- package/dist/herdr-launch-config.d.ts.map +1 -0
- package/dist/herdr-launch-config.js +37 -0
- package/dist/herdr-launch-config.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/bundle-check.d.ts +13 -0
- package/dist/lib/bundle-check.d.ts.map +1 -0
- package/dist/lib/bundle-check.js +191 -0
- package/dist/lib/bundle-check.js.map +1 -0
- package/dist/lib/bundle-configuration.d.ts +60 -0
- package/dist/lib/bundle-configuration.d.ts.map +1 -0
- package/dist/lib/bundle-configuration.js +198 -0
- package/dist/lib/bundle-configuration.js.map +1 -0
- package/dist/lib/bundle-source.d.ts +59 -0
- package/dist/lib/bundle-source.d.ts.map +1 -0
- package/dist/lib/bundle-source.js +366 -0
- package/dist/lib/bundle-source.js.map +1 -0
- package/dist/lib/context-git.d.ts +2 -0
- package/dist/lib/context-git.d.ts.map +1 -1
- package/dist/lib/context-git.js +55 -5
- package/dist/lib/context-git.js.map +1 -1
- package/dist/lib/context-install.d.ts.map +1 -1
- package/dist/lib/context-install.js +2 -3
- package/dist/lib/context-install.js.map +1 -1
- package/dist/lib/permission-policy/policy-ref.d.ts +6 -1
- package/dist/lib/permission-policy/policy-ref.d.ts.map +1 -1
- package/dist/lib/permission-policy/policy-ref.js +16 -4
- package/dist/lib/permission-policy/policy-ref.js.map +1 -1
- package/dist/lib/permission-policy/policy-spec.d.ts +1 -1
- package/dist/lib/permission-policy/policy-spec.d.ts.map +1 -1
- package/dist/lib/permission-policy/policy-spec.js +2 -2
- package/dist/lib/permission-policy/policy-spec.js.map +1 -1
- package/dist/lib/scope/scope-fs.d.ts +3 -2
- package/dist/lib/scope/scope-fs.d.ts.map +1 -1
- package/dist/lib/scope/scope-fs.js +97 -9
- package/dist/lib/scope/scope-fs.js.map +1 -1
- package/dist/lib/scope/templates.d.ts.map +1 -1
- package/dist/lib/scope/templates.js +28 -23
- package/dist/lib/scope/templates.js.map +1 -1
- package/dist/lib/scope-templates/notes.md +1 -1
- package/dist/lib/work-install.d.ts +12 -0
- package/dist/lib/work-install.d.ts.map +1 -1
- package/dist/lib/work-install.js +55 -4
- package/dist/lib/work-install.js.map +1 -1
- package/dist/provider-auth.d.ts +32 -0
- package/dist/provider-auth.d.ts.map +1 -0
- package/dist/provider-auth.js +128 -0
- package/dist/provider-auth.js.map +1 -0
- package/dist/terminal-window.d.ts +19 -0
- package/dist/terminal-window.d.ts.map +1 -0
- package/dist/terminal-window.js +513 -0
- package/dist/terminal-window.js.map +1 -0
- package/package.json +1 -1
- package/tui/dist/commands/registry.d.ts.map +1 -1
- package/tui/dist/commands/registry.js +9 -4
- package/tui/dist/commands/registry.js.map +1 -1
- package/tui/dist/config/config-model.d.ts.map +1 -1
- package/tui/dist/config/config-model.js +1 -0
- package/tui/dist/config/config-model.js.map +1 -1
- package/tui/dist/connections/connections-model.d.ts +5 -0
- package/tui/dist/connections/connections-model.d.ts.map +1 -1
- package/tui/dist/connections/connections-model.js +1 -1
- package/tui/dist/connections/connections-model.js.map +1 -1
- package/tui/dist/daemon-client.d.ts +6 -0
- package/tui/dist/daemon-client.d.ts.map +1 -1
- package/tui/dist/daemon-client.js +5 -2
- package/tui/dist/daemon-client.js.map +1 -1
- package/tui/dist/execution/workflow-model.d.ts.map +1 -1
- package/tui/dist/execution/workflow-model.js +3 -1
- package/tui/dist/execution/workflow-model.js.map +1 -1
- package/tui/dist/hydrate.d.ts +1 -1
- package/tui/dist/hydrate.d.ts.map +1 -1
- package/tui/dist/hydrate.js +3 -1
- package/tui/dist/hydrate.js.map +1 -1
- package/tui/dist/main.js +53 -14
- package/tui/dist/main.js.map +1 -1
- package/tui/dist/page-read.js +1 -1
- package/tui/dist/page-read.js.map +1 -1
- package/tui/dist/pending-address.d.ts +7 -0
- package/tui/dist/pending-address.d.ts.map +1 -0
- package/tui/dist/pending-address.js +11 -0
- package/tui/dist/pending-address.js.map +1 -0
- package/tui/dist/render.d.ts.map +1 -1
- package/tui/dist/render.js +74 -23
- package/tui/dist/render.js.map +1 -1
- package/tui/dist/socket-server.d.ts +3 -1
- package/tui/dist/socket-server.d.ts.map +1 -1
- package/tui/dist/socket-server.js +6 -0
- package/tui/dist/socket-server.js.map +1 -1
- package/tui/dist/specs/graph.d.ts +5 -0
- package/tui/dist/specs/graph.d.ts.map +1 -0
- package/tui/dist/specs/graph.js +16 -0
- package/tui/dist/specs/graph.js.map +1 -0
- package/tui/dist/specs/launch.d.ts +29 -0
- package/tui/dist/specs/launch.d.ts.map +1 -0
- package/tui/dist/specs/launch.js +64 -0
- package/tui/dist/specs/launch.js.map +1 -0
- package/tui/dist/startup.d.ts.map +1 -1
- package/tui/dist/startup.js +15 -6
- package/tui/dist/startup.js.map +1 -1
- package/tui/dist/state.d.ts +2 -2
- package/tui/dist/state.d.ts.map +1 -1
- package/tui/dist/state.js +77 -27
- package/tui/dist/state.js.map +1 -1
- package/tui/dist/stylize.js +1 -1
- package/tui/dist/stylize.js.map +1 -1
- package/tui/dist/terminals/open-window.d.ts +5 -0
- package/tui/dist/terminals/open-window.d.ts.map +1 -0
- package/tui/dist/terminals/open-window.js +55 -0
- package/tui/dist/terminals/open-window.js.map +1 -0
- package/tui/dist/terminals/terminal-model.d.ts +1 -0
- package/tui/dist/terminals/terminal-model.d.ts.map +1 -1
- package/tui/dist/terminals/terminal-model.js +21 -5
- package/tui/dist/terminals/terminal-model.js.map +1 -1
- package/tui/dist/types.d.ts +32 -0
- package/tui/dist/types.d.ts.map +1 -1
- package/ui/dist/assets/{index-HHSvwF97.js → index-D5n8EwkG.js} +1 -1
- package/ui/dist/index.html +1 -1
- package/daemon/specs/rigs/launch/conveyor/README.md +0 -33
- package/daemon/specs/rigs/launch/conveyor/rig.yaml +0 -72
- package/daemon/specs/rigs/launch/demo/project-example/README.md +0 -25
- package/daemon/specs/rigs/launch/demo/project-example/missions/improve-onboarding/SPEC.md +0 -19
- package/daemon/specs/rigs/launch/demo/project-example/missions/improve-onboarding/slices/01-shorten-first-run/PROGRESS.md +0 -6
- package/daemon/specs/rigs/launch/demo/project-example/missions/improve-onboarding/slices/01-shorten-first-run/PROOF.md +0 -7
- package/daemon/specs/rigs/launch/demo/project-example/missions/improve-onboarding/slices/01-shorten-first-run/SPEC.md +0 -31
- package/daemon/specs/rigs/launch/first-project/rig.yaml +0 -31
- package/daemon/specs/rigs/launch/first-project-claude/rig.yaml +0 -30
- package/daemon/specs/rigs/launch/implementation-pair/rig.yaml +0 -27
- package/daemon/specs/rigs/preview/product-team/rig.yaml +0 -90
- /package/daemon/specs/rigs/launch/factory-rsi/{rig.yaml → world-bundle.yaml} +0 -0
|
@@ -620,4 +620,4 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
620
620
|
`).trim();return a.length>0?a:null}function vEe({missionId:e}){const t=qT(e),{known:n,isLocal:s}=sd(),a=rd()&&t.data&&"missionPath"in t.data?t.data.missionPath:null,o=Yl(a,"MISSION_BRIEF.md");if(n&&!s)return i.jsx("div",{"data-testid":`portfolio-glance-remote-gated-${e}`,className:"font-mono text-[11px] text-on-surface-variant",children:"Local files not shown — the steering glance reads MISSION_BRIEF.md from the selected host's filesystem, which the remote read view does not browse."});if(!n||t.isLoading||o.isLoading)return i.jsx("div",{"data-testid":`portfolio-glance-loading-${e}`,className:"font-mono text-[11px] text-on-surface-variant",children:"Loading steering…"});if(o.unavailable||!o.content)return i.jsx("div",{"data-testid":`portfolio-glance-empty-${e}`,className:"font-mono text-[11px] text-on-surface-variant",children:"No MISSION_BRIEF.md at this mission root yet — the steering glance projects here once it is briefed."});const c=H8(o.content,"Building"),d=H8(o.content,"Needs you");return!c&&!d?i.jsx("div",{"data-testid":`portfolio-glance-thin-${e}`,className:"font-mono text-[11px] text-on-surface-variant",children:"MISSION_BRIEF.md has no Building / Needs-you sections yet."}):i.jsxs("div",{"data-testid":`portfolio-glance-${e}`,className:"space-y-2",children:[c?i.jsxs("div",{children:[i.jsx("div",{className:"mb-0.5 font-mono text-[9px] uppercase tracking-[0.16em] text-on-surface-variant",children:"Building"}),i.jsx(Zn,{content:c,hideFrontmatter:!0,hideRawToggle:!0})]}):null,d?i.jsxs("div",{children:[i.jsx("div",{className:"mb-0.5 font-mono text-[9px] uppercase tracking-[0.16em] text-on-surface-variant",children:"Needs you"}),i.jsx(Zn,{content:d,hideFrontmatter:!0,hideRawToggle:!0})]}):null]})}function yEe({mission:e,expanded:t,onToggle:n}){const s=LC(e),r=e.slices.length,a=e.slices.filter(c=>c.hasProofPacket).length,o=e.slices.filter(c=>c.status==="active").length;return i.jsxs("article",{"data-testid":`portfolio-mission-${e.id}`,className:"border border-outline-variant bg-surface-lowest/35 backdrop-blur-sm",children:[i.jsxs("div",{className:"flex items-stretch",children:[i.jsxs("button",{type:"button",onClick:n,"aria-expanded":t,"data-testid":`portfolio-toggle-${e.id}`,className:"flex flex-1 items-start gap-3 px-4 py-3 text-left hover:bg-surface-lowest/50",children:[i.jsx("span",{"aria-hidden":!0,className:ce("mt-0.5 font-mono text-[12px] text-on-surface-variant transition-transform",t&&"rotate-90 text-on-surface-variant"),children:"▸"}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[i.jsx("span",{className:"font-mono text-[13px] uppercase tracking-[0.06em] text-on-surface",children:e.label}),i.jsx(IF,{status:e.status,label:e.statusLabel})]}),i.jsxs("div",{className:"mt-1 font-mono text-[10px] uppercase tracking-[0.06em] text-on-surface-variant",children:[a," proven · ",o," active · ",r," slice",r===1?"":"s"," · ",xEe(s)]})]})]}),i.jsx(Ve,{to:"/project/mission/$missionId",params:{missionId:e.id},"data-testid":`portfolio-open-${e.id}`,className:"flex shrink-0 items-center border-l border-outline-variant px-3 font-mono text-[10px] uppercase tracking-[0.08em] text-on-surface-variant hover:bg-surface-lowest/50 hover:text-on-surface",children:"Open →"})]}),t?i.jsxs("div",{className:"border-t border-outline-variant bg-surface-lowest/20 px-4 py-3",children:[i.jsx("div",{className:"mb-1 font-mono text-[9px] uppercase tracking-[0.16em] text-on-surface-variant",children:"Steering glance · MISSION_BRIEF.md"}),i.jsx(vEe,{missionId:e.id})]}):null]})}function bEe(){const{data:e,isLoading:t}=Zf("all"),n=C.useMemo(()=>{if(!e||"unavailable"in e)return[];const a=new Map;for(const c of e.slices){const d=KF(c),h=d.missionId??d.railItem??"unsorted";a.has(h)||a.set(h,[]),a.get(h).push(d)}const o=e.missions??{};return Array.from(a.entries()).map(([c,d])=>{var m,f;const h=ox(((m=o[c])==null?void 0:m.authoredStatus)??null,d,void 0,(f=o[c])==null?void 0:f.readiness);return{id:c,label:c==="unsorted"?"Unsorted":c,status:h.state,statusLabel:h.label,statusSource:h.source,slices:d}}).sort(OC)},[e]),[s,r]=C.useState(()=>new Set);return t?i.jsx(Ae,{label:"LOADING WORKSPACE",description:"Reading the mission index.",variant:"card",testId:"portfolio-loading"}):e&&"unavailable"in e?i.jsx(Ae,{label:"WORKSPACE INDEX UNAVAILABLE",description:e.hint??"The slice index is not available from the configured workspace.",variant:"card",testId:"portfolio-unavailable"}):n.length===0?i.jsx(Ae,{label:"NO MISSIONS YET",description:"No missions are indexed in this workspace. Missions appear here as you create them; each row opens to its steering glance.",variant:"card",testId:"portfolio-empty"}):i.jsxs("div",{"data-testid":"workspace-portfolio",className:"space-y-3",children:[i.jsxs("div",{className:"flex items-baseline justify-between",children:[i.jsx(ct,{children:"Portfolio · all missions"}),i.jsxs("span",{className:"font-mono text-[10px] uppercase tracking-[0.06em] text-on-surface-variant",children:[n.length," mission",n.length===1?"":"s"," · most recently modified"]})]}),i.jsx("div",{className:"space-y-2",children:n.map(a=>i.jsx(yEe,{mission:a,expanded:s.has(a.id),onToggle:()=>r(o=>{const c=new Set(o);return c.has(a.id)?c.delete(a.id):c.add(a.id),c})},a.id))})]})}const _Ee=[{id:"overview",label:"Overview"},{id:"story",label:"Story"},{id:"progress",label:"Progress"},{id:"artifacts",label:"Artifacts"},{id:"proof",label:"Proof"},{id:"queue",label:"Queue"},{id:"topology",label:"Workflow"}],wEe=[{id:"overview",label:"Overview"},{id:"steering",label:"Steering"},{id:"review",label:"Review"},{id:"story",label:"Story"},{id:"progress",label:"Progress"},{id:"artifacts",label:"Artifacts"},{id:"proof",label:"Proof"},{id:"queue",label:"Queue"},{id:"topology",label:"Workflow"}],sC=[{id:"review",label:"Review"},{id:"story",label:"Story"},{id:"overview",label:"Overview"},{id:"progress",label:"Progress"},{id:"artifacts",label:"Artifacts"},{id:"proof",label:"Proof"},{id:"queue",label:"Queue"},{id:"topology",label:"Workflow"}];function SEe({tabs:e,active:t,onSelect:n}){return i.jsx("div",{role:"tablist","data-testid":"project-tab-nav",className:"flex gap-1 border-b border-outline-variant mb-6 overflow-x-auto",children:e.map(s=>i.jsx("button",{type:"button",role:"tab","aria-selected":t===s.id,"data-testid":`project-tab-${s.id}`,"data-active":t===s.id,onClick:()=>n(s.id),className:ce("px-3 py-2 font-mono text-[10px] uppercase tracking-[0.18em] border-b-2 -mb-px shrink-0",t===s.id?"border-on-surface text-on-surface":"border-transparent text-on-surface-variant hover:text-on-surface"),children:s.label},s.id))})}function UW({testId:e}){return i.jsx("div",{"data-testid":e,className:"font-mono text-[11px] text-on-surface-variant",children:"Resolving host selection…"})}function VW({testId:e}){return i.jsx(Ae,{label:"REVIEW NOT AVAILABLE FOR REMOTE HOSTS",description:"Review composition reads this host's local records. Select the local host to review local work; remote review lands with the MH-3/MH-4 acting lanes.",variant:"card",testId:e})}function uf({eyebrow:e,title:t,hostChip:n,tabs:s,active:r,onSelect:a,children:o}){const c=WR();return i.jsx(GR,{cap:c,children:i.jsxs("div",{className:"mx-auto w-full max-w-[1200px] px-6 py-8",children:[i.jsxs("header",{className:"border-b border-outline-variant pb-4 mb-4",children:[i.jsx(ct,{tone:"muted",children:e}),i.jsxs("h1",{className:"font-headline text-headline-md font-bold tracking-tight uppercase text-on-surface mt-1",children:[t,n?i.jsxs("span",{"data-testid":"scope-host-chip",className:"ml-3 inline-flex translate-y-[-0.15em] items-center bg-inverse-surface px-2 py-0.5 align-middle font-mono text-[11px] font-bold uppercase tracking-[0.14em] text-background",children:["on ",n]}):null]})]}),i.jsx(SEe,{tabs:s,active:r,onSelect:a}),i.jsx("div",{role:"tabpanel","data-testid":"project-tab-panel",children:o})]})})}function WW({label:e,description:t}){return i.jsx(Ae,{label:e,description:t??"Phase 5 polish.",variant:"card",testId:`project-tab-placeholder-${e.toLowerCase()}`})}function jEe(e){return e.missionId??e.railItem??"unsorted"}function NEe(e,t){return t?e.filter(n=>jEe(n)===t):e}function GW(e,t){const n=Zf("all"),s=C.useMemo(()=>!n.data||"unavailable"in n.data?[]:NEe(n.data.slices,e),[n.data,e]),r=RF(t?s.map(c=>c.name):[]),a=C.useMemo(()=>{const c=new Set;for(const d of r.itemsByName.values())Array.isArray(d.qitemIds)&&d.qitemIds.forEach(h=>c.add(h));return Array.from(c).sort()},[r.itemsByName]),o=ME(t?a:[]);return{list:n,rows:s,details:r,qitemIds:a,queueItems:o}}function kEe({rows:e,detailsByName:t,isLoading:n}){return n&&e.length===0?i.jsx(WW,{label:"LOADING PROGRESS",description:"Reading scoped slice progress."}):e.length===0?i.jsx(Ae,{label:"NO SCOPED SLICES",description:"No slices are indexed for this scope.",variant:"card",testId:"scope-progress-empty"}):i.jsx("div",{"data-testid":"scope-progress-rollup",className:"space-y-3",children:e.map(s=>{const r=t.get(s.name);return i.jsxs("article",{className:"border border-outline-variant bg-surface-lowest/35 p-3 backdrop-blur-sm",children:[i.jsx("div",{className:"flex items-start justify-between gap-3 border-b border-outline-variant pb-2",children:i.jsxs("div",{className:"min-w-0",children:[i.jsx(Ve,{to:"/project/slice/$sliceId",params:{sliceId:s.name},className:"font-mono text-[12px] uppercase tracking-[0.12em] text-on-surface hover:underline",children:s.displayName}),i.jsxs("div",{className:"mt-2 flex flex-wrap gap-1.5",children:[i.jsx(ra,{token:HF(),compact:!0}),i.jsx(ra,{token:{label:s.status,tone:Cv(s.status)},compact:!0}),i.jsx(_f,{value:s.lastActivityAt})]})]})}),i.jsxs("div",{className:"mt-3 grid gap-2 font-mono text-[10px] text-on-surface sm:grid-cols-4",children:[i.jsx(cr,{label:"Qitems",value:(r==null?void 0:r.qitemIds.length)??s.qitemCount}),i.jsx(cr,{label:"Proof",value:r?r.tests.proofPackets.length:s.hasProofPacket?1:0}),i.jsx(cr,{label:"Progress",value:r?`${r.acceptance.percentage}%`:"unknown"}),i.jsx(cr,{label:"Last activity",value:XW(s.lastActivityAt)})]})]},s.name)})})}function KW({qitemIds:e,queueItemsById:t,isFetching:n}){const s=[...e].sort((r,a)=>{const o=t.get(r),c=t.get(a),d=(o==null?void 0:o.tsCreated)??r,h=(c==null?void 0:c.tsCreated)??a;return d===h?0:d<h?1:-1});return s.length===0?i.jsx(Ae,{label:"NO QITEMS",description:"No queue items are indexed for this scope.",variant:"card",testId:"scope-queue-empty"}):i.jsxs("div",{"data-testid":"scope-queue-rollup",children:[n?i.jsx("div",{className:"mb-2 font-mono text-[10px] uppercase tracking-[0.12em] text-on-surface-variant",children:"Loading queue bodies..."}):null,i.jsx("ul",{className:"divide-y divide-outline-variant border border-outline-variant",children:s.map(r=>{const a=t.get(r);return i.jsx("li",{className:"bg-surface-lowest/35 backdrop-blur-sm",children:i.jsxs(Ap,{data:YW(r,a),testId:`scope-queue-trigger-${r}`,className:"block w-full px-3 py-2 text-left font-mono text-xs transition-colors hover:bg-surface-lowest/55",children:[i.jsxs("span",{className:"flex flex-wrap items-center gap-2",children:[a!=null&&a.state?i.jsx(FE,{state:a.state,compact:!0}):i.jsx(VF,{kind:"queue.item",compact:!0}),i.jsx(_f,{value:a==null?void 0:a.tsCreated})]}),i.jsx("span",{className:"mt-2 block whitespace-pre-wrap break-words text-on-surface",children:QW(r,a)}),a?i.jsxs("span",{className:"mt-2 block space-y-2",children:[i.jsx(zE,{source:a.sourceSession,destination:a.destinationSession,muted:!0}),i.jsx("span",{className:"flex flex-wrap gap-1.5",children:(a.tags??[]).slice(0,5).map(o=>i.jsx(Uu,{tag:o},o))})]}):null]})},r)})})]})}function CEe({rows:e,detailsByName:t}){return e.length===0?i.jsx(Ae,{label:"NO ARTIFACTS",description:"No slices are indexed for this scope.",variant:"card",testId:"scope-artifacts-empty"}):i.jsx("div",{"data-testid":"scope-artifacts-rollup",className:"space-y-3",children:e.map(n=>{const s=t.get(n.name),r=(s==null?void 0:s.tests.proofPackets.length)??(n.hasProofPacket?1:0),a=(s==null?void 0:s.tests.proofPackets.reduce((o,c)=>o+c.screenshots.length,0))??0;return i.jsxs("article",{className:"border border-outline-variant bg-surface-lowest/35 p-3 backdrop-blur-sm",children:[i.jsx(Ve,{to:"/project/slice/$sliceId",params:{sliceId:n.name},className:"font-mono text-[12px] uppercase tracking-[0.12em] text-on-surface hover:underline",children:n.displayName}),i.jsxs("div",{className:"mt-2 flex flex-wrap gap-1.5",children:[i.jsx(ra,{token:HF(),compact:!0}),i.jsx(ra,{token:{label:n.status,tone:Cv(n.status)},compact:!0})]}),i.jsxs("div",{className:"mt-3 grid gap-2 font-mono text-[10px] text-on-surface sm:grid-cols-4",children:[i.jsx(cr,{label:"Files",value:(s==null?void 0:s.docs.tree.length)??"unknown"}),i.jsx(cr,{label:"Commits",value:(s==null?void 0:s.commitRefs.length)??"unknown"}),i.jsx(cr,{label:"Proof packets",value:r}),i.jsx(cr,{label:"Screenshots",value:a})]})]},n.name)})})}function EEe(e){return{qitemId:e.qitemId,tsCreated:e.tsCreated,tsUpdated:e.tsUpdated,sourceSession:e.sourceSession,destinationSession:e.destinationSession,state:e.state,closureReason:e.closureReason??null,closureTarget:e.closureTarget??null,priority:e.priority??null,tier:e.tier??null,blockedOn:e.blockedOn??null,tags:e.tags??[],body:e.body,summary:e.summary??null,chainOfRecord:e.chainOfRecord??null,handedOffFrom:e.handedOffFrom??null,handedOffTo:e.handedOffTo??null,claimedAt:e.claimedAt??null,expiresAt:e.expiresAt??null,closureRequiredAt:e.closureRequiredAt??null,lastNudgeAttempt:e.lastNudgeAttempt??null,lastNudgeResult:e.lastNudgeResult??null,lastHeartbeat:e.lastHeartbeat??null,resolution:e.resolution??null,targetRepo:e.targetRepo??null}}function GT({queueItemsById:e,isFetching:t}){const n=C.useMemo(()=>n2e(Array.from(e.values()).map(EEe)),[e]);return t&&n.nodes.length===0?i.jsx(WW,{label:"LOADING STORY",description:"Reading queue lineage."}):i.jsx("div",{"data-testid":"scope-story-rollup",children:i.jsx(l2e,{forest:n})})}function REe(e){const t=new Map;for(const s of e.values())if(!(!s.topology||!Array.isArray(s.topology.affectedRigs)))for(const r of s.topology.affectedRigs){const a=r.rigName||r.rigId;t.has(a)||t.set(a,{rigId:r.rigId,rigName:r.rigName,sessionNames:new Set});const o=t.get(a);r.sessionNames.forEach(c=>o.sessionNames.add(c))}const n=Array.from(t.values()).map(s=>({rigId:s.rigId,rigName:s.rigName,sessionNames:Array.from(s.sessionNames).sort()}));return{affectedRigs:n,totalSeats:n.reduce((s,r)=>s+r.sessionNames.length,0),specGraph:null}}function TEe({detailsByName:e}){return i.jsx("div",{"data-testid":"scope-topology-rollup",children:i.jsx(zT,{topology:REe(e)})})}function AEe(){const[e,t]=C.useState("overview"),n=LE(),s=GW(null,e!=="overview"),{data:r}=Pr(),a=(r==null?void 0:r.selected)??at,o=a!==at,c=typeof window<"u"&&new URLSearchParams(window.location.search).get("from")==="fleet",d=rd();return!o&&!n.isLoading&&n.name===null?i.jsx("div",{className:"mx-auto w-full max-w-[960px] px-6 py-12",children:i.jsx(Ae,{label:"NO WORKSPACE CONNECTED",description:"Configure a workspace root to browse missions and slices in this destination.",variant:"card",testId:"workspace-scope-no-workspace",action:{label:"Open settings",href:"/settings"}})}):i.jsxs(uf,{eyebrow:c?`Fleet ▸ ${a} · Workspace`:"Workspace",title:o?"workspace":n.name??"loading…",hostChip:o?a:null,tabs:_Ee,active:e,onSelect:h=>t(h),children:[e==="overview"?i.jsx(bEe,{}):null,e==="story"?i.jsx(GT,{rows:s.rows,detailsByName:s.details.itemsByName,queueItemsById:s.queueItems.itemsById,isFetching:s.details.isFetching||s.queueItems.isFetching}):null,e==="progress"?i.jsx(kEe,{rows:s.rows,detailsByName:s.details.itemsByName,isLoading:s.list.isLoading||s.details.isFetching}):null,e==="artifacts"?i.jsx(CEe,{rows:s.rows,detailsByName:s.details.itemsByName}):null,e==="proof"?i.jsx(LW,{rows:s.rows.map(h=>({name:h.name,displayName:h.displayName,slicePath:d?h.slicePath??null:null}))}):null,e==="queue"?i.jsx(KW,{qitemIds:s.qitemIds,queueItemsById:s.queueItems.itemsById,isFetching:s.details.isFetching||s.queueItems.isFetching}):null,e==="topology"?i.jsx("div",{"data-testid":"workspace-topology-hostmultirig",className:"flex-1 min-h-0 relative h-[60vh]",children:i.jsx(EW,{})}):null]})}function IEe(){const{missionId:e}=An({from:"/project/mission/$missionId"}),[t,n]=C.useState("steering"),s=GW(e,t!=="overview"&&t!=="steering"),r=qT(e),{data:a}=Pr(),o=(a==null?void 0:a.selected)??at,c=o!==at,d=rd(),{known:h,isLocal:m}=sd(),f=d&&r.data&&"missionPath"in r.data?r.data.missionPath:null,g=Yl(f,"README.md"),x=Yl(f,"PROGRESS.md"),y=PW(e);return i.jsxs(uf,{eyebrow:"Mission",title:e,hostChip:c?o:null,tabs:wEe,active:t,onSelect:b=>n(b),children:[t==="steering"?i.jsx(B2e,{missionId:e}):null,t==="review"?h?m?i.jsx(gEe,{missionId:e}):i.jsx(VW,{testId:"mission-review-remote-gated"}):i.jsx(UW,{testId:"mission-review-selection-pending"}):null,t==="overview"?i.jsxs("div",{"data-testid":"mission-overview-panel",className:"space-y-6",children:[g.content&&i.jsx("section",{"data-testid":"mission-overview-readme",className:"border border-outline-variant bg-surface-lowest/20 p-4",children:i.jsx(Zn,{content:g.content,hideFrontmatter:!0,hideRawToggle:!0})}),i.jsx("div",{className:"space-y-3",children:s.rows.length>0?s.rows.map(b=>{const _=YF(b);return i.jsx("article",{className:"border border-outline-variant bg-surface-lowest/35 p-3 backdrop-blur-sm",children:i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx(Ve,{to:"/project/slice/$sliceId",params:{sliceId:b.name},"data-testid":`mission-overview-slice-${b.name}`,title:`${b.displayName} — ${_}`,"aria-label":`${b.displayName} (${_})`,className:"min-w-0 flex-1 whitespace-normal break-words font-mono text-[12px] uppercase leading-snug tracking-[0.12em] text-on-surface hover:underline",children:b.displayName}),i.jsxs("span",{"data-testid":`mission-overview-slice-${b.name}-meta`,className:"flex shrink-0 items-center gap-1.5",children:[i.jsx(WF,{count:b.qitemCount,testId:`mission-overview-slice-${b.name}-qitems`}),i.jsx(GF,{tone:Ev(b.status),label:b.status,testId:`mission-overview-slice-${b.name}-status`})]})]})},b.name)}):i.jsx(Ae,{label:"NO SLICES",description:"No indexed slices are attached to this mission.",variant:"card",testId:"mission-overview-empty"})})]}):null,t==="story"?i.jsx(GT,{rows:s.rows,detailsByName:s.details.itemsByName,queueItemsById:s.queueItems.itemsById,isFetching:s.details.isFetching||s.queueItems.isFetching}):null,t==="progress"?i.jsxs("div",{"data-testid":"mission-progress-panel",className:"space-y-6",children:[i.jsx(A2e,{rows:s.rows,detailsByName:s.details.itemsByName,isLoading:s.list.isLoading||s.details.isFetching}),y.data&&(y.data.mission.railStatus==="missing"||y.data.mission.railStatus==="malformed")?i.jsx(Ae,{label:y.data.mission.railStatus==="malformed"?"PROGRESS RAIL MALFORMED":"PROGRESS RAIL MISSING",description:y.data.mission.railStatus==="malformed"?`Mission progress rail has errors (${y.data.mission.frontmatterError??"malformed frontmatter"}). Run the audit command to diagnose.`:"This mission has no PROGRESS.md. Scaffold one or run the audit to check scope health.",variant:"card",testId:"mission-progress-rail-status",action:{label:`rig scope audit --mission ${e}`}}):h&&!m?i.jsx(Ae,{label:"LOCAL FILES NOT SHOWN",description:"Local files not shown — mission progress markdown reads this host's local filesystem, which the remote read view does not browse.",variant:"card",testId:"mission-progress-remote-gated"}):x.content?i.jsx("section",{"data-testid":"mission-progress-readme",className:"border border-outline-variant bg-surface-lowest/20 p-4",children:i.jsx(Zn,{content:x.content,hideFrontmatter:!0,hideRawToggle:!0})}):x.state==="read_error"?i.jsx(Ae,{label:"PROGRESS READ FAILED",description:"The daemon could not read PROGRESS.md — this is a read failure, not an empty progress file. Check daemon logs and file permissions.",variant:"card",testId:"mission-progress-read-error"}):x.state==="unresolved"?i.jsx(Ae,{label:"PROGRESS OUTSIDE FILE ROOTS",description:"The mission path is not under any allowlisted file root, so PROGRESS.md cannot be read. Check OPENRIG_FILES_ALLOWLIST / the daemon's file-roots settings.",variant:"card",testId:"mission-progress-unresolved"}):y.isLoading?null:i.jsx(Ae,{label:"NO PROGRESS YET",description:"No progress data has been written for this mission.",variant:"card",testId:"mission-progress-empty"}),y.data&&y.data.totalFindings>0&&i.jsxs("section",{"data-testid":"mission-scope-findings",className:"border border-outline-variant bg-amber-50/40 p-4",children:[i.jsxs(ct,{children:["Scope Audit Findings (",y.data.totalFindings,")"]}),i.jsx("ul",{className:"mt-2 space-y-1 font-mono text-[11px]",children:[...y.data.mission.findings,...y.data.slices.flatMap(b=>b.findings)].map((b,_)=>i.jsxs("li",{className:ce("px-2 py-1",b.severity==="high"?"text-red-700":"text-on-surface-variant"),children:["[",b.severity,"] ",b.kind,": ",b.message]},_))})]})]}):null,t==="artifacts"?i.jsx(HT,{scopePath:f,scopeLabel:e,remoteGated:c}):null,t==="proof"?i.jsx(LW,{rows:s.rows.map(b=>({name:b.name,displayName:b.displayName,slicePath:d?b.slicePath??null:null}))}):null,t==="queue"?i.jsx(KW,{qitemIds:s.qitemIds,queueItemsById:s.queueItems.itemsById,isFetching:s.details.isFetching||s.queueItems.isFetching}):null,t==="topology"?(()=>{const b=r.data&&"topology"in r.data?r.data.topology:null;return b!=null&&b.specGraph?i.jsx(zT,{topology:{affectedRigs:[],totalSeats:0,specGraph:b.specGraph}}):i.jsx(TEe,{detailsByName:s.details.itemsByName})})():null]})}function YW(e,t){return{qitemId:e,source:t==null?void 0:t.sourceSession,destination:t==null?void 0:t.destinationSession,state:t==null?void 0:t.state,tags:(t==null?void 0:t.tags)??void 0,createdAt:t==null?void 0:t.tsCreated,body:t==null?void 0:t.body}}function QW(e,t){if(!(t!=null&&t.body))return e;const n=t.body.split(`
|
|
621
621
|
`);return n.length<=8?t.body:`${n.slice(0,8).join(`
|
|
622
622
|
`)}
|
|
623
|
-
... ${n.length-8} more lines`}function MEe({qitemIds:e,queueItemsById:t,queueItemsFetching:n}){return e.length===0?i.jsx(Ae,{label:"NO QITEMS",description:"No queue items associated with this slice.",variant:"card",testId:"slice-queue-empty"}):i.jsxs("div",{children:[n?i.jsx("div",{"data-testid":"slice-queue-fetching",className:"mb-2 font-mono text-[10px] uppercase tracking-[0.12em] text-on-surface-variant",children:"Loading queue bodies..."}):null,i.jsx("ul",{"data-testid":"slice-queue-list",className:"divide-y divide-outline-variant border border-outline-variant",children:e.map(s=>{const r=t.get(s);return i.jsx("li",{className:"bg-surface-lowest/35 backdrop-blur-sm",children:i.jsxs(Ap,{data:YW(s,r),testId:`slice-queue-trigger-${s}`,className:"block w-full px-3 py-2 text-left hover:bg-surface-lowest/55 transition-colors font-mono text-xs",children:[i.jsxs("span",{className:"flex flex-wrap items-center gap-2",children:[r!=null&&r.state?i.jsx(FE,{state:r.state,compact:!0}):i.jsx(VF,{kind:"queue.item",compact:!0}),i.jsx(_f,{value:r==null?void 0:r.tsCreated})]}),i.jsx("span",{className:"mt-2 block whitespace-pre-wrap break-words text-on-surface",children:QW(s,r)}),r?i.jsxs("span",{"data-testid":`slice-queue-meta-${s}`,className:"mt-2 block space-y-2 text-[10px] text-on-surface-variant",children:[i.jsx(zE,{source:r.sourceSession,destination:r.destinationSession,muted:!0}),i.jsxs("span",{className:"flex flex-wrap gap-1.5",children:[i.jsx(Uu,{tag:s}),(r.tags??[]).slice(0,5).map(a=>i.jsx(Uu,{tag:a},a))]})]}):null]})},s)})})]})}function XW(e){return qE(e)}function cr({label:e,value:t}){return i.jsxs("div",{className:"border border-outline-variant bg-surface-lowest/35 p-3 backdrop-blur-sm",children:[i.jsx("div",{className:"font-mono text-[8px] uppercase tracking-[0.14em] text-on-surface-variant",children:e}),i.jsx("div",{className:"mt-1 font-mono text-sm font-bold text-on-surface",children:t})]})}function LEe({detail:e,remoteGated:t}){const n=e.acceptance.currentStep,s=Yl(t?null:e.slicePath??null,"README.md");return i.jsxs("div",{"data-testid":"slice-overview-tab",className:"space-y-6",children:[i.jsxs("section",{"data-testid":"slice-overview-summary",className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-4",children:[i.jsx(cr,{label:"Status",value:e.status}),i.jsx(cr,{label:"Progress",value:`${e.acceptance.percentage}%`}),i.jsx(cr,{label:"Qitems",value:e.qitemIds.length}),i.jsx(cr,{label:"Last Activity",value:XW(e.lastActivityAt)})]}),s.content&&i.jsx("section",{"data-testid":"slice-overview-readme",className:"border border-outline-variant bg-surface-lowest/20 p-4",children:i.jsx(Zn,{content:s.content,hideFrontmatter:!0,hideRawToggle:!0})}),i.jsxs("section",{"data-testid":"slice-overview-current-step",className:"border border-outline-variant bg-surface-lowest/20 p-4",children:[i.jsx(ct,{tone:"muted",children:"Current Step"}),n?i.jsxs("div",{className:"mt-3 grid gap-2 font-mono text-[10px] text-on-surface sm:grid-cols-2",children:[i.jsxs("div",{children:[i.jsx("div",{className:"text-[8px] uppercase tracking-[0.14em] text-on-surface-variant",children:"Step"}),i.jsx("div",{className:"font-bold text-on-surface",children:n.stepId})]}),i.jsxs("div",{children:[i.jsx("div",{className:"text-[8px] uppercase tracking-[0.14em] text-on-surface-variant",children:"Role"}),i.jsx("div",{className:"font-bold text-on-surface",children:n.role})]}),i.jsxs("div",{className:"sm:col-span-2",children:[i.jsx("div",{className:"text-[8px] uppercase tracking-[0.14em] text-on-surface-variant",children:"Objective"}),i.jsx("div",{children:n.objective??"No objective declared."})]}),i.jsxs("div",{children:[i.jsx("div",{className:"text-[8px] uppercase tracking-[0.14em] text-on-surface-variant",children:"Allowed exits"}),i.jsx("div",{children:n.allowedExits.join(", ")||"-"})]}),i.jsxs("div",{children:[i.jsx("div",{className:"text-[8px] uppercase tracking-[0.14em] text-on-surface-variant",children:"Hop count"}),i.jsx("div",{children:n.hopCount})]})]}):i.jsx("div",{className:"mt-3 font-mono text-[10px] text-on-surface-variant",children:"No workflow step is currently bound."})]}),i.jsxs("section",{"data-testid":"slice-overview-readiness",className:"border border-outline-variant bg-surface-lowest/20 p-4",children:[i.jsx(ct,{tone:"muted",children:"Readiness"}),i.jsxs("div",{className:"mt-3 space-y-2 font-mono text-[10px] text-on-surface",children:[i.jsxs("div",{children:[e.acceptance.doneItems," of ",e.acceptance.totalItems," acceptance items complete."]}),i.jsxs("div",{children:[e.tests.aggregate.passCount," proof packets passing / ",e.tests.aggregate.failCount," failing."]}),e.acceptance.closureCallout&&i.jsx("div",{className:"border border-amber-300 bg-amber-50 px-2 py-1 text-amber-800",children:e.acceptance.closureCallout}),e.workflowBinding&&i.jsxs("div",{className:"text-on-surface-variant",children:["Workflow: ",e.workflowBinding.workflowName," v",e.workflowBinding.workflowVersion]})]})]})]})}function OEe(){var y,b,_;const{sliceId:e}=An({from:"/project/slice/$sliceId"}),[t,n]=C.useState("review"),{data:s}=Pr(),r=((s==null?void 0:s.selected)??at)!==at,a=rd(),{known:o,isLocal:c}=sd(),d=Hee(e),h=ME(((y=d.data)==null?void 0:y.qitemIds)??[]),m=C.useMemo(()=>h.itemsById,[h.itemsById]),f=PW(((b=d.data)==null?void 0:b.missionId)??null);if(d.isLoading)return i.jsx(uf,{eyebrow:"Slice",title:e,tabs:sC,active:t,onSelect:w=>n(w),children:i.jsx(Ae,{label:"LOADING",description:`Fetching /api/slices/${e}…`,variant:"card",testId:"slice-scope-loading"})});if(d.isError||!d.data)return i.jsx(uf,{eyebrow:"Slice",title:e,tabs:sC,active:t,onSelect:w=>n(w),children:i.jsx(Ae,{label:"SLICE NOT AVAILABLE",description:d.error instanceof Error?d.error.message:`Could not load slice "${e}". The slices indexer may not be configured (rig config get workspace.slices_root).`,variant:"card",testId:"slice-scope-error"})});const g=d.data,x=((_=f.data)==null?void 0:_.slices.find(w=>w.name===g.name))??null;return i.jsxs(uf,{eyebrow:"Slice",title:g.displayName||g.name,tabs:sC,active:t,onSelect:w=>n(w),children:[t==="review"?o?c?i.jsx(cEe,{sliceName:g.name,slicePath:a?g.slicePath:null,anchorIdentity:typeof window<"u"&&window.location.hash.startsWith("#needs-you-")?window.location.hash.slice(11):null}):i.jsx(VW,{testId:"slice-review-remote-gated"}):i.jsx(UW,{testId:"slice-review-selection-pending"}):null,t==="story"?i.jsx(GT,{rows:[],detailsByName:new Map,queueItemsById:m,isFetching:!1}):null,t==="overview"?i.jsx(LEe,{detail:g,remoteGated:!a}):null,t==="progress"?i.jsxs("div",{className:"space-y-6",children:[x&&(x.railStatus==="missing"||x.railStatus==="malformed")&&i.jsx(Ae,{label:x.railStatus==="malformed"?"PROGRESS RAIL MALFORMED":"PROGRESS RAIL MISSING",description:x.railStatus==="malformed"?`Slice progress rail has errors (${x.frontmatterError??"malformed frontmatter"}). Run the audit command to diagnose.`:"This slice has no PROGRESS.md and no readme-only marker.",variant:"card",testId:"slice-progress-rail-status",action:{label:`rig scope audit --mission ${g.missionId}`}}),x&&x.findings.length>0&&i.jsxs("section",{"data-testid":"slice-scope-findings",className:"border border-outline-variant bg-amber-50/40 p-4",children:[i.jsxs(ct,{children:["Scope Findings (",x.findings.length,")"]}),i.jsx("ul",{className:"mt-2 space-y-1 font-mono text-[11px]",children:x.findings.map((w,E)=>i.jsxs("li",{className:ce("px-2 py-1",w.severity==="high"?"text-red-700":"text-on-surface-variant"),children:["[",w.severity,"] ",w.kind,": ",w.message]},E))})]}),i.jsx(m2e,{acceptance:g.acceptance})]}):null,t==="artifacts"?i.jsx(HT,{scopePath:a?g.slicePath:null,scopeLabel:g.displayName||g.name,remoteGated:r}):null,t==="proof"?i.jsx(j2e,{sliceId:g.displayName,title:g.name,slicePath:a?g.slicePath:null}):null,t==="queue"?i.jsx(MEe,{qitemIds:g.qitemIds,queueItemsById:m,queueItemsFetching:h.isFetching}):null,t==="topology"?i.jsx(zT,{topology:g.topology}):null]})}const PEe=15e3,DEe=3e4,$Ee=["review","fleet"];async function BEe(){const e=await fetch("/api/review/fleet");if(!e.ok)throw new Error(`HTTP ${e.status}`);return await e.json()}function ZW(e={}){return Re({queryKey:$Ee,queryFn:BEe,enabled:e.enabled??!0,staleTime:PEe,refetchInterval:DEe,refetchOnWindowFocus:"always"})}function qEe({hostId:e}){return i.jsx("span",{className:ce("shrink-0 border px-1 font-mono text-[9px] uppercase tracking-wide",e==="local"?"border-outline-variant text-on-surface-variant":"border-on-surface text-on-surface"),children:e})}function FEe(){var a;const{data:e,isError:t}=Pr(),n=(((a=e==null?void 0:e.hosts)==null?void 0:a.length)??0)>0,{data:s}=ZW({enabled:n||t});if(!s||s.hosts.length<=1&&!s.registryError)return null;const r=s.needsYou.items.find(o=>o.source==="derived")??s.needsYou.items[0];return i.jsxs("div",{"data-testid":"fleet-band",className:ce("flex flex-wrap items-center gap-2 px-2 py-1.5",fr),children:[i.jsx("span",{className:"font-mono text-[10px] uppercase tracking-wide text-on-surface",children:"FLEET"}),i.jsxs("span",{"data-testid":"fleet-band-rollup",className:"flex items-center gap-2 font-mono text-[10px]",children:[i.jsxs("span",{className:"text-emerald-700",children:["● ",s.rollup.needsYouCount]}),i.jsxs("span",{className:"text-amber-700",children:["▲ ",s.rollup.exceptionCount]}),i.jsxs("span",{className:"text-on-surface-variant",children:[s.rollup.hostCount," hosts",s.rollup.unreachableCount>0?` · ${s.rollup.unreachableCount} unreachable`:""]})]}),s.registryError?i.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-[10px] text-error",children:"host registry unreadable — local-only glance"}):r?i.jsxs("span",{"data-testid":"fleet-band-worst",className:"flex min-w-0 flex-1 items-center gap-1.5 truncate font-mono text-[10px] text-on-surface-variant",children:["worst: ",i.jsx(qEe,{hostId:r.hostId}),i.jsx("span",{className:"min-w-0 truncate",children:r.summary})]}):i.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-[10px] text-on-surface-variant",children:"quiet"}),i.jsx("a",{href:"/fleet","data-testid":"fleet-band-open",className:"font-mono text-[10px] uppercase text-on-surface hover:underline",children:"open fleet →"})]})}const zEe="human@host",HEe={root:null,relPath:null,slicePath:null};function U8(e){return typeof window>"u"?null:new URLSearchParams(window.location.search).get(e)}function UEe(e){const t=Math.max(0,Math.floor((Date.now()-Date.parse(e))/6e4));return t<60?`${t}m`:t<1440?`${Math.floor(t/60)}h`:`${Math.floor(t/1440)}d`}function VEe(){const{data:e,isLoading:t,error:n}=G2e(),s=U8("slice"),r=U8("group")==="slice"?"slice":"agent",[a,o]=C.useState(r),c=h=>{if(o(h),typeof window>"u")return;const m=new URL(window.location.href);m.searchParams.set("group",h),window.history.replaceState({},"",`${m.pathname}${m.search}${m.hash}`)},d=C.useMemo(()=>{if(!e)return null;if(!s)return e.agents;const h=e.agents.rows.filter(m=>m.slices.includes(s));return{...e.agents,rows:h,provenance:h.length===0?`no agents holding or recently holding work on ${s} — ${e.agents.provenance}`:`anchored to ${s} — ${e.agents.provenance}`}},[e,s]);return t?i.jsx("p",{className:"p-4 font-mono text-[11px] text-on-surface-variant",children:"composing the rig coordination story…"}):n||!e||!d?i.jsxs("p",{"data-testid":"rig-agents-error",className:"p-4 font-mono text-[11px] text-red-700",children:["rig agents panel unavailable: ",n instanceof Error?n.message:"composer unreachable"]}):i.jsxs("div",{"data-testid":"rig-agents-page",className:"mx-auto max-w-4xl space-y-5 p-4",children:[i.jsx(FEe,{}),i.jsxs("nav",{className:"flex items-center gap-2 font-mono text-[10px] uppercase text-on-surface-variant",children:[i.jsx(Ve,{to:"/project",className:"hover:underline",children:"project"}),i.jsx("span",{children:"/"}),i.jsx("span",{"data-testid":"rig-agents-crumb",children:"agents (rig)"}),s?i.jsxs(i.Fragment,{children:[i.jsx("span",{children:"·"}),i.jsxs("span",{"data-testid":"rig-agents-anchor",children:["anchored: ",s]}),i.jsx("a",{href:"/agents",className:"hover:underline","data-testid":"rig-agents-unanchor",children:"[full rig]"})]}):null]}),i.jsxs("header",{className:"flex flex-wrap items-center justify-between gap-2",children:[i.jsx("h2",{className:"text-[14px] font-semibold",children:"AGENTS — the coordination story"}),i.jsxs("div",{className:"flex items-center gap-1 font-mono text-[10px] uppercase",children:[i.jsx("span",{className:"text-on-surface-variant",children:"group by"}),["agent","slice"].map(h=>i.jsx("button",{type:"button","data-testid":`rig-agents-group-${h}`,onClick:()=>c(h),className:`border px-2 py-0.5 ${a===h?"border-outline bg-surface-variant":"border-outline-variant hover:bg-surface-variant/50"}`,children:h},h))]})]}),i.jsx(zW,{band:e.needsYou,slice:"rig",missionId:null,actorSession:zEe,ctx:HEe,showApprove:!1}),i.jsx(WT,{band:d,itemRef:"rig",grouping:a}),i.jsxs("section",{"data-testid":"settled-band",className:"space-y-1",children:[i.jsx("h3",{className:"font-mono text-[10px] uppercase tracking-wide text-on-surface-variant",children:"SETTLED"}),e.settled.length===0?i.jsx("p",{"data-testid":"settled-empty",className:"font-mono text-[11px] text-on-surface-variant",children:e.settledProvenance}):i.jsxs(i.Fragment,{children:[i.jsx("ul",{className:"divide-y divide-outline-variant/50 border border-outline-variant",children:e.settled.map(h=>i.jsxs("li",{className:"flex items-center gap-2 px-2 py-1.5",children:[i.jsx("span",{className:"font-mono text-[10px] text-on-surface-variant",children:bf(h.fromSession)}),i.jsx("span",{className:"text-on-surface-variant",children:"→"}),i.jsx("span",{className:"font-mono text-[10px] text-on-surface-variant",children:bf(h.toSession)}),i.jsx("span",{className:"min-w-0 flex-1 truncate text-[11px]","data-testid":`settled-summary-${h.qitemId}`,children:h.summary??h.qitemId}),i.jsx("span",{className:"font-mono text-[10px] text-on-surface-variant",children:UEe(h.closedAtIso)})]},`${h.qitemId}-${h.closedAtIso}`))}),i.jsx("p",{className:"font-mono text-[10px] text-on-surface-variant",children:e.settledProvenance})]})]}),i.jsxs("p",{className:"font-mono text-[10px] text-on-surface-variant",children:["composed ",e.composedAt]})]})}function WEe(e){return typeof window>"u"?null:new URLSearchParams(window.location.search).get(e)}function JW(e){if(!e)return"—";const t=Math.max(0,Math.floor((Date.now()-Date.parse(e))/6e4));return t<60?`${t}m`:t<1440?`${Math.floor(t/60)}h`:`${Math.floor(t/1440)}d`}function eG({hostId:e}){return i.jsx("span",{"data-testid":`fleet-item-host-${e}`,className:ce("shrink-0 border px-1 font-mono text-[9px] uppercase tracking-wide",e==="local"?"border-outline-variant text-on-surface-variant":"border-on-surface text-on-surface"),children:e})}function GEe(){const e=jv();return t=>{e.mutate({hostId:t},{onSuccess:()=>window.location.assign("/project?from=fleet")})}}function KEe(e){if(typeof window>"u")return;const t=new URL(window.location.href);e===null?t.searchParams.delete("open"):t.searchParams.set("open",e),window.history.replaceState({},"",`${t.pathname}${t.search}${t.hash}`)}function YEe({item:e,expanded:t,onToggle:n,onOpenHost:s}){return i.jsxs("li",{"data-testid":`fleet-needs-you-${e.fleetKey}`,"data-source":e.source,className:"px-2 py-1.5",children:[i.jsx("button",{type:"button",onClick:n,className:"block w-full text-left",children:i.jsxs("span",{className:"flex flex-wrap items-center gap-2",children:[i.jsx("span",{className:ce("font-mono text-[11px]",e.source==="derived"?"text-amber-700":"text-emerald-700"),title:e.source==="derived"?"machine-derived exception":"agent-initiated",children:e.source==="derived"?"▲":"●"}),i.jsx(eG,{hostId:e.hostId}),i.jsx("span",{className:"min-w-0 flex-1 truncate text-[12px] text-on-surface",children:e.summary}),e.derived?i.jsx("span",{className:"font-mono text-[9px] uppercase tracking-wide text-amber-700",children:e.derived.kind}):null,i.jsx("span",{className:"font-mono text-[10px] text-on-surface-variant",children:e.where}),i.jsx("span",{className:"font-mono text-[10px] text-on-surface-variant",children:JW(e.ageIso)})]})}),e.derived?i.jsxs("p",{className:"mt-0.5 pl-6 font-mono text-[10px] text-on-surface-variant",children:["▲ ",e.derived.evidence," · threshold: ",e.derived.threshold]}):null,i.jsxs("p",{className:"mt-0.5 pl-6 font-mono text-[9px] text-on-surface-variant/80",children:["counted once · seen from ",e.seenFrom.join(" · ")," on ",e.hostId]}),t?i.jsxs("div",{"data-testid":`fleet-item-expanded-${e.fleetKey}`,className:"mt-1.5 ml-6 border border-outline-variant bg-surface-low/50 px-2 py-1.5",children:[i.jsxs("p",{className:"font-mono text-[10px] text-on-surface",children:["identity: ",i.jsx("span",{className:"text-on-surface-variant",children:e.fleetKey})]}),e.derived?i.jsxs("p",{className:"mt-0.5 font-mono text-[10px] text-on-surface",children:["evidence: ",i.jsx("span",{className:"text-on-surface-variant",children:e.derived.evidence})]}):null,i.jsxs("p",{className:"mt-1 font-mono text-[9px] uppercase tracking-wide text-on-surface-variant",children:["read-only here — acting on a remote host's item rides cross-host routing (MH-3/MH-4) ·"," ",i.jsxs("button",{type:"button",onClick:()=>s(e.hostId),className:"underline",children:["open ",e.hostId," →"]})]})]}):null]})}function QEe(e){return e.status.status==="ok"?{char:"●",cls:"text-emerald-700"}:{char:"✕",cls:"text-error"}}function XEe(){const{data:e,isLoading:t,error:n,refetch:s}=ZW(),r=GEe(),a=WEe("open");if(t)return i.jsx("p",{className:"p-4 font-mono text-[11px] text-on-surface-variant",children:"composing the fleet glance…"});if(n||!e)return i.jsxs("p",{"data-testid":"fleet-error",className:"p-4 font-mono text-[11px] text-error",children:["fleet glance unavailable: ",n instanceof Error?n.message:"composer unreachable"]});const o=e.hosts.filter(c=>c.status.status==="ok").length;return i.jsxs("div",{"data-testid":"fleet-page",className:"mx-auto max-w-4xl space-y-5 p-4",children:[i.jsxs("nav",{className:"flex items-center gap-2 font-mono text-[10px] uppercase text-on-surface-variant",children:[i.jsx("span",{"data-testid":"fleet-crumb",className:"text-on-surface",children:"fleet"}),i.jsx("span",{children:"·"}),i.jsx("span",{children:"every factory, one glance"})]}),i.jsxs("header",{className:"flex flex-wrap items-baseline justify-between gap-2",children:[i.jsx("h2",{className:"text-[14px] font-semibold uppercase",children:"Fleet — needs me / stuck / failing"}),i.jsxs("div",{"data-testid":"fleet-rollup",className:"flex items-center gap-2 font-mono text-[10px] uppercase",children:[i.jsxs("span",{className:"text-emerald-700",children:["● ",e.rollup.needsYouCount," need you"]}),i.jsxs("span",{className:"text-amber-700",children:["▲ ",e.rollup.exceptionCount," exceptions",e.rollup.exceptionsByKind.length>0?` (${e.rollup.exceptionsByKind.map(c=>`${c.count} ${c.kind}`).join(" · ")})`:""]}),i.jsxs("span",{className:"text-on-surface-variant",children:[e.rollup.hostCount," hosts"]}),e.rollup.unreachableCount>0?i.jsxs("span",{className:"text-error",children:[e.rollup.unreachableCount," unreachable"]}):null]})]}),e.registryError?i.jsxs("p",{"data-testid":"fleet-registry-error",className:"font-mono text-[10px] text-error",children:["host registry unreadable — this glance is LOCAL-ONLY, not the fleet: ",e.registryError]}):null,i.jsxs("section",{"data-testid":"fleet-needs-you",className:ce("space-y-1 p-2",fr),children:[i.jsx("h3",{className:"font-mono text-[10px] uppercase tracking-wide text-on-surface-variant",children:"NEEDS YOU"}),e.needsYou.items.length>0?i.jsx("ul",{className:"divide-y divide-outline-variant/50",children:e.needsYou.items.map(c=>i.jsx(YEe,{item:c,expanded:a===c.fleetKey,onToggle:()=>KEe(a===c.fleetKey?null:c.fleetKey),onOpenHost:r},c.fleetKey))}):null,i.jsx("p",{className:"font-mono text-[9px] text-on-surface-variant",children:e.needsYou.provenance})]}),i.jsxs("section",{"data-testid":"fleet-hosts",className:ce("space-y-1 p-2",fr),children:[i.jsx("h3",{className:"font-mono text-[10px] uppercase tracking-wide text-on-surface-variant",children:"HOSTS"}),i.jsx("ul",{className:"divide-y divide-outline-variant/50",children:e.hosts.map(c=>{const d=QEe(c),h=c.status.status==="ok";return i.jsxs("li",{"data-testid":`fleet-host-${c.hostId}`,className:"flex flex-wrap items-center gap-2 px-2 py-1.5",children:[i.jsx("span",{className:ce("font-mono text-[11px]",d.cls),children:d.char}),i.jsx(SE,{className:"h-3 w-3 text-on-surface-variant"}),i.jsx("span",{className:"font-mono text-[11px] uppercase text-on-surface",children:c.hostId}),c.kind==="local"?i.jsx("span",{className:"font-mono text-[8px] uppercase text-on-surface-variant",children:"local"}):null,h?i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-[10px] text-on-surface-variant",children:c.topLine}),(c.needsYouCount??0)>0?i.jsxs("span",{className:"font-mono text-[10px] text-emerald-700",children:["● ",c.needsYouCount]}):null,(c.exceptionsByKind??[]).map(m=>i.jsxs("span",{className:"font-mono text-[10px] text-amber-700",children:["▲ ",m.count," ",m.kind]},m.kind)),i.jsxs("span",{className:"font-mono text-[9px] text-on-surface-variant",children:[c.rigCount," rigs · ",c.seatCount," seats"]}),i.jsx("button",{type:"button","data-testid":`fleet-host-${c.hostId}-open`,onClick:()=>r(c.hostId),className:"font-mono text-[10px] uppercase text-on-surface hover:underline",children:"open →"})]}):i.jsxs(i.Fragment,{children:[i.jsxs("span",{className:"min-w-0 flex-1 truncate font-mono text-[10px] text-error",children:[c.status.status,c.status.error?` — ${c.status.error}`:""," · items absent from this glance, not zero"]}),i.jsx("button",{type:"button","data-testid":`fleet-host-${c.hostId}-retry`,onClick:()=>void s(),className:"border border-error px-1.5 py-0.5 font-mono text-[9px] uppercase text-error hover:bg-surface-low",children:"retry"})]})]},c.hostId)})})]}),i.jsxs("section",{"data-testid":"fleet-settled",className:"space-y-1",children:[i.jsx("h3",{className:"font-mono text-[10px] uppercase tracking-wide text-on-surface-variant",children:"SETTLED"}),e.settled.length>0?i.jsx("ul",{className:"divide-y divide-outline-variant/50 border border-outline-variant",children:e.settled.map(c=>i.jsxs("li",{className:"flex items-center gap-2 px-2 py-1.5",children:[i.jsx(eG,{hostId:c.hostId}),i.jsx("span",{className:"font-mono text-[10px] text-on-surface-variant",children:c.fromSession.split("@")[0]}),i.jsx("span",{className:"text-on-surface-variant",children:"→"}),i.jsx("span",{className:"font-mono text-[10px] text-on-surface-variant",children:c.toSession.split("@")[0]}),i.jsx("span",{className:"min-w-0 flex-1 truncate text-[11px]",children:c.summary??c.qitemId}),i.jsx("span",{className:"font-mono text-[10px] text-on-surface-variant",children:JW(c.closedAtIso)})]},`${c.hostId}|${c.qitemId}`))}):null,i.jsx("p",{className:"font-mono text-[9px] text-on-surface-variant",children:e.settledProvenance})]}),i.jsxs("p",{"data-testid":"fleet-fanout-footer",className:"font-mono text-[10px] text-on-surface-variant",children:["composed ",e.composedAt," · fleet fan-out ",o,"/",e.hosts.length," hosts ok ·"," ",i.jsx(Ve,{to:"/agents",className:"hover:underline",children:"this host's agents →"})]})]})}function ZEe(e){const t=new Map;for(const s of e){const r=`${s.workflowName}:${s.workflowVersion}`;t.has(r)||t.set(r,[]),t.get(r).push(s)}const n=[...t.entries()].map(([s,r])=>({key:s,name:r[0].workflowName,version:r[0].workflowVersion,rows:r.sort((a,o)=>Zi(a)-Zi(o))}));return n.sort((s,r)=>Zi(s.rows[0])-Zi(r.rows[0])),n}function JEe(){const e=Pt(),{data:t,isLoading:n}=zV(),{data:s}=Fwe(),r=t??[],a=ZEe(r),o=r.filter(f=>Zi(f)<=1).length,c=r.filter(f=>f.status==="active"||f.status==="waiting").length,d=r.filter(f=>f.status==="completed").length,h=new Set(r.map(f=>`${f.workflowName}:${f.workflowVersion}`)),m=((s==null?void 0:s.specs)??[]).filter(f=>!h.has(`${f.name}:${f.version}`));return i.jsx(ot,{children:i.jsxs("div",{"data-testid":"workflows-page",className:"space-y-6",children:[i.jsx(wn,{eyebrow:"Workflows",title:"Deterministic Runs",description:n?"Loading instances…":`${r.length} instance${r.length===1?"":"s"} · ${o} need attention · ${c} live · ${d} completed — computed from /api/workflow/list`,actions:i.jsx(Se,{variant:"outline",size:"sm",onClick:()=>e({to:"/specs"}),children:"Workflow Library"})}),r.length===0&&!n?i.jsx("p",{"data-testid":"workflows-empty",className:"font-mono text-[11px] text-on-surface-variant",children:"0 instances — instantiate one from a library spec (rig workflow instantiate) and it appears here with its live position."}):null,a.map(f=>{const g=f.rows.filter(y=>Zi(y)<=1).length,x=f.rows.filter(y=>y.status==="active"||y.status==="waiting").length;return i.jsxs("section",{"data-testid":`workflows-group-${f.name}`,className:"space-y-2",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs("button",{type:"button","data-testid":`workflows-group-spec-${f.name}`,onClick:()=>e({to:"/specs/library/$entryId",params:{entryId:`workflow:${f.name}:${f.version}`}}),className:"font-mono text-[11px] font-bold text-on-surface underline-offset-2 hover:underline",children:[f.name," v",f.version]}),i.jsxs("span",{className:"font-mono text-[10px] text-on-surface-variant",children:[f.rows.length," instance",f.rows.length===1?"":"s"," · ",x," live",g>0?` · ▲ ${g}`:""]})]}),i.jsx("ul",{className:"divide-y divide-outline-variant/50 border border-outline-variant",children:f.rows.map(y=>i.jsx(HV,{instance:y},y.instanceId))})]},f.key)}),m.length>0?i.jsxs("section",{"data-testid":"workflows-idle-specs",className:"space-y-2",children:[i.jsx("div",{className:"font-mono text-[8px] uppercase tracking-[0.16em] text-on-surface-variant",children:"Cached Specs — No Instances"}),i.jsx("ul",{className:"divide-y divide-outline-variant/50 border border-outline-variant",children:m.map(f=>i.jsx("li",{children:i.jsxs("button",{type:"button","data-testid":`workflows-idle-spec-${f.name}`,onClick:()=>e({to:"/specs/library/$entryId",params:{entryId:`workflow:${f.name}:${f.version}`}}),className:"flex w-full items-center gap-2 px-2 py-1.5 text-left hover:bg-surface-variant/50",children:[i.jsx("span",{className:"font-mono text-[11px] text-on-surface-variant","aria-hidden":!0,children:"◌"}),i.jsxs("span",{className:"font-mono text-[11px] text-on-surface",children:[f.name," v",f.version]}),i.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-[10px] text-on-surface-variant",children:f.purpose??""}),i.jsxs("span",{className:"font-mono text-[10px] text-on-surface-variant",children:[f.isBuiltIn?"built-in":"user file"," · 0 instances"]})]})},`${f.name}:${f.version}`))})]}):null]})})}const eRe={handoff:{glyph:"→",cls:"text-emerald-800"},waiting:{glyph:"◐",cls:"text-on-surface-variant"},done:{glyph:"○",cls:"text-on-surface-variant"},failed:{glyph:"▲",cls:"text-red-700"}};function tRe(e){return e.replace("T"," ").replace(/\.\d+Z$/,"Z")}function nRe({entry:e,index:t,expanded:n,onToggle:s}){const r=eRe[e.closureReason]??{glyph:"?",cls:"text-on-surface-variant"},a=e.closureEvidence&&typeof e.closureEvidence.resultNote=="string"?e.closureEvidence.resultNote:null;return i.jsxs("li",{id:`step-${e.stepId}`,children:[i.jsxs("button",{type:"button","data-testid":`workflow-trail-row-${e.trailId}`,onClick:s,className:"flex w-full items-center gap-2 px-2 py-1.5 text-left hover:bg-surface-variant/50",children:[i.jsxs("span",{className:"font-mono text-[10px] text-on-surface-variant w-6 shrink-0",children:[t+1,"."]}),i.jsx("span",{className:"font-mono text-[11px] font-bold text-on-surface w-28 shrink-0",children:e.stepId}),i.jsx("span",{className:"font-mono text-[10px] text-on-surface-variant w-20 shrink-0",children:e.stepRole}),i.jsxs("span",{className:ce("font-mono text-[11px] w-20 shrink-0",r.cls),children:[r.glyph," ",e.closureReason]}),i.jsx("span",{className:"min-w-0 flex-1 truncate text-[11px] text-on-surface-variant",children:a??"—"}),i.jsx("span",{className:"hidden font-mono text-[10px] text-on-surface-variant lg:inline",children:e.actorSession}),i.jsx("span",{className:"font-mono text-[10px] text-on-surface-variant",children:tRe(e.closedAt)})]}),n?i.jsxs("div",{"data-testid":`workflow-trail-expanded-${e.trailId}`,className:"space-y-1 border-t border-outline-variant/50 bg-surface-lowest/10 px-8 py-2 font-mono text-[10px]",children:[i.jsxs("p",{children:[i.jsx("span",{className:"uppercase text-on-surface-variant",children:"actor: "}),e.actorSession]}),i.jsxs("p",{children:[i.jsx("span",{className:"uppercase text-on-surface-variant",children:"closed packet: "}),e.priorQitemId]}),i.jsxs("p",{children:[i.jsx("span",{className:"uppercase text-on-surface-variant",children:"routed next: "}),e.nextQitemId??"(terminal — no next packet)"]}),e.closureEvidence?i.jsx("pre",{className:"overflow-x-auto border border-outline-variant/40 bg-surface-lowest/20 p-2 text-[9px] leading-snug",children:JSON.stringify(e.closureEvidence,null,2)}):i.jsx("p",{className:"text-on-surface-variant",children:"(no closure evidence recorded)"})]}):null]})}function sRe({trail:e,instance:t,anchorStepId:n}){const[s,r]=C.useState(()=>{if(!n)return null;const o=e.find(c=>c.stepId===n);return o?o.trailId:null}),a=n!=null&&n===t.currentStepId;return i.jsxs("div",{className:"space-y-2",children:[i.jsxs("div",{className:"font-mono text-[8px] uppercase tracking-[0.16em] text-on-surface-variant",children:["Routing History",i.jsxs("span",{className:"ml-2 normal-case tracking-normal",children:[e.length," closed step",e.length===1?"":"s"," · append-only trail · deterministic path",t.currentStepId?` → now at ${t.currentStepId}`:""]})]}),e.length===0?i.jsx("p",{className:"font-mono text-[11px] text-on-surface-variant",children:"No steps closed yet — the entry packet is on the frontier."}):i.jsx("ul",{className:"divide-y divide-outline-variant/50 border border-outline-variant",children:e.map((o,c)=>i.jsx(nRe,{entry:o,index:c,expanded:s===o.trailId,onToggle:()=>r(d=>d===o.trailId?null:o.trailId)},o.trailId))}),t.currentStepId?i.jsxs("div",{id:`step-${t.currentStepId}`,"data-testid":"workflow-frontier-row",className:ce("flex items-center gap-2 border border-dashed px-2 py-1.5",a?"border-amber-700 bg-amber-700/5":"border-outline-variant"),children:[i.jsxs("span",{className:"font-mono text-[10px] text-on-surface-variant w-6 shrink-0",children:[e.length+1,"."]}),i.jsx("span",{className:"font-mono text-[11px] font-bold text-on-surface w-28 shrink-0",children:t.currentStepId}),i.jsx("span",{className:"font-mono text-[11px] text-emerald-800 w-20 shrink-0",children:"● open"}),i.jsxs("span",{className:"min-w-0 flex-1 truncate font-mono text-[10px] text-on-surface-variant",children:["frontier packet ",t.currentFrontier[0]??"(none)",t.deadline.evidence?` · held by ${t.deadline.evidence.ownerSession}`:""]})]}):null]})}function V8(e){return e.replace("T"," ").replace(/\.\d+Z$/,"Z")}const rRe="human@host";async function iRe(e){const t=await fetch(`/api/workflow/${encodeURIComponent(e)}/resume`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({actorSession:rRe})});if(!t.ok)throw new Error(`resume failed — HTTP ${t.status}`)}function aRe(e,t){const n=e.map(r=>r.stepId);t&&n.push(t);const s=[];for(let r=0;r+1<n.length;r++)n[r]!==n[r+1]&&s.push(`${n[r]}→${n[r+1]}`);return{visited:e.map(r=>r.stepId),edgeKeys:s}}function oRe({instance:e,onResume:t,resuming:n,resumeError:s}){const r=e.status==="waiting"&&e.currentStepId!=null,a=e.deadline.state!=="healthy"&&e.deadline.evidence,o=e.status==="failed";if(!r&&!a&&!o)return null;const c=o||a?"border-red-700/60 bg-red-700/5":"border-amber-700/60 bg-amber-700/5";return i.jsxs("div",{"data-testid":"workflow-exception-banner",className:ce("space-y-2 border px-3 py-2",c),children:[o?i.jsxs("p",{className:"font-mono text-[11px] text-red-700",children:["▲ FAILED — no remediation branch mapped for the failing exit",e.resumeCount>0?` · resumed ${e.resumeCount}× already`:""]}):null,a?i.jsxs("p",{className:"font-mono text-[11px] text-red-700",children:["▲ ",e.deadline.state.toUpperCase()," — step ",e.deadline.evidence.stepId??"(unbound)"," packet"," ",e.deadline.evidence.packetId," held by ",e.deadline.evidence.ownerSession,","," ",Math.floor(e.deadline.evidence.overdueBySeconds/60),"m past its"," ",e.deadline.evidence.anchor," anchor"]}):null,r&&!a&&!o?i.jsxs("p",{className:"font-mono text-[11px] text-amber-800",children:["◐ WAITING at ",e.currentStepId," — the gate packet is parked pending sign-off; resolving the NEEDS-YOU item resumes the deterministic flow"]}):null,i.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[o?i.jsx("button",{type:"button","data-testid":"workflow-resume",disabled:n,onClick:t,className:"border border-outline px-3 py-1 font-mono text-[11px] uppercase hover:bg-surface-variant disabled:cursor-not-allowed disabled:opacity-50",title:`POST /api/workflow/${e.instanceId}/resume — redrive from the failed step (WF-5 FR-4)`,children:n?"Resuming…":"Resume"}):null,s?i.jsx("span",{"data-testid":"workflow-resume-error",className:"font-mono text-[10px] text-red-700",children:s}):null,i.jsxs("span",{className:"font-mono text-[10px] text-on-surface-variant",children:["CLI: rig workflow trace ",e.instanceId]})]})]})}function lRe({instanceId:e,anchorStepId:t}){const n=Pt(),s=mt(),{data:r,isLoading:a,error:o}=zwe(e),c=r?`workflow:${r.instance.workflowName}:${r.instance.workflowVersion}`:null,{data:d}=Rv(c),[h,m]=C.useState(!1),[f,g]=C.useState(null),x=()=>{m(!0),g(null),iRe(e).then(()=>s.invalidateQueries({queryKey:["workflow"]})).catch(k=>g(k.message)).finally(()=>m(!1))};if(a)return i.jsx(ot,{children:i.jsx("div",{className:"font-mono text-[10px] text-on-surface-variant",children:"Loading workflow instance…"})});if(o||!r)return i.jsx(ot,{children:i.jsxs("div",{"data-testid":"workflow-instance-error",className:"space-y-4",children:[i.jsx(wn,{eyebrow:"Workflow — Instance",title:"Instance Not Found",description:(o==null?void 0:o.message)??`No workflow instance ${e}.`}),i.jsx(Se,{variant:"outline",size:"sm",onClick:()=>n({to:"/workflows"}),children:"Back to Workflows"})]})});const{instance:y,trail:b}=r,{visited:_,edgeKeys:w}=aRe(b,y.currentStepId),E=d&&d.kind==="workflow"?d:null,N=y.deadline.state!=="healthy"?y.deadline.state:y.status;return i.jsx(ot,{children:i.jsxs("div",{"data-testid":"workflow-instance-page",className:"space-y-6",children:[i.jsx(wn,{eyebrow:`Workflow — Instance · ${y.workflowName} v${y.workflowVersion}`,title:y.instanceId,description:y.currentStepId?`${y.status} at ${y.currentStepId} · hop ${y.hopCount}`:`${y.status} · hop ${y.hopCount}`,actions:i.jsxs("div",{className:"flex gap-2 items-center",children:[i.jsx(Se,{variant:"outline",size:"sm","data-testid":"workflow-view-spec",onClick:()=>c&&n({to:"/specs/library/$entryId",params:{entryId:c}}),children:"View Spec"}),i.jsx(Se,{variant:"outline",size:"sm",onClick:()=>n({to:"/workflows"}),children:"Back"})]})}),i.jsxs(Do,{children:[i.jsx(st,{label:"Status",value:N,testId:"wf-inst-status"}),i.jsx(st,{label:"Position",value:y.currentStepId??(y.status==="completed"?"closed":"felled"),testId:"wf-inst-position"}),i.jsx(st,{label:"Hops",value:y.hopCount,testId:"wf-inst-hops"}),i.jsx(st,{label:"Resumes",value:y.resumeCount,testId:"wf-inst-resumes"})]}),i.jsxs("p",{"data-testid":"wf-inst-provenance",className:"font-mono text-[10px] text-on-surface-variant",children:["created by ",y.createdBySession," · ",V8(y.createdAt),y.completedAt?` · completed ${V8(y.completedAt)}`:""]}),i.jsx(oRe,{instance:y,onResume:x,resuming:h,resumeError:f}),E?i.jsx(FV,{topology:E.topology,testId:"workflow-instance-graph",currentStepId:y.currentStepId,visitedStepIds:_,takenEdgeKeys:w}):i.jsx("p",{className:"font-mono text-[10px] text-on-surface-variant",children:"(workflow shape unavailable — the spec is not in the library cache)"}),i.jsx(sRe,{trail:b,instance:y,anchorStepId:t})]})})}const cRe={neutral:"border-outline-variant bg-surface-lowest/65 text-on-surface",info:"border-sky-300 bg-sky-50/70 text-sky-800",success:"border-emerald-300 bg-emerald-50/70 text-emerald-800",warning:"border-amber-300 bg-amber-50/80 text-amber-800",danger:"border-rose-300 bg-rose-50/75 text-rose-800"},ko=[{label:"Queue created",tone:"info",icon:Jq},{label:"Handoff",tone:"neutral",icon:wv},{label:"Claimed",tone:"warning",icon:yf},{label:"Completed",tone:"success",icon:vf},{label:"Human action",tone:"danger",icon:Co},{label:"Shipped",tone:"success",icon:NE}],tG=[{label:"idea-ledger",tone:"neutral"},{label:"cycle-4",tone:"info"},{label:"proof",tone:"success"},{label:"urgent",tone:"danger"},{label:"human-review",tone:"warning"}];function si({token:e,compact:t=!1}){const n=e.icon;return i.jsxs("span",{className:ce("inline-flex items-center gap-1 border font-mono uppercase tracking-[0.10em]",t?"px-1.5 py-0.5 text-[8px]":"px-2 py-1 text-[9px]",cRe[e.tone]),children:[n?i.jsx(n,{className:t?"h-2.5 w-2.5":"h-3 w-3",strokeWidth:1.6}):null,e.label]})}function Dl({kind:e,label:t,muted:n}){const s=e==="human"?MJ:wZ;return i.jsxs("span",{className:ce("inline-flex min-w-0 items-center gap-1 border px-1.5 py-0.5 font-mono text-[9px]",n?"border-outline-variant bg-surface-lowest/45 text-on-surface-variant":"border-outline-variant bg-surface-lowest/45 text-on-surface"),children:[i.jsx(s,{className:"h-3 w-3 shrink-0",strokeWidth:1.5}),i.jsx("span",{className:"truncate",children:t})]})}function nG({label:e}){return i.jsxs("span",{className:"inline-flex items-center gap-1 border border-outline-variant bg-surface-lowest/55 px-1.5 py-0.5 font-mono text-[9px] text-on-surface-variant",children:[i.jsx(_E,{className:"h-3 w-3",strokeWidth:1.5}),e]})}function uRe(){return i.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-1.5",children:[i.jsx(Dl,{kind:"agent",label:"orch.lead@openrig-velocity"}),i.jsx(Dx,{className:"h-3.5 w-3.5 text-on-surface-variant",strokeWidth:1.4}),i.jsx(Dl,{kind:"agent",label:"driver@openrig-velocity"}),i.jsx(Dx,{className:"h-3.5 w-3.5 text-on-surface-variant",strokeWidth:1.4}),i.jsx(Dl,{kind:"human",label:"human@host"})]})}function dRe(){return i.jsx("div",{className:"grid grid-cols-3 gap-2",children:["for-you-human-and-shipped.png","project-overview-missions.png","project-triage-slice.png"].map(e=>i.jsxs("div",{className:"border border-outline-variant bg-surface-low/80",children:[i.jsx("div",{className:"flex aspect-[4/3] items-center justify-center bg-surface-lowest/65 text-on-surface-variant",children:i.jsx(HZ,{className:"h-7 w-7",strokeWidth:1.2})}),i.jsx("div",{className:"truncate border-t border-outline-variant px-1 py-0.5 font-mono text-[8px] text-on-surface-variant",children:e})]},e))})}function rC({label:e,description:t,children:n}){return i.jsx(zx,{as:"section",className:"bg-surface-lowest/65 backdrop-blur-sm",header:i.jsx("span",{className:"uppercase tracking-[0.16em]",children:e}),children:i.jsxs("div",{className:"space-y-4 p-4",children:[i.jsx("p",{className:"font-mono text-[10px] leading-relaxed text-on-surface",children:t}),n]})})}function W8({dense:e=!1}){return i.jsxs("article",{className:ce("border border-outline-variant bg-surface-lowest/60 backdrop-blur-sm hard-shadow",e?"p-3":"p-4"),children:[i.jsxs("div",{className:"flex items-start justify-between gap-3",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(si,{token:{label:"Action required",tone:"danger",icon:Co},compact:e}),i.jsx("h3",{className:"font-mono text-sm text-on-surface",children:"Review demo-seed triage proof packet"})]}),i.jsx(nG,{label:"Today 4:18 PM"})]}),i.jsx("p",{className:"mt-3 whitespace-pre-line font-mono text-[11px] leading-relaxed text-on-surface",children:"Review the proof packet screenshots, confirm the shipped slice is ready, then approve or route back with notes."}),i.jsx("div",{className:"mt-3",children:i.jsx(uRe,{})}),i.jsx("div",{className:"mt-3 flex flex-wrap gap-1.5",children:tG.slice(0,4).map(t=>i.jsx(si,{token:t,compact:!0},t.label))})]})}function hRe(){return i.jsxs("article",{className:"relative border border-outline-variant bg-surface-lowest/60 p-4 hard-shadow backdrop-blur-sm",children:[i.jsx("div",{className:"absolute left-5 top-12 bottom-5 w-px bg-surface-highest"}),i.jsx("div",{className:"relative space-y-5 pl-8",children:[{token:ko[5],title:"Slice shipped with proof packet",body:"The triage slice closed with screenshots, queue context, and verification notes attached."},{token:ko[3],title:"Implementation completed",body:"Driver finished the UI pass and handed verification to guard and QA."},{token:ko[1],title:"Work routed for review",body:"The queue item moved from driver to guard with targeted checks."}].map(e=>{const t=e.token.icon??bu;return i.jsxs("div",{className:"relative",children:[i.jsx("span",{className:"absolute -left-[38px] top-0 flex h-5 w-5 items-center justify-center border border-outline-variant bg-surface-lowest text-on-surface",children:i.jsx(t,{className:"h-3 w-3",strokeWidth:1.5})}),i.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[i.jsx(si,{token:e.token,compact:!0}),i.jsx(nG,{label:"12 min ago"})]}),i.jsx("h4",{className:"mt-2 font-mono text-[12px] text-on-surface",children:e.title}),i.jsx("p",{className:"mt-1 font-mono text-[10px] leading-relaxed text-on-surface",children:e.body})]},e.title)})})]})}function fRe(){return i.jsx("div",{className:"divide-y divide-outline-variant border border-outline-variant bg-surface-lowest/55 backdrop-blur-sm",children:[{token:ko[4],title:"Approval needed",body:"Review proof screenshots and approve release-readiness.",actor:"human@host"},{token:ko[2],title:"Claimed by QA",body:"VM verification is in progress with current worktree source.",actor:"velocity-qa"},{token:ko[1],title:"Route to guard",body:"Run narrow advisory on UI-only diff and source scans.",actor:"redo3-guard-3"}].map(e=>i.jsxs("div",{className:"grid gap-3 p-3 sm:grid-cols-[auto_1fr_auto]",children:[i.jsx(si,{token:e.token,compact:!0}),i.jsxs("div",{className:"min-w-0",children:[i.jsx("div",{className:"font-mono text-[12px] text-on-surface",children:e.title}),i.jsx("div",{className:"mt-1 font-mono text-[10px] leading-relaxed text-on-surface",children:e.body})]}),i.jsx(Dl,{kind:e.actor.includes("human")?"human":"agent",label:e.actor,muted:!0})]},e.title))})}function pRe(){return i.jsx("div",{className:"paper-grid min-h-full p-8",children:i.jsxs("div",{className:"mx-auto max-w-7xl space-y-8",children:[i.jsxs("header",{className:"border border-outline-variant bg-surface-lowest/60 p-4 font-mono backdrop-blur-sm hard-shadow",children:[i.jsx("div",{className:"text-[10px] uppercase tracking-[0.18em] text-on-surface-variant",children:"Project graphics package preview"}),i.jsx("h1",{className:"mt-2 text-xl uppercase tracking-[0.14em] text-on-surface",children:"Queue, story, and proof card language"}),i.jsx("p",{className:"mt-2 max-w-3xl text-[11px] leading-relaxed text-on-surface",children:"Hidden preview route for choosing metadata badges, action chips, flow arrows, and proof-card density before applying the system to For You, Story, Queue, and scope rollups."})]}),i.jsxs("section",{className:"grid gap-4 lg:grid-cols-3",children:[i.jsxs(rC,{label:"A / Compact Ledger",description:"Small pills and restrained icons. Best when density matters and queue cards need to scan like a work ledger.",children:[i.jsx(W8,{dense:!0}),i.jsx(fRe,{})]}),i.jsxs(rC,{label:"B / Narrative Rail",description:"Story-first layout with event icons on a vertical rail. Best for showing how work moved from idea to proof.",children:[i.jsx(hRe,{}),i.jsx(dRe,{})]}),i.jsxs(rC,{label:"C / Action Board",description:"Bolder cards with explicit status, actors, and proof thumbnails. Best for For You and approval surfaces.",children:[i.jsx(W8,{}),i.jsx("div",{className:"flex flex-wrap gap-1.5",children:ko.map(e=>i.jsx(si,{token:e},e.label))})]})]}),i.jsxs("section",{className:"grid gap-4 lg:grid-cols-[1.2fr_0.8fr]",children:[i.jsx(zx,{as:"section",className:"bg-surface-lowest/65 backdrop-blur-sm",header:"EVENT BADGE VOCABULARY",children:i.jsx("div",{className:"grid gap-3 p-4 sm:grid-cols-2 lg:grid-cols-3",children:ko.map(e=>i.jsxs("div",{className:"border border-outline-variant bg-surface-lowest/55 p-3",children:[i.jsx(si,{token:e}),i.jsxs("div",{className:"mt-2 font-mono text-[10px] leading-relaxed text-on-surface",children:[e.label==="Queue created"?"A work item entered the system.":null,e.label==="Handoff"?"Ownership moved from one actor to another.":null,e.label==="Claimed"?"An actor is actively working the item.":null,e.label==="Completed"?"The assigned work item closed.":null,e.label==="Human action"?"A person needs to approve, deny, or route.":null,e.label==="Shipped"?"The slice closed with evidence attached.":null]})]},e.label))})}),i.jsx(zx,{as:"section",className:"bg-surface-lowest/65 backdrop-blur-sm",header:"SUPPORTING CHIPS",children:i.jsxs("div",{className:"space-y-4 p-4",children:[i.jsxs("div",{children:[i.jsx("div",{className:"mb-2 font-mono text-[9px] uppercase tracking-[0.14em] text-on-surface-variant",children:"Tags"}),i.jsx("div",{className:"flex flex-wrap gap-1.5",children:tG.map(e=>i.jsx(si,{token:e},e.label))})]}),i.jsxs("div",{children:[i.jsx("div",{className:"mb-2 font-mono text-[9px] uppercase tracking-[0.14em] text-on-surface-variant",children:"Actors"}),i.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[i.jsx(Dl,{kind:"human",label:"human@host"}),i.jsx(Dl,{kind:"agent",label:"driver@openrig-velocity"}),i.jsx(Dl,{kind:"agent",label:"guard@openrig-velocity",muted:!0})]})]}),i.jsxs("div",{children:[i.jsx("div",{className:"mb-2 font-mono text-[9px] uppercase tracking-[0.14em] text-on-surface-variant",children:"Scope"}),i.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[i.jsx(si,{token:{label:"Workspace",tone:"neutral",icon:rF}}),i.jsx(si,{token:{label:"Mission",tone:"info",icon:IC}}),i.jsx(si,{token:{label:"Slice",tone:"success",icon:_v}})]})]})]})})]})]})})}const Ip={shipped:{stripe:"border-l-emerald-600",pill:"bg-emerald-50 border-emerald-300",ink:"text-emerald-800",label:"SHIPPED"},incident:{stripe:"border-l-red-600",pill:"bg-red-50 border-red-300",ink:"text-red-800",label:"INCIDENT"},progress:{stripe:"border-l-sky-600",pill:"bg-sky-50 border-sky-300",ink:"text-sky-800",label:"PROGRESS"},approval:{stripe:"border-l-amber-600",pill:"bg-amber-50 border-amber-300",ink:"text-amber-800",label:"APPROVAL NEEDED"},concept:{stripe:"border-l-violet-600",pill:"bg-violet-50 border-violet-300",ink:"text-violet-800",label:"CONCEPT"}},mRe={shipped:"bg-success",incident:"bg-tertiary",progress:"bg-secondary",approval:"bg-warning",concept:"bg-outline"},gRe={shipped:"Shipped",incident:"Incident",progress:"Progress",approval:"Approval",concept:"Concept"},xRe={boxShadow:["0 2px 4px rgba(0, 0, 0, 0.14)","0 8px 20px rgba(0, 0, 0, 0.16)","0 0 40px rgba(0, 0, 0, 0.12)"].join(", ")};function Mp({testId:e,kind:t,title:n,oneLiner:s,expanded:r,drillInHref:a,drillInLabel:o,inlineActions:c,leadingAccessory:d}){const[h,m]=C.useState(!1);return i.jsxs("article",{"data-testid":e,"data-card-kind":t,"data-expanded":h,style:xRe,className:"relative bg-surface-low/45 backdrop-blur-[10px] overflow-hidden",children:[i.jsx(lr,{position:"tl"}),i.jsx(lr,{position:"tr"}),i.jsx(lr,{position:"bl"}),i.jsx(lr,{position:"br"}),i.jsxs("div",{role:"button",tabIndex:0,"data-testid":`${e}-toggle`,onClick:()=>m(f=>!f),onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),m(g=>!g))},className:"flex w-full min-h-[80px] cursor-pointer items-start gap-4 px-5 py-4 text-left","aria-expanded":h,children:[i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsxs("div",{"data-testid":`${e}-pill`,className:"flex items-center gap-2 font-mono text-[10px] uppercase tracking-[0.18em] text-on-surface",children:[i.jsx("span",{"aria-hidden":"true",className:`inline-block w-1.5 h-1.5 rounded-full ${mRe[t]}`}),i.jsx("span",{children:gRe[t]})]}),i.jsxs("h3",{"data-testid":`${e}-title`,className:"mt-2 flex items-center gap-2 font-headline text-[16px] font-bold leading-tight text-on-surface",children:[d,i.jsx("span",{className:"truncate",children:n})]}),i.jsx("p",{"data-testid":`${e}-one-liner`,className:"mt-1.5 font-body text-[12px] leading-relaxed text-on-surface line-clamp-2",children:s})]}),c&&i.jsx("div",{"data-testid":`${e}-inline-actions`,className:"flex shrink-0 items-center gap-2",onClick:f=>f.stopPropagation(),children:c})]}),h&&i.jsxs("div",{"data-testid":`${e}-expanded`,className:"border-t border-outline-variant/40 px-5 py-4",children:[r,a&&i.jsx("div",{className:"mt-3 flex justify-end",children:i.jsxs("a",{"data-testid":`${e}-drill-in`,href:a,className:"inline-flex items-center gap-1 min-h-[44px] border border-on-surface px-3 py-2 font-mono text-[10px] uppercase tracking-[0.12em] text-on-surface hover:bg-inverse-surface hover:text-background transition-colors",onClick:f=>f.stopPropagation(),children:[o??"Open"," →"]})})]})]})}function vRe({source:e}){return i.jsx(Mp,{testId:`feed-card-shipped-${e.sliceId}`,kind:"shipped",title:e.title,oneLiner:e.oneLiner,accent:Ip.shipped,drillInHref:`/project/slice/${e.sliceId}`,expanded:e.sections&&e.sections.length>0?i.jsx("ol",{className:"space-y-2 text-[11px]",children:e.sections.slice(0,3).map(t=>i.jsxs("li",{"data-testid":`feed-card-shipped-${e.sliceId}-section-${t.number}`,className:"flex gap-2",children:[i.jsxs("span",{className:"font-mono text-[10px] font-bold text-on-surface-variant",children:[t.number,"."]}),i.jsxs("div",{children:[i.jsx("div",{className:"font-semibold text-on-surface",children:t.heading}),i.jsx("div",{className:"text-on-surface",children:t.summary})]})]},t.number))}):i.jsx("div",{className:"text-[11px] text-on-surface-variant",children:e.oneLiner})})}const G8={success:"bg-emerald-500",warning:"bg-amber-500",danger:"bg-red-500",info:"bg-sky-500",muted:"bg-outline-variant"};function yRe({source:e}){return i.jsx(Mp,{testId:`feed-card-incident-${e.sliceId}`,kind:"incident",title:e.title,oneLiner:e.oneLiner,accent:Ip.incident,drillInHref:`/project/slice/${e.sliceId}`,drillInLabel:"Open timeline",leadingAccessory:i.jsx("span",{"data-testid":`feed-card-incident-${e.sliceId}-dot`,className:`inline-block h-3 w-3 rounded-full shrink-0 ${G8[e.status]}`,"aria-hidden":"true"}),expanded:e.recentEntries&&e.recentEntries.length>0?i.jsx("ul",{className:"space-y-2 text-[11px]",children:e.recentEntries.slice(0,3).map((t,n)=>i.jsxs("li",{"data-testid":`feed-card-incident-${e.sliceId}-entry-${n}`,className:"flex items-baseline gap-2",children:[i.jsx("span",{className:`inline-block h-2 w-2 rounded-full ${G8[t.status]} shrink-0`,"aria-hidden":"true"}),i.jsx("span",{className:"font-mono text-[9px] uppercase tracking-[0.10em] text-on-surface-variant shrink-0",children:t.time}),i.jsx("span",{className:"text-on-surface",children:t.title})]},n))}):i.jsx("div",{className:"text-[11px] text-on-surface-variant",children:"No recent entries."})})}function bRe({source:e,onMarkComplete:t}){const n=Math.max(0,Math.min(100,Math.round(e.percent))),s=t?i.jsx("button",{type:"button","data-testid":"progress-card-mark-complete",onClick:r=>{r.stopPropagation(),t(e.missionId)},className:"min-h-[36px] border border-on-surface px-3 py-1.5 font-mono text-[10px] uppercase tracking-[0.12em] text-on-surface hover:bg-inverse-surface hover:text-background transition-colors focus:outline-none focus:ring-1 focus:ring-on-surface",children:"Mark complete"}):void 0;return i.jsx(Mp,{testId:`feed-card-progress-${e.missionId}`,kind:"progress",title:e.title,oneLiner:e.nextStep??e.oneLiner,accent:Ip.progress,drillInHref:`/project/mission/${e.missionId}`,drillInLabel:"Open mission",inlineActions:s,leadingAccessory:i.jsx("div",{"data-testid":`feed-card-progress-${e.missionId}-bar`,"data-percent":n,className:"h-1.5 w-16 shrink-0 border border-outline-variant bg-surface-low overflow-hidden","aria-label":`Progress ${n}%`,children:i.jsx("div",{"data-testid":`feed-card-progress-${e.missionId}-bar-fill`,className:"h-full bg-sky-500",style:{width:`${n}%`}})}),expanded:e.activeSlice?i.jsxs("div",{"data-testid":`feed-card-progress-${e.missionId}-active-slice`,className:"border border-outline-variant bg-background px-2 py-2",children:[i.jsx("div",{className:"font-mono text-[8px] uppercase tracking-[0.18em] text-on-surface-variant",children:"Active slice"}),i.jsx("div",{className:"mt-1 text-[12px] font-semibold text-on-surface",children:e.activeSlice.label}),i.jsxs("div",{className:"mt-0.5 font-mono text-[9px] text-on-surface-variant",children:["status: ",e.activeSlice.status]})]}):i.jsx("div",{className:"text-[11px] text-on-surface-variant",children:"No active slice."})})}function _Re({source:e}){return i.jsx(Mp,{testId:`feed-card-approval-${e.qitemId}`,kind:"approval",title:e.title,oneLiner:e.oneLiner,accent:Ip.approval,drillInHref:e.drillInHref,drillInLabel:"Open detail",inlineActions:i.jsxs(i.Fragment,{children:[e.onApprove&&i.jsx("button",{type:"button","data-testid":`feed-card-approval-${e.qitemId}-approve`,onClick:e.onApprove,className:"min-h-[44px] border border-success px-3 py-1.5 font-mono text-[10px] uppercase tracking-[0.12em] text-success hover:bg-success hover:text-white transition-colors",children:"Approve"}),e.onDeny&&i.jsx("button",{type:"button","data-testid":`feed-card-approval-${e.qitemId}-deny`,onClick:e.onDeny,className:"min-h-[44px] border border-on-surface px-3 py-1.5 font-mono text-[10px] uppercase tracking-[0.12em] text-on-surface hover:bg-inverse-surface hover:text-background transition-colors",children:"Deny"})]}),expanded:e.bodyPreview?i.jsx("pre",{"data-testid":`feed-card-approval-${e.qitemId}-body`,className:"overflow-x-auto whitespace-pre-wrap break-words bg-background p-2 font-body text-[11px] leading-relaxed text-on-surface",children:e.bodyPreview}):i.jsx("div",{className:"text-[11px] text-on-surface-variant",children:"No body preview."})})}function wRe({source:e}){return i.jsx(Mp,{testId:`feed-card-concept-${e.sliceId}`,kind:"concept",title:e.title,oneLiner:e.oneLiner,accent:Ip.concept,drillInHref:`/project/slice/${e.sliceId}`,drillInLabel:"Open concept",expanded:e.comparePreview&&e.comparePreview.length>0?i.jsxs("table",{className:"w-full border-collapse text-[11px]",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"bg-background",children:[i.jsx("th",{className:"border border-outline-variant px-2 py-1 text-left font-mono text-[8px] uppercase tracking-[0.12em] text-on-surface-variant"}),i.jsx("th",{className:"border border-outline-variant px-2 py-1 text-left font-mono text-[8px] uppercase tracking-[0.12em] text-on-surface-variant",children:"Old"}),i.jsx("th",{className:"border border-outline-variant px-2 py-1 text-left font-mono text-[8px] uppercase tracking-[0.12em] text-on-surface-variant",children:"New"})]})}),i.jsx("tbody",{children:e.comparePreview.slice(0,3).map((t,n)=>i.jsxs("tr",{children:[i.jsx("td",{className:"border border-outline-variant px-2 py-1 font-mono text-[10px] font-semibold text-on-surface",children:t.label}),i.jsx("td",{className:"border border-outline-variant px-2 py-1 text-on-surface",children:t.valueOld}),i.jsx("td",{className:"border border-outline-variant px-2 py-1 text-on-surface",children:t.valueNew})]},n))})]}):i.jsx("div",{className:"text-[11px] text-on-surface-variant",children:e.oneLiner})})}function SRe(){return i.jsxs("div",{className:"mx-auto max-w-5xl space-y-10 px-6 py-10","data-testid":"card-previews-lab",children:[i.jsxs("header",{className:"space-y-2",children:[i.jsx("h1",{className:"font-mono text-[12px] uppercase tracking-[0.18em] text-on-surface-variant",children:"/lab/card-previews"}),i.jsx("p",{className:"font-mono text-[11px] text-on-surface",children:"Visual gallery of for-you card kind variants. Each section renders the same card component the live feed uses, with sample data."})]}),i.jsx(ou,{title:"Shipped",description:"A slice merged + summary view. Used when a slice closes successfully and the feed surfaces it to operators downstream."}),i.jsx(vRe,{source:{sliceId:"first-conveyor-run",title:"First Conveyor Run — shipped",oneLiner:"Slice merged at b71cddf. 4 commits + 1 proof packet.",sections:[{number:1,heading:"Lint parses + validates entries",summary:"12 tests pass; UTF-8 edge cases handled."},{number:2,heading:"Reviewer accepted with one concern",summary:"Combining-character edge addressed mid-flight."},{number:3,heading:"Proof packet captured",summary:"CLI output screenshot + diff render."}]}}),i.jsx(ou,{title:"Incident / Action Required",description:"A timeline-shaped surface for an in-flight or recent incident. Use status='warning' or 'danger' to surface attention; 'info' for informational; 'muted' for resolved."}),i.jsx(yRe,{source:{sliceId:"auth-bearer-tailscale-trust",title:"Auth bearer tailscale trust — concerning",oneLiner:"Reviewer flagged loopback-only default at fix-1; remediated at fix-2.",status:"warning",recentEntries:[{time:"13:42",title:"Reviewer BLOCKING-CONCERN raised",status:"danger"},{time:"14:01",title:"Driver forward-fix scoped",status:"info"},{time:"14:38",title:"Forward-fix landed; gates green",status:"success"}]}}),i.jsx(ou,{title:"Progress",description:"A mission-level progress card with percent + active-slice context. Used during a mission lifecycle to keep operators informed without requiring them to open the mission page."}),i.jsx(bRe,{source:{missionId:"release-0.3.1",title:"Release 0.3.1 — in flight",oneLiner:"Wave 3a + 3b dispatches; multiple slices in review.",percent:62,nextStep:"design-reviewer audit on slice 21 narrative voice",activeSlice:{id:"slice-21-onboarding-conveyor",label:"slice-21-onboarding-conveyor",status:"in-progress"}}}),i.jsx(ou,{title:"Approval / Action Required",description:"An operator-decision-needed surface. Renders the qitem context + the two action paths (Approve / Deny) the operator picks between."}),i.jsx(_Re,{source:{qitemId:"qitem-20260511201234-abcdef01",title:"Auth bearer tailscale trust — approve merge?",oneLiner:"All gates green; merge requires operator sign-off.",bodyPreview:"Triple-guard CLEAR. velocity-qa VM walk PASS. Ready for merge to main.",drillInHref:"/project/slice/auth-bearer-tailscale-trust",onApprove:()=>{},onDeny:()=>{}}}),i.jsx(ou,{title:"Concept / Observation",description:"A discovery / lab / scratch-pad surface. Used for not-yet-actionable observations, draft ideas, or comparison previews."}),i.jsx(wRe,{source:{sliceId:"concept-storytelling-primitives",title:"Storytelling primitives — concept",oneLiner:"Could replace one-off card components with kind-frame primitives.",comparePreview:[{label:"Card kinds",valueOld:"5 components",valueNew:"1 kind-frame + 5 sources"},{label:"Visual variance",valueOld:"drift over time",valueNew:"centralized accent tokens"},{label:"Maintenance",valueOld:"edit each component",valueNew:"edit kind-frame once"}]}}),i.jsx(ou,{title:"Empty state",description:"What the for-you feed shows when no events qualify. Reusable across surfaces; the EmptyState primitive is the canonical pattern."}),i.jsx(Ae,{label:"ALL CAUGHT UP",description:"No new events. Spin up a rig or declare a slice to populate this feed.",variant:"card",testId:"card-previews-empty-state"})]})}function ou({title:e,description:t}){return i.jsxs("div",{className:"space-y-1 pt-4",children:[i.jsx("h2",{className:"font-mono text-[10px] uppercase tracking-[0.16em] text-on-surface",children:e}),i.jsx("p",{className:"font-mono text-[10px] text-on-surface-variant max-w-3xl",children:t})]})}function Uy({backLayerOverride:e,vellumSheetOverride:t}={}){return i.jsxs("div",{"data-testid":"vellum-lab",className:"relative min-h-screen overflow-hidden",children:[e,t,i.jsx(QSe,{}),i.jsx(XSe,{}),i.jsx(cje,{})]})}function jRe(){return i.jsx(Uy,{backLayerOverride:i.jsx(ARe,{}),vellumSheetOverride:i.jsx(RRe,{})})}function NRe(){return i.jsx(Uy,{backLayerOverride:i.jsx(IRe,{}),vellumSheetOverride:i.jsx(TRe,{})})}function kRe(){return i.jsx(Uy,{backLayerOverride:i.jsx(ERe,{}),vellumSheetOverride:i.jsx(CRe,{})})}function CRe(){return i.jsx("div",{"data-testid":"vellum-sheet-heavy-diffuse","aria-hidden":"true",className:"absolute inset-0 z-[5] bg-surface-lowest/25 backdrop-blur-[8px] pointer-events-none"})}function ERe(){const r=Math.ceil(27.5)+2,a=(c,d,h=0)=>c/1280*Math.PI*2*d+h,o=[];for(let c=0;c<r;c++){const d=c*40-40;let h=`M 0 ${d.toFixed(2)}`;for(let m=0;m<=2560;m+=32){const f=Math.sin(a(m,2,c*.3))*36,g=Math.sin(a(m,5,c*.5))*9,x=Math.sin(a(m,3,c*.18))*14,y=f+g+x;h+=` L ${m} ${(d+y).toFixed(2)}`}o.push(h)}return i.jsx("div",{"data-testid":"back-layer-scrolling-topo","aria-hidden":"true",className:"absolute inset-0 z-0 overflow-hidden pointer-events-none select-none",children:i.jsx("svg",{className:"absolute top-0 left-0 h-full vellum-scroll-x",style:{width:"200%"},viewBox:"0 0 2560 1100",preserveAspectRatio:"xMidYMid slice",children:o.map((c,d)=>i.jsx("path",{d:c,stroke:"#1c1917",strokeWidth:"1.0",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},d))})})}function RRe(){return i.jsx("div",{"data-testid":"vellum-sheet-diffuse","aria-hidden":"true",className:"absolute top-[14px] bottom-[12px] left-[16px] right-[14px] z-[5] bg-surface-lowest/35 backdrop-blur-[14px] pointer-events-none"})}function TRe(){return i.jsx("div",{"data-testid":"vellum-sheet-more-diffuse","aria-hidden":"true",className:"absolute top-[14px] bottom-[12px] left-[16px] right-[14px] z-[5] bg-surface-lowest/45 backdrop-blur-[22px] pointer-events-none"})}function ARe(){const s=Math.ceil(27.5)+2,r=[];for(let a=0;a<s;a++){const o=a*40-40;let c=`M -50 ${o.toFixed(2)}`;for(let d=0;d<=1380;d+=40){const h=d/1280,m=Math.sin(h*Math.PI*2.2+a*.28)*36,f=Math.sin(h*Math.PI*5.8+a*.47)*9,g=Math.sin(h*Math.PI*3.6+a*.13+Math.sin(a*.5)*2)*16,x=m+f+g;c+=` L ${d.toFixed(0)} ${(o+x).toFixed(2)}`}r.push(c)}return i.jsx("div",{"data-testid":"back-layer-topo","aria-hidden":"true",className:"absolute inset-0 z-0 overflow-hidden pointer-events-none select-none",children:i.jsx("svg",{className:"w-full h-full",viewBox:"0 0 1280 1100",preserveAspectRatio:"xMidYMid slice",children:r.map((a,o)=>i.jsx("path",{d:a,stroke:"#1c1917",strokeWidth:"1.2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},o))})})}function IRe(){const e=[{type:"cube",size:220,pos:"top-[2%] -left-6"},{type:"spool",size:200,pos:"top-[4%] left-[24%]"},{type:"x-prism",size:220,pos:"top-[2%] left-[50%]"},{type:"cube-frame",size:240,pos:"top-[1%] -right-8"},{type:"arc-stripes",size:200,pos:"top-[28%] left-[4%]"},{type:"donut-dots",size:220,pos:"top-[26%] left-[28%]"},{type:"hex-prism",size:220,pos:"top-[26%] left-[54%]"},{type:"cylinder-stripes",size:200,pos:"top-[28%] right-[4%]"},{type:"wedge",size:230,pos:"top-[52%] -left-4"},{type:"stairs-iso",size:240,pos:"top-[50%] left-[24%]"},{type:"barrel",size:220,pos:"top-[52%] left-[50%]"},{type:"pacman",size:240,pos:"top-[50%] -right-6"},{type:"cube-stack",size:260,pos:"bottom-[-4%] left-[5%]"},{type:"L-prism",size:260,pos:"bottom-[-2%] left-[36%]"},{type:"cube-ports",size:260,pos:"bottom-[-4%] right-[4%]"}];return i.jsx("div",{"data-testid":"back-layer-isometric","aria-hidden":"true",className:"absolute inset-0 z-0 overflow-hidden pointer-events-none select-none",children:e.map((t,n)=>i.jsx(MRe,{...t},n))})}function MRe({type:e,size:t,pos:n}){return i.jsx("div",{className:`absolute ${n}`,style:{width:t,height:t},children:i.jsx(LRe,{type:e})})}function LRe({type:e}){const t={fill:"none",stroke:"currentColor",strokeWidth:1.6,strokeLinejoin:"round",strokeLinecap:"round"};switch(e){case"cube":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("polygon",{points:"30,8 52,20 52,44 30,56 8,44 8,20"}),i.jsx("line",{x1:"30",y1:"8",x2:"30",y2:"32"}),i.jsx("line",{x1:"30",y1:"32",x2:"8",y2:"20"}),i.jsx("line",{x1:"30",y1:"32",x2:"52",y2:"20"})]});case"cylinder-v":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("ellipse",{cx:"30",cy:"14",rx:"14",ry:"5"}),i.jsx("line",{x1:"16",y1:"14",x2:"16",y2:"46"}),i.jsx("line",{x1:"44",y1:"14",x2:"44",y2:"46"}),i.jsx("path",{d:"M 16 46 A 14 5 0 0 0 44 46"})]});case"triangle-prism":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("polygon",{points:"14,46 30,12 46,46"}),i.jsx("polygon",{points:"46,46 30,12 38,8 54,42"}),i.jsx("line",{x1:"14",y1:"46",x2:"54",y2:"42"})]});case"rod":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("line",{x1:"12",y1:"48",x2:"48",y2:"12",strokeWidth:"1.5"}),i.jsx("circle",{cx:"12",cy:"48",r:"4"}),i.jsx("circle",{cx:"48",cy:"12",r:"4"})]});case"cube-frame":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("polygon",{points:"30,8 52,20 52,44 30,56 8,44 8,20"}),i.jsx("line",{x1:"30",y1:"8",x2:"30",y2:"32"}),i.jsx("line",{x1:"30",y1:"32",x2:"8",y2:"20"}),i.jsx("line",{x1:"30",y1:"32",x2:"52",y2:"20"}),i.jsx("rect",{x:"22",y:"28",width:"16",height:"16"})]});case"stairs":return i.jsx("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:i.jsx("polyline",{points:"8,52 18,52 18,42 28,42 28,32 38,32 38,22 48,22 48,12 56,12"})});case"spool":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("ellipse",{cx:"36",cy:"30",rx:"14",ry:"6"}),i.jsx("path",{d:"M 22 30 L 8 30",strokeWidth:"1.5"}),i.jsx("line",{x1:"36",y1:"14",x2:"36",y2:"22"})]});case"arc-c":return i.jsx("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:i.jsx("path",{d:"M 44 12 A 20 20 0 1 0 44 48",strokeWidth:"1.5"})});case"diamond-row":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("polygon",{points:"8,30 14,24 20,30 14,36"}),i.jsx("polygon",{points:"20,30 26,24 32,30 26,36"}),i.jsx("polygon",{points:"32,30 38,24 44,30 38,36"}),i.jsx("polygon",{points:"44,30 50,24 56,30 50,36"})]});case"plus":return i.jsx("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:i.jsx("polygon",{points:"24,8 36,8 36,24 52,24 52,36 36,36 36,52 24,52 24,36 8,36 8,24 24,24"})});case"cylinder-h":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("ellipse",{cx:"14",cy:"30",rx:"5",ry:"14"}),i.jsx("line",{x1:"14",y1:"16",x2:"46",y2:"16"}),i.jsx("line",{x1:"14",y1:"44",x2:"46",y2:"44"}),i.jsx("path",{d:"M 46 16 A 5 14 0 0 1 46 44"})]});case"wave":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("path",{d:"M 8 16 Q 18 8 28 16 T 48 16",strokeWidth:"1.2"}),i.jsx("path",{d:"M 8 30 Q 18 22 28 30 T 48 30",strokeWidth:"1.2"}),i.jsx("path",{d:"M 8 44 Q 18 36 28 44 T 48 44",strokeWidth:"1.2"})]});case"x-prism":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("polygon",{points:"14,8 24,8 30,18 36,8 46,8 36,22 46,36 36,36 30,26 24,36 14,36 24,22"}),i.jsx("line",{x1:"14",y1:"36",x2:"20",y2:"40"}),i.jsx("line",{x1:"46",y1:"36",x2:"52",y2:"40"})]});case"tri-stack":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,fill:"currentColor",children:[i.jsx("polygon",{points:"12,40 18,28 24,40"}),i.jsx("polygon",{points:"24,40 30,28 36,40"}),i.jsx("polygon",{points:"36,40 42,28 48,40"})]});case"L-prism":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("polygon",{points:"8,28 28,18 48,28 28,38"}),i.jsx("polygon",{points:"28,38 48,28 48,44 28,54"}),i.jsx("polygon",{points:"8,28 8,44 28,54 28,38"})]});case"arc-stripes":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("path",{d:"M 12 50 A 22 22 0 0 1 48 14",strokeWidth:"1"}),i.jsx("path",{d:"M 16 50 A 18 18 0 0 1 48 18",strokeWidth:"1"}),i.jsx("path",{d:"M 20 50 A 14 14 0 0 1 48 22",strokeWidth:"1"}),i.jsx("path",{d:"M 24 50 A 10 10 0 0 1 48 26",strokeWidth:"1"})]});case"hex-prism":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("polygon",{points:"30,8 48,18 48,38 30,48 12,38 12,18"}),i.jsx("line",{x1:"30",y1:"8",x2:"30",y2:"48"}),i.jsx("line",{x1:"12",y1:"18",x2:"30",y2:"28"}),i.jsx("line",{x1:"48",y1:"18",x2:"30",y2:"28"})]});case"dot-circle":return i.jsx("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",fill:"currentColor",children:Array.from({length:16}).map((n,s)=>{const r=s/16*Math.PI*2,a=30+Math.cos(r)*22,o=30+Math.sin(r)*22;return i.jsx("circle",{cx:a,cy:o,r:"1.8"},s)})});case"wedge":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("path",{d:"M 30 30 L 30 8 A 22 22 0 0 1 52 30 Z",fill:"currentColor"}),i.jsx("path",{d:"M 30 30 L 8 30 A 22 22 0 0 1 30 8"}),i.jsx("line",{x1:"30",y1:"30",x2:"14",y2:"44"}),i.jsx("line",{x1:"30",y1:"30",x2:"22",y2:"50"}),i.jsx("line",{x1:"30",y1:"30",x2:"34",y2:"52"})]});case"down-arrows":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,fill:"currentColor",children:[i.jsx("polygon",{points:"20,8 40,8 30,22"}),i.jsx("polygon",{points:"20,22 40,22 30,36"}),i.jsx("polygon",{points:"20,36 40,36 30,50"})]});case"donut-dots":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("circle",{cx:"30",cy:"30",r:"22"}),i.jsx("circle",{cx:"30",cy:"30",r:"10"}),i.jsx("g",{fill:"currentColor",children:Array.from({length:24}).map((n,s)=>{const r=s/24*Math.PI*2+.08,a=16;return i.jsx("circle",{cx:30+Math.cos(r)*a,cy:30+Math.sin(r)*a,r:"0.9"},s)})})]});case"bowtie":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,fill:"currentColor",children:[i.jsx("polygon",{points:"8,18 22,30 8,42"}),i.jsx("polygon",{points:"52,18 38,30 52,42"}),i.jsx("circle",{cx:"30",cy:"30",r:"3"})]});case"dot-grid":return i.jsx("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",fill:"currentColor",children:Array.from({length:6}).map((n,s)=>Array.from({length:6}).map((r,a)=>i.jsx("circle",{cx:10+a*8,cy:10+s*8,r:"1.4"},`${s}-${a}`)))});case"arc-half":return i.jsx("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:i.jsx("path",{d:"M 8 38 A 22 22 0 0 1 52 38",strokeWidth:"1.5"})});case"cylinder-stripes":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("ellipse",{cx:"30",cy:"14",rx:"14",ry:"5"}),i.jsx("line",{x1:"16",y1:"14",x2:"16",y2:"46"}),i.jsx("line",{x1:"44",y1:"14",x2:"44",y2:"46"}),i.jsx("path",{d:"M 16 46 A 14 5 0 0 0 44 46"}),i.jsx("line",{x1:"22",y1:"18",x2:"22",y2:"44",strokeDasharray:"2 2"}),i.jsx("line",{x1:"30",y1:"19",x2:"30",y2:"45",strokeDasharray:"2 2"}),i.jsx("line",{x1:"38",y1:"18",x2:"38",y2:"44",strokeDasharray:"2 2"})]});case"dot-cloud":return i.jsx("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",fill:"currentColor",children:[[22,18],[30,14],[38,18],[16,24],[24,24],[32,22],[40,24],[46,28],[18,32],[26,32],[34,32],[42,32],[22,38],[30,38],[38,38],[28,44],[36,44]].map(([n,s],r)=>i.jsx("circle",{cx:n,cy:s,r:"1.5"},r))});case"pacman":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("path",{d:"M 30 30 L 52 18 A 22 22 0 1 1 52 42 Z",fill:"currentColor"}),i.jsx("line",{x1:"20",y1:"20",x2:"14",y2:"14"}),i.jsx("line",{x1:"20",y1:"40",x2:"14",y2:"46"}),i.jsx("line",{x1:"12",y1:"30",x2:"6",y2:"30"})]});case"down-triangles":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,fill:"currentColor",children:[i.jsx("polygon",{points:"22,12 38,12 30,24"}),i.jsx("polygon",{points:"22,28 38,28 30,40"})]});case"cube-inset":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("polygon",{points:"30,4 50,16 50,36 30,48 10,36 10,16"}),i.jsx("line",{x1:"30",y1:"4",x2:"30",y2:"48"}),i.jsx("line",{x1:"10",y1:"16",x2:"30",y2:"28"}),i.jsx("line",{x1:"50",y1:"16",x2:"30",y2:"28"}),i.jsx("rect",{x:"22",y:"46",width:"16",height:"10"})]});case"hex-small":return i.jsx("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:i.jsx("polygon",{points:"30,18 42,24 42,38 30,44 18,38 18,24"})});case"cylinder-disc":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("ellipse",{cx:"34",cy:"30",rx:"14",ry:"5"}),i.jsx("path",{d:"M 20 30 A 14 5 0 0 1 48 30"}),i.jsx("line",{x1:"20",y1:"30",x2:"20",y2:"36",strokeWidth:"1.5"}),i.jsx("ellipse",{cx:"20",cy:"36",rx:"3",ry:"1.4"}),i.jsx("path",{d:"M 20 30 L 14 32"})]});case"triangle-solid":return i.jsx("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",fill:"currentColor",children:i.jsx("polygon",{points:"30,16 46,44 14,44"})});case"stairs-iso":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("polygon",{points:"8,40 16,36 24,40 16,44"}),i.jsx("polygon",{points:"16,36 24,32 32,36 24,40"}),i.jsx("polygon",{points:"24,32 32,28 40,32 32,36"}),i.jsx("polygon",{points:"32,28 40,24 48,28 40,32"}),i.jsx("polygon",{points:"40,24 48,20 56,24 48,28"})]});case"coin":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("ellipse",{cx:"30",cy:"26",rx:"14",ry:"6"}),i.jsx("path",{d:"M 16 26 L 16 34 A 14 6 0 0 0 44 34 L 44 26"}),i.jsx("line",{x1:"22",y1:"26",x2:"22",y2:"34"}),i.jsx("line",{x1:"30",y1:"32",x2:"30",y2:"38"}),i.jsx("line",{x1:"38",y1:"26",x2:"38",y2:"34"})]});case"cube-ports":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("polygon",{points:"30,6 52,18 52,42 30,54 8,42 8,18"}),i.jsx("line",{x1:"30",y1:"6",x2:"30",y2:"30"}),i.jsx("line",{x1:"30",y1:"30",x2:"8",y2:"18"}),i.jsx("line",{x1:"30",y1:"30",x2:"52",y2:"18"}),i.jsx("circle",{cx:"20",cy:"20",r:"2.5",fill:"currentColor"}),i.jsx("circle",{cx:"40",cy:"20",r:"2.5",fill:"currentColor"}),i.jsx("circle",{cx:"30",cy:"42",r:"2.5",fill:"currentColor"})]});case"arc-bridge":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("path",{d:"M 8 44 Q 30 8 52 44",strokeWidth:"1.5"}),i.jsx("circle",{cx:"30",cy:"44",r:"3",fill:"currentColor"})]});case"zigzag-v":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("polyline",{points:"24,8 36,16 24,24 36,32 24,40 36,48",strokeWidth:"1.5"}),i.jsx("polyline",{points:"20,12 32,20 20,28 32,36 20,44 32,52",strokeWidth:"1.5"})]});case"x-flat":return i.jsx("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,fill:"currentColor",children:i.jsx("polygon",{points:"14,14 22,14 30,22 38,14 46,14 36,28 46,46 38,46 30,34 22,46 14,46 24,28"})});case"cube-stack":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("polygon",{points:"14,30 22,26 30,30 22,34"}),i.jsx("polygon",{points:"22,34 30,30 30,38 22,42"}),i.jsx("polygon",{points:"14,30 14,38 22,42 22,34"}),i.jsx("polygon",{points:"30,22 38,18 46,22 38,26"}),i.jsx("polygon",{points:"38,26 46,22 46,30 38,34"}),i.jsx("polygon",{points:"30,22 30,30 38,34 38,26"})]});case"back-arrows":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,fill:"currentColor",children:[i.jsx("polygon",{points:"42,16 42,44 24,30"}),i.jsx("polygon",{points:"28,16 28,44 10,30"})]});case"barrel":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("ellipse",{cx:"44",cy:"30",rx:"6",ry:"14"}),i.jsx("line",{x1:"44",y1:"16",x2:"14",y2:"20"}),i.jsx("line",{x1:"44",y1:"44",x2:"14",y2:"40"}),i.jsx("ellipse",{cx:"14",cy:"30",rx:"4",ry:"10"}),i.jsx("line",{x1:"20",y1:"20",x2:"20",y2:"40",strokeDasharray:"2 2"}),i.jsx("line",{x1:"28",y1:"19",x2:"28",y2:"41",strokeDasharray:"2 2"}),i.jsx("line",{x1:"36",y1:"18",x2:"36",y2:"42",strokeDasharray:"2 2"})]});case"wave-s":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("path",{d:"M 22 8 Q 32 18 22 28 T 22 48",strokeWidth:"1.5"}),i.jsx("path",{d:"M 38 8 Q 28 18 38 28 T 38 48",strokeWidth:"1.5"})]})}}const Pe=cX({component:()=>i.jsx(YX,{client:aZ,children:i.jsx(iZ,{children:i.jsx(Wie,{children:i.jsx(Iq,{})})})})}),ORe=Oe({getParentRoute:()=>Pe,path:"/",component:xSe}),PRe=Oe({getParentRoute:()=>Pe,path:"/topology",component:GCe}),DRe=Oe({getParentRoute:()=>Pe,path:"/topology/rig/$rigId",component:KCe}),$Re=Oe({getParentRoute:()=>Pe,path:"/topology/pod/$rigId/$podName",component:QCe}),BRe=Oe({getParentRoute:()=>Pe,path:"/topology/seat/$rigId/$logicalId",component:XCe}),qRe=Oe({getParentRoute:()=>Pe,path:"/for-you",component:Qje}),FRe=Oe({getParentRoute:()=>Pe,path:"/project",component:AEe}),zRe=Oe({getParentRoute:()=>Pe,path:"/project/mission/$missionId",component:IEe}),HRe=Oe({getParentRoute:()=>Pe,path:"/project/slice/$sliceId",component:OEe}),URe=Oe({getParentRoute:()=>Pe,path:"/agents",component:VEe}),VRe=Oe({getParentRoute:()=>Pe,path:"/fleet",component:XEe}),WRe=Oe({getParentRoute:()=>Pe,path:"/workflows",component:JEe}),GRe=Oe({getParentRoute:()=>Pe,path:"/workflow/instance/$instanceId",validateSearch:e=>({step:typeof e.step=="string"?e.step:void 0}),component:()=>{const{instanceId:e}=An({from:"/workflow/instance/$instanceId"}),{step:t}=vv({from:"/workflow/instance/$instanceId"});return i.jsx(lRe,{instanceId:e,anchorStepId:t??null})}}),KRe=Oe({getParentRoute:()=>Pe,path:"/specs",component:sW}),YRe=Oe({getParentRoute:()=>Pe,path:"/specs/applications",component:sW}),QRe=Oe({getParentRoute:()=>Pe,path:"/specs/skills",component:pNe}),XRe=Oe({getParentRoute:()=>Pe,path:"/specs/skills/$skillToken",component:()=>{const{skillToken:e}=An({from:"/specs/skills/$skillToken"});return i.jsx(rW,{skillToken:e})}}),ZRe=Oe({getParentRoute:()=>Pe,path:"/specs/skills/$skillToken/file/$fileToken",component:()=>{const{skillToken:e,fileToken:t}=An({from:"/specs/skills/$skillToken/file/$fileToken"});return i.jsx(rW,{skillToken:e,fileToken:t})}}),JRe=Oe({getParentRoute:()=>Pe,path:"/specs/plugins",component:mNe}),eTe=Oe({getParentRoute:()=>Pe,path:"/files",component:qNe}),tTe=Oe({getParentRoute:()=>Pe,path:"/plugins/$pluginId",component:()=>{const{pluginId:e}=An({from:"/plugins/$pluginId"});return i.jsx(NNe,{pluginId:e})}}),nTe=Oe({getParentRoute:()=>Pe,path:"/specs/$specKind/$specName",component:()=>{const{specName:e}=An({from:"/specs/$specKind/$specName"});return i.jsx(Ql,{to:"/specs/library/$entryId",params:{entryId:e}})}}),sTe=Oe({getParentRoute:()=>Pe,path:"/settings",component:XNe}),rTe=Oe({getParentRoute:()=>Pe,path:"/settings/policies",component:nke}),iTe=Oe({getParentRoute:()=>Pe,path:"/settings/log",component:ake}),aTe=Oe({getParentRoute:()=>Pe,path:"/settings/status",component:uke}),oTe=Oe({getParentRoute:()=>Pe,path:"/search",component:W1e}),lTe=Oe({getParentRoute:()=>Pe,path:"/lab/project-graphics-preview",component:pRe}),cTe=Oe({getParentRoute:()=>Pe,path:"/lab/card-previews",component:SRe}),uTe=Oe({getParentRoute:()=>Pe,path:"/lab/vellum-lab",component:Uy}),dTe=Oe({getParentRoute:()=>Pe,path:"/lab/vellum-bg/a-large",component:jRe}),hTe=Oe({getParentRoute:()=>Pe,path:"/lab/vellum-bg/b-small",component:NRe}),fTe=Oe({getParentRoute:()=>Pe,path:"/lab/vellum-bg/c-allover",component:kRe});function pTe(){var s;const{rigId:e}=An({from:"/rigs/$rigId"}),{data:t}=Dr(),n=(s=t==null?void 0:t.find(r=>r.id===e))==null?void 0:s.name;return i.jsx("div",{className:"flex flex-col flex-1 h-full",children:i.jsx("div",{className:"flex-1 min-h-[400px] relative",children:i.jsx(yT,{rigId:e,rigName:n??null,showDiscovered:!1})})})}const mTe=Oe({getParentRoute:()=>Pe,path:"/rigs/$rigId",component:pTe}),gTe=Oe({getParentRoute:()=>Pe,path:"/rigs/$rigId/nodes/$logicalId",component:()=>{const{rigId:e,logicalId:t}=An({from:"/rigs/$rigId/nodes/$logicalId"});return i.jsx(UV,{rigId:e,logicalId:decodeURIComponent(t)})}}),xTe=Oe({getParentRoute:()=>Pe,path:"/import",component:Gbe}),vTe=Oe({getParentRoute:()=>Pe,path:"/packages",component:Jbe}),yTe=Oe({getParentRoute:()=>Pe,path:"/packages/install",component:i0e}),bTe=Oe({getParentRoute:()=>Pe,path:"/packages/$packageId",component:rwe}),_Te=Oe({getParentRoute:()=>Pe,path:"/bootstrap",component:fwe}),wTe=Oe({getParentRoute:()=>Pe,path:"/agents/validate",component:pwe}),STe=Oe({getParentRoute:()=>Pe,path:"/specs/rig",component:Cwe}),jTe=Oe({getParentRoute:()=>Pe,path:"/specs/agent",component:Rwe}),NTe=Oe({getParentRoute:()=>Pe,path:"/specs/library/$entryId",component:()=>{const{entryId:e}=An({from:"/specs/library/$entryId"});return i.jsx(Jwe,{entryId:e})}}),kTe=Oe({getParentRoute:()=>Pe,path:"/discovery",component:()=>i.jsx("div",{className:"flex h-full w-full items-center justify-center p-8",children:i.jsx(Ae,{label:"DISCOVERY",description:"Discovery surface preserved; redesign deferred per code-map.",variant:"card",testId:"discovery-placeholder"})})}),CTe=Oe({getParentRoute:()=>Pe,path:"/discovery/inventory",component:z1e}),ETe=Oe({getParentRoute:()=>Pe,path:"/bundles/inspect",component:Iwe}),RTe=Oe({getParentRoute:()=>Pe,path:"/bundles/install",component:Mwe}),TTe=Oe({getParentRoute:()=>Pe,path:"/context",component:()=>i.jsx(Ql,{to:"/topology"})}),ATe=Oe({getParentRoute:()=>Pe,path:"/mission-control",component:()=>i.jsx(Ql,{to:"/for-you"})}),ITe=Oe({getParentRoute:()=>Pe,path:"/slices",component:()=>i.jsx(Ql,{to:"/project"})}),MTe=Oe({getParentRoute:()=>Pe,path:"/slices/$name",component:()=>{const{name:e}=An({from:"/slices/$name"});return i.jsx(Ql,{to:"/project/slice/$sliceId",params:{sliceId:e}})}}),LTe=Oe({getParentRoute:()=>Pe,path:"/progress",component:()=>i.jsx(Ql,{to:"/project"})}),OTe=Oe({getParentRoute:()=>Pe,path:"/steering",component:()=>i.jsx(Ql,{to:"/project"})}),PTe=Pe.addChildren([ORe,PRe,DRe,$Re,BRe,qRe,FRe,zRe,HRe,URe,VRe,WRe,GRe,KRe,YRe,QRe,JRe,XRe,ZRe,tTe,eTe,nTe,sTe,rTe,iTe,aTe,oTe,lTe,cTe,uTe,dTe,hTe,fTe,mTe,gTe,xTe,vTe,yTe,bTe,_Te,wTe,STe,jTe,NTe,kTe,CTe,ETe,RTe,TTe,ATe,ITe,MTe,LTe,OTe]),DTe=yX({routeTree:PTe}),sG="openrig.uiMaintenanceNoticeDismissed",$Te="The OpenRig UI is experimental and in maintenance mode. It is not under active development; support is best-effort. The CLI is the primary supported interface. Contributions welcome.";function BTe(){try{return localStorage.getItem(sG)==="1"}catch{return!1}}function qTe(){const[e,t]=C.useState(BTe);if(e)return null;const n=()=>{try{localStorage.setItem(sG,"1")}catch{}t(!0)};return i.jsxs("div",{className:"fixed inset-x-0 top-0 z-[100] flex items-start justify-between gap-3 border-b border-amber-500/40 bg-amber-50 px-4 py-2 text-sm text-amber-950 shadow-sm dark:bg-amber-950 dark:text-amber-50","data-testid":"ui-maintenance-notice",role:"status",children:[i.jsx("span",{children:$Te}),i.jsx("button",{"aria-label":"Dismiss maintenance notice",className:"shrink-0 rounded px-1.5 font-semibold hover:bg-amber-200/60 dark:hover:bg-amber-900",onClick:n,type:"button",children:"×"})]})}function FTe(){return i.jsxs(i.Fragment,{children:[i.jsx(qTe,{}),i.jsx(wX,{router:DTe})]})}const K8=document.getElementById("root");K8&&bY.createRoot(K8).render(i.jsx(C.StrictMode,{children:i.jsx(Bie,{children:i.jsx(FTe,{})})}));
|
|
623
|
+
... ${n.length-8} more lines`}function MEe({qitemIds:e,queueItemsById:t,queueItemsFetching:n}){return e.length===0?i.jsx(Ae,{label:"NO QITEMS",description:"No queue items associated with this slice.",variant:"card",testId:"slice-queue-empty"}):i.jsxs("div",{children:[n?i.jsx("div",{"data-testid":"slice-queue-fetching",className:"mb-2 font-mono text-[10px] uppercase tracking-[0.12em] text-on-surface-variant",children:"Loading queue bodies..."}):null,i.jsx("ul",{"data-testid":"slice-queue-list",className:"divide-y divide-outline-variant border border-outline-variant",children:e.map(s=>{const r=t.get(s);return i.jsx("li",{className:"bg-surface-lowest/35 backdrop-blur-sm",children:i.jsxs(Ap,{data:YW(s,r),testId:`slice-queue-trigger-${s}`,className:"block w-full px-3 py-2 text-left hover:bg-surface-lowest/55 transition-colors font-mono text-xs",children:[i.jsxs("span",{className:"flex flex-wrap items-center gap-2",children:[r!=null&&r.state?i.jsx(FE,{state:r.state,compact:!0}):i.jsx(VF,{kind:"queue.item",compact:!0}),i.jsx(_f,{value:r==null?void 0:r.tsCreated})]}),i.jsx("span",{className:"mt-2 block whitespace-pre-wrap break-words text-on-surface",children:QW(s,r)}),r?i.jsxs("span",{"data-testid":`slice-queue-meta-${s}`,className:"mt-2 block space-y-2 text-[10px] text-on-surface-variant",children:[i.jsx(zE,{source:r.sourceSession,destination:r.destinationSession,muted:!0}),i.jsxs("span",{className:"flex flex-wrap gap-1.5",children:[i.jsx(Uu,{tag:s}),(r.tags??[]).slice(0,5).map(a=>i.jsx(Uu,{tag:a},a))]})]}):null]})},s)})})]})}function XW(e){return qE(e)}function cr({label:e,value:t}){return i.jsxs("div",{className:"border border-outline-variant bg-surface-lowest/35 p-3 backdrop-blur-sm",children:[i.jsx("div",{className:"font-mono text-[8px] uppercase tracking-[0.14em] text-on-surface-variant",children:e}),i.jsx("div",{className:"mt-1 font-mono text-sm font-bold text-on-surface",children:t})]})}function LEe({detail:e,remoteGated:t}){const n=e.acceptance.currentStep,s=Yl(t?null:e.slicePath??null,"README.md");return i.jsxs("div",{"data-testid":"slice-overview-tab",className:"space-y-6",children:[i.jsxs("section",{"data-testid":"slice-overview-summary",className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-4",children:[i.jsx(cr,{label:"Status",value:e.status}),i.jsx(cr,{label:"Progress",value:`${e.acceptance.percentage}%`}),i.jsx(cr,{label:"Qitems",value:e.qitemIds.length}),i.jsx(cr,{label:"Last Activity",value:XW(e.lastActivityAt)})]}),s.content&&i.jsx("section",{"data-testid":"slice-overview-readme",className:"border border-outline-variant bg-surface-lowest/20 p-4",children:i.jsx(Zn,{content:s.content,hideFrontmatter:!0,hideRawToggle:!0})}),i.jsxs("section",{"data-testid":"slice-overview-current-step",className:"border border-outline-variant bg-surface-lowest/20 p-4",children:[i.jsx(ct,{tone:"muted",children:"Current Step"}),n?i.jsxs("div",{className:"mt-3 grid gap-2 font-mono text-[10px] text-on-surface sm:grid-cols-2",children:[i.jsxs("div",{children:[i.jsx("div",{className:"text-[8px] uppercase tracking-[0.14em] text-on-surface-variant",children:"Step"}),i.jsx("div",{className:"font-bold text-on-surface",children:n.stepId})]}),i.jsxs("div",{children:[i.jsx("div",{className:"text-[8px] uppercase tracking-[0.14em] text-on-surface-variant",children:"Role"}),i.jsx("div",{className:"font-bold text-on-surface",children:n.role})]}),i.jsxs("div",{className:"sm:col-span-2",children:[i.jsx("div",{className:"text-[8px] uppercase tracking-[0.14em] text-on-surface-variant",children:"Objective"}),i.jsx("div",{children:n.objective??"No objective declared."})]}),i.jsxs("div",{children:[i.jsx("div",{className:"text-[8px] uppercase tracking-[0.14em] text-on-surface-variant",children:"Allowed exits"}),i.jsx("div",{children:n.allowedExits.join(", ")||"-"})]}),i.jsxs("div",{children:[i.jsx("div",{className:"text-[8px] uppercase tracking-[0.14em] text-on-surface-variant",children:"Hop count"}),i.jsx("div",{children:n.hopCount})]})]}):i.jsx("div",{className:"mt-3 font-mono text-[10px] text-on-surface-variant",children:"No workflow step is currently bound."})]}),i.jsxs("section",{"data-testid":"slice-overview-readiness",className:"border border-outline-variant bg-surface-lowest/20 p-4",children:[i.jsx(ct,{tone:"muted",children:"Readiness"}),i.jsxs("div",{className:"mt-3 space-y-2 font-mono text-[10px] text-on-surface",children:[i.jsxs("div",{children:[e.acceptance.doneItems," of ",e.acceptance.totalItems," acceptance items complete."]}),i.jsxs("div",{children:[e.tests.aggregate.passCount," proof packets passing / ",e.tests.aggregate.failCount," failing."]}),e.acceptance.closureCallout&&i.jsx("div",{className:"border border-amber-300 bg-amber-50 px-2 py-1 text-amber-800",children:e.acceptance.closureCallout}),e.workflowBinding&&i.jsxs("div",{className:"text-on-surface-variant",children:["Workflow: ",e.workflowBinding.workflowName," v",e.workflowBinding.workflowVersion]})]})]})]})}function OEe(){var y,b,_;const{sliceId:e}=An({from:"/project/slice/$sliceId"}),[t,n]=C.useState("review"),{data:s}=Pr(),r=((s==null?void 0:s.selected)??at)!==at,a=rd(),{known:o,isLocal:c}=sd(),d=Hee(e),h=ME(((y=d.data)==null?void 0:y.qitemIds)??[]),m=C.useMemo(()=>h.itemsById,[h.itemsById]),f=PW(((b=d.data)==null?void 0:b.missionId)??null);if(d.isLoading)return i.jsx(uf,{eyebrow:"Slice",title:e,tabs:sC,active:t,onSelect:w=>n(w),children:i.jsx(Ae,{label:"LOADING",description:`Fetching /api/slices/${e}…`,variant:"card",testId:"slice-scope-loading"})});if(d.isError||!d.data)return i.jsx(uf,{eyebrow:"Slice",title:e,tabs:sC,active:t,onSelect:w=>n(w),children:i.jsx(Ae,{label:"SLICE NOT AVAILABLE",description:d.error instanceof Error?d.error.message:`Could not load slice "${e}". The slices indexer may not be configured (rig config get workspace.slices_root).`,variant:"card",testId:"slice-scope-error"})});const g=d.data,x=((_=f.data)==null?void 0:_.slices.find(w=>w.name===g.name))??null;return i.jsxs(uf,{eyebrow:"Slice",title:g.displayName||g.name,tabs:sC,active:t,onSelect:w=>n(w),children:[t==="review"?o?c?i.jsx(cEe,{sliceName:g.name,slicePath:a?g.slicePath:null,anchorIdentity:typeof window<"u"&&window.location.hash.startsWith("#needs-you-")?window.location.hash.slice(11):null}):i.jsx(VW,{testId:"slice-review-remote-gated"}):i.jsx(UW,{testId:"slice-review-selection-pending"}):null,t==="story"?i.jsx(GT,{rows:[],detailsByName:new Map,queueItemsById:m,isFetching:!1}):null,t==="overview"?i.jsx(LEe,{detail:g,remoteGated:!a}):null,t==="progress"?i.jsxs("div",{className:"space-y-6",children:[x&&(x.railStatus==="missing"||x.railStatus==="malformed")&&i.jsx(Ae,{label:x.railStatus==="malformed"?"PROGRESS RAIL MALFORMED":"PROGRESS RAIL MISSING",description:x.railStatus==="malformed"?`Slice progress rail has errors (${x.frontmatterError??"malformed frontmatter"}). Run the audit command to diagnose.`:"This slice has no PROGRESS.md and no readme-only marker.",variant:"card",testId:"slice-progress-rail-status",action:{label:`rig scope audit --mission ${g.missionId}`}}),x&&x.findings.length>0&&i.jsxs("section",{"data-testid":"slice-scope-findings",className:"border border-outline-variant bg-amber-50/40 p-4",children:[i.jsxs(ct,{children:["Scope Findings (",x.findings.length,")"]}),i.jsx("ul",{className:"mt-2 space-y-1 font-mono text-[11px]",children:x.findings.map((w,E)=>i.jsxs("li",{className:ce("px-2 py-1",w.severity==="high"?"text-red-700":"text-on-surface-variant"),children:["[",w.severity,"] ",w.kind,": ",w.message]},E))})]}),i.jsx(m2e,{acceptance:g.acceptance})]}):null,t==="artifacts"?i.jsx(HT,{scopePath:a?g.slicePath:null,scopeLabel:g.displayName||g.name,remoteGated:r}):null,t==="proof"?i.jsx(j2e,{sliceId:g.displayName,title:g.name,slicePath:a?g.slicePath:null}):null,t==="queue"?i.jsx(MEe,{qitemIds:g.qitemIds,queueItemsById:m,queueItemsFetching:h.isFetching}):null,t==="topology"?i.jsx(zT,{topology:g.topology}):null]})}const PEe=15e3,DEe=3e4,$Ee=["review","fleet"];async function BEe(){const e=await fetch("/api/review/fleet");if(!e.ok)throw new Error(`HTTP ${e.status}`);return await e.json()}function ZW(e={}){return Re({queryKey:$Ee,queryFn:BEe,enabled:e.enabled??!0,staleTime:PEe,refetchInterval:DEe,refetchOnWindowFocus:"always"})}function qEe({hostId:e}){return i.jsx("span",{className:ce("shrink-0 border px-1 font-mono text-[9px] uppercase tracking-wide",e==="local"?"border-outline-variant text-on-surface-variant":"border-on-surface text-on-surface"),children:e})}function FEe(){var a;const{data:e,isError:t}=Pr(),n=(((a=e==null?void 0:e.hosts)==null?void 0:a.length)??0)>0,{data:s}=ZW({enabled:n||t});if(!s||s.hosts.length<=1&&!s.registryError)return null;const r=s.needsYou.items.find(o=>o.source==="derived")??s.needsYou.items[0];return i.jsxs("div",{"data-testid":"fleet-band",className:ce("flex flex-wrap items-center gap-2 px-2 py-1.5",fr),children:[i.jsx("span",{className:"font-mono text-[10px] uppercase tracking-wide text-on-surface",children:"FLEET"}),i.jsxs("span",{"data-testid":"fleet-band-rollup",className:"flex items-center gap-2 font-mono text-[10px]",children:[i.jsxs("span",{className:"text-emerald-700",children:["● ",s.rollup.needsYouCount]}),i.jsxs("span",{className:"text-amber-700",children:["▲ ",s.rollup.exceptionCount]}),i.jsxs("span",{className:"text-on-surface-variant",children:[s.rollup.hostCount," hosts",s.rollup.unreachableCount>0?` · ${s.rollup.unreachableCount} unreachable`:""]})]}),s.registryError?i.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-[10px] text-error",children:"host registry unreadable — local-only glance"}):r?i.jsxs("span",{"data-testid":"fleet-band-worst",className:"flex min-w-0 flex-1 items-center gap-1.5 truncate font-mono text-[10px] text-on-surface-variant",children:["worst: ",i.jsx(qEe,{hostId:r.hostId}),i.jsx("span",{className:"min-w-0 truncate",children:r.summary})]}):i.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-[10px] text-on-surface-variant",children:"quiet"}),i.jsx("a",{href:"/fleet","data-testid":"fleet-band-open",className:"font-mono text-[10px] uppercase text-on-surface hover:underline",children:"open fleet →"})]})}const zEe="human@host",HEe={root:null,relPath:null,slicePath:null};function U8(e){return typeof window>"u"?null:new URLSearchParams(window.location.search).get(e)}function UEe(e){const t=Math.max(0,Math.floor((Date.now()-Date.parse(e))/6e4));return t<60?`${t}m`:t<1440?`${Math.floor(t/60)}h`:`${Math.floor(t/1440)}d`}function VEe(){const{data:e,isLoading:t,error:n}=G2e(),s=U8("slice"),r=U8("group")==="slice"?"slice":"agent",[a,o]=C.useState(r),c=h=>{if(o(h),typeof window>"u")return;const m=new URL(window.location.href);m.searchParams.set("group",h),window.history.replaceState({},"",`${m.pathname}${m.search}${m.hash}`)},d=C.useMemo(()=>{if(!e)return null;if(!s)return e.agents;const h=e.agents.rows.filter(m=>m.slices.includes(s));return{...e.agents,rows:h,provenance:h.length===0?`no agents holding or recently holding work on ${s} — ${e.agents.provenance}`:`anchored to ${s} — ${e.agents.provenance}`}},[e,s]);return t?i.jsx("p",{className:"p-4 font-mono text-[11px] text-on-surface-variant",children:"composing the rig coordination story…"}):n||!e||!d?i.jsxs("p",{"data-testid":"rig-agents-error",className:"p-4 font-mono text-[11px] text-red-700",children:["rig agents panel unavailable: ",n instanceof Error?n.message:"composer unreachable"]}):i.jsxs("div",{"data-testid":"rig-agents-page",className:"mx-auto max-w-4xl space-y-5 p-4",children:[i.jsx(FEe,{}),i.jsxs("nav",{className:"flex items-center gap-2 font-mono text-[10px] uppercase text-on-surface-variant",children:[i.jsx(Ve,{to:"/project",className:"hover:underline",children:"project"}),i.jsx("span",{children:"/"}),i.jsx("span",{"data-testid":"rig-agents-crumb",children:"agents (rig)"}),s?i.jsxs(i.Fragment,{children:[i.jsx("span",{children:"·"}),i.jsxs("span",{"data-testid":"rig-agents-anchor",children:["anchored: ",s]}),i.jsx("a",{href:"/agents",className:"hover:underline","data-testid":"rig-agents-unanchor",children:"[full rig]"})]}):null]}),i.jsxs("header",{className:"flex flex-wrap items-center justify-between gap-2",children:[i.jsx("h2",{className:"text-[14px] font-semibold",children:"AGENTS — the coordination story"}),i.jsxs("div",{className:"flex items-center gap-1 font-mono text-[10px] uppercase",children:[i.jsx("span",{className:"text-on-surface-variant",children:"group by"}),["agent","slice"].map(h=>i.jsx("button",{type:"button","data-testid":`rig-agents-group-${h}`,onClick:()=>c(h),className:`border px-2 py-0.5 ${a===h?"border-outline bg-surface-variant":"border-outline-variant hover:bg-surface-variant/50"}`,children:h},h))]})]}),i.jsx(zW,{band:e.needsYou,slice:"rig",missionId:null,actorSession:zEe,ctx:HEe,showApprove:!1}),i.jsx(WT,{band:d,itemRef:"rig",grouping:a}),i.jsxs("section",{"data-testid":"settled-band",className:"space-y-1",children:[i.jsx("h3",{className:"font-mono text-[10px] uppercase tracking-wide text-on-surface-variant",children:"SETTLED"}),e.settled.length===0?i.jsx("p",{"data-testid":"settled-empty",className:"font-mono text-[11px] text-on-surface-variant",children:e.settledProvenance}):i.jsxs(i.Fragment,{children:[i.jsx("ul",{className:"divide-y divide-outline-variant/50 border border-outline-variant",children:e.settled.map(h=>i.jsxs("li",{className:"flex items-center gap-2 px-2 py-1.5",children:[i.jsx("span",{className:"font-mono text-[10px] text-on-surface-variant",children:bf(h.fromSession)}),i.jsx("span",{className:"text-on-surface-variant",children:"→"}),i.jsx("span",{className:"font-mono text-[10px] text-on-surface-variant",children:bf(h.toSession)}),i.jsx("span",{className:"min-w-0 flex-1 truncate text-[11px]","data-testid":`settled-summary-${h.qitemId}`,children:h.summary??h.qitemId}),i.jsx("span",{className:"font-mono text-[10px] text-on-surface-variant",children:UEe(h.closedAtIso)})]},`${h.qitemId}-${h.closedAtIso}`))}),i.jsx("p",{className:"font-mono text-[10px] text-on-surface-variant",children:e.settledProvenance})]})]}),i.jsxs("p",{className:"font-mono text-[10px] text-on-surface-variant",children:["composed ",e.composedAt]})]})}function WEe(e){return typeof window>"u"?null:new URLSearchParams(window.location.search).get(e)}function JW(e){if(!e)return"—";const t=Math.max(0,Math.floor((Date.now()-Date.parse(e))/6e4));return t<60?`${t}m`:t<1440?`${Math.floor(t/60)}h`:`${Math.floor(t/1440)}d`}function eG({hostId:e}){return i.jsx("span",{"data-testid":`fleet-item-host-${e}`,className:ce("shrink-0 border px-1 font-mono text-[9px] uppercase tracking-wide",e==="local"?"border-outline-variant text-on-surface-variant":"border-on-surface text-on-surface"),children:e})}function GEe(){const e=jv();return t=>{e.mutate({hostId:t},{onSuccess:()=>window.location.assign("/project?from=fleet")})}}function KEe(e){if(typeof window>"u")return;const t=new URL(window.location.href);e===null?t.searchParams.delete("open"):t.searchParams.set("open",e),window.history.replaceState({},"",`${t.pathname}${t.search}${t.hash}`)}function YEe({item:e,expanded:t,onToggle:n,onOpenHost:s}){return i.jsxs("li",{"data-testid":`fleet-needs-you-${e.fleetKey}`,"data-source":e.source,className:"px-2 py-1.5",children:[i.jsx("button",{type:"button",onClick:n,className:"block w-full text-left",children:i.jsxs("span",{className:"flex flex-wrap items-center gap-2",children:[i.jsx("span",{className:ce("font-mono text-[11px]",e.source==="derived"?"text-amber-700":"text-emerald-700"),title:e.source==="derived"?"machine-derived exception":"agent-initiated",children:e.source==="derived"?"▲":"●"}),i.jsx(eG,{hostId:e.hostId}),i.jsx("span",{className:"min-w-0 flex-1 truncate text-[12px] text-on-surface",children:e.summary}),e.derived?i.jsx("span",{className:"font-mono text-[9px] uppercase tracking-wide text-amber-700",children:e.derived.kind}):null,i.jsx("span",{className:"font-mono text-[10px] text-on-surface-variant",children:e.where}),i.jsx("span",{className:"font-mono text-[10px] text-on-surface-variant",children:JW(e.ageIso)})]})}),e.derived?i.jsxs("p",{className:"mt-0.5 pl-6 font-mono text-[10px] text-on-surface-variant",children:["▲ ",e.derived.evidence," · threshold: ",e.derived.threshold]}):null,i.jsxs("p",{className:"mt-0.5 pl-6 font-mono text-[9px] text-on-surface-variant/80",children:["counted once · seen from ",e.seenFrom.join(" · ")," on ",e.hostId]}),t?i.jsxs("div",{"data-testid":`fleet-item-expanded-${e.fleetKey}`,className:"mt-1.5 ml-6 border border-outline-variant bg-surface-low/50 px-2 py-1.5",children:[i.jsxs("p",{className:"font-mono text-[10px] text-on-surface",children:["identity: ",i.jsx("span",{className:"text-on-surface-variant",children:e.fleetKey})]}),e.derived?i.jsxs("p",{className:"mt-0.5 font-mono text-[10px] text-on-surface",children:["evidence: ",i.jsx("span",{className:"text-on-surface-variant",children:e.derived.evidence})]}):null,i.jsxs("p",{className:"mt-1 font-mono text-[9px] uppercase tracking-wide text-on-surface-variant",children:["read-only here — acting on a remote host's item rides cross-host routing (MH-3/MH-4) ·"," ",i.jsxs("button",{type:"button",onClick:()=>s(e.hostId),className:"underline",children:["open ",e.hostId," →"]})]})]}):null]})}function QEe(e){return e.status.status==="ok"?{char:"●",cls:"text-emerald-700"}:{char:"✕",cls:"text-error"}}function XEe(){const{data:e,isLoading:t,error:n,refetch:s}=ZW(),r=GEe(),a=WEe("open");if(t)return i.jsx("p",{className:"p-4 font-mono text-[11px] text-on-surface-variant",children:"composing the fleet glance…"});if(n||!e)return i.jsxs("p",{"data-testid":"fleet-error",className:"p-4 font-mono text-[11px] text-error",children:["fleet glance unavailable: ",n instanceof Error?n.message:"composer unreachable"]});const o=e.hosts.filter(c=>c.status.status==="ok").length;return i.jsxs("div",{"data-testid":"fleet-page",className:"mx-auto max-w-4xl space-y-5 p-4",children:[i.jsxs("nav",{className:"flex items-center gap-2 font-mono text-[10px] uppercase text-on-surface-variant",children:[i.jsx("span",{"data-testid":"fleet-crumb",className:"text-on-surface",children:"fleet"}),i.jsx("span",{children:"·"}),i.jsx("span",{children:"every factory, one glance"})]}),i.jsxs("header",{className:"flex flex-wrap items-baseline justify-between gap-2",children:[i.jsx("h2",{className:"text-[14px] font-semibold uppercase",children:"Fleet — needs me / stuck / failing"}),i.jsxs("div",{"data-testid":"fleet-rollup",className:"flex items-center gap-2 font-mono text-[10px] uppercase",children:[i.jsxs("span",{className:"text-emerald-700",children:["● ",e.rollup.needsYouCount," need you"]}),i.jsxs("span",{className:"text-amber-700",children:["▲ ",e.rollup.exceptionCount," exceptions",e.rollup.exceptionsByKind.length>0?` (${e.rollup.exceptionsByKind.map(c=>`${c.count} ${c.kind}`).join(" · ")})`:""]}),i.jsxs("span",{className:"text-on-surface-variant",children:[e.rollup.hostCount," hosts"]}),e.rollup.unreachableCount>0?i.jsxs("span",{className:"text-error",children:[e.rollup.unreachableCount," unreachable"]}):null]})]}),e.registryError?i.jsxs("p",{"data-testid":"fleet-registry-error",className:"font-mono text-[10px] text-error",children:["host registry unreadable — this glance is LOCAL-ONLY, not the fleet: ",e.registryError]}):null,i.jsxs("section",{"data-testid":"fleet-needs-you",className:ce("space-y-1 p-2",fr),children:[i.jsx("h3",{className:"font-mono text-[10px] uppercase tracking-wide text-on-surface-variant",children:"NEEDS YOU"}),e.needsYou.items.length>0?i.jsx("ul",{className:"divide-y divide-outline-variant/50",children:e.needsYou.items.map(c=>i.jsx(YEe,{item:c,expanded:a===c.fleetKey,onToggle:()=>KEe(a===c.fleetKey?null:c.fleetKey),onOpenHost:r},c.fleetKey))}):null,i.jsx("p",{className:"font-mono text-[9px] text-on-surface-variant",children:e.needsYou.provenance})]}),i.jsxs("section",{"data-testid":"fleet-hosts",className:ce("space-y-1 p-2",fr),children:[i.jsx("h3",{className:"font-mono text-[10px] uppercase tracking-wide text-on-surface-variant",children:"HOSTS"}),i.jsx("ul",{className:"divide-y divide-outline-variant/50",children:e.hosts.map(c=>{const d=QEe(c),h=c.status.status==="ok";return i.jsxs("li",{"data-testid":`fleet-host-${c.hostId}`,className:"flex flex-wrap items-center gap-2 px-2 py-1.5",children:[i.jsx("span",{className:ce("font-mono text-[11px]",d.cls),children:d.char}),i.jsx(SE,{className:"h-3 w-3 text-on-surface-variant"}),i.jsx("span",{className:"font-mono text-[11px] uppercase text-on-surface",children:c.hostId}),c.kind==="local"?i.jsx("span",{className:"font-mono text-[8px] uppercase text-on-surface-variant",children:"local"}):null,h?i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-[10px] text-on-surface-variant",children:c.topLine}),(c.needsYouCount??0)>0?i.jsxs("span",{className:"font-mono text-[10px] text-emerald-700",children:["● ",c.needsYouCount]}):null,(c.exceptionsByKind??[]).map(m=>i.jsxs("span",{className:"font-mono text-[10px] text-amber-700",children:["▲ ",m.count," ",m.kind]},m.kind)),i.jsxs("span",{className:"font-mono text-[9px] text-on-surface-variant",children:[c.rigCount," rigs · ",c.seatCount," seats"]}),i.jsx("button",{type:"button","data-testid":`fleet-host-${c.hostId}-open`,onClick:()=>r(c.hostId),className:"font-mono text-[10px] uppercase text-on-surface hover:underline",children:"open →"})]}):i.jsxs(i.Fragment,{children:[i.jsxs("span",{className:"min-w-0 flex-1 truncate font-mono text-[10px] text-error",children:[c.status.status,c.status.error?` — ${c.status.error}`:""," · items absent from this glance, not zero"]}),i.jsx("button",{type:"button","data-testid":`fleet-host-${c.hostId}-retry`,onClick:()=>void s(),className:"border border-error px-1.5 py-0.5 font-mono text-[9px] uppercase text-error hover:bg-surface-low",children:"retry"})]})]},c.hostId)})})]}),i.jsxs("section",{"data-testid":"fleet-settled",className:"space-y-1",children:[i.jsx("h3",{className:"font-mono text-[10px] uppercase tracking-wide text-on-surface-variant",children:"SETTLED"}),e.settled.length>0?i.jsx("ul",{className:"divide-y divide-outline-variant/50 border border-outline-variant",children:e.settled.map(c=>i.jsxs("li",{className:"flex items-center gap-2 px-2 py-1.5",children:[i.jsx(eG,{hostId:c.hostId}),i.jsx("span",{className:"font-mono text-[10px] text-on-surface-variant",children:c.fromSession.split("@")[0]}),i.jsx("span",{className:"text-on-surface-variant",children:"→"}),i.jsx("span",{className:"font-mono text-[10px] text-on-surface-variant",children:c.toSession.split("@")[0]}),i.jsx("span",{className:"min-w-0 flex-1 truncate text-[11px]",children:c.summary??c.qitemId}),i.jsx("span",{className:"font-mono text-[10px] text-on-surface-variant",children:JW(c.closedAtIso)})]},`${c.hostId}|${c.qitemId}`))}):null,i.jsx("p",{className:"font-mono text-[9px] text-on-surface-variant",children:e.settledProvenance})]}),i.jsxs("p",{"data-testid":"fleet-fanout-footer",className:"font-mono text-[10px] text-on-surface-variant",children:["composed ",e.composedAt," · fleet fan-out ",o,"/",e.hosts.length," hosts ok ·"," ",i.jsx(Ve,{to:"/agents",className:"hover:underline",children:"this host's agents →"})]})]})}function ZEe(e){const t=new Map;for(const s of e){const r=`${s.workflowName}:${s.workflowVersion}`;t.has(r)||t.set(r,[]),t.get(r).push(s)}const n=[...t.entries()].map(([s,r])=>({key:s,name:r[0].workflowName,version:r[0].workflowVersion,rows:r.sort((a,o)=>Zi(a)-Zi(o))}));return n.sort((s,r)=>Zi(s.rows[0])-Zi(r.rows[0])),n}function JEe(){const e=Pt(),{data:t,isLoading:n}=zV(),{data:s}=Fwe(),r=t??[],a=ZEe(r),o=r.filter(f=>Zi(f)<=1).length,c=r.filter(f=>f.status==="active"||f.status==="waiting").length,d=r.filter(f=>f.status==="completed").length,h=new Set(r.map(f=>`${f.workflowName}:${f.workflowVersion}`)),m=((s==null?void 0:s.specs)??[]).filter(f=>!h.has(`${f.name}:${f.version}`));return i.jsx(ot,{children:i.jsxs("div",{"data-testid":"workflows-page",className:"space-y-6",children:[i.jsx(wn,{eyebrow:"Workflows",title:"Deterministic Runs",description:n?"Loading instances…":`${r.length} instance${r.length===1?"":"s"} · ${o} need attention · ${c} live · ${d} completed — computed from /api/workflow/list`,actions:i.jsx(Se,{variant:"outline",size:"sm",onClick:()=>e({to:"/specs"}),children:"Workflow Library"})}),r.length===0&&!n?i.jsx("p",{"data-testid":"workflows-empty",className:"font-mono text-[11px] text-on-surface-variant",children:"0 instances — instantiate one from a library spec (rig workflow instantiate) and it appears here with its live position."}):null,a.map(f=>{const g=f.rows.filter(y=>Zi(y)<=1).length,x=f.rows.filter(y=>y.status==="active"||y.status==="waiting").length;return i.jsxs("section",{"data-testid":`workflows-group-${f.name}`,className:"space-y-2",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs("button",{type:"button","data-testid":`workflows-group-spec-${f.name}`,onClick:()=>e({to:"/specs/library/$entryId",params:{entryId:`workflow:${f.name}:${f.version}`}}),className:"font-mono text-[11px] font-bold text-on-surface underline-offset-2 hover:underline",children:[f.name," v",f.version]}),i.jsxs("span",{className:"font-mono text-[10px] text-on-surface-variant",children:[f.rows.length," instance",f.rows.length===1?"":"s"," · ",x," live",g>0?` · ▲ ${g}`:""]})]}),i.jsx("ul",{className:"divide-y divide-outline-variant/50 border border-outline-variant",children:f.rows.map(y=>i.jsx(HV,{instance:y},y.instanceId))})]},f.key)}),m.length>0?i.jsxs("section",{"data-testid":"workflows-idle-specs",className:"space-y-2",children:[i.jsx("div",{className:"font-mono text-[8px] uppercase tracking-[0.16em] text-on-surface-variant",children:"Cached Specs — No Instances"}),i.jsx("ul",{className:"divide-y divide-outline-variant/50 border border-outline-variant",children:m.map(f=>i.jsx("li",{children:i.jsxs("button",{type:"button","data-testid":`workflows-idle-spec-${f.name}`,onClick:()=>e({to:"/specs/library/$entryId",params:{entryId:`workflow:${f.name}:${f.version}`}}),className:"flex w-full items-center gap-2 px-2 py-1.5 text-left hover:bg-surface-variant/50",children:[i.jsx("span",{className:"font-mono text-[11px] text-on-surface-variant","aria-hidden":!0,children:"◌"}),i.jsxs("span",{className:"font-mono text-[11px] text-on-surface",children:[f.name," v",f.version]}),i.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-[10px] text-on-surface-variant",children:f.purpose??""}),i.jsxs("span",{className:"font-mono text-[10px] text-on-surface-variant",children:[f.isBuiltIn?"built-in":"user file"," · 0 instances"]})]})},`${f.name}:${f.version}`))})]}):null]})})}const eRe={handoff:{glyph:"→",cls:"text-emerald-800"},waiting:{glyph:"◐",cls:"text-on-surface-variant"},done:{glyph:"○",cls:"text-on-surface-variant"},failed:{glyph:"▲",cls:"text-red-700"}};function tRe(e){return e.replace("T"," ").replace(/\.\d+Z$/,"Z")}function nRe({entry:e,index:t,expanded:n,onToggle:s}){const r=eRe[e.closureReason]??{glyph:"?",cls:"text-on-surface-variant"},a=e.closureEvidence&&typeof e.closureEvidence.resultNote=="string"?e.closureEvidence.resultNote:null;return i.jsxs("li",{id:`step-${e.stepId}`,children:[i.jsxs("button",{type:"button","data-testid":`workflow-trail-row-${e.trailId}`,onClick:s,className:"flex w-full items-center gap-2 px-2 py-1.5 text-left hover:bg-surface-variant/50",children:[i.jsxs("span",{className:"font-mono text-[10px] text-on-surface-variant w-6 shrink-0",children:[t+1,"."]}),i.jsx("span",{className:"font-mono text-[11px] font-bold text-on-surface w-28 shrink-0",children:e.stepId}),i.jsx("span",{className:"font-mono text-[10px] text-on-surface-variant w-20 shrink-0",children:e.stepRole}),i.jsxs("span",{className:ce("font-mono text-[11px] w-20 shrink-0",r.cls),children:[r.glyph," ",e.closureReason]}),i.jsx("span",{className:"min-w-0 flex-1 truncate text-[11px] text-on-surface-variant",children:a??"—"}),i.jsx("span",{className:"hidden font-mono text-[10px] text-on-surface-variant lg:inline",children:e.actorSession}),i.jsx("span",{className:"font-mono text-[10px] text-on-surface-variant",children:tRe(e.closedAt)})]}),n?i.jsxs("div",{"data-testid":`workflow-trail-expanded-${e.trailId}`,className:"space-y-1 border-t border-outline-variant/50 bg-surface-lowest/10 px-8 py-2 font-mono text-[10px]",children:[i.jsxs("p",{children:[i.jsx("span",{className:"uppercase text-on-surface-variant",children:"actor: "}),e.actorSession]}),i.jsxs("p",{children:[i.jsx("span",{className:"uppercase text-on-surface-variant",children:"closed packet: "}),e.priorQitemId]}),i.jsxs("p",{children:[i.jsx("span",{className:"uppercase text-on-surface-variant",children:"routed next: "}),e.nextQitemId??"(terminal — no next packet)"]}),e.closureEvidence?i.jsx("pre",{className:"overflow-x-auto border border-outline-variant/40 bg-surface-lowest/20 p-2 text-[9px] leading-snug",children:JSON.stringify(e.closureEvidence,null,2)}):i.jsx("p",{className:"text-on-surface-variant",children:"(no closure evidence recorded)"})]}):null]})}function sRe({trail:e,instance:t,anchorStepId:n}){const[s,r]=C.useState(()=>{if(!n)return null;const o=e.find(c=>c.stepId===n);return o?o.trailId:null}),a=n!=null&&n===t.currentStepId;return i.jsxs("div",{className:"space-y-2",children:[i.jsxs("div",{className:"font-mono text-[8px] uppercase tracking-[0.16em] text-on-surface-variant",children:["Routing History",i.jsxs("span",{className:"ml-2 normal-case tracking-normal",children:[e.length," closed step",e.length===1?"":"s"," · append-only trail · deterministic path",t.currentStepId?` → now at ${t.currentStepId}`:""]})]}),e.length===0?i.jsx("p",{className:"font-mono text-[11px] text-on-surface-variant",children:"No steps closed yet — the entry packet is on the frontier."}):i.jsx("ul",{className:"divide-y divide-outline-variant/50 border border-outline-variant",children:e.map((o,c)=>i.jsx(nRe,{entry:o,index:c,expanded:s===o.trailId,onToggle:()=>r(d=>d===o.trailId?null:o.trailId)},o.trailId))}),t.currentStepId?i.jsxs("div",{id:`step-${t.currentStepId}`,"data-testid":"workflow-frontier-row",className:ce("flex items-center gap-2 border border-dashed px-2 py-1.5",a?"border-amber-700 bg-amber-700/5":"border-outline-variant"),children:[i.jsxs("span",{className:"font-mono text-[10px] text-on-surface-variant w-6 shrink-0",children:[e.length+1,"."]}),i.jsx("span",{className:"font-mono text-[11px] font-bold text-on-surface w-28 shrink-0",children:t.currentStepId}),i.jsx("span",{className:"font-mono text-[11px] text-emerald-800 w-20 shrink-0",children:"● open"}),i.jsxs("span",{className:"min-w-0 flex-1 truncate font-mono text-[10px] text-on-surface-variant",children:["frontier packet ",t.currentFrontier[0]??"(none)",t.deadline.evidence?` · held by ${t.deadline.evidence.ownerSession}`:""]})]}):null]})}function V8(e){return e.replace("T"," ").replace(/\.\d+Z$/,"Z")}const rRe="human@host";async function iRe(e){const t=await fetch(`/api/workflow/${encodeURIComponent(e)}/resume`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({actorSession:rRe})});if(!t.ok)throw new Error(`resume failed — HTTP ${t.status}`)}function aRe(e,t){const n=e.map(r=>r.stepId);t&&n.push(t);const s=[];for(let r=0;r+1<n.length;r++)n[r]!==n[r+1]&&s.push(`${n[r]}→${n[r+1]}`);return{visited:e.map(r=>r.stepId),edgeKeys:s}}function oRe({instance:e,onResume:t,resuming:n,resumeError:s}){const r=e.status==="waiting"&&e.currentStepId!=null,a=e.deadline.state!=="healthy"&&e.deadline.evidence,o=e.status==="failed";if(!r&&!a&&!o)return null;const c=o||a?"border-red-700/60 bg-red-700/5":"border-amber-700/60 bg-amber-700/5";return i.jsxs("div",{"data-testid":"workflow-exception-banner",className:ce("space-y-2 border px-3 py-2",c),children:[o?i.jsxs("p",{className:"font-mono text-[11px] text-red-700",children:["▲ FAILED — no remediation branch mapped for the failing exit",e.resumeCount>0?` · resumed ${e.resumeCount}× already`:""]}):null,a?i.jsxs("p",{className:"font-mono text-[11px] text-red-700",children:["▲ ",e.deadline.state.toUpperCase()," — step ",e.deadline.evidence.stepId??"(unbound)"," packet"," ",e.deadline.evidence.packetId," held by ",e.deadline.evidence.ownerSession,","," ",Math.floor(e.deadline.evidence.overdueBySeconds/60),"m past its"," ",e.deadline.evidence.anchor," anchor"]}):null,r&&!a&&!o?i.jsxs("p",{className:"font-mono text-[11px] text-amber-800",children:["◐ WAITING at ",e.currentStepId," — the gate packet is parked pending sign-off; resolving the NEEDS-YOU item resumes the deterministic flow"]}):null,i.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[o?i.jsx("button",{type:"button","data-testid":"workflow-resume",disabled:n,onClick:t,className:"border border-outline px-3 py-1 font-mono text-[11px] uppercase hover:bg-surface-variant disabled:cursor-not-allowed disabled:opacity-50",title:`POST /api/workflow/${e.instanceId}/resume — redrive from the failed step (WF-5 FR-4)`,children:n?"Resuming…":"Resume"}):null,s?i.jsx("span",{"data-testid":"workflow-resume-error",className:"font-mono text-[10px] text-red-700",children:s}):null,i.jsxs("span",{className:"font-mono text-[10px] text-on-surface-variant",children:["CLI: rig workflow trace ",e.instanceId]})]})]})}function lRe({instanceId:e,anchorStepId:t}){const n=Pt(),s=mt(),{data:r,isLoading:a,error:o}=zwe(e),c=r?`workflow:${r.instance.workflowName}:${r.instance.workflowVersion}`:null,{data:d}=Rv(c),[h,m]=C.useState(!1),[f,g]=C.useState(null),x=()=>{m(!0),g(null),iRe(e).then(()=>s.invalidateQueries({queryKey:["workflow"]})).catch(k=>g(k.message)).finally(()=>m(!1))};if(a)return i.jsx(ot,{children:i.jsx("div",{className:"font-mono text-[10px] text-on-surface-variant",children:"Loading workflow instance…"})});if(o||!r)return i.jsx(ot,{children:i.jsxs("div",{"data-testid":"workflow-instance-error",className:"space-y-4",children:[i.jsx(wn,{eyebrow:"Workflow — Instance",title:"Instance Not Found",description:(o==null?void 0:o.message)??`No workflow instance ${e}.`}),i.jsx(Se,{variant:"outline",size:"sm",onClick:()=>n({to:"/workflows"}),children:"Back to Workflows"})]})});const{instance:y,trail:b}=r,{visited:_,edgeKeys:w}=aRe(b,y.currentStepId),E=d&&d.kind==="workflow"?d:null,N=y.deadline.state!=="healthy"?y.deadline.state:y.status;return i.jsx(ot,{children:i.jsxs("div",{"data-testid":"workflow-instance-page",className:"space-y-6",children:[i.jsx(wn,{eyebrow:`Workflow — Instance · ${y.workflowName} v${y.workflowVersion}`,title:y.instanceId,description:y.currentStepId?`${y.status} at ${y.currentStepId} · hop ${y.hopCount}`:`${y.status} · hop ${y.hopCount}`,actions:i.jsxs("div",{className:"flex gap-2 items-center",children:[i.jsx(Se,{variant:"outline",size:"sm","data-testid":"workflow-view-spec",onClick:()=>c&&n({to:"/specs/library/$entryId",params:{entryId:c}}),children:"View Spec"}),i.jsx(Se,{variant:"outline",size:"sm",onClick:()=>n({to:"/workflows"}),children:"Back"})]})}),i.jsxs(Do,{children:[i.jsx(st,{label:"Status",value:N,testId:"wf-inst-status"}),i.jsx(st,{label:"Position",value:y.currentStepId??(y.status==="completed"?"closed":"felled"),testId:"wf-inst-position"}),i.jsx(st,{label:"Hops",value:y.hopCount,testId:"wf-inst-hops"}),i.jsx(st,{label:"Resumes",value:y.resumeCount,testId:"wf-inst-resumes"})]}),i.jsxs("p",{"data-testid":"wf-inst-provenance",className:"font-mono text-[10px] text-on-surface-variant",children:["created by ",y.createdBySession," · ",V8(y.createdAt),y.completedAt?` · completed ${V8(y.completedAt)}`:""]}),i.jsx(oRe,{instance:y,onResume:x,resuming:h,resumeError:f}),E?i.jsx(FV,{topology:E.topology,testId:"workflow-instance-graph",currentStepId:y.currentStepId,visitedStepIds:_,takenEdgeKeys:w}):i.jsx("p",{className:"font-mono text-[10px] text-on-surface-variant",children:"(workflow shape unavailable — the spec is not in the library cache)"}),i.jsx(sRe,{trail:b,instance:y,anchorStepId:t})]})})}const cRe={neutral:"border-outline-variant bg-surface-lowest/65 text-on-surface",info:"border-sky-300 bg-sky-50/70 text-sky-800",success:"border-emerald-300 bg-emerald-50/70 text-emerald-800",warning:"border-amber-300 bg-amber-50/80 text-amber-800",danger:"border-rose-300 bg-rose-50/75 text-rose-800"},ko=[{label:"Queue created",tone:"info",icon:Jq},{label:"Handoff",tone:"neutral",icon:wv},{label:"Claimed",tone:"warning",icon:yf},{label:"Completed",tone:"success",icon:vf},{label:"Human action",tone:"danger",icon:Co},{label:"Shipped",tone:"success",icon:NE}],tG=[{label:"idea-ledger",tone:"neutral"},{label:"cycle-4",tone:"info"},{label:"proof",tone:"success"},{label:"urgent",tone:"danger"},{label:"human-review",tone:"warning"}];function si({token:e,compact:t=!1}){const n=e.icon;return i.jsxs("span",{className:ce("inline-flex items-center gap-1 border font-mono uppercase tracking-[0.10em]",t?"px-1.5 py-0.5 text-[8px]":"px-2 py-1 text-[9px]",cRe[e.tone]),children:[n?i.jsx(n,{className:t?"h-2.5 w-2.5":"h-3 w-3",strokeWidth:1.6}):null,e.label]})}function Dl({kind:e,label:t,muted:n}){const s=e==="human"?MJ:wZ;return i.jsxs("span",{className:ce("inline-flex min-w-0 items-center gap-1 border px-1.5 py-0.5 font-mono text-[9px]",n?"border-outline-variant bg-surface-lowest/45 text-on-surface-variant":"border-outline-variant bg-surface-lowest/45 text-on-surface"),children:[i.jsx(s,{className:"h-3 w-3 shrink-0",strokeWidth:1.5}),i.jsx("span",{className:"truncate",children:t})]})}function nG({label:e}){return i.jsxs("span",{className:"inline-flex items-center gap-1 border border-outline-variant bg-surface-lowest/55 px-1.5 py-0.5 font-mono text-[9px] text-on-surface-variant",children:[i.jsx(_E,{className:"h-3 w-3",strokeWidth:1.5}),e]})}function uRe(){return i.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-1.5",children:[i.jsx(Dl,{kind:"agent",label:"orch-lead@my-rig"}),i.jsx(Dx,{className:"h-3.5 w-3.5 text-on-surface-variant",strokeWidth:1.4}),i.jsx(Dl,{kind:"agent",label:"driver@my-rig"}),i.jsx(Dx,{className:"h-3.5 w-3.5 text-on-surface-variant",strokeWidth:1.4}),i.jsx(Dl,{kind:"human",label:"human@host"})]})}function dRe(){return i.jsx("div",{className:"grid grid-cols-3 gap-2",children:["for-you-human-and-shipped.png","project-overview-missions.png","project-triage-slice.png"].map(e=>i.jsxs("div",{className:"border border-outline-variant bg-surface-low/80",children:[i.jsx("div",{className:"flex aspect-[4/3] items-center justify-center bg-surface-lowest/65 text-on-surface-variant",children:i.jsx(HZ,{className:"h-7 w-7",strokeWidth:1.2})}),i.jsx("div",{className:"truncate border-t border-outline-variant px-1 py-0.5 font-mono text-[8px] text-on-surface-variant",children:e})]},e))})}function rC({label:e,description:t,children:n}){return i.jsx(zx,{as:"section",className:"bg-surface-lowest/65 backdrop-blur-sm",header:i.jsx("span",{className:"uppercase tracking-[0.16em]",children:e}),children:i.jsxs("div",{className:"space-y-4 p-4",children:[i.jsx("p",{className:"font-mono text-[10px] leading-relaxed text-on-surface",children:t}),n]})})}function W8({dense:e=!1}){return i.jsxs("article",{className:ce("border border-outline-variant bg-surface-lowest/60 backdrop-blur-sm hard-shadow",e?"p-3":"p-4"),children:[i.jsxs("div",{className:"flex items-start justify-between gap-3",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(si,{token:{label:"Action required",tone:"danger",icon:Co},compact:e}),i.jsx("h3",{className:"font-mono text-sm text-on-surface",children:"Review demo-seed triage proof packet"})]}),i.jsx(nG,{label:"Today 4:18 PM"})]}),i.jsx("p",{className:"mt-3 whitespace-pre-line font-mono text-[11px] leading-relaxed text-on-surface",children:"Review the proof packet screenshots, confirm the shipped slice is ready, then approve or route back with notes."}),i.jsx("div",{className:"mt-3",children:i.jsx(uRe,{})}),i.jsx("div",{className:"mt-3 flex flex-wrap gap-1.5",children:tG.slice(0,4).map(t=>i.jsx(si,{token:t,compact:!0},t.label))})]})}function hRe(){return i.jsxs("article",{className:"relative border border-outline-variant bg-surface-lowest/60 p-4 hard-shadow backdrop-blur-sm",children:[i.jsx("div",{className:"absolute left-5 top-12 bottom-5 w-px bg-surface-highest"}),i.jsx("div",{className:"relative space-y-5 pl-8",children:[{token:ko[5],title:"Slice shipped with proof packet",body:"The triage slice closed with screenshots, queue context, and verification notes attached."},{token:ko[3],title:"Implementation completed",body:"Driver finished the UI pass and handed verification to guard and QA."},{token:ko[1],title:"Work routed for review",body:"The queue item moved from driver to guard with targeted checks."}].map(e=>{const t=e.token.icon??bu;return i.jsxs("div",{className:"relative",children:[i.jsx("span",{className:"absolute -left-[38px] top-0 flex h-5 w-5 items-center justify-center border border-outline-variant bg-surface-lowest text-on-surface",children:i.jsx(t,{className:"h-3 w-3",strokeWidth:1.5})}),i.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[i.jsx(si,{token:e.token,compact:!0}),i.jsx(nG,{label:"12 min ago"})]}),i.jsx("h4",{className:"mt-2 font-mono text-[12px] text-on-surface",children:e.title}),i.jsx("p",{className:"mt-1 font-mono text-[10px] leading-relaxed text-on-surface",children:e.body})]},e.title)})})]})}function fRe(){return i.jsx("div",{className:"divide-y divide-outline-variant border border-outline-variant bg-surface-lowest/55 backdrop-blur-sm",children:[{token:ko[4],title:"Approval needed",body:"Review proof screenshots and approve release-readiness.",actor:"human@host"},{token:ko[2],title:"Claimed by QA",body:"VM verification is in progress with current worktree source.",actor:"qa@my-rig"},{token:ko[1],title:"Route to guard",body:"Run narrow advisory on UI-only diff and source scans.",actor:"guard@my-rig"}].map(e=>i.jsxs("div",{className:"grid gap-3 p-3 sm:grid-cols-[auto_1fr_auto]",children:[i.jsx(si,{token:e.token,compact:!0}),i.jsxs("div",{className:"min-w-0",children:[i.jsx("div",{className:"font-mono text-[12px] text-on-surface",children:e.title}),i.jsx("div",{className:"mt-1 font-mono text-[10px] leading-relaxed text-on-surface",children:e.body})]}),i.jsx(Dl,{kind:e.actor.includes("human")?"human":"agent",label:e.actor,muted:!0})]},e.title))})}function pRe(){return i.jsx("div",{className:"paper-grid min-h-full p-8",children:i.jsxs("div",{className:"mx-auto max-w-7xl space-y-8",children:[i.jsxs("header",{className:"border border-outline-variant bg-surface-lowest/60 p-4 font-mono backdrop-blur-sm hard-shadow",children:[i.jsx("div",{className:"text-[10px] uppercase tracking-[0.18em] text-on-surface-variant",children:"Project graphics package preview"}),i.jsx("h1",{className:"mt-2 text-xl uppercase tracking-[0.14em] text-on-surface",children:"Queue, story, and proof card language"}),i.jsx("p",{className:"mt-2 max-w-3xl text-[11px] leading-relaxed text-on-surface",children:"Hidden preview route for choosing metadata badges, action chips, flow arrows, and proof-card density before applying the system to For You, Story, Queue, and scope rollups."})]}),i.jsxs("section",{className:"grid gap-4 lg:grid-cols-3",children:[i.jsxs(rC,{label:"A / Compact Ledger",description:"Small pills and restrained icons. Best when density matters and queue cards need to scan like a work ledger.",children:[i.jsx(W8,{dense:!0}),i.jsx(fRe,{})]}),i.jsxs(rC,{label:"B / Narrative Rail",description:"Story-first layout with event icons on a vertical rail. Best for showing how work moved from idea to proof.",children:[i.jsx(hRe,{}),i.jsx(dRe,{})]}),i.jsxs(rC,{label:"C / Action Board",description:"Bolder cards with explicit status, actors, and proof thumbnails. Best for For You and approval surfaces.",children:[i.jsx(W8,{}),i.jsx("div",{className:"flex flex-wrap gap-1.5",children:ko.map(e=>i.jsx(si,{token:e},e.label))})]})]}),i.jsxs("section",{className:"grid gap-4 lg:grid-cols-[1.2fr_0.8fr]",children:[i.jsx(zx,{as:"section",className:"bg-surface-lowest/65 backdrop-blur-sm",header:"EVENT BADGE VOCABULARY",children:i.jsx("div",{className:"grid gap-3 p-4 sm:grid-cols-2 lg:grid-cols-3",children:ko.map(e=>i.jsxs("div",{className:"border border-outline-variant bg-surface-lowest/55 p-3",children:[i.jsx(si,{token:e}),i.jsxs("div",{className:"mt-2 font-mono text-[10px] leading-relaxed text-on-surface",children:[e.label==="Queue created"?"A work item entered the system.":null,e.label==="Handoff"?"Ownership moved from one actor to another.":null,e.label==="Claimed"?"An actor is actively working the item.":null,e.label==="Completed"?"The assigned work item closed.":null,e.label==="Human action"?"A person needs to approve, deny, or route.":null,e.label==="Shipped"?"The slice closed with evidence attached.":null]})]},e.label))})}),i.jsx(zx,{as:"section",className:"bg-surface-lowest/65 backdrop-blur-sm",header:"SUPPORTING CHIPS",children:i.jsxs("div",{className:"space-y-4 p-4",children:[i.jsxs("div",{children:[i.jsx("div",{className:"mb-2 font-mono text-[9px] uppercase tracking-[0.14em] text-on-surface-variant",children:"Tags"}),i.jsx("div",{className:"flex flex-wrap gap-1.5",children:tG.map(e=>i.jsx(si,{token:e},e.label))})]}),i.jsxs("div",{children:[i.jsx("div",{className:"mb-2 font-mono text-[9px] uppercase tracking-[0.14em] text-on-surface-variant",children:"Actors"}),i.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[i.jsx(Dl,{kind:"human",label:"human@host"}),i.jsx(Dl,{kind:"agent",label:"driver@my-rig"}),i.jsx(Dl,{kind:"agent",label:"guard@my-rig",muted:!0})]})]}),i.jsxs("div",{children:[i.jsx("div",{className:"mb-2 font-mono text-[9px] uppercase tracking-[0.14em] text-on-surface-variant",children:"Scope"}),i.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[i.jsx(si,{token:{label:"Workspace",tone:"neutral",icon:rF}}),i.jsx(si,{token:{label:"Mission",tone:"info",icon:IC}}),i.jsx(si,{token:{label:"Slice",tone:"success",icon:_v}})]})]})]})})]})]})})}const Ip={shipped:{stripe:"border-l-emerald-600",pill:"bg-emerald-50 border-emerald-300",ink:"text-emerald-800",label:"SHIPPED"},incident:{stripe:"border-l-red-600",pill:"bg-red-50 border-red-300",ink:"text-red-800",label:"INCIDENT"},progress:{stripe:"border-l-sky-600",pill:"bg-sky-50 border-sky-300",ink:"text-sky-800",label:"PROGRESS"},approval:{stripe:"border-l-amber-600",pill:"bg-amber-50 border-amber-300",ink:"text-amber-800",label:"APPROVAL NEEDED"},concept:{stripe:"border-l-violet-600",pill:"bg-violet-50 border-violet-300",ink:"text-violet-800",label:"CONCEPT"}},mRe={shipped:"bg-success",incident:"bg-tertiary",progress:"bg-secondary",approval:"bg-warning",concept:"bg-outline"},gRe={shipped:"Shipped",incident:"Incident",progress:"Progress",approval:"Approval",concept:"Concept"},xRe={boxShadow:["0 2px 4px rgba(0, 0, 0, 0.14)","0 8px 20px rgba(0, 0, 0, 0.16)","0 0 40px rgba(0, 0, 0, 0.12)"].join(", ")};function Mp({testId:e,kind:t,title:n,oneLiner:s,expanded:r,drillInHref:a,drillInLabel:o,inlineActions:c,leadingAccessory:d}){const[h,m]=C.useState(!1);return i.jsxs("article",{"data-testid":e,"data-card-kind":t,"data-expanded":h,style:xRe,className:"relative bg-surface-low/45 backdrop-blur-[10px] overflow-hidden",children:[i.jsx(lr,{position:"tl"}),i.jsx(lr,{position:"tr"}),i.jsx(lr,{position:"bl"}),i.jsx(lr,{position:"br"}),i.jsxs("div",{role:"button",tabIndex:0,"data-testid":`${e}-toggle`,onClick:()=>m(f=>!f),onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),m(g=>!g))},className:"flex w-full min-h-[80px] cursor-pointer items-start gap-4 px-5 py-4 text-left","aria-expanded":h,children:[i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsxs("div",{"data-testid":`${e}-pill`,className:"flex items-center gap-2 font-mono text-[10px] uppercase tracking-[0.18em] text-on-surface",children:[i.jsx("span",{"aria-hidden":"true",className:`inline-block w-1.5 h-1.5 rounded-full ${mRe[t]}`}),i.jsx("span",{children:gRe[t]})]}),i.jsxs("h3",{"data-testid":`${e}-title`,className:"mt-2 flex items-center gap-2 font-headline text-[16px] font-bold leading-tight text-on-surface",children:[d,i.jsx("span",{className:"truncate",children:n})]}),i.jsx("p",{"data-testid":`${e}-one-liner`,className:"mt-1.5 font-body text-[12px] leading-relaxed text-on-surface line-clamp-2",children:s})]}),c&&i.jsx("div",{"data-testid":`${e}-inline-actions`,className:"flex shrink-0 items-center gap-2",onClick:f=>f.stopPropagation(),children:c})]}),h&&i.jsxs("div",{"data-testid":`${e}-expanded`,className:"border-t border-outline-variant/40 px-5 py-4",children:[r,a&&i.jsx("div",{className:"mt-3 flex justify-end",children:i.jsxs("a",{"data-testid":`${e}-drill-in`,href:a,className:"inline-flex items-center gap-1 min-h-[44px] border border-on-surface px-3 py-2 font-mono text-[10px] uppercase tracking-[0.12em] text-on-surface hover:bg-inverse-surface hover:text-background transition-colors",onClick:f=>f.stopPropagation(),children:[o??"Open"," →"]})})]})]})}function vRe({source:e}){return i.jsx(Mp,{testId:`feed-card-shipped-${e.sliceId}`,kind:"shipped",title:e.title,oneLiner:e.oneLiner,accent:Ip.shipped,drillInHref:`/project/slice/${e.sliceId}`,expanded:e.sections&&e.sections.length>0?i.jsx("ol",{className:"space-y-2 text-[11px]",children:e.sections.slice(0,3).map(t=>i.jsxs("li",{"data-testid":`feed-card-shipped-${e.sliceId}-section-${t.number}`,className:"flex gap-2",children:[i.jsxs("span",{className:"font-mono text-[10px] font-bold text-on-surface-variant",children:[t.number,"."]}),i.jsxs("div",{children:[i.jsx("div",{className:"font-semibold text-on-surface",children:t.heading}),i.jsx("div",{className:"text-on-surface",children:t.summary})]})]},t.number))}):i.jsx("div",{className:"text-[11px] text-on-surface-variant",children:e.oneLiner})})}const G8={success:"bg-emerald-500",warning:"bg-amber-500",danger:"bg-red-500",info:"bg-sky-500",muted:"bg-outline-variant"};function yRe({source:e}){return i.jsx(Mp,{testId:`feed-card-incident-${e.sliceId}`,kind:"incident",title:e.title,oneLiner:e.oneLiner,accent:Ip.incident,drillInHref:`/project/slice/${e.sliceId}`,drillInLabel:"Open timeline",leadingAccessory:i.jsx("span",{"data-testid":`feed-card-incident-${e.sliceId}-dot`,className:`inline-block h-3 w-3 rounded-full shrink-0 ${G8[e.status]}`,"aria-hidden":"true"}),expanded:e.recentEntries&&e.recentEntries.length>0?i.jsx("ul",{className:"space-y-2 text-[11px]",children:e.recentEntries.slice(0,3).map((t,n)=>i.jsxs("li",{"data-testid":`feed-card-incident-${e.sliceId}-entry-${n}`,className:"flex items-baseline gap-2",children:[i.jsx("span",{className:`inline-block h-2 w-2 rounded-full ${G8[t.status]} shrink-0`,"aria-hidden":"true"}),i.jsx("span",{className:"font-mono text-[9px] uppercase tracking-[0.10em] text-on-surface-variant shrink-0",children:t.time}),i.jsx("span",{className:"text-on-surface",children:t.title})]},n))}):i.jsx("div",{className:"text-[11px] text-on-surface-variant",children:"No recent entries."})})}function bRe({source:e,onMarkComplete:t}){const n=Math.max(0,Math.min(100,Math.round(e.percent))),s=t?i.jsx("button",{type:"button","data-testid":"progress-card-mark-complete",onClick:r=>{r.stopPropagation(),t(e.missionId)},className:"min-h-[36px] border border-on-surface px-3 py-1.5 font-mono text-[10px] uppercase tracking-[0.12em] text-on-surface hover:bg-inverse-surface hover:text-background transition-colors focus:outline-none focus:ring-1 focus:ring-on-surface",children:"Mark complete"}):void 0;return i.jsx(Mp,{testId:`feed-card-progress-${e.missionId}`,kind:"progress",title:e.title,oneLiner:e.nextStep??e.oneLiner,accent:Ip.progress,drillInHref:`/project/mission/${e.missionId}`,drillInLabel:"Open mission",inlineActions:s,leadingAccessory:i.jsx("div",{"data-testid":`feed-card-progress-${e.missionId}-bar`,"data-percent":n,className:"h-1.5 w-16 shrink-0 border border-outline-variant bg-surface-low overflow-hidden","aria-label":`Progress ${n}%`,children:i.jsx("div",{"data-testid":`feed-card-progress-${e.missionId}-bar-fill`,className:"h-full bg-sky-500",style:{width:`${n}%`}})}),expanded:e.activeSlice?i.jsxs("div",{"data-testid":`feed-card-progress-${e.missionId}-active-slice`,className:"border border-outline-variant bg-background px-2 py-2",children:[i.jsx("div",{className:"font-mono text-[8px] uppercase tracking-[0.18em] text-on-surface-variant",children:"Active slice"}),i.jsx("div",{className:"mt-1 text-[12px] font-semibold text-on-surface",children:e.activeSlice.label}),i.jsxs("div",{className:"mt-0.5 font-mono text-[9px] text-on-surface-variant",children:["status: ",e.activeSlice.status]})]}):i.jsx("div",{className:"text-[11px] text-on-surface-variant",children:"No active slice."})})}function _Re({source:e}){return i.jsx(Mp,{testId:`feed-card-approval-${e.qitemId}`,kind:"approval",title:e.title,oneLiner:e.oneLiner,accent:Ip.approval,drillInHref:e.drillInHref,drillInLabel:"Open detail",inlineActions:i.jsxs(i.Fragment,{children:[e.onApprove&&i.jsx("button",{type:"button","data-testid":`feed-card-approval-${e.qitemId}-approve`,onClick:e.onApprove,className:"min-h-[44px] border border-success px-3 py-1.5 font-mono text-[10px] uppercase tracking-[0.12em] text-success hover:bg-success hover:text-white transition-colors",children:"Approve"}),e.onDeny&&i.jsx("button",{type:"button","data-testid":`feed-card-approval-${e.qitemId}-deny`,onClick:e.onDeny,className:"min-h-[44px] border border-on-surface px-3 py-1.5 font-mono text-[10px] uppercase tracking-[0.12em] text-on-surface hover:bg-inverse-surface hover:text-background transition-colors",children:"Deny"})]}),expanded:e.bodyPreview?i.jsx("pre",{"data-testid":`feed-card-approval-${e.qitemId}-body`,className:"overflow-x-auto whitespace-pre-wrap break-words bg-background p-2 font-body text-[11px] leading-relaxed text-on-surface",children:e.bodyPreview}):i.jsx("div",{className:"text-[11px] text-on-surface-variant",children:"No body preview."})})}function wRe({source:e}){return i.jsx(Mp,{testId:`feed-card-concept-${e.sliceId}`,kind:"concept",title:e.title,oneLiner:e.oneLiner,accent:Ip.concept,drillInHref:`/project/slice/${e.sliceId}`,drillInLabel:"Open concept",expanded:e.comparePreview&&e.comparePreview.length>0?i.jsxs("table",{className:"w-full border-collapse text-[11px]",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"bg-background",children:[i.jsx("th",{className:"border border-outline-variant px-2 py-1 text-left font-mono text-[8px] uppercase tracking-[0.12em] text-on-surface-variant"}),i.jsx("th",{className:"border border-outline-variant px-2 py-1 text-left font-mono text-[8px] uppercase tracking-[0.12em] text-on-surface-variant",children:"Old"}),i.jsx("th",{className:"border border-outline-variant px-2 py-1 text-left font-mono text-[8px] uppercase tracking-[0.12em] text-on-surface-variant",children:"New"})]})}),i.jsx("tbody",{children:e.comparePreview.slice(0,3).map((t,n)=>i.jsxs("tr",{children:[i.jsx("td",{className:"border border-outline-variant px-2 py-1 font-mono text-[10px] font-semibold text-on-surface",children:t.label}),i.jsx("td",{className:"border border-outline-variant px-2 py-1 text-on-surface",children:t.valueOld}),i.jsx("td",{className:"border border-outline-variant px-2 py-1 text-on-surface",children:t.valueNew})]},n))})]}):i.jsx("div",{className:"text-[11px] text-on-surface-variant",children:e.oneLiner})})}function SRe(){return i.jsxs("div",{className:"mx-auto max-w-5xl space-y-10 px-6 py-10","data-testid":"card-previews-lab",children:[i.jsxs("header",{className:"space-y-2",children:[i.jsx("h1",{className:"font-mono text-[12px] uppercase tracking-[0.18em] text-on-surface-variant",children:"/lab/card-previews"}),i.jsx("p",{className:"font-mono text-[11px] text-on-surface",children:"Visual gallery of for-you card kind variants. Each section renders the same card component the live feed uses, with sample data."})]}),i.jsx(ou,{title:"Shipped",description:"A slice merged + summary view. Used when a slice closes successfully and the feed surfaces it to operators downstream."}),i.jsx(vRe,{source:{sliceId:"first-conveyor-run",title:"First Conveyor Run — shipped",oneLiner:"Slice merged at b71cddf. 4 commits + 1 proof packet.",sections:[{number:1,heading:"Lint parses + validates entries",summary:"12 tests pass; UTF-8 edge cases handled."},{number:2,heading:"Reviewer accepted with one concern",summary:"Combining-character edge addressed mid-flight."},{number:3,heading:"Proof packet captured",summary:"CLI output screenshot + diff render."}]}}),i.jsx(ou,{title:"Incident / Action Required",description:"A timeline-shaped surface for an in-flight or recent incident. Use status='warning' or 'danger' to surface attention; 'info' for informational; 'muted' for resolved."}),i.jsx(yRe,{source:{sliceId:"auth-bearer-tailscale-trust",title:"Auth bearer tailscale trust — concerning",oneLiner:"Reviewer flagged loopback-only default at fix-1; remediated at fix-2.",status:"warning",recentEntries:[{time:"13:42",title:"Reviewer BLOCKING-CONCERN raised",status:"danger"},{time:"14:01",title:"Driver forward-fix scoped",status:"info"},{time:"14:38",title:"Forward-fix landed; gates green",status:"success"}]}}),i.jsx(ou,{title:"Progress",description:"A mission-level progress card with percent + active-slice context. Used during a mission lifecycle to keep operators informed without requiring them to open the mission page."}),i.jsx(bRe,{source:{missionId:"release-0.3.1",title:"Release 0.3.1 — in flight",oneLiner:"Wave 3a + 3b dispatches; multiple slices in review.",percent:62,nextStep:"design-reviewer audit on slice 21 narrative voice",activeSlice:{id:"slice-21-onboarding-conveyor",label:"slice-21-onboarding-conveyor",status:"in-progress"}}}),i.jsx(ou,{title:"Approval / Action Required",description:"An operator-decision-needed surface. Renders the qitem context + the two action paths (Approve / Deny) the operator picks between."}),i.jsx(_Re,{source:{qitemId:"qitem-20260511201234-abcdef01",title:"Auth bearer tailscale trust — approve merge?",oneLiner:"All gates green; merge requires operator sign-off.",bodyPreview:"Triple-guard CLEAR. velocity-qa VM walk PASS. Ready for merge to main.",drillInHref:"/project/slice/auth-bearer-tailscale-trust",onApprove:()=>{},onDeny:()=>{}}}),i.jsx(ou,{title:"Concept / Observation",description:"A discovery / lab / scratch-pad surface. Used for not-yet-actionable observations, draft ideas, or comparison previews."}),i.jsx(wRe,{source:{sliceId:"concept-storytelling-primitives",title:"Storytelling primitives — concept",oneLiner:"Could replace one-off card components with kind-frame primitives.",comparePreview:[{label:"Card kinds",valueOld:"5 components",valueNew:"1 kind-frame + 5 sources"},{label:"Visual variance",valueOld:"drift over time",valueNew:"centralized accent tokens"},{label:"Maintenance",valueOld:"edit each component",valueNew:"edit kind-frame once"}]}}),i.jsx(ou,{title:"Empty state",description:"What the for-you feed shows when no events qualify. Reusable across surfaces; the EmptyState primitive is the canonical pattern."}),i.jsx(Ae,{label:"ALL CAUGHT UP",description:"No new events. Spin up a rig or declare a slice to populate this feed.",variant:"card",testId:"card-previews-empty-state"})]})}function ou({title:e,description:t}){return i.jsxs("div",{className:"space-y-1 pt-4",children:[i.jsx("h2",{className:"font-mono text-[10px] uppercase tracking-[0.16em] text-on-surface",children:e}),i.jsx("p",{className:"font-mono text-[10px] text-on-surface-variant max-w-3xl",children:t})]})}function Uy({backLayerOverride:e,vellumSheetOverride:t}={}){return i.jsxs("div",{"data-testid":"vellum-lab",className:"relative min-h-screen overflow-hidden",children:[e,t,i.jsx(QSe,{}),i.jsx(XSe,{}),i.jsx(cje,{})]})}function jRe(){return i.jsx(Uy,{backLayerOverride:i.jsx(ARe,{}),vellumSheetOverride:i.jsx(RRe,{})})}function NRe(){return i.jsx(Uy,{backLayerOverride:i.jsx(IRe,{}),vellumSheetOverride:i.jsx(TRe,{})})}function kRe(){return i.jsx(Uy,{backLayerOverride:i.jsx(ERe,{}),vellumSheetOverride:i.jsx(CRe,{})})}function CRe(){return i.jsx("div",{"data-testid":"vellum-sheet-heavy-diffuse","aria-hidden":"true",className:"absolute inset-0 z-[5] bg-surface-lowest/25 backdrop-blur-[8px] pointer-events-none"})}function ERe(){const r=Math.ceil(27.5)+2,a=(c,d,h=0)=>c/1280*Math.PI*2*d+h,o=[];for(let c=0;c<r;c++){const d=c*40-40;let h=`M 0 ${d.toFixed(2)}`;for(let m=0;m<=2560;m+=32){const f=Math.sin(a(m,2,c*.3))*36,g=Math.sin(a(m,5,c*.5))*9,x=Math.sin(a(m,3,c*.18))*14,y=f+g+x;h+=` L ${m} ${(d+y).toFixed(2)}`}o.push(h)}return i.jsx("div",{"data-testid":"back-layer-scrolling-topo","aria-hidden":"true",className:"absolute inset-0 z-0 overflow-hidden pointer-events-none select-none",children:i.jsx("svg",{className:"absolute top-0 left-0 h-full vellum-scroll-x",style:{width:"200%"},viewBox:"0 0 2560 1100",preserveAspectRatio:"xMidYMid slice",children:o.map((c,d)=>i.jsx("path",{d:c,stroke:"#1c1917",strokeWidth:"1.0",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},d))})})}function RRe(){return i.jsx("div",{"data-testid":"vellum-sheet-diffuse","aria-hidden":"true",className:"absolute top-[14px] bottom-[12px] left-[16px] right-[14px] z-[5] bg-surface-lowest/35 backdrop-blur-[14px] pointer-events-none"})}function TRe(){return i.jsx("div",{"data-testid":"vellum-sheet-more-diffuse","aria-hidden":"true",className:"absolute top-[14px] bottom-[12px] left-[16px] right-[14px] z-[5] bg-surface-lowest/45 backdrop-blur-[22px] pointer-events-none"})}function ARe(){const s=Math.ceil(27.5)+2,r=[];for(let a=0;a<s;a++){const o=a*40-40;let c=`M -50 ${o.toFixed(2)}`;for(let d=0;d<=1380;d+=40){const h=d/1280,m=Math.sin(h*Math.PI*2.2+a*.28)*36,f=Math.sin(h*Math.PI*5.8+a*.47)*9,g=Math.sin(h*Math.PI*3.6+a*.13+Math.sin(a*.5)*2)*16,x=m+f+g;c+=` L ${d.toFixed(0)} ${(o+x).toFixed(2)}`}r.push(c)}return i.jsx("div",{"data-testid":"back-layer-topo","aria-hidden":"true",className:"absolute inset-0 z-0 overflow-hidden pointer-events-none select-none",children:i.jsx("svg",{className:"w-full h-full",viewBox:"0 0 1280 1100",preserveAspectRatio:"xMidYMid slice",children:r.map((a,o)=>i.jsx("path",{d:a,stroke:"#1c1917",strokeWidth:"1.2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},o))})})}function IRe(){const e=[{type:"cube",size:220,pos:"top-[2%] -left-6"},{type:"spool",size:200,pos:"top-[4%] left-[24%]"},{type:"x-prism",size:220,pos:"top-[2%] left-[50%]"},{type:"cube-frame",size:240,pos:"top-[1%] -right-8"},{type:"arc-stripes",size:200,pos:"top-[28%] left-[4%]"},{type:"donut-dots",size:220,pos:"top-[26%] left-[28%]"},{type:"hex-prism",size:220,pos:"top-[26%] left-[54%]"},{type:"cylinder-stripes",size:200,pos:"top-[28%] right-[4%]"},{type:"wedge",size:230,pos:"top-[52%] -left-4"},{type:"stairs-iso",size:240,pos:"top-[50%] left-[24%]"},{type:"barrel",size:220,pos:"top-[52%] left-[50%]"},{type:"pacman",size:240,pos:"top-[50%] -right-6"},{type:"cube-stack",size:260,pos:"bottom-[-4%] left-[5%]"},{type:"L-prism",size:260,pos:"bottom-[-2%] left-[36%]"},{type:"cube-ports",size:260,pos:"bottom-[-4%] right-[4%]"}];return i.jsx("div",{"data-testid":"back-layer-isometric","aria-hidden":"true",className:"absolute inset-0 z-0 overflow-hidden pointer-events-none select-none",children:e.map((t,n)=>i.jsx(MRe,{...t},n))})}function MRe({type:e,size:t,pos:n}){return i.jsx("div",{className:`absolute ${n}`,style:{width:t,height:t},children:i.jsx(LRe,{type:e})})}function LRe({type:e}){const t={fill:"none",stroke:"currentColor",strokeWidth:1.6,strokeLinejoin:"round",strokeLinecap:"round"};switch(e){case"cube":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("polygon",{points:"30,8 52,20 52,44 30,56 8,44 8,20"}),i.jsx("line",{x1:"30",y1:"8",x2:"30",y2:"32"}),i.jsx("line",{x1:"30",y1:"32",x2:"8",y2:"20"}),i.jsx("line",{x1:"30",y1:"32",x2:"52",y2:"20"})]});case"cylinder-v":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("ellipse",{cx:"30",cy:"14",rx:"14",ry:"5"}),i.jsx("line",{x1:"16",y1:"14",x2:"16",y2:"46"}),i.jsx("line",{x1:"44",y1:"14",x2:"44",y2:"46"}),i.jsx("path",{d:"M 16 46 A 14 5 0 0 0 44 46"})]});case"triangle-prism":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("polygon",{points:"14,46 30,12 46,46"}),i.jsx("polygon",{points:"46,46 30,12 38,8 54,42"}),i.jsx("line",{x1:"14",y1:"46",x2:"54",y2:"42"})]});case"rod":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("line",{x1:"12",y1:"48",x2:"48",y2:"12",strokeWidth:"1.5"}),i.jsx("circle",{cx:"12",cy:"48",r:"4"}),i.jsx("circle",{cx:"48",cy:"12",r:"4"})]});case"cube-frame":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("polygon",{points:"30,8 52,20 52,44 30,56 8,44 8,20"}),i.jsx("line",{x1:"30",y1:"8",x2:"30",y2:"32"}),i.jsx("line",{x1:"30",y1:"32",x2:"8",y2:"20"}),i.jsx("line",{x1:"30",y1:"32",x2:"52",y2:"20"}),i.jsx("rect",{x:"22",y:"28",width:"16",height:"16"})]});case"stairs":return i.jsx("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:i.jsx("polyline",{points:"8,52 18,52 18,42 28,42 28,32 38,32 38,22 48,22 48,12 56,12"})});case"spool":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("ellipse",{cx:"36",cy:"30",rx:"14",ry:"6"}),i.jsx("path",{d:"M 22 30 L 8 30",strokeWidth:"1.5"}),i.jsx("line",{x1:"36",y1:"14",x2:"36",y2:"22"})]});case"arc-c":return i.jsx("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:i.jsx("path",{d:"M 44 12 A 20 20 0 1 0 44 48",strokeWidth:"1.5"})});case"diamond-row":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("polygon",{points:"8,30 14,24 20,30 14,36"}),i.jsx("polygon",{points:"20,30 26,24 32,30 26,36"}),i.jsx("polygon",{points:"32,30 38,24 44,30 38,36"}),i.jsx("polygon",{points:"44,30 50,24 56,30 50,36"})]});case"plus":return i.jsx("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:i.jsx("polygon",{points:"24,8 36,8 36,24 52,24 52,36 36,36 36,52 24,52 24,36 8,36 8,24 24,24"})});case"cylinder-h":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("ellipse",{cx:"14",cy:"30",rx:"5",ry:"14"}),i.jsx("line",{x1:"14",y1:"16",x2:"46",y2:"16"}),i.jsx("line",{x1:"14",y1:"44",x2:"46",y2:"44"}),i.jsx("path",{d:"M 46 16 A 5 14 0 0 1 46 44"})]});case"wave":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("path",{d:"M 8 16 Q 18 8 28 16 T 48 16",strokeWidth:"1.2"}),i.jsx("path",{d:"M 8 30 Q 18 22 28 30 T 48 30",strokeWidth:"1.2"}),i.jsx("path",{d:"M 8 44 Q 18 36 28 44 T 48 44",strokeWidth:"1.2"})]});case"x-prism":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("polygon",{points:"14,8 24,8 30,18 36,8 46,8 36,22 46,36 36,36 30,26 24,36 14,36 24,22"}),i.jsx("line",{x1:"14",y1:"36",x2:"20",y2:"40"}),i.jsx("line",{x1:"46",y1:"36",x2:"52",y2:"40"})]});case"tri-stack":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,fill:"currentColor",children:[i.jsx("polygon",{points:"12,40 18,28 24,40"}),i.jsx("polygon",{points:"24,40 30,28 36,40"}),i.jsx("polygon",{points:"36,40 42,28 48,40"})]});case"L-prism":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("polygon",{points:"8,28 28,18 48,28 28,38"}),i.jsx("polygon",{points:"28,38 48,28 48,44 28,54"}),i.jsx("polygon",{points:"8,28 8,44 28,54 28,38"})]});case"arc-stripes":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("path",{d:"M 12 50 A 22 22 0 0 1 48 14",strokeWidth:"1"}),i.jsx("path",{d:"M 16 50 A 18 18 0 0 1 48 18",strokeWidth:"1"}),i.jsx("path",{d:"M 20 50 A 14 14 0 0 1 48 22",strokeWidth:"1"}),i.jsx("path",{d:"M 24 50 A 10 10 0 0 1 48 26",strokeWidth:"1"})]});case"hex-prism":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("polygon",{points:"30,8 48,18 48,38 30,48 12,38 12,18"}),i.jsx("line",{x1:"30",y1:"8",x2:"30",y2:"48"}),i.jsx("line",{x1:"12",y1:"18",x2:"30",y2:"28"}),i.jsx("line",{x1:"48",y1:"18",x2:"30",y2:"28"})]});case"dot-circle":return i.jsx("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",fill:"currentColor",children:Array.from({length:16}).map((n,s)=>{const r=s/16*Math.PI*2,a=30+Math.cos(r)*22,o=30+Math.sin(r)*22;return i.jsx("circle",{cx:a,cy:o,r:"1.8"},s)})});case"wedge":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("path",{d:"M 30 30 L 30 8 A 22 22 0 0 1 52 30 Z",fill:"currentColor"}),i.jsx("path",{d:"M 30 30 L 8 30 A 22 22 0 0 1 30 8"}),i.jsx("line",{x1:"30",y1:"30",x2:"14",y2:"44"}),i.jsx("line",{x1:"30",y1:"30",x2:"22",y2:"50"}),i.jsx("line",{x1:"30",y1:"30",x2:"34",y2:"52"})]});case"down-arrows":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,fill:"currentColor",children:[i.jsx("polygon",{points:"20,8 40,8 30,22"}),i.jsx("polygon",{points:"20,22 40,22 30,36"}),i.jsx("polygon",{points:"20,36 40,36 30,50"})]});case"donut-dots":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("circle",{cx:"30",cy:"30",r:"22"}),i.jsx("circle",{cx:"30",cy:"30",r:"10"}),i.jsx("g",{fill:"currentColor",children:Array.from({length:24}).map((n,s)=>{const r=s/24*Math.PI*2+.08,a=16;return i.jsx("circle",{cx:30+Math.cos(r)*a,cy:30+Math.sin(r)*a,r:"0.9"},s)})})]});case"bowtie":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,fill:"currentColor",children:[i.jsx("polygon",{points:"8,18 22,30 8,42"}),i.jsx("polygon",{points:"52,18 38,30 52,42"}),i.jsx("circle",{cx:"30",cy:"30",r:"3"})]});case"dot-grid":return i.jsx("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",fill:"currentColor",children:Array.from({length:6}).map((n,s)=>Array.from({length:6}).map((r,a)=>i.jsx("circle",{cx:10+a*8,cy:10+s*8,r:"1.4"},`${s}-${a}`)))});case"arc-half":return i.jsx("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:i.jsx("path",{d:"M 8 38 A 22 22 0 0 1 52 38",strokeWidth:"1.5"})});case"cylinder-stripes":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("ellipse",{cx:"30",cy:"14",rx:"14",ry:"5"}),i.jsx("line",{x1:"16",y1:"14",x2:"16",y2:"46"}),i.jsx("line",{x1:"44",y1:"14",x2:"44",y2:"46"}),i.jsx("path",{d:"M 16 46 A 14 5 0 0 0 44 46"}),i.jsx("line",{x1:"22",y1:"18",x2:"22",y2:"44",strokeDasharray:"2 2"}),i.jsx("line",{x1:"30",y1:"19",x2:"30",y2:"45",strokeDasharray:"2 2"}),i.jsx("line",{x1:"38",y1:"18",x2:"38",y2:"44",strokeDasharray:"2 2"})]});case"dot-cloud":return i.jsx("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",fill:"currentColor",children:[[22,18],[30,14],[38,18],[16,24],[24,24],[32,22],[40,24],[46,28],[18,32],[26,32],[34,32],[42,32],[22,38],[30,38],[38,38],[28,44],[36,44]].map(([n,s],r)=>i.jsx("circle",{cx:n,cy:s,r:"1.5"},r))});case"pacman":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("path",{d:"M 30 30 L 52 18 A 22 22 0 1 1 52 42 Z",fill:"currentColor"}),i.jsx("line",{x1:"20",y1:"20",x2:"14",y2:"14"}),i.jsx("line",{x1:"20",y1:"40",x2:"14",y2:"46"}),i.jsx("line",{x1:"12",y1:"30",x2:"6",y2:"30"})]});case"down-triangles":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,fill:"currentColor",children:[i.jsx("polygon",{points:"22,12 38,12 30,24"}),i.jsx("polygon",{points:"22,28 38,28 30,40"})]});case"cube-inset":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("polygon",{points:"30,4 50,16 50,36 30,48 10,36 10,16"}),i.jsx("line",{x1:"30",y1:"4",x2:"30",y2:"48"}),i.jsx("line",{x1:"10",y1:"16",x2:"30",y2:"28"}),i.jsx("line",{x1:"50",y1:"16",x2:"30",y2:"28"}),i.jsx("rect",{x:"22",y:"46",width:"16",height:"10"})]});case"hex-small":return i.jsx("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:i.jsx("polygon",{points:"30,18 42,24 42,38 30,44 18,38 18,24"})});case"cylinder-disc":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("ellipse",{cx:"34",cy:"30",rx:"14",ry:"5"}),i.jsx("path",{d:"M 20 30 A 14 5 0 0 1 48 30"}),i.jsx("line",{x1:"20",y1:"30",x2:"20",y2:"36",strokeWidth:"1.5"}),i.jsx("ellipse",{cx:"20",cy:"36",rx:"3",ry:"1.4"}),i.jsx("path",{d:"M 20 30 L 14 32"})]});case"triangle-solid":return i.jsx("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",fill:"currentColor",children:i.jsx("polygon",{points:"30,16 46,44 14,44"})});case"stairs-iso":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("polygon",{points:"8,40 16,36 24,40 16,44"}),i.jsx("polygon",{points:"16,36 24,32 32,36 24,40"}),i.jsx("polygon",{points:"24,32 32,28 40,32 32,36"}),i.jsx("polygon",{points:"32,28 40,24 48,28 40,32"}),i.jsx("polygon",{points:"40,24 48,20 56,24 48,28"})]});case"coin":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("ellipse",{cx:"30",cy:"26",rx:"14",ry:"6"}),i.jsx("path",{d:"M 16 26 L 16 34 A 14 6 0 0 0 44 34 L 44 26"}),i.jsx("line",{x1:"22",y1:"26",x2:"22",y2:"34"}),i.jsx("line",{x1:"30",y1:"32",x2:"30",y2:"38"}),i.jsx("line",{x1:"38",y1:"26",x2:"38",y2:"34"})]});case"cube-ports":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("polygon",{points:"30,6 52,18 52,42 30,54 8,42 8,18"}),i.jsx("line",{x1:"30",y1:"6",x2:"30",y2:"30"}),i.jsx("line",{x1:"30",y1:"30",x2:"8",y2:"18"}),i.jsx("line",{x1:"30",y1:"30",x2:"52",y2:"18"}),i.jsx("circle",{cx:"20",cy:"20",r:"2.5",fill:"currentColor"}),i.jsx("circle",{cx:"40",cy:"20",r:"2.5",fill:"currentColor"}),i.jsx("circle",{cx:"30",cy:"42",r:"2.5",fill:"currentColor"})]});case"arc-bridge":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("path",{d:"M 8 44 Q 30 8 52 44",strokeWidth:"1.5"}),i.jsx("circle",{cx:"30",cy:"44",r:"3",fill:"currentColor"})]});case"zigzag-v":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("polyline",{points:"24,8 36,16 24,24 36,32 24,40 36,48",strokeWidth:"1.5"}),i.jsx("polyline",{points:"20,12 32,20 20,28 32,36 20,44 32,52",strokeWidth:"1.5"})]});case"x-flat":return i.jsx("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,fill:"currentColor",children:i.jsx("polygon",{points:"14,14 22,14 30,22 38,14 46,14 36,28 46,46 38,46 30,34 22,46 14,46 24,28"})});case"cube-stack":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("polygon",{points:"14,30 22,26 30,30 22,34"}),i.jsx("polygon",{points:"22,34 30,30 30,38 22,42"}),i.jsx("polygon",{points:"14,30 14,38 22,42 22,34"}),i.jsx("polygon",{points:"30,22 38,18 46,22 38,26"}),i.jsx("polygon",{points:"38,26 46,22 46,30 38,34"}),i.jsx("polygon",{points:"30,22 30,30 38,34 38,26"})]});case"back-arrows":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,fill:"currentColor",children:[i.jsx("polygon",{points:"42,16 42,44 24,30"}),i.jsx("polygon",{points:"28,16 28,44 10,30"})]});case"barrel":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("ellipse",{cx:"44",cy:"30",rx:"6",ry:"14"}),i.jsx("line",{x1:"44",y1:"16",x2:"14",y2:"20"}),i.jsx("line",{x1:"44",y1:"44",x2:"14",y2:"40"}),i.jsx("ellipse",{cx:"14",cy:"30",rx:"4",ry:"10"}),i.jsx("line",{x1:"20",y1:"20",x2:"20",y2:"40",strokeDasharray:"2 2"}),i.jsx("line",{x1:"28",y1:"19",x2:"28",y2:"41",strokeDasharray:"2 2"}),i.jsx("line",{x1:"36",y1:"18",x2:"36",y2:"42",strokeDasharray:"2 2"})]});case"wave-s":return i.jsxs("svg",{className:"w-full h-full text-on-surface",viewBox:"0 0 60 60",...t,children:[i.jsx("path",{d:"M 22 8 Q 32 18 22 28 T 22 48",strokeWidth:"1.5"}),i.jsx("path",{d:"M 38 8 Q 28 18 38 28 T 38 48",strokeWidth:"1.5"})]})}}const Pe=cX({component:()=>i.jsx(YX,{client:aZ,children:i.jsx(iZ,{children:i.jsx(Wie,{children:i.jsx(Iq,{})})})})}),ORe=Oe({getParentRoute:()=>Pe,path:"/",component:xSe}),PRe=Oe({getParentRoute:()=>Pe,path:"/topology",component:GCe}),DRe=Oe({getParentRoute:()=>Pe,path:"/topology/rig/$rigId",component:KCe}),$Re=Oe({getParentRoute:()=>Pe,path:"/topology/pod/$rigId/$podName",component:QCe}),BRe=Oe({getParentRoute:()=>Pe,path:"/topology/seat/$rigId/$logicalId",component:XCe}),qRe=Oe({getParentRoute:()=>Pe,path:"/for-you",component:Qje}),FRe=Oe({getParentRoute:()=>Pe,path:"/project",component:AEe}),zRe=Oe({getParentRoute:()=>Pe,path:"/project/mission/$missionId",component:IEe}),HRe=Oe({getParentRoute:()=>Pe,path:"/project/slice/$sliceId",component:OEe}),URe=Oe({getParentRoute:()=>Pe,path:"/agents",component:VEe}),VRe=Oe({getParentRoute:()=>Pe,path:"/fleet",component:XEe}),WRe=Oe({getParentRoute:()=>Pe,path:"/workflows",component:JEe}),GRe=Oe({getParentRoute:()=>Pe,path:"/workflow/instance/$instanceId",validateSearch:e=>({step:typeof e.step=="string"?e.step:void 0}),component:()=>{const{instanceId:e}=An({from:"/workflow/instance/$instanceId"}),{step:t}=vv({from:"/workflow/instance/$instanceId"});return i.jsx(lRe,{instanceId:e,anchorStepId:t??null})}}),KRe=Oe({getParentRoute:()=>Pe,path:"/specs",component:sW}),YRe=Oe({getParentRoute:()=>Pe,path:"/specs/applications",component:sW}),QRe=Oe({getParentRoute:()=>Pe,path:"/specs/skills",component:pNe}),XRe=Oe({getParentRoute:()=>Pe,path:"/specs/skills/$skillToken",component:()=>{const{skillToken:e}=An({from:"/specs/skills/$skillToken"});return i.jsx(rW,{skillToken:e})}}),ZRe=Oe({getParentRoute:()=>Pe,path:"/specs/skills/$skillToken/file/$fileToken",component:()=>{const{skillToken:e,fileToken:t}=An({from:"/specs/skills/$skillToken/file/$fileToken"});return i.jsx(rW,{skillToken:e,fileToken:t})}}),JRe=Oe({getParentRoute:()=>Pe,path:"/specs/plugins",component:mNe}),eTe=Oe({getParentRoute:()=>Pe,path:"/files",component:qNe}),tTe=Oe({getParentRoute:()=>Pe,path:"/plugins/$pluginId",component:()=>{const{pluginId:e}=An({from:"/plugins/$pluginId"});return i.jsx(NNe,{pluginId:e})}}),nTe=Oe({getParentRoute:()=>Pe,path:"/specs/$specKind/$specName",component:()=>{const{specName:e}=An({from:"/specs/$specKind/$specName"});return i.jsx(Ql,{to:"/specs/library/$entryId",params:{entryId:e}})}}),sTe=Oe({getParentRoute:()=>Pe,path:"/settings",component:XNe}),rTe=Oe({getParentRoute:()=>Pe,path:"/settings/policies",component:nke}),iTe=Oe({getParentRoute:()=>Pe,path:"/settings/log",component:ake}),aTe=Oe({getParentRoute:()=>Pe,path:"/settings/status",component:uke}),oTe=Oe({getParentRoute:()=>Pe,path:"/search",component:W1e}),lTe=Oe({getParentRoute:()=>Pe,path:"/lab/project-graphics-preview",component:pRe}),cTe=Oe({getParentRoute:()=>Pe,path:"/lab/card-previews",component:SRe}),uTe=Oe({getParentRoute:()=>Pe,path:"/lab/vellum-lab",component:Uy}),dTe=Oe({getParentRoute:()=>Pe,path:"/lab/vellum-bg/a-large",component:jRe}),hTe=Oe({getParentRoute:()=>Pe,path:"/lab/vellum-bg/b-small",component:NRe}),fTe=Oe({getParentRoute:()=>Pe,path:"/lab/vellum-bg/c-allover",component:kRe});function pTe(){var s;const{rigId:e}=An({from:"/rigs/$rigId"}),{data:t}=Dr(),n=(s=t==null?void 0:t.find(r=>r.id===e))==null?void 0:s.name;return i.jsx("div",{className:"flex flex-col flex-1 h-full",children:i.jsx("div",{className:"flex-1 min-h-[400px] relative",children:i.jsx(yT,{rigId:e,rigName:n??null,showDiscovered:!1})})})}const mTe=Oe({getParentRoute:()=>Pe,path:"/rigs/$rigId",component:pTe}),gTe=Oe({getParentRoute:()=>Pe,path:"/rigs/$rigId/nodes/$logicalId",component:()=>{const{rigId:e,logicalId:t}=An({from:"/rigs/$rigId/nodes/$logicalId"});return i.jsx(UV,{rigId:e,logicalId:decodeURIComponent(t)})}}),xTe=Oe({getParentRoute:()=>Pe,path:"/import",component:Gbe}),vTe=Oe({getParentRoute:()=>Pe,path:"/packages",component:Jbe}),yTe=Oe({getParentRoute:()=>Pe,path:"/packages/install",component:i0e}),bTe=Oe({getParentRoute:()=>Pe,path:"/packages/$packageId",component:rwe}),_Te=Oe({getParentRoute:()=>Pe,path:"/bootstrap",component:fwe}),wTe=Oe({getParentRoute:()=>Pe,path:"/agents/validate",component:pwe}),STe=Oe({getParentRoute:()=>Pe,path:"/specs/rig",component:Cwe}),jTe=Oe({getParentRoute:()=>Pe,path:"/specs/agent",component:Rwe}),NTe=Oe({getParentRoute:()=>Pe,path:"/specs/library/$entryId",component:()=>{const{entryId:e}=An({from:"/specs/library/$entryId"});return i.jsx(Jwe,{entryId:e})}}),kTe=Oe({getParentRoute:()=>Pe,path:"/discovery",component:()=>i.jsx("div",{className:"flex h-full w-full items-center justify-center p-8",children:i.jsx(Ae,{label:"DISCOVERY",description:"Discovery surface preserved; redesign deferred per code-map.",variant:"card",testId:"discovery-placeholder"})})}),CTe=Oe({getParentRoute:()=>Pe,path:"/discovery/inventory",component:z1e}),ETe=Oe({getParentRoute:()=>Pe,path:"/bundles/inspect",component:Iwe}),RTe=Oe({getParentRoute:()=>Pe,path:"/bundles/install",component:Mwe}),TTe=Oe({getParentRoute:()=>Pe,path:"/context",component:()=>i.jsx(Ql,{to:"/topology"})}),ATe=Oe({getParentRoute:()=>Pe,path:"/mission-control",component:()=>i.jsx(Ql,{to:"/for-you"})}),ITe=Oe({getParentRoute:()=>Pe,path:"/slices",component:()=>i.jsx(Ql,{to:"/project"})}),MTe=Oe({getParentRoute:()=>Pe,path:"/slices/$name",component:()=>{const{name:e}=An({from:"/slices/$name"});return i.jsx(Ql,{to:"/project/slice/$sliceId",params:{sliceId:e}})}}),LTe=Oe({getParentRoute:()=>Pe,path:"/progress",component:()=>i.jsx(Ql,{to:"/project"})}),OTe=Oe({getParentRoute:()=>Pe,path:"/steering",component:()=>i.jsx(Ql,{to:"/project"})}),PTe=Pe.addChildren([ORe,PRe,DRe,$Re,BRe,qRe,FRe,zRe,HRe,URe,VRe,WRe,GRe,KRe,YRe,QRe,JRe,XRe,ZRe,tTe,eTe,nTe,sTe,rTe,iTe,aTe,oTe,lTe,cTe,uTe,dTe,hTe,fTe,mTe,gTe,xTe,vTe,yTe,bTe,_Te,wTe,STe,jTe,NTe,kTe,CTe,ETe,RTe,TTe,ATe,ITe,MTe,LTe,OTe]),DTe=yX({routeTree:PTe}),sG="openrig.uiMaintenanceNoticeDismissed",$Te="The OpenRig UI is experimental and in maintenance mode. It is not under active development; support is best-effort. The CLI is the primary supported interface. Contributions welcome.";function BTe(){try{return localStorage.getItem(sG)==="1"}catch{return!1}}function qTe(){const[e,t]=C.useState(BTe);if(e)return null;const n=()=>{try{localStorage.setItem(sG,"1")}catch{}t(!0)};return i.jsxs("div",{className:"fixed inset-x-0 top-0 z-[100] flex items-start justify-between gap-3 border-b border-amber-500/40 bg-amber-50 px-4 py-2 text-sm text-amber-950 shadow-sm dark:bg-amber-950 dark:text-amber-50","data-testid":"ui-maintenance-notice",role:"status",children:[i.jsx("span",{children:$Te}),i.jsx("button",{"aria-label":"Dismiss maintenance notice",className:"shrink-0 rounded px-1.5 font-semibold hover:bg-amber-200/60 dark:hover:bg-amber-900",onClick:n,type:"button",children:"×"})]})}function FTe(){return i.jsxs(i.Fragment,{children:[i.jsx(qTe,{}),i.jsx(wX,{router:DTe})]})}const K8=document.getElementById("root");K8&&bY.createRoot(K8).render(i.jsx(C.StrictMode,{children:i.jsx(Bie,{children:i.jsx(FTe,{})})}));
|
package/ui/dist/index.html
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
}
|
|
28
28
|
})();
|
|
29
29
|
</script>
|
|
30
|
-
<script type="module" crossorigin src="/assets/index-
|
|
30
|
+
<script type="module" crossorigin src="/assets/index-D5n8EwkG.js"></script>
|
|
31
31
|
<link rel="stylesheet" crossorigin href="/assets/index-DNU3XZr_.css">
|
|
32
32
|
</head>
|
|
33
33
|
<body>
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# Conveyor Starter
|
|
2
|
-
|
|
3
|
-
Conveyor is the OpenRig 0.3.0 starter rig for learning queue handoffs and
|
|
4
|
-
workflow instances.
|
|
5
|
-
|
|
6
|
-
## Run
|
|
7
|
-
|
|
8
|
-
```bash
|
|
9
|
-
rig up conveyor
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
## Workflows
|
|
13
|
-
|
|
14
|
-
- `conveyor`: station pipeline. Multiple packets can be active at once.
|
|
15
|
-
- `basic-loop`: single-work-item walkthrough for watching one packet move
|
|
16
|
-
through the same seats.
|
|
17
|
-
|
|
18
|
-
## Sample Objective
|
|
19
|
-
|
|
20
|
-
Use this as a first packet:
|
|
21
|
-
|
|
22
|
-
```text
|
|
23
|
-
Draft a tiny release-readiness checklist for a command-line tool. Keep it to
|
|
24
|
-
five checks and include one verification command.
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
Expected motion:
|
|
28
|
-
|
|
29
|
-
1. `intake-lead@conveyor` clarifies the packet and hands it to planning.
|
|
30
|
-
2. `plan-planner@conveyor` turns it into a small plan.
|
|
31
|
-
3. `build-builder@conveyor` drafts the checklist.
|
|
32
|
-
4. `review-reviewer@conveyor` checks the result.
|
|
33
|
-
5. `intake-lead@conveyor` closes the packet with evidence.
|