@alibaba-group/open-code-review 1.9.10 → 1.10.1
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/README.ja-JP.md +3 -0
- package/README.ko-KR.md +3 -0
- package/README.md +3 -0
- package/README.ru-RU.md +3 -0
- package/README.zh-CN.md +3 -0
- package/bin/ocr.js +19 -1
- package/package.json +10 -9
package/README.ja-JP.md
CHANGED
|
@@ -152,6 +152,9 @@ ocr scan # リポジトリ全体をスキャン
|
|
|
152
152
|
ocr scan --path internal/agent # ディレクトリまたは特定のファイルをスキャン
|
|
153
153
|
ocr scan --resume <session-id> # 中断したフルファイルスキャンを再開
|
|
154
154
|
|
|
155
|
+
# 結果をファイルに出力(AI ホストエージェント推奨)
|
|
156
|
+
ocr review --format json --output result.json
|
|
157
|
+
|
|
155
158
|
# デリゲートモード — AI コーディングエージェントが自らレビューを実行
|
|
156
159
|
# OCR はファイル選択とルール解決を担当。LLM 設定不要
|
|
157
160
|
ocr delegate preview
|
package/README.ko-KR.md
CHANGED
|
@@ -152,6 +152,9 @@ ocr scan # 전체 repository 스캔
|
|
|
152
152
|
ocr scan --path internal/agent # 디렉터리 또는 특정 파일 스캔
|
|
153
153
|
ocr scan --resume <session-id> # 중단된 전체 파일 스캔 재개
|
|
154
154
|
|
|
155
|
+
# 결과를 파일로 저장 (AI 호스트 에이전트 권장)
|
|
156
|
+
ocr review --format json --output result.json
|
|
157
|
+
|
|
155
158
|
# 위임 모드 — AI 코딩 에이전트가 직접 리뷰 수행
|
|
156
159
|
# OCR은 파일 선택과 규칙 해석만 담당; LLM 설정 불필요
|
|
157
160
|
ocr delegate preview
|
package/README.md
CHANGED
|
@@ -152,6 +152,9 @@ ocr scan # scan the entire repository
|
|
|
152
152
|
ocr scan --path internal/agent # scan a directory or specific files
|
|
153
153
|
ocr scan --resume <session-id> # resume an interrupted full-file scan
|
|
154
154
|
|
|
155
|
+
# Save results to a file (recommended for AI host agents)
|
|
156
|
+
ocr review --format json --output result.json
|
|
157
|
+
|
|
155
158
|
# Delegation mode — let your AI coding agent perform the review itself
|
|
156
159
|
# OCR handles file selection and rule resolution; no LLM configuration needed
|
|
157
160
|
ocr delegate preview
|
package/README.ru-RU.md
CHANGED
|
@@ -152,6 +152,9 @@ ocr scan # сканировать весь репози
|
|
|
152
152
|
ocr scan --path internal/agent # сканировать каталог или конкретные файлы
|
|
153
153
|
ocr scan --resume <session-id> # возобновить прерванное полнофайловое сканирование
|
|
154
154
|
|
|
155
|
+
# Сохранить результаты в файл (рекомендуется для хост-агентов ИИ)
|
|
156
|
+
ocr review --format json --output result.json
|
|
157
|
+
|
|
155
158
|
# Режим делегирования — ИИ-агент сам выполняет ревью
|
|
156
159
|
# OCR отвечает за выбор файлов и разрешение правил; настройка LLM не требуется
|
|
157
160
|
ocr delegate preview
|
package/README.zh-CN.md
CHANGED
|
@@ -152,6 +152,9 @@ ocr scan # 扫描整个仓库
|
|
|
152
152
|
ocr scan --path internal/agent # 扫描指定目录或文件
|
|
153
153
|
ocr scan --resume <session-id> # 恢复中断的全量文件扫描
|
|
154
154
|
|
|
155
|
+
# 将结果输出到文件(AI 宿主 agent 推荐)
|
|
156
|
+
ocr review --format json --output result.json
|
|
157
|
+
|
|
155
158
|
# 委托模式 — 让你的 AI 编程 agent 自己执行评审
|
|
156
159
|
# OCR 负责文件选择和规则解析;无需配置 LLM
|
|
157
160
|
ocr delegate preview
|
package/bin/ocr.js
CHANGED
|
@@ -14,6 +14,24 @@ const { resolveNativeBinary } = require("../scripts/platform");
|
|
|
14
14
|
const { version: packageVersion } = require("../package.json");
|
|
15
15
|
const { shouldShowUpdateHint } = require("../scripts/version");
|
|
16
16
|
|
|
17
|
+
// Maps a child process result to the launcher exit code.
|
|
18
|
+
// A child killed by a signal has status = null, which must not fall through
|
|
19
|
+
// to a clean 0 — pipelines gating on the exit code would read an OOM kill
|
|
20
|
+
// (or any signal death) as success. Conventional 128+signo is used instead.
|
|
21
|
+
function launcherExitCode(result) {
|
|
22
|
+
if (result.signal) {
|
|
23
|
+
return 128 + (os.constants.signals[result.signal] ?? 1);
|
|
24
|
+
}
|
|
25
|
+
return result.status ?? (result.error ? 1 : 0);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
module.exports = { launcherExitCode };
|
|
29
|
+
|
|
30
|
+
if (require.main !== module) {
|
|
31
|
+
// Required as a module (tests); the launcher body below must not run.
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
|
|
17
35
|
const resolved = resolveNativeBinary();
|
|
18
36
|
if (!resolved) {
|
|
19
37
|
console.error(
|
|
@@ -64,4 +82,4 @@ const result = spawnSync(binaryPath, process.argv.slice(2), {
|
|
|
64
82
|
env: process.env,
|
|
65
83
|
});
|
|
66
84
|
|
|
67
|
-
process.exit(
|
|
85
|
+
process.exit(launcherExitCode(result));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alibaba-group/open-code-review",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.1",
|
|
4
4
|
"description": "OpenCodeReview CLI — AI-powered code review tool",
|
|
5
5
|
"bin": {
|
|
6
6
|
"ocr": "bin/ocr.js"
|
|
@@ -15,8 +15,9 @@
|
|
|
15
15
|
],
|
|
16
16
|
"scripts": {
|
|
17
17
|
"postinstall": "node scripts/install.js",
|
|
18
|
-
"test:github-actions": "node scripts/github-actions/post-review-comments.test.js && node scripts/github-actions/check-translation-sync.test.js",
|
|
19
|
-
"test:update": "node scripts/version.test.js"
|
|
18
|
+
"test:github-actions": "node scripts/github-actions/post-review-comments.test.js && node scripts/github-actions/check-translation-sync.test.js && node scripts/github-actions/action-contract.test.js",
|
|
19
|
+
"test:update": "node scripts/version.test.js",
|
|
20
|
+
"test:launcher": "node bin/ocr.test.js"
|
|
20
21
|
},
|
|
21
22
|
"repository": {
|
|
22
23
|
"type": "git",
|
|
@@ -30,12 +31,12 @@
|
|
|
30
31
|
"checksumPattern": "https://github.com/alibaba/open-code-review/releases/download/v{version}/sha256sum.txt"
|
|
31
32
|
},
|
|
32
33
|
"optionalDependencies": {
|
|
33
|
-
"@alibaba-group/ocr-darwin-arm64": "1.
|
|
34
|
-
"@alibaba-group/ocr-darwin-x64": "1.
|
|
35
|
-
"@alibaba-group/ocr-linux-arm64": "1.
|
|
36
|
-
"@alibaba-group/ocr-linux-x64": "1.
|
|
37
|
-
"@alibaba-group/ocr-win32-arm64": "1.
|
|
38
|
-
"@alibaba-group/ocr-win32-x64": "1.
|
|
34
|
+
"@alibaba-group/ocr-darwin-arm64": "1.10.1",
|
|
35
|
+
"@alibaba-group/ocr-darwin-x64": "1.10.1",
|
|
36
|
+
"@alibaba-group/ocr-linux-arm64": "1.10.1",
|
|
37
|
+
"@alibaba-group/ocr-linux-x64": "1.10.1",
|
|
38
|
+
"@alibaba-group/ocr-win32-arm64": "1.10.1",
|
|
39
|
+
"@alibaba-group/ocr-win32-x64": "1.10.1"
|
|
39
40
|
},
|
|
40
41
|
"engines": {
|
|
41
42
|
"node": ">=14"
|