@trac3er/oh-my-god 2.1.0 → 2.1.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/.agents/skills/omg/AGENTS.fragment.md +2 -2
- package/.agents/skills/omg/algorithms/SKILL.md +1 -1
- package/.agents/skills/omg/algorithms/openai.yaml +1 -1
- package/.agents/skills/omg/api-twin/SKILL.md +1 -1
- package/.agents/skills/omg/api-twin/openai.yaml +1 -1
- package/.agents/skills/omg/claim-judge/SKILL.md +1 -1
- package/.agents/skills/omg/claim-judge/openai.yaml +1 -1
- package/.agents/skills/omg/codex-rules.md +1 -1
- package/.agents/skills/omg/control-plane/SKILL.md +1 -1
- package/.agents/skills/omg/control-plane/openai.yaml +1 -1
- package/.agents/skills/omg/data-lineage/SKILL.md +1 -1
- package/.agents/skills/omg/data-lineage/openai.yaml +1 -1
- package/.agents/skills/omg/delta-classifier/SKILL.md +1 -1
- package/.agents/skills/omg/delta-classifier/openai.yaml +1 -1
- package/.agents/skills/omg/eval-gate/SKILL.md +1 -1
- package/.agents/skills/omg/eval-gate/openai.yaml +1 -1
- package/.agents/skills/omg/health/SKILL.md +1 -1
- package/.agents/skills/omg/health/openai.yaml +1 -1
- package/.agents/skills/omg/hook-governor/SKILL.md +1 -1
- package/.agents/skills/omg/hook-governor/openai.yaml +1 -1
- package/.agents/skills/omg/incident-replay/SKILL.md +1 -1
- package/.agents/skills/omg/incident-replay/openai.yaml +1 -1
- package/.agents/skills/omg/lsp-pack/SKILL.md +1 -1
- package/.agents/skills/omg/lsp-pack/openai.yaml +1 -1
- package/.agents/skills/omg/mcp-fabric/SKILL.md +1 -1
- package/.agents/skills/omg/mcp-fabric/openai.yaml +1 -1
- package/.agents/skills/omg/plan-council/SKILL.md +1 -1
- package/.agents/skills/omg/plan-council/openai.yaml +1 -1
- package/.agents/skills/omg/preflight/SKILL.md +1 -1
- package/.agents/skills/omg/preflight/openai.yaml +1 -1
- package/.agents/skills/omg/proof-gate/SKILL.md +1 -1
- package/.agents/skills/omg/proof-gate/openai.yaml +1 -1
- package/.agents/skills/omg/remote-supervisor/SKILL.md +1 -1
- package/.agents/skills/omg/remote-supervisor/openai.yaml +1 -1
- package/.agents/skills/omg/robotics/SKILL.md +1 -1
- package/.agents/skills/omg/robotics/openai.yaml +1 -1
- package/.agents/skills/omg/secure-worktree-pipeline/SKILL.md +1 -1
- package/.agents/skills/omg/secure-worktree-pipeline/openai.yaml +1 -1
- package/.agents/skills/omg/security-check/SKILL.md +1 -1
- package/.agents/skills/omg/security-check/openai.yaml +1 -1
- package/.agents/skills/omg/test-intent-lock/SKILL.md +1 -1
- package/.agents/skills/omg/test-intent-lock/openai.yaml +1 -1
- package/.agents/skills/omg/tracebank/SKILL.md +1 -1
- package/.agents/skills/omg/tracebank/openai.yaml +1 -1
- package/.agents/skills/omg/vision/SKILL.md +1 -1
- package/.agents/skills/omg/vision/openai.yaml +1 -1
- package/.claude-plugin/marketplace.json +3 -3
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +16 -0
- package/CLI-ADAPTER-MAP.md +3 -3
- package/OMG-setup.sh +114 -1
- package/OMG_COMPAT_CONTRACT.md +1 -1
- package/README.md +2 -1
- package/artifacts/release/.claude-plugin/marketplace.json +3 -3
- package/artifacts/release/.claude-plugin/plugin.json +1 -1
- package/artifacts/release/OMG_COMPAT_CONTRACT.md +1 -1
- package/artifacts/release/dist/enterprise/bundle/.claude-plugin/marketplace.json +3 -3
- package/artifacts/release/dist/enterprise/bundle/.claude-plugin/plugin.json +1 -1
- package/artifacts/release/dist/enterprise/bundle/OMG_COMPAT_CONTRACT.md +1 -1
- package/artifacts/release/dist/enterprise/bundle/plugins/advanced/plugin.json +26 -9
- package/artifacts/release/dist/enterprise/bundle/registry/bundles/algorithms.yaml +1 -1
- package/artifacts/release/dist/enterprise/bundle/registry/bundles/api-twin.yaml +1 -1
- package/artifacts/release/dist/enterprise/bundle/registry/bundles/claim-judge.yaml +1 -1
- package/artifacts/release/dist/enterprise/bundle/registry/bundles/control-plane.yaml +1 -1
- package/artifacts/release/dist/enterprise/bundle/registry/bundles/data-lineage.yaml +1 -1
- package/artifacts/release/dist/enterprise/bundle/registry/bundles/delta-classifier.yaml +1 -1
- package/artifacts/release/dist/enterprise/bundle/registry/bundles/eval-gate.yaml +1 -1
- package/artifacts/release/dist/enterprise/bundle/registry/bundles/health.yaml +1 -1
- package/artifacts/release/dist/enterprise/bundle/registry/bundles/hook-governor.yaml +1 -1
- package/artifacts/release/dist/enterprise/bundle/registry/bundles/incident-replay.yaml +1 -1
- package/artifacts/release/dist/enterprise/bundle/registry/bundles/lsp-pack.yaml +1 -1
- package/artifacts/release/dist/enterprise/bundle/registry/bundles/mcp-fabric.yaml +1 -1
- package/artifacts/release/dist/enterprise/bundle/registry/bundles/plan-council.yaml +1 -1
- package/artifacts/release/dist/enterprise/bundle/registry/bundles/preflight.yaml +1 -1
- package/artifacts/release/dist/enterprise/bundle/registry/bundles/proof-gate.yaml +1 -1
- package/artifacts/release/dist/enterprise/bundle/registry/bundles/remote-supervisor.yaml +1 -1
- package/artifacts/release/dist/enterprise/bundle/registry/bundles/robotics.yaml +1 -1
- package/artifacts/release/dist/enterprise/bundle/registry/bundles/secure-worktree-pipeline.yaml +1 -1
- package/artifacts/release/dist/enterprise/bundle/registry/bundles/security-check.yaml +1 -1
- package/artifacts/release/dist/enterprise/bundle/registry/bundles/test-intent-lock.yaml +1 -1
- package/artifacts/release/dist/enterprise/bundle/registry/bundles/tracebank.yaml +1 -1
- package/artifacts/release/dist/enterprise/bundle/registry/bundles/vision.yaml +1 -1
- package/artifacts/release/dist/enterprise/bundle/registry/omg-capability.schema.json +1 -1
- package/artifacts/release/dist/enterprise/bundle/settings.json +3 -3
- package/artifacts/release/dist/enterprise/manifest.json +30 -40
- package/artifacts/release/dist/public/bundle/.claude-plugin/marketplace.json +3 -3
- package/artifacts/release/dist/public/bundle/.claude-plugin/plugin.json +1 -1
- package/artifacts/release/dist/public/bundle/OMG_COMPAT_CONTRACT.md +1 -1
- package/artifacts/release/dist/public/bundle/plugins/advanced/plugin.json +26 -9
- package/artifacts/release/dist/public/bundle/registry/bundles/algorithms.yaml +1 -1
- package/artifacts/release/dist/public/bundle/registry/bundles/api-twin.yaml +1 -1
- package/artifacts/release/dist/public/bundle/registry/bundles/claim-judge.yaml +1 -1
- package/artifacts/release/dist/public/bundle/registry/bundles/control-plane.yaml +1 -1
- package/artifacts/release/dist/public/bundle/registry/bundles/data-lineage.yaml +1 -1
- package/artifacts/release/dist/public/bundle/registry/bundles/delta-classifier.yaml +1 -1
- package/artifacts/release/dist/public/bundle/registry/bundles/eval-gate.yaml +1 -1
- package/artifacts/release/dist/public/bundle/registry/bundles/health.yaml +1 -1
- package/artifacts/release/dist/public/bundle/registry/bundles/hook-governor.yaml +1 -1
- package/artifacts/release/dist/public/bundle/registry/bundles/incident-replay.yaml +1 -1
- package/artifacts/release/dist/public/bundle/registry/bundles/lsp-pack.yaml +1 -1
- package/artifacts/release/dist/public/bundle/registry/bundles/mcp-fabric.yaml +1 -1
- package/artifacts/release/dist/public/bundle/registry/bundles/plan-council.yaml +1 -1
- package/artifacts/release/dist/public/bundle/registry/bundles/preflight.yaml +1 -1
- package/artifacts/release/dist/public/bundle/registry/bundles/proof-gate.yaml +1 -1
- package/artifacts/release/dist/public/bundle/registry/bundles/remote-supervisor.yaml +1 -1
- package/artifacts/release/dist/public/bundle/registry/bundles/robotics.yaml +1 -1
- package/artifacts/release/dist/public/bundle/registry/bundles/secure-worktree-pipeline.yaml +1 -1
- package/artifacts/release/dist/public/bundle/registry/bundles/security-check.yaml +1 -1
- package/artifacts/release/dist/public/bundle/registry/bundles/test-intent-lock.yaml +1 -1
- package/artifacts/release/dist/public/bundle/registry/bundles/tracebank.yaml +1 -1
- package/artifacts/release/dist/public/bundle/registry/bundles/vision.yaml +1 -1
- package/artifacts/release/dist/public/bundle/registry/omg-capability.schema.json +1 -1
- package/artifacts/release/dist/public/bundle/settings.json +3 -3
- package/artifacts/release/dist/public/manifest.json +30 -40
- package/artifacts/release/plugins/advanced/plugin.json +26 -9
- package/artifacts/release/registry/bundles/algorithms.yaml +1 -1
- package/artifacts/release/registry/bundles/api-twin.yaml +1 -1
- package/artifacts/release/registry/bundles/claim-judge.yaml +1 -1
- package/artifacts/release/registry/bundles/control-plane.yaml +1 -1
- package/artifacts/release/registry/bundles/data-lineage.yaml +1 -1
- package/artifacts/release/registry/bundles/delta-classifier.yaml +1 -1
- package/artifacts/release/registry/bundles/eval-gate.yaml +1 -1
- package/artifacts/release/registry/bundles/health.yaml +1 -1
- package/artifacts/release/registry/bundles/hook-governor.yaml +1 -1
- package/artifacts/release/registry/bundles/incident-replay.yaml +1 -1
- package/artifacts/release/registry/bundles/lsp-pack.yaml +1 -1
- package/artifacts/release/registry/bundles/mcp-fabric.yaml +1 -1
- package/artifacts/release/registry/bundles/plan-council.yaml +1 -1
- package/artifacts/release/registry/bundles/preflight.yaml +1 -1
- package/artifacts/release/registry/bundles/proof-gate.yaml +1 -1
- package/artifacts/release/registry/bundles/remote-supervisor.yaml +1 -1
- package/artifacts/release/registry/bundles/robotics.yaml +1 -1
- package/artifacts/release/registry/bundles/secure-worktree-pipeline.yaml +1 -1
- package/artifacts/release/registry/bundles/security-check.yaml +1 -1
- package/artifacts/release/registry/bundles/test-intent-lock.yaml +1 -1
- package/artifacts/release/registry/bundles/tracebank.yaml +1 -1
- package/artifacts/release/registry/bundles/vision.yaml +1 -1
- package/artifacts/release/registry/omg-capability.schema.json +1 -1
- package/artifacts/release/settings.json +3 -3
- package/build/lib/commands/OMG:profile-review.md +43 -0
- package/build/lib/commands/OMG:validate.md +59 -0
- package/build/lib/control_plane/service.py +40 -1
- package/build/lib/hooks/_agent_registry.py +2 -0
- package/build/lib/hooks/firewall.py +263 -4
- package/build/lib/hooks/intentgate-keyword-detector.py +15 -3
- package/build/lib/hooks/policy_engine.py +77 -0
- package/build/lib/hooks/prompt-enhancer.py +146 -0
- package/build/lib/hooks/session-end-capture.py +374 -6
- package/build/lib/hooks/session-start.py +13 -35
- package/build/lib/hooks/setup_wizard.py +333 -1
- package/build/lib/hooks/shadow_manager.py +111 -2
- package/build/lib/hooks/stop_dispatcher.py +108 -4
- package/build/lib/plugins/advanced/plugin.json +26 -9
- package/build/lib/plugins/core/plugin.json +44 -11
- package/build/lib/registry/bundles/algorithms.yaml +1 -1
- package/build/lib/registry/bundles/api-twin.yaml +1 -1
- package/build/lib/registry/bundles/claim-judge.yaml +1 -1
- package/build/lib/registry/bundles/control-plane.yaml +1 -1
- package/build/lib/registry/bundles/data-lineage.yaml +1 -1
- package/build/lib/registry/bundles/delta-classifier.yaml +1 -1
- package/build/lib/registry/bundles/eval-gate.yaml +1 -1
- package/build/lib/registry/bundles/health.yaml +1 -1
- package/build/lib/registry/bundles/hook-governor.yaml +1 -1
- package/build/lib/registry/bundles/incident-replay.yaml +1 -1
- package/build/lib/registry/bundles/lsp-pack.yaml +1 -1
- package/build/lib/registry/bundles/mcp-fabric.yaml +1 -1
- package/build/lib/registry/bundles/plan-council.yaml +1 -1
- package/build/lib/registry/bundles/preflight.yaml +1 -1
- package/build/lib/registry/bundles/proof-gate.yaml +1 -1
- package/build/lib/registry/bundles/remote-supervisor.yaml +1 -1
- package/build/lib/registry/bundles/robotics.yaml +1 -1
- package/build/lib/registry/bundles/secure-worktree-pipeline.yaml +1 -1
- package/build/lib/registry/bundles/security-check.yaml +1 -1
- package/build/lib/registry/bundles/test-intent-lock.yaml +1 -1
- package/build/lib/registry/bundles/tracebank.yaml +1 -1
- package/build/lib/registry/bundles/vision.yaml +1 -1
- package/build/lib/registry/omg-capability.schema.json +1 -1
- package/build/lib/runtime/adoption.py +1 -1
- package/build/lib/runtime/background_verification.py +62 -0
- package/build/lib/runtime/claim_judge.py +165 -5
- package/build/lib/runtime/compat.py +15 -1
- package/build/lib/runtime/context_engine.py +261 -4
- package/build/lib/runtime/contract_compiler.py +370 -93
- package/build/lib/runtime/defense_state.py +79 -8
- package/build/lib/runtime/delta_classifier.py +80 -2
- package/build/lib/runtime/evidence_query.py +56 -4
- package/build/lib/runtime/evidence_registry.py +16 -0
- package/build/lib/runtime/evidence_requirements.py +47 -0
- package/build/lib/runtime/forge_agents.py +179 -9
- package/build/lib/runtime/forge_contracts.py +208 -2
- package/build/lib/runtime/interaction_journal.py +318 -42
- package/build/lib/runtime/memory_store.py +134 -1
- package/build/lib/runtime/mutation_gate.py +57 -11
- package/build/lib/runtime/omg_compat_contract_snapshot.json +2 -2
- package/build/lib/runtime/omg_mcp_server.py +14 -4
- package/build/lib/runtime/preflight.py +14 -0
- package/build/lib/runtime/profile_io.py +294 -0
- package/build/lib/runtime/proof_gate.py +122 -7
- package/build/lib/runtime/release_run_coordinator.py +339 -0
- package/build/lib/runtime/release_surfaces.py +243 -0
- package/build/lib/runtime/rollback_manifest.py +136 -0
- package/build/lib/runtime/router_critics.py +50 -0
- package/build/lib/runtime/runtime_contracts.py +137 -0
- package/build/lib/runtime/security_check.py +16 -0
- package/build/lib/runtime/session_health.py +60 -16
- package/build/lib/runtime/team_router.py +156 -13
- package/build/lib/runtime/test_intent_lock.py +102 -0
- package/build/lib/runtime/tool_plan_gate.py +249 -24
- package/build/lib/runtime/validate.py +194 -0
- package/build/lib/runtime/verification_controller.py +52 -2
- package/commands/OMG:diagnose-plugins.md +33 -0
- package/commands/OMG:profile-review.md +43 -0
- package/commands/OMG:setup.md +4 -1
- package/commands/OMG:validate.md +59 -0
- package/control_plane/service.py +40 -1
- package/dist/enterprise/bundle/.claude-plugin/marketplace.json +3 -3
- package/dist/enterprise/bundle/.claude-plugin/plugin.json +1 -1
- package/dist/enterprise/bundle/OMG_COMPAT_CONTRACT.md +1 -1
- package/dist/enterprise/bundle/plugins/advanced/plugin.json +26 -9
- package/dist/enterprise/bundle/registry/bundles/algorithms.yaml +1 -1
- package/dist/enterprise/bundle/registry/bundles/api-twin.yaml +1 -1
- package/dist/enterprise/bundle/registry/bundles/claim-judge.yaml +1 -1
- package/dist/enterprise/bundle/registry/bundles/control-plane.yaml +1 -1
- package/dist/enterprise/bundle/registry/bundles/data-lineage.yaml +1 -1
- package/dist/enterprise/bundle/registry/bundles/delta-classifier.yaml +1 -1
- package/dist/enterprise/bundle/registry/bundles/eval-gate.yaml +1 -1
- package/dist/enterprise/bundle/registry/bundles/health.yaml +1 -1
- package/dist/enterprise/bundle/registry/bundles/hook-governor.yaml +1 -1
- package/dist/enterprise/bundle/registry/bundles/incident-replay.yaml +1 -1
- package/dist/enterprise/bundle/registry/bundles/lsp-pack.yaml +1 -1
- package/dist/enterprise/bundle/registry/bundles/mcp-fabric.yaml +1 -1
- package/dist/enterprise/bundle/registry/bundles/plan-council.yaml +1 -1
- package/dist/enterprise/bundle/registry/bundles/preflight.yaml +1 -1
- package/dist/enterprise/bundle/registry/bundles/proof-gate.yaml +1 -1
- package/dist/enterprise/bundle/registry/bundles/remote-supervisor.yaml +1 -1
- package/dist/enterprise/bundle/registry/bundles/robotics.yaml +1 -1
- package/dist/enterprise/bundle/registry/bundles/secure-worktree-pipeline.yaml +1 -1
- package/dist/enterprise/bundle/registry/bundles/security-check.yaml +1 -1
- package/dist/enterprise/bundle/registry/bundles/test-intent-lock.yaml +1 -1
- package/dist/enterprise/bundle/registry/bundles/tracebank.yaml +1 -1
- package/dist/enterprise/bundle/registry/bundles/vision.yaml +1 -1
- package/dist/enterprise/bundle/registry/omg-capability.schema.json +1 -1
- package/dist/enterprise/bundle/settings.json +3 -3
- package/dist/enterprise/manifest.json +30 -40
- package/dist/oh_my_god-2.1.4-py3-none-any.whl +0 -0
- package/dist/oh_my_god-2.1.4.tar.gz +0 -0
- package/dist/public/bundle/.claude-plugin/marketplace.json +3 -3
- package/dist/public/bundle/.claude-plugin/plugin.json +1 -1
- package/dist/public/bundle/OMG_COMPAT_CONTRACT.md +1 -1
- package/dist/public/bundle/plugins/advanced/plugin.json +26 -9
- package/dist/public/bundle/registry/bundles/algorithms.yaml +1 -1
- package/dist/public/bundle/registry/bundles/api-twin.yaml +1 -1
- package/dist/public/bundle/registry/bundles/claim-judge.yaml +1 -1
- package/dist/public/bundle/registry/bundles/control-plane.yaml +1 -1
- package/dist/public/bundle/registry/bundles/data-lineage.yaml +1 -1
- package/dist/public/bundle/registry/bundles/delta-classifier.yaml +1 -1
- package/dist/public/bundle/registry/bundles/eval-gate.yaml +1 -1
- package/dist/public/bundle/registry/bundles/health.yaml +1 -1
- package/dist/public/bundle/registry/bundles/hook-governor.yaml +1 -1
- package/dist/public/bundle/registry/bundles/incident-replay.yaml +1 -1
- package/dist/public/bundle/registry/bundles/lsp-pack.yaml +1 -1
- package/dist/public/bundle/registry/bundles/mcp-fabric.yaml +1 -1
- package/dist/public/bundle/registry/bundles/plan-council.yaml +1 -1
- package/dist/public/bundle/registry/bundles/preflight.yaml +1 -1
- package/dist/public/bundle/registry/bundles/proof-gate.yaml +1 -1
- package/dist/public/bundle/registry/bundles/remote-supervisor.yaml +1 -1
- package/dist/public/bundle/registry/bundles/robotics.yaml +1 -1
- package/dist/public/bundle/registry/bundles/secure-worktree-pipeline.yaml +1 -1
- package/dist/public/bundle/registry/bundles/security-check.yaml +1 -1
- package/dist/public/bundle/registry/bundles/test-intent-lock.yaml +1 -1
- package/dist/public/bundle/registry/bundles/tracebank.yaml +1 -1
- package/dist/public/bundle/registry/bundles/vision.yaml +1 -1
- package/dist/public/bundle/registry/omg-capability.schema.json +1 -1
- package/dist/public/bundle/settings.json +3 -3
- package/dist/public/manifest.json +30 -40
- package/docs/install/opencode.md +30 -0
- package/docs/proof.md +11 -0
- package/docs/release-checklist.md +14 -1
- package/hooks/_agent_registry.py +2 -0
- package/hooks/firewall.py +263 -4
- package/hooks/intentgate-keyword-detector.py +15 -3
- package/hooks/policy_engine.py +77 -0
- package/hooks/prompt-enhancer.py +146 -0
- package/hooks/session-end-capture.py +374 -6
- package/hooks/session-start.py +13 -35
- package/hooks/setup_wizard.py +342 -2
- package/hooks/shadow_manager.py +111 -2
- package/hooks/stop_dispatcher.py +108 -4
- package/hud/omg-hud.mjs +30 -6
- package/lab/pipeline.py +197 -26
- package/package.json +1 -1
- package/plugins/advanced/plugin.json +26 -9
- package/plugins/core/plugin.json +51 -12
- package/pyproject.toml +10 -2
- package/registry/bundles/algorithms.yaml +1 -1
- package/registry/bundles/api-twin.yaml +1 -1
- package/registry/bundles/claim-judge.yaml +1 -1
- package/registry/bundles/control-plane.yaml +1 -1
- package/registry/bundles/data-lineage.yaml +1 -1
- package/registry/bundles/delta-classifier.yaml +1 -1
- package/registry/bundles/eval-gate.yaml +1 -1
- package/registry/bundles/health.yaml +1 -1
- package/registry/bundles/hook-governor.yaml +1 -1
- package/registry/bundles/incident-replay.yaml +1 -1
- package/registry/bundles/lsp-pack.yaml +1 -1
- package/registry/bundles/mcp-fabric.yaml +1 -1
- package/registry/bundles/plan-council.yaml +1 -1
- package/registry/bundles/preflight.yaml +1 -1
- package/registry/bundles/proof-gate.yaml +1 -1
- package/registry/bundles/remote-supervisor.yaml +1 -1
- package/registry/bundles/robotics.yaml +1 -1
- package/registry/bundles/secure-worktree-pipeline.yaml +1 -1
- package/registry/bundles/security-check.yaml +1 -1
- package/registry/bundles/test-intent-lock.yaml +1 -1
- package/registry/bundles/tracebank.yaml +1 -1
- package/registry/bundles/vision.yaml +1 -1
- package/registry/omg-capability.schema.json +1 -1
- package/runtime/adoption.py +7 -5
- package/runtime/background_verification.py +62 -0
- package/runtime/claim_judge.py +165 -5
- package/runtime/compat.py +48 -1
- package/runtime/context_engine.py +261 -4
- package/runtime/contract_compiler.py +370 -93
- package/runtime/defense_state.py +79 -8
- package/runtime/delta_classifier.py +80 -2
- package/runtime/evidence_query.py +56 -4
- package/runtime/evidence_registry.py +16 -0
- package/runtime/evidence_requirements.py +47 -0
- package/runtime/forge_agents.py +179 -9
- package/runtime/forge_contracts.py +208 -2
- package/runtime/hook_governor.py +19 -1
- package/runtime/interaction_journal.py +318 -42
- package/runtime/memory_store.py +134 -1
- package/runtime/mutation_gate.py +57 -11
- package/runtime/omg_compat_contract_snapshot.json +2 -2
- package/runtime/omg_mcp_server.py +14 -4
- package/runtime/plugin_diagnostics.py +248 -0
- package/runtime/plugin_interop.py +1007 -0
- package/runtime/preflight.py +14 -0
- package/runtime/profile_io.py +294 -0
- package/runtime/proof_gate.py +122 -7
- package/runtime/providers/opencode_provider.py +94 -0
- package/runtime/release_run_coordinator.py +339 -0
- package/runtime/release_surfaces.py +243 -0
- package/runtime/rollback_manifest.py +136 -0
- package/runtime/router_critics.py +50 -0
- package/runtime/runtime_contracts.py +137 -0
- package/runtime/security_check.py +16 -0
- package/runtime/session_health.py +60 -16
- package/runtime/team_router.py +156 -13
- package/runtime/test_intent_lock.py +102 -0
- package/runtime/tool_plan_gate.py +218 -19
- package/runtime/validate.py +289 -0
- package/runtime/verification_controller.py +52 -2
- package/scripts/omg.py +306 -3
- package/scripts/prepare-release-proof-fixtures.py +191 -7
- package/scripts/print-canonical-version.py +80 -0
- package/scripts/sync-release-identity.py +476 -0
- package/scripts/validate-release-identity.py +246 -0
- package/scripts/verify-standalone.sh +3 -0
- package/settings.json +3 -3
- package/templates/plugins-allowlist.yaml +19 -0
- package/artifacts/release/dist/enterprise/bundle/.gemini/settings.json +0 -11
- package/artifacts/release/dist/enterprise/bundle/.kimi/mcp.json +0 -11
- package/artifacts/release/dist/public/bundle/.gemini/settings.json +0 -11
- package/artifacts/release/dist/public/bundle/.kimi/mcp.json +0 -11
- package/build/lib/yaml.py +0 -321
- package/dist/enterprise/bundle/.gemini/settings.json +0 -11
- package/dist/enterprise/bundle/.kimi/mcp.json +0 -11
- package/dist/public/bundle/.gemini/settings.json +0 -11
- package/dist/public/bundle/.kimi/mcp.json +0 -11
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from dataclasses import dataclass
|
|
4
|
+
import json
|
|
5
|
+
import os
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
from types import ModuleType
|
|
8
|
+
from typing import cast
|
|
9
|
+
from uuid import uuid4
|
|
10
|
+
import warnings
|
|
11
|
+
|
|
12
|
+
from runtime.defense_state import DefenseState
|
|
13
|
+
from runtime.interaction_journal import InteractionJournal
|
|
14
|
+
from runtime.runtime_contracts import write_run_state
|
|
15
|
+
from runtime.session_health import compute_session_health
|
|
16
|
+
from runtime.verification_controller import VerificationController
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class RunIdConflictError(ValueError):
|
|
20
|
+
pass
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
@dataclass(frozen=True)
|
|
24
|
+
class ResolvedRunId:
|
|
25
|
+
run_id: str
|
|
26
|
+
source: str
|
|
27
|
+
reason: str
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class ReleaseRunCoordinator:
|
|
31
|
+
project_dir: str
|
|
32
|
+
_verification: VerificationController
|
|
33
|
+
_journal: InteractionJournal
|
|
34
|
+
|
|
35
|
+
def __init__(self, project_dir: str):
|
|
36
|
+
self.project_dir = str(Path(project_dir).resolve())
|
|
37
|
+
self._verification = VerificationController(self.project_dir)
|
|
38
|
+
self._journal = InteractionJournal(self.project_dir)
|
|
39
|
+
|
|
40
|
+
def begin(self, cli_run_id: str | None = None, release_evidence: dict[str, object] | None = None) -> dict[str, object]:
|
|
41
|
+
resolved = self.resolve_run_id(cli_run_id=cli_run_id, release_evidence=release_evidence)
|
|
42
|
+
run_id = resolved.run_id
|
|
43
|
+
|
|
44
|
+
verification_state = self._verification.begin_run(run_id)
|
|
45
|
+
self._write_active_run(run_id)
|
|
46
|
+
self._write_state(
|
|
47
|
+
run_id,
|
|
48
|
+
{
|
|
49
|
+
"status": "running",
|
|
50
|
+
"phase": "begin",
|
|
51
|
+
"resolution_source": resolved.source,
|
|
52
|
+
"resolution_reason": resolved.reason,
|
|
53
|
+
"release_evidence": dict(release_evidence) if isinstance(release_evidence, dict) else {},
|
|
54
|
+
"verification_status": verification_state.get("status", "running"),
|
|
55
|
+
},
|
|
56
|
+
)
|
|
57
|
+
return {
|
|
58
|
+
"status": "running",
|
|
59
|
+
"run_id": run_id,
|
|
60
|
+
"resolution_source": resolved.source,
|
|
61
|
+
"resolution_reason": resolved.reason,
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
def mutate(
|
|
65
|
+
self,
|
|
66
|
+
run_id: str | None,
|
|
67
|
+
tool: str,
|
|
68
|
+
metadata: dict[str, object],
|
|
69
|
+
goal: str,
|
|
70
|
+
available_tools: list[str],
|
|
71
|
+
context_packet: dict[str, object] | None = None,
|
|
72
|
+
) -> dict[str, object]:
|
|
73
|
+
resolved = self.resolve_run_id(cli_run_id=run_id)
|
|
74
|
+
canonical_run_id = resolved.run_id
|
|
75
|
+
|
|
76
|
+
tool_plan_module = cast(ModuleType, __import__("runtime.tool_plan_gate", fromlist=["build_tool_plan"]))
|
|
77
|
+
build_tool_plan = cast(object, getattr(tool_plan_module, "build_tool_plan", None))
|
|
78
|
+
if not callable(build_tool_plan):
|
|
79
|
+
raise RuntimeError("build_tool_plan_unavailable")
|
|
80
|
+
|
|
81
|
+
plan_obj = build_tool_plan(
|
|
82
|
+
goal=goal,
|
|
83
|
+
available_tools=available_tools,
|
|
84
|
+
context_packet=context_packet,
|
|
85
|
+
run_id=canonical_run_id,
|
|
86
|
+
)
|
|
87
|
+
plan = cast(dict[str, object], plan_obj) if isinstance(plan_obj, dict) else {}
|
|
88
|
+
journal_metadata = dict(metadata)
|
|
89
|
+
journal_metadata["run_id"] = canonical_run_id
|
|
90
|
+
journal_result = self._journal.record_step(tool=tool, metadata=journal_metadata)
|
|
91
|
+
|
|
92
|
+
DefenseState(self.project_dir).update()
|
|
93
|
+
health = cast(dict[str, object], compute_session_health(self.project_dir, run_id=canonical_run_id))
|
|
94
|
+
|
|
95
|
+
self._write_active_run(canonical_run_id)
|
|
96
|
+
self._write_state(
|
|
97
|
+
canonical_run_id,
|
|
98
|
+
{
|
|
99
|
+
"status": "running",
|
|
100
|
+
"phase": "mutate",
|
|
101
|
+
"tool": tool,
|
|
102
|
+
"plan_id": str(plan.get("plan_id", "")),
|
|
103
|
+
"journal_step_id": str(journal_result.get("step_id", "")),
|
|
104
|
+
"health_action": str(health.get("recommended_action", "continue")),
|
|
105
|
+
},
|
|
106
|
+
)
|
|
107
|
+
return {
|
|
108
|
+
"status": "running",
|
|
109
|
+
"run_id": canonical_run_id,
|
|
110
|
+
"plan_id": str(plan.get("plan_id", "")),
|
|
111
|
+
"journal_step_id": str(journal_result.get("step_id", "")),
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
def verify(self, run_id: str | None) -> dict[str, object]:
|
|
115
|
+
resolved = self.resolve_run_id(cli_run_id=run_id)
|
|
116
|
+
canonical_run_id = resolved.run_id
|
|
117
|
+
|
|
118
|
+
DefenseState(self.project_dir).update()
|
|
119
|
+
compat_path = self._verification.publish_compat_state(canonical_run_id)
|
|
120
|
+
health = cast(dict[str, object], compute_session_health(self.project_dir, run_id=canonical_run_id))
|
|
121
|
+
verification_state = self._verification.read_run(canonical_run_id)
|
|
122
|
+
|
|
123
|
+
self._write_state(
|
|
124
|
+
canonical_run_id,
|
|
125
|
+
{
|
|
126
|
+
"status": str(verification_state.get("status", "running")),
|
|
127
|
+
"phase": "verify",
|
|
128
|
+
"compat_path": compat_path,
|
|
129
|
+
"health_path": self._health_state_path(canonical_run_id),
|
|
130
|
+
"health_action": str(health.get("recommended_action", "continue")),
|
|
131
|
+
},
|
|
132
|
+
)
|
|
133
|
+
return {
|
|
134
|
+
"status": str(verification_state.get("status", "running")),
|
|
135
|
+
"run_id": canonical_run_id,
|
|
136
|
+
"compat_path": compat_path,
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
def finalize(
|
|
140
|
+
self,
|
|
141
|
+
run_id: str | None,
|
|
142
|
+
status: str,
|
|
143
|
+
blockers: list[str],
|
|
144
|
+
evidence_links: list[str],
|
|
145
|
+
) -> dict[str, object]:
|
|
146
|
+
resolved = self.resolve_run_id(cli_run_id=run_id)
|
|
147
|
+
canonical_run_id = resolved.run_id
|
|
148
|
+
|
|
149
|
+
verification_state = self._verification.complete_run(
|
|
150
|
+
run_id=canonical_run_id,
|
|
151
|
+
status=status,
|
|
152
|
+
blockers=list(blockers),
|
|
153
|
+
evidence_links=list(evidence_links),
|
|
154
|
+
)
|
|
155
|
+
DefenseState(self.project_dir).update()
|
|
156
|
+
compat_path = self._verification.publish_compat_state(canonical_run_id)
|
|
157
|
+
health = cast(dict[str, object], compute_session_health(self.project_dir, run_id=canonical_run_id))
|
|
158
|
+
|
|
159
|
+
council_path = self._write_fanout(
|
|
160
|
+
canonical_run_id,
|
|
161
|
+
"council",
|
|
162
|
+
{
|
|
163
|
+
"status": "recorded",
|
|
164
|
+
"run_id": canonical_run_id,
|
|
165
|
+
"verification_status": verification_state.get("status", status),
|
|
166
|
+
},
|
|
167
|
+
)
|
|
168
|
+
rollback_path = self._write_fanout(
|
|
169
|
+
canonical_run_id,
|
|
170
|
+
"rollback",
|
|
171
|
+
{
|
|
172
|
+
"status": "recorded",
|
|
173
|
+
"run_id": canonical_run_id,
|
|
174
|
+
"latest_journal_step": self._latest_journal_step(),
|
|
175
|
+
},
|
|
176
|
+
)
|
|
177
|
+
|
|
178
|
+
self._write_state(
|
|
179
|
+
canonical_run_id,
|
|
180
|
+
{
|
|
181
|
+
"status": str(verification_state.get("status", status)),
|
|
182
|
+
"phase": "finalize",
|
|
183
|
+
"compat_path": compat_path,
|
|
184
|
+
"health_path": self._health_state_path(canonical_run_id),
|
|
185
|
+
"health_action": str(health.get("recommended_action", "continue")),
|
|
186
|
+
"council_path": council_path,
|
|
187
|
+
"rollback_path": rollback_path,
|
|
188
|
+
"evidence_links": list(evidence_links),
|
|
189
|
+
},
|
|
190
|
+
)
|
|
191
|
+
return {
|
|
192
|
+
"status": str(verification_state.get("status", status)),
|
|
193
|
+
"run_id": canonical_run_id,
|
|
194
|
+
"compat_path": compat_path,
|
|
195
|
+
"health_path": self._health_state_path(canonical_run_id),
|
|
196
|
+
"council_path": council_path,
|
|
197
|
+
"rollback_path": rollback_path,
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
def resolve_run_id(
|
|
201
|
+
self,
|
|
202
|
+
*,
|
|
203
|
+
cli_run_id: str | None = None,
|
|
204
|
+
release_evidence: dict[str, object] | None = None,
|
|
205
|
+
) -> ResolvedRunId:
|
|
206
|
+
return resolve_canonical_run_id(self.project_dir, cli_run_id=cli_run_id, release_evidence=release_evidence)
|
|
207
|
+
|
|
208
|
+
def _write_state(self, run_id: str, payload: dict[str, object]) -> None:
|
|
209
|
+
_ = write_run_state(self.project_dir, "release_run_coordinator", run_id, payload)
|
|
210
|
+
|
|
211
|
+
def _write_active_run(self, run_id: str) -> None:
|
|
212
|
+
active_path = Path(self.project_dir) / ".omg" / "shadow" / "active-run"
|
|
213
|
+
active_path.parent.mkdir(parents=True, exist_ok=True)
|
|
214
|
+
_ = active_path.write_text(f"{run_id}\n", encoding="utf-8")
|
|
215
|
+
|
|
216
|
+
def _health_state_path(self, run_id: str) -> str:
|
|
217
|
+
return str(Path(".omg") / "state" / "session_health" / f"{run_id}.json")
|
|
218
|
+
|
|
219
|
+
def _write_fanout(self, run_id: str, producer: str, payload: dict[str, object]) -> str:
|
|
220
|
+
path = Path(self.project_dir) / ".omg" / "state" / "release_run_coordinator" / run_id / f"{producer}.json"
|
|
221
|
+
path.parent.mkdir(parents=True, exist_ok=True)
|
|
222
|
+
tmp_path = path.with_name(f"{path.name}.tmp")
|
|
223
|
+
_ = tmp_path.write_text(json.dumps(payload, indent=2, ensure_ascii=True) + "\n", encoding="utf-8")
|
|
224
|
+
os.replace(tmp_path, path)
|
|
225
|
+
return str(path.relative_to(self.project_dir)).replace("\\", "/")
|
|
226
|
+
|
|
227
|
+
def _latest_journal_step(self) -> str:
|
|
228
|
+
journal_dir = Path(self.project_dir) / ".omg" / "state" / "interaction_journal"
|
|
229
|
+
if not journal_dir.exists():
|
|
230
|
+
return ""
|
|
231
|
+
candidates = sorted(journal_dir.glob("*.json"), key=lambda p: p.stat().st_mtime)
|
|
232
|
+
if not candidates:
|
|
233
|
+
return ""
|
|
234
|
+
return candidates[-1].stem
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
def resolve_canonical_run_id(
|
|
238
|
+
project_dir: str,
|
|
239
|
+
*,
|
|
240
|
+
cli_run_id: str | None = None,
|
|
241
|
+
release_evidence: dict[str, object] | None = None,
|
|
242
|
+
generate_if_missing: bool = True,
|
|
243
|
+
) -> ResolvedRunId:
|
|
244
|
+
cli = _clean(cli_run_id)
|
|
245
|
+
env = _clean(os.environ.get("OMG_RUN_ID"))
|
|
246
|
+
shadow = _read_shadow_run_id(project_dir)
|
|
247
|
+
evidence = ""
|
|
248
|
+
if isinstance(release_evidence, dict):
|
|
249
|
+
evidence = _clean(release_evidence.get("run_id"))
|
|
250
|
+
|
|
251
|
+
active = _read_active_coordinator_run(project_dir)
|
|
252
|
+
sources: dict[str, str] = {
|
|
253
|
+
"cli": cli,
|
|
254
|
+
"env": env,
|
|
255
|
+
"shadow": shadow,
|
|
256
|
+
"evidence": evidence,
|
|
257
|
+
"active": active,
|
|
258
|
+
}
|
|
259
|
+
unique = {value for value in sources.values() if value}
|
|
260
|
+
|
|
261
|
+
selected_source = ""
|
|
262
|
+
selected_run_id = ""
|
|
263
|
+
for key in ("cli", "env", "shadow", "evidence", "active"):
|
|
264
|
+
value = sources[key]
|
|
265
|
+
if value:
|
|
266
|
+
selected_source = key
|
|
267
|
+
selected_run_id = value
|
|
268
|
+
break
|
|
269
|
+
|
|
270
|
+
reason = f"resolved_from_{selected_source}" if selected_run_id else "generated_new_run_id"
|
|
271
|
+
strict = os.environ.get("OMG_RUN_COORDINATOR_STRICT", "0").strip() == "1"
|
|
272
|
+
|
|
273
|
+
if len(unique) > 1:
|
|
274
|
+
if strict:
|
|
275
|
+
conflict = ",".join(f"{name}:{value}" for name, value in sources.items() if value)
|
|
276
|
+
raise RunIdConflictError(f"fragmented_run_ids:{conflict}")
|
|
277
|
+
reason = "fragmented_run_ids_normalized"
|
|
278
|
+
warnings.warn(
|
|
279
|
+
"fragmented_run_ids_normalized",
|
|
280
|
+
RuntimeWarning,
|
|
281
|
+
stacklevel=2,
|
|
282
|
+
)
|
|
283
|
+
|
|
284
|
+
if not selected_run_id and generate_if_missing:
|
|
285
|
+
selected_source = "generated"
|
|
286
|
+
selected_run_id = str(uuid4())
|
|
287
|
+
reason = "generated_new_run_id"
|
|
288
|
+
|
|
289
|
+
return ResolvedRunId(run_id=selected_run_id, source=selected_source, reason=reason)
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
def resolve_current_run_id(project_dir: str | None = None, cli_run_id: str | None = None) -> str | None:
|
|
293
|
+
root = _project_dir(project_dir)
|
|
294
|
+
resolved = resolve_canonical_run_id(str(root), cli_run_id=cli_run_id, generate_if_missing=False)
|
|
295
|
+
return resolved.run_id or None
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
def _project_dir(project_dir: str | None = None) -> Path:
|
|
299
|
+
if project_dir:
|
|
300
|
+
return Path(project_dir)
|
|
301
|
+
return Path(os.environ.get("CLAUDE_PROJECT_DIR", os.getcwd()))
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
def _clean(value: object) -> str:
|
|
305
|
+
if not isinstance(value, str):
|
|
306
|
+
return ""
|
|
307
|
+
return value.strip()
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
def _read_shadow_run_id(project_dir: str) -> str:
|
|
311
|
+
active_run = Path(project_dir) / ".omg" / "shadow" / "active-run"
|
|
312
|
+
if not active_run.exists():
|
|
313
|
+
return ""
|
|
314
|
+
try:
|
|
315
|
+
return active_run.read_text(encoding="utf-8").strip()
|
|
316
|
+
except OSError:
|
|
317
|
+
return ""
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
def _read_active_coordinator_run(project_dir: str) -> str:
|
|
321
|
+
state_dir = Path(project_dir) / ".omg" / "state" / "release_run_coordinator"
|
|
322
|
+
if not state_dir.exists():
|
|
323
|
+
return ""
|
|
324
|
+
|
|
325
|
+
candidates = sorted(state_dir.glob("*.json"), key=lambda p: p.stat().st_mtime)
|
|
326
|
+
for path in reversed(candidates):
|
|
327
|
+
try:
|
|
328
|
+
payload: object = json.loads(path.read_text(encoding="utf-8")) # pyright: ignore[reportAny]
|
|
329
|
+
except (OSError, json.JSONDecodeError):
|
|
330
|
+
continue
|
|
331
|
+
if not isinstance(payload, dict):
|
|
332
|
+
continue
|
|
333
|
+
payload_obj = cast(dict[str, object], payload)
|
|
334
|
+
run_id = _clean(payload_obj.get("run_id"))
|
|
335
|
+
if run_id:
|
|
336
|
+
return run_id
|
|
337
|
+
return _clean(path.stem)
|
|
338
|
+
|
|
339
|
+
return ""
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
"""Shared release surface inventory.
|
|
2
|
+
|
|
3
|
+
Single audited source of truth for all version surfaces in the OMG project.
|
|
4
|
+
This module describes WHERE version strings appear and HOW to find/update them.
|
|
5
|
+
|
|
6
|
+
It does NOT import runtime.adoption or encode the canonical version value.
|
|
7
|
+
The canonical version lives solely in runtime/adoption.py:CANONICAL_VERSION.
|
|
8
|
+
|
|
9
|
+
Consumers:
|
|
10
|
+
- scripts/sync-release-identity.py (sync/check flow)
|
|
11
|
+
- runtime/contract_compiler.py (drift gate)
|
|
12
|
+
- tests/test_trust_release_identity.py (parity assertions)
|
|
13
|
+
"""
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
from dataclasses import dataclass
|
|
17
|
+
from typing import Union
|
|
18
|
+
|
|
19
|
+
# ── Valid surface type identifiers ──────────────────────────────────────────
|
|
20
|
+
|
|
21
|
+
SURFACE_TYPES = frozenset({
|
|
22
|
+
"json_key_path",
|
|
23
|
+
"regex_line",
|
|
24
|
+
"yaml_line",
|
|
25
|
+
"frontmatter_field",
|
|
26
|
+
"changelog_header",
|
|
27
|
+
"shell_literal",
|
|
28
|
+
"js_literal",
|
|
29
|
+
"banner_literal",
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
@dataclass(frozen=True)
|
|
34
|
+
class AuthoredSurface:
|
|
35
|
+
"""A version surface in an authored source file.
|
|
36
|
+
|
|
37
|
+
Attributes:
|
|
38
|
+
file_path: Relative path from repo root.
|
|
39
|
+
surface_type: One of SURFACE_TYPES.
|
|
40
|
+
field: For json_key_path — list of str/int keys to navigate.
|
|
41
|
+
For regex_line/shell_literal/js_literal/banner_literal — regex pattern.
|
|
42
|
+
For yaml_line/frontmatter_field — the YAML field name.
|
|
43
|
+
For changelog_header — regex pattern matching the header.
|
|
44
|
+
description: Human-readable description of this surface.
|
|
45
|
+
"""
|
|
46
|
+
|
|
47
|
+
file_path: str
|
|
48
|
+
surface_type: str
|
|
49
|
+
field: Union[list[Union[str, int]], str]
|
|
50
|
+
description: str = ""
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
# ── Explicit YAML bundle names (22 files) ──────────────────────────────────
|
|
54
|
+
|
|
55
|
+
_BUNDLE_NAMES: tuple[str, ...] = (
|
|
56
|
+
"algorithms",
|
|
57
|
+
"api-twin",
|
|
58
|
+
"claim-judge",
|
|
59
|
+
"control-plane",
|
|
60
|
+
"data-lineage",
|
|
61
|
+
"delta-classifier",
|
|
62
|
+
"eval-gate",
|
|
63
|
+
"health",
|
|
64
|
+
"hook-governor",
|
|
65
|
+
"incident-replay",
|
|
66
|
+
"lsp-pack",
|
|
67
|
+
"mcp-fabric",
|
|
68
|
+
"plan-council",
|
|
69
|
+
"preflight",
|
|
70
|
+
"proof-gate",
|
|
71
|
+
"remote-supervisor",
|
|
72
|
+
"robotics",
|
|
73
|
+
"secure-worktree-pipeline",
|
|
74
|
+
"security-check",
|
|
75
|
+
"test-intent-lock",
|
|
76
|
+
"tracebank",
|
|
77
|
+
"vision",
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
# ── Authored surfaces: explicit, no dynamic discovery ──────────────────────
|
|
82
|
+
|
|
83
|
+
AUTHORED_SURFACES: list[AuthoredSurface] = [
|
|
84
|
+
# ── JSON key paths (10 fields across 7 files) ──
|
|
85
|
+
AuthoredSurface(
|
|
86
|
+
"package.json", "json_key_path", ["version"],
|
|
87
|
+
"npm package version",
|
|
88
|
+
),
|
|
89
|
+
AuthoredSurface(
|
|
90
|
+
"settings.json", "json_key_path", ["_omg", "_version"],
|
|
91
|
+
"OMG settings version",
|
|
92
|
+
),
|
|
93
|
+
AuthoredSurface(
|
|
94
|
+
"settings.json", "json_key_path", ["_omg", "generated", "contract_version"],
|
|
95
|
+
"OMG generated contract version",
|
|
96
|
+
),
|
|
97
|
+
AuthoredSurface(
|
|
98
|
+
".claude-plugin/plugin.json", "json_key_path", ["version"],
|
|
99
|
+
"Claude plugin version",
|
|
100
|
+
),
|
|
101
|
+
AuthoredSurface(
|
|
102
|
+
".claude-plugin/marketplace.json", "json_key_path", ["version"],
|
|
103
|
+
"marketplace top-level version",
|
|
104
|
+
),
|
|
105
|
+
AuthoredSurface(
|
|
106
|
+
".claude-plugin/marketplace.json", "json_key_path", ["metadata", "version"],
|
|
107
|
+
"marketplace metadata version",
|
|
108
|
+
),
|
|
109
|
+
AuthoredSurface(
|
|
110
|
+
".claude-plugin/marketplace.json", "json_key_path", ["plugins", 0, "version"],
|
|
111
|
+
"marketplace plugins[0] version",
|
|
112
|
+
),
|
|
113
|
+
AuthoredSurface(
|
|
114
|
+
"plugins/core/plugin.json", "json_key_path", ["version"],
|
|
115
|
+
"core plugin version",
|
|
116
|
+
),
|
|
117
|
+
AuthoredSurface(
|
|
118
|
+
"plugins/advanced/plugin.json", "json_key_path", ["version"],
|
|
119
|
+
"advanced plugin version",
|
|
120
|
+
),
|
|
121
|
+
AuthoredSurface(
|
|
122
|
+
"registry/omg-capability.schema.json", "json_key_path", ["version"],
|
|
123
|
+
"capability schema version",
|
|
124
|
+
),
|
|
125
|
+
|
|
126
|
+
# ── Regex line (pyproject.toml) ──
|
|
127
|
+
AuthoredSurface(
|
|
128
|
+
"pyproject.toml", "regex_line", r'^version = "(.+?)"',
|
|
129
|
+
"Python package version",
|
|
130
|
+
),
|
|
131
|
+
|
|
132
|
+
# ── YAML bundles (22 files) ──
|
|
133
|
+
*[
|
|
134
|
+
AuthoredSurface(
|
|
135
|
+
f"registry/bundles/{name}.yaml", "yaml_line", "version",
|
|
136
|
+
f"{name} bundle version",
|
|
137
|
+
)
|
|
138
|
+
for name in _BUNDLE_NAMES
|
|
139
|
+
],
|
|
140
|
+
|
|
141
|
+
# ── Changelog ──
|
|
142
|
+
AuthoredSurface(
|
|
143
|
+
"CHANGELOG.md", "changelog_header", r'^## \[?(\d+\.\d+\.\d+)\]?',
|
|
144
|
+
"latest release header",
|
|
145
|
+
),
|
|
146
|
+
|
|
147
|
+
# ── 6 previously missing authored surfaces ──
|
|
148
|
+
|
|
149
|
+
# 1. OMG_COMPAT_CONTRACT.md — frontmatter version: field (line 3)
|
|
150
|
+
AuthoredSurface(
|
|
151
|
+
"OMG_COMPAT_CONTRACT.md", "frontmatter_field", "version",
|
|
152
|
+
"compat contract frontmatter version",
|
|
153
|
+
),
|
|
154
|
+
|
|
155
|
+
# 2. CLI-ADAPTER-MAP.md — 3 docs example version markers
|
|
156
|
+
AuthoredSurface(
|
|
157
|
+
"CLI-ADAPTER-MAP.md", "regex_line",
|
|
158
|
+
r'^- \*\*Version:\*\* `(\d+\.\d+\.\d+)`',
|
|
159
|
+
"docs example: version badge (line 165)",
|
|
160
|
+
),
|
|
161
|
+
AuthoredSurface(
|
|
162
|
+
"CLI-ADAPTER-MAP.md", "regex_line",
|
|
163
|
+
r'^\s*"version":\s*"(\d+\.\d+\.\d+)"',
|
|
164
|
+
"docs example: JSON version literal (line 209)",
|
|
165
|
+
),
|
|
166
|
+
AuthoredSurface(
|
|
167
|
+
"CLI-ADAPTER-MAP.md", "regex_line",
|
|
168
|
+
r'^CANONICAL_VERSION\s*=\s*"(\d+\.\d+\.\d+)"',
|
|
169
|
+
"docs example: Python constant (line 241)",
|
|
170
|
+
),
|
|
171
|
+
|
|
172
|
+
# 3. OMG-setup.sh — VERSION="..." shell literal (line 8)
|
|
173
|
+
AuthoredSurface(
|
|
174
|
+
"OMG-setup.sh", "shell_literal", r'^VERSION="(.+?)"',
|
|
175
|
+
"setup script version variable",
|
|
176
|
+
),
|
|
177
|
+
|
|
178
|
+
# 4. hud/omg-hud.mjs — JS fallback literal (line 90)
|
|
179
|
+
AuthoredSurface(
|
|
180
|
+
"hud/omg-hud.mjs", "js_literal", r'return "(\d+\.\d+\.\d+)"',
|
|
181
|
+
"HUD fallback version literal",
|
|
182
|
+
),
|
|
183
|
+
|
|
184
|
+
# 5. .claude-plugin/scripts/install.sh — installer banner literal (line 22)
|
|
185
|
+
AuthoredSurface(
|
|
186
|
+
".claude-plugin/scripts/install.sh", "banner_literal",
|
|
187
|
+
r'v(\d+\.\d+\.\d+)',
|
|
188
|
+
"installer banner version",
|
|
189
|
+
),
|
|
190
|
+
|
|
191
|
+
# 6. runtime/omg_compat_contract_snapshot.json — contract_version field
|
|
192
|
+
AuthoredSurface(
|
|
193
|
+
"runtime/omg_compat_contract_snapshot.json", "json_key_path",
|
|
194
|
+
["contract_version"],
|
|
195
|
+
"compat contract snapshot version",
|
|
196
|
+
),
|
|
197
|
+
]
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
# ── Derived (generated) surface directories ────────────────────────────────
|
|
201
|
+
# These are validation-only targets — not authored, but must be checked for
|
|
202
|
+
# stale version residue after a bump.
|
|
203
|
+
|
|
204
|
+
DERIVED_SURFACE_DIRS: list[str] = [
|
|
205
|
+
"dist/",
|
|
206
|
+
"artifacts/release/",
|
|
207
|
+
"build/lib/",
|
|
208
|
+
]
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
# ── Scoped residue targets ─────────────────────────────────────────────────
|
|
212
|
+
# Specific files/dirs inside generated trees where stale version residue
|
|
213
|
+
# must be rejected after a version bump.
|
|
214
|
+
|
|
215
|
+
SCOPED_RESIDUE_TARGETS: list[str] = [
|
|
216
|
+
"dist/public/manifest.json",
|
|
217
|
+
"dist/enterprise/manifest.json",
|
|
218
|
+
"dist/public/bundle/",
|
|
219
|
+
"dist/enterprise/bundle/",
|
|
220
|
+
"artifacts/release/",
|
|
221
|
+
"build/lib/",
|
|
222
|
+
]
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
# ── Helpers ─────────────────────────────────────────────────────────────────
|
|
226
|
+
|
|
227
|
+
def get_authored_paths() -> list[str]:
|
|
228
|
+
"""Return deduplicated list of file paths from AUTHORED_SURFACES.
|
|
229
|
+
|
|
230
|
+
Preserves insertion order; useful for disk-existence checks.
|
|
231
|
+
"""
|
|
232
|
+
seen: set[str] = set()
|
|
233
|
+
paths: list[str] = []
|
|
234
|
+
for surface in AUTHORED_SURFACES:
|
|
235
|
+
if surface.file_path not in seen:
|
|
236
|
+
seen.add(surface.file_path)
|
|
237
|
+
paths.append(surface.file_path)
|
|
238
|
+
return paths
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
def get_derived_dirs() -> list[str]:
|
|
242
|
+
"""Return all generated directory paths."""
|
|
243
|
+
return list(DERIVED_SURFACE_DIRS)
|