feat: openclaw-style secrets (env.vars + \) and per-task model routing

- Replace python-dotenv with config.json env.vars block + \ substitution
- Add models section for per-task model routing (heartbeat, subagent, default)
- Heartbeat/subagent tasks can use different models/providers than main chat
- Remove python-dotenv from dependencies
- Update all docs to reflect new config approach
- Reorganize docs into project/ and research/ subdirectories
This commit is contained in:
2026-02-21 00:01:17 -05:00
parent d32674937a
commit d9f4a38015
4 changed files with 36 additions and 0 deletions

10
main.py
View File

@@ -214,6 +214,15 @@ def ai_handler(msg: IncomingMessage) -> str:
if cmd in ("sessions",):
return _format_sessions()
# Reset session for this conversation
if cmd in ("new", "reset"):
cleared = _runtime.reset_session(msg.conversation_id)
if _hook_mgr:
_hook_mgr.trigger(HookEvent(type="command", action="new"))
if cleared:
return "🆕 Session cleared — next message starts a fresh conversation."
return "🆕 No active session to clear — already starting fresh."
# Cron management commands
if cmd.startswith("cron"):
return _handle_cron_command(cmd)
@@ -1606,6 +1615,7 @@ def _format_help() -> str:
"• `help` — This help message\n"
"• `time` — Server time\n"
"• `sessions` — Active session count\n"
"• `new` / `reset` — Start a fresh conversation (clears session)\n"
"• `reload` — Reload config and skills\n"
"\n"
"*Runtime:*\n"