Commit Graph

10 Commits

Author SHA1 Message Date
William Valentin 72c75a8bd7 feat(cli): add CLI entry point with commander and start command 2026-02-05 22:14:42 -08:00
William Valentin 69fc4dd531 chore: add commander and croner dependencies 2026-02-05 22:10:44 -08:00
William Valentin cd839c7f0c feat: add MCP integration for external tool servers
Implement Model Context Protocol (MCP) support so Flynn can spawn MCP
server processes, discover their tools, and make them available to the
agent alongside builtin tools.

- McpClient: wraps @modelcontextprotocol/sdk with StdioClientTransport
  for process lifecycle, tool discovery (listTools), and invocation (callTool)
- McpManager: lifecycle management for multiple MCP servers with
  startAll/stopAll/restart, tool bridging into ToolRegistry
- Bridge: converts MCP tools to Flynn Tool interface with mcp:<server>:<tool>
  namespacing to avoid collisions with builtin tools
- Config: add env and cwd fields to mcp server schema
- ToolRegistry: add unregister() method for MCP server cleanup
- Daemon: wire McpManager into startup and shutdown lifecycle
- Tests: 28 new tests (bridge, manager, registry unregister)
2026-02-05 20:10:37 -08:00
William Valentin f30a8bc318 feat(gateway): add WebSocket gateway with JSON-RPC protocol and auth
Phase 2 of the Flynn roadmap. Adds a WebSocket gateway server that
starts alongside the Telegram bot, providing real-time API access to
the agent, sessions, and tools.

Protocol: JSON-RPC-like (request/response/event) over WebSocket.
8 methods: agent.send, agent.cancel, sessions.list, sessions.history,
sessions.create, tools.list, tools.invoke, system.health.

Auth: Bearer token + Tailscale identity header support.
Session bridge: per-connection agent instances with shared model router.

New files: src/gateway/ (protocol, router, server, auth, session-bridge,
handlers for agent/sessions/tools/system).
57 new tests (181 total), typecheck clean.
2026-02-05 19:11:25 -08:00
William Valentin 0950296cf0 chore: add markdown rendering dependencies 2026-02-05 10:50:55 -08:00
William Valentin f671ea5ab5 feat: add fullscreen TUI mode with Ink React components 2026-02-05 00:41:17 -08:00
William Valentin c0deeb5cf0 feat: add TUI entry point with minimal readline mode 2026-02-05 00:37:40 -08:00
William Valentin 55c2e6bf74 chore: add dependencies for TUI (ink, react)
Adds:
- ink ^6.0.0 (React for CLI)
- ink-text-input ^6.0.0 (text input component)
- react ^19.0.0
- @types/react ^19.0.0

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 00:33:04 -08:00
William Valentin 7338b390ef chore: add dependencies for phase 2 (sqlite, ollama, openai) 2026-02-02 21:09:31 -08:00
William Valentin 93f86fe749 chore: initialize project scaffolding 2026-02-02 20:51:26 -08:00