2eb723fb63
Ersetzt den v1-Text-Flow ('Name = Thema') durch ein strukturiertes
Interview mit 4 Fragen pro fehlendem Raum:
1. theme — 'Worum geht es in diesem Raum? (1–2 Sätze)'
2. keywords_100 — 'Welche Begriffe treffen SICHER zu? (Sofort-Match)'
3. keywords_context — 'Welche Begriffe deuten auf das Thema hin? (Kontext-Match)'
4. catch_all — 'Soll dieser Raum der Catch-All sein? (Ja/Nein)'
Änderungen:
- adapter.py: _start_onboarding() sendet Buttons pro Raum
[Projektraum einrichten] [Überspringen] [Später]
- adapter.py: _onboarding_state dict steuert Interview-Phasen
- adapter.py: _process_onboarding_response() verarbeitet Button-Klicks
(ONBOARD:<room_id>::<action>) und Text-Antworten auf die 4 Fragen
- adapter.py: _ask_onboarding_question(), _onboarding_next_room(),
_finish_onboarding() für den strukturierten Ablauf
- adapter.py: _process_incoming() erkennt ONBOARD:-Prefix und
prüft Operator-Raum-Zugehörigkeit
- room_map.py: RoomMap.save() mit fcntl.flock File-Lock gegen
parallele Schreibzugriffe
- room_map.py: add_or_update_room() akzeptiert keywords_100 und
keywords_context getrennt (v2-Schema)
- room-map.schema.json: version minimum=2, keywords→keywords_100
+ keywords_context
- room-map.json: generische Platzhalter (öffentliches Repo)
- Tests: 4 neue v2-Tests (keyword-Trennung, File-Lock, reload,
Single-Room v2-Felder), bestehende Tests auf v2-Schema migriert
Invarianten erhalten: Single-Room-Regel, DM-Ignorierung,
onboarding_active-Flag, kein Dauer-Check.
71 lines
2.5 KiB
JSON
71 lines
2.5 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://hermes-agent.nousresearch.com/schemas/room-map.schema.json",
|
|
"title": "Archivar Room Map",
|
|
"description": "Schema for the Archivar room-map.json — the single source of truth for thematic message routing. Version 2 splits keywords into keywords_100 (exact-match routing) and keywords_context (contextual routing).",
|
|
"type": "object",
|
|
"required": ["version", "rooms"],
|
|
"properties": {
|
|
"version": {
|
|
"type": "integer",
|
|
"description": "Schema version for future migrations.",
|
|
"minimum": 2
|
|
},
|
|
"rooms": {
|
|
"type": "object",
|
|
"description": "Map of room_id → RoomEntry.",
|
|
"additionalProperties": {
|
|
"type": "object",
|
|
"required": ["name", "theme"],
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"description": "Human-readable room name (e.g. '#Rocketchat-Plugin').",
|
|
"minLength": 1
|
|
},
|
|
"theme": {
|
|
"type": "string",
|
|
"description": "Theme / purpose of the room.",
|
|
"minLength": 1
|
|
},
|
|
"keywords_100": {
|
|
"type": "array",
|
|
"description": "Keywords for exact-match routing (high-confidence, low false-positive).",
|
|
"items": { "type": "string", "minLength": 1 },
|
|
"default": []
|
|
},
|
|
"keywords_context": {
|
|
"type": "array",
|
|
"description": "Keywords for contextual / semantic routing (broader match, may need disambiguation).",
|
|
"items": { "type": "string", "minLength": 1 },
|
|
"default": []
|
|
},
|
|
"catch_all": {
|
|
"type": "boolean",
|
|
"description": "True if this room is the single catch-all room.",
|
|
"default": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"excluded_rooms": {
|
|
"type": "array",
|
|
"description": "Room IDs that must never receive routed messages (e.g. Multi-Agent-Raum).",
|
|
"items": { "type": "string" },
|
|
"default": []
|
|
},
|
|
"fact_store_path": {
|
|
"type": "string",
|
|
"description": "Filesystem path for FAKT message storage (absolute or ~-prefixed).",
|
|
"default": "~/archivar_docs"
|
|
},
|
|
"keyword_overrides": {
|
|
"type": "object",
|
|
"description": "Admin-corrected keyword→room mappings (learned from !r overrides). Optional.",
|
|
"additionalProperties": { "type": "string" }
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|