Compare commits
1 Commits
mimo/code/
...
mimo/creat
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b301565acf |
113
index.html
113
index.html
@@ -259,10 +259,11 @@
|
||||
<li>• Require CI ✅ (where available)</li>
|
||||
<li>• Block force push ✅</li>
|
||||
<li>• Block branch deletion ✅</li>
|
||||
<li>• Weekly audit for unreviewed merges ✅</li>
|
||||
</ul>
|
||||
<div style="margin-top: 8px;">
|
||||
<strong>DEFAULT REVIEWERS</strong><br>
|
||||
<span style="color:#4af0c0;">@perplexity</span> (QA gate on all repos) |
|
||||
<span style="color:#4af0c0;">@perplexity</span> (QA gate on all repos) |
|
||||
<span style="color:#7b5cff;">@Timmy</span> (owner gate on hermes-agent)
|
||||
</div>
|
||||
<div style="margin-top: 10px;">
|
||||
@@ -275,107 +276,19 @@
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="branch-policy" style="margin-top: 10px; font-size: 12px; color: #aaa;">
|
||||
<strong>BRANCH PROTECTION POLICY</strong><br>
|
||||
<ul style="margin:0; padding-left:15px;">
|
||||
<li>• Require PR for merge ✅</li>
|
||||
<li>• Require 1 approval ✅</li>
|
||||
<li>• Dismiss stale approvals ✅</li>
|
||||
<li>• Require CI ✅ (where available)</li>
|
||||
<li>• Block force push ✅</li>
|
||||
<li>• Block branch deletion ✅</li>
|
||||
<li>• Weekly audit for unreviewed merges ✅</li>
|
||||
</ul>
|
||||
<div id="mem-palace-container" class="mem-palace-ui">
|
||||
<div class="mem-palace-header">
|
||||
<span>MEMPALACE</span>
|
||||
<button id="mine-now-btn" class="mem-palace-btn" onclick="mineChatToMemPalace()">Mine Chat</button>
|
||||
<button class="mem-palace-btn" onclick="searchMemPalace()">Search</button>
|
||||
</div>
|
||||
<div id="mem-palace-container" class="mem-palace-ui">
|
||||
<div class="mem-palace-header">
|
||||
<span id="mem-palace-status">MEMPALACE</span>
|
||||
<button onclick="mineMemPalaceContent()" class="mem-palace-btn">Mine Chat</button>
|
||||
</div>
|
||||
<div class="mem-palace-stats">
|
||||
<div>Compression: <span id="compression-ratio">--</span>x</div>
|
||||
<div>Docs mined: <span id="docs-mined">0</span></div>
|
||||
<div>AAAK size: <span id="aaak-size">0B</span></div>
|
||||
</div>
|
||||
<div class="mem-palace-logs" id="mem-palace-logs"></div>
|
||||
</div>
|
||||
<div class="default-reviewers" style="margin-top: 8px; font-size: 12px; color: #aaa;">
|
||||
<strong>DEFAULT REVIEWERS</strong><br>
|
||||
<ul style="margin:0; padding-left:15px;">
|
||||
<li>• <span style="color:#4af0c0;">@perplexity</span> (QA gate on all repos)</li>
|
||||
<li>• <span style="color:#7b5cff;">@Timmy</span> (owner gate on hermes-agent)</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="implementation-status" style="margin-top: 10px; font-size: 12px; color: #aaa;">
|
||||
<strong>IMPLEMENTATION STATUS</strong><br>
|
||||
<div style="margin-top: 5px; display: flex; flex-direction: column; gap: 2px;">
|
||||
<div>• <span style="color:#4af0c0;">hermes-agent</span>: Require PR + 1 approval + CI ✅</div>
|
||||
<div>• <span style="color:#7b5cff;">the-nexus</span>: Require PR + 1 approval ⚠️ (CI disabled)</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="mem-palace-status" style="position:fixed; right:24px; top:64px; background:rgba(74,240,192,0.1); color:#4af0c0; padding:6px 12px; border-radius:4px; font-family:'Orbitron', sans-serif; font-size:10px; letter-spacing:0.1em;">
|
||||
MEMPALACE INIT
|
||||
</div>
|
||||
<div>• <span style="color:#ffd700;">timmy-home</span>: Require PR + 1 approval ✅</div>
|
||||
<div>• <span style="color:#ab8d00;">timmy-config</span>: Require PR + 1 approval ✅</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="mem-palace-container" class="mem-palace-ui">
|
||||
<div class="mem-palace-header">MemPalace <span id="mem-palace-status">Initializing...</span></div>
|
||||
<div class="mem-palace-stats">
|
||||
<div>Compression: <span id="compression-ratio">--</span>x</div>
|
||||
<div>Docs mined: <span id="docs-mined">0</span></div>
|
||||
<div>AAAK size: <span id="aaak-size">0B</span></div>
|
||||
</div>
|
||||
<div class="mem-palace-actions">
|
||||
<button id="mine-now-btn" class="mem-palace-btn" onclick="mineChatToMemPalace()">Mine Chat</button>
|
||||
<button class="mem-palace-btn" onclick="searchMemPalace()">Search</button>
|
||||
</div>
|
||||
<div id="mem-palace-logs" class="mem-palace-logs"></div>
|
||||
</div>
|
||||
<div id="mem-palace-controls" style="position:fixed; right:24px; top:54px; background:rgba(74,240,192,0.05); padding:4px 8px; font-family:'JetBrains Mono',monospace; font-size:11px; border-left:2px solid #4af0c0;">
|
||||
<button onclick="mineMemPalace()">Mine Chat</button>
|
||||
<button onclick="searchMemPalace()">Search</button>
|
||||
</div>
|
||||
<div id="mempalace-results" style="position:fixed; right:24px; top:84px; max-height:200px; overflow-y:auto; background:rgba(0,0,0,0.3); padding:8px; font-family:'JetBrains Mono',monospace; font-size:11px; color:#e0f0ff; border-left:2px solid #4af0c0;"></div>
|
||||
<div id="mem-palace-controls" style="position:fixed; right:24px; top:54px; background:rgba(74,240,192,0.05); padding:4px 8px; font-family:'JetBrains Mono',monospace; font-size:10px; border-left:2px solid #4af0c0;">
|
||||
<button class="mem-palace-mining-btn" onclick="mineChatToMemPalace()">Mine Chat</button>
|
||||
<button onclick="searchMemPalace()">Search</button>
|
||||
</div>
|
||||
<div id="mempalace-results" style="position:fixed; right:24px; top:84px; max-height:200px; overflow-y:auto; background:rgba(0,0,0,0.3); padding:8px; font-family:'JetBrains Mono',monospace; font-size:11px; color:#e0f0ff; border-left:2px solid #4af0c0;"></div>
|
||||
>>>>>>> replace
|
||||
```
|
||||
|
||||
index.html
|
||||
```html
|
||||
<<<<<<< search
|
||||
<div class="branch-policy" style="margin-top: 10px; font-size: 12px; color: #aaa;">
|
||||
<strong>BRANCH PROTECTION POLICY</strong><br>
|
||||
<ul style="margin:0; padding-left:15px;">
|
||||
<li>• Require PR for merge ✅</li>
|
||||
<li>• Require 1 approval ✅</li>
|
||||
<li>• Dismiss stale approvals ✅</li>
|
||||
<li>• Require CI ✅ (where available)</li>
|
||||
<li>• Block force push ✅</li>
|
||||
<li>• Block branch deletion ✅</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="default-reviewers" style="margin-top: 8px;">
|
||||
<strong>DEFAULT REVIEWERS</strong><br>
|
||||
<ul style="margin:0; padding-left:15px;">
|
||||
<li>• <span style="color:#4af0c0;">@perplexity</span> (QA gate on all repos)</li>
|
||||
<li>• <span style="color:#7b5cff;">@Timmy</span> (owner gate on hermes-agent)</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="implementation-status" style="margin-top: 10px;">
|
||||
<strong>IMPLEMENTATION STATUS</strong><br>
|
||||
<div style="margin-top: 5px; display: flex; flex-direction: column; gap: 2px;">
|
||||
<div>• <span style="color:#4af0c0;">hermes-agent</span>: Require PR + 1 approval + CI ✅</div>
|
||||
<div>• <span style="color:#7b5cff;">the-nexus</span>: Require PR + 1 approval ⚠<> (CI disabled)</div>
|
||||
<div>• <span style="color:#ffd700;">timmy-home</span>: Require PR + 1 approval ✅</div>
|
||||
<div>• <span style="color:#ab8d00;">timmy-config</span>: Require PR + 1 approval ✅</div>
|
||||
</div>
|
||||
<div class="mem-palace-stats">
|
||||
<div>Compression: <span id="compression-ratio">--</span>x</div>
|
||||
<div>Docs mined: <span id="docs-mined">0</span></div>
|
||||
<div>AAAK size: <span id="aaak-size">0B</span></div>
|
||||
</div>
|
||||
<div id="mem-palace-logs" class="mem-palace-logs"></div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script type="module" src="./app.js"></script>
|
||||
|
||||
@@ -243,108 +243,24 @@ async def playback(log_path: Path, ws_url: str):
|
||||
await ws.send(json.dumps(event))
|
||||
|
||||
|
||||
async def inject_event(event_type: str, ws_url: str, **kwargs):
|
||||
"""Inject a single Evennia event into the Nexus WS gateway. Dev/test use."""
|
||||
from nexus.evennia_event_adapter import (
|
||||
actor_located, command_issued, command_result,
|
||||
room_snapshot, session_bound,
|
||||
)
|
||||
|
||||
builders = {
|
||||
"room_snapshot": lambda: room_snapshot(
|
||||
kwargs.get("room_key", "Gate"),
|
||||
kwargs.get("title", "Gate"),
|
||||
kwargs.get("desc", "The entrance gate."),
|
||||
exits=kwargs.get("exits"),
|
||||
objects=kwargs.get("objects"),
|
||||
),
|
||||
"actor_located": lambda: actor_located(
|
||||
kwargs.get("actor_id", "Timmy"),
|
||||
kwargs.get("room_key", "Gate"),
|
||||
kwargs.get("room_name"),
|
||||
),
|
||||
"command_result": lambda: command_result(
|
||||
kwargs.get("session_id", "dev-inject"),
|
||||
kwargs.get("actor_id", "Timmy"),
|
||||
kwargs.get("command_text", "look"),
|
||||
kwargs.get("output_text", "You see the Gate."),
|
||||
success=kwargs.get("success", True),
|
||||
),
|
||||
"command_issued": lambda: command_issued(
|
||||
kwargs.get("session_id", "dev-inject"),
|
||||
kwargs.get("actor_id", "Timmy"),
|
||||
kwargs.get("command_text", "look"),
|
||||
),
|
||||
"session_bound": lambda: session_bound(
|
||||
kwargs.get("session_id", "dev-inject"),
|
||||
kwargs.get("account", "Timmy"),
|
||||
kwargs.get("character", "Timmy"),
|
||||
),
|
||||
}
|
||||
|
||||
if event_type not in builders:
|
||||
print(f"[inject] Unknown event type: {event_type}", flush=True)
|
||||
print(f"[inject] Available: {', '.join(builders)}", flush=True)
|
||||
sys.exit(1)
|
||||
|
||||
event = builders[event_type]()
|
||||
payload = json.dumps(event)
|
||||
|
||||
if websockets is None:
|
||||
print(f"[inject] websockets not installed, printing event:\n{payload}", flush=True)
|
||||
return
|
||||
|
||||
try:
|
||||
async with websockets.connect(ws_url, open_timeout=5) as ws:
|
||||
await ws.send(payload)
|
||||
print(f"[inject] Sent {event_type} -> {ws_url}", flush=True)
|
||||
print(f"[inject] Payload: {payload}", flush=True)
|
||||
except Exception as e:
|
||||
print(f"[inject] Failed to send to {ws_url}: {e}", flush=True)
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description="Evennia -> Nexus WebSocket Bridge")
|
||||
sub = parser.add_subparsers(dest="mode")
|
||||
|
||||
|
||||
live = sub.add_parser("live", help="Live tail Evennia logs and stream to Nexus")
|
||||
live.add_argument("--log-dir", default="/root/workspace/timmy-academy/server/logs", help="Evennia logs directory")
|
||||
live.add_argument("--ws", default="ws://127.0.0.1:8765", help="Nexus WebSocket URL")
|
||||
|
||||
|
||||
replay = sub.add_parser("playback", help="Replay a telemetry JSONL file")
|
||||
replay.add_argument("log_path", help="Path to Evennia telemetry JSONL")
|
||||
replay.add_argument("--ws", default="ws://127.0.0.1:8765", help="Nexus WebSocket URL")
|
||||
|
||||
inject = sub.add_parser("inject", help="Inject a single Evennia event (dev/test)")
|
||||
inject.add_argument("event_type", choices=["room_snapshot", "actor_located", "command_result", "command_issued", "session_bound"])
|
||||
inject.add_argument("--ws", default="ws://127.0.0.1:8765", help="Nexus WebSocket URL")
|
||||
inject.add_argument("--room-key", default="Gate", help="Room key (room_snapshot, actor_located)")
|
||||
inject.add_argument("--title", default="Gate", help="Room title (room_snapshot)")
|
||||
inject.add_argument("--desc", default="The entrance gate.", help="Room description (room_snapshot)")
|
||||
inject.add_argument("--actor-id", default="Timmy", help="Actor ID")
|
||||
inject.add_argument("--command-text", default="look", help="Command text (command_result, command_issued)")
|
||||
inject.add_argument("--output-text", default="You see the Gate.", help="Command output (command_result)")
|
||||
inject.add_argument("--session-id", default="dev-inject", help="Hermes session ID")
|
||||
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
|
||||
if args.mode == "live":
|
||||
asyncio.run(live_bridge(args.log_dir, args.ws))
|
||||
elif args.mode == "playback":
|
||||
asyncio.run(playback(Path(args.log_path).expanduser(), args.ws))
|
||||
elif args.mode == "inject":
|
||||
asyncio.run(inject_event(
|
||||
args.event_type,
|
||||
args.ws,
|
||||
room_key=args.room_key,
|
||||
title=args.title,
|
||||
desc=args.desc,
|
||||
actor_id=args.actor_id,
|
||||
command_text=args.command_text,
|
||||
output_text=args.output_text,
|
||||
session_id=args.session_id,
|
||||
))
|
||||
else:
|
||||
parser.print_help()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user