@deepseek-ai/dsh-typert-loader 0.1.6-alpha.1 → 0.1.6-alpha.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/README.i18n.yaml CHANGED
@@ -2,5 +2,5 @@
2
2
  # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
3
  # after editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write packages/typert/loader/README.md
5
- README.md: 378be98dea5f47e4d6b0a0c70600e2a4c221c80b
6
- README.zh.md: e598127bba12e4057405231fe09199db18f9604d
5
+ README.md: c45fbdebe7c2a05491515c3679ca2a3338285ca1
6
+ README.zh.md: 9cb6ae6da5da30292d74e05932cd147090aa4dc8
package/README.md CHANGED
@@ -9,7 +9,7 @@ English | [中文](README.zh.md)
9
9
 
10
10
  ## Summary
11
11
 
12
- With `dsh-typert-loader` mounted, every package that mounts in a Loader composition automatically contributes its generated Typert reflection and schemas to the runtime registry — and withdraws them when the package or the plugin unmounts. Packages without the generated export are skipped, so adding the plugin to any composition is safe. An explicit `packages` list covers plugins nested behind another Loader entry, whose fibers carry no resolvable package specifier. It is a Node-only plugin and needs the config-tree resolution anchor to resolve packages.
12
+ With `dsh-typert-loader` mounted, every package that mounts in a Loader composition automatically contributes its generated Typert reflection and schema factories to the runtime registry — and withdraws them when the package or the plugin unmounts. Packages without the generated export are skipped, so adding the plugin to any composition is safe. An explicit `packages` list covers plugins nested behind another Loader entry, whose fibers carry no resolvable package specifier. It is a Node-only plugin and needs the config-tree resolution anchor to resolve packages.
13
13
 
14
14
  ## Table of Contents
15
15
 
