fix(typert): leave Node client bundling to operator layer
This commit is contained in:
1 parent
c36c077c5d
commit
557e4137bf
4 files changed
+6
-11
No files matched your search
@@ -15,8 +15,8 @@
|
||||
en: d152484eb41ac6b4
|
||||
zh: 09388d293f9be9cb
|
||||
/deepseek-ai-dsh-typert-registry/use-this-package:
|
||||
en: 688f3656b0f62771
|
||||
zh: 223d00ab0dc9fe20
|
||||
en: d885ccd8f13315f1
|
||||
zh: cea7c258f5f57e2d
|
||||
/deepseek-ai-dsh-typert-registry/use-this-package/minimal-setup:
|
||||
en: 1ec4b304a024bb3c
|
||||
zh: f17e796c26faabab
|
||||
@@ -24,8 +24,8 @@
|
||||
en: 254d265a3e5b1638
|
||||
zh: bfa325ec79afbc72
|
||||
/deepseek-ai-dsh-typert-registry/use-this-package/registering-a-contribution:
|
||||
en: 9ca425515904d5c9
|
||||
zh: b251226ecfa32002
|
||||
en: 2b2f750a1b145d85
|
||||
zh: d15c55c01af1755a
|
||||
/deepseek-ai-dsh-typert-registry/use-this-package/lookup-and-context-providers:
|
||||
en: bc9ea8f035ec1199
|
||||
zh: d25f1dc16cfc8654
|
||||
|
||||
@@ -25,7 +25,7 @@ English | [中文](README.zh.md)
|
||||
<a id="use-this-package"></a>
|
||||
## Use this package
|
||||
|
||||
Mount the registry in any Host or Client composition that stores or consumes generated Typert artifacts; it provides `ctx.typert`. There is no configuration. Node resolves `/client` to ordinary ESM for programmatic Cordis composition; browsers retain the Client bundle, and both use the same registry implementation.
|
||||
Mount the registry in any Host or Client composition that stores or consumes generated Typert artifacts; it provides `ctx.typert`. There is no configuration.
|
||||
|
||||
### Minimal setup
|
||||
|
||||
@@ -45,8 +45,6 @@ Invocation information is available through existing `ctx.typert.local.get/list`
|
||||
|
||||
Generated artifacts register through the [loader](../loader/README.md) in Loader compositions; any other owner calls `ctx.typert.register(contribution)` directly and receives the exact disposer that withdraws it. Duplicate package-face identities, schema keys, invocation ids, or endpoints reject the whole batch before anything is committed.
|
||||
|
||||
Harness offline integrations register an ordinary `TYPERT_REMOTE` contribution with `ctx.typert.remotes.register(contribution)` in their profile Context. `$mount(contribution)` already performs that registration, so registering and mounting the same contribution in the same registry duplicates it and fails. Keep offline metadata ownership separate from the live connection-and-mount Context. Independent offline consumers may instead read `TYPERT_REMOTE.methods` without any Registry. Registry state belongs to its Context and process, is not shared across processes, and neither registration nor querying opens a connection.
|
||||
|
||||
### Lookup and Context providers
|
||||
|
||||
Remote calls resolve Host objects and scoped Contexts through `ctx.typert.lookups` and `ctx.typert.contexts`. `registerHost()` installs the Host wire declaration and its wire-to-Context resolver, while `configureHost()` replaces only that resolver. `registerClient()` installs the bidirectional Client adapter for the same merge-declared kind. Host-to-Client event sources carry their domain identity explicitly instead of projecting it back from a Context.
|
||||
|
||||
@@ -25,7 +25,7 @@ kind: "package-reference"
|
||||
<a id="use-this-package"></a>
|
||||
## 使用本包
|
||||
|
||||
在存储或消费生成 Typert 产物的任何 Host 或 Client 组合中挂载本注册表;它提供 `ctx.typert`。没有配置。Node 将 `/client` 解析为普通 ESM,供程序化 Cordis 组合使用;浏览器仍使用 Client bundle,两者使用相同的注册表实现。
|
||||
在存储或消费生成 Typert 产物的任何 Host 或 Client 组合中挂载本注册表;它提供 `ctx.typert`。没有配置。
|
||||
|
||||
### 最小设置
|
||||
|
||||
@@ -45,8 +45,6 @@ kind: "package-reference"
|
||||
|
||||
生成产物在 Loader 组合中通过 [loader](../loader/README.zh.md) 注册;其他所有者直接调用 `ctx.typert.register(contribution)`,并获得撤销它的同一资源释放函数。重复的包与 face 组合键、schema 键、调用 id 或端点会在提交任何内容之前拒绝整个批次。
|
||||
|
||||
Harness 离线集成在各自的 profile Context 中通过 `ctx.typert.remotes.register(contribution)` 注册普通 `TYPERT_REMOTE` 贡献。`$mount(contribution)` 已执行该注册,因此在同一个注册表中先注册再挂载同一贡献会因重复而失败。离线元数据所有权应与建立实际连接及挂载的 Context 分离。独立离线消费方也可以直接读取 `TYPERT_REMOTE.methods`,无需任何 Registry。注册表状态归所属 Context 与进程所有,不跨进程共享;注册和查询都不会打开连接。
|
||||
|
||||
### Lookup 与 Context 提供方
|
||||
|
||||
Remote 调用通过 `ctx.typert.lookups` 与 `ctx.typert.contexts` 解析 Host 对象与作用域 Context。`registerHost()` 安装 Host wire 声明及其 wire 到 Context 的 resolver,`configureHost()` 只替换该 resolver。`registerClient()` 为同一个 merge-declared kind 安装双向 Client adapter。Host 到 Client 的事件源显式携带领域 identity,而不从 Context 反向投影。
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
},
|
||||
"./client": {
|
||||
"types": "./lib/types/client/index.d.ts",
|
||||
"node": "./lib/types/client/index.js",
|
||||
"default": "./lib/client.js"
|
||||
},
|
||||
"./types": {
|
||||
|
||||
Reference in new issue
Block a user