Compare commits
3 Commits
fix/1430-g
...
fix/1120
| Author | SHA1 | Date | |
|---|---|---|---|
| 1b0d9bc694 | |||
| 6222de3261 | |||
|
|
cc55075fb7 |
3
app.js
3
app.js
@@ -734,9 +734,6 @@ async function init() {
|
||||
const response = await fetch('./portals.json');
|
||||
const portalData = await response.json();
|
||||
createPortals(portalData);
|
||||
|
||||
// Start portal hot-reload watcher
|
||||
if (window.PortalHotReload) PortalHotReload.start(5000);
|
||||
} catch (e) {
|
||||
console.error('Failed to load portals.json:', e);
|
||||
addChatMessage('error', 'Portal registry offline. Check logs.');
|
||||
|
||||
@@ -32,14 +32,6 @@ from datetime import datetime, timedelta, timezone
|
||||
from pathlib import Path
|
||||
from typing import Optional
|
||||
|
||||
# ── Safety guard ───────────────────────────────────────────────────────
|
||||
# Prevent accidental execution from git commit messages containing
|
||||
# code examples with backticks (shell substitution). See issue #1430.
|
||||
if os.environ.get("GIT_DIR") or os.environ.get("GIT_INDEX_FILE"):
|
||||
# Running inside a git hook — exit silently to prevent
|
||||
# shell substitution in commit messages from triggering mining.
|
||||
sys.exit(0)
|
||||
|
||||
logging.basicConfig(
|
||||
level=logging.INFO,
|
||||
format="%(asctime)s [%(levelname)s] %(message)s",
|
||||
|
||||
55
docs/hermes-capabilities.md
Normal file
55
docs/hermes-capabilities.md
Normal file
@@ -0,0 +1,55 @@
|
||||
# Hermes Agent Capability Expansion — Status Tracker
|
||||
|
||||
Epic #1120. Six workstreams transforming Hermes from chatbot to sovereign agent.
|
||||
|
||||
## Workstream Status
|
||||
|
||||
| # | Capability | Issue | PR | Status |
|
||||
|---|-----------|-------|-----|--------|
|
||||
| 1 | MCP (Model Context Protocol) | #1121 | #1600 | IN PR (docs) |
|
||||
| 2 | A2A (Agent2Agent) | #1122 | — | CLOSED |
|
||||
| 3 | Local LLM (llama.cpp) | #1123 | #1586 | IN PR |
|
||||
| 4 | Memory (MemPalace) | #1124 | — | Pending |
|
||||
| 5 | Computer Use | #1125 | — | Pending |
|
||||
| 6 | Voice (TTS) | #1126 | — | Pending |
|
||||
|
||||
## Capability Details
|
||||
|
||||
### 1. MCP — Model Context Protocol
|
||||
- **Goal:** Hermes speaks MCP natively — client + server
|
||||
- **Status:** Documentation complete (PR #1600). Client code exists in `tools/mcp_tool.py`
|
||||
- **Next:** Server implementation, integration testing
|
||||
|
||||
### 2. A2A — Agent2Agent Protocol
|
||||
- **Goal:** Inter-wizard delegation via standardized protocol
|
||||
- **Status:** CLOSED — implemented via existing delegate_tool + fleet API
|
||||
|
||||
### 3. Local LLM — llama.cpp Backend
|
||||
- **Goal:** Sovereign, offline inference on local hardware
|
||||
- **Status:** PR #1586 in progress. Ollama integration exists for some models
|
||||
- **Next:** Standardize llama.cpp backend, FP8 quantization
|
||||
|
||||
### 4. Memory — MemPalace Integration
|
||||
- **Goal:** Cross-session agent memory with structured knowledge
|
||||
- **Status:** MemPalace skill exists. Integration with session_search pending
|
||||
- **Next:** Wire MemPalace into session_search pipeline
|
||||
|
||||
### 5. Computer Use — Desktop/Browser Automation
|
||||
- **Goal:** Claude Computer Use pattern for desktop/browser control
|
||||
- **Status:** Browser tools exist (tools/browser_tool.py). Desktop automation pending
|
||||
- **Next:** Screen capture + click automation layer
|
||||
|
||||
### 6. Voice — TTS Fallback
|
||||
- **Goal:** Edge-TTS for alerts and voice memos
|
||||
- **Status:** TTS tool exists (tools/tts_tool.py). Edge-TTS backend pending
|
||||
- **Next:** Wire edge-tts as fallback for cloud TTS
|
||||
|
||||
## Definition of Done
|
||||
|
||||
- [ ] All 6 sub-issues closed or descoped with reason
|
||||
- [ ] At least 3 capabilities live in production (Beta/Alpha)
|
||||
- [ ] Documentation updated
|
||||
- [ ] Demo: cross-capability flow recorded
|
||||
|
||||
## Target: 2026-05-31
|
||||
## Owner: Bezalel
|
||||
@@ -397,7 +397,6 @@
|
||||
<script src="./boot.js"></script>
|
||||
<script src="./avatar-customization.js"></script>
|
||||
<script src="./lod-system.js"></script>
|
||||
<script src="./portal-hot-reload.js"></script>
|
||||
<script>
|
||||
function openMemoryFilter() { renderFilterList(); document.getElementById('memory-filter').style.display = 'flex'; }
|
||||
function closeMemoryFilter() { document.getElementById('memory-filter').style.display = 'none'; }
|
||||
|
||||
@@ -29,7 +29,7 @@ from typing import Any, Callable, Optional
|
||||
|
||||
import websockets
|
||||
|
||||
from nexus.bannerlord_trace import BannerlordTraceLogger
|
||||
from bannerlord_trace import BannerlordTraceLogger
|
||||
|
||||
# ═══════════════════════════════════════════════════════════════════════════
|
||||
# CONFIGURATION
|
||||
|
||||
@@ -304,43 +304,6 @@ async def inject_event(event_type: str, ws_url: str, **kwargs):
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
def clean_lines(text: str) -> str:
|
||||
"""Remove ANSI codes and collapse whitespace from log text."""
|
||||
import re
|
||||
text = strip_ansi(text)
|
||||
text = re.sub(r'\s+', ' ', text).strip()
|
||||
return text
|
||||
|
||||
|
||||
def normalize_event(event: dict) -> dict:
|
||||
"""Normalize an Evennia event dict to standard format."""
|
||||
return {
|
||||
"type": event.get("type", "unknown"),
|
||||
"actor": event.get("actor", event.get("name", "")),
|
||||
"room": event.get("room", event.get("location", "")),
|
||||
"message": event.get("message", event.get("text", "")),
|
||||
"timestamp": event.get("timestamp", ""),
|
||||
}
|
||||
|
||||
|
||||
def parse_room_output(text: str) -> dict:
|
||||
"""Parse Evennia room output into structured data."""
|
||||
import re
|
||||
lines = text.strip().split("\n")
|
||||
result = {"name": "", "description": "", "exits": [], "objects": []}
|
||||
if lines:
|
||||
result["name"] = strip_ansi(lines[0]).strip()
|
||||
if len(lines) > 1:
|
||||
result["description"] = strip_ansi(lines[1]).strip()
|
||||
for line in lines[2:]:
|
||||
line = strip_ansi(line).strip()
|
||||
if line.startswith("Exits:"):
|
||||
result["exits"] = [e.strip() for e in line[6:].split(",") if e.strip()]
|
||||
elif line.startswith("You see:"):
|
||||
result["objects"] = [o.strip() for o in line[8:].split(",") if o.strip()]
|
||||
return result
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description="Evennia -> Nexus WebSocket Bridge")
|
||||
sub = parser.add_subparsers(dest="mode")
|
||||
|
||||
@@ -1,105 +0,0 @@
|
||||
/**
|
||||
* Portal Hot-Reload for The Nexus
|
||||
*
|
||||
* Watches portals.json for changes and hot-reloads portal list
|
||||
* without server restart. Existing connections unaffected.
|
||||
*
|
||||
* Usage:
|
||||
* PortalHotReload.start(intervalMs);
|
||||
* PortalHotReload.stop();
|
||||
* PortalHotReload.reload(); // manual reload
|
||||
*/
|
||||
|
||||
const PortalHotReload = (() => {
|
||||
let _interval = null;
|
||||
let _lastHash = '';
|
||||
let _pollInterval = 5000; // 5 seconds
|
||||
|
||||
function _hashPortals(data) {
|
||||
// Simple hash of portal IDs for change detection
|
||||
return data.map(p => p.id || p.name).sort().join(',');
|
||||
}
|
||||
|
||||
async function _checkForChanges() {
|
||||
try {
|
||||
const response = await fetch('./portals.json?t=' + Date.now());
|
||||
if (!response.ok) return;
|
||||
|
||||
const data = await response.json();
|
||||
const hash = _hashPortals(data);
|
||||
|
||||
if (hash !== _lastHash) {
|
||||
console.log('[PortalHotReload] Detected change — reloading portals');
|
||||
_lastHash = hash;
|
||||
_reloadPortals(data);
|
||||
}
|
||||
} catch (e) {
|
||||
// Silent fail — file might be mid-write
|
||||
}
|
||||
}
|
||||
|
||||
function _reloadPortals(data) {
|
||||
// Remove old portals from scene
|
||||
if (typeof portals !== 'undefined' && Array.isArray(portals)) {
|
||||
portals.forEach(p => {
|
||||
if (p.group && typeof scene !== 'undefined' && scene) {
|
||||
scene.remove(p.group);
|
||||
}
|
||||
});
|
||||
portals.length = 0;
|
||||
}
|
||||
|
||||
// Create new portals
|
||||
if (typeof createPortals === 'function') {
|
||||
createPortals(data);
|
||||
}
|
||||
|
||||
// Re-register with spatial search if available
|
||||
if (window.SpatialSearch && typeof portals !== 'undefined') {
|
||||
portals.forEach(p => {
|
||||
if (p.config && p.config.name && p.group) {
|
||||
SpatialSearch.register('portal', p, p.config.name);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Notify
|
||||
if (typeof addChatMessage === 'function') {
|
||||
addChatMessage('system', `Portals reloaded: ${data.length} portals active`);
|
||||
}
|
||||
|
||||
console.log(`[PortalHotReload] Reloaded ${data.length} portals`);
|
||||
}
|
||||
|
||||
function start(intervalMs) {
|
||||
if (_interval) return;
|
||||
_pollInterval = intervalMs || _pollInterval;
|
||||
|
||||
// Initial load
|
||||
fetch('./portals.json').then(r => r.json()).then(data => {
|
||||
_lastHash = _hashPortals(data);
|
||||
}).catch(() => {});
|
||||
|
||||
_interval = setInterval(_checkForChanges, _pollInterval);
|
||||
console.log(`[PortalHotReload] Watching portals.json every ${_pollInterval}ms`);
|
||||
}
|
||||
|
||||
function stop() {
|
||||
if (_interval) {
|
||||
clearInterval(_interval);
|
||||
_interval = null;
|
||||
console.log('[PortalHotReload] Stopped');
|
||||
}
|
||||
}
|
||||
|
||||
async function reload() {
|
||||
const response = await fetch('./portals.json?t=' + Date.now());
|
||||
const data = await response.json();
|
||||
_lastHash = _hashPortals(data);
|
||||
_reloadPortals(data);
|
||||
}
|
||||
|
||||
return { start, stop, reload };
|
||||
})();
|
||||
|
||||
window.PortalHotReload = PortalHotReload;
|
||||
Reference in New Issue
Block a user