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

View File

@@ -711,6 +711,20 @@ class OpenCodeRuntime:
"""Clean up stale sessions. Returns count removed."""
return self._sessions.cleanup(self._config.session_ttl_hours)
def reset_session(self, conversation_id: str) -> bool:
"""Clear both the persistent session mapping and the live session.
Returns ``True`` if anything was cleared.
"""
had_live = self.close_session(conversation_id)
had_persistent = self._sessions.get(conversation_id) is not None
if had_persistent:
self._sessions.remove(conversation_id)
cleared = had_live or had_persistent
if cleared:
logger.info(f"Session reset: {conversation_id}")
return cleared
# -------------------------------------------------------------------
# CLI Mode: Subprocess execution
# (mirrors OpenClaw's runCliAgent → runCommandWithTimeout pattern)