v2.38.0
Org-owned control plane — client cascade
The gateway (v1.77) made the org (billing account) own projects: a wallet now authenticates (SIWX resolves it to a control-plane principal) but no longer authorizes. SIWX auth is unchanged, so this release is additive — it teaches the clients the new authorization model.
SDK (@run402/sdk)
- New typed
NotAuthorizedError(kind: "not_authorized") for403 NOT_AUTHORIZEDcontrol-plane denials, carryingrequiredRole,requiredCapability,reason, andactionlifted from the gatewaydetails. The kernel routes only that code to it; every other 401/403 staysUnauthorized, so existingisUnauthorizedcallers are unaffected. Exported from both entry points with anisNotAuthorizedtype guard. ProjectSummary/TierStatusProjectgain optionalbilling_account_id(owning org) +created_by(provisioning principal).
MCP (run402-mcp)
NOT_AUTHORIZEDnow renders distinct org-authorization guidance (echoes the missing role / capability / reason) instead of the generic "lease expired" 403 text.
CLI (run402)
NOT_AUTHORIZEDerrors get an actionablehintin the JSON envelope; the structuredcode/detailspass through unchanged.
Docs
- Org-ownership wording + the new
403 NOT_AUTHORIZEDerror acrossllms-sdk.txt,llms-mcp.txt,llms-cli.txt, andSKILL.md.
Deferred to a later release (the gateway org-management routes don't exist yet): whoami → principal + memberships, the org.{members,invite,role,revoke} / project.grants SDK surface, run402 org …, and MCP org/membership tools.
Addresses #434.