tab-agent 0.3.4 → 0.4.0

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 (46) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/README.md +179 -25
  3. package/bin/tab-agent.js +23 -8
  4. package/cli/command.js +113 -9
  5. package/cli/detect-extension.js +96 -14
  6. package/cli/launch-chrome.js +150 -0
  7. package/cli/setup.js +57 -22
  8. package/cli/start.js +65 -13
  9. package/cli/status.js +41 -7
  10. package/extension/content-script.js +218 -17
  11. package/extension/manifest.json +4 -3
  12. package/extension/manifest.safari.json +45 -0
  13. package/extension/popup/popup.html +58 -1
  14. package/extension/popup/popup.js +18 -0
  15. package/extension/service-worker.js +106 -13
  16. package/package.json +14 -3
  17. package/relay/install-native-host.sh +2 -2
  18. package/relay/native-host-wrapper.sh +1 -1
  19. package/relay/native-host.js +3 -1
  20. package/relay/server.js +124 -17
  21. package/skills/claude-code/tab-agent/SKILL.md +92 -0
  22. package/skills/codex/tab-agent/SKILL.md +92 -0
  23. package/relay/node_modules/.package-lock.json +0 -29
  24. package/relay/node_modules/ws/LICENSE +0 -20
  25. package/relay/node_modules/ws/README.md +0 -548
  26. package/relay/node_modules/ws/browser.js +0 -8
  27. package/relay/node_modules/ws/index.js +0 -13
  28. package/relay/node_modules/ws/lib/buffer-util.js +0 -131
  29. package/relay/node_modules/ws/lib/constants.js +0 -19
  30. package/relay/node_modules/ws/lib/event-target.js +0 -292
  31. package/relay/node_modules/ws/lib/extension.js +0 -203
  32. package/relay/node_modules/ws/lib/limiter.js +0 -55
  33. package/relay/node_modules/ws/lib/permessage-deflate.js +0 -528
  34. package/relay/node_modules/ws/lib/receiver.js +0 -706
  35. package/relay/node_modules/ws/lib/sender.js +0 -602
  36. package/relay/node_modules/ws/lib/stream.js +0 -161
  37. package/relay/node_modules/ws/lib/subprotocol.js +0 -62
  38. package/relay/node_modules/ws/lib/validation.js +0 -152
  39. package/relay/node_modules/ws/lib/websocket-server.js +0 -554
  40. package/relay/node_modules/ws/lib/websocket.js +0 -1393
  41. package/relay/node_modules/ws/package.json +0 -69
  42. package/relay/node_modules/ws/wrapper.mjs +0 -8
  43. package/relay/package-lock.json +0 -36
  44. package/relay/package.json +0 -12
  45. package/skills/claude-code/tab-agent.md +0 -57
  46. package/skills/codex/tab-agent.md +0 -38
