fix(cli): persist context names in Browserbase - #2839
Conversation
🦋 Changeset detectedLatest commit: b71f4e9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Have we thought about how this affects existing CLI users that have their context names saved locally, and what happens if they don't match the managed name on the Browserbase platform? |
|
Re: the comment by @shrey150 — Addressed in 659d327f1. Existing cached names remain valid local aliases and keep resolving to their saved Context IDs even when the Browserbase-managed name differs. The CLI does not auto-remap them. A colliding contexts create --name now fails before making an API request, so it cannot silently overwrite a legacy mapping; help/docs and an end-to-end mismatch regression cover the migration behavior. |
787d68e to
3137f75
Compare
Summary
Move new CLI-created Context names onto the production Browserbase Contexts API while preserving existing local aliases.
name.--nametoPOST /v1/contexts; Browserbase owns the canonical, project-scoped name.contexts add ... --forcereconciliation instead.contexts listoutput asLocal nameso cached aliases are not mistaken for an authoritative server list.See the Browserbase Contexts documentation for the persistence model.
Stack
--return-xpath; complete supported V3 parityWhy the cache remains
The production API stores an optional name, but current Context and Session calls still address Contexts by opaque ID. Removing the cache would regress
get <name>,sessions create --context-id <name>, anddelete <name>without a server-side replacement.contexts addtherefore remains explicitly a local alias, not a Browserbase rename operation.E2E Test Matrix
contexts create --nameagainst Browserbasecontexts get <local-name>contexts list --jsoncontexts delete <name>followed by get by IDb71f4e9b1No Browserbase Context IDs or credentials are included in this description.