@andyqiu/codeforge 0.5.29 → 0.6.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/agents/codeforge.md +1 -1
- package/agents/coder-deep.md +1 -1
- package/agents/coder-quick.md +1 -1
- package/agents/coder.md +1 -1
- package/agents/discover-challenger.md +0 -1
- package/agents/discover.md +0 -1
- package/agents/planner.md +1 -1
- package/agents/reviewer-lite.md +1 -1
- package/agents/reviewer.md +1 -1
- package/bin/codeforge.mjs +22 -35
- package/dist/index.js +604 -2074
- package/install.mjs +751 -0
- package/package.json +5 -7
- package/context-templates/kh-instructions.md +0 -109
- package/install.ps1 +0 -559
- package/install.sh +0 -726
- package/scripts/merge-agents-md.mjs +0 -228
package/agents/codeforge.md
CHANGED
|
@@ -14,7 +14,7 @@ permissions:
|
|
|
14
14
|
edit: deny
|
|
15
15
|
bash: deny
|
|
16
16
|
webfetch: deny
|
|
17
|
-
allowed_tools: [read,
|
|
17
|
+
allowed_tools: [read, repo_map, task, plan_read, review_approval, session_merge]
|
|
18
18
|
model: anthropic/claude-sonnet-4-6
|
|
19
19
|
model_category: deep
|
|
20
20
|
tier: deep
|
package/agents/coder-deep.md
CHANGED
package/agents/coder-quick.md
CHANGED
package/agents/coder.md
CHANGED
|
@@ -14,7 +14,7 @@ permissions:
|
|
|
14
14
|
edit: allow
|
|
15
15
|
bash: allow
|
|
16
16
|
webfetch: deny
|
|
17
|
-
allowed_tools: [ast_edit, plan_read,
|
|
17
|
+
allowed_tools: [ast_edit, plan_read, bash, task]
|
|
18
18
|
model: anthropic/claude-sonnet-4-6
|
|
19
19
|
model_category: balanced
|
|
20
20
|
tier: balanced
|
package/agents/discover.md
CHANGED
package/agents/planner.md
CHANGED
|
@@ -14,7 +14,7 @@ permissions:
|
|
|
14
14
|
edit: deny
|
|
15
15
|
bash: allow
|
|
16
16
|
webfetch: allow
|
|
17
|
-
allowed_tools: [
|
|
17
|
+
allowed_tools: [repo_map, read, webfetch, plan_write]
|
|
18
18
|
model: anthropic/claude-opus-4-8
|
|
19
19
|
model_category: deep
|
|
20
20
|
tier: deep
|
package/agents/reviewer-lite.md
CHANGED
|
@@ -14,7 +14,7 @@ permissions:
|
|
|
14
14
|
edit: deny
|
|
15
15
|
bash: allow
|
|
16
16
|
webfetch: deny
|
|
17
|
-
allowed_tools: [
|
|
17
|
+
allowed_tools: [plan_read, bash, read, task, review_approval]
|
|
18
18
|
model: anthropic/claude-sonnet-4-6
|
|
19
19
|
model_category: balanced
|
|
20
20
|
tier: balanced
|
package/agents/reviewer.md
CHANGED
|
@@ -14,7 +14,7 @@ permissions:
|
|
|
14
14
|
edit: deny
|
|
15
15
|
bash: allow
|
|
16
16
|
webfetch: deny
|
|
17
|
-
allowed_tools: [
|
|
17
|
+
allowed_tools: [plan_read, bash, read, task, review_approval]
|
|
18
18
|
model: anthropic/claude-opus-4-8
|
|
19
19
|
model_category: ultrabrain
|
|
20
20
|
tier: deep
|
package/bin/codeforge.mjs
CHANGED
|
@@ -93,30 +93,22 @@ function parseArgs(argv) {
|
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
// ────────────────────────────────────────────────────────────────────
|
|
96
|
-
// opencode installer
|
|
96
|
+
// opencode installer:薄壳,统一调 install.mjs(Node ESM 跨平台)
|
|
97
|
+
// ADR:unify-install-to-node-mjs
|
|
97
98
|
// ────────────────────────────────────────────────────────────────────
|
|
98
|
-
function installOpencode({ scope, dryRun, extraArgs, quiet = false }) {
|
|
99
|
-
const
|
|
100
|
-
const script = isWin ? path.join(REPO_ROOT, "install.ps1") : path.join(REPO_ROOT, "install.sh")
|
|
99
|
+
function installOpencode({ scope, dryRun, extraArgs, quiet = false, verbose = false }) {
|
|
100
|
+
const script = path.join(REPO_ROOT, "install.mjs")
|
|
101
101
|
if (!existsSync(script)) {
|
|
102
102
|
err(`installer 脚本不存在:${script}`)
|
|
103
103
|
return 2
|
|
104
104
|
}
|
|
105
|
-
const
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
if (
|
|
111
|
-
|
|
112
|
-
if (dryRun) flagArgs.push("-DryRun")
|
|
113
|
-
} else {
|
|
114
|
-
if (scope === "global") flagArgs.push("--global")
|
|
115
|
-
if (dryRun) flagArgs.push("--dry-run")
|
|
116
|
-
}
|
|
117
|
-
const all = [...baseArgs, ...flagArgs, ...(extraArgs ?? [])]
|
|
118
|
-
if (!quiet) log(`opencode: ${cmd} ${all.join(" ")}`)
|
|
119
|
-
const r = spawnSync(cmd, all, { stdio: quiet ? "pipe" : "inherit", cwd: REPO_ROOT })
|
|
105
|
+
const args = [script]
|
|
106
|
+
if (scope === "global") args.push("--global")
|
|
107
|
+
if (dryRun) args.push("--dry-run")
|
|
108
|
+
if (verbose) args.push("--verbose")
|
|
109
|
+
if (extraArgs) args.push(...extraArgs)
|
|
110
|
+
if (!quiet) log(`opencode: node ${args.join(" ")}`)
|
|
111
|
+
const r = spawnSync(process.execPath, args, { stdio: quiet ? "pipe" : "inherit", cwd: REPO_ROOT })
|
|
120
112
|
if (quiet && r.status !== 0) {
|
|
121
113
|
if (r.stderr) process.stderr.write(r.stderr)
|
|
122
114
|
if (r.stdout) process.stderr.write(r.stdout)
|
|
@@ -125,16 +117,11 @@ function installOpencode({ scope, dryRun, extraArgs, quiet = false }) {
|
|
|
125
117
|
}
|
|
126
118
|
|
|
127
119
|
function uninstallOpencode({ scope }) {
|
|
128
|
-
const
|
|
129
|
-
const
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
: [script, "--uninstall"]
|
|
134
|
-
if (isWin && scope === "global") baseArgs.push("-Global")
|
|
135
|
-
if (!isWin && scope === "global") baseArgs.push("--global")
|
|
136
|
-
log(`opencode uninstall: ${cmd} ${baseArgs.join(" ")}`)
|
|
137
|
-
const r = spawnSync(cmd, baseArgs, { stdio: "inherit", cwd: REPO_ROOT })
|
|
120
|
+
const script = path.join(REPO_ROOT, "install.mjs")
|
|
121
|
+
const args = [script, "--uninstall"]
|
|
122
|
+
if (scope === "global") args.push("--global")
|
|
123
|
+
log(`opencode uninstall: node ${args.join(" ")}`)
|
|
124
|
+
const r = spawnSync(process.execPath, args, { stdio: "inherit", cwd: REPO_ROOT })
|
|
138
125
|
return r.status ?? 1
|
|
139
126
|
}
|
|
140
127
|
|
|
@@ -154,9 +141,10 @@ function cmdInstall(args) {
|
|
|
154
141
|
// npm 场景下 dist/ 已经被 prepack 打过包随 tarball 发布,强制 --skip-build
|
|
155
142
|
// (node_modules 里通常没有 dev 依赖,跑 npm run build 会失败)
|
|
156
143
|
const autoSkipBuild = fromNpm
|
|
144
|
+
const verbose = !!args.flags.verbose
|
|
157
145
|
const extraArgs = []
|
|
158
|
-
if (args.flags["enable-legacy-tools"]) extraArgs.push(
|
|
159
|
-
if (args.flags["skip-build"] || autoSkipBuild) extraArgs.push(
|
|
146
|
+
if (args.flags["enable-legacy-tools"]) extraArgs.push("--enable-legacy-tools")
|
|
147
|
+
if (args.flags["skip-build"] || autoSkipBuild) extraArgs.push("--skip-build")
|
|
160
148
|
|
|
161
149
|
log(`CodeForge installer v${getVersion()}`)
|
|
162
150
|
log(` scope : ${scope}`)
|
|
@@ -170,12 +158,12 @@ function cmdInstall(args) {
|
|
|
170
158
|
if (!existsSync(distEntry)) {
|
|
171
159
|
err(`从 npm 安装但找不到 prebuilt bundle:${distEntry}`)
|
|
172
160
|
err(`这通常是 package 发布问题:dist/ 没被 npm pack 进 tarball。`)
|
|
173
|
-
err(`临时解决:从 GitHub clone 后跑
|
|
161
|
+
err(`临时解决:从 GitHub clone 后跑 node install.mjs`)
|
|
174
162
|
return 1
|
|
175
163
|
}
|
|
176
164
|
}
|
|
177
165
|
|
|
178
|
-
const code = installOpencode({ scope, dryRun, extraArgs })
|
|
166
|
+
const code = installOpencode({ scope, dryRun, extraArgs, verbose })
|
|
179
167
|
hr()
|
|
180
168
|
if (code !== 0) {
|
|
181
169
|
err(`opencode 安装失败 (exit=${code})`)
|
|
@@ -373,8 +361,7 @@ async function cmdUpgrade(args) {
|
|
|
373
361
|
warn("清除 opencode 缓存失败(非致命,可手动重启 opencode)")
|
|
374
362
|
}
|
|
375
363
|
|
|
376
|
-
const
|
|
377
|
-
const code = installOpencode({ scope: "global", dryRun: false, extraArgs: [skipBuildFlag], quiet: true })
|
|
364
|
+
const code = installOpencode({ scope: "global", dryRun: false, extraArgs: ["--skip-build"], quiet: true })
|
|
378
365
|
if (code !== 0) {
|
|
379
366
|
err(`install --global 失败 (exit=${code})`)
|
|
380
367
|
return 1
|