@agentrhq/webcmd 0.3.3 → 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 (63) hide show
  1. package/README.md +45 -272
  2. package/cli-manifest.json +184 -311
  3. package/clis/_shared/site-auth.js +37 -40
  4. package/clis/_shared/site-auth.test.js +109 -22
  5. package/clis/amazon/auth.js +0 -6
  6. package/clis/band/auth.js +0 -6
  7. package/clis/blinkit/auth.js +13 -40
  8. package/clis/blinkit/blinkit.test.js +39 -2
  9. package/clis/chatgpt/auth.js +0 -6
  10. package/clis/claude/auth.js +0 -6
  11. package/clis/coupang/auth.js +0 -6
  12. package/clis/district/auth.js +0 -2
  13. package/clis/facebook/auth.js +0 -6
  14. package/clis/gemini/auth.js +0 -6
  15. package/clis/github/auth.js +0 -6
  16. package/clis/grok/auth.js +0 -6
  17. package/clis/hackernews/hackernews.test.js +20 -1
  18. package/clis/hackernews/jobs.js +1 -1
  19. package/clis/hf/auth.js +2 -7
  20. package/clis/instagram/auth.js +0 -6
  21. package/clis/linkedin/auth.js +0 -6
  22. package/clis/linkedin-learning/auth.js +0 -6
  23. package/clis/manus/auth.js +0 -6
  24. package/clis/notebooklm/auth.js +0 -6
  25. package/clis/pixiv/auth.js +1 -7
  26. package/clis/practo/login.js +12 -38
  27. package/clis/practo/practo.test.js +13 -9
  28. package/clis/reddit/auth.js +0 -6
  29. package/clis/reuters/auth.js +0 -14
  30. package/clis/suno/auth.js +0 -6
  31. package/clis/tiktok/auth.js +0 -6
  32. package/clis/twitter/auth.js +0 -6
  33. package/clis/upwork/auth.js +0 -6
  34. package/clis/youtube/auth.js +0 -6
  35. package/clis/zepto/auth.js +16 -29
  36. package/clis/zepto/zepto.test.js +45 -2
  37. package/dist/src/browser/ax-snapshot.js +15 -5
  38. package/dist/src/browser/ax-snapshot.test.js +49 -0
  39. package/dist/src/browser/cdp.js +3 -1
  40. package/dist/src/browser/cdp.test.js +12 -0
  41. package/dist/src/browser/page.js +6 -2
  42. package/dist/src/browser/page.test.js +1 -0
  43. package/dist/src/browser/protocol.d.ts +2 -0
  44. package/dist/src/browser/runtime/local-cloak/actions.js +42 -21
  45. package/dist/src/browser/runtime/local-cloak/provider.test.js +33 -5
  46. package/dist/src/build-manifest.js +3 -3
  47. package/dist/src/build-manifest.test.js +14 -0
  48. package/dist/src/docs-sync-review.js +2 -2
  49. package/dist/src/docs-sync-review.test.js +2 -2
  50. package/dist/src/hosted/main-lifecycle.test.js +2 -1
  51. package/dist/src/hosted/manifest.test.js +2 -1
  52. package/dist/src/hosted/output-parity.test.js +2 -1
  53. package/dist/src/hosted/root-command-surface.test.js +1 -1
  54. package/dist/src/hosted/runner.test.js +8 -4
  55. package/dist/src/skills.test.js +54 -0
  56. package/hosted-contract.json +191 -366
  57. package/package.json +5 -4
  58. package/skills/smart-search/SKILL.md +20 -6
  59. package/skills/webcmd-adapter-author/SKILL.md +2 -0
  60. package/skills/webcmd-autofix/SKILL.md +5 -3
  61. package/skills/webcmd-browser/SKILL.md +28 -13
  62. package/skills/webcmd-usage/SKILL.md +29 -6
  63. package/clis/practo/whoami.js +0 -28
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentrhq/webcmd",
3
- "version": "0.3.3",
3
+ "version": "0.4.0",
4
4
  "description": "Turn websites, browser sessions, desktop apps, and local tools into deterministic CLI surfaces for humans and AI agents.",
