skill-family-engineering-kit 0.8.0 → 0.8.2

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 CHANGED
@@ -1,5 +1,45 @@
1
1
  # Changelog
2
2
 
3
+ <!-- release-skill:changelog:start version=0.8.2 locale=en baseline=sha256:cebfcfd816f8fd5824135d2681f443e5b226d65096bb6f6a9360f6b3bba34fc1 -->
4
+ ## [0.8.2] - 2026-08-23
5
+
6
+ Managed offline Bundles now carry the strict-read source required by the fixed candidate mechanism bridge.
7
+
8
+ ### Added
9
+
10
+ - Projects strict-read.mjs into the managed Bundle and maps its closure, errors, and paths dependencies to sibling runtime modules.
11
+ - Records the real strict-read.mjs source in Foundation provenance and verifies the read-file-strict bridge in an offline runner.
12
+
13
+ ### Changed
14
+
15
+ - Moves the package version to 0.8.2 together with Contracts and Harness; the four stable top-level Kit commands remain unchanged.
16
+
17
+ ### Upgrade Notes
18
+
19
+ Consumers must pin Contracts, Harness, and Engineering Kit to exactly 0.8.2 and rebuild the managed Bundle. Existing Bundles do not gain read-file-strict by changing a worktree reference.
20
+ <!-- release-skill:changelog:end version=0.8.2 locale=en -->
21
+
22
+
23
+ <!-- release-skill:changelog:start version=0.8.1 locale=en baseline=sha256:e22f9a90f4275671e77a23aeee6ee036ab5c4c5a041a9ed9a144d055ce886da5 -->
24
+ ## [0.8.1] - 2026-08-22
25
+
26
+ Engineering Kit now preserves its own package version when a host bundles it into a single-file adapter.
27
+
28
+ ### Changed
29
+
30
+ - Moves Contracts, Harness, and Engineering Kit together to version 0.8.1; the Contracts 1.7.0 and Profile SPI v3 surfaces remain unchanged.
31
+
32
+ ### Fixed
33
+
34
+ - Replaces the runtime import.meta.url package-manifest lookup with a static JSON import, so source and installed-package execution still read the Kit manifest while esbuild inlines the same version into a host bundle.
35
+ - Adds a regression test that bundles Engineering Kit as a third-party dependency into one host entry file, runs it outside the package tree, and verifies the reported version against the package manifest.
36
+
37
+ ### Upgrade Notes
38
+
39
+ Host adapters that bundle Engineering Kit must pin 0.8.1. Source and ordinary installed-package consumers keep the existing API and require no migration.
40
+ <!-- release-skill:changelog:end version=0.8.1 locale=en -->
41
+
42
+
3
43
  <!-- release-skill:changelog:start version=0.8.0 locale=en baseline=sha256:47377b52339e57d0087ffdff72ba04f88d8dd290f5a6e472fc67eb9a801007db -->
4
44
  ## [0.8.0] - 2026-08-21
5
45
 
@@ -1,5 +1,45 @@
1
1
  # 变更日志
2
2
 
3
+ <!-- release-skill:changelog:start version=0.8.2 locale=zh-CN baseline=sha256:620f03e3fc81c1ef06d23b99fb0e70e547d58f3c6e956691b9c4a05e1b517c3b -->
4
+ ## [0.8.2] - 2026-08-23
5
+
6
+ 受管离线 Bundle 现在携带固定候选机制桥接所需的 strict-read 源码。
7
+
8
+ ### 新增
9
+
10
+ - 把 strict-read.mjs 投影进受管 Bundle,并把它的 closure、errors 和 paths 依赖映射到相邻运行时模块。
11
+ - 在 Foundation provenance 中记录真实 strict-read.mjs 源码,并通过离线 runner 复验 read-file-strict。
12
+
13
+ ### 变更
14
+
15
+ - 包版本与 Contracts、Harness 一同升至 0.8.2;Kit 的四个稳定顶层命令保持不变。
16
+
17
+ ### 升级说明
18
+
19
+ 消费者必须把 Contracts、Harness 和 Engineering Kit 精确锁定到 0.8.2,再重建受管 Bundle。修改工作树引用不会让已有 Bundle 获得 read-file-strict。
20
+ <!-- release-skill:changelog:end version=0.8.2 locale=zh-CN -->
21
+
22
+
23
+ <!-- release-skill:changelog:start version=0.8.1 locale=zh-CN baseline=sha256:67ed1129fc865709a1205d34c82521a6c7a7f6d9a914c0c400c21ad2767a841b -->
24
+ ## [0.8.1] - 2026-08-22
25
+
26
+ 宿主把 Engineering Kit 打包进单文件适配器后,Kit 仍能保留自身的包版本。
27
+
28
+ ### 变更
29
+
30
+ - Contracts、Harness 与 Engineering Kit 一同升至 0.8.1;Contracts 1.7.0 与 Profile SPI v3 表面保持不变。
31
+
32
+ ### 修复
33
+
34
+ - 用静态 JSON import 替换运行时基于 import.meta.url 的包清单查找。源码与普通安装包仍读取 Kit 自身清单,esbuild 则把同一版本值内联到宿主 bundle。
35
+ - 新增回归测试:把 Engineering Kit 作为第三方依赖打包成单一宿主入口,在包目录之外运行,并用包清单复核其报告版本。
36
+
37
+ ### 升级说明
38
+
39
+ 把 Engineering Kit 打包进宿主适配器的消费者必须精确锁定 0.8.1;源码和普通安装包消费者沿用现有 API,不需要迁移。
40
+ <!-- release-skill:changelog:end version=0.8.1 locale=zh-CN -->
41
+
42
+
3
43
  <!-- release-skill:changelog:start version=0.8.0 locale=zh-CN baseline=sha256:0d8fb108ec3e89d5c6b6bea39fc6767a0e1c198546d243d86a963fc5855ed4a9 -->
