skill-family-engineering-kit 0.2.1 → 0.4.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.
Files changed (41) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/CHANGELOG.zh-CN.md +43 -0
  3. package/README.md +14 -12
  4. package/README.zh-CN.md +14 -12
  5. package/candidate/adoption-cli.mjs +67 -0
  6. package/candidate/adoption-mechanisms.mjs +69 -0
  7. package/candidate/index.mjs +3 -0
  8. package/candidate/profile-bundle.mjs +1503 -172
  9. package/candidate/projection-bundle-cli.mjs +74 -14
  10. package/candidate/skill-naming-cli.mjs +59 -0
  11. package/candidate/skill-naming-policy.json +46 -0
  12. package/candidate/skill-naming.mjs +280 -0
  13. package/docs/agents/capability-catalog.en.json +1746 -1559
  14. package/docs/agents/capability-catalog.json +1029 -929
  15. package/docs/agents/capability-catalog.zh-CN.json +1746 -1559
  16. package/docs/architecture/index.html +10 -3
  17. package/docs/en/architecture/index.html +12 -3
  18. package/docs/en/migration/index.html +4 -3
  19. package/docs/en/recipes/adopt-existing-repository/index.html +2 -1
  20. package/docs/en/recipes/domain-schema-validation/index.html +3 -1
  21. package/docs/en/recipes/index.html +2 -1
  22. package/docs/en/reference/api/index.html +24 -0
  23. package/docs/en/reference/compatibility/index.html +51 -5
  24. package/docs/migration/index.html +4 -3
  25. package/docs/public/status/index.html +3 -3
  26. package/docs/recipes/adopt-existing-repository/index.html +2 -1
  27. package/docs/recipes/domain-schema-validation/index.html +3 -1
  28. package/docs/recipes/index.html +2 -1
  29. package/docs/reference/api/contracts/index.html +26 -0
  30. package/docs/reference/api/engineering-kit/index.html +26 -0
  31. package/docs/reference/api/harness/index.html +423 -2
  32. package/docs/reference/api/index.html +25 -1
  33. package/docs/reference/compatibility/index.html +51 -5
  34. package/docs/search/search_index.json +1 -1
  35. package/package.json +5 -4
  36. package/release-notes/0.3.0.yaml +25 -0
  37. package/release-notes/0.4.0.yaml +23 -0
  38. package/src/adopt-plan.mjs +26 -1
  39. package/src/index.mjs +5 -2
  40. package/src/migration.mjs +121 -1
  41. package/src/projection.mjs +1152 -266
package/CHANGELOG.md CHANGED
@@ -1,5 +1,48 @@
1
1
  # Changelog
2
2
 
3
+ <!-- release-skill:changelog:start version=0.4.0 locale=en baseline=sha256:b75bcca6a62cddc63d0a8d88faf268415aec803bcf00e04aacd797907d1ea6e8 -->
4
+ ## [0.4.0] - 2026-08-16
5
+
6
+ This release adds the candidate adoption CLI and adoption mechanisms to the Engineering Kit while preserving the stable four-command surface and the 0.3.0 offline bundle.
7
+
8
+ ### Added
9
+
10
+ - Adds the adoption-cli candidate, a stdin/stdout CLI that assesses adoption bindings, legacy exit lists, and legacy references through the migration manifest, and verifies managed-bundle identity and harness surface inventory.
11
+ - Adds the adoption-mechanisms candidate module as the shared implementation behind the adoption CLI.
12
+
13
+ ### Changed
14
+
15
+ - Keeps the stable scaffold, adopt-plan, projection, and check commands unchanged.
16
+ - Carries forward the 0.3.0 Quickstart Profile v2 offline bundle (standalone validators selected by schema $id, full provenance recording) and the candidate plugin skill naming checker.
17
+
18
+ ### Upgrade Notes
19
+
20
+ Version 0.4.0 is released on npm and the public mirror. The adoption CLI is a candidate entry point; invoke it through its explicit candidate subpath and pin the package to exactly 0.4.0.
21
+ <!-- release-skill:changelog:end version=0.4.0 locale=en -->
22
+
23
+
24
+ <!-- release-skill:changelog:start version=0.3.0 locale=en baseline=sha256:4c017d6121ff888f90ad9a4ef958b4fee3e25c8d1b69be61cc1ba1f79d527163 -->
25
+ ## [0.3.0] - 2026-08-12
26
+
27
+ This source candidate builds a deterministic Quickstart Profile v2 bundle that runs offline without Foundation packages, node_modules, or runtime Ajv.
28
+
29
+ ### Added
30
+
31
+ - Accepts explicit consumer schema files and source identity, then generates standalone validators selected by schema $id.
32
+ - Records complete source and payload provenance, package-manager identity, and the licenses for third-party code that enters the bundle.
33
+ - Adds a candidate plugin skill naming checker (policy JSON plus build-time CLI) that scans a plugin skills root and reports per-rule PASS/FAIL for the prefixed-name, description-signal, and routing-scope rules.
34
+
35
+ ### Changed
36
+
37
+ - Replaces the incompatible 0.2.1 dependency-closure bundle; consumers that still require v1 must remain pinned to exactly 0.2.1.
38
+ - Projects the Contracts and Harness runtime mechanically while preserving the stable four-command Kit surface.
39
+
40
+ ### Upgrade Notes
41
+
42
+ Version 0.3.0 is a local, unpublished source candidate. Regenerate managed bundles from frozen inputs and pin the builder to exactly 0.3.0 when adopting v2.
43
+ <!-- release-skill:changelog:end version=0.3.0 locale=en -->
44
+
45
+
3
46
  <!-- release-skill:changelog:start version=0.2.1 locale=en baseline=sha256:3457c97a9a2f25fd233a1947dcd9c88fb40279e90ae5b437bea1f7660ac6ce60 -->
