@deepseek-ai/dsh-typert-generator 0.1.5-rc.2 → 0.1.6-alpha.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.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/generator/README.md
5
- README.md: 48d79dfc44f6c2f658e8aa13836e5044d6cbf25d
6
- README.zh.md: e546661fe297d09367185585e43d486cd417090d
5
+ README.md: 7177e6a34520ab07645727edb15c5a726b9a2a4c
6
+ README.zh.md: c1add1907c7c14ee7dd440dfaceee0ece0aa036e
package/README.md CHANGED
@@ -79,7 +79,7 @@ The generator is built on one separation: extraction and emission are decoupled
79
79
 
80
80
  ### Analysis and faces
81
81
 
82
- Host and client are independent TypeScript programs. Direct project references establish compiler-face membership, while `dsh.client` package subpaths establish runtime-face contribution; `package.json#exports` marks every cross-package public boundary, and imports or re-exports are the only cross-face edges. A relative import that resolves inside the referencing package is followed through that module's re-exports until a package specifier appears, so package-local forwarding modules keep their original declaration references; a relative import that resolves into another package fails. `check` mode fails on syntax or semantic diagnostics, missing public annotations, private cross-package references, and reachable declaration merges the model cannot retain losslessly; `write` mode inserts checker-derived annotations and returns a clean check-mode model. Types owned by NPM dependencies remain `external` references instead of being expanded.
82
+ Host and Client are independent TypeScript programs. Direct project references establish compiler-face membership, while `dsh.client` package subpaths establish runtime-face contribution; `package.json#exports` marks every cross-package public boundary, and imports or re-exports are the only cross-face edges. A relative import that resolves inside the referencing package is followed through that module's re-exports until a package specifier appears, so package-local forwarding modules keep their original declaration references; a relative import that resolves into another package fails. `check` mode fails on syntax or semantic diagnostics, missing public annotations, private cross-package references, and reachable declaration merges the model cannot retain losslessly; `write` mode inserts checker-derived annotations and returns a clean check-mode model. Types owned by NPM dependencies remain `external` references instead of being expanded.
83
83
 
84
84
  ### Emission and publication contract
85
85
 
@@ -138,4 +138,4 @@ None.
138
138
 
139
139
  </details>
140
140
 
141
- **Runtime invariant:** No companion is published. This source-project analyzer and build-time emitter runs outside any cordis runtime; model snapshots, executable artifacts, and consuming-package typechecks enforce its output contract.
141
+ **Runtime invariant:** No companion is published. The source-project analyzer and build-time emitter run outside any Cordis runtime; model snapshots, executable artifacts, and consuming-package typechecks enforce the output contract.
package/README.zh.md CHANGED
@@ -9,7 +9,7 @@ kind: "package-library"
9
9
 
10
10
  ## 概述
11
11
 
12
- `dsh-typert-generator` 让维护者把公开的 TypeScript 类型转换为构建产物和与编译器无关的模型。包通过 `./typert` 和可选的 `./client/typert` 导出选择加入;如果声明、发布清单、Remote 导出或 Zod 投影无法被正确表示,生成过程就会失败。仓库构建可以生成可执行 schema 与配套声明,工具也可以调用 `WorkspaceAnalyzer` 完成检查或目录生成而不发布产物。生成过程只在构建时运行,绝不会进入实时 agent 会话。
12
+ `dsh-typert-generator` 让维护者把公开的 TypeScript 类型转换为构建产物和与编译器无关的模型。包通过 `./typert` 和可选的 `./client/typert` 导出选择加入;如果声明、发布清单、Remote 导出或 Zod 投影无法被正确表示,生成过程就会失败。仓库构建可以生成可执行 schema 与配套声明,工具也可以调用 `WorkspaceAnalyzer` 完成检查或目录生成而不发布产物。生成过程只在构建时运行,绝不会进入实时 agent(智能体)会话。
13
13
 
14
14
  ## 目录
15
15
 
@@ -45,11 +45,11 @@ files:
45
45
 
46
46
  ### 静态分析工作区
47
47
 
48
- 静态消费方直接以工作区的 `tsconfig.host.json` 与 `tsconfig.client.json` aggregate 调用 `WorkspaceAnalyzer`,选择 face 与包子集,并在不生成或加载运行时产物的前提下读取生成的 `FaceModel` 与类型图。`analyzeInBatches()` 通过有界的编译器程序处理大批量包选择,模型形态保持一致;`discoverPackages()` 无需构建类型检查程序即可找出参与贡献的包。
48
+ 静态消费方直接针对工作区的 `tsconfig.host.json` 与 `tsconfig.client.json` 聚合配置调用 `WorkspaceAnalyzer`,选择 face 与包子集,并在不生成或加载运行时产物的前提下读取生成的 `FaceModel` 与类型图。`analyzeInBatches()` 通过有界的编译器程序处理大批量包选择,模型形态保持一致;`discoverPackages()` 无需构建类型检查程序即可找出参与贡献的包。
49
49
 
50
50
  ### 在 tsdown 构建中运行生成
51
51
 
