@trac3er/oh-my-god 2.0.4 → 2.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/omg/AGENTS.fragment.md +57 -4
- package/.agents/skills/omg/algorithms/SKILL.md +11 -0
- package/.agents/skills/omg/algorithms/openai.yaml +11 -0
- package/.agents/skills/omg/api-twin/SKILL.md +11 -0
- package/.agents/skills/omg/api-twin/openai.yaml +12 -0
- package/.agents/skills/omg/claim-judge/SKILL.md +11 -0
- package/.agents/skills/omg/claim-judge/openai.yaml +13 -0
- package/.agents/skills/omg/codex-rules.md +33 -0
- 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 +11 -0
- package/.agents/skills/omg/data-lineage/openai.yaml +12 -0
- package/.agents/skills/omg/delta-classifier/SKILL.md +11 -0
- package/.agents/skills/omg/delta-classifier/openai.yaml +12 -0
- package/.agents/skills/omg/eval-gate/SKILL.md +11 -0
- package/.agents/skills/omg/eval-gate/openai.yaml +12 -0
- package/.agents/skills/omg/health/SKILL.md +11 -0
- package/.agents/skills/omg/health/openai.yaml +11 -0
- 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 +11 -0
- package/.agents/skills/omg/incident-replay/openai.yaml +12 -0
- 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 +11 -0
- package/.agents/skills/omg/plan-council/openai.yaml +12 -0
- package/.agents/skills/omg/preflight/SKILL.md +11 -0
- package/.agents/skills/omg/preflight/openai.yaml +12 -0
- package/.agents/skills/omg/proof-gate/SKILL.md +11 -0
- package/.agents/skills/omg/proof-gate/openai.yaml +13 -0
- package/.agents/skills/omg/remote-supervisor/SKILL.md +11 -0
- package/.agents/skills/omg/remote-supervisor/openai.yaml +12 -0
- package/.agents/skills/omg/robotics/SKILL.md +11 -0
- package/.agents/skills/omg/robotics/openai.yaml +11 -0
- 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 +11 -0
- package/.agents/skills/omg/security-check/openai.yaml +13 -0
- package/.agents/skills/omg/test-intent-lock/SKILL.md +11 -0
- package/.agents/skills/omg/test-intent-lock/openai.yaml +13 -0
- package/.agents/skills/omg/tracebank/SKILL.md +11 -0
- package/.agents/skills/omg/tracebank/openai.yaml +12 -0
- package/.agents/skills/omg/vision/SKILL.md +11 -0
- package/.agents/skills/omg/vision/openai.yaml +11 -0
- package/.claude-plugin/marketplace.json +5 -5
- package/.claude-plugin/plugin.json +1 -1
- package/.claude-plugin/scripts/uninstall.sh +2 -2
- package/.mcp.json +0 -22
- package/CHANGELOG.md +13 -0
- package/OMG-setup.sh +64 -14
- package/OMG_COMPAT_CONTRACT.md +1 -1
- package/README.md +8 -6
- package/agents/omg-security-auditor.md +1 -1
- package/artifacts/release/.agents/skills/omg/AGENTS.fragment.md +52 -0
- package/artifacts/release/.agents/skills/omg/algorithms/SKILL.md +11 -0
- package/artifacts/release/.agents/skills/omg/algorithms/openai.yaml +11 -0
- package/artifacts/release/.agents/skills/omg/api-twin/SKILL.md +11 -0
- package/artifacts/release/.agents/skills/omg/api-twin/openai.yaml +12 -0
- package/artifacts/release/.agents/skills/omg/codex-mcp.toml +4 -0
- package/artifacts/release/.agents/skills/omg/codex-rules.md +29 -0
- package/artifacts/release/.agents/skills/omg/control-plane/SKILL.md +11 -0
- package/artifacts/release/.agents/skills/omg/control-plane/openai.yaml +14 -0
- package/artifacts/release/.agents/skills/omg/data-lineage/SKILL.md +11 -0
- package/artifacts/release/.agents/skills/omg/data-lineage/openai.yaml +12 -0
- package/artifacts/release/.agents/skills/omg/delta-classifier/SKILL.md +11 -0
- package/artifacts/release/.agents/skills/omg/delta-classifier/openai.yaml +12 -0
- package/artifacts/release/.agents/skills/omg/eval-gate/SKILL.md +11 -0
- package/artifacts/release/.agents/skills/omg/eval-gate/openai.yaml +12 -0
- package/artifacts/release/.agents/skills/omg/health/SKILL.md +11 -0
- package/artifacts/release/.agents/skills/omg/health/openai.yaml +11 -0
- package/artifacts/release/.agents/skills/omg/hook-governor/SKILL.md +11 -0
- package/artifacts/release/.agents/skills/omg/hook-governor/openai.yaml +11 -0
- package/artifacts/release/.agents/skills/omg/incident-replay/SKILL.md +11 -0
- package/artifacts/release/.agents/skills/omg/incident-replay/openai.yaml +12 -0
- package/artifacts/release/.agents/skills/omg/lsp-pack/SKILL.md +11 -0
- package/artifacts/release/.agents/skills/omg/lsp-pack/openai.yaml +11 -0
- package/artifacts/release/.agents/skills/omg/mcp-fabric/SKILL.md +11 -0
- package/artifacts/release/.agents/skills/omg/mcp-fabric/openai.yaml +13 -0
- package/artifacts/release/.agents/skills/omg/preflight/SKILL.md +11 -0
- package/artifacts/release/.agents/skills/omg/preflight/openai.yaml +12 -0
- package/artifacts/release/.agents/skills/omg/remote-supervisor/SKILL.md +11 -0
- package/artifacts/release/.agents/skills/omg/remote-supervisor/openai.yaml +12 -0
- package/artifacts/release/.agents/skills/omg/robotics/SKILL.md +11 -0
- package/artifacts/release/.agents/skills/omg/robotics/openai.yaml +11 -0
- package/artifacts/release/.agents/skills/omg/secure-worktree-pipeline/SKILL.md +11 -0
- package/artifacts/release/.agents/skills/omg/secure-worktree-pipeline/openai.yaml +12 -0
- package/artifacts/release/.agents/skills/omg/security-check/SKILL.md +11 -0
- package/artifacts/release/.agents/skills/omg/security-check/openai.yaml +13 -0
- package/artifacts/release/.agents/skills/omg/tracebank/SKILL.md +11 -0
- package/artifacts/release/.agents/skills/omg/tracebank/openai.yaml +12 -0
- package/artifacts/release/.agents/skills/omg/vision/SKILL.md +11 -0
- package/artifacts/release/.agents/skills/omg/vision/openai.yaml +11 -0
- package/artifacts/release/.claude-plugin/marketplace.json +36 -0
- package/artifacts/release/.claude-plugin/plugin.json +23 -0
- package/artifacts/release/.mcp.json +40 -0
- package/artifacts/release/OMG_COMPAT_CONTRACT.md +92 -0
- package/artifacts/release/dist/enterprise/bundle/.agents/skills/omg/AGENTS.fragment.md +52 -0
- package/artifacts/release/dist/enterprise/bundle/.agents/skills/omg/algorithms/SKILL.md +11 -0
- package/artifacts/release/dist/enterprise/bundle/.agents/skills/omg/algorithms/openai.yaml +11 -0
- package/artifacts/release/dist/enterprise/bundle/.agents/skills/omg/api-twin/SKILL.md +11 -0
- package/artifacts/release/dist/enterprise/bundle/.agents/skills/omg/api-twin/openai.yaml +12 -0
- package/artifacts/release/dist/enterprise/bundle/.agents/skills/omg/codex-mcp.toml +4 -0
- package/artifacts/release/dist/enterprise/bundle/.agents/skills/omg/codex-rules.md +29 -0
- package/artifacts/release/dist/enterprise/bundle/.agents/skills/omg/control-plane/SKILL.md +11 -0
- package/artifacts/release/dist/enterprise/bundle/.agents/skills/omg/control-plane/openai.yaml +14 -0
- package/artifacts/release/dist/enterprise/bundle/.agents/skills/omg/data-lineage/SKILL.md +11 -0
- package/artifacts/release/dist/enterprise/bundle/.agents/skills/omg/data-lineage/openai.yaml +12 -0
- package/artifacts/release/dist/enterprise/bundle/.agents/skills/omg/delta-classifier/SKILL.md +11 -0
- package/artifacts/release/dist/enterprise/bundle/.agents/skills/omg/delta-classifier/openai.yaml +12 -0
- package/artifacts/release/dist/enterprise/bundle/.agents/skills/omg/eval-gate/SKILL.md +11 -0
- package/artifacts/release/dist/enterprise/bundle/.agents/skills/omg/eval-gate/openai.yaml +12 -0
- package/artifacts/release/dist/enterprise/bundle/.agents/skills/omg/health/SKILL.md +11 -0
- package/artifacts/release/dist/enterprise/bundle/.agents/skills/omg/health/openai.yaml +11 -0
- package/artifacts/release/dist/enterprise/bundle/.agents/skills/omg/hook-governor/SKILL.md +11 -0
- package/artifacts/release/dist/enterprise/bundle/.agents/skills/omg/hook-governor/openai.yaml +11 -0
- package/artifacts/release/dist/enterprise/bundle/.agents/skills/omg/incident-replay/SKILL.md +11 -0
- package/artifacts/release/dist/enterprise/bundle/.agents/skills/omg/incident-replay/openai.yaml +12 -0
- package/artifacts/release/dist/enterprise/bundle/.agents/skills/omg/lsp-pack/SKILL.md +11 -0
- package/artifacts/release/dist/enterprise/bundle/.agents/skills/omg/lsp-pack/openai.yaml +11 -0
- package/artifacts/release/dist/enterprise/bundle/.agents/skills/omg/mcp-fabric/SKILL.md +11 -0
- package/artifacts/release/dist/enterprise/bundle/.agents/skills/omg/mcp-fabric/openai.yaml +13 -0
- package/artifacts/release/dist/enterprise/bundle/.agents/skills/omg/preflight/SKILL.md +11 -0
- package/artifacts/release/dist/enterprise/bundle/.agents/skills/omg/preflight/openai.yaml +12 -0
- package/artifacts/release/dist/enterprise/bundle/.agents/skills/omg/remote-supervisor/SKILL.md +11 -0
- package/artifacts/release/dist/enterprise/bundle/.agents/skills/omg/remote-supervisor/openai.yaml +12 -0
- package/artifacts/release/dist/enterprise/bundle/.agents/skills/omg/robotics/SKILL.md +11 -0
- package/artifacts/release/dist/enterprise/bundle/.agents/skills/omg/robotics/openai.yaml +11 -0
- package/artifacts/release/dist/enterprise/bundle/.agents/skills/omg/secure-worktree-pipeline/SKILL.md +11 -0
- package/artifacts/release/dist/enterprise/bundle/.agents/skills/omg/secure-worktree-pipeline/openai.yaml +12 -0
- package/artifacts/release/dist/enterprise/bundle/.agents/skills/omg/security-check/SKILL.md +11 -0
- package/artifacts/release/dist/enterprise/bundle/.agents/skills/omg/security-check/openai.yaml +13 -0
- package/artifacts/release/dist/enterprise/bundle/.agents/skills/omg/tracebank/SKILL.md +11 -0
- package/artifacts/release/dist/enterprise/bundle/.agents/skills/omg/tracebank/openai.yaml +12 -0
- package/artifacts/release/dist/enterprise/bundle/.agents/skills/omg/vision/SKILL.md +11 -0
- package/artifacts/release/dist/enterprise/bundle/.agents/skills/omg/vision/openai.yaml +11 -0
- package/artifacts/release/dist/enterprise/bundle/OMG_COMPAT_CONTRACT.md +92 -0
- package/artifacts/release/dist/enterprise/bundle/registry/bundles/algorithms.yaml +45 -0
- package/artifacts/release/dist/enterprise/bundle/registry/bundles/api-twin.yaml +48 -0
- package/artifacts/release/dist/enterprise/bundle/registry/bundles/control-plane.yaml +151 -0
- package/artifacts/release/dist/enterprise/bundle/registry/bundles/data-lineage.yaml +47 -0
- package/artifacts/release/dist/enterprise/bundle/registry/bundles/delta-classifier.yaml +47 -0
- package/artifacts/release/dist/enterprise/bundle/registry/bundles/eval-gate.yaml +47 -0
- package/artifacts/release/dist/enterprise/bundle/registry/bundles/health.yaml +45 -0
- package/artifacts/release/dist/enterprise/bundle/registry/bundles/hook-governor.yaml +97 -0
- package/artifacts/release/dist/enterprise/bundle/registry/bundles/incident-replay.yaml +47 -0
- package/artifacts/release/dist/enterprise/bundle/registry/bundles/lsp-pack.yaml +48 -0
- package/artifacts/release/dist/enterprise/bundle/registry/bundles/mcp-fabric.yaml +53 -0
- package/artifacts/release/dist/enterprise/bundle/registry/bundles/preflight.yaml +48 -0
- package/artifacts/release/dist/enterprise/bundle/registry/bundles/remote-supervisor.yaml +49 -0
- package/artifacts/release/dist/enterprise/bundle/registry/bundles/robotics.yaml +45 -0
- package/artifacts/release/dist/enterprise/bundle/registry/bundles/secure-worktree-pipeline.yaml +54 -0
- package/artifacts/release/dist/enterprise/bundle/registry/bundles/security-check.yaml +50 -0
- package/artifacts/release/dist/enterprise/bundle/registry/bundles/tracebank.yaml +47 -0
- package/artifacts/release/dist/enterprise/bundle/registry/bundles/vision.yaml +45 -0
- package/artifacts/release/dist/enterprise/bundle/registry/omg-capability.schema.json +296 -0
- package/artifacts/release/dist/enterprise/manifest.json +243 -0
- package/artifacts/release/dist/public/bundle/.agents/skills/omg/AGENTS.fragment.md +7 -0
- package/artifacts/release/dist/public/bundle/.agents/skills/omg/algorithms/SKILL.md +11 -0
- package/artifacts/release/dist/public/bundle/.agents/skills/omg/algorithms/openai.yaml +11 -0
- package/artifacts/release/dist/public/bundle/.agents/skills/omg/api-twin/SKILL.md +11 -0
- package/artifacts/release/dist/public/bundle/.agents/skills/omg/api-twin/openai.yaml +12 -0
- package/artifacts/release/dist/public/bundle/.agents/skills/omg/codex-mcp.toml +4 -0
- package/artifacts/release/dist/public/bundle/.agents/skills/omg/control-plane/SKILL.md +11 -0
- package/artifacts/release/dist/public/bundle/.agents/skills/omg/control-plane/openai.yaml +14 -0
- package/artifacts/release/dist/public/bundle/.agents/skills/omg/data-lineage/SKILL.md +11 -0
- package/artifacts/release/dist/public/bundle/.agents/skills/omg/data-lineage/openai.yaml +12 -0
- package/artifacts/release/dist/public/bundle/.agents/skills/omg/delta-classifier/SKILL.md +11 -0
- package/artifacts/release/dist/public/bundle/.agents/skills/omg/delta-classifier/openai.yaml +12 -0
- package/artifacts/release/dist/public/bundle/.agents/skills/omg/eval-gate/SKILL.md +11 -0
- package/artifacts/release/dist/public/bundle/.agents/skills/omg/eval-gate/openai.yaml +12 -0
- package/artifacts/release/dist/public/bundle/.agents/skills/omg/health/SKILL.md +11 -0
- package/artifacts/release/dist/public/bundle/.agents/skills/omg/health/openai.yaml +11 -0
- package/artifacts/release/dist/public/bundle/.agents/skills/omg/hook-governor/SKILL.md +11 -0
- package/artifacts/release/dist/public/bundle/.agents/skills/omg/hook-governor/openai.yaml +11 -0
- package/artifacts/release/dist/public/bundle/.agents/skills/omg/incident-replay/SKILL.md +11 -0
- package/artifacts/release/dist/public/bundle/.agents/skills/omg/incident-replay/openai.yaml +12 -0
- package/artifacts/release/dist/public/bundle/.agents/skills/omg/lsp-pack/SKILL.md +11 -0
- package/artifacts/release/dist/public/bundle/.agents/skills/omg/lsp-pack/openai.yaml +11 -0
- package/artifacts/release/dist/public/bundle/.agents/skills/omg/mcp-fabric/SKILL.md +11 -0
- package/artifacts/release/dist/public/bundle/.agents/skills/omg/mcp-fabric/openai.yaml +13 -0
- package/artifacts/release/dist/public/bundle/.agents/skills/omg/preflight/SKILL.md +11 -0
- package/artifacts/release/dist/public/bundle/.agents/skills/omg/preflight/openai.yaml +12 -0
- package/artifacts/release/dist/public/bundle/.agents/skills/omg/remote-supervisor/SKILL.md +11 -0
- package/artifacts/release/dist/public/bundle/.agents/skills/omg/remote-supervisor/openai.yaml +12 -0
- package/artifacts/release/dist/public/bundle/.agents/skills/omg/robotics/SKILL.md +11 -0
- package/artifacts/release/dist/public/bundle/.agents/skills/omg/robotics/openai.yaml +11 -0
- package/artifacts/release/dist/public/bundle/.agents/skills/omg/secure-worktree-pipeline/SKILL.md +11 -0
- package/artifacts/release/dist/public/bundle/.agents/skills/omg/secure-worktree-pipeline/openai.yaml +12 -0
- package/artifacts/release/dist/public/bundle/.agents/skills/omg/security-check/SKILL.md +11 -0
- package/artifacts/release/dist/public/bundle/.agents/skills/omg/security-check/openai.yaml +13 -0
- package/artifacts/release/dist/public/bundle/.agents/skills/omg/tracebank/SKILL.md +11 -0
- package/artifacts/release/dist/public/bundle/.agents/skills/omg/tracebank/openai.yaml +12 -0
- package/artifacts/release/dist/public/bundle/.agents/skills/omg/vision/SKILL.md +11 -0
- package/artifacts/release/dist/public/bundle/.agents/skills/omg/vision/openai.yaml +11 -0
- package/artifacts/release/dist/public/bundle/.claude-plugin/marketplace.json +36 -0
- package/artifacts/release/dist/public/bundle/.claude-plugin/plugin.json +23 -0
- package/artifacts/release/dist/public/bundle/.mcp.json +40 -0
- package/artifacts/release/dist/public/bundle/OMG_COMPAT_CONTRACT.md +92 -0
- package/artifacts/release/dist/public/bundle/registry/bundles/algorithms.yaml +45 -0
- package/artifacts/release/dist/public/bundle/registry/bundles/api-twin.yaml +48 -0
- package/artifacts/release/dist/public/bundle/registry/bundles/control-plane.yaml +151 -0
- package/artifacts/release/dist/public/bundle/registry/bundles/data-lineage.yaml +47 -0
- package/artifacts/release/dist/public/bundle/registry/bundles/delta-classifier.yaml +47 -0
- package/artifacts/release/dist/public/bundle/registry/bundles/eval-gate.yaml +47 -0
- package/artifacts/release/dist/public/bundle/registry/bundles/health.yaml +45 -0
- package/artifacts/release/dist/public/bundle/registry/bundles/hook-governor.yaml +97 -0
- package/artifacts/release/dist/public/bundle/registry/bundles/incident-replay.yaml +47 -0
- package/artifacts/release/dist/public/bundle/registry/bundles/lsp-pack.yaml +48 -0
- package/artifacts/release/dist/public/bundle/registry/bundles/mcp-fabric.yaml +53 -0
- package/artifacts/release/dist/public/bundle/registry/bundles/preflight.yaml +48 -0
- package/artifacts/release/dist/public/bundle/registry/bundles/remote-supervisor.yaml +49 -0
- package/artifacts/release/dist/public/bundle/registry/bundles/robotics.yaml +45 -0
- package/artifacts/release/dist/public/bundle/registry/bundles/secure-worktree-pipeline.yaml +54 -0
- package/artifacts/release/dist/public/bundle/registry/bundles/security-check.yaml +50 -0
- package/artifacts/release/dist/public/bundle/registry/bundles/tracebank.yaml +47 -0
- package/artifacts/release/dist/public/bundle/registry/bundles/vision.yaml +45 -0
- package/artifacts/release/dist/public/bundle/registry/omg-capability.schema.json +296 -0
- package/artifacts/release/dist/public/bundle/settings.json +526 -0
- package/artifacts/release/dist/public/manifest.json +255 -0
- package/artifacts/release/registry/bundles/algorithms.yaml +45 -0
- package/artifacts/release/registry/bundles/api-twin.yaml +48 -0
- package/artifacts/release/registry/bundles/control-plane.yaml +151 -0
- package/artifacts/release/registry/bundles/data-lineage.yaml +47 -0
- package/artifacts/release/registry/bundles/delta-classifier.yaml +47 -0
- package/artifacts/release/registry/bundles/eval-gate.yaml +47 -0
- package/artifacts/release/registry/bundles/health.yaml +45 -0
- package/artifacts/release/registry/bundles/hook-governor.yaml +97 -0
- package/artifacts/release/registry/bundles/incident-replay.yaml +47 -0
- package/artifacts/release/registry/bundles/lsp-pack.yaml +48 -0
- package/artifacts/release/registry/bundles/mcp-fabric.yaml +53 -0
- package/artifacts/release/registry/bundles/preflight.yaml +48 -0
- package/artifacts/release/registry/bundles/remote-supervisor.yaml +49 -0
- package/artifacts/release/registry/bundles/robotics.yaml +45 -0
- package/artifacts/release/registry/bundles/secure-worktree-pipeline.yaml +54 -0
- package/artifacts/release/registry/bundles/security-check.yaml +50 -0
- package/artifacts/release/registry/bundles/tracebank.yaml +47 -0
- package/artifacts/release/registry/bundles/vision.yaml +45 -0
- package/artifacts/release/registry/omg-capability.schema.json +296 -0
- package/artifacts/release/settings.json +594 -0
- package/build/lib/agents/__init__.py +1 -0
- package/build/lib/agents/designer.md +67 -0
- package/build/lib/agents/explore.md +60 -0
- package/build/lib/agents/model_roles.py +196 -0
- package/build/lib/agents/omg-api-builder.md +23 -0
- package/build/lib/agents/omg-architect-mode.md +41 -0
- package/build/lib/agents/omg-architect.md +13 -0
- package/build/lib/agents/omg-backend-engineer.md +41 -0
- package/build/lib/agents/omg-critic.md +16 -0
- package/build/lib/agents/omg-database-engineer.md +41 -0
- package/build/lib/agents/omg-escalation-router.md +17 -0
- package/build/lib/agents/omg-executor.md +12 -0
- package/build/lib/agents/omg-frontend-designer.md +41 -0
- package/build/lib/agents/omg-implement-mode.md +49 -0
- package/build/lib/agents/omg-infra-engineer.md +41 -0
- package/build/lib/agents/omg-qa-tester.md +16 -0
- package/build/lib/agents/omg-research-mode.md +41 -0
- package/build/lib/agents/omg-security-auditor.md +41 -0
- package/build/lib/agents/omg-testing-engineer.md +41 -0
- package/build/lib/agents/plan.md +80 -0
- package/build/lib/agents/quick_task.md +64 -0
- package/build/lib/agents/reviewer.md +83 -0
- package/build/lib/agents/task.md +71 -0
- package/build/lib/commands/OMG:ai-commit.md +113 -0
- package/build/lib/commands/OMG:api-twin.md +22 -0
- package/build/lib/commands/OMG:arch.md +313 -0
- package/build/lib/commands/OMG:ccg.md +22 -0
- package/build/lib/commands/OMG:compat.md +57 -0
- package/build/lib/commands/OMG:cost.md +181 -0
- package/build/lib/commands/OMG:crazy.md +125 -0
- package/build/lib/commands/OMG:create-agent.md +183 -0
- package/build/lib/commands/OMG:deps.md +248 -0
- package/build/lib/commands/OMG:doctor.md +37 -0
- package/build/lib/commands/OMG:domain-init.md +11 -0
- package/build/lib/commands/OMG:escalate.md +52 -0
- package/build/lib/commands/OMG:health-check.md +45 -0
- package/build/lib/commands/OMG:init.md +134 -0
- package/build/lib/commands/OMG:mode.md +44 -0
- package/build/lib/commands/OMG:preflight.md +26 -0
- package/build/lib/commands/OMG:project-init.md +11 -0
- package/build/lib/commands/OMG:ralph-start.md +43 -0
- package/build/lib/commands/OMG:ralph-stop.md +23 -0
- package/build/lib/commands/OMG:security-check.md +28 -0
- package/build/lib/commands/OMG:session-branch.md +85 -0
- package/build/lib/commands/OMG:session-fork.md +53 -0
- package/build/lib/commands/OMG:session-merge.md +134 -0
- package/build/lib/commands/OMG:setup.md +78 -0
- package/build/lib/commands/OMG:stats.md +225 -0
- package/build/lib/commands/OMG:teams.md +39 -0
- package/build/lib/commands/OMG:theme.md +44 -0
- package/build/lib/commands/__init__.py +1 -0
- package/build/lib/control_plane/__init__.py +2 -0
- package/build/lib/control_plane/openapi.yaml +260 -0
- package/build/lib/control_plane/server.py +147 -0
- package/build/lib/control_plane/service.py +222 -0
- package/build/lib/hooks/__init__.py +0 -0
- package/build/lib/hooks/_agent_registry.py +423 -0
- package/build/lib/hooks/_analytics.py +291 -0
- package/build/lib/hooks/_budget.py +31 -0
- package/build/lib/hooks/_common.py +569 -0
- package/build/lib/hooks/_compression_optimizer.py +119 -0
- package/build/lib/hooks/_cost_ledger.py +176 -0
- package/build/lib/hooks/_learnings.py +126 -0
- package/build/lib/hooks/_memory.py +103 -0
- package/build/lib/hooks/_protected_context.py +150 -0
- package/build/lib/hooks/_token_counter.py +221 -0
- package/build/lib/hooks/branch_manager.py +236 -0
- package/build/lib/hooks/budget_governor.py +232 -0
- package/build/lib/hooks/circuit-breaker.py +270 -0
- package/build/lib/hooks/compression_feedback.py +254 -0
- package/build/lib/hooks/config-guard.py +216 -0
- package/build/lib/hooks/context_pressure.py +53 -0
- package/build/lib/hooks/credential_store.py +1020 -0
- package/build/lib/hooks/fetch-rate-limits.py +212 -0
- package/build/lib/hooks/firewall.py +48 -0
- package/build/lib/hooks/hashline-formatter-bridge.py +224 -0
- package/build/lib/hooks/hashline-injector.py +273 -0
- package/build/lib/hooks/hashline-validator.py +216 -0
- package/build/lib/hooks/idle-detector.py +95 -0
- package/build/lib/hooks/intentgate-keyword-detector.py +188 -0
- package/build/lib/hooks/magic-keyword-router.py +195 -0
- package/build/lib/hooks/policy_engine.py +641 -0
- package/build/lib/hooks/post-tool-failure.py +19 -0
- package/build/lib/hooks/post-write.py +219 -0
- package/build/lib/hooks/post_write.py +46 -0
- package/build/lib/hooks/pre-compact.py +398 -0
- package/build/lib/hooks/pre-tool-inject.py +98 -0
- package/build/lib/hooks/prompt-enhancer.py +672 -0
- package/build/lib/hooks/quality-runner.py +191 -0
- package/build/lib/hooks/query.py +512 -0
- package/build/lib/hooks/secret-guard.py +61 -0
- package/build/lib/hooks/secret_audit.py +144 -0
- package/build/lib/hooks/security_validators.py +75 -0
- package/build/lib/hooks/session-end-capture.py +137 -0
- package/build/lib/hooks/session-start.py +277 -0
- package/build/lib/hooks/setup_wizard.py +646 -0
- package/build/lib/hooks/shadow_manager.py +344 -0
- package/build/lib/hooks/state_migration.py +225 -0
- package/build/lib/hooks/stop-gate.py +7 -0
- package/build/lib/hooks/stop_dispatcher.py +945 -0
- package/build/lib/hooks/test-validator.py +361 -0
- package/build/lib/hooks/test_generator_hook.py +123 -0
- package/build/lib/hooks/todo-state-tracker.py +114 -0
- package/build/lib/hooks/tool-ledger.py +149 -0
- package/build/lib/hooks/trust_review.py +585 -0
- package/build/lib/plugins/README.md +60 -0
- package/build/lib/plugins/__init__.py +1 -0
- package/build/lib/plugins/advanced/commands/OMG:code-review.md +114 -0
- package/build/lib/plugins/advanced/commands/OMG:deep-plan.md +265 -0
- package/build/lib/plugins/advanced/commands/OMG:handoff.md +115 -0
- package/build/lib/plugins/advanced/commands/OMG:learn.md +110 -0
- package/build/lib/plugins/advanced/commands/OMG:maintainer.md +31 -0
- package/build/lib/plugins/advanced/commands/OMG:ralph-start.md +43 -0
- package/build/lib/plugins/advanced/commands/OMG:ralph-stop.md +23 -0
- package/build/lib/plugins/advanced/commands/OMG:security-review.md +16 -0
- package/build/lib/plugins/advanced/commands/OMG:sequential-thinking.md +20 -0
- package/build/lib/plugins/advanced/commands/OMG:ship.md +46 -0
- package/build/lib/plugins/advanced/plugin.json +87 -0
- package/build/lib/plugins/core/plugin.json +145 -0
- package/build/lib/plugins/dephealth/__init__.py +0 -0
- package/build/lib/plugins/dephealth/cve_scanner.py +188 -0
- package/build/lib/plugins/dephealth/license_checker.py +135 -0
- package/build/lib/plugins/dephealth/manifest_detector.py +423 -0
- package/build/lib/plugins/dephealth/vuln_analyzer.py +169 -0
- package/build/lib/plugins/testgen/__init__.py +0 -0
- package/build/lib/plugins/testgen/codamosa_engine.py +402 -0
- package/build/lib/plugins/testgen/edge_case_synthesizer.py +184 -0
- package/build/lib/plugins/testgen/framework_detector.py +271 -0
- package/build/lib/plugins/testgen/skeleton_generator.py +219 -0
- package/build/lib/plugins/viz/__init__.py +0 -0
- package/build/lib/plugins/viz/ast_parser.py +139 -0
- package/build/lib/plugins/viz/diagram_generator.py +192 -0
- package/build/lib/plugins/viz/graph_builder.py +444 -0
- package/build/lib/plugins/viz/native_parsers.py +259 -0
- package/build/lib/plugins/viz/regex_parser.py +112 -0
- package/build/lib/registry/__init__.py +1 -0
- package/build/lib/registry/bundles/algorithms.yaml +45 -0
- package/build/lib/registry/bundles/api-twin.yaml +48 -0
- package/build/lib/registry/bundles/claim-judge.yaml +49 -0
- package/build/lib/registry/bundles/control-plane.yaml +151 -0
- package/build/lib/registry/bundles/data-lineage.yaml +47 -0
- package/build/lib/registry/bundles/delta-classifier.yaml +47 -0
- package/build/lib/registry/bundles/eval-gate.yaml +47 -0
- package/build/lib/registry/bundles/health.yaml +45 -0
- package/build/lib/registry/bundles/hook-governor.yaml +97 -0
- package/build/lib/registry/bundles/incident-replay.yaml +47 -0
- package/build/lib/registry/bundles/lsp-pack.yaml +48 -0
- package/build/lib/registry/bundles/mcp-fabric.yaml +53 -0
- package/build/lib/registry/bundles/plan-council.yaml +51 -0
- package/build/lib/registry/bundles/preflight.yaml +48 -0
- package/build/lib/registry/bundles/proof-gate.yaml +49 -0
- package/build/lib/registry/bundles/remote-supervisor.yaml +49 -0
- package/build/lib/registry/bundles/robotics.yaml +45 -0
- package/build/lib/registry/bundles/secure-worktree-pipeline.yaml +54 -0
- package/build/lib/registry/bundles/security-check.yaml +50 -0
- package/build/lib/registry/bundles/test-intent-lock.yaml +49 -0
- package/build/lib/registry/bundles/tracebank.yaml +47 -0
- package/build/lib/registry/bundles/vision.yaml +45 -0
- package/build/lib/registry/omg-capability.schema.json +296 -0
- package/build/lib/registry/verify_artifact.py +90 -0
- package/build/lib/runtime/__init__.py +32 -0
- package/build/lib/runtime/adapters/__init__.py +13 -0
- package/build/lib/runtime/adapters/claude.py +63 -0
- package/build/lib/runtime/adapters/gpt.py +56 -0
- package/build/lib/runtime/adapters/local.py +56 -0
- package/build/lib/runtime/adoption.py +212 -0
- package/build/lib/runtime/api_twin.py +450 -0
- package/build/lib/runtime/asset_loader.py +62 -0
- package/build/lib/runtime/business_workflow.py +234 -0
- package/build/lib/runtime/claim_judge.py +95 -0
- package/build/lib/runtime/cli_provider.py +85 -0
- package/build/lib/runtime/compat.py +1459 -0
- package/build/lib/runtime/contract_compiler.py +1918 -0
- package/build/lib/runtime/custom_agent_loader.py +366 -0
- package/build/lib/runtime/data_lineage.py +73 -0
- package/build/lib/runtime/delta_classifier.py +81 -0
- package/build/lib/runtime/dispatcher.py +47 -0
- package/build/lib/runtime/domain_packs.py +46 -0
- package/build/lib/runtime/ecosystem.py +371 -0
- package/build/lib/runtime/eval_gate.py +96 -0
- package/build/lib/runtime/guide_assert.py +45 -0
- package/build/lib/runtime/incident_replay.py +47 -0
- package/build/lib/runtime/legacy_compat.py +7 -0
- package/build/lib/runtime/mcp_config_writers.py +233 -0
- package/build/lib/runtime/mcp_lifecycle.py +175 -0
- package/build/lib/runtime/mcp_memory_server.py +135 -0
- package/build/lib/runtime/memory_parsers/__init__.py +0 -0
- package/build/lib/runtime/memory_parsers/chatgpt_parser.py +257 -0
- package/build/lib/runtime/memory_parsers/claude_import.py +107 -0
- package/build/lib/runtime/memory_parsers/export.py +97 -0
- package/build/lib/runtime/memory_parsers/gemini_import.py +91 -0
- package/build/lib/runtime/memory_parsers/kimi_import.py +91 -0
- package/build/lib/runtime/memory_store.py +215 -0
- package/build/lib/runtime/omc_compat.py +7 -0
- package/build/lib/runtime/omg_compat_contract_snapshot.json +916 -0
- package/build/lib/runtime/omg_contract_snapshot.json +916 -0
- package/build/lib/runtime/omg_mcp_server.py +212 -0
- package/build/lib/runtime/playwright_pack.py +169 -0
- package/build/lib/runtime/preflight.py +117 -0
- package/build/lib/runtime/proof_chain.py +228 -0
- package/build/lib/runtime/proof_gate.py +163 -0
- package/build/lib/runtime/providers/__init__.py +0 -0
- package/build/lib/runtime/providers/codex_provider.py +102 -0
- package/build/lib/runtime/providers/gemini_provider.py +109 -0
- package/build/lib/runtime/providers/kimi_provider.py +132 -0
- package/build/lib/runtime/remote_supervisor.py +64 -0
- package/build/lib/runtime/runtime_profile.py +61 -0
- package/build/lib/runtime/security_check.py +965 -0
- package/build/lib/runtime/subagent_dispatcher.py +469 -0
- package/build/lib/runtime/team_router.py +1167 -0
- package/build/lib/runtime/test_intent_lock.py +91 -0
- package/build/lib/runtime/tmux_session_manager.py +169 -0
- package/build/lib/runtime/tracebank.py +95 -0
- package/build/lib/runtime/untrusted_content.py +269 -0
- package/commands/OMG:doctor.md +37 -0
- package/commands/OMG:preflight.md +1 -1
- package/commands/__init__.py +1 -0
- package/control_plane/__init__.py +2 -0
- package/control_plane/openapi.yaml +260 -0
- package/control_plane/server.py +147 -0
- package/control_plane/service.py +222 -0
- package/dist/enterprise/bundle/.agents/skills/omg/AGENTS.fragment.md +50 -3
- package/dist/enterprise/bundle/.agents/skills/omg/algorithms/SKILL.md +11 -0
- package/dist/enterprise/bundle/.agents/skills/omg/algorithms/openai.yaml +11 -0
- package/dist/enterprise/bundle/.agents/skills/omg/api-twin/SKILL.md +11 -0
- package/dist/enterprise/bundle/.agents/skills/omg/api-twin/openai.yaml +12 -0
- package/dist/enterprise/bundle/.agents/skills/omg/codex-rules.md +29 -0
- package/dist/enterprise/bundle/.agents/skills/omg/data-lineage/SKILL.md +11 -0
- package/dist/enterprise/bundle/.agents/skills/omg/data-lineage/openai.yaml +12 -0
- package/dist/enterprise/bundle/.agents/skills/omg/delta-classifier/SKILL.md +11 -0
- package/dist/enterprise/bundle/.agents/skills/omg/delta-classifier/openai.yaml +12 -0
- package/dist/enterprise/bundle/.agents/skills/omg/eval-gate/SKILL.md +11 -0
- package/dist/enterprise/bundle/.agents/skills/omg/eval-gate/openai.yaml +12 -0
- package/dist/enterprise/bundle/.agents/skills/omg/health/SKILL.md +11 -0
- package/dist/enterprise/bundle/.agents/skills/omg/health/openai.yaml +11 -0
- package/dist/enterprise/bundle/.agents/skills/omg/incident-replay/SKILL.md +11 -0
- package/dist/enterprise/bundle/.agents/skills/omg/incident-replay/openai.yaml +12 -0
- package/dist/enterprise/bundle/.agents/skills/omg/preflight/SKILL.md +11 -0
- package/dist/enterprise/bundle/.agents/skills/omg/preflight/openai.yaml +12 -0
- package/dist/enterprise/bundle/.agents/skills/omg/remote-supervisor/SKILL.md +11 -0
- package/dist/enterprise/bundle/.agents/skills/omg/remote-supervisor/openai.yaml +12 -0
- package/dist/enterprise/bundle/.agents/skills/omg/robotics/SKILL.md +11 -0
- package/dist/enterprise/bundle/.agents/skills/omg/robotics/openai.yaml +11 -0
- package/dist/enterprise/bundle/.agents/skills/omg/security-check/SKILL.md +11 -0
- package/dist/enterprise/bundle/.agents/skills/omg/security-check/openai.yaml +13 -0
- package/dist/enterprise/bundle/.agents/skills/omg/tracebank/SKILL.md +11 -0
- package/dist/enterprise/bundle/.agents/skills/omg/tracebank/openai.yaml +12 -0
- package/dist/enterprise/bundle/.agents/skills/omg/vision/SKILL.md +11 -0
- package/dist/enterprise/bundle/.agents/skills/omg/vision/openai.yaml +11 -0
- package/dist/enterprise/bundle/.claude-plugin/marketplace.json +5 -5
- 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/commands/OMG:code-review.md +114 -0
- package/dist/enterprise/bundle/plugins/advanced/commands/OMG:deep-plan.md +221 -0
- package/dist/enterprise/bundle/plugins/advanced/commands/OMG:handoff.md +115 -0
- package/dist/enterprise/bundle/plugins/advanced/commands/OMG:learn.md +110 -0
- package/dist/enterprise/bundle/plugins/advanced/commands/OMG:maintainer.md +31 -0
- package/dist/enterprise/bundle/plugins/advanced/commands/OMG:ralph-start.md +43 -0
- package/dist/enterprise/bundle/plugins/advanced/commands/OMG:ralph-stop.md +23 -0
- package/dist/enterprise/bundle/plugins/advanced/commands/OMG:security-review.md +16 -0
- package/dist/enterprise/bundle/plugins/advanced/commands/OMG:sequential-thinking.md +20 -0
- package/dist/enterprise/bundle/plugins/advanced/commands/OMG:ship.md +46 -0
- package/dist/enterprise/bundle/plugins/advanced/plugin.json +87 -0
- package/dist/enterprise/bundle/registry/bundles/algorithms.yaml +45 -0
- package/dist/enterprise/bundle/registry/bundles/api-twin.yaml +48 -0
- package/dist/enterprise/bundle/registry/bundles/control-plane.yaml +151 -0
- package/dist/enterprise/bundle/registry/bundles/data-lineage.yaml +47 -0
- package/dist/enterprise/bundle/registry/bundles/delta-classifier.yaml +47 -0
- package/dist/enterprise/bundle/registry/bundles/eval-gate.yaml +47 -0
- package/dist/enterprise/bundle/registry/bundles/health.yaml +45 -0
- package/dist/enterprise/bundle/registry/bundles/hook-governor.yaml +97 -0
- package/dist/enterprise/bundle/registry/bundles/incident-replay.yaml +47 -0
- package/dist/enterprise/bundle/registry/bundles/lsp-pack.yaml +48 -0
- package/dist/enterprise/bundle/registry/bundles/mcp-fabric.yaml +53 -0
- package/dist/enterprise/bundle/registry/bundles/preflight.yaml +48 -0
- package/dist/enterprise/bundle/registry/bundles/remote-supervisor.yaml +49 -0
- package/dist/enterprise/bundle/registry/bundles/robotics.yaml +45 -0
- package/dist/enterprise/bundle/registry/bundles/secure-worktree-pipeline.yaml +54 -0
- package/dist/enterprise/bundle/registry/bundles/security-check.yaml +50 -0
- package/dist/enterprise/bundle/registry/bundles/tracebank.yaml +47 -0
- package/dist/enterprise/bundle/registry/bundles/vision.yaml +45 -0
- package/dist/enterprise/bundle/registry/omg-capability.schema.json +296 -0
- package/dist/enterprise/bundle/settings.json +233 -5
- package/dist/enterprise/manifest.json +216 -12
- package/dist/public/bundle/.agents/skills/omg/AGENTS.fragment.md +50 -3
- package/dist/public/bundle/.agents/skills/omg/algorithms/SKILL.md +11 -0
- package/dist/public/bundle/.agents/skills/omg/algorithms/openai.yaml +11 -0
- package/dist/public/bundle/.agents/skills/omg/api-twin/SKILL.md +11 -0
- package/dist/public/bundle/.agents/skills/omg/api-twin/openai.yaml +12 -0
- package/dist/public/bundle/.agents/skills/omg/codex-rules.md +29 -0
- package/dist/public/bundle/.agents/skills/omg/data-lineage/SKILL.md +11 -0
- package/dist/public/bundle/.agents/skills/omg/data-lineage/openai.yaml +12 -0
- package/dist/public/bundle/.agents/skills/omg/delta-classifier/SKILL.md +11 -0
- package/dist/public/bundle/.agents/skills/omg/delta-classifier/openai.yaml +12 -0
- package/dist/public/bundle/.agents/skills/omg/eval-gate/SKILL.md +11 -0
- package/dist/public/bundle/.agents/skills/omg/eval-gate/openai.yaml +12 -0
- package/dist/public/bundle/.agents/skills/omg/health/SKILL.md +11 -0
- package/dist/public/bundle/.agents/skills/omg/health/openai.yaml +11 -0
- package/dist/public/bundle/.agents/skills/omg/incident-replay/SKILL.md +11 -0
- package/dist/public/bundle/.agents/skills/omg/incident-replay/openai.yaml +12 -0
- package/dist/public/bundle/.agents/skills/omg/preflight/SKILL.md +11 -0
- package/dist/public/bundle/.agents/skills/omg/preflight/openai.yaml +12 -0
- package/dist/public/bundle/.agents/skills/omg/remote-supervisor/SKILL.md +11 -0
- package/dist/public/bundle/.agents/skills/omg/remote-supervisor/openai.yaml +12 -0
- package/dist/public/bundle/.agents/skills/omg/robotics/SKILL.md +11 -0
- package/dist/public/bundle/.agents/skills/omg/robotics/openai.yaml +11 -0
- package/dist/public/bundle/.agents/skills/omg/security-check/SKILL.md +11 -0
- package/dist/public/bundle/.agents/skills/omg/security-check/openai.yaml +13 -0
- package/dist/public/bundle/.agents/skills/omg/tracebank/SKILL.md +11 -0
- package/dist/public/bundle/.agents/skills/omg/tracebank/openai.yaml +12 -0
- package/dist/public/bundle/.agents/skills/omg/vision/SKILL.md +11 -0
- package/dist/public/bundle/.agents/skills/omg/vision/openai.yaml +11 -0
- package/dist/public/bundle/.claude-plugin/marketplace.json +5 -5
- 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/commands/OMG:code-review.md +114 -0
- package/dist/public/bundle/plugins/advanced/commands/OMG:deep-plan.md +221 -0
- package/dist/public/bundle/plugins/advanced/commands/OMG:handoff.md +115 -0
- package/dist/public/bundle/plugins/advanced/commands/OMG:learn.md +110 -0
- package/dist/public/bundle/plugins/advanced/commands/OMG:maintainer.md +31 -0
- package/dist/public/bundle/plugins/advanced/commands/OMG:ralph-start.md +43 -0
- package/dist/public/bundle/plugins/advanced/commands/OMG:ralph-stop.md +23 -0
- package/dist/public/bundle/plugins/advanced/commands/OMG:security-review.md +16 -0
- package/dist/public/bundle/plugins/advanced/commands/OMG:sequential-thinking.md +20 -0
- package/dist/public/bundle/plugins/advanced/commands/OMG:ship.md +46 -0
- package/dist/public/bundle/plugins/advanced/plugin.json +87 -0
- package/dist/public/bundle/registry/bundles/algorithms.yaml +45 -0
- package/dist/public/bundle/registry/bundles/api-twin.yaml +48 -0
- package/dist/public/bundle/registry/bundles/control-plane.yaml +151 -0
- package/dist/public/bundle/registry/bundles/data-lineage.yaml +47 -0
- package/dist/public/bundle/registry/bundles/delta-classifier.yaml +47 -0
- package/dist/public/bundle/registry/bundles/eval-gate.yaml +47 -0
- package/dist/public/bundle/registry/bundles/health.yaml +45 -0
- package/dist/public/bundle/registry/bundles/hook-governor.yaml +97 -0
- package/dist/public/bundle/registry/bundles/incident-replay.yaml +47 -0
- package/dist/public/bundle/registry/bundles/lsp-pack.yaml +48 -0
- package/dist/public/bundle/registry/bundles/mcp-fabric.yaml +53 -0
- package/dist/public/bundle/registry/bundles/preflight.yaml +48 -0
- package/dist/public/bundle/registry/bundles/remote-supervisor.yaml +49 -0
- package/dist/public/bundle/registry/bundles/robotics.yaml +45 -0
- package/dist/public/bundle/registry/bundles/secure-worktree-pipeline.yaml +54 -0
- package/dist/public/bundle/registry/bundles/security-check.yaml +50 -0
- package/dist/public/bundle/registry/bundles/tracebank.yaml +47 -0
- package/dist/public/bundle/registry/bundles/vision.yaml +45 -0
- package/dist/public/bundle/registry/omg-capability.schema.json +296 -0
- package/dist/public/bundle/settings.json +232 -4
- package/dist/public/manifest.json +216 -12
- package/docs/assets/omg-hud.svg +32 -0
- package/docs/install/claude-code.md +31 -0
- package/docs/install/codex.md +29 -0
- package/docs/migration/native-adoption.md +57 -0
- package/docs/proof.md +65 -0
- package/docs/release-checklist.md +40 -0
- package/docs/transcripts/crazy.md +17 -0
- package/docs/transcripts/setup.md +25 -0
- package/hooks/policy_engine.py +122 -17
- package/hooks/setup_wizard.py +52 -12
- package/hooks/shadow_manager.py +27 -0
- package/package.json +2 -2
- package/plugins/README.md +5 -1
- package/plugins/__init__.py +1 -0
- package/plugins/advanced/commands/OMG:deep-plan.md +50 -6
- package/plugins/advanced/commands/OMG:ship.md +1 -1
- package/plugins/advanced/plugin.json +1 -10
- package/plugins/core/plugin.json +7 -1
- package/pyproject.toml +39 -3
- package/registry/__init__.py +1 -0
- package/registry/bundles/algorithms.yaml +45 -0
- package/registry/bundles/api-twin.yaml +48 -0
- package/registry/bundles/claim-judge.yaml +49 -0
- package/registry/bundles/control-plane.yaml +151 -0
- package/registry/bundles/data-lineage.yaml +47 -0
- package/registry/bundles/delta-classifier.yaml +47 -0
- package/registry/bundles/eval-gate.yaml +47 -0
- package/registry/bundles/health.yaml +45 -0
- package/registry/bundles/hook-governor.yaml +97 -0
- package/registry/bundles/incident-replay.yaml +47 -0
- package/registry/bundles/lsp-pack.yaml +48 -0
- package/registry/bundles/mcp-fabric.yaml +53 -0
- package/registry/bundles/plan-council.yaml +51 -0
- package/registry/bundles/preflight.yaml +48 -0
- package/registry/bundles/proof-gate.yaml +49 -0
- package/registry/bundles/remote-supervisor.yaml +49 -0
- package/registry/bundles/robotics.yaml +45 -0
- package/registry/bundles/secure-worktree-pipeline.yaml +54 -0
- package/registry/bundles/security-check.yaml +50 -0
- package/registry/bundles/test-intent-lock.yaml +49 -0
- package/registry/bundles/tracebank.yaml +47 -0
- package/registry/bundles/vision.yaml +45 -0
- package/registry/omg-capability.schema.json +296 -0
- package/registry/verify_artifact.py +90 -0
- package/runtime/adapters/claude.py +3 -0
- package/runtime/adapters/gpt.py +3 -0
- package/runtime/adapters/local.py +3 -0
- package/runtime/adoption.py +1 -1
- package/runtime/api_twin.py +334 -14
- package/runtime/asset_loader.py +62 -0
- package/runtime/business_workflow.py +14 -0
- package/runtime/claim_judge.py +95 -0
- package/runtime/compat.py +142 -2
- package/runtime/contract_compiler.py +1270 -50
- package/runtime/data_lineage.py +73 -0
- package/runtime/delta_classifier.py +81 -0
- package/runtime/domain_packs.py +12 -0
- package/runtime/ecosystem.py +1 -1
- package/runtime/eval_gate.py +96 -0
- package/runtime/incident_replay.py +47 -0
- package/runtime/mcp_config_writers.py +12 -0
- package/runtime/mcp_lifecycle.py +31 -9
- package/runtime/mcp_memory_server.py +1 -1
- package/runtime/omg_compat_contract_snapshot.json +1 -1
- package/runtime/omg_contract_snapshot.json +1 -1
- package/runtime/omg_mcp_server.py +16 -9
- package/runtime/playwright_pack.py +169 -0
- package/runtime/preflight.py +66 -1
- package/runtime/proof_chain.py +228 -0
- package/runtime/proof_gate.py +163 -0
- package/runtime/remote_supervisor.py +64 -0
- package/runtime/security_check.py +626 -8
- package/runtime/team_router.py +6 -6
- package/runtime/test_intent_lock.py +91 -0
- package/runtime/tracebank.py +95 -0
- package/runtime/untrusted_content.py +172 -5
- package/scripts/check-omg-public-ready.py +77 -0
- package/scripts/omg.py +207 -3
- package/scripts/verify-standalone.sh +7 -0
- package/settings.json +233 -5
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import json
|
|
4
|
+
import os
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
from typing import cast
|
|
7
|
+
|
|
8
|
+
from hooks.security_validators import (
|
|
9
|
+
toml_quote_string,
|
|
10
|
+
validate_server_name,
|
|
11
|
+
validate_server_url,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def _atomic_write_text(path: Path, content: str) -> None:
|
|
16
|
+
path.parent.mkdir(parents=True, exist_ok=True)
|
|
17
|
+
tmp_path = path.with_name(f"{path.name}.tmp")
|
|
18
|
+
_ = tmp_path.write_text(content)
|
|
19
|
+
_ = os.replace(tmp_path, path)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def _load_json(path: Path) -> dict[str, object]:
|
|
23
|
+
if not path.exists():
|
|
24
|
+
return {}
|
|
25
|
+
try:
|
|
26
|
+
parsed = cast(object, json.loads(path.read_text()))
|
|
27
|
+
if isinstance(parsed, dict):
|
|
28
|
+
return cast(dict[str, object], parsed)
|
|
29
|
+
return {}
|
|
30
|
+
except (json.JSONDecodeError, ValueError):
|
|
31
|
+
return {}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def _write_json(path: Path, data: dict[str, object]) -> None:
|
|
35
|
+
_atomic_write_text(path, json.dumps(data, indent=2) + "\n")
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def get_managed_python_path(claude_config_dir: str | None = None) -> str:
|
|
39
|
+
"""Return the absolute path to the managed OMG venv Python interpreter.
|
|
40
|
+
|
|
41
|
+
Falls back to ``CLAUDE_CONFIG_DIR`` env var, then ``~/.claude``.
|
|
42
|
+
"""
|
|
43
|
+
if claude_config_dir is None:
|
|
44
|
+
claude_config_dir = os.environ.get(
|
|
45
|
+
"CLAUDE_CONFIG_DIR", str(Path.home() / ".claude")
|
|
46
|
+
)
|
|
47
|
+
return str(Path(claude_config_dir) / "omg-runtime" / ".venv" / "bin" / "python")
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def _validated_server_input(server_url: str, server_name: str) -> tuple[str, str]:
|
|
51
|
+
return validate_server_url(server_url), validate_server_name(server_name)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def _validated_stdio_input(command: str, args: list[str], server_name: str) -> tuple[str, list[str], str]:
|
|
55
|
+
normalized_name = validate_server_name(server_name)
|
|
56
|
+
normalized_command = str(command).strip()
|
|
57
|
+
if not normalized_command or "\n" in normalized_command or "\r" in normalized_command:
|
|
58
|
+
raise ValueError("Invalid command: newline characters are not allowed")
|
|
59
|
+
normalized_args = [str(arg) for arg in args]
|
|
60
|
+
for arg in normalized_args:
|
|
61
|
+
if "\n" in arg or "\r" in arg:
|
|
62
|
+
raise ValueError("Invalid args: newline characters are not allowed")
|
|
63
|
+
return normalized_command, normalized_args, normalized_name
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def _write_json_mcp_server(path: Path, server_name: str, payload: dict[str, object]) -> None:
|
|
67
|
+
config = _load_json(path)
|
|
68
|
+
mcp_servers = config.get("mcpServers")
|
|
69
|
+
if not isinstance(mcp_servers, dict):
|
|
70
|
+
mcp_servers = {}
|
|
71
|
+
config["mcpServers"] = mcp_servers
|
|
72
|
+
mcp_servers[server_name] = payload
|
|
73
|
+
_write_json(path, config)
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def write_claude_mcp_config(project_dir: str, server_url: str, server_name: str = "memory-server") -> None:
|
|
77
|
+
server_url, server_name = _validated_server_input(server_url, server_name)
|
|
78
|
+
config_path = Path(project_dir) / ".mcp.json"
|
|
79
|
+
_write_json_mcp_server(config_path, server_name, {"type": "http", "url": server_url})
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def write_claude_mcp_stdio_config(
|
|
83
|
+
project_dir: str,
|
|
84
|
+
*,
|
|
85
|
+
command: str,
|
|
86
|
+
args: list[str],
|
|
87
|
+
server_name: str = "omg-control",
|
|
88
|
+
) -> None:
|
|
89
|
+
command, args, server_name = _validated_stdio_input(command, args, server_name)
|
|
90
|
+
config_path = Path(project_dir) / ".mcp.json"
|
|
91
|
+
_write_json_mcp_server(config_path, server_name, {"command": command, "args": args})
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
def write_codex_mcp_config(
|
|
95
|
+
server_url: str,
|
|
96
|
+
server_name: str = "memory-server",
|
|
97
|
+
*,
|
|
98
|
+
config_path: str | Path | None = None,
|
|
99
|
+
) -> None:
|
|
100
|
+
server_url, server_name = _validated_server_input(server_url, server_name)
|
|
101
|
+
target_path = Path(config_path) if config_path is not None else Path.home() / ".codex" / "config.toml"
|
|
102
|
+
target_path.parent.mkdir(parents=True, exist_ok=True)
|
|
103
|
+
|
|
104
|
+
existing = target_path.read_text() if target_path.exists() else ""
|
|
105
|
+
lines = existing.splitlines(keepends=True)
|
|
106
|
+
|
|
107
|
+
header_unquoted = f"[mcp_servers.{server_name}]"
|
|
108
|
+
header_quoted = f"[mcp_servers.\"{server_name}\"]"
|
|
109
|
+
headers = {header_unquoted, header_quoted}
|
|
110
|
+
|
|
111
|
+
start_idx: int | None = None
|
|
112
|
+
for idx, line in enumerate(lines):
|
|
113
|
+
if line.strip() in headers:
|
|
114
|
+
start_idx = idx
|
|
115
|
+
break
|
|
116
|
+
|
|
117
|
+
block = [
|
|
118
|
+
f"{header_unquoted}\n",
|
|
119
|
+
'type = "http"\n',
|
|
120
|
+
f'url = "{toml_quote_string(server_url)}"\n',
|
|
121
|
+
"\n",
|
|
122
|
+
]
|
|
123
|
+
|
|
124
|
+
if start_idx is None:
|
|
125
|
+
if existing and not existing.endswith("\n"):
|
|
126
|
+
existing += "\n"
|
|
127
|
+
content = existing + "".join(block)
|
|
128
|
+
_atomic_write_text(target_path, content)
|
|
129
|
+
return
|
|
130
|
+
|
|
131
|
+
end_idx = len(lines)
|
|
132
|
+
for idx in range(start_idx + 1, len(lines)):
|
|
133
|
+
stripped = lines[idx].strip()
|
|
134
|
+
if stripped.startswith("[") and stripped.endswith("]"):
|
|
135
|
+
end_idx = idx
|
|
136
|
+
break
|
|
137
|
+
|
|
138
|
+
updated_lines = lines[:start_idx] + block + lines[end_idx:]
|
|
139
|
+
_atomic_write_text(target_path, "".join(updated_lines))
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
def write_codex_mcp_stdio_config(
|
|
143
|
+
*,
|
|
144
|
+
command: str,
|
|
145
|
+
args: list[str],
|
|
146
|
+
server_name: str = "omg-control",
|
|
147
|
+
config_path: str | Path | None = None,
|
|
148
|
+
) -> None:
|
|
149
|
+
command, args, server_name = _validated_stdio_input(command, args, server_name)
|
|
150
|
+
target_path = Path(config_path) if config_path is not None else Path.home() / ".codex" / "config.toml"
|
|
151
|
+
target_path.parent.mkdir(parents=True, exist_ok=True)
|
|
152
|
+
|
|
153
|
+
existing = target_path.read_text() if target_path.exists() else ""
|
|
154
|
+
lines = existing.splitlines(keepends=True)
|
|
155
|
+
header_unquoted = f"[mcp_servers.{server_name}]"
|
|
156
|
+
header_quoted = f"[mcp_servers.\"{server_name}\"]"
|
|
157
|
+
headers = {header_unquoted, header_quoted}
|
|
158
|
+
|
|
159
|
+
start_idx: int | None = None
|
|
160
|
+
for idx, line in enumerate(lines):
|
|
161
|
+
if line.strip() in headers:
|
|
162
|
+
start_idx = idx
|
|
163
|
+
break
|
|
164
|
+
|
|
165
|
+
args_text = ", ".join(f'"{toml_quote_string(arg)}"' for arg in args)
|
|
166
|
+
block = [
|
|
167
|
+
f"{header_unquoted}\n",
|
|
168
|
+
f'command = "{toml_quote_string(command)}"\n',
|
|
169
|
+
f"args = [{args_text}]\n",
|
|
170
|
+
"\n",
|
|
171
|
+
]
|
|
172
|
+
|
|
173
|
+
if start_idx is None:
|
|
174
|
+
if existing and not existing.endswith("\n"):
|
|
175
|
+
existing += "\n"
|
|
176
|
+
_atomic_write_text(target_path, existing + "".join(block))
|
|
177
|
+
return
|
|
178
|
+
|
|
179
|
+
end_idx = len(lines)
|
|
180
|
+
for idx in range(start_idx + 1, len(lines)):
|
|
181
|
+
stripped = lines[idx].strip()
|
|
182
|
+
if stripped.startswith("[") and stripped.endswith("]"):
|
|
183
|
+
end_idx = idx
|
|
184
|
+
break
|
|
185
|
+
|
|
186
|
+
updated_lines = lines[:start_idx] + block + lines[end_idx:]
|
|
187
|
+
_atomic_write_text(target_path, "".join(updated_lines))
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
def write_gemini_mcp_config(
|
|
191
|
+
server_url: str,
|
|
192
|
+
server_name: str = "memory-server",
|
|
193
|
+
*,
|
|
194
|
+
config_path: str | Path | None = None,
|
|
195
|
+
) -> None:
|
|
196
|
+
server_url, server_name = _validated_server_input(server_url, server_name)
|
|
197
|
+
target_path = Path(config_path) if config_path is not None else Path.home() / ".gemini" / "settings.json"
|
|
198
|
+
_write_json_mcp_server(target_path, server_name, {"httpUrl": server_url})
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
def write_gemini_mcp_stdio_config(
|
|
202
|
+
*,
|
|
203
|
+
command: str,
|
|
204
|
+
args: list[str],
|
|
205
|
+
server_name: str = "omg-control",
|
|
206
|
+
config_path: str | Path | None = None,
|
|
207
|
+
) -> None:
|
|
208
|
+
command, args, server_name = _validated_stdio_input(command, args, server_name)
|
|
209
|
+
target_path = Path(config_path) if config_path is not None else Path.home() / ".gemini" / "settings.json"
|
|
210
|
+
_write_json_mcp_server(target_path, server_name, {"command": command, "args": args})
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
def write_kimi_mcp_config(
|
|
214
|
+
server_url: str,
|
|
215
|
+
server_name: str = "memory-server",
|
|
216
|
+
*,
|
|
217
|
+
config_path: str | Path | None = None,
|
|
218
|
+
) -> None:
|
|
219
|
+
server_url, server_name = _validated_server_input(server_url, server_name)
|
|
220
|
+
target_path = Path(config_path) if config_path is not None else Path.home() / ".kimi" / "mcp.json"
|
|
221
|
+
_write_json_mcp_server(target_path, server_name, {"type": "http", "url": server_url})
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
def write_kimi_mcp_stdio_config(
|
|
225
|
+
*,
|
|
226
|
+
command: str,
|
|
227
|
+
args: list[str],
|
|
228
|
+
server_name: str = "omg-control",
|
|
229
|
+
config_path: str | Path | None = None,
|
|
230
|
+
) -> None:
|
|
231
|
+
command, args, server_name = _validated_stdio_input(command, args, server_name)
|
|
232
|
+
target_path = Path(config_path) if config_path is not None else Path.home() / ".kimi" / "mcp.json"
|
|
233
|
+
_write_json_mcp_server(target_path, server_name, {"command": command, "args": args})
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
"""MCP server lifecycle manager — start/stop/health/ensure."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
import os
|
|
5
|
+
import signal
|
|
6
|
+
import subprocess
|
|
7
|
+
import sys
|
|
8
|
+
import time
|
|
9
|
+
from pathlib import Path
|
|
10
|
+
from typing import Any
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def get_pid_file_path() -> str:
|
|
14
|
+
"""Return path to the PID file for the memory server."""
|
|
15
|
+
return str(Path.home() / ".omg" / "shared-memory" / "server.pid")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def get_server_url() -> str:
|
|
19
|
+
"""Return the MCP server URL using host/port from mcp_memory_server."""
|
|
20
|
+
from runtime.mcp_memory_server import get_host, get_port
|
|
21
|
+
|
|
22
|
+
return f"http://{get_host()}:{get_port()}/mcp"
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def _read_pid() -> int | None:
|
|
26
|
+
"""Read PID from PID file. Returns None if missing or invalid."""
|
|
27
|
+
try:
|
|
28
|
+
return int(Path(get_pid_file_path()).read_text().strip())
|
|
29
|
+
except (FileNotFoundError, ValueError):
|
|
30
|
+
return None
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def is_server_running() -> bool:
|
|
34
|
+
"""Check if the memory server process is alive."""
|
|
35
|
+
pid = _read_pid()
|
|
36
|
+
if pid is None:
|
|
37
|
+
return False
|
|
38
|
+
try:
|
|
39
|
+
os.kill(pid, 0)
|
|
40
|
+
return True
|
|
41
|
+
except ProcessLookupError:
|
|
42
|
+
return False
|
|
43
|
+
except PermissionError:
|
|
44
|
+
return True # Process exists but we can't signal it
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def _wait_for_health(url: str, timeout: float = 5.0) -> bool:
|
|
48
|
+
"""Wait for server health endpoint to respond."""
|
|
49
|
+
import urllib.request
|
|
50
|
+
|
|
51
|
+
deadline = time.monotonic() + timeout
|
|
52
|
+
while time.monotonic() < deadline:
|
|
53
|
+
try:
|
|
54
|
+
with urllib.request.urlopen(url, timeout=1) as resp:
|
|
55
|
+
if resp.status == 200:
|
|
56
|
+
return True
|
|
57
|
+
except Exception:
|
|
58
|
+
time.sleep(0.1)
|
|
59
|
+
return False
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def _wait_for_exit(pid: int, timeout: float = 5.0) -> bool:
|
|
63
|
+
"""Wait for a process to exit."""
|
|
64
|
+
deadline = time.monotonic() + timeout
|
|
65
|
+
while time.monotonic() < deadline:
|
|
66
|
+
try:
|
|
67
|
+
os.kill(pid, 0)
|
|
68
|
+
time.sleep(0.1)
|
|
69
|
+
except (ProcessLookupError, PermissionError):
|
|
70
|
+
return True
|
|
71
|
+
return False
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def start_memory_server() -> dict[str, Any]:
|
|
75
|
+
"""Start the MCP memory server as a background process."""
|
|
76
|
+
if is_server_running():
|
|
77
|
+
return {"status": "already_running", "url": get_server_url()}
|
|
78
|
+
|
|
79
|
+
pid_path = Path(get_pid_file_path())
|
|
80
|
+
pid_path.parent.mkdir(parents=True, exist_ok=True)
|
|
81
|
+
|
|
82
|
+
try:
|
|
83
|
+
server_script = str(Path(__file__).parent / "mcp_memory_server.py")
|
|
84
|
+
proc = subprocess.Popen(
|
|
85
|
+
[sys.executable, server_script],
|
|
86
|
+
stdout=subprocess.DEVNULL,
|
|
87
|
+
stderr=subprocess.DEVNULL,
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
health_url = get_server_url().replace("/mcp", "/health")
|
|
91
|
+
if _wait_for_health(health_url):
|
|
92
|
+
pid_path.write_text(str(proc.pid))
|
|
93
|
+
return {"status": "started", "pid": proc.pid, "url": get_server_url()}
|
|
94
|
+
try:
|
|
95
|
+
proc.terminate()
|
|
96
|
+
proc.wait(timeout=2)
|
|
97
|
+
except Exception:
|
|
98
|
+
try:
|
|
99
|
+
proc.kill()
|
|
100
|
+
except Exception:
|
|
101
|
+
pass
|
|
102
|
+
if pid_path.exists():
|
|
103
|
+
pid_path.unlink()
|
|
104
|
+
return {
|
|
105
|
+
"status": "error",
|
|
106
|
+
"message": "Server did not respond within timeout",
|
|
107
|
+
}
|
|
108
|
+
except Exception as exc:
|
|
109
|
+
return {"status": "error", "message": str(exc)}
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
def stop_memory_server() -> dict[str, Any]:
|
|
113
|
+
"""Stop the MCP memory server."""
|
|
114
|
+
if not is_server_running():
|
|
115
|
+
return {"status": "not_running"}
|
|
116
|
+
|
|
117
|
+
pid = _read_pid()
|
|
118
|
+
if pid is None:
|
|
119
|
+
return {"status": "not_running"}
|
|
120
|
+
|
|
121
|
+
try:
|
|
122
|
+
os.kill(pid, signal.SIGTERM)
|
|
123
|
+
_wait_for_exit(pid)
|
|
124
|
+
|
|
125
|
+
pid_path = Path(get_pid_file_path())
|
|
126
|
+
if pid_path.exists():
|
|
127
|
+
pid_path.unlink()
|
|
128
|
+
|
|
129
|
+
return {"status": "stopped", "pid": pid}
|
|
130
|
+
except ProcessLookupError:
|
|
131
|
+
pid_path = Path(get_pid_file_path())
|
|
132
|
+
if pid_path.exists():
|
|
133
|
+
pid_path.unlink()
|
|
134
|
+
return {"status": "stopped", "pid": pid}
|
|
135
|
+
except Exception as exc:
|
|
136
|
+
return {"status": "error", "message": str(exc)}
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
def check_memory_server() -> dict[str, Any]:
|
|
140
|
+
"""Check the memory server status."""
|
|
141
|
+
running = is_server_running()
|
|
142
|
+
if not running:
|
|
143
|
+
return {"running": False, "url": None, "pid": None}
|
|
144
|
+
|
|
145
|
+
return {
|
|
146
|
+
"running": True,
|
|
147
|
+
"url": get_server_url(),
|
|
148
|
+
"pid": _read_pid(),
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
_HTTP_MEMORY_RESTRICTED_PRESETS = frozenset({"safe", "balanced"})
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
def _get_current_preset() -> str:
|
|
156
|
+
return os.environ.get("OMG_PRESET", "safe")
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
def ensure_memory_server() -> dict[str, Any]:
|
|
160
|
+
"""Ensure the memory server is running (idempotent).
|
|
161
|
+
|
|
162
|
+
Skips startup when the active preset is ``safe`` or ``balanced`` —
|
|
163
|
+
HTTP memory is an opt-in surface starting at the ``interop`` tier.
|
|
164
|
+
"""
|
|
165
|
+
preset = _get_current_preset()
|
|
166
|
+
if preset in _HTTP_MEMORY_RESTRICTED_PRESETS:
|
|
167
|
+
return {"status": "skipped", "reason": f"HTTP memory disabled for preset '{preset}'"}
|
|
168
|
+
if is_server_running():
|
|
169
|
+
return {"status": "already_running", "url": get_server_url()}
|
|
170
|
+
return start_memory_server()
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
# Feature flag: auto-start on import (respects preset restrictions)
|
|
174
|
+
if os.environ.get("OMG_MEMORY_AUTOSTART") == "1":
|
|
175
|
+
ensure_memory_server()
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import json
|
|
4
|
+
import os
|
|
5
|
+
from collections.abc import AsyncIterator
|
|
6
|
+
from contextlib import asynccontextmanager
|
|
7
|
+
from typing import Any
|
|
8
|
+
|
|
9
|
+
_MCP_IMPORT_ERROR: ModuleNotFoundError | None = None
|
|
10
|
+
|
|
11
|
+
try:
|
|
12
|
+
from fastmcp import FastMCP
|
|
13
|
+
from starlette.requests import Request
|
|
14
|
+
from starlette.responses import JSONResponse
|
|
15
|
+
except ModuleNotFoundError as exc:
|
|
16
|
+
_MCP_IMPORT_ERROR = exc
|
|
17
|
+
Request = Any
|
|
18
|
+
|
|
19
|
+
class JSONResponse(dict):
|
|
20
|
+
def __init__(self, content: dict[str, Any]):
|
|
21
|
+
super().__init__(content)
|
|
22
|
+
|
|
23
|
+
def _passthrough_decorator(*_args: Any, **_kwargs: Any):
|
|
24
|
+
def decorator(func: Any) -> Any:
|
|
25
|
+
return func
|
|
26
|
+
|
|
27
|
+
return decorator
|
|
28
|
+
|
|
29
|
+
class FastMCP: # type: ignore[override]
|
|
30
|
+
def __init__(self, *_args: Any, **_kwargs: Any) -> None:
|
|
31
|
+
self._import_error = _MCP_IMPORT_ERROR
|
|
32
|
+
|
|
33
|
+
custom_route = staticmethod(_passthrough_decorator)
|
|
34
|
+
tool = staticmethod(_passthrough_decorator)
|
|
35
|
+
resource = staticmethod(_passthrough_decorator)
|
|
36
|
+
|
|
37
|
+
def run(self, *_args: Any, **_kwargs: Any) -> None:
|
|
38
|
+
raise RuntimeError("fastmcp and starlette are required to run the OMG memory server") from self._import_error
|
|
39
|
+
|
|
40
|
+
FastMCP.__module__ = "fastmcp"
|
|
41
|
+
|
|
42
|
+
from runtime.memory_store import MemoryStore, MemoryStoreFullError
|
|
43
|
+
|
|
44
|
+
_store = MemoryStore()
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def _load_state() -> None:
|
|
48
|
+
return None
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def _save_state() -> None:
|
|
52
|
+
return None
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
@asynccontextmanager
|
|
56
|
+
async def lifespan(_: object) -> AsyncIterator[None]:
|
|
57
|
+
_load_state()
|
|
58
|
+
try:
|
|
59
|
+
yield
|
|
60
|
+
finally:
|
|
61
|
+
_save_state()
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
mcp = FastMCP("OMG Memory Server", lifespan=lifespan)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
@mcp.custom_route("/health", methods=["GET"])
|
|
68
|
+
async def health(_: Request) -> JSONResponse:
|
|
69
|
+
return JSONResponse({"status": "ok", "version": "2.0.7"})
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
@mcp.tool()
|
|
73
|
+
def memory_store(
|
|
74
|
+
key: str,
|
|
75
|
+
content: str,
|
|
76
|
+
source_cli: str,
|
|
77
|
+
tags: list[str] | None = None,
|
|
78
|
+
) -> dict[str, Any]:
|
|
79
|
+
try:
|
|
80
|
+
return _store.add(key=key, content=content, source_cli=source_cli, tags=tags)
|
|
81
|
+
except MemoryStoreFullError as exc:
|
|
82
|
+
return {"error": str(exc)}
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
@mcp.tool()
|
|
86
|
+
def memory_search(
|
|
87
|
+
query: str,
|
|
88
|
+
source_cli: str | None = None,
|
|
89
|
+
) -> list[dict[str, Any]]:
|
|
90
|
+
return _store.search(query=query, source_cli=source_cli)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
@mcp.tool()
|
|
94
|
+
def memory_list(
|
|
95
|
+
source_cli: str | None = None,
|
|
96
|
+
) -> list[dict[str, Any]]:
|
|
97
|
+
return _store.list_all(source_cli=source_cli)
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
@mcp.tool()
|
|
101
|
+
def memory_delete(item_id: str) -> dict[str, Any]:
|
|
102
|
+
deleted = _store.delete(item_id)
|
|
103
|
+
return {"deleted": deleted, "id": item_id}
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
@mcp.tool()
|
|
107
|
+
def memory_import(items: list[dict[str, Any]]) -> dict[str, int]:
|
|
108
|
+
count = _store.import_items(items)
|
|
109
|
+
return {"imported": count}
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
@mcp.tool()
|
|
113
|
+
def memory_export() -> list[dict[str, Any]]:
|
|
114
|
+
return _store.export_all()
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
@mcp.resource("memory://all")
|
|
118
|
+
def memory_all_resource() -> str:
|
|
119
|
+
return json.dumps(_store.list_all())
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
def get_host() -> str:
|
|
123
|
+
return os.environ.get("OMG_MEMORY_HOST", "127.0.0.1")
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
def get_port() -> int:
|
|
127
|
+
return int(os.environ.get("OMG_MEMORY_PORT", "8765"))
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
def run_server() -> None:
|
|
131
|
+
mcp.run(transport="http", host=get_host(), port=get_port())
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
if __name__ == "__main__":
|
|
135
|
+
run_server()
|
|
File without changes
|