4
47
  ## [0.2.1] - 2026-08-10
5
48
 
@@ -1,5 +1,48 @@
1
1
  # 变更日志
2
2
 
3
+ <!-- release-skill:changelog:start version=0.4.0 locale=zh-CN baseline=sha256:0305934fb2f833eff10b17014f551533bfca9e9e51d3820a5a1e62613a3edb6a -->
4
+ ## [0.4.0] - 2026-08-16
5
+
6
+ 本版为 Engineering Kit 新增候选 adoption CLI 与 adoption mechanisms,同时保持稳定四命令边界与 0.3.0 的离线 Bundle 不变。
7
+
8
+ ### 新增
9
+
10
+ - 新增 adoption-cli 候选:基于 stdin/stdout 的 CLI,通过 migration manifest 评估 adoption 绑定、遗留 exit list 与遗留引用,并校验 managed-bundle 身份与 harness 表面清单。
11
+ - 新增 adoption-mechanisms 候选模块,作为 adoption CLI 的共享实现。
12
+
13
+ ### 变更
14
+
15
+ - 稳定四命令(scaffold、adopt-plan、projection、check)保持不变。
16
+ - 延续 0.3.0 的 Quickstart Profile v2 离线 Bundle(按 schema $id 选择的 standalone validator、完整 provenance 记录)与候选插件技能命名检查器。
17
+
18
+ ### 升级说明
19
+
20
+ 0.4.0 已发布到 npm 与 public 镜像仓。adoption CLI 是候选入口,须经显式 candidate 子路径调用,并把包精确锁定为 0.4.0。
21
+ <!-- release-skill:changelog:end version=0.4.0 locale=zh-CN -->
22
+
23
+
24
+ <!-- release-skill:changelog:start version=0.3.0 locale=zh-CN baseline=sha256:ddb48e61ef87de545348880216ee283b5d0165305dd5dfd8e044929b93ec4673 -->
25
+ ## [0.3.0] - 2026-08-12
26
+
27
+ 本源码候选版构建确定性的 Quickstart Profile v2 Bundle,运行时不依赖 Foundation 包、node_modules 或 Ajv。
28
+
29
+ ### 新增
30
+
31
+ - 接收显式消费者 Schema 文件与来源身份,生成按 Schema $id 选择的 standalone validator。
32
+ - 完整记录来源与 payload provenance、包管理器身份,以及实际进入 Bundle 的第三方代码许可证。
33
+ - 新增候选插件技能命名检查器(policy JSON 加构建期 CLI):扫描插件 skills 根目录,对前缀命名、description 领域信号与路由入口范围三条规则逐项输出 PASS/FAIL。
34
+
35
+ ### 变更
36
+
37
+ - 替换与 0.2.1 不兼容的依赖闭包 Bundle;仍依赖 v1 的消费者必须继续精确锁定 0.2.1。
38
+ - 机械投影 Contracts 与 Harness 运行代码,同时保持 Kit 稳定的四命令边界。
39
+
40
+ ### 升级说明
41
+
42
+ 0.3.0 当前只是本地、未发布的源码候选。采用 v2 时,应从冻结输入重新生成受管 Bundle,并把 builder 精确锁定为 0.3.0。
43
+ <!-- release-skill:changelog:end version=0.3.0 locale=zh-CN -->
44
+
45
+
3
46
  <!-- release-skill:changelog:start version=0.2.1 locale=zh-CN baseline=sha256:f43f41fadfa1dc9affd87825a382af6aed91050ef36a0c0854a6b04c2ba7fcea -->
