Add Matrix NL-query Q&A surface (W2 step 5)
Read-only natural-language query over the curated nl_query endpoint, answered in-thread. Two entry points (room-per-purpose model): a dedicated Q&A room (MATRIX_QUERY_ROOM) where every top-level message is a question, plus the ?/@bot trigger in the intake room as a cross-room convenience. Both routes hit the same handle_query -> crm_client.nl_query -> POST /api/query/nl; translation runs on the box's local model, nothing leaves the box, and there is no write path so no approval gate applies. Pure logic (trigger parsing, answer rendering) in query.py with offline tests; async room wiring in bot.py (live-smoke only, per the bot's convention). Bot-side only, ships on the Spark via git pull + restart. Depends on the box-side /api/query/nl endpoint, which lands with the v93 s9pk (reminders + W2): until v93 is installed the Q&A surface 404s, so the bot deploy is staged to follow that install.
This commit is contained in:
@@ -64,6 +64,12 @@ MATRIX_INTAKE_ROOM=!<roomid>:<homeserver>
|
||||
# whole email-review poll loop. The bot must be a member of this room. Needs the server side in the
|
||||
# s9pk (≥ v0.1.0:89) and the bot's CRM user set to role 'bot' (see docs/guides/matrix-intake.md).
|
||||
MATRIX_EMAIL_REVIEW_ROOM=!<roomid>:<homeserver>
|
||||
# Dedicated read-only Q&A room (W2): every top-level message here is answered as a natural-language
|
||||
# query (translated on the box's LOCAL model — nothing leaves the box), no '?'/'@bot' trigger needed.
|
||||
# The '?'/'@bot' trigger still also works in the intake room. Leave empty to disable the dedicated
|
||||
# room (questions then go via the intake-room trigger). The bot must be a member of this room. Needs
|
||||
# the server side in the s9pk (POST /api/query/nl) and the bot's CRM user set to role 'bot'.
|
||||
MATRIX_QUERY_ROOM=!<roomid>:<homeserver>
|
||||
# CRM write-back: the bot logs in as a DEDICATED service user (admin-created CRM user;
|
||||
# the CRM has no service-key path, so it uses normal Bearer-JWT auth).
|
||||
CRM_API_BASE=http://127.0.0.1:8080
|
||||
|
||||
Reference in New Issue
Block a user