oc-pilot 0.154.0 → 0.156.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,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.156.0
4
+
5
+ - `flight diff --bundle` теперь возвращает код 2 для повреждённого бандла, как и остальные команды чтения bundle.
6
+ - 905 тестов; версия 0.156.0.
7
+
8
+ ## 0.155.0
9
+
10
+ - `flight diff --bundle <файл> [--to <метка|commit>]` показывает патч чекпоинта из экспортированного бандла без локального журнала.
11
+ - MCP `flight_diff` принимает `bundle`; документация; 905 тестов; версия 0.155.0.
12
+
3
13
  ## 0.154.0
4
14
 
5
15
  - `flight stats --html` показывает последний полёт: id, имя, статус и время старта в отдельном блоке дашборда.
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; 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, including the last flight. `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 (or prints a checkpoint patch from an exported bundle with `--bundle <file>`), 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, including the last flight. `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.154.0 mcp --cwd /absolute/path/to/project
1040
+ npx -y oc-pilot@0.156.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.154.0
1215
+ - uses: MyNameIsNikki/oc-pilot@v0.156.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.154.0.tar.gz
1238
+ - run: npm install -g https://github.com/MyNameIsNikki/oc-pilot/archive/refs/tags/v0.156.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` сравнивает чекпоинты (или показывает патч чекпоинта из экспортированного бандла с `--bundle <файл>`), а `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.154.0 mcp --cwd "C:\path\to\project"
991
+ npx -y oc-pilot@0.156.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.154.0
1063
+ - uses: MyNameIsNikki/oc-pilot@v0.156.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
@@ -1497,6 +1497,11 @@ test("flight records checkpoints, status, verify and end", () => {
1497
1497
  assert.equal(grepBundle.status, 0, grepBundle.stderr);
1498
1498
  const grepFromBundle = JSON.parse(grepBundle.stdout);
1499
1499
  assert.ok(grepFromBundle.total >= 1);
1500
+ const bundleDiff = runCli(["flight", "diff", "--bundle", "bundle.json", "--to", "after-b", "--json"], dir);
1501
+ assert.equal(bundleDiff.status, 0, bundleDiff.stderr);
1502
+ const bundlePatch = JSON.parse(bundleDiff.stdout);
1503
+ assert.equal(bundlePatch.label, "after-b");
1504
+ assert.match(bundlePatch.patch, /b\.txt/);
1500
1505
  const bundleText = readFileSync(join(dir, "bundle.json"), "utf8");
1501
1506
  writeFileSync(join(dir, "bundle-bad.json"), bundleText.replace("почему так", "подменено"), "utf8");
1502
1507
  const grepBad = runCli(["flight", "grep", "почему", "--bundle", "bundle-bad.json", "--json"], dir);
@@ -1514,6 +1519,8 @@ test("flight records checkpoints, status, verify and end", () => {
1514
1519
  assert.equal(summaryDigest.status, 2, summaryDigest.stderr);
1515
1520
  const htmlDigest = runCli(["flight", "html", "--bundle", "bundle-digest.json", "--json"], dir);
1516
1521
  assert.equal(htmlDigest.status, 2, htmlDigest.stderr);
1522
+ const diffDigest = runCli(["flight", "diff", "--bundle", "bundle-digest.json", "--to", "after-b", "--json"], dir);
1523
+ assert.equal(diffDigest.status, 2, diffDigest.stderr);
1517
1524
  const filtered = runCli(["flight", "show", "--id", started.session.meta.id, "--kind", "note", "--json"], dir);
1518
1525
  assert.equal(filtered.status, 0, filtered.stderr);
1519
1526
  const filteredShow = JSON.parse(filtered.stdout);