Skip to content

Commit 85fc1d3

Browse files
author
bcode
committed
rename BROWSER.md to browser-execute-guide.md
Renames the primary browser_execute guide and updates every code/doc reference. The file's role is the same; the name now states what it documents.
1 parent 1e264bc commit 85fc1d3

11 files changed

Lines changed: 20 additions & 27 deletions

File tree

packages/bcode-browser/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ See `decisions.md §1c` (three-level model) and `§1d` (this package) in the Bro
1212
| `src/browser-execute.ts` | In-process JS-eval `browser_execute` body. |
1313
| `src/session-store.ts` | Per-opencode-session CDP `Session` map. The agent calls `session.connect(...)` from a snippet; subsequent snippets find the same Session. |
1414
| `src/skills.ts` | Runtime resolver for embedded skills (extract on first call in compiled mode; in-tree path in dev). |
15-
| `skills/` | `BROWSER.md` (the agent's prompt for `browser_execute`) and `cloud-browser.md` (Way 3 — provision/stop a Browser Use cloud browser via raw HTTP from inside a snippet). Embedded into the binary by `script/embed-skills.ts`. The interaction-skills set inherited from the Python harness was archived 2026-05-09 — we'll reintroduce only what evals show is needed, one skill at a time. |
15+
| `skills/` | `browser-execute-guide.md` (the agent's prompt for `browser_execute`) and `cloud-browser.md` (Way 3 — provision/stop a Browser Use cloud browser via raw HTTP from inside a snippet). Embedded into the binary by `script/embed-skills.ts`. The interaction-skills set inherited from the Python harness was archived 2026-05-09 — we'll reintroduce only what evals show is needed, one skill at a time. |
1616
| `script/embed-skills.ts` | Build-time embed; emits `bcode-skills.gen.ts` consumed by the compiled binary. |
1717
| `test/` | `bun test` smoke coverage for the workspace dynamic-import pattern. |
1818

packages/bcode-browser/skills/BROWSER.md renamed to packages/bcode-browser/skills/browser-execute-guide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# BROWSER.md — driving a real browser with `browser_execute`
1+
# browser-execute-guide.md — driving a real browser with `browser_execute`
22

33
Use the `browser_execute` tool to run JavaScript against a connected browser via the Chrome DevTools Protocol. The snippet runs in-process; `session` is bound to a long-lived CDP `Session` that persists across calls within the same bcode session. You connect once, drive many.
44

55
**Locations:**
66

77
- Workspace (read/write your reusable scripts): `<projectRoot>/.bcode/agent-workspace/`. The bcode CLI runs from the project root, so `./.bcode/agent-workspace/foo.ts` works directly with the `read`/`write`/`edit` tools.
8-
- Skills (read-only reference docs): `{{SKILLS_DIR}}/`. Currently `BROWSER.md` (this file) and `cloud-browser.md`.
8+
- Skills (read-only reference docs): `{{SKILLS_DIR}}/`. Currently `browser-execute-guide.md` (this file) and `cloud-browser.md`.
99

1010
## The model in one paragraph
1111

packages/bcode-browser/skills/cloud-browser.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# cloud-browser.md — Browser Use cloud browser via raw HTTP
22

3-
When BROWSER.md sent you here, the user wants a Browser Use cloud browser (Way 3): a clean isolated Chrome on BU's infrastructure, optionally with a geo-located proxy or a synced profile, with a `liveUrl` the user can open to watch you work.
3+
When browser-execute-guide.md sent you here, the user wants a Browser Use cloud browser (Way 3): a clean isolated Chrome on BU's infrastructure, optionally with a geo-located proxy or a synced profile, with a `liveUrl` the user can open to watch you work.
44

55
There is no `browser_open_cloud` tool. You write the HTTP calls yourself in a `browser_execute` snippet. This keeps the connection model symmetric (you also call `session.connect()` for local browsers in Way 1 and Way 2) and gives you full control over the BU API surface — provision, stop, swap profiles, change proxies, anything BU exposes.
66

@@ -78,7 +78,7 @@ await fetch(`https://api.browser-use.com/api/v3/browsers/${id}`, {
7878
})
7979
```
8080

81-
If you'll do this often within one project, save it as `./.bcode/agent-workspace/cloud.ts` (see BROWSER.md "Reusing code") and import it from later snippets.
81+
If you'll do this often within one project, save it as `./.bcode/agent-workspace/cloud.ts` (see browser-execute-guide.md "Reusing code") and import it from later snippets.
8282

8383
## Swap
8484

packages/bcode-browser/src/browser-execute.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ const serialize = (v: unknown): string => {
145145

146146
// Snippet executor. The CDP Session is resolved per-call from `SessionStore`
147147
// keyed on `ctx.sessionID`. The agent connects with `await session.connect(...)`
148-
// in one snippet (Way 1 / Way 2 / Way 3 in BROWSER.md); the Session persists
148+
// in one snippet (Way 1 / Way 2 / Way 3 in browser-execute-guide.md); the Session persists
149149
// for follow-up snippets in the same opencode session.
150150
//
151151
// `dataDir` is opencode's XDG_DATA_HOME for bcode (~/.local/share/bcode/ on

packages/bcode-browser/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// src/browser-execute.ts — in-process JS-eval browser_execute body
1212
// src/session-store.ts — per-opencode-session CDP Session map
1313
// src/skills.ts — runtime resolver for embedded skills
14-
// skills/ — BROWSER.md + cloud-browser.md (embedded into binary)
14+
// skills/ — browser-execute-guide.md + cloud-browser.md (embedded into binary)
1515
//
1616
// Cloud browser provisioning is intentionally NOT a separate Level-1
1717
// surface. The agent reads `skills/cloud-browser.md` and writes the

packages/bcode-browser/src/skills.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// Materializes the skills tree to `<dataDir>/skills/` and substitutes the
44
// `{{SKILLS_DIR}}` placeholder in every file with that absolute path so
5-
// cross-references inside BROWSER.md (``read `{{SKILLS_DIR}}/cloud-browser.md` ``)
5+
// cross-references inside browser-execute-guide.md (``read `{{SKILLS_DIR}}/cloud-browser.md` ``)
66
// point at a real location.
77
//
88
// Compiled launches (the user-facing path) read a one-line sentinel at

packages/bcode-browser/test/skills.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ test("resolveSkillsDir materializes skills with {{SKILLS_DIR}} substituted", asy
1414
try {
1515
const dir = await Skills.resolveSkillsDir(dataDir)
1616
expect(dir).toBe(path.join(dataDir, "skills"))
17-
const browser = (await fs.readFile(path.join(dir, "BROWSER.md"), "utf8")).replaceAll("\\", "/")
17+
const browser = (await fs.readFile(path.join(dir, "browser-execute-guide.md"), "utf8")).replaceAll("\\", "/")
1818
expect(browser).not.toContain("{{SKILLS_DIR}}")
1919
expect(browser).toContain(`${dir.replaceAll("\\", "/")}/cloud-browser.md`)
2020
} finally {
@@ -29,8 +29,8 @@ test("different dataDirs get their own substituted paths", async () => {
2929
const dirA = await Skills.resolveSkillsDir(a)
3030
const dirB = await Skills.resolveSkillsDir(b)
3131
const [browserA, browserB] = (await Promise.all([
32-
fs.readFile(path.join(dirA, "BROWSER.md"), "utf8"),
33-
fs.readFile(path.join(dirB, "BROWSER.md"), "utf8"),
32+
fs.readFile(path.join(dirA, "browser-execute-guide.md"), "utf8"),
33+
fs.readFile(path.join(dirB, "browser-execute-guide.md"), "utf8"),
3434
])).map((s) => s.replaceAll("\\", "/"))
3535
const [a2, b2] = [dirA.replaceAll("\\", "/"), dirB.replaceAll("\\", "/")]
3636
expect(browserA).toContain(a2)

packages/bcode-browser/test/workspace-import.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// at runtime from a `browser_execute` snippet via
44
// `await import("/abs/path?t=" + Date.now())`. We don't run a real
55
// `browser_execute` here — the point is to verify the dynamic-import
6-
// mechanism behaves as the BROWSER.md prompt claims.
6+
// mechanism behaves as the browser-execute-guide.md prompt claims.
77
//
88
// All four scenarios run against a real tmp dir, real .ts files, and
99
// the real Bun module loader. No mocks.

packages/opencode/src/agent/agent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export const layer = Layer.effect(
9393
const agentWorkspaceGlob = "**/.bcode/agent-workspace/**/*"
9494
// Browser-skills tree, materialized at runtime to
9595
// <Global.Path.data>/skills/ in both dev and compiled modes (so the
96-
// `{{SKILLS_DIR}}` placeholder in BROWSER.md gets substituted with a
96+
// `{{SKILLS_DIR}}` placeholder in browser-execute-guide.md gets substituted with a
9797
// stable absolute path). Read-only baseline.
9898
const browserSkillsGlob = path.join(Skills.skillsDir(Global.Path.data), "*")
9999
const whitelistedDirs = [

packages/opencode/src/tool/browser-execute.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export const BrowserExecuteTool = Tool.define(
2525
Effect.gen(function* () {
2626
const impl = yield* BrowserExecute.make(Global.Path.data)
2727
return {
28-
// Substitute the resolved skills path so BROWSER.md / cloud-browser.md
28+
// Substitute the resolved skills path so browser-execute-guide.md / cloud-browser.md
2929
// references in the description point at concrete locations. Workspace
3030
// is per-project and agent-discoverable from cwd, so it's not
3131
// substituted here.

0 commit comments

Comments
 (0)