@andyqiu/codeforge 0.8.6 → 0.8.8
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/agents/coder-quick.md +3 -3
- package/agents/reviewer-lite.md +3 -3
- package/codeforge.json +3 -3
- package/dist/index.js +1 -1
- package/install.mjs +51 -0
- package/package.json +1 -1
- package/workflows/_merge-confirm-semantics.yaml +1 -0
package/agents/coder-quick.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: coder-quick
|
|
3
|
-
description: 执行者(快速档)— 同 coder,使用
|
|
3
|
+
description: 执行者(快速档)— 同 coder,使用 sonnet 档模型,适合小改动 / typo fix / 文档更新。在 session worktree 内直接写,由 /merge 闭环合入主仓。
|
|
4
4
|
version: 2.0.0
|
|
5
5
|
mode: subagent
|
|
6
6
|
# opencode 标准字段(单数)— 实际生效的权限
|
|
@@ -15,7 +15,7 @@ permissions:
|
|
|
15
15
|
bash: allow
|
|
16
16
|
webfetch: deny
|
|
17
17
|
allowed_tools: [ast_edit, plan_read, bash, task]
|
|
18
|
-
model: anthropic/claude-
|
|
18
|
+
model: anthropic/claude-sonnet-4-6
|
|
19
19
|
model_category: balanced
|
|
20
20
|
tier: quick
|
|
21
21
|
model_thinking:
|
|
@@ -23,7 +23,7 @@ model_thinking:
|
|
|
23
23
|
budget_tokens: 2000
|
|
24
24
|
fallback_models:
|
|
25
25
|
- anthropic/claude-opus-4-8
|
|
26
|
-
-
|
|
26
|
+
- google/gemini-3.1-pro-preview
|
|
27
27
|
---
|
|
28
28
|
|
|
29
29
|
|
package/agents/reviewer-lite.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: reviewer-lite
|
|
3
|
-
description: 审阅者(轻量档)— 使用
|
|
3
|
+
description: 审阅者(轻量档)— 使用 sonnet 模型,适用于方案/文档/ADR/决策 review;代码安全审查请用 @reviewer(ultrabrain)
|
|
4
4
|
version: 1.0.0
|
|
5
5
|
mode: subagent
|
|
6
6
|
# opencode 标准字段(单数)— 实际生效的权限
|
|
@@ -15,12 +15,12 @@ permissions:
|
|
|
15
15
|
bash: allow
|
|
16
16
|
webfetch: deny
|
|
17
17
|
allowed_tools: [plan_read, bash, read, task, review_approval]
|
|
18
|
-
model:
|
|
18
|
+
model: google/gemini-3.1-pro-preview
|
|
19
19
|
model_category: balanced
|
|
20
20
|
tier: balanced
|
|
21
21
|
model_thinking:
|
|
22
22
|
type: enabled
|
|
23
|
-
|
|
23
|
+
thinking_level: medium
|
|
24
24
|
fallback_models:
|
|
25
25
|
- anthropic/claude-sonnet-4-6
|
|
26
26
|
- openai/gpt-5.5
|
package/codeforge.json
CHANGED
|
@@ -31,14 +31,14 @@
|
|
|
31
31
|
]
|
|
32
32
|
},
|
|
33
33
|
"coder-quick": {
|
|
34
|
-
"_doc": "编码者(快速档):
|
|
35
|
-
"model": "anthropic/claude-
|
|
34
|
+
"_doc": "编码者(快速档):Sonnet + 最小 thinking,适合 typo fix / 单行改动 / 文档更新。",
|
|
35
|
+
"model": "anthropic/claude-sonnet-4-6",
|
|
36
36
|
"category": "balanced",
|
|
37
37
|
"tier": "quick",
|
|
38
38
|
"thinking": { "type": "enabled", "budget_tokens": 2000 },
|
|
39
39
|
"fallback_models": [
|
|
40
40
|
"anthropic/claude-opus-4-8",
|
|
41
|
-
"
|
|
41
|
+
"google/gemini-3.1-pro-preview"
|
|
42
42
|
]
|
|
43
43
|
},
|
|
44
44
|
"coder-deep": {
|
package/dist/index.js
CHANGED
|
@@ -19892,7 +19892,7 @@ import * as https from "node:https";
|
|
|
19892
19892
|
// lib/version-injected.ts
|
|
19893
19893
|
function getInjectedVersion() {
|
|
19894
19894
|
try {
|
|
19895
|
-
const v = "0.8.
|
|
19895
|
+
const v = "0.8.8";
|
|
19896
19896
|
if (typeof v === "string" && /^\d+\.\d+\.\d+/.test(v)) {
|
|
19897
19897
|
return v;
|
|
19898
19898
|
}
|
package/install.mjs
CHANGED
|
@@ -304,6 +304,56 @@ function fixGlobalPluginEntry() {
|
|
|
304
304
|
vok(`全局 opencode.json plugin entry 已修正为 npm 包名格式`)
|
|
305
305
|
}
|
|
306
306
|
|
|
307
|
+
// 全局安装时:确保所有 npm 包名格式的 plugin 已安装到 ~/.config/opencode/node_modules/
|
|
308
|
+
// 由 fixGlobalPluginEntry() 之后调用。非致命:npm install 失败只 addWarn 不 abort。
|
|
309
|
+
function ensureGlobalPluginDeps() {
|
|
310
|
+
const opencodeDir = path.join(xdgConfigHome(), "opencode")
|
|
311
|
+
const cfg = path.join(opencodeDir, "opencode.json")
|
|
312
|
+
if (!fs.existsSync(cfg)) return
|
|
313
|
+
let data
|
|
314
|
+
try { data = JSON.parse(fs.readFileSync(cfg, "utf8")) } catch { return }
|
|
315
|
+
if (!Array.isArray(data.plugin)) return
|
|
316
|
+
|
|
317
|
+
// 收集所有 npm 包名格式的 plugin(排除 file://、绝对路径、相对路径、home 路径)
|
|
318
|
+
// scoped package(如 @andyqiu/codeforge)含 / 属正常,不能用 !includes("/") 过滤
|
|
319
|
+
const npmPkgs = data.plugin
|
|
320
|
+
.map(e => String(e).trim())
|
|
321
|
+
.filter(e =>
|
|
322
|
+
e.length > 0 &&
|
|
323
|
+
!e.startsWith("file://") &&
|
|
324
|
+
!e.startsWith("/") &&
|
|
325
|
+
!e.startsWith("./") &&
|
|
326
|
+
!e.startsWith("../") &&
|
|
327
|
+
!e.startsWith("~")
|
|
328
|
+
)
|
|
329
|
+
|
|
330
|
+
if (npmPkgs.length === 0) {
|
|
331
|
+
vlog(`ensureGlobalPluginDeps: 无 npm 包名格式 plugin,跳过`)
|
|
332
|
+
return
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
if (DRY_RUN) {
|
|
336
|
+
vlog(`[dry-run] npm install ${npmPkgs.join(" ")} (cwd: ${opencodeDir})`)
|
|
337
|
+
return
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
vlog(`在 ${opencodeDir} 执行 npm install ${npmPkgs.join(" ")}`)
|
|
341
|
+
const r = spawnSync("npm", ["install", ...npmPkgs], {
|
|
342
|
+
cwd: opencodeDir,
|
|
343
|
+
stdio: VERBOSE ? "inherit" : "pipe",
|
|
344
|
+
shell: IS_WIN,
|
|
345
|
+
})
|
|
346
|
+
if (r.status !== 0) {
|
|
347
|
+
if (!VERBOSE) {
|
|
348
|
+
if (r.stdout) process.stderr.write(r.stdout)
|
|
349
|
+
if (r.stderr) process.stderr.write(r.stderr)
|
|
350
|
+
}
|
|
351
|
+
addWarn(`npm install ${npmPkgs.join(" ")} 失败 (exit=${r.status ?? 1}),plugin 可能无法加载`)
|
|
352
|
+
} else {
|
|
353
|
+
vok(`npm install ${npmPkgs.join(" ")} 完成`)
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
307
357
|
function removePluginEntry({ targetRoot }) {
|
|
308
358
|
const cfg = opencodeCfgPath(targetRoot)
|
|
309
359
|
if (!fs.existsSync(cfg)) return
|
|
@@ -906,6 +956,7 @@ function main() {
|
|
|
906
956
|
installSkills({ targetRoot })
|
|
907
957
|
installAssets({ targetRoot })
|
|
908
958
|
if (opts.mode === "global") fixGlobalPluginEntry()
|
|
959
|
+
if (opts.mode === "global") ensureGlobalPluginDeps()
|
|
909
960
|
configureDefaultAgent({ mode: opts.mode })
|
|
910
961
|
installKhConfig({ mode: opts.mode, codeforgeCfgDir })
|
|
911
962
|
regenerateDevShim()
|
package/package.json
CHANGED