@finddatatechnology/yongyi-client 0.1.6 → 0.1.8

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.
Files changed (2) hide show
  1. package/dist/tokens.js +9 -2
  2. package/package.json +1 -1
package/dist/tokens.js CHANGED
@@ -19,8 +19,15 @@ export function cellMemoryConfig(env = process.env) {
19
19
  const url = String(env.CELL_MEMORY_URL || "").replace(/\/+$/, "");
20
20
  const platformToken = String(env.CELL_MEMORY_PLATFORM_TOKEN || "");
21
21
  const dataRoot = String(env.CELL_MEMORY_DATA || "");
22
- const feedKey = String(env.CELL_MEMORY_FEED || "") || undefined;
23
- return enabled && url && platformToken && dataRoot ? { url, platformToken, dataRoot, feedKey } : null;
22
+ if (!(enabled && url && platformToken && dataRoot))
23
+ return null;
24
+ const cfg = { url, platformToken, dataRoot };
25
+ // Omitted, not set to undefined: callers deep-compare the config against the
26
+ // pre-feed golden, and an own `feedKey: undefined` key changes that shape.
27
+ const feedKey = String(env.CELL_MEMORY_FEED || "");
28
+ if (feedKey)
29
+ cfg.feedKey = feedKey;
30
+ return cfg;
24
31
  }
25
32
  function cachePath(dataRoot, ownerEmail) {
26
33
  const safe = String(ownerEmail || "unknown").replace(/[^a-zA-Z0-9@._-]/g, "_");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finddatatechnology/yongyi-client",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "type": "module",
5
5
  "description": "永忆(YongYi / fd-memory)客户端 SDK:召回注入阶梯、纪律文本单源、五类事实捕获、令牌铸造缓存、/observe 上报。零运行时依赖,只以 fetch 打内核 HTTP 面。",
6
6
  "main": "./dist/index.js",