Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
e1a3825
extend magiccdp package surface
pirate May 2, 2026
674938b
working well on bb with magiccdp
pirate May 3, 2026
4f54317
sync magiccdp bridge primitives
pirate May 3, 2026
ba627d9
optimize magiccdp client startup payload
pirate May 3, 2026
a6385a0
rename magiccdp to cdpmods
pirate May 3, 2026
d59e62d
add cdpmods startup telemetry
pirate May 3, 2026
d2bf7a4
keep cdpmods client browser compatible
pirate May 3, 2026
66689c6
stabilize cdpmods startup
pirate May 4, 2026
19249d7
tighten launched extension discovery
pirate May 4, 2026
662f906
remove discovery timeout budgets
pirate May 4, 2026
5e5b080
split cdp schema generation by domain
pirate May 4, 2026
3dc2a3c
restore proxy automation examples
pirate May 4, 2026
35ace1c
address cdpmods pr review issues
pirate May 4, 2026
aa6a63b
accept empty payload schema shapes
pirate May 4, 2026
ef8408c
rename cdpmod and add client demo ci
pirate May 4, 2026
a6c4799
use client launcher in python and go demos
pirate May 4, 2026
0043a4f
align client extension discovery
pirate May 4, 2026
887d000
add prek ci checks
pirate May 4, 2026
bbfc75b
align python go cdpmod client surfaces
pirate May 4, 2026
e37dc01
reuse cdpmod client in proxy
pirate May 4, 2026
0671f04
align custom command demos
pirate May 4, 2026
9a27f08
Fix cdpmod TS compatibility
pirate May 4, 2026
cf95a78
Tighten cdpmod event typing
pirate May 4, 2026
d47cb7c
Allow schema-only cdpmod client commands
pirate May 4, 2026
9c40b61
Narrow cdpmod command expressions
pirate May 4, 2026
ffab604
Extend go chrome startup timeout
pirate May 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions .github/workflows/client-demos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Client Demos

on:
pull_request:
push:
branches:
- main

jobs:
client-demo:
name: ${{ matrix.client }} ${{ matrix.mode }}
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
client: [js, python, go]
mode: [loopback, debugger, direct]
env:
CHROME_PATH: /usr/bin/chromium
CI: "true"
GOFLAGS: -buildvcs=false
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- uses: actions/setup-python@v5
if: matrix.client == 'python'
with:
python-version: "3.12"
- uses: astral-sh/setup-uv@v5
if: matrix.client == 'python'
- uses: actions/setup-go@v5
if: matrix.client == 'go'
with:
go-version-file: client/go/go.mod
cache-dependency-path: client/go/go.sum
- run: pnpm install --frozen-lockfile
- run: pnpm run build
- name: Run ${{ matrix.client }} demo (${{ matrix.mode }})
run: |
case "${{ matrix.client }}" in
js)
node dist/client/js/demo.js --${{ matrix.mode }}
;;
python)
cd client/python
uv run python demo.py --${{ matrix.mode }}
;;
go)
cd client/go
go run ./demo --${{ matrix.mode }}
;;
*)
echo "unknown client: ${{ matrix.client }}" >&2
exit 1
;;
esac

proxy-example:
name: ${{ matrix.name }}
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
include:
- name: playwright proxy
command: node dist/client/js/examples/playwright.js
- name: puppeteer proxy
command: node dist/client/js/examples/puppeteer.js
env:
CHROME_PATH: /usr/bin/chromium
CI: "true"
GOFLAGS: -buildvcs=false
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm run build
- run: ${{ matrix.command }}
39 changes: 39 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Lint

on:
pull_request:
push:
branches:
- main

permissions:
contents: read

jobs:
prek:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v6

- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
with:
node-version: 22.12.0
cache: pnpm

- uses: astral-sh/setup-uv@v6
with:
enable-cache: true

- uses: actions/setup-go@v5
with:
go-version-file: client/go/go.mod
cache-dependency-path: client/go/go.sum

- run: pnpm install --frozen-lockfile --prefer-offline

- run: uv --directory client/python sync --dev --frozen

- run: pnpm exec prek run --all-files
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
node_modules/
dist/
client/go/magiccdp
client/go/magic-cdp-go
client/go/cdpmod
client/go/cdpmod-go
__pycache__/
2 changes: 1 addition & 1 deletion .oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"ignorePatterns": ["dist/**", "node_modules/**", "types/cdp.ts", "types/zod.ts"],
"ignorePatterns": ["dist/**", "node_modules/**", "types/aliases.ts", "types/cdp.ts", "types/zod.ts", "types/zod/**"],
"printWidth": 120,
"tabWidth": 2,
"semi": true,
Expand Down
79 changes: 79 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
repos:
- repo: local
hooks:
- id: oxfmt
name: oxfmt
entry: pnpm exec oxfmt
language: system
files: \.(js|ts|json|ya?ml)$
exclude: ^types/(aliases|cdp|zod)\.ts$|^types/zod/
- id: oxlint
name: oxlint
entry: pnpm exec oxlint --format=stylish --disable-nested-config --tsconfig tsconfig.json
language: system
files: \.(js|ts|json)$
exclude: ^types/(cdp|zod)\.ts$
pass_filenames: false
- id: tsc
name: tsc
entry: pnpm run typecheck
language: system
pass_filenames: false
always_run: true
- id: build
name: build
entry: pnpm run build
language: system
pass_filenames: false
always_run: true
- id: test
name: test
entry: pnpm run test
language: system
pass_filenames: false
always_run: true
- id: ty-check
name: ty-check
entry: uv --directory client/python run ty check
language: system
files: ^client/python/
pass_filenames: false
- id: pyright
name: pyright
entry: uv --directory client/python run pyright
language: system
files: ^client/python/
pass_filenames: false
- id: go-fmt
name: go-fmt
entry: gofmt -w
language: system
files: ^client/go/.*\.go$
- id: go-build
name: go-build
entry: bash -c 'cd client/go && go build ./...'
language: system
files: ^client/go/
pass_filenames: false

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-ast
- id: check-toml
- id: check-yaml
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: destroyed-symlinks
- id: check-case-conflict
- id: check-illegal-windows-names
- id: check-shebang-scripts-are-executable
- id: mixed-line-ending
- id: fix-byte-order-marker
- id: end-of-file-fixer
- id: detect-private-key
- id: debug-statements
- id: forbid-submodules
- id: check-added-large-files
args: ["--maxkb=600"]
Loading
Loading