browser-ctl 0.2.1__tar.gz → 0.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. {browser_ctl-0.2.1 → browser_ctl-0.2.2}/PKG-INFO +1 -1
  2. {browser_ctl-0.2.1 → browser_ctl-0.2.2}/browser_ctl/cli.py +11 -1
  3. browser_ctl-0.2.2/browser_ctl/extension/background.js +1253 -0
  4. browser_ctl-0.2.2/browser_ctl/extension/icon-128.png +0 -0
  5. browser_ctl-0.2.2/browser_ctl/extension/icon-16.png +0 -0
  6. browser_ctl-0.2.2/browser_ctl/extension/icon-32.png +0 -0
  7. browser_ctl-0.2.2/browser_ctl/extension/icon-48.png +0 -0
  8. browser_ctl-0.2.2/browser_ctl/extension/manifest.json +25 -0
  9. {browser_ctl-0.2.1 → browser_ctl-0.2.2}/browser_ctl.egg-info/PKG-INFO +1 -1
  10. {browser_ctl-0.2.1 → browser_ctl-0.2.2}/browser_ctl.egg-info/SOURCES.txt +7 -1
  11. {browser_ctl-0.2.1 → browser_ctl-0.2.2}/pyproject.toml +2 -2
  12. {browser_ctl-0.2.1 → browser_ctl-0.2.2}/LICENSE +0 -0
  13. {browser_ctl-0.2.1 → browser_ctl-0.2.2}/README.md +0 -0
  14. {browser_ctl-0.2.1 → browser_ctl-0.2.2}/browser_ctl/SKILL.md +0 -0
  15. {browser_ctl-0.2.1 → browser_ctl-0.2.2}/browser_ctl/__init__.py +0 -0
  16. {browser_ctl-0.2.1 → browser_ctl-0.2.2}/browser_ctl/__main__.py +0 -0
  17. {browser_ctl-0.2.1 → browser_ctl-0.2.2}/browser_ctl/client.py +0 -0
  18. {browser_ctl-0.2.1 → browser_ctl-0.2.2}/browser_ctl/server.py +0 -0
  19. {browser_ctl-0.2.1 → browser_ctl-0.2.2}/browser_ctl.egg-info/dependency_links.txt +0 -0
  20. {browser_ctl-0.2.1 → browser_ctl-0.2.2}/browser_ctl.egg-info/entry_points.txt +0 -0
  21. {browser_ctl-0.2.1 → browser_ctl-0.2.2}/browser_ctl.egg-info/requires.txt +0 -0
  22. {browser_ctl-0.2.1 → browser_ctl-0.2.2}/browser_ctl.egg-info/top_level.txt +0 -0
  23. {browser_ctl-0.2.1 → browser_ctl-0.2.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: browser-ctl
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: Control your browser from the command line via a Chrome extension + WebSocket bridge
5
5
  Author-email: geb <853934146@qq.com>
6
6
  License-Expression: MIT
@@ -421,8 +421,18 @@ def handle_serve(args):
421
421
 
422
422
 
423
423
  def _get_extension_source_dir() -> str | None:
424
- """Locate the extension source directory (from project root)."""
424
+ """Locate the extension source directory.
425
+
426
+ Looks in two places:
427
+ 1. Inside the package (works for pip install)
428
+ 2. Project root (works for editable/dev install)
429
+ """
425
430
  pkg_dir = os.path.dirname(os.path.abspath(__file__))
431
+ # 1. Bundled inside the package (pip install browser-ctl)
432
+ ext_dir = os.path.join(pkg_dir, "extension")
433
+ if os.path.isdir(ext_dir) and os.path.exists(os.path.join(ext_dir, "manifest.json")):
434
+ return ext_dir
435
+ # 2. Project root (pip install -e . / dev checkout)
426
436
  project_root = os.path.dirname(pkg_dir)
427
437
  ext_dir = os.path.join(project_root, "extension")
428
438
  if os.path.isdir(ext_dir) and os.path.exists(os.path.join(ext_dir, "manifest.json")):