@sema-agent/server 6.3.0 → 6.3.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.
@@ -335,6 +335,8 @@ export declare function contextUsageEventData(ev: {
335
335
  usedTokens?: unknown;
336
336
  windowTokens?: unknown;
337
337
  compactAtTokens?: unknown;
338
+ eventId?: unknown;
339
+ parentToolCallId?: unknown;
338
340
  }): Record<string, unknown>;
339
341
  /**
340
342
  * `turn_end` 的白名单投影 —— 🔴 2026-07-25 补:`turn_end` 此前是**唯一没有 builder 的内容臂**,两条持久化点
@@ -349,6 +351,8 @@ export declare function turnEndEventData(ev: {
349
351
  usage?: unknown;
350
352
  usageMissing?: true;
351
353
  stopReason?: string;
354
+ eventId?: unknown;
355
+ parentToolCallId?: unknown;
352
356
  }): Record<string, unknown>;
353
357
  /** Map core's `turn_end.usage` (1.76 / core [R59]: inputTokens/outputTokens/cacheReadTokens/cacheWriteTokens/
354
358
  * costMicroUsd; core 3.0.0 adds required `totalInputTokens`) → the contract's `TraceTurn.tokens`.
@@ -429,6 +429,8 @@ export function contextUsageEventData(ev) {
429
429
  ...(n(ev.usedTokens) !== undefined ? { usedTokens: n(ev.usedTokens) } : {}),
430
430
  ...(n(ev.windowTokens) !== undefined ? { windowTokens: n(ev.windowTokens) } : {}),
431
431
  ...(n(ev.compactAtTokens) !== undefined ? { compactAtTokens: n(ev.compactAtTokens) } : {}),
432
+ // [2557] 2.4:本分支带 TaskEventIdentity 而 builder 曾剥——差集门补进三构造器当场红出(compacted 同病先例)。
433
+ ...identityFields(ev),
432
434
  };
433
435
  }
434
436
  /**
@@ -445,6 +447,8 @@ export function turnEndEventData(ev) {
445
447
  ...(ev.usage ? { usage: ev.usage } : {}),
446
448
  ...(ev.usageMissing === true ? { usageMissing: true } : {}),
447
449
  ...(typeof ev.stopReason === "string" ? { stopReason: ev.stopReason } : {}),
450
+ // [2557] 2.4:同 contextUsage——identity 键(eventId/parentToolCallId)曾被剥,差集门红出补齐。
451
+ ...identityFields(ev),
448
452
  };
449
453
  }
450
454
  /** Map core's `turn_end.usage` (1.76 / core [R59]: inputTokens/outputTokens/cacheReadTokens/cacheWriteTokens/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sema-agent/server",
3
- "version": "6.3.0",
3
+ "version": "6.3.1",
4
4
  "description": "Sema Server — the server/API implementation layer for Sema, wiring core, registry, model providers, and cloud agent execution. Built on @sema-agent/core.",
5
5
  "type": "module",
6
6
  "license": "BUSL-1.1",