Commit Graph
1 Commits
Author SHA1 Message Date
openbot 3598358293 feat(session): M1 session manager — binding table, /switch, reaper, sqlite
- (channel, chat_id) -> {agent, acp_session_id} binding table
- prompt(): auto-create binding, per-chat turn serialization, image blocks
- switch(): /switch semantics; --continue migrates hub-side text ONLY
  (tool state does not migrate, documented)
- update relay: ACP session/update -> delta/thinking/tool_start/tool_end/
  plan/final events via per-binding event sink
- cwd whitelist per agent (fnmatch, ~ expanded, realpath)
- idle reaper: expire bindings after idle_ttl_s, close unbound processes;
  max_sessions cap with LRU eviction
- sqlite persistence (bindings + session_records) — DB is fact source,
  config.json only bootstrap
- process death: client+binding dropped, SessionError surfaced
- tests: 39 passed (mock ACP agent subprocess)
2026-10-06 11:45:19 +08:00