chat: search_chat over the shared source collection, huginn chat search (#57)

This commit is contained in:
Eureka 2026-11-11 19:11:25 +00:00 • committed by Eureka
commit 421ace5432
18 changed files with 1471 additions and 81 deletions

View file

@ -144,3 +144,22 @@ What changed since the map was written:
(`gamecult-chat:ruling:chat-index-minds-rooms`), Discord never.
- A Mind that must remember DM content writes a memory citing the chat or room
id as its source; the index is not where DM content is kept.
## Status: read side (cut chat-search)
Built: `huginn chat search [TEXT]... [--room R]... [--after T] [--before T] [--top-k N] [--json]`
over request `SearchChat` (`sources::search_chat`), listing oldest first without
texts and ranking by meaning with them. The chat point's shape is `ChatPayload`
(`sources/mod.rs`); every point carries `corpus` (`forge` or `chat`) and
`SourcesMeta.corpus` is `forge:GameCult+chat:rooms`. Not built: the ingest job
that writes chat points through `upsert_chat`, and the event-id window. Until the
ingest lands the collection holds no chat points and a chat search answers empty.
In a listing across rooms, the last hit's `ts_end_ms + 1` can repeat messages of
an earlier-starting longer chunk of another room; within one room it continues
exactly.
Known limits (owner of the fix: cut chat-window). Hits are ordered by their
trimmed start, not by the stored chunk start, and a long chunk trimmed to a span
that crosses rooms can be listed again by the continuation `--after`. Behaviour
is deliberately unchanged here; the event-id window in cut chat-window replaces
the time cursor.