4
47
  ## [0.2.1] - 2026-08-10
5
48
 
package/README.md CHANGED
@@ -4,28 +4,28 @@
4
4
 
5
5
  # skill-family-engineering-kit
6
6
 
7
- <!-- release-skill:release-version: 0.2.1 -->
7
+ <!-- release-skill:release-version: 0.4.0 -->
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.2.1** (2026-08-10)
12
+ **0.4.0** (2026-08-16)
13
13
 
14
- This release adds a candidate Quickstart Profile projection bundle while preserving the Kit's four-command boundary and adds bilingual package release documentation.
14
+ This release adds the candidate adoption CLI and adoption mechanisms to the Engineering Kit while preserving the stable four-command surface and the 0.3.0 offline bundle.
15
15
 
16
16
  **Added**
17
17
 
18
- - Adds a candidate builder and CLI for a deterministic, self-contained Quickstart Profile projection bundle with source-closure and bundle digests.
19
- - Adds complete English and Simplified Chinese package documentation, including an agent quick-reference section.
18
+ - Adds the adoption-cli candidate, a stdin/stdout CLI that assesses adoption bindings, legacy exit lists, and legacy references through the migration manifest, and verifies managed-bundle identity and harness surface inventory.
19
+ - Adds the adoption-mechanisms candidate module as the shared implementation behind the adoption CLI.
20
20
 
21
21
  **Changed**
22
22
 
23
- - Manages the current README and CHANGELOG release sections from one bilingual, versioned notes source.
24
- - Distributes the project NOTICE separately from the existing third-party notices and license closure.
23
+ - Keeps the stable scaffold, adopt-plan, projection, and check commands unchanged.
24
+ - Carries forward the 0.3.0 Quickstart Profile v2 offline bundle (standalone validators selected by schema $id, full provenance recording) and the candidate plugin skill naming checker.
25
25
 
26
26
  **Upgrade Notes**
27
27
 
28
- The candidate bundle remains under the existing projection authorization boundary. It does not add a fifth top-level Kit command or replace THIRD_PARTY_NOTICES.
28
+ Version 0.4.0 is released on npm and the public mirror. The adoption CLI is a candidate entry point; invoke it through its explicit candidate subpath and pin the package to exactly 0.4.0.
29
29
  <!-- release-skill:managed:end id=latest-release -->
30
30
 
31
31
  | Command | Purpose | Side effects |
@@ -46,7 +46,7 @@ Kit is the "engineering stage" layer, depending on the Harness and Contracts. It
46
46
  ## Installation and Minimal Example
47
47
 
48
48
  ```sh
49
- npm install --save-dev skill-family-engineering-kit@0.2.1
49
+ npm install --save-dev skill-family-engineering-kit@0.4.0
50
50
  npm exec -- skill-family-kit --help
51
51
  npm exec -- skill-family-kit scaffold --root <empty-dir> --project-id my-project
52
52
  npm exec -- skill-family-kit adopt-plan --root <repo>
@@ -54,7 +54,7 @@ npm exec -- skill-family-kit projection --root <repo>
54
54
  npm exec -- skill-family-kit check --root <repo>
55
55
  ```
56
56
 
57
- 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.2.1 -- skill-family-kit --help`.
57
+ 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.4.0 -- skill-family-kit --help`.
58
58
 
59
59
  ### Report sub-action
60
60
 
@@ -67,7 +67,7 @@ The caller must first construct a valid report model; Kit does not derive facts
67
67
 
68
68
  ### Candidate Quickstart projection bundle
69
69
 
70
- Use the candidate subpath to build a deterministic projection manifest containing the Quickstart Profile schemas, runner, and required runtime dependency closure:
70
+ Use the candidate subpath to build a deterministic Quickstart Profile v2 projection from explicit consumer schemas and frozen source identity:
71
71
 
72
72
  ```js
73
73
  import {
@@ -76,7 +76,9 @@ import {
76
76
  } from "skill-family-engineering-kit/candidate/quickstart-profile";
77
77
  ```
