@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.
Files changed (259) hide show
  1. package/.agents/skills/omg/AGENTS.fragment.md +5 -0
  2. package/.agents/skills/omg/algorithms/SKILL.md +11 -0
  3. package/.agents/skills/omg/algorithms/openai.yaml +11 -0
  4. package/.agents/skills/omg/api-twin/SKILL.md +11 -0
  5. package/.agents/skills/omg/api-twin/openai.yaml +12 -0
  6. package/.agents/skills/omg/codex-mcp.toml +4 -0
  7. package/.agents/skills/omg/control-plane/SKILL.md +11 -0
  8. package/.agents/skills/omg/control-plane/openai.yaml +14 -0
  9. package/.agents/skills/omg/data-lineage/SKILL.md +11 -0
  10. package/.agents/skills/omg/data-lineage/openai.yaml +12 -0
  11. package/.agents/skills/omg/delta-classifier/SKILL.md +11 -0
  12. package/.agents/skills/omg/delta-classifier/openai.yaml +12 -0
  13. package/.agents/skills/omg/eval-gate/SKILL.md +11 -0
  14. package/.agents/skills/omg/eval-gate/openai.yaml +12 -0
  15. package/.agents/skills/omg/health/SKILL.md +11 -0
  16. package/.agents/skills/omg/health/openai.yaml +11 -0
  17. package/.agents/skills/omg/hook-governor/SKILL.md +11 -0
  18. package/.agents/skills/omg/hook-governor/openai.yaml +11 -0
  19. package/.agents/skills/omg/incident-replay/SKILL.md +11 -0
  20. package/.agents/skills/omg/incident-replay/openai.yaml +12 -0
  21. package/.agents/skills/omg/lsp-pack/SKILL.md +11 -0
  22. package/.agents/skills/omg/lsp-pack/openai.yaml +11 -0
  23. package/.agents/skills/omg/mcp-fabric/SKILL.md +11 -0
  24. package/.agents/skills/omg/mcp-fabric/openai.yaml +13 -0
  25. package/.agents/skills/omg/preflight/SKILL.md +11 -0
  26. package/.agents/skills/omg/preflight/openai.yaml +12 -0
  27. package/.agents/skills/omg/remote-supervisor/SKILL.md +11 -0
  28. package/.agents/skills/omg/remote-supervisor/openai.yaml +12 -0
  29. package/.agents/skills/omg/robotics/SKILL.md +11 -0
  30. package/.agents/skills/omg/robotics/openai.yaml +11 -0
  31. package/.agents/skills/omg/secure-worktree-pipeline/SKILL.md +11 -0
  32. package/.agents/skills/omg/secure-worktree-pipeline/openai.yaml +12 -0
  33. package/.agents/skills/omg/security-check/SKILL.md +11 -0
  34. package/.agents/skills/omg/security-check/openai.yaml +13 -0
  35. package/.agents/skills/omg/tracebank/SKILL.md +11 -0
  36. package/.agents/skills/omg/tracebank/openai.yaml +12 -0
  37. package/.agents/skills/omg/vision/SKILL.md +11 -0
  38. package/.agents/skills/omg/vision/openai.yaml +11 -0
  39. package/.claude-plugin/marketplace.json +3 -3
  40. package/.claude-plugin/plugin.json +1 -1
  41. package/.claude-plugin/scripts/uninstall.sh +2 -2
  42. package/.mcp.json +20 -4
  43. package/CHANGELOG.md +10 -0
  44. package/OMG-setup.sh +9 -3
  45. package/OMG_COMPAT_CONTRACT.md +92 -0
  46. package/README.md +24 -4
  47. package/SECURITY.md +6 -0
  48. package/commands/OMG:api-twin.md +22 -0
  49. package/commands/OMG:preflight.md +26 -0
  50. package/commands/OMG:security-check.md +28 -0
  51. package/commands/__init__.py +1 -0
  52. package/control_plane/__init__.py +2 -0
  53. package/control_plane/openapi.yaml +228 -0
  54. package/control_plane/server.py +123 -0
  55. package/control_plane/service.py +185 -0
  56. package/dist/enterprise/bundle/.agents/skills/omg/AGENTS.fragment.md +5 -0
  57. package/dist/enterprise/bundle/.agents/skills/omg/algorithms/SKILL.md +11 -0
  58. package/dist/enterprise/bundle/.agents/skills/omg/algorithms/openai.yaml +11 -0
  59. package/dist/enterprise/bundle/.agents/skills/omg/api-twin/SKILL.md +11 -0
  60. package/dist/enterprise/bundle/.agents/skills/omg/api-twin/openai.yaml +12 -0
  61. package/dist/enterprise/bundle/.agents/skills/omg/codex-mcp.toml +4 -0
  62. package/dist/enterprise/bundle/.agents/skills/omg/control-plane/SKILL.md +11 -0
  63. package/dist/enterprise/bundle/.agents/skills/omg/control-plane/openai.yaml +14 -0
  64. package/dist/enterprise/bundle/.agents/skills/omg/data-lineage/SKILL.md +11 -0
  65. package/dist/enterprise/bundle/.agents/skills/omg/data-lineage/openai.yaml +12 -0
  66. package/dist/enterprise/bundle/.agents/skills/omg/delta-classifier/SKILL.md +11 -0
  67. package/dist/enterprise/bundle/.agents/skills/omg/delta-classifier/openai.yaml +12 -0
  68. package/dist/enterprise/bundle/.agents/skills/omg/eval-gate/SKILL.md +11 -0
  69. package/dist/enterprise/bundle/.agents/skills/omg/eval-gate/openai.yaml +12 -0
  70. package/dist/enterprise/bundle/.agents/skills/omg/health/SKILL.md +11 -0
  71. package/dist/enterprise/bundle/.agents/skills/omg/health/openai.yaml +11 -0
  72. package/dist/enterprise/bundle/.agents/skills/omg/hook-governor/SKILL.md +11 -0
  73. package/dist/enterprise/bundle/.agents/skills/omg/hook-governor/openai.yaml +11 -0
  74. package/dist/enterprise/bundle/.agents/skills/omg/incident-replay/SKILL.md +11 -0
  75. package/dist/enterprise/bundle/.agents/skills/omg/incident-replay/openai.yaml +12 -0
  76. package/dist/enterprise/bundle/.agents/skills/omg/lsp-pack/SKILL.md +11 -0
  77. package/dist/enterprise/bundle/.agents/skills/omg/lsp-pack/openai.yaml +11 -0
  78. package/dist/enterprise/bundle/.agents/skills/omg/mcp-fabric/SKILL.md +11 -0
  79. package/dist/enterprise/bundle/.agents/skills/omg/mcp-fabric/openai.yaml +13 -0
  80. package/dist/enterprise/bundle/.agents/skills/omg/preflight/SKILL.md +11 -0
  81. package/dist/enterprise/bundle/.agents/skills/omg/preflight/openai.yaml +12 -0
  82. package/dist/enterprise/bundle/.agents/skills/omg/remote-supervisor/SKILL.md +11 -0
  83. package/dist/enterprise/bundle/.agents/skills/omg/remote-supervisor/openai.yaml +12 -0
  84. package/dist/enterprise/bundle/.agents/skills/omg/robotics/SKILL.md +11 -0
  85. package/dist/enterprise/bundle/.agents/skills/omg/robotics/openai.yaml +11 -0
  86. package/dist/enterprise/bundle/.agents/skills/omg/secure-worktree-pipeline/SKILL.md +11 -0
  87. package/dist/enterprise/bundle/.agents/skills/omg/secure-worktree-pipeline/openai.yaml +12 -0
  88. package/dist/enterprise/bundle/.agents/skills/omg/security-check/SKILL.md +11 -0
  89. package/dist/enterprise/bundle/.agents/skills/omg/security-check/openai.yaml +13 -0
  90. package/dist/enterprise/bundle/.agents/skills/omg/tracebank/SKILL.md +11 -0
  91. package/dist/enterprise/bundle/.agents/skills/omg/tracebank/openai.yaml +12 -0
  92. package/dist/enterprise/bundle/.agents/skills/omg/vision/SKILL.md +11 -0
  93. package/dist/enterprise/bundle/.agents/skills/omg/vision/openai.yaml +11 -0
  94. package/dist/enterprise/bundle/.claude-plugin/marketplace.json +36 -0
  95. package/dist/enterprise/bundle/.claude-plugin/plugin.json +23 -0
  96. package/dist/enterprise/bundle/.mcp.json +40 -0
  97. package/dist/enterprise/bundle/OMG_COMPAT_CONTRACT.md +92 -0
  98. package/dist/enterprise/bundle/registry/bundles/algorithms.yaml +45 -0
  99. package/dist/enterprise/bundle/registry/bundles/api-twin.yaml +48 -0
  100. package/dist/enterprise/bundle/registry/bundles/control-plane.yaml +61 -0
  101. package/dist/enterprise/bundle/registry/bundles/data-lineage.yaml +47 -0
  102. package/dist/enterprise/bundle/registry/bundles/delta-classifier.yaml +47 -0
  103. package/dist/enterprise/bundle/registry/bundles/eval-gate.yaml +47 -0
  104. package/dist/enterprise/bundle/registry/bundles/health.yaml +45 -0
  105. package/dist/enterprise/bundle/registry/bundles/hook-governor.yaml +97 -0
  106. package/dist/enterprise/bundle/registry/bundles/incident-replay.yaml +47 -0
  107. package/dist/enterprise/bundle/registry/bundles/lsp-pack.yaml +48 -0
  108. package/dist/enterprise/bundle/registry/bundles/mcp-fabric.yaml +53 -0
  109. package/dist/enterprise/bundle/registry/bundles/preflight.yaml +48 -0
  110. package/dist/enterprise/bundle/registry/bundles/remote-supervisor.yaml +49 -0
  111. package/dist/enterprise/bundle/registry/bundles/robotics.yaml +45 -0
  112. package/dist/enterprise/bundle/registry/bundles/secure-worktree-pipeline.yaml +54 -0
  113. package/dist/enterprise/bundle/registry/bundles/security-check.yaml +50 -0
  114. package/dist/enterprise/bundle/registry/bundles/tracebank.yaml +47 -0
  115. package/dist/enterprise/bundle/registry/bundles/vision.yaml +45 -0
  116. package/dist/enterprise/bundle/registry/omg-capability.schema.json +80 -0
  117. package/dist/enterprise/bundle/settings.json +381 -0
  118. package/dist/enterprise/manifest.json +255 -0
  119. package/dist/public/bundle/.agents/skills/omg/AGENTS.fragment.md +5 -0
  120. package/dist/public/bundle/.agents/skills/omg/algorithms/SKILL.md +11 -0
  121. package/dist/public/bundle/.agents/skills/omg/algorithms/openai.yaml +11 -0
  122. package/dist/public/bundle/.agents/skills/omg/api-twin/SKILL.md +11 -0
  123. package/dist/public/bundle/.agents/skills/omg/api-twin/openai.yaml +12 -0
  124. package/dist/public/bundle/.agents/skills/omg/codex-mcp.toml +4 -0
  125. package/dist/public/bundle/.agents/skills/omg/control-plane/SKILL.md +11 -0
  126. package/dist/public/bundle/.agents/skills/omg/control-plane/openai.yaml +14 -0
  127. package/dist/public/bundle/.agents/skills/omg/data-lineage/SKILL.md +11 -0
  128. package/dist/public/bundle/.agents/skills/omg/data-lineage/openai.yaml +12 -0
  129. package/dist/public/bundle/.agents/skills/omg/delta-classifier/SKILL.md +11 -0
  130. package/dist/public/bundle/.agents/skills/omg/delta-classifier/openai.yaml +12 -0
  131. package/dist/public/bundle/.agents/skills/omg/eval-gate/SKILL.md +11 -0
  132. package/dist/public/bundle/.agents/skills/omg/eval-gate/openai.yaml +12 -0
  133. package/dist/public/bundle/.agents/skills/omg/health/SKILL.md +11 -0
  134. package/dist/public/bundle/.agents/skills/omg/health/openai.yaml +11 -0
  135. package/dist/public/bundle/.agents/skills/omg/hook-governor/SKILL.md +11 -0
  136. package/dist/public/bundle/.agents/skills/omg/hook-governor/openai.yaml +11 -0
  137. package/dist/public/bundle/.agents/skills/omg/incident-replay/SKILL.md +11 -0
  138. package/dist/public/bundle/.agents/skills/omg/incident-replay/openai.yaml +12 -0
  139. package/dist/public/bundle/.agents/skills/omg/lsp-pack/SKILL.md +11 -0
  140. package/dist/public/bundle/.agents/skills/omg/lsp-pack/openai.yaml +11 -0
  141. package/dist/public/bundle/.agents/skills/omg/mcp-fabric/SKILL.md +11 -0
  142. package/dist/public/bundle/.agents/skills/omg/mcp-fabric/openai.yaml +13 -0
  143. package/dist/public/bundle/.agents/skills/omg/preflight/SKILL.md +11 -0
  144. package/dist/public/bundle/.agents/skills/omg/preflight/openai.yaml +12 -0
  145. package/dist/public/bundle/.agents/skills/omg/remote-supervisor/SKILL.md +11 -0
  146. package/dist/public/bundle/.agents/skills/omg/remote-supervisor/openai.yaml +12 -0
  147. package/dist/public/bundle/.agents/skills/omg/robotics/SKILL.md +11 -0
  148. package/dist/public/bundle/.agents/skills/omg/robotics/openai.yaml +11 -0
  149. package/dist/public/bundle/.agents/skills/omg/secure-worktree-pipeline/SKILL.md +11 -0
  150. package/dist/public/bundle/.agents/skills/omg/secure-worktree-pipeline/openai.yaml +12 -0
  151. package/dist/public/bundle/.agents/skills/omg/security-check/SKILL.md +11 -0
  152. package/dist/public/bundle/.agents/skills/omg/security-check/openai.yaml +13 -0
  153. package/dist/public/bundle/.agents/skills/omg/tracebank/SKILL.md +11 -0
  154. package/dist/public/bundle/.agents/skills/omg/tracebank/openai.yaml +12 -0
  155. package/dist/public/bundle/.agents/skills/omg/vision/SKILL.md +11 -0
  156. package/dist/public/bundle/.agents/skills/omg/vision/openai.yaml +11 -0
  157. package/dist/public/bundle/.claude-plugin/marketplace.json +36 -0
  158. package/dist/public/bundle/.claude-plugin/plugin.json +23 -0
  159. package/dist/public/bundle/.mcp.json +40 -0
  160. package/dist/public/bundle/OMG_COMPAT_CONTRACT.md +92 -0
  161. package/dist/public/bundle/registry/bundles/algorithms.yaml +45 -0
  162. package/dist/public/bundle/registry/bundles/api-twin.yaml +48 -0
  163. package/dist/public/bundle/registry/bundles/control-plane.yaml +61 -0
  164. package/dist/public/bundle/registry/bundles/data-lineage.yaml +47 -0
  165. package/dist/public/bundle/registry/bundles/delta-classifier.yaml +47 -0
  166. package/dist/public/bundle/registry/bundles/eval-gate.yaml +47 -0
  167. package/dist/public/bundle/registry/bundles/health.yaml +45 -0
  168. package/dist/public/bundle/registry/bundles/hook-governor.yaml +97 -0
  169. package/dist/public/bundle/registry/bundles/incident-replay.yaml +47 -0
  170. package/dist/public/bundle/registry/bundles/lsp-pack.yaml +48 -0
  171. package/dist/public/bundle/registry/bundles/mcp-fabric.yaml +53 -0
  172. package/dist/public/bundle/registry/bundles/preflight.yaml +48 -0
  173. package/dist/public/bundle/registry/bundles/remote-supervisor.yaml +49 -0
  174. package/dist/public/bundle/registry/bundles/robotics.yaml +45 -0
  175. package/dist/public/bundle/registry/bundles/secure-worktree-pipeline.yaml +54 -0
  176. package/dist/public/bundle/registry/bundles/security-check.yaml +50 -0
  177. package/dist/public/bundle/registry/bundles/tracebank.yaml +47 -0
  178. package/dist/public/bundle/registry/bundles/vision.yaml +45 -0
  179. package/dist/public/bundle/registry/omg-capability.schema.json +80 -0
  180. package/dist/public/bundle/settings.json +379 -0
  181. package/dist/public/manifest.json +255 -0
  182. package/docs/assets/omg-hud.svg +32 -0
  183. package/docs/install/claude-code.md +31 -0
  184. package/docs/install/codex.md +29 -0
  185. package/docs/migration/native-adoption.md +57 -0
  186. package/docs/proof.md +55 -0
  187. package/docs/release-checklist.md +38 -0
  188. package/docs/transcripts/crazy.md +17 -0
  189. package/docs/transcripts/setup.md +25 -0
  190. package/hooks/policy_engine.py +38 -7
  191. package/hooks/post-write.py +1 -1
  192. package/hooks/prompt-enhancer.py +1 -1
  193. package/hooks/security_validators.py +75 -0
  194. package/hooks/setup_wizard.py +43 -8
  195. package/hooks/shadow_manager.py +28 -2
  196. package/package.json +1 -1
  197. package/plugins/README.md +3 -1
  198. package/plugins/__init__.py +1 -0
  199. package/plugins/advanced/commands/OMG:deep-plan.md +1 -1
  200. package/plugins/advanced/commands/OMG:security-review.md +10 -113
  201. package/plugins/advanced/commands/OMG:ship.md +1 -1
  202. package/plugins/advanced/plugin.json +1 -10
  203. package/plugins/core/plugin.json +25 -2
  204. package/pyproject.toml +38 -2
  205. package/registry/__init__.py +1 -0
  206. package/registry/bundles/algorithms.yaml +45 -0
  207. package/registry/bundles/api-twin.yaml +48 -0
  208. package/registry/bundles/control-plane.yaml +61 -0
  209. package/registry/bundles/data-lineage.yaml +47 -0
  210. package/registry/bundles/delta-classifier.yaml +47 -0
  211. package/registry/bundles/eval-gate.yaml +47 -0
  212. package/registry/bundles/health.yaml +45 -0
  213. package/registry/bundles/hook-governor.yaml +97 -0
  214. package/registry/bundles/incident-replay.yaml +47 -0
  215. package/registry/bundles/lsp-pack.yaml +48 -0
  216. package/registry/bundles/mcp-fabric.yaml +53 -0
  217. package/registry/bundles/preflight.yaml +48 -0
  218. package/registry/bundles/remote-supervisor.yaml +49 -0
  219. package/registry/bundles/robotics.yaml +45 -0
  220. package/registry/bundles/secure-worktree-pipeline.yaml +54 -0
  221. package/registry/bundles/security-check.yaml +50 -0
  222. package/registry/bundles/tracebank.yaml +47 -0
  223. package/registry/bundles/vision.yaml +45 -0
  224. package/registry/omg-capability.schema.json +80 -0
  225. package/registry/verify_artifact.py +90 -0
  226. package/runtime/adapters/claude.py +3 -0
  227. package/runtime/adapters/gpt.py +3 -0
  228. package/runtime/adapters/local.py +3 -0
  229. package/runtime/adoption.py +1 -1
  230. package/runtime/api_twin.py +179 -0
  231. package/runtime/asset_loader.py +62 -0
  232. package/runtime/compat.py +24 -3
  233. package/runtime/contract_compiler.py +847 -0
  234. package/runtime/data_lineage.py +73 -0
  235. package/runtime/delta_classifier.py +81 -0
  236. package/runtime/domain_packs.py +46 -0
  237. package/runtime/ecosystem.py +1 -1
  238. package/runtime/eval_gate.py +50 -0
  239. package/runtime/guide_assert.py +45 -0
  240. package/runtime/incident_replay.py +47 -0
  241. package/runtime/mcp_config_writers.py +147 -30
  242. package/runtime/mcp_memory_server.py +1 -1
  243. package/runtime/omg_compat_contract_snapshot.json +9 -8
  244. package/runtime/omg_contract_snapshot.json +9 -8
  245. package/runtime/omg_mcp_server.py +207 -0
  246. package/runtime/preflight.py +73 -0
  247. package/runtime/providers/codex_provider.py +2 -12
  248. package/runtime/providers/gemini_provider.py +2 -21
  249. package/runtime/providers/kimi_provider.py +2 -21
  250. package/runtime/remote_supervisor.py +64 -0
  251. package/runtime/runtime_profile.py +61 -0
  252. package/runtime/security_check.py +464 -0
  253. package/runtime/subagent_dispatcher.py +117 -10
  254. package/runtime/team_router.py +3 -1
  255. package/runtime/tracebank.py +53 -0
  256. package/runtime/untrusted_content.py +102 -0
  257. package/scripts/omg.py +360 -2
  258. package/settings.json +81 -18
  259. package/tools/python_repl.py +33 -3
