@agentrhq/webcmd 0.2.5 → 0.3.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 (48) hide show
  1. package/clis/_shared/site-auth.js +3 -3
  2. package/clis/_shared/site-auth.test.js +4 -4
  3. package/clis/slock/whoami.test.js +2 -2
  4. package/dist/src/browser/daemon-client.d.ts +2 -1
  5. package/dist/src/browser/runtime/local-cloak/actions.js +4 -1
  6. package/dist/src/browser/runtime/local-cloak/provider.test.js +36 -0
  7. package/dist/src/browser/runtime/local-cloak/session-manager.d.ts +3 -2
  8. package/dist/src/browser/runtime/local-cloak/session-manager.js +4 -2
  9. package/dist/src/cli.js +5 -4
  10. package/dist/src/cli.test.js +11 -5
  11. package/dist/src/commands/auth.js +3 -2
  12. package/dist/src/commands/auth.test.js +6 -6
  13. package/dist/src/generate-release-notes-cli.test.js +5 -0
  14. package/dist/src/hosted/args.d.ts +9 -0
  15. package/dist/src/hosted/args.js +101 -0
  16. package/dist/src/hosted/args.test.d.ts +1 -0
  17. package/dist/src/hosted/args.test.js +35 -0
  18. package/dist/src/hosted/client.d.ts +30 -0
  19. package/dist/src/hosted/client.js +122 -0
  20. package/dist/src/hosted/client.test.d.ts +1 -0
  21. package/dist/src/hosted/client.test.js +119 -0
  22. package/dist/src/hosted/config.d.ts +50 -0
  23. package/dist/src/hosted/config.js +90 -0
  24. package/dist/src/hosted/config.test.d.ts +1 -0
  25. package/dist/src/hosted/config.test.js +48 -0
  26. package/dist/src/hosted/manifest.d.ts +9 -0
  27. package/dist/src/hosted/manifest.js +92 -0
  28. package/dist/src/hosted/manifest.test.d.ts +1 -0
  29. package/dist/src/hosted/manifest.test.js +46 -0
  30. package/dist/src/hosted/runner.d.ts +12 -0
  31. package/dist/src/hosted/runner.js +404 -0
  32. package/dist/src/hosted/runner.test.d.ts +1 -0
  33. package/dist/src/hosted/runner.test.js +189 -0
  34. package/dist/src/hosted/setup.d.ts +9 -0
  35. package/dist/src/hosted/setup.js +49 -0
  36. package/dist/src/hosted/setup.test.d.ts +1 -0
  37. package/dist/src/hosted/setup.test.js +68 -0
  38. package/dist/src/hosted/types.d.ts +97 -0
  39. package/dist/src/hosted/types.js +1 -0
  40. package/dist/src/main.js +14 -0
  41. package/dist/src/release-notes.d.ts +6 -1
  42. package/dist/src/release-notes.js +184 -4
  43. package/dist/src/release-notes.test.js +128 -1
  44. package/package.json +1 -1
  45. package/scripts/generate-release-notes.ts +1 -1
  46. package/skills/smart-search/SKILL.md +14 -3
  47. package/skills/webcmd-usage/SKILL.md +14 -7
  48. package/clis/antigravity/SKILL.md +0 -38
@@ -11,9 +11,19 @@ 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 yaml`
14
+ - Run `webcmd list -f json`
15
15
  - Use the live registry to confirm that candidate sites exist, and inspect `strategy`, `browser`, and `domain`
16
16
 
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:
18
+
19
+ ```bash
20
+ webcmd plugin search <site-or-source-or-capability> -f json
21
+ ```
22
+
23
+ Derive a short plugin query from the missing site or capability. Preserve the user's term when practical: `find flights` becomes `flight`.
24
+
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.
26
+
17
27
  After choosing a site, do both of these steps:
18
28
 
19
29
  - Run `webcmd <site> -h` to see the site's subcommands
@@ -42,7 +52,7 @@ First create a site-call ledger. After each real search command, update it immed
42
52
 
43
53
  Counting rules:
44
54
 
45
- - `webcmd list -f yaml`, `webcmd <site> -h`, and `webcmd <site> <command> -h` are preflight/help commands and do not count as searches.
55
+ - `webcmd list -f json`, `webcmd plugin search <query> -f json`, `webcmd <site> -h`, and `webcmd <site> <command> -h` are preflight/help commands and do not count as searches.
46
56
  - One real `webcmd <site> ...` search/query execution counts as 1 call for that site.
47
57
  - A failed call caused by an error, timeout, CAPTCHA, anti-bot check, or broken login state still counts as 1 call for that site. Do not retry indefinitely.
48
58
 
@@ -134,9 +144,10 @@ Keep a typical query to 1 AI source plus 1-2 specialized sources to avoid result
134
144
  When a site is unavailable:
135
145
 
136
146
  - 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
137
148
  - Record: `Skipped: <site> unavailable`
138
149
  - Fall back to another site of the same type, or to one AI source
139
- - Always trust the actual output of `webcmd list -f yaml` and `webcmd <site> -h`
150
+ - Always trust the actual output of `webcmd list -f json`, `webcmd plugin search -f json`, and `webcmd <site> -h`
140
151
 
141
152
  Do not assume any site is always available. Even for public sites, trust live help and execution results in the current environment.
142
153
 
@@ -44,21 +44,25 @@ npx tsx src/main.ts <command>
44
44
 
45
45
  Electron desktop app adapters route through CDP against the running app. Make sure the app is open before invoking those commands.
46
46
 
47
- ## Discover Installed Commands
47
+ ## Discover Commands
48
48
 
49
49
  Run commands instead of reading static docs:
50
50
 
51
51
  ```bash