5
5
  "engines": {
6
6
  "node": ">=20.0.0"
@@ -18,6 +18,7 @@
18
18
  "./utils": "./dist/src/utils.js",
19
19
  "./logger": "./dist/src/logger.js",
20
20
  "./launcher": "./dist/src/launcher.js",
21
+ "./browser/ax-snapshot": "./dist/src/browser/ax-snapshot.js",
21
22
  "./browser/cdp": "./dist/src/browser/cdp.js",
22
23
  "./browser/page": "./dist/src/browser/page.js",
23
24
  "./browser/utils": "./dist/src/browser/utils.js",
@@ -77,7 +78,7 @@
77
78
  ],
78
79
  "author": "AgentR",
79
80
  "license": "Apache-2.0",
80
- "homepage": "https://docs.webcmd.dev",
81
+ "homepage": "https://webcmd.dev/docs",
81
82
  "repository": {
82
83
  "type": "git",
83
84
  "url": "git+https://github.com/agentrhq/webcmd.git"
@@ -90,7 +91,7 @@
90
91
  "cli-table3": "^0.6.5",
91
92
  "cloakbrowser": "0.4.5",
92
93
  "commander": "^14.0.3",
93
- "js-yaml": "^4.1.0",
94
+ "js-yaml": "^4.3.0",
94
95
  "playwright-core": "1.61.1",
95
96
  "turndown": "^7.2.2",
96
97
  "turndown-plugin-gfm": "^1.0.2",
@@ -113,4 +114,4 @@
113
114
  "overrides": {
114
115
  "postcss": "^8.5.10"
115
116
  }
116
- }
117
+ }
@@ -11,10 +11,24 @@ Route a query to the best webcmd search source based on the topic and context. T
11
11
 
12
12
  Before every use, do both of these steps:
13
13
 
14
- - Run `webcmd list -f json`
15
- - Use the live registry to confirm that candidate sites exist, and inspect `strategy`, `browser`, and `domain`
14
+ - Derive literal workflow terms from the requested action, entity, output fields, and any explicitly named site, then filter the live registry before it reaches bounded agent output:
16
15
 
17
- If the user explicitly names a site/source and it is missing from `webcmd list` or when none of the sites cover the query, check installable plugins before marking it unavailable:
16
+ ```bash
17
+ WORKFLOW_TERMS='["requested action", "output field", "named site"]'
18
+ webcmd list -f json | jq --argjson terms "$WORKFLOW_TERMS" '
19
+ [.[] | select(
20
+ ([.site, .name, .description, ((.columns // []) | join(" "))]
21
+ | map(. // "") | join(" ") | ascii_downcase) as $text
22
+ | any($terms[]; . as $term | $text | contains($term | ascii_downcase))
23
+ )]
24
+ '
25
+ ```
26
+
27
+ - Use the complete, non-truncated filtered registry to confirm that candidate sites exist, and inspect `strategy`, `browser`, and `domain`
28
+
29
+ Any truncation warning from registry or plugin output means the inspection is incomplete. Narrow the filter or query and inspect again; absence from truncated output never proves a site, command, or plugin is unavailable. Do not search plugins until a complete filtered registry result for the missing capability is exactly `[]`, and do not use raw browser fallback until plugin output is also complete and non-truncated.
30
+
31
+ If the user explicitly names a site/source, or no installed command covers the query, refine the filter for that missing site or capability. Only when the complete filtered result is `[]`, check installable plugins before marking it unavailable:
18
32
 
