refactor(cli): consume shared Functions core - #2701
Draft
shrey150 wants to merge 4 commits into
Draft
Conversation
🦋 Changeset detectedLatest commit: d3b3b7e 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 |
This was referenced Aug 13, 2026
shrey150
force-pushed
the
agent/use-functions-core
branch
from
August 28, 2026 19:27
8b191df to
090cef8
Compare
shrey150
changed the base branch from
agent/fix-functions-parity
to
agent/browse-v4-7-context-names
August 28, 2026 19:30
This was referenced Aug 28, 2026
shrey150
force-pushed
the
agent/use-functions-core
branch
from
August 28, 2026 19:38
090cef8 to
a7a72ab
Compare
…ns-core-v4-restack
…ns-core-v4-restack
…ns-core-v4-restack
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.
Summary
Make Browse a thin Oclif adapter over the canonical
@browserbasehq/sdk-functions/corelibrary.--api-url/-ualias and optional--project-idbehavior that fix(cli): align Functions with SDK on v3 CLI #2704 hotfixed only on the V3 release branch.bb functionsand Browse on one implementation so their behavior cannot drift independently again.Stack
--return-xpath; complete supported V3 parityDependency and release gate
This PR depends on sdk-functions-node #40, which exposes the shared core. The catalog is temporarily pinned to the exact tested SDK commit
c74bea65c3dd645470e0fc80e65cfff283310665; the Git dependency requires itspreparebuild and a temporary pnpmallowBuildsentry.Keep this PR draft and do not merge or publish Browse from the commit pin. After
@browserbasehq/sdk-functions@1.1.0is published:^1.1.0.allowBuildsentry and TODO.Review boundary
The SDK core owns scaffolding, archive rules, Functions HTTP requests, project inference/override, build and invocation polling, local runtime behavior, and typed failures. This PR owns only Oclif flags, Browse output/telemetry/error adaptation, signals, and dependency wiring.
The public SDK core surface consumed or made available to hosts is:
createFunctionProject,createFunctionArchive,listFunctionArchiveEntries,validateFunctionArchiveSize, andMAX_FUNCTION_ARCHIVE_SIZE_BYTES.publishFunction,getBuildStatus,invokeFunction, andgetInvocationStatus.startDevServerand its typed handle/options/log events.FunctionsCoreErrorwith stable error codes.The existing package root and
bbbinary remain intact. An explicit contract test verifies that importing@browserbasehq/sdk-functions/coredoes not execute the package's Commander CLI.E2E test matrix
pnpm lintand buildc74bea65cmaind3b3b7e20BROWSERBASE_PROJECT_IDExample Domainshared-core-okPENDING; status lookup reachedCOMPLETEDwith the same resultbbCLI invoked the Function published by Browse and observed the same resultLive validation used synthetic functions and public targets. Secrets, account identifiers, resource IDs, and connection URLs are intentionally omitted.
The unreleased-package live smoke used the exact packed SDK #40 tarball in the SDK's canonical dual-lock fixture. A fresh registry install of the eventual
1.1.0package in both npm and pnpm scaffolds is still mandatory after publication; that is the remaining release-level uncertainty and the reason this PR stays draft.