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();
|
package/package.json
CHANGED
package/platform-manifest.json
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
3
|
"platformId": "release-skill",
|
|
4
4
|
"platformName": "release-skill Plugin Platform",
|
|
5
|
-
"version": "0.7.
|
|
5
|
+
"version": "0.7.5",
|
|
6
6
|
"logicalRoot": "skills-src/",
|
|
7
7
|
"logicalRootDigest": "3767fc36f42ca561f5e839cea7b7e5bc16d08c47867b5bd6086f25efd0cb0f06",
|
|
8
8
|
"projectionDigest": "419f7f9601015459956e10aae74f42240ab2ac248238ff7494f3e761643d1749",
|
|
9
|
-
"projectionId": "release-skill:platform:0.7.
|
|
9
|
+
"projectionId": "release-skill:platform:0.7.5",
|
|
10
10
|
"manifestRequired": true,
|
|
11
11
|
"projectionSources": {
|
|
12
12
|
"skills-src-root": {
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
* Only path tokens in Markdown code spans, fenced code blocks, and local link
|
|
5
5
|
* targets are interpreted. Bare Skill resources resolve from the directory
|
|
6
6
|
* containing SKILL.md. Explicit plugin-root tokens resolve from the parent of
|
|
7
|
-
* the nearest `skills/` directory
|
|
7
|
+
* the nearest `skills/` directory or from a registered platform projection
|
|
8
|
+
* root when the projection publishes a singular `skill/` entry.
|
|
8
9
|
*/
|
|
9
10
|
|
|
10
11
|
import { lstat, readFile, readdir } from 'node:fs/promises';
|
|
@@ -13,8 +14,9 @@ import { dirname, isAbsolute, join, relative, resolve, sep } from 'node:path';
|
|
|
13
14
|
import { canonicalJson, digestDocument } from 'skill-family-contracts';
|
|
14
15
|
import { GATE_FAILED, ReleaseError } from './errors.mjs';
|
|
15
16
|
import { computeFrozenSnapshot } from '../snapshot/frozen.mjs';
|
|
17
|
+
import { resolveSkillProjectionSurfaceHost } from '../platforms/registry.mjs';
|
|
16
18
|
|
|
17
|
-
export const CHECKER_VERSION = 'skill-resource-closure-
|
|
19
|
+
export const CHECKER_VERSION = 'skill-resource-closure-v4';
|
|
18
20
|
|
|
19
21
|
const BARE_PREFIXES = ['references/', 'assets/', 'schemas/', 'examples/', 'scripts/'];
|
|
20
22
|
const EXPLICIT_PREFIXES = [
|
|
@@ -32,6 +34,7 @@ const MACHINE_ABSOLUTE_PATTERN = /^(?:\/(?:Users|home|root|tmp|var|etc|opt)(?:\/
|
|
|
32
34
|
// isPathToken, so prose words are never matched; fail-closed over silent miss.
|
|
33
35
|
const HOME_DIRECTORY_PATTERN = /^(?:~|\$HOME|\$\{HOME\})\/.+/u;
|
|
34
36
|
const ADAPTER_SURFACE_PATTERN = /^adapters\/([^/]+)$/u;
|
|
37
|
+
const PLATFORM_SURFACE_PATTERN = /^platforms\/(.+)$/u;
|
|
35
38
|
// G3: skill-local resource closure directories. Regular files inside these
|
|
36
39
|
// directories (under a skill directory) must be referenced by a SKILL.md of
|
|
37
40
|
// the same surface or they are reported as stale on adapter surfaces.
|
|
@@ -58,6 +61,7 @@ export const CLASSIFICATION = Object.freeze({
|
|
|
58
61
|
OUT_OF_BOUNDS: 'out_of_bounds',
|
|
59
62
|
RESOURCE_DRIFT: 'resource_drift',
|
|
60
63
|
STALE_RESOURCE: 'stale_resource',
|
|
64
|
+
UNKNOWN_PLATFORM_SURFACE: 'unknown_platform_surface',
|
|
61
65
|
});
|
|
62
66
|
|
|
63
67
|
export const FINDING_CODE = Object.freeze({
|
|
@@ -71,6 +75,7 @@ export const FINDING_CODE = Object.freeze({
|
|
|
71
75
|
SYMLINK_NOT_ALLOWED: 'SYMLINK_NOT_ALLOWED',
|
|
72
76
|
RESOURCE_DRIFT: 'RESOURCE_DRIFT',
|
|
73
77
|
STALE_RESOURCE: 'STALE_RESOURCE',
|
|
78
|
+
UNKNOWN_PLATFORM_SURFACE: 'UNKNOWN_PLATFORM_SURFACE',
|
|
74
79
|
});
|
|
75
80
|
|
|
76
81
|
function toPosix(value) {
|
|
@@ -113,8 +118,27 @@ export async function discoverSkills(root, base = root) {
|
|
|
113
118
|
export function resolvePluginRoot(skillRelativePath, scanRoot) {
|
|
114
119
|
const parts = toPosix(skillRelativePath).split('/');
|
|
115
120
|
const skillsIndex = parts.lastIndexOf('skills');
|
|
116
|
-
if (skillsIndex
|
|
117
|
-
|
|
121
|
+
if (skillsIndex >= 0) return resolve(scanRoot, ...parts.slice(0, skillsIndex));
|
|
122
|
+
|
|
123
|
+
// Published platform projections may expose one platform-level `skill/`
|
|
124
|
+
// entry rather than an adapter-style `skills/<name>/` tree. A registered
|
|
125
|
+
// platform surface remains the authority for its root even when the skill
|
|
126
|
+
// directory below it has a different physical name.
|
|
127
|
+
if (parts[0] === 'platforms' && parts.length >= 3) {
|
|
128
|
+
const registeredSurface = parts.slice(0, 2).join('/');
|
|
129
|
+
if (resolveSkillProjectionSurfaceHost(registeredSurface) !== null) {
|
|
130
|
+
return resolve(scanRoot, ...parts.slice(0, 2));
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// Preserve fail-closed discovery for an unregistered singular platform
|
|
134
|
+
// projection, including nested platform paths. A direct platform SKILL
|
|
135
|
+
// without either marker still belongs to its first two path segments.
|
|
136
|
+
const skillIndex = parts.lastIndexOf('skill');
|
|
137
|
+
if (skillIndex >= 2) return resolve(scanRoot, ...parts.slice(0, skillIndex));
|
|
138
|
+
return resolve(scanRoot, ...parts.slice(0, 2));
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
return resolve(scanRoot);
|
|
118
142
|
}
|
|
119
143
|
|
|
120
144
|
export function resolveSkillRoot(skillRelativePath, scanRoot) {
|
|
@@ -281,8 +305,14 @@ async function collectRegularFiles(dir, results) {
|
|
|
281
305
|
}
|
|
282
306
|
|
|
283
307
|
function inferSurfaceHost(surfaceId, defaultHost) {
|
|
284
|
-
const
|
|
285
|
-
return
|
|
308
|
+
const adapterMatch = ADAPTER_SURFACE_PATTERN.exec(surfaceId);
|
|
309
|
+
if (adapterMatch) return adapterMatch[1];
|
|
310
|
+
const platformMatch = PLATFORM_SURFACE_PATTERN.exec(surfaceId);
|
|
311
|
+
if (platformMatch) {
|
|
312
|
+
return resolveSkillProjectionSurfaceHost(surfaceId)
|
|
313
|
+
?? `unknown-platform:${platformMatch[1]}`;
|
|
314
|
+
}
|
|
315
|
+
return defaultHost;
|
|
286
316
|
}
|
|
287
317
|
|
|
288
318
|
function receiptProjection(result) {
|
|
@@ -413,6 +443,7 @@ export async function checkSkillResourceClosure({
|
|
|
413
443
|
const pluginRoot = resolvePluginRoot(skill, scanRoot);
|
|
414
444
|
const surfaceId = relativeStable(scanRoot, pluginRoot);
|
|
415
445
|
const surfaceHost = inferSurfaceHost(surfaceId, host);
|
|
446
|
+
const firstSkillOnSurface = !surfaceMap.has(surfaceId);
|
|
416
447
|
const surface = surfaceMap.get(surfaceId) ?? {
|
|
417
448
|
id: surfaceId,
|
|
418
449
|
host: surfaceHost,
|
|
@@ -422,6 +453,21 @@ export async function checkSkillResourceClosure({
|
|
|
422
453
|
};
|
|
423
454
|
surface.skillCount += 1;
|
|
424
455
|
surfaceMap.set(surfaceId, surface);
|
|
456
|
+
if (firstSkillOnSurface
|
|
457
|
+
&& PLATFORM_SURFACE_PATTERN.test(surfaceId)
|
|
458
|
+
&& resolveSkillProjectionSurfaceHost(surfaceId) === null) {
|
|
459
|
+
findings.push({
|
|
460
|
+
host: surfaceHost,
|
|
461
|
+
surface: surfaceId,
|
|
462
|
+
skill: null,
|
|
463
|
+
line: null,
|
|
464
|
+
reference: surfaceId,
|
|
465
|
+
classification: CLASSIFICATION.UNKNOWN_PLATFORM_SURFACE,
|
|
466
|
+
resolutionRoot: surfaceId,
|
|
467
|
+
resolvedTarget: surfaceId,
|
|
468
|
+
code: FINDING_CODE.UNKNOWN_PLATFORM_SURFACE,
|
|
469
|
+
});
|
|
470
|
+
}
|
|
425
471
|
if (!skillsBySurface.has(surfaceId)) skillsBySurface.set(surfaceId, []);
|
|
426
472
|
skillsBySurface.get(surfaceId).push(skill);
|
|
427
473
|
|