feat: Add agent workspace system and runtime management

- Add agent core modules (agent_core, factory, registry, skill_loader)
- Add runtime system for agent execution management
- Add REST API for agents, workspaces, and runtime control
- Add process supervisor for agent lifecycle management
- Add workspace template system with agent profiles
- Add frontend RuntimeView and runtime API integration
- Add per-agent skill workspaces for smoke_fullstack run
- Refactor skill system with active/installed separation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-17 16:43:29 +08:00
parent 2daf5717ba
commit 59b44545d0
121 changed files with 8384 additions and 358 deletions

View File

@@ -0,0 +1,35 @@
# -*- coding: utf-8 -*-
"""Registry for managing supervised process metadata."""
from threading import Lock
from typing import Dict, Iterable, Optional
from .models import ProcessRun
class RunRegistry:
"""In-memory registry for tracked process runs."""
def __init__(self) -> None:
self._runs: Dict[str, ProcessRun] = {}
self._lock = Lock()
def add(self, run: ProcessRun) -> None:
with self._lock:
self._runs[run.run_id] = run
def get(self, run_id: str) -> Optional[ProcessRun]:
with self._lock:
return self._runs.get(run_id)
def list(self) -> Iterable[ProcessRun]:
with self._lock:
return list(self._runs.values())
def update(self, run: ProcessRun) -> None:
with self._lock:
self._runs[run.run_id] = run
def remove(self, run_id: str) -> None:
with self._lock:
self._runs.pop(run_id, None)