@vforsh/argus 0.1.19 → 0.1.21
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/dist/.tsbuildinfo +1 -1
- package/dist/argus.js +642 -191
- package/dist/cli/register/extensionCommands.d.ts.map +1 -1
- package/dist/cli/register/extensionCommands.js +28 -3
- package/dist/cli/register/extensionCommands.js.map +1 -1
- package/dist/cli/register/keydownCommand.d.ts.map +1 -1
- package/dist/cli/register/keydownCommand.js +15 -2
- package/dist/cli/register/keydownCommand.js.map +1 -1
- package/dist/cli/register/netCommands.d.ts +5 -0
- package/dist/cli/register/netCommands.d.ts.map +1 -1
- package/dist/cli/register/netCommands.js +23 -6
- package/dist/cli/register/netCommands.js.map +1 -1
- package/dist/commands/domKeydown.d.ts +8 -1
- package/dist/commands/domKeydown.d.ts.map +1 -1
- package/dist/commands/domKeydown.js +35 -6
- package/dist/commands/domKeydown.js.map +1 -1
- package/dist/commands/extension/extensionId.d.ts +27 -0
- package/dist/commands/extension/extensionId.d.ts.map +1 -0
- package/dist/commands/extension/extensionId.js +37 -0
- package/dist/commands/extension/extensionId.js.map +1 -0
- package/dist/commands/extension/extensionPath.d.ts +15 -0
- package/dist/commands/extension/extensionPath.d.ts.map +1 -0
- package/dist/commands/extension/extensionPath.js +61 -0
- package/dist/commands/extension/extensionPath.js.map +1 -0
- package/dist/commands/extension/install.d.ts +16 -0
- package/dist/commands/extension/install.d.ts.map +1 -0
- package/dist/commands/extension/install.js +154 -0
- package/dist/commands/extension/install.js.map +1 -0
- package/dist/commands/extension/setup.d.ts +2 -1
- package/dist/commands/extension/setup.d.ts.map +1 -1
- package/dist/commands/extension/setup.js +5 -2
- package/dist/commands/extension/setup.js.map +1 -1
- package/dist/commands/netMock.d.ts +2 -0
- package/dist/commands/netMock.d.ts.map +1 -1
- package/dist/commands/netMock.js +22 -1
- package/dist/commands/netMock.js.map +1 -1
- package/dist/extension/dist/background/auth-header-monitor.js +77 -0
- package/dist/extension/dist/background/bridge-client.js +120 -0
- package/dist/extension/dist/background/cdp-proxy.js +201 -0
- package/dist/extension/dist/background/debugger-manager.js +296 -0
- package/dist/extension/dist/background/service-worker.js +2004 -0
- package/dist/extension/dist/background/service-worker.js.map +7 -0
- package/dist/extension/dist/popup/popup.js +730 -0
- package/dist/extension/dist/popup/popup.js.map +7 -0
- package/dist/extension/dist/popup/tabMarkup.js +104 -0
- package/dist/extension/dist/popup/viewState.js +60 -0
- package/dist/extension/dist/types/messages.js +5 -0
- package/dist/extension/icons/icon-128.png +0 -0
- package/dist/extension/icons/icon-16.png +0 -0
- package/dist/extension/icons/icon-48.png +0 -0
- package/dist/extension/manifest.json +26 -0
- package/dist/extension/src/popup/popup.html +756 -0
- package/dist/skill/argus/SKILL.md +6 -1
- package/dist/skill/argus/reference/EXTENSION.md +13 -8
- package/dist/skill/argus/reference/INSPECT.md +3 -1
- package/dist/skill/argus/reference/NET.md +4 -1
- package/package.json +2 -2
|
@@ -47,6 +47,8 @@ Read:
|
|
|
47
47
|
|
|
48
48
|
Use this for any app that needs the user's normal browser profile, cookies, local storage, extensions, or saved login state. Do **not** use `argus start`, `argus chrome start --profile temp`, headless Chrome, or a fresh CDP profile for this flow; those lose the real login/session context.
|
|
49
49
|
|
|
50
|
+
First-time setup is one command: `argus extension install` (installs native hosts, opens chrome://extensions, waits for connect). The extension ID is pinned and the build ships with the CLI — see [EXTENSION.md](./reference/EXTENSION.md).
|
|
51
|
+
|
|
50
52
|
```bash
|
|
51
53
|
APP_URL="https://portal.example/app"
|
|
52
54
|
WATCHER_ID="app"
|
|
@@ -134,10 +136,13 @@ argus click app --ref e5
|
|
|
134
136
|
argus drag app --selector "canvas" --pos 320,240 --by 80,-30
|
|
135
137
|
argus fill app --selector "#email" "user@example.com"
|
|
136
138
|
argus keydown app --key Enter
|
|
139
|
+
argus keydown app --key G
|
|
140
|
+
argus keydown app --code KeyG --print-event
|
|
137
141
|
argus scroll-to app --selector "#footer"
|
|
138
142
|
```
|
|
139
143
|
|
|
140
144
|
For iframe-active extension watchers, commands run against the selected iframe target. Screenshots, recordings, selectors, and eval are resolved relative to that iframe.
|
|
145
|
+
Network mocks default to the top-level page; pass `--scope selected` (or `--frame selected`) to intercept requests from the selected iframe.
|
|
141
146
|
|
|
142
147
|
For deeper command lists, use [INSPECT.md](./reference/INSPECT.md). For screenshots/recording details, use [CAPTURE.md](./reference/CAPTURE.md). For eval flags, polling, file scripts, and args, use [EVAL.md](./reference/EVAL.md).
|
|
143
148
|
|
|
@@ -168,7 +173,7 @@ Keep these commands in the background in agent shells. See [START.md](./referenc
|
|
|
168
173
|
|
|
169
174
|
## Troubleshooting
|
|
170
175
|
|
|
171
|
-
**No extension-control watcher** —
|
|
176
|
+
**No extension-control watcher** — First time? Run `argus extension install`. Otherwise open/reload the extension, then run `argus ext doctor --json`.
|
|
172
177
|
|
|
173
178
|
**Multiple tabs matched** — Use `argus ext tabs --url <url> --json`, choose a `tabId`, then pass `--tab <tabId>`.
|
|
174
179
|
|
|
@@ -5,18 +5,23 @@ Debug normal Chrome session without CDP flags.
|
|
|
5
5
|
### One-Time Setup
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
#
|
|
9
|
-
|
|
8
|
+
# Installs native hosts, opens chrome://extensions, waits for the extension to connect:
|
|
9
|
+
argus extension install
|
|
10
|
+
# → click "Load unpacked" and select the printed folder (enable Developer mode if hidden)
|
|
11
|
+
```
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
# chrome://extensions → Developer mode → Load unpacked → select packages/argus-extension
|
|
13
|
-
# Copy Extension ID (e.g. kkoefnlnjlnlbohcifcbkpgmjaokmipi)
|
|
13
|
+
The extension ID is **pinned** (via a `key` in the manifest), so there's no ID to copy/paste and the prebuilt extension ships with the CLI — no build step. Useful sub-commands:
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
argus extension
|
|
17
|
-
argus extension status
|
|
15
|
+
```bash
|
|
16
|
+
argus extension path # absolute folder to "Load unpacked"
|
|
17
|
+
argus extension status # native host config + extension ID
|
|
18
|
+
argus extension install --no-wait # scripted/non-interactive (skip the connect wait)
|
|
18
19
|
```
|
|
19
20
|
|
|
21
|
+
Advanced: `argus extension setup [extensionId]` installs only the native hosts (pass an id to override the pinned one for a differently-keyed build).
|
|
22
|
+
|
|
23
|
+
> Migration: if you previously loaded an unkeyed build, reload the extension once at `chrome://extensions` so it picks up the pinned ID.
|
|
24
|
+
|
|
20
25
|
### Usage
|
|
21
26
|
|
|
22
27
|
1. Click Argus extension icon
|
|
@@ -74,8 +74,10 @@ argus fill app --selector "#username" "Bob"
|
|
|
74
74
|
argus fill app --selector "#desc" --value-file ./description.txt
|
|
75
75
|
echo "hello" | argus fill app --selector "#input" --value-stdin
|
|
76
76
|
argus keydown app --key Enter
|
|
77
|
+
argus keydown app --key G
|
|
78
|
+
argus keydown app --code KeyG --print-event
|
|
77
79
|
argus keydown app --key a --selector "#input"
|
|
78
|
-
argus keydown app --key a --
|
|
80
|
+
argus keydown app --key a --shift --ctrl
|
|
79
81
|
argus scroll-to app --selector "#footer"
|
|
80
82
|
argus scroll-to app --to 0,1000
|
|
81
83
|
argus scroll-to app --selector ".panel" --by 0,500
|
|
@@ -87,6 +87,7 @@ argus net mock add app --url "*/analytics/*" --block
|
|
|
87
87
|
argus net mock add app --url "*/api/save" --fail ConnectionRefused
|
|
88
88
|
argus net mock add app --url "*/api/init" --fail TimedOut --times 1
|
|
89
89
|
argus net mock add app --url "*/api/config" --status 200 --body-file ./fixtures/config.json
|
|
90
|
+
argus net mock add extension --scope selected --url "*/api/config" --status 200 --body-file ./fixtures/config.json
|
|
90
91
|
argus net mock add app --url "*/api/config" --status 500 --body '{"error":"maintenance"}'
|
|
91
92
|
echo '{"flags":{"newShop":true}}' | argus net mock add app --url "*/api/flags" --body -
|
|
92
93
|
argus net mock add app --url "*/api/*" --delay 2s --method POST
|
|
@@ -97,7 +98,9 @@ argus net mock rm 2 app
|
|
|
97
98
|
argus net mock clear app
|
|
98
99
|
```
|
|
99
100
|
|
|
100
|
-
Rules persist across reloads and reattach until removed. First matching rule wins. `--url` is a case-insensitive wildcard pattern over the full request URL; `*` matches anything, and no `*` means substring match. Use `--times N`
|
|
101
|
+
Rules persist across reloads and reattach until removed. First matching rule wins. `--url` is a case-insensitive wildcard pattern over the full request URL; `*` matches anything, and no `*` means substring match. Use `--times N` to limit any rule, including stubbed responses.
|
|
102
|
+
|
|
103
|
+
Mock scope defaults to `page`, preserving the original top-level behavior. Use `--scope selected` or its `--frame selected` alias for the currently selected iframe; selected rules follow target changes and re-arm after reload/reattach. `--scope` and `--frame` are mutually exclusive.
|
|
101
104
|
|
|
102
105
|
Exactly one primary action per rule:
|
|
103
106
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vforsh/argus",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.21",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/vforsh/argus.git",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"scripts": {
|
|
37
37
|
"clean": "node ../../scripts/clean-dist.mjs",
|
|
38
38
|
"build": "npm run clean && tsc -b && bun run bundle",
|
|
39
|
-
"bundle": "bun build dist/bin.js --outfile dist/argus.js --target node --external esbuild && node ../../scripts/copy-argus-skill.mjs",
|
|
39
|
+
"bundle": "bun build dist/bin.js --outfile dist/argus.js --target node --external esbuild && node ../../scripts/copy-argus-skill.mjs && node ../../scripts/copy-argus-extension.mjs",
|
|
40
40
|
"typecheck": "tsc -b --pretty false",
|
|
41
41
|
"chrome:start": "bun src/bin.ts chrome start"
|
|
42
42
|
}
|