@blackbelt-technology/pi-dashboard-extension 0.8.0 → 0.10.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 (111) hide show
  1. package/.pi/skills/browser/SKILL.md +74 -28
  2. package/.pi/skills/browser/UPSTREAM.md +6 -3
  3. package/.pi/skills/browser/references/challenge.md +183 -0
  4. package/.pi/skills/browser/references/dashboard-relay.md +351 -0
  5. package/.pi/skills/browser/references/own-browser.agent.md +73 -0
  6. package/.pi/skills/browser/references/own-browser.md +7 -1
  7. package/.pi/skills/doctor/SKILL.md +1 -0
  8. package/.pi/skills/doctor/_lib/checks.ts +133 -0
  9. package/.pi/skills/doctor/_lib/derive-tokens.ts +4 -0
  10. package/.pi/skills/doctor/modules/apple-tools.md +2 -1
  11. package/.pi/skills/doctor/modules/mcp-builtin.knowledge.hash +1 -0
  12. package/.pi/skills/doctor/modules/mcp-builtin.md +61 -0
  13. package/.pi/skills/doctor/modules/pi-resolution.knowledge.hash +1 -1
  14. package/.pi/skills/doctor/modules/plugins-bridges.md +14 -1
  15. package/.pi/skills/pi-dashboard/SKILL.md +10 -3
  16. package/.pi/skills/pi-dashboard/references/api-reference.md +56 -0
  17. package/.pi/skills/pi-dashboard/scripts/dashboard-bus.ts +4 -4
  18. package/.pi/skills/project-init/SKILL.agent.md +70 -0
  19. package/.pi/skills/project-init/SKILL.md +175 -50
  20. package/.pi/skills/project-init/profiles/coding/AGENTS.md.tmpl +0 -23
  21. package/package.json +19 -16
  22. package/src/ask-user-tool.ts +69 -3
  23. package/src/auto-session-namer.ts +190 -50
  24. package/src/bridge-activation.ts +26 -0
  25. package/src/bridge-context.ts +21 -19
  26. package/src/bridge-default-model-gate.ts +38 -0
  27. package/src/bridge-handlers/dispatch.ts +450 -0
  28. package/src/bridge-handlers/forwarders.ts +616 -0
  29. package/src/bridge-handlers/instance.ts +220 -0
  30. package/src/bridge-handlers/lifecycle.ts +1030 -0
  31. package/src/bridge-handlers/ui-prompt-patch.ts +198 -0
  32. package/src/bridge-identity-log.ts +45 -0
  33. package/src/bridge-polling.ts +148 -0
  34. package/src/bridge.ts +968 -2292
  35. package/src/canvas-tool.ts +5 -0
  36. package/src/command-handler.ts +257 -42
  37. package/src/connection.ts +737 -25
  38. package/src/custom-entry-forward.ts +92 -0
  39. package/src/dashboard-context-injector.ts +26 -47
  40. package/src/empty-actionable-guard.ts +8 -3
  41. package/src/endpoint-resolution.ts +32 -0
  42. package/src/event-forwarder.ts +42 -0
  43. package/src/extension-identity.ts +59 -0
  44. package/src/flow-event-wiring.ts +1 -1
  45. package/src/followup-buffer.ts +1 -1
  46. package/src/followup-drain.ts +79 -0
  47. package/src/git-dir-watcher.ts +79 -0
  48. package/src/git-poll.ts +45 -12
  49. package/src/git-probe-scheduler.ts +119 -0
  50. package/src/git-tracker.ts +284 -0
  51. package/src/instance-verification.ts +31 -0
  52. package/src/local-token-header.ts +161 -17
  53. package/src/mcp-token-delivery.ts +147 -0
  54. package/src/message-update-coalescer.ts +342 -0
  55. package/src/model-refresh.ts +19 -0
  56. package/src/model-tracker.ts +118 -35
  57. package/src/multiselect-list.ts +6 -2
  58. package/src/multiselect-polyfill.ts +2 -2
  59. package/src/notify-proxy.ts +3 -0
  60. package/src/openspec-cli-shim.ts +1 -1
  61. package/src/path-gate/decide.ts +123 -0
  62. package/src/path-gate/grant-cache.ts +73 -0
  63. package/src/path-gate/grant-link.ts +108 -0
  64. package/src/path-gate/handler.ts +356 -0
  65. package/src/path-gate/index.ts +166 -0
  66. package/src/path-gate/resolve.ts +8 -0
  67. package/src/path-gate/roots.ts +140 -0
  68. package/src/path-gate/suppression.ts +30 -0
  69. package/src/path-gate/yolo-link.ts +104 -0
  70. package/src/pending-prompt-emitter.ts +59 -0
  71. package/src/pi-env.d.ts +2 -10
  72. package/src/plugin-event-forward-registry.ts +200 -0
  73. package/src/plugin-request-client.ts +114 -0
  74. package/src/poll-cost.ts +40 -0
  75. package/src/pr-status.ts +338 -0
  76. package/src/process-metrics.ts +77 -1
  77. package/src/process-scan-scheduler.ts +137 -0
  78. package/src/process-scanner.ts +226 -247
  79. package/src/project-init/dox-kb-config.ts +3 -0
  80. package/src/project-init/scaffold.ts +1 -4
  81. package/src/project-init/seed-doctrine.ts +23 -60
  82. package/src/project-trust.ts +119 -25
  83. package/src/prompt-bus.ts +13 -0
  84. package/src/prompt-expander.ts +5 -1
  85. package/src/prompt-meta.ts +64 -0
  86. package/src/provider-register.ts +93 -20
  87. package/src/retry-tracker.ts +0 -7
  88. package/src/role-manager.ts +27 -99
  89. package/src/role-model-tools.ts +6 -0
  90. package/src/server-auto-start.ts +202 -26
  91. package/src/server-launcher.ts +74 -40
  92. package/src/session-move.ts +23 -4
  93. package/src/session-sync.ts +81 -52
  94. package/src/slash-dispatch.ts +66 -81
  95. package/src/spawn-token.ts +46 -0
  96. package/src/stream-forward-buffer.ts +161 -0
  97. package/src/subagent-fanout-admission.ts +234 -0
  98. package/src/subagent-frame-buffer.ts +6 -2
  99. package/src/subagent-saturation.ts +196 -0
  100. package/src/subagent-tick-throttle.ts +3 -1
  101. package/src/terminal-reload.ts +298 -0
  102. package/src/tui-prompt-adapter.ts +13 -1
  103. package/src/usage-drain.ts +167 -0
  104. package/src/vault-delivery.ts +394 -0
  105. package/src/vault-forwarder.ts +128 -0
  106. package/src/vault-masker.ts +165 -0
  107. package/src/vault-redaction.ts +181 -0
  108. package/src/vcs-info.ts +264 -63
  109. package/.pi/skills/project-init/dox-doctrine.md +0 -146
  110. package/src/agent-settled.ts +0 -90
  111. package/src/transcript-request-guard.ts +0 -76
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: browser
3
- description: 'Browser automation via the `agent-browser` CLI. Use when the user needs to drive websites or Electron desktop apps — navigating, filling forms, clicking, screenshots, extracting data, testing web apps, visual UI checks, the Pi Dashboard''s Electron shell, or the user''s own logged-in browser (SSO/2FA sites). Triggers: "open a website", "take a screenshot", "test this web app", "use my own browser".'
3
+ description: 'Browser automation via the `agent-browser` CLI. Use when the user needs to drive websites or Electron apps — navigating, forms, clicks, screenshots, data extraction, testing web apps, UI checks, the dashboard Electron shell, or the user''s own logged-in Chrome via the browser relay or Panerelay (SSO/2FA). Triggers: "open a website", "take a screenshot", "test this web app", "use my own browser".'
4
4
  license: Apache-2.0
