@jayyuen66/dsh-ocr-review 0.1.11 → 0.1.12
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 +15 -0
- package/README.md +7 -7
- package/README.zh-CN.md +7 -7
- package/THIRD_PARTY_NOTICES.md +6 -6
- package/client.js +54 -639
- package/cordis.patch.yml +3 -0
- package/docs/DETAIL.md +1 -1
- package/docs/DETAIL.zh.md +2 -2
- package/host.js +3 -3
- package/package.json +59 -57
package/cordis.patch.yml
CHANGED
|
@@ -14,5 +14,8 @@
|
|
|
14
14
|
# registry 包名解析;12.1.0/12.2.0 复现,12.2.0 的 release notes 无修复),12.3.0 起修复。
|
|
15
15
|
# 把本包目录加进 profile 前先确认 pnpm ≥12.3.0;从 registry 装不受影响。
|
|
16
16
|
- insert:
|
|
17
|
+
# 故意不写 id:shared 是本包 patch 启用的内部组件行,不是用户可停用的独立组件;
|
|
18
|
+
# 写 id 会让插件页出现一个可关闭的组件,关闭后本包设置卡会失去组件供应。
|
|
19
|
+
- name: "@jayyuen66/dsh-plugin-shared"
|
|
17
20
|
- id: ocr-review
|
|
18
21
|
name: "@jayyuen66/dsh-ocr-review"
|
package/docs/DETAIL.md
CHANGED
|
@@ -19,7 +19,7 @@ The card's MCP-servers editor writes the **external `ocr` tool's own** configura
|
|
|
19
19
|
|
|
20
20
|
## What it needs from outside
|
|
21
21
|
|
|
22
|
-
The `ocr` command line, expected at version **1.13.
|
|
22
|
+
The `ocr` command line, expected at version **1.13.5**; the expectation is declared once as `ocrCliVersion` in `package.json`, and the code constant plus both READMEs mirror that string, so a mismatch is reported (as a hint, never a hard failure) rather than papered over. Install paths are `brew install open-code-review` or `npm i -g @alibaba-group/open-code-review@1.13.5`. With no candidate on PATH at all, the pre-check reports "no ocr candidate on either path" plus an install hint; "command not found" (exit 127) is the different case where a candidate exists but the binary cannot actually be run. The version probe always forces `OCR_NO_UPDATE=1` so probing cannot trigger an upgrade.
|
|
23
23
|
|
|
24
24
|
API credentials are not stored here: the plugin writes a `api_key_cmd` that calls a helper script, so the key is fetched at run time instead of landing in a config file. If that script is missing, the card warns rather than sending an unauthenticated request.
|
|
25
25
|
|
package/docs/DETAIL.zh.md
CHANGED
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
|
|
16
16
|
## 要重启的值
|
|
17
17
|
|
|
18
|
-
`llmTestTimeoutMs`(90000)、`startupVerify
|
|
18
|
+
`llmTestTimeoutMs`(90000)、`startupVerify`(默认开:装载时既自检端点、也做一次 CLI 版本测量,两者同受这一位门控——它管的是装载期要不要起进程)、`ocrBackgroundMaxMs`(0 表示不设兜底窗口)、`stdoutMaxBytes`(400000)、`ocrNoAutoUpdate`(默认 false,即保留上游的自动升级,除非你明确关掉)、`ocrInstallHint`(`both`/`brew`/`npm`)。写在本插件于 `cordis.patch.yml` 注册行的 `config:` 块,改值随重启生效。
|
|
19
19
|
|
|
20
20
|
## 需要外部提供什么
|
|
21
21
|
|
|
22
|
-
`ocr` 命令行,期望版本 **1.13.
|
|
22
|
+
`ocr` 命令行,期望版本 **1.13.5**;这个期望唯一声明在 `package.json` 的 `ocrCliVersion`,代码常量与两份 README 镜像同一个字符串,版本不符只作为提示报出,从不中断评审。装法是 `brew install open-code-review` 或 `npm i -g @alibaba-group/open-code-review@1.13.5`。PATH 上一个候选都没有时,预检报「no ocr candidate on either path」并附安装提示;「command not found」(exit 127)是另一种情况:候选在,但真二进制跑不起来。版本探测一律强制 `OCR_NO_UPDATE=1`,以免探测顺手触发升级。
|
|
23
23
|
|
|
24
24
|
API 凭据不存这里:本插件写的是一个 `api_key_cmd`,运行时的密钥由那支辅助脚本现取,不进配置文件。脚本缺失时卡上给出告警,而不是发一次没有鉴权的请求。
|
|
25
25
|
|
package/host.js
CHANGED
|
@@ -1000,7 +1000,7 @@ function resolveOutputFormat(value) {
|
|
|
1000
1000
|
// lib/cli.ts
|
|
1001
1001
|
/** Homebrew 安装路径(`Cellar` / `Homebrew` 任一段)。 */
|
|
1002
1002
|
const HOMEBREW_PATH = /(?:^|[/\\])(?:Cellar|Homebrew)(?:[/\\]|$)/iu;
|
|
1003
|
-
/** `ocr` 版本行:`open-code-review v1.13.
|
|
1003
|
+
/** `ocr` 版本行:`open-code-review v1.13.5`(允许预发布/构建元数据)。 */
|
|
1004
1004
|
const OCR_VERSION = /open-code-review\s+v?(?<version>\d+\.\d+(?:\.\d+)?(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?)/u;
|
|
1005
1005
|
/** `--exclude` 的模式条数上限。**不是审查范围的上限**,只是防一条失控输入把命令串撑爆;
|
|
1006
1006
|
* 真实使用里几十条就到头,给到 2000 是为了"尽量不截断"——超了会明确告警,不静默丢。 */
|
|
@@ -1033,7 +1033,7 @@ const BACKGROUND_FLAG = "--background";
|
|
|
1033
1033
|
* test/readme-parity.test.ts 再断言两侧 README 写的也是它。三处只有一处是人写的、
|
|
1034
1034
|
* 靠门禁钉住另两处,就不会出现「README 教用户装 A、代码按 B 校验」这种两边各自自洽的错。
|
|
1035
1035
|
*/
|
|
1036
|
-
const EXPECTED_OCR_CLI_VERSION = "1.13.
|
|
1036
|
+
const EXPECTED_OCR_CLI_VERSION = "1.13.5";
|
|
1037
1037
|
/** 报错用的值形态(永不调用可能被劫持的 toJSON/toString)。host.ts 的入参闸
|
|
1038
1038
|
* (effort/wait)复用同一口径,故导出。 */
|
|
1039
1039
|
function describeValue(value) {
|
|
@@ -5192,7 +5192,7 @@ function cliStatusPayload(status, config, messages, measured) {
|
|
|
5192
5192
|
* @returns 同一份摘要,或 hint 尾部多了一句的副本。
|
|
5193
5193
|
*/
|
|
5194
5194
|
function withCliVersionNote(summary, measured, messages) {
|
|
5195
|
-
if (measured === null || measured === "1.13.
|
|
5195
|
+
if (measured === null || measured === "1.13.5") return summary;
|
|
5196
5196
|
const note = format(messages.versionMismatch, {
|
|
5197
5197
|
actual: measured,
|
|
5198
5198
|
expected: EXPECTED_OCR_CLI_VERSION
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jayyuen66/dsh-ocr-review",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12",
|
|
4
4
|
"description": "dsh 工作区代码审查插件:把 open-code-review(ocr CLI)封装为 7 个模型工具 + 设置卡片(从宿主设置服务的 provider 清单选 provider/model 应用到 OCR 配置)。",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai-code-review",
|
|
@@ -54,77 +54,76 @@
|
|
|
54
54
|
"registry": "https://registry.npmjs.org"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@jayyuen66/dsh-plugin-shared": "0.2.
|
|
58
|
-
"js-yaml": "5.
|
|
57
|
+
"@jayyuen66/dsh-plugin-shared": "^0.2.4",
|
|
58
|
+
"js-yaml": "5.5.0",
|
|
59
59
|
"zod": "4.6.7"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@deepseek-ai/cordis": "4.0
|
|
63
|
-
"@deepseek-ai/cordis-plugin-include": "1.0
|
|
64
|
-
"@deepseek-ai/cordis-plugin-loader": "1.0
|
|
65
|
-
"@deepseek-ai/dsh-agent": "0.2.2-
|
|
66
|
-
"@deepseek-ai/dsh-api-remotes": "0.2.2-
|
|
67
|
-
"@deepseek-ai/dsh-atomic-write": "0.2.2-
|
|
68
|
-
"@deepseek-ai/dsh-bash-local": "0.2.2-
|
|
69
|
-
"@deepseek-ai/dsh-client-locale": "0.2.2-
|
|
70
|
-
"@deepseek-ai/dsh-client-store": "0.2.2-
|
|
71
|
-
"@deepseek-ai/dsh-client-ui-layout": "0.2.2-
|
|
72
|
-
"@deepseek-ai/dsh-client-ui-plugin-manager": "0.2.2-
|
|
73
|
-
"@deepseek-ai/dsh-client-ui-renderer": "0.2.2-
|
|
74
|
-
"@deepseek-ai/dsh-client-ui-settings": "0.2.2-
|
|
75
|
-
"@deepseek-ai/dsh-client-ui-slots": "0.2.2-
|
|
76
|
-
"@deepseek-ai/dsh-credentials": "0.2.2-
|
|
77
|
-
"@deepseek-ai/dsh-home-paths": "0.2.2-
|
|
78
|
-
"@deepseek-ai/dsh-host-webserver": "0.2.2-
|
|
79
|
-
"@deepseek-ai/dsh-http-proxy": "0.2.2-
|
|
80
|
-
"@deepseek-ai/dsh-jobs": "0.2.2-
|
|
81
|
-
"@deepseek-ai/dsh-jobs-local": "0.2.2-
|
|
82
|
-
"@deepseek-ai/dsh-llm": "0.2.2-
|
|
83
|
-
"@deepseek-ai/dsh-output-retention": "0.2.2-
|
|
84
|
-
"@deepseek-ai/dsh-package-manifest": "0.2.2-
|
|
85
|
-
"@deepseek-ai/dsh-
|
|
86
|
-
"@deepseek-ai/dsh-
|
|
87
|
-
"@deepseek-ai/dsh-
|
|
88
|
-
"@deepseek-ai/dsh-session": "0.2.2-
|
|
89
|
-
"@deepseek-ai/dsh-
|
|
90
|
-
"@deepseek-ai/dsh-
|
|
91
|
-
"@deepseek-ai/dsh-
|
|
92
|
-
"@deepseek-ai/dsh-subprocess": "0.2.2-
|
|
93
|
-
"@deepseek-ai/dsh-
|
|
94
|
-
"@deepseek-ai/dsh-
|
|
95
|
-
"@deepseek-ai/dsh-
|
|
96
|
-
"@deepseek-ai/dsh-
|
|
97
|
-
"@deepseek-ai/dsh-
|
|
98
|
-
"@deepseek-ai/
|
|
99
|
-
"@deepseek-ai/schemastery": "3.18.6-alpha.2",
|
|
62
|
+
"@deepseek-ai/cordis": "4.1.0",
|
|
63
|
+
"@deepseek-ai/cordis-plugin-include": "1.1.0",
|
|
64
|
+
"@deepseek-ai/cordis-plugin-loader": "1.1.0",
|
|
65
|
+
"@deepseek-ai/dsh-agent": "0.2.2-rc.1",
|
|
66
|
+
"@deepseek-ai/dsh-api-remotes": "0.2.2-rc.1",
|
|
67
|
+
"@deepseek-ai/dsh-atomic-write": "0.2.2-rc.1",
|
|
68
|
+
"@deepseek-ai/dsh-bash-local": "0.2.2-rc.1",
|
|
69
|
+
"@deepseek-ai/dsh-client-locale": "0.2.2-rc.1",
|
|
70
|
+
"@deepseek-ai/dsh-client-store": "0.2.2-rc.1",
|
|
71
|
+
"@deepseek-ai/dsh-client-ui-layout": "0.2.2-rc.1",
|
|
72
|
+
"@deepseek-ai/dsh-client-ui-plugin-manager": "0.2.2-rc.1",
|
|
73
|
+
"@deepseek-ai/dsh-client-ui-renderer": "0.2.2-rc.1",
|
|
74
|
+
"@deepseek-ai/dsh-client-ui-settings": "0.2.2-rc.1",
|
|
75
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.2.2-rc.1",
|
|
76
|
+
"@deepseek-ai/dsh-credentials": "0.2.2-rc.1",
|
|
77
|
+
"@deepseek-ai/dsh-home-paths": "0.2.2-rc.1",
|
|
78
|
+
"@deepseek-ai/dsh-host-webserver": "0.2.2-rc.1",
|
|
79
|
+
"@deepseek-ai/dsh-http-proxy": "0.2.2-rc.1",
|
|
80
|
+
"@deepseek-ai/dsh-jobs": "0.2.2-rc.1",
|
|
81
|
+
"@deepseek-ai/dsh-jobs-local": "0.2.2-rc.1",
|
|
82
|
+
"@deepseek-ai/dsh-llm": "0.2.2-rc.1",
|
|
83
|
+
"@deepseek-ai/dsh-output-retention": "0.2.2-rc.1",
|
|
84
|
+
"@deepseek-ai/dsh-package-manifest": "0.2.2-rc.1",
|
|
85
|
+
"@deepseek-ai/dsh-sandbox": "0.2.2-rc.1",
|
|
86
|
+
"@deepseek-ai/dsh-scope": "0.2.2-rc.1",
|
|
87
|
+
"@deepseek-ai/dsh-session": "0.2.2-rc.1",
|
|
88
|
+
"@deepseek-ai/dsh-session-projection": "0.2.2-rc.1",
|
|
89
|
+
"@deepseek-ai/dsh-settings": "0.2.2-rc.1",
|
|
90
|
+
"@deepseek-ai/dsh-shell": "0.2.2-rc.1",
|
|
91
|
+
"@deepseek-ai/dsh-subprocess": "0.2.2-rc.1",
|
|
92
|
+
"@deepseek-ai/dsh-subprocess-local": "0.2.2-rc.1",
|
|
93
|
+
"@deepseek-ai/dsh-system-prompt": "0.2.2-rc.1",
|
|
94
|
+
"@deepseek-ai/dsh-timeout": "0.2.2-rc.1",
|
|
95
|
+
"@deepseek-ai/dsh-tools": "0.2.2-rc.1",
|
|
96
|
+
"@deepseek-ai/dsh-typert-protocol": "0.2.2-rc.1",
|
|
97
|
+
"@deepseek-ai/dsh-user-approval": "0.2.2-rc.1",
|
|
98
|
+
"@deepseek-ai/schemastery": "3.19.0",
|
|
100
99
|
"@e18e/eslint-plugin": "0.8.1",
|
|
101
100
|
"@types/node": "26.6.6",
|
|
102
101
|
"@types/react": "19.3.0",
|
|
103
|
-
"@vitest/coverage-v8": "5.0
|
|
104
|
-
"eslint-plugin-regexp": "3.3.
|
|
102
|
+
"@vitest/coverage-v8": "5.1.0",
|
|
103
|
+
"eslint-plugin-regexp": "3.3.3",
|
|
105
104
|
"eslint-plugin-sonarjs": "4.2.2",
|
|
106
105
|
"eslint-plugin-zod": "5.2.2",
|
|
107
106
|
"fast-check": "4.10.2",
|
|
108
|
-
"oxfmt": "0.
|
|
109
|
-
"oxlint": "1.
|
|
107
|
+
"oxfmt": "0.76.0",
|
|
108
|
+
"oxlint": "1.91.0",
|
|
110
109
|
"oxlint-tsgolint": "7.0.2005",
|
|
111
110
|
"react": "^19.3.0",
|
|
112
|
-
"rolldown": "1.2.
|
|
111
|
+
"rolldown": "1.2.16",
|
|
113
112
|
"typescript": "7.0.2",
|
|
114
|
-
"vite": "8.3.
|
|
115
|
-
"vitest": "5.0
|
|
113
|
+
"vite": "8.3.6",
|
|
114
|
+
"vitest": "5.1.0"
|
|
116
115
|
},
|
|
117
116
|
"peerDependencies": {
|
|
118
|
-
"@deepseek-ai/dsh-atomic-write": "^0.2.1-rc.
|
|
119
|
-
"@deepseek-ai/dsh-credentials": "^0.2.1-rc.
|
|
120
|
-
"@deepseek-ai/dsh-home-paths": "^0.2.1-rc.
|
|
121
|
-
"@deepseek-ai/dsh-typert-protocol": "^0.2.1-rc.
|
|
122
|
-
"@deepseek-ai/schemastery": "^3.18.6-alpha.1"
|
|
117
|
+
"@deepseek-ai/dsh-atomic-write": "^0.2.1-rc.5 || ^0.2.2-alpha.3",
|
|
118
|
+
"@deepseek-ai/dsh-credentials": "^0.2.1-rc.5 || ^0.2.2-alpha.3",
|
|
119
|
+
"@deepseek-ai/dsh-home-paths": "^0.2.1-rc.5 || ^0.2.2-alpha.3",
|
|
120
|
+
"@deepseek-ai/dsh-typert-protocol": "^0.2.1-rc.5 || ^0.2.2-alpha.3",
|
|
121
|
+
"@deepseek-ai/schemastery": "^3.18.5 || ^3.18.6-alpha.1"
|
|
123
122
|
},
|
|
124
123
|
"icon": "icon.svg",
|
|
125
124
|
"engines": {
|
|
126
|
-
"dsh": "^0.2.1-rc.
|
|
127
|
-
"node": ">=
|
|
125
|
+
"dsh": "^0.2.1-rc.5 || ^0.2.2-alpha.3",
|
|
126
|
+
"node": ">=24.9.0"
|
|
128
127
|
},
|
|
129
128
|
"dsh": {
|
|
130
129
|
"manifestVersion": 1,
|
|
@@ -133,10 +132,13 @@
|
|
|
133
132
|
},
|
|
134
133
|
"client": {
|
|
135
134
|
"platform": "web",
|
|
136
|
-
"immediately": true
|
|
135
|
+
"immediately": true,
|
|
136
|
+
"external": [
|
|
137
|
+
"@jayyuen66/dsh-plugin-shared/client"
|
|
138
|
+
]
|
|
137
139
|
}
|
|
138
140
|
},
|
|
139
|
-
"ocrCliVersion": "1.13.
|
|
141
|
+
"ocrCliVersion": "1.13.5",
|
|
140
142
|
"scripts": {
|
|
141
143
|
"build:client": "node build-client.mjs",
|
|
142
144
|
"build": "node build-host.mjs",
|