@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
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Travel
|
|
2
|
+
|
|
3
|
+
Use for destinations, attractions, hotel ideas, and travel leads.
|
|
4
|
+
|
|
5
|
+
## Sites
|
|
6
|
+
|
|
7
|
+
### google
|
|
8
|
+
|
|
9
|
+
- Use for: broad destination, attraction, hotel, and itinerary discovery across the web
|
|
10
|
+
- Before use, run: `webcmd google -h`
|
|
11
|
+
|
|
12
|
+
### reddit
|
|
13
|
+
|
|
14
|
+
- Use for: traveler experiences, local tips, itinerary comparisons, and community recommendations
|
|
15
|
+
- Before use, run: `webcmd reddit -h`
|
|
16
|
+
|
|
17
|
+
### youtube
|
|
18
|
+
|
|
19
|
+
- Use for: destination walkthroughs, hotel reviews, travel vlogs, and visual checks
|
|
20
|
+
- Before use, run: `webcmd youtube -h`
|
|
21
|
+
|
|
22
|
+
## Routing Hints
|
|
23
|
+
|
|
24
|
+
- If the user names a specific travel platform and it exists in the live registry, use that platform directly
|
|
25
|
+
- If the user only asks about travel, destinations, attractions, or hotels, start with `google`
|
|
26
|
+
- Add `reddit` for traveler experience and `youtube` for visual inspection
|
|
@@ -194,6 +194,14 @@ Check these off step by step:
|
|
|
194
194
|
[ ] `fixtures/<cmd>-<YYYYMMDDHHMM>.json`: save one complete endpoint response sample after removing cookies, tokens, and private user fields. Use it for later field comparison and offline replay.
|
|
195
195
|
[ ] If debugging dumped temporary files in the repo or adapter directory, such as `.dbg-*.html`, `raw-*.json`, or similar, **delete them before commit**. Those belong in `~/.webcmd/sites/<site>/fixtures/` or `/tmp/`.
|
|
196
196
|
|
|
197
|
+
[ ] 13. **First command for this site? Stop and ask before building more.**
|
|
198
|
+
[ ] If this was the site's first command, do not silently keep scaffolding more commands. Ask the user what use cases they have in mind for this site — who the persona is, what they're trying to accomplish end to end.
|
|
199
|
+
[ ] From the use cases, propose the full set of commands you'd recommend adding, not just the obvious next one. Cover the whole journey the use cases imply (discovery, single-item detail, comparison, account/write actions, etc.), not only what's cheapest to build.
|
|
200
|
+
[ ] If that set is small (roughly ≤6-8 commands), list it flat and ask the user to confirm or trim it.
|
|
201
|
+
[ ] If it's large, bucket the commands into named groups (e.g. "Discovery", "Single-item evaluation", "Account actions requiring login") and ask the user which bucket(s) to build first — do not dump an unbucketed wall of commands.
|
|
202
|
+
[ ] Flag any bucket that needs a capability not yet solved (login/OTP, write access, payment) as its own decision point — e.g. "these need login — how do you want to handle auth?" — separate from the command list itself.
|
|
203
|
+
[ ] Do not scaffold additional commands until the user has confirmed which ones to build.
|
|
204
|
+
|
|
197
205
|
---
|
|
198
206
|
|
|
199
207
|
## Fallback Paths
|
|
@@ -244,8 +252,10 @@ Check these off step by step:
|
|
|
244
252
|
- **Intermediate parsing object keys must not overlap any `columns` entry.** Otherwise silent-column-drop audits can misread the adapter. Use dedicated internal names and destructure with aliases when pushing rows.
|
|
245
253
|
- **The `browser:` field determines the `func` signature:** `browser:false -> (args)`, `browser:true -> (page, args)`. If this is reversed, `args` may actually be a debug flag and all external parameters can silently fall back to defaults.
|
|
246
254
|
- Throw the correct typed error for known failures according to [`references/typed-errors.md`](./references/typed-errors.md). **Do not** silently `return []`, **do not** silently `return [{sentinel}]`, and **do not** silently clamp external parameters with `Math.max/min`.
|
|
255
|
+
- **Persistent sessions keep stale DOM between commands.** `siteSession: 'persistent'` shares one tab per site; leftover modals/drawers from the previous command leak into the next one. State-sensitive write commands (checkout flows) should add `freshPage: true` (new tab, same lease — cookies/login/location survive). Verify session-scoped context (login, selected city/date) *before* side effects, and embed such context in URLs/IDs your command emits for sibling commands. See `references/adapter-template.md` and "Persistent Sessions and State Hygiene" in `docs/authoring.mdx`.
|
|
247
256
|
- For private adapters, write `~/.webcmd/clis/<site>/<name>.js` to avoid a build. Copy to `clis/<site>/<name>.js` only when preparing a PR.
|
|
248
257
|
- Write site memory every round: no memory -> use skill -> produce memory -> next time becomes a five-minute task.
|
|
258
|
+
- **After a site's first command passes verify, stop and ask the user for their use cases before recommending next set of commands.** See Runbook Step 13.
|
|
249
259
|
- **Raw dumps, packet captures, and HTML samples from debugging may only be written to `~/.webcmd/sites/<site>/fixtures/` or `/tmp/`. Never leave `.dbg-*.html`, `raw-*.json`, `sample.*`, or similar temporary files in the repo root, `clis/<site>/`, or the current working directory.**
|
|
250
260
|
- **JSDOM unit-test fixtures (`clis/<site>/__fixtures__/<command>.html`) are the exception.** They are intentional review artifacts committed to the repo, not temporary dumps. Because of that, the quality bar is higher: complete the five steps in `references/jsdom-fixture-pattern.md`, including the mandatory `awk 'NF>0'` blank-line tightening, and reverse-validate once to prove the regression guard can fail.
|
|
251
261
|
|
|
@@ -112,6 +112,8 @@ Rules:
|
|
|
112
112
|
| `args` | Include type, default, and help for every external parameter. |
|
|
113
113
|
| `columns` | Must exactly match row keys, including order. |
|
|
114
114
|
| `pipeline` or `func` | Use the style already established by nearby adapters. |
|
|
115
|
+
| `siteSession` | `'persistent'` shares one tab per site across commands (multi-step flows); `'ephemeral'` gets a fresh isolated tab per run. Persistent tabs keep leftover DOM (modals, drawers) between commands — see "Persistent Sessions and State Hygiene" in docs/authoring.mdx. |
|
|
116
|
+
| `freshPage` | With `siteSession: 'persistent'`, set `true` to start the command on a newly created tab under the same lease: profile state (cookies, login, location) survives, stale DOM does not. Recommended for state-sensitive write commands such as checkout flows. |
|
|
115
117
|
|
|
116
118
|
## Strategy Enum Examples
|
|
117
119
|
|
|
@@ -53,6 +53,14 @@ Use this skill when `webcmd <site> <command>` fails with repairable errors:
|
|
|
53
53
|
|
|
54
54
|
Proceed only when the empty or missing-selector result is reproducible across retries and alternative entry points.
|
|
55
55
|
|
|
56
|
+
## Before Repair: An Error Modal Is Not Always the Site's Verdict
|
|
57
|
+
|
|
58
|
+
Persistent-session adapters (`siteSession: 'persistent'`) share one tab per site, so error text in the body may be inherited or context-scoped rather than real. Before patching code:
|
|
59
|
+
|
|
60
|
+
- Check the trace screenshot and `location.href`: a modal over a blank page or the wrong URL means the tab carried stale DOM from a previous command, not that the site rejected this request.
|
|
61
|
+
- Check session-scoped context: sites often scope results to a selected city, date, or account. A "closed" / "unavailable" verdict can simply mean the browser's selected context does not match the request (for example, a seat layout opened while the site's location cookie points at another city).
|
|
62
|
+
- Reproduce in a clean tab (`webcmd browser open <url>`) before trusting the verdict. If it only fails in the adapter's persistent tab, fix state handling (`freshPage: true`, dismiss-and-renavigate, context preconditions) instead of selectors.
|
|
63
|
+
|
|
56
64
|
## Step 1: Collect Trace Context
|
|
57
65
|
|
|
58
66
|
Run the failing command with retained trace:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: webcmd-sitemap-author
|
|
3
|
-
description: Use when creating or maintaining Webcmd site sitemaps: agent-facing navigation, page-state, action, workflow, API-reference, pitfall, and fallback knowledge for a website. Use after browser exploration discovers durable site context, when a sitemap is stale, or when promoting local site knowledge into the repo.
|
|
3
|
+
description: 'Use when creating or maintaining Webcmd site sitemaps: agent-facing navigation, page-state, action, workflow, API-reference, pitfall, and fallback knowledge for a website. Use after browser exploration discovers durable site context, when a sitemap is stale, or when promoting local site knowledge into the repo.'
|
|
4
4
|
allowed-tools: Bash(webcmd:*), Read, Edit, Write, Grep
|
|
5
5
|
---
|
|
6
6
|
|