vskill 1.0.21 → 1.1.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/README.md +2 -0
- package/agents.json +1 -1
- package/dist/commands/add.d.ts +7 -0
- package/dist/commands/add.js +93 -30
- package/dist/commands/add.js.map +1 -1
- package/dist/commands/check.d.ts +41 -4
- package/dist/commands/check.js +112 -25
- package/dist/commands/check.js.map +1 -1
- package/dist/commands/cleanup.d.ts +0 -1
- package/dist/commands/cleanup.js +71 -80
- package/dist/commands/cleanup.js.map +1 -1
- package/dist/commands/remove.js +55 -65
- package/dist/commands/remove.js.map +1 -1
- package/dist/discovery/github-tree.js +56 -0
- package/dist/discovery/github-tree.js.map +1 -1
- package/dist/eval-server/plugin-cli-routes.js +10 -1
- package/dist/eval-server/plugin-cli-routes.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/lockfile/local-root.d.ts +7 -0
- package/dist/lockfile/local-root.js +25 -0
- package/dist/lockfile/local-root.js.map +1 -0
- package/dist/marketplace/manifest-conflict.d.ts +63 -0
- package/dist/marketplace/manifest-conflict.js +181 -0
- package/dist/marketplace/manifest-conflict.js.map +1 -0
- package/dist/utils/claude-plugin.js +8 -0
- package/dist/utils/claude-plugin.js.map +1 -1
- package/package.json +9 -4
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
// ---------------------------------------------------------------------------
|
|
2
|
+
// Postiz-class manifest conflict detection + healing (0851)
|
|
3
|
+
//
|
|
4
|
+
// Claude Code refuses to load a plugin when its marketplace entry AND its
|
|
5
|
+
// plugin.json BOTH specify component fields (skills/commands/agents/...):
|
|
6
|
+
//
|
|
7
|
+
// "Plugin <name> has conflicting manifests: both plugin.json and
|
|
8
|
+
// marketplace entry specify components. Set strict: true in marketplace
|
|
9
|
+
// entry or remove component specs from one location."
|
|
10
|
+
//
|
|
11
|
+
// Third-party marketplace authors ship this shape regularly (e.g. postiz),
|
|
12
|
+
// and every vskill/Skill Studio install that delegates to `claude plugin`
|
|
13
|
+
// would surface the loader error through no fault of ours. These helpers
|
|
14
|
+
// normalize the cached manifests the way the loader error suggests: set
|
|
15
|
+
// `strict: true` on the conflicting entry (plugin.json becomes the single
|
|
16
|
+
// source of truth) and drop the entry-level component arrays.
|
|
17
|
+
//
|
|
18
|
+
// Healing only ever touches LOCAL caches under ~/.claude/plugins — never a
|
|
19
|
+
// user's working tree or a remote repo.
|
|
20
|
+
// ---------------------------------------------------------------------------
|
|
21
|
+
import { existsSync, readdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
22
|
+
import { homedir } from "node:os";
|
|
23
|
+
import { join, resolve } from "node:path";
|
|
24
|
+
/** Component fields Claude Code treats as "component specs" in a manifest. */
|
|
25
|
+
export const COMPONENT_FIELDS = [
|
|
26
|
+
"skills",
|
|
27
|
+
"commands",
|
|
28
|
+
"agents",
|
|
29
|
+
"hooks",
|
|
30
|
+
"mcpServers",
|
|
31
|
+
];
|
|
32
|
+
/** True when the object declares at least one component field. */
|
|
33
|
+
export function hasComponentFields(obj) {
|
|
34
|
+
if (!obj || typeof obj !== "object")
|
|
35
|
+
return false;
|
|
36
|
+
return COMPONENT_FIELDS.some((f) => obj[f] !== undefined);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Heal Postiz-class conflicts inside a marketplace.json string.
|
|
40
|
+
*
|
|
41
|
+
* For each plugin entry that (a) declares component fields, (b) does not set
|
|
42
|
+
* `strict: true`, and (c) whose plugin.json — looked up via
|
|
43
|
+
* `pluginHasComponents` — also declares component fields: set `strict: true`
|
|
44
|
+
* and remove the entry-level component fields.
|
|
45
|
+
*
|
|
46
|
+
* Pure apart from the injected lookup. Returns `content: null` when nothing
|
|
47
|
+
* needed healing (callers skip the write).
|
|
48
|
+
*/
|
|
49
|
+
export function healManifestContent(manifestContent, pluginHasComponents) {
|
|
50
|
+
let manifest;
|
|
51
|
+
try {
|
|
52
|
+
manifest = JSON.parse(manifestContent);
|
|
53
|
+
}
|
|
54
|
+
catch {
|
|
55
|
+
return { content: null, healed: [] };
|
|
56
|
+
}
|
|
57
|
+
if (!Array.isArray(manifest.plugins))
|
|
58
|
+
return { content: null, healed: [] };
|
|
59
|
+
const healed = [];
|
|
60
|
+
for (const entry of manifest.plugins) {
|
|
61
|
+
const name = typeof entry.name === "string" ? entry.name : "";
|
|
62
|
+
const source = typeof entry.source === "string" ? entry.source : "";
|
|
63
|
+
if (!name)
|
|
64
|
+
continue;
|
|
65
|
+
if (entry.strict === true)
|
|
66
|
+
continue;
|
|
67
|
+
if (!hasComponentFields(entry))
|
|
68
|
+
continue;
|
|
69
|
+
if (!pluginHasComponents({ name, source }))
|
|
70
|
+
continue;
|
|
71
|
+
entry.strict = true;
|
|
72
|
+
for (const field of COMPONENT_FIELDS)
|
|
73
|
+
delete entry[field];
|
|
74
|
+
healed.push({ plugin: name });
|
|
75
|
+
}
|
|
76
|
+
if (healed.length === 0)
|
|
77
|
+
return { content: null, healed: [] };
|
|
78
|
+
return { content: JSON.stringify(manifest, null, 2) + "\n", healed };
|
|
79
|
+
}
|
|
80
|
+
function readJsonSafe(path) {
|
|
81
|
+
try {
|
|
82
|
+
return JSON.parse(readFileSync(path, "utf8"));
|
|
83
|
+
}
|
|
84
|
+
catch {
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Heal `<marketplaceDir>/.claude-plugin/marketplace.json` in place, resolving
|
|
90
|
+
* each entry's plugin.json relative to the marketplace root (entry sources
|
|
91
|
+
* are "./" or "./plugins/<name>" style paths).
|
|
92
|
+
*
|
|
93
|
+
* Returns names of healed plugin entries (empty when nothing changed).
|
|
94
|
+
*/
|
|
95
|
+
export function healMarketplaceDir(marketplaceDir) {
|
|
96
|
+
const manifestPath = join(marketplaceDir, ".claude-plugin", "marketplace.json");
|
|
97
|
+
if (!existsSync(manifestPath))
|
|
98
|
+
return [];
|
|
99
|
+
const result = healManifestContent(readFileSync(manifestPath, "utf8"), ({ source }) => {
|
|
100
|
+
if (!source)
|
|
101
|
+
return false;
|
|
102
|
+
const sourceDir = resolve(marketplaceDir, source.replace(/^\.\//, "") || ".");
|
|
103
|
+
// Guard against path escapes in hostile manifests.
|
|
104
|
+
if (!sourceDir.startsWith(resolve(marketplaceDir)))
|
|
105
|
+
return false;
|
|
106
|
+
return hasComponentFields(readJsonSafe(join(sourceDir, ".claude-plugin", "plugin.json")));
|
|
107
|
+
});
|
|
108
|
+
if (result.content !== null)
|
|
109
|
+
writeFileSync(manifestPath, result.content, "utf8");
|
|
110
|
+
return result.healed.map((h) => h.plugin);
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Heal the marketplace.json copies inside the plugin cache
|
|
114
|
+
* (`<cacheRoot>/<marketplace>/<plugin>/<version>/.claude-plugin/`).
|
|
115
|
+
*
|
|
116
|
+
* In the cache layout the installed plugin's plugin.json sits NEXT TO the
|
|
117
|
+
* copied marketplace.json, so the conflict check pairs each cached
|
|
118
|
+
* marketplace.json with its sibling plugin.json and heals the entry whose
|
|
119
|
+
* name matches the plugin directory.
|
|
120
|
+
*/
|
|
121
|
+
export function healPluginCacheDir(cacheRoot) {
|
|
122
|
+
const healed = [];
|
|
123
|
+
if (!existsSync(cacheRoot))
|
|
124
|
+
return healed;
|
|
125
|
+
for (const mp of listDirs(cacheRoot)) {
|
|
126
|
+
for (const plugin of listDirs(join(cacheRoot, mp))) {
|
|
127
|
+
for (const version of listDirs(join(cacheRoot, mp, plugin))) {
|
|
128
|
+
const dir = join(cacheRoot, mp, plugin, version, ".claude-plugin");
|
|
129
|
+
const manifestPath = join(dir, "marketplace.json");
|
|
130
|
+
if (!existsSync(manifestPath))
|
|
131
|
+
continue;
|
|
132
|
+
const sibling = readJsonSafe(join(dir, "plugin.json"));
|
|
133
|
+
const result = healManifestContent(readFileSync(manifestPath, "utf8"), ({ name }) => name === plugin && hasComponentFields(sibling));
|
|
134
|
+
if (result.content !== null) {
|
|
135
|
+
writeFileSync(manifestPath, result.content, "utf8");
|
|
136
|
+
healed.push(...result.healed.map((h) => `${mp}/${h.plugin}@${version}`));
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return healed;
|
|
142
|
+
}
|
|
143
|
+
function listDirs(path) {
|
|
144
|
+
try {
|
|
145
|
+
return readdirSync(path, { withFileTypes: true })
|
|
146
|
+
.filter((e) => e.isDirectory())
|
|
147
|
+
.map((e) => e.name);
|
|
148
|
+
}
|
|
149
|
+
catch {
|
|
150
|
+
return [];
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Heal every locally cached marketplace manifest (registered marketplaces +
|
|
155
|
+
* plugin-cache copies). Best-effort and idempotent: safe to call after every
|
|
156
|
+
* `claude plugin marketplace add` / `claude plugin install`. Never throws.
|
|
157
|
+
*
|
|
158
|
+
* Returns human-readable identifiers of healed entries, e.g.
|
|
159
|
+
* `["postiz", "cache: postiz-agent/postiz@2.0.12"]`.
|
|
160
|
+
*/
|
|
161
|
+
export function healAllMarketplaceManifests(options = {}) {
|
|
162
|
+
const healed = [];
|
|
163
|
+
try {
|
|
164
|
+
const marketplacesRoot = options.marketplacesRoot ?? join(homedir(), ".claude", "plugins", "marketplaces");
|
|
165
|
+
for (const mp of listDirs(marketplacesRoot)) {
|
|
166
|
+
try {
|
|
167
|
+
healed.push(...healMarketplaceDir(join(marketplacesRoot, mp)));
|
|
168
|
+
}
|
|
169
|
+
catch {
|
|
170
|
+
/* best-effort per marketplace */
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
const cacheRoot = options.cacheRoot ?? join(homedir(), ".claude", "plugins", "cache");
|
|
174
|
+
healed.push(...healPluginCacheDir(cacheRoot).map((id) => `cache: ${id}`));
|
|
175
|
+
}
|
|
176
|
+
catch {
|
|
177
|
+
/* never break an install over healing */
|
|
178
|
+
}
|
|
179
|
+
return healed;
|
|
180
|
+
}
|
|
181
|
+
//# sourceMappingURL=manifest-conflict.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest-conflict.js","sourceRoot":"","sources":["../../src/marketplace/manifest-conflict.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,4DAA4D;AAC5D,EAAE;AACF,0EAA0E;AAC1E,0EAA0E;AAC1E,EAAE;AACF,mEAAmE;AACnE,2EAA2E;AAC3E,yDAAyD;AACzD,EAAE;AACF,2EAA2E;AAC3E,0EAA0E;AAC1E,yEAAyE;AACzE,wEAAwE;AACxE,0EAA0E;AAC1E,8DAA8D;AAC9D,EAAE;AACF,2EAA2E;AAC3E,wCAAwC;AACxC,8EAA8E;AAE9E,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC/E,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE1C,8EAA8E;AAC9E,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,QAAQ;IACR,UAAU;IACV,QAAQ;IACR,OAAO;IACP,YAAY;CACJ,CAAC;AAIX,kEAAkE;AAClE,MAAM,UAAU,kBAAkB,CAAC,GAAqC;IACtE,IAAI,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAClD,OAAO,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC;AAC5D,CAAC;AAaD;;;;;;;;;;GAUG;AACH,MAAM,UAAU,mBAAmB,CACjC,eAAuB,EACvB,mBAAyE;IAEzE,IAAI,QAAuC,CAAC;IAC5C,IAAI,CAAC;QACH,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;IACzC,CAAC;IAAC,MAAM,CAAC;QACP,OAA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yCAAyC;IAC3C,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import { execFileSync } from "node:child_process";
|
|
8
8
|
import { resolveCliBinary } from "./resolve-binary.js";
|
|
9
9
|
import { purgeStalePlugins } from "../settings/index.js";
|
|
10
|
+
import { healAllMarketplaceManifests } from "../marketplace/manifest-conflict.js";
|
|
10
11
|
/**
|
|
11
12
|
* 0826: Add a Claude Code plugin marketplace via the claude CLI.
|
|
12
13
|
*
|
|
@@ -26,6 +27,10 @@ import { purgeStalePlugins } from "../settings/index.js";
|
|
|
26
27
|
export function claudePluginMarketplaceAdd(source, scope = "user") {
|
|
27
28
|
const claude = resolveCliBinary("claude");
|
|
28
29
|
execFileSync(claude, ["plugin", "marketplace", "add", "--scope", scope, "--", source], { stdio: "pipe", timeout: 180_000 });
|
|
30
|
+
// 0851: third-party marketplaces may ship Postiz-class manifest conflicts
|
|
31
|
+
// (entry + plugin.json both specify components). Normalize the local cache
|
|
32
|
+
// right after registration so the subsequent install copies a clean manifest.
|
|
33
|
+
healAllMarketplaceManifests();
|
|
29
34
|
}
|
|
30
35
|
/**
|
|
31
36
|
* 0826: List Claude Code marketplace names registered with the CLI.
|
|
@@ -80,6 +85,9 @@ export function claudePluginMarketplaceList() {
|
|
|
80
85
|
export function claudePluginInstall(pluginId, scope = "user", opts) {
|
|
81
86
|
const claude = resolveCliBinary("claude");
|
|
82
87
|
execFileSync(claude, ["plugin", "install", "--scope", scope, "--", pluginId], { stdio: "pipe", timeout: 30_000, ...(opts?.cwd ? { cwd: opts.cwd } : {}) });
|
|
88
|
+
// 0851: heal manifest conflicts in the cache copy the install just created
|
|
89
|
+
// (covers marketplaces that were already registered in a broken state).
|
|
90
|
+
healAllMarketplaceManifests();
|
|
83
91
|
}
|
|
84
92
|
/**
|
|
85
93
|
* Uninstall a marketplace plugin via the claude CLI.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-plugin.js","sourceRoot":"","sources":["../../src/utils/claude-plugin.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,0CAA0C;AAC1C,EAAE;AACF,2EAA2E;AAC3E,4EAA4E;AAC5E,8EAA8E;AAE9E,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"claude-plugin.js","sourceRoot":"","sources":["../../src/utils/claude-plugin.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,0CAA0C;AAC1C,EAAE;AACF,2EAA2E;AAC3E,4EAA4E;AAC5E,8EAA8E;AAE9E,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AAElF;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,0BAA0B,CACxC,MAAc,EACd,QAA4B,MAAM;IAElC,MAAM,MAAM,GAAG,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAC1C,YAAY,CACV,MAAM,EACN,CAAC,QAAQ,EAAE,aAAa,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,EAChE,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,CACpC,CAAC;IACF,0EAA0E;IAC1E,2EAA2E;IAC3E,8EAA8E;IAC9E,2BAA2B,EAAE,CAAC;AAChC,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,2BAA2B;IACzC,IAAI,MAAc,CAAC;IACnB,IAAI,CAAC;QACH,MAAM,GAAG,gBAAgB,CAAC,QAAQ,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AAC,EAAE,EAAE,EAAE,KAAK,EAAE,SAAkB,EAAE,CAAC,CAAC;KACjE,CAAC;IAEF,MAAM,OAAO,GAAkE,EAAE,CAAC;IAClF,KAAK,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,QAAQ,EAAE,CAAC;QACrC,IAAI,CAAC;YACH,qBAAqB,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;YACjC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;QACxC,CAAC;QAAC,MAAM,CAAC;YACP,GAAG,CAAC,KAAK,EAAE,qCAAqC,CAAC,CAAC;YAClD,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;QACzC,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vskill",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Secure multi-platform AI skill installer — scan before you install",
|
|
6
6
|
"bin": {
|
|
@@ -10,8 +10,7 @@
|
|
|
10
10
|
"types": "./dist/index.d.ts",
|
|
11
11
|
"scripts": {
|
|
12
12
|
"generate:agents-json": "npx tsx scripts/generate-agents-json.ts",
|
|
13
|
-
"
|
|
14
|
-
"build": "tsc",
|
|
13
|
+
"build": "npm run generate:agents-json && tsc",
|
|
15
14
|
"build:eval-ui": "vite build --config src/eval-ui/vite.config.ts",
|
|
16
15
|
"dev": "tsc --watch",
|
|
17
16
|
"dev:eval-ui": "vite dev --config src/eval-ui/vite.config.ts",
|
|
@@ -28,13 +27,18 @@
|
|
|
28
27
|
"lint:bundle-size": "npx tsx scripts/check-bundle-size.ts",
|
|
29
28
|
"lint:skills-spec": "npx tsx scripts/validate-skills-spec.ts",
|
|
30
29
|
"clean": "rm -rf dist",
|
|
30
|
+
"setup": "npm rebuild --ignore-scripts=false esbuild && node scripts/desktop/verify-esbuild.mjs",
|
|
31
|
+
"security:scan": "node scripts/security/scan-payload.mjs --self-test",
|
|
31
32
|
"tauri": "tauri",
|
|
32
33
|
"desktop:dev": "tauri dev",
|
|
33
34
|
"desktop:build": "tauri build",
|
|
34
35
|
"desktop:sidecar:build": "bash scripts/desktop/build-sidecar.sh",
|
|
36
|
+
"desktop:sidecar:smoke": "node scripts/desktop/smoke-sidecar.mjs",
|
|
35
37
|
"preuninstall": "node scripts/preuninstall.cjs",
|
|
36
38
|
"sync:readme-badges": "node scripts/sync-readme-badges.cjs",
|
|
37
|
-
"
|
|
39
|
+
"release:preflight": "node scripts/release/preflight-publish.mjs",
|
|
40
|
+
"release": "npm publish --ignore-scripts=false",
|
|
41
|
+
"prepublishOnly": "npm run build && npm run build:eval-ui && node scripts/sync-readme-badges.cjs && git diff --exit-code README.md && npm run release:preflight"
|
|
38
42
|
},
|
|
39
43
|
"keywords": [
|
|
40
44
|
"ai",
|
|
@@ -76,6 +80,7 @@
|
|
|
76
80
|
"@vitejs/plugin-react": "^4.7.0",
|
|
77
81
|
"@vitest/coverage-v8": "^3.2.4",
|
|
78
82
|
"axe-core": "^4.11.3",
|
|
83
|
+
"esbuild": "0.25.12",
|
|
79
84
|
"eventsource": "^3.0.7",
|
|
80
85
|
"react": "^19.2.4",
|
|
81
86
|
"react-dom": "^19.2.4",
|