[PR #7947] refactor(server): break up server.ts into domain-specific routers #12572

Closed
opened 2026-02-16 18:17:28 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/7947

State: closed
Merged: No


Summary

  • Extract routes from server.ts (~2900 → 576 lines) into 14 router files
  • Improves maintainability and type inference performance
  • Pure refactor - all 92 API endpoints preserved

Changes

New routers: session, pty, provider, mcp, file, config, tool, permission, auth, worktree, agent, lsp, formatter, command

Expanded tui.ts to include all /tui/* routes.

Test plan

  • TypeScript compiles
  • All operationIds preserved in OpenAPI spec
  • SDK regenerated successfully
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/7947 **State:** closed **Merged:** No --- ## Summary - Extract routes from server.ts (~2900 → 576 lines) into 14 router files - Improves maintainability and type inference performance - Pure refactor - all 92 API endpoints preserved ## Changes New routers: session, pty, provider, mcp, file, config, tool, permission, auth, worktree, agent, lsp, formatter, command Expanded tui.ts to include all `/tui/*` routes. ## Test plan - [x] TypeScript compiles - [x] All operationIds preserved in OpenAPI spec - [x] SDK regenerated successfully
yindo added the pull-request label 2026-02-16 18:17:28 -05:00
yindo closed this issue 2026-02-16 18:17:28 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12572