@orangepro/orangepro-mcp 0.1.0 → 0.2.1
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/LICENSE +1 -1
- package/README.md +195 -251
- package/dist/local/analyze/analyzer.js +62 -17
- package/dist/local/analyze/treeSitter/engine.js +185 -22
- package/dist/local/autoProve.js +433 -38
- package/dist/local/cli.js +93 -10
- package/dist/local/cliArgs.js +1 -0
- package/dist/local/generate/runHints.js +9 -4
- package/dist/local/graph/factories.js +5 -2
- package/dist/local/ledger.js +1 -1
- package/dist/local/mcp.js +26 -13
- package/dist/local/operations.js +454 -52
- package/dist/local/pack/coverageReport.js +3 -3
- package/dist/local/proofDoctor.js +312 -0
- package/dist/local/rtm.js +40 -10
- package/dist/local/viz/behaviorReportData.js +79 -7
- package/dist/local/viz/behaviorReportHtml.js +526 -615
- package/dist/local/viz/html.js +1 -1
- package/docs/agent-workflow.md +10 -38
- package/docs/agents/claude-code.md +3 -9
- package/docs/agents/codex.md +3 -20
- package/docs/agents/cursor.md +2 -2
- package/docs/agents/opencode.md +2 -2
- package/docs/agents/vscode.md +2 -2
- package/docs/local-proof-kit.md +52 -19
- package/package.json +39 -6
- package/scripts/spikes/go-dynamic-proof-spike.mjs +637 -0
- package/scripts/spikes/go-mutate.go +182 -0
- package/scripts/spikes/java-dynamic-proof-spike.mjs +571 -0
- package/scripts/spikes/java-mutate.mjs +264 -0
- package/scripts/spikes/python-dynamic-proof-spike.mjs +245 -0
- package/scripts/spikes/python-mutate.py +89 -0
package/dist/local/viz/html.js
CHANGED
|
@@ -13,7 +13,7 @@ import { D3_SOURCE } from "./d3.bundle.js";
|
|
|
13
13
|
*
|
|
14
14
|
* No CDN, no network: D3 v7 is vendored inline and the gap-first DATA (the
|
|
15
15
|
* curated `payload.gap` view model) is injected as JSON. This is a LOCAL artifact
|
|
16
|
-
* (written
|
|
16
|
+
* (written by `opro export --format graph-html`, never uploaded), so it intentionally
|
|
17
17
|
* includes real test/area names. It embeds NO raw source code, generated test
|
|
18
18
|
* bodies, prompts, secrets, or node `properties` beyond the curated gap view.
|
|
19
19
|
*
|
package/docs/agent-workflow.md
CHANGED
|
@@ -5,46 +5,18 @@ tests, and reports results.
|
|
|
5
5
|
|
|
6
6
|
## Setup
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
The public, supported path today is npm + MCP config:
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
```bash
|
|
17
|
-
codex plugin marketplace add OrangeproAI/orangepro-mcp --sparse .agents/plugins --sparse plugins/orangepro
|
|
18
|
-
codex plugin add orangepro@orangepro
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
For maintainer-local development before npm publishing:
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
codex plugin add orangepro@personal
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
For Claude Code, add this repo as a Claude plugin marketplace and install the bundled MCP plugin:
|
|
28
|
-
|
|
29
|
-
```text
|
|
30
|
-
/plugin marketplace add OrangeproAI/orangepro-mcp
|
|
31
|
-
/plugin install orangepro@orangepro
|
|
32
|
-
/reload-plugins
|
|
11
|
+
npm install -g @orangepro/orangepro-mcp
|
|
12
|
+
cd /path/to/your/repo
|
|
13
|
+
opro
|
|
14
|
+
opro agent --client codex # or claude-code, cursor, opencode, generic
|
|
33
15
|
```
|
|
34
16
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
## Publishing Checklist
|
|
38
|
-
|
|
39
|
-
Before public plugin launch:
|
|
17
|
+
Paste the printed MCP block into your agent. The bundled plugin metadata in this repo is for marketplace submission and maintainer validation; do not assume bare `codex plugin add orangepro` or Claude marketplace install works until OrangePro is listed in that marketplace.
|
|
40
18
|
|
|
41
|
-
|
|
42
|
-
2. Create and verify the fresh-history public export; do not publish a repo with private history.
|
|
43
|
-
3. Codex: ship `.agents/plugins/marketplace.json` and `plugins/orangepro`; bare `codex plugin add orangepro` needs a configured/default marketplace listing.
|
|
44
|
-
4. Claude Code: ship `.claude-plugin/marketplace.json` and `plugins/orangepro`; directory discovery is a separate marketplace/listing step.
|
|
45
|
-
5. Cursor: submit `plugins/orangepro` to the Cursor Marketplace when ready; local testing uses that same directory.
|
|
46
|
-
6. OpenCode / VS Code: keep the MCP snippets current until they expose a plugin marketplace path for this style of local server.
|
|
47
|
-
7. Smoke every path in a clean checkout and verify no config pins a model or commits a provider key.
|
|
19
|
+
For Cursor, install OrangePro from the Cursor Marketplace when available. Until then, use `opro agent --client cursor` or the bundled plugin directory at `plugins/orangepro` for local testing.
|
|
48
20
|
|
|
49
21
|
Build the CLI and print a client-ready MCP block:
|
|
50
22
|
|
|
@@ -89,7 +61,7 @@ For PR work:
|
|
|
89
61
|
3. Use only generated tests that include run_hints.
|
|
90
62
|
4. Write each body to its suggested_path.
|
|
91
63
|
5. Run the run_command from the owning package directory.
|
|
92
|
-
6. After a pass, call the returned prove_run args to attempt
|
|
64
|
+
6. After a pass, call `orangepro_prove` with the returned `prove_run` args to attempt Dynamically Proven; use `record_run` only for static diagnostics.
|
|
93
65
|
7. Report pass/fail with stack traces and exact setup problems.
|
|
94
66
|
|
|
95
67
|
For baseline work:
|
|
@@ -97,7 +69,7 @@ For baseline work:
|
|
|
97
69
|
2. Pick one high-priority gap.
|
|
98
70
|
3. Call orangepro_generate_tests for that target.
|
|
99
71
|
4. Write, run, and report only runnable tests.
|
|
100
|
-
5. After a pass, call the returned prove_run args to attempt
|
|
72
|
+
5. After a pass, call `orangepro_prove` with the returned `prove_run` args to attempt Dynamically Proven; use `record_run` only for static diagnostics.
|
|
101
73
|
|
|
102
74
|
Do not treat drafts as runnable tests. Drafts are context.
|
|
103
75
|
Do not claim coverage changed unless OrangePro reports Proven, Reproven, Runtime-covered, Associated signal, or No integration signal changed.
|
|
@@ -148,7 +120,7 @@ For repos that use an `AGENTS.md`, keep the OrangePro instruction short:
|
|
|
148
120
|
- For baseline gaps, run `opro gaps --limit 10`, pick one target, then run
|
|
149
121
|
`opro generate --target <target-id> --single --limit 1`.
|
|
150
122
|
- Write only tests that include `run_hints`; drafts are context, not runnable claims.
|
|
151
|
-
- Write each generated body to `suggested_path`, run `run_command`, call the returned `prove_run` args after a pass to attempt
|
|
123
|
+
- Write each generated body to `suggested_path`, run `run_command`, call `orangepro_prove` with the returned `prove_run` args after a pass to attempt Dynamically Proven. Use `record_run` only for static diagnostics.
|
|
152
124
|
- Report coverage status as Proven / Reproven / Runtime-covered / Associated signal / No integration signal. Do not promote Associated signal or AI links to Proven.
|
|
153
125
|
```
|
|
154
126
|
|
|
@@ -12,15 +12,9 @@ opro
|
|
|
12
12
|
|
|
13
13
|
## Claude Plugin
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
The public, supported path today is MCP setup through `opro agent --client claude-code` below. The bundled plugin metadata is for marketplace submission and maintainer validation; use marketplace install commands only after OrangePro is listed in your Claude Code plugin marketplace.
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
/plugin marketplace add OrangeproAI/orangepro-mcp
|
|
19
|
-
/plugin install orangepro@orangepro
|
|
20
|
-
/reload-plugins
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
The plugin starts the `orangepro-local` MCP server automatically and exposes the `/orangepro:opro` skill. It does not pin a model; OrangePro uses provider/model values from the environment, `.env.provider.local`, `.env.local`, `.env`, or `opro setup`.
|
|
17
|
+
When installed through a marketplace, the plugin starts the same `orangepro-local` MCP server and exposes the `/orangepro:opro` skill. It does not pin a model; OrangePro uses provider/model values from the environment, `.env.provider.local`, `.env.local`, `.env`, or `opro setup`.
|
|
24
18
|
|
|
25
19
|
## MCP Setup
|
|
26
20
|
|
|
@@ -39,5 +33,5 @@ If your Claude Code setup supports custom slash commands, map `/opro` to: call `
|
|
|
39
33
|
## Agent Prompt
|
|
40
34
|
|
|
41
35
|
```text
|
|
42
|
-
Use OrangePro first. Call orangepro_start, then use orangepro_generate_tests for the returned PR or gap target. Write each runnable test to suggested_path, run run_command, and call
|
|
36
|
+
Use OrangePro first. Call orangepro_start, then use orangepro_generate_tests for the returned PR or gap target. Write each runnable test to suggested_path, run run_command, and call `orangepro_prove` with the returned `prove_run` args for Dynamically Proven. Use record_run only for static diagnostics. Do not treat drafts as runnable tests.
|
|
43
37
|
```
|
package/docs/agents/codex.md
CHANGED
|
@@ -12,26 +12,9 @@ opro
|
|
|
12
12
|
|
|
13
13
|
## Codex Plugin
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
The public, supported path today is MCP setup through `opro agent --client codex` below. `codex plugin add orangepro` is only valid after OrangePro is listed in a Codex marketplace configured for your Codex install.
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
codex plugin add orangepro
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
Until OrangePro is accepted into a default marketplace, add this repo as a Codex marketplace and install from it:
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
codex plugin marketplace add OrangeproAI/orangepro-mcp --sparse .agents/plugins --sparse plugins/orangepro
|
|
25
|
-
codex plugin add orangepro@orangepro
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
For maintainer-local development before npm publishing, install the personal marketplace plugin:
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
codex plugin add orangepro@personal
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
The plugin starts the `orangepro-local` MCP server. It does not pin an LLM model; OrangePro uses the provider/model configured in your environment, `.env.provider.local`, `.env.local`, `.env`, or `opro setup`.
|
|
17
|
+
The bundled plugin metadata in this repo is for marketplace submission and maintainer validation. It starts the same `orangepro-local` MCP server and does not pin an LLM model; OrangePro uses the provider/model configured in your environment, `.env.provider.local`, `.env.local`, `.env`, or `opro setup`.
|
|
35
18
|
|
|
36
19
|
## MCP Setup
|
|
37
20
|
|
|
@@ -48,5 +31,5 @@ If your Codex build supports plugin/shortcut commands, map `$opro` (or `/opro`)
|
|
|
48
31
|
## Agent Prompt
|
|
49
32
|
|
|
50
33
|
```text
|
|
51
|
-
Use OrangePro first. Call orangepro_start for this checkout, inspect the returned next_actions, then generate tests only through orangepro_generate_tests. Write only runnable tests with run_hints. After running them, call
|
|
34
|
+
Use OrangePro first. Call orangepro_start for this checkout, inspect the returned next_actions, then generate tests only through orangepro_generate_tests. Write only runnable tests with run_hints. After running them, call `orangepro_prove` with the returned `prove_run` args for Dynamically Proven. Use record_run only for static diagnostics.
|
|
52
35
|
```
|
package/docs/agents/cursor.md
CHANGED
|
@@ -18,7 +18,7 @@ Install OrangePro from the Cursor Marketplace when it is listed. Until then, use
|
|
|
18
18
|
plugins/orangepro
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
The plugin starts the `orangepro-local` MCP server through `npx -y
|
|
21
|
+
The plugin starts the `orangepro-local` MCP server through `npx -y @orangepro/mcp-server@latest mcp` and applies OrangePro rules for gap/test workflows. It does not pin a model; provider keys and model defaults come from your environment, `.env.provider.local`, `.env.local`, `.env`, or `opro setup`.
|
|
22
22
|
|
|
23
23
|
## MCP Setup
|
|
24
24
|
|
|
@@ -35,5 +35,5 @@ If your Cursor setup supports custom commands, map `/opro` to: call `orangepro_s
|
|
|
35
35
|
## Agent Prompt
|
|
36
36
|
|
|
37
37
|
```text
|
|
38
|
-
Use OrangePro first. Call orangepro_start in this repo, then follow its next_actions. Generate tests with orangepro_generate_tests, write only runnable outputs with run_hints, run the suggested command, and call prove_run after a passing run for
|
|
38
|
+
Use OrangePro first. Call orangepro_start in this repo, then follow its next_actions. Generate tests with orangepro_generate_tests, write only runnable outputs with run_hints, run the suggested command, and call `orangepro_prove` with the returned `prove_run` args after a passing run for Dynamically Proven. Use record_run only for static diagnostics.
|
|
39
39
|
```
|
package/docs/agents/opencode.md
CHANGED
|
@@ -28,7 +28,7 @@ For a direct OpenCode config, add this server under `mcp`:
|
|
|
28
28
|
"orangepro-local": {
|
|
29
29
|
"enabled": true,
|
|
30
30
|
"command": "npx",
|
|
31
|
-
"args": ["-y", "
|
|
31
|
+
"args": ["-y", "@orangepro/mcp-server@latest", "mcp"]
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
}
|
|
@@ -39,5 +39,5 @@ If your OpenCode setup supports slash or dollar commands, map `/opro` or `$opro`
|
|
|
39
39
|
## Agent Prompt
|
|
40
40
|
|
|
41
41
|
```text
|
|
42
|
-
Use OrangePro first. Call orangepro_start, generate tests only through orangepro_generate_tests, write runnable tests with run_hints, run the command, and call prove_run after a pass for
|
|
42
|
+
Use OrangePro first. Call orangepro_start, generate tests only through orangepro_generate_tests, write runnable tests with run_hints, run the command, and call `orangepro_prove` with the returned `prove_run` args after a pass for Dynamically Proven. Use record_run only for static diagnostics. Report setup failures plainly.
|
|
43
43
|
```
|
package/docs/agents/vscode.md
CHANGED
|
@@ -19,7 +19,7 @@ Add OrangePro as an MCP server in your user or workspace MCP config:
|
|
|
19
19
|
"servers": {
|
|
20
20
|
"orangepro-local": {
|
|
21
21
|
"command": "npx",
|
|
22
|
-
"args": ["-y", "
|
|
22
|
+
"args": ["-y", "@orangepro/mcp-server@latest", "mcp"]
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -30,5 +30,5 @@ Do not hardcode provider keys in a committed workspace config. Prefer your shell
|
|
|
30
30
|
## Agent Prompt
|
|
31
31
|
|
|
32
32
|
```text
|
|
33
|
-
Use OrangePro first. Call orangepro_start for this repo, then follow next_actions. Generate tests with orangepro_generate_tests, write only runnable outputs with run_hints, run the suggested command, and call prove_run after a pass for
|
|
33
|
+
Use OrangePro first. Call orangepro_start for this repo, then follow next_actions. Generate tests with orangepro_generate_tests, write only runnable outputs with run_hints, run the suggested command, and call `orangepro_prove` with the returned `prove_run` args after a pass for Dynamically Proven. Use record_run only for static diagnostics.
|
|
34
34
|
```
|
package/docs/local-proof-kit.md
CHANGED
|
@@ -47,7 +47,7 @@ source checkout. npm users can run the CLI commands below directly.
|
|
|
47
47
|
```bash
|
|
48
48
|
opro # one-command start: analyze, optional AI weak links, graph, RTM, next actions
|
|
49
49
|
opro init # create the .orangepro/ workspace
|
|
50
|
-
opro analyze . # build the local evidence graph + write .orangepro/
|
|
50
|
+
opro analyze . # build the local evidence graph + write .orangepro/behavior-coverage.html (scan-all by default)
|
|
51
51
|
opro status # fresh / stale / missing + score + privacy
|
|
52
52
|
opro doctor # smallest next source that improves test quality
|
|
53
53
|
opro score # readiness score + breakdown + "why not higher"
|
|
@@ -62,7 +62,7 @@ opro explain <generated_test_id># which evidence anchors grounded a test
|
|
|
62
62
|
opro update # incremental, non-destructive refresh
|
|
63
63
|
opro changed --base main # changed files + affected behaviors/tests
|
|
64
64
|
opro export --out orangepro-evidence-pack.json
|
|
65
|
-
opro analyze . --no-
|
|
65
|
+
opro analyze . --no-coverage-html # skip the behavior report HTML (it is written by default)
|
|
66
66
|
opro export --format graph-html # write just the explorer (orangepro-graph.html)
|
|
67
67
|
opro mcp # run the MCP server (stdio)
|
|
68
68
|
```
|
|
@@ -82,9 +82,11 @@ huge run), and it prints `files scanned: N` plus any cap that was hit.
|
|
|
82
82
|
|
|
83
83
|
### Evidence graph explorer
|
|
84
84
|
|
|
85
|
-
`analyze` writes a **self-contained, offline**
|
|
86
|
-
**by default** (`--no-
|
|
87
|
-
|
|
85
|
+
`analyze` writes a **self-contained, offline** behavior report to
|
|
86
|
+
`.orangepro/behavior-coverage.html` **by default** (`--no-coverage-html` to skip). The
|
|
87
|
+
graph explorer described below is written by `opro export --format graph-html`
|
|
88
|
+
(standalone `orangepro-graph.html`) — no CDN, no network, metadata-only (never source,
|
|
89
|
+
bodies, or prompts).
|
|
88
90
|
It opens
|
|
89
91
|
score-first, shows a *summarized* evidence layer (not a 3k-node hairball), and lets you
|
|
90
92
|
search a symbol (e.g. `useScaledAmount`), click it, and see the connected files, tests,
|
|
@@ -112,6 +114,34 @@ offline, opt in explicitly with `--provider deterministic` (CLI) or
|
|
|
112
114
|
`ORANGEPRO_ALLOW_DETERMINISTIC=1`, which uses a clearly-labeled deterministic stand-in.
|
|
113
115
|
Static analysis, scoring, gaps, and pack export never need a model.
|
|
114
116
|
|
|
117
|
+
### v5 batched generation (opt-in)
|
|
118
|
+
|
|
119
|
+
The auto-prove generation lane (`opro start`, the `orangepro_start` MCP tool, and the PR
|
|
120
|
+
diff path) defaults to the **v2** prompt strategy. Opt into the **v5** batched two-phase
|
|
121
|
+
strategy (plan scenarios → batch-generate) with `--prompt-version v5` (CLI) or
|
|
122
|
+
`prompt_version: "v5"` (MCP). The flag only changes **which** tests are drafted — a
|
|
123
|
+
generated test is still marked Proven only when it genuinely kills the null-sentinel mutant
|
|
124
|
+
via the **unchanged** dynamic-proof oracle. The default path is unchanged (no key required
|
|
125
|
+
for v2/deterministic; existing behavior and CI are untouched).
|
|
126
|
+
|
|
127
|
+
Exercise the live v5 loop against a tiny fixture with a keyed smoke:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
# LIVE (requires a BYOK key — fails clearly, exit 2, if none is set):
|
|
131
|
+
OPENAI_API_KEY=sk-... npm run smoke:generate-prove-v5
|
|
132
|
+
# or ANTHROPIC_API_KEY=... / OLLAMA_BASE_URL=...
|
|
133
|
+
|
|
134
|
+
# Offline plumbing check (flag accepted + start completes; generation lane is key-gated):
|
|
135
|
+
node scripts/smoke-generate-prove-v5.mjs --fake
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
**CI note:** `smoke:generate-prove-v5` (LIVE) needs a real provider key and is intentionally
|
|
139
|
+
NOT wired into the default CI. To add a keyed job, expose one of `OPENAI_API_KEY` /
|
|
140
|
+
`ANTHROPIC_API_KEY` / `OLLAMA_BASE_URL` as a CI secret and run `npm run smoke:generate-prove-v5`.
|
|
141
|
+
The end-to-end v5→Proven wiring is covered offline (no key) by
|
|
142
|
+
`tests/local/autoProve.test.ts` ("v5 track wiring"), which drives the real v5 branch with a
|
|
143
|
+
fake provider.
|
|
144
|
+
|
|
115
145
|
## Scenario buckets (generation diversity)
|
|
116
146
|
|
|
117
147
|
`generate` is **target-focused**: it picks the top-gap behavior (or your `--target`)
|
|
@@ -152,7 +182,7 @@ config plus the write/run/report loop. The shipped guide is
|
|
|
152
182
|
|
|
153
183
|
First-slice MCP tools (same behavior as the CLI, same core): `orangepro_start`, `orangepro_analyze_sources`,
|
|
154
184
|
`orangepro_graph_score`, `orangepro_status`, `orangepro_doctor`, `orangepro_find_test_gaps`,
|
|
155
|
-
`orangepro_record_run`, `orangepro_prove`, `orangepro_stats`, `orangepro_rtm`, `orangepro_update_graph`,
|
|
185
|
+
`orangepro_record_run`, `orangepro_prove`, `orangepro_prove_loop`, `orangepro_stats`, `orangepro_rtm`, `orangepro_update_graph`,
|
|
156
186
|
`orangepro_changed_impact`, `orangepro_ai_links`, `orangepro_ai_flows`, `orangepro_generate_tests`,
|
|
157
187
|
`orangepro_explain_test`, `orangepro_export_evidence_pack`. **No upload or repo-write tools.**
|
|
158
188
|
|
|
@@ -164,7 +194,7 @@ Two explicit classes, so an agent never fabricates PR analysis when there is no
|
|
|
164
194
|
current local graph/checkout and need **no diff or PR**: `orangepro_start`,
|
|
165
195
|
`orangepro_analyze_sources`, `orangepro_status`, `orangepro_graph_score`,
|
|
166
196
|
`orangepro_doctor`, `orangepro_find_test_gaps`, `orangepro_rtm`,
|
|
167
|
-
`orangepro_generate_tests`, `orangepro_record_run`, `orangepro_prove`, `orangepro_stats`,
|
|
197
|
+
`orangepro_generate_tests`, `orangepro_record_run`, `orangepro_prove`, `orangepro_prove_loop`, `orangepro_stats`,
|
|
168
198
|
`orangepro_explain_test`, `orangepro_export_evidence_pack`.
|
|
169
199
|
- **Diff/PR tools** — only for **real code-review situations**. They require a git repo
|
|
170
200
|
and a real diff vs a base ref (default `main`). Today: `orangepro_changed_impact`
|
|
@@ -207,20 +237,23 @@ presentation labels over the same statuses above; they change no classification,
|
|
|
207
237
|
LLM, similarity inference, and static hard TESTED_BY/COVERS edges are candidate or
|
|
208
238
|
associated signals until a dynamic targeted proof closes.
|
|
209
239
|
|
|
210
|
-
### Dynamic proof
|
|
240
|
+
### Dynamic proof language profiles
|
|
241
|
+
|
|
242
|
+
Dynamic targeted proof ships as per-ecosystem **profiles**, all passing the same trust
|
|
243
|
+
gate (baseline green → targeted mutation → the same test fails at an assertion → target
|
|
244
|
+
not mocked):
|
|
211
245
|
|
|
212
|
-
|
|
213
|
-
`
|
|
214
|
-
|
|
215
|
-
|
|
246
|
+
- **TypeScript/JavaScript** — vitest / jest / mocha, monorepo-aware (`tsconfig`
|
|
247
|
+
`extends`/`paths` workspaces).
|
|
248
|
+
- **Go** — `go test`, scoped to the target's package.
|
|
249
|
+
- **Java** — Maven / JUnit.
|
|
250
|
+
- **Python** — pytest.
|
|
216
251
|
|
|
217
|
-
|
|
218
|
-
(
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
reports "not supported for this language/ecosystem yet" or a precise `<lang>_workspace_config_missing`
|
|
223
|
-
reason, and those behaviors simply stay in their static tiers.
|
|
252
|
+
The static map is broader than the dynamic pass: languages without a proof profile yet
|
|
253
|
+
(Kotlin, Rust, ...) still get the full static picture (behaviors, flows, Statically
|
|
254
|
+
Linked, Reachable Untested, and any ingested runtime coverage). Where a language's
|
|
255
|
+
profile cannot run, dynamic proof does not pretend — it reports a precise "not supported
|
|
256
|
+
/ workspace config missing" reason and those behaviors stay in their static tiers.
|
|
224
257
|
|
|
225
258
|
The local ledger is a trusted local artifact, not a cryptographic attestation. A
|
|
226
259
|
hosted/product proof path must bind each dynamic certificate to witnessed run artifacts
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orangepro/orangepro-mcp",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"private": false,
|
|
5
|
-
"description": "OrangePro (`opro`) — a local-first, BYOK CLI + MCP server that builds an evidence graph from a local checkout, ingests runtime coverage, and generates grounded tests. Metadata-only exports; no source upload;
|
|
5
|
+
"description": "OrangePro (`opro`) — a local-first, BYOK CLI + MCP server that builds an evidence graph from a local checkout, ingests runtime coverage, and generates grounded tests. Metadata-only exports; no source upload; generated tests stay local.",
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"author": "OrangePro
|
|
7
|
+
"author": "OrangePro",
|
|
8
8
|
"homepage": "https://github.com/OrangeproAI/orangepro-mcp#readme",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -30,6 +30,12 @@
|
|
|
30
30
|
"scripts/spikes/dynamic-proof-vitest-reporter.mjs",
|
|
31
31
|
"scripts/spikes/dynamic-proof-jest-reporter.cjs",
|
|
32
32
|
"scripts/spikes/dynamic-proof-mocha-reporter.cjs",
|
|
33
|
+
"scripts/spikes/go-dynamic-proof-spike.mjs",
|
|
34
|
+
"scripts/spikes/go-mutate.go",
|
|
35
|
+
"scripts/spikes/java-dynamic-proof-spike.mjs",
|
|
36
|
+
"scripts/spikes/java-mutate.mjs",
|
|
37
|
+
"scripts/spikes/python-dynamic-proof-spike.mjs",
|
|
38
|
+
"scripts/spikes/python-mutate.py",
|
|
33
39
|
"README.md",
|
|
34
40
|
"LICENSE",
|
|
35
41
|
"docs/agents",
|
|
@@ -48,15 +54,42 @@
|
|
|
48
54
|
"dev": "tsx src/index.ts",
|
|
49
55
|
"local": "tsx src/local/cli.ts",
|
|
50
56
|
"start": "node dist/index.js",
|
|
51
|
-
"test": "npm run test:rest && npm run test:spike:core && npm run test:spike:mono",
|
|
52
|
-
"test:rest": "vitest run --exclude '**/dynamicProofSpike.test.ts'",
|
|
57
|
+
"test": "npm run test:rest && npm run test:spike:core && npm run test:spike:mono && npm run test:spike:go && npm run test:spike:java && npm run test:spike:python && npm run test:integration",
|
|
58
|
+
"test:rest": "vitest run --exclude '**/dynamicProofSpike.test.ts' --exclude '**/goDynamicProofSpike.test.ts' --exclude '**/javaDynamicProofSpike.test.ts' --exclude '**/pythonDynamicProofSpike.test.ts' --exclude '**/goProveIntegration.test.ts' --exclude '**/javaProveIntegration.test.ts' --exclude '**/autoProveGo.test.ts' --exclude '**/autoProveJava.test.ts'",
|
|
53
59
|
"test:spike:core": "npm run test:spike:core:main && npm run test:spike:core:runner",
|
|
54
60
|
"test:spike:core:main": "vitest run tests/local/dynamicProofSpike.test.ts -t \"^(?!.*(M-[123]|Mocha|free-function mutator)).*\" --pool=forks --poolOptions.forks.maxForks=1",
|
|
55
61
|
"test:spike:core:runner": "vitest run tests/local/dynamicProofSpike.test.ts -t \"Mocha|free-function mutator\" --pool=forks --poolOptions.forks.maxForks=1",
|
|
56
|
-
"test:spike:mono": "
|
|
62
|
+
"test:spike:mono": "npm run test:spike:mono:base && npm run test:spike:mono:aspect",
|
|
63
|
+
"test:spike:mono:base": "vitest run tests/local/dynamicProofSpike.test.ts -t \"^(?!.*aspect).*M-[123]\" --pool=forks --poolOptions.forks.maxForks=1",
|
|
64
|
+
"test:spike:mono:aspect": "vitest run tests/local/dynamicProofSpike.test.ts -t \"M-3 aspect\" --pool=forks --poolOptions.forks.maxForks=1",
|
|
65
|
+
"test:spike:go": "npm run test:spike:go:1 && npm run test:spike:go:2 && npm run test:spike:go:3 && npm run test:spike:go:4",
|
|
66
|
+
"test:spike:go:1": "vitest run tests/local/goDynamicProofSpike.test.ts -t \"FIX 1|FIX 2\" --pool=forks --poolOptions.forks.maxForks=1",
|
|
67
|
+
"test:spike:go:2": "vitest run tests/local/goDynamicProofSpike.test.ts -t \"^(?!.*Slice 2).*(does not|equivalent|ambiguous)\" --pool=forks --poolOptions.forks.maxForks=1",
|
|
68
|
+
"test:spike:go:3": "vitest run tests/local/goDynamicProofSpike.test.ts -t \"^(?!.*(FIX 1|FIX 2|does not|equivalent|ambiguous|Slice 2))\" --pool=forks --poolOptions.forks.maxForks=1",
|
|
69
|
+
"test:spike:go:4": "vitest run tests/local/goDynamicProofSpike.test.ts -t \"Slice 2\" --pool=forks --poolOptions.forks.maxForks=1",
|
|
70
|
+
"test:spike:java": "npm run test:spike:java:proof && npm run test:spike:java:reject:compile && npm run test:spike:java:reject:runtime && npm run test:spike:java:reject:baseline && npm run test:spike:java:reject:shape",
|
|
71
|
+
"test:spike:java:proof": "vitest run tests/local/javaDynamicProofSpike.test.ts -t \"^(?!.*rejects).*\" --pool=forks --poolOptions.forks.maxForks=1",
|
|
72
|
+
"test:spike:java:reject:compile": "vitest run tests/local/javaDynamicProofSpike.test.ts -t \"mutant compile failure\" --pool=forks --poolOptions.forks.maxForks=1",
|
|
73
|
+
"test:spike:java:reject:runtime": "vitest run tests/local/javaDynamicProofSpike.test.ts -t \"runtime exception\" --pool=forks --poolOptions.forks.maxForks=1",
|
|
74
|
+
"test:spike:java:reject:baseline": "vitest run tests/local/javaDynamicProofSpike.test.ts -t \"setup precondition|red baseline|manually-thrown\" --pool=forks --poolOptions.forks.maxForks=1",
|
|
75
|
+
"test:spike:java:reject:shape": "vitest run tests/local/javaDynamicProofSpike.test.ts -t \"nested/multiple-return|type-variable\" --pool=forks --poolOptions.forks.maxForks=1",
|
|
76
|
+
"test:spike:python": "vitest run tests/local/pythonDynamicProofSpike.test.ts --pool=forks --poolOptions.forks.maxForks=1",
|
|
77
|
+
"test:integration": "npm run test:integration:go && npm run test:integration:java:1 && npm run test:integration:java:2 && npm run test:integration:java:3",
|
|
78
|
+
"test:integration:go": "npm run test:integration:go:mint && npm run test:integration:go:auto",
|
|
79
|
+
"test:integration:go:mint": "npm run test:integration:go:mint:fast && npm run test:integration:go:mint:positive && npm run test:integration:go:mint:survives && npm run test:integration:go:mint:loop",
|
|
80
|
+
"test:integration:go:mint:fast": "vitest run tests/local/goProveIntegration.test.ts -t \"^(?!.*(positive: a free-function|no-false-Proven|mints the same Proven)).*\" --pool=forks --poolOptions.forks.maxForks=1",
|
|
81
|
+
"test:integration:go:mint:positive": "vitest run tests/local/goProveIntegration.test.ts -t \"positive: a free-function\" --pool=forks --poolOptions.forks.maxForks=1",
|
|
82
|
+
"test:integration:go:mint:survives": "vitest run tests/local/goProveIntegration.test.ts -t \"no-false-Proven\" --pool=forks --poolOptions.forks.maxForks=1",
|
|
83
|
+
"test:integration:go:mint:loop": "vitest run tests/local/goProveIntegration.test.ts -t \"mints the same Proven\" --pool=forks --poolOptions.forks.maxForks=1",
|
|
84
|
+
"test:integration:go:auto": "vitest run tests/local/autoProveGo.test.ts --pool=forks --poolOptions.forks.maxForks=1",
|
|
85
|
+
"test:integration:go:auto:slow": "OPRO_SLOW_GO_AUTO=1 vitest run tests/local/autoProveGo.test.ts --pool=forks --poolOptions.forks.maxForks=1",
|
|
86
|
+
"test:integration:java:1": "vitest run tests/local/javaProveIntegration.test.ts -t \"^(?!.*(no-false-Proven|mints the same Proven)).*\" --pool=forks --poolOptions.forks.maxForks=1",
|
|
87
|
+
"test:integration:java:2": "vitest run tests/local/javaProveIntegration.test.ts -t \"no-false-Proven|mints the same Proven\" --pool=forks --poolOptions.forks.maxForks=1",
|
|
88
|
+
"test:integration:java:3": "vitest run tests/local/autoProveJava.test.ts --pool=forks --poolOptions.forks.maxForks=1",
|
|
57
89
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
58
90
|
"smoke:gap-fill": "npm run build && node scripts/smoke-gap-fill-loop.mjs",
|
|
59
91
|
"smoke:generate-prove": "npm run build && node scripts/smoke-generate-prove-e2e.mjs",
|
|
92
|
+
"smoke:generate-prove-v5": "npm run build && node scripts/smoke-generate-prove-v5.mjs",
|
|
60
93
|
"smoke:db-sqljs": "npm run build && node scripts/smoke-db-sqljs-prove.mjs",
|
|
61
94
|
"prepublishOnly": "npm run build && npm test"
|
|
62
95
|
},
|