Skip to content
mercury framework
GitHub

Bitbucket

Package
@mercury-fw/plugin-bitbucket
Role
Tool plugin
Version
0.6.1
Terminal window
bun add @mercury-fw/plugin-bitbucket

The agent lists and reads pull requests through the bitbucket command-line tool, which the package downloads when it installs. Nothing it runs changes Bitbucket.

bun add @mercury-fw/plugin-bitbucket, list it in trustedDependencies in the app’s package.json (so Bun runs the script that downloads the tool), and declare it:

mercury.config.ts
import { bitbucketPlugin } from "@mercury-fw/plugin-bitbucket";
plugins: [bitbucketPlugin],

The plugin acts as the person: every command runs with the Bitbucket account of whoever the agent is talking to. In the terminal, commands run as the workspace’s OAuth consumer (an app registered in Bitbucket).

Two consumers are set up once: the one the terminal runs as, and the one people log in through, with <HTTP_SURFACE_PUBLIC_URL>/login/callback among its callback addresses. The bitbucket tool’s README has the steps on Bitbucket’s side. Then:

Terminal window
mfw credentials setup @mercury-fw/plugin-bitbucket
mfw credentials setup @mercury-fw/plugin-bitbucket --user-app
mfw credentials check @mercury-fw/plugin-bitbucket