@openrig/cli 0.5.2 → 0.5.4
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/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/README.md +1 -1
- package/daemon/assets/plugins/openrig-core/hooks/claude.json +36 -0
- package/daemon/assets/plugins/openrig-core/hooks/codex.json +27 -0
- package/daemon/assets/plugins/openrig-core/hooks/scripts/refocus.cjs +152 -0
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/SKILL.md +35 -3
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/precompact-hook.mjs +8 -95
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/restore-from-jsonl.mjs +63 -20
- package/daemon/assets/plugins/openrig-core/skills/forming-an-openrig-mental-model/SKILL.md +6 -2
- package/daemon/assets/plugins/openrig-core/skills/messaging-the-human/SKILL.md +28 -2
- package/daemon/assets/plugins/openrig-core/skills/mission-slice-sop/SKILL.md +42 -52
- package/daemon/assets/plugins/openrig-core/skills/openrig-skills/SKILL.md +26 -1
- package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +7 -2
- package/daemon/assets/plugins/openrig-core/skills/orienting-to-an-inherited-seat/CHANGELOG.md +64 -0
- package/daemon/assets/plugins/openrig-core/skills/orienting-to-an-inherited-seat/SKILL.md +235 -0
- package/daemon/assets/plugins/openrig-core/skills/queue-handoff/SKILL.md +31 -1
- package/daemon/assets/plugins/openrig-core/skills/retiring-and-inheriting-a-seat/CHANGELOG.md +48 -0
- package/daemon/assets/plugins/openrig-core/skills/retiring-and-inheriting-a-seat/SKILL.md +211 -0
- package/daemon/assets/plugins/openrig-core/skills/seat-continuity-and-handover/SKILL.md +8 -0
- package/daemon/assets/plugins/openrig-core/skills/software-for-agents/SKILL.md +31 -9
- package/daemon/context-packs/skills/core/agent-starters/SKILL.md +132 -0
- package/daemon/context-packs/skills/core/agent-starters/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/SKILL.md +112 -0
- package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/attention-queue/SKILL.md +264 -0
- package/daemon/context-packs/skills/core/attention-queue/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/cross-host-rig-commands/SKILL.md +195 -0
- package/daemon/context-packs/skills/core/cross-host-rig-commands/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/human-in-the-loop/SKILL.md +104 -0
- package/daemon/context-packs/skills/core/human-in-the-loop/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/openrig-architect/SKILL.md +378 -0
- package/daemon/context-packs/skills/core/openrig-architect/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/openrig-cmux/SKILL.md +81 -0
- package/daemon/context-packs/skills/core/openrig-cmux/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/openrig-herdr/SKILL.md +153 -0
- package/daemon/context-packs/skills/core/openrig-herdr/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/openrig-upgrade/SKILL.md +460 -0
- package/daemon/context-packs/skills/core/openrig-upgrade/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/SKILL.md +101 -0
- package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/rig-lifecycle/SKILL.md +127 -0
- package/daemon/context-packs/skills/core/rig-lifecycle/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/session-source-fork/SKILL.md +160 -0
- package/daemon/context-packs/skills/core/session-source-fork/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/specification-system/SKILL.md +103 -0
- package/daemon/context-packs/skills/core/specification-system/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/SKILL.md +118 -0
- package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/manifest.yaml +9 -0
- package/daemon/context-packs/skills/core/watchdog/SKILL.md +126 -0
- package/daemon/context-packs/skills/core/watchdog/manifest.yaml +9 -0
- package/daemon/context-packs/skills/pm/backlog-capture/SKILL.md +43 -0
- package/daemon/context-packs/skills/pm/backlog-capture/manifest.yaml +9 -0
- package/daemon/context-packs/skills/pm/context-builder/SKILL.md +87 -0
- package/daemon/context-packs/skills/pm/context-builder/manifest.yaml +9 -0
- package/daemon/context-packs/skills/pm/exec-summary/SKILL.md +84 -0
- package/daemon/context-packs/skills/pm/exec-summary/manifest.yaml +9 -0
- package/daemon/context-packs/skills/pm/office-hours/SKILL.md +129 -0
- package/daemon/context-packs/skills/pm/office-hours/manifest.yaml +9 -0
- package/daemon/context-packs/skills/pm/plan-review/SKILL.md +98 -0
- package/daemon/context-packs/skills/pm/plan-review/manifest.yaml +9 -0
- package/daemon/context-packs/skills/pm/requirements-writer/SKILL.md +113 -0
- package/daemon/context-packs/skills/pm/requirements-writer/manifest.yaml +9 -0
- package/daemon/context-packs/skills/pm/ui-mockup/SKILL.md +76 -0
- package/daemon/context-packs/skills/pm/ui-mockup/manifest.yaml +9 -0
- package/daemon/context-packs/skills/pods/development-team/SKILL.md +156 -0
- package/daemon/context-packs/skills/pods/development-team/manifest.yaml +9 -0
- package/daemon/context-packs/skills/pods/orchestration-team/SKILL.md +307 -0
- package/daemon/context-packs/skills/pods/orchestration-team/manifest.yaml +9 -0
- package/daemon/context-packs/skills/pods/oversight-team/SKILL.md +106 -0
- package/daemon/context-packs/skills/pods/oversight-team/manifest.yaml +9 -0
- package/daemon/context-packs/skills/pods/review-team/SKILL.md +213 -0
- package/daemon/context-packs/skills/pods/review-team/manifest.yaml +9 -0
- package/daemon/context-packs/skills/process/agent-browser/LOCAL-INSIGHTS.md +189 -0
- package/daemon/context-packs/skills/process/agent-browser/OPENRIG.md +40 -0
- package/daemon/context-packs/skills/process/agent-browser/SKILL.md +427 -0
- package/daemon/context-packs/skills/process/agent-browser/manifest.yaml +13 -0
- package/daemon/context-packs/skills/process/brainstorming/OPENRIG.md +48 -0
- package/daemon/context-packs/skills/process/brainstorming/SKILL.md +107 -0
- package/daemon/context-packs/skills/process/brainstorming/manifest.yaml +11 -0
- package/daemon/context-packs/skills/process/context-engineering/SKILL.md +479 -0
- package/daemon/context-packs/skills/process/context-engineering/manifest.yaml +9 -0
- package/daemon/context-packs/skills/process/dogfood/SKILL.md +225 -0
- package/daemon/context-packs/skills/process/dogfood/manifest.yaml +13 -0
- package/daemon/context-packs/skills/process/dogfood/references/issue-taxonomy.md +109 -0
- package/daemon/context-packs/skills/process/dogfood/templates/dogfood-report-template.md +53 -0
- package/daemon/context-packs/skills/process/executing-plans/OPENRIG.md +56 -0
- package/daemon/context-packs/skills/process/executing-plans/SKILL.md +94 -0
- package/daemon/context-packs/skills/process/executing-plans/manifest.yaml +11 -0
- package/daemon/context-packs/skills/process/frontend-design/LICENSE.txt +177 -0
- package/daemon/context-packs/skills/process/frontend-design/SKILL.md +50 -0
- package/daemon/context-packs/skills/process/frontend-design/manifest.yaml +11 -0
- package/daemon/context-packs/skills/process/systematic-debugging/SKILL.md +301 -0
- package/daemon/context-packs/skills/process/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/daemon/context-packs/skills/process/systematic-debugging/condition-based-waiting.md +115 -0
- package/daemon/context-packs/skills/process/systematic-debugging/defense-in-depth.md +122 -0
- package/daemon/context-packs/skills/process/systematic-debugging/find-polluter.sh +63 -0
- package/daemon/context-packs/skills/process/systematic-debugging/manifest.yaml +19 -0
- package/daemon/context-packs/skills/process/systematic-debugging/root-cause-tracing.md +169 -0
- package/daemon/context-packs/skills/process/test-driven-development/SKILL.md +385 -0
- package/daemon/context-packs/skills/process/test-driven-development/manifest.yaml +11 -0
- package/daemon/context-packs/skills/process/test-driven-development/testing-anti-patterns.md +299 -0
- package/daemon/context-packs/skills/process/using-superpowers/OPENRIG.md +48 -0
- package/daemon/context-packs/skills/process/using-superpowers/SKILL.md +106 -0
- package/daemon/context-packs/skills/process/using-superpowers/manifest.yaml +11 -0
- package/daemon/context-packs/skills/process/verification-before-completion/SKILL.md +155 -0
- package/daemon/context-packs/skills/process/verification-before-completion/manifest.yaml +9 -0
- package/daemon/context-packs/skills/process/writing-plans/OPENRIG.md +52 -0
- package/daemon/context-packs/skills/process/writing-plans/SKILL.md +126 -0
- package/daemon/context-packs/skills/process/writing-plans/manifest.yaml +11 -0
- package/daemon/context-packs/world/install/01-world-from-primitives.md +97 -0
- package/daemon/context-packs/world/install/02-permission-self-sleep.md +141 -0
- package/daemon/context-packs/world/install/03-what-this-is-for.md +86 -0
- package/daemon/context-packs/world/install/04-ontology.md +790 -0
- package/daemon/context-packs/world/install/05-harness-power-use.md +355 -0
- package/daemon/context-packs/world/install/06-a-competent-turn.md +225 -0
- package/daemon/context-packs/world/install/manifest.yaml +125 -0
- package/daemon/context-packs/world/install/reference-material.md +125 -0
- package/daemon/context-packs/world/install/what-you-can-do.md +416 -0
- package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-code-adapter.js +7 -4
- package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
- package/daemon/dist/adapters/claude-resume.js +2 -2
- package/daemon/dist/adapters/claude-resume.js.map +1 -1
- package/daemon/dist/adapters/tmux.d.ts +41 -2
- package/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux.js +58 -18
- package/daemon/dist/adapters/tmux.js.map +1 -1
- package/daemon/dist/adapters/yolo-mode.d.ts +18 -0
- package/daemon/dist/adapters/yolo-mode.d.ts.map +1 -1
- package/daemon/dist/adapters/yolo-mode.js +21 -0
- package/daemon/dist/adapters/yolo-mode.js.map +1 -1
- package/daemon/dist/build-info.js +3 -3
- package/daemon/dist/daemon-db-path.d.ts.map +1 -1
- package/daemon/dist/daemon-db-path.js +50 -2
- package/daemon/dist/daemon-db-path.js.map +1 -1
- package/daemon/dist/domain/codex-thread-id.d.ts +95 -0
- package/daemon/dist/domain/codex-thread-id.d.ts.map +1 -1
- package/daemon/dist/domain/codex-thread-id.js +171 -2
- package/daemon/dist/domain/codex-thread-id.js.map +1 -1
- package/daemon/dist/domain/context-packs/context-pack-types.d.ts +48 -0
- package/daemon/dist/domain/context-packs/context-pack-types.d.ts.map +1 -1
- package/daemon/dist/domain/context-packs/context-pack-types.js +8 -0
- package/daemon/dist/domain/context-packs/context-pack-types.js.map +1 -1
- package/daemon/dist/domain/context-packs/manifest-parser.d.ts.map +1 -1
- package/daemon/dist/domain/context-packs/manifest-parser.js +234 -2
- package/daemon/dist/domain/context-packs/manifest-parser.js.map +1 -1
- package/daemon/dist/domain/context-packs/probe-eval-bridge.d.ts +34 -0
- package/daemon/dist/domain/context-packs/probe-eval-bridge.d.ts.map +1 -0
- package/daemon/dist/domain/context-packs/probe-eval-bridge.js +38 -0
- package/daemon/dist/domain/context-packs/probe-eval-bridge.js.map +1 -0
- package/daemon/dist/domain/context-packs/profile-composer.d.ts +49 -0
- package/daemon/dist/domain/context-packs/profile-composer.d.ts.map +1 -0
- package/daemon/dist/domain/context-packs/profile-composer.js +125 -0
- package/daemon/dist/domain/context-packs/profile-composer.js.map +1 -0
- package/daemon/dist/domain/context-packs/profile-source-resolver.d.ts +53 -0
- package/daemon/dist/domain/context-packs/profile-source-resolver.d.ts.map +1 -0
- package/daemon/dist/domain/context-packs/profile-source-resolver.js +129 -0
- package/daemon/dist/domain/context-packs/profile-source-resolver.js.map +1 -0
- package/daemon/dist/domain/context-packs/seat-recap-store.d.ts +48 -0
- package/daemon/dist/domain/context-packs/seat-recap-store.d.ts.map +1 -0
- package/daemon/dist/domain/context-packs/seat-recap-store.js +123 -0
- package/daemon/dist/domain/context-packs/seat-recap-store.js.map +1 -0
- package/daemon/dist/domain/markdown-address.d.ts +56 -0
- package/daemon/dist/domain/markdown-address.d.ts.map +1 -0
- package/daemon/dist/domain/markdown-address.js +188 -0
- package/daemon/dist/domain/markdown-address.js.map +1 -0
- package/daemon/dist/domain/model-divergence/current-generation-record.d.ts +8 -2
- package/daemon/dist/domain/model-divergence/current-generation-record.d.ts.map +1 -1
- package/daemon/dist/domain/model-divergence/current-generation-record.js +1 -1
- package/daemon/dist/domain/model-divergence/current-generation-record.js.map +1 -1
- package/daemon/dist/domain/model-divergence/model-divergence-monitor.d.ts +33 -21
- package/daemon/dist/domain/model-divergence/model-divergence-monitor.d.ts.map +1 -1
- package/daemon/dist/domain/model-divergence/model-divergence-monitor.js +64 -55
- package/daemon/dist/domain/model-divergence/model-divergence-monitor.js.map +1 -1
- package/daemon/dist/domain/periodic-snapshot-scheduler.d.ts +4 -0
- package/daemon/dist/domain/periodic-snapshot-scheduler.d.ts.map +1 -1
- package/daemon/dist/domain/periodic-snapshot-scheduler.js +5 -1
- package/daemon/dist/domain/periodic-snapshot-scheduler.js.map +1 -1
- package/daemon/dist/domain/permission-drift-observer.d.ts.map +1 -1
- package/daemon/dist/domain/permission-drift-observer.js +6 -1
- package/daemon/dist/domain/permission-drift-observer.js.map +1 -1
- package/daemon/dist/domain/plugin-discovery-service.d.ts +16 -0
- package/daemon/dist/domain/plugin-discovery-service.d.ts.map +1 -1
- package/daemon/dist/domain/plugin-discovery-service.js +175 -1
- package/daemon/dist/domain/plugin-discovery-service.js.map +1 -1
- package/daemon/dist/domain/plugin-vendor-service.d.ts +9 -5
- package/daemon/dist/domain/plugin-vendor-service.d.ts.map +1 -1
- package/daemon/dist/domain/plugin-vendor-service.js +101 -12
- package/daemon/dist/domain/plugin-vendor-service.js.map +1 -1
- package/daemon/dist/domain/process-census.d.ts +25 -0
- package/daemon/dist/domain/process-census.d.ts.map +1 -0
- package/daemon/dist/domain/process-census.js +47 -0
- package/daemon/dist/domain/process-census.js.map +1 -0
- package/daemon/dist/domain/queue-repository.d.ts +3 -1
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +50 -2
- package/daemon/dist/domain/queue-repository.js.map +1 -1
- package/daemon/dist/domain/reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/reconciler.js +6 -1
- package/daemon/dist/domain/reconciler.js.map +1 -1
- package/daemon/dist/domain/resume-metadata-refresher.d.ts +31 -2
- package/daemon/dist/domain/resume-metadata-refresher.d.ts.map +1 -1
- package/daemon/dist/domain/resume-metadata-refresher.js +64 -29
- package/daemon/dist/domain/resume-metadata-refresher.js.map +1 -1
- package/daemon/dist/domain/review/compose.d.ts +5 -26
- package/daemon/dist/domain/review/compose.d.ts.map +1 -1
- package/daemon/dist/domain/review/compose.js +31 -57
- package/daemon/dist/domain/review/compose.js.map +1 -1
- package/daemon/dist/domain/rig-repository.d.ts +4 -0
- package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
- package/daemon/dist/domain/rig-repository.js +9 -0
- package/daemon/dist/domain/rig-repository.js.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.d.ts +13 -0
- package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js +71 -0
- package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
- package/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-schema.js +19 -3
- package/daemon/dist/domain/rigspec-schema.js.map +1 -1
- package/daemon/dist/domain/running-name-guard.d.ts +52 -0
- package/daemon/dist/domain/running-name-guard.d.ts.map +1 -0
- package/daemon/dist/domain/running-name-guard.js +34 -0
- package/daemon/dist/domain/running-name-guard.js.map +1 -0
- package/daemon/dist/domain/scope/logical-checkbox.d.ts +26 -0
- package/daemon/dist/domain/scope/logical-checkbox.d.ts.map +1 -0
- package/daemon/dist/domain/scope/logical-checkbox.js +65 -0
- package/daemon/dist/domain/scope/logical-checkbox.js.map +1 -0
- package/daemon/dist/domain/scope/plan-lock-artifacts.d.ts +1 -1
- package/daemon/dist/domain/scope/plan-lock-artifacts.d.ts.map +1 -1
- package/daemon/dist/domain/scope/plan-lock-artifacts.js +2 -2
- package/daemon/dist/domain/scope/plan-lock-artifacts.js.map +1 -1
- package/daemon/dist/domain/scope/scaffold-placeholder.d.ts +22 -0
- package/daemon/dist/domain/scope/scaffold-placeholder.d.ts.map +1 -1
- package/daemon/dist/domain/scope/scaffold-placeholder.js +24 -0
- package/daemon/dist/domain/scope/scaffold-placeholder.js.map +1 -1
- package/daemon/dist/domain/seat-activity-service.d.ts +1 -0
- package/daemon/dist/domain/seat-activity-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-activity-service.js +39 -23
- package/daemon/dist/domain/seat-activity-service.js.map +1 -1
- package/daemon/dist/domain/seat-handover-service.d.ts +22 -0
- package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-handover-service.js +32 -2
- package/daemon/dist/domain/seat-handover-service.js.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.d.ts +97 -0
- package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -0
- package/daemon/dist/domain/seat-lifecycle-service.js +312 -0
- package/daemon/dist/domain/seat-lifecycle-service.js.map +1 -0
- package/daemon/dist/domain/session-transport.d.ts +16 -5
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +155 -16
- package/daemon/dist/domain/session-transport.js.map +1 -1
- package/daemon/dist/domain/shell-classifier.d.ts +23 -0
- package/daemon/dist/domain/shell-classifier.d.ts.map +1 -0
- package/daemon/dist/domain/shell-classifier.js +36 -0
- package/daemon/dist/domain/shell-classifier.js.map +1 -0
- package/daemon/dist/domain/slices/slice-detail-projector.d.ts.map +1 -1
- package/daemon/dist/domain/slices/slice-detail-projector.js +10 -1
- package/daemon/dist/domain/slices/slice-detail-projector.js.map +1 -1
- package/daemon/dist/domain/spec-validation-advisory.d.ts +17 -0
- package/daemon/dist/domain/spec-validation-advisory.d.ts.map +1 -0
- package/daemon/dist/domain/spec-validation-advisory.js +38 -0
- package/daemon/dist/domain/spec-validation-advisory.js.map +1 -0
- package/daemon/dist/domain/successor-session-launcher.d.ts +7 -0
- package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.js +38 -1
- package/daemon/dist/domain/successor-session-launcher.js.map +1 -1
- package/daemon/dist/domain/topology-defaults-installer.d.ts +47 -0
- package/daemon/dist/domain/topology-defaults-installer.d.ts.map +1 -0
- package/daemon/dist/domain/topology-defaults-installer.js +92 -0
- package/daemon/dist/domain/topology-defaults-installer.js.map +1 -0
- package/daemon/dist/domain/transcript-rotation.d.ts +4 -0
- package/daemon/dist/domain/transcript-rotation.d.ts.map +1 -1
- package/daemon/dist/domain/transcript-rotation.js +61 -3
- package/daemon/dist/domain/transcript-rotation.js.map +1 -1
- package/daemon/dist/domain/transcript-store.d.ts.map +1 -1
- package/daemon/dist/domain/transcript-store.js +9 -2
- package/daemon/dist/domain/transcript-store.js.map +1 -1
- package/daemon/dist/domain/types.d.ts +39 -0
- package/daemon/dist/domain/types.d.ts.map +1 -1
- package/daemon/dist/domain/types.js.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.d.ts +10 -1
- package/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.js +39 -0
- package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
- package/daemon/dist/routes/context-packs.d.ts.map +1 -1
- package/daemon/dist/routes/context-packs.js +205 -0
- package/daemon/dist/routes/context-packs.js.map +1 -1
- package/daemon/dist/routes/queue.d.ts.map +1 -1
- package/daemon/dist/routes/queue.js +29 -24
- package/daemon/dist/routes/queue.js.map +1 -1
- package/daemon/dist/routes/rigspec.js +20 -6
- package/daemon/dist/routes/rigspec.js.map +1 -1
- package/daemon/dist/routes/seat.d.ts.map +1 -1
- package/daemon/dist/routes/seat.js +69 -0
- package/daemon/dist/routes/seat.js.map +1 -1
- package/daemon/dist/routes/sessions.js +55 -0
- package/daemon/dist/routes/sessions.js.map +1 -1
- package/daemon/dist/routes/transport.d.ts.map +1 -1
- package/daemon/dist/routes/transport.js +52 -39
- package/daemon/dist/routes/transport.js.map +1 -1
- package/daemon/dist/routes/up.js +21 -2
- package/daemon/dist/routes/up.js.map +1 -1
- package/daemon/dist/seat-recap-store-surface.d.ts +2 -0
- package/daemon/dist/seat-recap-store-surface.d.ts.map +1 -0
- package/daemon/dist/seat-recap-store-surface.js +6 -0
- package/daemon/dist/seat-recap-store-surface.js.map +1 -0
- package/daemon/dist/startup.d.ts.map +1 -1
- package/daemon/dist/startup.js +37 -6
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/docs/reference/chain-file-convention.md +115 -0
- package/daemon/docs/reference/legacy-topology-migration.md +53 -0
- package/daemon/docs/reference/refocus-channel.md +80 -0
- package/daemon/docs/reference/sdlc-conventions.md +24 -0
- package/daemon/specs/agents/shared/skills/core/attention-queue/SKILL.md +1 -1
- package/daemon/specs/agents/shared/skills/core/human-in-the-loop/SKILL.md +1 -1
- package/daemon/specs/agents/shared/skills/core/session-source-fork/SKILL.md +1 -1
- package/daemon/specs/agents/shared/skills/core/watchdog/SKILL.md +4 -4
- package/daemon/specs/agents/shared/skills/pods/development-team/SKILL.md +8 -0
- package/daemon/specs/agents/shared/skills/pods/orchestration-team/SKILL.md +72 -31
- package/daemon/specs/agents/shared/skills/pods/oversight-team/SKILL.md +106 -0
- package/daemon/specs/agents/shared/skills/process/context-engineering/SKILL.md +479 -0
- package/daemon/specs/agents/shared/skills/process/test-driven-development/SKILL.md +9 -0
- package/daemon/specs/rigs/launch/demo/project-example/README.md +25 -0
- package/daemon/specs/rigs/launch/demo/project-example/missions/improve-onboarding/SPEC.md +19 -0
- package/daemon/specs/rigs/launch/demo/project-example/missions/improve-onboarding/slices/01-shorten-first-run/PROGRESS.md +6 -0
- package/daemon/specs/rigs/launch/demo/project-example/missions/improve-onboarding/slices/01-shorten-first-run/PROOF.md +7 -0
- package/daemon/specs/rigs/launch/demo/project-example/missions/improve-onboarding/slices/01-shorten-first-run/SPEC.md +31 -0
- package/daemon/specs/rigs/preview/product-team/topology/instance/CRAFT.md +24 -0
- package/daemon/specs/rigs/preview/product-team/topology/rig/CRAFT.md +21 -0
- package/daemon/specs/rigs/preview/product-team/topology/rig/ORCHESTRATION-CRAFT.md +50 -0
- package/daemon/specs/rigs/preview/product-team/topology/seats/dev1-qa/CRAFT.md +13 -0
- package/daemon/specs/rigs/preview/product-team/topology/seats/orch1-lead/CRAFT.md +17 -0
- package/daemon/specs/rigs/preview/product-team/topology/seats/rev1-r1/CRAFT.md +17 -0
- package/daemon/specs/rigs/preview/product-team/topology/seats/rev1-r2/CRAFT.md +15 -0
- package/dist/build-info.js +3 -3
- package/dist/cli-error.js +1 -1
- package/dist/cli-error.js.map +1 -1
- package/dist/commands/broadcast.js +6 -0
- package/dist/commands/broadcast.js.map +1 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +8 -0
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +363 -48
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/daemon.d.ts.map +1 -1
- package/dist/commands/daemon.js +23 -2
- package/dist/commands/daemon.js.map +1 -1
- package/dist/commands/import.d.ts.map +1 -1
- package/dist/commands/import.js +10 -0
- package/dist/commands/import.js.map +1 -1
- package/dist/commands/proof.d.ts.map +1 -1
- package/dist/commands/proof.js +70 -12
- package/dist/commands/proof.js.map +1 -1
- package/dist/commands/queue.d.ts.map +1 -1
- package/dist/commands/queue.js +36 -13
- package/dist/commands/queue.js.map +1 -1
- package/dist/commands/rig.d.ts.map +1 -1
- package/dist/commands/rig.js +5 -0
- package/dist/commands/rig.js.map +1 -1
- package/dist/commands/seat.d.ts.map +1 -1
- package/dist/commands/seat.js +88 -0
- package/dist/commands/seat.js.map +1 -1
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +224 -20
- package/dist/commands/send.js.map +1 -1
- package/dist/commands/transcript.d.ts.map +1 -1
- package/dist/commands/transcript.js +25 -1
- package/dist/commands/transcript.js.map +1 -1
- package/dist/commands/up.d.ts.map +1 -1
- package/dist/commands/up.js +8 -0
- package/dist/commands/up.js.map +1 -1
- package/dist/commands/walk.d.ts +1 -1
- package/dist/commands/walk.d.ts.map +1 -1
- package/dist/commands/walk.js +293 -30
- package/dist/commands/walk.js.map +1 -1
- package/dist/config-store.d.ts +15 -1
- package/dist/config-store.d.ts.map +1 -1
- package/dist/config-store.js +35 -1
- package/dist/config-store.js.map +1 -1
- package/dist/lib/scope/logical-checkbox.d.ts +26 -0
- package/dist/lib/scope/logical-checkbox.d.ts.map +1 -0
- package/dist/lib/scope/logical-checkbox.js +65 -0
- package/dist/lib/scope/logical-checkbox.js.map +1 -0
- package/dist/lib/scope/scaffold-placeholder.d.ts +22 -0
- package/dist/lib/scope/scaffold-placeholder.d.ts.map +1 -1
- package/dist/lib/scope/scaffold-placeholder.js +24 -0
- package/dist/lib/scope/scaffold-placeholder.js.map +1 -1
- package/dist/lib/topology-trace.d.ts +36 -0
- package/dist/lib/topology-trace.d.ts.map +1 -0
- package/dist/lib/topology-trace.js +91 -0
- package/dist/lib/topology-trace.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/adapters/claude-code-adapter.js +7 -4
- package/node_modules/@openrig/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/adapters/claude-resume.js +2 -2
- package/node_modules/@openrig/daemon/dist/adapters/claude-resume.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/adapters/tmux.d.ts +41 -2
- package/node_modules/@openrig/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/adapters/tmux.js +58 -18
- package/node_modules/@openrig/daemon/dist/adapters/tmux.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/adapters/yolo-mode.d.ts +18 -0
- package/node_modules/@openrig/daemon/dist/adapters/yolo-mode.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/adapters/yolo-mode.js +21 -0
- package/node_modules/@openrig/daemon/dist/adapters/yolo-mode.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/build-info.js +3 -3
- package/node_modules/@openrig/daemon/dist/daemon-db-path.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/daemon-db-path.js +50 -2
- package/node_modules/@openrig/daemon/dist/daemon-db-path.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/codex-thread-id.d.ts +95 -0
- package/node_modules/@openrig/daemon/dist/domain/codex-thread-id.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/codex-thread-id.js +171 -2
- package/node_modules/@openrig/daemon/dist/domain/codex-thread-id.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/context-packs/context-pack-types.d.ts +48 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/context-pack-types.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/context-packs/context-pack-types.js +8 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/context-pack-types.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/context-packs/manifest-parser.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/context-packs/manifest-parser.js +234 -2
- package/node_modules/@openrig/daemon/dist/domain/context-packs/manifest-parser.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/context-packs/probe-eval-bridge.d.ts +34 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/probe-eval-bridge.d.ts.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/probe-eval-bridge.js +38 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/probe-eval-bridge.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-composer.d.ts +49 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-composer.d.ts.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-composer.js +125 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-composer.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-source-resolver.d.ts +53 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-source-resolver.d.ts.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-source-resolver.js +129 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-source-resolver.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/seat-recap-store.d.ts +48 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/seat-recap-store.d.ts.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/seat-recap-store.js +123 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/seat-recap-store.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/markdown-address.d.ts +56 -0
- package/node_modules/@openrig/daemon/dist/domain/markdown-address.d.ts.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/markdown-address.js +188 -0
- package/node_modules/@openrig/daemon/dist/domain/markdown-address.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/model-divergence/current-generation-record.d.ts +8 -2
- package/node_modules/@openrig/daemon/dist/domain/model-divergence/current-generation-record.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/model-divergence/current-generation-record.js +1 -1
- package/node_modules/@openrig/daemon/dist/domain/model-divergence/current-generation-record.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/model-divergence/model-divergence-monitor.d.ts +33 -21
- package/node_modules/@openrig/daemon/dist/domain/model-divergence/model-divergence-monitor.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/model-divergence/model-divergence-monitor.js +64 -55
- package/node_modules/@openrig/daemon/dist/domain/model-divergence/model-divergence-monitor.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/periodic-snapshot-scheduler.d.ts +4 -0
- package/node_modules/@openrig/daemon/dist/domain/periodic-snapshot-scheduler.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/periodic-snapshot-scheduler.js +5 -1
- package/node_modules/@openrig/daemon/dist/domain/periodic-snapshot-scheduler.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/permission-drift-observer.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/permission-drift-observer.js +6 -1
- package/node_modules/@openrig/daemon/dist/domain/permission-drift-observer.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/plugin-discovery-service.d.ts +16 -0
- package/node_modules/@openrig/daemon/dist/domain/plugin-discovery-service.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/plugin-discovery-service.js +175 -1
- package/node_modules/@openrig/daemon/dist/domain/plugin-discovery-service.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/plugin-vendor-service.d.ts +9 -5
- package/node_modules/@openrig/daemon/dist/domain/plugin-vendor-service.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/plugin-vendor-service.js +101 -12
- package/node_modules/@openrig/daemon/dist/domain/plugin-vendor-service.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/process-census.d.ts +25 -0
- package/node_modules/@openrig/daemon/dist/domain/process-census.d.ts.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/process-census.js +47 -0
- package/node_modules/@openrig/daemon/dist/domain/process-census.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/queue-repository.d.ts +3 -1
- package/node_modules/@openrig/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/queue-repository.js +50 -2
- package/node_modules/@openrig/daemon/dist/domain/queue-repository.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/reconciler.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/reconciler.js +6 -1
- package/node_modules/@openrig/daemon/dist/domain/reconciler.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/resume-metadata-refresher.d.ts +31 -2
- package/node_modules/@openrig/daemon/dist/domain/resume-metadata-refresher.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/resume-metadata-refresher.js +64 -29
- package/node_modules/@openrig/daemon/dist/domain/resume-metadata-refresher.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/review/compose.d.ts +5 -26
- package/node_modules/@openrig/daemon/dist/domain/review/compose.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/review/compose.js +31 -57
- package/node_modules/@openrig/daemon/dist/domain/review/compose.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/rig-repository.d.ts +4 -0
- package/node_modules/@openrig/daemon/dist/domain/rig-repository.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/rig-repository.js +9 -0
- package/node_modules/@openrig/daemon/dist/domain/rig-repository.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.d.ts +13 -0
- package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.js +71 -0
- package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/rigspec-schema.js +19 -3
- package/node_modules/@openrig/daemon/dist/domain/rigspec-schema.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/running-name-guard.d.ts +52 -0
- package/node_modules/@openrig/daemon/dist/domain/running-name-guard.d.ts.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/running-name-guard.js +34 -0
- package/node_modules/@openrig/daemon/dist/domain/running-name-guard.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/scope/logical-checkbox.d.ts +26 -0
- package/node_modules/@openrig/daemon/dist/domain/scope/logical-checkbox.d.ts.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/scope/logical-checkbox.js +65 -0
- package/node_modules/@openrig/daemon/dist/domain/scope/logical-checkbox.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/scope/plan-lock-artifacts.d.ts +1 -1
- package/node_modules/@openrig/daemon/dist/domain/scope/plan-lock-artifacts.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/scope/plan-lock-artifacts.js +2 -2
- package/node_modules/@openrig/daemon/dist/domain/scope/plan-lock-artifacts.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/scope/scaffold-placeholder.d.ts +22 -0
- package/node_modules/@openrig/daemon/dist/domain/scope/scaffold-placeholder.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/scope/scaffold-placeholder.js +24 -0
- package/node_modules/@openrig/daemon/dist/domain/scope/scaffold-placeholder.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/seat-activity-service.d.ts +1 -0
- package/node_modules/@openrig/daemon/dist/domain/seat-activity-service.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/seat-activity-service.js +39 -23
- package/node_modules/@openrig/daemon/dist/domain/seat-activity-service.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/seat-handover-service.d.ts +22 -0
- package/node_modules/@openrig/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/seat-handover-service.js +32 -2
- package/node_modules/@openrig/daemon/dist/domain/seat-handover-service.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/seat-lifecycle-service.d.ts +97 -0
- package/node_modules/@openrig/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/seat-lifecycle-service.js +312 -0
- package/node_modules/@openrig/daemon/dist/domain/seat-lifecycle-service.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/session-transport.d.ts +16 -5
- package/node_modules/@openrig/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/session-transport.js +155 -16
- package/node_modules/@openrig/daemon/dist/domain/session-transport.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/shell-classifier.d.ts +23 -0
- package/node_modules/@openrig/daemon/dist/domain/shell-classifier.d.ts.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/shell-classifier.js +36 -0
- package/node_modules/@openrig/daemon/dist/domain/shell-classifier.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/slices/slice-detail-projector.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/slices/slice-detail-projector.js +10 -1
- package/node_modules/@openrig/daemon/dist/domain/slices/slice-detail-projector.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/spec-validation-advisory.d.ts +17 -0
- package/node_modules/@openrig/daemon/dist/domain/spec-validation-advisory.d.ts.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/spec-validation-advisory.js +38 -0
- package/node_modules/@openrig/daemon/dist/domain/spec-validation-advisory.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/successor-session-launcher.d.ts +7 -0
- package/node_modules/@openrig/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/successor-session-launcher.js +38 -1
- package/node_modules/@openrig/daemon/dist/domain/successor-session-launcher.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/topology-defaults-installer.d.ts +47 -0
- package/node_modules/@openrig/daemon/dist/domain/topology-defaults-installer.d.ts.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/topology-defaults-installer.js +92 -0
- package/node_modules/@openrig/daemon/dist/domain/topology-defaults-installer.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/transcript-rotation.d.ts +4 -0
- package/node_modules/@openrig/daemon/dist/domain/transcript-rotation.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/transcript-rotation.js +61 -3
- package/node_modules/@openrig/daemon/dist/domain/transcript-rotation.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/transcript-store.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/transcript-store.js +9 -2
- package/node_modules/@openrig/daemon/dist/domain/transcript-store.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/types.d.ts +39 -0
- package/node_modules/@openrig/daemon/dist/domain/types.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/types.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/user-settings/settings-store.d.ts +10 -1
- package/node_modules/@openrig/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/user-settings/settings-store.js +39 -0
- package/node_modules/@openrig/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/routes/context-packs.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/routes/context-packs.js +205 -0
- package/node_modules/@openrig/daemon/dist/routes/context-packs.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/routes/queue.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/routes/queue.js +29 -24
- package/node_modules/@openrig/daemon/dist/routes/queue.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/routes/rigspec.js +20 -6
- package/node_modules/@openrig/daemon/dist/routes/rigspec.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/routes/seat.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/routes/seat.js +69 -0
- package/node_modules/@openrig/daemon/dist/routes/seat.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/routes/sessions.js +55 -0
- package/node_modules/@openrig/daemon/dist/routes/sessions.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/routes/transport.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/routes/transport.js +52 -39
- package/node_modules/@openrig/daemon/dist/routes/transport.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/routes/up.js +21 -2
- package/node_modules/@openrig/daemon/dist/routes/up.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/seat-recap-store-surface.d.ts +2 -0
- package/node_modules/@openrig/daemon/dist/seat-recap-store-surface.d.ts.map +1 -0
- package/node_modules/@openrig/daemon/dist/seat-recap-store-surface.js +6 -0
- package/node_modules/@openrig/daemon/dist/seat-recap-store-surface.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/startup.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/startup.js +37 -6
- package/node_modules/@openrig/daemon/dist/startup.js.map +1 -1
- package/node_modules/@openrig/daemon/package.json +6 -1
- package/package.json +1 -1
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
// OPR.0.5.3.5 mini-req 7 (Q2 + Q2-Amendment 1) — the seat recap store.
|
|
2
|
+
//
|
|
3
|
+
// The AUTHORED recap: decisions-with-rationale written by the outgoing occupant
|
|
4
|
+
// at the boundary, extending the shipped from-record boot recap's name (the Q2
|
|
5
|
+
// unify-what-exists ruling — predecessor-recap-resolver.ts remains the
|
|
6
|
+
// transcript-derived sibling). SEAT-HOMED beside LEARNED (Q2-Amendment 1(a):
|
|
7
|
+
// the recap is POSITION knowledge, unshareable by construction — a
|
|
8
|
+
// library-homed recap would be position knowledge on the portable shelf).
|
|
9
|
+
// RETENTION (1(b)): superseded-chain versioning — the newest recap is
|
|
10
|
+
// RECAP.md, predecessors stay byte-preserved under recap-superseded/ in the
|
|
11
|
+
// seat directory, cleaned by seat-directory lifecycle, NEVER by library
|
|
12
|
+
// curation; no librarian job is created.
|
|
13
|
+
//
|
|
14
|
+
// Two validation altitudes, deliberately different:
|
|
15
|
+
// - ADDRESSABILITY is the one HARD gate on write: the recap is composed by
|
|
16
|
+
// address (seat:RECAP.md#...), so an unaddressable recap (duplicate header
|
|
17
|
+
// paths, unterminated fence) would fail every handover profile downstream,
|
|
18
|
+
// silently late. Structural, not prose-shaped.
|
|
19
|
+
// - The AUTHORING CONTRACT validates ADVISORY on its CHECKABLE subset only:
|
|
20
|
+
// findings flag for review, never gate the boundary (the D2 pattern). The
|
|
21
|
+
// contract's semantic halves (temporal order, derived-values-as-commands)
|
|
22
|
+
// are not mechanically checkable and are NOT pretended at.
|
|
23
|
+
import { mkdirSync, readdirSync, renameSync, writeFileSync, existsSync } from "node:fs";
|
|
24
|
+
import { join } from "node:path";
|
|
25
|
+
import { validateMarkdownAddressability, parseMarkdownSections } from "../markdown-address.js";
|
|
26
|
+
import { parseSessionName } from "../session-name.js";
|
|
27
|
+
export const RECAP_FILENAME = "RECAP.md";
|
|
28
|
+
const CHAIN_DIRNAME = "recap-superseded";
|
|
29
|
+
export class RecapWriteError extends Error {
|
|
30
|
+
constructor(message) {
|
|
31
|
+
super(message);
|
|
32
|
+
this.name = "RecapWriteError";
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/** Write the seat's current recap, superseding any existing one into the
|
|
36
|
+
* chain. The gate is ADDRESSABILITY only — never prose shape. */
|
|
37
|
+
export function writeSeatRecap(opts) {
|
|
38
|
+
const findings = validateMarkdownAddressability(opts.content);
|
|
39
|
+
if (findings.length > 0) {
|
|
40
|
+
throw new RecapWriteError(`recap is not addressable and could never compose (seat:${RECAP_FILENAME}#... would fail every ` +
|
|
41
|
+
`handover profile): ${findings.map((f) => f.kind === "unterminated-fence" ? `unterminated fence at line ${f.line}` : `${f.kind} '${"headerPath" in f ? f.headerPath : ""}'`).join("; ")}. ` +
|
|
42
|
+
`Fix the structure (duplicate header paths / unterminated fences); prose shape is never gated.`);
|
|
43
|
+
}
|
|
44
|
+
const now = opts.now ?? Date.now;
|
|
45
|
+
const current = join(opts.seatDir, RECAP_FILENAME);
|
|
46
|
+
if (existsSync(current)) {
|
|
47
|
+
const chainDir = join(opts.seatDir, CHAIN_DIRNAME);
|
|
48
|
+
mkdirSync(chainDir, { recursive: true });
|
|
49
|
+
// COLLISION-SAFE naming (r1 F1): renameSync onto an existing path REPLACES
|
|
50
|
+
// it, so two supersessions in one millisecond silently destroyed a
|
|
51
|
+
// predecessor — the retention contract inverted. A counter suffix
|
|
52
|
+
// disambiguates: nothing is lost AND the boundary write still succeeds
|
|
53
|
+
// (better than throwing on both counts). `now` is injectable, so
|
|
54
|
+
// programmatic callers collide deterministically, not rarely.
|
|
55
|
+
const stamp = String(now()).padStart(15, "0");
|
|
56
|
+
let target = join(chainDir, `RECAP-${stamp}.md`);
|
|
57
|
+
for (let counter = 2; existsSync(target); counter++) {
|
|
58
|
+
target = join(chainDir, `RECAP-${stamp}-${counter}.md`);
|
|
59
|
+
}
|
|
60
|
+
renameSync(current, target);
|
|
61
|
+
}
|
|
62
|
+
writeFileSync(current, opts.content);
|
|
63
|
+
}
|
|
64
|
+
/** The superseded chain, oldest first. Empty when no recap was ever superseded. */
|
|
65
|
+
export function listRecapChain(seatDir) {
|
|
66
|
+
const chainDir = join(seatDir, CHAIN_DIRNAME);
|
|
67
|
+
let names;
|
|
68
|
+
try {
|
|
69
|
+
names = readdirSync(chainDir);
|
|
70
|
+
}
|
|
71
|
+
catch {
|
|
72
|
+
return [];
|
|
73
|
+
}
|
|
74
|
+
return names
|
|
75
|
+
.map((name) => {
|
|
76
|
+
const m = name.match(/^RECAP-(\d+)(?:-(\d+))?\.md$/);
|
|
77
|
+
return m
|
|
78
|
+
? { path: join(chainDir, name), supersededAtMs: Number(m[1]), sequence: m[2] ? Number(m[2]) : 1 }
|
|
79
|
+
: null;
|
|
80
|
+
})
|
|
81
|
+
.filter((e) => e !== null)
|
|
82
|
+
.sort((a, b) => a.supersededAtMs - b.supersededAtMs || a.sequence - b.sequence);
|
|
83
|
+
}
|
|
84
|
+
/** The authoring contract's CHECKABLE subset (Q2): decisions-with-rationale has
|
|
85
|
+
* a structural proxy (a decisions-titled section exists); the UNVERIFIED
|
|
86
|
+
* marker has a canonical grammar (`UNVERIFIED:` uppercase) that must stay
|
|
87
|
+
* findable — a variant marker hides exactly the fact it exists to flag.
|
|
88
|
+
* Advisory: findings, never throws. */
|
|
89
|
+
export function validateRecapContract(content) {
|
|
90
|
+
const findings = [];
|
|
91
|
+
const sections = parseMarkdownSections(content);
|
|
92
|
+
const hasDecisions = sections.some((s) => s.headerPath[s.headerPath.length - 1].includes("decision"));
|
|
93
|
+
if (!hasDecisions)
|
|
94
|
+
findings.push({ kind: "no-decisions-section" });
|
|
95
|
+
const lines = content.split("\n");
|
|
96
|
+
for (let i = 0; i < lines.length; i++) {
|
|
97
|
+
const line = lines[i];
|
|
98
|
+
if (/unverified/i.test(line) && !line.includes("UNVERIFIED:")) {
|
|
99
|
+
findings.push({ kind: "nonstandard-unverified-marker", line: i });
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return findings;
|
|
103
|
+
}
|
|
104
|
+
/** BUILD FOLLOW-UP (r1 verdict bb00e850; row 17015088) — the authored-recap
|
|
105
|
+
* pointer resolution, ONE-HOMED here beside the store it reads, parsing the
|
|
106
|
+
* seat ref through the CANONICAL parseSessionName (first-@ split, the
|
|
107
|
+
* documented greedy-rig ruling) — never a second parser. Safety floor
|
|
108
|
+
* preserved: an unresolved or non-canonical ref fails with a LABELED reason
|
|
109
|
+
* carrying what was tried; fuzzy-matching another seat's directory would hand
|
|
110
|
+
* a successor a DIFFERENT occupant's decisions, which is strictly worse than
|
|
111
|
+
* honest absence. */
|
|
112
|
+
export function resolveAuthoredRecapPointer(seatRef, topologyRoot) {
|
|
113
|
+
const parsed = parseSessionName(seatRef);
|
|
114
|
+
if (parsed.kind !== "canonical") {
|
|
115
|
+
return { absentReason: `seat ref '${seatRef}' did not parse as canonical <seat>@<rig> (parse verdict: ${parsed.kind}) — authored recap not resolved, never guessed` };
|
|
116
|
+
}
|
|
117
|
+
const seatDir = join(topologyRoot, "rigs", parsed.rig, "seats", parsed.member);
|
|
118
|
+
if (!existsSync(join(seatDir, RECAP_FILENAME))) {
|
|
119
|
+
return { absentReason: `no ${RECAP_FILENAME} on the seat tree (${seatDir}) — the predecessor never wrote one` };
|
|
120
|
+
}
|
|
121
|
+
return { address: `seat:${RECAP_FILENAME}`, chainLength: listRecapChain(seatDir).length };
|
|
122
|
+
}
|
|
123
|
+
//# sourceMappingURL=seat-recap-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seat-recap-store.js","sourceRoot":"","sources":["../../../src/domain/context-packs/seat-recap-store.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,EAAE;AACF,gFAAgF;AAChF,+EAA+E;AAC/E,uEAAuE;AACvE,6EAA6E;AAC7E,mEAAmE;AACnE,0EAA0E;AAC1E,sEAAsE;AACtE,4EAA4E;AAC5E,wEAAwE;AACxE,yCAAyC;AACzC,EAAE;AACF,oDAAoD;AACpD,2EAA2E;AAC3E,6EAA6E;AAC7E,6EAA6E;AAC7E,iDAAiD;AACjD,4EAA4E;AAC5E,4EAA4E;AAC5E,4EAA4E;AAC5E,6DAA6D;AAE7D,OAAO,EAAE,SAAS,EAAE,WAAW,EAAgB,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACtG,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,8BAA8B,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/F,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAAC;AACzC,MAAM,aAAa,GAAG,kBAAkB,CAAC;AAEzC,MAAM,OAAO,eAAgB,SAAQ,KAAK;IACxC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;IAChC,CAAC;CACF;AAWD;kEACkE;AAClE,MAAM,UAAU,cAAc,CAAC,IAA8D;IAC3F,MAAM,QAAQ,GAAG,8BAA8B,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC9D,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACxB,MAAM,IAAI,eAAe,CACvB,0DAA0D,cAAc,wBAAwB;YAC9F,sBAAsB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CAAC,CAAC,EAAE,CAAC;QAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,sBAAsB,OAAO,qCAAqC,EAAE,CAAC;IAClH,CAAC;IACD,OAAO,EAAE,OAAO,EAAE,QAAQ,cAAc,EAAE,EAAE,WAAW,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC;AAC5F,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export declare class AddressResolutionError extends Error {
|
|
2
|
+
constructor(message: string);
|
|
3
|
+
}
|
|
4
|
+
/** ONE slug rule, simple enough to hold in memory: lowercase; markdown emphasis/code
|
|
5
|
+
* markers stripped with the text kept; every run of non-alphanumerics becomes one
|
|
6
|
+
* hyphen; leading/trailing hyphens trimmed. */
|
|
7
|
+
export declare function slugifyHeader(title: string): string;
|
|
8
|
+
export interface ParsedAddress {
|
|
9
|
+
/** The pre-`#` ref — a library ref or a tree path; the caller's resolver owns it. */
|
|
10
|
+
ref: string;
|
|
11
|
+
/** 0 (whole file), 1 (H2) or 2 (H2/H3) slugs. */
|
|
12
|
+
headerPath: string[];
|
|
13
|
+
}
|
|
14
|
+
/** Parse the one grammar form `ref` / `ref#h2` / `ref#h2/h3`. Fail-loud on anything else. */
|
|
15
|
+
export declare function parseAddress(address: string): ParsedAddress;
|
|
16
|
+
export interface MarkdownSection {
|
|
17
|
+
/** Header level (2 or 3). */
|
|
18
|
+
level: number;
|
|
19
|
+
/** The header's raw title text. */
|
|
20
|
+
title: string;
|
|
21
|
+
/** This section's address path: [h2Slug] or [h2Slug, h3Slug]. */
|
|
22
|
+
headerPath: string[];
|
|
23
|
+
/** 0-based line of the header itself. */
|
|
24
|
+
headerLine: number;
|
|
25
|
+
/** FULL span (Q1): header line through the line before the next same-or-higher header. */
|
|
26
|
+
text: string;
|
|
27
|
+
/** OWN text: header line through the line before the next header of ANY level. */
|
|
28
|
+
ownText: string;
|
|
29
|
+
}
|
|
30
|
+
/** Parse the addressable H2/H3 section tree of a markdown text.
|
|
31
|
+
* A matched section is NEVER empty by construction: the span includes the header
|
|
32
|
+
* line itself, so even a body-less `## alpha` (next line another header, or EOF)
|
|
33
|
+
* resolves to at least its own header — a matched-but-empty section can never
|
|
34
|
+
* quietly thin a compose (the structural half of the fail-loud contract; r1 A2). */
|
|
35
|
+
export declare function parseMarkdownSections(text: string): MarkdownSection[];
|
|
36
|
+
/** Resolve a header path against markdown text. FAIL-LOUD: no match is an error that
|
|
37
|
+
* names the miss and the real candidates at that altitude — never a silent empty. */
|
|
38
|
+
export declare function resolveAddress(text: string, headerPath: string[]): MarkdownSection;
|
|
39
|
+
export type AddressabilityFinding = {
|
|
40
|
+
kind: "duplicate-header-path";
|
|
41
|
+
headerPath: string;
|
|
42
|
+
lines: number[];
|
|
43
|
+
} | {
|
|
44
|
+
kind: "unaddressable-header";
|
|
45
|
+
headerPath: string;
|
|
46
|
+
line: number;
|
|
47
|
+
title: string;
|
|
48
|
+
} | {
|
|
49
|
+
kind: "unterminated-fence";
|
|
50
|
+
line: number;
|
|
51
|
+
};
|
|
52
|
+
/** The compose-gate validator: every H2/H3 must be uniquely addressable under the one
|
|
53
|
+
* slug rule, and the file must not silently lose sections. Findings, not throws —
|
|
54
|
+
* the caller decides the gate. */
|
|
55
|
+
export declare function validateMarkdownAddressability(text: string): AddressabilityFinding[];
|
|
56
|
+
//# sourceMappingURL=markdown-address.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown-address.d.ts","sourceRoot":"","sources":["../../src/domain/markdown-address.ts"],"names":[],"mappings":"AA0BA,qBAAa,sBAAuB,SAAQ,KAAK;gBACnC,OAAO,EAAE,MAAM;CAI5B;AAED;;gDAEgD;AAChD,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMnD;AAED,MAAM,WAAW,aAAa;IAC5B,qFAAqF;IACrF,GAAG,EAAE,MAAM,CAAC;IACZ,iDAAiD;IACjD,UAAU,EAAE,MA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OUNDER_NOTES.md P1): an address is `name#H2-slug/H3-slug` — exactly ONE form, held in
|
|
5
|
+
// memory. `name` is resolved by the caller (library index or configured tree roots — the
|
|
6
|
+
// Q2-Amendment 1 one-grammar-two-resolvers ruling); everything after `#` resolves HERE,
|
|
7
|
+
// against markdown text. A bare address returns the section's FULL span: everything until
|
|
8
|
+
// the next SAME-OR-HIGHER-level header, children included. The section's OWN text (until
|
|
9
|
+
// the next header of ANY level) is the `ownText` field of the same resolution — a field,
|
|
10
|
+
// never a second address syntax (the superseded May design accepted two separator forms;
|
|
11
|
+
// we deliberately ship one). Headers inside code fences are never addresses and never
|
|
12
|
+
// terminate spans (the May prototype's proven trap). Resolution FAILS LOUD: an address
|
|
13
|
+
// that matches nothing is an AddressResolutionError naming the reason and the real
|
|
14
|
+
// candidates — never a silent empty; in an install pipeline a missing atom must stop the
|
|
15
|
+
// compose, not thin the walk quietly (the prototype's graceful-undefined is the one
|
|
16
|
+
// behavior explicitly not carried).
|
|
17
|
+
//
|
|
18
|
+
// This module is PURE (text in, spans out) and daemon-homed so the CLI (which depends on
|
|
19
|
+
// @openrig/daemon) and the daemon assembler share one resolver — one grammar, one home.
|
|
20
|
+
// Scope fence (Q4): resolution + composition support only; CRUD/surgical-edit/lint stays
|
|
21
|
+
// with the 0.6.0 mdar-full-ship trail.
|
|
22
|
+
/** Addressable depth per the Q1 ruling: H2 and H3. */
|
|
23
|
+
const MIN_LEVEL = 2;
|
|
24
|
+
const MAX_LEVEL = 3;
|
|
25
|
+
export class AddressResolutionError extends Error {
|
|
26
|
+
constructor(message) {
|
|
27
|
+
super(message);
|
|
28
|
+
this.name = "AddressResolutionError";
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
/** ONE slug rule, simple enough to hold in memory: lowercase; markdown emphasis/code
|
|
32
|
+
* markers stripped with the text kept; every run of non-alphanumerics becomes one
|
|
33
|
+
* hyphen; leading/trailing hyphens trimmed. */
|
|
34
|
+
export function slugifyHeader(title) {
|
|
35
|
+
return title
|
|
36
|
+
.toLowerCase()
|
|
37
|
+
.replace(/[`*_~]/g, "")
|
|
38
|
+
.replace(/[^a-z0-9]+/g, "-")
|
|
39
|
+
.replace(/^-+|-+$/g, "");
|
|
40
|
+
}
|
|
41
|
+
/** Parse the one grammar form `ref` / `ref#h2` / `ref#h2/h3`. Fail-loud on anything else. */
|
|
42
|
+
export function parseAddress(address) {
|
|
43
|
+
const hashCount = (address.match(/#/g) ?? []).length;
|
|
44
|
+
if (hashCount > 1) {
|
|
45
|
+
throw new AddressResolutionError(`address '${address}' has ${hashCount} '#' separators — the one form is name#H2-slug/H3-slug (a single '#').`);
|
|
46
|
+
}
|
|
47
|
+
const [ref, headerPart] = hashCount === 1 ? address.split("#") : [address, undefined];
|
|
48
|
+
if (!ref) {
|
|
49
|
+
throw new AddressResolutionError(`address '${address}' has an empty ref before '#' — an address always names its file/ref.`);
|
|
50
|
+
}
|
|
51
|
+
if (headerPart === undefined)
|
|
52
|
+
return { ref, headerPath: [] };
|
|
53
|
+
const headerPath = headerPart.split("/");
|
|
54
|
+
if (headerPath.some((seg) => seg.length === 0)) {
|
|
55
|
+
throw new AddressResolutionError(`address '${address}' has an empty header segment — the form is name#H2-slug or name#H2-slug/H3-slug.`);
|
|
56
|
+
}
|
|
57
|
+
if (headerPath.length > MAX_LEVEL - MIN_LEVEL + 1) {
|
|
58
|
+
throw new AddressResolutionError(`address '${address}' goes ${headerPath.length} levels deep — addresses target H2 and H3 only (Q1 ruling), so the deepest form is name#H2-slug/H3-slug.`);
|
|
59
|
+
}
|
|
60
|
+
return { ref, headerPath };
|
|
61
|
+
}
|
|
62
|
+
/** Scan for real headers, skipping fenced code blocks (``` or ~~~, any info string;
|
|
63
|
+
* a fence closes only on the same marker at the same or greater length). */
|
|
64
|
+
function scanHeaders(lines) {
|
|
65
|
+
const hits = [];
|
|
66
|
+
let fence = null;
|
|
67
|
+
for (let i = 0; i < lines.length; i++) {
|
|
68
|
+
const line = lines[i];
|
|
69
|
+
const fenceMatch = line.match(/^\s{0,3}(`{3,}|~{3,})/);
|
|
70
|
+
if (fenceMatch) {
|
|
71
|
+
const marker = fenceMatch[1][0];
|
|
72
|
+
const length = fenceMatch[1].length;
|
|
73
|
+
if (!fence) {
|
|
74
|
+
fence = { marker, length, line: i };
|
|
75
|
+
}
|
|
76
|
+
else if (fence.marker === marker && length >= fence.length) {
|
|
77
|
+
fence = null;
|
|
78
|
+
}
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
if (fence)
|
|
82
|
+
continue;
|
|
83
|
+
const header = line.match(/^(#{1,6})\s+(.*\S)\s*$/);
|
|
84
|
+
if (header)
|
|
85
|
+
hits.push({ level: header[1].length, title: header[2], line: i });
|
|
86
|
+
}
|
|
87
|
+
return { hits, unterminatedFenceLine: fence?.line ?? null };
|
|
88
|
+
}
|
|
89
|
+
/** Parse the addressable H2/H3 section tree of a markdown text.
|
|
90
|
+
* A matched section is NEVER empty by construction: the span includes the header
|
|
91
|
+
* line itself, so even a body-less `## alpha` (next line another header, or EOF)
|
|
92
|
+
* resolves to at least its own header — a matched-but-empty section can never
|
|
93
|
+
* quietly thin a compose (the structural half of the fail-loud contract; r1 A2). */
|
|
94
|
+
export function parseMarkdownSections(text) {
|
|
95
|
+
const lines = text.split("\n");
|
|
96
|
+
const { hits: headers } = scanHeaders(lines);
|
|
97
|
+
const sections = [];
|
|
98
|
+
let currentH2 = null;
|
|
99
|
+
for (let idx = 0; idx < headers.length; idx++) {
|
|
100
|
+
const h = headers[idx];
|
|
101
|
+
if (h.level < MIN_LEVEL || h.level > MAX_LEVEL) {
|
|
102
|
+
if (h.level < MIN_LEVEL)
|
|
103
|
+
currentH2 = null; // an H1 resets the H2 scope
|
|
104
|
+
continue;
|
|
105
|
+
}
|
|
106
|
+
const slug = slugifyHeader(h.title);
|
|
107
|
+
if (h.level === 2)
|
|
108
|
+
currentH2 = slug;
|
|
109
|
+
// r1 F2: test the SCOPE against null, never truthiness — an H2 whose title
|
|
110
|
+
// slugifies to "" still owns its children. They stay under the empty segment
|
|
111
|
+
// (unreachable by any legal address, and the validator names the family)
|
|
112
|
+
// instead of being silently promoted to top-level addresses.
|
|
113
|
+
const headerPath = h.level === 2 ? [slug] : currentH2 !== null ? [currentH2, slug] : [slug];
|
|
114
|
+
// FULL span: to the next header with level <= this one (same-or-higher).
|
|
115
|
+
const fullEnd = headers.slice(idx + 1).find((n) => n.level <= h.level)?.line ?? lines.length;
|
|
116
|
+
// OWN text: to the next header of ANY level.
|
|
117
|
+
const ownEnd = headers[idx + 1]?.line ?? lines.length;
|
|
118
|
+
sections.push({
|
|
119
|
+
level: h.level,
|
|
120
|
+
title: h.title,
|
|
121
|
+
headerPath,
|
|
122
|
+
headerLine: h.line,
|
|
123
|
+
text: lines.slice(h.line, fullEnd).join("\n"),
|
|
124
|
+
ownText: lines.slice(h.line, ownEnd).join("\n"),
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
return sections;
|
|
128
|
+
}
|
|
129
|
+
/** Resolve a header path against markdown text. FAIL-LOUD: no match is an error that
|
|
130
|
+
* names the miss and the real candidates at that altitude — never a silent empty. */
|
|
131
|
+
export function resolveAddress(text, headerPath) {
|
|
132
|
+
if (headerPath.length === 0) {
|
|
133
|
+
throw new AddressResolutionError("resolveAddress needs at least one header slug; a bare ref resolves to the whole file at the caller.");
|
|
134
|
+
}
|
|
135
|
+
const sections = parseMarkdownSections(text);
|
|
136
|
+
const wanted = headerPath.join("/");
|
|
137
|
+
const hits = sections.filter((s) => s.headerPath.join("/") === wanted);
|
|
138
|
+
// AMBIGUITY fails loud at RESOLVE time (Atom 4c): a duplicate header-path is
|
|
139
|
+
// a validator finding, but serving must not depend on the validator having
|
|
140
|
+
// run — first-match on a shipped duplicate is a silent wrong answer.
|
|
141
|
+
if (hits.length > 1) {
|
|
142
|
+
throw new AddressResolutionError(`address '#${wanted}' is AMBIGUOUS in this file — ${hits.length} sections share the path ` +
|
|
143
|
+
`(header lines ${hits.map((h) => h.headerLine).join(", ")}). Fix the duplicate headers; ` +
|
|
144
|
+
`serving any one of them would be a silent wrong answer.`);
|
|
145
|
+
}
|
|
146
|
+
if (hits.length === 1)
|
|
147
|
+
return hits[0];
|
|
148
|
+
const parentPath = headerPath.slice(0, -1).join("/");
|
|
149
|
+
const candidates = sections
|
|
150
|
+
.filter((s) => s.headerPath.slice(0, -1).join("/") === parentPath)
|
|
151
|
+
.map((s) => s.headerPath.join("/"));
|
|
152
|
+
throw new AddressResolutionError(`address '#${wanted}' matches no header in this file — composition stops here rather than thinning the walk. ` +
|
|
153
|
+
(candidates.length > 0
|
|
154
|
+
? `Addressable sections under '${parentPath || "(top)"}': ${candidates.join(", ")}.`
|
|
155
|
+
: `The file has ${sections.length} addressable section(s): ${sections.map((s) => s.headerPath.join("/")).join(", ") || "(none)"}.`));
|
|
156
|
+
}
|
|
157
|
+
/** The compose-gate validator: every H2/H3 must be uniquely addressable under the one
|
|
158
|
+
* slug rule, and the file must not silently lose sections. Findings, not throws —
|
|
159
|
+
* the caller decides the gate. */
|
|
160
|
+
export function validateMarkdownAddressability(text) {
|
|
161
|
+
const lines = text.split("\n");
|
|
162
|
+
const { unterminatedFenceLine } = scanHeaders(lines);
|
|
163
|
+
const sections = parseMarkdownSections(text);
|
|
164
|
+
const findings = [];
|
|
165
|
+
// r1 F1: an unclosed fence swallows every later header; resolution stays honest
|
|
166
|
+
// (a swallowed address fails loud) but the GATE must name the loss up front —
|
|
167
|
+
// this is the corpus defect a real file is most likely to actually contain.
|
|
168
|
+
if (unterminatedFenceLine !== null) {
|
|
169
|
+
findings.push({ kind: "unterminated-fence", line: unterminatedFenceLine });
|
|
170
|
+
}
|
|
171
|
+
const seen = new Map();
|
|
172
|
+
for (const s of sections) {
|
|
173
|
+
// r1 F2 family rule: ANY empty segment makes a section unreachable by a legal
|
|
174
|
+
// address (parseAddress rejects empty segments) — flag parent AND children.
|
|
175
|
+
if (s.headerPath.some((segment) => segment.length === 0)) {
|
|
176
|
+
findings.push({ kind: "unaddressable-header", headerPath: s.headerPath.join("/"), line: s.headerLine, title: s.title });
|
|
177
|
+
continue;
|
|
178
|
+
}
|
|
179
|
+
const key = s.headerPath.join("/");
|
|
180
|
+
seen.set(key, [...(seen.get(key) ?? []), s.headerLine]);
|
|
181
|
+
}
|
|
182
|
+
for (const [headerPath, lineNumbers] of seen) {
|
|
183
|
+
if (lineNumbers.length > 1)
|
|
184
|
+
findings.push({ kind: "duplicate-header-path", headerPath, lines: lineNumbers });
|
|
185
|
+
}
|
|
186
|
+
return findings;
|
|
187
|
+
}
|
|
188
|
+
//# sourceMappingURL=markdown-address.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown-address.js","sourceRoot":"","sources":["../../src/domain/markdown-address.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,EAAE;AACF,uFAAuF;AACvF,yFAAyF;AACzF,yFAAyF;AACzF,wFAAwF;AACxF,0FAA0F;AAC1F,yFAAyF;AACzF,yFAAyF;AACzF,yFAAyF;AACzF,sFAAsF;AACtF,uFAAuF;AACvF,mFAAmF;AACnF,yFAAyF;AACzF,oFAAoF;AACpF,oCAAoC;AACpC,EAAE;AACF,yFAAyF;AACzF,wFAAwF;AACxF,yFAAyF;AACzF,uCAAuC;AAEvC,sDAAsD;AACtD,MAAM,SAAS,GAAG,CAAC,CAAC;AACpB,MAAM,SAAS,GAAG,CAAC,CAAC;AAEpB,MAAM,OAAO,sBAAuB,SAAQ,KAAK;IAC/C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,wBAAwB,CAAC;IACvC,CAAC;CACF;AAED;;gDAEgD;AAChD,MAAM,UAAU,aAAa,CAAC,KAAa;IACzC,OAAO,KAAK;SACT,WAAW,EAAE;SACb,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC;SACtB,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC;SAC3B,OAAO,CAAC,UAAU,EA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AAK,EAAE,WAAW,EAAE,CAAC,CAAC;IAC/G,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -2,12 +2,18 @@ export interface ProcessRow {
|
|
|
2
2
|
pid: number;
|
|
3
3
|
ppid: number;
|
|
4
4
|
command: string;
|
|
5
|
+
/** OPR.0.5.3.10 — the process start time (`ps lstart`), the identity half
|
|
6
|
+
* of pid+start-time: pid reuse changes it, so consumers can invalidate
|
|
7
|
+
* cached per-pid answers without another spawn. Optional: injected legacy
|
|
8
|
+
* rows without it fall back to the resolver's TTL bound. */
|
|
9
|
+
startedAt?: string;
|
|
5
10
|
}
|
|
6
11
|
export interface CurrentGenerationDeps {
|
|
7
12
|
getPanePid: (sessionTarget: string) => Promise<number | null>;
|
|
8
13
|
listProcesses: () => Promise<ProcessRow[]>;
|
|
9
|
-
/** Codex: thread id for a live codex pid (the logs join; async post-F1).
|
|
10
|
-
|
|
14
|
+
/** Codex: thread id for a live codex pid (the logs join; async post-F1).
|
|
15
|
+
* `identity` = the census row's startedAt (pid+start-time reuse guard). */
|
|
16
|
+
readThreadIdByPid: (pid: number, identity?: string) => Promise<string | undefined> | string | undefined;
|
|
11
17
|
}
|
|
12
18
|
export type CurrentRecordResolution = {
|
|
13
19
|
ok: true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"current-generation-record.d.ts","sourceRoot":"","sources":["../../../src/domain/model-divergence/current-generation-record.ts"],"names":[],"mappings":"AAuBA,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"current-generation-record.d.ts","sourceRoot":"","sources":["../../../src/domain/model-divergence/current-generation-record.ts"],"names":[],"mappings":"AAuBA,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM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EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;;;;;sCAasC;AACtC,qBAAa,wBAAwB;IACnC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAInB;IAEL,MAAM,CACJ,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,qBAAqB,EAAE,EACnC,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,UAAU,GAAG,IAAI,GAC9C,qBAAqB;IAkFxB,OAAO,CAAC,aAAa;IAarB,OAAO,CAAC,iBAAiB;CAQ1B;AAMD;0FAC0F;AAC1F,wBAAsB,wBAAwB,CAC5C,aAAa,EAAE,MAAM,EACrB,IAAI,EAAE,qBAAqB,GAC1B,OAAO,CAAC,uBAAuB,CAAC,CAWlC"}
|
|
@@ -195,7 +195,7 @@ export async function resolveLiveCodexThreadId(sessionTarget, deps) {
|
|
|
195
195
|
if (codexPids.length === 0)
|
|
196
196
|
return { ok: false, reason: `no codex process under the live pane of ${sessionTarget}` };
|
|
197
197
|
for (const pid of codexPids) {
|
|
198
|
-
const threadId = await deps.readThreadIdByPid(pid);
|
|
198
|
+
const threadId = await deps.readThreadIdByPid(pid, processes.find((p) => p.pid === pid)?.startedAt);
|
|
199
199
|
if (threadId)
|
|
200
200
|
return { ok: true, id: threadId };
|
|
201
201
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"current-generation-record.js","sourceRoot":"","sources":["../../../src/domain/model-divergence/current-generation-record.ts"],"names":[],"mappings":"AAAA,uFAAuF;AACvF,EAAE;AACF,kGAAkG;AAClG,kGAAkG;AAClG,kGAAkG;AAClG,kGAAkG;AAClG,iGAAiG;AACjG,mGAAmG;AACnG,mGAAmG;AACnG,4EAA4E;AAC5E,EAAE;AACF,sGAAsG;AACtG,8FAA8F;AAC9F,0FAA0F;AAC1F,oFAAoF;AACpF,EAAE;AACF,gGAAgG;AAChG,mGAAmG;AACnG,oDAAoD;AACpD,EAAE;AACF,kGAAkG;AAClG,wFAAwF;
|
|
1
|
+
{"version":3,"file":"current-generation-record.js","sourceRoot":"","sources":["../../../src/domain/model-divergence/current-generation-record.ts"],"names":[],"mappings":"AAAA,uFAAuF;AACvF,EAAE;AACF,kGAAkG;AAClG,kGAAkG;AAClG,kGAAkG;AAClG,kGAAkG;AAClG,iGAAiG;AACjG,mGAAmG;AACnG,mGAAmG;AACnG,4EAA4E;AAC5E,EAAE;AACF,sGAAsG;AACtG,8FAA8F;AAC9F,0FAA0F;AAC1F,oFAAoF;AACpF,EAAE;AACF,gGAAgG;AAChG,mGAAmG;AACnG,oDAAoD;AACpD,EAAE;AACF,kGAAkG;AAClG,wFAAwF;AAyBxF;;iDAEiD;AACjD,SAAS,eAAe,CAAC,SAAuB,EAAE,SAAiB,EAAE,OAAqC;IACxG,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAwB,CAAC;IACjD,KAAK,MAAM,CAAC,IAAI,SAAS,EAAE,CAAC;QAC1B,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;QACxC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACb,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC7B,CAAC;IACD,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,MAAM,KAAK,GAAG,CAAC,SAAS,CAAC,CAAC;IAC1B,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACxB,MAAM,GAAG,GAAG,KAAK,CAAC,KAAK,EAAG,CAAC;QAC3B,KAAK,MAAM,KAAK,IAAI,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC;YAC5C,IAAI,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC;gBAAE,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAChD,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,GAA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
40
40
|
listPinnedSeats: () => PinnedSeat[];
|
|
41
41
|
/** Per-runtime effective read via the CURRENT GENERATION's own record (D-a: never a name/token
|
|
42
|
-
* lookup that can silently cross a generation boundary). No-answer = named reason = pending.
|
|
43
|
-
|
|
42
|
+
* lookup that can silently cross a generation boundary). No-answer = named reason = pending.
|
|
43
|
+
* OPR.0.5.3.10 mini-req 1: `cycle`, when passed, carries the POLL-SCOPED process lister — one
|
|
44
|
+
* census for every seat in the pass, never a `ps` per seat. */
|
|
45
|
+
readEffectiveModel: (seat: PinnedSeat, cycle?: {
|
|
46
|
+
listProcesses: () => Promise<Array<{
|
|
47
|
+
pid: number;
|
|
48
|
+
ppid: number;
|
|
49
|
+
command: string;
|
|
50
|
+
}>>;
|
|
51
|
+
}) => Promise<EffectiveModelRead> | EffectiveModelRead;
|
|
52
|
+
/** OPR.0.5.3.10 — the shared census; when present, checkOnce() threads a cycle-scoped lister
|
|
53
|
+
* into every readEffectiveModel call (lazy: a pass with every seat settled spawns nothing). */
|
|
54
|
+
processCensus?: {
|
|
55
|
+
cycleLister(): () => Promise<Array<{
|
|
56
|
+
pid: number;
|
|
57
|
+
ppid: number;
|
|
58
|
+
command: string;
|
|
59
|
+
}>>;
|
|
60
|
+
};
|
|
44
61
|
/** In-daemon send to a session (the watchdog delivery seam). */
|
|
45
62
|
sendToSession: (sessionName: string, message: string) => Promise<{
|
|
46
63
|
ok: boolean;
|
|
@@ -87,27 +104,22 @@ export declare class ModelDivergenceMonitor {
|
|
|
87
104
|
}>;
|
|
88
105
|
/** One pass over the pinned population. Returns the proclamations fired this pass (for tests). */
|
|
89
106
|
checkOnce(): Promise<ModelDivergenceProclamation[]>;
|
|
107
|
+
/** One seat's check. Extracted so checkOnce can isolate a per-seat throw (defense-in-depth): a
|
|
108
|
+
* throw here is caught per seat and never aborts the pass. Pushes any proclamation into `fired`. */
|
|
109
|
+
private checkSeat;
|
|
90
110
|
private proclaim;
|
|
91
111
|
private deliver;
|
|
92
112
|
}
|
|
93
|
-
/** Pin comparison:
|
|
94
|
-
*
|
|
95
|
-
* reversed it to whole-token alias matching
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
* (
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
113
|
+
/** Pin comparison: canonicalize the PIN through the one shipped alias map, then EXACT,
|
|
114
|
+
* case-insensitive, after trimming (f7dfca0c, founder-steered). History on record: exact was
|
|
115
|
+
* ruled at build; a seat reversed it to whole-token alias matching; r2 reversed THAT back
|
|
116
|
+
* because generic token containment lets one pin bless multiple distinct models ("codex"
|
|
117
|
+
* matched gpt-5.6-codex AND gpt-5.1-codex-mini). The landed remedy is the explicit
|
|
118
|
+
* provider-aware mapping r2's ruling allowed for: CANONICAL_MODEL_PINS
|
|
119
|
+
* (spec-validation-advisory.ts) is the SINGLE mapping home — spec validation nudges pins
|
|
120
|
+
* toward canonical ids with it, and this detector canonicalizes the pinned string through the
|
|
121
|
+
* same data before comparing. Never add a second map here, and never token containment: an
|
|
122
|
+
* unknown alias or a fallback model canonicalizes to itself and still diverges. Raw
|
|
123
|
+
* pinned/effective strings travel untouched in any proclamation. */
|
|
103
124
|
export declare function modelsMatch(pinned: string, effective: string): boolean;
|
|
104
|
-
/** MIGRATION BRIDGE (r2 addendum, desk-ruled 05:03Z) — provider-specific, ONE measured pair, with
|
|
105
|
-
* a BEHAVIORAL executable expiry (r2 round-4: a filename tripwire is not a coupling — the
|
|
106
|
-
* advisory can land inside an existing validator file):
|
|
107
|
-
* - condition 2 (dormancy): fires only while a nodes.model row still carries the alias pin.
|
|
108
|
-
* - condition 1 (removal): gated at RUNTIME on rigspec-schema's SPEC_VALIDATION_CAPABILITIES —
|
|
109
|
-
* when the 5.3 advisory registers "model-pin-canonicalization" there (its registry contract),
|
|
110
|
-
* modelsMatch stops consulting this map in code, and the pin test goes RED until the constant
|
|
111
|
-
* is deleted. The registry's own doc-comment carries the 5.3 obligation. */
|
|
112
|
-
export declare const CLAUDE_ALIAS_MIGRATION_BRIDGE: Record<string, string>;
|
|
113
125
|
//# sourceMappingURL=model-divergence-monitor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-divergence-monitor.d.ts","sourceRoot":"","sources":["../../../src/domain/model-divergence/model-divergence-monitor.ts"],"names":[],"mappings":"AAwBA,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,6EAA6E;IAC7E,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,cAAc,GAAG,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC;IAC7D,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,EAAE,WAAW,GAAG,QAAQ,GAAG,UAAU,CAAC;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,cAAc,EAAE,CAAC;CAC5B;AAED;kEACkE;AAClE,MAAM,MAAM,kBAAkB,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE7F,MAAM,WAAW,0BAA0B;IACzC,2FAA2F;IAC3F,eAAe,EAAE,MAAM,UAAU,EAAE,CAAC;IACpC;
|
|
1
|
+
{"version":3,"file":"model-divergence-monitor.d.ts","sourceRoot":"","sources":["../../../src/domain/model-divergence/model-divergence-monitor.ts"],"names":[],"mappings":"AAwBA,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,6EAA6E;IAC7E,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,cAAc,GAAG,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC;IAC7D,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,EAAE,WAAW,GAAG,QAAQ,GAAG,UAAU,CAAC;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,cAAc,EAAE,CAAC;CAC5B;AAED;kEACkE;AAClE,MAAM,MAAM,kBAAkB,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GA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