52
- 包的 `./tsdown` 子路径为根 tsdown 配置提供 `typertPlugin()`:它在打包前降低 TypeScript 依赖中的标准装饰器,并在包输出根目录生成模型驱动的 face 产物。`package` 模式只生成当前打包的包;`workspace` 模式对每个显式贡献方各生成一次。
52
+ 包的 `./tsdown` 子路径为根 tsdown 配置提供 `typertPlugin()`:它在打包前转换 TypeScript 依赖中的标准装饰器,并在包输出根目录生成模型驱动的 face 产物。`package` 模式只生成当前打包的包;`workspace` 模式对每个显式贡献方各生成一次。
53
53
 
54
54
  -----
55
55
 
@@ -63,7 +63,7 @@ files:
63
63
 
64
64
  ### 设计理念
65
65
 
66
- 生成器建立在一个分离之上:提取与生成通过与编译器无关的模型解耦。`WorkspaceAnalyzer` 读取以 face aggregate tsconfig 为种子的 TypeScript 程序,产出 `FaceModel` 与 `TypeGraph` 数据;`FaceModelEmitter` 只消费该模型,绝不接收编译器节点。模型保留声明标识、泛型参数及应用、显式继承、条件类型与映射类型、导入属性、abstract 修饰符与源码 JSDoc,并排除构造函数、静态成员与非公共成员。
66
+ 生成器遵循一项核心分离原则:提取与生成通过与编译器无关的模型解耦。`WorkspaceAnalyzer` 读取以 face aggregate tsconfig 为种子的 TypeScript 程序,产出 `FaceModel` 与 `TypeGraph` 数据;`FaceModelEmitter` 只消费该模型,绝不接收编译器节点。模型保留声明标识、泛型参数及应用、显式继承、条件类型与映射类型、导入属性、abstract 修饰符与源码 JSDoc,并排除构造函数、静态成员与非公共成员。
67
67
 
68
68
  ### 源码地图
69
69
 
@@ -74,7 +74,7 @@ files:
74
74
  | [`src/model.ts`](src/model.ts) | 与编译器无关的模型类型 |
75
75
  | [`src/emitter.ts`](src/emitter.ts) | `FaceModelEmitter`:Zod schema 与声明生成、Remote 声明 |
76
76
  | [`src/workspace.ts`](src/workspace.ts) | `WorkspaceTypertGenerator`:发现、生成、导出与文件清单校验 |
77
- | [`src/tsdown-plugin.ts`](src/tsdown-plugin.ts) | tsdown 插件面:装饰器降低与产物生成 |
77
+ | [`src/tsdown-plugin.ts`](src/tsdown-plugin.ts) | tsdown 插件面:装饰器转换与产物生成 |
78
78
  | [`src/cordis-catalog.ts`](src/cordis-catalog.ts) | 生成 Cordis 目录所用的目录投影 |
79
79
 
80
80
  ### 分析与 face
@@ -101,8 +101,8 @@ Host 与 Client 是两个独立的 TypeScript 程序。直接项目引用确定
101
101
  - [Typert 子系统参考](../../../docs/subsystems/typert.zh.md)——生成器建模的 Remote 约定与注册表接口。
102
102
  - [Typert 协议](../protocol/README.zh.md)——生成产物所扩展并消费的声明。
103
103
  - [Typert 注册表](../registry/README.zh.md)——生成产物所供给的运行时存储。
104
- - [API Gateway 参考](../../../docs/api-gateway.zh.md)——生成的 Remote 描述符如何端到端被调用。
105
- - [Compiler-independent model Agent Note](../../../.agents/notes/implemented/architecture/2026-07-27-compiler-independent-typert-model.zh.md)——模型设计、备选方案与后果。
104
+ - [API 网关参考](../../../docs/api-gateway.zh.md)——生成的 Remote 描述符如何端到端被调用。
105
+ - [与编译器无关的模型 Agent Note](../../../.agents/notes/implemented/architecture/2026-07-27-compiler-independent-typert-model.zh.md)——模型设计、备选方案与后果。
106
106
 
107
107
  -----
108
108
 
@@ -138,4 +138,4 @@ Host 与 Client 是两个独立的 TypeScript 程序。直接项目引用确定
138
138
 
139
139
  </details>
140
140
 
141
- **运行时不变式:** 不发布伴生入口。这是运行于 Cordis 之外的源码分析器与构建时 emitter;model snapshot、可执行 artifact 与消费包 typecheck 强制其输出约定。
141
+ **运行时不变式:** 不发布伴生入口。源码项目分析器与构建时 emitter 均不在任何 Cordis 运行时中运行;模型快照、可执行产物与消费方包的类型检查会强制执行其输出约定。
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-typert-generator",
3
3
  "description": "TypeScript project analyzer and model-driven Typert artifact generator",
4
- "version": "0.1.5-rc.2",
4
+ "version": "0.1.6-alpha.1",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -40,8 +40,8 @@
40
40
  },
41
41
  "devDependencies": {
42
42
  "zod": "^4.4.3",
43
- "@deepseek-ai/dsh-tool-cordis": "^0.1.5-rc.2",
44
- "@deepseek-ai/dsh-typert-registry": "^0.1.5-rc.2",
43
+ "@deepseek-ai/dsh-tool-cordis": "^0.1.6-alpha.1",
44
+ "@deepseek-ai/dsh-typert-registry": "^0.1.6-alpha.1",
45
45
  "@deepseek-ai/cordis": "^4.0.2"
46
46
  }
47
47
  }