oc-pilot 0.89.0 → 0.91.0
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/CHANGELOG.md +16 -0
- package/README.md +10 -6
- package/README.ru.md +9 -5
- package/dist/cli.js +9 -1
- package/dist/cli.js.map +1 -1
- package/dist/cli.test.js +50 -0
- package/dist/cli.test.js.map +1 -1
- package/dist/commands/alien-dna.js +73 -0
- package/dist/commands/alien-dna.js.map +1 -0
- package/dist/commands/hyper-chamber.js +96 -0
- package/dist/commands/hyper-chamber.js.map +1 -0
- package/dist/core/alien-dna.js +310 -0
- package/dist/core/alien-dna.js.map +1 -0
- package/dist/core/alien-dna.test.js +117 -0
- package/dist/core/alien-dna.test.js.map +1 -0
- package/dist/core/hyper-chamber.js +483 -0
- package/dist/core/hyper-chamber.js.map +1 -0
- package/dist/core/hyper-chamber.test.js +105 -0
- package/dist/core/hyper-chamber.test.js.map +1 -0
- package/dist/mcp-prompts.test.js +2 -0
- package/dist/mcp-prompts.test.js.map +1 -1
- package/dist/mcp.js +100 -0
- package/dist/mcp.js.map +1 -1
- package/dist/mcp.test.js +10 -0
- package/dist/mcp.test.js.map +1 -1
- package/dist/skills.test.js +2 -0
- package/dist/skills.test.js.map +1 -1
- package/dist/version.js +1 -1
- package/docs/integrations.md +5 -5
- package/package.json +1 -1
- package/skills/agent-self-review/SKILL.md +1 -1
- package/skills/commit-discipline/SKILL.md +1 -1
- package/skills/oc-pilot/SKILL.md +4 -0
- package/skills/secure-diff-gate/SKILL.md +1 -1
- package/skills/stack-review-packs/SKILL.md +1 -1
- package/skills/test-failure-triage/SKILL.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.91.0
|
|
4
|
+
|
|
5
|
+
- Новая команда `hyper-chamber run <file>`: запускает самодостаточный JS/ESM в `node:vm` и проживает до года симулированных суток за короткий реальный бюджет.
|
|
6
|
+
- `Date.now` подменяется, таймеры ускоряются, GC вызывается принудительно, heap снимается через `node:v8`; импорт, `require`, `fetch` и `process.exit` блокируются.
|
|
7
|
+
- Устойчивый рост памяти даёт `[MEMORY LEAK DETECTED]: AI code survives Day 1, but crashes on Day N of simulated uptime.` и код 1; чистый прогон — эвристика, а не доказательство.
|
|
8
|
+
- Файл должен экспортировать `run`, `tick`, `main` или `default`; обычный скрипт оборачивается в функцию. MCP-инструмент `hyper_chamber` и промпт `stress-the-chamber`.
|
|
9
|
+
- 6 тестов ядра и CLI-тест; всего 684 теста; версия 0.91.0.
|
|
10
|
+
|
|
11
|
+
## 0.90.0
|
|
12
|
+
|
|
13
|
+
- Новая команда `alien-dna`: сравнивает добавленные строки diff с архитектурной ДНК репозитория на HEAD.
|
|
14
|
+
- ДНК считает 12 паттернов: Singleton, Proxy, dynamic RegExp, eval/new Function, globalThis, наследование, декораторы, Worker, EventEmitter, динамический import, синхронный I/O и мутацию prototype.
|
|
15
|
+
- Если паттерн впервые появляется в diff (0% вхождений в базе), команда печатает `[ALIEN DNA DETECTED]: ... Architecture drift blocked.` и завершается кодом 1.
|
|
16
|
+
- MCP-инструмент `alien_dna` (read-only, офлайн) и промпт `check-alien-dna`; CLI-флаги `--diff`, `--stdin`, `--staged`, `--unstaged`, `--base`, `--include-untracked`.
|
|
17
|
+
- 5 тестов ядра и CLI-тест; всего 677 тестов; версия 0.90.0.
|
|
18
|
+
|
|
3
19
|
## 0.89.0
|
|
4
20
|
|
|
5
21
|
- Новая команда `honeypot`: `deploy` минирует репозиторий приманками (`.env.backup` с фейковыми ключами, `bypassAuth`, `legacyDbDrop`), `status` показывает манифест, `remove` удаляет только файлы с маркером.
|
package/README.md
CHANGED
|
@@ -944,7 +944,7 @@ Environment variables: `OC_PILOT_ENGINE`, `OC_PILOT_BASE_URL`, `OC_PILOT_API_KEY
|
|
|
944
944
|
|
|
945
945
|
Besides tools, the server exposes read-only MCP resources: `oc-pilot://config` (resolved configuration), `oc-pilot://rules` (project rules with secrets redacted), `oc-pilot://prompt/en` and `oc-pilot://prompt/ru` (the built-in system prompts), and `oc-pilot://version`. `oc-pilot://slop` returns the Slop Index as JSON without calling a model. Resource templates cover live data: `oc-pilot://diff/{mode}` (staged/unstaged/head diff, secrets redacted), `oc-pilot://scan/{mode}` (offline secret scan as JSON) and `oc-pilot://file/{+path}` (any project file up to 2 MB with detected secrets redacted). Hosts can list them with `resources/list` and `resources/templates/list`.
|
|
946
946
|
|
|
947
|
-
Tools: `review`, `invariants`, `test_fix`, `fix`, `test_gen`, `docgen`, `custom`, `scan`, `commit`, `stats`, `slop`, `mutate`, `fuzz`, `bankruptcy`, `query_ast`, `sandbox`, `hivemind_status`, `flaky`, `impact`, `deps`, `coverage`, `reviewers`, `test_guard`, `env_sync`, `mock_leak`, `ecosystem_verify`, `pack`, `pack_hologram`, `zoom_symbol`, `contract_drift`, `anti_regression`, `boundaries`, `test_plan`, `compliance_verify`, `brag`, `battle`, `cleanup`, `arch_diff`, `roast`, `cinema`, `bounty`, `autopsy`, `echo`, `sast`, `authz`, `preflight`, `honeypot`, `ready`, `receipt_verify`. `scan` accepts `all: true` to sweep the whole repository instead of the diff. `slop` runs the offline Slop Index and accepts `since`, `since_days`, `limit`, `exclude` and `no_blame`. `mutate` runs mutation testing on the changed code, accepts `command`, `max_mutants` and `min_score`, and returns the score plus every surviving mutant; a score below `min_score` is a normal result with exit code 1. `flaky` runs the test command several times and compares per-test results, accepting `runs`, `command`, `fail_on_flaky`, `shuffle` and `seed`; it never edits source files itself but does run the project's tests. `impact` lists the declarations the diff changed or removed and every untouched file that still mentions them, accepting the same source flags; the search is textual, so comments and strings can match. `deps` audits declared, imported and locked dependencies, explains a chain with `why`, adds OSV vulnerabilities and licenses with `audit`, and can rewrite `package.json` with `fix` or emit a CycloneDX SBOM; `fix` and `sbom` write files. `coverage` compares changed lines with a local lcov, Istanbul, Cobertura or Go coverage report and returns uncovered lines, missing files and a gate on `fail_under` or `max_uncovered`. `reviewers` ranks the authors who touched the changed files, lists CODEOWNERS owners and accepts `limit`, `depth` and `exclude`; it uses git history only. `test_guard` runs the offline anti-cheating check on the diff: skipped, focused or deleted tests, removed or commented assertions, raised timeouts, strict matchers replaced by existence checks, `@ts-ignore` and empty catch blocks; with `fail_on_weakening` a finding returns exit code 1. `env_sync` compares the environment variables added by the diff (`process.env`, `import.meta.env`, `Deno.env`, `Bun.env`) with the local `.env` files and `.env.example`/`.sample`/`.template`: missing definitions fail with `fail_on_missing`, and defined but undocumented variables warn. `mock_leak` scans added production code for forgotten stubs and hardcode: local paths, test tokens, `if (true)`/`if (false)`, mock/fake/stub identifiers, mock comments and localhost URLs; `fail_on_leak` returns exit code 1 at the chosen severity. `ecosystem_verify` checks that named imports from the changed files exist in the installed package entry or its `.d.ts`, and flags packages that are neither installed nor declared; with `online` it also checks the age and weekly downloads of newly added npm packages, and `fail_on_issue` returns exit code 1 at the chosen severity. `pack` builds a compact context bundle for a task: project rules, changed-file signatures, related references and an optional test log, capped by `budget` characters; it never edits files. `contract_drift` compares changed TypeScript interfaces, Zod objects, Prisma models, Pydantic models and JSON Schema with the previous version, flags removed or newly required fields and type changes, and reports untouched consumers that still use a removed field; `fail_on_drift` returns exit code 1 at the chosen severity. `anti_regression` compares the lines added by the diff with lines a human explicitly deleted in git history, cites the deleting commit and flags re-added code or imports; `fail_on_regression` returns exit code 1. `boundaries` checks added imports against `.oc-pilot/architecture.json` layer rules, reports the file, line, import and rule reason, and `fail_on_violation` returns exit code 1 when a layer boundary is crossed. `test_plan` selects the test files affected by the diff from a static import graph: changed tests, direct and transitive importers, naming matches and symbol references, with uncovered changed files reported and an optional `fail_on_uncovered` gate. `compliance_verify` checks a signed audit manifest for the current commit: SHA-256, commit, previous-manifest hash chain and optional Ed25519 signature; a missing, edited or broken manifest is a normal result with exit code 1. `brag` builds a self-contained HTML or SVG session report from stats, git history, the last review and the receipt; it uses inline assets only, never calls a model or the network, and `no_paths` hides file locations. `test_gen` asks the model for tests that cover the changed code; with `apply` it writes test files, runs the suite and reverts failing tests unless `keep_failing`, while `coverage` narrows generation to uncovered changed lines and `from_slop` picks untested files. `cleanup` builds an offline cleanup plan from dependency issues, the Slop Index, environment variables and weakened tests; `apply` performs only safe dependency fixes and needs `--allow-write`. `arch_diff` renders a Mermaid diagram of the internal imports the diff added and removed: green edges are new dependencies, red dashed edges are removed ones, and `fail_on_removed` returns exit code 1 when a dependency disappears. `roast` turns the diff into a technically grounded comedy roast in a chosen persona (linus, ramsay, corporate or default), cites file:line for every joke and ends with one real fix; it is model-backed and never edits files. `cinema` builds a terminal timelapse of the session from commits, runs, API calls, the last review and the receipt: a self-contained HTML player or an asciinema v2 cast, with no network, external assets or model call; `no_paths` hides subjects and finding locations. `bounty` scores every file from SAST findings, duplicated blocks, dead exports, aged TODOs and churn without tests, then renders an ASCII WANTED poster with the worst file and its reasons; deterministic and offline. `autopsy` performs a post-mortem on a commit: diff stats, SAST on added lines, weakened tests, mock leaks, ranked suspects and a before/after timeline; `fail_on_risk` returns exit 1 for a dangerous verdict. `echo` builds self-contained SVG badges from local stats, git history and the receipt (commits, agent runs, API calls, cache hits, findings and test status); `submit` sends only the nickname, window and aggregate numbers to an explicit `endpoint`, never paths, diffs or secrets, and there is no network by default. `sast` runs the deterministic static analysis over the change or over explicit `paths` and accepts `fail_on_issue`, `ignore` and `no_suppressions`; a finding at or above the gate is a normal result with exit code 1. `authz` checks route authorization over the change or explicit `paths` and accepts `fail_on_issue`, `ignore`, `public` and `no_suppressions`; a route finding at or above the gate is also a normal result with exit code 1. `preflight` returns one offline verdict over the planned change and accepts the same source flags (`diff`, `base`, `staged`, `unstaged`, `include_untracked`), plus `since`, `max_delta`, `fail_on_issue`, `no_secret_scan`, `no_sast`, `no_authz`, `no_deps`, `no_tests` and `no_slop`; a failed check is a normal result with `status: "fail"` and exit code 1, so the agent sees the failing check instead of a tool error. `ready` returns the offline agent readiness score 0-100 and accepts `fail_under`; a score below the threshold is also a normal result with exit code 1. `receipt_verify` recomputes the SHA-256 hash of the receipt, compares the recorded commit with HEAD and reports `ok`, `hashOk` and `stale`; a missing, edited or stale receipt is a normal result with `ok: false` and exit code 1, so an agent can see why the proof failed. The `fix` tool accepts `from_sast` and `from_authz` to repair security findings and rescan; the result then carries `sast` or `authz` with `{before, after, remaining}`. The server is read-only by default; start it with `--allow-write` to permit `fix` with `apply: true`, `commit` with `apply: true`, `test_fix` with a command, `stats` with `clear: true` and `mutate`, which rewrites source files temporarily. `test_gen` with `apply: true` also needs `--allow-write`. The `fix` result carries the unified `patch`, its `files` and `patchStats` (`additions`, `deletions`, `hunks`, `bytes`); patches over 200 000 characters are cut and marked with `patchTruncated` and `patchBytes`, so a host can show or apply the change without parsing the diff again.
|
|
947
|
+
Tools: `review`, `invariants`, `test_fix`, `fix`, `test_gen`, `docgen`, `custom`, `scan`, `commit`, `stats`, `slop`, `mutate`, `fuzz`, `bankruptcy`, `query_ast`, `sandbox`, `hivemind_status`, `flaky`, `impact`, `deps`, `coverage`, `reviewers`, `test_guard`, `env_sync`, `mock_leak`, `ecosystem_verify`, `pack`, `pack_hologram`, `zoom_symbol`, `contract_drift`, `anti_regression`, `boundaries`, `test_plan`, `compliance_verify`, `brag`, `battle`, `cleanup`, `arch_diff`, `roast`, `cinema`, `bounty`, `autopsy`, `echo`, `sast`, `authz`, `preflight`, `honeypot`, `alien_dna`, `hyper_chamber`, `ready`, `receipt_verify`. `scan` accepts `all: true` to sweep the whole repository instead of the diff. `slop` runs the offline Slop Index and accepts `since`, `since_days`, `limit`, `exclude` and `no_blame`. `mutate` runs mutation testing on the changed code, accepts `command`, `max_mutants` and `min_score`, and returns the score plus every surviving mutant; a score below `min_score` is a normal result with exit code 1. `flaky` runs the test command several times and compares per-test results, accepting `runs`, `command`, `fail_on_flaky`, `shuffle` and `seed`; it never edits source files itself but does run the project's tests. `impact` lists the declarations the diff changed or removed and every untouched file that still mentions them, accepting the same source flags; the search is textual, so comments and strings can match. `deps` audits declared, imported and locked dependencies, explains a chain with `why`, adds OSV vulnerabilities and licenses with `audit`, and can rewrite `package.json` with `fix` or emit a CycloneDX SBOM; `fix` and `sbom` write files. `coverage` compares changed lines with a local lcov, Istanbul, Cobertura or Go coverage report and returns uncovered lines, missing files and a gate on `fail_under` or `max_uncovered`. `reviewers` ranks the authors who touched the changed files, lists CODEOWNERS owners and accepts `limit`, `depth` and `exclude`; it uses git history only. `test_guard` runs the offline anti-cheating check on the diff: skipped, focused or deleted tests, removed or commented assertions, raised timeouts, strict matchers replaced by existence checks, `@ts-ignore` and empty catch blocks; with `fail_on_weakening` a finding returns exit code 1. `env_sync` compares the environment variables added by the diff (`process.env`, `import.meta.env`, `Deno.env`, `Bun.env`) with the local `.env` files and `.env.example`/`.sample`/`.template`: missing definitions fail with `fail_on_missing`, and defined but undocumented variables warn. `mock_leak` scans added production code for forgotten stubs and hardcode: local paths, test tokens, `if (true)`/`if (false)`, mock/fake/stub identifiers, mock comments and localhost URLs; `fail_on_leak` returns exit code 1 at the chosen severity. `ecosystem_verify` checks that named imports from the changed files exist in the installed package entry or its `.d.ts`, and flags packages that are neither installed nor declared; with `online` it also checks the age and weekly downloads of newly added npm packages, and `fail_on_issue` returns exit code 1 at the chosen severity. `pack` builds a compact context bundle for a task: project rules, changed-file signatures, related references and an optional test log, capped by `budget` characters; it never edits files. `contract_drift` compares changed TypeScript interfaces, Zod objects, Prisma models, Pydantic models and JSON Schema with the previous version, flags removed or newly required fields and type changes, and reports untouched consumers that still use a removed field; `fail_on_drift` returns exit code 1 at the chosen severity. `anti_regression` compares the lines added by the diff with lines a human explicitly deleted in git history, cites the deleting commit and flags re-added code or imports; `fail_on_regression` returns exit code 1. `boundaries` checks added imports against `.oc-pilot/architecture.json` layer rules, reports the file, line, import and rule reason, and `fail_on_violation` returns exit code 1 when a layer boundary is crossed. `test_plan` selects the test files affected by the diff from a static import graph: changed tests, direct and transitive importers, naming matches and symbol references, with uncovered changed files reported and an optional `fail_on_uncovered` gate. `compliance_verify` checks a signed audit manifest for the current commit: SHA-256, commit, previous-manifest hash chain and optional Ed25519 signature; a missing, edited or broken manifest is a normal result with exit code 1. `brag` builds a self-contained HTML or SVG session report from stats, git history, the last review and the receipt; it uses inline assets only, never calls a model or the network, and `no_paths` hides file locations. `test_gen` asks the model for tests that cover the changed code; with `apply` it writes test files, runs the suite and reverts failing tests unless `keep_failing`, while `coverage` narrows generation to uncovered changed lines and `from_slop` picks untested files. `cleanup` builds an offline cleanup plan from dependency issues, the Slop Index, environment variables and weakened tests; `apply` performs only safe dependency fixes and needs `--allow-write`. `arch_diff` renders a Mermaid diagram of the internal imports the diff added and removed: green edges are new dependencies, red dashed edges are removed ones, and `fail_on_removed` returns exit code 1 when a dependency disappears. `roast` turns the diff into a technically grounded comedy roast in a chosen persona (linus, ramsay, corporate or default), cites file:line for every joke and ends with one real fix; it is model-backed and never edits files. `cinema` builds a terminal timelapse of the session from commits, runs, API calls, the last review and the receipt: a self-contained HTML player or an asciinema v2 cast, with no network, external assets or model call; `no_paths` hides subjects and finding locations. `bounty` scores every file from SAST findings, duplicated blocks, dead exports, aged TODOs and churn without tests, then renders an ASCII WANTED poster with the worst file and its reasons; deterministic and offline. `autopsy` performs a post-mortem on a commit: diff stats, SAST on added lines, weakened tests, mock leaks, ranked suspects and a before/after timeline; `fail_on_risk` returns exit 1 for a dangerous verdict. `echo` builds self-contained SVG badges from local stats, git history and the receipt (commits, agent runs, API calls, cache hits, findings and test status); `submit` sends only the nickname, window and aggregate numbers to an explicit `endpoint`, never paths, diffs or secrets, and there is no network by default. `sast` runs the deterministic static analysis over the change or over explicit `paths` and accepts `fail_on_issue`, `ignore` and `no_suppressions`; a finding at or above the gate is a normal result with exit code 1. `authz` checks route authorization over the change or explicit `paths` and accepts `fail_on_issue`, `ignore`, `public` and `no_suppressions`; a route finding at or above the gate is also a normal result with exit code 1. `preflight` returns one offline verdict over the planned change and accepts the same source flags (`diff`, `base`, `staged`, `unstaged`, `include_untracked`), plus `since`, `max_delta`, `fail_on_issue`, `no_secret_scan`, `no_sast`, `no_authz`, `no_deps`, `no_tests` and `no_slop`; a failed check is a normal result with `status: "fail"` and exit code 1, so the agent sees the failing check instead of a tool error. `ready` returns the offline agent readiness score 0-100 and accepts `fail_under`; a score below the threshold is also a normal result with exit code 1. `receipt_verify` recomputes the SHA-256 hash of the receipt, compares the recorded commit with HEAD and reports `ok`, `hashOk` and `stale`; a missing, edited or stale receipt is a normal result with `ok: false` and exit code 1, so an agent can see why the proof failed. The `fix` tool accepts `from_sast` and `from_authz` to repair security findings and rescan; the result then carries `sast` or `authz` with `{before, after, remaining}`. The server is read-only by default; start it with `--allow-write` to permit `fix` with `apply: true`, `commit` with `apply: true`, `test_fix` with a command, `stats` with `clear: true` and `mutate`, which rewrites source files temporarily. `test_gen` with `apply: true` also needs `--allow-write`. The `fix` result carries the unified `patch`, its `files` and `patchStats` (`additions`, `deletions`, `hunks`, `bytes`); patches over 200 000 characters are cut and marked with `patchTruncated` and `patchBytes`, so a host can show or apply the change without parsing the diff again.
|
|
948
948
|
|
|
949
949
|
`invariants` checks the diff against `.oc-pilot/invariants.md`
|
|
950
950
|
|
|
@@ -954,6 +954,10 @@ Tools: `review`, `invariants`, `test_fix`, `fix`, `test_gen`, `docgen`, `custom`
|
|
|
954
954
|
|
|
955
955
|
`honeypot deploy` plants decoy files — `.env.backup` with fake AWS keys, `src/utils/legacy/bypassAuth.ts` with a trapped `bypassAuth`, and `src/legacy/legacy_db_drop.ts` — and records them in `.oc-pilot/honeypot.json`. `preflight` fails with `[HONEYPOT TRIGGERED]: Agent attempted to bypass authentication using a trapped function. Session terminated. Trust score reduced.` when the diff imports, reads or changes a decoy. `honeypot status` lists the traps and `honeypot remove` deletes only marker files; the decoys are not real secrets.
|
|
956
956
|
|
|
957
|
+
`alien-dna` compares added diff lines with the repository architecture DNA at HEAD and fails with `[ALIEN DNA DETECTED]` when the change introduces a pattern that never appeared before (0% occurrence): Singleton, Proxy, dynamic RegExp, eval, global state, inheritance, decorators, Worker, EventEmitter, dynamic import, sync I/O or prototype mutation. The command is offline and deterministic, reads the baseline with git and never calls a model.
|
|
958
|
+
|
|
959
|
+
`hyper-chamber run <file>` ages one self-contained JavaScript or ESM file in `node:vm`: it fakes `Date.now`, accelerates timers, forces GC and samples the heap through `node:v8` while simulating up to a year of uptime in a short real budget. Sustained growth returns `[MEMORY LEAK DETECTED]: AI code survives Day 1, but crashes on Day N of simulated uptime.` The file must export `run`, `tick`, `main` or `default`; a plain script is wrapped and re-executed. This is a deterministic heuristic, not a proof, and native code is not supported.
|
|
960
|
+
|
|
957
961
|
`query` runs a chainable AQL query against a lightweight code graph: `find(File|Function|Class|Import|CallExpression).where(field, value).sort(field).limit(n).select(fields...).count()`. It is not SQL and not a full TypeScript AST; it is a fast textual graph that the agent can probe before editing. MCP exposes it as `query_ast`.
|
|
958
962
|
|
|
959
963
|
`bankruptcy` forecasts technical debt from commit history: it scores each commit by weakened tests, SAST high/medium findings, added TODOs, churn and a slop proxy, smooths the daily series with a 14-day moving average, drops outliers and fits a linear regression. The output is the current score, slope, forecast date and a self-contained SVG chart; fewer than 10 commits returns `[INSUFFICIENT DATA: Need at least 10 commits to compute Slop Velocity]`. `--explain` prints the exact weights, where test weakening (0.35) and security (0.30) dominate.
|
|
@@ -964,9 +968,9 @@ Tools: `review`, `invariants`, `test_fix`, `fix`, `test_gen`, `docgen`, `custom`
|
|
|
964
968
|
|
|
965
969
|
`pack --hologram` builds a layered context instead of dumping the repository: LOD 0 keeps diff files complete, LOD 1 hides function bodies behind `body hidden` markers with `EFFECTS` hints and adds matching tests, LOD 2 lists export names only. Unbalanced braces fall back to full text with `[Hologram: parse bailout]`, and the final Markdown is secret-scanned. `zoom-symbol <file> <symbol>` returns one hidden body on demand; `pack_hologram` and `zoom_symbol` expose the same flow over MCP.
|
|
966
970
|
|
|
967
|
-
Every tool accepts `max_findings` (default 50; a capped result also carries `truncated` and `totalFindings`) and `verbosity` (`full` returns the JSON payload, `compact` returns a one-line summary and keeps the same data in `structuredContent`). When a client sends `_meta.progressToken`, the server emits `notifications/progress`; after `logging/setLevel` it also emits `notifications/message` per call. `--max-calls <n>` (or `OC_PILOT_MCP_MAX_CALLS`) caps model-backed calls per session, `0` disables the cap, and the offline tools `scan`, `fuzz`, `bankruptcy`, `query_ast`, `sandbox`, `hivemind_status`, `stats`, `slop`, `flaky`, `impact`, `deps`, `coverage`, `reviewers`, `test_guard`, `env_sync`, `mock_leak`, `ecosystem_verify`, `pack`, `pack_hologram`, `zoom_symbol`, `contract_drift`, `anti_regression`, `boundaries`, `test_plan`, `compliance_verify`, `brag`, `cleanup`, `arch_diff`, `roast`, `cinema`, `bounty`, `autopsy`, `echo`, `sast`, `authz`, `preflight`, `honeypot`, `ready` and `receipt_verify` keep working after the budget is exhausted.
|
|
971
|
+
Every tool accepts `max_findings` (default 50; a capped result also carries `truncated` and `totalFindings`) and `verbosity` (`full` returns the JSON payload, `compact` returns a one-line summary and keeps the same data in `structuredContent`). When a client sends `_meta.progressToken`, the server emits `notifications/progress`; after `logging/setLevel` it also emits `notifications/message` per call. `--max-calls <n>` (or `OC_PILOT_MCP_MAX_CALLS`) caps model-backed calls per session, `0` disables the cap, and the offline tools `scan`, `fuzz`, `bankruptcy`, `query_ast`, `sandbox`, `hivemind_status`, `stats`, `slop`, `flaky`, `impact`, `deps`, `coverage`, `reviewers`, `test_guard`, `env_sync`, `mock_leak`, `ecosystem_verify`, `pack`, `pack_hologram`, `zoom_symbol`, `contract_drift`, `anti_regression`, `boundaries`, `test_plan`, `compliance_verify`, `brag`, `cleanup`, `arch_diff`, `roast`, `cinema`, `bounty`, `autopsy`, `echo`, `sast`, `authz`, `preflight`, `honeypot`, `alien_dna`, `hyper_chamber`, `ready` and `receipt_verify` keep working after the budget is exhausted.
|
|
968
972
|
|
|
969
|
-
Ready-made prompts are advertised through `prompts/list` and rendered by `prompts/get`, so a host can offer them in its own menu: `review-my-diff` (optional `context`), `fix-failing-tests` (optional `log`), `pre-commit-gate` (scan, review and commit in one pass), `secure-change` (security-focused review), `slop-check` (entropy check for vibe-coded changes) and `preflight-before-commit` (run the offline gate, fix the cheapest failing check, rerun until the verdict is pass), `deploy-honeypot` (deploy decoy files, run preflight, stop on `[HONEYPOT TRIGGERED]` and remove the decoys when done), `compile-hologram` (build a layered hologram, keep LOD 0 complete, treat hidden LOD 1 bodies as unknown and call `zoom_symbol` before reasoning about them), `check-invariants` (check the change against `.oc-pilot/invariants.md`, explain every violation with file:line and never hide a CRITICAL rule), `fuzz-the-diff` (call the new exports with hostile inputs in isolated processes, fix every crash and never count blocked targets as tested), `forecast-tech-debt` (read the tech-debt trend, explain the score and weights, and use the forecast date to plan repayment instead of gaming TODO counts), `query-the-ast` (locate calls, functions, classes and imports with AQL, verify each hit in the source and use the evidence to plan a refactor), `sandbox-script` (run a generated JS/ESM file in node:vm with imports and side effects blocked, then report its output and exact status), `join-the-swarm` (check the hivemind identity and trusted peers, then exchange only diffs, AST and LLM requests over the encrypted mesh; never send executable commands), `get-ready` (score the repository, fix the safe gaps, prove the result with a receipt and rerun until the score is at least 85), `fix-security` (repair SAST or route-authorization findings and rescan until no high findings remain), `stabilize-flaky` (reproduce a flaky test with repeated and shuffled runs and make the smallest deterministic fix), `check-impact` (find external references to changed declarations, update what the change broke and rerun until no stale references remain), `triage-deps` (audit dependencies and OSV vulnerabilities, fix the cheapest issue first and rerun without hiding findings), `cover-changed-lines` (add tests for the changed lines that no test executed and rerun the same gate), `generate-tests` (generate tests for the change or its uncovered lines, apply them, run the suite and iterate until green), `pick-reviewers` (choose the smallest set of reviewers who know the changed files, with evidence from history and CODEOWNERS), `guard-tests` (find tests the change skipped, weakened or deleted, restore their protection and rerun until the guard passes), `sync-env` (compare the environment variables added by the change with `.env` and `.env.example`, add the missing definitions and document them without inventing secrets), `remove-mocks` (find forgotten mocks, local paths, test tokens and always-true conditions in production code, replace them with the real implementation and rerun until the leak report is clean), `verify-ecosystem` (check that imports exist in installed packages and that new npm packages are not brand new with a handful of downloads, and do not install a suspicious package without a human decision), `pack-context` (build a compact task bundle of rules, signatures, references and test log and use it instead of dumping whole files), `check-contracts` (find removed or narrowed fields in changed types and schemas, update every remaining consumer without silently breaking callers), `guard-regressions` (compare added lines with code a human deleted, inspect the deleting commit and do not re-add it without an explicit decision), `respect-boundaries` (check added imports against the layer rules, fix the dependency direction and rerun until no boundary is crossed), `plan-tests` (run the affected-test plan, run only those tests, add a test for every uncovered changed file and rerun without widening the strategy), `prove-compliance` (verify the signed audit manifest for HEAD, check the hash chain and signature, and never claim completion while the manifest is invalid), `cleanup-plan` (build an offline cleanup plan and apply only safe dependency fixes), `show-arch-diff` (render a Mermaid diagram of the internal imports the change adds and removes), `roast-my-code` (roast the diff in a chosen persona, cite file:line and end with one real fix), `play-session` (build a terminal timelapse of the session as a self-contained HTML player or an asciinema cast), `wanted-poster` (post a WANTED poster for the worst file, explain its reasons and the highest-weight fix, and rerun after the fix), `autopsy-commit` (run a post-mortem on a commit, list its signals, rank the suspects, read the before/after timeline and propose the smallest fix and the test that would have caught it), `share-progress` (build local SVG badges and, only with explicit approval, submit the anonymous aggregate payload to the given endpoint), `prove-tests` (run mutation testing on the change and strengthen the tests until the mutation score is at least 80) and `prove-done` (verify the receipt for HEAD, create a fresh one when it is missing or stale, and refuse to claim completion until `ok` is true and the tests in the receipt passed).
|
|
973
|
+
Ready-made prompts are advertised through `prompts/list` and rendered by `prompts/get`, so a host can offer them in its own menu: `review-my-diff` (optional `context`), `fix-failing-tests` (optional `log`), `pre-commit-gate` (scan, review and commit in one pass), `secure-change` (security-focused review), `slop-check` (entropy check for vibe-coded changes) and `preflight-before-commit` (run the offline gate, fix the cheapest failing check, rerun until the verdict is pass), `deploy-honeypot` (deploy decoy files, run preflight, stop on `[HONEYPOT TRIGGERED]` and remove the decoys when done), `check-alien-dna` (compare the diff with the architecture DNA at HEAD, stop on `[ALIEN DNA DETECTED]` and ask before adopting a new pattern), `stress-the-chamber` (age a generated JS/ESM file in node:vm, simulate a year of uptime, stop on `[MEMORY LEAK DETECTED]` and treat a clean run as a heuristic rather than proof), `compile-hologram` (build a layered hologram, keep LOD 0 complete, treat hidden LOD 1 bodies as unknown and call `zoom_symbol` before reasoning about them), `check-invariants` (check the change against `.oc-pilot/invariants.md`, explain every violation with file:line and never hide a CRITICAL rule), `fuzz-the-diff` (call the new exports with hostile inputs in isolated processes, fix every crash and never count blocked targets as tested), `forecast-tech-debt` (read the tech-debt trend, explain the score and weights, and use the forecast date to plan repayment instead of gaming TODO counts), `query-the-ast` (locate calls, functions, classes and imports with AQL, verify each hit in the source and use the evidence to plan a refactor), `sandbox-script` (run a generated JS/ESM file in node:vm with imports and side effects blocked, then report its output and exact status), `join-the-swarm` (check the hivemind identity and trusted peers, then exchange only diffs, AST and LLM requests over the encrypted mesh; never send executable commands), `get-ready` (score the repository, fix the safe gaps, prove the result with a receipt and rerun until the score is at least 85), `fix-security` (repair SAST or route-authorization findings and rescan until no high findings remain), `stabilize-flaky` (reproduce a flaky test with repeated and shuffled runs and make the smallest deterministic fix), `check-impact` (find external references to changed declarations, update what the change broke and rerun until no stale references remain), `triage-deps` (audit dependencies and OSV vulnerabilities, fix the cheapest issue first and rerun without hiding findings), `cover-changed-lines` (add tests for the changed lines that no test executed and rerun the same gate), `generate-tests` (generate tests for the change or its uncovered lines, apply them, run the suite and iterate until green), `pick-reviewers` (choose the smallest set of reviewers who know the changed files, with evidence from history and CODEOWNERS), `guard-tests` (find tests the change skipped, weakened or deleted, restore their protection and rerun until the guard passes), `sync-env` (compare the environment variables added by the change with `.env` and `.env.example`, add the missing definitions and document them without inventing secrets), `remove-mocks` (find forgotten mocks, local paths, test tokens and always-true conditions in production code, replace them with the real implementation and rerun until the leak report is clean), `verify-ecosystem` (check that imports exist in installed packages and that new npm packages are not brand new with a handful of downloads, and do not install a suspicious package without a human decision), `pack-context` (build a compact task bundle of rules, signatures, references and test log and use it instead of dumping whole files), `check-contracts` (find removed or narrowed fields in changed types and schemas, update every remaining consumer without silently breaking callers), `guard-regressions` (compare added lines with code a human deleted, inspect the deleting commit and do not re-add it without an explicit decision), `respect-boundaries` (check added imports against the layer rules, fix the dependency direction and rerun until no boundary is crossed), `plan-tests` (run the affected-test plan, run only those tests, add a test for every uncovered changed file and rerun without widening the strategy), `prove-compliance` (verify the signed audit manifest for HEAD, check the hash chain and signature, and never claim completion while the manifest is invalid), `cleanup-plan` (build an offline cleanup plan and apply only safe dependency fixes), `show-arch-diff` (render a Mermaid diagram of the internal imports the change adds and removes), `roast-my-code` (roast the diff in a chosen persona, cite file:line and end with one real fix), `play-session` (build a terminal timelapse of the session as a self-contained HTML player or an asciinema cast), `wanted-poster` (post a WANTED poster for the worst file, explain its reasons and the highest-weight fix, and rerun after the fix), `autopsy-commit` (run a post-mortem on a commit, list its signals, rank the suspects, read the before/after timeline and propose the smallest fix and the test that would have caught it), `share-progress` (build local SVG badges and, only with explicit approval, submit the anonymous aggregate payload to the given endpoint), `prove-tests` (run mutation testing on the change and strengthen the tests until the mutation score is at least 80) and `prove-done` (verify the receipt for HEAD, create a fresh one when it is missing or stale, and refuse to claim completion until `ok` is true and the tests in the receipt passed).
|
|
970
974
|
|
|
971
975
|
Configure a client automatically:
|
|
972
976
|
|
|
@@ -985,7 +989,7 @@ Start the server manually with an explicit project directory:
|
|
|
985
989
|
```bash
|
|
986
990
|
oc-pilot-mcp --cwd /absolute/path/to/project
|
|
987
991
|
# pinned for reproducibility:
|
|
988
|
-
npx -y oc-pilot@0.
|
|
992
|
+
npx -y oc-pilot@0.91.0 mcp --cwd /absolute/path/to/project
|
|
989
993
|
```
|
|
990
994
|
|
|
991
995
|
The `diff` and `log` tool arguments are text, not file paths. `paths` and `files` are project-relative and cannot escape the project directory. `context` is literal text, not an `@file` reference. `base` must be a git ref. `lang`, `fail_on`, `repo_context`, and `no_secret_scan` are available where the corresponding CLI command supports them.
|
|
@@ -1160,7 +1164,7 @@ jobs:
|
|
|
1160
1164
|
- uses: actions/checkout@v4
|
|
1161
1165
|
with:
|
|
1162
1166
|
fetch-depth: 0
|
|
1163
|
-
- uses: MyNameIsNikki/oc-pilot@v0.
|
|
1167
|
+
- uses: MyNameIsNikki/oc-pilot@v0.91.0
|
|
1164
1168
|
with:
|
|
1165
1169
|
command: scan
|
|
1166
1170
|
args: --base origin/${{ github.base_ref }} --fail-on-secrets
|
|
@@ -1183,7 +1187,7 @@ jobs:
|
|
|
1183
1187
|
- uses: actions/setup-node@v4
|
|
1184
1188
|
with:
|
|
1185
1189
|
node-version: 22
|
|
1186
|
-
- run: npm install -g https://github.com/MyNameIsNikki/oc-pilot/archive/refs/tags/v0.
|
|
1190
|
+
- run: npm install -g https://github.com/MyNameIsNikki/oc-pilot/archive/refs/tags/v0.91.0.tar.gz
|
|
1187
1191
|
- run: oc-pilot scan --base origin/${{ github.base_ref }}
|
|
1188
1192
|
- run: oc-pilot review --base origin/${{ github.base_ref }} --fail-on warning --fail-on-secrets --github
|
|
1189
1193
|
env:
|
package/README.ru.md
CHANGED
|
@@ -907,7 +907,7 @@ oc-pilot setup --client cursor --global
|
|
|
907
907
|
|
|
908
908
|
ZCode импортирует серверы из Claude Code, Codex, OpenCode и `.agents`, либо пишет нативный конфиг через `oc-pilot setup --client zcode`.
|
|
909
909
|
|
|
910
|
-
Инструменты: `review`, `invariants`, `test_fix`, `fix`, `test_gen`, `docgen`, `custom`, `scan`, `commit`, `stats`, `slop`, `mutate`, `fuzz`, `bankruptcy`, `query_ast`, `sandbox`, `hivemind_status`, `flaky`, `impact`, `deps`, `coverage`, `reviewers`, `test_guard`, `env_sync`, `mock_leak`, `ecosystem_verify`, `pack`, `pack_hologram`, `zoom_symbol`, `contract_drift`, `anti_regression`, `boundaries`, `test_plan`, `compliance_verify`, `brag`, `battle`, `cleanup`, `arch_diff`, `roast`, `cinema`, `bounty`, `autopsy`, `echo`, `sast`, `authz`, `preflight`, `honeypot`, `ready`, `receipt_verify`. У `scan` есть `all: true` — проверка всего репозитория, а не diff. `slop` запускает офлайн Slop Index и принимает `since`, `since_days`, `limit`, `exclude` и `no_blame`. `mutate` прогоняет мутационное тестирование по изменённому коду, принимает `command`, `max_mutants` и `min_score` и возвращает оценку и всех выживших мутантов; оценка ниже `min_score` — обычный результат с кодом 1. `flaky` несколько раз запускает тестовую команду и сравнивает результаты отдельных тестов, принимая `runs`, `command`, `fail_on_flaky`, `shuffle` и `seed`; сам он файлы не меняет, но запускает тесты проекта. `impact` показывает, какие объявления diff изменил или удалил и в каких нетронутых файлах эти имена ещё встречаются; принимает те же флаги источника, а поиск текстовый, поэтому совпадения в комментариях и строках возможны. `deps` проверяет объявленные, импортируемые и залоченные зависимости, `why` объясняет цепочку, `audit` добавляет уязвимости OSV и лицензии, `fix` правит `package.json`, а `sbom` пишет CycloneDX; `fix` и `sbom` пишут файлы и требуют `--allow-write`. `coverage` сверяет изменённые строки с локальным отчётом lcov, Istanbul, Cobertura или Go и возвращает непокрытые строки, файлы без данных и гейт по `fail_under` или `max_uncovered`. `reviewers` ранжирует авторов, которые трогали изменённые файлы, показывает владельцев из CODEOWNERS и принимает `limit`, `depth` и `exclude`; используется только история git. `test_guard` запускает офлайн-проверку на ослабление тестов: пропущенные, сфокусированные или удалённые тесты, удалённые и закомментированные проверки, поднятые таймауты, строгие матчеры, заменённые проверкой существования, `@ts-ignore` и пустые catch; с `fail_on_weakening` находка даёт код 1. `env_sync` сверяет переменные окружения, добавленные diff (`process.env`, `import.meta.env`, `Deno.env`, `Bun.env`), с локальными `.env` и `.env.example`/`.sample`/`.template`: отсутствие определения даёт fail с `fail_on_missing`, а определённые, но не задокументированные переменные — warn. `mock_leak` ищет забытые заглушки и хардкод в добавленном прод-коде: локальные пути, тестовые токены, `if (true)`/`if (false)`, имена mock/fake/stub, комментарии про заглушки и localhost-адреса; `fail_on_leak` даёт код 1 на выбранном уровне. `ecosystem_verify` проверяет, что именованные импорты из изменённых файлов существуют в установленном пакете или его `.d.ts`, и ищет пакеты, которых нет ни в `node_modules`, ни в `package.json`; с `online` дополнительно смотрит возраст и недельные загрузки новых npm-пакетов, а `fail_on_issue` даёт код 1 на выбранном уровне. `pack` собирает компактный контекст задачи: правила проекта, подписи изменённых файлов, связанные ссылки и необязательный лог тестов, с ограничением `budget` в символах; файлы не меняет. `contract_drift` сравнивает изменённые TypeScript-интерфейсы, Zod-объекты, Prisma-модели, Pydantic-модели и JSON Schema с предыдущей версией, находит удалённые поля, ставшие обязательными поля и смену типов и показывает нетронутые файлы, где удалённое поле ещё используется; `fail_on_drift` даёт код 1 на выбранной строгости. `anti_regression` сравнивает строки, добавленные diff, со строками, которые человек явно удалил в истории git, указывает коммит-удаление и ловит повторно добавленный код или импорты; `fail_on_regression` даёт код 1. `boundaries` проверяет добавленные импорты по правилам слоёв из `.oc-pilot/architecture.json`, показывает файл, строку, импорт и причину правила, а `fail_on_violation` даёт код 1 при пересечении границы слоя. `test_plan` выбирает тестовые файлы, затронутые diff, по статическому графу импортов: изменённые тесты, прямые и транзитивные импортёры, совпадения по имени и ссылки на символы; непокрытые изменённые файлы попадают в отчёт, а `fail_on_uncovered` даёт код 1. `compliance_verify` проверяет подписанный аудит-манифест текущего коммита: SHA-256, коммит, цепочку хешей предыдущих манифестов и необязательную подпись Ed25519; отсутствующий, изменённый или разорванный манифест — обычный результат с кодом 1. `test_gen` просит модель написать тесты на изменённый код; с `apply` он пишет файлы, прогоняет тесты и откатывает падения, если не указан `keep_failing`; `coverage` сужает генерацию до непокрытых изменённых строк, а `from_slop` выбирает файлы без тестов. `brag` собирает самодостаточный HTML/SVG-отчёт о сессии из статистики, истории git, последнего ревью и квитанции; только встроенные ресурсы, без модели и сети, `no_paths` скрывает пути. `battle` запускает экспериментальный цикл Coder/Hacker: кодер предлагает патч, хакер делает ревью и прогоняет SAST, авторизацию и проверку ослабления тестов, а цикл останавливается только когда high-находок нет и тесты проходят; `apply` требует `--allow-write`. `cleanup` собирает офлайн-план уборки из проблем зависимостей, Slop Index, переменных окружения и ослабленных тестов; `apply` выполняет только безопасные исправления зависимостей и требует `--allow-write`. `arch_diff` рисует Mermaid-схему внутренних импортов, которые diff добавил или удалил: зелёные стрелки — новые зависимости, красные пунктирные — удалённые, а `fail_on_removed` даёт код 1, когда зависимость исчезла. `roast` превращает diff в технически обоснованную прожарку в выбранной роли (linus, ramsay, corporate или default), ссылается на file:line для каждой шутки и заканчивает одним реальным фиксом; вызывает модель и не меняет файлы. `cinema` собирает терминальный таймлапс сессии из коммитов, запусков, вызовов API, последнего ревью и квитанции: самодостаточный HTML-плеер или asciinema v2 cast, без сети, внешних ресурсов и вызова модели; `no_paths` скрывает темы коммитов и места находок. `bounty` оценивает каждый файл по находкам SAST, дубликатам, мёртвым экспортам, старым TODO и churn без тестов и рисует ASCII-плакат WANTED с худшим файлом и причинами; детерминированно и офлайн. `autopsy` разбирает коммит как детектив: статистика diff, SAST по добавленным строкам, ослабленные тесты, утечки заглушек, рейтинг подозреваемых и хронология до/после; `fail_on_risk` даёт код 1 при опасном вердикте. `echo` собирает самодостаточные SVG-бейджи из локальной статистики, истории git и квитанции (коммиты, запуски агента, вызовы API, попадания в кеш, находки и статус тестов); `submit` отправляет на явный `endpoint` только ник, окно и агрегаты, без путей, diff и секретов, а по умолчанию сети нет. `sast` запускает детерминированный статический анализ по изменению или по явным `paths` и принимает `fail_on_issue`, `ignore` и `no_suppressions`; находка на уровне порога или выше — обычный результат с кодом 1. `authz` проверяет авторизацию маршрутов по изменению или явным `paths` и принимает `fail_on_issue`, `ignore`, `public` и `no_suppressions`; находка маршрута на уровне порога или выше — тоже обычный результат с кодом 1. `preflight` возвращает один офлайн-вердикт по планируемому изменению и принимает те же флаги источника (`diff`, `base`, `staged`, `unstaged`, `include_untracked`), плюс `since`, `max_delta`, `fail_on_issue`, `no_secret_scan`, `no_sast`, `no_authz`, `no_deps`, `no_tests` и `no_slop`; проваленная проверка — обычный результат со `status: "fail"` и кодом 1, а не ошибка инструмента, чтобы агент видел, какая именно проверка упала. `ready` возвращает офлайн-оценку готовности 0–100 и принимает `fail_under`; оценка ниже порога — тоже обычный результат с кодом 1. `receipt_verify` пересчитывает SHA-256 квитанции, сверяет записанный коммит с HEAD и возвращает `ok`, `hashOk` и `stale`; отсутствующая, изменённая или устаревшая квитанция — обычный результат с `ok: false` и кодом 1, чтобы агент видел, почему доказательство не прошло. Инструмент `fix` принимает `from_sast` и `from_authz`, чтобы чинить находки безопасности и пересканировать; результат тогда содержит `sast` или `authz` с `{before, after, remaining}`. Сервер по умолчанию read-only: `--allow-write` разрешает `fix` с `apply: true`, `commit` с `apply: true`, `test_fix` с командой, `stats` с `clear: true` и `mutate`, который временно перезаписывает исходники. Результат `fix` содержит unified-патч, список `files` и `patchStats` (`additions`, `deletions`, `hunks`, `bytes`); патчи длиннее 200 000 символов обрезаются с флагами `patchTruncated` и `patchBytes`, чтобы хост мог показать или применить изменение, не разбирая diff заново.
|
|
910
|
+
Инструменты: `review`, `invariants`, `test_fix`, `fix`, `test_gen`, `docgen`, `custom`, `scan`, `commit`, `stats`, `slop`, `mutate`, `fuzz`, `bankruptcy`, `query_ast`, `sandbox`, `hivemind_status`, `flaky`, `impact`, `deps`, `coverage`, `reviewers`, `test_guard`, `env_sync`, `mock_leak`, `ecosystem_verify`, `pack`, `pack_hologram`, `zoom_symbol`, `contract_drift`, `anti_regression`, `boundaries`, `test_plan`, `compliance_verify`, `brag`, `battle`, `cleanup`, `arch_diff`, `roast`, `cinema`, `bounty`, `autopsy`, `echo`, `sast`, `authz`, `preflight`, `honeypot`, `alien_dna`, `hyper_chamber`, `ready`, `receipt_verify`. У `scan` есть `all: true` — проверка всего репозитория, а не diff. `slop` запускает офлайн Slop Index и принимает `since`, `since_days`, `limit`, `exclude` и `no_blame`. `mutate` прогоняет мутационное тестирование по изменённому коду, принимает `command`, `max_mutants` и `min_score` и возвращает оценку и всех выживших мутантов; оценка ниже `min_score` — обычный результат с кодом 1. `flaky` несколько раз запускает тестовую команду и сравнивает результаты отдельных тестов, принимая `runs`, `command`, `fail_on_flaky`, `shuffle` и `seed`; сам он файлы не меняет, но запускает тесты проекта. `impact` показывает, какие объявления diff изменил или удалил и в каких нетронутых файлах эти имена ещё встречаются; принимает те же флаги источника, а поиск текстовый, поэтому совпадения в комментариях и строках возможны. `deps` проверяет объявленные, импортируемые и залоченные зависимости, `why` объясняет цепочку, `audit` добавляет уязвимости OSV и лицензии, `fix` правит `package.json`, а `sbom` пишет CycloneDX; `fix` и `sbom` пишут файлы и требуют `--allow-write`. `coverage` сверяет изменённые строки с локальным отчётом lcov, Istanbul, Cobertura или Go и возвращает непокрытые строки, файлы без данных и гейт по `fail_under` или `max_uncovered`. `reviewers` ранжирует авторов, которые трогали изменённые файлы, показывает владельцев из CODEOWNERS и принимает `limit`, `depth` и `exclude`; используется только история git. `test_guard` запускает офлайн-проверку на ослабление тестов: пропущенные, сфокусированные или удалённые тесты, удалённые и закомментированные проверки, поднятые таймауты, строгие матчеры, заменённые проверкой существования, `@ts-ignore` и пустые catch; с `fail_on_weakening` находка даёт код 1. `env_sync` сверяет переменные окружения, добавленные diff (`process.env`, `import.meta.env`, `Deno.env`, `Bun.env`), с локальными `.env` и `.env.example`/`.sample`/`.template`: отсутствие определения даёт fail с `fail_on_missing`, а определённые, но не задокументированные переменные — warn. `mock_leak` ищет забытые заглушки и хардкод в добавленном прод-коде: локальные пути, тестовые токены, `if (true)`/`if (false)`, имена mock/fake/stub, комментарии про заглушки и localhost-адреса; `fail_on_leak` даёт код 1 на выбранном уровне. `ecosystem_verify` проверяет, что именованные импорты из изменённых файлов существуют в установленном пакете или его `.d.ts`, и ищет пакеты, которых нет ни в `node_modules`, ни в `package.json`; с `online` дополнительно смотрит возраст и недельные загрузки новых npm-пакетов, а `fail_on_issue` даёт код 1 на выбранном уровне. `pack` собирает компактный контекст задачи: правила проекта, подписи изменённых файлов, связанные ссылки и необязательный лог тестов, с ограничением `budget` в символах; файлы не меняет. `contract_drift` сравнивает изменённые TypeScript-интерфейсы, Zod-объекты, Prisma-модели, Pydantic-модели и JSON Schema с предыдущей версией, находит удалённые поля, ставшие обязательными поля и смену типов и показывает нетронутые файлы, где удалённое поле ещё используется; `fail_on_drift` даёт код 1 на выбранной строгости. `anti_regression` сравнивает строки, добавленные diff, со строками, которые человек явно удалил в истории git, указывает коммит-удаление и ловит повторно добавленный код или импорты; `fail_on_regression` даёт код 1. `boundaries` проверяет добавленные импорты по правилам слоёв из `.oc-pilot/architecture.json`, показывает файл, строку, импорт и причину правила, а `fail_on_violation` даёт код 1 при пересечении границы слоя. `test_plan` выбирает тестовые файлы, затронутые diff, по статическому графу импортов: изменённые тесты, прямые и транзитивные импортёры, совпадения по имени и ссылки на символы; непокрытые изменённые файлы попадают в отчёт, а `fail_on_uncovered` даёт код 1. `compliance_verify` проверяет подписанный аудит-манифест текущего коммита: SHA-256, коммит, цепочку хешей предыдущих манифестов и необязательную подпись Ed25519; отсутствующий, изменённый или разорванный манифест — обычный результат с кодом 1. `test_gen` просит модель написать тесты на изменённый код; с `apply` он пишет файлы, прогоняет тесты и откатывает падения, если не указан `keep_failing`; `coverage` сужает генерацию до непокрытых изменённых строк, а `from_slop` выбирает файлы без тестов. `brag` собирает самодостаточный HTML/SVG-отчёт о сессии из статистики, истории git, последнего ревью и квитанции; только встроенные ресурсы, без модели и сети, `no_paths` скрывает пути. `battle` запускает экспериментальный цикл Coder/Hacker: кодер предлагает патч, хакер делает ревью и прогоняет SAST, авторизацию и проверку ослабления тестов, а цикл останавливается только когда high-находок нет и тесты проходят; `apply` требует `--allow-write`. `cleanup` собирает офлайн-план уборки из проблем зависимостей, Slop Index, переменных окружения и ослабленных тестов; `apply` выполняет только безопасные исправления зависимостей и требует `--allow-write`. `arch_diff` рисует Mermaid-схему внутренних импортов, которые diff добавил или удалил: зелёные стрелки — новые зависимости, красные пунктирные — удалённые, а `fail_on_removed` даёт код 1, когда зависимость исчезла. `roast` превращает diff в технически обоснованную прожарку в выбранной роли (linus, ramsay, corporate или default), ссылается на file:line для каждой шутки и заканчивает одним реальным фиксом; вызывает модель и не меняет файлы. `cinema` собирает терминальный таймлапс сессии из коммитов, запусков, вызовов API, последнего ревью и квитанции: самодостаточный HTML-плеер или asciinema v2 cast, без сети, внешних ресурсов и вызова модели; `no_paths` скрывает темы коммитов и места находок. `bounty` оценивает каждый файл по находкам SAST, дубликатам, мёртвым экспортам, старым TODO и churn без тестов и рисует ASCII-плакат WANTED с худшим файлом и причинами; детерминированно и офлайн. `autopsy` разбирает коммит как детектив: статистика diff, SAST по добавленным строкам, ослабленные тесты, утечки заглушек, рейтинг подозреваемых и хронология до/после; `fail_on_risk` даёт код 1 при опасном вердикте. `echo` собирает самодостаточные SVG-бейджи из локальной статистики, истории git и квитанции (коммиты, запуски агента, вызовы API, попадания в кеш, находки и статус тестов); `submit` отправляет на явный `endpoint` только ник, окно и агрегаты, без путей, diff и секретов, а по умолчанию сети нет. `sast` запускает детерминированный статический анализ по изменению или по явным `paths` и принимает `fail_on_issue`, `ignore` и `no_suppressions`; находка на уровне порога или выше — обычный результат с кодом 1. `authz` проверяет авторизацию маршрутов по изменению или явным `paths` и принимает `fail_on_issue`, `ignore`, `public` и `no_suppressions`; находка маршрута на уровне порога или выше — тоже обычный результат с кодом 1. `preflight` возвращает один офлайн-вердикт по планируемому изменению и принимает те же флаги источника (`diff`, `base`, `staged`, `unstaged`, `include_untracked`), плюс `since`, `max_delta`, `fail_on_issue`, `no_secret_scan`, `no_sast`, `no_authz`, `no_deps`, `no_tests` и `no_slop`; проваленная проверка — обычный результат со `status: "fail"` и кодом 1, а не ошибка инструмента, чтобы агент видел, какая именно проверка упала. `ready` возвращает офлайн-оценку готовности 0–100 и принимает `fail_under`; оценка ниже порога — тоже обычный результат с кодом 1. `receipt_verify` пересчитывает SHA-256 квитанции, сверяет записанный коммит с HEAD и возвращает `ok`, `hashOk` и `stale`; отсутствующая, изменённая или устаревшая квитанция — обычный результат с `ok: false` и кодом 1, чтобы агент видел, почему доказательство не прошло. Инструмент `fix` принимает `from_sast` и `from_authz`, чтобы чинить находки безопасности и пересканировать; результат тогда содержит `sast` или `authz` с `{before, after, remaining}`. Сервер по умолчанию read-only: `--allow-write` разрешает `fix` с `apply: true`, `commit` с `apply: true`, `test_fix` с командой, `stats` с `clear: true` и `mutate`, который временно перезаписывает исходники. Результат `fix` содержит unified-патч, список `files` и `patchStats` (`additions`, `deletions`, `hunks`, `bytes`); патчи длиннее 200 000 символов обрезаются с флагами `patchTruncated` и `patchBytes`, чтобы хост мог показать или применить изменение, не разбирая diff заново.
|
|
911
911
|
|
|
912
912
|
`invariants` проверяет diff против `.oc-pilot/invariants.md`
|
|
913
913
|
|
|
@@ -917,6 +917,10 @@ ZCode импортирует серверы из Claude Code, Codex, OpenCode и
|
|
|
917
917
|
|
|
918
918
|
`honeypot deploy` размещает файлы-приманки — `.env.backup` с фальшивыми AWS-ключами, `src/utils/legacy/bypassAuth.ts` с ловушкой `bypassAuth` и `src/legacy/legacy_db_drop.ts` — и записывает их в `.oc-pilot/honeypot.json`. `preflight` падает с `[HONEYPOT TRIGGERED]: Agent attempted to bypass authentication using a trapped function. Session terminated. Trust score reduced.`, если diff импортирует, читает или меняет приманку. `honeypot status` показывает ловушки, `honeypot remove` удаляет только файлы с маркером; это не настоящие секреты.
|
|
919
919
|
|
|
920
|
+
`alien-dna` сравнивает добавленные строки diff с архитектурной ДНК репозитория на HEAD и падает с `[ALIEN DNA DETECTED]`, если изменение впервые приносит паттерн, которого раньше не было (0% вхождений): Singleton, Proxy, динамический RegExp, eval, глобальное состояние, наследование, декораторы, Worker, EventEmitter, динамический import, синхронный I/O или мутация prototype. Команда офлайн и детерминирована, читает базу через git и не вызывает модель.
|
|
921
|
+
|
|
922
|
+
`hyper-chamber run <file>` проживает один самодостаточный JavaScript или ESM-файл в `node:vm`: подменяет `Date.now`, ускоряет таймеры, вызывает GC и снимает heap через `node:v8`, симулируя до года работы за короткий реальный бюджет. Устойчивый рост даёт `[MEMORY LEAK DETECTED]: AI code survives Day 1, but crashes on Day N of simulated uptime.` Файл должен экспортировать `run`, `tick`, `main` или `default`; обычный скрипт оборачивается в функцию и вызывается повторно. Это детерминированная эвристика, а не доказательство; нативный код не поддерживается.
|
|
923
|
+
|
|
920
924
|
`query` выполняет цепочный AQL-запрос к облегчённому графу кода: `find(File|Function|Class|Import|CallExpression).where(field, value).sort(field).limit(n).select(fields...).count()`. Это не SQL и не полный TypeScript AST, а быстрый текстовый граф, который агент может опросить перед правкой. В MCP он доступен как `query_ast`.
|
|
921
925
|
|
|
922
926
|
`bankruptcy` прогнозирует техдолг по истории коммитов: оценивает каждый коммит по ослабленным тестам, SAST high/medium, добавленным TODO, churn и slop-прокси, сглаживает дневной ряд скользящим средним за 14 дней, выбрасывает выбросы и строит линейную регрессию. На выходе — текущий балл, скорость, дата прогноза и самодостаточный SVG-график; меньше 10 коммитов даёт `[INSUFFICIENT DATA: Need at least 10 commits to compute Slop Velocity]`. `--explain` печатает точные веса, где доминируют ослабленные тесты (0.35) и безопасность (0.30).
|
|
@@ -927,16 +931,16 @@ ZCode импортирует серверы из Claude Code, Codex, OpenCode и
|
|
|
927
931
|
|
|
928
932
|
`pack --hologram` собирает слоистый контекст вместо дампа репозитория: LOD 0 оставляет файлы из diff целиком, LOD 1 скрывает тела функций за маркерами `body hidden` с подсказками `EFFECTS` и добавляет подходящие тесты, LOD 2 показывает только имена экспортов. При несбалансированных скобках файл отдаётся целиком с `[Hologram: parse bailout]`, а итоговый Markdown проходит проверку секретов. `zoom-symbol <file> <symbol>` возвращает скрытое тело по запросу; `pack_hologram` и `zoom_symbol` дают тот же сценарий через MCP.
|
|
929
933
|
|
|
930
|
-
Каждый инструмент принимает `max_findings` (по умолчанию 50; урезанный результат дополнительно содержит `truncated` и `totalFindings`) и `verbosity` (`full` отдаёт JSON, `compact` — одну строку сводки, а те же данные остаются в `structuredContent`). Если клиент передал `_meta.progressToken`, сервер шлёт `notifications/progress`; после `logging/setLevel` — ещё и `notifications/message` на каждый вызов. `--max-calls <n>` (или `OC_PILOT_MCP_MAX_CALLS`) ограничивает число вызовов с моделью за сессию, `0` снимает лимит, а офлайн-инструменты `scan`, `fuzz`, `bankruptcy`, `query_ast`, `sandbox`, `hivemind_status`, `stats`, `slop`, `flaky`, `impact`, `deps`, `coverage`, `reviewers`, `test_guard`, `env_sync`, `mock_leak`, `ecosystem_verify`, `pack`, `pack_hologram`, `zoom_symbol`, `contract_drift`, `anti_regression`, `boundaries`, `test_plan`, `compliance_verify`, `brag`, `cleanup`, `arch_diff`, `roast`, `cinema`, `bounty`, `autopsy`, `echo`, `sast`, `authz`, `preflight`, `honeypot`, `ready` и `receipt_verify` работают и после исчерпания бюджета.
|
|
934
|
+
Каждый инструмент принимает `max_findings` (по умолчанию 50; урезанный результат дополнительно содержит `truncated` и `totalFindings`) и `verbosity` (`full` отдаёт JSON, `compact` — одну строку сводки, а те же данные остаются в `structuredContent`). Если клиент передал `_meta.progressToken`, сервер шлёт `notifications/progress`; после `logging/setLevel` — ещё и `notifications/message` на каждый вызов. `--max-calls <n>` (или `OC_PILOT_MCP_MAX_CALLS`) ограничивает число вызовов с моделью за сессию, `0` снимает лимит, а офлайн-инструменты `scan`, `fuzz`, `bankruptcy`, `query_ast`, `sandbox`, `hivemind_status`, `stats`, `slop`, `flaky`, `impact`, `deps`, `coverage`, `reviewers`, `test_guard`, `env_sync`, `mock_leak`, `ecosystem_verify`, `pack`, `pack_hologram`, `zoom_symbol`, `contract_drift`, `anti_regression`, `boundaries`, `test_plan`, `compliance_verify`, `brag`, `cleanup`, `arch_diff`, `roast`, `cinema`, `bounty`, `autopsy`, `echo`, `sast`, `authz`, `preflight`, `honeypot`, `alien_dna`, `hyper_chamber`, `ready` и `receipt_verify` работают и после исчерпания бюджета.
|
|
931
935
|
|
|
932
|
-
Готовые промпты отдаются через `prompts/list` и рендерятся `prompts/get`, чтобы клиент мог показать их в своём меню: `review-my-diff` (необязательный `context`), `fix-failing-tests` (необязательный `log`), `pre-commit-gate` (scan, review и commit одним проходом), `secure-change` (ревью с фокусом на безопасность), `slop-check` (проверка энтропии вайб-кода) и `preflight-before-commit` (прогнать офлайн-гейт, починить самую дешёвую упавшую проверку и повторять до вердикта pass), `deploy-honeypot` (развернуть файлы-приманки, прогнать preflight, остановиться на `[HONEYPOT TRIGGERED]` и удалить приманки после проверки), `compile-hologram` (собрать слоистую голограмму, оставить LOD 0 полным, считать скрытые тела LOD 1 неизвестными и вызывать `zoom_symbol` перед рассуждением о них), `check-invariants` (проверить изменение против `.oc-pilot/invariants.md`, объяснить каждое нарушение с file:line и не скрывать CRITICAL-правило), `fuzz-the-diff` (вызвать новые экспорты с мусорными входами в изолированных процессах, починить каждое падение и не считать заблокированные цели проверенными), `forecast-tech-debt` (прочитать тренд техдолга, объяснить балл и веса и использовать дату прогноза для плана выплаты, а не для игры с TODO), `query-the-ast` (найти вызовы, функции, классы и импорты через AQL, проверить каждое попадание в исходнике и использовать доказательства для плана рефакторинга), `sandbox-script` (запустить сгенерированный JS/ESM-файл в node:vm с блокировкой импортов и побочных эффектов, затем показать вывод и точный статус), `join-the-swarm` (проверить identity и доверенных узлов hivemind, затем обмениваться только diff, AST и LLM-запросами по шифрованной сети; никогда не отправлять исполняемые команды), `get-ready` (оценить репозиторий, починить безопасные пробелы, доказать результат квитанцией и повторять до оценки не ниже 85), `fix-security` (починить находки SAST или авторизации маршрутов и пересканировать, пока не останется high), `stabilize-flaky` (воспроизвести нестабильный тест повторными и перемешанными прогонами и внести минимальное детерминированное исправление), `check-impact` (найти внешние ссылки на изменённые объявления, починить сломанные места и повторять, пока не останется устаревших ссылок), `triage-deps` (проверить зависимости и уязвимости OSV, починить самое дешёвое и повторить, не скрывая находки), `cover-changed-lines` (добавить тесты на изменённые строки, которые не выполнил ни один тест, и повторить тот же гейт), `generate-tests` (сгенерировать тесты на изменение или его непокрытые строки, применить, прогнать и повторять до зелёного), `pick-reviewers` (выбрать минимальный набор ревьюеров, которые знают изменённые файлы, с доказательствами из истории и CODEOWNERS), `guard-tests` (найти тесты, которые изменение пропустило, ослабило или удалило, вернуть им защиту и повторять до прохождения гейта), `sync-env` (сверить переменные окружения, добавленные изменением, с `.env` и `.env.example`, добавить недостающие определения и задокументировать их, не выдумывая секреты), `remove-mocks` (найти забытые заглушки, локальные пути, тестовые токены и всегда истинные условия в прод-коде, заменить их реальной реализацией и повторять до чистого отчёта), `verify-ecosystem` (проверить, что импорты существуют в установленных пакетах, а новые npm-пакеты не появились вчера с парой загрузок, и не ставить подозрительный пакет без решения человека), `pack-context` (собрать компактный контекст задачи из правил, подписей, ссылок и лога тестов и использовать его вместо вываливания целых файлов), `check-contracts` (найти удалённые или суженные поля в изменённых типах и схемах, обновить всех оставшихся потребителей, не ломая их молча), `guard-regressions` (сравнить добавленные строки с кодом, который человек удалил, изучить коммит-удаление и не возвращать его без явного решения), `respect-boundaries` (проверить добавленные импорты по правилам слоёв, исправить направление зависимости и повторять, пока ни одна граница не пересечена), `plan-tests` (прогнать план затронутых тестов, запустить только их, добавить тест на каждый непокрытый изменённый файл и повторить, не расширяя стратегию), `prove-compliance` (проверить подписанный аудит-манифест для HEAD, цепочку хешей и подпись и не заявлять о готовности, пока манифест недействителен), `cleanup-plan` (собрать офлайн-план уборки и применить только безопасные исправления зависимостей), `show-arch-diff` (нарисовать Mermaid-схему добавленных и удалённых внутренних импортов), `roast-my-code` (прожарить diff в выбранной персоне, с file:line и одним реальным исправлением), `play-session` (собрать терминальный таймлапс сессии в виде самодостаточного HTML-плеера или asciinema cast), `wanted-poster` (нарисовать плакат WANTED для худшего файла, объяснить причины и самое весомое исправление и повторить после исправления), `autopsy-commit` (разобрать коммит, перечислить сигналы, ранжировать подозреваемых, прочитать хронологию до/после и предложить минимальное исправление и тест, который поймал бы проблему), `share-progress` (собрать локальные SVG-бейджи и только с явного разрешения отправить анонимные агрегаты на указанный endpoint), `prove-tests` (прогнать мутационное тестирование по изменению и усилить тесты, пока mutation score не достигнет 80) и `prove-done` (проверить квитанцию для HEAD, создать свежую, если её нет или она устарела, и не заявлять о готовности, пока `ok` не равен true, а тесты в квитанции не пройдены).
|
|
936
|
+
Готовые промпты отдаются через `prompts/list` и рендерятся `prompts/get`, чтобы клиент мог показать их в своём меню: `review-my-diff` (необязательный `context`), `fix-failing-tests` (необязательный `log`), `pre-commit-gate` (scan, review и commit одним проходом), `secure-change` (ревью с фокусом на безопасность), `slop-check` (проверка энтропии вайб-кода) и `preflight-before-commit` (прогнать офлайн-гейт, починить самую дешёвую упавшую проверку и повторять до вердикта pass), `deploy-honeypot` (развернуть файлы-приманки, прогнать preflight, остановиться на `[HONEYPOT TRIGGERED]` и удалить приманки после проверки), `check-alien-dna` (сравнить diff с архитектурной ДНК на HEAD, остановиться на `[ALIEN DNA DETECTED]` и спросить разрешение перед новым паттерном), `stress-the-chamber` (прожить сгенерированный JS/ESM-файл в node:vm, симулировать год работы, остановиться на `[MEMORY LEAK DETECTED]` и считать чистый прогон эвристикой, а не доказательством), `compile-hologram` (собрать слоистую голограмму, оставить LOD 0 полным, считать скрытые тела LOD 1 неизвестными и вызывать `zoom_symbol` перед рассуждением о них), `check-invariants` (проверить изменение против `.oc-pilot/invariants.md`, объяснить каждое нарушение с file:line и не скрывать CRITICAL-правило), `fuzz-the-diff` (вызвать новые экспорты с мусорными входами в изолированных процессах, починить каждое падение и не считать заблокированные цели проверенными), `forecast-tech-debt` (прочитать тренд техдолга, объяснить балл и веса и использовать дату прогноза для плана выплаты, а не для игры с TODO), `query-the-ast` (найти вызовы, функции, классы и импорты через AQL, проверить каждое попадание в исходнике и использовать доказательства для плана рефакторинга), `sandbox-script` (запустить сгенерированный JS/ESM-файл в node:vm с блокировкой импортов и побочных эффектов, затем показать вывод и точный статус), `join-the-swarm` (проверить identity и доверенных узлов hivemind, затем обмениваться только diff, AST и LLM-запросами по шифрованной сети; никогда не отправлять исполняемые команды), `get-ready` (оценить репозиторий, починить безопасные пробелы, доказать результат квитанцией и повторять до оценки не ниже 85), `fix-security` (починить находки SAST или авторизации маршрутов и пересканировать, пока не останется high), `stabilize-flaky` (воспроизвести нестабильный тест повторными и перемешанными прогонами и внести минимальное детерминированное исправление), `check-impact` (найти внешние ссылки на изменённые объявления, починить сломанные места и повторять, пока не останется устаревших ссылок), `triage-deps` (проверить зависимости и уязвимости OSV, починить самое дешёвое и повторить, не скрывая находки), `cover-changed-lines` (добавить тесты на изменённые строки, которые не выполнил ни один тест, и повторить тот же гейт), `generate-tests` (сгенерировать тесты на изменение или его непокрытые строки, применить, прогнать и повторять до зелёного), `pick-reviewers` (выбрать минимальный набор ревьюеров, которые знают изменённые файлы, с доказательствами из истории и CODEOWNERS), `guard-tests` (найти тесты, которые изменение пропустило, ослабило или удалило, вернуть им защиту и повторять до прохождения гейта), `sync-env` (сверить переменные окружения, добавленные изменением, с `.env` и `.env.example`, добавить недостающие определения и задокументировать их, не выдумывая секреты), `remove-mocks` (найти забытые заглушки, локальные пути, тестовые токены и всегда истинные условия в прод-коде, заменить их реальной реализацией и повторять до чистого отчёта), `verify-ecosystem` (проверить, что импорты существуют в установленных пакетах, а новые npm-пакеты не появились вчера с парой загрузок, и не ставить подозрительный пакет без решения человека), `pack-context` (собрать компактный контекст задачи из правил, подписей, ссылок и лога тестов и использовать его вместо вываливания целых файлов), `check-contracts` (найти удалённые или суженные поля в изменённых типах и схемах, обновить всех оставшихся потребителей, не ломая их молча), `guard-regressions` (сравнить добавленные строки с кодом, который человек удалил, изучить коммит-удаление и не возвращать его без явного решения), `respect-boundaries` (проверить добавленные импорты по правилам слоёв, исправить направление зависимости и повторять, пока ни одна граница не пересечена), `plan-tests` (прогнать план затронутых тестов, запустить только их, добавить тест на каждый непокрытый изменённый файл и повторить, не расширяя стратегию), `prove-compliance` (проверить подписанный аудит-манифест для HEAD, цепочку хешей и подпись и не заявлять о готовности, пока манифест недействителен), `cleanup-plan` (собрать офлайн-план уборки и применить только безопасные исправления зависимостей), `show-arch-diff` (нарисовать Mermaid-схему добавленных и удалённых внутренних импортов), `roast-my-code` (прожарить diff в выбранной персоне, с file:line и одним реальным исправлением), `play-session` (собрать терминальный таймлапс сессии в виде самодостаточного HTML-плеера или asciinema cast), `wanted-poster` (нарисовать плакат WANTED для худшего файла, объяснить причины и самое весомое исправление и повторить после исправления), `autopsy-commit` (разобрать коммит, перечислить сигналы, ранжировать подозреваемых, прочитать хронологию до/после и предложить минимальное исправление и тест, который поймал бы проблему), `share-progress` (собрать локальные SVG-бейджи и только с явного разрешения отправить анонимные агрегаты на указанный endpoint), `prove-tests` (прогнать мутационное тестирование по изменению и усилить тесты, пока mutation score не достигнет 80) и `prove-done` (проверить квитанцию для HEAD, создать свежую, если её нет или она устарела, и не заявлять о готовности, пока `ok` не равен true, а тесты в квитанции не пройдены).
|
|
933
937
|
|
|
934
938
|
Запуск вручную:
|
|
935
939
|
|
|
936
940
|
```bash
|
|
937
941
|
oc-pilot-mcp --cwd "C:\path\to\project"
|
|
938
942
|
# версия зафиксирована для воспроизводимости:
|
|
939
|
-
npx -y oc-pilot@0.
|
|
943
|
+
npx -y oc-pilot@0.91.0 mcp --cwd "C:\path\to\project"
|
|
940
944
|
```
|
|
941
945
|
|
|
942
946
|
Пример для Claude Code (`.mcp.json`):
|
|
@@ -1008,7 +1012,7 @@ jobs:
|
|
|
1008
1012
|
- uses: actions/checkout@v4
|
|
1009
1013
|
with:
|
|
1010
1014
|
fetch-depth: 0
|
|
1011
|
-
- uses: MyNameIsNikki/oc-pilot@v0.
|
|
1015
|
+
- uses: MyNameIsNikki/oc-pilot@v0.91.0
|
|
1012
1016
|
with:
|
|
1013
1017
|
command: scan
|
|
1014
1018
|
args: --base origin/${{ github.base_ref }} --fail-on-secrets
|
package/dist/cli.js
CHANGED
|
@@ -54,6 +54,8 @@ import { runQuery } from "./commands/query.js";
|
|
|
54
54
|
import { runSandboxCommand } from "./commands/sandbox.js";
|
|
55
55
|
import { runHivemind } from "./commands/hivemind.js";
|
|
56
56
|
import { runHoneypot } from "./commands/honeypot.js";
|
|
57
|
+
import { runAlienDna } from "./commands/alien-dna.js";
|
|
58
|
+
import { runHyperChamberCommand } from "./commands/hyper-chamber.js";
|
|
57
59
|
import { runSast } from "./commands/sast.js";
|
|
58
60
|
import { runAuthz } from "./commands/authz.js";
|
|
59
61
|
import { PilotError, toPilotError } from "./core/errors.js";
|
|
@@ -75,6 +77,8 @@ const HANDLERS = {
|
|
|
75
77
|
sandbox: runSandboxCommand,
|
|
76
78
|
hivemind: runHivemind,
|
|
77
79
|
honeypot: runHoneypot,
|
|
80
|
+
"alien-dna": runAlienDna,
|
|
81
|
+
"hyper-chamber": runHyperChamberCommand,
|
|
78
82
|
sast: runSast,
|
|
79
83
|
authz: runAuthz,
|
|
80
84
|
fix: runFix,
|
|
@@ -168,6 +172,8 @@ const HELP = `oc-pilot ${VERSION} — AI-ревью, разбор тестов
|
|
|
168
172
|
invariants Смысловые инварианты проекта против diff
|
|
169
173
|
preflight Офлайн-проверка изменения: секреты, зависимости, тесты, slop
|
|
170
174
|
honeypot Приманки для агентов: deploy, status, remove
|
|
175
|
+
alien-dna Проверка архитектурной ДНК: паттерны diff против HEAD
|
|
176
|
+
hyper-chamber Симуляция года работы и поиск утечек памяти
|
|
171
177
|
receipt Квитанция о тестах и preflight, привязанная к коммиту
|
|
172
178
|
ready Оценить готовность репозитория к работе с ИИ-агентом
|
|
173
179
|
commit Сгенерировать commit-сообщение по staged (--apply — закоммитить)
|
|
@@ -236,6 +242,8 @@ ${COMMON_HELP}
|
|
|
236
242
|
oc-pilot ecosystem-verify --staged --fail-on-issue high
|
|
237
243
|
oc-pilot preflight --staged
|
|
238
244
|
oc-pilot honeypot deploy
|
|
245
|
+
oc-pilot alien-dna --staged
|
|
246
|
+
oc-pilot hyper-chamber run scripts/task.mjs
|
|
239
247
|
oc-pilot receipt --staged
|
|
240
248
|
oc-pilot docgen "src/**/*.ts" --symbol buildPrompt
|
|
241
249
|
git diff | oc-pilot scan --stdin
|
|
@@ -278,7 +286,7 @@ async function main(argv) {
|
|
|
278
286
|
});
|
|
279
287
|
}
|
|
280
288
|
throw new PilotError(`Неизвестная команда: ${command}`, {
|
|
281
|
-
hint: "Доступные команды: review, test-fix, test-gen, test-guard, flaky, mutate, fuzz, bankruptcy, query, sandbox, hivemind, sast, authz, fix, docgen, custom, scan, deps, ecosystem-verify, env-sync, mock-leak, coverage, pack, zoom-symbol, contract-drift, anti-regression, boundaries, test-plan, compliance, brag, battle, cleanup, arch-diff, roast, cinema, bounty, autopsy, echo, invariants, preflight, honeypot, receipt, ready, commit, install-hook, restore, cache, stats, day, impact, explain, reviewers, replay, slop, setup, init.",
|
|
289
|
+
hint: "Доступные команды: review, test-fix, test-gen, test-guard, flaky, mutate, fuzz, bankruptcy, query, sandbox, hivemind, sast, authz, fix, docgen, custom, scan, deps, ecosystem-verify, env-sync, mock-leak, coverage, pack, zoom-symbol, contract-drift, anti-regression, boundaries, test-plan, compliance, brag, battle, cleanup, arch-diff, roast, cinema, bounty, autopsy, echo, invariants, preflight, honeypot, alien-dna, hyper-chamber, receipt, ready, commit, install-hook, restore, cache, stats, day, impact, explain, reviewers, replay, slop, setup, init.",
|
|
282
290
|
exitCode: 2,
|
|
283
291
|
});
|
|
284
292
|
}
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EA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IAAI,EAAE,CAAC;QACf,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC;YAAE,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACjE,CAAC;IACD,IAAI,CAAC,CAAC,KAAK,YAAY,UAAU,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,CAAC;QACjE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACpF,CAAC;IACD,OAAO,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;AACpC,CAAC,CAAC,CAAC"}
|
package/dist/cli.test.js
CHANGED
|
@@ -1020,6 +1020,56 @@ test("preflight can skip every check", () => {
|
|
|
1020
1020
|
rmSync(dir, { recursive: true, force: true });
|
|
1021
1021
|
}
|
|
1022
1022
|
});
|
|
1023
|
+
test("alien-dna blocks a pattern absent from HEAD", () => {
|
|
1024
|
+
const dir = mkdtempSync(join(tmpdir(), "oc-pilot-cli-alien-dna-"));
|
|
1025
|
+
try {
|
|
1026
|
+
spawnSync("git", ["init", "-q"], { cwd: dir });
|
|
1027
|
+
spawnSync("git", ["config", "user.email", "test@example.com"], { cwd: dir });
|
|
1028
|
+
spawnSync("git", ["config", "user.name", "Test"], { cwd: dir });
|
|
1029
|
+
writeFileSync(join(dir, "app.ts"), "export const value = 1;\n");
|
|
1030
|
+
spawnSync("git", ["add", "."], { cwd: dir });
|
|
1031
|
+
spawnSync("git", ["commit", "-m", "init", "-q"], { cwd: dir });
|
|
1032
|
+
const diffPath = join(dir, "changes.diff");
|
|
1033
|
+
writeFileSync(diffPath, [
|
|
1034
|
+
"diff --git a/app.ts b/app.ts",
|
|
1035
|
+
"--- a/app.ts",
|
|
1036
|
+
"+++ b/app.ts",
|
|
1037
|
+
"@@ -1 +1,2 @@",
|
|
1038
|
+
" export const value = 1;",
|
|
1039
|
+
"+class Store { private static instance: Store; }",
|
|
1040
|
+
"",
|
|
1041
|
+
].join("\n"));
|
|
1042
|
+
const result = runCli(["alien-dna", "--diff", diffPath, "--cwd", dir, "--json"], dir);
|
|
1043
|
+
assert.equal(result.status, 1, result.stderr);
|
|
1044
|
+
const payload = JSON.parse(result.stdout);
|
|
1045
|
+
assert.match(payload.summary, /\[ALIEN DNA DETECTED\]/);
|
|
1046
|
+
assert.equal(payload.triggers[0]?.id, "singleton");
|
|
1047
|
+
}
|
|
1048
|
+
finally {
|
|
1049
|
+
rmSync(dir, { recursive: true, force: true });
|
|
1050
|
+
}
|
|
1051
|
+
});
|
|
1052
|
+
test("hyper-chamber reports a retained cache as a leak", () => {
|
|
1053
|
+
const dir = mkdtempSync(join(tmpdir(), "oc-pilot-cli-hyper-chamber-"));
|
|
1054
|
+
try {
|
|
1055
|
+
writeFileSync(join(dir, "leak.mjs"), [
|
|
1056
|
+
"const cache = [];",
|
|
1057
|
+
"export function run() {",
|
|
1058
|
+
" cache.push({ payload: 'x'.repeat(512) });",
|
|
1059
|
+
" return cache.length;",
|
|
1060
|
+
"}",
|
|
1061
|
+
"",
|
|
1062
|
+
].join("\n"));
|
|
1063
|
+
const result = runCli(["hyper-chamber", "run", "leak.mjs", "--days", "365", "--budget", "400ms", "--memory-limit", "256MB", "--json"], dir);
|
|
1064
|
+
assert.equal(result.status, 1, result.stderr);
|
|
1065
|
+
const payload = JSON.parse(result.stdout);
|
|
1066
|
+
assert.equal(payload.status, "leak");
|
|
1067
|
+
assert.match(payload.summary, /\[MEMORY LEAK DETECTED\]/);
|
|
1068
|
+
}
|
|
1069
|
+
finally {
|
|
1070
|
+
rmSync(dir, { recursive: true, force: true });
|
|
1071
|
+
}
|
|
1072
|
+
});
|
|
1023
1073
|
test("receipt records a run and verifies against HEAD", () => {
|
|
1024
1074
|
const dir = mkdtempSync(join(tmpdir(), "oc-pilot-cli-receipt-"));
|
|
1025
1075
|
try {
|