49 Commits

Author SHA1 Message Date
yan5xu f3d0c8a4ca chore: release v0.13.0 2026-05-26 20:34:42 +08:00
yan5xu ff7d742aa4 fix(chrome): open about:blank on launch so daemon has a default tab 2026-05-25 20:41:39 +08:00
yan5xu 7c972fc1d9 fix: include web/ in npm package for Clip Web UI 2026-05-25 20:28:04 +08:00
yan5xu bc76ed80de chore: release v0.12.0 2026-05-25 19:53:31 +08:00
yan5xu 7bb8cd1624 refactor: Phase 1 cleanup — remove MCP, dead code, unify CDP port
- Remove packages/mcp/ entirely (Agent uses CLI or Hub invoke)
- Remove dead code: reload.ts (never routed)
- Unify default CDP port to 9222 (daemon was 19825, viewer was 9222)
- Remove --mcp CLI flag
- Update comments to reflect MCP removal
2026-05-22 17:16:42 +08:00
github-actions[bot] 7ceb9e9ff5 chore(main): release bb-browser 0.11.6 (#214)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-11 18:01:40 +08:00
yan5xu 0ddcca6b66 feat(provider): handle DataCommand for clip data protocol
bb-browser provider now processes DataCommand from the Hub, supporting
read/write/list/delete/stat on per-clip data directories (~/.pinix/data/).
This enables pinix://browser/... URIs to work for cross-clip file sharing.

Updated @pinixai/hub-client to ^0.2.0 for Data protocol types.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-11 17:47:52 +08:00
github-actions[bot] 46a8aff93a chore(main): release bb-browser 0.11.5 (#208)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-07 16:19:02 +08:00
github-actions[bot] 3494cb1d65 chore(main): release bb-browser 0.11.4 (#196)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-07 09:23:50 +08:00
github-actions[bot] 71cd8baf11 chore(main): release bb-browser 0.11.3 (#174)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-09 22:39:05 +08:00
Yanwu 03c6bf2010 refactor: provider rewrite + cleanup (-1891 lines) (#176)
* refactor: rewrite Edge Clip provider using @pinixai/hub-client (#175)

Replace hand-written protobuf descriptor in bb-browserd.ts with typed
imports from @pinixai/hub-client. The new bb-browser-provider.ts uses
create() from @bufbuild/protobuf with generated schemas, registers site
adapters as separate per-platform clips, and routes invocations to
either the daemon HTTP layer (browser commands) or CLI (site commands).

- Delete bin/bb-browserd.ts (1140 lines)
- Add bin/bb-browser-provider.ts (~710 lines)
- Add @pinixai/hub-client dependency
- Add bb-browser-provider bin entry and tsup entry point
- Add esbuild plugin to resolve hub-client gen subpath import

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: import from @pinixai/hub-client top-level exports

Use hub-client 0.1.2 which exports ProviderStream types directly.
Remove esbuild plugin hack for deep gen/hub_pb import.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* refactor: delete dead CDP code, fix MCP auth, extract shared daemon client

- Delete cdp-client.ts (1212 lines), cdp-monitor.ts (521 lines),
  cdp-monitor-state.ts (182 lines) — all dead code from pre-daemon era
- Fix MCP server to read daemon.json for token/port instead of
  hardcoded DAEMON_BASE_URL without auth
- Extract httpJson, readDaemonJson, isProcessAlive, DaemonInfo to
  packages/shared/src/daemon-client.ts — eliminates duplication across
  CLI daemon-manager, MCP server, and Edge Clip provider
- Fix scroll left/right: deltaX was hardcoded to 0, now properly
  maps direction to deltaX/deltaY
- Align daemon tsup target from node20 to node18 (matches engines)
- Remove cdp-monitor from tsup entry points

Net: -1891 lines

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: lint — use DAEMON_DIR from shared, remove unused os import

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: review feedback — refresh platformClipAliases on reconnect, remove dead DAEMON_BASE_URL

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: remove duplicate bun shebang from provider source

tsup adds #!/usr/bin/env node via banner config. The source file's
#!/usr/bin/env bun caused a double shebang in dist/provider.js,
breaking node execution.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 06:04:43 +08:00
github-actions[bot] 8f67c7bb2f chore(main): release bb-browser 0.11.2 2026-04-03 02:55:02 +00:00
github-actions[bot] 4b575e007f chore(main): release bb-browser 0.11.1 2026-04-03 01:24:15 +00:00
yan5xu 7936566ec5 feat!: remove Chrome Extension package
Move buildDomTree.js to packages/shared/. Delete packages/extension/
entirely. Update path references in daemon and CLI. Remove
build:extension script and release-please manifest sync.

The daemon connects directly to Chrome via CDP WebSocket since v0.11.0.
The Extension is no longer needed.

BREAKING CHANGE: Chrome Extension is removed. Users who relied on the
extension-based flow should use the daemon-direct mode instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 05:33:17 +08:00
yan5xu ab43e2bfe4 fix: restore npm package name to bb-browser
@pinix/browser is the clip.json name, not the npm package name.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 15:52:41 +08:00
yan5xu 8ceed8c978 release: v0.11.0
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 15:49:20 +08:00
Yanwu fb1a9b0644 chore: add harness — tests, CI, protocol types, design invariants (#133)
* chore: add harness — tests, CI, protocol types, design invariants

Context layer:
- Rewrite AGENTS.md: new daemon architecture, 3-file command pattern,
  7 design invariants (INV-1 through INV-7), testing section
- Update protocol.ts: add tab/seq/cursor/since fields, update
  DaemonStatus, remove SSE types, widen TabInfo.tabId to string

Constraints layer:
- Unit tests: RingBuffer (14), TabState + TabStateManager (36)
- Contract tests: all 7 invariants verified (48)
- Protocol drift tests: real daemon HTTP response shape checks (13,
  skipped when Chrome unavailable)
- CI workflow: build + lint + test on push/PR to main
- Pre-commit hook: pnpm build && pnpm test via husky

GC layer:
- Harness scenarios doc: 6 reusable Agent workflow scenarios for
  periodic UX validation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: resolve lint errors caught by CI

- Remove unused imports (TabState, TabInfo, JsonObject, Response)
- Remove unused variable assignments in tests (r1-r4)
- Change `let items` to `const items` in command-dispatch
- Remove stale eslint-disable directive, use proper cast
- Exclude .d.ts files from eslint in daemon package

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: address Codex review findings

- cursor returns since threshold instead of 0 on empty results,
  preventing infinite re-fetch in incremental polling loops
- Guard shutdown against double-call (SIGINT + /shutdown race)
- Fix timer leak in discoverCdpPort when fetch fails

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* docs: update READMEs — remove Extension references, update architecture diagram

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 15:47:10 +08:00
Yanwu 1fe733b416 feat: auto-launch Chrome in bb-browserd + clip.json (#123)
* fix: auto-reconnect after Hub restart

Two bugs prevented reconnection when pinixd restarts:

1. reconnectTimer was unref'd via maybeUnref(), so it didn't keep the
   event loop alive — the setTimeout callback never fired
2. gRPC transport was reused across reconnects, causing "protocol error:
   missing status" loops from stale HTTP/2 connection state

Fix: remove maybeUnref on reconnect timer, create fresh transport on
each reconnect attempt, remove unused runPromise guard.

Closes #103

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: auto-launch Chrome when CDP not available in bb-browserd

bb-browserd now automatically starts a managed Chrome instance if no
CDP connection is found, instead of failing with "Chrome not reachable".

Also adds clip.json for Pinix Registry publishing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 17:42:51 +08:00
yan5xu 4ad258994b release: v0.10.1
Fixes:
- fix: remove replMode from CDP evaluate to fix async/Promise results
- fix: open new tabs in background (background: true)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 19:49:09 +08:00
github-actions[bot] 2a41d67a27 chore(main): release bb-browser 0.10.0 (#93)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-22 14:20:37 +08:00
yan5xu e730b0ef55 feat: bb-browserd migrate from WebSocket to Connect-RPC ProviderStream
Replace WebSocket /ws/provider with Connect-RPC ProviderStream for
communicating with pinixd Hub. Same functionality, unified protocol.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 00:02:28 +08:00
github-actions[bot] 2f2e153ef1 chore(main): release bb-browser 0.9.0 2026-03-19 16:08:24 +00:00
Yanwu 1215b01604 Merge pull request #86 from ox01024/chore/release-please
chore(release): automate versioning and publishing
2026-03-19 20:17:28 +08:00
Waffle 570737c957 chore(release): automate versioning and publishing 2026-03-19 17:25:33 +08:00
Waffle 0a2e150238 chore(lint): add small-scope eslint checks 2026-03-19 16:37:41 +08:00
Yanwu e7de67c4df fix(cli): add Chrome Dev/Canary/Beta/Arc to browser detection (#42) (#43)
- Add missing browser candidates to findBrowserExecutable() on macOS
- Remove obsolete daemon-era commands (start/stop/status/reload)
- Bump to v0.8.3

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 11:04:29 +08:00
yan5xu f36297300c chore: bump to v0.8.2 2026-03-16 10:05:00 +08:00
yan5xu 64bb52ae00 chore: bump to v0.9.0 2026-03-16 10:03:49 +08:00
yan5xu 6a112990e4 chore: bump to 0.8.1 (fix process hang) 2026-03-16 02:16:48 +08:00
yan5xu d84e45da71 chore: bump version to 0.8.0
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 02:07:27 +08:00
yan5xu 0551493aa0 feat(cli): auto-check for CLI updates on site update, bump to 0.7.0
- Bump version to 0.7.0
- Fix VERSION constant in index.ts (was stuck at 0.3.0)
- On `site update`, check npm registry for newer version and show upgrade hint
- Only prompt when npm version is higher than current

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 00:54:31 +08:00
yan5xu 1a79c3f7d1 chore: bump version to 0.6.0
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 13:40:33 +08:00
yan5xu 423e430765 chore: bump version to 0.5.2
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 12:48:08 +08:00
yan5xu c9d28d5d4e chore: bump version to 0.5.1
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 12:37:42 +08:00
yan5xu f96490d8d7 chore: bump version to 0.5.0
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 12:02:18 +08:00
yan5xu 73c4891e6e chore: bump version to 0.4.5
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 01:22:48 +08:00
yan5xu 40c8567514 chore: bump version to 0.4.4 2026-03-15 00:30:57 +08:00
yan5xu 52b4aa7314 chore: bump version to 0.4.3 2026-03-15 00:17:37 +08:00
yan5xu 51d9d56acb chore: update description 2026-03-14 23:26:35 +08:00
yan5xu 1698c27d7a chore: bump version to 0.4.2 2026-03-14 23:23:24 +08:00
yan5xu cb28e815aa feat(cli): add --mcp flag to start MCP server
`bb-browser --mcp` spawns the MCP server with stdio transport.
Users can configure AI tools with: npx -y bb-browser --mcp

Also fixes root tsup bundling to properly exclude ws while
bundling all other deps (MCP SDK, ajv, zod).

Bump version to 0.4.1.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 22:15:33 +08:00
yan5xu eb62804e1f chore: prepare v0.4.0 for npm publish
- Bump version to 0.4.0
- Add MCP runtime deps (ajv, ajv-formats, @modelcontextprotocol/sdk)
- Bundle all deps in root tsup for npx compatibility
- Fix repo URL to epiral/bb-browser
- Add mcp keyword

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 22:03:32 +08:00
yan5xu 537e5536f9 feat(mcp): add MCP server for AI agent integration
New package @bb-browser/mcp exposes all browser commands as MCP tools:
browser_snapshot, browser_click, browser_fill, browser_type, browser_open,
browser_tab_list, browser_tab_new, browser_press, browser_scroll,
browser_eval, browser_network, browser_screenshot, browser_get,
browser_close, browser_hover, browser_wait

All tools support `tab` parameter for concurrent multi-tab operations.
Uses stdio transport, connects to daemon via HTTP (same as CLI).

Also adds missing fields to shared protocol types:
- Request: key, modifiers, direction, pixels, waitType, ms
- ResponseData: dataUrl

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 21:59:22 +08:00
yan5xu 4e85c29728 chore: bump version to 0.3.0
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-13 20:03:04 +08:00
yan5xu 77c8e668bd chore: bump version to 0.2.0 2026-02-07 09:54:13 +08:00
yan5xu 7acd596073 feat: 全局 --tab 参数支持多 tab 并发隔离
- CLI: 全局 --tab <tabId> 参数,透传给所有子命令
- Extension: resolveTab() 按 tabId 定位目标 tab,fallback activeTab
- Extension: 状态 (refs/frame) 按 tabId 隔离
- Extension: SSE 去除 await,支持并发处理命令
- bump version to 0.1.2
2026-02-06 10:41:41 +08:00
yan5xu 1fc42dc990 chore: bump version to 0.1.1 2026-02-06 09:35:57 +08:00
yan5xu 67bfe2ac9a chore: 更新仓库地址为 yan5xu/bb-browser 2026-01-31 11:56:15 +08:00
yan5xu 601f4ae813 feat: 实现 bb-browser 核心功能
- CLI: open, snapshot, click, fill, status, stop 命令
- Extension: buildDomTree 移植, DOM 服务, SSE 通信
- Daemon: HTTP SSE 架构, 请求管理
- Shared: 通信协议类型定义

snapshot 支持两种模式:
- 默认完整树模式 (含文本节点)
- -i 交互元素模式 (只含可交互元素)

已验证: 推特/Reddit 登录态页面访问正常
2026-01-29 21:17:28 +08:00