oc-pilot 0.114.4 → 0.114.6
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 +12 -0
- package/README.md +6 -6
- package/README.ru.md +5 -5
- package/dist/cli.test.js +11 -0
- package/dist/cli.test.js.map +1 -1
- package/dist/commands/doctor.js +41 -35
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/doctor.test.js +76 -1
- package/dist/commands/doctor.test.js.map +1 -1
- package/dist/commands/install-hook.js +5 -3
- package/dist/commands/install-hook.js.map +1 -1
- package/dist/core/hooks.js +99 -1
- package/dist/core/hooks.js.map +1 -1
- package/dist/core/hooks.test.js +132 -0
- package/dist/core/hooks.test.js.map +1 -0
- package/dist/core/hyper-chamber.test.js +2 -2
- package/dist/core/hyper-chamber.test.js.map +1 -1
- package/dist/core/readiness-fix.test.js +15 -1
- package/dist/core/readiness-fix.test.js.map +1 -1
- package/dist/core/readiness.js +19 -2
- package/dist/core/readiness.js.map +1 -1
- package/dist/core/readiness.test.js +56 -1
- package/dist/core/readiness.test.js.map +1 -1
- package/dist/version.js +1 -1
- package/docs/integrations.md +3 -3
- package/package.json +1 -1
- package/skills/agent-self-review/SKILL.md +1 -1
- package/skills/commit-discipline/SKILL.md +1 -1
- 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,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.114.6
|
|
4
|
+
|
|
5
|
+
- `ready` и `doctor` теперь сравнивают версию найденного бинарника хука с текущим CLI. Устаревший глобальный `oc-pilot` больше не выглядит здоровым хуком: отчёт предупреждает, какую версию запустит pre-commit.
|
|
6
|
+
- Общие `readBinaryVersion`, `parseBinaryVersion` и `versionInvocation` вынесены в `src/core/hooks.ts`; на Windows локальный `.cmd`-шим выбирается раньше shell-обёртки, поэтому проверка версии работает и там.
|
|
7
|
+
- README описывает проверку версии; 861 тест; версия 0.114.6.
|
|
8
|
+
|
|
9
|
+
## 0.114.5
|
|
10
|
+
|
|
11
|
+
- `resolveHookBinary` проверяет, что установленный управляемый хук действительно найдёт oc-pilot: `OC_PILOT_BIN`, локальный `node_modules/.bin/oc-pilot`, затем `PATH`.
|
|
12
|
+
- `ready` и `doctor` предупреждают, если хук установлен, но бинарник не находится: раньше такой хук молча пропускал проверку.
|
|
13
|
+
- Хук ищет и `oc-pilot.cmd` на Windows; README описывает проверку и порядок поиска. 856 тестов; версия 0.114.5.
|
|
14
|
+
|
|
3
15
|
## 0.114.4
|
|
4
16
|
|
|
5
17
|
- `doctor` больше не запускает `.cmd`/`.bat` через `shell: true` с аргументами: версия вызывается через `cmd.exe` с `windowsVerbatimArguments`, поэтому Node 24 не печатает DEP0190.
|
package/README.md
CHANGED
|
@@ -438,7 +438,7 @@ A receipt carries `{version, tool, toolVersion, createdAt, commit, branch, dirty
|
|
|
438
438
|
|
|
439
439
|
### `ready`
|
|
440
440
|
|
|
441
|
-
Scores how ready a repository is for an AI agent. One offline number from 0 to 100 across nine checks: tests (15), lockfile (10), git hooks (15), Slop Index (15), a fresh receipt (10), agent instructions (10), CI (5), config (5) and security (15). Each check is `pass`, `warn` or `fail` and earns 100%, 50% or 0% of its weight. The security check runs the deterministic SAST and route-authorization rules over the repository and respects `.oc-pilot/baseline.json`. No model call, no network, but it does require a git repository.
|
|
441
|
+
Scores how ready a repository is for an AI agent. One offline number from 0 to 100 across nine checks: tests (15), lockfile (10), git hooks (15), Slop Index (15), a fresh receipt (10), agent instructions (10), CI (5), config (5) and security (15). Each check is `pass`, `warn` or `fail` and earns 100%, 50% or 0% of its weight. The security check runs the deterministic SAST and route-authorization rules over the repository and respects `.oc-pilot/baseline.json`. No model call, no network, but it does require a git repository. The hooks check also verifies that an installed managed hook can resolve an oc-pilot binary; a hook that would silently skip is reported as a warning.
|
|
442
442
|
|
|
443
443
|
```bash
|
|
444
444
|
oc-pilot ready
|
|
@@ -610,7 +610,7 @@ oc-pilot install-hook --pre-push
|
|
|
610
610
|
oc-pilot install-hook --uninstall
|
|
611
611
|
```
|
|
612
612
|
|
|
613
|
-
Hooks are opt-in and reversible. A hook that does not belong to oc-pilot is never overwritten unless `--force` is passed, and then the old file is kept as `<hook>.oc-pilot.bak`. Every managed hook is stamped with a marker; hooks written by older versions are reported as outdated by `oc-pilot doctor` and upgraded in place with `oc-pilot doctor --fix`. Set `OC_PILOT_SKIP=1` to bypass the hooks for a single command. The hook prefers `OC_PILOT_BIN`, then `./node_modules/.bin/oc-pilot`, then `oc-pilot` from `PATH`; if none is found, it prints a warning and skips the check. `core.hooksPath` and worktrees are respected.
|
|
613
|
+
Hooks are opt-in and reversible. A hook that does not belong to oc-pilot is never overwritten unless `--force` is passed, and then the old file is kept as `<hook>.oc-pilot.bak`. Every managed hook is stamped with a marker; hooks written by older versions are reported as outdated by `oc-pilot doctor` and upgraded in place with `oc-pilot doctor --fix`. Set `OC_PILOT_SKIP=1` to bypass the hooks for a single command. The hook prefers `OC_PILOT_BIN`, then `./node_modules/.bin/oc-pilot`, then `oc-pilot` from `PATH`; if none is found, it prints a warning and skips the check. `oc-pilot ready` and `oc-pilot doctor` also compare the resolved binary version with the running CLI and warn when they differ. `core.hooksPath` and worktrees are respected.
|
|
614
614
|
|
|
615
615
|
### `restore`
|
|
616
616
|
|
|
@@ -776,7 +776,7 @@ oc-pilot doctor --engine openai --model deepseek-chat
|
|
|
776
776
|
oc-pilot doctor --fix
|
|
777
777
|
```
|
|
778
778
|
|
|
779
|
-
It checks Node, the active engine, API credentials, git and repository state, the detected test command, project rules, oc-pilot git hooks and the response cache, and every MCP client config. `--fix` refreshes outdated oc-pilot hooks (a backup of the previous file is kept) and prunes expired cache entries; foreign hooks are never touched and are reported instead. Errors return exit code 1; `--strict` also fails on warnings. No secret values are printed.
|
|
779
|
+
It checks Node, the active engine, API credentials, git and repository state, the detected test command, project rules, oc-pilot git hooks and the response cache, and every MCP client config. `--fix` refreshes outdated oc-pilot hooks (a backup of the previous file is kept) and prunes expired cache entries; foreign hooks are never touched and are reported instead. Errors return exit code 1; `--strict` also fails on warnings. No secret values are printed. It also warns when an installed managed hook cannot find an oc-pilot binary, because such a hook skips its check.
|
|
780
780
|
|
|
781
781
|
### `init`
|
|
782
782
|
|
|
@@ -1034,7 +1034,7 @@ Start the server manually with an explicit project directory:
|
|
|
1034
1034
|
```bash
|
|
1035
1035
|
oc-pilot-mcp --cwd /absolute/path/to/project
|
|
1036
1036
|
# pinned for reproducibility:
|
|
1037
|
-
npx -y oc-pilot@0.114.
|
|
1037
|
+
npx -y oc-pilot@0.114.6 mcp --cwd /absolute/path/to/project
|
|
1038
1038
|
```
|
|
1039
1039
|
|
|
1040
1040
|
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.
|
|
@@ -1209,7 +1209,7 @@ jobs:
|
|
|
1209
1209
|
- uses: actions/checkout@v4
|
|
1210
1210
|
with:
|
|
1211
1211
|
fetch-depth: 0
|
|
1212
|
-
- uses: MyNameIsNikki/oc-pilot@v0.114.
|
|
1212
|
+
- uses: MyNameIsNikki/oc-pilot@v0.114.6
|
|
1213
1213
|
with:
|
|
1214
1214
|
command: scan
|
|
1215
1215
|
args: --base origin/${{ github.base_ref }} --fail-on-secrets
|
|
@@ -1232,7 +1232,7 @@ jobs:
|
|
|
1232
1232
|
- uses: actions/setup-node@v4
|
|
1233
1233
|
with:
|
|
1234
1234
|
node-version: 22
|
|
1235
|
-
- run: npm install -g https://github.com/MyNameIsNikki/oc-pilot/archive/refs/tags/v0.114.
|
|
1235
|
+
- run: npm install -g https://github.com/MyNameIsNikki/oc-pilot/archive/refs/tags/v0.114.6.tar.gz
|
|
1236
1236
|
- run: oc-pilot scan --base origin/${{ github.base_ref }}
|
|
1237
1237
|
- run: oc-pilot review --base origin/${{ github.base_ref }} --fail-on warning --fail-on-secrets --github
|
|
1238
1238
|
env:
|
package/README.ru.md
CHANGED
|
@@ -449,7 +449,7 @@ oc-pilot receipt --verify --public-key receipt.key.pub
|
|
|
449
449
|
|
|
450
450
|
### `ready`
|
|
451
451
|
|
|
452
|
-
Оценивает готовность репозитория к работе с ИИ-агентом. Одно офлайн-число от 0 до 100 по девяти проверкам: тесты (15), lockfile (10), git-хуки (15), Slop Index (15), свежая квитанция (10), инструкции для агента (10), CI (5), конфиг (5) и безопасность (15). Каждая проверка даёт `pass`, `warn` или `fail` и приносит 100%, 50% или 0% своего веса. Проверка безопасности прогоняет детерминированные правила SAST и авторизации маршрутов по репозиторию и учитывает `.oc-pilot/baseline.json`. Модель не вызывается, сеть не используется, но нужен git-репозиторий.
|
|
452
|
+
Оценивает готовность репозитория к работе с ИИ-агентом. Одно офлайн-число от 0 до 100 по девяти проверкам: тесты (15), lockfile (10), git-хуки (15), Slop Index (15), свежая квитанция (10), инструкции для агента (10), CI (5), конфиг (5) и безопасность (15). Каждая проверка даёт `pass`, `warn` или `fail` и приносит 100%, 50% или 0% своего веса. Проверка безопасности прогоняет детерминированные правила SAST и авторизации маршрутов по репозиторию и учитывает `.oc-pilot/baseline.json`. Модель не вызывается, сеть не используется, но нужен git-репозиторий. Проверка хуков также убеждается, что установленный управляемый хук может найти бинарник oc-pilot; хук, который молча пропустит проверку, показывается как предупреждение.
|
|
453
453
|
|
|
454
454
|
```bash
|
|
455
455
|
oc-pilot ready
|
|
@@ -621,7 +621,7 @@ oc-pilot install-hook --pre-push
|
|
|
621
621
|
oc-pilot install-hook --uninstall
|
|
622
622
|
```
|
|
623
623
|
|
|
624
|
-
Хуки опциональны и обратимы. Чужой хук не перезаписывается без `--force`, а при замене сохраняется как `<hook>.oc-pilot.bak`. Каждый управляемый хук помечен маркером; хуки старых версий `oc-pilot doctor` показывает как устаревшие и обновляет через `oc-pilot doctor --fix`. Обход на одну команду — `OC_PILOT_SKIP=1`. Хук сначала берёт `OC_PILOT_BIN`, затем `./node_modules/.bin/oc-pilot`, затем `oc-pilot` из `PATH`; если ничего не найдено, он печатает предупреждение и пропускает проверку. Поддерживаются `core.hooksPath` и worktrees.
|
|
624
|
+
Хуки опциональны и обратимы. Чужой хук не перезаписывается без `--force`, а при замене сохраняется как `<hook>.oc-pilot.bak`. Каждый управляемый хук помечен маркером; хуки старых версий `oc-pilot doctor` показывает как устаревшие и обновляет через `oc-pilot doctor --fix`. Обход на одну команду — `OC_PILOT_SKIP=1`. Хук сначала берёт `OC_PILOT_BIN`, затем `./node_modules/.bin/oc-pilot`, затем `oc-pilot` из `PATH`; если ничего не найдено, он печатает предупреждение и пропускает проверку. `oc-pilot ready` и `oc-pilot doctor` также сравнивают версию найденного бинарника с текущим CLI и предупреждают при расхождении. Поддерживаются `core.hooksPath` и worktrees.
|
|
625
625
|
|
|
626
626
|
### `restore`
|
|
627
627
|
|
|
@@ -764,7 +764,7 @@ oc-pilot doctor --engine openai --model deepseek-chat
|
|
|
764
764
|
oc-pilot doctor --fix
|
|
765
765
|
```
|
|
766
766
|
|
|
767
|
-
Проверки: Node, движок, ключ API, git и репозиторий, тестовая команда, правила проекта, git-хуки oc-pilot и кеш ответов, конфиги MCP-клиентов. `--fix` обновляет устаревшие хуки oc-pilot (предыдущий файл сохраняется как бэкап) и вычищает просроченные записи кеша; чужие хуки не трогаются — о них сообщается. Ошибки дают exit 1; `--strict` также падает на предупреждениях. Секреты не печатаются.
|
|
767
|
+
Проверки: Node, движок, ключ API, git и репозиторий, тестовая команда, правила проекта, git-хуки oc-pilot и кеш ответов, конфиги MCP-клиентов. `--fix` обновляет устаревшие хуки oc-pilot (предыдущий файл сохраняется как бэкап) и вычищает просроченные записи кеша; чужие хуки не трогаются — о них сообщается. Ошибки дают exit 1; `--strict` также падает на предупреждениях. Секреты не печатаются. Ещё он предупреждает, если установленный управляемый хук не может найти бинарник oc-pilot: такой хук пропустит проверку.
|
|
768
768
|
|
|
769
769
|
### `init`
|
|
770
770
|
|
|
@@ -985,7 +985,7 @@ ZCode импортирует серверы из Claude Code, Codex, OpenCode и
|
|
|
985
985
|
```bash
|
|
986
986
|
oc-pilot-mcp --cwd "C:\path\to\project"
|
|
987
987
|
# версия зафиксирована для воспроизводимости:
|
|
988
|
-
npx -y oc-pilot@0.114.
|
|
988
|
+
npx -y oc-pilot@0.114.6 mcp --cwd "C:\path\to\project"
|
|
989
989
|
```
|
|
990
990
|
|
|
991
991
|
Пример для Claude Code (`.mcp.json`):
|
|
@@ -1057,7 +1057,7 @@ jobs:
|
|
|
1057
1057
|
- uses: actions/checkout@v4
|
|
1058
1058
|
with:
|
|
1059
1059
|
fetch-depth: 0
|
|
1060
|
-
- uses: MyNameIsNikki/oc-pilot@v0.114.
|
|
1060
|
+
- uses: MyNameIsNikki/oc-pilot@v0.114.6
|
|
1061
1061
|
with:
|
|
1062
1062
|
command: scan
|
|
1063
1063
|
args: --base origin/${{ github.base_ref }} --fail-on-secrets
|
package/dist/cli.test.js
CHANGED
|
@@ -4,6 +4,7 @@ import { tmpdir } from "node:os";
|
|
|
4
4
|
import { delimiter, join, resolve } from "node:path";
|
|
5
5
|
import { spawn, spawnSync } from "node:child_process";
|
|
6
6
|
import { test } from "node:test";
|
|
7
|
+
import { VERSION } from "./version.js";
|
|
7
8
|
const CLI = resolve("dist/cli.js");
|
|
8
9
|
const AWS_KEY = ["AKIA", "IOSFODNN7EXAMPLE"].join("");
|
|
9
10
|
function runCli(args, cwd, extraEnv = {}) {
|
|
@@ -1587,6 +1588,16 @@ test("ready --fix installs the hook, config and instructions", () => {
|
|
|
1587
1588
|
spawnSync("git", ["init", "-q"], { cwd: dir });
|
|
1588
1589
|
writeFileSync(join(dir, "package.json"), JSON.stringify({ name: "demo", private: true, scripts: { test: 'node -e "process.exit(0)"' } }), "utf8");
|
|
1589
1590
|
writeFileSync(join(dir, "package-lock.json"), JSON.stringify({ name: "demo", lockfileVersion: 3, packages: { "": { name: "demo" } } }), "utf8");
|
|
1591
|
+
const binDir = join(dir, "node_modules", ".bin");
|
|
1592
|
+
mkdirSync(binDir, { recursive: true });
|
|
1593
|
+
if (process.platform === "win32") {
|
|
1594
|
+
writeFileSync(join(binDir, "oc-pilot.cmd"), `@echo oc-pilot ${VERSION}\r\n`, "utf8");
|
|
1595
|
+
}
|
|
1596
|
+
else {
|
|
1597
|
+
const bin = join(binDir, "oc-pilot");
|
|
1598
|
+
writeFileSync(bin, `#!/bin/sh\necho "oc-pilot ${VERSION}"\n`, "utf8");
|
|
1599
|
+
chmodSync(bin, 0o755);
|
|
1600
|
+
}
|
|
1590
1601
|
const before = runCli(["ready", "--cwd", dir, "--json"], dir);
|
|
1591
1602
|
assert.equal(before.status, 0, before.stderr);
|
|
1592
1603
|
const baseline = JSON.parse(before.stdout);
|