4
44
  ## [0.8.0] - 2026-08-21
5
45
 
package/README.md CHANGED
@@ -4,24 +4,27 @@
4
4
 
5
5
  # skill-family-engineering-kit
6
6
 
7
- <!-- release-skill:release-version: 0.8.0 -->
7
+ <!-- release-skill:release-version: 0.8.2 -->
8
8
 
9
9
  An engineering toolkit used in development and CI. There are **exactly four** top-level commands, and no fifth:
10
10
 
11
11
  <!-- release-skill:managed:start id=latest-release -->
12
- **0.8.0** (2026-08-21)
12
+ **0.8.2** (2026-08-23)
13
13
 
14
- Profile SPI v3 adds direct verification for scaffolded Project Profiles while descriptor verification remains stable.
14
+ Managed offline Bundles now carry the strict-read source required by the fixed candidate mechanism bridge.
15
15
 
16
16
  **Added**
17
17
 
18
- - Adds verifyProjectProfile({ projectRoot, profileRelPath? }) for skill-family.project-profile declarations.
19
- - Keeps verifyProfile descriptor-only and reuses Contracts-owned adoption and overrides field definitions.
20
- - Adds SPE1008 PROJECT_PROFILE_INVALID; SPE1006 and SPE1007 retain their existing meanings.
18
+ - Projects strict-read.mjs into the managed Bundle and maps its closure, errors, and paths dependencies to sibling runtime modules.
19
+ - Records the real strict-read.mjs source in Foundation provenance and verifies the read-file-strict bridge in an offline runner.
20
+
21
+ **Changed**
22
+
23
+ - Moves the package version to 0.8.2 together with Contracts and Harness; the four stable top-level Kit commands remain unchanged.
21
24
 
22
25
  **Upgrade Notes**
23
26
 
24
- Project-root consumers must pin engineering-kit 0.8.0 and call verifyProjectProfile. Descriptor consumers continue to call verifyProfile; 0.7.0 remains available.
27
+ Consumers must pin Contracts, Harness, and Engineering Kit to exactly 0.8.2 and rebuild the managed Bundle. Existing Bundles do not gain read-file-strict by changing a worktree reference.
25
28
  <!-- release-skill:managed:end id=latest-release -->
26
29
 
27
30
  | Command | Purpose | Side effects |
@@ -42,7 +45,7 @@ Kit is the "engineering stage" layer, depending on the Harness and Contracts. It
42
45
  ## Installation and Minimal Example
43
46
 
44
47
  ```sh
45
- npm install --save-dev skill-family-engineering-kit@0.8.0
48
+ npm install --save-dev skill-family-engineering-kit@0.8.2
46
49
  npm exec -- skill-family-kit --help
47
50
  npm exec -- skill-family-kit scaffold --root <empty-dir> --project-id my-project
48
51
  npm exec -- skill-family-kit adopt-plan --root <repo>
@@ -50,7 +53,7 @@ npm exec -- skill-family-kit projection --root <repo>
50
53
  npm exec -- skill-family-kit check --root <repo>
51
54
  ```
52
55
 
53
- The four commands above cover skeleton generation, read-only inventory, managed projection, and diagnostics respectively; a zero-install form is available via `npm exec --package=skill-family-engineering-kit@0.8.0 -- skill-family-kit --help`.
56
+ The four commands above cover skeleton generation, read-only inventory, managed projection, and diagnostics respectively; a zero-install form is available via `npm exec --package=skill-family-engineering-kit@0.8.2 -- skill-family-kit --help`.
54
57
 
55
58
  ### Public Profile SPI
56
59
 
package/README.zh-CN.md CHANGED
@@ -5,24 +5,27 @@
5
5
 
6
6
  # skill-family-engineering-kit
7
7
 
8
- <!-- release-skill:release-version: 0.8.0 -->
8
+ <!-- release-skill:release-version: 0.8.2 -->
9
9
 
10
10
  开发与 CI 阶段使用的工程工具包。**恰好四个**顶层命令,没有第五个:
11
11
 
12
12
  <!-- release-skill:managed:start id=latest-release -->
13
- **0.8.0** (2026-08-21)
13
+ **0.8.2** (2026-08-23)
14
14
 
15
- Profile SPI v3 新增 scaffold 项目 Profile 的直接校验,descriptor 校验保持兼容。
15
+ 受管离线 Bundle 现在携带固定候选机制桥接所需的 strict-read 源码。
16
16
 
17
17
  **新增**
18
18
 
19
- - 新增 verifyProjectProfile({ projectRoot, profileRelPath? }),用于校验 skill-family.project-profile 声明。
20
- - verifyProfile 继续只校验 descriptor,并复用 Contracts 拥有的 adoption overrides 字段定义。
21
- - 新增 SPE1008 PROJECT_PROFILE_INVALID;SPE1006 与 SPE1007 含义保持不变。
19
+ - strict-read.mjs 投影进受管 Bundle,并把它的 closure、errors paths 依赖映射到相邻运行时模块。
20
+ - Foundation provenance 中记录真实 strict-read.mjs 源码,并通过离线 runner 复验 read-file-strict。
21
+
22
+ **变更**
23
+
24
+ - 包版本与 Contracts、Harness 一同升至 0.8.2;Kit 的四个稳定顶层命令保持不变。
22
25
 
