@deepseek-ai/dsh-typert-registry 0.1.3-alpha.2 → 0.1.5-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/registry/README.md
5
- README.md: 8238ad1613367d04b44d0b87fb15a0cfde91e325
6
- README.zh.md: fcba26636e9da42d84cb6c5ab426b6c0023c9a29
5
+ README.md: c1ab98ae8ebe720a29eb4fb339f39e00ce593120
6
+ README.zh.md: 7bf90ff8fd02c4fb17c4f57d1af251a7a4bd3116
package/README.md CHANGED
@@ -45,7 +45,7 @@ Generated artifacts register through the [loader](../loader/README.md) in Loader
45
45
 
46
46
  ### Lookup and Context providers
47
47
 
48
- Remote calls resolve Host objects and scoped Contexts through `ctx.typert.lookups` and `ctx.typert.contexts`. `registerHost()` installs one bidirectional Host Context adapter and its wire declaration, while `configureHost()` replaces only its resolver. `registerClient()` installs the bidirectional Client adapter for the same merge-declared kind. `identifyHost(ctx)` asks the Host adapters for the single kind and identity represented by a live Context and rejects ambiguous recognition.
48
+ 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.
49
49
 
50
50
  -----
51
51
 
package/README.zh.md CHANGED
@@ -45,7 +45,7 @@ kind: "package-reference"
45
45
 
46
46
  ### Lookup 与 Context 提供方
47
47
 
48
- Remote 调用通过 `ctx.typert.lookups` 与 `ctx.typert.contexts` 解析 Host 对象与作用域 Context。`registerHost()` 安装一个双向 Host Context adapter 及其 wire 声明,`configureHost()` 只替换其中的 resolver。`registerClient()` 为同一个 merge-declared kind 安装双向 Client adapter。`identifyHost(ctx)` 通过 Host adapter 识别活 Context 所代表的唯一 kind 与 identity,并拒绝歧义识别。
48
+ 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 反向投影。
49
49
 
50
50
  -----
51
51
 
package/lib/client.js CHANGED
@@ -1059,7 +1059,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
1059
1059
  registerHost: (key, adapter) => this.registerHost(ctx, key, adapter),
1060
1060
  configureHost: (key, resolver) => this.configureHost(ctx, key, resolver),
1061
1061
  registerClient: (key, adapter) => this.registerClient(ctx, key, adapter),
1062
- identifyHost: (context) => this.identifyHost(context),
1063
1062
  getHost: (key) => this.getHost(key),
1064
1063
  getClient: (key) => this.clients.get(key)?.provider,
1065
1064
  subscribe: (listener) => this.changes.subscribe(ctx, listener)
@@ -1073,23 +1072,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
1073
1072
  return {
1074
1073
  wire: adapter.wire,
1075
1074
  wireTypeSymbol: adapter.wireTypeSymbol,
1076
- identity: (context) => adapter.identity(context),
1077
1075
  resolve: (id) => resolver.resolve(id)
1078
1076
  };
1079
1077
  }
1080
- identifyHost(ctx) {
1081
- let match;
1082
- for (const key of this.hosts.keys()) {
1083
- const identity = this.getHost(key)?.identity(ctx);
1084
- if (identity === void 0) continue;
1085
- if (match !== void 0) throw new Error(`typert: Host Context is recognized by both ${JSON.stringify(match.kind)} and ${JSON.stringify(key)}`);
1086
- match = {
1087
- kind: key,
1088
- identity
1089
- };
1090
- }
1091
- return match;
1092
- }
1093
1078
  configureHost(ctx, key, resolver) {
1094
1079
  validateSegment("Context key", key);
1095
1080
  if (this.hostResolvers.has(key)) throw new Error(`typert: host-context "${key}" resolver is already configured`);
package/lib/index.js CHANGED
@@ -267,7 +267,6 @@ var ContextStore = class {
267
267
  registerHost: (key, adapter) => this.registerHost(ctx, key, adapter),
268
268
  configureHost: (key, resolver) => this.configureHost(ctx, key, resolver),
269
269
  registerClient: (key, adapter) => this.registerClient(ctx, key, adapter),
270
- identifyHost: (context) => this.identifyHost(context),
271
270
  getHost: (key) => this.getHost(key),
272
271
  getClient: (key) => this.clients.get(key)?.provider,
273
272
  subscribe: (listener) => this.changes.subscribe(ctx, listener)
@@ -281,23 +280,9 @@ var ContextStore = class {
281
280
  return {
282
281
  wire: adapter.wire,
283
282
  wireTypeSymbol: adapter.wireTypeSymbol,
284
- identity: (context) => adapter.identity(context),
285
283
  resolve: (id) => resolver.resolve(id)
286
284
  };
287
285
  }
288
- identifyHost(ctx) {
289
- let match;
290
- for (const key of this.hosts.keys()) {
291
- const identity = this.getHost(key)?.identity(ctx);
292
- if (identity === void 0) continue;
293
- if (match !== void 0) throw new Error(`typert: Host Context is recognized by both ${JSON.stringify(match.kind)} and ${JSON.stringify(key)}`);
294
- match = {
295
- kind: key,
296
- identity
297
- };
298
- }
299
- return match;
300
- }
301
286
  configureHost(ctx, key, resolver) {
302
287
  validateSegment("Context key", key);
303
288
  if (this.hostResolvers.has(key)) throw new Error(`typert: host-context "${key}" resolver is already configured`);
@@ -270,7 +270,6 @@ class ContextStore {
270
270
  registerHost: (key, adapter) => this.registerHost(ctx, key, adapter),
271
271
  configureHost: (key, resolver) => this.configureHost(ctx, key, resolver),
272
272
  registerClient: (key, adapter) => this.registerClient(ctx, key, adapter),
273
- identifyHost: context => this.identifyHost(context),
274
273
  getHost: key => this.getHost(key),
275
274
  getClient: key => this.clients.get(key)?.provider,
276
275
  subscribe: listener => this.changes.subscribe(ctx, listener),
@@ -286,23 +285,9 @@ class ContextStore {
286
285
  return {
287
286
  wire: adapter.wire,
288
287
  wireTypeSymbol: adapter.wireTypeSymbol,
289
- identity: context => adapter.identity(context),
290
288
  resolve: id => resolver.resolve(id),
291
289
  };
292
290
  }
293
- identifyHost(ctx) {
294
- let match;
295
- for (const key of this.hosts.keys()) {
296
- const identity = this.getHost(key)?.identity(ctx);
297
- if (identity === undefined)
298
- continue;
299
- if (match !== undefined) {
300
- throw new Error(`typert: Host Context is recognized by both ${JSON.stringify(match.kind)} and ${JSON.stringify(key)}`);
301
- }
302
- match = { kind: key, identity };
303
- }
304
- return match;
305
- }
306
291
  configureHost(ctx, key, resolver) {
307
292
  validateSegment('Context key', key);
308
293
  if (this.hostResolvers.has(key))
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-typert-registry",
3
3
  "description": "Runtime registry for generated package reflection and Zod schemas",
4
- "version": "0.1.3-alpha.2",
4
+ "version": "0.1.5-alpha.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -51,7 +51,7 @@
51
51
  },
52
52
  "devDependencies": {
53
53
  "@deepseek-ai/cordis": "^4.0.2",
54
- "@deepseek-ai/dsh-typert-protocol": "^0.1.3-alpha.2"
54
+ "@deepseek-ai/dsh-typert-protocol": "^0.1.5-alpha.2"
55
55
  },
56
56
  "scripts": {
57
57
  "bundle": "tsdown",