diff --git a/README.md b/README.md index 6001a36..706536f 100644 --- a/README.md +++ b/README.md @@ -21,14 +21,16 @@ Feishu bot that lets users control Claude Code CLI from their phone. | Module | Purpose | |--------|---------| -| `main.py` | FastAPI entry point, starts WebSocket client + session manager | +| `main.py` | FastAPI entry point, starts WebSocket client + session manager + scheduler | | `bot/handler.py` | Receives Feishu events via long-connection WebSocket | | `bot/feishu.py` | Sends text/file/card replies back to Feishu | -| `bot/commands.py` | Slash command handler (`/new`, `/status`, `/switch`, `/direct`, `/smart`, etc.) | -| `orchestrator/agent.py` | LangChain agent with per-user history + direct/smart mode toggle | -| `orchestrator/tools.py` | Tools: `create_conversation`, `send_to_conversation`, `list_conversations`, `close_conversation` | -| `agent/manager.py` | Session registry with persistence and idle timeout reaper | +| `bot/commands.py` | Slash command handler (`/new`, `/status`, `/shell`, `/remind`, `/tasks`, etc.) | +| `orchestrator/agent.py` | LangChain agent with per-user history + direct/smart mode + direct Q&A | +| `orchestrator/tools.py` | Tools: session management, shell, file ops, web search, scheduler, task status | +| `agent/manager.py` | Session registry with persistence, idle timeout, and auto-background tasks | | `agent/pty_process.py` | Runs `claude -p` headlessly, manages session continuity via `--resume` | +| `agent/task_runner.py` | Background task runner with Feishu notifications | +| `agent/scheduler.py` | Reminder scheduler with persistence | | `agent/audit.py` | Audit log of all interactions | **Flow:** User message → Feishu WebSocket → Handler → (passthrough or LLM) → Session Manager → `claude -p` → Response back to Feishu @@ -116,6 +118,10 @@ WORKING_DIR: C:/Users/yourname/projects # Leave empty to allow all users. ALLOWED_OPEN_IDS: - ou_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + +# Optional: 秘塔AI Search API key for web search functionality +# Get your key at: https://metaso.cn/search-api/api-keys +METASO_API_KEY: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ``` --- @@ -153,6 +159,9 @@ Active sessions: `GET /sessions` | `/close [n]` | Close active session (or session ``) | | `/direct` | Direct mode: messages go straight to Claude Code (no LLM overhead) | | `/smart` | Smart mode: messages go through LLM for intelligent routing (default) | +| `/shell ` | Run a shell command directly (bypasses LLM) | +| `/remind