feat: add web search, file edit, MCP management, file refs, and /stop to CLI/TUI #348

Merged
jason.woltje merged 1 commits from feat/cli-tui-tools-enhancement into main 2026-04-02 18:08:31 +00:00
Owner

Summary

Adds 5 capability areas to the Mosaic CLI/TUI and gateway agent:

1. Web Search Tools (multi-provider)

  • , , agent tools
  • Providers: Brave, Tavily, SearXNG (env-var activated), DuckDuckGo (always available)
  • Auto mode tries providers in priority order

2. File Edit Tool ()

  • Targeted text replacement with unique-match validation
  • Overlap detection, atomic application, sandbox-guarded

3. MCP Management Commands

  • — show all MCP server connections, tool counts, errors
  • — alias for status
  • — reconnect a disconnected MCP server

4. File Reference in Chat

  • syntax auto-expands to fenced code blocks with language hints
  • local command for explicit file attachment
  • 256KB per file, max 10 files per message

5. /stop Command (abort streaming)

  • New type in
  • Gateway handler calls
  • TUI emits abort event via socket

Quality

  • typecheck: 36/36 ✓
  • lint: 20/20 ✓
  • format: ✓
  • tests: all passing (pre-existing PG integration failure unrelated)
## Summary Adds 5 capability areas to the Mosaic CLI/TUI and gateway agent: ### 1. Web Search Tools (multi-provider) - , , agent tools - Providers: Brave, Tavily, SearXNG (env-var activated), DuckDuckGo (always available) - Auto mode tries providers in priority order ### 2. File Edit Tool () - Targeted text replacement with unique-match validation - Overlap detection, atomic application, sandbox-guarded ### 3. MCP Management Commands - — show all MCP server connections, tool counts, errors - — alias for status - — reconnect a disconnected MCP server ### 4. File Reference in Chat - syntax auto-expands to fenced code blocks with language hints - local command for explicit file attachment - 256KB per file, max 10 files per message ### 5. /stop Command (abort streaming) - New type in - Gateway handler calls - TUI emits abort event via socket ### Quality - typecheck: 36/36 ✓ - lint: 20/20 ✓ - format: ✓ - tests: all passing (pre-existing PG integration failure unrelated)
jason.woltje added 1 commit 2026-04-02 18:08:17 +00:00
feat: add web search, file edit, MCP management, file refs, and /stop to CLI/TUI
Some checks failed
ci/woodpecker/push/ci Pipeline failed
ci/woodpecker/pr/ci Pipeline failed
fcb792a65d
1. Web search tools (multi-provider): web_search, web_search_news, web_search_providers
   - Brave, Tavily, SearXNG (env-var activated), DuckDuckGo (always available)
   - Auto mode tries providers in priority order

2. File edit tool (fs_edit_file): targeted text replacement with validation
   - Unique oldText matching, overlap detection, atomic application
   - Sandboxed with size limits

3. MCP management commands: /mcp status, /mcp servers, /mcp reconnect <name>
   - Shows connection status, tool counts, errors for all MCP servers
   - Reconnect disconnected servers from the TUI

4. File reference in chat: @path/to/file inline expansion + /attach command
   - Auto-detects @file patterns and inlines contents as fenced code blocks
   - 256KB per file limit, max 10 files per message
   - Language-aware syntax highlighting hints

5. /stop command: abort streaming via Pi SDK abort()
   - New AbortPayload type in @mosaic/types
   - Gateway abort handler calls piSession.abort()
   - TUI emits abort event on /stop
jason.woltje merged commit 0d12471868 into main 2026-04-02 18:08:31 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaicstack/stack#348