@avantf/dsh-plugin-base 0.4.1 → 0.5.1

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/README.md CHANGED
@@ -1,7 +1,8 @@
1
1
  # @avantf/dsh-plugin-base
2
2
 
3
- 给 DSH 插件用的基础包,把三件容易各写一遍的事收在一起:**启动期资源预装**、**宿主兼容门禁**、
4
- **一组与 DSH 无关的共享工具**。
3
+ DSH 插件共用的底座(共享库)。**插件在运行时按 file URL 动态加载它**——不静态 `import`、不打包进插件,
4
+ 拿不到就降级挂载——把三件容易各写一遍的事收在一起:**启动期资源预装**、**宿主兼容门禁**、**一组与 DSH
5
+ 无关的共享工具**。
5
6
 
6
7
  - **运行期零依赖**:`dependencies` 为空,源码里连 `zod` 都不 import。
7
8
  - 唯一一条 peer 是 `zod`(`>=4.4.3 <5`),由宿主 / 上层提供,好让调用方、本包与宿主解析到**同一份**
@@ -22,7 +23,7 @@
22
23
  - 需要安装的由框架下载、校验完整性、**原子落盘**(同目录临时文件 + rename;跨进程一把族根锁);
23
24
  - 锁被活体进程长期持有(锁文件 mtime 越过 `staleMs` 而 holder 的 pid 仍活着)时**不抢锁**:打一条用户可见的
24
25
  `warn`(写明 holder 的 pid、已持有时长、本次已等待时长)后继续按预算等待;等不到就报 `lock/timeout`,
25
- 消息里带 holder 与 mtime 诊断。抢一个活写者的锁会让两个写者进同一目录,超时只是报告;
26
+ 消息里带 holder 与 mtime 诊断;
26
27
  - 每一项给出 `present / installed / skipped / failed`,失败带稳定 `code`;
27
28
  - 三种内置资源种类:`npm-package`、`binary-archive`、`model-cache`。新的种类 = 一个新的 provider,
28
29
  核心不动;
@@ -48,25 +49,8 @@
48
49
  | `familyHome` / `familyToolsDir` / `familyModelsDir` / `resolveDataHome` / `expandHome` | 家族根与数据根解析:**⑤ 显式 → ④ 环境变量 → ② 配置值 → 默认**,一律传**具名 slot** |
49
50
  | `wellFormedText` / `wellFormedDeep` | 出站文本的良构修复:孤立代理(lone surrogate)会被 `JSON.stringify` 原样写出、被严格解析器整篇拒收,这里统一换成 U+FFFD;引擎没有 `String.prototype.toWellFormed` 时走等价扫描。递归版只修字符串、数组与普通对象(含键),`Date` / 类实例等一律按同一性原样返回 |
50
51
 
51
- > 世代 v3 把没有运行期消费者的构件移到了 `./internal`(如 `createPluginLogger`、Typert 符号
52
- > `strictCodec` / `endpointId` / `fieldSymbol` / `resultSymbol`、compat 门禁的单个探针、`npmPackageProvider`)。
53
- > 它们不再是 `.` 接口的一部分;本包自己的插件各有自己的 logger 与 Typert 镜像,不需要它们。
54
-
55
- ### 4. 接口世代
56
-
57
- `.` 上的导出构成本包的**接口**,由世代号冻结:
58
-
59
- - `INTERFACE_VERSION`(正整数)+ `api/interface-vN.json` 快照(该代的值名与类型名,随源码在仓库里,
60
- 不进产物);
61
- - `checkInterface(required, module)`:把"调用方构建时所对的世代"与"运行时加载到的本包报告的世代"
62
- 比一比,返回 `ok` / `incompatible` / `cannot-tell`。纯函数、**非对称**、读属性有守卫(取属性就抛的
63
- 对象读成"没报")、**永不抛**。只有加载到的世代**更旧**(成员可能缺失)才是 `incompatible`;加载到的
64
- 世代**更新**是 `ok` + 一句话的 `warning`(新世代不拿走有消费者的成员 —— v1→v2 是名字超集,v2→v3 是
65
- 剪枝,剪掉的 18 个成员经证明零消费者),相等是 `ok`;
66
- - `readInterfaceRequirement(url)`:读调用方产物里烘着的那条记录 `{ baseVersion, interfaceVersion }`;
67
- 缺失或畸形返回 `undefined`("没烘"),不抛;
68
- - 拿到 `incompatible` 时的建议动作是**降级**(不使用本包的共享能力)而不是拒绝挂载;拿到 `ok` + `warning`
69
- 时照常使用、只把那条警告记下来 —— 本包只把裁决与一句话的 `reason` / `warning` 交出去,怎么处理由调用方决定。
52
+ 没有运行期消费者的构件(如 `createPluginLogger`、Typert 符号、compat 的单个探针、`npmPackageProvider`)
53
+ 放在不承诺兼容的 `./internal` 子路径,不属于 `.` 接口。
70
54
 
