kimi-code/packages/kap-server/test
haozhe.yang c0295dddc1 fix(kap-server): reconcile global message search with the runtime session host
Rebasing onto main pulled in the global message search feature, which
predates the multi-runtime rework and conflicts with it in three places:

- start.ts wired TranscriptService straight into the search service's
  LiveTranscriptSource, but the transcript service is now keyed by full
  SessionRef while the search query container carries a bare session id.
  Wire a composition-root adapter instead: resolve the bare id against
  the runtime host's live scopes (unique match only, mirroring the v1
  resolver's projection semantics) and delegate by ref.
- The search index scans on-disk wire.jsonl files and enumerates sessions
  through ISessionIndex, tripping the v1 compatibility guard's layout and
  index bans. Exempt search/searchService.ts with a documented reason on
  both rules: the feature is local-layout-only by design, multi-runtime
  search indexing is future work. Stale exemptions now fail the guard.
- Extend the frozen /api/v1 wire baseline with the /api/v1/search route
  the branch predates.
2026-07-29 10:56:29 +08:00
..
__snapshots__ fix(kap-server): reconcile global message search with the runtime session host 2026-07-29 10:56:29 +08:00
blackbox feat(kap-server): key WS internals by SessionRef and adapt /api/v1/ws 2026-07-29 10:48:45 +08:00
helpers feat(kap-server): resolve v1 session ids centrally and delegate cold reads to runtimes 2026-07-29 10:48:45 +08:00
search feat(kap-server): add global message search with literal and live-session modes (#2321) 2026-07-28 21:47:50 +08:00
services feat(kap-server): key WS internals by SessionRef and adapt /api/v1/ws 2026-07-29 10:48:45 +08:00
apiSurface.snapshot.test.ts refactor(agent-core-v2): add session host runtime contracts and v1 wire baseline 2026-07-29 10:48:11 +08:00
approvals.test.ts feat(v2): land agent-core-v2 engine and kap-server behind experimental flag (#1441) 2026-07-12 21:44:04 +08:00
auth.test.ts feat(config): add env overrides for loop control and background task limits (#1993) 2026-07-21 19:49:00 +08:00
authMiddleware.test.ts feat(v2): land agent-core-v2 engine and kap-server behind experimental flag (#1441) 2026-07-12 21:44:04 +08:00
authTokenStore.test.ts feat(v2): land agent-core-v2 engine and kap-server behind experimental flag (#1441) 2026-07-12 21:44:04 +08:00
authWiring.e2e.test.ts feat(v2): land agent-core-v2 engine and kap-server behind experimental flag (#1441) 2026-07-12 21:44:04 +08:00
bindClassify.test.ts feat(v2): land agent-core-v2 engine and kap-server behind experimental flag (#1441) 2026-07-12 21:44:04 +08:00
boot.test.ts feat(kap-server): wire cloud telemetry for engine events (#2230) 2026-07-27 17:18:16 +08:00
config.test.ts feat(kap-server): accept secondary_model in the config API (#2228) 2026-07-27 16:45:18 +08:00
connections.test.ts feat(transcript): add unified transcript layer, drop the /api/v2 RPC surface (#1888) 2026-07-20 15:33:05 +08:00
debugNonloopback.e2e.test.ts feat(kimi-inspect): add kap-server web inspector with dev-only /api/v1/debug RPC surface (#1806) 2026-07-17 15:56:53 +08:00
disableAuth.e2e.test.ts feat(transcript): add unified transcript layer, drop the /api/v2 RPC surface (#1888) 2026-07-20 15:33:05 +08:00
files.test.ts feat(server): remove the 50 MiB upload size cap and stream uploads to disk (#2312) 2026-07-28 17:01:45 +08:00
fs-watch.e2e.test.ts refactor(agent-core-v2): remove session context path fields and finalize guards 2026-07-29 10:48:45 +08:00
fs.test.ts refactor(agent-core-v2): rebuild the model wire layer on the kosong architecture (#1970) 2026-07-21 13:03:54 +08:00
guiStore.test.ts feat(v2): land agent-core-v2 engine and kap-server behind experimental flag (#1441) 2026-07-12 21:44:04 +08:00
hostExposure.e2e.test.ts fix(server): allow inline styles in CSP so web math renders on non-loopback binds (#1847) 2026-07-17 20:21:10 +08:00
hostnames.test.ts feat(cli): replace the kimi server command tree with kimi web and share one home across servers (#1826) 2026-07-19 11:43:46 +08:00
inFlightTurnTracker.test.ts refactor(kap-server): drop the @moonshot-ai/protocol dependency (#1755) 2026-07-15 22:40:05 +08:00
instanceRegistry.test.ts feat(cli): replace the kimi server command tree with kimi web and share one home across servers (#1826) 2026-07-19 11:43:46 +08:00
messages.test.ts refactor(agent-core-v2): rebuild the model wire layer on the kosong architecture (#1970) 2026-07-21 13:03:54 +08:00
modelCatalog.test.ts feat(kap-server): add provider write endpoints and models.dev/registry import (#2110) 2026-07-24 14:00:16 +08:00
modelCatalogCatalog.test.ts feat(kap-server): add provider write endpoints and models.dev/registry import (#2110) 2026-07-24 14:00:16 +08:00
modelCatalogProviderWrite.test.ts feat(kap-server): add provider write endpoints and models.dev/registry import (#2110) 2026-07-24 14:00:16 +08:00
modelCatalogRefreshScheduler.test.ts refactor(agent-core-v2): rebuild the model wire layer on the kosong architecture (#1970) 2026-07-21 13:03:54 +08:00
multiRuntimeIsolation.test.ts feat(kap-server): key WS internals by SessionRef and adapt /api/v1/ws 2026-07-29 10:48:45 +08:00
oauthUsage.test.ts feat(oauth): return structured managed usage rows (#2300) 2026-07-28 15:03:25 +08:00
openapi.test.ts feat(web): add session diagnostic export (#1646) 2026-07-14 12:48:28 +08:00
origin.test.ts feat(server): allow X-Kimi-Client-* headers and reflect request headers in CORS (#1661) 2026-07-14 11:51:43 +08:00
prompts.test.ts feat(kap-server): switch live v1 routes to runtime-backed sessions 2026-07-29 10:48:45 +08:00
publicApi.test.ts feat(v2): land agent-core-v2 engine and kap-server behind experimental flag (#1441) 2026-07-12 21:44:04 +08:00
questions.test.ts feat(v2): land agent-core-v2 engine and kap-server behind experimental flag (#1441) 2026-07-12 21:44:04 +08:00
rateLimit.test.ts fix(kap-server): close auth bypass via percent-encoded API paths (#1753) 2026-07-15 23:05:19 +08:00
requestLogging.test.ts feat(v2): land agent-core-v2 engine and kap-server behind experimental flag (#1441) 2026-07-12 21:44:04 +08:00
rpc.test.ts feat: agent-core-v2 permission/workspace refactors and transcript durability (#2021) 2026-07-22 19:21:56 +08:00
securityExposure.test.ts fix(server): allow inline styles in CSP so web math renders on non-loopback binds (#1847) 2026-07-17 20:21:10 +08:00
securityHeaders.test.ts fix(server): allow inline styles in CSP so web math renders on non-loopback binds (#1847) 2026-07-17 20:21:10 +08:00
sessionEventBroadcaster.test.ts feat(kap-server): key WS internals by SessionRef and adapt /api/v1/ws 2026-07-29 10:48:45 +08:00
sessionEventJournal.test.ts refactor(agent-core-v2): derive session busy from agent activity (#1751) 2026-07-15 23:33:58 +08:00
sessions.test.ts feat(agent-core-v2): add session transfer service and cross-runtime fork 2026-07-29 10:48:45 +08:00
skills.test.ts refactor(kap-server): drop the @moonshot-ai/protocol dependency (#1755) 2026-07-15 22:40:05 +08:00
snapshot.test.ts refactor(agent-core-v2): remove session context path fields and finalize guards 2026-07-29 10:48:45 +08:00
snapshotReader.unit.test.ts feat(kap-server): resolve v1 session ids centrally and delegate cold reads to runtimes 2026-07-29 10:48:45 +08:00
subagentRosterTracker.test.ts refactor(kap-server): drop the @moonshot-ai/protocol dependency (#1755) 2026-07-15 22:40:05 +08:00
tasks.test.ts refactor(agent-core-v2): rebuild the model wire layer on the kosong architecture (#1970) 2026-07-21 13:03:54 +08:00
telemetry.test.ts feat(kap-server): wire cloud telemetry for engine events (#2230) 2026-07-27 17:18:16 +08:00
terminals.test.ts refactor(agent-core-v2): register tools as scoped services (#2196) 2026-07-26 14:32:59 +08:00
tools.test.ts feat(kap-server): expose per-tool active state in GET /api/v1/tools (#2005) 2026-07-21 19:23:15 +08:00
transcript.test.ts feat(kap-server): switch live v1 routes to runtime-backed sessions 2026-07-29 10:48:45 +08:00
transport-errors.test.ts feat(transcript): add unified transcript layer, drop the /api/v2 RPC surface (#1888) 2026-07-20 15:33:05 +08:00
v1Compatibility.test.ts feat(kap-server): resolve v1 session ids centrally and delegate cold reads to runtimes 2026-07-29 10:48:45 +08:00
v1CompatibilityGuard.test.ts fix(kap-server): reconcile global message search with the runtime session host 2026-07-29 10:56:29 +08:00
v1SessionProjection.test.ts feat(kap-server): resolve v1 session ids centrally and delegate cold reads to runtimes 2026-07-29 10:48:45 +08:00
v1SessionRefResolver.test.ts feat(kap-server): resolve v1 session ids centrally and delegate cold reads to runtimes 2026-07-29 10:48:45 +08:00
workspaceFs.test.ts feat(kap-server): add global fs:mkdir endpoint (#2281) 2026-07-28 10:50:39 +08:00
workspaces.test.ts fix(workspace): dedupe workspaces across Windows path spelling variants (#1809) 2026-07-17 14:56:06 +08:00
wsBearerProtocol.test.ts feat(v2): land agent-core-v2 engine and kap-server behind experimental flag (#1441) 2026-07-12 21:44:04 +08:00
wsConnectionV1.test.ts feat(kap-server): key WS internals by SessionRef and adapt /api/v1/ws 2026-07-29 10:48:45 +08:00
wsHostOrigin.test.ts feat(transcript): add unified transcript layer, drop the /api/v2 RPC surface (#1888) 2026-07-20 15:33:05 +08:00
wsUpgradeAuth.test.ts feat(transcript): add unified transcript layer, drop the /api/v2 RPC surface (#1888) 2026-07-20 15:33:05 +08:00
wsV1Resync.test.ts refactor(agent-core-v2): split agent lifecycle into existence, subagent, and session MCP domains (#1624) 2026-07-14 14:13:41 +08:00