oc-pilot 0.152.0 → 0.153.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 CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.153.0
4
+
5
+ - `flight stats` показывает последний полёт: id, имя и статус (активен или завершён) в текстовом отчёте.
6
+ - Документация; 904 теста; версия 0.153.0.
7
+
8
+ ## 0.152.1
9
+
10
+ - Некорректные числовые опции flight (`--limit`, `--last`, `--keep`, `--older-than`) теперь дают код выхода 2, как и неизвестный тип события, а не 1.
11
+ - HELP уточняет, что код 2 означает в том числе некорректную опцию.
12
+ - 904 теста; версия 0.152.1.
13
+
3
14
  ## 0.152.0
4
15
 
5
16
  - `flight compare` показывает число заметок в каждой сессии: в текстовом отчёте и в HTML-карточках.
package/README.md CHANGED
@@ -988,7 +988,7 @@ Tools: `review`, `invariants`, `test_fix`, `fix`, `test_gen`, `docgen`, `custom`
988
988
 
989
989
  `chronos` reads a file's chronicle: commits, churn, fix/revert/incident/security markers, antibodies and vaccines, then scores it as a hotspot. `[HOTSPOT]` means the file has a history of fixes, rollbacks or incidents; inspect it before changing it and add a vaccine for the next fix. A low score is not proof that the file is safe.
990
990
 
991
- `flight` records an agent session as a hash-chained black box: `flight start --name "fix auth"` writes `.git/oc-pilot/flights/<id>/events.jsonl`, `flight exec -- <command>` records each command and its output tail, and `flight checkpoint --label after-fix` creates a dangling git commit of the full worktree without moving HEAD. `flight status` (which also names the last session when none is active), `list` and `show` inspect the journal; `flight show [<id>]` defaults to the active or latest session and reads `--bundle <file>` without the journal; `--kind <kind>` and `--last <n>` filter the events shown; `flight verify [<id>]` recomputes the chain, defaulting to the active or latest session, and prints `[FLIGHT TAMPERED]` on any edit; `flight verify --all` audits every session; `flight end` closes the session. The log is local, NDJSON and zero-dependency. `flight replay --to <label|commit>` materializes a checkpoint as a detached worktree, `flight bisect -- <command>` runs a command at each checkpoint and stops at the first failure, `flight diff` compares checkpoints, and `flight export` writes a redacted bundle with a sha256 digest. `flight compare <id-a> <id-b>` compares two sessions by event and note counts, duration, command sets, exit codes and final tree; `--bundles <a> <b>` compares two exported bundles instead. `flight html` renders a self-contained, redacted HTML timeline with checkpoints and command output, and `--bundle <file>` renders one from an exported bundle without the journal. `flight summary [--id <id>]` renders a Markdown session summary with checkpoints, commands and notes; `--bundle <file>` builds it from an exported bundle. `flight stats` aggregates sessions, commands, notes, failures, checkpoints and duration across the journal. `flight prune` removes old ended sessions while keeping the active flight and the newest N sessions; `flight delete <id>` removes one recorded session and refuses the active flight. `flight export --key <file>` signs the bundle digest with HMAC-SHA256, `--bundle <file>` re-signs an existing bundle, and `flight verify-bundle <file> --key <file>` checks the digest, chain and signature. `flight compare --html` renders a side-by-side visual comparison report. `flight stats --html` renders a self-contained dashboard of the journal. `flight keygen --output flight.key` generates a random HMAC key for signing exports. `flight restore <label|commit>` restores the worktree from a checkpoint without moving HEAD; `--dry-run` lists the files that would change. `flight list --limit <n>` shows only the newest sessions with event, checkpoint and note counts. `flight note "<text>"` appends a hash-chained note to the active flight, shown in show, summary, HTML and exports. `flight grep "<text>"` searches notes, commands, command output, checkpoint labels and flight names across sessions, `--kind <kind>` limits the search to one event kind, and `--bundle <file>` searches an exported bundle.
991
+ `flight` records an agent session as a hash-chained black box: `flight start --name "fix auth"` writes `.git/oc-pilot/flights/<id>/events.jsonl`, `flight exec -- <command>` records each command and its output tail, and `flight checkpoint --label after-fix` creates a dangling git commit of the full worktree without moving HEAD. `flight status` (which also names the last session when none is active), `list` and `show` inspect the journal; `flight show [<id>]` defaults to the active or latest session and reads `--bundle <file>` without the journal; `--kind <kind>` and `--last <n>` filter the events shown; `flight verify [<id>]` recomputes the chain, defaulting to the active or latest session, and prints `[FLIGHT TAMPERED]` on any edit; `flight verify --all` audits every session; `flight end` closes the session. The log is local, NDJSON and zero-dependency. `flight replay --to <label|commit>` materializes a checkpoint as a detached worktree, `flight bisect -- <command>` runs a command at each checkpoint and stops at the first failure, `flight diff` compares checkpoints, and `flight export` writes a redacted bundle with a sha256 digest. `flight compare <id-a> <id-b>` compares two sessions by event and note counts, duration, command sets, exit codes and final tree; `--bundles <a> <b>` compares two exported bundles instead. `flight html` renders a self-contained, redacted HTML timeline with checkpoints and command output, and `--bundle <file>` renders one from an exported bundle without the journal. `flight summary [--id <id>]` renders a Markdown session summary with checkpoints, commands and notes; `--bundle <file>` builds it from an exported bundle. `flight stats` aggregates sessions, commands, notes, failures, checkpoints and duration across the journal; it also names the last flight. `flight prune` removes old ended sessions while keeping the active flight and the newest N sessions; `flight delete <id>` removes one recorded session and refuses the active flight. `flight export --key <file>` signs the bundle digest with HMAC-SHA256, `--bundle <file>` re-signs an existing bundle, and `flight verify-bundle <file> --key <file>` checks the digest, chain and signature. `flight compare --html` renders a side-by-side visual comparison report. `flight stats --html` renders a self-contained dashboard of the journal. `flight keygen --output flight.key` generates a random HMAC key for signing exports. `flight restore <label|commit>` restores the worktree from a checkpoint without moving HEAD; `--dry-run` lists the files that would change. `flight list --limit <n>` shows only the newest sessions with event, checkpoint and note counts. `flight note "<text>"` appends a hash-chained note to the active flight, shown in show, summary, HTML and exports. `flight grep "<text>"` searches notes, commands, command output, checkpoint labels and flight names across sessions, `--kind <kind>` limits the search to one event kind, and `--bundle <file>` searches an exported bundle.
992
992
 
