@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.
- package/README.md +39 -24
- package/cli-manifest.json +2308 -650
- package/clis/_shared/site-auth.js +6 -1
- package/clis/bigbasket/add-to-cart.js +82 -0
- package/clis/bigbasket/bigbasket.test.js +255 -0
- package/clis/bigbasket/cart.js +81 -0
- package/clis/bigbasket/category.js +30 -0
- package/clis/bigbasket/checkout.js +71 -0
- package/clis/bigbasket/location.js +30 -0
- package/clis/bigbasket/product.js +79 -0
- package/clis/bigbasket/search.js +30 -0
- package/clis/bigbasket/utils.js +207 -0
- package/clis/blinkit/add-to-cart.js +123 -0
- package/clis/blinkit/auth.js +99 -0
- package/clis/blinkit/blinkit.test.js +168 -0
- package/clis/blinkit/cart.js +34 -0
- package/clis/blinkit/checkout.js +32 -0
- package/clis/blinkit/location.js +29 -0
- package/clis/blinkit/place-order.js +78 -0
- package/clis/blinkit/product.js +63 -0
- package/clis/blinkit/search.js +89 -0
- package/clis/blinkit/utils.js +223 -0
- package/clis/district/_lib.js +566 -0
- package/clis/district/auth.js +49 -0
- package/clis/district/checkout.js +348 -0
- package/clis/district/listings.js +158 -0
- package/clis/district/locations.js +211 -0
- package/clis/district/search.js +218 -0
- package/clis/district/seats.js +233 -0
- package/clis/district/set-location.js +82 -0
- package/clis/district/showtimes.js +433 -0
- package/clis/practo/appointment.js +21 -0
- package/clis/practo/appointments.js +27 -0
- package/clis/practo/book-confirm.js +35 -0
- package/clis/practo/book-preview.js +24 -0
- package/clis/practo/booking-link.js +24 -0
- package/clis/practo/cancel.js +29 -0
- package/clis/practo/contact.js +21 -0
- package/clis/practo/login.js +21 -0
- package/clis/practo/practo.test.js +136 -0
- package/clis/practo/profile.js +31 -0
- package/clis/practo/search.js +30 -0
- package/clis/practo/slots.js +19 -0
- package/clis/practo/utils.js +374 -0
- package/clis/practo/whoami.js +28 -0
- package/clis/reddit/popular.js +12 -1
- package/clis/reddit/popular.test.js +12 -3
- package/clis/zepto/add-to-cart.js +53 -0
- package/clis/zepto/auth.js +59 -0
- package/clis/zepto/cart.js +23 -0
- package/clis/zepto/checkout.js +60 -0
- package/clis/zepto/location.js +20 -0
- package/clis/zepto/place-order.js +47 -0
- package/clis/zepto/product.js +52 -0
- package/clis/zepto/search.js +30 -0
- package/clis/zepto/utils.js +228 -0
- package/clis/zepto/zepto.test.js +238 -0
- package/dist/src/browser/bridge.d.ts +1 -0
- package/dist/src/browser/bridge.js +1 -1
- package/dist/src/browser/page.d.ts +4 -1
- package/dist/src/browser/page.js +12 -1
- package/dist/src/browser/protocol.d.ts +2 -0
- package/dist/src/browser/runtime/local-cloak/actions.js +1 -0
- package/dist/src/browser/runtime/local-cloak/session-manager.d.ts +2 -0
- package/dist/src/browser/runtime/local-cloak/session-manager.js +12 -2
- package/dist/src/browser/runtime/local-cloak/session-manager.test.js +58 -0
- package/dist/src/build-manifest.js +1 -0
- package/dist/src/build-manifest.test.js +34 -0
- package/dist/src/cli.js +111 -28
- package/dist/src/discovery.js +1 -0
- package/dist/src/engine.test.js +62 -0
- package/dist/src/execution.js +1 -1
- package/dist/src/generate-release-notes-cli.test.js +55 -1
- package/dist/src/manifest-types.d.ts +2 -0
- package/dist/src/registry.d.ts +10 -0
- package/dist/src/registry.js +5 -3
- package/dist/src/registry.test.js +25 -0
- package/dist/src/release-notes.d.ts +3 -1
- package/dist/src/release-notes.js +44 -1
- package/dist/src/release-notes.test.js +39 -1
- package/dist/src/runtime.d.ts +2 -0
- package/dist/src/runtime.js +1 -0
- package/dist/src/skills.d.ts +23 -5
- package/dist/src/skills.js +87 -45
- package/dist/src/skills.test.js +80 -23
- package/package.json +2 -2
- package/scripts/generate-release-notes.ts +31 -0
- package/skills/smart-search/SKILL.md +156 -0
- package/skills/smart-search/references/sources-ai.md +74 -0
- package/skills/smart-search/references/sources-info.md +43 -0
- package/skills/smart-search/references/sources-media.md +40 -0
- package/skills/smart-search/references/sources-other.md +32 -0
- package/skills/smart-search/references/sources-shopping.md +21 -0
- package/skills/smart-search/references/sources-social.md +36 -0
- package/skills/smart-search/references/sources-tech.md +38 -0
- package/skills/smart-search/references/sources-travel.md +26 -0
- package/skills/webcmd-adapter-author/SKILL.md +10 -0
- package/skills/webcmd-adapter-author/references/adapter-template.md +2 -0
- package/skills/webcmd-autofix/SKILL.md +8 -0
- 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/
|
|
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
|
|
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
|
|
34
|
-
| 4.
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
125
|
+
## Install skills (also refreshes existing installs)
|
|
126
|
+
|
|
127
|
+
Install Webcmd skills into your agent environment:
|
|
129
128
|
|
|
130
129
|
```bash
|
|
131
|
-
|
|
130
|
+
webcmd skills install
|
|
132
131
|
```
|
|
133
132
|
|
|
134
|
-
|
|
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
|
|
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
|
|
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://
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
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 |
|