Skip to content

Commit 6dbe425

Browse files
committed
feat: build Browserbase cookbook
0 parents  commit 6dbe425

2,850 files changed

Lines changed: 472567 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.claude-plugin/marketplace.json‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "browserbase-cookbook-local",
3+
"owner": { "name": "Browserbase" },
4+
"plugins": [
5+
{
6+
"name": "browserbase-cookbook",
7+
"source": "./",
8+
"description": "One Browserbase cookbook skill with focused recipe references."
9+
}
10+
]
11+
}

‎.claude-plugin/plugin.json‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"name": "browserbase-cookbook",
3+
"version": "0.1.0",
4+
"description": "Find and adapt Browserbase cookbook examples.",
5+
"author": { "name": "Browserbase" }
6+
}

‎.codex-plugin/plugin.json‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "browserbase-cookbook",
3+
"version": "0.1.0",
4+
"description": "Find and adapt Browserbase examples with one task-routing skill.",
5+
"author": { "name": "Browserbase" },
6+
"skills": "./skills/",
7+
"interface": {
8+
"displayName": "Browserbase Cookbook",
9+
"shortDescription": "Find the right browser automation example.",
10+
"category": "Developer Tools"
11+
}
12+
}

‎.github/CODEOWNERS‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @browserbase/customer-success @browserbase/gtm @browserbase/customer-engineering

‎.github/ISSUE_TEMPLATE/bug.yml‎

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Recipe bug
2+
description: Report a reproducible problem in an existing cookbook recipe.
3+
title: "[Bug]: "
4+
labels: [bug]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: Do not include API keys, cookies, session URLs, or customer data.
9+
- type: input
10+
id: recipe
11+
attributes:
12+
label: Recipe path or catalog ID
13+
placeholder: examples/typescript/getting-started-with-browserbase
14+
validations:
15+
required: true
16+
- type: textarea
17+
id: problem
18+
attributes:
19+
label: What happened?
20+
description: Include expected and actual behavior.
21+
validations:
22+
required: true
23+
- type: textarea
24+
id: reproduce
25+
attributes:
26+
label: Reproduction steps
27+
placeholder: Include the exact redacted commands you ran.
28+
validations:
29+
required: true
30+
- type: input
31+
id: environment
32+
attributes:
33+
label: Environment
34+
description: Operating system, runtime, and package-manager versions.
35+
validations:
36+
required: true
37+
- type: textarea
38+
id: logs
39+
attributes:
40+
label: Redacted logs
41+
render: shell
42+
- type: checkboxes
43+
id: safety
44+
attributes:
45+
label: Sensitive data
46+
options:
47+
- label: I removed credentials, cookies, session URLs, and customer data.
48+
required: true

‎.github/ISSUE_TEMPLATE/config.yml‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Browserbase support
4+
url: https://www.browserbase.com/contact
5+
about: Get help with accounts, billing, quota, or the Browserbase service.
6+
- name: Security report
7+
url: https://www.browserbase.com/security
8+
about: Report vulnerabilities or exposed credentials privately.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Recipe request
2+
description: Suggest a browser automation task for the cookbook.
3+
title: "[Recipe]: "
4+
labels: [enhancement, recipe]
5+
body:
6+
- type: textarea
7+
id: outcome
8+
attributes:
9+
label: Desired outcome
10+
description: Describe the observable result the recipe should produce.
11+
validations:
12+
required: true
13+
- type: dropdown
14+
id: language
15+
attributes:
16+
label: Preferred language
17+
options:
18+
- TypeScript
19+
- Python
20+
- Go
21+
- No preference
22+
validations:
23+
required: true
24+
- type: textarea
25+
id: constraints
26+
attributes:
27+
label: Frameworks and constraints
28+
description: Include relevant frameworks, target sites, authentication, and side effects.
29+
- type: textarea
30+
id: prior-art
31+
attributes:
32+
label: Existing examples
33+
description: Link related public documentation or recipes.

‎.github/PULL_REQUEST_TEMPLATE.md‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
## Summary
2+
3+
Describe the user-visible recipe or catalog change.
4+
5+
## Verification
6+
7+
- [ ] `python3 scripts/catalog.py check`
8+
- [ ] `python3 scripts/verify.py`
9+
- [ ] `python3 -B -m unittest discover -s tests`
10+
- [ ] I tested the changed recipe at the level claimed in its catalog metadata.
11+
12+
List exact commands and distinguish installation, compilation, offline tests,
13+
and live browser execution.
14+
15+
## Publication and provenance
16+
17+
- [ ] No credentials, cookies, session URLs, customer data, generated runtime
18+
files, or prompt logs are included.
19+
- [ ] Imported changes have reviewed provenance; cookbook-authored collection
20+
files are recorded in `COOKBOOK_AUTHORED.json`.
21+
- [ ] Documentation, catalog metadata, and generated indexes are current.

‎.github/dependabot.yml‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: monthly
7+
groups:
8+
actions:
9+
patterns: ["*"]
10+
- package-ecosystem: npm
11+
directory: /examples
12+
schedule:
13+
interval: monthly
14+
groups:
15+
examples-npm:
16+
patterns: ["*"]
17+
- package-ecosystem: gomod
18+
directory: /examples/go/hackernews
19+
schedule:
20+
interval: monthly

