• ctrl/chat_llm.ini exec/chat_llm.js chat_llm_irc.js llm_index.js exec/l

    From Rob Swindell (on Debian Linux)@1:103/705 to Git commit to main/sbbs/master on Sun May 31 19:06:06 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/f4630b0a17237b8f8ef08728
    Modified Files:
    ctrl/chat_llm.ini exec/chat_llm.js chat_llm_irc.js llm_index.js exec/llm_tools/relay_message.js
    Log Message:
    chat_llm: per-name data/chat subdirectory layout

    Move per-persona chat_llm files out of the flat data/chat/ namespace into per-guru subdirectories data/chat/<name>/ (name = persona code before ':'), eliminating filename-prefix collisions and the safe_id ':'<->'_' ambiguity (guru:irc vs guru_irc) the flat scheme allowed.

    data/chat/<name>/ holds:
    - llm_rag.idx RAG index, shared across the guru's modes
    (IRC bot + terminal guru)
    - irc_relay.json, irc_mute.json, irc_norelay.json, irc_seen.json
    IRC state, proto-prefixed
    - <speaker>[.<proto>].json per-speaker memory; the proto tag keeps a
    speaker's terminal vs IRC memory from colliding Naming: '_' joins fixed name-parts, '.' separates the variable proto/ext.

    - chat_llm.js: persona_parts()/persona_dir() helpers; memory_path() ->
    data/chat/<name>/<speaker>[.<proto>].json; index_output default ->
    chat/<persona>/llm_rag.idx. User-numbered speaker ids zero-padded to
    %04u (user_0001) to match Synchronet's data/user/0001.* convention.
    - llm_index.js: writes chat/<name>/llm_rag.idx, keyed on the NAME part so
    `llm_index.js guru` and `... guru:irc` agree with load_index().
    - chat_llm_irc.js: PERSONA_NAME/PROTO/DIR; IRC state under PERSONA_DIR;
    chat log + .announce stay in data root (short hand-touch paths).
    - relay_message.js: off-session defaults under data/chat/guru/; the
    recipient history-scan now reads the persona dir (from env.relay_path).
    - ctrl/chat_llm.ini: index_output = chat/<persona>/llm_rag.idx.

    Live data migrated into the new layout (33 files; index moved by rename,
    no rebuild). Validated: path resolution, full regression unit suite, and end-to-end relay opt-out honored from the new path.

    Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)