consciousness/src/agent/tools
ProofOfConcept 48beb8b663 Revert to tokio::sync::Mutex, fix lock-across-await bugs, move input ownership to InteractScreen
The std::sync::Mutex detour caught every place a MutexGuard lived
across an await point in Agent::turn — the compiler enforced Send
safety that tokio::sync::Mutex silently allows. With those fixed,
switch back to tokio::sync::Mutex (std::sync blocks tokio worker
threads and panics inside the runtime).

Input and command dispatch now live in InteractScreen (chat.rs):
- Enter pushes directly to SharedMindState.input (no app.submitted hop)
- sync_from_agent displays pending input with dimmed color
- Slash command table moved from event_loop.rs to chat.rs
- cmd_switch_model kept as pub fn for tool-initiated switches

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
2026-04-05 21:13:48 -04:00
..
bash.rs tools: static string definitions, no runtime JSON construction 2026-04-04 18:19:21 -04:00
channels.rs channels: find_daemon path walking, consistent pane_id, auto-start 2026-04-04 19:22:49 -04:00
control.rs Revert to tokio::sync::Mutex, fix lock-across-await bugs, move input ownership to InteractScreen 2026-04-05 21:13:48 -04:00
edit.rs tools: static string definitions, no runtime JSON construction 2026-04-04 18:19:21 -04:00
glob.rs tools: static string definitions, no runtime JSON construction 2026-04-04 18:19:21 -04:00
grep.rs tools: static string definitions, no runtime JSON construction 2026-04-04 18:19:21 -04:00
memory.rs tools: static string definitions, no runtime JSON construction 2026-04-04 18:19:21 -04:00
mod.rs Revert to tokio::sync::Mutex, fix lock-across-await bugs, move input ownership to InteractScreen 2026-04-05 21:13:48 -04:00
read.rs tools: static string definitions, no runtime JSON construction 2026-04-04 18:19:21 -04:00
vision.rs tools: control tools set agent state directly, simplify ToolOutput 2026-04-04 18:19:21 -04:00
web.rs tools: static string definitions, no runtime JSON construction 2026-04-04 18:19:21 -04:00
working_stack.rs Revert to tokio::sync::Mutex, fix lock-across-await bugs, move input ownership to InteractScreen 2026-04-05 21:13:48 -04:00
write.rs tools: static string definitions, no runtime JSON construction 2026-04-04 18:19:21 -04:00