23
26
  **升级说明**
24
27
 
25
- 项目根消费者必须锁定 engineering-kit 0.8.0 并调用 verifyProjectProfile;descriptor 消费者继续调用 verifyProfile,0.7.0 仍可使用。
28
+ 消费者必须把 Contracts、Harness 和 Engineering Kit 精确锁定到 0.8.2,再重建受管 Bundle。修改工作树引用不会让已有 Bundle 获得 read-file-strict。
26
29
  <!-- release-skill:managed:end id=latest-release -->
27
30
 
28
31
  | 命令 | 用途 | 副作用 |
@@ -43,7 +46,7 @@ Kit 是「工程阶段」层,依赖 Harness 与 Contracts。它只做四件事
43
46
  ## 安装和最小示例
44
47
 
45
48
  ```sh
46
- npm install --save-dev skill-family-engineering-kit@0.8.0
49
+ npm install --save-dev skill-family-engineering-kit@0.8.2
47
50
  npm exec -- skill-family-kit --help
48
51
  npm exec -- skill-family-kit scaffold --root <empty-dir> --project-id my-project
49
52
  npm exec -- skill-family-kit adopt-plan --root <repo>
@@ -51,7 +54,7 @@ npm exec -- skill-family-kit projection --root <repo>
51
54
  npm exec -- skill-family-kit check --root <repo>
52
55
  ```
53
56
 
54
- 以上四条命令分别覆盖生成骨架、只读盘点、受管投影与诊断;零安装形式可用 `npm exec --package=skill-family-engineering-kit@0.8.0 -- skill-family-kit --help`。
57
+ 以上四条命令分别覆盖生成骨架、只读盘点、受管投影与诊断;零安装形式可用 `npm exec --package=skill-family-engineering-kit@0.8.2 -- skill-family-kit --help`。
55
58
 
56
59
  ### 公共 Profile SPI
57
60
 
@@ -75,6 +75,13 @@ const HARNESS_IMPORT_MAP = new Map([
75
75
  ["../src/closure.mjs", "./closure.mjs"],
76
76
  ["../src/errors.mjs", "./errors.mjs"],
77
77
  ["../src/paths.mjs", "./paths.mjs"],
78
+ ["../src/strict-read.mjs", "./strict-read.mjs"],
79
+ ]);
80
+
81
+ const HARNESS_STRICT_READ_IMPORT_MAP = new Map([
82
+ ["./closure.mjs", "./closure.mjs"],
83
+ ["./errors.mjs", "./errors.mjs"],
84
+ ["./paths.mjs", "./paths.mjs"],
78
85
  ]);
79
86
 
