kimi-code/packages/kap-server/test/services
haozhe.yang 7caed454c9 feat(kap-server): key WS internals by SessionRef and adapt /api/v1/ws
Implement the M6 milestone: all live maps, journals, subscriptions,
activity and cache keys inside kap-server are now keyed by the full
SessionRef, while the /api/v1/ws wire stays byte-identical.

- Resolve bare session ids once at attach time through the v1 resolver,
  pin the ref on the subscription, and address every broadcaster,
  transcript, fs-watch, and replay operation by ref; ambiguous or
  unavailable ids get a compatible ack error and no subscription.
- Re-key the transcript stores, op journals, event journals (now
  per-runtime directories), snapshot caches, and the lifecycle tracked
  map by sessionRefKey; bare-id lookups answer only on a unique match.
- Route internal session events by an internal runtimeId payload field
  (never projected onto the wire) with resolver fallback; keep the
  active-state queue append synchronous to preserve frame ordering.
- Add multi-runtime isolation tests (same sessionId on two runtimes
  never crosses transcript/prompt/journal streams) and a repeatable
  black-box comparison harness that diffs a base-commit server against
  this build over REST, WS, and export scenarios.
- Widen node-sdk PlanInfo.path to string|null to match the engine type
  and fix the stale resolver-fallback comment in the broadcaster.
2026-07-29 10:48:45 +08:00
..
transcript.test.ts feat(kap-server): key WS internals by SessionRef and adapt /api/v1/ws 2026-07-29 10:48:45 +08:00