@andyqiu/codeforge 0.8.1 → 0.8.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.
@@ -15,7 +15,7 @@ permissions:
15
15
  bash: deny
16
16
  webfetch: deny
17
17
  allowed_tools: [read, repo_map, task, plan_read, review_approval, session_merge]
18
- model: google/gemini-3.1-pro
18
+ model: google/gemini-3.1-pro-preview
19
19
  model_category: balanced
20
20
  tier: balanced
21
21
  model_thinking:
@@ -23,7 +23,7 @@ model_thinking:
23
23
  budget_tokens: 16000
24
24
  fallback_models:
25
25
  - openai/gpt-5.5
26
- - google/gemini-3.1-pro
26
+ - google/gemini-3.1-pro-preview
27
27
  ---
28
28
 
29
29
 
@@ -23,7 +23,7 @@ model_thinking:
23
23
  budget_tokens: 2000
24
24
  fallback_models:
25
25
  - anthropic/claude-opus-4-8
26
- - google/gemini-3.1-pro
26
+ - google/gemini-3.1-pro-preview
27
27
  ---
28
28
 
29
29
 
package/agents/coder.md CHANGED
@@ -23,7 +23,7 @@ model_thinking:
23
23
  budget_tokens: 6000
24
24
  fallback_models:
25
25
  - anthropic/claude-opus-4-8
26
- - google/gemini-3.1-pro
26
+ - google/gemini-3.1-pro-preview
27
27
  ---
28
28
 
29
29
 
@@ -24,7 +24,7 @@ model_thinking:
24
24
  reasoning_effort: high
25
25
  fallback_models:
26
26
  - anthropic/claude-opus-4-8
27
- - google/gemini-3.1-pro
27
+ - google/gemini-3.1-pro-preview
28
28
  ---
29
29
 
30
30
  # Discover Challenger
@@ -43,7 +43,7 @@ model_thinking:
43
43
  budget_tokens: 16000
44
44
  fallback_models:
45
45
  - openai/gpt-5.5
46
- - google/gemini-3.1-pro
46
+ - google/gemini-3.1-pro-preview
47
47
  ---
48
48
 
49
49
  # Discover Agent
package/agents/planner.md CHANGED
@@ -24,7 +24,7 @@ model_thinking:
24
24
  fallback_models:
25
25
  - anthropic/claude-opus-4-8
26
26
  - anthropic/claude-sonnet-4-6
27
- - google/gemini-3.1-pro
27
+ - google/gemini-3.1-pro-preview
28
28
  ---
29
29
 
30
30
  <!--
@@ -15,7 +15,7 @@ permissions:
15
15
  bash: allow
16
16
  webfetch: deny
17
17
  allowed_tools: [plan_read, bash, read, task, review_approval]
18
- model: google/gemini-3.1-pro
18
+ model: google/gemini-3.1-pro-preview
19
19
  model_category: balanced
20
20
  tier: balanced
21
21
  model_thinking:
@@ -23,7 +23,7 @@ model_thinking:
23
23
  reasoning_effort: xhigh
24
24
  fallback_models:
25
25
  - anthropic/claude-opus-4-8
26
- - google/gemini-3.1-pro
26
+ - google/gemini-3.1-pro-preview
27
27
  ---
28
28
 
29
29
  <!-- ADR:reviewer-multi-profile -->
