kimi-code/packages/minidb/test
Haozhe ceaa96942b
feat(kap-server): add global message search with literal and live-session modes (#2321)
* feat(kap-server): add the /api/v1/search global message search endpoint

Cross-session full-text search over user messages, assistant text and
session titles, backed by a minidb index under <home>/search-index with a
single-writer lock election and read-only WAL catch-up for other
processes. Hits carry transcript anchors (turn ordinal and step id) so
clients can jump straight to the matching turn or step.

* feat(kimi-inspect): add a search view with chat-timeline navigation

The left rail gains a Search view over the global search endpoint, with
role and sort filters and cursor pagination. Clicking a hit switches to
the chat view and navigates to its session, agent, turn and step — the
channel pages the turn into the loaded window, scrolls it into view and
flashes the target briefly.

* chore(kimi-code): start the dev server without built web assets

The repo's dev server scripts (dev:server, dev:kap-server,
dev:kap-server:multi, dev:server:restart) now set KIMI_CODE_DEV_SERVER=1.
When it is set and dist-web/index.html is missing, kimi web starts the
API server without the bundled web UI instead of failing at startup,
so backend dev no longer requires a kimi-web build.

* feat(kap-server): add literal substring search and a live session route

- minidb: text indexes accept an injectable tokenizer/queryTokenizer,
  and a hashed 2/3-gram tokenizer (NFKC + lowercase, code-point
  windows) backs substring search; tokenizer names persist in
  db.textindexes.json with backward-compatible defaults
- /api/v1/search gains mode: 'literal' — n-gram candidates confirmed
  against the original text (zero false positives), with an
  'candidate_cap' incomplete flag when the candidate set truncates
- container.session_id queries against a session live in this process
  scan the in-memory transcript store instead of the index (both
  modes); the response's source: live|index field names the serving
  route and rides in the page-token fingerprint
- kimi-inspect: exact-match toggle and source badge in the search
  view, plus an in-chat session search bar with jump-to-hit navigation

* test(kimi-inspect): avoid stringifying BodyInit in search api tests
2026-07-28 21:47:50 +08:00
..
cluster feat(minidb): switch agent-core-v2 query-store to ClusterDb with 16 shards (#1907) 2026-07-19 16:04:26 +08:00
e2e feat(minidb): ClusterDb sharding, incremental reader catch-up, and engine hardening (#1816) 2026-07-17 15:57:10 +08:00
batch.test.ts feat(v2): land agent-core-v2 engine and kap-server behind experimental flag (#1441) 2026-07-12 21:44:04 +08:00
codec.test.ts feat(v2): land agent-core-v2 engine and kap-server behind experimental flag (#1441) 2026-07-12 21:44:04 +08:00
compaction-fault.test.ts feat(minidb): ClusterDb sharding, incremental reader catch-up, and engine hardening (#1816) 2026-07-17 15:57:10 +08:00
compaction-internal.test.ts feat(v2): land agent-core-v2 engine and kap-server behind experimental flag (#1441) 2026-07-12 21:44:04 +08:00
compaction.test.ts feat(minidb): ClusterDb sharding, incremental reader catch-up, and engine hardening (#1816) 2026-07-17 15:57:10 +08:00
compound-index.test.ts feat(v2): land agent-core-v2 engine and kap-server behind experimental flag (#1441) 2026-07-12 21:44:04 +08:00
crc32.test.ts feat(v2): land agent-core-v2 engine and kap-server behind experimental flag (#1441) 2026-07-12 21:44:04 +08:00
db.test.ts feat(minidb): ClusterDb sharding, incremental reader catch-up, and engine hardening (#1816) 2026-07-17 15:57:10 +08:00
defense.test.ts feat(v2): land agent-core-v2 engine and kap-server behind experimental flag (#1441) 2026-07-12 21:44:04 +08:00
degrade.test.ts feat(minidb): ClusterDb sharding, incremental reader catch-up, and engine hardening (#1816) 2026-07-17 15:57:10 +08:00
indexes-extra.test.ts feat(v2): land agent-core-v2 engine and kap-server behind experimental flag (#1441) 2026-07-12 21:44:04 +08:00
indexes.test.ts feat(v2): land agent-core-v2 engine and kap-server behind experimental flag (#1441) 2026-07-12 21:44:04 +08:00
lock.test.ts feat(v2): land agent-core-v2 engine and kap-server behind experimental flag (#1441) 2026-07-12 21:44:04 +08:00
query-engine.test.ts feat(v2): land agent-core-v2 engine and kap-server behind experimental flag (#1441) 2026-07-12 21:44:04 +08:00
query.test.ts feat(v2): land agent-core-v2 engine and kap-server behind experimental flag (#1441) 2026-07-12 21:44:04 +08:00
recovery.test.ts feat(minidb): ClusterDb sharding, incremental reader catch-up, and engine hardening (#1816) 2026-07-17 15:57:10 +08:00
review-fixes.test.ts feat(v2): land agent-core-v2 engine and kap-server behind experimental flag (#1441) 2026-07-12 21:44:04 +08:00
review-round2.test.ts feat(minidb): ClusterDb sharding, incremental reader catch-up, and engine hardening (#1816) 2026-07-17 15:57:10 +08:00
review-round3.test.ts feat(v2): land agent-core-v2 engine and kap-server behind experimental flag (#1441) 2026-07-12 21:44:04 +08:00
review-round4.test.ts feat(v2): land agent-core-v2 engine and kap-server behind experimental flag (#1441) 2026-07-12 21:44:04 +08:00
review-round5.test.ts feat(v2): land agent-core-v2 engine and kap-server behind experimental flag (#1441) 2026-07-12 21:44:04 +08:00
server-extra.test.ts feat(minidb): ClusterDb sharding, incremental reader catch-up, and engine hardening (#1816) 2026-07-17 15:57:10 +08:00
server.test.ts feat(v2): land agent-core-v2 engine and kap-server behind experimental flag (#1441) 2026-07-12 21:44:04 +08:00
skiplist.test.ts feat(v2): land agent-core-v2 engine and kap-server behind experimental flag (#1441) 2026-07-12 21:44:04 +08:00
stats.test.ts feat(v2): land agent-core-v2 engine and kap-server behind experimental flag (#1441) 2026-07-12 21:44:04 +08:00
store.test.ts feat(minidb): ClusterDb sharding, incremental reader catch-up, and engine hardening (#1816) 2026-07-17 15:57:10 +08:00
text-index.test.ts feat(kap-server): add global message search with literal and live-session modes (#2321) 2026-07-28 21:47:50 +08:00
wal.test.ts feat(minidb): ClusterDb sharding, incremental reader catch-up, and engine hardening (#1816) 2026-07-17 15:57:10 +08:00