@finddatatechnology/yongyi-client 0.1.2 → 0.1.3

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/dist/observe.d.ts CHANGED
@@ -18,6 +18,8 @@ export interface ObserveInput {
18
18
  /** 来源标注(跨 harness 合流,design D5)。 */
19
19
  harness?: string;
20
20
  metadata?: Record<string, unknown>;
21
+ /** 调用方 person 根内的目标 project(可选,缺省 default;只作根内名,不越根)。 */
22
+ project?: string;
21
23
  /** 有界超时(毫秒);缺省 10s(PLATFORM_FETCH_TIMEOUT_MS 语义)。 */
22
24
  timeoutMs?: number;
23
25
  fetchImpl?: FetchLike;
package/dist/observe.js CHANGED
@@ -30,6 +30,8 @@ function observePayload(input) {
30
30
  payload.harness = input.harness;
31
31
  if (input.metadata != null)
32
32
  payload.metadata = input.metadata;
33
+ if (input.project != null)
34
+ payload.project = input.project;
33
35
  return payload;
34
36
  }
35
37
  // 单次投递:校验-POST-返回,无排队。任何失败(网络/超时/4xx/5xx)都折算成
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finddatatechnology/yongyi-client",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "type": "module",
5
5
  "description": "永忆(YongYi / fd-memory)客户端 SDK:召回注入阶梯、纪律文本单源、五类事实捕获、令牌铸造缓存、/observe 上报。零运行时依赖,只以 fetch 打内核 HTTP 面。",
6
6
  "main": "./dist/index.js",