5
- allowed-tools: Bash(agent-browser:*), Bash(npx agent-browser:*), Bash(npx @panerelay/setup:*)
5
+ allowed-tools: Bash(agent-browser:*), Bash(npx agent-browser:*), Bash(npx @panerelay/setup:*), Bash(curl:*)
6
6
  metadata:
7
7
  author: pi-dashboard
8
- version: "1.1"
8
+ version: "1.2"
9
9
  vendoredFrom: agent-browser
10
10
  vendoredVersion: "0.27.0"
11
11
  verifiedAgainstCli: "0.33.2"
@@ -25,28 +25,46 @@ Three recipes:
25
25
  a worked example for the Pi Dashboard's own shell via `--debug-cdp`.
26
26
  Reference: [`references/electron.md`](references/electron.md).
27
27
  - **The user's own logged-in browser** — reach SSO/2FA-gated sites using the
28
- user's real cookies via an extension bridge (Panerelay), plus how to list
29
- and select Chrome profiles.
30
- Reference: [`references/own-browser.md`](references/own-browser.md).
28
+ user's real cookies. Two paths:
29
+ - **Pi Dashboard browser** (preferred when the pi session runs on the
30
+ dashboard host) — `browser_connect` hands back a loopback CDP URL for the
31
+ dedicated profile or a Chrome profile (Playwright Chrome Extension). Reference:
32
+ [`references/dashboard-relay.md`](references/dashboard-relay.md).
33
+ - **Panerelay extension bridge** (legacy) — a native-messaging host for when
34
+ there is no loopback dashboard. Reference:
35
+ [`references/own-browser.md`](references/own-browser.md).
31
36
 
