@trac3er/oh-my-god 2.0.3 → 2.0.5
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 +5 -0
- 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/codex-mcp.toml +4 -0
- package/.agents/skills/omg/control-plane/SKILL.md +11 -0
- package/.agents/skills/omg/control-plane/openai.yaml +14 -0
- 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 +11 -0
- package/.agents/skills/omg/hook-governor/openai.yaml +11 -0
- 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 +11 -0
- package/.agents/skills/omg/lsp-pack/openai.yaml +11 -0
- package/.agents/skills/omg/mcp-fabric/SKILL.md +11 -0
- package/.agents/skills/omg/mcp-fabric/openai.yaml +13 -0
- package/.agents/skills/omg/preflight/SKILL.md +11 -0
- package/.agents/skills/omg/preflight/openai.yaml +12 -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 +11 -0
- package/.agents/skills/omg/secure-worktree-pipeline/openai.yaml +12 -0
- package/.agents/skills/omg/security-check/SKILL.md +11 -0
- package/.agents/skills/omg/security-check/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 +3 -3
- package/.claude-plugin/plugin.json +1 -1
- package/.claude-plugin/scripts/uninstall.sh +2 -2
- package/.mcp.json +20 -4
- package/CHANGELOG.md +10 -0
- package/OMG-setup.sh +9 -3
- package/OMG_COMPAT_CONTRACT.md +92 -0
- package/README.md +24 -4
- package/SECURITY.md +6 -0
- package/commands/OMG:api-twin.md +22 -0
- package/commands/OMG:preflight.md +26 -0
- package/commands/OMG:security-check.md +28 -0
- package/commands/__init__.py +1 -0
- package/control_plane/__init__.py +2 -0
- package/control_plane/openapi.yaml +228 -0
- package/control_plane/server.py +123 -0
- package/control_plane/service.py +185 -0
- package/dist/enterprise/bundle/.agents/skills/omg/AGENTS.fragment.md +5 -0
- 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-mcp.toml +4 -0
- package/dist/enterprise/bundle/.agents/skills/omg/control-plane/SKILL.md +11 -0
- package/dist/enterprise/bundle/.agents/skills/omg/control-plane/openai.yaml +14 -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/hook-governor/SKILL.md +11 -0
- package/dist/enterprise/bundle/.agents/skills/omg/hook-governor/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/lsp-pack/SKILL.md +11 -0
- package/dist/enterprise/bundle/.agents/skills/omg/lsp-pack/openai.yaml +11 -0
- package/dist/enterprise/bundle/.agents/skills/omg/mcp-fabric/SKILL.md +11 -0
- package/dist/enterprise/bundle/.agents/skills/omg/mcp-fabric/openai.yaml +13 -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/secure-worktree-pipeline/SKILL.md +11 -0
- package/dist/enterprise/bundle/.agents/skills/omg/secure-worktree-pipeline/openai.yaml +12 -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 +36 -0
- package/dist/enterprise/bundle/.claude-plugin/plugin.json +23 -0
- package/dist/enterprise/bundle/.mcp.json +40 -0
- package/dist/enterprise/bundle/OMG_COMPAT_CONTRACT.md +92 -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 +61 -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 +80 -0
- package/dist/enterprise/bundle/settings.json +381 -0
- package/dist/enterprise/manifest.json +255 -0
- package/dist/public/bundle/.agents/skills/omg/AGENTS.fragment.md +5 -0
- 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-mcp.toml +4 -0
- package/dist/public/bundle/.agents/skills/omg/control-plane/SKILL.md +11 -0
- package/dist/public/bundle/.agents/skills/omg/control-plane/openai.yaml +14 -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/hook-governor/SKILL.md +11 -0
- package/dist/public/bundle/.agents/skills/omg/hook-governor/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/lsp-pack/SKILL.md +11 -0
- package/dist/public/bundle/.agents/skills/omg/lsp-pack/openai.yaml +11 -0
- package/dist/public/bundle/.agents/skills/omg/mcp-fabric/SKILL.md +11 -0
- package/dist/public/bundle/.agents/skills/omg/mcp-fabric/openai.yaml +13 -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/secure-worktree-pipeline/SKILL.md +11 -0
- package/dist/public/bundle/.agents/skills/omg/secure-worktree-pipeline/openai.yaml +12 -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 +36 -0
- package/dist/public/bundle/.claude-plugin/plugin.json +23 -0
- package/dist/public/bundle/.mcp.json +40 -0
- package/dist/public/bundle/OMG_COMPAT_CONTRACT.md +92 -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 +61 -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 +80 -0
- package/dist/public/bundle/settings.json +379 -0
- package/dist/public/manifest.json +255 -0
- 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 +55 -0
- package/docs/release-checklist.md +38 -0
- package/docs/transcripts/crazy.md +17 -0
- package/docs/transcripts/setup.md +25 -0
- package/hooks/policy_engine.py +38 -7
- package/hooks/post-write.py +1 -1
- package/hooks/prompt-enhancer.py +1 -1
- package/hooks/security_validators.py +75 -0
- package/hooks/setup_wizard.py +43 -8
- package/hooks/shadow_manager.py +28 -2
- package/package.json +1 -1
- package/plugins/README.md +3 -1
- package/plugins/__init__.py +1 -0
- package/plugins/advanced/commands/OMG:deep-plan.md +1 -1
- package/plugins/advanced/commands/OMG:security-review.md +10 -113
- package/plugins/advanced/commands/OMG:ship.md +1 -1
- package/plugins/advanced/plugin.json +1 -10
- package/plugins/core/plugin.json +25 -2
- package/pyproject.toml +38 -2
- package/registry/__init__.py +1 -0
- package/registry/bundles/algorithms.yaml +45 -0
- package/registry/bundles/api-twin.yaml +48 -0
- package/registry/bundles/control-plane.yaml +61 -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/preflight.yaml +48 -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/tracebank.yaml +47 -0
- package/registry/bundles/vision.yaml +45 -0
- package/registry/omg-capability.schema.json +80 -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 +179 -0
- package/runtime/asset_loader.py +62 -0
- package/runtime/compat.py +24 -3
- package/runtime/contract_compiler.py +847 -0
- package/runtime/data_lineage.py +73 -0
- package/runtime/delta_classifier.py +81 -0
- package/runtime/domain_packs.py +46 -0
- package/runtime/ecosystem.py +1 -1
- package/runtime/eval_gate.py +50 -0
- package/runtime/guide_assert.py +45 -0
- package/runtime/incident_replay.py +47 -0
- package/runtime/mcp_config_writers.py +147 -30
- package/runtime/mcp_memory_server.py +1 -1
- package/runtime/omg_compat_contract_snapshot.json +9 -8
- package/runtime/omg_contract_snapshot.json +9 -8
- package/runtime/omg_mcp_server.py +207 -0
- package/runtime/preflight.py +73 -0
- package/runtime/providers/codex_provider.py +2 -12
- package/runtime/providers/gemini_provider.py +2 -21
- package/runtime/providers/kimi_provider.py +2 -21
- package/runtime/remote_supervisor.py +64 -0
- package/runtime/runtime_profile.py +61 -0
- package/runtime/security_check.py +464 -0
- package/runtime/subagent_dispatcher.py +117 -10
- package/runtime/team_router.py +3 -1
- package/runtime/tracebank.py +53 -0
- package/runtime/untrusted_content.py +102 -0
- package/scripts/omg.py +360 -2
- package/settings.json +81 -18
- package/tools/python_repl.py +33 -3
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: OMG Production Control Plane
|
|
3
|
+
version: 2.0.5
|
|
4
|
+
canonical_hosts:
|
|
5
|
+
- claude
|
|
6
|
+
- codex
|
|
7
|
+
status: active
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# OMG Production Control Plane
|
|
11
|
+
|
|
12
|
+
`OMG_COMPAT_CONTRACT.md` is the normative human-readable contract for OMG capability bundles. Machine-readable manifests in `registry/bundles/` are executable inputs and must remain version-locked to this document.
|
|
13
|
+
|
|
14
|
+
## metadata
|
|
15
|
+
|
|
16
|
+
Every bundle must declare `id`, `kind`, `version`, `title`, `description`, `hosts`, and `assets`.
|
|
17
|
+
|
|
18
|
+
## invocation_policy
|
|
19
|
+
|
|
20
|
+
Every bundle must declare whether it is user invocable, model invocable, and whether implicit invocation is allowed. Production bundles default to explicit invocation only.
|
|
21
|
+
|
|
22
|
+
## tool_policy
|
|
23
|
+
|
|
24
|
+
Every bundle must declare `side_effect_level` and host-specific allowed tools. Production policy protects `.omg/`, `.agents/`, `.codex/`, and `.claude/` as control-plane state.
|
|
25
|
+
|
|
26
|
+
## lifecycle_hooks
|
|
27
|
+
|
|
28
|
+
Canonical OMG events:
|
|
29
|
+
|
|
30
|
+
- `SessionStart`
|
|
31
|
+
- `SessionEnd`
|
|
32
|
+
- `PreToolUse`
|
|
33
|
+
- `PostToolUse`
|
|
34
|
+
- `PostToolUseFailure`
|
|
35
|
+
- `Stop`
|
|
36
|
+
- `PreCompact`
|
|
37
|
+
- `ConfigChange`
|
|
38
|
+
- `WorktreeCreate`
|
|
39
|
+
- `WorktreeRemove`
|
|
40
|
+
- `SubagentStart`
|
|
41
|
+
- `SubagentStop`
|
|
42
|
+
- `TaskCompleted`
|
|
43
|
+
|
|
44
|
+
Hosts compile native events where available and emulate the rest with OMG runtime wrappers.
|
|
45
|
+
|
|
46
|
+
## mcp_contract
|
|
47
|
+
|
|
48
|
+
Bundles may declare MCP servers, prompts, resources, and server instructions. `omg-control` is the primary stdio server. HTTP control-plane exposure is loopback-only and not a production launch dependency.
|
|
49
|
+
|
|
50
|
+
## lsp_contract
|
|
51
|
+
|
|
52
|
+
LSP packs declare supported languages, diagnostics expectations, and evidence outputs for post-edit checks.
|
|
53
|
+
|
|
54
|
+
## evidence_outputs
|
|
55
|
+
|
|
56
|
+
Bundles declare reproducible evidence artifacts under `.omg/evidence/` or `.omg/state/`. Release-ready bundles must emit deterministic outputs suitable for CI drift checks.
|
|
57
|
+
|
|
58
|
+
## execution_contract
|
|
59
|
+
|
|
60
|
+
Supported execution modes:
|
|
61
|
+
|
|
62
|
+
- `embedded`
|
|
63
|
+
- `local_supervisor`
|
|
64
|
+
- `automation`
|
|
65
|
+
- `ephemeral_worktree`
|
|
66
|
+
|
|
67
|
+
`local_supervisor` means a same-machine orchestrator driving Claude and Codex workers through local CLI or stdio MCP integration. Remote multi-tenant control planes are out of scope for this version.
|
|
68
|
+
|
|
69
|
+
## host_compilation_rules
|
|
70
|
+
|
|
71
|
+
Claude outputs compile to:
|
|
72
|
+
|
|
73
|
+
- `.claude-plugin/plugin.json`
|
|
74
|
+
- `.claude-plugin/marketplace.json`
|
|
75
|
+
- `.mcp.json`
|
|
76
|
+
- generated hook configuration consumed by `settings.json`
|
|
77
|
+
|
|
78
|
+
Codex outputs compile to:
|
|
79
|
+
|
|
80
|
+
- `.agents/skills/omg/<bundle>/SKILL.md`
|
|
81
|
+
- `.agents/skills/omg/<bundle>/openai.yaml`
|
|
82
|
+
- generated Codex MCP and rule fragments under `.agents/skills/omg/`
|
|
83
|
+
|
|
84
|
+
## roadmap_extensions
|
|
85
|
+
|
|
86
|
+
The contract reserves compilation anchors for:
|
|
87
|
+
|
|
88
|
+
- `omg.skill-compiler`
|
|
89
|
+
- `omg.hook-governor`
|
|
90
|
+
- `omg.mcp-fabric`
|
|
91
|
+
- `omg.lsp-pack`
|
|
92
|
+
- `omg.secure-worktree-pipeline`
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# OMG 2.0.
|
|
1
|
+
# OMG 2.0.5
|
|
2
2
|
|
|
3
3
|
[](https://github.com/trac3er00/OMG/actions/workflows/omg-compat-gate.yml)
|
|
4
4
|
[](https://www.npmjs.com/package/@trac3er/oh-my-god)
|
|
@@ -11,7 +11,7 @@ OMG upgrades your agent host instead of replacing it. It gives Claude Code, Code
|
|
|
11
11
|
- npm: `@trac3er/oh-my-god`
|
|
12
12
|
- Plugin id: `omg`
|
|
13
13
|
- Marketplace id: `omg`
|
|
14
|
-
- Version: `2.0.
|
|
14
|
+
- Version: `2.0.5`
|
|
15
15
|
|
|
16
16
|
## Why OMG
|
|
17
17
|
|
|
@@ -20,6 +20,17 @@ OMG upgrades your agent host instead of replacing it. It gives Claude Code, Code
|
|
|
20
20
|
- Native adoption: setup detects OMC, OMX, and Superpowers-style environments without exposing copycat public migration commands.
|
|
21
21
|
- Proof-first delivery: verification, provider coverage, HUD artifacts, and transcripts are published instead of implied.
|
|
22
22
|
|
|
23
|
+
## Canonical Contract
|
|
24
|
+
|
|
25
|
+
OMG now ships a production control-plane contract and generated host artifacts.
|
|
26
|
+
|
|
27
|
+
- Normative spec: `OMG_COMPAT_CONTRACT.md`
|
|
28
|
+
- Executable registry: `registry/omg-capability.schema.json` and `registry/bundles/*.yaml`
|
|
29
|
+
- Generated Codex pack: `.agents/skills/omg/`
|
|
30
|
+
- Validation: `python3 scripts/omg.py contract validate`
|
|
31
|
+
- Compilation: `python3 scripts/omg.py contract compile --host claude --host codex --channel public`
|
|
32
|
+
- Release gate: `python3 scripts/omg.py release readiness --channel dual`
|
|
33
|
+
|
|
23
34
|

|
|
24
35
|
|
|
25
36
|
## Quickstart
|
|
@@ -50,6 +61,7 @@ Success looks like:
|
|
|
50
61
|
|
|
51
62
|
- supported hosts are detected
|
|
52
63
|
- `.mcp.json` is configured
|
|
64
|
+
- `.mcp.json` includes both `omg-memory` and stdio `omg-control`
|
|
53
65
|
- `.omg/state/adoption-report.json` is written when another ecosystem is present
|
|
54
66
|
- OMG reports the selected preset and next step
|
|
55
67
|
|
|
@@ -65,11 +77,17 @@ OMG uses native setup language instead of public migration commands.
|
|
|
65
77
|
- `coexist`: advanced. OMG preserves non-conflicting third-party surfaces and records overlap instead of overwriting it.
|
|
66
78
|
- Presets: `safe`, `balanced`, `interop`, `labs`.
|
|
67
79
|
|
|
80
|
+
## Security Notes
|
|
81
|
+
|
|
82
|
+
- The shipped `safe` preset now registers pre-tool security hooks before the planning helper.
|
|
83
|
+
- `Bash` requests are screened by `firewall.py`, and file reads or edits are screened by `secret-guard.py`.
|
|
84
|
+
- Raw environment dumps, interpreters, and permission-changing commands such as `env`, `node`, `python`, `python3`, `chmod`, and `chown` now require approval instead of being silently allowed.
|
|
85
|
+
|
|
68
86
|
Compatibility references to OMC, OMX, and Superpowers are documented here: [docs/migration/native-adoption.md](docs/migration/native-adoption.md)
|
|
69
87
|
|
|
70
88
|
## Proof
|
|
71
89
|
|
|
72
|
-
Current local verification for this release: `
|
|
90
|
+
Current local verification for this release: `2466 passed, 2 skipped` on March 7, 2026.
|
|
73
91
|
|
|
74
92
|
- Verification and provider matrix: [docs/proof.md](docs/proof.md)
|
|
75
93
|
- Sample setup transcript: [docs/transcripts/setup.md](docs/transcripts/setup.md)
|
|
@@ -85,11 +103,13 @@ Primary entry points:
|
|
|
85
103
|
|
|
86
104
|
Advanced surfaces stay available for deeper workflows:
|
|
87
105
|
|
|
106
|
+
- `/OMG:security-check`
|
|
107
|
+
- `/OMG:api-twin`
|
|
108
|
+
- `/OMG:preflight`
|
|
88
109
|
- `/OMG:teams`
|
|
89
110
|
- `/OMG:ccg`
|
|
90
111
|
- `/OMG:compat`
|
|
91
112
|
- `/OMG:ship`
|
|
92
|
-
- `/OMG:security-review`
|
|
93
113
|
|
|
94
114
|
## Contributing
|
|
95
115
|
|
package/SECURITY.md
CHANGED
|
@@ -23,3 +23,9 @@ Include:
|
|
|
23
23
|
## Supported Versions
|
|
24
24
|
|
|
25
25
|
Security fixes are prioritized for the latest released version.
|
|
26
|
+
|
|
27
|
+
## Maintainer Notes
|
|
28
|
+
|
|
29
|
+
- The shipped `safe` preset is expected to enforce pre-tool security hooks before helper hooks run.
|
|
30
|
+
- `firewall.py` should screen `Bash` usage and `secret-guard.py` should screen `Read`, `Write`, `Edit`, and `MultiEdit`.
|
|
31
|
+
- Sensitive shell commands such as raw `env` dumps, interpreter entry points, and direct permission changes should require approval in the `safe` preset rather than being silently allowed.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Contract replay and fixture-based API simulation with fidelity tracking and live verification requirements."
|
|
3
|
+
allowed-tools: Read, Write, Edit, MultiEdit, Grep, Glob, Bash(python3:*), Bash(rg:*)
|
|
4
|
+
argument-hint: "[ingest|record|serve|verify]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /OMG:api-twin — Contract Replay
|
|
8
|
+
|
|
9
|
+
Build a local API twin from contracts and recorded fixtures without treating simulation as final proof.
|
|
10
|
+
|
|
11
|
+
## Verbs
|
|
12
|
+
|
|
13
|
+
- `ingest`: load OpenAPI, Swagger, Postman, or example JSON into OMG state
|
|
14
|
+
- `record`: store approved request/response fixtures and tag fidelity
|
|
15
|
+
- `serve`: replay a fixture locally with optional latency, failure, or schema drift
|
|
16
|
+
- `verify`: compare a twin fixture against a live response before release proof
|
|
17
|
+
|
|
18
|
+
## Rules
|
|
19
|
+
|
|
20
|
+
- every fixture carries a fidelity tag such as `schema-only`, `recorded`, `recorded-validated`, or `stale`
|
|
21
|
+
- simulated endpoints are useful for development, not release signoff
|
|
22
|
+
- release proof still requires a final live verification pass
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Structured OMG router that classifies risk, selects the right route, and emits an execution/evidence plan."
|
|
3
|
+
allowed-tools: Read, Grep, Glob, Bash(python3:*), Bash(rg:*)
|
|
4
|
+
argument-hint: "\"<goal>\""
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /OMG:preflight — Structured Router
|
|
8
|
+
|
|
9
|
+
Use `preflight` when the goal is clear but the safest execution route is not.
|
|
10
|
+
|
|
11
|
+
## Output Contract
|
|
12
|
+
|
|
13
|
+
- restated goal
|
|
14
|
+
- task class
|
|
15
|
+
- risk class
|
|
16
|
+
- recommended route
|
|
17
|
+
- required tools and MCPs
|
|
18
|
+
- missing constraints
|
|
19
|
+
- evidence requirements
|
|
20
|
+
|
|
21
|
+
## Typical Routes
|
|
22
|
+
|
|
23
|
+
- `security-check` for security-sensitive or trust-bound work
|
|
24
|
+
- `api-twin` for contract replay and offline integration work
|
|
25
|
+
- `crazy` for parallel execution
|
|
26
|
+
- `teams` for targeted model routing
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Canonical OMG security pipeline with normalized findings, dependency enrichment, and untrusted-content evidence."
|
|
3
|
+
allowed-tools: Read, Grep, Glob, Bash(python3:*), Bash(pytest:*), Bash(rg:*)
|
|
4
|
+
argument-hint: "[path or '.' for the current project]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /OMG:security-check — Canonical Security Pipeline
|
|
8
|
+
|
|
9
|
+
Run OMG's canonical security pipeline against the current project or a scoped path.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
/OMG:security-check
|
|
15
|
+
/OMG:security-check .
|
|
16
|
+
/OMG:security-check app/
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## What It Produces
|
|
20
|
+
|
|
21
|
+
- normalized findings across policy, Python AST checks, and dependency health
|
|
22
|
+
- evidence-ready provenance and trust scores
|
|
23
|
+
- a structured result that can be reused by `ship`, the control plane, and the OMG MCP
|
|
24
|
+
|
|
25
|
+
## Notes
|
|
26
|
+
|
|
27
|
+
- Use this for auth, secrets, untrusted-content, or dependency-risk work.
|
|
28
|
+
- `omg secure --command ...` remains the low-level command-risk primitive, not the full audit surface.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""OMG command package marker for packaging parity."""
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
openapi: 3.1.0
|
|
2
|
+
info:
|
|
3
|
+
title: OMG Control Plane API
|
|
4
|
+
version: 2.0.5
|
|
5
|
+
description: Policy/trust/evidence/runtime/registry/lab endpoints for OMG v2, with deprecated v1 aliases for one release.
|
|
6
|
+
servers:
|
|
7
|
+
- url: https://api.omg.local
|
|
8
|
+
paths:
|
|
9
|
+
/v2/policy/evaluate:
|
|
10
|
+
post:
|
|
11
|
+
summary: Evaluate policy decision
|
|
12
|
+
requestBody:
|
|
13
|
+
required: true
|
|
14
|
+
content:
|
|
15
|
+
application/json:
|
|
16
|
+
schema:
|
|
17
|
+
$ref: '#/components/schemas/PolicyInput'
|
|
18
|
+
responses:
|
|
19
|
+
'200':
|
|
20
|
+
description: Decision result
|
|
21
|
+
content:
|
|
22
|
+
application/json:
|
|
23
|
+
schema:
|
|
24
|
+
$ref: '#/components/schemas/PolicyDecision'
|
|
25
|
+
/v1/policy/evaluate:
|
|
26
|
+
post:
|
|
27
|
+
deprecated: true
|
|
28
|
+
summary: Deprecated alias of /v2/policy/evaluate
|
|
29
|
+
responses:
|
|
30
|
+
'200':
|
|
31
|
+
description: Decision result
|
|
32
|
+
/v2/trust/review:
|
|
33
|
+
post:
|
|
34
|
+
summary: Review trust-sensitive config changes
|
|
35
|
+
responses:
|
|
36
|
+
'200':
|
|
37
|
+
description: Trust review report
|
|
38
|
+
content:
|
|
39
|
+
application/json:
|
|
40
|
+
schema:
|
|
41
|
+
$ref: '#/components/schemas/TrustReview'
|
|
42
|
+
/v1/trust/review:
|
|
43
|
+
post:
|
|
44
|
+
deprecated: true
|
|
45
|
+
summary: Deprecated alias of /v2/trust/review
|
|
46
|
+
responses:
|
|
47
|
+
'200':
|
|
48
|
+
description: Trust review report
|
|
49
|
+
/v2/evidence/ingest:
|
|
50
|
+
post:
|
|
51
|
+
summary: Ingest evidence pack
|
|
52
|
+
responses:
|
|
53
|
+
'202':
|
|
54
|
+
description: Accepted
|
|
55
|
+
/v1/evidence/ingest:
|
|
56
|
+
post:
|
|
57
|
+
deprecated: true
|
|
58
|
+
summary: Deprecated alias of /v2/evidence/ingest
|
|
59
|
+
responses:
|
|
60
|
+
'202':
|
|
61
|
+
description: Accepted
|
|
62
|
+
/v2/security/check:
|
|
63
|
+
post:
|
|
64
|
+
summary: Run canonical OMG security check
|
|
65
|
+
responses:
|
|
66
|
+
'200':
|
|
67
|
+
description: Security check result
|
|
68
|
+
content:
|
|
69
|
+
application/json:
|
|
70
|
+
schema:
|
|
71
|
+
$ref: '#/components/schemas/SecurityCheckResult'
|
|
72
|
+
/v1/security/check:
|
|
73
|
+
post:
|
|
74
|
+
deprecated: true
|
|
75
|
+
summary: Deprecated alias of /v2/security/check
|
|
76
|
+
responses:
|
|
77
|
+
'200':
|
|
78
|
+
description: Security check result
|
|
79
|
+
/v2/guide/assert:
|
|
80
|
+
post:
|
|
81
|
+
summary: Assert output against explicit project rules
|
|
82
|
+
responses:
|
|
83
|
+
'200':
|
|
84
|
+
description: Guide assertion result
|
|
85
|
+
content:
|
|
86
|
+
application/json:
|
|
87
|
+
schema:
|
|
88
|
+
$ref: '#/components/schemas/GuideAssertionResult'
|
|
89
|
+
/v1/guide/assert:
|
|
90
|
+
post:
|
|
91
|
+
deprecated: true
|
|
92
|
+
summary: Deprecated alias of /v2/guide/assert
|
|
93
|
+
responses:
|
|
94
|
+
'200':
|
|
95
|
+
description: Guide assertion result
|
|
96
|
+
/v2/runtime/dispatch:
|
|
97
|
+
post:
|
|
98
|
+
summary: Dispatch job to runtime adapter
|
|
99
|
+
responses:
|
|
100
|
+
'200':
|
|
101
|
+
description: Runtime dispatch result
|
|
102
|
+
/v1/runtime/dispatch:
|
|
103
|
+
post:
|
|
104
|
+
deprecated: true
|
|
105
|
+
summary: Deprecated alias of /v2/runtime/dispatch
|
|
106
|
+
responses:
|
|
107
|
+
'200':
|
|
108
|
+
description: Runtime dispatch result
|
|
109
|
+
/v2/registry/verify:
|
|
110
|
+
post:
|
|
111
|
+
summary: Verify supply-chain artifact
|
|
112
|
+
responses:
|
|
113
|
+
'200':
|
|
114
|
+
description: Verification decision
|
|
115
|
+
/v1/registry/verify:
|
|
116
|
+
post:
|
|
117
|
+
deprecated: true
|
|
118
|
+
summary: Deprecated alias of /v2/registry/verify
|
|
119
|
+
responses:
|
|
120
|
+
'200':
|
|
121
|
+
description: Verification decision
|
|
122
|
+
/v2/lab/jobs:
|
|
123
|
+
post:
|
|
124
|
+
summary: Create lab pipeline job
|
|
125
|
+
responses:
|
|
126
|
+
'201':
|
|
127
|
+
description: Created
|
|
128
|
+
/v1/lab/jobs:
|
|
129
|
+
post:
|
|
130
|
+
deprecated: true
|
|
131
|
+
summary: Deprecated alias of /v2/lab/jobs
|
|
132
|
+
responses:
|
|
133
|
+
'201':
|
|
134
|
+
description: Created
|
|
135
|
+
/v2/scoreboard/baseline:
|
|
136
|
+
get:
|
|
137
|
+
summary: Return baseline scorecard
|
|
138
|
+
responses:
|
|
139
|
+
'200':
|
|
140
|
+
description: KPI baseline snapshot
|
|
141
|
+
/v1/scoreboard/baseline:
|
|
142
|
+
get:
|
|
143
|
+
deprecated: true
|
|
144
|
+
summary: Deprecated alias of /v2/scoreboard/baseline
|
|
145
|
+
responses:
|
|
146
|
+
'200':
|
|
147
|
+
description: KPI baseline snapshot
|
|
148
|
+
components:
|
|
149
|
+
schemas:
|
|
150
|
+
PolicyInput:
|
|
151
|
+
type: object
|
|
152
|
+
properties:
|
|
153
|
+
tool:
|
|
154
|
+
type: string
|
|
155
|
+
input:
|
|
156
|
+
type: object
|
|
157
|
+
additionalProperties: true
|
|
158
|
+
PolicyDecision:
|
|
159
|
+
type: object
|
|
160
|
+
required: [action, risk_level, reason, controls]
|
|
161
|
+
properties:
|
|
162
|
+
action:
|
|
163
|
+
type: string
|
|
164
|
+
enum: [allow, ask, deny]
|
|
165
|
+
risk_level:
|
|
166
|
+
type: string
|
|
167
|
+
enum: [low, med, high, critical]
|
|
168
|
+
reason:
|
|
169
|
+
type: string
|
|
170
|
+
controls:
|
|
171
|
+
type: array
|
|
172
|
+
items:
|
|
173
|
+
type: string
|
|
174
|
+
TrustReview:
|
|
175
|
+
type: object
|
|
176
|
+
required: [changed_files, mcp_changes, hook_changes, env_changes, risk_score, verdict]
|
|
177
|
+
properties:
|
|
178
|
+
changed_files:
|
|
179
|
+
type: array
|
|
180
|
+
items: { type: string }
|
|
181
|
+
mcp_changes:
|
|
182
|
+
type: array
|
|
183
|
+
items: { type: object }
|
|
184
|
+
hook_changes:
|
|
185
|
+
type: object
|
|
186
|
+
env_changes:
|
|
187
|
+
type: array
|
|
188
|
+
items: { type: object }
|
|
189
|
+
risk_score:
|
|
190
|
+
type: integer
|
|
191
|
+
verdict:
|
|
192
|
+
type: string
|
|
193
|
+
SecurityCheckResult:
|
|
194
|
+
type: object
|
|
195
|
+
required: [schema, status, scope, findings, summary, provenance, trust_scores]
|
|
196
|
+
properties:
|
|
197
|
+
schema:
|
|
198
|
+
type: string
|
|
199
|
+
status:
|
|
200
|
+
type: string
|
|
201
|
+
scope:
|
|
202
|
+
type: string
|
|
203
|
+
findings:
|
|
204
|
+
type: array
|
|
205
|
+
items:
|
|
206
|
+
type: object
|
|
207
|
+
summary:
|
|
208
|
+
type: object
|
|
209
|
+
provenance:
|
|
210
|
+
type: array
|
|
211
|
+
items:
|
|
212
|
+
type: object
|
|
213
|
+
trust_scores:
|
|
214
|
+
type: object
|
|
215
|
+
GuideAssertionResult:
|
|
216
|
+
type: object
|
|
217
|
+
required: [schema, verdict, violations, summary]
|
|
218
|
+
properties:
|
|
219
|
+
schema:
|
|
220
|
+
type: string
|
|
221
|
+
verdict:
|
|
222
|
+
type: string
|
|
223
|
+
violations:
|
|
224
|
+
type: array
|
|
225
|
+
items:
|
|
226
|
+
type: object
|
|
227
|
+
summary:
|
|
228
|
+
type: object
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"""Lightweight HTTP server for OMG control-plane APIs."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
import argparse
|
|
5
|
+
import sys
|
|
6
|
+
from http.server import BaseHTTPRequestHandler, HTTPServer
|
|
7
|
+
import json
|
|
8
|
+
from typing import Any
|
|
9
|
+
|
|
10
|
+
from control_plane.service import ControlPlaneService
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _json_response(handler: BaseHTTPRequestHandler, status: int, payload: dict[str, Any]) -> None:
|
|
14
|
+
body = json.dumps(payload, ensure_ascii=True).encode("utf-8")
|
|
15
|
+
handler.send_response(status)
|
|
16
|
+
handler.send_header("Content-Type", "application/json")
|
|
17
|
+
handler.send_header("Content-Length", str(len(body)))
|
|
18
|
+
handler.end_headers()
|
|
19
|
+
handler.wfile.write(body)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def _read_json(handler: BaseHTTPRequestHandler) -> dict[str, Any]:
|
|
23
|
+
length = int(handler.headers.get("Content-Length", "0"))
|
|
24
|
+
if length <= 0:
|
|
25
|
+
return {}
|
|
26
|
+
raw = handler.rfile.read(length)
|
|
27
|
+
if not raw:
|
|
28
|
+
return {}
|
|
29
|
+
try:
|
|
30
|
+
parsed = json.loads(raw.decode("utf-8"))
|
|
31
|
+
return parsed if isinstance(parsed, dict) else {}
|
|
32
|
+
except json.JSONDecodeError:
|
|
33
|
+
return {}
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
_POST_ROUTE_TABLE = {
|
|
37
|
+
"/v2/policy/evaluate": ("policy_evaluate", False),
|
|
38
|
+
"/v1/policy/evaluate": ("policy_evaluate", True),
|
|
39
|
+
"/v2/trust/review": ("trust_review", False),
|
|
40
|
+
"/v1/trust/review": ("trust_review", True),
|
|
41
|
+
"/v2/evidence/ingest": ("evidence_ingest", False),
|
|
42
|
+
"/v1/evidence/ingest": ("evidence_ingest", True),
|
|
43
|
+
"/v2/security/check": ("security_check", False),
|
|
44
|
+
"/v1/security/check": ("security_check", True),
|
|
45
|
+
"/v2/guide/assert": ("guide_assert", False),
|
|
46
|
+
"/v1/guide/assert": ("guide_assert", True),
|
|
47
|
+
"/v2/runtime/dispatch": ("runtime_dispatch", False),
|
|
48
|
+
"/v1/runtime/dispatch": ("runtime_dispatch", True),
|
|
49
|
+
"/v2/registry/verify": ("registry_verify", False),
|
|
50
|
+
"/v1/registry/verify": ("registry_verify", True),
|
|
51
|
+
"/v2/lab/jobs": ("lab_jobs", False),
|
|
52
|
+
"/v1/lab/jobs": ("lab_jobs", True),
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
_GET_ROUTE_TABLE = {
|
|
56
|
+
"/v2/scoreboard/baseline": ("scoreboard_baseline", False),
|
|
57
|
+
"/v1/scoreboard/baseline": ("scoreboard_baseline", True),
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def _decorate_payload(payload: dict[str, Any], *, deprecated: bool) -> dict[str, Any]:
|
|
62
|
+
decorated = dict(payload)
|
|
63
|
+
decorated["api_version"] = "v2"
|
|
64
|
+
if deprecated:
|
|
65
|
+
decorated["deprecated"] = True
|
|
66
|
+
decorated["deprecated_alias"] = "v1"
|
|
67
|
+
return decorated
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def make_handler(service: ControlPlaneService):
|
|
71
|
+
class Handler(BaseHTTPRequestHandler):
|
|
72
|
+
def do_GET(self) -> None: # noqa: N802
|
|
73
|
+
route = _GET_ROUTE_TABLE.get(self.path)
|
|
74
|
+
if route is not None:
|
|
75
|
+
method_name, deprecated = route
|
|
76
|
+
status, payload = getattr(service, method_name)()
|
|
77
|
+
_json_response(self, status, _decorate_payload(payload, deprecated=deprecated))
|
|
78
|
+
return
|
|
79
|
+
_json_response(self, 404, {"status": "error", "message": "Not found"})
|
|
80
|
+
|
|
81
|
+
def do_POST(self) -> None: # noqa: N802
|
|
82
|
+
payload = _read_json(self)
|
|
83
|
+
route = _POST_ROUTE_TABLE.get(self.path)
|
|
84
|
+
if route is not None:
|
|
85
|
+
method_name, deprecated = route
|
|
86
|
+
status, out = getattr(service, method_name)(payload)
|
|
87
|
+
_json_response(self, status, _decorate_payload(out, deprecated=deprecated))
|
|
88
|
+
return
|
|
89
|
+
|
|
90
|
+
_json_response(self, 404, {"status": "error", "message": "Not found"})
|
|
91
|
+
|
|
92
|
+
def log_message(self, format: str, *args: Any) -> None: # noqa: A003
|
|
93
|
+
# Quiet default request logs; keep response JSON clean for local usage.
|
|
94
|
+
return
|
|
95
|
+
|
|
96
|
+
return Handler
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
def run_server(host: str = "127.0.0.1", port: int = 8787, project_dir: str | None = None) -> None:
|
|
100
|
+
service = ControlPlaneService(project_dir=project_dir)
|
|
101
|
+
handler = make_handler(service)
|
|
102
|
+
server = HTTPServer((host, port), handler)
|
|
103
|
+
try:
|
|
104
|
+
server.serve_forever()
|
|
105
|
+
finally:
|
|
106
|
+
server.server_close()
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
def _main() -> int:
|
|
110
|
+
parser = argparse.ArgumentParser(description="Run OMG control-plane API server")
|
|
111
|
+
parser.add_argument("--host", default="127.0.0.1")
|
|
112
|
+
parser.add_argument("--port", type=int, default=8787)
|
|
113
|
+
parser.add_argument("--project-dir", default=None)
|
|
114
|
+
args = parser.parse_args()
|
|
115
|
+
if args.host != "127.0.0.1":
|
|
116
|
+
print(f"⚠ WARNING: Binding to {args.host} exposes the control plane to the network. No authentication is configured.", file=sys.stderr)
|
|
117
|
+
|
|
118
|
+
run_server(args.host, args.port, args.project_dir)
|
|
119
|
+
return 0
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
if __name__ == "__main__":
|
|
123
|
+
raise SystemExit(_main())
|