19
33
  ```bash
20
34
  webcmd plugin search <site-or-source-or-capability> -f json
@@ -22,7 +36,7 @@ webcmd plugin search <site-or-source-or-capability> -f json
22
36
 
23
37
  Derive a short plugin query from the missing site or capability. Preserve the user's term when practical: `find flights` becomes `flight`.
24
38
 
25
- If plugin search finds a match, tell the user it is available as a plugin and offer `webcmd plugin install <source>`. If plugin search fails because catalog sources cannot be fetched, report that catalog/search error separately from no plugin match.
39
+ If a complete, non-truncated plugin search finds a match, tell the user it is available as a plugin and offer `webcmd plugin install <source>`. If plugin search is truncated, refine it before fallback. If it fails because catalog sources cannot be fetched, report that catalog/search error separately from no plugin match.
26
40
 
27
41
  After choosing a site, do both of these steps:
28
42
 
@@ -144,12 +158,12 @@ Keep a typical query to 1 AI source plus 1-2 specialized sources to avoid result
144
158
  When a site is unavailable:
145
159
 
146
160
  - Do not stop the whole search because one source failed
147
- - For a missing site or capability, run `webcmd plugin search <query> -f json` before recording unavailable
161
+ - For a missing site or capability, first require a complete filtered registry result of `[]`, then run `webcmd plugin search <query> -f json` before recording unavailable
148
162
  - Record: `Skipped: <site> unavailable`
149
163
  - Fall back to another site of the same type, or to one AI source
150
164
  - Always trust the actual output of `webcmd list -f json`, `webcmd plugin search -f json`, and `webcmd <site> -h`
151
165
 
152
- Do not assume any site is always available. Even for public sites, trust live help and execution results in the current environment.
166
+ Do not assume any site is always available. Even for public sites, trust complete, non-truncated live registry and plugin output, live help, and execution results in the current environment. Raw browser fallback requires both the complete `[]` registry result and a complete, non-truncated plugin search that returned no match and no error.
153
167
 
154
168
  ## Reference Files
155
169
 
@@ -10,6 +10,8 @@ You are an agent writing an adapter for a site. The goal of this skill is a 30-m
10
10
 
11
11
  Use the existing tools throughout: `webcmd browser *`, `webcmd doctor`, `webcmd browser init`, and `webcmd browser verify`. This skill does not introduce new commands.
12
12
 
13
+ Browser-profile auth commands must reuse `registerSiteAuthCommands`. Keep only site-specific `verify` and `openLogin` logic in the adapter. The login row must return `action_required` and `verify_command` (normally `webcmd <site> whoami`); after the user reports done, agents run that returned command and verification must succeed before retrying the original workflow. Credentials, MFA, and CAPTCHA always use human handoff: CAPTCHA stops automation until the user reports done and verification succeeds, and adapter code must not collect or type passwords or secrets.
14
+
13
15
  When debugging browser-backed adapters, start with `--trace on --keep-tab true --window foreground`. `--trace on` writes a trace artifact every round, and `summary.md` is the entry point for reviewing both failures and successes. `--keep-tab true --window foreground` keeps the tab lease alive and puts the browser window in front so you can inspect the final page state.
14
16
 
15
17
  ---
@@ -12,9 +12,11 @@ When a `webcmd` command fails because a website changed its DOM, API, or respons
12
12
 
13
13
  Hard stops before any code change:
14
14
 
15
- - **`AUTH_REQUIRED`** (exit code 77): stop. Tell the user to log into the site in Chrome or the webcmd-managed browser profile.
15
+ - **Human-action handoff:** if a failure returns `handoff.status === action_required`, stop before trace collection or AutoFix. Give the user `handoff.action` and any `Webcmd browser:` or `handoff.viewUrl` link, then wait. Never request or enter credentials, passwords, or CAPTCHA answers. After the user reports done, run `handoff.verifyCommand` when present; verification must succeed before retrying. Without a verifier, inspect fresh browser state and verify the intended post-action state before any retry, especially for write commands.
16
+ - **`AUTH_REQUIRED`** (exit code 77): if a site login command exists, run `webcmd <site> login`, give its `action_required` instructions and any returned `action_url` or `view_url` to the user, and wait. Run the returned `verify_command` (normally `webcmd <site> whoami`); verification must succeed before retrying the original command. If no site login command exists, stop browser writes, hand the visible browser to the user, and wait. After they report done, take fresh browser state and use an available identity check or verify the intended post-action state before retrying. Their report alone is not verification. Never request, type, echo, store, or automate passwords, OTPs, recovery codes, cookies, or session secrets.
16
17
  - **`BROWSER_CONNECT`** (exit code 69): stop. Tell the user to run `webcmd doctor`.
17
- - **CAPTCHA / rate limiting / IP block:** stop. This is not an adapter issue.
18
+ - **CAPTCHA / raw-browser user takeover:** stop automation. Follow the human-action handoff above when one is returned; otherwise let the user act in the visible browser. Verification must succeed before retrying. With no verifier, take fresh browser state and verify the intended post-action state before any retry. The user's report alone is not verification. CAPTCHA is not an adapter issue.
19
+ - **Rate limiting / IP block:** stop. This is not an adapter issue.
18
20
 
19
21
  Scope constraint:
20
22
 
@@ -124,7 +126,7 @@ Read the trace summary and adapter source. Classify root cause:
124
126
  | SELECTOR | DOM restructured or class/id changed | Explore current DOM and find a stable selector |
125
127
  | EMPTY_RESULT | API response schema changed, data moved, or real empty result | Check network and visible page before patching |
126
128
  | API_ERROR | Endpoint URL changed or new params required | Discover current API through network evidence |
127
- | AUTH_REQUIRED | Login flow changed or cookies expired | Stop; ask user to log in |
129
+ | AUTH_REQUIRED | Login flow changed or cookies expired | Follow the conditional AUTH_REQUIRED policy in Safety Boundaries: use the site login command and its returned verifier when available; otherwise use human handoff plus fresh-state supported verification. |
128
130
  | TIMEOUT | Page loads differently or lazy-load signal changed | Update wait conditions |
129
131
  | PAGE_CHANGED | Major redesign | May need full adapter rewrite through `webcmd-adapter-author` |
130
132
 
@@ -12,13 +12,26 @@ This skill is for **driving a live browser** to accomplish an agent task. If you
12
12
 
13
13
  ---
14
14
 
15
+ ## Adapter fallback gate
16
+
17
+ Before starting a raw browser session, filter `webcmd list -f json` at the source using request-derived terms across `site`, `name`, `description`, and `columns`; follow `webcmd-usage` for the command shape. Any truncation warning means adapter discovery is incomplete: narrow the filter and inspect again. Absence from truncated output never proves that no adapter exists.
18
+
19
+ Raw `webcmd browser` use is allowed only after both conditions hold:
20
+
21
+ 1. The complete, non-truncated filtered registry result for the missing capability is exactly `[]`.
22
+ 2. A complete, non-truncated `webcmd plugin search <capability> -f json` result returns no match and no error.
23
+
24
+ If plugin search returns a match, offer installation. If its output is truncated, refine the query or output and inspect again. If it errors, report the error and stop instead of opening the browser.
25
+
26
+ ---
27
+
15
28
  ## Prerequisites
16
29
 
17
30
  ```bash
