clikit-plugin 0.1.6 → 0.1.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/dist/cli.js
CHANGED
|
@@ -6,12 +6,16 @@ import * as fs from "fs";
|
|
|
6
6
|
import * as path from "path";
|
|
7
7
|
import * as os from "os";
|
|
8
8
|
var PLUGIN_NAME = "clikit-plugin";
|
|
9
|
-
var VERSION = "0.1.
|
|
9
|
+
var VERSION = "0.1.8";
|
|
10
|
+
function getRealHome() {
|
|
11
|
+
return process.env.SNAP_REAL_HOME || os.homedir();
|
|
12
|
+
}
|
|
10
13
|
function getConfigDir() {
|
|
14
|
+
const home = getRealHome();
|
|
11
15
|
if (process.platform === "win32") {
|
|
12
|
-
return path.join(process.env.APPDATA || path.join(
|
|
16
|
+
return path.join(process.env.APPDATA || path.join(home, "AppData", "Roaming"), "opencode");
|
|
13
17
|
}
|
|
14
|
-
return path.join(process.env.XDG_CONFIG_HOME || path.join(
|
|
18
|
+
return path.join(process.env.XDG_CONFIG_HOME || path.join(home, ".config"), "opencode");
|
|
15
19
|
}
|
|
16
20
|
function getConfigPath() {
|
|
17
21
|
const configDir = getConfigDir();
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
---
|
|
2
|
+
date: 2026-02-15
|
|
3
|
+
phase: implementing
|
|
4
|
+
branch: main
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Handoff: CliKit Plugin Installation Fix
|
|
8
|
+
|
|
9
|
+
## Status Summary
|
|
10
|
+
|
|
11
|
+
CliKit plugin fully implemented (10 agents, 19 commands, 48 skills, 14 hooks, 6 tools). Published to npm as `clikit-plugin@0.1.6`. **Critical issue**: Plugin NOT registered in `~/.config/opencode/opencode.json` — the "plugin" key is missing entirely. This means the CLI installer was either never run or failed silently.
|
|
12
|
+
|
|
13
|
+
## Task Status
|
|
14
|
+
|
|
15
|
+
### ✅ Completed
|
|
16
|
+
- [x] T-001: Create 10 agents with proper model assignments
|
|
17
|
+
- [x] T-002: Create 19 slash commands
|
|
18
|
+
- [x] T-003: Create 48 workflow skills
|
|
19
|
+
- [x] T-004: Create 14 runtime hooks
|
|
20
|
+
- [x] T-005: Create 6 custom tools
|
|
21
|
+
- [x] T-006: Publish to npm as clikit-plugin@0.1.6
|
|
22
|
+
- [x] T-007: Create CLI installer code
|
|
23
|
+
|
|
24
|
+
### 🔄 In Progress
|
|
25
|
+
- [ ] T-008: Fix plugin registration in OpenCode config
|
|
26
|
+
- **Current state:** `~/.config/opencode/opencode.json` has no "plugin" key
|
|
27
|
+
- **Next step:** Run CLI installer and debug why registration isn't persisting
|
|
28
|
+
|
|
29
|
+
### 📋 Not Started
|
|
30
|
+
- [ ] T-009: Verify plugin loads when OpenCode starts
|
|
31
|
+
- [ ] T-010: Test installation in fresh environment
|
|
32
|
+
|
|
33
|
+
## Files Modified
|
|
34
|
+
|
|
35
|
+
| File | Status | Notes |
|
|
36
|
+
|------|--------|-------|
|
|
37
|
+
| `.opencode/src/index.ts` | Complete | Main plugin entry point |
|
|
38
|
+
| `.opencode/src/cli.ts` | Complete | CLI installer script |
|
|
39
|
+
| `.opencode/src/config.ts` | Complete | Config loader |
|
|
40
|
+
| `.opencode/package.json` | Complete | npm package config |
|
|
41
|
+
|
|
42
|
+
## Git State
|
|
43
|
+
|
|
44
|
+
- **Branch:** `main`
|
|
45
|
+
- **Last commit:** `31b200c` - Update README with simplified installation
|
|
46
|
+
- **Uncommitted:** No
|
|
47
|
+
|
|
48
|
+
## Known Issues
|
|
49
|
+
|
|
50
|
+
1. **Plugin not registered** - `~/.config/opencode/opencode.json` has NO "plugin" array
|
|
51
|
+
2. **Plugin not cached** - `~/.cache/opencode/node_modules/` missing clikit-plugin
|
|
52
|
+
3. **Possible path mismatch** - snap/bun may use different config path than native bun
|
|
53
|
+
|
|
54
|
+
## Next Steps
|
|
55
|
+
|
|
56
|
+
1. [ ] Run `bun x clikit-plugin install` to test CLI
|
|
57
|
+
2. [ ] Verify output with `grep '"plugin"' ~/.config/opencode/opencode.json`
|
|
58
|
+
3. [ ] Check if snap/bun path issue: `/home/kira/snap/bun-js/87/.config/opencode/`
|
|
59
|
+
4. [ ] Restart OpenCode and check for `[CliKit]` logs
|
|
60
|
+
|
|
61
|
+
## Context for Resumption
|
|
62
|
+
|
|
63
|
+
### Key Discovery
|
|
64
|
+
The opencode.json at `~/.config/opencode/opencode.json` exists but has no "plugin" array. CLI code at `.opencode/src/cli.ts:72-84` writes to this path, but the key is missing.
|
|
65
|
+
|
|
66
|
+
### Possible Causes
|
|
67
|
+
1. CLI was never executed by user
|
|
68
|
+
2. Bun snap uses different home path: `/home/kira/snap/bun-js/87/`
|
|
69
|
+
3. Write operation failed silently
|
|
70
|
+
|
|
71
|
+
### Verification Commands
|
|
72
|
+
```bash
|
|
73
|
+
# Run installer
|
|
74
|
+
bun x clikit-plugin install
|
|
75
|
+
|
|
76
|
+
# Check registration
|
|
77
|
+
grep -A2 '"plugin"' ~/.config/opencode/opencode.json
|
|
78
|
+
|
|
79
|
+
# Check snap path
|
|
80
|
+
ls /home/kira/snap/bun-js/87/.config/opencode/
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Reference Implementation
|
|
84
|
+
- oh-my-opencode-slim: https://github.com/alvinunreal/oh-my-opencode-slim
|
|
85
|
+
- Plugin docs: https://opencode.ai/docs/plugins/
|
|
86
|
+
|
|
87
|
+
### Key Files to Review
|
|
88
|
+
- `.opencode/src/cli.ts` — CLI installer logic (lines 55-88)
|
|
89
|
+
- `~/.config/opencode/opencode.json` — Target config file
|
|
90
|
+
- `.opencode/package.json` — Package config with `main` and `bin`
|