Home

mweinbach / agent-coworker

publicmweinbach/agent-coworker
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

refactor: compact modelStream switch, use Bun.which(), Zod for MCP config

8 months ago

a165cfe
Authored
Claude2/21/2026, 8:38:05 PM
- modelStream.ts: Replace 310-line switch with emit() closure, each case
  now 1-3 lines (506→240 lines, -266)
- ripgrep.ts: Replace 40-line custom which() + PATH helpers with Bun.which()
- configRegistry.ts: Replace 165 lines of hand-rolled parsers with Zod
  schemas using discriminatedUnion (571→493 lines, -78)

https://claude.ai/code/session_01RtCvoFGGgntzCR9jpsTyuh

Parent645719a

3 files changed
  • src/mcp/configRegistry.ts+81−158
  • src/server/modelStream.ts+38−304
  • src/utils/ripgrep.ts+3−39