18
31
  webcmd doctor
19
32
  ```
20
33
 
21
- Until `doctor` is green, nothing else will work. Typical failures: Chrome not running, extension not installed, debug port blocked by 1Password / other extensions. The doctor output tells you which.
34
+ Until `doctor` is green, browser commands will not work. Registry and plugin discovery do not require `doctor`. Typical failures: Chrome not running, extension not installed, debug port blocked by 1Password / other extensions. The doctor output tells you which.
22
35
 
23
36
  ---
24
37
 
@@ -61,7 +74,7 @@ Bound sessions use the normal Webcmd session lifecycle; `unbind` releases the Cl
61
74
  ## Critical rules
62
75
 
63
76
  1. **Always inspect before you act.** Run `state` or `find` first. Never hard-code a ref or selector from memory across sessions — indices are per-snapshot.
64
- 2. **Prefer site adapters before raw browser driving.** If `webcmd <site> <command>` already covers the task, use that adapter command first (`webcmd facebook notifications`, `webcmd reddit read`, `webcmd chatgpt model <level>`, etc.). Use `webcmd browser ...` only for gaps, debugging, or one-off UI flows the adapter does not expose.
77
+ 2. **Prefer site adapters before raw browser driving.** Complete the adapter fallback gate above. If `webcmd <site> <command>` already covers the task, use that adapter command first (`webcmd facebook notifications`, `webcmd reddit read`, `webcmd chatgpt model <level>`, etc.). Use `webcmd browser ...` only for gaps, debugging, or one-off UI flows the adapter does not expose.
65
78
  3. **Prefer numeric ref over CSS once you have it.** Numeric refs survive mild DOM shifts because the CLI fingerprints each tagged element. A CSS selector written by hand will break the first time the site re-renders.
66
79
  4. **Read `match_level` after every write.** `exact` = all good. `stable` = the element is the same but some soft attrs drifted — your action still applied. `reidentified` = the original ref was gone and the CLI found a unique replacement; double-check you hit the right element.
67
80
  5. **Use the `compound` field for form controls.** Do not regex-guess a date format, do not `state` twice to get the full `<select>` options list. The compound envelope has the format string, full option list up to 50, `options_total` for overflow, and `accept`/`multiple` for `<input type=file>`.
@@ -322,18 +335,19 @@ webcmd browser hn open "https://news.ycombinator.com" \
322
335
 
323
336
  ## Recipes
324
337
 
325
- ### Fill a login form
338
+ ### Authentication and human handoff
326
339
 
327
- ```bash
328
- webcmd browser login open "https://example.com/login"
329
- webcmd browser login state # find [N] for email, password, submit
330
- webcmd browser login type 4 "me@example.com"
331
- webcmd browser login type 5 "hunter2"
332
- webcmd browser login get value 4 # verify (autocomplete can eat chars)
333
- webcmd browser login click 6 # submit
334
- webcmd browser login wait selector "[data-testid=account-menu]" --timeout 15000
335
- webcmd browser login state # fresh refs on the logged-in page
336
- ```
340
+ If a failure returns `handoff.status === action_required`, stop browser writes and AutoFix. Give the user `handoff.action` and any `Webcmd browser:` or `handoff.viewUrl` link, then wait. After the user reports done, run `handoff.verifyCommand` when present; verification must succeed before retrying.
341
+
342
+ 1. On a clear login redirect or auth wall, stop browser writes.
343
+ 2. If the site exposes a login command, run `webcmd <site> login`. `already_logged_in` is verified; `in_progress` means no current user action, so do not ask the user or wait for confirmation, and do not poll; `action_required` is a hard stop.
344
+ 3. For `action_required`, give the user its instructions and any returned `action_url` or `view_url`. If Webcmd returned no URL, use the current visible browser.
345
+ 4. Never ask for or type passwords, OTPs, recovery codes, cookies, or session secrets.
346
+ 5. Run the returned `verify_command` (normally `webcmd <site> whoami`) or `handoff.verifyCommand` only after the user reports done; verification must succeed before retrying.
347
+ 6. Without a verifier, take fresh browser state and verify the intended post-action state before any retry, especially for write commands. The user's report alone is not verification.
348
+ 7. If login remains `in_progress`, perform a later explicit `whoami` or task retry when work next needs auth state. Use `webcmd auth refresh` only when an explicit auth-state refresh is needed.
349
+
350
+ For a CAPTCHA or user takeover, stop automation, give the user any viewer URL Webcmd returned, and apply the same verification policy above. Keep CAPTCHA outside automated retries.
337
351
 
338
352
  ### Pick from a long dropdown
339
353
 
@@ -433,6 +447,7 @@ normal DOM `state`, or navigate/bind directly to the iframe URL when possible.
433
447
  | `stale_ref` across every command | You are reusing refs from a prior page. Re-`state`. |
434
448
  | `click` succeeds but nothing happens | The element is probably a decorative wrapper stealing clicks from the real target. `find --css "..."` with a narrower selector and retry on the inner element. |
435
449
  | `type` appears to finish but value is wrong | Autocomplete, masked input, or React controlled re-render. Verify with `get value`. Add `keys Enter` or re-type. |
450
+ | `webcmd list -f json` output is truncated | Adapter discovery is incomplete. Filter at the source with request-derived terms and narrow until the complete result is `[]`; do not start browser fallback yet. |
436
451
  | Giant `get html` output | Pass `--selector` + `--as json --depth 3 --children-max 20 --text-max 200`. |
437
452
  | Network cache seems stale | Bump `--ttl` down, or let it expire. The cache lives at `~/.webcmd/cache/browser-network/`. |
438
453
 
@@ -50,19 +50,33 @@ Run commands instead of reading static docs:
50
50
 
51
51
  ```bash
