[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-988":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":14,"stars7d":16,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":18,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":15,"starSnapshotCount":15,"syncStatus":16,"lastSyncTime":28,"discoverSource":29},988,"browser-harness-js","browser-use\u002Fbrowser-harness-js","browser-use","Self-healing browser harness that enables LLMs to complete any task","",null,"TypeScript",459,28,1,0,2,11,3,48.49,"MIT License",false,"main",true,[],"2026-06-12 04:00:06","\u003Cimg src=\"https:\u002F\u002Fr2.browser-use.com\u002Fgithub\u002Fasbfgihsbfbaosfjla.png\" alt=\"Browser Harness\" width=\"100%\" \u002F>\n\n# Browser Harness JS ♞\n\nThe thinnest possible bridge from the LLM to Chrome. **No harness, no recipes, no rails** — just every CDP method as a typed JS call.\n\nOne persistent WebSocket, 56 domains, 652 typed wrappers, zero wrapping of what Chrome already does.\n\n```\n  ● agent: wants to click a button\n  │\n  ● no click() helper, no upload_file(), no goto()\n  │\n  ● agent writes the CDP call itself        await session.Input.dispatchMouseEvent({...})\n  │                                          await session.DOM.setFileInputFiles({...})\n  ✓ done — same pattern for all 652 methods\n```\n\n**The protocol is the API.** If Chrome can do it, you can call it.\n\n## Installation\n\n```bash\nnpx skills add https:\u002F\u002Fgithub.com\u002Fbrowser-use\u002Fbrowser-harness-js --skill cdp\n```\n\nOr paste this into your agent — it'll install the skill, put the CLI on your PATH, and run a first task:\n\n```text\nRun `npx skills add https:\u002F\u002Fgithub.com\u002Fbrowser-use\u002Fbrowser-harness-js --skill cdp`, then\nsymlink `browser-harness-js` into a directory on my PATH, then use the cdp skill to drive\nmy browser: look at all the tabs I have open, group them by topic, and screenshot the most\ninteresting one.\n```\n\n(The CLI auto-installs [`bun`](https:\u002F\u002Fbun.sh) on first run if it's missing. Set `BROWSER_HARNESS_SKIP_BUN_INSTALL=1` to opt out.)\n\nIf Chrome asks you to tick a remote-debugging checkbox, do it — that's how the agent attaches:\n\n\u003Cimg src=\"docs\u002Fsetup-remote-debugging.png\" alt=\"Remote debugging setup\" width=\"520\" style=\"border-radius: 12px;\" \u002F>\n\nSee [interaction-skills\u002F](interaction-skills\u002F) for recipes on the mechanics that are not obvious from the CDP method list alone.\n\n## Files\n\n- `SKILL.md` — day-to-day usage; how to connect, pick a tab, call methods, persist state\n- `sdk\u002Fbrowser-harness-js` — tiny CLI that auto-spawns the server and forwards snippets\n- `sdk\u002Frepl.ts` — Bun HTTP server holding one persistent `Session`\n- `sdk\u002Fsession.ts` — the `Session` class: transport, connect, target routing, events\n- `sdk\u002Fgen.ts` — codegen: reads `browser_protocol.json` + `js_protocol.json` → typed wrappers\n- `sdk\u002Fgenerated.ts` — every CDP method as `session.\u003CDomain>.\u003Cmethod>(params)` (generated)\n\nNo helpers file. No `click()`, no `goto()`, no `upload_file()` — just the protocol, typed.\n\n## Why no pre-baked helpers?\n\nEvery helper is a lie about what CDP already gives you. `click(x, y)` hides `Input.dispatchMouseEvent` — which has 14 parameters the LLM might need (button, clickCount, modifiers, pointerType, force, tangentialPressure, …). A harness that exposes three of them quietly limits what the agent can do.\n\n- Types are the docs. `session.Page.navigate(` triggers autocomplete with the exact params — same JSDoc as the CDP reference.\n- No version drift. The SDK is regenerated from the upstream protocol JSON; new Chrome methods appear as soon as you swap the JSON.\n- No \"helper doesn't handle my case\" detours. If CDP can do it, the agent can call it — directly, typed, today.\n\nThe only \"helpers\" you'll find are things CDP itself is missing:\n- `listPageTargets()` — filters `chrome:\u002F\u002F` \u002F `devtools:\u002F\u002F` out of `Target.getTargets`\n- `resolveWsUrl({wsUrl|port|profileDir})` — reads `DevToolsActivePort` for Chrome 144+\n- `session.use(targetId)` \u002F `session.waitFor(method, pred, timeout)` — the two routing primitives you genuinely need\n\n## Contributing\n\nPRs welcome. The best way to help: **contribute a new interaction skill** under [interaction-skills\u002F](interaction-skills\u002F) when you figure out the CDP recipe for something non-obvious (a dropdown framework, a shadow-DOM trap, a network-wait pattern).\n\n- Keep recipes in **pure CDP** — `session.Domain.method(...)`, not wrapped helpers.\n- Lead with the shortest method call that works; add the workaround or trap afterwards.\n- Small and focused beats comprehensive. One mechanic per file.\n- Bug fixes, codegen improvements, and `session.ts` refinements are equally welcome.\n\n---\n\n[Bitter lesson](https:\u002F\u002Fbrowser-use.com\u002Fposts\u002Fbitter-lesson-agent-frameworks) · [Skills](https:\u002F\u002Fbrowser-use.com\u002Fposts\u002Fweb-agents-that-actually-learn)\n","Browser Harness JS 是一个自我修复的浏览器控制工具，旨在通过直接调用Chrome DevTools Protocol (CDP) 方法来实现大语言模型对浏览器任务的自动化。项目使用TypeScript编写，提供了652个类型化的CDP方法封装，确保了与Chrome原生功能的一致性，同时避免了额外的抽象层或预定义辅助函数带来的限制。它适用于需要高度定制化和精确控制浏览器行为的应用场景，比如自动化测试、网页抓取或是基于AI的交互式应用开发。借助其简洁的设计理念——“协议即API”，开发者能够直接利用Chrome的所有能力，从而为复杂任务提供更灵活的解决方案。","2026-06-11 02:40:43","CREATED_QUERY"]