@@ -1,69 +0,0 @@
1
- {
2
- "name": "ws",
3
- "version": "8.19.0",
4
- "description": "Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js",
5
- "keywords": [
6
- "HyBi",
7
- "Push",
8
- "RFC-6455",
9
- "WebSocket",
10
- "WebSockets",
11
- "real-time"
12
- ],
13
- "homepage": "https://github.com/websockets/ws",
14
- "bugs": "https://github.com/websockets/ws/issues",
15
- "repository": {
16
- "type": "git",
17
- "url": "git+https://github.com/websockets/ws.git"
18
- },
19
- "author": "Einar Otto Stangvik <einaros@gmail.com> (http://2x.io)",
20
- "license": "MIT",
21
- "main": "index.js",
22
- "exports": {
23
- ".": {
24
- "browser": "./browser.js",
25
- "import": "./wrapper.mjs",
26
- "require": "./index.js"
27
- },
28
- "./package.json": "./package.json"
29
- },
30
- "browser": "browser.js",
31
- "engines": {
32
- "node": ">=10.0.0"
33
- },
34
- "files": [
35
- "browser.js",
36
- "index.js",
37
- "lib/*.js",
38
- "wrapper.mjs"
39
- ],
40
- "scripts": {
41
- "test": "nyc --reporter=lcov --reporter=text mocha --throw-deprecation test/*.test.js",
42
- "integration": "mocha --throw-deprecation test/*.integration.js",
43
- "lint": "eslint . && prettier --check --ignore-path .gitignore \"**/*.{json,md,yaml,yml}\""
44
- },
45
- "peerDependencies": {
46
- "bufferutil": "^4.0.1",
47
- "utf-8-validate": ">=5.0.2"
48
- },
49
- "peerDependenciesMeta": {
50
- "bufferutil": {
51
- "optional": true
52
- },
53
- "utf-8-validate": {
54
- "optional": true
55
- }
56
- },
57
- "devDependencies": {
58
- "benchmark": "^2.1.4",
59
- "bufferutil": "^4.0.1",
60
- "eslint": "^9.0.0",
61
- "eslint-config-prettier": "^10.0.1",
62
- "eslint-plugin-prettier": "^5.0.0",
63
- "globals": "^16.0.0",
64
- "mocha": "^8.4.0",
65
- "nyc": "^15.0.0",
66
- "prettier": "^3.0.0",
67
- "utf-8-validate": "^6.0.0"
68
- }
69
- }
@@ -1,8 +0,0 @@
1
- import createWebSocketStream from './lib/stream.js';
2
- import Receiver from './lib/receiver.js';
3
- import Sender from './lib/sender.js';
4
- import WebSocket from './lib/websocket.js';
5
- import WebSocketServer from './lib/websocket-server.js';
6
-
7
- export { createWebSocketStream, Receiver, Sender, WebSocket, WebSocketServer };
8
- export default WebSocket;
@@ -1,36 +0,0 @@
1
- {
2
- "name": "tab-agent-relay",
3
- "version": "0.1.0",
4
- "lockfileVersion": 3,
5
- "requires": true,
6
- "packages": {
7
- "": {
8
- "name": "tab-agent-relay",
9
- "version": "0.1.0",
10
- "dependencies": {
11
- "ws": "^8.16.0"
12
- }
13
- },
14
- "node_modules/ws": {
15
- "version": "8.19.0",
16
- "resolved": "https://registry.npmjs.org/ws/-/ws-8.19.0.tgz",
17
- "integrity": "sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg==",
18
- "license": "MIT",
19
- "engines": {
20
- "node": ">=10.0.0"
21
- },
22
- "peerDependencies": {
23
- "bufferutil": "^4.0.1",
24
- "utf-8-validate": ">=5.0.2"
25
- },
26
- "peerDependenciesMeta": {
27
- "bufferutil": {
28
- "optional": true
29
- },
30
- "utf-8-validate": {
31
- "optional": true
32
- }
33
- }
34
- }
35
- }
36
- }
@@ -1,12 +0,0 @@
1
- {
2
- "name": "tabpilot-relay",
3
- "version": "0.1.0",
4
- "description": "WebSocket relay for TabPilot Chrome extension",
5
- "main": "server.js",
6
- "scripts": {
7
- "start": "node server.js"
8
- },
9
- "dependencies": {
10
- "ws": "^8.16.0"
11
- }
12
- }
@@ -1,57 +0,0 @@
1
- ---
2
- name: tab-agent
3
- description: Browser control via CLI - snapshot, click, type, navigate
4
- ---
5
-
6
- # Tab Agent
7
-
8
- Control browser tabs via CLI. User activates tabs via extension icon (green = active).
9
-
10
- ## Before First Command
11
-
12
- ```bash
13
- curl -s http://localhost:9876/health || (npx tab-agent start &)
14
- sleep 2
15
- ```
16
-
17
- ## Commands
18
-
19
- ```bash
20
- npx tab-agent snapshot # Get page with refs [e1], [e2]...
21
- npx tab-agent click <ref> # Click element
22
- npx tab-agent type <ref> <text> # Type text
23
- npx tab-agent fill <ref> <value> # Fill form field
24
- npx tab-agent press <key> # Press key (Enter, Escape, Tab)
25
- npx tab-agent scroll <dir> [amount] # Scroll up/down
26
- npx tab-agent navigate <url> # Go to URL
27
- npx tab-agent tabs # List active tabs
28
- npx tab-agent wait <text|selector> # Wait for condition
29
- npx tab-agent screenshot # Capture page (fallback only)
30
- ```
31
-
32
- ## Workflow
33
-
34
- 1. `snapshot` first - always start here to get element refs
35
- 2. Use refs [e1], [e2]... with `click`/`type`/`fill`
36
- 3. `snapshot` again after actions to see results
37
- 4. **Only use `screenshot` if:**
38
- - Snapshot is missing expected content
39
- - Page has complex visuals (charts, images, canvas)
40
- - Debugging why an action didn't work
41
-
42
- ## Examples
43
-
44
- ```bash
45
- # Search Google
46
- npx tab-agent navigate "https://google.com"
47
- npx tab-agent snapshot
48
- npx tab-agent type e1 "hello world"
49
- npx tab-agent press Enter
50
- npx tab-agent snapshot # See results
51
- ```
52
-
53
- ## Notes
54
-
55
- - Refs reset on each snapshot - always snapshot before interacting
56
- - Keys: Enter, Escape, Tab, Backspace, ArrowUp/Down/Left/Right
57
- - Prefer snapshot over screenshot - faster and text-based
@@ -1,38 +0,0 @@
1
- ---
2
- name: tab-agent
3
- description: Browser control via CLI
4
- ---
5
-
6
- # Tab Agent
7
-
8
- CLI browser control. User activates tabs via extension (green = active).
9
-
10
- ## Start Relay
11
-
12
- ```bash
13
- curl -s http://localhost:9876/health || (npx tab-agent start &)
14
- ```
15
-
16
- ## Commands
17
-
18
- ```bash
19
- npx tab-agent snapshot # Page with refs [e1], [e2]...
20
- npx tab-agent click <ref> # Click element
21
- npx tab-agent type <ref> <text> # Type text
22
- npx tab-agent fill <ref> <val> # Fill form field
23
- npx tab-agent press <key> # Enter/Escape/Tab/Arrow*
24
- npx tab-agent scroll <dir> [n] # Scroll up/down
25
- npx tab-agent navigate <url> # Go to URL
26
- npx tab-agent tabs # List active tabs
27
- npx tab-agent wait <text|sel> # Wait for condition
28
- npx tab-agent screenshot # Fallback only - if snapshot incomplete
29
- ```
30
-
31
- ## Workflow
32
-
33
- 1. Always `snapshot` first - get refs [e1], [e2]...
34
- 2. `click`/`type`/`fill` using refs
35
- 3. `snapshot` again to see results
36
- 4. **Only screenshot if snapshot missing content** (charts, canvas, debugging)
37
-
38
- Prefer snapshot over screenshot - faster and text-based.