993
993
  `beacon` records a verification claim for a commit: `beacon stamp --check tests=pass --check preflight=pass --key beacon.key` stores the commit, tree, tool version, agent, model, commands, checks and a digest in `.oc-pilot/beacon.json`, then signs it with HMAC or `ssh-keygen`. `beacon verify` detects `[BEACON TAMPERED]` and `[UNATTRIBUTED]`; `beacon render --markdown` produces a PR comment. An unsigned beacon is valid but unattributed, so pass `--require-signature` in CI.
994
994
 
@@ -1037,7 +1037,7 @@ Start the server manually with an explicit project directory:
1037
1037
  ```bash
1038
1038
  oc-pilot-mcp --cwd /absolute/path/to/project
1039
1039
  # pinned for reproducibility:
1040
- npx -y oc-pilot@0.152.0 mcp --cwd /absolute/path/to/project
1040
+ npx -y oc-pilot@0.153.0 mcp --cwd /absolute/path/to/project
1041
1041
  ```
1042
1042
 
1043
1043
  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.
@@ -1212,7 +1212,7 @@ jobs:
1212
1212
  - uses: actions/checkout@v4
1213
1213
  with:
1214
1214
  fetch-depth: 0
1215
- - uses: MyNameIsNikki/oc-pilot@v0.152.0
1215
+ - uses: MyNameIsNikki/oc-pilot@v0.153.0
1216
1216
  with:
1217
1217
  command: scan
1218
1218
  args: --base origin/${{ github.base_ref }} --fail-on-secrets
@@ -1235,7 +1235,7 @@ jobs:
1235
1235
  - uses: actions/setup-node@v4
1236
1236
  with:
1237
1237
  node-version: 22
1238
- - run: npm install -g https://github.com/MyNameIsNikki/oc-pilot/archive/refs/tags/v0.152.0.tar.gz
1238
+ - run: npm install -g https://github.com/MyNameIsNikki/oc-pilot/archive/refs/tags/v0.153.0.tar.gz
1239
1239
  - run: oc-pilot scan --base origin/${{ github.base_ref }}
1240
1240
  - run: oc-pilot review --base origin/${{ github.base_ref }} --fail-on warning --fail-on-secrets --github
1241
1241
  env:
package/README.ru.md CHANGED
@@ -951,7 +951,7 @@ ZCode импортирует серверы из Claude Code, Codex, OpenCode и
951
951
 
