Skip to content

Add generated alias client codegen#11

Open
pirate wants to merge 2 commits into
mainfrom
modcdp-alias-objects-go-first
Open

Add generated alias client codegen#11
pirate wants to merge 2 commits into
mainfrom
modcdp-alias-objects-go-first

Conversation

@pirate

@pirate pirate commented Jun 6, 2026

Copy link
Copy Markdown
Member

Summary

  • add generic generated alias client support for TypeScript, Python, and Go
  • generate typed browser/page/locator-style alias objects from an external alias manifest, including sticky object wrapping and response unwrapping
  • keep ModCDP core generic: Stagehand-specific commands and SDK shapes are supplied only through generated fixtures/manifests
  • preserve native ModCDP/CDP surfaces on generated clients while layering generated alias objects on top
  • add generated-client live test fixtures for JS, Python, and Go that exercise the public generated client shape against a real browser
  • keep generated Stagehand fixture outputs derived from a local manifest so ModCDP does not own Stagehand protocol definitions

Why

Go cannot dynamically register new typed methods at runtime, so the generated Go client is the strictest model for the public shape. This PR follows that constraint across languages: generated clients statically expose the end-user alias objects and typed params/results, while ModCDP remains responsible only for generic transport, validation, routing, and alias-object mechanics.

Validation

  • pnpm run lint

The lint run covered formatting, TypeScript, generated-client build, Python ty/pyright, Go formatting/build, and repository hygiene hooks. Live tests were not rerun for this PR update; CI should run tests.

@pirate pirate force-pushed the modcdp-alias-objects-go-first branch 3 times, most recently from 138ba68 to 5c582f9 Compare June 6, 2026 01:17
@pirate pirate force-pushed the modcdp-alias-objects-go-first branch from 5c582f9 to 466b19a Compare June 6, 2026 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant