Skip to content

Swap the hand-rolled API mirror for the SDK 0.8.1 generated client - #110

Merged
hbrooks merged 1 commit into
mainfrom
sdk-081-swap
Aug 19, 2026
Merged

Swap the hand-rolled API mirror for the SDK 0.8.1 generated client#110
hbrooks merged 1 commit into
mainfrom
sdk-081-swap

Conversation

@hbrooks

@hbrooks hbrooks commented Aug 19, 2026

Copy link
Copy Markdown
Member

Important

Replaces the hand-rolled API client with the SDK 0.8.1 generated client, delegating all REST operations to the SDK rather than maintaining a parallel mirror of the API surface.

  • API Client: The ~494-line ApiClient class is removed from src/lib/api.ts and replaced with an api() function that returns an Ellipsis SDK client instance. All 20+ command files now call api().analytics.metrics(), api().agents.configs.list(), api().files.get(), etc. instead of instantiating and calling methods on ApiClient.
  • Type System: Hand-rolled request/response types (analytics metrics/pull-requests/reviews responses, file shapes, review types, CLI auth types) are removed from src/lib/types.ts. Types now come from the SDK-generated schema (@ellipsis-dev/sdk), re-exported under CLI-specific names to catch API renames as type errors rather than silent undefined fields.
  • Error Handling: Updated to use the SDK's APIError class instead of the custom ApiError. Added errorDetail() and describeApiError() helpers to extract the server's message and request ID from SDK errors for terminal output.
  • Dependencies: @ellipsis-dev/sdk bumped from 0.6.0 to 0.8.1 in package.json and bun.lock.
  • Code reduction: 2269 lines deleted, 816 added (net ~1453 lines removed).

This description was created by Ellipsis for 0bdafb3. It will automatically update as commits are pushed.

@hbrooks
hbrooks merged commit d961808 into main Aug 19, 2026
1 check passed
@hbrooks
hbrooks deleted the sdk-081-swap branch August 19, 2026 13:45

@ellipsis-dev ellipsis-dev Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed 0bdafb3 in 8 minutes, 56 seconds.
  • Reviewed 1 commit with 2121 lines of code in 38 files
  • Ran 1 review agent producing 0 comments where 0 were posted
  • This pipeline runs no gatekeeper, so findings are posted as written.
  • View full details on ellipsis.dev

This review was created by Ellipsis. You can tag @ellipsis in this pull request.

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