browse 0.9.4 → 0.9.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/skills/show.js +20 -0
- package/dist/help.js +19 -0
- package/dist/lib/skills/install.js +1 -1
- package/oclif.manifest.json +24 -1
- package/package.json +2 -1
- package/skills/browse/SKILL.md +4 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { readFile } from "node:fs/promises";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { BrowseCommand } from "../../base.js";
|
|
4
|
+
import { fail } from "../../lib/errors.js";
|
|
5
|
+
import { bundledCliSkillPath } from "../../lib/skills/install.js";
|
|
6
|
+
export default class SkillsShow extends BrowseCommand {
|
|
7
|
+
static description = "Print the bundled browse skill (usage patterns, workflows, gotchas) to stdout. Run before using browse in an agent.";
|
|
8
|
+
static examples = ["browse skills show"];
|
|
9
|
+
async run() {
|
|
10
|
+
const skillMdPath = join(bundledCliSkillPath(), "SKILL.md");
|
|
11
|
+
let contents;
|
|
12
|
+
try {
|
|
13
|
+
contents = await readFile(skillMdPath, "utf8");
|
|
14
|
+
}
|
|
15
|
+
catch (error) {
|
|
16
|
+
fail(`Could not read the bundled browse skill (SKILL.md): ${error.message}`, 1, { resultCode: "skill_show_missing" });
|
|
17
|
+
}
|
|
18
|
+
this.log(contents);
|
|
19
|
+
}
|
|
20
|
+
}
|
package/dist/help.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Help } from "@oclif/core";
|
|
2
|
+
// Custom root-help formatter so `browse --help` (and bare `browse`) lead with
|
|
3
|
+
// a short block pointing agents at the bundled skill, ahead of oclif's
|
|
4
|
+
// auto-generated VERSION/USAGE/DESCRIPTION/COMMANDS sections. Only the root
|
|
5
|
+
// help view is customized -- individual `browse <command> --help` views are
|
|
6
|
+
// unaffected.
|
|
7
|
+
const AGENT_HEADER = `Start here (for AI agents):
|
|
8
|
+
browse skills show
|
|
9
|
+
|
|
10
|
+
The bundled skill ships with the CLI (always version-matched) and covers
|
|
11
|
+
workflows, session management, and common failure recovery. Prefer it over
|
|
12
|
+
guessing commands from flag docs alone.
|
|
13
|
+
`;
|
|
14
|
+
export default class BrowseHelp extends Help {
|
|
15
|
+
async showRootHelp() {
|
|
16
|
+
this.log(AGENT_HEADER);
|
|
17
|
+
await super.showRootHelp();
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -167,7 +167,7 @@ function localSkillPath(skillId) {
|
|
|
167
167
|
const configHome = process.env.XDG_CONFIG_HOME || join(homedir(), ".config");
|
|
168
168
|
return join(configHome, "browserbase", "skills", skillId.domain, skillId.task);
|
|
169
169
|
}
|
|
170
|
-
function bundledCliSkillPath() {
|
|
170
|
+
export function bundledCliSkillPath() {
|
|
171
171
|
return join(packageRoot(), "skills", "browse");
|
|
172
172
|
}
|
|
173
173
|
function packageRoot() {
|
package/oclif.manifest.json
CHANGED
|
@@ -4536,6 +4536,29 @@
|
|
|
4536
4536
|
"list.js"
|
|
4537
4537
|
]
|
|
4538
4538
|
},
|
|
4539
|
+
"skills:show": {
|
|
4540
|
+
"aliases": [],
|
|
4541
|
+
"args": {},
|
|
4542
|
+
"description": "Print the bundled browse skill (usage patterns, workflows, gotchas) to stdout. Run before using browse in an agent.",
|
|
4543
|
+
"examples": [
|
|
4544
|
+
"browse skills show"
|
|
4545
|
+
],
|
|
4546
|
+
"flags": {},
|
|
4547
|
+
"hasDynamicHelp": false,
|
|
4548
|
+
"hiddenAliases": [],
|
|
4549
|
+
"id": "skills:show",
|
|
4550
|
+
"pluginAlias": "browse",
|
|
4551
|
+
"pluginName": "browse",
|
|
4552
|
+
"pluginType": "core",
|
|
4553
|
+
"strict": true,
|
|
4554
|
+
"isESM": true,
|
|
4555
|
+
"relativePath": [
|
|
4556
|
+
"dist",
|
|
4557
|
+
"commands",
|
|
4558
|
+
"skills",
|
|
4559
|
+
"show.js"
|
|
4560
|
+
]
|
|
4561
|
+
},
|
|
4539
4562
|
"tab:close": {
|
|
4540
4563
|
"aliases": [],
|
|
4541
4564
|
"args": {
|
|
@@ -6398,5 +6421,5 @@
|
|
|
6398
6421
|
]
|
|
6399
6422
|
}
|
|
6400
6423
|
},
|
|
6401
|
-
"version": "0.9.
|
|
6424
|
+
"version": "0.9.5"
|
|
6402
6425
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "browse",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.5",
|
|
4
4
|
"description": "Unified Browserbase CLI for browser automation and cloud APIs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"bin": "browse",
|
|
25
25
|
"dirname": "browse",
|
|
26
26
|
"commands": "./dist/commands",
|
|
27
|
+
"helpClass": "./dist/help.js",
|
|
27
28
|
"hooks": {
|
|
28
29
|
"init": "./dist/hooks/init.js",
|
|
29
30
|
"prerun": "./dist/hooks/prerun.js",
|
package/skills/browse/SKILL.md
CHANGED
|
@@ -65,12 +65,16 @@ browse open https://example.com --cdp ws://127.0.0.1:9222/devtools/browser/<id>
|
|
|
65
65
|
|
|
66
66
|
Use local mode for development, localhost, trusted sites, and fast iteration. Use `--auto-connect` only when the user explicitly wants to attach to an already-running debuggable Chrome session with existing cookies or login state; use `--local` when no debuggable Chrome is available. Use remote mode when Browserbase credentials are available and the site needs hosted browser infrastructure, Verified browser mode, CAPTCHA solving, proxies, or session persistence.
|
|
67
67
|
|
|
68
|
+
`--local` requires Chrome or Chromium already installed on the machine. In containers, CI, and sandboxes with no browser installed, use `--remote` instead of `--local`. If `--local` fails with "No Chrome or Chromium found" and `BROWSERBASE_API_KEY` is set, switch to `--remote` — do not retry `--local`.
|
|
69
|
+
|
|
68
70
|
For a Verified and/or proxied remote session, add `--verified` and/or `--proxies` to `--remote` — a single command that keeps the Browserbase session identity, so `browse status` and `browse doctor` report the session ID and live-view URL. `--verified` requires a Browserbase Scale plan. These flags only apply to `--remote` and are sticky for the session's lifetime, like `--headed`. Reach for `browse cloud sessions create` + `--cdp` only when you need session options `open` doesn't expose (region, keep-alive, contexts).
|
|
69
71
|
|
|
70
72
|
Choose headed/headless and local/remote mode when starting a session. A running session keeps its mode: passing a conflicting flag such as `--headed` to an already-running headless session fails until you run `browse stop --session <name>` or target a different session.
|
|
71
73
|
|
|
72
74
|
Use named sessions for any non-trivial work, especially when multiple agents or parallel tasks may run at once. Every browser command accepts `--session <name>` (or `-s <name>`); the `BROWSE_SESSION` env var sets the default, and commands without either share the `default` session.
|
|
73
75
|
|
|
76
|
+
If `BROWSE_SESSION` is already set in the environment, every command already targets that session — do not pass `--session` or invent a new name. An explicit `--session <name>` always overrides `BROWSE_SESSION` for that command, so only pass it to deliberately target a different session.
|
|
77
|
+
|
|
74
78
|
```bash
|
|
75
79
|
browse open https://example.com --session research --local
|
|
76
80
|
browse snapshot --session research
|