@@ -0,0 +1,185 @@
1
+ """Control plane service handlers for OMG v1."""
2
+ from __future__ import annotations
3
+
4
+ from datetime import datetime, timezone
5
+ import os
6
+ from typing import Any
7
+
8
+ from hooks.policy_engine import (
9
+ evaluate_bash_command,
10
+ evaluate_file_access,
11
+ evaluate_supply_artifact,
12
+ )
13
+ from hooks.security_validators import validate_opaque_identifier
14
+ from hooks.shadow_manager import create_evidence_pack
15
+ from hooks.trust_review import review_config_change
16
+ from lab.pipeline import run_pipeline
17
+ from registry.verify_artifact import verify_artifact
18
+ from runtime.guide_assert import guide_assert
19
+ from runtime.dispatcher import dispatch_runtime
20
+ from runtime.security_check import run_security_check
21
+
22
+
23
+ class ControlPlaneService:
24
+ def __init__(self, project_dir: str | None = None):
25
+ self.project_dir = project_dir or os.environ.get("CLAUDE_PROJECT_DIR", os.getcwd())
26
+
27
+ def policy_evaluate(self, payload: dict[str, Any]) -> tuple[int, dict[str, Any]]:
28
+ tool = str(payload.get("tool", ""))
29
+ input_data = payload.get("input", {})
30
+
31
+ if tool == "Bash":
32
+ command = str((input_data or {}).get("command", ""))
33
+ decision = evaluate_bash_command(command)
34
+ return 200, decision.to_dict()
35
+
36
+ if tool in {"Read", "Write", "Edit", "MultiEdit"}:
37
+ file_path = str((input_data or {}).get("file_path", ""))
38
+ decision = evaluate_file_access(tool, file_path)
39
+ return 200, decision.to_dict()
40
+
41
+ if tool == "SupplyArtifact":
42
+ artifact = payload.get("artifact", {})
43
+ mode = str(payload.get("mode", "warn_and_run"))
44
+ decision = evaluate_supply_artifact(artifact, mode=mode)
45
+ return 200, decision.to_dict()
46
+
47
+ return 400, {
48
+ "status": "error",
49
+ "error_code": "INVALID_POLICY_INPUT",
50
+ "message": "Unsupported tool for policy evaluation",
51
+ }
52
+
53
+ def trust_review(self, payload: dict[str, Any]) -> tuple[int, dict[str, Any]]:
54
+ file_path = str(payload.get("file_path", "settings.json"))
55
+ old_config = payload.get("old_config", {})
56
+ new_config = payload.get("new_config", {})
57
+ if not isinstance(old_config, dict) or not isinstance(new_config, dict):
58
+ return 400, {
59
+ "status": "error",
60
+ "error_code": "INVALID_TRUST_INPUT",
61
+ "message": "old_config and new_config must be objects",
62
+ }
63
+ review = review_config_change(file_path, old_config, new_config)
64
+ return 200, review
65
+
66
+ def evidence_ingest(self, payload: dict[str, Any]) -> tuple[int, dict[str, Any]]:
67
+ run_id = str(payload.get("run_id", "")).strip()
68
+ required = ["tests", "security_scans", "diff_summary", "reproducibility", "unresolved_risks"]
69
+ missing = [key for key in required if key not in payload]
70
+
71
+ if not run_id:
72
+ return 400, {
73
+ "status": "error",
74
+ "error_code": "INVALID_EVIDENCE_INPUT",
75
+ "message": "run_id is required",
76
+ }
77
+ try:
78
+ run_id = validate_opaque_identifier(run_id, "run_id")
79
+ except ValueError as exc:
80
+ return 400, {
81
+ "status": "error",
82
+ "error_code": "INVALID_EVIDENCE_INPUT",
83
+ "message": str(exc),
84
+ }
85
+ if missing:
86
+ return 400, {
87
+ "status": "error",
88
+ "error_code": "INVALID_EVIDENCE_INPUT",
89
+ "message": f"Missing required fields: {', '.join(missing)}",
90
+ }
91
+
92
+ path = create_evidence_pack(
93
+ self.project_dir,
94
+ run_id,
95
+ tests=payload.get("tests"),
96
+ security_scans=payload.get("security_scans"),
97
+ diff_summary=payload.get("diff_summary"),
98
+ reproducibility=payload.get("reproducibility"),
99
+ unresolved_risks=payload.get("unresolved_risks"),
100
+ provenance=payload.get("provenance"),
101
+ trust_scores=payload.get("trust_scores"),
102
+ api_twin=payload.get("api_twin"),
103
+ route_metadata=payload.get("route_metadata"),
104
+ trace_ids=payload.get("trace_ids"),
105
+ lineage=payload.get("lineage"),
106
+ )
107
+ return 202, {
108
+ "status": "accepted",
109
+ "run_id": run_id,
110
+ "evidence_path": os.path.relpath(path, self.project_dir),
111
+ }
112
+
113
+ def security_check(self, payload: dict[str, Any]) -> tuple[int, dict[str, Any]]:
114
+ scope = str(payload.get("scope", "."))
115
+ include_live_enrichment = bool(payload.get("include_live_enrichment", False))
116
+ result = run_security_check(
117
+ project_dir=self.project_dir,
118
+ scope=scope,
119
+ include_live_enrichment=include_live_enrichment,
120
+ )
121
+ return 200, result
122
+
123
+ def guide_assert(self, payload: dict[str, Any]) -> tuple[int, dict[str, Any]]:
124
+ candidate = str(payload.get("candidate", ""))
125
+ rules = payload.get("rules", {})
126
+ if not isinstance(rules, dict):
127
+ return 400, {
128
+ "status": "error",
129
+ "error_code": "INVALID_GUIDE_INPUT",
130
+ "message": "rules must be an object",
131
+ }
132
+ return 200, guide_assert(candidate, rules)
133
+
134
+ def runtime_dispatch(self, payload: dict[str, Any]) -> tuple[int, dict[str, Any]]:
135
+ runtime = str(payload.get("runtime", "")).strip()
136
+ idea = payload.get("idea", {})
137
+ if not runtime:
138
+ return 400, {
139
+ "status": "error",
140
+ "error_code": "INVALID_RUNTIME_INPUT",
141
+ "message": "runtime is required",
142
+ }
143
+ if not isinstance(idea, dict):
144
+ return 400, {
145
+ "status": "error",
146
+ "error_code": "INVALID_RUNTIME_INPUT",
147
+ "message": "idea must be an object",
148
+ }
149
+ result = dispatch_runtime(runtime, idea)
150
+ if result.get("status") == "error":
151
+ return 400, result
152
+ return 200, result
153
+
154
+ def registry_verify(self, payload: dict[str, Any]) -> tuple[int, dict[str, Any]]:
155
+ artifact = payload.get("artifact", {})
156
+ mode = str(payload.get("mode", "warn_and_run"))
157
+ if not isinstance(artifact, dict):
158
+ return 400, {
159
+ "status": "error",
160
+ "error_code": "INVALID_REGISTRY_INPUT",
161
+ "message": "artifact must be an object",
162
+ }
163
+ decision = verify_artifact(artifact, mode=mode)
164
+ return 200, decision
165
+
166
+ def lab_jobs(self, payload: dict[str, Any]) -> tuple[int, dict[str, Any]]:
167
+ if not isinstance(payload, dict):
168
+ return 400, {
169
+ "status": "error",
170
+ "error_code": "INVALID_LAB_INPUT",
171
+ "message": "job payload must be an object",
172
+ }
173
+ result = run_pipeline(payload)
174
+ return 201 if result.get("status") in {"ready", "failed_evaluation"} else 400, result
175
+
176
+ def scoreboard_baseline(self) -> tuple[int, dict[str, Any]]:
177
+ return 200, {
178
+ "generated_at": datetime.now(timezone.utc).isoformat(),
179
+ "baseline": {
180
+ "safe_autonomy_rate": 0.0,
181
+ "pr_throughput": 0.0,
182
+ "adoption_velocity": 0.0,
183
+ },
184
+ "target_policy": "non-regression-or-better",
185
+ }
@@ -0,0 +1,5 @@
1
+ # OMG Codex Protection Rules
2
+
3
+ - Channel: `enterprise`
4
+ - Protect `.omg/`, `.agents/`, `.codex/`, and `.claude/` from unreviewed mutation.
5
+ - Require explicit invocation for production-control-plane skills.
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: omg-algorithms
3
+ description: "Determinism and benchmark attachments for algorithm-heavy work."
4
+ ---
5
+
6
+ # OMG Algorithms Pack
7
+
8
+ - Channel: `enterprise`
9
+ - Execution modes: `embedded, local_supervisor`
10
+ - MCP servers: `omg-control`
11
+ - Evidence outputs: `.omg/evals/latest.json`
@@ -0,0 +1,11 @@
1
+ name: omg-algorithms
2
+ description: "Determinism and benchmark attachments for algorithm-heavy work."
3
+ allow_implicit_invocation: false
4
+ metadata:
5
+ channel: enterprise
6
+ bundle_id: algorithms
7
+ title: "OMG Algorithms Pack"
8
+ mcp_servers:
9
+ - omg-control
10
+ allowed_tools:
11
+ - "Read"
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: omg-api-twin
3
+ description: "Versioned endpoint cassette replay with latency, drift, and cost reporting."
4
+ ---
5
+
6
+ # OMG API Twin
7
+
8
+ - Channel: `enterprise`
9
+ - Execution modes: `embedded, local_supervisor`
10
+ - MCP servers: `omg-control`
11
+ - Evidence outputs: `.omg/state/api_twin.json`
@@ -0,0 +1,12 @@
1
+ name: omg-api-twin
2
+ description: "Versioned endpoint cassette replay with latency, drift, and cost reporting."
3
+ allow_implicit_invocation: false
4
+ metadata:
5
+ channel: enterprise
6
+ bundle_id: api-twin
7
+ title: "OMG API Twin"
8
+ mcp_servers:
9
+ - omg-control
10
+ allowed_tools:
11
+ - "Read"
12
+ - "Bash(python3:*)"
@@ -0,0 +1,4 @@
1
+ [mcp_servers.omg-control]
2
+ command = "python3"
3
+ args = ["-m", "runtime.omg_mcp_server"]
4
+
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: omg-control-plane
3
+ description: "Canonical production control plane bundle for Claude and Codex."
4
+ ---
5
+
6
+ # OMG Control Plane
7
+
8
+ - Channel: `enterprise`
9
+ - Execution modes: `embedded, local_supervisor`
10
+ - MCP servers: `omg-control, omg-memory`
11
+ - Evidence outputs: `.omg/evidence/control-plane-compile.json`
@@ -0,0 +1,14 @@
1
+ name: omg-control-plane
2
+ description: "Canonical production control plane bundle for Claude and Codex."
3
+ allow_implicit_invocation: false
4
+ metadata:
5
+ channel: enterprise
6
+ bundle_id: control-plane
7
+ title: "OMG Control Plane"
8
+ mcp_servers:
9
+ - omg-control
10
+ - omg-memory
11
+ allowed_tools:
12
+ - "Read"
13
+ - "Grep"
14
+ - "Bash(python3:*)"
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: omg-data-lineage
3
+ description: "Provenance and privacy tracking for traces, fixtures, examples, and synthetic artifacts."
4
+ ---
5
+
6
+ # OMG Data Lineage
7
+
8
+ - Channel: `enterprise`
9
+ - Execution modes: `embedded, local_supervisor`
10
+ - MCP servers: `omg-control`
11
+ - Evidence outputs: `.omg/lineage/*.json`
@@ -0,0 +1,12 @@
1
+ name: omg-data-lineage
2
+ description: "Provenance and privacy tracking for traces, fixtures, examples, and synthetic artifacts."
3
+ allow_implicit_invocation: true
4
+ metadata:
5
+ channel: enterprise
6
+ bundle_id: data-lineage
7
+ title: "OMG Data Lineage"
8
+ mcp_servers:
9
+ - omg-control
10
+ allowed_tools:
11
+ - "Read"
12
+ - "Bash(python3:*)"
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: omg-delta-classifier
3
+ description: "Change classifier that attaches risk-aware checks, approvals, and packs."
4
+ ---
5
+
6
+ # OMG Delta Classifier
7
+
8
+ - Channel: `enterprise`
9
+ - Execution modes: `embedded, local_supervisor`
10
+ - MCP servers: `omg-control`
11
+ - Evidence outputs: `.omg/tracebank/events.jsonl`
@@ -0,0 +1,12 @@
1
+ name: omg-delta-classifier
2
+ description: "Change classifier that attaches risk-aware checks, approvals, and packs."
3
+ allow_implicit_invocation: true
4
+ metadata:
5
+ channel: enterprise
6
+ bundle_id: delta-classifier
7
+ title: "OMG Delta Classifier"
8
+ mcp_servers:
9
+ - omg-control
10
+ allowed_tools:
11
+ - "Read"
12
+ - "Grep"
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: omg-eval-gate
3
+ description: "Reproducible evaluation gate that blocks regressions before release."
4
+ ---
5
+
6
+ # OMG Eval Gate
7
+
8
+ - Channel: `enterprise`
9
+ - Execution modes: `embedded, local_supervisor`
10
+ - MCP servers: `omg-control`
11
+ - Evidence outputs: `.omg/evals/latest.json`
@@ -0,0 +1,12 @@
1
+ name: omg-eval-gate
2
+ description: "Reproducible evaluation gate that blocks regressions before release."
3
+ allow_implicit_invocation: false
4
+ metadata:
5
+ channel: enterprise
6
+ bundle_id: eval-gate
7
+ title: "OMG Eval Gate"
8
+ mcp_servers:
9
+ - omg-control
10
+ allowed_tools:
11
+ - "Read"
12
+ - "Bash(python3:*)"
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: omg-health
3
+ description: "Health-sensitive approvals, provenance, and replay attachments."
4
+ ---
5
+
6
+ # OMG Health Pack
7
+
8
+ - Channel: `enterprise`
9
+ - Execution modes: `embedded, local_supervisor`
10
+ - MCP servers: `omg-control`
11
+ - Evidence outputs: `.omg/lineage/*.json`
@@ -0,0 +1,11 @@
1
+ name: omg-health
2
+ description: "Health-sensitive approvals, provenance, and replay attachments."
3
+ allow_implicit_invocation: false
4
+ metadata:
5
+ channel: enterprise
6
+ bundle_id: health
7
+ title: "OMG Health Pack"
8
+ mcp_servers:
9
+ - omg-control
10
+ allowed_tools:
11
+ - "Read"
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: omg-hook-governor
3
+ description: "Canonical hook ordering, policy reinjection, and protected-path governance."
4
+ ---
5
+
6
+ # OMG Hook Governor
7
+
8
+ - Channel: `enterprise`
9
+ - Execution modes: `embedded, local_supervisor`
10
+ - MCP servers: `omg-control`
11
+ - Evidence outputs: `.omg/state/ledger/tool-ledger.jsonl`
@@ -0,0 +1,11 @@
1
+ name: omg-hook-governor
2
+ description: "Canonical hook ordering, policy reinjection, and protected-path governance."
3
+ allow_implicit_invocation: true
4
+ metadata:
5
+ channel: enterprise
6
+ bundle_id: hook-governor
7
+ title: "OMG Hook Governor"
8
+ mcp_servers:
9
+ - omg-control
10
+ allowed_tools:
11
+ - "Read"
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: omg-incident-replay
3
+ description: "Replayable bug packs built from logs, failing tests, traces, and diffs."
4
+ ---
5
+
6
+ # OMG Incident Replay
7
+
8
+ - Channel: `enterprise`
9
+ - Execution modes: `embedded, local_supervisor`
10
+ - MCP servers: `omg-control`
11
+ - Evidence outputs: `.omg/incidents/*.json`
@@ -0,0 +1,12 @@
1
+ name: omg-incident-replay
2
+ description: "Replayable bug packs built from logs, failing tests, traces, and diffs."
3
+ allow_implicit_invocation: false
4
+ metadata:
5
+ channel: enterprise
6
+ bundle_id: incident-replay
7
+ title: "OMG Incident Replay"
8
+ mcp_servers:
9
+ - omg-control
10
+ allowed_tools:
11
+ - "Read"
12
+ - "Bash(python3:*)"
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: omg-lsp-pack
3
+ description: "Optional LSP-backed diagnostics and navigation bundle for production verification."
4
+ ---
5
+
6
+ # OMG LSP Pack
7
+
8
+ - Channel: `enterprise`
9
+ - Execution modes: `embedded, local_supervisor`
10
+ - MCP servers: `omg-control`
11
+ - Evidence outputs: `.omg/evidence/lsp-diagnostics.json`
@@ -0,0 +1,11 @@
1
+ name: omg-lsp-pack
2
+ description: "Optional LSP-backed diagnostics and navigation bundle for production verification."
3
+ allow_implicit_invocation: false
4
+ metadata:
5
+ channel: enterprise
6
+ bundle_id: lsp-pack
7
+ title: "OMG LSP Pack"
8
+ mcp_servers:
9
+ - omg-control
10
+ allowed_tools:
11
+ - "Read"
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: omg-mcp-fabric
3
+ description: "Tools, prompts, resources, and server instructions for the OMG control plane."
4
+ ---
5
+
6
+ # OMG MCP Fabric
7
+
8
+ - Channel: `enterprise`
9
+ - Execution modes: `embedded, local_supervisor`
10
+ - MCP servers: `omg-control, omg-memory`
11
+ - Evidence outputs: `.omg/evidence/mcp-fabric.json`
@@ -0,0 +1,13 @@
1
+ name: omg-mcp-fabric
2
+ description: "Tools, prompts, resources, and server instructions for the OMG control plane."
3
+ allow_implicit_invocation: false
4
+ metadata:
5
+ channel: enterprise
6
+ bundle_id: mcp-fabric
7
+ title: "OMG MCP Fabric"
8
+ mcp_servers:
9
+ - omg-control
10
+ - omg-memory
11
+ allowed_tools:
12
+ - "Read"
13
+ - "Bash(python3:*)"
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: omg-preflight
3
+ description: "Repo-aware route selection based on diff, manifests, and classified risk."
4
+ ---
5
+
6
+ # OMG Preflight
7
+
8
+ - Channel: `enterprise`
9
+ - Execution modes: `embedded, local_supervisor`
10
+ - MCP servers: `omg-control`
11
+ - Evidence outputs: `.omg/tracebank/events.jsonl`
@@ -0,0 +1,12 @@
1
+ name: omg-preflight
2
+ description: "Repo-aware route selection based on diff, manifests, and classified risk."
3
+ allow_implicit_invocation: true
4
+ metadata:
5
+ channel: enterprise
6
+ bundle_id: preflight
7
+ title: "OMG Preflight"
8
+ mcp_servers:
9
+ - omg-control
10
+ allowed_tools:
11
+ - "Read"
12
+ - "Grep"
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: omg-remote-supervisor
3
+ description: "Local-only authenticated supervisor sessions for worker orchestration."
4
+ ---
5
+
6
+ # OMG Remote Supervisor
7
+
8
+ - Channel: `enterprise`
9
+ - Execution modes: `local_supervisor`
10
+ - MCP servers: `omg-control`
11
+ - Evidence outputs: `.omg/supervisor/sessions/*.json`
@@ -0,0 +1,12 @@
1
+ name: omg-remote-supervisor
2
+ description: "Local-only authenticated supervisor sessions for worker orchestration."
3
+ allow_implicit_invocation: false
4
+ metadata:
5
+ channel: enterprise
6
+ bundle_id: remote-supervisor
7
+ title: "OMG Remote Supervisor"
8
+ mcp_servers:
9
+ - omg-control
10
+ allowed_tools:
11
+ - "Read"
12
+ - "Bash(python3:*)"
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: omg-robotics
3
+ description: "Robotics safety policy, replay, and evaluation attachments."
4
+ ---
5
+
6
+ # OMG Robotics Pack
7
+
8
+ - Channel: `enterprise`
9
+ - Execution modes: `embedded, local_supervisor`
10
+ - MCP servers: `omg-control`
11
+ - Evidence outputs: `.omg/incidents/*.json`
@@ -0,0 +1,11 @@
1
+ name: omg-robotics
2
+ description: "Robotics safety policy, replay, and evaluation attachments."
3
+ allow_implicit_invocation: false
4
+ metadata:
5
+ channel: enterprise
6
+ bundle_id: robotics
7
+ title: "OMG Robotics Pack"
8
+ mcp_servers:
9
+ - omg-control
10
+ allowed_tools:
11
+ - "Read"
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: omg-secure-worktree-pipeline
3
+ description: "Ephemeral worktree execution and supervisor-safe worker dispatch for production jobs."
4
+ ---
5
+
6
+ # OMG Secure Worktree Pipeline
7
+
8
+ - Channel: `enterprise`
9
+ - Execution modes: `automation, ephemeral_worktree, local_supervisor`
10
+ - MCP servers: `omg-control`
11
+ - Evidence outputs: `.omg/evidence/subagents/*.json`
@@ -0,0 +1,12 @@
1
+ name: omg-secure-worktree-pipeline
2
+ description: "Ephemeral worktree execution and supervisor-safe worker dispatch for production jobs."
3
+ allow_implicit_invocation: false
4
+ metadata:
5
+ channel: enterprise
6
+ bundle_id: secure-worktree-pipeline
7
+ title: "OMG Secure Worktree Pipeline"
8
+ mcp_servers:
9
+ - omg-control
10
+ allowed_tools:
11
+ - "Read"
12
+ - "Bash(git:*)"
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: omg-security-check
3
+ description: "Canonical security audit bundle with provenance, trust scoring, and deterministic evidence."
4
+ ---
5
+
6
+ # OMG Security Check
7
+
8
+ - Channel: `enterprise`
9
+ - Execution modes: `embedded, local_supervisor`
10
+ - MCP servers: `omg-control`
11
+ - Evidence outputs: `.omg/evidence/security-check-*.json`
@@ -0,0 +1,13 @@
1
+ name: omg-security-check
2
+ description: "Canonical security audit bundle with provenance, trust scoring, and deterministic evidence."
3
+ allow_implicit_invocation: false
4
+ metadata:
5
+ channel: enterprise
6
+ bundle_id: security-check
7
+ title: "OMG Security Check"
8
+ mcp_servers:
9
+ - omg-control
10
+ allowed_tools:
11
+ - "Read"
12
+ - "Grep"
13
+ - "Bash(python3:*)"
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: omg-tracebank
3
+ description: "Structured plan-to-patch-to-verify trace capture for OMG routes."
4
+ ---
5
+
6
+ # OMG Tracebank
7
+
8
+ - Channel: `enterprise`
9
+ - Execution modes: `embedded, local_supervisor`
10
+ - MCP servers: `omg-control`
11
+ - Evidence outputs: `.omg/tracebank/events.jsonl`
@@ -0,0 +1,12 @@
1
+ name: omg-tracebank
2
+ description: "Structured plan-to-patch-to-verify trace capture for OMG routes."
3
+ allow_implicit_invocation: true
4
+ metadata:
5
+ channel: enterprise
6
+ bundle_id: tracebank
7
+ title: "OMG Tracebank"
8
+ mcp_servers:
9
+ - omg-control
10
+ allowed_tools:
11
+ - "Read"
12
+ - "Bash(python3:*)"
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: omg-vision
3
+ description: "Vision-specific lineage, drift, and replay attachments."
4
+ ---
5
+
6
+ # OMG Vision Pack
7
+
8
+ - Channel: `enterprise`
9
+ - Execution modes: `embedded, local_supervisor`
10
+ - MCP servers: `omg-control`
11
+ - Evidence outputs: `.omg/lineage/*.json`