opencode-skill-autodiscovery 1.1.4 → 1.3.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/README.md +87 -10
- package/dist/agents.d.ts +18 -0
- package/dist/agents.d.ts.map +1 -0
- package/dist/agents.js +143 -0
- package/dist/agents.js.map +1 -0
- package/dist/discovery.d.ts +71 -0
- package/dist/discovery.d.ts.map +1 -0
- package/dist/discovery.js +629 -0
- package/dist/discovery.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22 -275
- package/dist/index.js.map +1 -1
- package/dist/log.d.ts +3 -0
- package/dist/log.d.ts.map +1 -0
- package/dist/log.js +12 -0
- package/dist/log.js.map +1 -0
- package/dist/mcp.d.ts +18 -0
- package/dist/mcp.d.ts.map +1 -0
- package/dist/mcp.js +169 -0
- package/dist/mcp.js.map +1 -0
- package/dist/schema.d.ts +5 -0
- package/dist/schema.d.ts.map +1 -0
- package/dist/schema.js +9 -0
- package/dist/schema.js.map +1 -0
- package/package.json +3 -2
|
@@ -0,0 +1,629 @@
|
|
|
1
|
+
import { existsSync, readFileSync, readdirSync, realpathSync, statSync, } from "node:fs";
|
|
2
|
+
import { homedir } from "node:os";
|
|
3
|
+
import { dirname, isAbsolute, join, relative, sep } from "node:path";
|
|
4
|
+
import { log } from "./log.js";
|
|
5
|
+
import { readAgents } from "./agents.js";
|
|
6
|
+
import { readMcp } from "./mcp.js";
|
|
7
|
+
import { NAME_PATTERN, PLUGIN_SCHEMA, VERSION } from "./schema.js";
|
|
8
|
+
export { readAgents } from "./agents.js";
|
|
9
|
+
export { readMcp } from "./mcp.js";
|
|
10
|
+
function isDirectory(p) {
|
|
11
|
+
try {
|
|
12
|
+
return statSync(p).isDirectory();
|
|
13
|
+
}
|
|
14
|
+
catch {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
function isRegularFile(p) {
|
|
19
|
+
try {
|
|
20
|
+
return statSync(p).isFile();
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
// True when `child` resolves (through symlinks) inside `parent`.
|
|
27
|
+
export function contains(parent, child) {
|
|
28
|
+
const p = realpathSync(parent);
|
|
29
|
+
const c = realpathSync(child);
|
|
30
|
+
if (p === c)
|
|
31
|
+
return true;
|
|
32
|
+
const rel = relative(p, c);
|
|
33
|
+
return rel !== ".." && !rel.startsWith(`..${sep}`) && !isAbsolute(rel);
|
|
34
|
+
}
|
|
35
|
+
// Parses the YAML frontmatter of a SKILL.md (name, description). Returns null
|
|
36
|
+
// when the file is unreadable or lacks a valid `name`.
|
|
37
|
+
export function readSkillInfo(dir) {
|
|
38
|
+
const skillMd = join(dir, "SKILL.md");
|
|
39
|
+
let content;
|
|
40
|
+
try {
|
|
41
|
+
content = readFileSync(skillMd, "utf8");
|
|
42
|
+
}
|
|
43
|
+
catch {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
const frontmatter = /^---\s*\n([\s\S]*?)\n---/.exec(content)?.[1];
|
|
47
|
+
if (!frontmatter)
|
|
48
|
+
return null;
|
|
49
|
+
const field = (key) => {
|
|
50
|
+
const m = new RegExp(`^${key}:[ \\t]*(.*)$`, "m").exec(frontmatter);
|
|
51
|
+
if (!m)
|
|
52
|
+
return undefined;
|
|
53
|
+
return m[1].trim().replace(/^["']|["']$/g, "");
|
|
54
|
+
};
|
|
55
|
+
const name = field("name");
|
|
56
|
+
if (!name)
|
|
57
|
+
return null;
|
|
58
|
+
return { dir, name, description: field("description") ?? "" };
|
|
59
|
+
}
|
|
60
|
+
// Reads a conformant Agent Plugins 1.0.0 package from a directory root.
|
|
61
|
+
// Returns null when the root has no valid plugin.json, so callers can fall
|
|
62
|
+
// back to legacy discovery. The $schema URL and the manifest name are the
|
|
63
|
+
// discriminators that make scanning untrusted directories safe.
|
|
64
|
+
export function readPackage(root, source) {
|
|
65
|
+
const manifestPath = join(root, "plugin.json");
|
|
66
|
+
if (!isRegularFile(manifestPath))
|
|
67
|
+
return null;
|
|
68
|
+
let manifest;
|
|
69
|
+
try {
|
|
70
|
+
manifest = JSON.parse(readFileSync(manifestPath, "utf8"));
|
|
71
|
+
}
|
|
72
|
+
catch {
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
if (typeof manifest !== "object" || manifest === null)
|
|
76
|
+
return null;
|
|
77
|
+
if (typeof manifest.$schema !== "string" || !PLUGIN_SCHEMA.test(manifest.$schema)) {
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
if (typeof manifest.name !== "string" ||
|
|
81
|
+
manifest.name.length === 0 ||
|
|
82
|
+
manifest.name.length > 64 ||
|
|
83
|
+
!NAME_PATTERN.test(manifest.name)) {
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
const skillDirs = [];
|
|
87
|
+
const skillsRoot = join(root, "skills");
|
|
88
|
+
if (isDirectory(skillsRoot)) {
|
|
89
|
+
let entries;
|
|
90
|
+
try {
|
|
91
|
+
entries = readdirSync(skillsRoot);
|
|
92
|
+
}
|
|
93
|
+
catch {
|
|
94
|
+
entries = [];
|
|
95
|
+
}
|
|
96
|
+
for (const entry of entries) {
|
|
97
|
+
const dir = join(skillsRoot, entry);
|
|
98
|
+
if (!isDirectory(dir))
|
|
99
|
+
continue;
|
|
100
|
+
if (!isRegularFile(join(dir, "SKILL.md")))
|
|
101
|
+
continue;
|
|
102
|
+
let resolved;
|
|
103
|
+
try {
|
|
104
|
+
resolved = realpathSync(dir);
|
|
105
|
+
}
|
|
106
|
+
catch {
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
109
|
+
if (!contains(root, resolved))
|
|
110
|
+
continue;
|
|
111
|
+
skillDirs.push(resolved);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
const mcpPath = isRegularFile(join(root, "mcp.json"))
|
|
115
|
+
? join(root, "mcp.json")
|
|
116
|
+
: undefined;
|
|
117
|
+
return {
|
|
118
|
+
source,
|
|
119
|
+
name: manifest.name,
|
|
120
|
+
root,
|
|
121
|
+
skillDirs,
|
|
122
|
+
mcpPath,
|
|
123
|
+
schemaVersion: VERSION.exec(manifest.$schema)?.[1],
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
// Legacy tree walk: every directory containing a SKILL.md, at any depth.
|
|
127
|
+
export function findSkillDirs(root, out, seen) {
|
|
128
|
+
const resolved = join(root);
|
|
129
|
+
if (seen.has(resolved))
|
|
130
|
+
return;
|
|
131
|
+
seen.add(resolved);
|
|
132
|
+
let entries;
|
|
133
|
+
try {
|
|
134
|
+
entries = readdirSync(resolved);
|
|
135
|
+
}
|
|
136
|
+
catch {
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
for (const entry of entries) {
|
|
140
|
+
if (entry === ".git")
|
|
141
|
+
continue;
|
|
142
|
+
const full = join(resolved, entry);
|
|
143
|
+
if (!isDirectory(full))
|
|
144
|
+
continue;
|
|
145
|
+
if (isRegularFile(join(full, "SKILL.md"))) {
|
|
146
|
+
out.add(full);
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
findSkillDirs(full, out, seen);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
// True when a legacy Claude Code plugin declares at least one agent, so an
|
|
154
|
+
// agents-only plugin is still discovered even though it ships no skills.
|
|
155
|
+
function hasClaudeAgents(root) {
|
|
156
|
+
try {
|
|
157
|
+
const manifest = JSON.parse(readFileSync(join(root, ".claude-plugin", "plugin.json"), "utf8"));
|
|
158
|
+
if (typeof manifest !== "object" || manifest === null)
|
|
159
|
+
return false;
|
|
160
|
+
const agents = manifest.agents;
|
|
161
|
+
return (typeof agents === "object" &&
|
|
162
|
+
agents !== null &&
|
|
163
|
+
Object.keys(agents).length > 0);
|
|
164
|
+
}
|
|
165
|
+
catch {
|
|
166
|
+
return false;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
// Prefers a conformant package manifest; falls back to a legacy tree walk so
|
|
170
|
+
// non-conformant layouts keep working. Returns null when nothing is found.
|
|
171
|
+
export function packageFromDir(root, source) {
|
|
172
|
+
const pkg = readPackage(root, source);
|
|
173
|
+
if (pkg)
|
|
174
|
+
return pkg;
|
|
175
|
+
const skillDirs = new Set();
|
|
176
|
+
findSkillDirs(root, skillDirs, new Set());
|
|
177
|
+
if (skillDirs.size === 0 && !hasClaudeAgents(root))
|
|
178
|
+
return null;
|
|
179
|
+
return {
|
|
180
|
+
source,
|
|
181
|
+
name: root.split(/[\\/]/).pop() || root,
|
|
182
|
+
root,
|
|
183
|
+
skillDirs: [...skillDirs],
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
// --- VS Code agent plugin discovery ---------------------------------------
|
|
187
|
+
// VS Code keeps agent plugins in a per-platform "data dir". The holding
|
|
188
|
+
// folder is named `agent-plugins` on older builds (e.g. ~/.vscode) and
|
|
189
|
+
// `agentPlugins` on newer builds; remote servers nest theirs under `data/`
|
|
190
|
+
// (~/.vscode-server/data/agentPlugins). We list every known candidate so the
|
|
191
|
+
// discovery works regardless of OS, build channel, or local/remote setup.
|
|
192
|
+
function vsCodeDataRoots(extra) {
|
|
193
|
+
const home = homedir();
|
|
194
|
+
const roots = new Set([
|
|
195
|
+
join(home, ".vscode"),
|
|
196
|
+
// Linux
|
|
197
|
+
join(home, ".config", "Code"),
|
|
198
|
+
join(home, ".config", "Code - Insiders"),
|
|
199
|
+
// macOS
|
|
200
|
+
join(home, "Library", "Application Support", "Code"),
|
|
201
|
+
join(home, "Library", "Application Support", "Code - Insiders"),
|
|
202
|
+
// Windows
|
|
203
|
+
...(process.env.APPDATA
|
|
204
|
+
? [
|
|
205
|
+
join(process.env.APPDATA, "Code"),
|
|
206
|
+
join(process.env.APPDATA, "Code - Insiders"),
|
|
207
|
+
]
|
|
208
|
+
: []),
|
|
209
|
+
// Remote hosts (Remote-SSH, Dev Containers, Codespaces, WSL)
|
|
210
|
+
join(home, ".vscode-server"),
|
|
211
|
+
join(home, ".vscode-server-insiders"),
|
|
212
|
+
join(home, ".vscode-remote"),
|
|
213
|
+
]);
|
|
214
|
+
for (const root of extra)
|
|
215
|
+
roots.add(root);
|
|
216
|
+
return [...roots];
|
|
217
|
+
}
|
|
218
|
+
function agentPluginDirs(roots) {
|
|
219
|
+
const dirs = new Set();
|
|
220
|
+
for (const root of roots) {
|
|
221
|
+
dirs.add(join(root, "agent-plugins"));
|
|
222
|
+
dirs.add(join(root, "agentPlugins"));
|
|
223
|
+
dirs.add(join(root, "data", "agent-plugins"));
|
|
224
|
+
dirs.add(join(root, "data", "agentPlugins"));
|
|
225
|
+
}
|
|
226
|
+
return [...dirs];
|
|
227
|
+
}
|
|
228
|
+
function vscodePluginPath(pluginUri) {
|
|
229
|
+
const m = /^file:\/\/(.+)$/.exec(pluginUri);
|
|
230
|
+
if (!m)
|
|
231
|
+
return pluginUri;
|
|
232
|
+
let raw;
|
|
233
|
+
try {
|
|
234
|
+
raw = decodeURIComponent(m[1]);
|
|
235
|
+
}
|
|
236
|
+
catch {
|
|
237
|
+
raw = m[1];
|
|
238
|
+
}
|
|
239
|
+
if (raw.startsWith("/"))
|
|
240
|
+
raw = raw.slice(1);
|
|
241
|
+
return raw;
|
|
242
|
+
}
|
|
243
|
+
export function collectVscodeManifest(out, installedJson) {
|
|
244
|
+
if (!existsSync(installedJson))
|
|
245
|
+
return;
|
|
246
|
+
let manifest;
|
|
247
|
+
try {
|
|
248
|
+
manifest = JSON.parse(readFileSync(installedJson, "utf8"));
|
|
249
|
+
}
|
|
250
|
+
catch {
|
|
251
|
+
return;
|
|
252
|
+
}
|
|
253
|
+
for (const plugin of manifest.installed ?? []) {
|
|
254
|
+
if (!plugin.pluginUri)
|
|
255
|
+
continue;
|
|
256
|
+
const dir = vscodePluginPath(plugin.pluginUri);
|
|
257
|
+
if (dir) {
|
|
258
|
+
const pkg = packageFromDir(dir, "vscode");
|
|
259
|
+
if (pkg)
|
|
260
|
+
out.push(pkg);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
// Remote hosts: VS Code syncs client skills into
|
|
265
|
+
// {data}/agentPlugins/{sanitizedUri}/{nonce}/ and records the LRU in
|
|
266
|
+
// cache.json. Resolve each entry so the materialized synced-customization
|
|
267
|
+
// bundle ("VS Code Synced Data" Open Plugin, skills/<name>/SKILL.md) is
|
|
268
|
+
// discovered.
|
|
269
|
+
export function collectVscodeCache(out, cacheJson) {
|
|
270
|
+
if (!existsSync(cacheJson))
|
|
271
|
+
return;
|
|
272
|
+
let entries;
|
|
273
|
+
try {
|
|
274
|
+
entries = JSON.parse(readFileSync(cacheJson, "utf8"));
|
|
275
|
+
}
|
|
276
|
+
catch {
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
if (!Array.isArray(entries))
|
|
280
|
+
return;
|
|
281
|
+
const parent = dirname(cacheJson);
|
|
282
|
+
for (const entry of entries) {
|
|
283
|
+
if (typeof entry?.uri !== "string")
|
|
284
|
+
continue;
|
|
285
|
+
const key = sanitizeKey(entry.uri) || "default";
|
|
286
|
+
const nonce = typeof entry.nonce === "string" && entry.nonce
|
|
287
|
+
? sanitizeKey(entry.nonce)
|
|
288
|
+
: "default";
|
|
289
|
+
const nonceDir = join(parent, key, nonce);
|
|
290
|
+
if (isDirectory(nonceDir)) {
|
|
291
|
+
const pkg = packageFromDir(nonceDir, "vscode");
|
|
292
|
+
if (pkg)
|
|
293
|
+
out.push(pkg);
|
|
294
|
+
}
|
|
295
|
+
else {
|
|
296
|
+
// Layouts without the {nonce} subdirectory materialize the bundle
|
|
297
|
+
// directly under {key}; walking it only when the nonce dir is absent
|
|
298
|
+
// avoids re-descending into it.
|
|
299
|
+
const pkg = packageFromDir(join(parent, key), "vscode");
|
|
300
|
+
if (pkg)
|
|
301
|
+
out.push(pkg);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
// Mirrors the server-side AgentPluginManager sanitizer so we can resolve the
|
|
306
|
+
// cache.json entries to their on-disk directories.
|
|
307
|
+
function sanitizeKey(value) {
|
|
308
|
+
return value
|
|
309
|
+
.replace(/[^a-zA-Z0-9]/g, "-")
|
|
310
|
+
.replace(/-+/g, "-")
|
|
311
|
+
.replace(/^-|-$/g, "")
|
|
312
|
+
.substring(0, 128);
|
|
313
|
+
}
|
|
314
|
+
function collectAgentPluginRoot(out, root) {
|
|
315
|
+
const installedJson = join(root, "installed.json");
|
|
316
|
+
const cacheJson = join(root, "cache.json");
|
|
317
|
+
const hasManifest = existsSync(installedJson) || existsSync(cacheJson);
|
|
318
|
+
collectVscodeManifest(out, installedJson);
|
|
319
|
+
collectVscodeCache(out, cacheJson);
|
|
320
|
+
// Newer VS Code installs marketplaces directly as {host}/{org}/{repo}
|
|
321
|
+
// subdirectories with no manifest file at all. Fall back to a full tree walk
|
|
322
|
+
// only when no metadata exists, so we don't surface skills from cloned-but-
|
|
323
|
+
// not-installed marketplaces on setups that do have a manifest.
|
|
324
|
+
if (!hasManifest) {
|
|
325
|
+
const pkg = packageFromDir(root, "vscode");
|
|
326
|
+
if (pkg)
|
|
327
|
+
out.push(pkg);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
export function collectVscode(out, extra) {
|
|
331
|
+
for (const dir of agentPluginDirs(vsCodeDataRoots(extra))) {
|
|
332
|
+
collectAgentPluginRoot(out, dir);
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
// --- Claude Code plugin discovery ------------------------------------------
|
|
336
|
+
export function collectClaudeManifest(out, installedJson) {
|
|
337
|
+
if (!existsSync(installedJson))
|
|
338
|
+
return;
|
|
339
|
+
let manifest;
|
|
340
|
+
try {
|
|
341
|
+
manifest = JSON.parse(readFileSync(installedJson, "utf8"));
|
|
342
|
+
}
|
|
343
|
+
catch {
|
|
344
|
+
return;
|
|
345
|
+
}
|
|
346
|
+
for (const versions of Object.values(manifest.plugins ?? {})) {
|
|
347
|
+
for (const plugin of versions) {
|
|
348
|
+
if (plugin.installPath) {
|
|
349
|
+
const pkg = packageFromDir(plugin.installPath, "claude");
|
|
350
|
+
if (pkg)
|
|
351
|
+
out.push(pkg);
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
export function collectClaude(out) {
|
|
357
|
+
const home = homedir();
|
|
358
|
+
const installedJsons = [
|
|
359
|
+
join(home, ".claude", "plugins", "installed_plugins.json"),
|
|
360
|
+
join(home, ".claude", "remote", "plugins", "installed_plugins.json"),
|
|
361
|
+
];
|
|
362
|
+
for (const installedJson of installedJsons) {
|
|
363
|
+
if (existsSync(installedJson)) {
|
|
364
|
+
collectClaudeManifest(out, installedJson);
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
// Always scan the SSH-synced remote bundle too: it can exist alongside a
|
|
368
|
+
// local Claude Code install that has its own installed_plugins.json, and
|
|
369
|
+
// the same-source mirror dedup in planConfig collapses any overlap.
|
|
370
|
+
const remoteRoot = join(home, ".claude", "remote", "plugins");
|
|
371
|
+
if (existsSync(remoteRoot)) {
|
|
372
|
+
const pkg = packageFromDir(remoteRoot, "claude");
|
|
373
|
+
if (pkg)
|
|
374
|
+
out.push(pkg);
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
// --- npm-distributed Agent Plugins packages --------------------------------
|
|
378
|
+
export function opencodeCacheRoot() {
|
|
379
|
+
const base = process.env.XDG_CACHE_HOME || join(homedir(), ".cache");
|
|
380
|
+
return join(base, "opencode");
|
|
381
|
+
}
|
|
382
|
+
// opencode installs npm plugins into its own cache, not the project's
|
|
383
|
+
// node_modules: {cache}/packages/{name}@{version}/node_modules/{name}. Scanning
|
|
384
|
+
// it is what makes an npm-distributed Agent Plugins package work without any
|
|
385
|
+
// manual skills.paths entry.
|
|
386
|
+
export function collectOpencodeCache(packagesRoot, out) {
|
|
387
|
+
let pkgEntries;
|
|
388
|
+
try {
|
|
389
|
+
pkgEntries = readdirSync(packagesRoot);
|
|
390
|
+
}
|
|
391
|
+
catch {
|
|
392
|
+
return;
|
|
393
|
+
}
|
|
394
|
+
for (const pkgEntry of pkgEntries) {
|
|
395
|
+
const nodeModules = join(packagesRoot, pkgEntry, "node_modules");
|
|
396
|
+
if (!isDirectory(nodeModules))
|
|
397
|
+
continue;
|
|
398
|
+
collectNodeModules(nodeModules, out);
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
// Enumerates immediate package roots of a node_modules dir, including scoped
|
|
402
|
+
// packages (@scope/*). Only conformant packages (root plugin.json) are read;
|
|
403
|
+
// nothing else is walked.
|
|
404
|
+
export function collectNodeModules(nodeModulesRoot, out) {
|
|
405
|
+
if (!isDirectory(nodeModulesRoot))
|
|
406
|
+
return;
|
|
407
|
+
let entries;
|
|
408
|
+
try {
|
|
409
|
+
entries = readdirSync(nodeModulesRoot);
|
|
410
|
+
}
|
|
411
|
+
catch {
|
|
412
|
+
return;
|
|
413
|
+
}
|
|
414
|
+
for (const entry of entries) {
|
|
415
|
+
if (entry === ".bin" || entry.startsWith("."))
|
|
416
|
+
continue;
|
|
417
|
+
const candidate = join(nodeModulesRoot, entry);
|
|
418
|
+
if (!isDirectory(candidate))
|
|
419
|
+
continue;
|
|
420
|
+
if (entry.startsWith("@")) {
|
|
421
|
+
let scoped;
|
|
422
|
+
try {
|
|
423
|
+
scoped = readdirSync(candidate);
|
|
424
|
+
}
|
|
425
|
+
catch {
|
|
426
|
+
continue;
|
|
427
|
+
}
|
|
428
|
+
for (const sub of scoped) {
|
|
429
|
+
if (sub.startsWith("."))
|
|
430
|
+
continue;
|
|
431
|
+
const pkg = readPackage(join(candidate, sub), "node_modules");
|
|
432
|
+
if (pkg)
|
|
433
|
+
out.push(pkg);
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
else {
|
|
437
|
+
const pkg = readPackage(candidate, "node_modules");
|
|
438
|
+
if (pkg)
|
|
439
|
+
out.push(pkg);
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
// --- Merge logic ------------------------------------------------------------
|
|
444
|
+
// Collapses mirrors of the same conformant package discovered from several
|
|
445
|
+
// places at once (opencode cache + project node_modules + VS Code clone +
|
|
446
|
+
// synced bundle). Conformant packages are identified by their manifest name;
|
|
447
|
+
// legacy packages fall back to source + root, which is unique per location.
|
|
448
|
+
function dedupePackages(packages) {
|
|
449
|
+
const seen = new Set();
|
|
450
|
+
const out = [];
|
|
451
|
+
for (const pkg of packages) {
|
|
452
|
+
const id = pkg.schemaVersion
|
|
453
|
+
? `conformant:${pkg.name}`
|
|
454
|
+
: `${pkg.source}\u0000${pkg.root}`;
|
|
455
|
+
if (seen.has(id))
|
|
456
|
+
continue;
|
|
457
|
+
seen.add(id);
|
|
458
|
+
out.push(pkg);
|
|
459
|
+
}
|
|
460
|
+
return out;
|
|
461
|
+
}
|
|
462
|
+
// Computes the config contribution from the discovered packages: every unique
|
|
463
|
+
// skill path, slash commands keyed by frontmatter name with collisions
|
|
464
|
+
// namespaced by package name, and MCP servers keyed by server name with
|
|
465
|
+
// collisions namespaced by package name. `taken` seeds the reserved names from
|
|
466
|
+
// the user's existing config so user-defined entries are never overwritten.
|
|
467
|
+
export function planConfig(packages, taken = {}) {
|
|
468
|
+
packages = dedupePackages(packages);
|
|
469
|
+
const skillPaths = [];
|
|
470
|
+
const seenDir = new Set();
|
|
471
|
+
for (const pkg of packages) {
|
|
472
|
+
for (const dir of pkg.skillDirs) {
|
|
473
|
+
if (seenDir.has(dir))
|
|
474
|
+
continue;
|
|
475
|
+
seenDir.add(dir);
|
|
476
|
+
skillPaths.push(dir);
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
const commands = [];
|
|
480
|
+
const usedCommands = new Set(taken.commands ?? []);
|
|
481
|
+
const commandOwner = new Map();
|
|
482
|
+
for (const name of taken.commands ?? [])
|
|
483
|
+
commandOwner.set(name, "user");
|
|
484
|
+
const seenCommandDir = new Set();
|
|
485
|
+
for (const pkg of packages) {
|
|
486
|
+
for (const dir of pkg.skillDirs) {
|
|
487
|
+
if (seenCommandDir.has(dir))
|
|
488
|
+
continue;
|
|
489
|
+
seenCommandDir.add(dir);
|
|
490
|
+
const info = readSkillInfo(dir);
|
|
491
|
+
if (!info)
|
|
492
|
+
continue;
|
|
493
|
+
let name = info.name;
|
|
494
|
+
const owner = commandOwner.get(name);
|
|
495
|
+
if (owner !== undefined) {
|
|
496
|
+
if (owner === pkg.source) {
|
|
497
|
+
// Same client layout mirroring one plugin (e.g. a VS Code synced
|
|
498
|
+
// bundle next to the local clone): redundant, keep the first.
|
|
499
|
+
continue;
|
|
500
|
+
}
|
|
501
|
+
const namespaced = `${pkg.name}-${info.name}`;
|
|
502
|
+
if (usedCommands.has(namespaced)) {
|
|
503
|
+
log(`skipping slash command for skill "${info.name}": name already taken`);
|
|
504
|
+
continue;
|
|
505
|
+
}
|
|
506
|
+
name = namespaced;
|
|
507
|
+
}
|
|
508
|
+
commandOwner.set(name, pkg.source);
|
|
509
|
+
usedCommands.add(name);
|
|
510
|
+
commands.push({
|
|
511
|
+
name,
|
|
512
|
+
description: info.description || `Run the ${info.name} skill`,
|
|
513
|
+
template: [
|
|
514
|
+
`Load the \`${info.name}\` skill and follow its instructions.`,
|
|
515
|
+
`Context: $ARGUMENTS`,
|
|
516
|
+
].join("\n"),
|
|
517
|
+
});
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
const mcp = [];
|
|
521
|
+
const usedMcp = new Set(taken.mcp ?? []);
|
|
522
|
+
const mcpOwner = new Map();
|
|
523
|
+
for (const name of taken.mcp ?? [])
|
|
524
|
+
mcpOwner.set(name, "user");
|
|
525
|
+
const seenMcpEntry = new Set();
|
|
526
|
+
for (const pkg of packages) {
|
|
527
|
+
const entries = [];
|
|
528
|
+
readMcp(pkg, entries);
|
|
529
|
+
for (const { key, entry } of entries) {
|
|
530
|
+
const dedupeKey = `${pkg.root}\u0000${key}`;
|
|
531
|
+
if (seenMcpEntry.has(dedupeKey))
|
|
532
|
+
continue;
|
|
533
|
+
seenMcpEntry.add(dedupeKey);
|
|
534
|
+
let k = key;
|
|
535
|
+
const owner = mcpOwner.get(k);
|
|
536
|
+
if (owner !== undefined) {
|
|
537
|
+
if (owner === pkg.source)
|
|
538
|
+
continue;
|
|
539
|
+
const namespaced = `${pkg.name}/${key}`;
|
|
540
|
+
if (usedMcp.has(namespaced)) {
|
|
541
|
+
log(`skipping MCP server "${pkg.name}/${key}": name already taken`);
|
|
542
|
+
continue;
|
|
543
|
+
}
|
|
544
|
+
k = namespaced;
|
|
545
|
+
}
|
|
546
|
+
mcpOwner.set(k, pkg.source);
|
|
547
|
+
usedMcp.add(k);
|
|
548
|
+
mcp.push({ key: k, entry });
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
const agents = [];
|
|
552
|
+
const usedAgents = new Set(taken.agents ?? []);
|
|
553
|
+
const agentOwner = new Map();
|
|
554
|
+
for (const name of taken.agents ?? [])
|
|
555
|
+
agentOwner.set(name, "user");
|
|
556
|
+
const seenAgent = new Set();
|
|
557
|
+
for (const pkg of packages) {
|
|
558
|
+
for (const { name, agent } of readAgents(pkg)) {
|
|
559
|
+
const dedupeKey = `${pkg.root}\u0000${name}`;
|
|
560
|
+
if (seenAgent.has(dedupeKey))
|
|
561
|
+
continue;
|
|
562
|
+
seenAgent.add(dedupeKey);
|
|
563
|
+
let agentName = name;
|
|
564
|
+
const owner = agentOwner.get(agentName);
|
|
565
|
+
if (owner !== undefined) {
|
|
566
|
+
if (owner === pkg.source)
|
|
567
|
+
continue;
|
|
568
|
+
const namespaced = `${pkg.name}-${agentName}`;
|
|
569
|
+
if (usedAgents.has(namespaced)) {
|
|
570
|
+
log(`skipping agent "${pkg.name}/${agentName}": name already taken`);
|
|
571
|
+
continue;
|
|
572
|
+
}
|
|
573
|
+
agentName = namespaced;
|
|
574
|
+
}
|
|
575
|
+
agentOwner.set(agentName, pkg.source);
|
|
576
|
+
usedAgents.add(agentName);
|
|
577
|
+
agents.push({ name: agentName, agent });
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
return { skillPaths, commands, mcp, agents };
|
|
581
|
+
}
|
|
582
|
+
// Applies a computed plan to the resolved config. Never overwrites user-defined
|
|
583
|
+
// entries; de-duplicates paths against what the user already configured.
|
|
584
|
+
// `enabled` gates the opt-in component types (MCP servers, agents), which are
|
|
585
|
+
// more powerful than skills and therefore off by default.
|
|
586
|
+
export function applyConfigPatch(config, plan, enabled) {
|
|
587
|
+
const doAgents = enabled.agents && plan.agents.length > 0;
|
|
588
|
+
if (plan.skillPaths.length === 0 && !enabled.mcp && !doAgents)
|
|
589
|
+
return;
|
|
590
|
+
if (plan.skillPaths.length > 0) {
|
|
591
|
+
config.skills ??= {};
|
|
592
|
+
config.skills.paths ??= [];
|
|
593
|
+
const seen = new Set(config.skills.paths);
|
|
594
|
+
for (const dir of plan.skillPaths) {
|
|
595
|
+
if (seen.has(dir))
|
|
596
|
+
continue;
|
|
597
|
+
seen.add(dir);
|
|
598
|
+
config.skills.paths.push(dir);
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
if (plan.commands.length > 0) {
|
|
602
|
+
config.command ??= {};
|
|
603
|
+
for (const cmd of plan.commands) {
|
|
604
|
+
if (config.command[cmd.name])
|
|
605
|
+
continue;
|
|
606
|
+
config.command[cmd.name] = {
|
|
607
|
+
description: cmd.description,
|
|
608
|
+
template: cmd.template,
|
|
609
|
+
};
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
if (enabled.mcp && plan.mcp.length > 0) {
|
|
613
|
+
config.mcp ??= {};
|
|
614
|
+
for (const { key, entry } of plan.mcp) {
|
|
615
|
+
if (config.mcp[key])
|
|
616
|
+
continue;
|
|
617
|
+
config.mcp[key] = entry;
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
if (doAgents) {
|
|
621
|
+
config.agent ??= {};
|
|
622
|
+
for (const { name, agent } of plan.agents) {
|
|
623
|
+
if (config.agent[name])
|
|
624
|
+
continue;
|
|
625
|
+
config.agent[name] = agent;
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
//# sourceMappingURL=discovery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discovery.js","sourceRoot":"","sources":["../src/discovery.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,QAAQ,GACT,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AACrE,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAInE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAoCnC,SAAS,WAAW,CAAC,CAAS;IAC5B,IAAI,CAAC;QACH,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;IACnC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,SAAS,aAAa,CAAC,CAAS;IAC9B,IAAI,CAAC;QACH,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC9B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,iEAAiE;AACjE,MAAM,UAAU,QAAQ,CAAC,MAAc,EAAE,KAAa;IACpD,MAAM,CAAC,GAAG,YAAY,CAAC,MAAM,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AO,CAAC,GAAG,CAAC,IAAI,CAAC;gBAAE,SAAS;YACvC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG;gBACzB,WAAW,EAAE,GAAG,CAAC,WAAW;gBAC5B,QAAQ,EAAE,GAAG,CAAC,QAAQ;aACvB,CAAC;QACJ,CAAC;IACH,CAAC;IAED,IAAI,OAAO,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvC,MAAM,CAAC,GAAG,KAAK,EAAE,CAAC;QAClB,KAAK,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;YACtC,IAAI,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC;gBAAE,SAAS;YAC9B,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QAC1B,CAAC;IACH,CAAC;IAED,IAAI,QAAQ,EAAE,CAAC;QACb,MAAM,CAAC,KAAK,KAAK,EAAE,CAAC;QACpB,KAAK,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAC1C,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC;gBAAE,SAAS;YACjC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;QAC7B,CAAC;IACH,CAAC;AACH,CAAC"}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAU,MAAM,EAAE,MAAM,qBAAqB,CAAC;;kBAqBlC,MAAM;;AAF9B,wBA+BoB"}
|