Skip to content

fix(admin): mirror gateway lease-perpetual route rename (SDK + MCP)#431

Merged
MajorTal merged 1 commit into
mainfrom
claude/unruffled-hamilton-cede58
Jun 4, 2026
Merged

fix(admin): mirror gateway lease-perpetual route rename (SDK + MCP)#431
MajorTal merged 1 commit into
mainfrom
claude/unruffled-hamilton-cede58

Conversation

@MajorTal
Copy link
Copy Markdown
Collaborator

@MajorTal MajorTal commented Jun 4, 2026

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 next to credit/debit/set-tier:

Old New
POST /billing-accounts/v1/admin/:id/lease-perpetual POST /billing/v1/admin/accounts/:account_id/lease-perpetual

What changed

  • sdk/src/namespaces/admin.tssetLeasePerpetual() request path (the only place that builds the URL) + doc comment
  • src/index.ts — MCP admin_set_lease_perpetual tool 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_id convention)

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-tier keyed 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-accounts is clean across source.

⚠️ Coordination: per #430, the gateway rename must not deploy until this is merged + published, else published clients calling the old path 404.

Refs #430

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>
@MajorTal MajorTal merged commit 4d8657d into main Jun 4, 2026
3 checks passed
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