Skip to content

refactor(api): gateway consolidation (Phase 7)#36

Merged
rogerdigital merged 2 commits into
mainfrom
refactor/gateway-consolidation
May 25, 2026
Merged

refactor(api): gateway consolidation (Phase 7)#36
rogerdigital merged 2 commits into
mainfrom
refactor/gateway-consolidation

Conversation

@rogerdigital
Copy link
Copy Markdown
Owner

Summary

  • Phase 7.1: Remove USE_HONO flag, always use raw Node gateway
  • Phase 7.2: Split alpaca.ts (744 lines) into 3 focused modules with typed interfaces:
    • alpaca-config.ts — env loading + GatewayConfig type
    • alpaca-client.ts — API client functions, normalizers, broker handlers
    • alpaca.ts — gateway handler, server creation, barrel re-exports

Test plan

  • All 194 API tests pass
  • Typecheck passes (no @ts-nocheck in gateway)
  • Biome lint/format passes
  • Pre-push verify (full suite) passes

The raw Node gateway already handles all routes (platform + control-plane).
USE_HONO path was incomplete and will be replaced by a full Hono migration
in a follow-up. Hono app is preserved for future native Hono router migration.
- alpaca-config.ts: env loading + typed GatewayConfig
- alpaca-client.ts: API client functions, normalizers, broker handlers
- alpaca.ts: gateway handler, server creation, barrel re-exports

Removes @ts-nocheck from the gateway module.
@rogerdigital rogerdigital merged commit 11b58a3 into main May 25, 2026
8 checks passed
@rogerdigital rogerdigital deleted the refactor/gateway-consolidation branch May 25, 2026 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant