@trac3er/oh-my-god 2.0.8 → 2.0.9
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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/.gemini/settings.json +11 -0
- package/.kimi/mcp.json +11 -0
- package/CHANGELOG.md +10 -0
- package/OMG-setup.sh +1 -1
- package/OMG_COMPAT_CONTRACT.md +10 -4
- package/README.md +1 -0
- package/build/lib/commands/OMG:forge.md +92 -0
- package/build/lib/commands/OMG:mode.md +13 -13
- package/build/lib/commands/OMG:session-branch.md +17 -1
- package/build/lib/commands/OMG:session-fork.md +5 -1
- package/build/lib/commands/OMG:session-merge.md +5 -1
- package/build/lib/control_plane/server.py +4 -0
- package/build/lib/control_plane/service.py +55 -0
- package/build/lib/hooks/setup_wizard.py +21 -1
- package/build/lib/hooks/shadow_manager.py +25 -2
- package/build/lib/hooks/state_migration.py +3 -0
- package/build/lib/plugins/dephealth/cve_scanner.py +91 -0
- package/build/lib/plugins/dephealth/vuln_analyzer.py +7 -0
- package/build/lib/registry/omg-capability.schema.json +83 -1
- package/build/lib/runtime/adoption.py +12 -4
- package/build/lib/runtime/artifact_parsers.py +161 -0
- package/build/lib/runtime/background_verification.py +48 -0
- package/build/lib/runtime/claim_judge.py +184 -7
- package/build/lib/runtime/contract_compiler.py +118 -9
- package/build/lib/runtime/evidence_query.py +203 -0
- package/build/lib/runtime/omg_mcp_server.py +19 -0
- package/build/lib/runtime/playwright_adapter.py +39 -0
- package/build/lib/runtime/proof_chain.py +136 -8
- package/build/lib/runtime/proof_gate.py +102 -0
- package/build/lib/runtime/providers/gemini_provider.py +7 -0
- package/build/lib/runtime/providers/kimi_provider.py +7 -0
- package/build/lib/runtime/repro_pack.py +292 -0
- package/build/lib/runtime/runtime_profile.py +87 -15
- package/build/lib/runtime/security_check.py +86 -3
- package/build/lib/runtime/test_intent_lock.py +47 -0
- package/build/lib/runtime/tracebank.py +33 -3
- package/build/lib/runtime/verification_loop.py +73 -0
- package/commands/OMG:forge.md +92 -0
- package/commands/OMG:mode.md +13 -13
- package/commands/OMG:session-branch.md +17 -1
- package/commands/OMG:session-fork.md +5 -1
- package/commands/OMG:session-merge.md +5 -1
- package/control_plane/server.py +4 -0
- package/control_plane/service.py +55 -0
- package/dist/enterprise/bundle/.gemini/settings.json +11 -0
- package/dist/enterprise/bundle/.kimi/mcp.json +11 -0
- package/dist/enterprise/bundle/OMG_COMPAT_CONTRACT.md +9 -3
- package/dist/enterprise/bundle/registry/omg-capability.schema.json +83 -1
- package/dist/enterprise/bundle/settings.json +1 -0
- package/dist/enterprise/manifest.json +17 -3
- package/dist/public/bundle/.agents/skills/omg/incident-replay/SKILL.md +1 -1
- package/dist/public/bundle/.agents/skills/omg/incident-replay/openai.yaml +1 -1
- package/dist/public/bundle/.agents/skills/omg/lsp-pack/SKILL.md +1 -1
- package/dist/public/bundle/.agents/skills/omg/lsp-pack/openai.yaml +1 -1
- package/dist/public/bundle/.agents/skills/omg/mcp-fabric/SKILL.md +1 -1
- package/dist/public/bundle/.agents/skills/omg/mcp-fabric/openai.yaml +1 -1
- package/dist/public/bundle/.agents/skills/omg/plan-council/SKILL.md +1 -1
- package/dist/public/bundle/.agents/skills/omg/plan-council/openai.yaml +1 -1
- package/dist/public/bundle/.agents/skills/omg/preflight/SKILL.md +1 -1
- package/dist/public/bundle/.agents/skills/omg/preflight/openai.yaml +1 -1
- package/dist/public/bundle/.agents/skills/omg/proof-gate/SKILL.md +1 -1
- package/dist/public/bundle/.agents/skills/omg/proof-gate/openai.yaml +1 -1
- package/dist/public/bundle/.agents/skills/omg/remote-supervisor/SKILL.md +1 -1
- package/dist/public/bundle/.agents/skills/omg/remote-supervisor/openai.yaml +1 -1
- package/dist/public/bundle/.agents/skills/omg/robotics/SKILL.md +1 -1
- package/dist/public/bundle/.agents/skills/omg/robotics/openai.yaml +1 -1
- package/dist/public/bundle/.agents/skills/omg/secure-worktree-pipeline/SKILL.md +1 -1
- package/dist/public/bundle/.agents/skills/omg/secure-worktree-pipeline/openai.yaml +1 -1
- package/dist/public/bundle/.agents/skills/omg/security-check/SKILL.md +1 -1
- package/dist/public/bundle/.agents/skills/omg/security-check/openai.yaml +1 -1
- package/dist/public/bundle/.agents/skills/omg/test-intent-lock/SKILL.md +1 -1
- package/dist/public/bundle/.agents/skills/omg/test-intent-lock/openai.yaml +1 -1
- package/dist/public/bundle/.agents/skills/omg/tracebank/SKILL.md +1 -1
- package/dist/public/bundle/.agents/skills/omg/tracebank/openai.yaml +1 -1
- package/dist/public/bundle/.agents/skills/omg/vision/SKILL.md +1 -1
- package/dist/public/bundle/.agents/skills/omg/vision/openai.yaml +1 -1
- package/dist/public/bundle/.gemini/settings.json +11 -0
- package/dist/public/bundle/.kimi/mcp.json +11 -0
- package/dist/public/bundle/OMG_COMPAT_CONTRACT.md +9 -3
- package/dist/public/bundle/registry/omg-capability.schema.json +83 -1
- package/dist/public/bundle/settings.json +2 -1
- package/dist/public/manifest.json +43 -29
- package/docs/proof.md +1 -0
- package/hooks/setup_wizard.py +21 -1
- package/hooks/shadow_manager.py +25 -2
- package/hooks/state_migration.py +3 -0
- package/hud/omg-hud.mjs +66 -3
- package/package.json +1 -1
- package/plugins/advanced/plugin.json +1 -1
- package/plugins/core/plugin.json +1 -1
- package/plugins/dephealth/cve_scanner.py +91 -0
- package/plugins/dephealth/vuln_analyzer.py +7 -0
- package/pyproject.toml +1 -1
- package/registry/omg-capability.schema.json +83 -1
- package/runtime/adoption.py +13 -5
- package/runtime/artifact_parsers.py +161 -0
- package/runtime/background_verification.py +48 -0
- package/runtime/claim_judge.py +184 -7
- package/runtime/contract_compiler.py +118 -9
- package/runtime/evidence_query.py +203 -0
- package/runtime/omg_mcp_server.py +19 -0
- package/runtime/playwright_adapter.py +39 -0
- package/runtime/proof_chain.py +136 -8
- package/runtime/proof_gate.py +102 -0
- package/runtime/providers/gemini_provider.py +7 -0
- package/runtime/providers/kimi_provider.py +7 -0
- package/runtime/repro_pack.py +292 -0
- package/runtime/runtime_profile.py +87 -15
- package/runtime/security_check.py +86 -3
- package/runtime/test_intent_lock.py +47 -0
- package/runtime/tracebank.py +33 -3
- package/runtime/verification_loop.py +73 -0
- package/scripts/omg.py +30 -3
- package/settings.json +4 -3
- package/tools/python_sandbox.py +9 -6
- package/tools/session_snapshot.py +146 -40
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import cast
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def _as_int(value: object, default: int) -> int:
|
|
8
|
+
if isinstance(value, bool):
|
|
9
|
+
return int(value)
|
|
10
|
+
if isinstance(value, int):
|
|
11
|
+
return value
|
|
12
|
+
if isinstance(value, float):
|
|
13
|
+
return int(value)
|
|
14
|
+
if isinstance(value, str):
|
|
15
|
+
try:
|
|
16
|
+
return int(value)
|
|
17
|
+
except ValueError:
|
|
18
|
+
return default
|
|
19
|
+
return default
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def _as_string_list(value: object) -> list[str]:
|
|
23
|
+
if not isinstance(value, list):
|
|
24
|
+
return []
|
|
25
|
+
items = cast(list[object], value)
|
|
26
|
+
return [str(item) for item in items]
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def build_loop_policy(
|
|
30
|
+
host: str,
|
|
31
|
+
max_iterations: int,
|
|
32
|
+
timeout_minutes: int,
|
|
33
|
+
read_only_default: bool = True,
|
|
34
|
+
) -> dict[str, object]:
|
|
35
|
+
return {
|
|
36
|
+
"host": host,
|
|
37
|
+
"max_iterations": max_iterations,
|
|
38
|
+
"timeout_minutes": timeout_minutes,
|
|
39
|
+
"read_only_default": read_only_default,
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def should_continue_loop(state: Mapping[str, object]) -> dict[str, object]:
|
|
44
|
+
iteration = _as_int(state.get("iteration", 0), 0)
|
|
45
|
+
max_iterations = _as_int(state.get("max_iterations", 0), 0)
|
|
46
|
+
status = str(state.get("status", ""))
|
|
47
|
+
|
|
48
|
+
if iteration >= max_iterations:
|
|
49
|
+
return {"continue": False, "reason": "max_iterations_reached"}
|
|
50
|
+
if status == "ok":
|
|
51
|
+
return {"continue": False, "reason": "status_ok"}
|
|
52
|
+
return {"continue": True, "reason": "within_budget"}
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def summarize_next_step(state: Mapping[str, object]) -> dict[str, object]:
|
|
56
|
+
status = str(state.get("status", ""))
|
|
57
|
+
blockers = _as_string_list(state.get("blockers"))
|
|
58
|
+
evidence_links = _as_string_list(state.get("evidence_links"))
|
|
59
|
+
|
|
60
|
+
if blockers:
|
|
61
|
+
next_action = f"resolve blockers: {', '.join(blockers)}"
|
|
62
|
+
elif status in {"error", "blocked"}:
|
|
63
|
+
next_action = "verify evidence links and remediate verification errors"
|
|
64
|
+
elif evidence_links:
|
|
65
|
+
next_action = "verify evidence links"
|
|
66
|
+
else:
|
|
67
|
+
next_action = "collect verification evidence links"
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
"next_action": next_action,
|
|
71
|
+
"evidence_links": evidence_links,
|
|
72
|
+
"blockers": blockers,
|
|
73
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "FORGE — Labs-only domain-model prototyping and evaluation orchestration. Routes into the lab pipeline with policy enforcement."
|
|
3
|
+
allowed-tools: Read, Bash
|
|
4
|
+
argument-hint: "[job file path]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /OMG:forge — Labs-Only Domain Prototyping
|
|
8
|
+
|
|
9
|
+
> **Availability**: `labs` preset only. Blocked on `safe`, `balanced`, and `interop` presets.
|
|
10
|
+
|
|
11
|
+
## What It Does
|
|
12
|
+
|
|
13
|
+
Forge orchestrates domain-model prototyping and evaluation through the existing lab pipeline (`lab/pipeline.py`). It validates jobs against lab policies (`lab/policies.py`), runs the staged pipeline (data → refine → train/distill → evaluate → regression), and emits structured evidence.
|
|
14
|
+
|
|
15
|
+
Forge does **not**:
|
|
16
|
+
- Train frontier models or perform research-scale model training
|
|
17
|
+
- Bypass lab policy gates (license checks, source validation)
|
|
18
|
+
- Operate outside the `labs` preset boundary
|
|
19
|
+
|
|
20
|
+
## Policy Enforcement
|
|
21
|
+
|
|
22
|
+
Every forge job is validated through `lab.policies.validate_job_request()` before pipeline execution:
|
|
23
|
+
|
|
24
|
+
1. **Dataset license** must be in `ALLOWED_LICENSES`: `apache-2.0`, `mit`, `bsd-3-clause`, `cc-by-4.0`
|
|
25
|
+
2. **Dataset source** must not contain blocked tokens: `unknown`, `leaked`, `stolen`, `unauthorized`, `pirated`
|
|
26
|
+
3. **Model source** must not contain blocked tokens
|
|
27
|
+
4. **Model distillation** must be explicitly allowed (`allow_distill: true`)
|
|
28
|
+
|
|
29
|
+
Jobs that fail policy checks are blocked with a structured reason before any pipeline stage runs.
|
|
30
|
+
|
|
31
|
+
## CLI Usage
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# Run a forge job from a JSON file
|
|
35
|
+
python3 scripts/omg.py forge run --job path/to/job.json
|
|
36
|
+
|
|
37
|
+
# Run with explicit preset (default: labs)
|
|
38
|
+
python3 scripts/omg.py forge run --job path/to/job.json --preset labs
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Job File Format
|
|
42
|
+
|
|
43
|
+
```json
|
|
44
|
+
{
|
|
45
|
+
"dataset": {
|
|
46
|
+
"name": "my-domain-dataset",
|
|
47
|
+
"license": "apache-2.0",
|
|
48
|
+
"source": "internal-curated"
|
|
49
|
+
},
|
|
50
|
+
"base_model": {
|
|
51
|
+
"name": "distill-base-v1",
|
|
52
|
+
"source": "approved-registry",
|
|
53
|
+
"allow_distill": true
|
|
54
|
+
},
|
|
55
|
+
"target_metric": 0.85,
|
|
56
|
+
"simulated_metric": 0.90,
|
|
57
|
+
"evaluation_notes": "Domain adaptation for robotics control"
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Output
|
|
62
|
+
|
|
63
|
+
Forge returns structured JSON with pipeline results:
|
|
64
|
+
|
|
65
|
+
```json
|
|
66
|
+
{
|
|
67
|
+
"status": "ready",
|
|
68
|
+
"stage": "complete",
|
|
69
|
+
"stages": [
|
|
70
|
+
{"name": "data_prepare", "status": "ok"},
|
|
71
|
+
{"name": "synthetic_refine", "status": "ok"},
|
|
72
|
+
{"name": "train_distill", "status": "ok"},
|
|
73
|
+
{"name": "evaluate", "status": "ok"},
|
|
74
|
+
{"name": "regression_test", "status": "ok"}
|
|
75
|
+
],
|
|
76
|
+
"published": false,
|
|
77
|
+
"evaluation_report": {
|
|
78
|
+
"metric": 0.90,
|
|
79
|
+
"target_metric": 0.85,
|
|
80
|
+
"passed": true
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Scope Boundary
|
|
86
|
+
|
|
87
|
+
Forge is a **domain-prototyping** surface, not a model-training research tool. It stays within:
|
|
88
|
+
|
|
89
|
+
- The lab pipeline's staged execution model
|
|
90
|
+
- Lab policy validation for all dataset and model sources
|
|
91
|
+
- The `labs` preset boundary — no forge operations run without labs enabled
|
|
92
|
+
- Domain-pack contracts (`runtime/domain_packs.py`) for domain-specific prototyping
|
package/commands/OMG:mode.md
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "Set
|
|
2
|
+
description: "Set canonical mode (chill/focused/exploratory) for the current session."
|
|
3
3
|
allowed-tools: Read, Write, Edit, Bash
|
|
4
|
-
argument-hint: "[
|
|
4
|
+
argument-hint: "[chill|focused|exploratory|clear]"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# /OMG:mode — Set
|
|
7
|
+
# /OMG:mode — Set Canonical Mode
|
|
8
8
|
|
|
9
9
|
Switch Claude's operating mode for the current session.
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
13
13
|
```
|
|
14
|
-
/OMG:mode
|
|
15
|
-
/OMG:mode
|
|
16
|
-
/OMG:mode
|
|
14
|
+
/OMG:mode chill # Focus on low-intensity, conservative progress
|
|
15
|
+
/OMG:mode focused # Focus on coding and execution
|
|
16
|
+
/OMG:mode exploratory # Focus on discovery and synthesis
|
|
17
17
|
/OMG:mode clear # Clear current mode (return to default)
|
|
18
18
|
```
|
|
19
19
|
|
|
@@ -23,20 +23,20 @@ Switch Claude's operating mode for the current session.
|
|
|
23
23
|
2. The `prompt-enhancer` hook reads this file and injects `@mode:` context on every subsequent prompt
|
|
24
24
|
3. The corresponding rule file (`rules/contextual/{mode}-mode.md`) activates
|
|
25
25
|
|
|
26
|
-
## Modes
|
|
26
|
+
## Canonical Modes
|
|
27
27
|
|
|
28
28
|
| Mode | Focus | When to Use |
|
|
29
29
|
|------|-------|-------------|
|
|
30
|
-
| `
|
|
31
|
-
| `
|
|
32
|
-
| `
|
|
30
|
+
| `chill` | Conservative execution pace | Low-risk maintenance and steady progress |
|
|
31
|
+
| `focused` | Implementation-forward flow | Active feature work with verification |
|
|
32
|
+
| `exploratory` | Discovery, synthesis, and mapping | Unknown domains and research-heavy sessions |
|
|
33
33
|
|
|
34
34
|
## Example
|
|
35
35
|
|
|
36
36
|
```
|
|
37
|
-
/OMG:mode
|
|
38
|
-
→ Sets mode to
|
|
39
|
-
→ Every prompt now gets: @mode:
|
|
37
|
+
/OMG:mode focused
|
|
38
|
+
→ Sets mode to focused
|
|
39
|
+
→ Every prompt now gets: @mode:FOCUSED — Implement deliberately with tight verification loops.
|
|
40
40
|
|
|
41
41
|
/OMG:mode clear
|
|
42
42
|
→ Removes .omg/state/mode.txt
|
|
@@ -8,9 +8,13 @@ argument-hint: "--name <branch-name> [--from <snapshot_id>]"
|
|
|
8
8
|
|
|
9
9
|
Create a named branch of the current OMG state for experimentation or parallel exploration.
|
|
10
10
|
|
|
11
|
+
## Scope Statement
|
|
12
|
+
|
|
13
|
+
**This command operates on `.omg/state/` only. It does NOT modify git history, workspace files, or conversation history.**
|
|
14
|
+
|
|
11
15
|
## Important
|
|
12
16
|
|
|
13
|
-
Branching is **OMG state only** — it captures and restores `.omg/state/` directory contents. It does **not** fork the conversation, context window, or Claude session. Think of it as a checkpoint you can name and switch between.
|
|
17
|
+
Branching is **OMG state only** — it captures and restores `.omg/state/` directory contents. It does **not** fork the conversation, context window, or Claude session. Think of it as a checkpoint you can name and switch between. Rollback restores OMG session state only, NOT git history or repo files.
|
|
14
18
|
|
|
15
19
|
## Usage
|
|
16
20
|
|
|
@@ -40,6 +44,9 @@ Each branch stores:
|
|
|
40
44
|
## Managing Branches
|
|
41
45
|
|
|
42
46
|
```
|
|
47
|
+
# Show current branch and snapshot count
|
|
48
|
+
python3 tools/session_snapshot.py status
|
|
49
|
+
|
|
43
50
|
# List all branches
|
|
44
51
|
python3 tools/session_snapshot.py branches
|
|
45
52
|
|
|
@@ -48,6 +55,15 @@ python3 tools/session_snapshot.py switch experiment
|
|
|
48
55
|
|
|
49
56
|
# Create branch from specific snapshot
|
|
50
57
|
python3 tools/session_snapshot.py branch my-branch --from 20260302_143000_baseline
|
|
58
|
+
|
|
59
|
+
# Fork from a previous checkpoint
|
|
60
|
+
python3 tools/session_snapshot.py fork --from 20260302_100000_pre-refactor --name "approach-b"
|
|
61
|
+
|
|
62
|
+
# Preview a merge
|
|
63
|
+
python3 tools/session_snapshot.py merge-preview experiment --into main
|
|
64
|
+
|
|
65
|
+
# Apply a merge
|
|
66
|
+
python3 tools/session_snapshot.py merge experiment --into main
|
|
51
67
|
```
|
|
52
68
|
|
|
53
69
|
## Feature Flag
|
|
@@ -8,9 +8,13 @@ argument-hint: "--from <snapshot_id> --name <fork-name>"
|
|
|
8
8
|
|
|
9
9
|
Create a new branch from a specific snapshot checkpoint. This is a convenience wrapper around `/OMG:session-branch` that always requires a source snapshot.
|
|
10
10
|
|
|
11
|
+
## Scope Statement
|
|
12
|
+
|
|
13
|
+
**This command operates on `.omg/state/` only. It does NOT modify git history, workspace files, or conversation history.**
|
|
14
|
+
|
|
11
15
|
## Important
|
|
12
16
|
|
|
13
|
-
Forking is **OMG state only** — it restores a previous `.omg/state/` snapshot and creates a new named branch from it. It does **not** fork the conversation or create a parallel Claude session.
|
|
17
|
+
Forking is **OMG state only** — it restores a previous `.omg/state/` snapshot and creates a new named branch from it. It does **not** fork the conversation or create a parallel Claude session. Rollback restores OMG session state only, NOT git history or repo files.
|
|
14
18
|
|
|
15
19
|
## Usage
|
|
16
20
|
|
|
@@ -8,9 +8,13 @@ argument-hint: "--from <source-branch> [--into <target-branch>] [--preview]"
|
|
|
8
8
|
|
|
9
9
|
Merge one OMG state branch into another with automatic conflict detection.
|
|
10
10
|
|
|
11
|
+
## Scope Statement
|
|
12
|
+
|
|
13
|
+
**This command operates on `.omg/state/` only. It does NOT modify git history, workspace files, or conversation history.**
|
|
14
|
+
|
|
11
15
|
## Important
|
|
12
16
|
|
|
13
|
-
Merging is **OMG state only** — it merges branch metadata (`.omg/state/branches/<name>.json`). It does **not** merge conversations, context windows, or file system state. Think of it as combining the tracked state from two named branches.
|
|
17
|
+
Merging is **OMG state only** — it merges branch metadata (`.omg/state/branches/<name>.json`). It does **not** merge conversations, context windows, or file system state. Think of it as combining the tracked state from two named branches. Rollback restores OMG session state only, NOT git history or repo files.
|
|
14
18
|
|
|
15
19
|
## Usage
|
|
16
20
|
|
package/control_plane/server.py
CHANGED
|
@@ -50,6 +50,10 @@ _POST_ROUTE_TABLE = {
|
|
|
50
50
|
"/v1/registry/verify": ("registry_verify", True),
|
|
51
51
|
"/v2/lab/jobs": ("lab_jobs", False),
|
|
52
52
|
"/v1/lab/jobs": ("lab_jobs", True),
|
|
53
|
+
"/v2/trust/claim-judge": ("claim_judge", False),
|
|
54
|
+
"/v1/trust/claim-judge": ("claim_judge", True),
|
|
55
|
+
"/v2/trust/test-intent-lock": ("test_intent_lock", False),
|
|
56
|
+
"/v1/trust/test-intent-lock": ("test_intent_lock", True),
|
|
53
57
|
}
|
|
54
58
|
|
|
55
59
|
_GET_ROUTE_TABLE = {
|
package/control_plane/service.py
CHANGED
|
@@ -17,7 +17,9 @@ from lab.pipeline import run_pipeline
|
|
|
17
17
|
from registry.verify_artifact import verify_artifact
|
|
18
18
|
from runtime.guide_assert import guide_assert
|
|
19
19
|
from runtime.dispatcher import dispatch_runtime
|
|
20
|
+
from runtime.claim_judge import judge_claims
|
|
20
21
|
from runtime.security_check import run_security_check
|
|
22
|
+
from runtime.test_intent_lock import lock_intent, verify_intent
|
|
21
23
|
|
|
22
24
|
|
|
23
25
|
class ControlPlaneService:
|
|
@@ -103,6 +105,10 @@ class ControlPlaneService:
|
|
|
103
105
|
route_metadata=payload.get("route_metadata"),
|
|
104
106
|
trace_ids=payload.get("trace_ids"),
|
|
105
107
|
lineage=payload.get("lineage"),
|
|
108
|
+
claims=payload.get("claims"),
|
|
109
|
+
test_delta=payload.get("test_delta"),
|
|
110
|
+
browser_evidence_path=payload.get("browser_evidence_path"),
|
|
111
|
+
repro_pack_path=payload.get("repro_pack_path"),
|
|
106
112
|
)
|
|
107
113
|
return 202, {
|
|
108
114
|
"status": "accepted",
|
|
@@ -210,6 +216,55 @@ class ControlPlaneService:
|
|
|
210
216
|
result = run_pipeline(payload)
|
|
211
217
|
return 201 if result.get("status") in {"ready", "failed_evaluation"} else 400, result
|
|
212
218
|
|
|
219
|
+
def claim_judge(self, payload: dict[str, Any]) -> tuple[int, dict[str, Any]]:
|
|
220
|
+
claims = payload.get("claims")
|
|
221
|
+
if not isinstance(claims, list):
|
|
222
|
+
return 400, {
|
|
223
|
+
"status": "error",
|
|
224
|
+
"error_code": "INVALID_CLAIM_INPUT",
|
|
225
|
+
"message": "claims must be a list",
|
|
226
|
+
}
|
|
227
|
+
result = judge_claims(self.project_dir, claims)
|
|
228
|
+
return 200, result
|
|
229
|
+
|
|
230
|
+
def test_intent_lock(self, payload: dict[str, Any]) -> tuple[int, dict[str, Any]]:
|
|
231
|
+
action = str(payload.get("action", "")).strip()
|
|
232
|
+
|
|
233
|
+
if action == "lock":
|
|
234
|
+
intent = payload.get("intent")
|
|
235
|
+
if not isinstance(intent, dict):
|
|
236
|
+
return 400, {
|
|
237
|
+
"status": "error",
|
|
238
|
+
"error_code": "INVALID_INTENT_INPUT",
|
|
239
|
+
"message": "intent must be an object",
|
|
240
|
+
}
|
|
241
|
+
result = lock_intent(self.project_dir, intent)
|
|
242
|
+
return 200, result
|
|
243
|
+
|
|
244
|
+
if action == "verify":
|
|
245
|
+
lock_id = payload.get("lock_id")
|
|
246
|
+
results = payload.get("results")
|
|
247
|
+
if not isinstance(lock_id, str) or not lock_id.strip():
|
|
248
|
+
return 400, {
|
|
249
|
+
"status": "error",
|
|
250
|
+
"error_code": "INVALID_INTENT_INPUT",
|
|
251
|
+
"message": "lock_id is required for verify action",
|
|
252
|
+
}
|
|
253
|
+
if not isinstance(results, dict):
|
|
254
|
+
return 400, {
|
|
255
|
+
"status": "error",
|
|
256
|
+
"error_code": "INVALID_INTENT_INPUT",
|
|
257
|
+
"message": "results must be an object for verify action",
|
|
258
|
+
}
|
|
259
|
+
result = verify_intent(self.project_dir, lock_id, results)
|
|
260
|
+
return 200, result
|
|
261
|
+
|
|
262
|
+
return 400, {
|
|
263
|
+
"status": "error",
|
|
264
|
+
"error_code": "INVALID_INTENT_ACTION",
|
|
265
|
+
"message": f"Unknown action: {action!r}; expected 'lock' or 'verify'",
|
|
266
|
+
}
|
|
267
|
+
|
|
213
268
|
def scoreboard_baseline(self) -> tuple[int, dict[str, Any]]:
|
|
214
269
|
return 200, {
|
|
215
270
|
"generated_at": datetime.now(timezone.utc).isoformat(),
|
|
@@ -4,6 +4,8 @@ version: 2.0.8
|
|
|
4
4
|
canonical_hosts:
|
|
5
5
|
- claude
|
|
6
6
|
- codex
|
|
7
|
+
- gemini
|
|
8
|
+
- kimi
|
|
7
9
|
status: active
|
|
8
10
|
---
|
|
9
11
|
|
|
@@ -13,10 +15,14 @@ status: active
|
|
|
13
15
|
|
|
14
16
|
## provider_tiers
|
|
15
17
|
|
|
16
|
-
OMG
|
|
18
|
+
OMG defines four canonical hosts and their host-rule contracts.
|
|
17
19
|
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
+
- `claude`: requires `compilation_targets`, `hooks`, `subagents`, and `skills`.
|
|
21
|
+
- `codex`: requires `compilation_targets`, `skills`, `agents_fragments`, `rules`, and `automations`.
|
|
22
|
+
- `gemini`: requires `compilation_targets`, `mcp`, `skills`, and `automations`.
|
|
23
|
+
- `kimi`: requires `compilation_targets`, `mcp`, `skills`, and `automations`.
|
|
24
|
+
|
|
25
|
+
Gemini and Kimi are canonical hosts for contract validation and policy declaration. Their contracts do not require Claude/Codex hook semantics.
|
|
20
26
|
|
|
21
27
|
## metadata
|
|
22
28
|
|
|
@@ -43,7 +43,9 @@
|
|
|
43
43
|
"type": "string",
|
|
44
44
|
"enum": [
|
|
45
45
|
"claude",
|
|
46
|
-
"codex"
|
|
46
|
+
"codex",
|
|
47
|
+
"gemini",
|
|
48
|
+
"kimi"
|
|
47
49
|
]
|
|
48
50
|
},
|
|
49
51
|
"minItems": 1
|
|
@@ -281,6 +283,86 @@
|
|
|
281
283
|
}
|
|
282
284
|
},
|
|
283
285
|
"additionalProperties": true
|
|
286
|
+
},
|
|
287
|
+
"gemini": {
|
|
288
|
+
"type": "object",
|
|
289
|
+
"required": [
|
|
290
|
+
"compilation_targets",
|
|
291
|
+
"mcp",
|
|
292
|
+
"skills",
|
|
293
|
+
"automations"
|
|
294
|
+
],
|
|
295
|
+
"properties": {
|
|
296
|
+
"compilation_targets": {
|
|
297
|
+
"type": "array",
|
|
298
|
+
"minItems": 1,
|
|
299
|
+
"items": {
|
|
300
|
+
"type": "string"
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
"mcp": {
|
|
304
|
+
"type": "array",
|
|
305
|
+
"minItems": 1,
|
|
306
|
+
"items": {
|
|
307
|
+
"type": "string"
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
"skills": {
|
|
311
|
+
"type": "array",
|
|
312
|
+
"minItems": 1,
|
|
313
|
+
"items": {
|
|
314
|
+
"type": "string"
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
"automations": {
|
|
318
|
+
"type": "array",
|
|
319
|
+
"minItems": 1,
|
|
320
|
+
"items": {
|
|
321
|
+
"type": "string"
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
"additionalProperties": true
|
|
326
|
+
},
|
|
327
|
+
"kimi": {
|
|
328
|
+
"type": "object",
|
|
329
|
+
"required": [
|
|
330
|
+
"compilation_targets",
|
|
331
|
+
"mcp",
|
|
332
|
+
"skills",
|
|
333
|
+
"automations"
|
|
334
|
+
],
|
|
335
|
+
"properties": {
|
|
336
|
+
"compilation_targets": {
|
|
337
|
+
"type": "array",
|
|
338
|
+
"minItems": 1,
|
|
339
|
+
"items": {
|
|
340
|
+
"type": "string"
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
"mcp": {
|
|
344
|
+
"type": "array",
|
|
345
|
+
"minItems": 1,
|
|
346
|
+
"items": {
|
|
347
|
+
"type": "string"
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
"skills": {
|
|
351
|
+
"type": "array",
|
|
352
|
+
"minItems": 1,
|
|
353
|
+
"items": {
|
|
354
|
+
"type": "string"
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
"automations": {
|
|
358
|
+
"type": "array",
|
|
359
|
+
"minItems": 1,
|
|
360
|
+
"items": {
|
|
361
|
+
"type": "string"
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
},
|
|
365
|
+
"additionalProperties": true
|
|
284
366
|
}
|
|
285
367
|
},
|
|
286
368
|
"additionalProperties": true
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "OmgCompiledArtifactManifest",
|
|
3
3
|
"channel": "enterprise",
|
|
4
|
+
"hosts": [
|
|
5
|
+
"claude",
|
|
6
|
+
"codex",
|
|
7
|
+
"gemini",
|
|
8
|
+
"kimi"
|
|
9
|
+
],
|
|
4
10
|
"contract_version": "2.0.8",
|
|
5
11
|
"artifacts": [
|
|
6
12
|
{
|
|
@@ -199,13 +205,21 @@
|
|
|
199
205
|
"path": "bundle/.claude-plugin/plugin.json",
|
|
200
206
|
"sha256": "fe7531e0527d288413151433ee5daa3106383442024d5dad072373f8f26d57d1"
|
|
201
207
|
},
|
|
208
|
+
{
|
|
209
|
+
"path": "bundle/.gemini/settings.json",
|
|
210
|
+
"sha256": "14208140297f635cc5155cfe063c9b8a6193a3d0a264e0686cf3b80789208f27"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"path": "bundle/.kimi/mcp.json",
|
|
214
|
+
"sha256": "14208140297f635cc5155cfe063c9b8a6193a3d0a264e0686cf3b80789208f27"
|
|
215
|
+
},
|
|
202
216
|
{
|
|
203
217
|
"path": "bundle/.mcp.json",
|
|
204
218
|
"sha256": "e16897732dbd20ba7f47e5c0513b146a8d847454c8c13aa9e0a6031e5a498fa4"
|
|
205
219
|
},
|
|
206
220
|
{
|
|
207
221
|
"path": "bundle/OMG_COMPAT_CONTRACT.md",
|
|
208
|
-
"sha256": "
|
|
222
|
+
"sha256": "706b57c51e105bc6654b457596df9332e8c1f73703596fe248bd24c2ae3a59e9"
|
|
209
223
|
},
|
|
210
224
|
{
|
|
211
225
|
"path": "bundle/plugins/advanced/commands/OMG:code-review.md",
|
|
@@ -341,11 +355,11 @@
|
|
|
341
355
|
},
|
|
342
356
|
{
|
|
343
357
|
"path": "bundle/registry/omg-capability.schema.json",
|
|
344
|
-
"sha256": "
|
|
358
|
+
"sha256": "a9076f09cd9a12ba769c2b05f80a24195ac851b9ad2b817efa41d6143765c513"
|
|
345
359
|
},
|
|
346
360
|
{
|
|
347
361
|
"path": "bundle/settings.json",
|
|
348
|
-
"sha256": "
|
|
362
|
+
"sha256": "7213d38cb5fd0699482120e1e5a2e50b3386f05bbf8e45b48c9007365058388b"
|
|
349
363
|
}
|
|
350
364
|
]
|
|
351
365
|
}
|
|
@@ -5,7 +5,7 @@ description: "Replayable bug packs built from logs, failing tests, traces, and d
|
|
|
5
5
|
|
|
6
6
|
# OMG Incident Replay
|
|
7
7
|
|
|
8
|
-
- Channel: `
|
|
8
|
+
- Channel: `enterprise`
|
|
9
9
|
- Execution modes: `embedded, local_supervisor`
|
|
10
10
|
- MCP servers: `omg-control`
|
|
11
11
|
- Evidence outputs: `.omg/incidents/*.json`
|
|
@@ -2,7 +2,7 @@ name: omg-incident-replay
|
|
|
2
2
|
description: "Replayable bug packs built from logs, failing tests, traces, and diffs."
|
|
3
3
|
allow_implicit_invocation: false
|
|
4
4
|
metadata:
|
|
5
|
-
channel:
|
|
5
|
+
channel: enterprise
|
|
6
6
|
bundle_id: incident-replay
|
|
7
7
|
title: "OMG Incident Replay"
|
|
8
8
|
mcp_servers:
|
|
@@ -5,7 +5,7 @@ description: "Optional LSP-backed diagnostics and navigation bundle for producti
|
|
|
5
5
|
|
|
6
6
|
# OMG LSP Pack
|
|
7
7
|
|
|
8
|
-
- Channel: `
|
|
8
|
+
- Channel: `enterprise`
|
|
9
9
|
- Execution modes: `embedded, local_supervisor`
|
|
10
10
|
- MCP servers: `omg-control`
|
|
11
11
|
- Evidence outputs: `.omg/evidence/lsp-diagnostics.json`
|
|
@@ -5,7 +5,7 @@ description: "Tools, prompts, resources, and server instructions for the OMG con
|
|
|
5
5
|
|
|
6
6
|
# OMG MCP Fabric
|
|
7
7
|
|
|
8
|
-
- Channel: `
|
|
8
|
+
- Channel: `enterprise`
|
|
9
9
|
- Execution modes: `embedded, local_supervisor`
|
|
10
10
|
- MCP servers: `omg-control, omg-memory`
|
|
11
11
|
- Evidence outputs: `.omg/evidence/mcp-fabric.json`
|
|
@@ -5,7 +5,7 @@ description: "Canonical council-style planning bundle for explicit, evidence-bac
|
|
|
5
5
|
|
|
6
6
|
# OMG Plan Council
|
|
7
7
|
|
|
8
|
-
- Channel: `
|
|
8
|
+
- Channel: `enterprise`
|
|
9
9
|
- Execution modes: `embedded, local_supervisor`
|
|
10
10
|
- MCP servers: `omg-control`
|
|
11
11
|
- Evidence outputs: `.omg/plans/deep-plan.md, .omg/plans/deep-plan.json, .omg/plans/dissent.json, .omg/evidence/plan-council.json`
|