skillmds 1.2.0 → 1.2.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/dist/{chunk-A7BKAUUO.js → chunk-4BFQJ3YZ.js} +4 -3
- package/dist/cli.js +12 -2
- package/dist/mcp.js +1 -1
- package/package.json +1 -1
|
@@ -182,13 +182,14 @@ async function fetchBundle(base, slug, token, opts = {}) {
|
|
|
182
182
|
let bytes = 0;
|
|
183
183
|
for (const f of data.files) {
|
|
184
184
|
let contents;
|
|
185
|
+
let fromUrl = false;
|
|
185
186
|
if (f.content_base64 != null) {
|
|
186
187
|
contents = Buffer.from(f.content_base64, "base64");
|
|
187
188
|
} else if (f.source_url && isAllowedSourceUrl(f.source_url)) {
|
|
188
|
-
if (!f.sha256) throw new IntegrityError(`"${f.path}" is delivered by URL but the registry recorded no sha256 for it \u2014 refusing to install unverifiable content`);
|
|
189
189
|
const r = await doFetch(f.source_url).catch(() => null);
|
|
190
190
|
if (!r || !r.ok) throw new Error(`could not fetch companion file "${f.path}" from ${hostOf(f.source_url)}`);
|
|
191
191
|
contents = Buffer.from(await r.arrayBuffer());
|
|
192
|
+
fromUrl = true;
|
|
192
193
|
} else {
|
|
193
194
|
continue;
|
|
194
195
|
}
|
|
@@ -197,10 +198,10 @@ async function fetchBundle(base, slug, token, opts = {}) {
|
|
|
197
198
|
if (f.sha256) {
|
|
198
199
|
const got = createHash("sha256").update(contents).digest("hex");
|
|
199
200
|
if (got !== f.sha256) throw new IntegrityError(`integrity check failed for "${f.path}" (expected ${f.sha256.slice(0, 12)}\u2026, got ${got.slice(0, 12)}\u2026)`);
|
|
200
|
-
} else if (f.path !== "SKILL.md") {
|
|
201
|
+
} else if (!fromUrl && f.path !== "SKILL.md") {
|
|
201
202
|
throw new IntegrityError(`"${f.path}" has no sha256 in the registry bundle \u2014 refusing to install unverifiable content`);
|
|
202
203
|
}
|
|
203
|
-
out.push({ path: f.path, contents });
|
|
204
|
+
out.push({ path: f.path, contents, ...fromUrl && !f.sha256 ? { unverified: true } : {} });
|
|
204
205
|
}
|
|
205
206
|
return out;
|
|
206
207
|
}
|
package/dist/cli.js
CHANGED
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
uninstallSkill,
|
|
31
31
|
upsertEntry,
|
|
32
32
|
writeConfig
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-4BFQJ3YZ.js";
|
|
34
34
|
|
|
35
35
|
// src/index.ts
|
|
36
36
|
import { Command as Command13 } from "commander";
|
|
@@ -662,6 +662,10 @@ async function promptAgentsInteractive(ctx) {
|
|
|
662
662
|
});
|
|
663
663
|
return p3.isCancel(picked) ? null : picked;
|
|
664
664
|
}
|
|
665
|
+
function unverifiedFilesNote(n) {
|
|
666
|
+
const [f, it] = n === 1 ? ["file", "it"] : ["files", "them"];
|
|
667
|
+
return `${n} companion ${f} came straight from the source repo \u2014 the registry holds no checksum for ${it}, so only the connection was verified`;
|
|
668
|
+
}
|
|
665
669
|
function registryFallbackNote(host) {
|
|
666
670
|
return `installed from GitHub because the SkillMD registry (${host}) was unreachable \u2014 this copy is not the registry-reviewed version`;
|
|
667
671
|
}
|
|
@@ -736,7 +740,13 @@ function makeDefaultDeps(flags) {
|
|
|
736
740
|
const bundle = await fetchBundle(apiBase, registrySlug, token);
|
|
737
741
|
if (bundle && bundle.length) {
|
|
738
742
|
const sk = bundle.find((file) => file.path === "SKILL.md");
|
|
739
|
-
|
|
743
|
+
const unverified = bundle.filter((file) => file.unverified).length;
|
|
744
|
+
return [{
|
|
745
|
+
...meta,
|
|
746
|
+
raw: sk ? sk.contents.toString("utf8") : skillMdFor(skill),
|
|
747
|
+
files: bundle,
|
|
748
|
+
...unverified ? { note: unverifiedFilesNote(unverified) } : {}
|
|
749
|
+
}];
|
|
740
750
|
}
|
|
741
751
|
const pack = await resolvePackFiles(skill);
|
|
742
752
|
if (pack) return [{ ...meta, ...pack }];
|
package/dist/mcp.js
CHANGED
package/package.json
CHANGED