952
952
  `chronos` читает хронику файла: коммиты, churn, маркеры fix/revert/incident/security, антитела и вакцины, а затем считает hotspot score. `[HOTSPOT]` означает, что у файла есть история исправлений, откатов или инцидентов; проверьте его перед изменением и добавьте вакцину для следующего фикса. Низкий score не доказывает, что файл безопасен.
953
953
 
954
- `flight` записывает агентскую сессию как чёрный ящик с хеш-цепочкой: `flight start --name "fix auth"` создаёт `.git/oc-pilot/flights/<id>/events.jsonl`, `flight exec -- <команда>` сохраняет команду и хвост вывода, а `flight checkpoint --label after-fix` делает висячий git-коммит всего worktree, не двигая HEAD. `flight status` (заодно называет последнюю сессию, если активной нет), `list` и `show` показывают журнал; `flight show [<id>]` по умолчанию берёт активную или последнюю сессию и читает `--bundle <файл>` без журнала; `--kind <тип>` и `--last <n>` фильтруют показываемые события; `flight verify [<id>]` пересчитывает цепочку (по умолчанию активная или последняя сессия) и печатает `[FLIGHT TAMPERED]` при любом изменении, `flight verify --all` проверяет все сессии; `flight end` закрывает сессию. Журнал локальный, NDJSON и без зависимостей. `flight replay --to <метка|commit>` разворачивает чекпоинт в отдельный worktree, `flight bisect -- <команда>` прогоняет команду по чекпоинтам и останавливается на первом сбое, `flight diff` сравнивает чекпоинты, а `flight export` пишет redacted-бандл с sha256-дайджестом. `flight compare <id-a> <id-b>` сравнивает две сессии по числу событий и заметок, длительности, набору команд, exit code и итоговому дереву; `--bundles <a> <b>` сравнивает два экспортированных бандла. `flight html` собирает self-contained HTML-таймлайн с чекпоинтами и выводом команд, а `--bundle <файл>` рендерит его из экспортированного бандла без журнала. `flight summary [--id <id>]` собирает Markdown-сводку полёта с чекпоинтами, командами и заметками; `--bundle <файл>` строит её из экспортированного бандла. `flight stats` суммирует сессии, команды, заметки, ошибки, чекпоинты и длительность по журналу. `flight prune` удаляет старые завершённые сессии, сохраняя активный полёт и N последних; `flight delete <id>` удаляет один записанный полёт и не трогает активный. `flight export --key <файл>` подписывает дайджест бандла через HMAC-SHA256, `--bundle <файл>` переподписывает готовый бандл, а `flight verify-bundle <файл> --key <файл>` проверяет дайджест, цепочку и подпись. `flight compare --html` рисует визуальный отчёт сравнения. `flight stats --html` собирает self-contained дашборд журнала. `flight keygen --output flight.key` генерирует случайный HMAC-ключ для подписи экспортов. `flight restore <метка|commit>` восстанавливает worktree из чекпоинта, не двигая HEAD; `--dry-run` показывает файлы, которые изменятся. `flight list --limit <n>` показывает только последние полёты с числом событий, чекпоинтов и заметок. `flight note "<текст>"` добавляет заметку в хеш-цепочку активного полёта; она видна в show, summary, HTML и экспорте. `flight grep "<текст>"` ищет по заметкам, командам, выводу команд, меткам чекпоинтов и именам полётов во всех сессиях, `--kind <тип>` ограничивает поиск одним типом события, а `--bundle <файл>` ищет внутри экспортированного бандла.
954
+ `flight` записывает агентскую сессию как чёрный ящик с хеш-цепочкой: `flight start --name "fix auth"` создаёт `.git/oc-pilot/flights/<id>/events.jsonl`, `flight exec -- <команда>` сохраняет команду и хвост вывода, а `flight checkpoint --label after-fix` делает висячий git-коммит всего worktree, не двигая HEAD. `flight status` (заодно называет последнюю сессию, если активной нет), `list` и `show` показывают журнал; `flight show [<id>]` по умолчанию берёт активную или последнюю сессию и читает `--bundle <файл>` без журнала; `--kind <тип>` и `--last <n>` фильтруют показываемые события; `flight verify [<id>]` пересчитывает цепочку (по умолчанию активная или последняя сессия) и печатает `[FLIGHT TAMPERED]` при любом изменении, `flight verify --all` проверяет все сессии; `flight end` закрывает сессию. Журнал локальный, NDJSON и без зависимостей. `flight replay --to <метка|commit>` разворачивает чекпоинт в отдельный worktree, `flight bisect -- <команда>` прогоняет команду по чекпоинтам и останавливается на первом сбое, `flight diff` сравнивает чекпоинты, а `flight export` пишет redacted-бандл с sha256-дайджестом. `flight compare <id-a> <id-b>` сравнивает две сессии по числу событий и заметок, длительности, набору команд, exit code и итоговому дереву; `--bundles <a> <b>` сравнивает два экспортированных бандла. `flight html` собирает self-contained HTML-таймлайн с чекпоинтами и выводом команд, а `--bundle <файл>` рендерит его из экспортированного бандла без журнала. `flight summary [--id <id>]` собирает Markdown-сводку полёта с чекпоинтами, командами и заметками; `--bundle <файл>` строит её из экспортированного бандла. `flight stats` суммирует сессии, команды, заметки, ошибки, чекпоинты и длительность по журналу; также показывает последний полёт. `flight prune` удаляет старые завершённые сессии, сохраняя активный полёт и N последних; `flight delete <id>` удаляет один записанный полёт и не трогает активный. `flight export --key <файл>` подписывает дайджест бандла через HMAC-SHA256, `--bundle <файл>` переподписывает готовый бандл, а `flight verify-bundle <файл> --key <файл>` проверяет дайджест, цепочку и подпись. `flight compare --html` рисует визуальный отчёт сравнения. `flight stats --html` собирает self-contained дашборд журнала. `flight keygen --output flight.key` генерирует случайный HMAC-ключ для подписи экспортов. `flight restore <метка|commit>` восстанавливает worktree из чекпоинта, не двигая HEAD; `--dry-run` показывает файлы, которые изменятся. `flight list --limit <n>` показывает только последние полёты с числом событий, чекпоинтов и заметок. `flight note "<текст>"` добавляет заметку в хеш-цепочку активного полёта; она видна в show, summary, HTML и экспорте. `flight grep "<текст>"` ищет по заметкам, командам, выводу команд, меткам чекпоинтов и именам полётов во всех сессиях, `--kind <тип>` ограничивает поиск одним типом события, а `--bundle <файл>` ищет внутри экспортированного бандла.
955
955
 