52
- webcmd list
52
+ webcmd
53
53
  webcmd list -f json
54
- webcmd list | grep -i github
55
54
  webcmd <site> --help
56
55
  webcmd <site> <command> --help
57
56
  ```
58
57
 
59
- Do not hard-code adapter lists. `webcmd list -f json` is the source of truth and emits one entry per command with fields such as `{site, name, aliases, description, strategy, browser, args, columns}`.
58
+ 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}`.
60
59
 
61
- Before falling back to raw `webcmd browser` on high-change authenticated sites, check whether a site adapter already exposes the workflow.
60
+ Use this fallback order:
61
+
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.
62
66
 
63
67
  ## Universal Flags
64
68
 
@@ -129,10 +133,13 @@ webcmd plugin list [-f json]
129
133
  webcmd plugin update [name] | --all
130
134
  webcmd plugin uninstall <name>
131
135
  webcmd plugin create <name>
132
- webcmd plugin search [query]
136
+ webcmd plugin search [query] -f json
137
+ webcmd plugin catalog list -f json
138
+ webcmd plugin catalog add <source>
139
+ webcmd plugin catalog remove <id>
133
140
  ```
134
141
 
135
- Plugins are installable extensions pulled from git or local paths. Main-repo community CLIs are exposed through the root plugin catalog manifest, not bundled into npm's `clis/` set.
142
+ Plugins are installable extensions pulled from git or local paths. Use `plugin search` for marketplace discovery and `plugin list` for already-installed plugins. Main-repo community CLIs are exposed through the root plugin catalog manifest, not bundled into npm's `clis/` set.
136
143
 
137
144
  > **Note:** The repository's `plugins/` directory is not shipped in the npm package. Find the required plugin with `webcmd plugin search`, then install its `installSource` with `webcmd plugin install <installSource>`.
138
145
 
@@ -1,38 +0,0 @@
1
- ---
2
- description: How to automate Antigravity using Webcmd
3
- ---
4
-
5
- # Antigravity Automation Skill
6
-
7
- This skill allows AI agents to control the [Antigravity](https://github.com/chengazhen/Antigravity) desktop app (and any Electron app with CDP enabled) programmatically via Webcmd.
8
-
9
- ## Requirements
10
- webcmd automatically detects, launches (with `--remote-debugging-port=9234`), and connects to Antigravity.
11
- If Antigravity is already running without CDP, webcmd will prompt to restart it.
12
-
13
- If the endpoint exposes multiple inspectable targets, set:
14
- \`\`\`bash
15
- export WEBCMD_CDP_TARGET="antigravity"
16
- \`\`\`
17
-
18
- ## High-Level Capabilities
19
- 1. **Send Messages (`webcmd antigravity send <message>`)**: Type and send a message directly into the chat UI.
20
- 2. **Read History (`webcmd antigravity read`)**: Scrape the raw chat transcript from the main UI container.
21
- 3. **Extract Code (`webcmd antigravity extract-code`)**: Automatically isolate and extract source code text blocks from the AI's recent answers.
22
- 4. **Switch Models (`webcmd antigravity model <name>`)**: Instantly toggle the active LLM (e.g., \`gemini\`, \`claude\`).
23
- 5. **Clear Context (`webcmd antigravity new`)**: Start a fresh conversation.
24
-
25
- ## Examples for Automated Workflows
26
-
27
- ### Generating and Saving Code
28
- \`\`\`bash
29
- webcmd antigravity send "Write a python script to fetch HN top stories"
30
- # wait ~10-15 seconds for output to render
31
- webcmd antigravity extract-code > hn_fetcher.py
32
- \`\`\`
33
-
34
- ### Reading Real-time Logs
35
- Agents can run long-running streaming watch instances:
36
- \`\`\`bash
37
- webcmd antigravity watch
38
- \`\`\`