oc-pilot 0.114.3 → 0.114.5

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.114.5
4
+
5
+ - `resolveHookBinary` проверяет, что установленный управляемый хук действительно найдёт oc-pilot: `OC_PILOT_BIN`, локальный `node_modules/.bin/oc-pilot`, затем `PATH`.
6
+ - `ready` и `doctor` предупреждают, если хук установлен, но бинарник не находится: раньше такой хук молча пропускал проверку.
7
+ - Хук ищет и `oc-pilot.cmd` на Windows; README описывает проверку и порядок поиска. 856 тестов; версия 0.114.5.
8
+
9
+ ## 0.114.4
10
+
11
+ - `doctor` больше не запускает `.cmd`/`.bat` через `shell: true` с аргументами: версия вызывается через `cmd.exe` с `windowsVerbatimArguments`, поэтому Node 24 не печатает DEP0190.
12
+ - Хук `pre-commit`/`pre-push` сначала берёт `OC_PILOT_BIN`, затем локальный `./node_modules/.bin/oc-pilot`, затем глобальный `oc-pilot`; если бинарник не найден, печатает предупреждение и пропускает проверку.
13
+ - README описывает порядок поиска бинарника; 848 тестов; версия 0.114.4.
14
+
3
15
  ## 0.114.3
4
16
 
5
17
  - `ready` теперь ищет pre-commit в каталоге из `core.hooksPath`, а не только в `.git/hooks`: husky и общие hooks-каталоги больше не дают ложный fail.
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. `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. `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.3 mcp --cwd /absolute/path/to/project
1037
+ npx -y oc-pilot@0.114.5 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.3
1212
+ - uses: MyNameIsNikki/oc-pilot@v0.114.5
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.3.tar.gz
1235
+ - run: npm install -g https://github.com/MyNameIsNikki/oc-pilot/archive/refs/tags/v0.114.5.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`. Поддерживаются `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`; если ничего не найдено, он печатает предупреждение и пропускает проверку. Поддерживаются `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.3 mcp --cwd "C:\path\to\project"
988
+ npx -y oc-pilot@0.114.5 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.3
1060
+ - uses: MyNameIsNikki/oc-pilot@v0.114.5
1061
1061
  with:
1062
1062
  command: scan
1063
1063
  args: --base origin/${{ github.base_ref }} --fail-on-secrets
package/dist/cli.test.js CHANGED
@@ -1587,6 +1587,12 @@ test("ready --fix installs the hook, config and instructions", () => {
1587
1587
  spawnSync("git", ["init", "-q"], { cwd: dir });
1588
1588
  writeFileSync(join(dir, "package.json"), JSON.stringify({ name: "demo", private: true, scripts: { test: 'node -e "process.exit(0)"' } }), "utf8");
1589
1589
  writeFileSync(join(dir, "package-lock.json"), JSON.stringify({ name: "demo", lockfileVersion: 3, packages: { "": { name: "demo" } } }), "utf8");
1590
+ const binDir = join(dir, "node_modules", ".bin");
1591
+ mkdirSync(binDir, { recursive: true });
1592
+ const bin = join(binDir, "oc-pilot");
1593
+ writeFileSync(bin, "#!/bin/sh\nexit 0\n", "utf8");
1594
+ if (process.platform !== "win32")
1595
+ chmodSync(bin, 0o755);
1590
1596
  const before = runCli(["ready", "--cwd", dir, "--json"], dir);
1591
1597
  assert.equal(before.status, 0, before.stderr);
1592
1598
  const baseline = JSON.parse(before.stdout);