@trusty-squire/mcp 0.9.4 → 0.9.5

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.
@@ -242,6 +242,12 @@ export declare function isCredentialNoiseCandidate(candidate: string): boolean;
242
242
  export declare function isDocumentationUrl(url: string): boolean;
243
243
  export declare function pickVerificationLink(links: readonly string[]): string | null;
244
244
  export declare function pickVerificationLinkFromHtml(bodyHtml: string): string | null;
245
+ export declare function extractCodeFromEmailBody(email: {
246
+ subject: string;
247
+ body_text?: string | null;
248
+ body_html?: string | null;
249
+ }): string | null;
250
+ export declare function isVerificationCodeGate(inventory: readonly InteractiveElement[], pageText: string): boolean;
245
251
  export declare function isStalledOnActions(effects: ReadonlyArray<{
246
252
  kind: string;
247
253
  pageUnchanged: boolean;
@@ -305,6 +311,7 @@ export declare class SignupAgent {
305
311
  private enterEmailVerificationCode;
306
312
  private maybeFirePostVerifyHeightenedAuth;
307
313
  private extractFromDomProximity;
314
+ private countPresentedCredentialLabels;
308
315
  private harvestVisibleCredentials;
309
316
  private attemptMintNewKey;
310
317
  private postVerifyLoop;
@@ -1 +1 @@
1
- {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/bot/agent.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,iBAAiB,EAEjB,WAAW,EACX,cAAc,EACd,kBAAkB,EACnB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAML,KAAK,eAAe,EACrB,MAAM,sBAAsB,CAAC;AAI9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAUhE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,OAAO,EAGL,KAAK,SAAS,EACd,KAAK,OAAO,EACb,MAAM,iBAAiB,CAAC;AAMzB,MAAM,WAAW,UAAU;IACzB,YAAY,CAAC,KAAK,EAAE;QAClB,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE;YAAE,OAAO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AAO,EAAE,iBAAiB,EAClC,GAAG,CAAC,EAAE,SAAS,GAAG,OAAO,EACzB,IAAI,GAAE;QACJ,sBAAsB,CAAC,EAAE,sBAAsB,CAAC;QAChD,aAAa,CAAC,EAAE,aAAa,CAAC;QAG9B,aAAa,CAAC,EAAE,gBAAgB,CAAC;QAMjC,wBAAwB,CAAC,EAAE,MAAM,CAAC;KAC9B;IA+BR,OAAO,CAAC,wBAAwB,CAAW;IAK3C,IAAI,QAAQ,IAAI,SAAS,MAAM,EAAE,CAEhC;YAOa,OAAO;YAkBP,YAAY;YA2DZ,UAAU;IA6ClB,MAAM,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,YAAY,CAAC;YA8CvC,SAAS;YAuuBT,YAAY;IA+mC1B,OAAO,CAAC,UAAU;YAeJ,sBAAsB;YA8BtB,4BAA4B;YA+C5B,sBAAsB;YA+CtB,qBAAqB;YAerB,cAAc;IAqE5B,OAAO,CAAC,0BAA0B;IAYlC,OAAO,CAAC,oBAAoB;YAQd,wBAAwB;YA+CxB,0BAA0B;IA0CxC,OAAO,CAAC,iCAAiC;YAiF3B,uBAAuB;YAmCvB,8BAA8B;YAqB9B,yBAAyB;YAmDzB,iBAAiB;YAuJjB,cAAc;YAisDd,6BAA6B;YAkC7B,oBAAoB;YA6CpB,kBAAkB;YAsSlB,cAAc;YAiFd,0BAA0B;YAiB1B,mBAAmB;YAsDnB,kBAAkB;YAmIlB,uBAAuB;CA4CtC"}
package/dist/bot/agent.js CHANGED
@@ -2612,6 +2612,46 @@ export function isMultiCredBundle(creds) {
2612
2612
  }
2613
2613
  return false;
2614
2614
  }
2615
+ // DOM-label phrase → canonical credential key. Shared by
2616
+ // extractFromDomProximity (which harvests VALUES) and
2617
+ // countPresentedCredentialLabels (which counts how many distinct
2618
+ // credentials a page PRESENTS, masked included). Kept in lockstep with
2619
+ // the Phase E LABEL_ALIASES vocabulary.
2620
+ const DOM_LABEL_TO_KEY = {
2621
+ "api key": "api_key",
2622
+ "api token": "api_key",
2623
+ "api secret": "api_secret",
2624
+ "secret key": "secret_key",
2625
+ "publishable key": "publishable_key",
2626
+ "access key": "access_key_id",
2627
+ "access key id": "access_key_id",
2628
+ "access token": "access_token",
2629
+ "bearer token": "access_token",
2630
+ "personal access token": "access_token",
2631
+ "auth token": "auth_token",
2632
+ "client id": "client_id",
2633
+ "client secret": "client_secret",
2634
+ "client key": "client_id",
2635
+ "cloud name": "cloud_name",
2636
+ cloudname: "cloud_name",
2637
+ "application id": "application_id",
2638
+ "app id": "application_id",
2639
+ "admin api key": "admin_api_key",
2640
+ "search api key": "search_api_key",
2641
+ "search-only api key": "search_api_key",
2642
+ "monitoring api key": "monitoring_api_key",
2643
+ "account sid": "account_sid",
2644
+ "secret access key": "secret_access_key",
2645
+ "consumer key": "consumer_key",
2646
+ "consumer secret": "consumer_secret",
2647
+ "access token secret": "access_token_secret",
2648
+ "project api key": "project_api_key",
2649
+ "personal api key": "personal_api_key",
2650
+ "organization id": "org_id",
2651
+ "org id": "org_id",
2652
+ "app key": "app_key",
2653
+ "app secret": "app_secret",
2654
+ };
2615
2655
  export function extractApiKeyFromText(text) {
2616
2656
  const prefixed = [
2617
2657
  /\bre_[a-zA-Z0-9_]{20,}\b/, // Resend (key body contains underscores)
@@ -2872,6 +2912,60 @@ export function pickVerificationLinkFromHtml(bodyHtml) {
2872
2912
  }
2873
2913
  return best !== null && best.score > 0 ? best.url : null;
2874
2914
  }
2915
+ // Last-resort verification-CODE extraction from an email body, for the
2916
+ // passwordless "we emailed you a code" flow (axiom: "Axiom sign-in
2917
+ // verification code") when the inbox parser's parsed_codes came back empty.
2918
+ // Without this the bot bailed "no usable verification link" on a code-only
2919
+ // email — treating a routine code flow as a dead end. Conservative: prefers a
2920
+ // 4-8 digit run next to a code/verify keyword, then a space/dash-grouped code,
2921
+ // then a standalone 6-digit number (the most common verification length).
2922
+ // Returns null when nothing code-shaped is found so the caller still bails
2923
+ // honestly rather than typing garbage. Exported for unit testing.
2924
+ export function extractCodeFromEmailBody(email) {
2925
+ const text = [
2926
+ email.subject ?? "",
2927
+ email.body_text ?? "",
2928
+ (email.body_html ?? "").replace(/<[^>]+>/g, " "),
2929
+ ].join("\n");
2930
+ // 1) A code sitting next to a verification keyword — the strongest signal.
2931
+ const kw = text.match(/(?:verification code|sign[\s-]?in code|one[\s-]?time(?:\s+(?:code|password))?|security code|your code|confirmation code|code is|enter(?:\s+this)?\s+code)\b[^0-9]{0,40}([0-9]{4,8})\b/i);
2932
+ if (kw?.[1] !== undefined)
2933
+ return kw[1];
2934
+ // 2) A grouped code ("123-456" / "1234 5678").
2935
+ const grouped = text.match(/(?<![0-9])([0-9]{3,4}[ -][0-9]{3,4})(?![0-9])/);
2936
+ if (grouped?.[1] !== undefined)
2937
+ return grouped[1].replace(/[ -]/g, "");
2938
+ // 3) A standalone 6-digit number (most verification codes).
2939
+ const six = text.match(/(?<![0-9])([0-9]{6})(?![0-9])/);
2940
+ if (six?.[1] !== undefined)
2941
+ return six[1];
2942
+ return null;
2943
+ }
2944
+ // True when the page is an email verification-CODE entry gate: a single
2945
+ // code-style input (name/id/placeholder/label ~ code/token/otp/verification),
2946
+ // NO email/password/tel field still to fill, and verify/code copy in the body.
2947
+ // axiom-class passwordless ("Send Code to Email" lands here). Distinct from the
2948
+ // no-fields verification WALL: this page HAS an input, but it's a CODE field,
2949
+ // so the form-fill planner would otherwise type an empty literal into it and
2950
+ // loop. The caller returns "submitted" to route to the inbox-poll + code-entry
2951
+ // path (the code was emailed to our alias). Exported for unit testing.
2952
+ export function isVerificationCodeGate(inventory, pageText) {
2953
+ const inputs = inventory.filter((e) => e.tag === "input" && e.visible !== false);
2954
+ // Any email/password/tel field still present → still a signup form, not a
2955
+ // pure code gate.
2956
+ if (inputs.some((e) => e.type === "email" || e.type === "password" || e.type === "tel")) {
2957
+ return false;
2958
+ }
2959
+ const codeRe = /\b(?:code|token|otp|verification|verify|one[\s-]?time|2fa|mfa)\b/i;
2960
+ const hasCodeInput = inputs.some((e) => {
2961
+ const hay = `${e.name ?? ""} ${e.id ?? ""} ${e.placeholder ?? ""} ${e.ariaLabel ?? ""} ${e.labelText ?? ""}`;
2962
+ return codeRe.test(hay);
2963
+ });
2964
+ if (!hasCodeInput)
2965
+ return false;
2966
+ const t = pageText.toLowerCase();
2967
+ return /verification code|enter (?:the |your )?code|code is required|verify and continue|we (?:sent|emailed)|check your email|one[\s-]?time (?:code|password)|sign[\s-]?in code/.test(t);
2968
+ }
2875
2969
  // Discriminates LLMPair from LLMClient. LLMPair has `primary` (an
2876
2970
  // LLMClient); LLMClient has `createMessage`. They're mutually exclusive
2877
2971
  // shapes so a structural check is reliable.
@@ -3383,6 +3477,19 @@ export class SignupAgent {
3383
3477
  return { kind: "submitted" };
3384
3478
  }
3385
3479
  }
3480
+ // Email verification-CODE gate (axiom-class passwordless). The no-fields
3481
+ // wall above misses it because this page HAS an input — but it's a CODE
3482
+ // field, not email/password, and the code was emailed to our alias.
3483
+ // Return "submitted" so the post-submit inbox-poll + code-entry path
3484
+ // (extractCodeFromEmailBody → enterEmailVerificationCode) handles it,
3485
+ // instead of the planner typing an empty literal into the code field and
3486
+ // looping. Gated on committedToEmailPath — a code gate only appears after
3487
+ // the email was submitted.
3488
+ if (committedToEmailPath && isVerificationCodeGate(inventory, state.html)) {
3489
+ this.pendingVerificationAlias = this.pendingVerificationAlias ?? task.email;
3490
+ steps.push("Form: email verification-CODE gate detected — routing to the inbox-poll + code-entry flow.");
3491
+ return { kind: "submitted" };
3492
+ }
3386
3493
  // OAuth-first (T6/T13 + auto-prefer): when the page carries a
3387
3494
  // "Sign in with <provider>" affordance for a provider the bot can
3388
3495
  // use, that button unconditionally outranks any form field — hand
@@ -4829,7 +4936,17 @@ export class SignupAgent {
4829
4936
  credentials = await this.enterEmailVerificationCode(email.parsed_codes[0] ?? "", task, password, steps);
4830
4937
  }
4831
4938
  else {
4832
- steps.push("Email had no usable verification link.");
4939
+ // No link and the inbox parser found no code last-resort
4940
+ // scan the email body ourselves for a verification code
4941
+ // (passwordless "we emailed you a code" flow, e.g. axiom).
4942
+ const bodyCode = extractCodeFromEmailBody(email);
4943
+ if (bodyCode !== null) {
4944
+ steps.push(`Email had no link but carried a verification code (…${bodyCode.slice(-2)}) — entering it.`);
4945
+ credentials = await this.enterEmailVerificationCode(bodyCode, task, password, steps);
4946
+ }
4947
+ else {
4948
+ steps.push("Email had no usable verification link or code.");
4949
+ }
4833
4950
  }
4834
4951
  }
4835
4952
  else if (email.parsed_codes.length > 0) {
@@ -4980,6 +5097,21 @@ export class SignupAgent {
4980
5097
  steps.push(`OAuth: Google Identity Services / FedCM widget — resolved via ${gsi.via}` +
4981
5098
  (gsi.ok ? "" : " (no FedCM dialog or popup appeared — the widget may need a different trigger)"));
4982
5099
  }
5100
+ // OmniAuth POST-only recovery prep. Capture the affordance's href + the
5101
+ // page's CSRF token NOW, while we're still on the signin page — the
5102
+ // "Authentication passthru" page a GET-click lands on is bare (no token).
5103
+ // See the typesense root-cause (2026-06-07): Rails/OmniAuth 2.0 is
5104
+ // POST-only; the GitHub button is a GET <a href="/users/auth/github">
5105
+ // upgraded to POST by page JS, and the bot's GET-click hit the passthru.
5106
+ const omniauthHref = typeof this.browser.getElementAttribute === "function"
5107
+ ? await this.browser
5108
+ .getElementAttribute(oauthSelector, "href")
5109
+ .catch(() => null)
5110
+ : null;
5111
+ const omniauthToken = typeof this.browser.getMetaCsrfToken === "function"
5112
+ ? await this.browser.getMetaCsrfToken().catch(() => null)
5113
+ : null;
5114
+ let omniauthPostTried = false;
4983
5115
  if (!gsiHandled) {
4984
5116
  await this.browser.startOAuth(oauthSelector);
4985
5117
  }
@@ -5026,8 +5158,37 @@ export class SignupAgent {
5026
5158
  }
5027
5159
  const authState = provider.classifyAuthState(url, body);
5028
5160
  steps.push(`OAuth: ${provider.label} auth state = ${authState} (url=${url.slice(0, 120)})`);
5029
- if (authState === "not_provider")
5161
+ if (authState === "not_provider") {
5162
+ // OmniAuth 2.0 POST-only recovery. The provider button can be a GET
5163
+ // <a href="/.../auth/<provider>"> that page-JS upgrades to a POST; if
5164
+ // the bot's click hit the default GET, Rails/OmniAuth answers
5165
+ // "Not found. Authentication passthru." and OAuth never started — the
5166
+ // bot then misreads it as "signed in" and bails. Detect that bare
5167
+ // passthru page and re-initiate via POST with the signin page's CSRF
5168
+ // token (proven to 302 to the provider). MEASURED 2026-06-07: typesense.
5169
+ const onOmniAuthPassthru = /authentication passthru|not found/i.test(body) &&
5170
+ /\/auth\/[a-z0-9_-]+\/?$/i.test(url);
5171
+ if (onOmniAuthPassthru &&
5172
+ !omniauthPostTried &&
5173
+ omniauthToken !== null &&
5174
+ omniauthHref !== null) {
5175
+ omniauthPostTried = true;
5176
+ const action = new URL(omniauthHref, url).toString();
5177
+ steps.push(`OAuth: ${provider.label} endpoint is POST-only (OmniAuth GET passthru) — ` +
5178
+ `re-initiating via POST with the page CSRF token`);
5179
+ try {
5180
+ await this.browser.submitPostForm(action, {
5181
+ authenticity_token: omniauthToken,
5182
+ });
5183
+ await this.browser.wait(3);
5184
+ continue; // re-read state — should now be on the provider's page
5185
+ }
5186
+ catch (err) {
5187
+ steps.push(`OAuth: OmniAuth POST recovery failed (${err instanceof Error ? err.message : String(err)})`);
5188
+ }
5189
+ }
5030
5190
  break; // flow left the provider — back on the service
5191
+ }
5031
5192
  if (authState === "challenge") {
5032
5193
  // rc.26 — always capture forensic state at the moment the
5033
5194
  // challenge is detected. Before this, snapshots fired only at
@@ -6175,41 +6336,7 @@ ${formatInventory(input.inventory)}`,
6175
6336
  async extractFromDomProximity() {
6176
6337
  // Vocabulary matches the LABEL_ALIASES used by Phase E so the
6177
6338
  // canonical keys stay consistent across paths.
6178
- const LABEL_TO_KEY = {
6179
- "api key": "api_key",
6180
- "api token": "api_key",
6181
- "api secret": "api_secret",
6182
- "secret key": "secret_key",
6183
- "publishable key": "publishable_key",
6184
- "access key": "access_key_id",
6185
- "access key id": "access_key_id",
6186
- "access token": "access_token",
6187
- "bearer token": "access_token",
6188
- "personal access token": "access_token",
6189
- "auth token": "auth_token",
6190
- "client id": "client_id",
6191
- "client secret": "client_secret",
6192
- "client key": "client_id",
6193
- "cloud name": "cloud_name",
6194
- "cloudname": "cloud_name",
6195
- "application id": "application_id",
6196
- "app id": "application_id",
6197
- "admin api key": "admin_api_key",
6198
- "search api key": "search_api_key",
6199
- "search-only api key": "search_api_key",
6200
- "monitoring api key": "monitoring_api_key",
6201
- "account sid": "account_sid",
6202
- "secret access key": "secret_access_key",
6203
- "consumer key": "consumer_key",
6204
- "consumer secret": "consumer_secret",
6205
- "access token secret": "access_token_secret",
6206
- "project api key": "project_api_key",
6207
- "personal api key": "personal_api_key",
6208
- "organization id": "org_id",
6209
- "org id": "org_id",
6210
- "app key": "app_key",
6211
- "app secret": "app_secret",
6212
- };
6339
+ const LABEL_TO_KEY = DOM_LABEL_TO_KEY;
6213
6340
  let labeled = [];
6214
6341
  try {
6215
6342
  labeled = await this.browser.extractLabeledCredentialCandidates();
@@ -6236,6 +6363,30 @@ ${formatInventory(input.inventory)}`,
6236
6363
  }
6237
6364
  return out;
6238
6365
  }
6366
+ // Count the DISTINCT credentials the current page PRESENTS — masked
6367
+ // ones included. This detects a multi-cred page BEFORE every value is
6368
+ // captured, so the post-verify loop can stay open to harvest the 2nd/
6369
+ // 3rd key instead of exiting the moment the first surfaces ("stops at
6370
+ // one"). Uses the DOM-proximity harvester's labels (which fire even on
6371
+ // masked/bullet'd values) mapped to canonical keys; values are NOT read
6372
+ // here, only the label set. Best-effort → 0 on any browser error.
6373
+ async countPresentedCredentialLabels() {
6374
+ try {
6375
+ const cands = await this.browser.extractLabeledCredentialCandidates();
6376
+ const canon = new Set();
6377
+ for (const c of cands) {
6378
+ if (c.label === null)
6379
+ continue;
6380
+ const key = DOM_LABEL_TO_KEY[c.label];
6381
+ if (key !== undefined)
6382
+ canon.add(key);
6383
+ }
6384
+ return canon.size;
6385
+ }
6386
+ catch {
6387
+ return 0;
6388
+ }
6389
+ }
6239
6390
  // Run every visible-credential extraction tier the post-verify loop
6240
6391
  // uses (legacy regex/clipboard/hidden-input + DOM-proximity labeled),
6241
6392
  // merging first-wins into a single bundle. Used by attemptMintNewKey
@@ -6527,6 +6678,16 @@ ${formatInventory(input.inventory)}`,
6527
6678
  // and inject a forced "no-progress" hint on the second repeat.
6528
6679
  let prevSignature = null;
6529
6680
  let prevInventorySize = -1;
6681
+ // Selectors the planner has CLICKED while the inventory count has held
6682
+ // steady. A multi-step onboarding wizard (axiom: role → company-size →
6683
+ // plan) advances by clicking distinct radio-style cards that flip an
6684
+ // aria-checked but add/remove no elements, so inventory.length never
6685
+ // moves — and the kind-level stuck detector below would false-positive
6686
+ // on the 2nd DISTINCT selection. We exempt a brand-new selector (wizard
6687
+ // progress) and only call it stuck once a selector REPEATS (the Railway
6688
+ // Create→Focus→Create cycle). Reset whenever the inventory count changes
6689
+ // (genuine page mutation → fresh wizard step / new page).
6690
+ let clickSelectorsSinceInventoryChange = new Set();
6530
6691
  // rc.39 — wait-loop tracker. Turso's GitHub OAuth handshake
6531
6692
  // succeeds, then the SSO-callback page stays empty (0 elements)
6532
6693
  // while a Cloudflare verification widget runs that never clears
@@ -6573,6 +6734,13 @@ ${formatInventory(input.inventory)}`,
6573
6734
  let stuckFiresAtUrl = 0;
6574
6735
  let lastStuckFireUrl = null;
6575
6736
  const triedFallbackUrls = new Set();
6737
+ // Premature-done guard budget. When the planner gives up (`done`)
6738
+ // with zero credentials captured, we navigate to an unvisited
6739
+ // canonical keys URL and re-plan — bounded so a service that
6740
+ // genuinely has no self-serve key doesn't burn the whole run budget
6741
+ // walking every fallback path.
6742
+ let prematureDoneFallbacks = 0;
6743
+ const MAX_PREMATURE_DONE_FALLBACKS = 3;
6576
6744
  // Dead-URL memory. The planner guesses credential-page URLs
6577
6745
  // (e.g. /user/personal_access_tokens/new) that 404; without memory it
6578
6746
  // re-guesses the same dead URL round after round — xata and fly each
@@ -6617,6 +6785,15 @@ ${formatInventory(input.inventory)}`,
6617
6785
  // surveyed the labeled credentials surface.
6618
6786
  const seedHadCredential = credentials.api_key !== undefined || credentials.username !== undefined;
6619
6787
  let plannerExtractEmitted = false;
6788
+ // 2026-06-07 — "stops at one" fix. The legacy loop-exit treated a run
6789
+ // as single-cred based on what was ALREADY captured (isMultiCredBundle),
6790
+ // so a page with 3 credentials whose 1st surfaced first — siblings still
6791
+ // masked or missed on the first harvest pass — exited before the rest
6792
+ // were caught. Set once the page is observed to PRESENT >=2 distinct
6793
+ // credentials (masked included); the loop-exit then holds open (bounded
6794
+ // by roundsSinceLastNewCredential) so the reveal pass + DOM harvest get
6795
+ // more rounds to capture the siblings.
6796
+ let pageOffersMultiCred = false;
6620
6797
  // Gate URLs we've already polled the operator's gmail for, so a
6621
6798
  // multi-round wait on the same email-OTP page doesn't re-poll.
6622
6799
  const otpPolledUrls = new Set();
@@ -6641,7 +6818,7 @@ ${formatInventory(input.inventory)}`,
6641
6818
  // when the api_key came from the pre-loop seed and the
6642
6819
  // planner hasn't yet emitted an explicit extract step. In
6643
6820
  // that case we let the planner run until extract fires.
6644
- const inMultiCredMode = isMultiCredBundle(credentials);
6821
+ const inMultiCredMode = isMultiCredBundle(credentials) || pageOffersMultiCred;
6645
6822
  const haveOnlySeedCredentials = seedHadCredential && !plannerExtractEmitted;
6646
6823
  if (!inMultiCredMode &&
6647
6824
  (credentials.api_key !== undefined || credentials.username !== undefined) &&
@@ -6680,6 +6857,24 @@ ${formatInventory(input.inventory)}`,
6680
6857
  // widened (the "API Keys"/"Settings" links must survive ranking).
6681
6858
  // Reading state can still race a navigation — a transient throw
6682
6859
  // burns the round rather than crashing the whole run.
6860
+ // Dismiss any cookie/consent banner BEFORE reading the page or
6861
+ // planning a click. A consent overlay (Google "Accept all", GDPR
6862
+ // banners) intercepts pointer events, so the planner's clicks land
6863
+ // on the banner instead of the dashboard and the loop stalls / loops /
6864
+ // times out. MEASURED 2026-06-07: meilisearch reached /settings/keys
6865
+ // but sat behind an Accept-All overlay and ran out the 600s clock.
6866
+ // The form-fill loop already dismisses banners every round; the
6867
+ // post-verify loop never did. Best-effort — a dismiss failure must
6868
+ // not burn the round.
6869
+ try {
6870
+ const dismissed = await this.browser.dismissConsentBanner();
6871
+ if (dismissed !== null) {
6872
+ args.steps.push(`Post-verify round ${round}: dismissed consent banner ("${dismissed}")`);
6873
+ }
6874
+ }
6875
+ catch {
6876
+ // best-effort
6877
+ }
6683
6878
  let state;
6684
6879
  let inventory;
6685
6880
  try {
@@ -7046,6 +7241,13 @@ ${formatInventory(input.inventory)}`,
7046
7241
  // the same selector AND the inventory size matches the prior
7047
7242
  // round's — strong evidence the previous step did nothing.
7048
7243
  const repeatableKinds = new Set(["click", "fill", "select", "check", "scroll"]);
7244
+ // An inventory-count change means the page genuinely mutated — a fresh
7245
+ // wizard step or a new page. Reset the per-stable-run click-selector
7246
+ // memory so distinct clicks on the NEW state aren't judged against the
7247
+ // old one.
7248
+ if (inventory.length !== prevInventorySize) {
7249
+ clickSelectorsSinceInventoryChange = new Set();
7250
+ }
7049
7251
  if (repeatableKinds.has(nextStep.kind)) {
7050
7252
  const sel = "selector" in nextStep ? (nextStep.selector ?? "<none>") : "<none>";
7051
7253
  const signature = `${nextStep.kind}|${sel}`;
@@ -7056,10 +7258,21 @@ ${formatInventory(input.inventory)}`,
7056
7258
  // (planner cycles through Create, Focus-input, Create again,
7057
7259
  // …). When that happens, force a non-click action.
7058
7260
  const sameSelector = signature === prevSignature && inventory.length === prevInventorySize;
7261
+ // A brand-new click selector (never clicked since the inventory last
7262
+ // changed) is wizard PROGRESS, not a cycle — selecting role, then
7263
+ // company-size, then a plan flips aria-checked without moving the
7264
+ // element count (axiom). Only treat repeated clicks as stuck: the
7265
+ // selector has already been clicked in this stable-inventory run.
7266
+ const clickSelectorIsRepeat = nextStep.kind === "click" &&
7267
+ clickSelectorsSinceInventoryChange.has(sel);
7059
7268
  const stuckOnKind = nextStep.kind === "click" &&
7060
7269
  prevSignature !== null &&
7061
7270
  prevSignature.startsWith("click|") &&
7062
- inventory.length === prevInventorySize;
7271
+ inventory.length === prevInventorySize &&
7272
+ clickSelectorIsRepeat;
7273
+ if (nextStep.kind === "click") {
7274
+ clickSelectorsSinceInventoryChange.add(sel);
7275
+ }
7063
7276
  if (sameSelector || stuckOnKind) {
7064
7277
  const emptyInputs = inventory
7065
7278
  .filter((e) => (e.tag === "input" || e.tag === "textarea") &&
@@ -7138,8 +7351,16 @@ ${formatInventory(input.inventory)}`,
7138
7351
  // Mistral's TOS, GitHub-app sign-up, many onboarding forms
7139
7352
  // gate submit on a checkbox that isn't yet ticked.
7140
7353
  const uncheckedBoxes = inventory
7141
- .filter((e) => e.tag === "input" &&
7142
- e.type === "checkbox" &&
7354
+ .filter((e) =>
7355
+ // Native <input type=checkbox> OR a custom ARIA checkbox
7356
+ // (<button role="checkbox">, <div role="checkbox">). The
7357
+ // input-only filter missed meilisearch's required agreement,
7358
+ // which renders as <button role="checkbox"> — so the planner
7359
+ // was never told to tick it and "Next" stayed disabled. The
7360
+ // check() executor already handles role=checkbox (it clicks +
7361
+ // verifies aria-checked).
7362
+ ((e.tag === "input" && e.type === "checkbox") ||
7363
+ e.role === "checkbox") &&
7143
7364
  // We can't read the actual `checked` from the inventory
7144
7365
  // shape, but interactedThisRun is set after a successful
7145
7366
  // `check` step. Show checkboxes the bot hasn't touched.
@@ -7323,6 +7544,34 @@ ${formatInventory(input.inventory)}`,
7323
7544
  // read see the post-challenge dashboard.
7324
7545
  continue;
7325
7546
  }
7547
+ // Premature-done guard. The planner sometimes concludes "nothing
7548
+ // to extract" on an authenticated dashboard whose API keys live on
7549
+ // a settings/API-keys page it never visited — render's case: an
7550
+ // empty SERVICES list ("no services created yet") is NOT the same
7551
+ // as "no API keys", which sit under Account Settings. Before
7552
+ // accepting `done` with zero credentials captured, navigate to an
7553
+ // unvisited canonical keys URL (same fallback list the stuck-loop
7554
+ // escalation uses). Bounded by triedFallbackUrls — once every
7555
+ // candidate is exhausted, `done` is honored.
7556
+ const capturedCredCount = Object.keys(credentials).filter((k) => !NON_CREDENTIAL_KEYS.has(k)).length;
7557
+ if (capturedCredCount === 0 && prematureDoneFallbacks < MAX_PREMATURE_DONE_FALLBACKS) {
7558
+ const fallback = pickStuckLoopFallbackUrl(state.url, triedFallbackUrls, args.service);
7559
+ if (fallback !== null) {
7560
+ prematureDoneFallbacks += 1;
7561
+ triedFallbackUrls.add(fallback);
7562
+ args.steps.push(`Post-verify: planner emitted done with no credential captured — ` +
7563
+ `navigating to an unvisited API-keys URL before giving up: ${fallback}`);
7564
+ try {
7565
+ await this.browser.goto(fallback);
7566
+ await this.browser.waitForInteractiveDom(5, 15_000);
7567
+ }
7568
+ catch (err) {
7569
+ args.steps.push(`Post-verify: premature-done fallback navigate failed (${err instanceof Error ? err.message : String(err)}) — continuing.`);
7570
+ }
7571
+ hint = undefined;
7572
+ continue;
7573
+ }
7574
+ }
7326
7575
  this.lastPostVerifyDoneReason = nextStep.reason;
7327
7576
  break;
7328
7577
  }
@@ -7452,6 +7701,18 @@ ${formatInventory(input.inventory)}`,
7452
7701
  // best-effort; never abort an extract pass on DOM-proximity
7453
7702
  // failure (page mid-navigation etc).
7454
7703
  }
7704
+ // "Stops at one" guard: does THIS page present >=2 distinct
7705
+ // credentials (masked included)? If so, hold the loop open past
7706
+ // the first key so the reveal pass + DOM harvest get more rounds
7707
+ // to capture the siblings — even when only one value is in hand
7708
+ // right now. Bounded downstream by roundsSinceLastNewCredential.
7709
+ if (!pageOffersMultiCred) {
7710
+ const presented = await this.countPresentedCredentialLabels();
7711
+ if (presented >= 2) {
7712
+ pageOffersMultiCred = true;
7713
+ args.steps.push(`Post-verify ${round + 1}/${args.maxRounds}: page presents ${presented} distinct credentials — holding the loop open to harvest all (not just the first).`);
7714
+ }
7715
+ }
7455
7716
  // Anything found across all tiers? hasMultiCredCredentials
7456
7717
  // also catches non-api_key labels (cloud_name, application_id).
7457
7718
  if (hasAnyExtractedCredential(credentials)) {