Some checks failed
Invert the agent model: the agent IS the computer. The message pump becomes the kernel, handlers are sandboxed apps, and all access is mediated by the platform. Phase 1 — Container foundation: - Multi-stage Dockerfile (python:3.12-slim, non-root user, /data volume) - deploy/entrypoint.py with --dry-run config validation - docker-compose.yml (cap_drop ALL, read_only, no-new-privileges) - docker-compose.dev.yml overlay for development - CI Docker build smoke test Phase 2 — Security hardening: - xml_pipeline/security/ module with default-deny container mode - Permission gate: per-listener tool allowlist enforcement - Network policy: egress control (only declared LLM backend domains) - Shell tool: disabled in container mode - File tool: restricted to /data and /config in container mode - Fetch tool: integrates network egress policy - Config loader: parses security and network YAML sections Phase 3 — Management plane: - Agent app (port 8080): minimal /health, /inject, /ws only - Management app (port 9090): full API, audit log, dashboard - SQLite-backed audit log for tool invocations and security events - Static web dashboard (no framework, WebSocket-driven) - CLI --split flag for dual-port serving All 439 existing tests pass with zero regressions. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
33 lines
993 B
Python
33 lines
993 B
Python
"""
|
|
server — FastAPI-based AgentServer API for monitoring and controlling organisms.
|
|
|
|
Provides:
|
|
- REST API for querying organism state (agents, threads, messages)
|
|
- WebSocket for real-time events
|
|
- Message injection endpoint
|
|
- Split architecture: agent app (port 8080) + management app (port 9090)
|
|
|
|
Usage:
|
|
from xml_pipeline.server import create_app, run_server
|
|
|
|
# Combined app (backwards compatible)
|
|
app = create_app(pump)
|
|
uvicorn.run(app, host="0.0.0.0", port=8080)
|
|
|
|
# Split apps (AgentOS mode)
|
|
from xml_pipeline.server.agent_app import create_agent_app
|
|
from xml_pipeline.server.management import create_management_app
|
|
agent_app = create_agent_app(pump) # port 8080
|
|
mgmt_app = create_management_app(pump) # port 9090
|
|
|
|
# Or use CLI
|
|
xml-pipeline serve config/organism.yaml --port 8080
|
|
"""
|
|
|
|
from xml_pipeline.server.app import create_app, run_server, run_server_sync
|
|
|
|
__all__ = [
|
|
"create_app",
|
|
"run_server",
|
|
"run_server_sync",
|
|
]
|