@@ -44,7 +44,7 @@ The generated [configuration catalog](../../../docs/config-catalog.md#deepseek-a
44
44
 
45
45
  ### What gets registered
46
46
 
47
- Each qualifying Loader entry contributes its generated host-face reflection and schemas to the runtime registry. Registration follows the entry lifecycle: it is withdrawn when the entry or the plugin unmounts, and an import that settles after either owner is gone is discarded.
47
+ Each qualifying Loader entry contributes its generated host-face reflection and schema factories to the runtime registry. Registration follows the entry lifecycle: it is withdrawn when the entry or the plugin unmounts, and an import that settles after either owner is gone is discarded.
48
48
 
49
49
  ### Observable behavior and failures
50
50
 
@@ -66,7 +66,7 @@ The plugin is an incremental scanner mirroring the client-modules node half: eve
66
66
 
67
67
  ### Manifest validation
68
68
 
69
- `validateTypertManifest()` is the module/file boundary: the manifest crosses from a build artifact into the typed registry, so every field is checked. The manifest must name the package that exports it, carry face `host`, hold zod v4 schema instances, and keep well-formed service, event, object, member, type, and documentation records; invocation descriptors must use strict codecs. Every failure names the package and the defect.
69
+ `validateTypertManifest()` is the module/file boundary: the manifest crosses from a build artifact into the typed registry, so every field is checked. The manifest must name the package that exports it, carry face `host`, hold schema factories, and keep well-formed service, event, object, member, type, and documentation records; invocation descriptors must use strict codecs with factories. Every failure names the package and the defect.
70
70
 
71
71
  ### Caching and ownership
72
72
 
package/README.zh.md CHANGED
@@ -9,7 +9,7 @@ kind: "package-reference"
9
9
 
10
10
  ## 概述
11
11
 
12
- 挂载 `dsh-typert-loader` 后,Loader 组合中每个挂载的包都会自动把其生成的 Typert 反射与 schema 贡献给运行时注册表——并在包或本插件卸载时自动撤销。没有该导出的包会被跳过,因此在任何 Loader 组合中挂载它都是安全的。显式 `packages` 用于覆盖嵌套在另一 Loader 配置项之下的插件,这些插件的 fiber 不携带可解析的包说明符。它是仅支持 Node 的插件,需要配置树解析锚点才能解析包。
12
+ 挂载 `dsh-typert-loader` 后,Loader 组合中每个挂载的包都会自动把其生成的 Typert 反射与 schema factory 贡献给运行时注册表——并在包或本插件卸载时自动撤销。没有该导出的包会被跳过,因此在任何 Loader 组合中挂载它都是安全的。显式 `packages` 用于覆盖嵌套在另一 Loader 配置项之下的插件,这些插件的 fiber 不携带可解析的包说明符。它是仅支持 Node 的插件,需要配置树解析锚点才能解析包。
13
13
 
14
14
  ## 目录
15
15
 
@@ -44,7 +44,7 @@ kind: "package-reference"
44
44
 
45
45
  ### 注册什么
46
46
 
47
- 每个符合条件的 Loader 配置项都会把其生成的宿主侧反射与 schema 贡献给运行时注册表。注册跟随配置项生命周期:配置项或本插件卸载时撤销;在配置项或本插件任一方卸载后才结束的导入操作会被丢弃。
47
+ 每个符合条件的 Loader 配置项都会把其生成的宿主侧反射与 schema factory 贡献给运行时注册表。注册跟随配置项生命周期:配置项或本插件卸载时撤销;在配置项或本插件任一方卸载后才结束的导入操作会被丢弃。
48
48
 
49
49
  ### 可观察行为与失败
50
50
 
@@ -66,7 +66,7 @@ kind: "package-reference"
66
66
 
67
67
  ### Manifest 校验
68
68
 
69
- `validateTypertManifest()` 是模块/文件边界:manifest 从构建产物进入类型化注册表,因此每个字段都会被检查。manifest 必须指名导出它的包、携带 `host` face、持有 zod v4 schema 实例,并保持服务、事件、对象、成员、类型与文档记录格式正确;调用描述符必须使用严格编解码器。每次失败都会指名包与缺陷。
69
+ `validateTypertManifest()` 是模块/文件边界:manifest 从构建产物进入类型化注册表,因此每个字段都会被检查。manifest 必须指名导出它的包、携带 `host` face、持有 schema factory,并保持服务、事件、对象、成员、类型与文档记录格式正确;调用描述符必须使用带 factory 的严格编解码器。每次失败都会指名包与缺陷。
70
70
 
71
71
  ### 缓存与归属
72
72
 
package/lib/index.js CHANGED
@@ -84,7 +84,7 @@ function validateTypertManifest(pkgName, exported) {
84
84
  if (typeof value !== "object" || value === null) throw new Error(`typert-loader: ${pkgName} TYPERT.schemas contains a non-object schema`);
85
85
  const schema = value;
86
86
  requireString(pkgName, schema, "name", "schema");
87
- if (typeof schema.schema !== "object" || schema.schema === null || !("_zod" in schema.schema)) throw new Error(`typert-loader: ${pkgName} TYPERT schema "${schema.name}" is not a zod v4 schema instance`);
87
+ if (typeof schema.create !== "function") throw new Error(`typert-loader: ${pkgName} TYPERT schema "${schema.name}" has no create() factory`);
88
88
  }
89
89
  const model = requireObject(pkgName, manifest.model, "TYPERT.model");
90
90
  const services = requireArray(pkgName, model.services, "TYPERT.model.services");
@@ -207,7 +207,7 @@ function requireStrictCodec(pkgName, value, subject) {
207
207
  const codec = requireObject(pkgName, value, subject);
208
208
  if (codec.mode !== "strict") throw new Error(`typert-loader: ${pkgName} ${subject} must use a strict codec`);
209
209
  requireString(pkgName, codec, "typeSymbol", subject);
210
- if (typeof codec.schema !== "object" || codec.schema === null || !("_zod" in codec.schema) || typeof codec.schema.parse !== "function") throw new Error(`typert-loader: ${pkgName} ${subject} is not backed by a zod v4 schema`);
210
+ if (typeof codec.create !== "function") throw new Error(`typert-loader: ${pkgName} ${subject} has no create() factory`);
211
211
  }
212
212
  /**
213
213
  * Scan current Loader entries during activation, then follow entry mounts and
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-typert-loader",
3
3
  "description": "Loader integration for generated Typert package contributions",
4
- "version": "0.1.6-alpha.1",
4
+ "version": "0.1.6-alpha.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -28,7 +28,7 @@
28
28
  "license": "MIT",
29
29
  "peerDependencies": {
30
30
  "@deepseek-ai/cordis-plugin-loader": "^1.0.3",
31
- "@deepseek-ai/dsh-typert-registry": "^0.1.6-alpha.1",
31
+ "@deepseek-ai/dsh-typert-registry": "^0.1.6-alpha.2",
32
32
  "@deepseek-ai/cordis": "^4.0.2"
33
33
  },
34
34
  "dependencies": {
@@ -36,9 +36,9 @@
36
36
  },
37
37
  "devDependencies": {
38
38
  "zod": "^4.4.3",
39
- "@deepseek-ai/dsh-app-boot": "^0.1.6-alpha.1",
39
+ "@deepseek-ai/dsh-app-boot": "^0.1.6-alpha.2",
40
40
  "@deepseek-ai/cordis-plugin-loader": "^1.0.3",
41
- "@deepseek-ai/dsh-typert-registry": "^0.1.6-alpha.1",
41
+ "@deepseek-ai/dsh-typert-registry": "^0.1.6-alpha.2",
42
42
  "@deepseek-ai/cordis": "^4.0.2"
43
43
  }
44
44
  }