Restructure web app directories
This commit is contained in:
@@ -19,6 +19,7 @@ archive/
|
||||
.claude.json
|
||||
.port_sessions/
|
||||
tasks/
|
||||
router_session_parquet/
|
||||
|
||||
# Environment files
|
||||
.env
|
||||
|
||||
+1
-1
@@ -822,7 +822,7 @@ Mirrored / scaffold areas needing real implementation:
|
||||
- [ ] Token budget calculations
|
||||
|
||||
### Tier 3 — Nice-to-Have Features
|
||||
- [x] Local web GUI (FastAPI + vanilla JS SPA) → `src/gui/__main__.py`, `src/gui/server.py`, `src/gui/static/*`; launch with `python -m src.gui` or `claw-code-gui`
|
||||
- [x] Local web GUI (FastAPI + vanilla JS SPA) → `src/gui/__main__.py`, `backend/api/server.py`, `frontend/legacy-static/*`; launch with `python -m src.gui` or `claw-code-gui`
|
||||
- [ ] TUI/Ink component library
|
||||
- [ ] Voice mode
|
||||
- [ ] VIM mode and keybinding system
|
||||
|
||||
@@ -545,7 +545,7 @@ workspace 可以通过 `.claw-policy.json` / `.codex-policy.json` / `.claw-hooks
|
||||
有,但只对 bundled skill 生效:
|
||||
|
||||
- `format_skills_for_system_prompt()` 把 skill 列表渲染进系统提示,帮助模型“知道”有哪些 skill,见 `src/bundled_skills.py:268-289`
|
||||
- GUI 也有 `/api/skills` 列表,见 `src/gui/server.py`
|
||||
- GUI 也有 `/api/skills` 列表,见 `backend/api/server.py`
|
||||
|
||||
但它没有:
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
"""Backend API package for the claw-code agent workbench."""
|
||||
@@ -0,0 +1 @@
|
||||
"""HTTP API layer for the claw-code agent workbench."""
|
||||
@@ -17,22 +17,22 @@ from fastapi.responses import FileResponse, JSONResponse
|
||||
from fastapi.staticfiles import StaticFiles
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
from ..agent_runtime import LocalCodingAgent
|
||||
from ..agent_slash_commands import get_slash_command_specs
|
||||
from ..agent_types import (
|
||||
from src.agent_runtime import LocalCodingAgent
|
||||
from src.agent_slash_commands import get_slash_command_specs
|
||||
from src.agent_types import (
|
||||
AgentPermissions,
|
||||
AgentRuntimeConfig,
|
||||
ModelConfig,
|
||||
)
|
||||
from ..bundled_skills import get_bundled_skills
|
||||
from ..session_store import (
|
||||
from src.bundled_skills import get_bundled_skills
|
||||
from src.session_store import (
|
||||
DEFAULT_AGENT_SESSION_DIR,
|
||||
StoredAgentSession,
|
||||
load_agent_session,
|
||||
)
|
||||
|
||||
|
||||
STATIC_DIR = Path(__file__).parent / 'static'
|
||||
STATIC_DIR = Path(__file__).resolve().parents[2] / 'frontend' / 'legacy-static'
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
+8
-2
@@ -36,6 +36,13 @@ dependencies = [
|
||||
"fastapi>=0.110",
|
||||
"uvicorn>=0.27",
|
||||
"pydantic>=2.5",
|
||||
"openpyxl>=3.1",
|
||||
"pyarrow>=15",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
dev = [
|
||||
"httpx>=0.28",
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
@@ -51,11 +58,10 @@ include-package-data = true
|
||||
|
||||
[tool.setuptools.packages.find]
|
||||
where = ["."]
|
||||
include = ["src*"]
|
||||
include = ["src*", "backend*"]
|
||||
|
||||
[tool.setuptools.package-data]
|
||||
src = [
|
||||
"reference_data/*.json",
|
||||
"gui/static/*",
|
||||
"skills/bundled/*/SKILL.md",
|
||||
]
|
||||
|
||||
+2
-1
@@ -9,8 +9,9 @@ from pathlib import Path
|
||||
|
||||
import uvicorn
|
||||
|
||||
from backend.api.server import AgentState, create_app
|
||||
|
||||
from ..session_store import DEFAULT_AGENT_SESSION_DIR
|
||||
from .server import AgentState, create_app
|
||||
|
||||
|
||||
def main() -> None:
|
||||
|
||||
@@ -15,7 +15,7 @@ from pathlib import Path
|
||||
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from src.gui.server import AgentState, create_app
|
||||
from backend.api.server import AgentState, create_app
|
||||
|
||||
|
||||
def _build_client(tmp: Path) -> tuple[TestClient, AgentState]:
|
||||
|
||||
Reference in New Issue
Block a user