fix(admin): mirror gateway lease-perpetual route rename (SDK + MCP)#431
Merged
Conversation
Batch 1 / piece 1 of the pre-launch API-consistency cleanup (#430). The one-route /billing-accounts/v1/* namespace is retired; the lease-perpetual toggle joins the /billing/v1/admin/accounts/* family: POST /billing-accounts/v1/admin/:id/lease-perpetual -> POST /billing/v1/admin/accounts/:account_id/lease-perpetual Updated the SDK request path (the only place that builds the URL), the MCP tool description, and the SDK / cli-e2e / sync cross-surface assertions. The CLI and OpenClaw commands are thin shims over the SDK and reference only the command name (unchanged), so they needed no edits. Piece 2 (admin credit/debit/set-tier keyed by :account_id) has no published-client surface in this repo, so there is nothing to mirror here. Refs #430 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Batch 1 / piece 1 of the pre-launch API-consistency cleanup (#430).
The one-route
/billing-accounts/v1/*namespace is retired; thelease-perpetualtoggle joins the/billing/v1/admin/accounts/*family next to credit/debit/set-tier:POST /billing-accounts/v1/admin/:id/lease-perpetualPOST /billing/v1/admin/accounts/:account_id/lease-perpetualWhat changed
sdk/src/namespaces/admin.ts—setLeasePerpetual()request path (the only place that builds the URL) + doc commentsrc/index.ts— MCPadmin_set_lease_perpetualtool description ("Calls POST …")sdk/src/namespaces/admin.test.ts,cli-e2e.test.mjs,sync.test.ts— cross-surface URL/registry assertions (registry param adopts the new:account_idconvention)The CLI and OpenClaw commands are thin shims over the SDK and reference only the command name (
run402 admin lease-perpetual, unchanged), so they needed no edits.Out of scope
Piece 2 (admin
credit/debit/set-tierkeyed by:account_id) has no published-client surface in this repo — those are gateway-internal admin routes, so there is nothing to mirror here. Pieces 3–5 are pending gateway design.Verification
Full suite green locally (
npm test: 1277 + 619 tests, 0 failures; doc-snippet check 43 snippets).git grep billing-accountsis clean across source.Refs #430