skill-family-engineering-kit 0.25.0 → 0.26.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/CHANGELOG.md +22 -0
- package/CHANGELOG.zh-CN.md +22 -0
- package/README.md +59 -21
- package/README.zh-CN.md +98 -21
- package/data/hosts/codebuddy/host-descriptor.json +9 -1
- package/data/hosts/deepseek-harness/host-descriptor.json +9 -1
- package/data/hosts/kimi-code/host-descriptor.json +7 -0
- package/data/hosts/qoder/host-descriptor.json +9 -1
- package/data/hosts/workbuddy/host-descriptor.json +7 -0
- package/docs/public/status/index.html +4 -4
- package/docs/search/search_index.json +1 -1
- package/package.json +3 -3
- package/release-notes/0.26.0.yaml +29 -0
- package/src/cli.mjs +7 -7
- package/src/host-loading-check.mjs +179 -53
- package/src/host-loading-native.mjs +1937 -0
package/package.json
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
"url": "https://github.com/ifoohoo/skill-family-engineering-kit/issues"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"skill-family-contracts": "0.
|
|
12
|
-
"skill-family-harness-node": "0.
|
|
11
|
+
"skill-family-contracts": "0.26.0",
|
|
12
|
+
"skill-family-harness-node": "0.26.0",
|
|
13
13
|
"yaml": "2.9.0"
|
|
14
14
|
},
|
|
15
15
|
"description": "Build-time scaffold, adoption planning, projection, and checks.",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"url": "https://github.com/ifoohoo/skill-family-engineering-kit.git"
|
|
53
53
|
},
|
|
54
54
|
"type": "module",
|
|
55
|
-
"version": "0.
|
|
55
|
+
"version": "0.26.0",
|
|
56
56
|
"scripts": {
|
|
57
57
|
"check": "node --test",
|
|
58
58
|
"test": "node --test"
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
version: 0.26.0
|
|
2
|
+
date: 2026-10-17
|
|
3
|
+
locales:
|
|
4
|
+
en:
|
|
5
|
+
summary: "Version 0.26.0 extends shared read-only static loading checks to seven hosts through the existing runHostLoadingCheck function and skill-family-kit check host-loading CLI action. The four top-level commands scaffold, adopt-plan, projection, and check remain unchanged; no new top-level command or public API is added. Checks do not start hosts, models, hooks, or scripts, access the network, or write files."
|
|
6
|
+
changes:
|
|
7
|
+
changed:
|
|
8
|
+
- "Add shared static loading checks for seven hosts. The exact host versions, categories, and project directories are listed in the authoritative [NATIVE_HOSTS table](src/host-loading-native.mjs); this internal table is not a package-root public export."
|
|
9
|
+
- "Retain Codex CLI 0.154.0 project .agents/skills support and its existing activationRules mechanism."
|
|
10
|
+
- "Apply each host’s own discovery, parsing, ignore, name-competition, and local-file flag rules. Report Cursor menu, completion, and model metadata separately."
|
|
11
|
+
- "Only modelMetadata.* for Cursor CLI 2026.09.10-fd3934a may use source-reviewed-unexecuted, labeled “源码核实、未作原生运行校准” (source reviewed; not calibrated through native execution). This is not native runtime calibration and does not mean the check starts the host."
|
|
12
|
+
- "Other native-observed markers mean the check uses previously calibrated native rules; they do not mean this check starts the host."
|
|
13
|
+
- "The API project root must be an absolute working directory; the CLI resolves relative input to an absolute path first. A missing or unbindable project root returns 2. A missing, non-directory, or empty skill container within an existing project returns 1. Proven local loading blockers return 1; specific uncovered behavior or unknown competition returns 2 and takes precedence over 1. A fully covered static scope without blockers returns 0; normal skills cannot mask blockers or uncovered behavior. Only Codex supports activationRules; the seven other hosts accept only omission or null, and any other value, including an empty array, returns 2."
|
|
14
|
+
- "Retain link-containment and read boundaries. Uncalibrated actual competition, uncalibrated WorkBuddy optional metadata or version-source forms and icon resolution, Cursor completion string false, and CodeBuddy block scalars without proven equivalence remain specifically uncovered. Do not guess success or return 2 permanently for all ordinary input."
|
|
15
|
+
- "Exit 0 proves only static-check success. It does not prove final activation, installation, update, session selection, real triggering, or business execution. Codex evidence cannot establish calibration for other hosts."
|
|
16
|
+
upgradeNotes: "Pin skill-family-engineering-kit, skill-family-contracts, skill-family-harness-node, and the independent Plugin to exactly 0.26.0 in lockstep. Contracts specification 1.20.0 remains separate from package versions and does not advance with Kit. Consume actual published public interfaces for the exact host version and category. Release notes do not replace post-publish verification or formal consumer acceptance. Exit 0 is not an upgrade-safety guarantee or evidence of production validation."
|
|
17
|
+
zh-CN:
|
|
18
|
+
summary: "0.26.0 版本通过既有公共函数 `runHostLoadingCheck` 与 CLI 子动作 `skill-family-kit check host-loading`,扩展对七宿主的共享只读静态加载检查能力。四顶层命令 `scaffold`、`adopt-plan`、`projection`、`check` 保持不变,未新增顶层命令或公共 API。检查不启动宿主、模型、hook 或脚本,不联网、不写文件。"
|
|
19
|
+
changes:
|
|
20
|
+
changed:
|
|
21
|
+
- "新增七宿主共享静态加载检查;精确宿主版本、类别与项目目录见权威 [NATIVE_HOSTS 表](src/host-loading-native.mjs)。该内部表不是包根公共导出。"
|
|
22
|
+
- "**兼容性保留**:Codex CLI 0.154.0 的 `.agents/skills` 项目结构继续支持,其 `activationRules` 机制保持可用。"
|
|
23
|
+
- "**检查逻辑**:各宿主独立执行发现、解析、忽略、名称竞争与局部文件标志判断。Cursor 的菜单、补全与模型元数据三类行为分别报告。"
|
|
24
|
+
- "**证据例外**:仅当 `modelMetadata.*` 字段来自 Cursor CLI 2026.09.10-fd3934a 版本时,允许标注 `source-reviewed-unexecuted`,文字为“源码核实、未作原生运行校准”。该标记不表示原生运行已校准,也不代表本次检查启动宿主。"
|
|
25
|
+
- "**标记语义**:其余 `native-observed` 标记仅表示采用已有原生校准规则,不表示本次检查启动宿主。"
|
|
26
|
+
- "**边界与退出码**: 项目 root 必须为绝对工作目录,CLI 先将相对输入解析为绝对路径。 项目根不存在或不可绑定 → 退出码 2。 项目存在但技能容器缺失、非目录或为空 → 退出码 1。 已证明本地加载阻断 → 退出码 1。 具体未覆盖或未知竞争 → 退出码 2,且优先于 1。 普通完整静态范围无阻断 → 退出码 0;已有正常技能不能掩盖阻断或未覆盖。 Codex 支持原有 `activationRules`;其余七宿主仅接受省略或 `null`,其他值(包括空数组)返回 2。"
|
|
27
|
+
- "**数据边界**:保留链接收容与读取边界。未校准的实际竞争、WorkBuddy 尚未校准的可选元信息或版本来源形态及图标解析、Cursor 补全字符串 `false`、CodeBuddy 未证明等价的块标量等,均按具体未覆盖处理,不猜测成功,也不将所有普通输入永久返回 2。"
|
|
28
|
+
- "**静态通过不等于业务成功**:退出码 0 仅表示静态检查通过,不证明最终启用、安装、更新、会话选择、真实触发或业务执行成功。不得复用 Codex 证据宣称其他宿主已校准。"
|
|
29
|
+
upgradeNotes: "三个 Foundation npm 包(`skill-family-engineering-kit`、`skill-family-contracts`、`skill-family-harness-node`)及独立 Plugin 均需精确锁定至 0.26.0 版本,实现四单元锁步。 Contracts 规格保持 1.20.0,与包版本为独立坐标,不随 Kit 升级。 消费方应按精确宿主版本与类别,使用实际已发布的公共接口。 发布说明不替代发布后验证或正式消费者验收。 退出码 0 不构成升级安全保证,不等同于可安全升级或已通过生产验证。"
|
package/src/cli.mjs
CHANGED
|
@@ -80,9 +80,9 @@ const HELP_TEXT = `skill-family-engineering-kit —— 构建期工程工具包
|
|
|
80
80
|
显式资格子动作: check qualification 仅在显式提供
|
|
81
81
|
capability/request/bindings/native 后适配目录声明的能力特定入口,
|
|
82
82
|
可在预检后调用能力特定的原生宿主。
|
|
83
|
-
宿主加载子动作: check host-loading
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
宿主加载子动作: check host-loading 按已校准宿主版本只读检查所选项目技能容器
|
|
84
|
+
(Codex 0.154.0 的 .agents/skills,以及 Claude/Cursor/Kimi/WorkBuddy/CodeBuddy/Qoder/DSH
|
|
85
|
+
各自精确版本的项目根类别);不启动宿主、模型、hook 或脚本,零写入。
|
|
86
86
|
|
|
87
87
|
全局选项:
|
|
88
88
|
--root <dir> 目标工作区根目录(默认当前目录)
|
|
@@ -193,10 +193,10 @@ function commandHelp(command) {
|
|
|
193
193
|
"",
|
|
194
194
|
"宿主加载子动作: skill-family-kit check host-loading [options]",
|
|
195
195
|
" --root <dir> 绝对或可解析的项目工作目录(默认当前目录)",
|
|
196
|
-
" --host <id> 宿主 id
|
|
197
|
-
" --host-version <ver>
|
|
198
|
-
" --path-category <id>
|
|
199
|
-
" --activation-rules <relpath>
|
|
196
|
+
" --host <id> 宿主 id(codex 或已校准七宿主之一)",
|
|
197
|
+
" --host-version <ver> 精确版本(Codex 0.154.0 或对应已校准原生版本)",
|
|
198
|
+
" --path-category <id> 发现形态(codex-project-skills 或对应已校准项目根类别)",
|
|
199
|
+
" --activation-rules <relpath> 仅 Codex:根内相对 JSON,有序 name XOR path + enabled 规则;其他宿主仅允许省略或 null",
|
|
200
200
|
" --hosts-root <dir> 可选宿主 Profile 根;缺省为包内 bundledHostProfilesRoot()",
|
|
201
201
|
],
|
|
202
202
|
};
|
|
@@ -6,6 +6,13 @@ import {
|
|
|
6
6
|
readFileBound,
|
|
7
7
|
} from "skill-family-harness-node";
|
|
8
8
|
import { bundledHostProfilesRoot, describeHost } from "./host-profiles.mjs";
|
|
9
|
+
import {
|
|
10
|
+
matchNativeHost,
|
|
11
|
+
NATIVE_HOSTS,
|
|
12
|
+
nativeLimitations,
|
|
13
|
+
nativeRuleSources,
|
|
14
|
+
runNativeHostLoadingCheck,
|
|
15
|
+
} from "./host-loading-native.mjs";
|
|
9
16
|
import { KIT_TOOL_NAME, KIT_VERSION } from "./skeleton.mjs";
|
|
10
17
|
|
|
11
18
|
/**
|
|
@@ -56,6 +63,8 @@ const LIMITATIONS = Object.freeze([
|
|
|
56
63
|
"Caller-supplied activationRules are the only enablement input; project-layer config.toml is not read.",
|
|
57
64
|
]);
|
|
58
65
|
|
|
66
|
+
const NATIVE_POLICY = "host loading check is diagnosis only: it reads the selected project skill container through the existing root binding and never writes, spawns, or contacts a network";
|
|
67
|
+
|
|
59
68
|
function uncovered(kind, message, extra = {}) {
|
|
60
69
|
return { class: "host-loading", kind, message, ...extra };
|
|
61
70
|
}
|
|
@@ -815,30 +824,38 @@ function reportDocument({
|
|
|
815
824
|
uncoveredItems,
|
|
816
825
|
nameAmbiguities,
|
|
817
826
|
incomplete,
|
|
827
|
+
coverageExtras,
|
|
828
|
+
limitations,
|
|
829
|
+
policy,
|
|
818
830
|
}) {
|
|
819
831
|
const blocking = findings.length > 0;
|
|
820
832
|
const exitCode = incomplete || uncoveredItems.length > 0 ? 2 : blocking ? 1 : 0;
|
|
833
|
+
const coverage = {
|
|
834
|
+
hostId,
|
|
835
|
+
hostVersion,
|
|
836
|
+
pathCategory,
|
|
837
|
+
root: rootAbs,
|
|
838
|
+
skillsRoot,
|
|
839
|
+
};
|
|
840
|
+
if (coverageExtras && Object.keys(coverageExtras).length > 0) {
|
|
841
|
+
Object.assign(coverage, coverageExtras);
|
|
842
|
+
} else if (!coverageExtras) {
|
|
843
|
+
coverage.officialTag = "rust-v0.154.0";
|
|
844
|
+
coverage.officialCommit = "6b9826e3aa83b1a5947db50f4332cb9c65f1b340";
|
|
845
|
+
}
|
|
821
846
|
return {
|
|
822
847
|
kind: HOST_LOADING_CHECK_REPORT_KIND,
|
|
823
848
|
schemaVersion: 1,
|
|
824
849
|
generatedBy: { tool: KIT_TOOL_NAME, version: KIT_VERSION },
|
|
825
|
-
coverage
|
|
826
|
-
|
|
827
|
-
hostVersion,
|
|
828
|
-
pathCategory,
|
|
829
|
-
root: rootAbs,
|
|
830
|
-
skillsRoot,
|
|
831
|
-
officialTag: "rust-v0.154.0",
|
|
832
|
-
officialCommit: "6b9826e3aa83b1a5947db50f4332cb9c65f1b340",
|
|
833
|
-
},
|
|
834
|
-
limitations: [...LIMITATIONS],
|
|
850
|
+
coverage,
|
|
851
|
+
limitations: [...(limitations ?? LIMITATIONS)],
|
|
835
852
|
skills,
|
|
836
853
|
nameAmbiguities,
|
|
837
854
|
findings,
|
|
838
855
|
uncovered: uncoveredItems,
|
|
839
856
|
ok: exitCode === 0,
|
|
840
857
|
exitCode,
|
|
841
|
-
policy: "host loading check is diagnosis only: it reads SKILL.md and optional agents/openai.yaml under the selected project root and never writes, spawns, or contacts a network",
|
|
858
|
+
policy: policy ?? "host loading check is diagnosis only: it reads SKILL.md and optional agents/openai.yaml under the selected project root and never writes, spawns, or contacts a network",
|
|
842
859
|
};
|
|
843
860
|
}
|
|
844
861
|
|
|
@@ -849,7 +866,11 @@ function incompleteReport({
|
|
|
849
866
|
hostVersion = null,
|
|
850
867
|
pathCategory = null,
|
|
851
868
|
item,
|
|
869
|
+
coverageExtras,
|
|
870
|
+
limitations,
|
|
871
|
+
policy,
|
|
852
872
|
}) {
|
|
873
|
+
const omitCodexSources = hostId !== HOST_LOADING_SUPPORTED_HOST_ID;
|
|
853
874
|
return reportDocument({
|
|
854
875
|
rootAbs,
|
|
855
876
|
skillsRoot,
|
|
@@ -861,6 +882,9 @@ function incompleteReport({
|
|
|
861
882
|
uncoveredItems: [item],
|
|
862
883
|
nameAmbiguities: [],
|
|
863
884
|
incomplete: true,
|
|
885
|
+
coverageExtras: coverageExtras ?? (omitCodexSources ? {} : undefined),
|
|
886
|
+
limitations,
|
|
887
|
+
policy,
|
|
864
888
|
});
|
|
865
889
|
}
|
|
866
890
|
|
|
@@ -914,17 +938,6 @@ export async function runHostLoadingCheck({
|
|
|
914
938
|
});
|
|
915
939
|
}
|
|
916
940
|
const rootAbs = path.normalize(root);
|
|
917
|
-
const normalizedRules = normalizeActivationRules(activationRules, rootAbs);
|
|
918
|
-
if (normalizedRules.incomplete) {
|
|
919
|
-
return incompleteReport({
|
|
920
|
-
rootAbs,
|
|
921
|
-
hostId,
|
|
922
|
-
hostVersion,
|
|
923
|
-
pathCategory,
|
|
924
|
-
item: normalizedRules.incomplete,
|
|
925
|
-
});
|
|
926
|
-
}
|
|
927
|
-
|
|
928
941
|
const selectedHostsRoot = hostsRoot ?? bundledHostProfilesRoot();
|
|
929
942
|
let descriptor;
|
|
930
943
|
try {
|
|
@@ -945,46 +958,123 @@ export async function runHostLoadingCheck({
|
|
|
945
958
|
});
|
|
946
959
|
}
|
|
947
960
|
const canonicalHostId = descriptor.hostId;
|
|
948
|
-
if (canonicalHostId !== HOST_LOADING_SUPPORTED_HOST_ID || hostVersion !== HOST_LOADING_SUPPORTED_HOST_VERSION) {
|
|
949
|
-
return incompleteReport({
|
|
950
|
-
rootAbs,
|
|
951
|
-
hostId: canonicalHostId,
|
|
952
|
-
hostVersion,
|
|
953
|
-
pathCategory,
|
|
954
|
-
item: uncovered("uncalibrated-host", `host ${canonicalHostId}@${hostVersion} is outside the calibrated Codex 0.154.0 slice`),
|
|
955
|
-
});
|
|
956
|
-
}
|
|
957
|
-
if (pathCategory !== HOST_LOADING_SUPPORTED_PATH_CATEGORY) {
|
|
958
|
-
return incompleteReport({
|
|
959
|
-
rootAbs,
|
|
960
|
-
hostId: canonicalHostId,
|
|
961
|
-
hostVersion,
|
|
962
|
-
pathCategory,
|
|
963
|
-
item: uncovered("uncalibrated-path-category", `pathCategory ${pathCategory} is not a calibrated Codex project skill root`),
|
|
964
|
-
});
|
|
965
|
-
}
|
|
966
961
|
const category = (descriptor.pathCategories ?? []).find((item) => item.id === pathCategory);
|
|
967
|
-
|
|
962
|
+
const relPath = path.posix.normalize(String(category?.relPath ?? ""));
|
|
963
|
+
const nativeSpec = category
|
|
964
|
+
? matchNativeHost({ hostId: canonicalHostId, hostVersion, pathCategory, relPath })
|
|
965
|
+
: null;
|
|
966
|
+
const isCodex = canonicalHostId === HOST_LOADING_SUPPORTED_HOST_ID
|
|
967
|
+
&& hostVersion === HOST_LOADING_SUPPORTED_HOST_VERSION
|
|
968
|
+
&& pathCategory === HOST_LOADING_SUPPORTED_PATH_CATEGORY;
|
|
969
|
+
|
|
970
|
+
if (isCodex) {
|
|
971
|
+
const normalizedEarly = normalizeActivationRules(activationRules, rootAbs);
|
|
972
|
+
if (normalizedEarly.incomplete) {
|
|
973
|
+
return incompleteReport({
|
|
974
|
+
rootAbs,
|
|
975
|
+
hostId: canonicalHostId,
|
|
976
|
+
hostVersion,
|
|
977
|
+
pathCategory,
|
|
978
|
+
item: normalizedEarly.incomplete,
|
|
979
|
+
});
|
|
980
|
+
}
|
|
981
|
+
if (!category) {
|
|
982
|
+
return incompleteReport({
|
|
983
|
+
rootAbs,
|
|
984
|
+
hostId: canonicalHostId,
|
|
985
|
+
hostVersion,
|
|
986
|
+
pathCategory,
|
|
987
|
+
item: uncovered("uncalibrated-path-category", `pathCategory ${pathCategory} is not a calibrated Codex project skill root`),
|
|
988
|
+
});
|
|
989
|
+
}
|
|
990
|
+
if (relPath !== HOST_LOADING_SUPPORTED_REL_PATH) {
|
|
991
|
+
return incompleteReport({
|
|
992
|
+
rootAbs,
|
|
993
|
+
hostId: canonicalHostId,
|
|
994
|
+
hostVersion,
|
|
995
|
+
pathCategory,
|
|
996
|
+
item: uncovered(
|
|
997
|
+
"uncalibrated-path-mapping",
|
|
998
|
+
`calibrated pathCategory ${pathCategory} must map to ${HOST_LOADING_SUPPORTED_REL_PATH}`,
|
|
999
|
+
{ relPath },
|
|
1000
|
+
),
|
|
1001
|
+
});
|
|
1002
|
+
}
|
|
1003
|
+
} else if (nativeSpec) {
|
|
1004
|
+
if (activationRules !== undefined && activationRules !== null) {
|
|
1005
|
+
return incompleteReport({
|
|
1006
|
+
rootAbs,
|
|
1007
|
+
hostId: canonicalHostId,
|
|
1008
|
+
hostVersion,
|
|
1009
|
+
pathCategory,
|
|
1010
|
+
item: uncovered(
|
|
1011
|
+
"unsupported-activation-rules",
|
|
1012
|
+
`activationRules are not calibrated for ${canonicalHostId}; only omitted or null are accepted`,
|
|
1013
|
+
),
|
|
1014
|
+
coverageExtras: { ruleSources: nativeRuleSources(canonicalHostId) },
|
|
1015
|
+
limitations: nativeLimitations(canonicalHostId),
|
|
1016
|
+
policy: NATIVE_POLICY,
|
|
1017
|
+
});
|
|
1018
|
+
}
|
|
1019
|
+
} else {
|
|
1020
|
+
const expectedNative = NATIVE_HOSTS[canonicalHostId];
|
|
1021
|
+
if (canonicalHostId === HOST_LOADING_SUPPORTED_HOST_ID) {
|
|
1022
|
+
if (hostVersion !== HOST_LOADING_SUPPORTED_HOST_VERSION) {
|
|
1023
|
+
return incompleteReport({
|
|
1024
|
+
rootAbs,
|
|
1025
|
+
hostId: canonicalHostId,
|
|
1026
|
+
hostVersion,
|
|
1027
|
+
pathCategory,
|
|
1028
|
+
item: uncovered("uncalibrated-host", `host ${canonicalHostId}@${hostVersion} is outside the calibrated Codex 0.154.0 slice`),
|
|
1029
|
+
});
|
|
1030
|
+
}
|
|
1031
|
+
return incompleteReport({
|
|
1032
|
+
rootAbs,
|
|
1033
|
+
hostId: canonicalHostId,
|
|
1034
|
+
hostVersion,
|
|
1035
|
+
pathCategory,
|
|
1036
|
+
item: uncovered("uncalibrated-path-category", `pathCategory ${pathCategory} is not a calibrated Codex project skill root`),
|
|
1037
|
+
});
|
|
1038
|
+
}
|
|
1039
|
+
if (!expectedNative || expectedNative.hostVersion !== hostVersion) {
|
|
1040
|
+
return incompleteReport({
|
|
1041
|
+
rootAbs,
|
|
1042
|
+
hostId: canonicalHostId,
|
|
1043
|
+
hostVersion,
|
|
1044
|
+
pathCategory,
|
|
1045
|
+
item: uncovered("uncalibrated-host", `host ${canonicalHostId}@${hostVersion} is outside the calibrated native slice`),
|
|
1046
|
+
});
|
|
1047
|
+
}
|
|
1048
|
+
if (!category || pathCategory !== expectedNative.pathCategory) {
|
|
1049
|
+
return incompleteReport({
|
|
1050
|
+
rootAbs,
|
|
1051
|
+
hostId: canonicalHostId,
|
|
1052
|
+
hostVersion,
|
|
1053
|
+
pathCategory,
|
|
1054
|
+
item: uncovered("uncalibrated-path-category", `pathCategory ${pathCategory} is not a calibrated project skill root for ${canonicalHostId}`),
|
|
1055
|
+
});
|
|
1056
|
+
}
|
|
968
1057
|
return incompleteReport({
|
|
969
1058
|
rootAbs,
|
|
970
1059
|
hostId: canonicalHostId,
|
|
971
1060
|
hostVersion,
|
|
972
1061
|
pathCategory,
|
|
973
|
-
item: uncovered(
|
|
1062
|
+
item: uncovered(
|
|
1063
|
+
"uncalibrated-path-mapping",
|
|
1064
|
+
`calibrated pathCategory ${pathCategory} must map to ${expectedNative.relPath}`,
|
|
1065
|
+
{ relPath },
|
|
1066
|
+
),
|
|
974
1067
|
});
|
|
975
1068
|
}
|
|
976
|
-
|
|
977
|
-
|
|
1069
|
+
|
|
1070
|
+
const normalizedRules = isCodex ? normalizeActivationRules(activationRules, rootAbs) : { rules: null };
|
|
1071
|
+
if (normalizedRules.incomplete) {
|
|
978
1072
|
return incompleteReport({
|
|
979
1073
|
rootAbs,
|
|
980
1074
|
hostId: canonicalHostId,
|
|
981
1075
|
hostVersion,
|
|
982
1076
|
pathCategory,
|
|
983
|
-
item:
|
|
984
|
-
"uncalibrated-path-mapping",
|
|
985
|
-
`calibrated pathCategory ${pathCategory} must map to ${HOST_LOADING_SUPPORTED_REL_PATH}`,
|
|
986
|
-
{ relPath },
|
|
987
|
-
),
|
|
1077
|
+
item: normalizedRules.incomplete,
|
|
988
1078
|
});
|
|
989
1079
|
}
|
|
990
1080
|
|
|
@@ -1011,7 +1101,15 @@ export async function runHostLoadingCheck({
|
|
|
1011
1101
|
});
|
|
1012
1102
|
}
|
|
1013
1103
|
|
|
1014
|
-
const
|
|
1104
|
+
const selectedRelPath = nativeSpec?.relPath ?? HOST_LOADING_SUPPORTED_REL_PATH;
|
|
1105
|
+
const skillsRoot = path.join(rootAbs, ...selectedRelPath.split("/"));
|
|
1106
|
+
const nativeReportOptions = nativeSpec
|
|
1107
|
+
? {
|
|
1108
|
+
coverageExtras: { ruleSources: nativeRuleSources(canonicalHostId) },
|
|
1109
|
+
limitations: nativeLimitations(canonicalHostId),
|
|
1110
|
+
policy: NATIVE_POLICY,
|
|
1111
|
+
}
|
|
1112
|
+
: {};
|
|
1015
1113
|
let skillsRootStat;
|
|
1016
1114
|
try {
|
|
1017
1115
|
skillsRootStat = await lstat(skillsRoot);
|
|
@@ -1019,9 +1117,10 @@ export async function runHostLoadingCheck({
|
|
|
1019
1117
|
if (cause?.code !== "ENOENT" && cause?.code !== "ENOTDIR") {
|
|
1020
1118
|
return incompleteReport({
|
|
1021
1119
|
rootAbs, skillsRoot, hostId: canonicalHostId, hostVersion, pathCategory,
|
|
1022
|
-
item: uncovered("discovery-root-unreadable",
|
|
1120
|
+
item: uncovered("discovery-root-unreadable", `project ${selectedRelPath} cannot be inspected`, {
|
|
1023
1121
|
causeKind: boundReadKind(cause),
|
|
1024
1122
|
}),
|
|
1123
|
+
...nativeReportOptions,
|
|
1025
1124
|
});
|
|
1026
1125
|
}
|
|
1027
1126
|
return reportDocument({
|
|
@@ -1031,10 +1130,11 @@ export async function runHostLoadingCheck({
|
|
|
1031
1130
|
hostVersion,
|
|
1032
1131
|
pathCategory,
|
|
1033
1132
|
skills: [],
|
|
1034
|
-
findings: [finding("missing-discovery-root",
|
|
1133
|
+
findings: [finding("missing-discovery-root", `project ${selectedRelPath} does not exist`)],
|
|
1035
1134
|
uncoveredItems: [],
|
|
1036
1135
|
nameAmbiguities: [],
|
|
1037
1136
|
incomplete: false,
|
|
1137
|
+
...nativeReportOptions,
|
|
1038
1138
|
});
|
|
1039
1139
|
}
|
|
1040
1140
|
if (skillsRootStat.isSymbolicLink()) {
|
|
@@ -1045,6 +1145,7 @@ export async function runHostLoadingCheck({
|
|
|
1045
1145
|
hostVersion,
|
|
1046
1146
|
pathCategory,
|
|
1047
1147
|
item: uncovered("directory-symlink-unfollowed", "the calibrated skills root is a directory symlink and is not followed"),
|
|
1148
|
+
...nativeReportOptions,
|
|
1048
1149
|
});
|
|
1049
1150
|
}
|
|
1050
1151
|
if (!skillsRootStat.isDirectory()) {
|
|
@@ -1055,10 +1156,35 @@ export async function runHostLoadingCheck({
|
|
|
1055
1156
|
hostVersion,
|
|
1056
1157
|
pathCategory,
|
|
1057
1158
|
skills: [],
|
|
1058
|
-
findings: [finding("missing-discovery-root",
|
|
1159
|
+
findings: [finding("missing-discovery-root", `project ${selectedRelPath} is not a directory`)],
|
|
1059
1160
|
uncoveredItems: [],
|
|
1060
1161
|
nameAmbiguities: [],
|
|
1061
1162
|
incomplete: false,
|
|
1163
|
+
...nativeReportOptions,
|
|
1164
|
+
});
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1167
|
+
if (nativeSpec) {
|
|
1168
|
+
const nativeResult = await runNativeHostLoadingCheck({
|
|
1169
|
+
rootAbs,
|
|
1170
|
+
skillsRootAbs: skillsRoot,
|
|
1171
|
+
hostId: canonicalHostId,
|
|
1172
|
+
rootBinding,
|
|
1173
|
+
});
|
|
1174
|
+
return reportDocument({
|
|
1175
|
+
rootAbs,
|
|
1176
|
+
skillsRoot,
|
|
1177
|
+
hostId: canonicalHostId,
|
|
1178
|
+
hostVersion,
|
|
1179
|
+
pathCategory,
|
|
1180
|
+
skills: nativeResult.skills,
|
|
1181
|
+
findings: nativeResult.findings,
|
|
1182
|
+
uncoveredItems: nativeResult.uncoveredItems,
|
|
1183
|
+
nameAmbiguities: nativeResult.nameAmbiguities,
|
|
1184
|
+
incomplete: nativeResult.uncoveredItems.length > 0,
|
|
1185
|
+
coverageExtras: { ruleSources: nativeResult.ruleSources },
|
|
1186
|
+
limitations: nativeResult.limitations,
|
|
1187
|
+
policy: NATIVE_POLICY,
|
|
1062
1188
|
});
|
|
1063
1189
|
}
|
|
1064
1190
|
|