71
55
  ## 怎么用
72
56
 
@@ -76,7 +60,79 @@
76
60
  npm install @avantf/dsh-plugin-base
77
61
  ```
78
62
 
79
- ### 预装资源
63
+ 自己的插件把它声明成**普通运行期依赖**,装上插件就会带上它;插件在运行时从**自己的依赖树**解析它。
64
+
65
+ ### 最小示例(完整,可直接抄)
66
+
67
+ 下面是一个插件从构建期准备到启动期取用资源的完整路径。四步都要,缺一步会出现"能跑但拿不到底座"的
68
+ 隐性降级。
69
+
70
+ ```ts
71
+ // ── ① 构建期:把零依赖的 bootstrap 拷进自己的源码树,按相对路径 import ──────────────
72
+ // cp node_modules/@avantf/dsh-plugin-base/dist/bootstrap.js src/envinit-bootstrap.js
73
+ // (有打包步骤时用 ./preset 自动内联,见「运行时装载」。)
74
+ import { loadFramework } from './envinit-bootstrap.js'
75
+
76
+ // ── ② 启动期:解析底座 → 校验版本 → 动态 import() ─────────────────────────────────
77
+ // 底座缺失或版本超出 supportedRange 时只返回 undefined(并打一条 warn),
78
+ // 插件照常挂载、走自己的降级路径。
79
+ const framework = await loadFramework<typeof import('@avantf/dsh-plugin-base')>({
80
+ logger: { warn: (message) => { log.warn(`envinit: ${message}`) } },
81
+ })
82
+
83
+ if (framework === undefined) {
84
+ log.warn('envinit: @avantf/dsh-plugin-base 不可用,改用内置默认路径继续')
85
+ } else {
86
+ // ── ③ 取用一项就绪资源(完整调用;清单的形状见「写清单」)───────────────────────
87
+ const home = framework.familyHome() // 受管族根(受 AVANTF_HOME 约束)
88
+ const provisioner = framework.createProvisioner({ home, logger: log })
89
+ provisioner.register(framework.binaryArchiveProvider())
90
+ provisioner.register(framework.modelCacheProvider())
91
+ provisioner.declare({
92
+ plugin: 'my-plugin',
93
+ items: [{
94
+ id: 'my-plugin:tool',
95
+ kind: 'binary-archive',
96
+ spec: {
97
+ id: 'tool',
98
+ version: '1.2.3',
99
+ packs: { 'linux-x64': { url: 'https://example.com/tool.tar.gz', sha256: '<hex>' } },
100
+ },
101
+ target: { root: 'tools' },
102
+ schemaVersion: 1,
103
+ }],
104
+ })
105
+ await provisioner.ensure({ only: ['my-plugin:tool'], deadlineMs: 30_000 })
106
+ const state = provisioner.resolve('my-plugin:tool')
107
+ if (state.state === 'ready') {
108
+ // handle.dir 是可用入口目录(归档:可执行文件所在目录);handle.env 是 PATH 等增量。
109
+ process.env.PATH = [state.handle.dir, process.env.PATH].filter(Boolean).join(delimiter)
110
+ } else {
111
+ // pending / failed / skipped / missing 都走这里:用内置默认实现,不取消挂载。
112
+ log.warn(`my-plugin:tool 未就绪(${state.state}),改用内置默认路径`)
113
+ }
114
+
115
+ // ── ④ 跑一次兼容门禁,读 compatReport 的结论(可选,但拒绝加载前必须有)──────────
116
+ // ctx 是插件自己的宿主 ctx,spec 是本插件的契约清单(服务 / 工具 / schema / 版本)。
117
+ const verdict = framework.verdictOf(framework.gatherEvidence(ctx, spec))
118
+ if (!verdict.load) {
119
+ log.error(framework.compatReport(verdict, {
120
+ heading: '插件未加载:与当前宿主的兼容性检查未通过。',
121
+ warningsLabel: '风险提示:',
122
+ warnings: verdict.warnings,
123
+ fix: '升级宿主,或按本插件声明的版本重建。',
124
+ logPointer: prefix => `完整诊断见日志里 ${prefix} 开头的行。`,
125
+ }))
126
+ } else if (verdict.warning !== undefined) {
127
+ log.warn(`compat: ${verdict.warning}`)
128
+ }
129
+ }
130
+ ```
131
+
132
+ `delimiter` 来自 `node:path`(`import { delimiter } from 'node:path'`),`log` / `ctx` / `spec` 是插件自己的
133
+ 对象——它们不来自底座,所以底座缺席时照样存在。
134
+
135
+ ### 预装资源(逐项)
80
136
 
81
137
  ```ts