32
37
  ## Step 0a — Preflight: `agent-browser` CLI must be installed
33
38
 
34
- The skill does **not** bundle the CLI. Before doing anything else, verify it:
39
+ The skill does **not** bundle the CLI. Verify it through the dashboard tool
40
+ registry — recommend-only, nothing installs without an explicit `--install`:
35
41
 
36
42
  ```bash
37
- command -v agent-browser
43
+ pi-dashboard-ensure <extension-package-root>/package.json
38
44
  ```
39
45
 
40
- If the command is **not** found, halt and tell the user:
41
-
42
- > The `agent-browser` CLI is not installed. Install it as a pi extension so
43
- > the `browser` tool is registered in your pi session too:
44
- >
45
- > ```
46
- > pi install npm:pi-agent-browser
47
- > ```
48
- >
49
- > Then re-invoke the skill.
46
+ `<extension-package-root>` is the package that ships this skill — three levels
47
+ above this SKILL.md's `.pi/skills/browser/` directory (in a global install:
48
+ `$(npm root -g)/@blackbelt-technology/pi-dashboard/node_modules/@blackbelt-technology/pi-dashboard-extension`).
49
+ The manifest (`pi.tools`) declares `agent-browser` (resolve) and `chromium`
50
+ (pw-browser); the registry answers `present` / `recommended` / `blocked` per
51
+ tool.
52
+
53
+ - `agent-browser: present` → continue to Step 0b.
54
+ - `agent-browser: recommended` or `blocked` → halt and tell the user:
55
+
56
+ > The `agent-browser` CLI is not installed. Install it as a pi extension so
57
+ > the `browser` tool is registered in your pi session too:
58
+ >
59
+ > ```
60
+ > pi install npm:pi-agent-browser
61
+ > ```
62
+ >
63
+ > Then re-invoke the skill.
64
+
65
+ - `chromium` missing → mention the registry's Install hint
66
+ (`npx playwright@1.62.1 install chromium`) only when the chosen recipe needs a
67
+ CDP browser; the dropdown on the Settings → Tools row carries it.
50
68
 
51
69
  Do **not** attempt `npm install`, `pi install`, or any other install command
52
70
  on the user's behalf — they should make that choice explicitly.
@@ -62,7 +80,9 @@ else
62
80
  CDP_LIVE=$(nc -z 127.0.0.1 9222 2>/dev/null && echo yes || echo no)
63
81
  fi
64
82
  PD_RUNNING=$(pgrep -f "Pi Dashboard|pi-dashboard" >/dev/null 2>&1 && echo yes || echo no)