78
78
 
79
- Pass the returned `manifest` to the stable `runProjection` API; the candidate helper does not write files or add a fifth top-level command. This subpath is public but **not stable** and may change or be removed in a later minor release. Pin the exact package version, inspect the returned manifest before authorization, and keep candidate imports outside a stable consumer API.
79
+ The generated Bundle selects standalone validators by schema `$id` and runs offline without Foundation packages, `node_modules`, or runtime Ajv. Its provenance binds Foundation sources, consumer schemas, payload bytes, tool versions, and the licenses of code that actually enters the Bundle.
80
+
81
+ Pass the returned `manifest` to the stable `runProjection` API; the helper does not write files or add a fifth top-level command. This subpath is public but **not stable**. Pin exactly `0.4.0` for v2; integrations that still require the v1 dependency-closure Bundle must stay pinned to exactly `0.2.1`.
80
82
 
81
83
  ### Host sub-action
82
84
 
package/README.zh-CN.md CHANGED
@@ -5,28 +5,28 @@
5
5
 
6
6
  # skill-family-engineering-kit
7
7
 
8
- <!-- release-skill:release-version: 0.2.1 -->
8
+ <!-- release-skill:release-version: 0.4.0 -->
9
9
 
10
10
  开发与 CI 阶段使用的工程工具包。**恰好四个**顶层命令,没有第五个:
11
11
 
12
12
  <!-- release-skill:managed:start id=latest-release -->
13
- **0.2.1** (2026-08-10)
13
+ **0.4.0** (2026-08-16)
14
14
 
15
- 本版新增 Quickstart Profile 候选投影包,同时保持 Kit 四命令边界,并补齐双语包发布文档。
15
+ 本版为 Engineering Kit 新增候选 adoption CLI 与 adoption mechanisms,同时保持稳定四命令边界与 0.3.0 的离线 Bundle 不变。
16
16
 
17
17
  **新增**
18
18
 
19
- - 新增候选构建函数与 CLI,用于生成确定性、自包含的 Quickstart Profile 投影包,并记录源码闭包与投影包摘要。
20
- - 新增完整的英文与简体中文包文档,并补充智能体快速参考章节。
19
+ - 新增 adoption-cli 候选:基于 stdin/stdout 的 CLI,通过 migration manifest 评估 adoption 绑定、遗留 exit list 与遗留引用,并校验 managed-bundle 身份与 harness 表面清单。
20
+ - 新增 adoption-mechanisms 候选模块,作为 adoption CLI 的共享实现。
21
21
 
22
22
  **变更**
23
23
 
24
- - 使用同一份双语版本化说明源管理当前 README 与 CHANGELOG 的发布区域。
25
- - 项目 NOTICE 与现有第三方声明及许可证闭包分开分发。
24
+ - 稳定四命令(scaffold、adopt-plan、projection、check)保持不变。
25
+ - 延续 0.3.0 的 Quickstart Profile v2 离线 Bundle(按 schema $id 选择的 standalone validator、完整 provenance 记录)与候选插件技能命名检查器。
26
26
 
27
27
  **升级说明**
28
28
 
29
- 候选投影包仍受既有 projection 授权边界约束。它不增加第五个 Kit 顶层命令,也不替代 THIRD_PARTY_NOTICES
29
+ 0.4.0 已发布到 npm public 镜像仓。adoption CLI 是候选入口,须经显式 candidate 子路径调用,并把包精确锁定为 0.4.0
30
30
  <!-- release-skill:managed:end id=latest-release -->
31
31
 
32
32
  | 命令 | 用途 | 副作用 |
@@ -47,7 +47,7 @@ Kit 是「工程阶段」层,依赖 Harness 与 Contracts。它只做四件事
47
47
  ## 安装和最小示例
48
48
 
49
49
  ```sh
50
- npm install --save-dev skill-family-engineering-kit@0.2.1
50
+ npm install --save-dev skill-family-engineering-kit@0.4.0
51
51
  npm exec -- skill-family-kit --help
52
52
  npm exec -- skill-family-kit scaffold --root <empty-dir> --project-id my-project
53
53
  npm exec -- skill-family-kit adopt-plan --root <repo>
@@ -55,7 +55,7 @@ npm exec -- skill-family-kit projection --root <repo>
55
55
  npm exec -- skill-family-kit check --root <repo>
56
56
  ```
57
57
 
