Skip to content

Commit 3453ef1

Browse files
author
bcode
committed
f7: deeper phone-home / branding sweep
Catches user-visible OpenCode brand strings, OpenCode-product upsells, and one real phone-home leak that the medium pass deferred. Per the zone matrix: - OpenCode -> BrowserCode in user-visible strings only. Internal identifiers (env vars, Effect service IDs, x-opencode-* headers, third-party provider User-Agents, OpenCodeHttpApi Effect class, `opencode` as wire-protocol service name in HttpApi.make) untouched. - opencode -> bcode in CLI invocations shown to users (tips, toasts, ACP terminal-auth, MCP auth toast, MCP Client.name). What changed: * System prompts: codex / kimi / gpt / beast / copilot-gpt-5 / gemini / trinity now identify as BrowserCode (was "You are OpenCode"). Same wording previously applied to anthropic.txt / default.txt: name BrowserCode first, acknowledge OpenCode lineage, point at the BrowserCode repo for fork-specific features. anthropic.txt's objectivity section also reflows from OpenCode -> BrowserCode. * OpenAPI route descriptions (config, experimental, global, instance, project, pty, session): 20 sites of "the OpenCode X" -> "the BrowserCode X". Visible at `GET /doc` and in SDK type descriptions. * TUI sidebar/footer wordmark: "Open|Code" two-tone branding watermark -> "Browser|Code". The "Getting started" panel rewritten away from "OpenCode includes free models". * TUI tips-view: 14 random-tip strings updated. Renamed `opencode` CLI invocations to `bcode`, replaced upstream config-path examples (`~/.config/opencode/tui.json`, `opencode.json`) with bcode-flavored paths. Removed: tips advertising `docker run ghcr.io/anomalyco/opencode`, `/opencode` GitHub commands, and the "/connect with OpenCode Zen" recommendation (we don't earn upsells from OpenCode and shouldn't steer users to them by default). * TUI permission dialogs (both TUI and non-TUI `bcode run` paths): "until OpenCode is restarted" -> "until BrowserCode is restarted"; "Tell OpenCode what to do differently" -> "BrowserCode". * OAuth callback HTML pages (mcp/oauth-callback.ts + plugin/codex.ts): titles + body text say BrowserCode. Visible in the user's browser after an MCP-server or Codex provider auth flow. * MCP wire identity: Client({ name: "opencode" }) -> "bcode" (3 sites in mcp/index.ts) so MCP servers see us as bcode in client-handshake logs; client_name: "OpenCode" -> "BrowserCode" in oauth-provider.ts (visible on third-party OAuth consent screens); toast "Run: opencode mcp auth ..." -> `bcode mcp auth`; the `cmd === "opencode"` BUN_BE_BUN check now matches both "bcode" and "opencode" so user MCP configs invoking either binary work. * ACP agent identity (acp/agent.ts): agentInfo.name and terminal-auth command/label updated. ACP clients like Zed display the BrowserCode name and invoke `bcode auth login` for terminal auth. * TUI app.tsx "Successfully updated to OpenCode v..." -> "BrowserCode v...". Visible after `bcode upgrade`. * `bcode models` provider sort: removed the `a.startsWith("opencode")` boost that put OpenCode's providers first. Now plain alphabetical. * `bcode providers login` (= `bcode auth login`): dropped the `opencode: 0` priority bias and the `opencode: "recommended"` hint in the provider picker. "Configure it in opencode.json" prose in two amazon-bedrock / generic-credential prompt blocks -> "bcode.json". Positional-arg description "opencode auth provider" -> "well-known auth provider URL". * Phone-home removed: server/shared/ui.ts previously fell back to proxying every web UI request to https://app.opencode.ai when the embedded UI bundle was missing (dev or OPENCODE_DISABLE_EMBEDDED_WEB_UI). BrowserCode now 404s in that case. Removed: UI_UPSTREAM, upstreamURL, requestBody, proxyResponseHeaders, and the HTTP proxy code path. `services.client` is kept in the function signature so the router call-site doesn't need to change on every sync. * repo_clone tool description + /init command template now say BrowserCode; agent.ts reference-scout prompt's "OpenCode materializes this configured repository" -> "BrowserCode". * session/retry.ts: the FreeUsageLimitError upsell message stops saying "Subscribe to OpenCode Go ... $5/month"; replaced with a neutral "Free usage limit reached on this provider." sentinel. GO_UPSELL_URL stays empty so the TUI DialogRetryAction GO-treatment path stays dark (unchanged behavior, just wording). * PWA manifest (ui/src/assets/favicon/site.webmanifest, symlinked from app/public/site.webmanifest): name + short_name -> BrowserCode. Picked up when the web UI is rebuilt (we don't currently rebuild; this is for the eventual upstream-side rebuild). * config.ts deprecation log "tui keys in opencode config are deprecated" -> "in bcode config". "Server configuration for opencode serve" -> "bcode serve". Deliberately NOT changed: * @opencode-ai/* workspace package names — Red zone. * @opencode/... Effect service IDs — Red zone. * x-opencode-* HTTP headers — Red zone (wire protocol). * OPENCODE_* env vars — Red zone (user-configurable interface). * --user-agent=opencode/... for third-party provider compat — Red. * HttpApi.make("opencode") service name + OpenCodeHttpApi Effect class — wire-protocol service name registered on the router; renaming would fork the entire HTTP API namespace. * .well-known/opencode remote-config-server endpoint — wire protocol; third-party servers serve config at this conventionally-named path. Renaming would break interop with anyone running OpenCode-style remote-config servers. * opencode.ai/zen, opencode.ai/go upsell URLs inside dialog-provider Zen/Go connect dialogs — only shown when user explicitly picks OpenCode as a provider; in that path they need the URL to get a key. * dialog-retry-action.tsx GO_URL constant — already neutralized at the message level via empty GO_UPSELL_URL; dead code. * acp/README.md, control-plane/dev/README.md — dev docs, not bundled. * Renaming default theme opencode.json -> bcode.json and channel-DB filename opencode-{channel}.db -> bcode-{channel}.db — deferred. Theme rename cascades through ~6 theme.tsx sites and breaks users' `tui.json` `"theme": "opencode"`; channel db only fires for non-`latest` channels we don't ship. Both increase sync conflict surface for little user-facing payoff. Verification: * `bun run typecheck` 6/6 clean (16.3s). * Single-platform build at OPENCODE_VERSION=0.1.3-f7-deeper-dryrun succeeds; `./bcode --help` boots, renders BrowserCode banner, lists commands as `bcode <cmd>`.
1 parent 531247d commit 3453ef1

35 files changed

Lines changed: 102 additions & 143 deletions

File tree

packages/opencode/src/acp/agent.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -518,9 +518,9 @@ export class Agent implements ACPAgent {
518518
if (params.clientCapabilities?._meta?.["terminal-auth"] === true) {
519519
authMethod._meta = {
520520
"terminal-auth": {
521-
command: "opencode",
521+
command: "bcode",
522522
args: ["auth", "login"],
523-
label: "OpenCode Login",
523+
label: "BrowserCode Login",
524524
},
525525
}
526526
}
@@ -546,7 +546,7 @@ export class Agent implements ACPAgent {
546546
},
547547
authMethods: [authMethod],
548548
agentInfo: {
549-
name: "OpenCode",
549+
name: "BrowserCode",
550550
version: InstallationVersion,
551551
},
552552
}

packages/opencode/src/agent/agent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ export const layer = Layer.effect(
348348
`Repository: ${reference.repository}`,
349349
...(reference.branch ? [`Branch/ref: ${reference.branch}`] : []),
350350
`Cached directory: ${reference.path}`,
351-
`OpenCode materializes this configured repository before use. Do not call repo_clone for this reference.`,
351+
`BrowserCode materializes this configured repository before use. Do not call repo_clone for this reference.`,
352352
`Inspect the cached directory as the primary reference source. Prefer repo_overview with path ${JSON.stringify(reference.path)} before broader searches, then use Glob, Grep, and Read inside that directory. Do not edit files.`,
353353
`Return exact absolute file paths for findings whenever possible.`,
354354
].join("\n\n")

packages/opencode/src/cli/cmd/models.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,7 @@ export const ModelsCommand = effectCmd({
5353
return
5454
}
5555

56-
const ids = Object.keys(providers).sort((a, b) => {
57-
const aIsOpencode = a.startsWith("opencode")
58-
const bIsOpencode = b.startsWith("opencode")
59-
if (aIsOpencode && !bIsOpencode) return -1
60-
if (!aIsOpencode && bIsOpencode) return 1
61-
return a.localeCompare(b)
62-
})
56+
const ids = Object.keys(providers).sort((a, b) => a.localeCompare(b))
6357

6458
for (const providerID of ids) print(ProviderID.make(providerID), args.verbose)
6559
}),

packages/opencode/src/cli/cmd/providers.ts

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ export const ProvidersLoginCommand = effectCmd({
298298
builder: (yargs) =>
299299
yargs
300300
.positional("url", {
301-
describe: "opencode auth provider",
301+
describe: "well-known auth provider URL",
302302
type: "string",
303303
})
304304
.option("provider", {
@@ -362,14 +362,16 @@ export const ProvidersLoginCommand = effectCmd({
362362
}
363363
const hooks = yield* pluginSvc.list()
364364

365+
// No bcode-branded provider yet; sort major providers ahead of long tail without
366+
// putting OpenCode's own "opencode" / "opencode-go" at the top — we're not earning
367+
// them upsells from our binary.
365368
const priority: Record<string, number> = {
366-
opencode: 0,
369+
anthropic: 0,
367370
openai: 1,
368-
"github-copilot": 2,
369-
google: 3,
370-
anthropic: 4,
371-
openrouter: 5,
372-
vercel: 6,
371+
google: 2,
372+
"github-copilot": 3,
373+
openrouter: 4,
374+
vercel: 5,
373375
}
374376
const pluginProviders = resolvePluginProviders({
375377
hooks,
@@ -390,7 +392,6 @@ export const ProvidersLoginCommand = effectCmd({
390392
label: x.name,
391393
value: x.id,
392394
hint: {
393-
opencode: "recommended",
394395
openai: "ChatGPT Plus/Pro or API key",
395396
}[x.id],
396397
})),
@@ -443,7 +444,7 @@ export const ProvidersLoginCommand = effectCmd({
443444
}
444445

445446
yield* Prompt.log.warn(
446-
`This only stores a credential for ${provider} - you will need configure it in opencode.json, check the docs for examples.`,
447+
`This only stores a credential for ${provider} - you will need configure it in bcode.json, check the docs for examples.`,
447448
)
448449
}
449450

@@ -452,7 +453,7 @@ export const ProvidersLoginCommand = effectCmd({
452453
"Amazon Bedrock authentication priority:\n" +
453454
" 1. Bearer token (AWS_BEARER_TOKEN_BEDROCK or /connect)\n" +
454455
" 2. AWS credential chain (profile, access keys, IAM roles, EKS IRSA)\n\n" +
455-
"Configure via opencode.json options (profile, region, endpoint) or\n" +
456+
"Configure via bcode.json options (profile, region, endpoint) or\n" +
456457
"AWS environment variables (AWS_PROFILE, AWS_REGION, AWS_ACCESS_KEY_ID, AWS_WEB_IDENTITY_TOKEN_FILE).",
457458
)
458459
}

packages/opencode/src/cli/cmd/run/footer.permission.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ function RejectField(props: {
9999
minHeight={1}
100100
maxHeight={3}
101101
wrapMode="word"
102-
placeholder="Tell OpenCode what to do differently"
102+
placeholder="Tell BrowserCode what to do differently"
103103
placeholderColor={props.theme.muted}
104104
textColor={props.theme.text}
105105
focusedTextColor={props.theme.text}
@@ -288,7 +288,7 @@ export function RunPermissionBody(props: {
288288
</Match>
289289
<Match when={state().stage === "reject"}>
290290
<box paddingLeft={1}>
291-
<text fg={props.theme.muted}>Tell OpenCode what to do differently</text>
291+
<text fg={props.theme.muted}>Tell BrowserCode what to do differently</text>
292292
</box>
293293
</Match>
294294
</Switch>

packages/opencode/src/cli/cmd/run/permission.shared.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,11 @@ export function permissionInfo(request: PermissionRequest): PermissionInfo {
125125

126126
export function permissionAlwaysLines(request: PermissionRequest): string[] {
127127
if (request.always.length === 1 && request.always[0] === "*") {
128-
return [`This will allow ${request.permission} until OpenCode is restarted.`]
128+
return [`This will allow ${request.permission} until BrowserCode is restarted.`]
129129
}
130130

131131
return [
132-
"This will allow the following patterns until OpenCode is restarted.",
132+
"This will allow the following patterns until BrowserCode is restarted.",
133133
...request.always.map((item) => `- ${item}`),
134134
]
135135
}

packages/opencode/src/cli/cmd/tui/app.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,7 @@ function App(props: { onSnapshot?: () => Promise<string[]> }) {
882882
await DialogAlert.show(
883883
dialog,
884884
"Update Complete",
885-
`Successfully updated to OpenCode v${result.data.version}. Please restart the application.`,
885+
`Successfully updated to BrowserCode v${result.data.version}. Please restart the application.`,
886886
)
887887

888888
void exit()

packages/opencode/src/cli/cmd/tui/feature-plugins/home/tips-view.tsx

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,14 @@ const TIPS = [
8383
"Switch to {highlight}Plan{/highlight} agent to get suggestions without making actual changes",
8484
"Use {highlight}@agent-name{/highlight} in prompts to invoke specialized subagents",
8585
"Press {highlight}Ctrl+X Right/Left{/highlight} to cycle through parent and child sessions",
86-
"Create {highlight}opencode.json{/highlight} for server settings and {highlight}tui.json{/highlight} for TUI settings",
87-
"Place TUI settings in {highlight}~/.config/opencode/tui.json{/highlight} for global config",
86+
"Create {highlight}bcode.json{/highlight} for server settings and {highlight}tui.json{/highlight} for TUI settings",
87+
"Place TUI settings in {highlight}~/.config/bcode/tui.json{/highlight} for global config",
8888
"Add {highlight}$schema{/highlight} to your config for autocomplete in your editor",
8989
"Configure {highlight}model{/highlight} in config to set your default model",
9090
"Override any keybind in {highlight}tui.json{/highlight} via the {highlight}keybinds{/highlight} section",
9191
"Set any keybind to {highlight}none{/highlight} to disable it completely",
9292
"Configure local or remote MCP servers in the {highlight}mcp{/highlight} config section",
93-
"OpenCode auto-handles OAuth for remote MCP servers requiring auth",
93+
"BrowserCode auto-handles OAuth for remote MCP servers requiring auth",
9494
"Add {highlight}.md{/highlight} files to {highlight}.bcode/command/{/highlight} to define reusable custom prompts",
9595
"Use {highlight}$ARGUMENTS{/highlight}, {highlight}$1{/highlight}, {highlight}$2{/highlight} in custom commands for dynamic input",
9696
"Use backticks in commands to inject shell output (e.g., {highlight}`git status`{/highlight})",
@@ -99,28 +99,24 @@ const TIPS = [
9999
'Use patterns like {highlight}"git *": "allow"{/highlight} for granular bash permissions',
100100
'Set {highlight}"rm -rf *": "deny"{/highlight} to block destructive commands',
101101
'Configure {highlight}"git push": "ask"{/highlight} to require approval before pushing',
102-
"OpenCode auto-formats files using prettier, gofmt, ruff, and more",
102+
"BrowserCode auto-formats files using prettier, gofmt, ruff, and more",
103103
'Set {highlight}"formatter": false{/highlight} in config to disable all auto-formatting',
104104
"Define custom formatter commands with file extensions in config",
105-
"OpenCode uses LSP servers for intelligent code analysis",
105+
"BrowserCode uses LSP servers for intelligent code analysis",
106106
"Create {highlight}.ts{/highlight} files in {highlight}.bcode/tools/{/highlight} to define new LLM tools",
107107
"Tool definitions can invoke scripts written in Python, Go, etc",
108108
"Add {highlight}.ts{/highlight} files to {highlight}.bcode/plugin/{/highlight} for event hooks",
109109
"Use plugins to send OS notifications when sessions complete",
110-
"Create a plugin to prevent OpenCode from reading sensitive files",
111-
"Use {highlight}opencode run{/highlight} for non-interactive scripting",
112-
"Use {highlight}opencode --continue{/highlight} to resume the last session",
113-
"Use {highlight}opencode run -f file.ts{/highlight} to attach files via CLI",
110+
"Create a plugin to prevent BrowserCode from reading sensitive files",
111+
"Use {highlight}bcode run{/highlight} for non-interactive scripting",
112+
"Use {highlight}bcode --continue{/highlight} to resume the last session",
113+
"Use {highlight}bcode run -f file.ts{/highlight} to attach files via CLI",
114114
"Use {highlight}--format json{/highlight} for machine-readable output in scripts",
115-
"Run {highlight}opencode serve{/highlight} for headless API access to OpenCode",
116-
"Use {highlight}opencode run --attach{/highlight} to connect to a running server",
117-
"Run {highlight}opencode upgrade{/highlight} to update to the latest version",
118-
"Run {highlight}opencode auth list{/highlight} to see all configured providers",
119-
"Run {highlight}opencode agent create{/highlight} for guided agent creation",
120-
"Use {highlight}/opencode{/highlight} in GitHub issues/PRs to trigger AI actions",
121-
"Run {highlight}opencode github install{/highlight} to set up the GitHub workflow",
122-
"Comment {highlight}/opencode fix this{/highlight} on issues to auto-create PRs",
123-
"Comment {highlight}/oc{/highlight} on PR code lines for targeted code reviews",
115+
"Run {highlight}bcode serve{/highlight} for headless API access to BrowserCode",
116+
"Use {highlight}bcode run --attach{/highlight} to connect to a running server",
117+
"Run {highlight}bcode upgrade{/highlight} to update to the latest version",
118+
"Run {highlight}bcode auth list{/highlight} to see all configured providers",
119+
"Run {highlight}bcode agent create{/highlight} for guided agent creation",
124120
'Use {highlight}"theme": "system"{/highlight} to match your terminal\'s colors',
125121
"Create JSON theme files in {highlight}.bcode/themes/{/highlight} directory",
126122
"Themes support dark/light variants for both modes",
@@ -138,15 +134,13 @@ const TIPS = [
138134
"Run {highlight}/unshare{/highlight} to remove a session from public access",
139135
"Permission {highlight}doom_loop{/highlight} prevents infinite tool call loops",
140136
"Permission {highlight}external_directory{/highlight} protects files outside project",
141-
"Run {highlight}opencode debug config{/highlight} to troubleshoot configuration",
137+
"Run {highlight}bcode debug config{/highlight} to troubleshoot configuration",
142138
"Use {highlight}--print-logs{/highlight} flag to see detailed logs in stderr",
143139
"Press {highlight}Ctrl+X G{/highlight} or {highlight}/timeline{/highlight} to jump to specific messages",
144140
"Press {highlight}Ctrl+X H{/highlight} to toggle code block visibility in messages",
145141
"Press {highlight}Ctrl+X S{/highlight} or {highlight}/status{/highlight} to see system status info",
146142
"Enable {highlight}scroll_acceleration{/highlight} in {highlight}tui.json{/highlight} for smooth macOS-style scrolling",
147143
"Toggle username display in chat via command palette ({highlight}Ctrl+P{/highlight})",
148-
"Run {highlight}docker run -it --rm ghcr.io/anomalyco/opencode{/highlight} for containerized use",
149-
"Use {highlight}/connect{/highlight} with OpenCode Zen for curated, tested models",
150144
"Commit your project's {highlight}AGENTS.md{/highlight} file to Git for team sharing",
151145
"Use {highlight}/review{/highlight} to review uncommitted changes, branches, or PRs",
152146
"Run {highlight}/help{/highlight} or {highlight}Ctrl+X H{/highlight} to show the help dialog",

packages/opencode/src/cli/cmd/tui/feature-plugins/sidebar/footer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function View(props: { api: TuiPluginApi }) {
4949
5050
</text>
5151
</box>
52-
<text fg={theme().textMuted}>OpenCode includes free models so you can start immediately.</text>
52+
<text fg={theme().textMuted}>BrowserCode supports 75+ providers — bring your own API key to get started.</text>
5353
<text fg={theme().textMuted}>
5454
Connect from 75+ providers to use other models, including Claude, GPT, Gemini etc
5555
</text>
@@ -65,7 +65,7 @@ function View(props: { api: TuiPluginApi }) {
6565
<span style={{ fg: theme().text }}>{path().name}</span>
6666
</text>
6767
<text fg={theme().textMuted}>
68-
<span style={{ fg: theme().success }}></span> <b>Open</b>
68+
<span style={{ fg: theme().success }}></span> <b>Browser</b>
6969
<span style={{ fg: theme().text }}>
7070
<b>Code</b>
7171
</span>{" "}

packages/opencode/src/cli/cmd/tui/routes/session/permission.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,11 @@ export function PermissionPrompt(props: { request: PermissionRequest }) {
145145
body={
146146
<Switch>
147147
<Match when={props.request.always.length === 1 && props.request.always[0] === "*"}>
148-
<TextBody title={"This will allow " + props.request.permission + " until OpenCode is restarted."} />
148+
<TextBody title={"This will allow " + props.request.permission + " until BrowserCode is restarted."} />
149149
</Match>
150150
<Match when={true}>
151151
<box paddingLeft={1} gap={1}>
152-
<text fg={theme.textMuted}>This will allow the following patterns until OpenCode is restarted</text>
152+
<text fg={theme.textMuted}>This will allow the following patterns until BrowserCode is restarted</text>
153153
<box>
154154
<For each={props.request.always}>
155155
{(pattern) => (
@@ -486,7 +486,7 @@ function RejectPrompt(props: { onConfirm: (message: string) => void; onCancel: (
486486
<text fg={theme.text}>Reject permission</text>
487487
</box>
488488
<box paddingLeft={1}>
489-
<text fg={theme.textMuted}>Tell OpenCode what to do differently</text>
489+
<text fg={theme.textMuted}>Tell BrowserCode what to do differently</text>
490490
</box>
491491
</box>
492492
<box

0 commit comments

Comments
 (0)