956
956
  `beacon` записывает заявление о проверке коммита: `beacon stamp --check tests=pass --check preflight=pass --key beacon.key` сохраняет коммит, tree, версию инструмента, агента, модель, команды, проверки и digest в `.oc-pilot/beacon.json`, а затем подписывает его HMAC или `ssh-keygen`. `beacon verify` ловит `[BEACON TAMPERED]` и `[UNATTRIBUTED]`; `beacon render --markdown` печатает комментарий для PR. Неподписанный beacon валиден, но не атрибутирован, поэтому в CI используйте `--require-signature`.
957
957
 
@@ -988,7 +988,7 @@ ZCode импортирует серверы из Claude Code, Codex, OpenCode и
988
988
  ```bash
989
989
  oc-pilot-mcp --cwd "C:\path\to\project"
990
990
  # версия зафиксирована для воспроизводимости:
991
- npx -y oc-pilot@0.152.0 mcp --cwd "C:\path\to\project"
991
+ npx -y oc-pilot@0.153.0 mcp --cwd "C:\path\to\project"
992
992
  ```
993
993
 
994
994
  Пример для Claude Code (`.mcp.json`):
@@ -1060,7 +1060,7 @@ jobs:
1060
1060
  - uses: actions/checkout@v4
1061
1061
  with:
1062
1062
  fetch-depth: 0
1063
- - uses: MyNameIsNikki/oc-pilot@v0.152.0
1063
+ - uses: MyNameIsNikki/oc-pilot@v0.153.0
1064
1064
  with:
1065
1065
  command: scan
1066
1066
  args: --base origin/${{ github.base_ref }} --fail-on-secrets
package/dist/cli.test.js CHANGED
@@ -1547,6 +1547,10 @@ test("flight records checkpoints, status, verify and end", () => {
1547
1547
  const deletedFlight = JSON.parse(deleted.stdout);
1548
1548
  assert.equal(deletedFlight.id, second.session.meta.id);
1549
1549
  assert.equal(deletedFlight.removed, true);
1550
+ const badLimit = runCli(["flight", "grep", "почему", "--limit", "0", "--json"], dir);
1551
+ assert.equal(badLimit.status, 2, badLimit.stderr);
1552
+ const badListLimit = runCli(["flight", "list", "--limit", "abc", "--json"], dir);
1553
+ assert.equal(badListLimit.status, 2, badListLimit.stderr);
1550
1554
  }
1551
1555
  finally {
1552
1556
  rmSync(dir, { recursive: true, force: true });