58
- 以上四条命令分别覆盖生成骨架、只读盘点、受管投影与诊断;零安装形式可用 `npm exec --package=skill-family-engineering-kit@0.2.1 -- skill-family-kit --help`。
58
+ 以上四条命令分别覆盖生成骨架、只读盘点、受管投影与诊断;零安装形式可用 `npm exec --package=skill-family-engineering-kit@0.4.0 -- skill-family-kit --help`。
59
59
 
60
60
  ### 报告子动作
61
61
 
@@ -68,7 +68,7 @@ npm exec -- skill-family-kit check report --root <repo> --report <report.md> --m
68
68
 
69
69
  ### Candidate Quickstart 投影包
70
70
 
71
- 需要生成确定性的投影 manifest,并携带 Quickstart Profile Schema、runner 与必要运行时依赖闭包时,使用 candidate 子路径:
71
+ 需要从显式消费者 Schema 与冻结来源身份生成确定性的 Quickstart Profile v2 投影时,使用 candidate 子路径:
72
72
 
73
73
  ```js
74
74
  import {
@@ -77,7 +77,9 @@ import {
77
77
  } from "skill-family-engineering-kit/candidate/quickstart-profile";
78
78
  ```
79
79
 
80
- 以上辅助函数不写文件,也不增加第五个顶层命令。调用方需要把返回的 `manifest` 交给稳定的 `runProjection` API。该子路径公开但**不稳定**,后续小版本可以修改或移除;调用方需要锁定精确包版本,在授权前检查 manifest,并避免通过自身稳定 API 再导出 candidate 导入。
80
+ 生成的 Bundle 按 Schema `$id` 选择 standalone validator,离线运行时不依赖 Foundation 包、`node_modules` Ajv。provenance 绑定 Foundation 来源、消费者 Schema、payload 字节、工具版本,以及实际进入 Bundle 的代码许可证。
81
+
82
+ 以上辅助函数不写文件,也不增加第五个顶层命令。调用方需要把返回的 `manifest` 交给稳定的 `runProjection` API。该子路径公开但**不稳定**;使用 v2 时应精确锁定 `0.4.0`,仍依赖 v1 依赖闭包 Bundle 的接入必须继续精确锁定 `0.2.1`。
81
83
 
82
84
  ### 宿主子动作
83
85
 
