opencode-skills-doctor 0.3.2 → 0.3.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.
package/README.md CHANGED
@@ -114,22 +114,31 @@ It registers:
114
114
 
115
115
  ### OpenCode 1.x
116
116
 
117
- 1.x uses a different plugin API. Point the `plugin` array at the `/v1` entry:
117
+ 1.x uses a different plugin API: it resolves the `./server` export for npm plugins and needs `@opencode-ai/plugin` at runtime. The reliable setup is a one-line local plugin file.
118
+
119
+ 1. Install the package where OpenCode resolves plugins:
120
+
121
+ ```powershell
122
+ npm i --prefix ~/.config/opencode opencode-skills-doctor
123
+ ```
124
+
125
+ 2. Create `~/.config/opencode/plugins/skills-doctor.js`:
126
+
127
+ ```js
128
+ export { SkillsDoctorPlugin } from "opencode-skills-doctor/v1"
129
+ ```
130
+
131
+ 3. Reference it from `opencode.json` (1.x uses `plugin`, not `plugins`):
118
132
 
119
133
  ```jsonc
120
- // opencode.json (1.x)
121
134
  {
122
- "plugin": ["opencode-skills-doctor/v1"]
135
+ "plugin": ["C:\\Users\\<you>\\.config\\opencode\\plugins\\skills-doctor.js"]
123
136
  }
124
137
  ```
125
138
 
126
- It registers the same `skills_doctor` tool (1.x has no `/skills-doctor` command hook). The package must be installed where OpenCode resolves plugins, e.g.:
127
-
128
- ```powershell
129
- npm i --prefix ~/.config/opencode opencode-skills-doctor
130
- ```
139
+ It registers the same `skills_doctor` tool (1.x has no `/skills-doctor` command hook).
131
140
 
132
- > The package root entry (`import "opencode-skills-doctor"`) is the V2 plugin and requires OpenCode 2.x. The CLI works on both lines.
141
+ > The package root entry is the V2 plugin and requires OpenCode 2.x. The CLI works on both lines.
133
142
 
134
143
  ## Rules
135
144
 
package/README.zh-CN.md CHANGED
@@ -114,22 +114,31 @@ skills-doctor update --into .\team-skills
114
114
 
115
115
  ### OpenCode 1.x
116
116
 
117
- 1.x 用的是另一套插件 API,把 `plugin` 数组指向 `/v1` 入口:
117
+ 1.x 用的是另一套插件 API:npm 插件会解析 `./server` 导出,运行时需要 `@opencode-ai/plugin`。最稳的接法是加一个一行的本地插件文件。
118
+
119
+ 1. 先把包装到 OpenCode 解析插件的位置:
120
+
121
+ ```powershell
122
+ npm i --prefix ~/.config/opencode opencode-skills-doctor
123
+ ```
124
+
125
+ 2. 新建 `~/.config/opencode/plugins/skills-doctor.js`:
126
+
127
+ ```js
128
+ export { SkillsDoctorPlugin } from "opencode-skills-doctor/v1"
129
+ ```
130
+
131
+ 3. 在 `opencode.json` 里引用(1.x 用 `plugin`,不是 `plugins`):
118
132
 
119
133
  ```jsonc
120
- // opencode.json(1.x)
121
134
  {
122
- "plugin": ["opencode-skills-doctor/v1"]
135
+ "plugin": ["C:\\Users\\<you>\\.config\\opencode\\plugins\\skills-doctor.js"]
123
136
  }
124
137
  ```
125
138
 
126
- 它会注册同样的 `skills_doctor` 工具(1.x 没有 `/skills-doctor` 命令钩子)。需要把包装在 OpenCode 能解析插件的位置,例如:
127
-
128
- ```powershell
129
- npm i --prefix ~/.config/opencode opencode-skills-doctor
130
- ```
139
+ 它会注册同样的 `skills_doctor` 工具(1.x 没有 `/skills-doctor` 命令钩子)。
131
140
 
132
- > 包根入口(`import "opencode-skills-doctor"`)是 V2 插件,需要 OpenCode 2.x;CLI 两条线都能用。
141
+ > 包根入口是 V2 插件,需要 OpenCode 2.x;CLI 两条线都能用。
133
142
 
134
143
  ## 检测规则
135
144
 
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "opencode-skills-doctor",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "Local scanner, linter, fixer and updater for OpenCode skills, with OpenCode 2.x and 1.x plugin entries",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": "./src/plugin.mjs",
8
8
  "./plugin": "./src/plugin.mjs",
9
+ "./server": "./src/plugin-v1.mjs",
9
10
  "./v1": "./src/plugin-v1.mjs",
10
11
  "./audit": "./src/audit.mjs"
11
12
  },