52
52
  webcmd
53
- webcmd list -f json
54
53
  webcmd <site> --help
55
54
  webcmd <site> <command> --help
56
55
  ```
57
56
 
58
57
  Run `webcmd` with no arguments to see all available functions and installed site adapters. Do not hard-code adapter lists: `webcmd list -f json` is the source of truth for installed commands and emits one entry per command with fields such as `{site, name, aliases, description, strategy, browser, args, columns}`.
59
58
 
59
+ Large registries can exceed an agent or tool output budget. Filter the JSON stream before it is emitted, using broad literal terms derived from the whole requested workflow:
60
+
61
+ ```bash
62
+ WORKFLOW_TERMS='["requested action", "output field", "named site"]'
63
+ webcmd list -f json | jq --argjson terms "$WORKFLOW_TERMS" '
64
+ [.[] | select(
65
+ ([.site, .name, .description, ((.columns // []) | join(" "))]
66
+ | map(. // "") | join(" ") | ascii_downcase) as $text
67
+ | any($terms[]; . as $term | $text | contains($term | ascii_downcase))
68
+ )]
69
+ '
70
+ ```
71
+
72
+ Replace `WORKFLOW_TERMS` with terms from the current request: the requested action, entity, output fields, and any explicitly named site. Literal matching avoids regex errors from terms such as `C++` or `[foo]`. Do not maintain a site or category allowlist. Match across `site`, `name`, `description`, and `columns`. If any layer reports truncated output, the inspection is incomplete. Narrow the filter and inspect again. Never treat absence from truncated output as proof that an adapter or plugin is missing, and do not proceed to the next fallback stage from that evidence.
73
+
60
74
  Use this fallback order:
61
75
 
62
- 1. Run `webcmd list -f json` once.
63
- 2. Check that result against the whole requested workflow, not only a named site. If one installed command covers it, use that command and stop discovery.
64
- 3. If none covers it, derive a short plugin query from the missing site or capability and run `webcmd plugin search <query> -f json`. Preserve the user's term when practical: `find flights` becomes `flight`.
65
- 4. If plugin search returns a match, offer `webcmd plugin install <installSource>`. If it returns no match and no error, raw `webcmd browser` is allowed. If it errors, report plugin discovery as unavailable and stop. If `fetch failed` appears in `errors[].message`, report plugin discovery as unavailable due to network/reachability and ask the user whether to rerun with network/escalated permissions. Do not retry unless they approve.
76
+ 1. Run `webcmd list -f json` through a workflow-derived filter before returning its output to the agent.
77
+ 2. Check the complete, non-truncated filtered result against the whole requested workflow. If one installed command covers it, use that command and stop discovery. If candidates do not cover the missing capability, refine the capability filter until its complete result is exactly `[]`.
78
+ 3. Only after that complete filtered result is `[]`, derive a short plugin query from the missing site or capability and run `webcmd plugin search <query> -f json`. Preserve the user's term when practical: `find flights` becomes `flight`.
79
+ 4. If the complete, non-truncated plugin search returns a match, offer `webcmd plugin install <installSource>`. Only if that complete result returns no match and no error is raw `webcmd browser` allowed. Both plugin search and raw browser fallback require the prior complete filtered registry result to be `[]`. A truncated plugin result is incomplete evidence: refine the query or output before fallback. If plugin search errors, report plugin discovery as unavailable and stop. If `fetch failed` appears in `errors[].message`, report plugin discovery as unavailable due to network/reachability and ask the user whether to rerun with network/escalated permissions. Do not retry unless they approve.
66
80
 
67
81
  ## Universal Flags
68
82
 
@@ -104,6 +118,14 @@ webcmd <site> <command> [args...] --trace retain-on-failure
104
118
 
105
119
  The error envelope includes a `trace` block pointing at `summary.md`. Patch only `adapterSourcePath` from that summary and retry. Maximum 3 repair rounds. See `webcmd-autofix`.
106
120
 
121
+ ## Authentication and Human Handoff
122
+
123
+ If a failure returns `handoff.status === action_required`, stop before AutoFix. Give the user `handoff.action` and any `Webcmd browser:` or `handoff.viewUrl` link, then wait. After the user reports done, run `handoff.verifyCommand` when present; verification must succeed before retrying.
124
+
125
+ `AUTH_REQUIRED` is not an adapter failure. Run `webcmd <site> login`: `already_logged_in` is verified; `in_progress` means no current user action, so do not ask the user or wait for confirmation, and do not poll; `action_required` is a hard stop. For `action_required`, give the user its instructions and any returned `action_url` or `view_url`, then wait. If Webcmd returned no URL, use the current visible browser.
126
+
127
+ Run the returned `verify_command` (normally `webcmd <site> whoami`) or `handoff.verifyCommand` only after the user reports done; verification must succeed before retrying. Without a verifier, take fresh browser state and verify the intended post-action state before any retry, especially for write commands. Use `webcmd auth refresh` only when an explicit auth-state refresh is needed. Their report alone is not verification. Never request, type, echo, store, or automate passwords, OTPs, recovery codes, cookies, session secrets, or CAPTCHA answers; CAPTCHA stops automation and follows the same verification rule.
128
+
107
129
  ## Report A Webcmd Defect
108
130
 
109
131
  After a reproducible Webcmd failure has been diagnosed or the `webcmd-autofix`
@@ -194,6 +216,7 @@ Do not invoke these removed commands:
194
216
 
195
217
  ## Do Not
196
218
 
197
- - Do not paste static command lists into plans; call `webcmd list -f json`.
219
+ - Do not paste static command lists into plans; query `webcmd list -f json` through a workflow-derived filter.
220
+ - Do not emit a large unfiltered registry into a bounded output or infer absence from a truncation warning; filter at the source and narrow until the result is complete.
198
221
  - Do not assume every adapter needs a browser; check `strategy`.
199
222
  - Do not silently fall back from a failing adapter to hand-rolled `fetch`; use `--trace retain-on-failure` first.
@@ -1,28 +0,0 @@
1
- import { cli, Strategy } from '@agentrhq/webcmd/registry';
2
- import { probeIdentity } from './utils.js';
3
-
4
- cli({
5
- site: 'practo',
6
- name: 'whoami',
7
- aliases: ['auth-status'],
8
- access: 'read',
9
- description: 'Show whether the current browser session is logged into Practo',
10
- domain: 'www.practo.com',
11
- strategy: Strategy.COOKIE,
12
- browser: true,
13
- navigateBefore: false,
14
- siteSession: 'persistent',
15
- args: [],
16
- columns: ['logged_in', 'site', 'name'],
17
- authStatus: {
18
- quickCheck: async (page) => {
19
- try {
20
- const rows = await probeIdentity(page);
21
- return { logged_in: true, name: rows[0].name };
22
- } catch {
23
- return { logged_in: false };
24
- }
25
- },
26
- },
27
- func: probeIdentity,
28
- });