@@ -0,0 +1,67 @@
1
+ #!/usr/bin/env node
2
+ import { realpathSync } from "node:fs";
3
+ import { stdin, stdout, stderr } from "node:process";
4
+ import { fileURLToPath } from "node:url";
5
+ import {
6
+ invokeFoundationAdoption,
7
+ verifyManagedBundleIdentity,
8
+ } from "./adoption-mechanisms.mjs";
9
+
10
+ const CLI_NAME = "adoption-cli.mjs";
11
+
12
+ async function readRequest(input) {
13
+ const chunks = [];
14
+ for await (const chunk of input) chunks.push(Buffer.from(chunk));
15
+ const text = new TextDecoder("utf-8", { fatal: true }).decode(Buffer.concat(chunks));
16
+ return JSON.parse(text);
17
+ }
18
+
19
+ function errorResponse(cause) {
20
+ return {
21
+ ok: false,
22
+ error: {
23
+ name: typeof cause?.name === "string" ? cause.name : "Error",
24
+ message: cause?.message ?? String(cause),
25
+ },
26
+ };
27
+ }
28
+
29
+ /** One-request/one-response transport for the fixed adoption operation set. */
30
+ export async function runAdoptionCli({
31
+ input = stdin,
32
+ output = stdout,
33
+ error = stderr,
34
+ invoke = invokeFoundationAdoption,
35
+ } = {}) {
36
+ try {
37
+ const request = await readRequest(input);
38
+ const result = request?.operation === "self-check"
39
+ ? await runSelfCheck(request)
40
+ : await invoke(request);
41
+ output.write(`${JSON.stringify(result)}\n`);
42
+ return 0;
43
+ } catch (cause) {
44
+ error.write(`${JSON.stringify(errorResponse(cause))}\n`);
45
+ return 2;
46
+ }
47
+ }
48
+
49
+ async function runSelfCheck(request) {
50
+ if (
51
+ request === null ||
52
+ typeof request !== "object" ||
53
+ Array.isArray(request) ||
54
+ Object.keys(request).sort().join(",") !== "operation,params" ||
55
+ request.params === null ||
56
+ typeof request.params !== "object" ||
57
+ Array.isArray(request.params) ||
58
+ Object.keys(request.params).length !== 0
59
+ ) {
60
+ throw new TypeError("adoption CLI self-check requires exactly operation and empty params");
61
+ }
62
+ return verifyManagedBundleIdentity({ cliUrl: import.meta.url, cliName: CLI_NAME });
63
+ }
64
+
65
+ if (process.argv[1] && realpathSync(fileURLToPath(import.meta.url)) === realpathSync(process.argv[1])) {
66
+ process.exitCode = await runAdoptionCli();
67
+ }
@@ -0,0 +1,69 @@
1
+ import {
2
+ assessAdoptionBinding,
3
+ assessLegacyExitList,
4
+ assessLegacyReferences,
5
+ loadMigrationManifestState,
6
+ } from "../src/migration.mjs";
7
+ import {
8
+ verifyHarnessSurfaceInventory,
9
+ verifyManagedBundleIdentity,
10
+ } from "skill-family-harness-node/candidate/quickstart-profile";
11
+
12
+ export { verifyManagedBundleIdentity };
13
+
14
+ const ADOPTION_OPERATIONS = Object.freeze([
15
+ "load-migration-manifest-state",
16
+ "assess-adoption-binding",
17
+ "assess-legacy-exit-list",
18
+ "assess-legacy-references",
19
+ "verify-harness-surface-inventory",
20
+ ]);
21
+
22
+ const FORBIDDEN_ROUTING_KEYS = new Set(["entry", "module", "export", "pathToFileURL"]);
23
+
24
+ function assertNoRoutingKeys(value, path = "params") {
25
+ if (value === null || typeof value !== "object") return;
26
+ if (Array.isArray(value)) {
27
+ value.forEach((item, index) => assertNoRoutingKeys(item, `${path}/${index}`));
28
+ return;
29
+ }
30
+ for (const [key, child] of Object.entries(value)) {
31
+ if (FORBIDDEN_ROUTING_KEYS.has(key)) {
32
+ throw new TypeError(`invokeFoundationAdoption: caller routing key is forbidden at ${path}/${key}`);
33
+ }
34
+ assertNoRoutingKeys(child, `${path}/${key}`);
35
+ }
36
+ }
37
+
38
+ /** Fixed, read-only adoption bridge; callers cannot select code or exports. */
39
+ export async function invokeFoundationAdoption(request) {
40
+ if (request === null || typeof request !== "object" || Array.isArray(request)) {
41
+ throw new TypeError("invokeFoundationAdoption: request must be an object");
42
+ }
43
+ const requestKeys = Object.keys(request).sort();
44
+ if (requestKeys.length !== 2 || requestKeys[0] !== "operation" || requestKeys[1] !== "params") {
45
+ throw new TypeError("invokeFoundationAdoption: request must contain exactly operation and params");
46
+ }
47
+ const { operation, params } = request;
48
+ if (!ADOPTION_OPERATIONS.includes(operation)) {
49
+ throw new TypeError(`invokeFoundationAdoption: unknown operation: ${String(operation)}`);
50
+ }
51
+ if (params === null || typeof params !== "object" || Array.isArray(params)) {
52
+ throw new TypeError("invokeFoundationAdoption: params must be an object");
53
+ }
54
+ assertNoRoutingKeys(params);
55
+ switch (operation) {
56
+ case "load-migration-manifest-state":
57
+ return loadMigrationManifestState(params.root);
58
+ case "assess-adoption-binding":
59
+ return assessAdoptionBinding(params.manifest, params.profileId);
60
+ case "assess-legacy-exit-list":
61
+ return assessLegacyExitList(params.root, params.legacyItems);
62
+ case "assess-legacy-references":
63
+ return assessLegacyReferences(params.root, params.legacyReferences);
64
+ case "verify-harness-surface-inventory":
65
+ return verifyHarnessSurfaceInventory(params);
66
+ default:
67
+ throw new TypeError("invokeFoundationAdoption: unreachable operation");
68
+ }
69
+ }
@@ -1,4 +1,7 @@
1
1
  export {
2
2
  buildQuickstartProfileProjection,
3
+ buildQuickstartProfileProjectionFromInventory,
3
4
  QUICKSTART_PROFILE_TARGET_PREFIX,
4
5
  } from "./profile-bundle.mjs";
6
+ export { invokeFoundationAdoption } from "./adoption-mechanisms.mjs";
7
+ export { runAdoptionCli } from "./adoption-cli.mjs";