58f00c0c23
Phase 1 (Datenmodell):
- plugin/archivar/room_map.py: RoomMap, RoomEntry, RoomMapValidationError
- room-map.schema.json: JSON-Schema für room-map.json
- room-map.json: Echte Raum-IDs (RC, BAT, LAN-Doku, DM Andreas)
- config.py: LLM_ROOM_PROMPT, ROOM_MAP_PATH, deprecated-Marker
Phase 2 (Router-Umbau):
- router.py: MessageRouter nutzt RoomMap statt ROOM_MAPPING Env-Vars
- Neue Methode _llm_room_lookup() fragt LLM: 'In welchen Raum?'
- Keyword-Match aus RoomEntry.keywords (vor Embedding)
- Excluded rooms check via RoomMap.is_excluded()
- origin_room_id Parameter für Multi-Agent-Raum-Ausschluss
Phase 3 (Integration):
- adapter_integration.py: _load_room_map() mit Env-Var-Fallback
- validate() beim Gateway-Start
- classify_and_route() reicht origin_room_id durch
- classifier.py: _llm_raw_sync() für Room-Prompts (nicht Kategorien)
12/12 Unit-Tests bestanden ✅
65 lines
2.1 KiB
JSON
65 lines
2.1 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.",
|
|
"type": "object",
|
|
"required": ["version", "rooms"],
|
|
"properties": {
|
|
"version": {
|
|
"type": "integer",
|
|
"description": "Schema version for future migrations.",
|
|
"minimum": 1
|
|
},
|
|
"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": {
|
|
"type": "array",
|
|
"description": "Keywords for keyword-based routing.",
|
|
"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).",
|
|
"additionalProperties": { "type": "string" }
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|