@@ -77,10 +77,12 @@ function resolveTarget(args) {
77
77
  // 参数解析
78
78
  // ────────────────────────────────────────────────────────────────────
79
79
  function parseArgs(argv) {
80
- const args = { project: false, help: false }
80
+ const args = { project: false, help: false, runtime: false }
81
81
  for (const a of argv) {
82
82
  if (a === "--project" || a === "-p") args.project = true
83
83
  if (a === "--help" || a === "-h") args.help = true
84
+ // ADR:zero-command-worktree-convergence Amendment (2026-06-12) Phase 6c —— runtime 健康度段
85
+ if (a === "--runtime" || a === "-r") args.runtime = true
84
86
  }
85
87
  return args
86
88
  }
@@ -97,12 +99,14 @@ if (args.help) {
97
99
  用法:
98
100
  codeforge doctor # 检查 global (~/.config/opencode)
99
101
  codeforge doctor --project # 检查 project (<cwd>/.opencode)
102
+ codeforge doctor --runtime # 额外检查当前项目的 worktree 运行时健康度
100
103
 
101
104
  检查项:
102
105
  D1 manifest 登记但 disk 缺失 → ✗(建议跑 codeforge install)
103
106
  D2 source 有但 disk 缺失 → ✗(建议跑 codeforge install)
104
107
  D3 disk∩source 但 manifest 无 → ⚠(manifest 可能未更新)
105
108
  第三方 .md 文件(不在 manifest 也不在 source)→ 静默跳过
109
+ --runtime worktree 健康度(追踪文件 / 超期 worktree / 待审 / 留痕 等 8 类信号,带下一步提示)
106
110
 
107
111
  exit code:有 ✗ → 1,仅 ⚠ → 0,全绿 → 0`)
108
112
  process.exit(0)
@@ -184,4 +188,40 @@ if (!hasErrors && stale.length === 0) {
184
188
  }
185
189
  }
186
190
 
191
+ // ────────────────────────────────────────────────────────────────────
192
+ // --runtime:worktree 运行时健康度(ADR:zero-command-worktree-convergence Phase 6c)
193
+ //
194
+ // 经 dist bundle 动态 import collectHealthDigest(dist 不存在 = 未 build → 优雅降级提示,
195
+ // 不阻断既有安装检查结果)。健康度查询只读,绝不 mutate。
196
+ // ────────────────────────────────────────────────────────────────────
197
+ if (args.runtime) {
198
+ console.log()
199
+ console.log(`${C.bold}runtime 健康度${C.reset}(当前项目 worktree)`)
200
+ const distIndex = path.join(REPO_ROOT, "dist", "index.js")
201
+ if (!existsSync(distIndex)) {
202
+ console.log(` ${C.yellow}⚠${C.reset} dist 未构建(${shortenHome(distIndex)} 不存在),跳过 runtime 检查`)
203
+ console.log(` 建议:跑 ${C.bold}npm run build${C.reset} 后重试`)
204
+ } else {
205
+ try {
206
+ const { collectHealthDigest } = await import(url.pathToFileURL(distIndex).href)
207
+ if (typeof collectHealthDigest !== "function") {
208
+ console.log(` ${C.yellow}⚠${C.reset} 当前 dist 版本不含 collectHealthDigest(旧版本?),请重新 build`)
209
+ } else {
210
+ const digest = await collectHealthDigest(process.cwd())
211
+ if (!digest || !digest.hasIssues) {
212
+ console.log(` ${C.green}✓${C.reset} worktree 运行时健康,无需操作`)
213
+ } else {
214
+ for (const sig of digest.signals) {
215
+ const icon = sig.informational ? `${C.dim}ℹ${C.reset}` : `${C.yellow}⚠${C.reset}`
216
+ console.log(` ${icon} ${sig.nextStep}`)
217
+ }
218
+ }
219
+ }
220
+ } catch (e) {
221
+ console.log(` ${C.yellow}⚠${C.reset} runtime 健康度采集失败:${e?.message ?? e}`)
222
+ console.log(` ${C.dim}(不影响上方安装检查结果)${C.reset}`)
223
+ }
224
+ }
225
+ }
226
+
187
227
  process.exit(hasErrors ? 1 : 0)
package/codeforge.json CHANGED
@@ -16,7 +16,7 @@
16
16
  "fallback_models": [
17
17
  "anthropic/claude-opus-4-8",
18
18
  "anthropic/claude-sonnet-4-6",
19
- "google/gemini-3.1-pro"
19
+ "google/gemini-3.1-pro-preview"
20
20
  ]
21
21
  },
22
22
  "coder": {
@@ -27,7 +27,7 @@
27
27
  "thinking": { "type": "enabled", "budget_tokens": 6000 },
28
28
  "fallback_models": [
29
29
  "anthropic/claude-opus-4-8",
30
- "google/gemini-3.1-pro"
30
+ "google/gemini-3.1-pro-preview"
31
31
  ]
32
32
  },
33
33
  "coder-quick": {
@@ -38,7 +38,7 @@
38
38
  "thinking": { "type": "enabled", "budget_tokens": 2000 },
39
39
  "fallback_models": [
40
40
  "anthropic/claude-opus-4-8",
41
- "google/gemini-3.1-pro"
41
+ "google/gemini-3.1-pro-preview"
42
42
  ]
43
43
  },
44
44
  "coder-deep": {
@@ -49,7 +49,7 @@
49
49
  "thinking": { "type": "enabled", "budget_tokens": 16000 },
50
50
  "fallback_models": [
51
51
  "openai/gpt-5.5",
52
- "google/gemini-3.1-pro"
52
+ "google/gemini-3.1-pro-preview"
53
53
  ]
54
54
  },
55
55
  "reviewer": {
@@ -60,7 +60,7 @@
60
60
  "thinking": { "type": "enabled", "reasoning_effort": "xhigh" },
61
61
  "fallback_models": [
62
62
  "anthropic/claude-opus-4-8",
63
- "google/gemini-3.1-pro"
63
+ "google/gemini-3.1-pro-preview"
64
64
  ]
65
65
  },
66
66
  "discover": {
@@ -71,7 +71,7 @@
71
71
  "thinking": { "type": "enabled", "budget_tokens": 16000 },
72
72
  "fallback_models": [
73
73
  "openai/gpt-5.5",
74
- "google/gemini-3.1-pro"
74
+ "google/gemini-3.1-pro-preview"
75
75
  ]
76
76
  },
77
77
  "discover-challenger": {
@@ -82,12 +82,12 @@
82
82
  "thinking": { "type": "enabled", "reasoning_effort": "high" },
83
83
  "fallback_models": [
84
84
  "anthropic/claude-opus-4-8",
85
- "google/gemini-3.1-pro"
85
+ "google/gemini-3.1-pro-preview"
86
86
  ]
87
87
  },
88
88
  "codeforge": {
89
89
  "_doc": "编排者(调度专用):Gemini 3.1 Pro 主(轻量快速路由),Sonnet 4.6 / Opus 4.8 备用。codeforge 无写权限,只路由不生产,用 Gemini 降成本。category=balanced 对应模型档次,tier=balanced 对应任务难度(路由判断本身是轻量任务)。",
90
- "model": "google/gemini-3.1-pro",
90
+ "model": "google/gemini-3.1-pro-preview",
91
91
  "category": "balanced",
92
92
  "tier": "balanced",
93
93
  "thinking": { "type": "enabled", "thinking_level": "low" },
@@ -114,7 +114,7 @@
114
114
  "_doc": "速度+智能平衡(Sonnet 4.6 + 4K thinking)",
115
115
  "model": "anthropic/claude-sonnet-4-6",
116
116
  "thinking": { "type": "enabled", "budget_tokens": 4000 },
117
- "fallback_models": ["openai/gpt-5.5", "google/gemini-3.1-pro"]
117
+ "fallback_models": ["openai/gpt-5.5", "google/gemini-3.1-pro-preview"]
118
118
  },
119
119
  "quick": {
120
120
  "_doc": "短上下文 / 快速校验(Haiku 4.5)",