@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
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
{
|
|
15
15
|
"name": "omg",
|
|
16
16
|
"description": "OMG plugin layer for Claude Code and supported agent hosts with native setup, orchestration, and interop.",
|
|
17
|
-
|
|
17
|
+
"version": "2.0.9",
|
|
18
18
|
"source": "./",
|
|
19
19
|
"author": {
|
|
20
20
|
"name": "trac3er00"
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
]
|
|
33
33
|
}
|
|
34
34
|
],
|
|
35
|
-
"version": "2.0.
|
|
35
|
+
"version": "2.0.9"
|
|
36
36
|
}
|
package/.kimi/mcp.json
ADDED
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 2.0.9 - 2026-03-08
|
|
6
|
+
|
|
7
|
+
- added scan-first evidence query layer for read-only trust artifact lookup
|
|
8
|
+
- extended claim-judge and test-intent-lock with query-backed workflows and file-backed lock state
|
|
9
|
+
- exposed claim-judge and test-intent-lock through control-plane service, HTTP routes, and MCP tools
|
|
10
|
+
- added deterministic repro-pack manifest assembly from existing evidence, trace, eval, and lineage artifacts
|
|
11
|
+
- added optional playwright evidence adapter for proof-chain-friendly browser artifact summarization
|
|
12
|
+
- added bounded verification-loop policy helpers with no execution side effects
|
|
13
|
+
- integrated new sibling artifacts into proof chain, evidence ingest, and release readiness
|
|
14
|
+
|
|
5
15
|
## 2.0.8 - 2026-03-07
|
|
6
16
|
|
|
7
17
|
- restored plan-council, claim-judge, test-intent-lock, and proof-gate to all required surfaces
|
package/OMG-setup.sh
CHANGED
|
@@ -5,7 +5,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
5
5
|
CLAUDE_DIR="${CLAUDE_CONFIG_DIR:-$HOME/.claude}"
|
|
6
6
|
BACKUP_TS="$(date +%Y%m%d_%H%M%S)"
|
|
7
7
|
BACKUP_DIR="$CLAUDE_DIR/.omg-backup-$BACKUP_TS"
|
|
8
|
-
VERSION="2.0.
|
|
8
|
+
VERSION="2.0.9"
|
|
9
9
|
|
|
10
10
|
PLUGIN_NAME="omg"
|
|
11
11
|
PLUGIN_MARKETPLACE="omg"
|
package/OMG_COMPAT_CONTRACT.md
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: OMG Production Control Plane
|
|
3
|
-
version: 2.0.
|
|
3
|
+
version: 2.0.9
|
|
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
|
|
package/README.md
CHANGED
|
@@ -75,6 +75,7 @@ OMG uses native setup language instead of public migration commands.
|
|
|
75
75
|
|
|
76
76
|
- `OMG-only`: recommended. OMG becomes the primary hooks, HUD, MCP, and orchestration layer.
|
|
77
77
|
- `coexist`: advanced. OMG preserves non-conflicting third-party surfaces and records overlap instead of overwriting it.
|
|
78
|
+
- Modes: `chill`, `focused`, `exploratory`. `focused` is the production default.
|
|
78
79
|
- Presets: `safe`, `balanced`, `interop`, `labs`.
|
|
79
80
|
|
|
80
81
|
## Security Notes
|
|
@@ -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
|
|
@@ -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
|
|
|
@@ -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 = {
|
|
@@ -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(),
|
|
@@ -12,7 +12,7 @@ from typing import Any, cast
|
|
|
12
12
|
|
|
13
13
|
import yaml
|
|
14
14
|
|
|
15
|
-
from _common import get_feature_flag
|
|
15
|
+
from hooks._common import get_feature_flag
|
|
16
16
|
|
|
17
17
|
# Ensure project root is on sys.path for runtime imports
|
|
18
18
|
_PROJECT_ROOT = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), ".."))
|
|
@@ -36,8 +36,10 @@ import runtime.providers.codex_provider # noqa: E402, F401
|
|
|
36
36
|
import runtime.providers.gemini_provider # noqa: E402, F401
|
|
37
37
|
import runtime.providers.kimi_provider # noqa: E402, F401
|
|
38
38
|
from runtime.adoption import ( # noqa: E402
|
|
39
|
+
CANONICAL_MODE_NAMES,
|
|
39
40
|
CANONICAL_VERSION,
|
|
40
41
|
build_adoption_report,
|
|
42
|
+
get_mode_profile,
|
|
41
43
|
get_preset_features,
|
|
42
44
|
resolve_preset,
|
|
43
45
|
write_adoption_report,
|
|
@@ -416,6 +418,17 @@ def check_auth() -> dict[str, Any]:
|
|
|
416
418
|
_HTTP_MEMORY_MIN_LEVEL: int = _PRESET_LEVEL["interop"]
|
|
417
419
|
|
|
418
420
|
|
|
421
|
+
def get_mode_choices() -> list[str]:
|
|
422
|
+
return list(CANONICAL_MODE_NAMES)
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
def select_setup_mode(mode: str | None) -> str:
|
|
426
|
+
candidate = (mode or "").strip().lower()
|
|
427
|
+
if candidate in CANONICAL_MODE_NAMES:
|
|
428
|
+
return candidate
|
|
429
|
+
return "focused"
|
|
430
|
+
|
|
431
|
+
|
|
419
432
|
def configure_mcp(
|
|
420
433
|
project_dir: str,
|
|
421
434
|
detected_clis: dict[str, Any],
|
|
@@ -599,6 +612,7 @@ def run_setup_wizard(
|
|
|
599
612
|
non_interactive: bool = False,
|
|
600
613
|
*,
|
|
601
614
|
mode: str | None = None,
|
|
615
|
+
setup_mode: str | None = None,
|
|
602
616
|
adopt: str = "auto",
|
|
603
617
|
preset: str | None = None,
|
|
604
618
|
) -> dict[str, Any]:
|
|
@@ -622,6 +636,7 @@ def run_setup_wizard(
|
|
|
622
636
|
}
|
|
623
637
|
|
|
624
638
|
selected_preset = resolve_preset(preset or ("balanced" if non_interactive else "safe"))
|
|
639
|
+
selected_setup_mode = select_setup_mode(setup_mode)
|
|
625
640
|
adoption = build_adoption_report(
|
|
626
641
|
project_dir,
|
|
627
642
|
requested_mode=mode,
|
|
@@ -638,6 +653,11 @@ def run_setup_wizard(
|
|
|
638
653
|
|
|
639
654
|
return {
|
|
640
655
|
"status": "complete",
|
|
656
|
+
"setup_mode": {
|
|
657
|
+
"choices": get_mode_choices(),
|
|
658
|
+
"selected": selected_setup_mode,
|
|
659
|
+
"profile": get_mode_profile(selected_setup_mode),
|
|
660
|
+
},
|
|
641
661
|
"clis_detected": clis,
|
|
642
662
|
"auth_status": auth,
|
|
643
663
|
"mcp_configured": mcp,
|
|
@@ -6,6 +6,7 @@ Maintains overlay-style shadow writes and evidence artifacts.
|
|
|
6
6
|
from __future__ import annotations
|
|
7
7
|
|
|
8
8
|
import hashlib
|
|
9
|
+
import importlib
|
|
9
10
|
import json
|
|
10
11
|
import os
|
|
11
12
|
import platform
|
|
@@ -18,8 +19,15 @@ from typing import Any
|
|
|
18
19
|
HOOKS_DIR = os.path.dirname(__file__)
|
|
19
20
|
if HOOKS_DIR not in sys.path:
|
|
20
21
|
sys.path.insert(0, HOOKS_DIR)
|
|
21
|
-
|
|
22
|
-
from
|
|
22
|
+
try:
|
|
23
|
+
from hooks._common import _resolve_project_dir
|
|
24
|
+
from hooks.security_validators import ensure_path_within_dir, validate_opaque_identifier
|
|
25
|
+
except ImportError:
|
|
26
|
+
_common = importlib.import_module("_common")
|
|
27
|
+
security_validators = importlib.import_module("security_validators")
|
|
28
|
+
_resolve_project_dir = _common._resolve_project_dir
|
|
29
|
+
ensure_path_within_dir = security_validators.ensure_path_within_dir
|
|
30
|
+
validate_opaque_identifier = security_validators.validate_opaque_identifier
|
|
23
31
|
|
|
24
32
|
|
|
25
33
|
def _project_dir() -> str:
|
|
@@ -189,6 +197,11 @@ def create_evidence_pack(
|
|
|
189
197
|
lineage: dict[str, Any] | None = None,
|
|
190
198
|
executor: dict[str, Any] | None = None,
|
|
191
199
|
environment: dict[str, Any] | None = None,
|
|
200
|
+
artifacts: list[dict[str, Any]] | None = None,
|
|
201
|
+
claims: list[dict[str, Any]] | None = None,
|
|
202
|
+
test_delta: dict[str, Any] | None = None,
|
|
203
|
+
browser_evidence_path: str | None = None,
|
|
204
|
+
repro_pack_path: str | None = None,
|
|
192
205
|
) -> str:
|
|
193
206
|
ensure_shadow_dirs(project_dir)
|
|
194
207
|
run_id = _validated_run_id(run_id)
|
|
@@ -209,6 +222,7 @@ def create_evidence_pack(
|
|
|
209
222
|
|
|
210
223
|
evidence = {
|
|
211
224
|
"schema": "EvidencePack",
|
|
225
|
+
"schema_version": 2,
|
|
212
226
|
"run_id": run_id,
|
|
213
227
|
"created_at": _utc_now(),
|
|
214
228
|
"tests": tests or [],
|
|
@@ -224,7 +238,16 @@ def create_evidence_pack(
|
|
|
224
238
|
"lineage": lineage or {},
|
|
225
239
|
"executor": executor,
|
|
226
240
|
"environment": environment,
|
|
241
|
+
"artifacts": artifacts or [],
|
|
227
242
|
}
|
|
243
|
+
if claims is not None:
|
|
244
|
+
evidence["claims"] = claims
|
|
245
|
+
if test_delta is not None:
|
|
246
|
+
evidence["test_delta"] = test_delta
|
|
247
|
+
if browser_evidence_path is not None:
|
|
248
|
+
evidence["browser_evidence_path"] = browser_evidence_path
|
|
249
|
+
if repro_pack_path is not None:
|
|
250
|
+
evidence["repro_pack_path"] = repro_pack_path
|
|
228
251
|
evidence_path = ensure_path_within_dir(
|
|
229
252
|
_evidence_root(project_dir),
|
|
230
253
|
os.path.join(_evidence_root(project_dir), f"{run_id}.json"),
|
|
@@ -115,6 +115,9 @@ MIGRATION_MAP: list[tuple[str, str, str]] = [
|
|
|
115
115
|
("dir", "repl_sessions", "state/repl_sessions"),
|
|
116
116
|
("dir", "sessions", "state/sessions"),
|
|
117
117
|
("dir", "snapshots", "state/snapshots"),
|
|
118
|
+
("file", "current_branch.json", "state/current_branch.json"),
|
|
119
|
+
("file", "background-verification.json", "state/background-verification.json"),
|
|
120
|
+
("dir", "branches", "state/branches"),
|
|
118
121
|
("dir", "knowledge", "knowledge"),
|
|
119
122
|
]
|
|
120
123
|
|