oh-my-claudecode-opencode 0.5.4 → 0.6.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/assets/agents/scientist.md +3 -3
- package/assets/skills/deepinit.md +1 -1
- package/assets/skills/orchestrate.md +5 -5
- package/assets/skills/ralph.md +4 -4
- package/assets/skills/research.md +12 -12
- package/assets/skills/ultraqa.md +3 -3
- package/assets/skills/ultrawork.md +5 -5
- package/bin/doctor.js +96 -1
- package/bin/doctor.ts +119 -0
- package/package.json +1 -1
|
@@ -45,7 +45,7 @@ TOOL USAGE RULES:
|
|
|
45
45
|
NOT AVAILABLE (will fail if attempted):
|
|
46
46
|
- Write: Use Python to write files instead
|
|
47
47
|
- Edit: You should not edit code files
|
|
48
|
-
-
|
|
48
|
+
- call_omco_agent: You do not delegate to other agents
|
|
49
49
|
- WebSearch/WebFetch: Use researcher agent for external research
|
|
50
50
|
</Tools_Available>
|
|
51
51
|
|
|
@@ -706,8 +706,8 @@ sed -i 's/foo/bar/' script.py
|
|
|
706
706
|
|
|
707
707
|
5. NEVER delegate to other agents
|
|
708
708
|
```bash
|
|
709
|
-
# DON'T -
|
|
710
|
-
|
|
709
|
+
# DON'T - call_omco_agent tool is blocked
|
|
710
|
+
call_omco_agent(subagent_type="executor", ...)
|
|
711
711
|
```
|
|
712
712
|
|
|
713
713
|
6. NEVER run interactive prompts
|
|
@@ -85,7 +85,7 @@ This creates a navigable hierarchy:
|
|
|
85
85
|
### Step 1: Map Directory Structure
|
|
86
86
|
|
|
87
87
|
```
|
|
88
|
-
|
|
88
|
+
call_omco_agent(subagent_type="explore", model="haiku", run_in_background=true,
|
|
89
89
|
prompt="List all directories recursively. Exclude: node_modules, .git, dist, build, __pycache__, .venv, coverage, .next, .nuxt")
|
|
90
90
|
```
|
|
91
91
|
|
|
@@ -122,11 +122,11 @@ I will use omc_task with:
|
|
|
122
122
|
```typescript
|
|
123
123
|
// CORRECT: Always background, always parallel, ALWAYS pass model explicitly!
|
|
124
124
|
// Contextual Grep (internal)
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
call_omco_agent(subagent_type="explore", model="haiku", run_in_background=true, prompt="Find auth implementations in our codebase...")
|
|
126
|
+
call_omco_agent(subagent_type="explore", model="haiku", run_in_background=true, prompt="Find error handling patterns here...")
|
|
127
127
|
// Reference Grep (external)
|
|
128
|
-
|
|
129
|
-
|
|
128
|
+
call_omco_agent(subagent_type="researcher", model="sonnet", run_in_background=true, prompt="Find JWT best practices in official docs...")
|
|
129
|
+
call_omco_agent(subagent_type="researcher", model="sonnet", run_in_background=true, prompt="Find how production apps handle auth in Express...")
|
|
130
130
|
// Continue working immediately. Collect with background_output when needed.
|
|
131
131
|
|
|
132
132
|
// WRONG: Sequential or blocking
|
|
@@ -259,7 +259,7 @@ Claude models are prone to premature completion claims. Before saying "done", yo
|
|
|
259
259
|
|
|
260
260
|
2. **Invoke Architect for verification** (ALWAYS pass model explicitly!):
|
|
261
261
|
```
|
|
262
|
-
|
|
262
|
+
call_omco_agent(subagent_type="architect", model="opus", run_in_background=false, prompt="VERIFY COMPLETION REQUEST:
|
|
263
263
|
Original task: [describe the original request]
|
|
264
264
|
What I implemented: [list all changes made]
|
|
265
265
|
Verification done: [list tests run, builds checked]
|
package/assets/skills/ralph.md
CHANGED
|
@@ -49,9 +49,9 @@ Ralph automatically activates Ultrawork for maximum parallel execution. You MUST
|
|
|
49
49
|
|
|
50
50
|
**CRITICAL: Always pass `model` parameter explicitly!**
|
|
51
51
|
```
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
call_omco_agent(subagent_type="oh-my-claudecode:architect-low", model="haiku", run_in_background=true, prompt="...")
|
|
53
|
+
call_omco_agent(subagent_type="oh-my-claudecode:executor", model="sonnet", run_in_background=true, prompt="...")
|
|
54
|
+
call_omco_agent(subagent_type="oh-my-claudecode:architect", model="opus", run_in_background=true, prompt="...")
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
### Background Execution Rules
|
|
@@ -107,7 +107,7 @@ Before outputting the completion promise:
|
|
|
107
107
|
When you believe the task is complete:
|
|
108
108
|
1. **First**, spawn Architect to verify your work (ALWAYS pass model explicitly!):
|
|
109
109
|
```
|
|
110
|
-
|
|
110
|
+
call_omco_agent(subagent_type="oh-my-claudecode:architect", model="opus", run_in_background=false, prompt="Verify this implementation is complete: [describe what you did]")
|
|
111
111
|
```
|
|
112
112
|
|
|
113
113
|
2. **Wait for Architect's assessment**
|
|
@@ -60,17 +60,17 @@ When given a research goal, decompose into 3-7 independent stages:
|
|
|
60
60
|
|
|
61
61
|
### Parallel Scientist Invocation
|
|
62
62
|
|
|
63
|
-
Fire independent stages in parallel via
|
|
63
|
+
Fire independent stages in parallel via call_omco_agent tool:
|
|
64
64
|
|
|
65
65
|
```
|
|
66
66
|
// Stage 1 - Simple data gathering
|
|
67
|
-
|
|
67
|
+
call_omco_agent(subagent_type="oh-my-claudecode:scientist-low", model="haiku", run_in_background=true, prompt="[RESEARCH_STAGE:1] Investigate...")
|
|
68
68
|
|
|
69
69
|
// Stage 2 - Standard analysis
|
|
70
|
-
|
|
70
|
+
call_omco_agent(subagent_type="oh-my-claudecode:scientist", model="sonnet", run_in_background=true, prompt="[RESEARCH_STAGE:2] Analyze...")
|
|
71
71
|
|
|
72
72
|
// Stage 3 - Complex reasoning
|
|
73
|
-
|
|
73
|
+
call_omco_agent(subagent_type="oh-my-claudecode:scientist-high", model="opus", run_in_background=true, prompt="[RESEARCH_STAGE:3] Deep analysis of...")
|
|
74
74
|
```
|
|
75
75
|
|
|
76
76
|
### Smart Model Routing
|
|
@@ -100,7 +100,7 @@ After parallel execution completes, verify findings:
|
|
|
100
100
|
|
|
101
101
|
```
|
|
102
102
|
// Cross-validation stage
|
|
103
|
-
|
|
103
|
+
call_omco_agent(subagent_type="oh-my-claudecode:scientist", model="sonnet", run_in_background=false, prompt="
|
|
104
104
|
[RESEARCH_VERIFICATION]
|
|
105
105
|
Cross-validate these findings for consistency:
|
|
106
106
|
|
|
@@ -181,9 +181,9 @@ When stages analyze different data sources:
|
|
|
181
181
|
|
|
182
182
|
```
|
|
183
183
|
// All fire simultaneously
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
184
|
+
call_omco_agent(subagent_type="oh-my-claudecode:scientist-low", model="haiku", run_in_background=true, prompt="[STAGE:1] Analyze src/api/...")
|
|
185
|
+
call_omco_agent(subagent_type="oh-my-claudecode:scientist-low", model="haiku", run_in_background=true, prompt="[STAGE:2] Analyze src/utils/...")
|
|
186
|
+
call_omco_agent(subagent_type="oh-my-claudecode:scientist-low", model="haiku", run_in_background=true, prompt="[STAGE:3] Analyze src/components/...")
|
|
187
187
|
```
|
|
188
188
|
|
|
189
189
|
### Hypothesis Battery (Parallel)
|
|
@@ -192,9 +192,9 @@ When testing multiple hypotheses:
|
|
|
192
192
|
|
|
193
193
|
```
|
|
194
194
|
// Test hypotheses simultaneously
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
195
|
+
call_omco_agent(subagent_type="oh-my-claudecode:scientist", model="sonnet", run_in_background=true, prompt="[HYPOTHESIS:A] Test if caching improves...")
|
|
196
|
+
call_omco_agent(subagent_type="oh-my-claudecode:scientist", model="sonnet", run_in_background=true, prompt="[HYPOTHESIS:B] Test if batching reduces...")
|
|
197
|
+
call_omco_agent(subagent_type="oh-my-claudecode:scientist", model="sonnet", run_in_background=true, prompt="[HYPOTHESIS:C] Test if lazy loading helps...")
|
|
198
198
|
```
|
|
199
199
|
|
|
200
200
|
### Cross-Validation (Sequential)
|
|
@@ -206,7 +206,7 @@ When verification depends on all findings:
|
|
|
206
206
|
[stages complete]
|
|
207
207
|
|
|
208
208
|
// Then sequential verification
|
|
209
|
-
|
|
209
|
+
call_omco_agent(subagent_type="oh-my-claudecode:scientist-high", model="opus", run_in_background=false, prompt="
|
|
210
210
|
[CROSS_VALIDATION]
|
|
211
211
|
Validate consistency across all findings:
|
|
212
212
|
- Finding 1: ...
|
package/assets/skills/ultraqa.md
CHANGED
|
@@ -40,7 +40,7 @@ If no structured goal provided, interpret the argument as a custom goal.
|
|
|
40
40
|
- `--custom`: Run appropriate command and check for pattern
|
|
41
41
|
- `--interactive`: Use qa-tester for interactive CLI/service testing:
|
|
42
42
|
```
|
|
43
|
-
|
|
43
|
+
call_omco_agent(subagent_type="oh-my-claudecode:qa-tester", model="sonnet", run_in_background=true, prompt="TEST:
|
|
44
44
|
Goal: [describe what to verify]
|
|
45
45
|
Service: [how to start]
|
|
46
46
|
Test cases: [specific scenarios to verify]")
|
|
@@ -52,7 +52,7 @@ If no structured goal provided, interpret the argument as a custom goal.
|
|
|
52
52
|
|
|
53
53
|
3. **ARCHITECT DIAGNOSIS**: Spawn architect to analyze failure
|
|
54
54
|
```
|
|
55
|
-
|
|
55
|
+
call_omco_agent(subagent_type="oh-my-claudecode:architect", model="opus", run_in_background=false, prompt="DIAGNOSE FAILURE:
|
|
56
56
|
Goal: [goal type]
|
|
57
57
|
Output: [test/build output]
|
|
58
58
|
Provide root cause and specific fix recommendations.")
|
|
@@ -60,7 +60,7 @@ If no structured goal provided, interpret the argument as a custom goal.
|
|
|
60
60
|
|
|
61
61
|
4. **FIX ISSUES**: Apply architect's recommendations
|
|
62
62
|
```
|
|
63
|
-
|
|
63
|
+
call_omco_agent(subagent_type="oh-my-claudecode:executor", model="sonnet", run_in_background=true, prompt="FIX:
|
|
64
64
|
Issue: [architect diagnosis]
|
|
65
65
|
Files: [affected files]
|
|
66
66
|
Apply the fix precisely as recommended.")
|
|
@@ -54,19 +54,19 @@ This skill enhances Claude's capabilities by:
|
|
|
54
54
|
|
|
55
55
|
```
|
|
56
56
|
// Simple question → LOW tier (saves tokens!)
|
|
57
|
-
|
|
57
|
+
call_omco_agent(subagent_type="oh-my-claudecode:architect-low", model="haiku", run_in_background=true, prompt="What does this function return?")
|
|
58
58
|
|
|
59
59
|
// Standard implementation → MEDIUM tier
|
|
60
|
-
|
|
60
|
+
call_omco_agent(subagent_type="oh-my-claudecode:executor", model="sonnet", run_in_background=true, prompt="Add error handling to login")
|
|
61
61
|
|
|
62
62
|
// Complex refactoring → HIGH tier
|
|
63
|
-
|
|
63
|
+
call_omco_agent(subagent_type="oh-my-claudecode:executor-high", model="opus", run_in_background=true, prompt="Refactor auth module using JWT across 5 files")
|
|
64
64
|
|
|
65
65
|
// Quick file lookup → LOW tier
|
|
66
|
-
|
|
66
|
+
call_omco_agent(subagent_type="oh-my-claudecode:explore", model="haiku", run_in_background=true, prompt="Find where UserService is defined")
|
|
67
67
|
|
|
68
68
|
// Thorough search → MEDIUM tier
|
|
69
|
-
|
|
69
|
+
call_omco_agent(subagent_type="oh-my-claudecode:explore-medium", model="sonnet", run_in_background=true, prompt="Find all authentication patterns in the codebase")
|
|
70
70
|
```
|
|
71
71
|
|
|
72
72
|
## Background Execution Rules
|
package/bin/doctor.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import * as fs from "node:fs";
|
|
5
5
|
import * as path from "node:path";
|
|
6
6
|
import * as os from "node:os";
|
|
7
|
+
import { execSync } from "node:child_process";
|
|
7
8
|
var OPENCODE_CONFIG_DIR = path.join(os.homedir(), ".config", "opencode");
|
|
8
9
|
var PLUGIN_NAME = "oh-my-claudecode-opencode";
|
|
9
10
|
function checkPluginInstalled() {
|
|
@@ -163,13 +164,107 @@ function checkOmcoConfig() {
|
|
|
163
164
|
details: "Optional: create .opencode/omco.json for custom config"
|
|
164
165
|
};
|
|
165
166
|
}
|
|
167
|
+
function checkVersionUpdate() {
|
|
168
|
+
const pluginPkgPath = path.join(OPENCODE_CONFIG_DIR, "node_modules", PLUGIN_NAME, "package.json");
|
|
169
|
+
try {
|
|
170
|
+
if (!fs.existsSync(pluginPkgPath)) {
|
|
171
|
+
return {
|
|
172
|
+
status: "FAIL",
|
|
173
|
+
message: "Plugin not installed"
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
const pkg = JSON.parse(fs.readFileSync(pluginPkgPath, "utf-8"));
|
|
177
|
+
const installedVersion = pkg.version;
|
|
178
|
+
try {
|
|
179
|
+
const npmVersion = execSync(`npm view ${PLUGIN_NAME} version`, {
|
|
180
|
+
encoding: "utf-8",
|
|
181
|
+
stdio: ["pipe", "pipe", "pipe"]
|
|
182
|
+
}).trim();
|
|
183
|
+
if (installedVersion === npmVersion) {
|
|
184
|
+
return {
|
|
185
|
+
status: "OK",
|
|
186
|
+
message: `Up to date (v${installedVersion})`
|
|
187
|
+
};
|
|
188
|
+
} else {
|
|
189
|
+
return {
|
|
190
|
+
status: "WARN",
|
|
191
|
+
message: `Update available: v${installedVersion} → v${npmVersion}`,
|
|
192
|
+
fix: `Run: cd ~/.config/opencode && npm install ${PLUGIN_NAME}@latest`
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
} catch (npmError) {
|
|
196
|
+
return {
|
|
197
|
+
status: "OK",
|
|
198
|
+
message: "Could not check npm registry (offline?)",
|
|
199
|
+
details: `Installed: v${installedVersion}`
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
} catch (e) {
|
|
203
|
+
return {
|
|
204
|
+
status: "FAIL",
|
|
205
|
+
message: `Failed to check version: ${e.message}`
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
function checkToolCompatibility() {
|
|
210
|
+
const distPath = path.join(OPENCODE_CONFIG_DIR, "node_modules", PLUGIN_NAME, "dist", "index.js");
|
|
211
|
+
const skillPath = path.join(OPENCODE_CONFIG_DIR, "node_modules", PLUGIN_NAME, "assets", "skills", "orchestrate.md");
|
|
212
|
+
try {
|
|
213
|
+
if (!fs.existsSync(distPath)) {
|
|
214
|
+
return {
|
|
215
|
+
status: "FAIL",
|
|
216
|
+
message: "dist/index.js not found"
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
const distContent = fs.readFileSync(distPath, "utf-8");
|
|
220
|
+
const hasNewTool = distContent.includes("call_omco_agent");
|
|
221
|
+
const hasOldTool = distContent.includes("call_omo_agent");
|
|
222
|
+
let hasDeprecatedSkillAPI = false;
|
|
223
|
+
if (fs.existsSync(skillPath)) {
|
|
224
|
+
const skillContent = fs.readFileSync(skillPath, "utf-8");
|
|
225
|
+
hasDeprecatedSkillAPI = skillContent.includes("Task(subagent_type");
|
|
226
|
+
}
|
|
227
|
+
if (hasOldTool) {
|
|
228
|
+
return {
|
|
229
|
+
status: "WARN",
|
|
230
|
+
message: "Using deprecated tool name (call_omo_agent)",
|
|
231
|
+
fix: `Update to v0.6.0+: cd ~/.config/opencode && npm install ${PLUGIN_NAME}@latest`
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
if (hasDeprecatedSkillAPI) {
|
|
235
|
+
return {
|
|
236
|
+
status: "WARN",
|
|
237
|
+
message: "Skills still reference Claude Code Task() API",
|
|
238
|
+
fix: `Update to v0.6.0+: cd ~/.config/opencode && npm install ${PLUGIN_NAME}@latest`
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
if (hasNewTool) {
|
|
242
|
+
return {
|
|
243
|
+
status: "OK",
|
|
244
|
+
message: "Tool API is up to date (call_omco_agent)"
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
return {
|
|
248
|
+
status: "WARN",
|
|
249
|
+
message: "Tool API compatibility unclear",
|
|
250
|
+
fix: `Reinstall: cd ~/.config/opencode && npm install ${PLUGIN_NAME}@latest`
|
|
251
|
+
};
|
|
252
|
+
} catch (e) {
|
|
253
|
+
return {
|
|
254
|
+
status: "FAIL",
|
|
255
|
+
message: `Failed to check tool compatibility: ${e.message}`
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
}
|
|
166
259
|
function runDiagnostics() {
|
|
167
260
|
const checks = {
|
|
168
261
|
pluginInstalled: checkPluginInstalled(),
|
|
169
262
|
pluginInConfig: checkPluginInConfig(),
|
|
170
263
|
assetsPresent: checkAssetsPresent(),
|
|
171
264
|
packageDependency: checkPackageDependency(),
|
|
172
|
-
omcoConfigValid: checkOmcoConfig()
|
|
265
|
+
omcoConfigValid: checkOmcoConfig(),
|
|
266
|
+
versionUpdate: checkVersionUpdate(),
|
|
267
|
+
toolCompatibility: checkToolCompatibility()
|
|
173
268
|
};
|
|
174
269
|
const values = Object.values(checks);
|
|
175
270
|
const summary = {
|
package/bin/doctor.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import * as fs from 'node:fs';
|
|
5
5
|
import * as path from 'node:path';
|
|
6
6
|
import * as os from 'node:os';
|
|
7
|
+
import { execSync } from 'node:child_process';
|
|
7
8
|
|
|
8
9
|
const OPENCODE_CONFIG_DIR = path.join(os.homedir(), '.config', 'opencode');
|
|
9
10
|
const PLUGIN_NAME = 'oh-my-claudecode-opencode';
|
|
@@ -27,6 +28,8 @@ interface DiagnosticReport {
|
|
|
27
28
|
assetsPresent: CheckResult;
|
|
28
29
|
packageDependency: CheckResult;
|
|
29
30
|
omcoConfigValid: CheckResult;
|
|
31
|
+
versionUpdate: CheckResult;
|
|
32
|
+
toolCompatibility: CheckResult;
|
|
30
33
|
};
|
|
31
34
|
summary: {
|
|
32
35
|
total: number;
|
|
@@ -234,6 +237,120 @@ function checkOmcoConfig(): CheckResult {
|
|
|
234
237
|
};
|
|
235
238
|
}
|
|
236
239
|
|
|
240
|
+
// ============================================================
|
|
241
|
+
// CHECK 6: Version Update Check
|
|
242
|
+
// ============================================================
|
|
243
|
+
function checkVersionUpdate(): CheckResult {
|
|
244
|
+
const pluginPkgPath = path.join(OPENCODE_CONFIG_DIR, 'node_modules', PLUGIN_NAME, 'package.json');
|
|
245
|
+
|
|
246
|
+
try {
|
|
247
|
+
if (!fs.existsSync(pluginPkgPath)) {
|
|
248
|
+
return {
|
|
249
|
+
status: 'FAIL',
|
|
250
|
+
message: 'Plugin not installed'
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
const pkg = JSON.parse(fs.readFileSync(pluginPkgPath, 'utf-8'));
|
|
255
|
+
const installedVersion = pkg.version;
|
|
256
|
+
|
|
257
|
+
// Try to check npm registry for latest version
|
|
258
|
+
try {
|
|
259
|
+
const npmVersion = execSync(`npm view ${PLUGIN_NAME} version`, {
|
|
260
|
+
encoding: 'utf-8',
|
|
261
|
+
stdio: ['pipe', 'pipe', 'pipe']
|
|
262
|
+
}).trim();
|
|
263
|
+
|
|
264
|
+
if (installedVersion === npmVersion) {
|
|
265
|
+
return {
|
|
266
|
+
status: 'OK',
|
|
267
|
+
message: `Up to date (v${installedVersion})`
|
|
268
|
+
};
|
|
269
|
+
} else {
|
|
270
|
+
return {
|
|
271
|
+
status: 'WARN',
|
|
272
|
+
message: `Update available: v${installedVersion} → v${npmVersion}`,
|
|
273
|
+
fix: `Run: cd ~/.config/opencode && npm install ${PLUGIN_NAME}@latest`
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
} catch (npmError) {
|
|
277
|
+
// Network error or npm not available
|
|
278
|
+
return {
|
|
279
|
+
status: 'OK',
|
|
280
|
+
message: 'Could not check npm registry (offline?)',
|
|
281
|
+
details: `Installed: v${installedVersion}`
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
} catch (e) {
|
|
285
|
+
return {
|
|
286
|
+
status: 'FAIL',
|
|
287
|
+
message: `Failed to check version: ${(e as Error).message}`
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
// ============================================================
|
|
293
|
+
// CHECK 7: Tool Compatibility Check
|
|
294
|
+
// ============================================================
|
|
295
|
+
function checkToolCompatibility(): CheckResult {
|
|
296
|
+
const distPath = path.join(OPENCODE_CONFIG_DIR, 'node_modules', PLUGIN_NAME, 'dist', 'index.js');
|
|
297
|
+
const skillPath = path.join(OPENCODE_CONFIG_DIR, 'node_modules', PLUGIN_NAME, 'assets', 'skills', 'orchestrate.md');
|
|
298
|
+
|
|
299
|
+
try {
|
|
300
|
+
if (!fs.existsSync(distPath)) {
|
|
301
|
+
return {
|
|
302
|
+
status: 'FAIL',
|
|
303
|
+
message: 'dist/index.js not found'
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
const distContent = fs.readFileSync(distPath, 'utf-8');
|
|
308
|
+
const hasNewTool = distContent.includes('call_omco_agent');
|
|
309
|
+
const hasOldTool = distContent.includes('call_omo_agent');
|
|
310
|
+
|
|
311
|
+
// Check skill file for deprecated Task() API
|
|
312
|
+
let hasDeprecatedSkillAPI = false;
|
|
313
|
+
if (fs.existsSync(skillPath)) {
|
|
314
|
+
const skillContent = fs.readFileSync(skillPath, 'utf-8');
|
|
315
|
+
hasDeprecatedSkillAPI = skillContent.includes('Task(subagent_type');
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
if (hasOldTool) {
|
|
319
|
+
return {
|
|
320
|
+
status: 'WARN',
|
|
321
|
+
message: 'Using deprecated tool name (call_omo_agent)',
|
|
322
|
+
fix: `Update to v0.6.0+: cd ~/.config/opencode && npm install ${PLUGIN_NAME}@latest`
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
if (hasDeprecatedSkillAPI) {
|
|
327
|
+
return {
|
|
328
|
+
status: 'WARN',
|
|
329
|
+
message: 'Skills still reference Claude Code Task() API',
|
|
330
|
+
fix: `Update to v0.6.0+: cd ~/.config/opencode && npm install ${PLUGIN_NAME}@latest`
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
if (hasNewTool) {
|
|
335
|
+
return {
|
|
336
|
+
status: 'OK',
|
|
337
|
+
message: 'Tool API is up to date (call_omco_agent)'
|
|
338
|
+
};
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
return {
|
|
342
|
+
status: 'WARN',
|
|
343
|
+
message: 'Tool API compatibility unclear',
|
|
344
|
+
fix: `Reinstall: cd ~/.config/opencode && npm install ${PLUGIN_NAME}@latest`
|
|
345
|
+
};
|
|
346
|
+
} catch (e) {
|
|
347
|
+
return {
|
|
348
|
+
status: 'FAIL',
|
|
349
|
+
message: `Failed to check tool compatibility: ${(e as Error).message}`
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
|
|
237
354
|
// ============================================================
|
|
238
355
|
// MAIN
|
|
239
356
|
// ============================================================
|
|
@@ -244,6 +361,8 @@ function runDiagnostics(): DiagnosticReport {
|
|
|
244
361
|
assetsPresent: checkAssetsPresent(),
|
|
245
362
|
packageDependency: checkPackageDependency(),
|
|
246
363
|
omcoConfigValid: checkOmcoConfig(),
|
|
364
|
+
versionUpdate: checkVersionUpdate(),
|
|
365
|
+
toolCompatibility: checkToolCompatibility(),
|
|
247
366
|
};
|
|
248
367
|
|
|
249
368
|
const values = Object.values(checks);
|