80
87
  const HARNESS_CLI_IMPORT_MAP = new Map([
@@ -1175,6 +1182,7 @@ export async function buildQuickstartProfileProjection({
1175
1182
  sources.harnessClosure = await readSourceText(harnessRoot, "src/closure.mjs");
1176
1183
  sources.harnessErrors = await readSourceText(harnessRoot, "src/errors.mjs");
1177
1184
  sources.harnessPaths = await readSourceText(harnessRoot, "src/paths.mjs");
1185
+ sources.harnessStrictRead = await readSourceText(harnessRoot, "src/strict-read.mjs");
1178
1186
  sources.harnessAtomic = await readSourceText(harnessRoot, "src/atomic.mjs");
1179
1187
  sources.harnessTokenLock = await readSourceText(harnessRoot, "src/token-lock.mjs");
1180
1188
  // The package manifests are recorded as complete original bytes below, so
@@ -1367,6 +1375,10 @@ export async function buildQuickstartProfileProjection({
1367
1375
  projectModuleWithImportMap(sources.harnessErrors, new Map([["skill-family-contracts", "../contracts/index.mjs"]]), "harness src/errors.mjs"),
1368
1376
  );
1369
1377
  setText("runtime/harness/paths.mjs", projectModuleWithImportMap(sources.harnessPaths, new Map(), "harness src/paths.mjs"));
1378
+ setText(
1379
+ "runtime/harness/strict-read.mjs",
1380
+ projectModuleWithImportMap(sources.harnessStrictRead, HARNESS_STRICT_READ_IMPORT_MAP, "harness src/strict-read.mjs"),
1381
+ );
1370
1382
  setText(
1371
1383
  "runtime/harness/atomic.mjs",
1372
1384
  projectModuleWithImportMap(sources.harnessAtomic, HARNESS_ATOMIC_IMPORT_MAP, "harness src/atomic.mjs"),
@@ -1468,6 +1480,7 @@ export async function buildQuickstartProfileProjection({
1468
1480
  ["packages/skill-family-harness-node/src/closure.mjs", sources.harnessClosure, "projected"],
1469
1481
  ["packages/skill-family-harness-node/src/errors.mjs", sources.harnessErrors, "projected"],
1470
1482
  ["packages/skill-family-harness-node/src/paths.mjs", sources.harnessPaths, "projected"],
1483
+ ["packages/skill-family-harness-node/src/strict-read.mjs", sources.harnessStrictRead, "projected"],
1471
1484
  ["packages/skill-family-harness-node/src/atomic.mjs", sources.harnessAtomic, "projected"],
1472
1485
  ["packages/skill-family-harness-node/src/token-lock.mjs", sources.harnessTokenLock, "projected"],
1473
1486
  ["packages/skill-family-engineering-kit/package.json", kitPackageJsonText, "identity"],
@@ -1956,37 +1956,42 @@
1956
1956
  },
1957
1957
  {
1958
1958
  "id": "foundation.harness.quickstart-profile-candidate",
1959
- "intent": "Construct and verify an observation-bound candidate Task/Result exchange through skill-family-harness-node/candidate/quickstart-profile.",
1959
+ "intent": "Construct and verify a candidate Task/Result exchange and call registered generic mechanisms through the fixed skill-family-harness-node/candidate/quickstart-profile bridge.",
1960
1960
  "useWhen": [
1961
1961
  "Need an early integration trial that binds a contained observation file to a candidate Task and terminal Result",
1962
- "Need a structured non-throwing verification result for an exact-version candidate exchange"
1962
+ "Need a structured non-throwing verification result for an exact-version candidate exchange",
1963
+ "A host cannot import several Foundation modules directly and needs read-file-strict for a frozen authority file"
1963
1964
  ],
1964
1965
  "doNotUseWhen": [
1965
1966
  "Need a domain auditor, method selector, retry orchestrator, or lifecycle owner",
1966
1967
  "Need a compatibility-frozen Quickstart API"
1967
1968
  ],
1968
1969
  "prerequisites": [
1969
- "Install exact matching versions of skill-family-harness-node and skill-family-contracts",
1970
- "The observation path is contained under the supplied root"
1970
+ "Pin skill-family-contracts, skill-family-harness-node, and skill-family-engineering-kit to exactly 0.8.2 and rebuild the managed Bundle",
1971
+ "Observation and read-file-strict paths are contained under the caller-supplied root"
1971
1972
  ],
1972
1973
  "inputs": [
1973
1974
  "Contained root and observation path",
1974
1975
  "Operation identity, method, parameters, and run/stage/attempt correlation",
1975
- "Candidate Task and Result documents for verification"
1976
+ "Candidate Task and Result documents for verification",
1977
+ "A read-file-strict request with closed root, path, encoding?, and expectedSha256? parameters"
1976
1978
  ],
1977
1979
  "outputs": [
1978
- "Observation Resource, candidate Task, terminal Result, or structured exchange verification"
1980
+ "Observation Resource, candidate Task, terminal Result, or structured exchange verification",
1981
+ "A read-file-strict receipt with UTF-8 content as a string or binary content in the standard Buffer JSON shape"
1979
1982
  ],
1980
1983
  "sideEffects": [
1981
- "Reads the contained observation file to compute or verify its sha256 digest",
1984
+ "Reads a contained observation or authority file to compute or verify its sha256 digest",
1982
1985
  "Does not write files or access Git or the network"
1983
1986
  ],
1984
1987
  "failureSemantics": [
1985
1988
  "Throwing APIs fail closed with SFC2004 and details.kind=invalid-result when the profile or binding is invalid",
1986
- "verifyQuickstartExchange converts a failure into {valid:false, code, message, details}"
1989
+ "verifyQuickstartExchange converts a failure into {valid:false, code, message, details}",
1990
+ "Direct read-file-strict calls retain core SFC2004 details.kind failures; the JSON CLI promises only exit codes 0/2 and name/message errors"
1987
1991
  ],
1988
1992
  "invariants": [
1989
1993
  "The Result must bind the exact Task digest, real Resource bytes, globally unique Resource ids, operation identity, correlation fields, and the complete evidence-binding set",
1994
+ "read-file-strict only forwards to the existing readFileStrict implementation; it copies no path, read, or digest algorithm and accepts no arbitrary function name",
1990
1995
  "Stability is candidate: a later minor release may change or remove this subpath"
1991
1996
  ],
1992
1997
  "ownedByCaller": [
@@ -2010,7 +2015,7 @@
2010
2015
  "Need to bypass target manifest authorization or handwritten-file protection"
2011
2016
  ],
2012
2017
  "prerequisites": [
2013
- "Install exact matching 0.3.0 versions of all three Foundation packages",
2018
+ "Install exact matching 0.8.2 versions of all three Foundation packages",
2014
2019
  "The target prefix is a contained relative POSIX path"
2015
2020
  ],
2016
2021
  "inputs": [
@@ -2019,7 +2024,8 @@
2019
2024
  "Exact installed Contracts, Harness, and Kit package bytes"
2020
2025
  ],
2021
2026
  "outputs": [
2022
- "A projection manifest and provenance record with Foundation sources, consumer schemas, payload digests, tool versions, and licenses"
2027
+ "A projection manifest and provenance record with Foundation sources, consumer schemas, payload digests, tool versions, and licenses",
2028
+ "An offline runner carrying strict-read source and provenance, with the fixed read-file-strict operation"
2023
2029
  ],
2024
2030
  "sideEffects": [
2025
2031
  "Builds the manifest in memory and reads installed package plus explicit consumer-schema files",
@@ -2031,6 +2037,7 @@
2031
2037
  ],
2032
2038
  "invariants": [
2033
2039
  "The Bundle contains no node_modules or runtime Ajv and runs without installed Foundation packages or network access",
2040
+ "The managed Bundle is rebuilt from installed 0.8.2 package bytes and never imports source from a Foundation worktree",
2034
2041
  "The helper adds no top-level Kit command and never bypasses runProjection",
2035
2042
  "Stability is candidate: a later minor release may change or remove this subpath"
2036
2043
  ],
@@ -1202,10 +1202,11 @@
1202
1202
  "since": "0.2.1",
1203
1203
  "stability": "candidate",
1204
1204
  "entrypoints": [
1205
- "skill-family-harness-node/candidate/quickstart-profile: createObservationResource, verifyResourceBytes, verifyObservationResource, createQuickstartTask, wrapQuickstartResult, assertQuickstartExchange, verifyQuickstartExchange, canonicalJson, computeResourceClosure, digestBytes, digestDocument (packages/skill-family-harness-node/candidate/quickstart-profile.mjs)"
1205
+ "skill-family-harness-node/candidate/quickstart-profile: createObservationResource, verifyResourceBytes, verifyObservationResource, createQuickstartTask, wrapQuickstartResult, assertQuickstartExchange, verifyQuickstartExchange, invokeFoundationMechanism[read-file-strict], canonicalJson, computeResourceClosure, digestBytes, digestDocument (packages/skill-family-harness-node/candidate/quickstart-profile.mjs)"
1206
1206
  ],
1207
1207
  "sourceRefs": [
1208
- "packages/skill-family-harness-node/candidate/quickstart-profile.mjs"
1208
+ "packages/skill-family-harness-node/candidate/quickstart-profile.mjs",
1209
+ "packages/skill-family-harness-node/src/strict-read.mjs"
1209
1210
  ],
1210
1211
  "positiveTestRefs": [
1211
1212
  "packages/skill-family-harness-node/test/quickstart-profile.test.mjs"
@@ -1956,37 +1956,42 @@
1956
1956
  },
1957
1957
  {
1958
1958
  "id": "foundation.harness.quickstart-profile-candidate",
1959
- "intent": "通过 skill-family-harness-node/candidate/quickstart-profile 构造并复验绑定 observation 的候选 Task/Result 交换",
1959
+ "intent": "通过 skill-family-harness-node/candidate/quickstart-profile 构造并复验候选 Task/Result 交换,并通过固定机制桥接调用已登记的通用机制",
1960
1960
  "useWhen": [
1961
1961
  "需要开展早期接入试验,把受收容的 observation 文件绑定到候选 Task 与终态 Result",
1962
- "需要为锁定精确版本的候选交换取得结构化、不抛出的复验结果"
1962
+ "需要为锁定精确版本的候选交换取得结构化、不抛出的复验结果",
1963
+ "宿主不能直接导入多个 Foundation 模块,需要通过 read-file-strict 读取冻结权威文件"
1963
1964
  ],
1964
1965
  "doNotUseWhen": [
1965
1966
  "需要领域审计器、method 选择器、重试编排或生命周期所有者",
1966
1967
  "需要兼容性已冻结的 Quickstart API"
1967
1968
  ],
1968
1969
  "prerequisites": [
1969
- "安装精确匹配的 skill-family-harness-node 与 skill-family-contracts 版本",
1970
- "observation 路径受 supplied root 收容"
1970
+ " skill-family-contracts、skill-family-harness-node 与 skill-family-engineering-kit 精确锁定到 0.8.2,并重建受管 Bundle",
1971
+ "observation 路径与 read-file-strict 路径受调用方提供的 root 收容"
1971
1972
  ],
1972
1973
  "inputs": [
1973
1974
  "受收容根与 observation 路径",
1974
1975
  "operation 身份、method、parameters 与 run/stage/attempt correlation",
1975
- "待复验的候选 Task 与 Result 文档"
1976
+ "待复验的候选 Task 与 Result 文档",
1977
+ "read-file-strict 请求:闭合的 root、path、encoding? 与 expectedSha256? 参数"
1976
1978
  ],
1977
1979
  "outputs": [
1978
- "Observation Resource、候选 Task、终态 Result 或结构化交换复验结果"
1980
+ "Observation Resource、候选 Task、终态 Result 或结构化交换复验结果",
1981
+ "read-file-strict 回执;UTF-8 内容为字符串,二进制内容为标准 Buffer JSON 形态"
1979
1982
  ],
1980
1983
  "sideEffects": [
1981
- "读取受收容的 observation 文件,以计算或复验 sha256 摘要",
1984
+ "读取受收容的 observation 或权威文件,以计算或复验 sha256 摘要",
1982
1985
  "不写文件,不访问 Git 或网络"
1983
1986
  ],
1984
1987
  "failureSemantics": [
1985
1988
  "Profile 或绑定无效时,抛出式 API 以 SFC2004 与 details.kind=invalid-result 失败关闭",
1986
- "verifyQuickstartExchange 把失败转成 {valid:false, code, message, details}"
1989
+ "verifyQuickstartExchange 把失败转成 {valid:false, code, message, details}",
1990
+ "read-file-strict 直接调用沿用核心 SFC2004 与 details.kind;JSON CLI 只承诺退出码 0/2 和 name/message 错误形态"
1987
1991
  ],
1988
1992
  "invariants": [
1989
1993
  "Result 必须绑定精确 Task 摘要、真实 Resource 字节、全局唯一 Resource id、operation 身份、correlation 字段与完整 evidence binding 集合",
1994
+ "read-file-strict 只转发既有 readFileStrict,不复制路径、读取或摘要算法,也不接受任意函数名",
1990
1995
  "稳定性为 candidate:后续小版本可以修改或移除该子路径"
1991
1996
  ],
1992
1997
  "ownedByCaller": [
@@ -2010,7 +2015,7 @@
2010
2015
  "需要绕过目标 manifest 授权或手写文件保护"
2011
2016
  ],
2012
2017
  "prerequisites": [
2013
- "安装精确匹配的三个 Foundation 0.3.0 包版本",
2018
+ "安装精确匹配的三个 Foundation 0.8.2 包版本",
2014
2019
  "targetPrefix 是受收容的 POSIX 相对路径"
2015
2020
  ],
2016
2021
  "inputs": [
@@ -2019,7 +2024,8 @@
2019
2024
  "已安装 Contracts、Harness 与 Kit 的精确包字节"
2020
2025
  ],
2021
2026
  "outputs": [
2022
- "投影 manifest 与 provenance 记录,包含 Foundation 来源、消费者 Schema、payload 摘要、工具版本与许可证"
2027
+ "投影 manifest 与 provenance 记录,包含 Foundation 来源、消费者 Schema、payload 摘要、工具版本与许可证",
2028
+ "携带 strict-read 源码和 provenance 的离线 runner,可调用固定 read-file-strict"
2023
2029
  ],
2024
2030
  "sideEffects": [
2025
2031
  "在内存中构建 manifest,并读取已安装包文件与显式消费者 Schema 文件",
@@ -2031,6 +2037,7 @@
2031
2037
  ],
2032
2038
  "invariants": [
2033
2039
  "Bundle 不含 node_modules 或运行时 Ajv,不依赖已安装 Foundation 包或网络",
2040
+ "受管 Bundle 从 0.8.2 的已安装包字节重建,不从 Foundation 工作树导入源码",
2034
2041
  "辅助函数不增加 Kit 顶层命令,也不绕过 runProjection",
2035
2042
  "稳定性为 candidate:后续小版本可以修改或移除该子路径"
2036
2043
  ],
@@ -1792,17 +1792,17 @@
1792
1792
  <tbody>
1793
1793
  <tr>
1794
1794
  <td><code>skill-family-contracts</code></td>
1795
- <td>0.8.0</td>
1795
+ <td>0.8.2</td>
1796
1796
  <td><a href="https://github.com/ifoohoo/skill-family-contracts">ifoohoo/skill-family-contracts</a></td>
1797
1797
  </tr>
1798
1798
  <tr>
1799
1799
  <td><code>skill-family-harness-node</code></td>
1800
- <td>0.8.0</td>
1800
+ <td>0.8.2</td>
1801
1801
  <td><a href="https://github.com/ifoohoo/skill-family-harness-node">ifoohoo/skill-family-harness-node</a></td>
1802
1802
  </tr>
1803
1803
  <tr>
1804
1804
  <td><code>skill-family-engineering-kit</code></td>
1805
- <td>0.8.0</td>
1805
+ <td>0.8.2</td>
1806
1806
  <td><a href="https://github.com/ifoohoo/skill-family-engineering-kit">ifoohoo/skill-family-engineering-kit</a></td>
1807
1807
  </tr>
1808
1808
  </tbody>
@@ -748,6 +748,34 @@
748
748
  </ul>
749
749
  </nav>
750
750
 
751
+ </li>
752
+
753
+ <li class="md-nav__item">
754
+ <a href="#严格读取-foundationharnessstrict-read" class="md-nav__link">
755
+ <span class="md-ellipsis">
756
+
757
+ 严格读取 (foundation.harness.strict-read)
758
+
759
+ </span>
760
+ </a>
761
+
762
+ <nav class="md-nav" aria-label="严格读取 (foundation.harness.strict-read)">
763
+ <ul class="md-nav__list">
764
+
765
+ <li class="md-nav__item">
766
+ <a href="#readFileStrict" class="md-nav__link">
767
+ <span class="md-ellipsis">
768
+
769
+ readFileStrict
770
+
771
+ </span>
772
+ </a>
773
+
774
+ </li>
775
+
776
+ </ul>
777
+ </nav>
778
+
751
779
  </li>
752
780
 
753
781
  <li class="md-nav__item">
@@ -1145,6 +1173,23 @@
1145
1173
  </span>
1146
1174
  </a>
1147
1175
 
1176
+ <nav class="md-nav" aria-label="Quickstart Profile v2 candidate">
1177
+ <ul class="md-nav__list">
1178
+
1179
+ <li class="md-nav__item">
1180
+ <a href="#invokeFoundationMechanism" class="md-nav__link">
1181
+ <span class="md-ellipsis">
1182
+
1183
+ invokeFoundationMechanism
1184
+
1185
+ </span>
1186
+ </a>
1187
+
1188
+ </li>
1189
+
1190
+ </ul>
1191
+ </nav>
1192
+
1148
1193
  </li>
1149
1194
 
1150
1195
  <li class="md-nav__item">
@@ -2191,6 +2236,34 @@
2191
2236
  </ul>
2192
2237
  </nav>
2193
2238
 
2239
+ </li>
2240
+
2241
+ <li class="md-nav__item">
2242
+ <a href="#严格读取-foundationharnessstrict-read" class="md-nav__link">
2243
+ <span class="md-ellipsis">
2244
+
2245
+ 严格读取 (foundation.harness.strict-read)
2246
+
2247
+ </span>
2248
+ </a>
2249
+
2250
+ <nav class="md-nav" aria-label="严格读取 (foundation.harness.strict-read)">
2251
+ <ul class="md-nav__list">
2252
+
2253
+ <li class="md-nav__item">
2254
+ <a href="#readFileStrict" class="md-nav__link">
2255
+ <span class="md-ellipsis">
2256
+
2257
+ readFileStrict
2258
+
2259
+ </span>
2260
+ </a>
2261
+
2262
+ </li>
2263
+
2264
+ </ul>
2265
+ </nav>
2266
+
2194
2267
  </li>
2195
2268
 
2196
2269
  <li class="md-nav__item">
@@ -2588,6 +2661,23 @@
2588
2661
  </span>
2589
2662
  </a>
2590
2663
 
2664
+ <nav class="md-nav" aria-label="Quickstart Profile v2 candidate">
2665
+ <ul class="md-nav__list">
2666
+
2667
+ <li class="md-nav__item">
2668
+ <a href="#invokeFoundationMechanism" class="md-nav__link">
2669
+ <span class="md-ellipsis">
2670
+
2671
+ invokeFoundationMechanism
2672
+
2673
+ </span>
2674
+ </a>
2675
+
2676
+ </li>
2677
+
2678
+ </ul>
2679
+ </nav>
2680
+
2591
2681
  </li>
2592
2682
 
2593
2683
  <li class="md-nav__item">
@@ -2620,11 +2710,12 @@
2620
2710
 
2621
2711
  <h1 id="skill-family-harness-node-公共-API-参考">skill-family-harness-node 公共 API 参考<a class="headerlink" href="#skill-family-harness-node-公共-API-参考" title="Permanent link">&para;</a></h1>
2622
2712
  <p>本页从真实导出(<code>src/index.mjs</code> 与各源模块)核对,不手写无法证明新鲜度的全集。每个公共入口按 hand-off §4.3 说明:签名、输入与输出、是否纯函数、文件/进程/Git/网络副作用、稳定错误码与 <code>details.kind</code>、前置条件与信任锚、<code>since</code> 与 <code>stability</code>、源文件与正例/负例测试、调用方仍拥有的业务语义。</p>
2623
- <p>Harness 是薄运行时:消费 Contracts,只实现业务中立机制;不拥有业务语义、编排、Git、网络与第二语言。包级常量:<code>HARNESS_CAPABILITIES</code>(19 项能力,闭集)、<code>HARNESS_EXCLUSIONS</code>(明确排除 <code>business-semantics</code> / <code>workflow-orchestration</code> / <code>git-writes</code> / <code>model-calls</code> / <code>release-state</code> / <code>remote-network-access</code>)。</p>
2713
+ <p>Harness 是薄运行时:消费 Contracts,只实现业务中立机制;不拥有业务语义、编排、Git、网络与第二语言。包级常量:<code>HARNESS_CAPABILITIES</code>(21 项能力,闭集)、<code>HARNESS_EXCLUSIONS</code>(明确排除 <code>business-semantics</code> / <code>workflow-orchestration</code> / <code>git-writes</code> / <code>model-calls</code> / <code>release-state</code> / <code>remote-network-access</code>)。</p>
2624
2714
  <p>能力分组(与 <code>docs/agents/capability-catalog.json</code> 对应):</p>
2625
2715
  <ul>
2626
2716
  <li><a href="#契约校验-foundationharnesscontract-validation">契约校验</a> → <code>validateContractDocument</code> / <code>getValidator</code></li>
2627
2717
  <li><a href="#路径收容-foundationharnesspath-containment">路径收容</a> → <code>classifyPathInput</code> / <code>resolveContained</code> / <code>readFileContained</code></li>
2718
+ <li><a href="#严格读取-foundationharnessstrict-read">严格读取</a> → <code>readFileStrict</code></li>
2628
2719
  <li><a href="#原子写-foundationharnessatomic-write">原子写</a> → <code>writeFileAtomic</code></li>
2629
2720
  <li><a href="#临时工作区-foundationharnesstemporary-workspace">临时工作区</a> → <code>TemporaryWorkspace</code> / <code>withTemporaryWorkspace</code></li>
2630
2721
  <li><a href="#资源闭包-foundationharnessresource-closure">资源闭包</a> → <code>computeResourceClosure</code> / <code>digestBytes</code> / <code>closureContains</code></li>
@@ -2679,6 +2770,23 @@
2679
2770
  <li>调用方仍拥有的业务语义:哪些路径是业务允许的选择规则(业务选择语义留在调用方)。</li>
2680
2771
  </ul>
2681
2772
  <hr />
2773
+ <h2 id="严格读取-foundationharnessstrict-read">严格读取 (foundation.harness.strict-read)<a class="headerlink" href="#严格读取-foundationharnessstrict-read" title="Permanent link">&para;</a></h2>
2774
+ <h3 id="readFileStrict">readFileStrict<a class="headerlink" href="#readFileStrict" title="Permanent link">&para;</a></h3>
2775
+ <ul>
2776
+ <li>签名:<code>readFileStrict(root, relPath, { encoding?, expectedSha256? } = {})</code>(async)。</li>
2777
+ <li>输入:收容根目录、相对文件路径,可选的 <code>utf8</code> 编码与小写 sha256 预期摘要。</li>
2778
+ <li>输出:冻结回执 <code>{ path, content, sha256, bytes, mode }</code>。指定 <code>utf8</code> 时,<code>content</code> 是字符串;省略编码时,<code>content</code> 是 <code>Buffer</code>。</li>
2779
+ <li>纯函数:否,函数只读一个受收容的普通文件。</li>
2780
+ <li>副作用:执行 <code>lstat</code>、<code>open</code>、<code>read</code> 与文件身份复核;不写文件,不访问 Git 或网络。</li>
2781
+ <li>稳定错误码与 <code>details.kind</code>:失败使用 <code>SFC2004</code>。缺失文件返回 <code>missing-resource</code>,摘要不符返回 <code>content-guard-rejected</code>,目录返回 <code>read-failed</code>,越界路径沿用路径收容的失败种类。</li>
2782
+ <li>符号链接边界:叶节点符号链接始终拒绝。祖先目录可以是指向根内目录的符号链接;其规范路径仍须受 <code>root</code> 收容。</li>
2783
+ <li>前置条件与信任锚:<code>expectedSha256</code> 的来源与信任由调用方负责;摘要只覆盖实际读到的字节。</li>
2784
+ <li><code>since</code> / <code>stability</code>:<code>0.6.0</code> / <code>stable</code>。</li>
2785
+ <li>源文件:<code>packages/skill-family-harness-node/src/strict-read.mjs</code>。</li>
2786
+ <li>正例/负例测试:<code>packages/skill-family-harness-node/test/strict-read.test.mjs</code>。</li>
2787
+ <li>调用方仍拥有的业务语义:选择哪个权威文件、摘要从何而来,以及读取失败后的处置。</li>
2788
+ </ul>
2789
+ <hr />
2682
2790
  <h2 id="原子写-foundationharnessatomic-write">原子写 (foundation.harness.atomic-write)<a class="headerlink" href="#原子写-foundationharnessatomic-write" title="Permanent link">&para;</a></h2>
2683
2791
  <h3 id="writeFileAtomic">writeFileAtomic<a class="headerlink" href="#writeFileAtomic" title="Permanent link">&para;</a></h3>
2684
2792
  <ul>
@@ -3043,7 +3151,22 @@
3043
3151
  <hr />
3044
3152
  <h2 id="Quickstart-Profile-v2-candidate">Quickstart Profile v2 candidate<a class="headerlink" href="#Quickstart-Profile-v2-candidate" title="Permanent link">&para;</a></h2>
3045
3153
  <p><code>skill-family-harness-node/candidate/quickstart-profile</code> 负责创建 observation Resource、Task 与终态 Result,并复验真实文件字节、Resource id 全局唯一性、Task digest、operation 身份、逐字段 <code>run/stage/attempt</code> 以及 evidence 精确回指。<code>verifyQuickstartExchange</code> 把机制拒绝转换成结构化结果,抛出式入口继续使用已登记的 <code>SFC2004</code> 与稳定 <code>details.kind</code>。</p>
3046
- <p>该入口不选择 method,不解释 domainResult,也不拥有重试、调度或生命周期。0.3.0 v2 与 0.2.1 的 v1 不兼容;接入必须精确锁定所选版本。</p>
3154
+ <h3 id="invokeFoundationMechanism">invokeFoundationMechanism<a class="headerlink" href="#invokeFoundationMechanism" title="Permanent link">&para;</a></h3>
3155
+ <p><code>invokeFoundationMechanism(request)</code> 是固定机制桥接。调用方只能选择预先登记的 operation,不能传入模块名、导出名或任意函数。0.8.2 新增的 <code>read-file-strict</code> 直接调用上文的 <code>readFileStrict</code>:</p>
3156
+ <pre><code class="language-json">{
3157
+ &quot;operation&quot;: &quot;read-file-strict&quot;,
3158
+ &quot;params&quot;: {
3159
+ &quot;root&quot;: &quot;/absolute/consumer-root&quot;,
3160
+ &quot;path&quot;: &quot;authority/frozen.json&quot;,
3161
+ &quot;encoding&quot;: &quot;utf8&quot;,
3162
+ &quot;expectedSha256&quot;: &quot;&lt;lowercase-sha256&gt;&quot;
3163
+ }
3164
+ }
3165
+ </code></pre>
3166
+ <p><code>params</code> 是闭合对象。<code>root</code> 与 <code>path</code> 是必填非空字符串;<code>encoding</code> 只能是 <code>utf8</code> 或省略;<code>expectedSha256</code> 省略时不做预期摘要比对,提供时沿用核心严格读取合同。</p>
3167
+ <p>桥接保留核心回执的 <code>path</code>、<code>sha256</code>、<code>bytes</code> 与 <code>mode</code>。UTF-8 内容仍是字符串;二进制内容投影成 Node 标准的 Buffer JSON 形态 <code>{ "type": "Buffer", "data": [...] }</code>,以便通过 JSON 传输后无损还原字节。</p>
3168
+ <p>直接调用失败时沿用核心异常,包括 <code>SFC2004</code> 与 <code>details.kind</code>。候选 <code>mechanisms-cli.mjs</code> 继续使用一请求一响应 JSON:成功退出 0,拒绝或用法错误退出 2;CLI 错误 JSON 只承诺 <code>name</code> 与 <code>message</code>,不承诺跨语言保留 <code>details</code>。</p>
3169
+ <p>该入口不选择 method,不解释 domainResult,也不拥有重试、调度或生命周期。消费者必须把 Contracts、Harness 与 Engineering Kit 精确锁定到 0.8.2,并重建受管 Bundle;禁止从 Foundation 工作树导入候选源码。0.3.0 的 v2 与 0.2.1 的 v1 不兼容。</p>
3047
3170
  <hr />
3048
3171
  <h2 id="与机器事实层的互链">与机器事实层的互链<a class="headerlink" href="#与机器事实层的互链" title="Permanent link">&para;</a></h2>
3049
3172
  <ul>