feat(runtime): activate per-worktree session isolation (#41)

Remove #[cfg(test)] gate from session_control module — SessionStore
is now available at runtime, not just in tests. Export SessionStore and
add workspace_sessions_dir() helper that creates fingerprinted session
directories per workspace root.

This is the #41 kill shot: parallel opencode serve instances will use
separate session namespaces based on workspace fingerprint instead of
sharing a global ~/.local/share/opencode/ store.

The CLI already uses cwd/.claw/sessions/ (sessions_dir()), and now
SessionStore::from_cwd() adds workspace hash isolation on top.
This commit is contained in:
YeonGyu-Kim
2026-04-07 16:00:57 +09:00
parent f03b8dce17
commit 28e6cc0965
2 changed files with 11 additions and 2 deletions

View File

@@ -35,8 +35,8 @@ pub mod recovery_recipes;
mod remote;
pub mod sandbox;
mod session;
#[cfg(test)]
mod session_control;
pub mod session_control;
pub use session_control::SessionStore;
mod sse;
pub mod stale_base;
pub mod stale_branch;