@agentrhq/webcmd 0.2.1 → 0.2.3

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 (100) hide show
  1. package/README.md +39 -24
  2. package/cli-manifest.json +2308 -650
  3. package/clis/_shared/site-auth.js +6 -1
  4. package/clis/bigbasket/add-to-cart.js +82 -0
  5. package/clis/bigbasket/bigbasket.test.js +255 -0
  6. package/clis/bigbasket/cart.js +81 -0
  7. package/clis/bigbasket/category.js +30 -0
  8. package/clis/bigbasket/checkout.js +71 -0
  9. package/clis/bigbasket/location.js +30 -0
  10. package/clis/bigbasket/product.js +79 -0
  11. package/clis/bigbasket/search.js +30 -0
  12. package/clis/bigbasket/utils.js +207 -0
  13. package/clis/blinkit/add-to-cart.js +123 -0
  14. package/clis/blinkit/auth.js +99 -0
  15. package/clis/blinkit/blinkit.test.js +168 -0
  16. package/clis/blinkit/cart.js +34 -0
  17. package/clis/blinkit/checkout.js +32 -0
  18. package/clis/blinkit/location.js +29 -0
  19. package/clis/blinkit/place-order.js +78 -0
  20. package/clis/blinkit/product.js +63 -0
  21. package/clis/blinkit/search.js +89 -0
  22. package/clis/blinkit/utils.js +223 -0
  23. package/clis/district/_lib.js +566 -0
  24. package/clis/district/auth.js +49 -0
  25. package/clis/district/checkout.js +348 -0
  26. package/clis/district/listings.js +158 -0
  27. package/clis/district/locations.js +211 -0
  28. package/clis/district/search.js +218 -0
  29. package/clis/district/seats.js +233 -0
  30. package/clis/district/set-location.js +82 -0
  31. package/clis/district/showtimes.js +433 -0
  32. package/clis/practo/appointment.js +21 -0
  33. package/clis/practo/appointments.js +27 -0
  34. package/clis/practo/book-confirm.js +35 -0
  35. package/clis/practo/book-preview.js +24 -0
  36. package/clis/practo/booking-link.js +24 -0
  37. package/clis/practo/cancel.js +29 -0
  38. package/clis/practo/contact.js +21 -0
  39. package/clis/practo/login.js +21 -0
  40. package/clis/practo/practo.test.js +136 -0
  41. package/clis/practo/profile.js +31 -0
  42. package/clis/practo/search.js +30 -0
  43. package/clis/practo/slots.js +19 -0
  44. package/clis/practo/utils.js +374 -0
  45. package/clis/practo/whoami.js +28 -0
  46. package/clis/reddit/popular.js +12 -1
  47. package/clis/reddit/popular.test.js +12 -3
  48. package/clis/zepto/add-to-cart.js +53 -0
  49. package/clis/zepto/auth.js +59 -0
  50. package/clis/zepto/cart.js +23 -0
  51. package/clis/zepto/checkout.js +60 -0
  52. package/clis/zepto/location.js +20 -0
  53. package/clis/zepto/place-order.js +47 -0
  54. package/clis/zepto/product.js +52 -0
  55. package/clis/zepto/search.js +30 -0
  56. package/clis/zepto/utils.js +228 -0
  57. package/clis/zepto/zepto.test.js +238 -0
  58. package/dist/src/browser/bridge.d.ts +1 -0
  59. package/dist/src/browser/bridge.js +1 -1
  60. package/dist/src/browser/page.d.ts +4 -1
  61. package/dist/src/browser/page.js +12 -1
  62. package/dist/src/browser/protocol.d.ts +2 -0
  63. package/dist/src/browser/runtime/local-cloak/actions.js +1 -0
  64. package/dist/src/browser/runtime/local-cloak/session-manager.d.ts +2 -0
  65. package/dist/src/browser/runtime/local-cloak/session-manager.js +12 -2
  66. package/dist/src/browser/runtime/local-cloak/session-manager.test.js +58 -0
  67. package/dist/src/build-manifest.js +1 -0
  68. package/dist/src/build-manifest.test.js +34 -0
  69. package/dist/src/cli.js +111 -28
  70. package/dist/src/discovery.js +1 -0
  71. package/dist/src/engine.test.js +62 -0
  72. package/dist/src/execution.js +1 -1
  73. package/dist/src/generate-release-notes-cli.test.js +55 -1
  74. package/dist/src/manifest-types.d.ts +2 -0
  75. package/dist/src/registry.d.ts +10 -0
  76. package/dist/src/registry.js +5 -3
  77. package/dist/src/registry.test.js +25 -0
  78. package/dist/src/release-notes.d.ts +3 -1
  79. package/dist/src/release-notes.js +44 -1
  80. package/dist/src/release-notes.test.js +39 -1
  81. package/dist/src/runtime.d.ts +2 -0
  82. package/dist/src/runtime.js +1 -0
  83. package/dist/src/skills.d.ts +23 -5
  84. package/dist/src/skills.js +87 -45
  85. package/dist/src/skills.test.js +80 -23
  86. package/package.json +2 -2
  87. package/scripts/generate-release-notes.ts +31 -0
  88. package/skills/smart-search/SKILL.md +156 -0
  89. package/skills/smart-search/references/sources-ai.md +74 -0
  90. package/skills/smart-search/references/sources-info.md +43 -0
  91. package/skills/smart-search/references/sources-media.md +40 -0
  92. package/skills/smart-search/references/sources-other.md +32 -0
  93. package/skills/smart-search/references/sources-shopping.md +21 -0
  94. package/skills/smart-search/references/sources-social.md +36 -0
  95. package/skills/smart-search/references/sources-tech.md +38 -0
  96. package/skills/smart-search/references/sources-travel.md +26 -0
  97. package/skills/webcmd-adapter-author/SKILL.md +10 -0
  98. package/skills/webcmd-adapter-author/references/adapter-template.md +2 -0
  99. package/skills/webcmd-autofix/SKILL.md +8 -0
  100. package/skills/webcmd-sitemap-author/SKILL.md +1 -1
