{"nodes": [{"id": "bridge_app", "label": "Hermes-Dify Bridge FastAPI App", "file_type": "code", "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L216", "source_url": null, "captured_at": null, "author": null, "contributor": null}, {"id": "bridge_chatrequest", "label": "ChatRequest Pydantic Model", "file_type": "code", "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L220-222", "source_url": null, "captured_at": null, "author": null, "contributor": null}, {"id": "bridge_chat", "label": "POST /chat Endpoint", "file_type": "code", "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L230-251", "source_url": null, "captured_at": null, "author": null, "contributor": null}, {"id": "bridge_health", "label": "GET /health Endpoint", "file_type": "code", "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L225-227", "source_url": null, "captured_at": null, "author": null, "contributor": null}, {"id": "bridge_run_hermes", "label": "run_hermes Async Function", "file_type": "code", "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L197-213", "source_url": null, "captured_at": null, "author": null, "contributor": null}, {"id": "bridge_get_latest_session_id", "label": "get_latest_session_id Async Function", "file_type": "code", "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L184-194", "source_url": null, "captured_at": null, "author": null, "contributor": null}, {"id": "bridge_load_map", "label": "load_map Session Persistence Function", "file_type": "code", "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L173-177", "source_url": null, "captured_at": null, "author": null, "contributor": null}, {"id": "bridge_save_map", "label": "save_map Session Persistence Function", "file_type": "code", "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L180-181", "source_url": null, "captured_at": null, "author": null, "contributor": null}, {"id": "bridge_staff_context", "label": "STAFF_CONTEXT System Prompt", "file_type": "rationale", "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L16-170", "source_url": null, "captured_at": null, "author": null, "contributor": null, "rationale": "Encodes all behavioral rules for Laila (staff AI assistant): memory-first policy via Ruflo, identity verification with owner code 1969, revenue data passcode 1987, PMS skill routing, letterhead mandate, clarification-before-execution rule, and rule amendment protection. Design intent: inject full context on every Hermes call to keep stateless CLI sessions coherent."}, {"id": "bridge_session_map", "label": "Session Map (conversation_id \u2192 hermes session_id)", "file_type": "rationale", "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L14", "source_url": null, "captured_at": null, "author": null, "contributor": null, "rationale": "Maps Dify conversation IDs to Hermes session IDs persisted in ~/.hermes-dify-bridge-sessions.json, enabling multi-turn conversations across stateless HTTP calls."}, {"id": "bridge_hermes_bin", "label": "Hermes CLI Binary", "file_type": "code", "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L9", "source_url": null, "captured_at": null, "author": null, "contributor": null}, {"id": "bridge_files_dir", "label": "Static Files Directory (/files)", "file_type": "code", "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L11-13", "source_url": null, "captured_at": null, "author": null, "contributor": null}, {"id": "bamboo_hospitality_group", "label": "Bamboo Hospitality Group Sdn. Bhd.", "file_type": "rationale", "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L17", "source_url": null, "captured_at": null, "author": null, "contributor": null}, {"id": "societe_suites_hartamas", "label": "Societe Suites Hartamas", "file_type": "rationale", "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L17", "source_url": null, "captured_at": null, "author": null, "contributor": null}, {"id": "ooak_suites_mont_kiara", "label": "The Ooak Suites Mont Kiara", "file_type": "rationale", "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L17", "source_url": null, "captured_at": null, "author": null, "contributor": null}, {"id": "laila_persona", "label": "Laila \u2014 Bamboo Hospitality Internal Staff AI Assistant", "file_type": "rationale", "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L17", "source_url": null, "captured_at": null, "author": null, "contributor": null, "rationale": "Laila is the AI persona injected via STAFF_CONTEXT into every Hermes invocation. Operates on Dify staff channel. Scoped to hotel operations: revenue, check-in/out, duty roster, housekeeping. Identity protected by two passcodes: owner verification (1969) and financial data access (1987)."}, {"id": "bamboo_email_api", "label": "bamboo-email-api (Port 3001)", "file_type": "code", "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L144-167", "source_url": null, "captured_at": null, "author": null, "contributor": null}, {"id": "ruflo_memory_integration", "label": "Ruflo Memory Integration (Staff Context Recall)", "file_type": "rationale", "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L23-31", "source_url": null, "captured_at": null, "author": null, "contributor": null, "rationale": "Laila must perform semantic and exact Ruflo memory lookups before responding to any staff request, personalising answers using stored staff profiles. New significant data is stored back after task completion."}, {"id": "lh_pms_skill", "label": "Little Hotelier PMS Skill (lh_fetch / lh_revenue / lh_hk)", "file_type": "rationale", "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L70-92", "source_url": null, "captured_at": null, "author": null, "contributor": null, "rationale": "Mandatory skill invoked for all hotel data: check-in/out via lh_fetch.py --report checkin, revenue via lh_revenue.py, housekeeping via lh_hk.py. Revenue commands gate-kept by passcode 1987."}, {"id": "duty_roster_google_sheet", "label": "Bamboo Duty Roster Google Sheet", "file_type": "rationale", "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L109", "source_url": "https://docs.google.com/spreadsheets/d/1f0cPoNAfvRWc2NPDtuPmM3cd_t-rXO2lJrxEfGTHv2Q", "captured_at": null, "author": null, "contributor": null}], "edges": [{"source": "bridge_chat", "target": "bridge_load_map", "relation": "calls", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L233", "weight": 1.0}, {"source": "bridge_chat", "target": "bridge_run_hermes", "relation": "calls", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L236", "weight": 1.0}, {"source": "bridge_chat", "target": "bridge_get_latest_session_id", "relation": "calls", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L239", "weight": 1.0}, {"source": "bridge_chat", "target": "bridge_save_map", "relation": "calls", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L241", "weight": 1.0}, {"source": "bridge_run_hermes", "target": "bridge_staff_context", "relation": "references", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L198", "weight": 1.0}, {"source": "bridge_run_hermes", "target": "bridge_hermes_bin", "relation": "calls", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L199-209", "weight": 1.0}, {"source": "bridge_get_latest_session_id", "target": "bridge_hermes_bin", "relation": "calls", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L185-192", "weight": 1.0}, {"source": "bridge_load_map", "target": "bridge_session_map", "relation": "references", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L175", "weight": 1.0}, {"source": "bridge_save_map", "target": "bridge_session_map", "relation": "references", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L181", "weight": 1.0}, {"source": "bridge_app", "target": "bridge_files_dir", "relation": "references", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L217", "weight": 1.0}, {"source": "bridge_staff_context", "target": "bridge_files_dir", "relation": "references", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L140-141", "weight": 1.0}, {"source": "bridge_staff_context", "target": "bamboo_email_api", "relation": "references", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L144-167", "weight": 1.0}, {"source": "bridge_staff_context", "target": "ruflo_memory_integration", "relation": "references", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L23-31", "weight": 1.0}, {"source": "bridge_staff_context", "target": "lh_pms_skill", "relation": "references", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L70-92", "weight": 1.0}, {"source": "bridge_staff_context", "target": "duty_roster_google_sheet", "relation": "references", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L109", "weight": 1.0}, {"source": "bridge_staff_context", "target": "laila_persona", "relation": "rationale_for", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L16-170", "weight": 1.0}, {"source": "laila_persona", "target": "bamboo_hospitality_group", "relation": "references", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L17", "weight": 1.0}, {"source": "laila_persona", "target": "societe_suites_hartamas", "relation": "references", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L17", "weight": 1.0}, {"source": "laila_persona", "target": "ooak_suites_mont_kiara", "relation": "references", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L17", "weight": 1.0}, {"source": "lh_pms_skill", "target": "checkin_checkout_04may2026_html", "relation": "references", "confidence": "INFERRED", "confidence_score": 0.85, "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L86", "weight": 0.85}, {"source": "lh_pms_skill", "target": "bamboo_revenue_april2026", "relation": "references", "confidence": "INFERRED", "confidence_score": 0.85, "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L89", "weight": 0.85}, {"source": "bamboo_hospitality_group", "target": "societe_suites_hartamas", "relation": "references", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L17", "weight": 1.0}, {"source": "bamboo_hospitality_group", "target": "ooak_suites_mont_kiara", "relation": "references", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L17", "weight": 1.0}, {"source": "bridge_staff_context", "target": "bamboo_email_api", "relation": "references", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "hermes-dify-bridge/bridge.py", "source_location": "L144", "weight": 1.0}], "hyperedges": [{"id": "laila_hotel_data_pipeline", "label": "Laila Hotel Data Pipeline: PMS Skill \u2192 Hermes \u2192 Bridge \u2192 Dify", "nodes": ["lh_pms_skill", "bridge_run_hermes", "bridge_chat", "laila_persona"], "relation": "participate_in", "confidence": "INFERRED", "confidence_score": 0.85, "source_file": "hermes-dify-bridge/bridge.py"}, {"id": "session_continuity_mechanism", "label": "Session Continuity: load_map \u2192 run_hermes (resume) \u2192 get_latest_session_id \u2192 save_map", "nodes": ["bridge_load_map", "bridge_run_hermes", "bridge_get_latest_session_id", "bridge_save_map"], "relation": "implement", "confidence": "EXTRACTED", "confidence_score": 0.95, "source_file": "hermes-dify-bridge/bridge.py"}]}