‎.github/workflows/verify.yml‎

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
name: Verify cookbook
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
verify:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-python@v5
17+
with:
18+
python-version: "3.12"
19+
- name: Check generated catalog
20+
run: python3 scripts/catalog.py check
21+
- name: Verify repository structure and provenance
22+
run: python3 scripts/verify.py
23+
- name: Run repository tests
24+
run: python3 -B -m unittest discover -s tests
25+
- name: Verify private publication boundary
26+
run: python3 scripts/publication_boundary.py
27+
28+
public-artifact:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v4
32+
- uses: actions/setup-python@v5
33+
with:
34+
python-version: "3.12"
35+
- name: Build history-free public artifact
36+
run: |
37+
artifact="$RUNNER_TEMP/browserbase-cookbook-public"
38+
python3 scripts/publication_boundary.py --export "$artifact" --require-public
39+
python3 scripts/publication_boundary.py --root "$artifact" --require-public
40+
echo "PUBLIC_ARTIFACT=$artifact" >> "$GITHUB_ENV"
41+
- name: Reject broken local Markdown links
42+
run: |
43+
python3 - <<'PY'
44+
import os
45+
import re
46+
from pathlib import Path
47+
from urllib.parse import unquote
48+
49+
root = Path(os.environ["PUBLIC_ARTIFACT"])
50+
failures = []
51+
link_pattern = re.compile(r"(?<!!)\[[^]]*\]\(([^)]+)\)")
52+
for document in root.rglob("*.md"):
53+
text = document.read_text(encoding="utf-8")
54+
for raw in link_pattern.findall(text):
55+
target = raw.strip().split(maxsplit=1)[0].strip("<>")
56+
if not target or target.startswith(("#", "http://", "https://", "mailto:")):
57+
continue
58+
path = unquote(target.split("#", 1)[0])
59+
if path and not (document.parent / path).resolve().exists():
60+
failures.append(f"{document.relative_to(root)} -> {target}")
61+
if failures:
62+
raise SystemExit("Broken local Markdown links:\n" + "\n".join(failures))
63+
print("Public artifact local Markdown links are valid")
64+
PY
65+
- name: Verify public artifact catalog and tests
66+
working-directory: ${{ env.PUBLIC_ARTIFACT }}
67+
run: |
68+
python3 scripts/catalog.py check
69+
python3 scripts/verify.py
70+
python3 -B -m unittest discover -s tests
71+
- name: Scan public artifact for secrets
72+
run: |
73+
docker run --rm \
74+
-v "$PUBLIC_ARTIFACT:/repo:ro" \
75+
zricethezav/gitleaks:v8.24.3 \
76+
detect --source=/repo --no-git --redact --verbose --config=/repo/.gitleaks.toml
77+
- uses: actions/upload-artifact@v4
78+
if: always()
79+
with:
80+
name: browserbase-cookbook-public
81+
path: ${{ env.PUBLIC_ARTIFACT }}
82+
if-no-files-found: error
83+
retention-days: 7
84+
85+
representative-recipes:
86+
name: ${{ matrix.name }}
87+
runs-on: ubuntu-latest
88+
strategy:
89+
fail-fast: false
90+
matrix:
91+
include:
92+
- name: Python clean install and import
93+
runtime: python
94+
directory: examples/python/getting-started-with-browserbase
95+
command: uv sync && uv run python -c 'import browserbase, dotenv, playwright'
96+
- name: TypeScript clean install and typecheck
97+
runtime: node
98+
directory: examples/typescript/getting-started-with-browserbase
99+
command: npm install --ignore-scripts --package-lock=false && npm run typecheck
100+
- name: Go dependency and compile check
101+
runtime: go
102+
directory: examples/go/hackernews
103+
command: go test ./...
104+
- name: Playbook 1Password typecheck
105+
runtime: node
106+
directory: playbook/guides/1password/node
107+
command: npm install --ignore-scripts --package-lock=false && npm run typecheck
108+
- name: Temporal integration tests and typecheck
109+
runtime: node
110+
directory: integrations/examples/integrations/temporal
111+
command: npm ci --ignore-scripts && npm test && npm run typecheck
112+
steps:
113+
- uses: actions/checkout@v4
114+
- uses: actions/setup-python@v5
115+
if: matrix.runtime == 'python'
116+
with:
117+
python-version: "3.13"
118+
- uses: astral-sh/setup-uv@v6
119+
if: matrix.runtime == 'python'
120+
- uses: actions/setup-node@v4
121+
if: matrix.runtime == 'node'
122+
with:
123+
node-version: "24.19.0"
124+
- uses: actions/setup-go@v5
125+
if: matrix.runtime == 'go'
126+
with:
127+
go-version-file: ${{ matrix.directory }}/go.mod
128+
cache-dependency-path: ${{ matrix.directory }}/go.sum
129+
- name: Enforce npm package release-age policy
130+
if: matrix.runtime == 'node'
131+
run: npm config set min-release-age 7
132+
- name: Run representative check
133+
working-directory: ${{ matrix.directory }}
134+
run: ${{ matrix.command }}

0 commit comments

Comments
 (0)