peaks-cli 2.0.1 → 2.0.3
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/.claude-plugin/marketplace.json +2 -2
- package/CHANGELOG.md +69 -0
- package/README-en.md +48 -10
- package/README.md +48 -10
- package/dist/src/cli/commands/code-review-commands.js +1 -1
- package/dist/src/services/code-review/ocr-service.js +12 -7
- package/dist/src/shared/version.d.ts +1 -1
- package/dist/src/shared/version.js +1 -1
- package/package.json +4 -2
- package/skills/peaks-rd/references/ocr-integration.md +24 -9
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"metadata": {
|
|
3
3
|
"pluginRoot": ".",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.3"
|
|
5
5
|
},
|
|
6
6
|
"plugins": [
|
|
7
7
|
{
|
|
8
8
|
"name": "peaks-cli",
|
|
9
9
|
"description": "Cross-AI-IDE workflow-gating CLI + 11-skill family. Turns LLM improvisation into auditable engineering process. Skills cover PRD / R&D / UI / QA / change-control / context / SOP definition / orchestration. Soft-fail gates block irreversible actions mid-conversation (even under --dangerously-skip-permissions).",
|
|
10
|
-
"version": "2.0.
|
|
10
|
+
"version": "2.0.3",
|
|
11
11
|
"author": {
|
|
12
12
|
"name": "SquabbyZ"
|
|
13
13
|
},
|
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## [2.0.3] — 2026-06-13
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **`@alibaba-group/open-code-review` reverted to `optionalDependency`**
|
|
15
|
+
(was promoted to a hard `dependency` in 2.0.1 and carried through
|
|
16
|
+
2.0.2). The ocr npm package's `postinstall` downloads a Go binary
|
|
17
|
+
via HTTPS, which fails in restricted/proxied environments and was
|
|
18
|
+
aborting the whole `npm i -g peaks-cli` flow. The 5-state detector
|
|
19
|
+
(`ready` / `package-missing` / `binary-missing` / `config-missing` /
|
|
20
|
+
`detection-failed`) and the soft-fail policy are unchanged — peaks-cli
|
|
21
|
+
never blocks on ocr being installed; it just no longer forces the
|
|
22
|
+
install. Users who want the second-opinion review run
|
|
23
|
+
`npm i -g @alibaba-group/open-code-review` explicitly. Under pnpm
|
|
24
|
+
they also need `pnpm approve-builds @alibaba-group/open-code-review`
|
|
25
|
+
for the binary download to run. Source-of-truth refactor (ocr config
|
|
26
|
+
under `peaksConfig.ocr.llm`) from 2.0.1 is unchanged.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
10
30
|
## [2.0.0] — 2026-06-12
|
|
11
31
|
|
|
12
32
|
### 🎯 Headline
|
|
@@ -29,6 +49,15 @@ alongside the LLM-only review. Soft-fails so missing ocr never blocks
|
|
|
29
49
|
a slice. New CLI: `peaks code-review detect-ocr` / `run-ocr`. See
|
|
30
50
|
`skills/peaks-rd/references/ocr-integration.md` for the contract.
|
|
31
51
|
|
|
52
|
+
> **Note:** This `optionalDependency` classification was briefly
|
|
53
|
+
> promoted to a hard `dependency` in 2.0.1 (alongside the source-of-truth
|
|
54
|
+
> refactor) because the user feedback was "peaks-cli should not leave
|
|
55
|
+
> install to the user". 2.0.3 reverts just the classification — the
|
|
56
|
+
> source-of-truth refactor stays — because the ocr postinstall
|
|
57
|
+
> downloads a Go binary via HTTPS, which fails in restricted/proxied
|
|
58
|
+
> environments and was aborting `npm i -g peaks-cli`. See the 2.0.3
|
|
59
|
+
> entry above for the full rationale.
|
|
60
|
+
|
|
32
61
|
### Breaking Changes
|
|
33
62
|
|
|
34
63
|
- **`.claude/rules/` is no longer the source of truth for project standards.**
|
|
@@ -71,6 +100,14 @@ config surface.
|
|
|
71
100
|
to download the platform binary still soft-fail at runtime
|
|
72
101
|
(`binary-missing` state) — the install-time failure risk is the
|
|
73
102
|
trade-off.
|
|
103
|
+
|
|
104
|
+
> **Reverted in 2.0.3.** The install-time failure risk turned out
|
|
105
|
+
> to bite too many real-world installs (corporate proxies, region
|
|
106
|
+
> firewalls, sandboxed dev environments all abort the whole
|
|
107
|
+
> `npm i -g peaks-cli`). 2.0.3 puts ocr back under
|
|
108
|
+
> `optionalDependencies`; everything else in this section
|
|
109
|
+
> (env-var injection, `config-template` CLI, `missingKeys`,
|
|
110
|
+
> source-of-truth under `peaksConfig.ocr.llm`) is unchanged.
|
|
74
111
|
- **`detectOcr` / `runOcrReview` no longer read `~/.opencodereview/config.json`.**
|
|
75
112
|
The source of truth is `peaksConfig.ocr.llm` (parsed by
|
|
76
113
|
`getOcrLlmConfig()` in `config-service.ts`). Missing fields surface
|
|
@@ -272,8 +309,40 @@ is skipped (`PEAKS_SKIP_AUTO_UPGRADE=1` or `npm i --ignore-scripts`).
|
|
|
272
309
|
|
|
273
310
|
---
|
|
274
311
|
|
|
312
|
+
## [2.0.2] — 2026-06-13
|
|
313
|
+
|
|
314
|
+
### Changed — README redesign (docs only)
|
|
315
|
+
|
|
316
|
+
The top of both `README.md` and `README-en.md` is rebuilt in the
|
|
317
|
+
RAG-Anything style requested from the published repo: card-grid
|
|
318
|
+
metadata (PROJECT / BASED ON / SKILLS.SH / STARS / VERSION / LICENSE
|
|
319
|
+
/ TESTS / LANG / DOWNLOADS / 中文 / QUICK START / VISITORS), a
|
|
320
|
+
multiline `readme-typing-svg` tagline animation, a
|
|
321
|
+
`github-readme-streak-stats` streak band, and a `komarev` visitor
|
|
322
|
+
counter. Both languages are structurally identical (same card grid,
|
|
323
|
+
same animations, same anchor links); only the tagline and
|
|
324
|
+
call-to-action text differ.
|
|
325
|
+
|
|
326
|
+
- `README.md` updated to the new layout (typing animation uses the
|
|
327
|
+
Chinese tagline: `peaks-cli: 跨 AI IDE 的工程门禁与编排`).
|
|
328
|
+
- `README-en.md` synced to mirror the new layout (typing animation
|
|
329
|
+
uses the English tagline: `peaks-cli: cross-AI-IDE engineering
|
|
330
|
+
gates & orchestration`).
|
|
331
|
+
- Card anchors renamed to ASCII-friendly slugs on the English file
|
|
332
|
+
(`30-seconds-to-running`, `5-minute-onboarding`, `11-skills-in-the-family`,
|
|
333
|
+
`killer-feature-un-bypassable-gates`) so the README renders
|
|
334
|
+
consistently on GitHub's auto-generated anchor list.
|
|
335
|
+
|
|
336
|
+
No code, CLI, or schema changes. The CLI still reports
|
|
337
|
+
`Peaks CLI 2.0.2` after `prepublish` regenerates
|
|
338
|
+
`src/shared/version.ts`.
|
|
339
|
+
|
|
340
|
+
---
|
|
341
|
+
|
|
275
342
|
## [1.4.2] — 2026-06-08
|
|
276
343
|
|
|
277
344
|
Last 1.x release. See git history pre-2.0.0 for details.
|
|
278
345
|
|
|
346
|
+
[2.0.2]: https://github.com/SquabbyZ/peaks-cli/releases/tag/v2.0.2
|
|
347
|
+
[2.0.1]: https://github.com/SquabbyZ/peaks-cli/releases/tag/v2.0.1
|
|
279
348
|
[2.0.0]: https://github.com/SquabbyZ/peaks-cli/releases/tag/v2.0.0
|
package/README-en.md
CHANGED
|
@@ -2,17 +2,57 @@
|
|
|
2
2
|
|
|
3
3
|
# ⛰️ Peaks
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
<img src="https://readme-typing-svg.demolab.com?font=Fira+Code&weight=700&size=22&duration=3000&pause=800&color=6366F1¢er=true&vCenter=true&multiline=true&width=720&height=110&lines=peaks-cli%3A%20cross-AI-IDE%20engineering%20gates%20%26%20orchestration;11%20%E2%9A%99%EF%B8%8F%20workflow%20skills%20%2B%20%E2%9A%96%EF%B8%8F%20executable%20gates;%E2%9C%89%EF%B8%8F%20%E2%9A%96%EF%B8%8F%20%E2%9C%89%EF%B8%8F%20%E2%9A%91%EF%B8%8F%20%E2%9A%96%EF%B8%8F%20%E2%9C%89%EF%B8%8F%20%E2%9A%91%EF%B8%8F%20gates%20%2B%20audit%20%2B%20cross-IDE%20adaptation" alt="peaks-cli tagline typing animation" />
|
|
6
6
|
|
|
7
7
|
**English** | [简体中文](./README.md)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
<table>
|
|
10
|
+
<tr>
|
|
11
|
+
<td align="center" width="180"><b>🔥 PROJECT</b></td>
|
|
12
|
+
<td align="center" width="180"><b>⚡ BASED ON</b></td>
|
|
13
|
+
<td align="center" width="180"><b>📚 SKILLS.SH</b></td>
|
|
14
|
+
</tr>
|
|
15
|
+
<tr>
|
|
16
|
+
<td align="center"><a href="https://github.com/SquabbyZ/peaks-cli">peaks-cli / Homepage</a></td>
|
|
17
|
+
<td align="center">11 Skills + Cross-IDE</td>
|
|
18
|
+
<td align="center"><a href="https://skills.sh/SquabbyZ/peaks-cli">Listed on skills.sh</a></td>
|
|
19
|
+
</tr>
|
|
20
|
+
<tr><td colspan="3"> </td></tr>
|
|
21
|
+
<tr>
|
|
22
|
+
<td align="center" width="180"><b>⭐ STARS</b></td>
|
|
23
|
+
<td align="center" width="180"><b>📦 VERSION</b></td>
|
|
24
|
+
<td align="center" width="180"><b>📄 LICENSE</b></td>
|
|
25
|
+
</tr>
|
|
26
|
+
<tr>
|
|
27
|
+
<td align="center"><a href="https://github.com/SquabbyZ/peaks-cli/stargazers"><img src="https://img.shields.io/github/stars/SquabbyZ/peaks-cli?style=for-the-badge&logo=github&logoColor=white" alt="stars" /></a></td>
|
|
28
|
+
<td align="center"><a href="https://www.npmjs.com/package/peaks-cli"><img src="https://img.shields.io/npm/v/peaks-cli?style=for-the-badge&logo=npm&logoColor=white&color=CB3837" alt="npm version" /></a></td>
|
|
29
|
+
<td align="center"><a href="./LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue?style=for-the-badge" alt="license" /></a></td>
|
|
30
|
+
</tr>
|
|
31
|
+
<tr><td colspan="3"> </td></tr>
|
|
32
|
+
<tr>
|
|
33
|
+
<td align="center" width="180"><b>🧪 TESTS</b></td>
|
|
34
|
+
<td align="center" width="180"><b>🔧 LANG</b></td>
|
|
35
|
+
<td align="center" width="180"><b>📥 DOWNLOADS</b></td>
|
|
36
|
+
</tr>
|
|
37
|
+
<tr>
|
|
38
|
+
<td align="center"><b>2,800+</b></td>
|
|
39
|
+
<td align="center"><b>TypeScript</b></td>
|
|
40
|
+
<td align="center"><a href="https://www.npmjs.com/package/peaks-cli"><img src="https://img.shields.io/npm/dm/peaks-cli?style=for-the-badge&logo=npm&logoColor=white&color=CB3837" alt="downloads" /></a></td>
|
|
41
|
+
</tr>
|
|
42
|
+
<tr><td colspan="3"> </td></tr>
|
|
43
|
+
<tr>
|
|
44
|
+
<td align="center" width="180"><b>🌐 中文</b></td>
|
|
45
|
+
<td align="center" width="180"><b>🚀 QUICK START</b></td>
|
|
46
|
+
<td align="center" width="180"><b>👁️ VISITORS</b></td>
|
|
47
|
+
</tr>
|
|
48
|
+
<tr>
|
|
49
|
+
<td align="center"><a href="./README.md">简体中文</a></td>
|
|
50
|
+
<td align="center"><a href="#-30-seconds-to-running">30s to running →</a></td>
|
|
51
|
+
<td align="center"><img src="https://komarev.com/ghpvc/?username=SquabbyZ&repo=peaks-cli&label=views&color=blue&style=for-the-badge" alt="visitors" /></td>
|
|
52
|
+
</tr>
|
|
53
|
+
</table>
|
|
54
|
+
|
|
55
|
+
<img src="https://github-readme-streak-stats.herokuapp.com?user=SquabbyZ&repo=peaks-cli&theme=radical&hide_border=true&date_format=j%20M%5B%20Y%5D" alt="GitHub Streak Stats" />
|
|
16
56
|
|
|
17
57
|
[Install](#-30-seconds-to-running) · [5-min onboarding](#-5-minute-onboarding) · [Skill family](#-11-skills-in-the-family) · [Killer feature: un-bypassable gates](#-killer-feature-un-bypassable-gates)
|
|
18
58
|
|
|
@@ -221,6 +261,4 @@ See [`CHANGELOG.md`](./CHANGELOG.md) and [`docs/`](./docs/) for details.
|
|
|
221
261
|
|
|
222
262
|
⭐ [Star peaks-cli on GitHub](https://github.com/SquabbyZ/peaks-cli) · 🔍 [Browse on skills.sh](https://skills.sh/SquabbyZ/peaks-cli)
|
|
223
263
|
|
|
224
|
-
Make your AI IDE work like a disciplined engineering team.
|
|
225
|
-
|
|
226
264
|
</div>
|
package/README.md
CHANGED
|
@@ -2,17 +2,57 @@
|
|
|
2
2
|
|
|
3
3
|
# ⛰️ Peaks
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
<img src="https://readme-typing-svg.demolab.com?font=Fira+Code&weight=700&size=22&duration=3000&pause=800&color=6366F1¢er=true&vCenter=true&multiline=true&width=720&height=110&lines=peaks-cli%3A%20跨%20AI%20IDE%20的工程门禁与编排;11%20个%E2%9A%99%EF%B8%8F%20工作流技能%20%2B%20%E2%9A%96%EF%B8%8F%20可执行门禁;%E2%9C%89%EF%B8%8F%20%E2%9A%96%EF%B8%8F%20%E2%9C%89%EF%B8%8F%20%E2%9A%91%EF%B8%8F%20%E2%9A%96%EF%B8%8F%20%E2%9C%89%EF%B8%8F%20%E2%9A%91%EF%B8%8F%20门禁%20%2B%20审计%20%2B%20跨%20IDE%20适配" alt="peaks-cli tagline typing animation" />
|
|
6
6
|
|
|
7
7
|
[English](./README-en.md) | **简体中文**
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
<table>
|
|
10
|
+
<tr>
|
|
11
|
+
<td align="center" width="180"><b>🔥 PROJECT</b></td>
|
|
12
|
+
<td align="center" width="180"><b>⚡ BASED ON</b></td>
|
|
13
|
+
<td align="center" width="180"><b>📚 SKILLS.SH</b></td>
|
|
14
|
+
</tr>
|
|
15
|
+
<tr>
|
|
16
|
+
<td align="center"><a href="https://github.com/SquabbyZ/peaks-cli">peaks-cli / 首页</a></td>
|
|
17
|
+
<td align="center">11 Skills + Cross-IDE</td>
|
|
18
|
+
<td align="center"><a href="https://skills.sh/SquabbyZ/peaks-cli">在 skills.sh 收录</a></td>
|
|
19
|
+
</tr>
|
|
20
|
+
<tr><td colspan="3"> </td></tr>
|
|
21
|
+
<tr>
|
|
22
|
+
<td align="center" width="180"><b>⭐ STARS</b></td>
|
|
23
|
+
<td align="center" width="180"><b>📦 VERSION</b></td>
|
|
24
|
+
<td align="center" width="180"><b>📄 LICENSE</b></td>
|
|
25
|
+
</tr>
|
|
26
|
+
<tr>
|
|
27
|
+
<td align="center"><a href="https://github.com/SquabbyZ/peaks-cli/stargazers"><img src="https://img.shields.io/github/stars/SquabbyZ/peaks-cli?style=for-the-badge&logo=github&logoColor=white" alt="stars" /></a></td>
|
|
28
|
+
<td align="center"><a href="https://www.npmjs.com/package/peaks-cli"><img src="https://img.shields.io/npm/v/peaks-cli?style=for-the-badge&logo=npm&logoColor=white&color=CB3837" alt="npm version" /></a></td>
|
|
29
|
+
<td align="center"><a href="./LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue?style=for-the-badge" alt="license" /></a></td>
|
|
30
|
+
</tr>
|
|
31
|
+
<tr><td colspan="3"> </td></tr>
|
|
32
|
+
<tr>
|
|
33
|
+
<td align="center" width="180"><b>🧪 TESTS</b></td>
|
|
34
|
+
<td align="center" width="180"><b>🔧 LANG</b></td>
|
|
35
|
+
<td align="center" width="180"><b>📥 DOWNLOADS</b></td>
|
|
36
|
+
</tr>
|
|
37
|
+
<tr>
|
|
38
|
+
<td align="center"><b>2,800+</b></td>
|
|
39
|
+
<td align="center"><b>TypeScript</b></td>
|
|
40
|
+
<td align="center"><a href="https://www.npmjs.com/package/peaks-cli"><img src="https://img.shields.io/npm/dm/peaks-cli?style=for-the-badge&logo=npm&logoColor=white&color=CB3837" alt="downloads" /></a></td>
|
|
41
|
+
</tr>
|
|
42
|
+
<tr><td colspan="3"> </td></tr>
|
|
43
|
+
<tr>
|
|
44
|
+
<td align="center" width="180"><b>🌐 中文</b></td>
|
|
45
|
+
<td align="center" width="180"><b>🚀 QUICK START</b></td>
|
|
46
|
+
<td align="center" width="180"><b>👁️ VISITORS</b></td>
|
|
47
|
+
</tr>
|
|
48
|
+
<tr>
|
|
49
|
+
<td align="center"><a href="./README.md">简体中文</a></td>
|
|
50
|
+
<td align="center"><a href="#-30-秒跑起来">30 秒跑起来 →</a></td>
|
|
51
|
+
<td align="center"><img src="https://komarev.com/ghpvc/?username=SquabbyZ&repo=peaks-cli&label=views&color=blue&style=for-the-badge" alt="visitors" /></td>
|
|
52
|
+
</tr>
|
|
53
|
+
</table>
|
|
54
|
+
|
|
55
|
+
<img src="https://github-readme-streak-stats.herokuapp.com?user=SquabbyZ&repo=peaks-cli&theme=radical&hide_border=true&date_format=j%20M%5B%20Y%5D" alt="GitHub Streak Stats" />
|
|
16
56
|
|
|
17
57
|
[安装](#-30-秒跑起来) · [5 分钟上手](#-5-分钟上手) · [技能家族](#-11-个技能家族) · [杀手锏:不可绕过的门禁](#-杀手锏不可绕过的门禁)
|
|
18
58
|
|
|
@@ -221,6 +261,4 @@ peaks project dashboard / memories
|
|
|
221
261
|
|
|
222
262
|
⭐ [Star peaks-cli on GitHub](https://github.com/SquabbyZ/peaks-cli) · 🔍 [Browse on skills.sh](https://skills.sh/SquabbyZ/peaks-cli)
|
|
223
263
|
|
|
224
|
-
让你的 AI IDE 像一支训练有素的工程团队。
|
|
225
|
-
|
|
226
264
|
</div>
|
|
@@ -5,7 +5,7 @@ import { fail, ok } from '../../shared/result.js';
|
|
|
5
5
|
export function registerCodeReviewCommands(program, io) {
|
|
6
6
|
const codeReview = program
|
|
7
7
|
.command('code-review')
|
|
8
|
-
.description('Code-review primitives for peaks-rd Gate B3. Wraps the soft-optional `@alibaba-group/open-code-review` (ocr) tool when it is installed + configured; peaks-rd uses the structured JSON output as a second-opinion review alongside its own LLM review. ocr
|
|
8
|
+
.description('Code-review primitives for peaks-rd Gate B3. Wraps the soft-optional `@alibaba-group/open-code-review` (ocr) tool when it is installed + configured; peaks-rd uses the structured JSON output as a second-opinion review alongside its own LLM review. ocr is an optional dependency of peaks-cli 2.0.3+ (was briefly promoted to a hard dependency in 2.0.1/2.0.2 — reverted because its postinstall downloads a Go binary via HTTPS and would otherwise abort `npm i -g peaks-cli` in restricted environments). LLM endpoint config lives under `peaksConfig.ocr.llm` in the user config — run `peaks code-review config-template` to see the JSON snippet to paste.');
|
|
9
9
|
addJsonOption(codeReview
|
|
10
10
|
.command('detect-ocr')
|
|
11
11
|
.description('Read-only probe: returns the ocr install + config state as a JSON envelope (5 reasons: ready / package-missing / binary-missing / config-missing / detection-failed). peaks-rd calls this first to decide whether to invoke `run-ocr`. Reads the LLM endpoint from `peaksConfig.ocr.llm` (not from ~/.opencodereview/config.json).')
|
|
@@ -36,12 +36,17 @@
|
|
|
36
36
|
* To see the JSON template to paste, run:
|
|
37
37
|
* `peaks code-review config-template`
|
|
38
38
|
*
|
|
39
|
-
* The ocr package is declared in package.json:
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
* `
|
|
44
|
-
*
|
|
39
|
+
* The ocr package is declared in package.json:optionalDependencies
|
|
40
|
+
* (was promoted to `dependencies` in 2.0.1 and reverted in 2.0.3 —
|
|
41
|
+
* the ocr postinstall downloads a Go binary via HTTPS, which fails
|
|
42
|
+
* in restricted/proxied environments and would otherwise abort the
|
|
43
|
+
* whole `npm i -g peaks-cli` flow). Peaks-cli ships with ocr *not*
|
|
44
|
+
* installed; if the user wants it, they run
|
|
45
|
+
* `npm i -g @alibaba-group/open-code-review`
|
|
46
|
+
* and peaks-cli's 5-state detector (below) reports whether the
|
|
47
|
+
* binary is actually usable. pnpm-based installs additionally need
|
|
48
|
+
* `pnpm approve-builds @alibaba-group/open-code-review` for the
|
|
49
|
+
* binary download to run. Either way, peaks-cli never blocks on it.
|
|
45
50
|
*/
|
|
46
51
|
import { spawnSync } from 'node:child_process';
|
|
47
52
|
import { existsSync } from 'node:fs';
|
|
@@ -50,7 +55,7 @@ import { fileURLToPath } from 'node:url';
|
|
|
50
55
|
import { dirname } from 'node:path';
|
|
51
56
|
const OCR_DETECT_TIMEOUT_MS = 5000;
|
|
52
57
|
const OCR_REVIEW_TIMEOUT_MS = 180000;
|
|
53
|
-
const OCR_INSTALL_HINT = 'Install: `npm i -g @alibaba-group/open-code-review` (
|
|
58
|
+
const OCR_INSTALL_HINT = 'Install: `npm i -g @alibaba-group/open-code-review` (peaks-cli 2.0.3 ships with ocr as an optional dependency — its postinstall downloads a Go binary via HTTPS, which fails in some restricted/proxied environments; that\'s why peaks-cli does not auto-install it). Then add your LLM endpoint to ~/.peaks/config.json — run `peaks code-review config-template` for the JSON snippet to paste. Under pnpm you also need `pnpm approve-builds @alibaba-group/open-code-review` to allow the binary download.';
|
|
54
59
|
const OCR_CONFIG_TEMPLATE = JSON.stringify({
|
|
55
60
|
ocr: {
|
|
56
61
|
llm: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const CLI_VERSION = "2.0.
|
|
1
|
+
export declare const CLI_VERSION = "2.0.3";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const CLI_VERSION = "2.0.
|
|
1
|
+
export const CLI_VERSION = "2.0.3";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "peaks-cli",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "Cross-AI-IDE workflow-gating CLI + skill family (Claude Code shipped, Trae in progress; Codex / Cursor / Qoder / Tongyi Lingma on the roadmap).",
|
|
5
5
|
"author": "SquabbyZ",
|
|
6
6
|
"license": "MIT",
|
|
@@ -59,12 +59,14 @@
|
|
|
59
59
|
"node": ">=20.0.0"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@alibaba-group/open-code-review": "1.3.1",
|
|
63
62
|
"@colbymchenry/codegraph": "0.7.10",
|
|
64
63
|
"commander": "^12.1.0",
|
|
65
64
|
"fzf": "^0.5.2",
|
|
66
65
|
"headroom-ai": "0.22.4"
|
|
67
66
|
},
|
|
67
|
+
"optionalDependencies": {
|
|
68
|
+
"@alibaba-group/open-code-review": "1.3.1"
|
|
69
|
+
},
|
|
68
70
|
"devDependencies": {
|
|
69
71
|
"@types/node": "^22.10.2",
|
|
70
72
|
"@vitest/coverage-v8": "^2.1.8",
|
|
@@ -2,11 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
> Soft-optional second-opinion code review for peaks-rd Gate B3.
|
|
4
4
|
> Mirrors the ECC 64-agents pattern (spec §7.2): peaks-cli ships
|
|
5
|
-
> `@alibaba-group/open-code-review` as
|
|
6
|
-
>
|
|
7
|
-
>
|
|
8
|
-
>
|
|
9
|
-
>
|
|
5
|
+
> `@alibaba-group/open-code-review` as an **`optionalDependency`**
|
|
6
|
+
> (was promoted to `dependencies` in 2.0.1 and reverted in 2.0.3
|
|
7
|
+
> because its postinstall downloads a Go binary via HTTPS and would
|
|
8
|
+
> otherwise abort `npm i -g peaks-cli` in restricted/proxied
|
|
9
|
+
> environments). The LLM endpoint config still lives under
|
|
10
|
+
> `peaksConfig.ocr.llm` in the user's `~/.peaks/config.json` (single
|
|
11
|
+
> source of truth, user-managed). When the user installs + configures
|
|
12
|
+
> ocr, the wrapper turns its output into structured `code-review.md`
|
|
13
|
+
> evidence; when missing, peaks-rd proceeds LLM-only and the slice
|
|
14
|
+
> ships without the second opinion.
|
|
10
15
|
|
|
11
16
|
## What ocr is
|
|
12
17
|
|
|
@@ -34,9 +39,19 @@ ships without the second opinion.
|
|
|
34
39
|
|
|
35
40
|
## Install
|
|
36
41
|
|
|
37
|
-
`@alibaba-group/open-code-review` is
|
|
38
|
-
peaks-cli 2.0.
|
|
39
|
-
|
|
42
|
+
`@alibaba-group/open-code-review` is an **`optionalDependency`** of
|
|
43
|
+
peaks-cli 2.0.3+ (was a required `dependency` in 2.0.1/2.0.2; reverted
|
|
44
|
+
because the postinstall downloads a Go binary via HTTPS, which fails in
|
|
45
|
+
restricted/proxied environments and would otherwise abort
|
|
46
|
+
`npm i -g peaks-cli`). peaks-cli does NOT auto-install it. To enable
|
|
47
|
+
the second-opinion review:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npm i -g @alibaba-group/open-code-review
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
(Under pnpm you also need `pnpm approve-builds @alibaba-group/open-code-review`
|
|
54
|
+
so the binary download script can run.) Verify with:
|
|
40
55
|
|
|
41
56
|
```bash
|
|
42
57
|
peaks code-review detect-ocr --json
|
|
@@ -47,7 +62,7 @@ Five possible states:
|
|
|
47
62
|
| state | Meaning | Recovery |
|
|
48
63
|
|---|---|---|
|
|
49
64
|
| `ready` | Installed + binary downloaded + peaks-cli's `peaksConfig.ocr.llm` valid | Nothing — `run-ocr` will work. |
|
|
50
|
-
| `package-missing` | npm dep not installed (
|
|
65
|
+
| `package-missing` | npm dep not installed (peaks-cli 2.0.3+ ships with ocr as an `optionalDependency`, so the common cause is the user has not installed it yet, or it was removed from node_modules) | `npm i -g @alibaba-group/open-code-review` (peaks-cli no longer auto-installs it; under pnpm also run `pnpm approve-builds @alibaba-group/open-code-review`) |
|
|
51
66
|
| `binary-missing` | npm dep present but Go binary did not download | `pnpm approve-builds @alibaba-group/open-code-review`, OR run `node node_modules/@alibaba-group/open-code-review/scripts/install.js`, OR manually fetch from https://github.com/alibaba/open-code-review/releases and place the binary at the path shown in `nextActions[2]`. |
|
|
52
67
|
| `config-missing` | binary present but `peaksConfig.ocr.llm` is empty or partial | See "Configure" below. |
|
|
53
68
|
| `detection-failed` | Unexpected error during detection | Inspect stderr; re-run probe. |
|