package/README.md CHANGED
@@ -14,7 +14,7 @@
14
14
  <img alt="Join the community on Discord" src="https://img.shields.io/badge/Join%20the%20community-7C3AED.svg?style=for-the-badge&logo=discord&logoColor=white&labelColor=000000&logoWidth=20">
15
15
  </a>
16
16
  <a href="https://x.com/agentrhq">
17
- <img alt="Follow AgentR on X" src="https://img.shields.io/badge/Follow%20%40agentrhq-000000.svg?style=for-the-badge&logo=x&logoColor=white&labelColor=000000&logoWidth=20">
17
+ <img alt="Follow AgentR on X" src="https://img.shields.io/badge/Built%20by%20%40agentrhq-000000.svg?style=for-the-badge&logo=x&logoColor=white&labelColor=000000&logoWidth=20">
18
18
  </a>
19
19
  </p>
20
20
 
@@ -24,14 +24,14 @@
24
24
 
25
25
  WebCMD learns the navigational context of websites as agents use them, then compiles that knowledge into deterministic commands for faster, cheaper, more reliable browser automation. The goal is simple: stop making agents rediscover the same sites on every run and cut browser-agent token spend by up to 90%.
26
26
 
27
- On top of vanilla browser interactions, WebCMD adds 3 layers of learnings. Each layer collapses cost and variance for the layer above it.
27
+ On top of live browser control, WebCMD adds 3 layers of learnings. Each layer collapses cost and variance for the layer above it.
28
28
 
29
29
  | Layer | Scenario | What Webcmd Helps With |
30
30
  | --- | --- | --- |
31
31
  | 1. Live browser control | The site is unfamiliar. | Use `webcmd browser` to inspect, click, type, extract, capture network calls, and complete the task in a real browser. |
32
32
  | 2. Sitemap memory | The site is familiar, but the action space is not fully known. | Capture an agent-facing sitemap of observed pages, states, actions, workflows, APIs, pitfalls, and fallback paths. |
33
- | 3. CLI authoring | The action space is known, but the path is still too variable for one fixed sequence. | Explicitly author a reusable `webcmd <site> <command>` adapter with structured output, so future agents spend tokens on the task instead of navigation. |
34
- | 4. Custom CLI commands | The workflow is deterministic enough to stop browsing. | Extend the CLI with a tailored command so the workflow runs instantly with the least amount of tokens. |
33
+ | 3. CLI authoring | The action space is known, but the path is still too variable for one fixed sequence. | Explicitly author a reusable `webcmd <site>` adapter with structured output, so future agents spend tokens on the task instead of navigation. |
34
+ | 4. Extend existing CLIs | The workflow is deterministic enough to stop browsing. | Extend the `webcmd <site>` adapter with a tailored command so the workflow runs instantly with the least amount of tokens. |
35
35
 
36
36
 
37
37
  ## Quick Start
@@ -51,7 +51,7 @@ npm install -g @agentrhq/webcmd
51
51
  webcmd doctor
52
52
  ```
53
53
 
54
- `doctor` checks the Webcmd browser bridge: daemon status, runtime wiring, profile selection, and a live connectivity probe. Pure public adapters and local passthrough commands do not need a green browser check, but `COOKIE`, `INTERCEPT`, `UI`, and `webcmd browser` workflows do.
54
+ `doctor` checks the Webcmd browser bridge: daemon status, browser runtime installation, profile selection, and a live connectivity probe. Pure public adapters and local passthrough commands do not need a green browser check, but `COOKIE`, `INTERCEPT`, `UI`, and `webcmd browser` workflows do.
55
55
 
56
56
  ### 3. Discover commands
57
57
 
@@ -64,7 +64,7 @@ webcmd reddit hot --help
64
64
 
65
65
  `webcmd list -f json` is the source of truth for agents. It emits one row per command with the site, command name, arguments, output columns, browser requirement, and strategy.
66
66
 
67
- ### 4. Run your first adapters
67
+ ### 4. Run your first command
68
68
 
69
69
  ```bash
