Refactored orchestrator for staged file handling, added structured prompt support, adjusted Feishu file handling

This commit is contained in:
whlaoding
2026-03-08 22:38:29 +08:00
parent e2f806edb3
commit 52b8dbb835
30 changed files with 9325 additions and 34 deletions

View File

@@ -5,7 +5,7 @@ Go-based personal Telegram Agent with:
- Telegram polling transport
- OpenAI-compatible LLM client
- SQLite conversation memory + simple compression
- Tool registry with built-in `file` and `shell` tools
- Tool registry with built-in `file`, `shell`, and `git` tools
- Default-deny security policy via allowlists
- Soul markdown loading for bot personality
- Skills markdown loading for capability context
@@ -50,7 +50,7 @@ go run ./cmd/bot
1. Receive message and load recent memory context
2. Match relevant skill(s) from `skills/`
3. If no skill matched, respond via direct LLM
4. If skill matched, run ReAct and call tools (`shell` / `file`) only when needed
4. If skill matched, run ReAct and call tools (`shell` / `file` / `git`) only when needed
5. Return final answer
- No `/tool ...` command is required for normal use.
@@ -69,6 +69,7 @@ go run ./cmd/bot
- `shell` only allows commands listed in `ALLOWED_COMMANDS`.
- `file` only allows paths inside `ALLOWED_DIRS`.
- `git` only allows common git subcommands and runs inside `WORK_DIR`.
- Working directory for shell is limited by `WORK_DIR`.
## Next Iteration