Skip to content

feat(v3): call Cbox ID's /v1 API on api_url, additively - #4

Merged
sylvesterdamgaard merged 2 commits into
mainfrom
feat/id-v3
Nov 11, 2026
Merged

sylvesterdamgaard merged 2 commits into
mainfrom
feat/id-v3

Conversation

@sylvesterdamgaard

Copy link
Copy Markdown
Contributor

Supports Cbox ID v3 without changing anything for a client that sets nothing new.

  • api_url on every management client (EnvironmentClient(api_url="https://api.cboxid.com", …)): same methods, /v1 routes. Routes are generated from the vendored openapi/openapi.json by action name (OperationSpec.v1); parents that /v1 takes in the query or body are moved there. /v1 objects, the list envelope, RFC 9457 problems and object: "approval" holds come back as the same ApiResponse / CboxIdApiError / approval flow. platform.workspaces.create and .set_status have no /v1 route and are refused on api_url.
  • CboxIdConfig.api_url: manifest push to /v1/app-manifests, Pipes leases to /v1/pipe-leases (provider in the body).
  • OrganizationClient: WorkspaceClient under its new name; client.organization is client.workspace; takes cbid_org_… keys.
  • Ids: raw_id, same_id, is_prefixed_id; check_permissions accepts prefixed ids for the raw ones asked.
  • Events: current_event_name, legacy_event_name, event_name_aliases, same_event (user.login is id.user.signed_in).

Gate: ruff check ., ruff format --check ., mypy, pytest (306 passed), generate_management --check fresh. New tests in tests/test_id_v3.py; the 268 existing tests pass unchanged. Not released.

https://claude.ai/code/session_01SQE6nwK41XrC5Hp76p7k9Y

- api_url on every management client: the same methods call their /v1
  route (generated from the vendored openapi/openapi.json), with parents
  moved into the query or body; /v1 objects, list envelope, RFC 9457
  problems and approval holds come back as the same types.
- CboxIdConfig.api_url / PipesClient(api_url=...): manifest push to
  /v1/app-manifests, Pipes leases to /v1/pipe-leases.
- OrganizationClient (WorkspaceClient under its new name), cbid_org_ keys.
- raw_id/same_id/is_prefixed_id; check_permissions accepts prefixed ids.
- current_event_name/legacy_event_name/event_name_aliases/same_event for
  the old and id.* event names.

Without api_url every call is unchanged.

Claude-Session: https://claude.ai/code/session_01SQE6nwK41XrC5Hp76p7k9Y
Without api_url the approval parsing is exactly what 0.12.0 did.

Claude-Session: https://claude.ai/code/session_01SQE6nwK41XrC5Hp76p7k9Y
@sylvesterdamgaard
sylvesterdamgaard merged commit 342acb4 into main Nov 11, 2026
4 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