82
138
  import { homedir } from 'node:os'
@@ -173,7 +229,7 @@ framework.createProvisioner({
173
229
  })
174
230
  ```
175
231
 
176
- 清单可以离线检查:
232
+ 清单可以不联网检查:
177
233
 
178
234
  ```bash
179
235
  provision lint manifest.json
@@ -224,10 +280,11 @@ const files = new PromptFiles({ dir: join(dataHome, 'prompts'), namespace: 'my-p
224
280
 
225
281
  如果调用方要在**运行时**装载本包(而不是让它出现在自己的 import 图里),本包提供零依赖的
226
282
  `./bootstrap`:解析本包在哪 → 校验版本落在给定区间 → 动态 `import()`。它**不安装任何东西**,
227
- 失败只返回 `undefined` 并给出原因。
283
+ 失败只返回 `undefined` 并给出原因。把它拷进自己的源码、按相对路径 import(上面的最小示例),
284
+ 本包缺席时调用方仍能加载,只是走降级路径。
228
285
 
229
286
  ```ts
230
- import { loadFramework, readDependencyRange } from '@avantf/dsh-plugin-base/bootstrap'
287
+ import { loadFramework, readDependencyRange } from './envinit-bootstrap.js'
231
288
 
232
289
  const range = await readDependencyRange(import.meta.url) // 调用方自己声明的区间
233
290
  const framework = await loadFramework<typeof import('@avantf/dsh-plugin-base')>({ logger })
@@ -280,6 +337,26 @@ const report = await runProviderConformance({ provider: myProvider, items: [...]
280
337
  assertProviderConformance(report)
281
338
  ```
282
339
 
340
+ ## 接口要点
341
+
342
+ `.` 上的导出(值 + 类型)构成本包的**接口**,由世代号冻结;`./preset` / `./conformance` / `./bootstrap`
343
+ 三个子路径也在承诺内,`./internal` 从不承诺稳定。
344
+
345
+ - `INTERFACE_VERSION`(正整数)标识当前世代;每一代的名字面有一份随包的快照,名称与导出对不上就是
346
+ 接口变更,必须升世代号。
347
+ - `checkInterface(required, module)`:把"调用方构建时所对的世代"与"运行时加载到的本包报告的世代"比一比,
348
+ 返回 `ok` / `incompatible` / `cannot-tell`。纯函数、**非对称**、读属性有守卫(取属性就抛的对象读成
349
+ "没报")、**永不抛**。只有加载到的世代**更旧**(成员可能缺失)才是 `incompatible`;加载到的世代
350
+ **更新**是 `ok` + 一句话的 `warning`(新世代不拿走有消费者的成员),相等是 `ok`。
351
+ - `readInterfaceRequirement(url)`:读调用方产物里烘着的那条记录 `{ baseVersion, interfaceVersion }`;
352
+ 缺失或畸形返回 `undefined`("没烘"),不抛。
353
+ - `verifyRegisteredFaces({ ctx, packageId, schemaNames?, toolNames, log, scope? })`:挂载之后复查每条声明的
354
+ schema 与工具是否真的可见,返回没看到的那些名字(warn-only)。`scope` 是可选的**不透明**值(本包不认识
355
+ 作用域的类型),会原样传给 `tools.get(name, scope)`;不传就按全局视图 `tools.get(name)` 读。
356
+ - 拿到 `incompatible` 时的建议动作是**降级**(不使用本包的共享能力)而不是拒绝挂载;拿到 `ok` + `warning`
357
+ 时照常使用、只把那条警告记下来 —— 本包只把裁决与一句话的 `reason` / `warning` 交出去,怎么处理由
358
+ 调用方决定。
359
+
283
360
  ## 边界(不做的事)
284
361
 
285
362
  - **不做包管理器**:不推导传递依赖、不生成 lockfile、不做版本求解;每个 item 自包含。
@@ -290,28 +367,19 @@ assertProviderConformance(report)
290
367
  ## 版本承诺
291
368
 
292
369
  - 接口面是 `.` 上的导出(值 + 类型)加上 `./preset` / `./conformance` / `./bootstrap` 三个子路径;`./internal`
293
- 是内部件,从不承诺稳定(v3 起落在这里的还有那些没有运行期消费者的构件:compat 的单个探针、
294
- provisioner 的常量、`npmPackageProvider`、Typert 符号、`createPluginLogger`)。
295
- - **当前这一代(v3)把 `.` 收成了一个稳定子集**:`.` 只列"插件真取用、或插件作者被期望调用"的成员
296
- (32 个值 + 66 个类型),其余进 `./internal`。名字面落在 `api/interface-vN.json` 快照里,随源码在仓库、
297
- 不进产物。这是为了把"内部件的改动"与"接口"解耦(v3 之前 `.` 是两句 `export *` 的副产品,加一个内部
298
- helper 就算接口变更),不是"这个集合永远不变":新能力从明确标注为不稳定的入口引入,既有成员按弃用
299
- 周期退出。
300
- - **v3 是第一次破坏性换代**:v2 的成员如果有消费者,v3 一个不少(剪掉的 18 个经跨树证明零消费者);
301
- 但 v3 不再对 v2 做结构超集。旧调用方遇到更新的 base 仍判 `ok` + `warning`,遇到更旧的 base 才降级。
302
- - **接口与包版本是两条轴**:接口换代只升 `INTERFACE_VERSION` 并新增 `api/interface-vN.json`;包版本是
303
- 普通 semver,只表达包自身(行为变更 minor、修复 patch)。
370
+ 是内部件,从不承诺稳定。
371
+ - **当前这一代(v4)沿用 v3 的名字面**:`.` 只列"插件真取用、或插件作者被期望调用"的成员,其余进
372
+ `./internal`。这是为了把"内部件的改动"与"接口"解耦,不是"这个集合永远不变":新能力从明确标注为
373
+ 不稳定的入口引入,既有成员按弃用周期退出。v4 一个名字都没动 —— 它加宽的是**既有成员接受的入参**:
374
+ `verifyRegisteredFaces({ …, scope? })` 多了个可选、不透明的 `scope`,原样透传给 `tools.get(name,
375
+ scope)`,好让按作用域注册的工具面能被复查到;不传时行为与 v3 逐字相同。
376
+ - **v3 是第一次破坏性换代**:v2 的成员如果有消费者,v3 一个不少;但 v3 不再对 v2 做结构超集。旧调用方
377
+ 遇到更新的 base 仍判 `ok` + `warning`,遇到更旧的 base 才降级。
378
+ - **接口与包版本是两条轴**:接口换代只升 `INTERFACE_VERSION` 并新增快照;包版本是普通 semver,只表达
379
+ 包自身(行为变更 minor、修复 patch)。
304
380
  - 顺序敏感的参数一律传**具名对象**(如 `resolveDataHome({ explicit, env, configured })`);可观察的文案
305
381
  由调用方给(如 `compatReport` 的 `words`)。
306
382
 
307
- ## 开发
308
-
309
- ```bash
310
- pnpm check # 类型检查 + 测试
311
- pnpm build # tsc → dist/
312
- pnpm pack # 打包出 tarball
313
- ```
314
-
315
383
  ## 许可
316
384
 
317
385
  MIT
@@ -3,18 +3,20 @@
3
3
  * @module bootstrap
4
4
  */
5
5
  /** The bootstrap version; the resolved framework must satisfy {@link supportedRange}. */
6
- export declare const VERSION = "0.4.1";
6
+ export declare const VERSION = "0.5.1";
7
7
  /**
8
8
  * The framework interval this bootstrap can launch.
9
9
  *
10
- * Kept equal to the plugins' peer range for the base: the plugin passes no override, so THIS is the
11
- * runtime gate. It is a plain comparator interval, NOT a caret: the package version is ordinary
12
- * semver again and no longer tracks the interface, so the interval stays as wide as the family's
13
- * compatibility promise — `>=0.3.0 <1.0.0` admits every 0.x base this generation of plugins can
14
- * consume, and stops at the major that invented a new interface generation. The interface itself is
15
- * the separate, runtime axis: a base inside this interval whose `INTERFACE_VERSION` differs is judged
16
- * by the base's own gate (INTERFACE.md §1, §3) — an OLDER base degrades, a NEWER one is `ok` + a
17
- * warning (generations are additive), and neither ever refuses the mount.
10
+ * This is the PACKAGE-version window, and nothing else: the interval is byte-for-byte the range the
11
+ * plugins declare in their `dependencies` for the base (the install-time gate; the base is a plain
12
+ * dependency, not a peer) and the plugin passes no override, so THIS is the runtime gate too. It is
13
+ * a plain comparator interval, NOT a caret: the package version is ordinary semver and does not
14
+ * track the interface, so the interval stays as wide as the family's compatibility promise —
15
+ * `>=0.3.0 <1.0.0` admits every 0.x base this generation of plugins can consume. Its upper bound
16
+ * marks no generation boundary. Generation is the separate, runtime axis, judged on its own: the
17
+ * base's `INTERFACE_VERSION` is compared by the base's gate (INTERFACE.md §1, §3) — an OLDER base
18
+ * degrades to `incompatible`, a NEWER one is `ok` + a WARNING (generations are additive), and
19
+ * neither ever refuses the mount.
18
20
  */
19
21
  export declare const supportedRange = ">=0.3.0 <1.0.0";
20
22
  /** Sink for the warnings that replace a throw. */
@@ -49,7 +51,10 @@ export declare function ensureFramework(options: EnsureFrameworkOptions): Promis
49
51
  export declare function loadFramework<T = unknown>(options: EnsureFrameworkOptions): Promise<T | undefined>;
50
52
  /**
51
53
  * Read the range a plugin declares in the nearest `package.json`: walk up from `from`,
52
- * preferring `peerDependencies` over `devDependencies`; `undefined` when none is found.
54
+ * preferring `dependencies` over `peerDependencies` over `devDependencies`; `undefined` when none is
55
+ * found. `dependencies` is the live declaration — the base ships as a normal dependency of the
56
+ * plugins — while `peerDependencies` stays as the fallback for plugins built when the base was
57
+ * declared a peer, and `devDependencies` covers a local checkout.
53
58
  */
54
59
  export declare function readDependencyRange(from?: string): Promise<string | undefined>;
55
60
  //# sourceMappingURL=bootstrap.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../src/bootstrap.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,yFAAyF;AACzF,eAAO,MAAM,OAAO,UAAU,CAAA;AAC9B;;;;;;;;;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B,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,IAAI,CAAC,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;CAC7B;AAED,sEAAsE;AACtE,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,MAAM,CAAC,EAAE,eAAe,CAAA;IACjC,iDAAiD;IACjD,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAA;CACjC;AAED,wDAAwD;AACxD,MAAM,WAAW,iBAAiB;IAChC,4CAA4C;IAC5C,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,qDAAqD;IACrD,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAA;CAC5B;AA8LD;;;;;;GAMG;AACH,wBAAsB,eAAe,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC,CAoC7G;AAED,oFAAoF;AACpF,wBAAsB,aAAa,CAAC,CAAC,GAAG,OAAO,EAAE,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,CAaxG;AAED;;;;;;GAMG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,GAAE,MAAsB,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAyCnG"}
package/dist/bootstrap.js CHANGED
@@ -7,18 +7,20 @@ import { createRequire } from 'node:module';
7
7
  import { dirname, join } from 'node:path';
8
8
  import { fileURLToPath, pathToFileURL } from 'node:url';
9
9
  /** The bootstrap version; the resolved framework must satisfy {@link supportedRange}. */
10
- export const VERSION = '0.4.1';
10
+ export const VERSION = '0.5.1';
11
11
  /**
12
12
  * The framework interval this bootstrap can launch.
13
13
  *
14
- * Kept equal to the plugins' peer range for the base: the plugin passes no override, so THIS is the
15
- * runtime gate. It is a plain comparator interval, NOT a caret: the package version is ordinary
16
- * semver again and no longer tracks the interface, so the interval stays as wide as the family's
17
- * compatibility promise — `>=0.3.0 <1.0.0` admits every 0.x base this generation of plugins can
18
- * consume, and stops at the major that invented a new interface generation. The interface itself is
19
- * the separate, runtime axis: a base inside this interval whose `INTERFACE_VERSION` differs is judged
20
- * by the base's own gate (INTERFACE.md §1, §3) — an OLDER base degrades, a NEWER one is `ok` + a
21
- * warning (generations are additive), and neither ever refuses the mount.
14
+ * This is the PACKAGE-version window, and nothing else: the interval is byte-for-byte the range the
15
+ * plugins declare in their `dependencies` for the base (the install-time gate; the base is a plain
16
+ * dependency, not a peer) and the plugin passes no override, so THIS is the runtime gate too. It is
17
+ * a plain comparator interval, NOT a caret: the package version is ordinary semver and does not
18
+ * track the interface, so the interval stays as wide as the family's compatibility promise —
19
+ * `>=0.3.0 <1.0.0` admits every 0.x base this generation of plugins can consume. Its upper bound
20
+ * marks no generation boundary. Generation is the separate, runtime axis, judged on its own: the
21
+ * base's `INTERFACE_VERSION` is compared by the base's gate (INTERFACE.md §1, §3) — an OLDER base
22
+ * degrades to `incompatible`, a NEWER one is `ok` + a WARNING (generations are additive), and
23
+ * neither ever refuses the mount.
22
24
  */
23
25
  export const supportedRange = '>=0.3.0 <1.0.0';
24
26
  const PACKAGE = '@avantf/dsh-plugin-base';
@@ -276,7 +278,10 @@ export async function loadFramework(options) {
276
278
  }
277
279
  /**
278
280
  * Read the range a plugin declares in the nearest `package.json`: walk up from `from`,
279
- * preferring `peerDependencies` over `devDependencies`; `undefined` when none is found.
281
+ * preferring `dependencies` over `peerDependencies` over `devDependencies`; `undefined` when none is
282
+ * found. `dependencies` is the live declaration — the base ships as a normal dependency of the
283
+ * plugins — while `peerDependencies` stays as the fallback for plugins built when the base was
284
+ * declared a peer, and `devDependencies` covers a local checkout.
280
285
  */
281
286
  export async function readDependencyRange(from = process.cwd()) {
282
287
  let current = from;
@@ -318,7 +323,9 @@ export async function readDependencyRange(from = process.cwd()) {
318
323
  if (typeof parsed !== 'object' || parsed === null)
319
324
  return undefined;
320
325
  const manifest = parsed;
321
- return rangeOf(manifest['peerDependencies']) ?? rangeOf(manifest['devDependencies']);
326
+ return rangeOf(manifest['dependencies'])
327
+ ?? rangeOf(manifest['peerDependencies'])
328
+ ?? rangeOf(manifest['devDependencies']);
322
329
  }
323
330
  catch {
324
331
  // The nearest manifest is unparseable: stop.
package/dist/compat.d.ts CHANGED
@@ -397,7 +397,16 @@ export declare function declaredSchemaKeys(packageId: string, names: readonly st
397
397
  * Known limit: invocation ENDPOINTS are not observable through the documented query surface
398
398
  * (`list`/`listPackages` expose schemas and the package model only), so the four descriptors are
399
399
  * covered through the schema keys they use, not counted themselves.
400
- * @param input - the live context, the real tool names, and the logger.
400
+ *
401
+ * `scope` is the OPTIONAL second argument the tools half hands to `tools.get`. A host whose registry
402
+ * is addressed per scope (a sub-session's `agent.ctx.tools.register`, for instance) answers `undefined`
403
+ * for a name that was really registered in some other scope, so a caller reading a scoped registration
404
+ * back has to name that scope or the check reports a false "missing". This module has NO DSH
405
+ * dependency and does not know what a scope IS: the value is passed through opaquely, exactly as the
406
+ * caller's own registry expects it. Omitting it keeps the older reading — the second argument is then
407
+ * `undefined`, which any registry that ignores it (every one that existed through v3) treats exactly as
408
+ * it treated the single-argument call.
409
+ * @param input - the live context, the real tool names, the logger, and the caller's optional scope.
401
410
  * @returns the registrations that did not show up (empty on success).
402
411
  */
403
412
  export declare function verifyRegisteredFaces(input: {
@@ -407,6 +416,12 @@ export declare function verifyRegisteredFaces(input: {
407
416
  readonly schemaNames?: readonly string[];
408
417
  readonly toolNames: readonly string[];
409
418
  readonly log: CompatLogger;
419
+ /**
420
+ * Opaque pass-through scope for the tools lookup (interface generation v4). Base does not interpret
421
+ * it — it is whatever the live `tools.get(name, scope)` accepts — and omitting it keeps the global
422
+ * one-argument reading.
423
+ */
424
+ readonly scope?: unknown;
410
425
  }): {
411
426
  readonly missing: readonly string[];
412
427
  };
@@ -1 +1 @@
1
- {"version":3,"file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AAA;IACrC,QAAQ,CAAC,GAAG,EAAE,YAAY,CAAA;IAC1B;;;;OAIG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CACzB,GAAG;IAAE,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CA0C1C"}
package/dist/compat.js CHANGED
@@ -716,7 +716,16 @@ export function declaredSchemaKeys(packageId, names) {
716
716
  * Known limit: invocation ENDPOINTS are not observable through the documented query surface
717
717
  * (`list`/`listPackages` expose schemas and the package model only), so the four descriptors are
718
718
  * covered through the schema keys they use, not counted themselves.
719
- * @param input - the live context, the real tool names, and the logger.
719
+ *
720
+ * `scope` is the OPTIONAL second argument the tools half hands to `tools.get`. A host whose registry
721
+ * is addressed per scope (a sub-session's `agent.ctx.tools.register`, for instance) answers `undefined`
722
+ * for a name that was really registered in some other scope, so a caller reading a scoped registration
723
+ * back has to name that scope or the check reports a false "missing". This module has NO DSH
724
+ * dependency and does not know what a scope IS: the value is passed through opaquely, exactly as the
725
+ * caller's own registry expects it. Omitting it keeps the older reading — the second argument is then
726
+ * `undefined`, which any registry that ignores it (every one that existed through v3) treats exactly as
727
+ * it treated the single-argument call.
728
+ * @param input - the live context, the real tool names, the logger, and the caller's optional scope.
720
729
  * @returns the registrations that did not show up (empty on success).
721
730
  */
722
731
  export function verifyRegisteredFaces(input) {
@@ -741,7 +750,11 @@ export function verifyRegisteredFaces(input) {
741
750
  if (isRecord(tools) && typeof tools['get'] === 'function') {
742
751
  for (const name of input.toolNames) {
743
752
  try {
744
- if (tools['get'](name) === undefined)
753
+ // The property is read once and called with the caller's scope; a `get` that only accepts one
754
+ // parameter (every registry v3 and earlier knew) simply ignores the second argument, so the
755
+ // omitted-scope reading is unchanged.
756
+ const get = tools['get'];
757
+ if (get(name, input.scope) === undefined)
745
758
  missing.push(name);
746
759
  }
747
760
  catch {
package/dist/index.d.ts CHANGED
@@ -8,7 +8,14 @@
8
8
  * installed plugins actually consume plus the extension points a plugin author is expected to call,
9
9
  * and nothing else: the zero-consumer composition pieces moved to `./internal` (see that module).
10
10
  *
11
- * The same surface is stated as a type + two name lists in `./interface.js`; `api/interface-v3.json`
11
+ * Those are two DIFFERENT kinds of claim, and `test/public-surface.spec.ts` keeps them apart instead of
12
+ * describing both as "consumed": the consumer half is PROVEN by a cross-tree scan (every `.` member must
13
+ * be read by a discovered plugin tree), while a member no tree reads today — an author-facing entry
14
+ * point such as `verdictOf` / `gatherEvidence` or the family paths — must be REGISTERED in that file's
15
+ * `EXTENSION_POINTS` with a one-line reason. A `.` member that is neither consumed nor registered is a
16
+ * red gate, not a hidden promise.
17
+ *
18
+ * The same surface is stated as a type + two name lists in `./interface.js`; `api/interface-v4.json`
12
19
  * is its snapshot, and `test/public-surface.spec.ts` keeps the three in step. Do not add a member
13
20
  * here without a generation decision.
14
21
  *
@@ -29,7 +36,7 @@ export { PromptFiles } from './kit/prompt_files.js';
29
36
  export type { LoadedPromptText, PromptFileSpec, PromptFilesIo, PromptFilesLogger, PromptFilesOptions } from './kit/prompt_files.js';
30
37
  export { wellFormedDeep, wellFormedText } from './kit/wellformed.js';
31
38
  export { INTERFACE_VERSION } from './interface.js';
32
- export type { BaseRuntimeV1, BaseRuntimeV2, BaseRuntimeV3, BaseTypeSurfaceV1, BaseTypeSurfaceV2, BaseTypeSurfaceV3, } from './interface.js';
39
+ export type { BaseRuntimeV1, BaseRuntimeV2, BaseRuntimeV3, BaseRuntimeV4, BaseTypeSurfaceV1, BaseTypeSurfaceV2, BaseTypeSurfaceV3, BaseTypeSurfaceV4, } from './interface.js';
33
40
  export { checkInterface, readInterfaceRequirement } from './interface_gate.js';
34
41
  export type { InterfaceRequirement, InterfaceVerdict } from './interface_gate.js';
35
42
  export type { AtStartup, AtUse, BuiltinKind, ItemPolicy, Kind, Manifest, MirrorPolicy, OnMissing, ProvisionItem, ResourceHandle, ResourceSource, ResourceState, Startup, EnsureOptions, Plan, PlanAction, PlanEntry, PlanOptions, ProvisionEvent, ProvisionReport, ProvisionReportEntry, ProvisionStatus, ReportAction, Disposable, ProgressEvent, ProvisionFs, ProvisionLock, ProvisionLogger, ProvisionPolicy, Provisioner, ProvisionerExperimental, ProvisionerOptions, PrunePolicy, PruneReport, InstallContext, InstallManifest, Provider, ProviderContext, ProviderPlan, ProbeResult, PublishMeta, Resolved, ResourceIdentity, } from './types.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACzE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtD,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAA;AACnF,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC5E,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAC3E,YAAY,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAQ5E,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,YAAY,EACZ,cAAc,EACd,SAAS,EACT,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,oBAAoB,EACpB,SAAS,EACT,qBAAqB,GACtB,MAAM,aAAa,CAAA;AACpB,YAAY,EACV,aAAa,EACb,cAAc,EACd,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,UAAU,EACV,aAAa,EACb,YAAY,EACZ,eAAe,EACf,YAAY,GACb,MAAM,aAAa,CAAA;AAYpB,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA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,EACb,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,gBAAgB,CAAA;AAMvB,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAA;AAC9E,YAAY,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAEjF,YAAY,EAEV,SAAS,EACT,KAAK,EACL,WAAW,EACX,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,aAAa,EAEb,cAAc,EACd,cAAc,EACd,aAAa,EACb,OAAO,EAEP,aAAa,EACb,IAAI,EACJ,UAAU,EACV,SAAS,EACT,WAAW,EACX,cAAc,EACd,eAAe,EACf,oBAAoB,EACpB,eAAe,EACf,YAAY,EAEZ,UAAU,EACV,aAAa,EACb,WAAW,EACX,aAAa,EACb,eAAe,EACf,eAAe,EACf,WAAW,EACX,uBAAuB,EACvB,kBAAkB,EAClB,WAAW,EACX,WAAW,EAEX,cAAc,EACd,eAAe,EACf,QAAQ,EACR,eAAe,EACf,YAAY,EACZ,WAAW,EACX,WAAW,EACX,QAAQ,EACR,gBAAgB,GACjB,MAAM,YAAY,CAAA"}
package/dist/index.js CHANGED
@@ -8,7 +8,14 @@
8
8
  * installed plugins actually consume plus the extension points a plugin author is expected to call,
9
9
  * and nothing else: the zero-consumer composition pieces moved to `./internal` (see that module).
10
10
  *
11
- * The same surface is stated as a type + two name lists in `./interface.js`; `api/interface-v3.json`
11
+ * Those are two DIFFERENT kinds of claim, and `test/public-surface.spec.ts` keeps them apart instead of
12
+ * describing both as "consumed": the consumer half is PROVEN by a cross-tree scan (every `.` member must
13
+ * be read by a discovered plugin tree), while a member no tree reads today — an author-facing entry
14
+ * point such as `verdictOf` / `gatherEvidence` or the family paths — must be REGISTERED in that file's
15
+ * `EXTENSION_POINTS` with a one-line reason. A `.` member that is neither consumed nor registered is a
16
+ * red gate, not a hidden promise.
17
+ *
18
+ * The same surface is stated as a type + two name lists in `./interface.js`; `api/interface-v4.json`
12
19
  * is its snapshot, and `test/public-surface.spec.ts` keeps the three in step. Do not add a member
13
20
  * here without a generation decision.
14
21
  *
@@ -30,10 +37,10 @@ export { BUILD_VERSIONS_FILE, COMPAT_PREFIX, compatReport, gatherEvidence, provi
30
37
  // base release, without rebuilding or republishing any plugin. Plugins therefore never inline this
31
38
  // code: they load the base at startup and take these capabilities from it at runtime.
32
39
  //
33
- // Generation v3 moved the members with no runtime consumer off `.`: `createPluginLogger` (both trees
34
- // use their own logger, which must exist before the base is resolved) and the Typert symbol kit
35
- // (`strictCodec` / `endpointId` / `fieldSymbol` / `resultSymbol`), which both trees keep as local
36
- // two-line mirrors because the Remote/wire faces are assembled at module load. Both live on
40
+ // Generation v3 moved the members with no runtime consumer off `.`: `createPluginLogger` (each tree
41
+ // uses its own logger, which must exist before the base is resolved) and the Typert symbol kit
42
+ // (`strictCodec` / `endpointId` / `fieldSymbol` / `resultSymbol`), which each tree keeps as a local
43
+ // two-line mirror because the Remote/wire faces are assembled at module load. Both live on
37
44
  // `./internal` now.
38
45
  export { expandHome, familyHome, familyModelsDir, familyToolsDir, resolveDataHome } from './kit/family.js';
39
46
  export { PromptFiles } from './kit/prompt_files.js';
@@ -44,11 +51,12 @@ export { wellFormedDeep, wellFormedText } from './kit/wellformed.js';
44
51
  // build time and compare against the value the base they loaded at runtime reports — it is the one
45
52
  // value here whose job is the RUNTIME interface gate rather than a caller's API, so it belongs on `.`.
46
53
  //
47
- // v1/v2 stay exported as their generations' type records: a caller compiled against them keeps a
48
- // name. v3 is the first generation that is NOT `extends` its predecessor — it PRUNES the zero-consumer
49
- // members to `./internal` (INTERFACE.md §9); the proof that this lost nothing is
50
- // `VALUE_NAMES_V3 ∪ PRUNED_VALUE_NAMES === VALUE_NAMES_V2` plus the cross-tree zero-consumer check in
51
- // `test/public-surface.spec.ts`.
54
+ // v1/v2/v3 stay exported as their generations' type records: a caller compiled against them keeps a
55
+ // name. v3 is the generation that PRUNES the zero-consumer members to `./internal` (INTERFACE.md §9);
56
+ // the proof that this lost nothing is `VALUE_NAMES_V3 ∪ PRUNED_VALUE_NAMES === VALUE_NAMES_V2` plus
57
+ // the cross-tree zero-consumer check in `test/public-surface.spec.ts`. v4 changes no name: it is the
58
+ // generation in which `verifyRegisteredFaces` takes an optional opaque `scope` (INTERFACE.md §10), so
59
+ // its lists are the v3 lists and `public-surface.spec.ts` asserts that instead of assuming it.
52
60
  export { INTERFACE_VERSION } from './interface.js';
53
61
  // The runtime interface gate: the verdict function the plugins call with the generation they baked,
54
62
  // and the ONE reader of a plugin's `lib/interface-version.json`. They live here rather than in each