Build and extend a deterministic, safe CCTV technical-support lab with a production-grade Operations console. Never connect to production or customer infrastructure.
README.md, AUTONOMOUS_AGENT_LAB.md, SETUP_AND_DEVELOPMENT.md, and this file.services/*/app.py) and frontend clients (frontend/src/api/*.ts) before modifying behavior.data/runtime/.python -m pytest -q
python -m ruff check .
cd frontend && npm test && npm run build
services/agent/policy.py) is authoritative. AI prompts, chat interfaces, and frontend controls never grant permissions.ReasoningProvider interface. The deterministic simulator and tool layer must work without an LLM.noUnusedLocals: true and noUnusedParameters: true are enabled in tsconfig.app.json. Never leave unused imports, variables, or unhandled types.SAFE_REVERSIBLE, APPROVAL_REQUIRED, HUMAN_ONLY, READ) accurately.HUMAN_ONLY or APPROVAL_REQUIRED, render an explicit human-in-the-loop alert card with technician guidance./investigate, /status, /site, /history, /help, /clear) must parse arguments cleanly and provide helpful feedback for invalid IDs./clear must only clear UI conversational messages. It must never wipe backend tickets, portal assets, or audit logs.Running, Success, Failure, Blocked) so the operator sees exactly what checks and tools ran.LabContext or API clients. Empty states must clearly indicate “No incidents” or “All systems normal” rather than fabricating mock alerts.SUPPORTED_FAULTS in services/portal/app.py._effective_state() in services/portal/app.py.diagnose() and investigate_single_asset() in services/agent/agent.py.FAULT_TO_ACTION and FAULT_VERIFICATION.ALLOWED_ACTIONS in the portal.services/agent/policy.py.data/knowledge/troubleshooting.md.frontend/src/components/layout/LabControlsModal.tsx.tests/test_lab.py and frontend tests if applicable.frontend/src/pages/YourPage.tsx.frontend/src/App.tsx.frontend/src/components/layout/Sidebar.tsx.frontend/src/test/ to verify rendering and data display.| File | Purpose |
|---|---|
services/common/config.py |
Central configuration and ports |
services/common/models.py |
Shared Pydantic models and enums |
services/helpdesk/app.py |
Helpdesk REST API (Port 8001) |
services/portal/app.py |
Operations Portal REST API (Port 8002) |
services/agent/agent.py |
Autonomous agent core loop & single asset investigation |
services/agent/policy.py |
Safety policy engine (Authoritative) |
services/agent/knowledge.py |
Knowledge retrieval layer & doc endpoints |
services/agent/reasoning.py |
LLM boundary contract |
services/agent/app.py |
Agent API endpoints (Port 8003) |
frontend/src/App.tsx |
Frontend routes and layout container |
frontend/src/context/LabContext.tsx |
Real-time telemetry, polling, and fault management |
frontend/src/components/timeline/InvestigationTimeline.tsx |
Diagnostic evidence and step breakdown |
frontend/src/components/topology/TopologyGraph.tsx |
Network hierarchy and correlated outage visualizer |
frontend/src/components/chat/ChatContainer.tsx |
AI Assistant conversational console & slash parser |
tests/test_lab.py |
Backend comprehensive test suite (60 tests) |
frontend/src/test/ |
Frontend Vitest test suites (19 tests) |
data/knowledge/ |
Authoritative troubleshooting documents (Markdown) |
data/runtime/ |
Generated simulator state files (gitignored) |