* chore: add pytest-asyncio in auto mode
* test: migrate channel and stream tests to native async
Convert run_async() wrapper tests to plain 'async def test_*' under
pytest-asyncio auto mode. collect_events() in stream_v3_fakes becomes a
coroutine awaited at every call site.
* test: migrate command and model/middleware tests to native async
Convert run_async() wrappers (import, alias, and fixture forms) to plain
'async def test_*'. Multi-call tests merge onto one loop as sequential
awaits; none asserted on loop identity.
* test: migrate TUI, notifier, gateway, and session tests to native async
TUI/notifier/gateway files convert run_async wrappers to plain async
tests. test_sessions.py's unittest.TestCase classes move to
unittest.IsolatedAsyncioTestCase (pytest-asyncio does not await async
methods on plain TestCase; converting blindly would have made ~70 tests
silently vacuous). Its setUpClass keeps a one-shot asyncio.run() since
IsolatedAsyncioTestCase has no async class-level hook. TestLoadingWidget
in test_tui_widgets.py drops its TestCase base for the same reason.
* test: replace direct asyncio.run() calls with native async tests
Convert tests that called asyncio.run() (directly or via a local _run
helper) to plain 'async def test_*'; delete the local helpers.
* test: drop undeclared anyio markers and delete run_async helper
The @pytest.mark.anyio tests relied on anyio being a transitive dep of
httpx; auto-mode pytest-asyncio collects them natively. run_async() and
its fixture are unreferenced after the migration, so remove them —
pytest-asyncio's per-test loop teardown covers the pending-task
cancellation the helper existed for (verified: full suite runs with no
'Event loop is closed' errors or destroyed-task warnings).
* refactor(cli): replace channel module globals with ChannelRuntime
Removes _cli_agent / _cli_thread_id from EvoScientist/cli/channel.py
and threads a ChannelRuntime via CommandContext.channel_runtime so
/model and /channel rebind without poking module-level state.
* fix(cli): address coderabbit review
- _auto_start_channel: bind ChannelRuntime only after
_start_channels_bus_mode succeeds, so a startup failure no longer
leaves a stale binding pointing at channels that never started.
- _sync_tui_command_completion (TUI) and the Rich CLI command-completion
paths: rebind the runtime on thread rotation, not just agent swap, so
/new and /resume keep ChannelRuntime in sync with the running thread
(matches the serve-mode hook contract).
- test_hook_syncs_channel_runtime: pin ctx.thread_id explicitly so a
bare MagicMock attribute can't silently mutate runtime.thread_id.
- New regression test covering the rebind-on-thread-rotation contract.
* feat(cli): migrate command handling to CommandManager and enhance UI interactions
* feat(cli): add /clear and /help commands to enhance user experience
* feat(cli): implement /new and /resume commands with interactive session management
* Refactor MCP and Skills Command Handling
- Moved the interactive picker style to a centralized widget for consistency across MCP and Skills commands.
- Updated the MCP command to remove the old command dispatch logic, delegating to the new InstallMCPCommand.
- Enhanced the Skills command to utilize a new interactive picker for skill selection, improving user experience.
- Implemented cancellation handling in the picker to differentiate between user cancellations and empty selections.
- Added comprehensive tests for the new command structures and picker functionalities to ensure reliability.
* refactor(cli): streamline CommandManager dispatch and remove deprecated command set
* refactor(cli): enhance error handling and state management in ChannelCommand and RichCLICommandUI
* refactor(cli): update lifecycle callback terminology and improve async prompt handling in RichCLICommandUI
* refactor(cli): enhance SlashCommandCompleter to dynamically fetch workspace directory for autocompletion
* refactor(cli): unify quit handling in RichCLICommandUI with shared _stop helper
* refactor(cli): remove hardcoded slash commands and utilize command manager for dynamic completion
* refactor(cli): update MCP and skills command files for improved clarity and organization
* refactor(mcp_ui): remove unnecessary newline in _show_mcp_config function