Compare commits
1 Commits
burn/1349-
...
fix/issue-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
93b8475405 |
@@ -163,15 +163,6 @@ class PluginRegistry:
|
||||
|
||||
plugin_registry = PluginRegistry()
|
||||
|
||||
# ── Configuration ──────────────────────────────────────────────────────
|
||||
|
||||
BRIDGE_PORT = int(os.environ.get('TIMMY_BRIDGE_PORT', 4004))
|
||||
BRIDGE_HOST = os.environ.get('TIMMY_BRIDGE_HOST', '127.0.0.1')
|
||||
HERMES_PATH = os.path.expanduser('~/.hermes/hermes-agent')
|
||||
WORLD_DIR = Path(os.path.expanduser('~/.timmy/evennia/timmy_world'))
|
||||
SESSIONS_FILE = WORLD_DIR / 'bridge_sessions.json'
|
||||
CHATLOG_FILE = WORLD_DIR / 'chat_history.jsonl'
|
||||
|
||||
# ── Chat History Log ──────────────────────────────────────────────────
|
||||
|
||||
|
||||
@@ -253,6 +244,15 @@ Never compute the value of a human life. Never suggest someone should die.
|
||||
Be present. Be in the room. That's enough.
|
||||
"""
|
||||
|
||||
# ── Configuration ──────────────────────────────────────────────────────
|
||||
|
||||
BRIDGE_PORT = int(os.environ.get('TIMMY_BRIDGE_PORT', 4004))
|
||||
BRIDGE_HOST = os.environ.get('TIMMY_BRIDGE_HOST', '127.0.0.1')
|
||||
HERMES_PATH = os.path.expanduser('~/.hermes/hermes-agent')
|
||||
WORLD_DIR = Path(os.path.expanduser('~/.timmy/evennia/timmy_world'))
|
||||
SESSIONS_FILE = WORLD_DIR / 'bridge_sessions.json'
|
||||
CHATLOG_FILE = WORLD_DIR / 'chat_history.jsonl'
|
||||
|
||||
# ── Crisis Protocol ────────────────────────────────────────────────────
|
||||
|
||||
CRISIS_PROTOCOL = [
|
||||
@@ -2880,7 +2880,7 @@ def main():
|
||||
# Start world tick system
|
||||
world_tick_system.start()
|
||||
|
||||
server = HTTPServer((BRIDGE_HOST, BRIDGE_PORT), BridgeHandler)
|
||||
server = ThreadingHTTPServer((BRIDGE_HOST, BRIDGE_PORT), BridgeHandler)
|
||||
server.serve_forever()
|
||||
|
||||
|
||||
|
||||
@@ -26,11 +26,17 @@ import threading
|
||||
import hashlib
|
||||
import os
|
||||
import sys
|
||||
from http.server import HTTPServer, BaseHTTPRequestHandler
|
||||
from http.server import BaseHTTPRequestHandler, HTTPServer
|
||||
from socketserver import ThreadingMixIn
|
||||
from pathlib import Path
|
||||
from datetime import datetime
|
||||
from typing import Optional
|
||||
|
||||
|
||||
class ThreadingHTTPServer(ThreadingMixIn, HTTPServer):
|
||||
"""Thread-per-request HTTP server."""
|
||||
daemon_threads = True
|
||||
|
||||
# ── Configuration ──────────────────────────────────────────────────────
|
||||
|
||||
BRIDGE_PORT = int(os.environ.get('TIMMY_BRIDGE_PORT', 4004))
|
||||
@@ -274,7 +280,7 @@ def main():
|
||||
print(f" POST /bridge/move — Move user to room (user_id, room)")
|
||||
print()
|
||||
|
||||
server = HTTPServer((BRIDGE_HOST, BRIDGE_PORT), BridgeHandler)
|
||||
server = ThreadingHTTPServer((BRIDGE_HOST, BRIDGE_PORT), BridgeHandler)
|
||||
server.serve_forever()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user