release-skill 0.7.3 → 0.7.5
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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.codebuddy-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +2 -2
- package/.kimi-plugin/plugin.json +1 -1
- package/CHANGELOG.md +22 -0
- package/INSTALL.md +2 -2
- package/INSTALL.zh-CN.md +2 -2
- package/README.md +7 -7
- package/README.zh-CN.md +6 -6
- package/adapters/claude/.claude-plugin/marketplace.json +1 -1
- package/adapters/claude/.claude-plugin/plugin.json +1 -1
- package/adapters/claude/bin/release-skill.bundle.mjs +68 -15
- package/adapters/codex/.codex-plugin/plugin.json +2 -2
- package/adapters/codex/bin/release-skill.bundle.mjs +68 -15
- package/adapters/kimi/.kimi-plugin/plugin.json +1 -1
- package/adapters/kimi/bin/release-skill.bundle.mjs +68 -15
- package/adapters/workbuddy/.codebuddy-plugin/plugin.json +1 -1
- package/adapters/workbuddy/bin/release-skill.bundle.mjs +68 -15
- package/bin/release-skill.bundle.mjs +68 -15
- package/package.json +1 -1
- package/platform-manifest.json +2 -2
- package/src/core/skill-resource-closure.mjs +52 -6
- package/src/platforms/registry.mjs +31 -0
|
@@ -9,9 +9,9 @@ const __bundlePkgRoot = __bundleResolve(__bundleDirname(__bundleFileURLToPath(im
|
|
|
9
9
|
// Provide a real require() for CJS packages bundled into ESM (e.g. yaml, ajv).
|
|
10
10
|
const __bundleRealRequire = __bundleCreateRequire(import.meta.url);
|
|
11
11
|
// Package identity injected at build time — closure-independent --version probe.
|
|
12
|
-
const __bundlePkg = Object.freeze({"name":"release-skill","version":"0.7.
|
|
12
|
+
const __bundlePkg = Object.freeze({"name":"release-skill","version":"0.7.5"});
|
|
13
13
|
// Build-time source digest for the BUNDLE_STALE freshness gate (see above).
|
|
14
|
-
const __bundleSourceDigest = "
|
|
14
|
+
const __bundleSourceDigest = "9ced58c843d3cdefc52185b6f64dd05deaf480edc7807ee5bf9efd54023c5ed7";
|
|
15
15
|
|
|
16
16
|
var __create = Object.create;
|
|
17
17
|
var __defProp = Object.defineProperty;
|
|
@@ -36390,8 +36390,13 @@ function getPlatform(id) {
|
|
|
36390
36390
|
if (!platform) throw new Error(`unknown platform: ${id}`);
|
|
36391
36391
|
return platform;
|
|
36392
36392
|
}
|
|
36393
|
+
function resolveSkillProjectionSurfaceHost(surfaceId, registry = PLATFORMS) {
|
|
36394
|
+
const platform = registry.find((item) => item.skillProjectionSurface === surfaceId);
|
|
36395
|
+
return platform?.buildAdapter?.name ?? null;
|
|
36396
|
+
}
|
|
36393
36397
|
function assertRegistry(registry = PLATFORMS) {
|
|
36394
36398
|
const seen = /* @__PURE__ */ new Set();
|
|
36399
|
+
const seenSkillProjectionSurfaces = /* @__PURE__ */ new Set();
|
|
36395
36400
|
for (const platform of registry) {
|
|
36396
36401
|
const label = platform?.id ?? "<missing id>";
|
|
36397
36402
|
if (typeof platform?.id !== "string" || platform.id.length === 0) {
|
|
@@ -36440,6 +36445,16 @@ function assertRegistry(registry = PLATFORMS) {
|
|
|
36440
36445
|
if (typeof platform.buildAdapter.name !== "string" || platform.buildAdapter.name.length === 0) {
|
|
36441
36446
|
throw new Error(`platform registry: ${label} buildAdapter needs a non-empty name (its adapter directory name)`);
|
|
36442
36447
|
}
|
|
36448
|
+
if (typeof platform.skillProjectionSurface !== "string" || !SKILL_PROJECTION_SURFACE_PATTERN.test(platform.skillProjectionSurface)) {
|
|
36449
|
+
throw new Error(`platform registry: ${label} skillProjectionSurface must match platforms/<slug>`);
|
|
36450
|
+
}
|
|
36451
|
+
if (seenSkillProjectionSurfaces.has(platform.skillProjectionSurface)) {
|
|
36452
|
+
throw new Error(`platform registry: duplicate skillProjectionSurface "${platform.skillProjectionSurface}"; aliases must be unique`);
|
|
36453
|
+
}
|
|
36454
|
+
seenSkillProjectionSurfaces.add(platform.skillProjectionSurface);
|
|
36455
|
+
if (resolveSkillProjectionSurfaceHost(platform.skillProjectionSurface, registry) !== platform.buildAdapter.name) {
|
|
36456
|
+
throw new Error(`platform registry: ${label} skillProjectionSurface must map to buildAdapter.name`);
|
|
36457
|
+
}
|
|
36443
36458
|
if (!VALID_LIST_OUTPUTS.has(platform.jsonProtocol?.listOutput)) {
|
|
36444
36459
|
throw new Error(`platform registry: ${label} has illegal jsonProtocol.listOutput "${platform.jsonProtocol?.listOutput}"`);
|
|
36445
36460
|
}
|
|
@@ -36567,7 +36582,7 @@ function resolveCapabilityConflicts(platform) {
|
|
|
36567
36582
|
}
|
|
36568
36583
|
return { hasConflict: false, conflicts: [] };
|
|
36569
36584
|
}
|
|
36570
|
-
var CLAUDE, CODEX, KIMI, CODEBUDDY, PLATFORMS, VALID_DISTRIBUTION_TYPES, VALID_ACTION_TYPES, VALID_SOURCE_FORMS, VALID_MARKETPLACE_REF_FORMS, VALID_LIST_OUTPUTS, VALID_CLI_OUTPUTS, VALID_ENTRY_VERSION_BINDING, VALID_INSTALL_METHODS, VALID_REF_STRENGTHS, VALID_OUTPUT_PROTOCOLS, VALID_IDENTITY_EVIDENCE, VALID_DEGRADATION_POLICIES;
|
|
36585
|
+
var CLAUDE, CODEX, KIMI, CODEBUDDY, PLATFORMS, VALID_DISTRIBUTION_TYPES, VALID_ACTION_TYPES, VALID_SOURCE_FORMS, VALID_MARKETPLACE_REF_FORMS, VALID_LIST_OUTPUTS, VALID_CLI_OUTPUTS, VALID_ENTRY_VERSION_BINDING, VALID_INSTALL_METHODS, VALID_REF_STRENGTHS, VALID_OUTPUT_PROTOCOLS, VALID_IDENTITY_EVIDENCE, VALID_DEGRADATION_POLICIES, SKILL_PROJECTION_SURFACE_PATTERN;
|
|
36571
36586
|
var init_registry2 = __esm({
|
|
36572
36587
|
async "src/platforms/registry.mjs"() {
|
|
36573
36588
|
await init_kimi();
|
|
@@ -36582,6 +36597,7 @@ var init_registry2 = __esm({
|
|
|
36582
36597
|
__name(codexCrossValidateListEntry, "codexCrossValidateListEntry");
|
|
36583
36598
|
CLAUDE = Object.freeze({
|
|
36584
36599
|
id: "claude",
|
|
36600
|
+
skillProjectionSurface: "platforms/claude-code",
|
|
36585
36601
|
distributionType: "claude-plugin",
|
|
36586
36602
|
actionType: "claude-marketplace-install",
|
|
36587
36603
|
// Runtime adapter implementing this platform's marketplace-install action.
|
|
@@ -36646,6 +36662,7 @@ var init_registry2 = __esm({
|
|
|
36646
36662
|
});
|
|
36647
36663
|
CODEX = Object.freeze({
|
|
36648
36664
|
id: "codex",
|
|
36665
|
+
skillProjectionSurface: "platforms/codex",
|
|
36649
36666
|
distributionType: "codex-plugin",
|
|
36650
36667
|
actionType: "codex-marketplace-install",
|
|
36651
36668
|
adapter: "plugin-marketplace",
|
|
@@ -36706,6 +36723,7 @@ var init_registry2 = __esm({
|
|
|
36706
36723
|
});
|
|
36707
36724
|
KIMI = Object.freeze({
|
|
36708
36725
|
id: "kimi",
|
|
36726
|
+
skillProjectionSurface: "platforms/kimi-code",
|
|
36709
36727
|
distributionType: "kimi-plugin",
|
|
36710
36728
|
actionType: "kimi-marketplace-install",
|
|
36711
36729
|
adapter: "plugin-marketplace",
|
|
@@ -36765,6 +36783,7 @@ var init_registry2 = __esm({
|
|
|
36765
36783
|
});
|
|
36766
36784
|
CODEBUDDY = Object.freeze({
|
|
36767
36785
|
id: "codebuddy",
|
|
36786
|
+
skillProjectionSurface: "platforms/workbuddy",
|
|
36768
36787
|
distributionType: "codebuddy-plugin",
|
|
36769
36788
|
actionType: "codebuddy-marketplace-install",
|
|
36770
36789
|
adapter: "plugin-marketplace",
|
|
@@ -36847,7 +36866,9 @@ var init_registry2 = __esm({
|
|
|
36847
36866
|
VALID_OUTPUT_PROTOCOLS = /* @__PURE__ */ new Set(["structured", "text", "none"]);
|
|
36848
36867
|
VALID_IDENTITY_EVIDENCE = /* @__PURE__ */ new Set(["list-record", "install-output", "filesystem-payload", "human-attestation"]);
|
|
36849
36868
|
VALID_DEGRADATION_POLICIES = /* @__PURE__ */ new Set(["block", "human-attestation", "human-attestation-with-fallback"]);
|
|
36869
|
+
SKILL_PROJECTION_SURFACE_PATTERN = /^platforms\/[a-z0-9]+(?:-[a-z0-9]+)*$/u;
|
|
36850
36870
|
__name(getPlatform, "getPlatform");
|
|
36871
|
+
__name(resolveSkillProjectionSurfaceHost, "resolveSkillProjectionSurfaceHost");
|
|
36851
36872
|
__name(assertRegistry, "assertRegistry");
|
|
36852
36873
|
assertRegistry();
|
|
36853
36874
|
__name(resolvePlatformRoute, "resolvePlatformRoute");
|
|
@@ -44262,8 +44283,17 @@ async function discoverSkills(root, base = root) {
|
|
|
44262
44283
|
function resolvePluginRoot(skillRelativePath, scanRoot2) {
|
|
44263
44284
|
const parts = toPosix(skillRelativePath).split("/");
|
|
44264
44285
|
const skillsIndex = parts.lastIndexOf("skills");
|
|
44265
|
-
if (skillsIndex
|
|
44266
|
-
|
|
44286
|
+
if (skillsIndex >= 0) return resolve17(scanRoot2, ...parts.slice(0, skillsIndex));
|
|
44287
|
+
if (parts[0] === "platforms" && parts.length >= 3) {
|
|
44288
|
+
const registeredSurface = parts.slice(0, 2).join("/");
|
|
44289
|
+
if (resolveSkillProjectionSurfaceHost(registeredSurface) !== null) {
|
|
44290
|
+
return resolve17(scanRoot2, ...parts.slice(0, 2));
|
|
44291
|
+
}
|
|
44292
|
+
const skillIndex = parts.lastIndexOf("skill");
|
|
44293
|
+
if (skillIndex >= 2) return resolve17(scanRoot2, ...parts.slice(0, skillIndex));
|
|
44294
|
+
return resolve17(scanRoot2, ...parts.slice(0, 2));
|
|
44295
|
+
}
|
|
44296
|
+
return resolve17(scanRoot2);
|
|
44267
44297
|
}
|
|
44268
44298
|
function resolveSkillRoot(skillRelativePath, scanRoot2) {
|
|
44269
44299
|
return resolve17(scanRoot2, dirname7(skillRelativePath));
|
|
@@ -44399,8 +44429,13 @@ async function collectRegularFiles(dir, results) {
|
|
|
44399
44429
|
}
|
|
44400
44430
|
}
|
|
44401
44431
|
function inferSurfaceHost(surfaceId, defaultHost) {
|
|
44402
|
-
const
|
|
44403
|
-
return
|
|
44432
|
+
const adapterMatch = ADAPTER_SURFACE_PATTERN.exec(surfaceId);
|
|
44433
|
+
if (adapterMatch) return adapterMatch[1];
|
|
44434
|
+
const platformMatch = PLATFORM_SURFACE_PATTERN.exec(surfaceId);
|
|
44435
|
+
if (platformMatch) {
|
|
44436
|
+
return resolveSkillProjectionSurfaceHost(surfaceId) ?? `unknown-platform:${platformMatch[1]}`;
|
|
44437
|
+
}
|
|
44438
|
+
return defaultHost;
|
|
44404
44439
|
}
|
|
44405
44440
|
function receiptProjection(result) {
|
|
44406
44441
|
return {
|
|
@@ -44509,6 +44544,7 @@ async function checkSkillResourceClosure({
|
|
|
44509
44544
|
const pluginRoot = resolvePluginRoot(skill, scanRoot2);
|
|
44510
44545
|
const surfaceId = relativeStable(scanRoot2, pluginRoot);
|
|
44511
44546
|
const surfaceHost = inferSurfaceHost(surfaceId, host);
|
|
44547
|
+
const firstSkillOnSurface = !surfaceMap.has(surfaceId);
|
|
44512
44548
|
const surface = surfaceMap.get(surfaceId) ?? {
|
|
44513
44549
|
id: surfaceId,
|
|
44514
44550
|
host: surfaceHost,
|
|
@@ -44518,6 +44554,19 @@ async function checkSkillResourceClosure({
|
|
|
44518
44554
|
};
|
|
44519
44555
|
surface.skillCount += 1;
|
|
44520
44556
|
surfaceMap.set(surfaceId, surface);
|
|
44557
|
+
if (firstSkillOnSurface && PLATFORM_SURFACE_PATTERN.test(surfaceId) && resolveSkillProjectionSurfaceHost(surfaceId) === null) {
|
|
44558
|
+
findings.push({
|
|
44559
|
+
host: surfaceHost,
|
|
44560
|
+
surface: surfaceId,
|
|
44561
|
+
skill: null,
|
|
44562
|
+
line: null,
|
|
44563
|
+
reference: surfaceId,
|
|
44564
|
+
classification: CLASSIFICATION.UNKNOWN_PLATFORM_SURFACE,
|
|
44565
|
+
resolutionRoot: surfaceId,
|
|
44566
|
+
resolvedTarget: surfaceId,
|
|
44567
|
+
code: FINDING_CODE.UNKNOWN_PLATFORM_SURFACE
|
|
44568
|
+
});
|
|
44569
|
+
}
|
|
44521
44570
|
if (!skillsBySurface.has(surfaceId)) skillsBySurface.set(surfaceId, []);
|
|
44522
44571
|
skillsBySurface.get(surfaceId).push(skill);
|
|
44523
44572
|
const content = await readFile12(resolve17(scanRoot2, skill), "utf8");
|
|
@@ -44711,13 +44760,14 @@ function evaluateDeclaredHostSurfaceCoverage(expectedHosts, surfaces) {
|
|
|
44711
44760
|
}
|
|
44712
44761
|
return { passed: missing.length === 0, missing };
|
|
44713
44762
|
}
|
|
44714
|
-
var CHECKER_VERSION, BARE_PREFIXES, EXPLICIT_PREFIXES, SOURCE_TREE_PATTERN, MACHINE_ABSOLUTE_PATTERN, HOME_DIRECTORY_PATTERN, ADAPTER_SURFACE_PATTERN, CLOSURE_RESOURCE_DIRS, GLOB_PATTERN, SOURCE_ONLY_MARKER, TRANSPORT_EXCLUSIONS, CLASSIFICATION, FINDING_CODE;
|
|
44763
|
+
var CHECKER_VERSION, BARE_PREFIXES, EXPLICIT_PREFIXES, SOURCE_TREE_PATTERN, MACHINE_ABSOLUTE_PATTERN, HOME_DIRECTORY_PATTERN, ADAPTER_SURFACE_PATTERN, PLATFORM_SURFACE_PATTERN, CLOSURE_RESOURCE_DIRS, GLOB_PATTERN, SOURCE_ONLY_MARKER, TRANSPORT_EXCLUSIONS, CLASSIFICATION, FINDING_CODE;
|
|
44715
44764
|
var init_skill_resource_closure = __esm({
|
|
44716
|
-
"src/core/skill-resource-closure.mjs"() {
|
|
44765
|
+
async "src/core/skill-resource-closure.mjs"() {
|
|
44717
44766
|
init_src();
|
|
44718
44767
|
init_errors3();
|
|
44719
44768
|
init_frozen();
|
|
44720
|
-
|
|
44769
|
+
await init_registry2();
|
|
44770
|
+
CHECKER_VERSION = "skill-resource-closure-v4";
|
|
44721
44771
|
BARE_PREFIXES = ["references/", "assets/", "schemas/", "examples/", "scripts/"];
|
|
44722
44772
|
EXPLICIT_PREFIXES = [
|
|
44723
44773
|
"<plugin-root>/",
|
|
@@ -44731,6 +44781,7 @@ var init_skill_resource_closure = __esm({
|
|
|
44731
44781
|
MACHINE_ABSOLUTE_PATTERN = /^(?:\/(?:Users|home|root|tmp|var|etc|opt)(?:\/|$)|[A-Za-z]:[\\/])/u;
|
|
44732
44782
|
HOME_DIRECTORY_PATTERN = /^(?:~|\$HOME|\$\{HOME\})\/.+/u;
|
|
44733
44783
|
ADAPTER_SURFACE_PATTERN = /^adapters\/([^/]+)$/u;
|
|
44784
|
+
PLATFORM_SURFACE_PATTERN = /^platforms\/(.+)$/u;
|
|
44734
44785
|
CLOSURE_RESOURCE_DIRS = Object.freeze(["references", "assets", "schemas", "examples", "scripts"]);
|
|
44735
44786
|
GLOB_PATTERN = /[*?\[]/u;
|
|
44736
44787
|
SOURCE_ONLY_MARKER = /(?:\bsource-only\b|仅源码包)/iu;
|
|
@@ -44748,7 +44799,8 @@ var init_skill_resource_closure = __esm({
|
|
|
44748
44799
|
HOME_DIRECTORY: "home_directory",
|
|
44749
44800
|
OUT_OF_BOUNDS: "out_of_bounds",
|
|
44750
44801
|
RESOURCE_DRIFT: "resource_drift",
|
|
44751
|
-
STALE_RESOURCE: "stale_resource"
|
|
44802
|
+
STALE_RESOURCE: "stale_resource",
|
|
44803
|
+
UNKNOWN_PLATFORM_SURFACE: "unknown_platform_surface"
|
|
44752
44804
|
});
|
|
44753
44805
|
FINDING_CODE = Object.freeze({
|
|
44754
44806
|
SNAPSHOT_UNSAFE: "SNAPSHOT_UNSAFE",
|
|
@@ -44760,7 +44812,8 @@ var init_skill_resource_closure = __esm({
|
|
|
44760
44812
|
OUT_OF_BOUNDS: "OUT_OF_BOUNDS",
|
|
44761
44813
|
SYMLINK_NOT_ALLOWED: "SYMLINK_NOT_ALLOWED",
|
|
44762
44814
|
RESOURCE_DRIFT: "RESOURCE_DRIFT",
|
|
44763
|
-
STALE_RESOURCE: "STALE_RESOURCE"
|
|
44815
|
+
STALE_RESOURCE: "STALE_RESOURCE",
|
|
44816
|
+
UNKNOWN_PLATFORM_SURFACE: "UNKNOWN_PLATFORM_SURFACE"
|
|
44764
44817
|
});
|
|
44765
44818
|
__name(toPosix, "toPosix");
|
|
44766
44819
|
__name(relativeStable, "relativeStable");
|
|
@@ -100763,7 +100816,7 @@ var init_prepare = __esm({
|
|
|
100763
100816
|
init_evidence();
|
|
100764
100817
|
await init_plan();
|
|
100765
100818
|
init_digest();
|
|
100766
|
-
init_skill_resource_closure();
|
|
100819
|
+
await init_skill_resource_closure();
|
|
100767
100820
|
init_public_map();
|
|
100768
100821
|
init_public_path();
|
|
100769
100822
|
init_scan();
|
|
@@ -102785,7 +102838,7 @@ var init_publish = __esm({
|
|
|
102785
102838
|
init_baseline2();
|
|
102786
102839
|
init_previous_public_baseline();
|
|
102787
102840
|
init_evidence();
|
|
102788
|
-
init_skill_resource_closure();
|
|
102841
|
+
await init_skill_resource_closure();
|
|
102789
102842
|
init_checkpoints();
|
|
102790
102843
|
await init_run();
|
|
102791
102844
|
init_errors3();
|
|
@@ -105332,7 +105385,7 @@ var init_verify = __esm({
|
|
|
105332
105385
|
init_public_path();
|
|
105333
105386
|
init_npm();
|
|
105334
105387
|
init_verification_gates();
|
|
105335
|
-
init_skill_resource_closure();
|
|
105388
|
+
await init_skill_resource_closure();
|
|
105336
105389
|
init_checkpoints();
|
|
105337
105390
|
init_installation_contract();
|
|
105338
105391
|
init_npm_entry_closure();
|
|
@@ -9,9 +9,9 @@ const __bundlePkgRoot = __bundleResolve(__bundleDirname(__bundleFileURLToPath(im
|
|
|
9
9
|
// Provide a real require() for CJS packages bundled into ESM (e.g. yaml, ajv).
|
|
10
10
|
const __bundleRealRequire = __bundleCreateRequire(import.meta.url);
|
|
11
11
|
// Package identity injected at build time — closure-independent --version probe.
|
|
12
|
-
const __bundlePkg = Object.freeze({"name":"release-skill","version":"0.7.
|
|
12
|
+
const __bundlePkg = Object.freeze({"name":"release-skill","version":"0.7.5"});
|
|
13
13
|
// Build-time source digest for the BUNDLE_STALE freshness gate (see above).
|
|
14
|
-
const __bundleSourceDigest = "
|
|
14
|
+
const __bundleSourceDigest = "9ced58c843d3cdefc52185b6f64dd05deaf480edc7807ee5bf9efd54023c5ed7";
|
|
15
15
|
|
|
16
16
|
var __create = Object.create;
|
|
17
17
|
var __defProp = Object.defineProperty;
|
|
@@ -36390,8 +36390,13 @@ function getPlatform(id) {
|
|
|
36390
36390
|
if (!platform) throw new Error(`unknown platform: ${id}`);
|
|
36391
36391
|
return platform;
|
|
36392
36392
|
}
|
|
36393
|
+
function resolveSkillProjectionSurfaceHost(surfaceId, registry = PLATFORMS) {
|
|
36394
|
+
const platform = registry.find((item) => item.skillProjectionSurface === surfaceId);
|
|
36395
|
+
return platform?.buildAdapter?.name ?? null;
|
|
36396
|
+
}
|
|
36393
36397
|
function assertRegistry(registry = PLATFORMS) {
|
|
36394
36398
|
const seen = /* @__PURE__ */ new Set();
|
|
36399
|
+
const seenSkillProjectionSurfaces = /* @__PURE__ */ new Set();
|
|
36395
36400
|
for (const platform of registry) {
|
|
36396
36401
|
const label = platform?.id ?? "<missing id>";
|
|
36397
36402
|
if (typeof platform?.id !== "string" || platform.id.length === 0) {
|
|
@@ -36440,6 +36445,16 @@ function assertRegistry(registry = PLATFORMS) {
|
|
|
36440
36445
|
if (typeof platform.buildAdapter.name !== "string" || platform.buildAdapter.name.length === 0) {
|
|
36441
36446
|
throw new Error(`platform registry: ${label} buildAdapter needs a non-empty name (its adapter directory name)`);
|
|
36442
36447
|
}
|
|
36448
|
+
if (typeof platform.skillProjectionSurface !== "string" || !SKILL_PROJECTION_SURFACE_PATTERN.test(platform.skillProjectionSurface)) {
|
|
36449
|
+
throw new Error(`platform registry: ${label} skillProjectionSurface must match platforms/<slug>`);
|
|
36450
|
+
}
|
|
36451
|
+
if (seenSkillProjectionSurfaces.has(platform.skillProjectionSurface)) {
|
|
36452
|
+
throw new Error(`platform registry: duplicate skillProjectionSurface "${platform.skillProjectionSurface}"; aliases must be unique`);
|
|
36453
|
+
}
|
|
36454
|
+
seenSkillProjectionSurfaces.add(platform.skillProjectionSurface);
|
|
36455
|
+
if (resolveSkillProjectionSurfaceHost(platform.skillProjectionSurface, registry) !== platform.buildAdapter.name) {
|
|
36456
|
+
throw new Error(`platform registry: ${label} skillProjectionSurface must map to buildAdapter.name`);
|
|
36457
|
+
}
|
|
36443
36458
|
if (!VALID_LIST_OUTPUTS.has(platform.jsonProtocol?.listOutput)) {
|
|
36444
36459
|
throw new Error(`platform registry: ${label} has illegal jsonProtocol.listOutput "${platform.jsonProtocol?.listOutput}"`);
|
|
36445
36460
|
}
|
|
@@ -36567,7 +36582,7 @@ function resolveCapabilityConflicts(platform) {
|
|
|
36567
36582
|
}
|
|
36568
36583
|
return { hasConflict: false, conflicts: [] };
|
|
36569
36584
|
}
|
|
36570
|
-
var CLAUDE, CODEX, KIMI, CODEBUDDY, PLATFORMS, VALID_DISTRIBUTION_TYPES, VALID_ACTION_TYPES, VALID_SOURCE_FORMS, VALID_MARKETPLACE_REF_FORMS, VALID_LIST_OUTPUTS, VALID_CLI_OUTPUTS, VALID_ENTRY_VERSION_BINDING, VALID_INSTALL_METHODS, VALID_REF_STRENGTHS, VALID_OUTPUT_PROTOCOLS, VALID_IDENTITY_EVIDENCE, VALID_DEGRADATION_POLICIES;
|
|
36585
|
+
var CLAUDE, CODEX, KIMI, CODEBUDDY, PLATFORMS, VALID_DISTRIBUTION_TYPES, VALID_ACTION_TYPES, VALID_SOURCE_FORMS, VALID_MARKETPLACE_REF_FORMS, VALID_LIST_OUTPUTS, VALID_CLI_OUTPUTS, VALID_ENTRY_VERSION_BINDING, VALID_INSTALL_METHODS, VALID_REF_STRENGTHS, VALID_OUTPUT_PROTOCOLS, VALID_IDENTITY_EVIDENCE, VALID_DEGRADATION_POLICIES, SKILL_PROJECTION_SURFACE_PATTERN;
|
|
36571
36586
|
var init_registry2 = __esm({
|
|
36572
36587
|
async "src/platforms/registry.mjs"() {
|
|
36573
36588
|
await init_kimi();
|
|
@@ -36582,6 +36597,7 @@ var init_registry2 = __esm({
|
|
|
36582
36597
|
__name(codexCrossValidateListEntry, "codexCrossValidateListEntry");
|
|
36583
36598
|
CLAUDE = Object.freeze({
|
|
36584
36599
|
id: "claude",
|
|
36600
|
+
skillProjectionSurface: "platforms/claude-code",
|
|
36585
36601
|
distributionType: "claude-plugin",
|
|
36586
36602
|
actionType: "claude-marketplace-install",
|
|
36587
36603
|
// Runtime adapter implementing this platform's marketplace-install action.
|
|
@@ -36646,6 +36662,7 @@ var init_registry2 = __esm({
|
|
|
36646
36662
|
});
|
|
36647
36663
|
CODEX = Object.freeze({
|
|
36648
36664
|
id: "codex",
|
|
36665
|
+
skillProjectionSurface: "platforms/codex",
|
|
36649
36666
|
distributionType: "codex-plugin",
|
|
36650
36667
|
actionType: "codex-marketplace-install",
|
|
36651
36668
|
adapter: "plugin-marketplace",
|
|
@@ -36706,6 +36723,7 @@ var init_registry2 = __esm({
|
|
|
36706
36723
|
});
|
|
36707
36724
|
KIMI = Object.freeze({
|
|
36708
36725
|
id: "kimi",
|
|
36726
|
+
skillProjectionSurface: "platforms/kimi-code",
|
|
36709
36727
|
distributionType: "kimi-plugin",
|
|
36710
36728
|
actionType: "kimi-marketplace-install",
|
|
36711
36729
|
adapter: "plugin-marketplace",
|
|
@@ -36765,6 +36783,7 @@ var init_registry2 = __esm({
|
|
|
36765
36783
|
});
|
|
36766
36784
|
CODEBUDDY = Object.freeze({
|
|
36767
36785
|
id: "codebuddy",
|
|
36786
|
+
skillProjectionSurface: "platforms/workbuddy",
|
|
36768
36787
|
distributionType: "codebuddy-plugin",
|
|
36769
36788
|
actionType: "codebuddy-marketplace-install",
|
|
36770
36789
|
adapter: "plugin-marketplace",
|
|
@@ -36847,7 +36866,9 @@ var init_registry2 = __esm({
|
|
|
36847
36866
|
VALID_OUTPUT_PROTOCOLS = /* @__PURE__ */ new Set(["structured", "text", "none"]);
|
|
36848
36867
|
VALID_IDENTITY_EVIDENCE = /* @__PURE__ */ new Set(["list-record", "install-output", "filesystem-payload", "human-attestation"]);
|
|
36849
36868
|
VALID_DEGRADATION_POLICIES = /* @__PURE__ */ new Set(["block", "human-attestation", "human-attestation-with-fallback"]);
|
|
36869
|
+
SKILL_PROJECTION_SURFACE_PATTERN = /^platforms\/[a-z0-9]+(?:-[a-z0-9]+)*$/u;
|
|
36850
36870
|
__name(getPlatform, "getPlatform");
|
|
36871
|
+
__name(resolveSkillProjectionSurfaceHost, "resolveSkillProjectionSurfaceHost");
|
|
36851
36872
|
__name(assertRegistry, "assertRegistry");
|
|
36852
36873
|
assertRegistry();
|
|
36853
36874
|
__name(resolvePlatformRoute, "resolvePlatformRoute");
|
|
@@ -44262,8 +44283,17 @@ async function discoverSkills(root, base = root) {
|
|
|
44262
44283
|
function resolvePluginRoot(skillRelativePath, scanRoot2) {
|
|
44263
44284
|
const parts = toPosix(skillRelativePath).split("/");
|
|
44264
44285
|
const skillsIndex = parts.lastIndexOf("skills");
|
|
44265
|
-
if (skillsIndex
|
|
44266
|
-
|
|
44286
|
+
if (skillsIndex >= 0) return resolve17(scanRoot2, ...parts.slice(0, skillsIndex));
|
|
44287
|
+
if (parts[0] === "platforms" && parts.length >= 3) {
|
|
44288
|
+
const registeredSurface = parts.slice(0, 2).join("/");
|
|
44289
|
+
if (resolveSkillProjectionSurfaceHost(registeredSurface) !== null) {
|
|
44290
|
+
return resolve17(scanRoot2, ...parts.slice(0, 2));
|
|
44291
|
+
}
|
|
44292
|
+
const skillIndex = parts.lastIndexOf("skill");
|
|
44293
|
+
if (skillIndex >= 2) return resolve17(scanRoot2, ...parts.slice(0, skillIndex));
|
|
44294
|
+
return resolve17(scanRoot2, ...parts.slice(0, 2));
|
|
44295
|
+
}
|
|
44296
|
+
return resolve17(scanRoot2);
|
|
44267
44297
|
}
|
|
44268
44298
|
function resolveSkillRoot(skillRelativePath, scanRoot2) {
|
|
44269
44299
|
return resolve17(scanRoot2, dirname7(skillRelativePath));
|
|
@@ -44399,8 +44429,13 @@ async function collectRegularFiles(dir, results) {
|
|
|
44399
44429
|
}
|
|
44400
44430
|
}
|
|
44401
44431
|
function inferSurfaceHost(surfaceId, defaultHost) {
|
|
44402
|
-
const
|
|
44403
|
-
return
|
|
44432
|
+
const adapterMatch = ADAPTER_SURFACE_PATTERN.exec(surfaceId);
|
|
44433
|
+
if (adapterMatch) return adapterMatch[1];
|
|
44434
|
+
const platformMatch = PLATFORM_SURFACE_PATTERN.exec(surfaceId);
|
|
44435
|
+
if (platformMatch) {
|
|
44436
|
+
return resolveSkillProjectionSurfaceHost(surfaceId) ?? `unknown-platform:${platformMatch[1]}`;
|
|
44437
|
+
}
|
|
44438
|
+
return defaultHost;
|
|
44404
44439
|
}
|
|
44405
44440
|
function receiptProjection(result) {
|
|
44406
44441
|
return {
|
|
@@ -44509,6 +44544,7 @@ async function checkSkillResourceClosure({
|
|
|
44509
44544
|
const pluginRoot = resolvePluginRoot(skill, scanRoot2);
|
|
44510
44545
|
const surfaceId = relativeStable(scanRoot2, pluginRoot);
|
|
44511
44546
|
const surfaceHost = inferSurfaceHost(surfaceId, host);
|
|
44547
|
+
const firstSkillOnSurface = !surfaceMap.has(surfaceId);
|
|
44512
44548
|
const surface = surfaceMap.get(surfaceId) ?? {
|
|
44513
44549
|
id: surfaceId,
|
|
44514
44550
|
host: surfaceHost,
|
|
@@ -44518,6 +44554,19 @@ async function checkSkillResourceClosure({
|
|
|
44518
44554
|
};
|
|
44519
44555
|
surface.skillCount += 1;
|
|
44520
44556
|
surfaceMap.set(surfaceId, surface);
|
|
44557
|
+
if (firstSkillOnSurface && PLATFORM_SURFACE_PATTERN.test(surfaceId) && resolveSkillProjectionSurfaceHost(surfaceId) === null) {
|
|
44558
|
+
findings.push({
|
|
44559
|
+
host: surfaceHost,
|
|
44560
|
+
surface: surfaceId,
|
|
44561
|
+
skill: null,
|
|
44562
|
+
line: null,
|
|
44563
|
+
reference: surfaceId,
|
|
44564
|
+
classification: CLASSIFICATION.UNKNOWN_PLATFORM_SURFACE,
|
|
44565
|
+
resolutionRoot: surfaceId,
|
|
44566
|
+
resolvedTarget: surfaceId,
|
|
44567
|
+
code: FINDING_CODE.UNKNOWN_PLATFORM_SURFACE
|
|
44568
|
+
});
|
|
44569
|
+
}
|
|
44521
44570
|
if (!skillsBySurface.has(surfaceId)) skillsBySurface.set(surfaceId, []);
|
|
44522
44571
|
skillsBySurface.get(surfaceId).push(skill);
|
|
44523
44572
|
const content = await readFile12(resolve17(scanRoot2, skill), "utf8");
|
|
@@ -44711,13 +44760,14 @@ function evaluateDeclaredHostSurfaceCoverage(expectedHosts, surfaces) {
|
|
|
44711
44760
|
}
|
|
44712
44761
|
return { passed: missing.length === 0, missing };
|
|
44713
44762
|
}
|
|
44714
|
-
var CHECKER_VERSION, BARE_PREFIXES, EXPLICIT_PREFIXES, SOURCE_TREE_PATTERN, MACHINE_ABSOLUTE_PATTERN, HOME_DIRECTORY_PATTERN, ADAPTER_SURFACE_PATTERN, CLOSURE_RESOURCE_DIRS, GLOB_PATTERN, SOURCE_ONLY_MARKER, TRANSPORT_EXCLUSIONS, CLASSIFICATION, FINDING_CODE;
|
|
44763
|
+
var CHECKER_VERSION, BARE_PREFIXES, EXPLICIT_PREFIXES, SOURCE_TREE_PATTERN, MACHINE_ABSOLUTE_PATTERN, HOME_DIRECTORY_PATTERN, ADAPTER_SURFACE_PATTERN, PLATFORM_SURFACE_PATTERN, CLOSURE_RESOURCE_DIRS, GLOB_PATTERN, SOURCE_ONLY_MARKER, TRANSPORT_EXCLUSIONS, CLASSIFICATION, FINDING_CODE;
|
|
44715
44764
|
var init_skill_resource_closure = __esm({
|
|
44716
|
-
"src/core/skill-resource-closure.mjs"() {
|
|
44765
|
+
async "src/core/skill-resource-closure.mjs"() {
|
|
44717
44766
|
init_src();
|
|
44718
44767
|
init_errors3();
|
|
44719
44768
|
init_frozen();
|
|
44720
|
-
|
|
44769
|
+
await init_registry2();
|
|
44770
|
+
CHECKER_VERSION = "skill-resource-closure-v4";
|
|
44721
44771
|
BARE_PREFIXES = ["references/", "assets/", "schemas/", "examples/", "scripts/"];
|
|
44722
44772
|
EXPLICIT_PREFIXES = [
|
|
44723
44773
|
"<plugin-root>/",
|
|
@@ -44731,6 +44781,7 @@ var init_skill_resource_closure = __esm({
|
|
|
44731
44781
|
MACHINE_ABSOLUTE_PATTERN = /^(?:\/(?:Users|home|root|tmp|var|etc|opt)(?:\/|$)|[A-Za-z]:[\\/])/u;
|
|
44732
44782
|
HOME_DIRECTORY_PATTERN = /^(?:~|\$HOME|\$\{HOME\})\/.+/u;
|
|
44733
44783
|
ADAPTER_SURFACE_PATTERN = /^adapters\/([^/]+)$/u;
|
|
44784
|
+
PLATFORM_SURFACE_PATTERN = /^platforms\/(.+)$/u;
|
|
44734
44785
|
CLOSURE_RESOURCE_DIRS = Object.freeze(["references", "assets", "schemas", "examples", "scripts"]);
|
|
44735
44786
|
GLOB_PATTERN = /[*?\[]/u;
|
|
44736
44787
|
SOURCE_ONLY_MARKER = /(?:\bsource-only\b|仅源码包)/iu;
|
|
@@ -44748,7 +44799,8 @@ var init_skill_resource_closure = __esm({
|
|
|
44748
44799
|
HOME_DIRECTORY: "home_directory",
|
|
44749
44800
|
OUT_OF_BOUNDS: "out_of_bounds",
|
|
44750
44801
|
RESOURCE_DRIFT: "resource_drift",
|
|
44751
|
-
STALE_RESOURCE: "stale_resource"
|
|
44802
|
+
STALE_RESOURCE: "stale_resource",
|
|
44803
|
+
UNKNOWN_PLATFORM_SURFACE: "unknown_platform_surface"
|
|
44752
44804
|
});
|
|
44753
44805
|
FINDING_CODE = Object.freeze({
|
|
44754
44806
|
SNAPSHOT_UNSAFE: "SNAPSHOT_UNSAFE",
|
|
@@ -44760,7 +44812,8 @@ var init_skill_resource_closure = __esm({
|
|
|
44760
44812
|
OUT_OF_BOUNDS: "OUT_OF_BOUNDS",
|
|
44761
44813
|
SYMLINK_NOT_ALLOWED: "SYMLINK_NOT_ALLOWED",
|
|
44762
44814
|
RESOURCE_DRIFT: "RESOURCE_DRIFT",
|
|
44763
|
-
STALE_RESOURCE: "STALE_RESOURCE"
|
|
44815
|
+
STALE_RESOURCE: "STALE_RESOURCE",
|
|
44816
|
+
UNKNOWN_PLATFORM_SURFACE: "UNKNOWN_PLATFORM_SURFACE"
|
|
44764
44817
|
});
|
|
44765
44818
|
__name(toPosix, "toPosix");
|
|
44766
44819
|
__name(relativeStable, "relativeStable");
|
|
@@ -100763,7 +100816,7 @@ var init_prepare = __esm({
|
|
|
100763
100816
|
init_evidence();
|
|
100764
100817
|
await init_plan();
|
|
100765
100818
|
init_digest();
|
|
100766
|
-
init_skill_resource_closure();
|
|
100819
|
+
await init_skill_resource_closure();
|
|
100767
100820
|
init_public_map();
|
|
100768
100821
|
init_public_path();
|
|
100769
100822
|
init_scan();
|
|
@@ -102785,7 +102838,7 @@ var init_publish = __esm({
|
|
|
102785
102838
|
init_baseline2();
|
|
102786
102839
|
init_previous_public_baseline();
|
|
102787
102840
|
init_evidence();
|
|
102788
|
-
init_skill_resource_closure();
|
|
102841
|
+
await init_skill_resource_closure();
|
|
102789
102842
|
init_checkpoints();
|
|
102790
102843
|
await init_run();
|
|
102791
102844
|
init_errors3();
|
|
@@ -105332,7 +105385,7 @@ var init_verify = __esm({
|
|
|
105332
105385
|
init_public_path();
|
|
105333
105386
|
init_npm();
|
|
105334
105387
|
init_verification_gates();
|
|
105335
|
-
init_skill_resource_closure();
|
|
105388
|
+
await init_skill_resource_closure();
|
|
105336
105389
|
init_checkpoints();
|
|
105337
105390
|
init_installation_contract();
|
|
105338
105391
|
init_npm_entry_closure();
|