65
- echo "CDP_LIVE=$CDP_LIVE PD_RUNNING=$PD_RUNNING"
83
+ # Browser relay: the dashboard's own capability probe (see dashboard-relay.md).
84
+ RELAY=$(curl -fsS http://localhost:8000/api/browser/status 2>/dev/null || echo unavailable)
85
+ echo "CDP_LIVE=$CDP_LIVE PD_RUNNING=$PD_RUNNING RELAY=$RELAY"
66
86
  ```
67
87
 
68
88
  Routing rule:
@@ -84,16 +104,37 @@ launching any Electron app with `--remote-debugging-port`.
84
104
 
85
105
  **Override (login state)**: if the target needs the user's *existing*
86
106
  session — "use my browser", "I'm already logged in", SSO/2FA, an internal
87
- tool the agent cannot sign into — route to `references/own-browser.md`
88
- regardless of the probe. The default bundled browser starts logged out and
89
- cannot be made to inherit those logins; `--profile` copies the profile and
90
- still loses macOS Keychain-encrypted cookies. Prefer the bundled browser
91
- whenever login state is irrelevant — it is faster and more capable.
107
+ tool the agent cannot sign into — route to a login-state recipe regardless of
108
+ the probe. Pick by capability, in this order:
109
+
110
+ 1. **`references/dashboard-relay.md`** when the pi session runs on the
111
+ dashboard host and the dashboard browser is available. This is the preferred
112
+ path; it needs no extra install. Call `browser_connect {}` first (it picks
113
+ the dedicated profile by default); without that tool, use the recipe's REST
114
+ fallback — the probe's `RELAY` must be a JSON object with `"enabled":true`
115
+ and either `dedicated.available` or `"canOpenChrome":true`. A `headless`
116
+ result from `browser_connect` for a login task is a stop, not a fallback.
117
+ 2. **`references/own-browser.md`** (legacy Panerelay bridge) only when the
118
+ dashboard browser is unavailable (`RELAY=unavailable`, `enabled:false`) or
119
+ the session is remote. `browser_connect` never routes to Panerelay; this
120
+ step is yours.
121
+
122
+ The default bundled browser starts logged out and cannot be made to inherit
123
+ those logins; `--profile` copies the profile and still loses macOS
124
+ Keychain-encrypted cookies. Prefer the bundled browser whenever login state is
125
+ irrelevant — it is faster and more capable. **Never** fall back to it for a
126
+ login-state task.
92
127
 
93
128
  ## Step 1 — Read the matched recipe and execute
94
129
 
95
- Read the reference file selected above, then follow its workflow. Both
96
- references are self-contained; you do not need to read both.
130
+ Read the reference file selected above, then follow its workflow. All
131
+ references are self-contained; you do not need to read more than one.
132
+
133
+ **Challenge encountered**: if at any point the page is an interactive
134
+ anti-bot challenge (Cloudflare Turnstile, hCaptcha, reCAPTCHA, "Checking
135
+ your browser…") that withholds the content you asked for, stop and follow
136
+ [`references/challenge.md`](references/challenge.md). Do not retry, do not
137
+ switch `--session`, `--profile`, or provider, and do not run `close --all`.
97
138
 
98
139
  ## Notes
99
140
 
@@ -101,8 +142,13 @@ references are self-contained; you do not need to read both.
101
142
  snapshots of upstream `agent-browser` skill content (`core` and
102
143
  `electron`) at CLI version 0.27.0. See [`UPSTREAM.md`](UPSTREAM.md) for
103
144
  refresh procedure and [`LICENSE`](LICENSE) for upstream attribution.
104
- `references/own-browser.md` is **authored, not vendored** — an upstream
105
- refresh must not overwrite it.
145
+ `references/own-browser.md`, `references/dashboard-relay.md`, and
146
+ `references/challenge.md` are **authored, not vendored** — an upstream
147
+ refresh must not overwrite them.
148
+ - **Login-state recipes**: `references/dashboard-relay.md` is the preferred
149
+ path (Pi Dashboard browser relay); `references/own-browser.md` is the legacy
150
+ Panerelay/native-messaging path for remote sessions with no loopback
151
+ dashboard.
106
152
  - **Surfaces share one browser**: the `browser` MCP tool and
107
153
  `Bash: agent-browser …` drive the *same* daemon and *same* Chrome, with a
108
154
  shared active page. Probing with one mid-task can silently move the page
@@ -7,8 +7,10 @@ section in `electron.md` are project-specific and not from upstream.
7
7
 
8
8
  **Not vendored — do not overwrite on refresh:**
9
9
  `references/own-browser.md` and `scripts/check-panerelay.sh` are authored
10
- for this repo (the Panerelay / own-logged-in-browser recipe). They have no
11
- upstream counterpart.
10
+ for this repo (the Panerelay / own-logged-in-browser recipe).
11
+ `references/challenge.md` is authored for this repo too — the pause / resume
12
+ discipline for interactive anti-bot challenges. None of them has an upstream
13
+ counterpart.
12
14
 
13
15
  | Field | Value |
14
16
  |------------------------|--------------------------------------------------------------------|
@@ -43,7 +45,8 @@ diff <(awk 'BEGIN{n=0} /^---$/{n++; next} n>=2{print}' /tmp/electron.md) referen
43
45
  # Preserve the Pi Dashboard addenda (after the first `---` separator
44
46
  # in web.md, and the "Worked example: Pi Dashboard" section in
45
47
  # electron.md). Update the LICENSE file if the upstream license text
46
- # has changed. Leave own-browser.md and check-panerelay.sh untouched.
48
+ # has changed. Leave own-browser.md, challenge.md and
49
+ # check-panerelay.sh untouched.
47
50
 
48
51
  # 5. Re-verify the authored recipe against the new CLI, then bump
49
52
  # `verifiedAgainstCli` in SKILL.md frontmatter:
@@ -0,0 +1,183 @@
1
+ # Interactive challenges — pause, hand off, resume
2
+
3
+ Authored for this repo, not vendored from upstream (see
4
+ [`UPSTREAM.md`](../UPSTREAM.md)).
5
+
6
+ An interactive anti-bot challenge is a **stop sign, not an obstacle to
7
+ route around**. The site is asking for a human. Your job is to hand it to
8
+ the user and continue on the *same* browser afterwards.
9
+
10
+ **This file takes precedence over every recipe's troubleshooting advice.**
11
+ `own-browser.md`'s "re-run under a fresh `--session`" row and `web.md`'s
12
+ `close --all` cleanup both address other problems and are *wrong* here —
13
+ both throw away the exact session state the site is about to trust.
14
+
15
+ ## What counts as a challenge
16
+
17
+ The test is the **withheld content**: the page asks a human to prove they
18
+ are one *before* showing you what you asked for. Signature alone is not
19
+ enough — text such as "Verify you are human" on a documentation page,
20
+ forum post, or search result that is *still serving its content* is **not**
21
+ a challenge. Keep working.
22
+
23
+ A short, non-exhaustive list of signatures:
24
+
25
+ | Kind | Signature |
26
+ |---|---|
27
+ | Cloudflare Turnstile / browser check | iframe from `challenges.cloudflare.com`; text "Checking your browser" |
28
+ | hCaptcha | iframe from `hcaptcha.com` |
29
+ | reCAPTCHA | iframe from `google.com/recaptcha` |
30
+ | Generic interstitial | text "Verify you are human" |
31
+
32
+ Genuine churn happens upstream in these vendors' markup — treat the list as
33
+ a prompt for what to look for, not a detector.
34
+
35
+ **Check more than the snapshot.** A snapshot inlines iframe *content*, not
36
+ its host, so it can miss the vendor entirely. Use all of:
37
+
38
+ ```bash
39
+ agent-browser --session <name> get url
40
+ agent-browser --session <name> get title
41
+ agent-browser --session <name> eval '[...document.querySelectorAll("iframe")].map(f => f.src)'
42
+ ```
43
+
44
+ `read` and the snapshot text catch the interstitial phrasing; `get url` and
45
+ `get title` catch the redirect to a challenge path; the `eval` of
46
+ `iframe[src]` catches the vendor host. Use `Bash: agent-browser eval …`, not
47
+ the MCP `eval` (wrapper bug: it echoes the source instead of running it).
48
+
49
+ ## Pause
50
+
51
+ Stop driving the page immediately. Do **not**:
52
+
53
+ - run `close --all` — it is not session-scoped and kills every session,
54
+ including unrelated ones;
55
+ - switch to a different `--session` name, a different `--profile`, or a
56
+ different provider;
57
+ - re-navigate to the challenged URL hoping it passes;
58
+ - reach for the recipe's troubleshooting table — on a challenge this file
59
+ wins.
60
+
61
+ Report to the user, all three:
62
+
63
+ 1. the challenged URL (`get url` at pause time — not the task's start URL),
64
+ 2. the challenge kind (Turnstile / hCaptcha / reCAPTCHA / browser check),
65
+ 3. **the session name you have been driving** — the `--session` value your
66
+ own launch command passed, or `AGENT_BROWSER_SESSION` if you relied on
67
+ the env var, or `default` if neither.
68
+
69
+ Do not run a bare `agent-browser session` to answer #3: it prints the
70
+ *environment/default* session name, not the one your task passed.
71
+
72
+ ## Complete — branch on the route you are already on
73
+
74
+ ```mermaid
75
+ flowchart TD
76
+ A["Challenge: requested content withheld"] --> B["Pause: stop driving; report URL + kind + driven session name"]
77
+ B --> C{"Who can see the browser?"}
78
+ C -->|"relay / own-browser / Electron-CDP"| D["User completes it in the visible window"]
79
+ C -->|"bundled headless"| E{"Ask: are you at the machine running the browser?"}
80
+ E -->|"yes"| F["Session-scoped close, then relaunch original flags + --headed on the challenged URL"]
81
+ E -->|"no — Docker, SSH, service host"| G["Stop: human needed on a visible host; offer relay / own-browser / desktop host"]
82
+ D --> H["Re-snapshot the same page, continue, never switch session"]
83
+ F --> H
84
+ ```
85
+
86
+ ### Relay / own-browser / Electron-CDP — the user already sees the browser
87
+
88
+ (The relay recipe lives in `references/dashboard-relay.md` when that file is
89
+ present.) Ask the user to complete the challenge in that window. On
90
+ confirmation, re-snapshot the same page and continue. The session is
91
+ untouched — nothing to relaunch.
92
+
93
+ ### Bundled headless — ask before you assume a display
94
+
95
+ The user cannot see the bundled browser, and a running daemon cannot flip
96
+ headless → headed in place, so the agent has to relaunch. First ask:
97
+
98
+ > Are you at the machine running the browser?
99
+
100
+ Do **not** infer this from `$DISPLAY` — it is empty on macOS and set under
101
+ `ssh -X`, so it is wrong in both directions.
102
+
103
+ **Yes — display available.** From Bash (the MCP `browser` tool shares the
104
+ same daemon and session, so Bash is the relaunch surface either way):
105
+
106
+ 1. Session-scoped `close`, with the same `--session` / `--namespace` flags
107
+ you launched with — never `close --all`:
108
+
109
+ ```bash
110
+ agent-browser --session <name> [--namespace <namespace>] close
111
+ ```
112
+
113
+ Tolerate failure: if the daemon already idled out, `close` errors.
114
+ Ignore it and go on.
115
+
116
+ 2. Relaunch with **all your original launch flags verbatim**, plus
117
+ `--headed`, opening the challenged URL:
118
+
119
+ ```bash
120
+ agent-browser --session <name> [<original flags>] --headed open <challenged URL>
121
+ ```
122
+
123
+ "Repeat the original flags" is deliberately not a list here: it keeps
124
+ `--restore`, `--profile`, `--state`, `--namespace`, `--cdp`, and anything
125
+ else in play without you having to remember them.
126
+
127
+ 3. Ask the user to complete the challenge in the visible window and confirm.
128
+
129
+ **Say this out loud to the user:** a session launched without `--restore`,
130
+ `--profile`, or `--state` starts the headed relaunch with **empty cookies**.
131
+ That is by design — a task that needed login state should already have been
132
+ on relay / own-browser. The clearance the user just earned lives in the
133
+ headed browser you now keep driving, so the task still works.
134
+
135
+ **Note:** if your session is `default`, its `close` also drops the MCP
136
+ `browser` tool's page — both surfaces share one daemon. That affects this
137
+ task only.
138
+
139
+ **No — no display** (Docker harness, SSH, service context). `--headed`
140
+ cannot work. Stop, tell the user the site needs a human on a host with a
141
+ visible browser, and offer the relay / own-browser route or running the task
142
+ from a desktop host. Do not attempt `--headed`, a virtual display (Xvfb),
143
+ or any bypass.
144
+
145
+ ## Resume
146
+
147
+ The headed browser under the same name **is** the working browser now.
148
+ Re-snapshot, continue the task, and do not close it again for the rest of
149
+ the task. Do not start a different session name.
150
+
151
+ If the daemon idle-timed out while the user was away, relaunch exactly as
152
+ above — same name, original flags + `--headed` — and resume.
153
+
154
+ ## Challenge reappears after resume
155
+
156
+ Stop. Report that the site is not accepting the session. Do **not** loop on
157
+ retries and do **not** switch identity — a second relaunch, a new
158
+ `--session`, or a UA change is exactly what the challenge is testing for.
159
+
160
+ ## Never
161
+
162
+ The never-list is absolute. Every item below is a bypass attempt, and a
163
+ challenge is a request for a human — hand it to the human instead.
164
+
165
+ Never:
166
+
167
+ - use a CAPTCHA-solving service;
168
+ - inject a challenge token or a clearance cookie;
169
+ - copy cookies between browser identities;
170
+ - rotate proxies;
171
+ - change the user-agent, request headers, or `set device` emulation in
172
+ response to a challenge;
173
+ - pass launch flags whose purpose is to hide automation — for example
174
+ `--args --disable-blink-features=AutomationControlled` (the CLI's own help
175
+ happens to show this one);
176
+ - inject JavaScript whose purpose is to falsify automation signals.
177
+
178
+ ## Related
179
+
180
+ - Default bundled-browser workflow: [`web.md`](web.md)
181
+ - Electron apps: [`electron.md`](electron.md)
182
+ - The user's logged-in browser: [`own-browser.md`](own-browser.md)
183
+ - Provenance / refresh rules: [`../UPSTREAM.md`](../UPSTREAM.md)