Commit Graph

123 Commits

Author SHA1 Message Date
X-iZhang ac7fdcecf2 refactor: improve readability of command validation and path extraction logic 2026-03-19 18:38:57 +00:00
X-iZhang edd3823881 feat: implement absolute system path detection in command validation 2026-03-19 18:28:54 +00:00
Jan Piotrowski 2fdf961fee chore: fix ruff linting and async patterns in tests/ 2026-03-19 17:04:05 +01:00
Jan Piotrowski 4a3d6c0318 chore: add ruff lint rules and turn on formatting 2026-03-19 17:04:02 +01:00
Xi Zhang 47e5ef6219 Feat/minimax anthropic routing (#75)
* feat: update MiniMax integration to use Anthropic-compatible endpoint and enhance routing logic

* refactor: streamline OAuth install hint and update ccproxy health check timeout
2026-03-19 15:01:06 +00:00
Octopus a011dca693 feat: add MiniMax as direct LLM provider (#70)
Add MiniMax (api.minimax.io/v1) as a first-class third-party provider,
enabling direct API access without routing through NVIDIA/SiliconFlow/
OpenRouter intermediaries. Includes M2.5 and M2.5-highspeed models
with 204K context window.

Changes:
- Register "minimax" in _THIRD_PARTY_PROVIDERS with MINIMAX_API_KEY
- Add MiniMax-M2.5 and MiniMax-M2.5-highspeed model entries
- Add minimax_api_key to config, env mappings, and env export
- Add MiniMax to onboarding wizard with API key validation
- Update .env.example, README.md, README.zh-CN.md
- Add 9 unit tests and 3 integration tests (all passing)

Co-authored-by: PR Bot <pr-bot@minimaxi.com>
Co-authored-by: Xi Zhang <106144707+X-iZhang@users.noreply.github.com>
2026-03-19 13:02:40 +00:00
dinos ac5ea37d14 fix(mcp): eliminate duplicate config loading during startup (#69)
* fix(mcp): eliminate duplicate config loading during startup

load_mcp_config() was called twice on every startup — once in
_mcp_config_signature() to compute the cache key, and again inside
load_mcp_tools(). This caused warnings to appear twice.

Merge the two calls into _load_mcp_config_once() which returns both the
signature and the parsed config, then pass the config through to
load_mcp_tools() via a new optional parameter.

* test(mcp): fix existing cache tests and add coverage for single-load guarantee

- Update fake_load_mcp_tools to accept optional config kwarg
- Add test_load_mcp_config_called_once_per_cache_miss: verifies
  load_mcp_config is called exactly once per cache miss (the bug)
- Add test_cached_config_passed_to_load_mcp_tools: verifies the
  pre-loaded config dict is forwarded to load_mcp_tools

---------

Co-authored-by: Xi Zhang <106144707+X-iZhang@users.noreply.github.com>
2026-03-19 12:47:47 +00:00
dinos 7ebaa2cec0 feat: implement command to browse and install MCP servers (#65)
* refactor(mcp): extract MCP server registry from onboard into shared module

Move _RECOMMENDED_MCP_SERVERS, _install_pip_package, and
_pip_install_hint from config/onboard.py into mcp/registry.py as a
shared MCPServerEntry dataclass and registry functions. This enables
reuse by the new /install-mcp command and marketplace integration.

* feat(mcp): add /install-mcp command for browsing and installing MCP servers

Interactive browser for MCP servers (built-in registry + EvoSkills
marketplace), supporting three modes:
- /install-mcp         — interactive tag filter + checkbox selection
- /install-mcp <name>  — direct install by name or tag pre-filter
- /install-mcp file.yaml — import servers from arbitrary YAML file

Also available as /mcp install and EvoSci mcp install. Includes TUI
browser widget (MCPBrowserWidget) mirroring the skill browser UX.

* chore(tavily): conditionally pass tavily_search when TAVILY_API_KEY is set

* fix(tui): Enter key detection for /install-mcp

- Fix message handler names: Textual converts MCPBrowserWidget to
  mcpbrowser_widget (not mcp_browser_widget), so Confirmed/Cancelled
  messages were never received by the app
- Distinguish empty selection from cancel in result handling

* chore(widgets): stop auto-advancing cursor on Space toggle in browser widgets

* style: linter

* refactor(mcp): simplify MCP registry to marketplace-only

Remove built-in server list and arbitrary YAML import — all server
definitions now come from the EvoSkills marketplace (mcp/*.yaml).
Onboarding filters by the `onboarding` tag instead of a hardcoded list.

* refactor(mcp): consolidate /install-mcp into /mcp install

Remove standalone /install-mcp command — use /mcp install as the
single entry point. CLI adapter now delegates logic to the shared
InstallMCPCommand class, keeping only the questionary UI layer.

* chore(cli): rm reference to yaml import
2026-03-19 12:45:32 +00:00
Jan Piotrowski f9734c7e67 feat: extract commands from TUI to commands module
- adjust discord max message length to 2000 (the actual limit)
- /install-skill will fallback to searching EvoSkills repository if path not found to allow for installing skills from channels
- remove discord config tests (it asserted @dataclass behaviour)
2026-03-18 16:59:50 +01:00
z00827015 1c6f4a2078 Add the ability to read text from the system clipboard 2026-03-18 16:42:34 +01:00
akou 2f1622579f fix: improve ccproxy OAuth install hint (#55)
Co-authored-by: Dinos Papakostas <dinospk1999@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 09:57:06 +01:00
X-iZhang 7089d1c179 feat: implement _resolve_command function for command path resolution 2026-03-17 23:05:05 +00:00
X-iZhang 53699f9a4e fix: extend ccproxy health check timeout from 10 to 30 seconds 2026-03-17 22:51:02 +00:00
Wiktor Cupiał d5e50a690e fix: add config option for ccproxy port number (#52)
* fix: add config option for ccproxy port number

* feat: add user prompt for ccproxy port configuration and validation
fix: update is_ccproxy_running to use health check endpoint
test: enhance tests for ccproxy port handling and validation

* fix: streamline ccproxy installation process using _install_pip_package

* fix: auto-patch ccproxy adapter for correct OAuth beta header

---------

Co-authored-by: Xi Zhang <106144707+X-iZhang@users.noreply.github.com>
Co-authored-by: X-iZhang <zacharyzhang2022@gmail.com>
2026-03-17 22:27:20 +00:00
dinos 97684eab7b fix: centralize dotenv loading inside get_effective_config (#45) (#50)
load_dotenv was called in three scattered places: commands.py (main and
serve entry points) and search.py (at module import time). This could
re-override env vars after config resolution.

I moved the single load_dotenv call into get_effective_config() so it
participates in the config priority chain, and removed it from all
other call sites.
2026-03-17 13:13:28 +00:00
dinos 2f855c07c7 feat: add /install-skills command with tag-based skill browsing (#48)
* feat: add tag support to skill metadata parser

- Add `tags` field to `SkillInfo` dataclass
- Extend `_parse_skill_md` to return `SkillInfo` directly (instead of
  dict), extracting tags from top-level `tags` or `metadata.tags`
fallback
- Accept `source` as keyword argument in `_parse_skill_md` to avoid
  post-hoc mutation
- Add `_normalize_tags` helper (handles list, comma-string, missing)
- Add `list_skills_by_tag()` for filtering installed skills by tag
- Add `get_all_tags()` returning tags sorted by count then
alphabetically
- Add `fetch_remote_skill_index()` with shallow-clone and 10-min cache
- Add 12 new tests covering tag parsing, filtering, and remote index

* feat: add /install-skills command and browse action to skill_manager tool

CLI:
- Add `/install-skills` slash command with interactive tag picker and
  skill checkbox (questionary-based, for CLI mode)
- Accepts optional tag argument for pre-filtering: `/install-skills
core`
- Update `/skills` listing to show tags per skill
- Register command in interactive.py dispatch

LangChain tool:
- Add `browse` action to `skill_manager` tool with optional `tag` filter
- Update `list` and `info` actions to include tags in output

* feat: add interactive skill browser widget for TUI

New widget (skill_browser.py):
- Two-phase keyboard-driven widget mounted inline in chat
- Phase 1: tag picker (arrow keys + Enter, Esc to cancel)
- Phase 2: skill checkbox (Space to toggle, Enter to install, Esc back)
- Width-aware description truncation with ellipsis
- Installed skills shown as non-toggleable with checkmark

TUI integration (tui_interactive.py):
- Register /install-skills command with async widget flow
- Echo executed commands in cyan before output
- Add SkillBrowserWidget keyboard delegation (up/down/esc)
- Refocus prompt input after any widget dismissal (also fixes
  pre-existing /resume and /delete focus bug)
- Show tags as bulleted newlines in /skills table
- Dynamic autocomplete padding based on longest item
2026-03-17 12:04:23 +00:00
Xi Zhang 973edb6aa4 fix: update system prompt to include today's date and refactor related functions (#43) 2026-03-17 02:42:04 +00:00
Xi Zhang e515f69bdc Fix/onboard oauth ux (#38)
* "fix(onboard): guide ccproxy install and auth in OAuth flow

  - Always show API Key / OAuth choice; prompt to install evoscientist[oauth]
    when ccproxy missing (mirrors iMessage imsg install UX)
  - Add _ccproxy_exe() helper: checks PATH then env bin dir (fixes conda envs
    where shutil.which may not find newly installed binaries)
  - Fix check_ccproxy_auth() false positive: ccproxy auth status exits 0 even
    when not authenticated; detect via output content + filter structlog noise
  - Silent install/login subprocesses; show browser URL as fallback
  - Reset anthropic/openai auth_mode to api_key when switching to non-Anthropic/
    OpenAI provider, preventing stale oauth config from triggering ccproxy error

  Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>"

* fix(onboard): update OAuth support details in README and zh-CN translation
2026-03-16 20:22:20 +00:00
Ziheng Zhang 4b648b3413 chore: add models (#30)
Co-authored-by: Xi Zhang <106144707+X-iZhang@users.noreply.github.com>
2026-03-16 17:40:03 +00:00
X-iZhang 62fe970476 feat: add OpenAI support with OAuth and environment configuration 2026-03-16 00:25:19 +00:00
X-iZhang c5a4d559a2 Refactor test cases for improved readability and consistency
- Added blank lines for better separation of test cases in multiple test files.
- Reformatted event handling in tests for clarity and consistency.
- Ensured consistent use of multi-line formatting for dictionary arguments in event handling.
- Improved assertions and test descriptions for better understanding.
- Updated test cases across various modules including test_stream_state, test_stream_utils, test_summarization, test_thread_selector, test_tool_error_handler, test_tui_widgets, test_ui_runtime, and test_wechat_channel.
2026-03-15 21:12:51 +00:00
X-iZhang f27521d62b feat: enhance thinking configuration for Anthropic 4-5 models with proxy support 2026-03-15 17:11:00 +00:00
X-iZhang 1ce2d059ca feat: implement OAuth support for Anthropic using ccproxy and add related configuration options 2026-03-15 16:52:11 +00:00
Jiao Huifeng 741eb709b9 feat: support ANTHROPIC_BASE_URL for proxy-based deployments (e.g. ccproxy) (#25)
Allow the Anthropic provider to accept a base_url override via the
ANTHROPIC_BASE_URL environment variable or anthropic_base_url config
field. This enables routing Anthropic API requests through local proxies
like ccproxy without losing provider-specific features (extended
thinking, adaptive effort) that would be dropped when using the generic
"custom" provider.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Xi Zhang <106144707+X-iZhang@users.noreply.github.com>
2026-03-15 14:51:31 +00:00
X-iZhang 21a875e026 feat: add /compact command to summarize conversation and free context 2026-03-14 20:09:38 +00:00
X-iZhang 46a1de9dd6 refactor: enhance summarization widget with streaming support and text accumulation 2026-03-14 19:41:27 +00:00
X-iZhang 5ff000a9b2 feat: enhance timeout handling with recovery guidance and resource estimation in middleware 2026-03-11 00:03:18 +00:00
X-iZhang c15c0dfdf0 feat: add ask_user middleware and interactive widget for user prompts
- Implemented `ask_user` middleware to facilitate agent-initiated questions during research workflows.
- Created `AskUserWidget` for interactive user prompts, supporting both text and multiple choice questions.
- Enhanced `StreamEventEmitter` to handle `ask_user` interrupts and updated event handling in `stream_agent_events`.
- Added state management for pending `ask_user` events in `StreamState`.
- Developed validation for question structures and parsing for responses.
- Introduced unit tests covering middleware functionality, event handling, and widget behavior.
2026-03-10 18:17:52 +00:00
X-iZhang 311fb08676 feat(summarization): implement summarization feature with dedicated widget and event handling 2026-03-10 01:13:30 +00:00
X-iZhang 903ef4d158 feat(thread-picker): add ThreadPickerWidget for inline thread selection in TUI 2026-03-10 00:45:21 +00:00
X-iZhang aad431785c feat(diff): implement unified diff formatting for edit_file tool results 2026-03-09 22:18:54 +00:00
X-iZhang c4de31c772 fix(ui): map legacy UI backend values to current equivalents in normalization 2026-03-09 10:38:42 +00:00
X-iZhang f3bb70c74e feat(serve): implement headless serve mode with message processing and interrupt handling 2026-03-08 17:06:40 +00:00
X-iZhang 260ee95697 feat(ui): update UI backend references from 'rich' to 'tui' in onboarding and interactive components 2026-03-08 16:44:28 +00:00
X-iZhang a118d3ed23 refactor(onboard): simplify workspace step to return only selected mode
test(onboard): update tests for workspace step to reflect mode-only return
2026-03-08 16:16:40 +00:00
X-iZhang 07e57e110b feat(ui): update UI backend options to use 'cli' and 'tui' 2026-03-08 15:34:22 +00:00
X-iZhang 5ea9f3e938 feat(serve): add auto-approve option for tool executions
docs: update README to include HITL action approval details
tests: adjust mock for get_effective_config in CLI serve tests
2026-03-07 21:13:40 +00:00
X-iZhang 833fa0abfb Implement HITL (Human-in-the-Loop) approval mechanism
- Added HITL approval lifecycle to ToolCallWidget, including a new "rejected" status.
- Introduced configuration options for auto-approval and shell command allow list in EvoScientistConfig.
- Developed approval handling functions in display module to manage HITL interrupts and user decisions.
- Created ApprovalWidget for user interaction during approval prompts.
- Enhanced StreamEventEmitter to support interrupt events.
- Updated StreamState to track pending interrupts.
- Implemented tests for HITL functionality, including event structure, state handling, and approval logic.
2026-03-07 21:02:35 +00:00
X-iZhang bdd3e30284 feat(ollama): enable reasoning by default for Ollama models and update tests 2026-03-07 18:44:11 +00:00
X-iZhang 250c41c561 feat(token-usage): implement token usage tracking and display widget 2026-03-07 15:16:29 +00:00
X-iZhang 13858b860a feat(models): add zhipu and zhipu-code providers to models registry tests 2026-03-06 14:19:00 +00:00
Xiaohui Yan b14dceb143 feat(models): add glm-5, glm-4.7 from zhipu API (with code plan supoort) (#19)
* feat(models): add glm-5, glm-4.7 from zhipu API (with code plan supoort)

* fix: add zhipu and zhipu-code to valid providers in test
2026-03-06 08:57:33 +00:00
X-iZhang a574492123 refactor(prompts, utils, subagent, skill_manager, think): update skill usage instructions and enhance reflection tool for better decision-making 2026-03-03 01:05:10 +00:00
X-iZhang 7e65bfe0b7 feat(models): expand support for additional providers and enhance auto-configuration logic 2026-03-01 00:09:44 +00:00
X-iZhang 2f6cf824f2 refactor(config): remove max_concurrent and max_iterations from config and onboarding steps
feat(prompts): update system prompt to eliminate numeric limits for sub-agents and delegation rounds
test(tests): adjust tests to reflect changes in configuration and onboarding logic
2026-02-27 18:57:47 +00:00
X-iZhang d81d41f756 feat(models): add new models for SiliconFlow and OpenRouter providers
test(models): update tests to validate new providers and registered models
2026-02-27 14:38:22 +00:00
X-iZhang 931fc8a88d feat(skills): implement batch installation of multiple skills and enhance install feedback 2026-02-25 23:38:08 +00:00
X-iZhang 35135ee79c feat(tests): add additional smoke tests for email, signal, and QQ channels
feat(tests): enhance relative time formatting tests for minutes, hours, days, and months
chore(docs): update contributing guidelines for testing commands
2026-02-25 10:05:29 +00:00
X-iZhang abf783d2d3 feat(cli): enhance agent loading with optional config parameter for improved initialization 2026-02-25 00:35:40 +00:00
X-iZhang ea00578cee feat(onboarding): add Ollama provider support with connection validation 2026-02-24 19:45:02 +00:00