70
70
  webcmd hackernews top --limit 5
@@ -80,23 +80,20 @@ Use Webcmd directly when you want a reliable command instead of a live browser s
80
80
  webcmd list
81
81
  webcmd <site> --help
82
82
  webcmd <site> <command> --help
83
- webcmd <site> <command> -f json
83
+ webcmd <site> <command> -f yaml
84
84
  ```
85
85
 
86
86
  The everyday surface is intentionally small:
87
87
 
88
88
  - `webcmd list` shows every registered adapter and external command.
89
89
  - `webcmd <site> <command> ...` runs a built-in, plugin, or private adapter.
90
- - `webcmd external register <name>` exposes a local CLI through the same discovery surface.
91
- - `webcmd doctor` diagnoses browser connectivity for authenticated or UI-driven commands.
92
90
 
93
91
  For example:
94
92
 
95
93
  ```bash
96
94
  webcmd hackernews top --limit 10
97
95
  webcmd reddit subreddit programming --limit 10
98
- webcmd github whoami
99
- webcmd gh pr list --limit 5
96
+ webcmd twitter whoami
100
97
  ```
101
98
 
102
99
  Adapter commands are tagged by strategy:
@@ -119,19 +116,23 @@ webcmd hackernews top -f md
119
116
  webcmd hackernews top -f csv
120
117
  ```
121
118
 
122
- Agents usually want `-f json`; humans usually want the default table.
119
+ Agents usually want `-f json`; humans usually want table (default) or yaml.
123
120
 
124
121
  ## For AI Agents
125
122
 
126
123
  Webcmd is designed to be driven by coding agents such as Codex, Claude Code, Cursor, and similar tools.
127
124
 
128
- Install Webcmd skills into the agent environment with your agent's skill manager:
125
+ ## Install skills (also refreshes existing installs)
126
+
127
+ Install Webcmd skills into your agent environment:
129
128
 
130
129
  ```bash
131
- npx skills add agentrhq/webcmd
130
+ webcmd skills install
132
131
  ```
133
132
 
134
- Or install/copy only the skills you need from [`skills/`](./skills/) into your agent's skills root. These skills teach agents when to use adapters, when to drive the browser, how to author new adapters, and how to repair failing commands.
133
+ The installer asks whether to install globally or locally, then asks for the coding agent (`agents`, `codex`, `claude`) or a custom skills path. For scripts, pass flags such as `--scope project --provider codex` or `--path ./my-skills`.
134
+
135
+ ### Which skill to use
135
136
 
136
137
  | Skill | When to use |
137
138
  |-------|-------------|
@@ -153,20 +154,34 @@ webcmd <site> <command> --trace retain-on-failure -f json
153
154
 
154
155
  Start with adapters. Fall back to `webcmd browser` only when no adapter covers the task or you are teaching Webcmd a new site flow.
155
156
 
156
- ## Browser Automation
157
+ ## Live Browser Interaction
158
+
159
+ `webcmd browser` gives agents a stable, structured interface to a real browser. Every command takes a session name immediately after `browser` — the session is required, so `webcmd browser tab list` without one is an error:
160
+
161
+ ```bash
162
+ webcmd browser <session> open https://example.com
163
+ ```
164
+
165
+ ### Tabs and page IDs
157
166
 
158
- `webcmd browser` gives agents a stable, structured interface to a real browser. Commands use a session name immediately after `browser`:
167
+ `webcmd browser work open <url>` and `webcmd browser work tab new [url]` both return a page ID in the `page` field:
159
168
 
160
169
  ```bash
161
- webcmd browser work open https://example.com
162
- webcmd browser work state
163
- webcmd browser work click --role link --name "Learn more"
164
- webcmd browser work type --role textbox --name Email "you@example.com"
165
- webcmd browser work keys Enter
166
- webcmd browser work extract
167
- webcmd browser work close
170
+ $ webcmd browser work open https://reddit.com
171
+ {
172
+ "url": "https://reddit.com",
173
+ "page": "page-1783484232033-8"
174
+ }
168
175
  ```
169
176
 
177
+ Use `webcmd browser work tab list` to inspect all tabs — each entry carries its page ID (`id`/`page`), the owning `session` (adapter sessions appear as `site:<name>`), and whether it is the currently `selected` tab. Pass `--tab <pageId>` to route a single command to a specific tab:
178
+
179
+ ```bash
180
+ webcmd browser work open https://example.com --tab page-1783484232033-8
181
+ ```
182
+
183
+ `tab new` creates a tab without changing the session's default tab; only `tab select <pageId>` promotes a tab to the default for later untargeted commands in the same session.
184
+
170
185
  Useful browser primitives include:
171
186
 
172
187
  | Area | Commands |