@trusty-squire/mcp 0.8.11 → 0.8.13
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/bot/agent.d.ts +6 -1
- package/dist/bot/agent.d.ts.map +1 -1
- package/dist/bot/agent.js +141 -69
- package/dist/bot/agent.js.map +1 -1
- package/dist/bot/browser.d.ts +11 -0
- package/dist/bot/browser.d.ts.map +1 -1
- package/dist/bot/browser.js +43 -1
- package/dist/bot/browser.js.map +1 -1
- package/dist/bot/promote-to-skill.d.ts +1 -1
- package/dist/bot/promote-to-skill.d.ts.map +1 -1
- package/dist/bot/promote-to-skill.js +1 -1
- package/dist/bot/promote-to-skill.js.map +1 -1
- package/dist/bot/redact.js +3 -3
- package/dist/bot/redact.js.map +1 -1
- package/dist/bot/replay-skill.d.ts +1 -1
- package/dist/bot/replay-skill.d.ts.map +1 -1
- package/dist/bot/replay-skill.js +1 -1
- package/dist/bot/replay-skill.js.map +1 -1
- package/dist/bot/telegram-notify.js +5 -5
- package/dist/bot/telegram-notify.js.map +1 -1
- package/dist/skill-cli/cli.js +50 -4
- package/dist/skill-cli/cli.js.map +1 -1
- package/dist/skill-cli/signing.d.ts +1 -1
- package/dist/skill-cli/signing.d.ts.map +1 -1
- package/dist/skill-registry-client.d.ts +2 -1
- package/dist/skill-registry-client.d.ts.map +1 -1
- package/dist/skill-registry-client.js +14 -1
- package/dist/skill-registry-client.js.map +1 -1
- package/dist/tools/provision-any.d.ts.map +1 -1
- package/dist/tools/provision-any.js +6 -1
- package/dist/tools/provision-any.js.map +1 -1
- package/package.json +2 -2
package/dist/bot/agent.d.ts
CHANGED
|
@@ -29,11 +29,16 @@ export declare function detectExistingAccountNoExtract(input: {
|
|
|
29
29
|
}): boolean;
|
|
30
30
|
export declare function pickStuckLoopFallbackUrl(currentUrl: string, alreadyTried: ReadonlySet<string>): string | null;
|
|
31
31
|
export declare function guessSignupUrl(service: string): string;
|
|
32
|
-
export declare function
|
|
32
|
+
export declare function firstHttpsUrl(text: string): string | null;
|
|
33
|
+
export declare function resolveSignupUrl(service: string, llm: LLMClient | null | undefined, opts?: {
|
|
34
|
+
log?: (line: string) => void;
|
|
35
|
+
lookupSkillUrl?: () => Promise<string | null>;
|
|
36
|
+
}): Promise<string>;
|
|
33
37
|
export declare function isGoogleSearchUrl(url: string): boolean;
|
|
34
38
|
export interface SignupTask {
|
|
35
39
|
service: string;
|
|
36
40
|
signupUrl?: string | undefined;
|
|
41
|
+
lookupSkillUrl?: ((service: string) => Promise<string | null>) | undefined;
|
|
37
42
|
email: string;
|
|
38
43
|
generatePassword: () => string;
|
|
39
44
|
inbox?: AgentInbox | undefined;
|
package/dist/bot/agent.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/bot/agent.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,iBAAiB,EAGjB,cAAc,EACd,kBAAkB,EACnB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAML,KAAK,eAAe,EACrB,MAAM,sBAAsB,CAAC;AAI9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAOhE,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,CAAC,EAAE,MAAM,CAAC;YAAC,IAAI,CAAC,EAAE,MAAM,CAAC;YAAC,aAAa,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;QACrE,eAAe,EAAE,MAAM,CAAC;KACzB,GAAG,OAAO,CAAC;QACV,OAAO,EAAE,MAAM,CAAC;QAChB,YAAY,EAAE,MAAM,CAAC;QACrB,YAAY,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;KACrC,CAAC,CAAC;CACJ;AA6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AAO,CAAC,cAAc,CAAM;IAO5B,OAAO,CAAC,cAAc,CAAuB;IAS7C,OAAO,CAAC,wBAAwB,CAAuB;IAKvD,OAAO,CAAC,mBAAmB,CAAiC;IAC5D,OAAO,CAAC,cAAc,CAAiC;IAIvD,OAAO,CAAC,mBAAmB,CAAS;IAIpC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAmB;gBAGxC,OAAO,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;YAcP,YAAY;YAyDZ,UAAU;IA6ClB,MAAM,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,YAAY,CAAC;YA8CvC,SAAS;YAubT,YAAY;IA8xB1B,OAAO,CAAC,UAAU;YAeJ,sBAAsB;YA8BtB,4BAA4B;YA4C5B,sBAAsB;YA+CtB,qBAAqB;YAerB,cAAc;IAkE5B,OAAO,CAAC,0BAA0B;IAYlC,OAAO,CAAC,oBAAoB;YAQd,wBAAwB;IA4CtC,OAAO,CAAC,iCAAiC;YAiF3B,uBAAuB;YA8DvB,cAAc;YA8zCd,6BAA6B;YAkC7B,oBAAoB;YA6CpB,kBAAkB;YA6NlB,cAAc;YA2Ed,mBAAmB;YAsDnB,kBAAkB;YAuHlB,uBAAuB;CA4CtC"}
|
package/dist/bot/agent.js
CHANGED
|
@@ -182,7 +182,7 @@ const STUCK_LOOP_FALLBACK_PATHS = [
|
|
|
182
182
|
// shows only the NAMES of existing keys (the values were revealed
|
|
183
183
|
// once at create-time and aren't recoverable). Without this
|
|
184
184
|
// classifier those runs fall through to a generic
|
|
185
|
-
// oauth_onboarding_failed and the
|
|
185
|
+
// oauth_onboarding_failed and the housekeeper treats them like a
|
|
186
186
|
// repairable bug.
|
|
187
187
|
//
|
|
188
188
|
// Conservative rules: must be on a URL that names an API-key page
|
|
@@ -275,62 +275,96 @@ export function pickStuckLoopFallbackUrl(currentUrl, alreadyTried) {
|
|
|
275
275
|
}
|
|
276
276
|
return null;
|
|
277
277
|
}
|
|
278
|
-
//
|
|
279
|
-
//
|
|
280
|
-
//
|
|
281
|
-
//
|
|
282
|
-
//
|
|
283
|
-
// the
|
|
284
|
-
//
|
|
285
|
-
//
|
|
286
|
-
// Exported for unit testing.
|
|
287
|
-
// Either a hostname (default path: /signup) or a full URL (when the
|
|
288
|
-
// service's signup lives on a subdomain or uses a non-standard path —
|
|
289
|
-
// e.g. Cloudflare's dash.cloudflare.com/sign-up).
|
|
290
|
-
const KNOWN_DOMAINS = {
|
|
291
|
-
sentry: "sentry.io",
|
|
292
|
-
openrouter: "openrouter.ai",
|
|
293
|
-
mistral: "mistral.ai",
|
|
294
|
-
anthropic: "anthropic.com",
|
|
295
|
-
mailtrap: "mailtrap.io",
|
|
296
|
-
axiom: "axiom.co",
|
|
297
|
-
loops: "loops.so",
|
|
298
|
-
e2b: "e2b.dev",
|
|
299
|
-
// railway.app + railway.com both 404 on /signup; the real entry
|
|
300
|
-
// point is /login (which handles both signup and sign-in via an
|
|
301
|
-
// OAuth chooser). railway.app permanent-redirects to railway.com.
|
|
302
|
-
railway: "https://railway.com/login",
|
|
303
|
-
supabase: "supabase.com",
|
|
304
|
-
replicate: "replicate.com",
|
|
305
|
-
modal: "modal.com",
|
|
306
|
-
// PostHog uses posthog.com but the dashboard lives at us.posthog.com /
|
|
307
|
-
// eu.posthog.com — signup is on the marketing site, .com is right.
|
|
308
|
-
posthog: "posthog.com",
|
|
309
|
-
// Cloudflare's marketing site has no signup form — it CTAs into the
|
|
310
|
-
// dashboard. Skip the redirect chase and land on the real form.
|
|
311
|
-
cloudflare: "https://dash.cloudflare.com/sign-up",
|
|
312
|
-
// Vercel: marketing /signup redirects through OAuth provider tiles
|
|
313
|
-
// but the actual email form sits on the dashboard.
|
|
314
|
-
vercel: "https://vercel.com/signup",
|
|
315
|
-
};
|
|
278
|
+
// Last-resort canonical signup URL when the caller passed none and no
|
|
279
|
+
// promoted skill / model resolution applies: <name>.com/signup, which
|
|
280
|
+
// catches the common dev-SaaS case (Resend, Postmark, IPInfo, …). Non-.com
|
|
281
|
+
// products and non-obvious entry points are handled upstream by
|
|
282
|
+
// resolveSignupUrl (promoted-skill signup_url → model); a wrong .com guess
|
|
283
|
+
// is recovered by the looksLikeSignupPage → Google-search fallback. The old
|
|
284
|
+
// hand-maintained KNOWN_DOMAINS table was retired once the model + the
|
|
285
|
+
// verified skill cache covered it. Exported for unit testing.
|
|
316
286
|
export function guessSignupUrl(service) {
|
|
317
287
|
const slug = service.toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
318
|
-
|
|
319
|
-
if (entry !== undefined && /^https?:\/\//i.test(entry))
|
|
320
|
-
return entry;
|
|
321
|
-
const host = entry ?? `${slug}.com`;
|
|
322
|
-
return `https://${host}/signup`;
|
|
288
|
+
return `https://${slug}.com/signup`;
|
|
323
289
|
}
|
|
324
|
-
//
|
|
325
|
-
// URL (vs the default /signup convention)? These were explicitly
|
|
326
|
-
// chosen because the default 404s and the real entry is non-obvious
|
|
327
|
-
// — e.g. Railway's /login, Cloudflare's dash.cloudflare.com/sign-up.
|
|
328
|
-
// Trust the mapping rather than falling back to a Google search.
|
|
290
|
+
// Pull the first well-formed http(s) URL out of arbitrary model text.
|
|
329
291
|
// Exported for unit testing.
|
|
330
|
-
export function
|
|
331
|
-
const
|
|
332
|
-
|
|
333
|
-
|
|
292
|
+
export function firstHttpsUrl(text) {
|
|
293
|
+
const m = text.match(/https?:\/\/[^\s"'<>)\]]+/i);
|
|
294
|
+
if (m === null)
|
|
295
|
+
return null;
|
|
296
|
+
// Trim trailing sentence punctuation the greedy match swallows when the
|
|
297
|
+
// URL ends a sentence ("…/sign-up." → "…/sign-up").
|
|
298
|
+
const raw = m[0].replace(/[.,;:!?]+$/, "");
|
|
299
|
+
try {
|
|
300
|
+
const u = new URL(raw);
|
|
301
|
+
if (u.protocol !== "http:" && u.protocol !== "https:")
|
|
302
|
+
return null;
|
|
303
|
+
return u.toString();
|
|
304
|
+
}
|
|
305
|
+
catch {
|
|
306
|
+
return null;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
// Resolve a service's signup URL.
|
|
310
|
+
//
|
|
311
|
+
// The old path was guessSignupUrl() alone: it templated `<slug>.com/signup`
|
|
312
|
+
// + a hand-maintained domain table. Every product whose real domain isn't
|
|
313
|
+
// `.com` (xata.io, fly.io, hyperbolic.xyz, …) died at the FIRST navigation —
|
|
314
|
+
// before the vision planner, the smartest part of the bot, ever loaded a
|
|
315
|
+
// page. The intelligence was in the wrong place: a vision-grade form-filler
|
|
316
|
+
// bolted onto a dumb string template for the front door.
|
|
317
|
+
//
|
|
318
|
+
// Resolution order now: a promoted skill's verified `signup_url` (injected
|
|
319
|
+
// lookupSkillUrl) → ASK the model (which knows where products live) → the
|
|
320
|
+
// `.com` guess. The model's answer is self-verifying: the navigation that
|
|
321
|
+
// follows surfaces a wrong URL as a 404 / cert / DNS failure (recovered by
|
|
322
|
+
// the looksLikeSignupPage → Google-search fallback), so a hallucinated URL
|
|
323
|
+
// is no worse than the old guess. With no LLM wired it degrades to the guess.
|
|
324
|
+
//
|
|
325
|
+
// Exported for unit testing.
|
|
326
|
+
export async function resolveSignupUrl(service, llm, opts = {}) {
|
|
327
|
+
// A promoted skill's entry URL beats the model — it's verified by a real
|
|
328
|
+
// prior signup, not asserted. Consult it before spending an LLM call.
|
|
329
|
+
if (opts.lookupSkillUrl !== undefined) {
|
|
330
|
+
try {
|
|
331
|
+
const fromSkill = await opts.lookupSkillUrl();
|
|
332
|
+
if (fromSkill !== null) {
|
|
333
|
+
opts.log?.(`Resolved signup URL for "${service}" from a promoted skill: ${fromSkill}`);
|
|
334
|
+
return fromSkill;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
catch (err) {
|
|
338
|
+
opts.log?.(`skill-URL lookup failed for "${service}" (${err instanceof Error ? err.message : String(err)}) — trying the model`);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
// No model available → preserve the old deterministic behavior exactly.
|
|
342
|
+
if (llm === null || llm === undefined)
|
|
343
|
+
return guessSignupUrl(service);
|
|
344
|
+
try {
|
|
345
|
+
const resp = await llm.createMessage({
|
|
346
|
+
system: "You map a developer-tool / SaaS product name to its canonical " +
|
|
347
|
+
"account SIGN-UP (registration) URL — the page with the email or " +
|
|
348
|
+
"OAuth signup form, not the marketing homepage and not the docs. " +
|
|
349
|
+
"Use the product's REAL domain, which is frequently .io / .dev / " +
|
|
350
|
+
".ai / .xyz / .co and NOT .com. If signup lives on a dashboard / " +
|
|
351
|
+
"app / console subdomain (dash.*, app.*, console.*), return that " +
|
|
352
|
+
"exact URL. Respond with ONLY the URL on a single line, no prose. " +
|
|
353
|
+
"If you are not confident, respond with exactly UNKNOWN.",
|
|
354
|
+
user: [{ kind: "text", text: `Account sign-up URL for the product "${service}"?` }],
|
|
355
|
+
max_tokens: 80,
|
|
356
|
+
});
|
|
357
|
+
const url = firstHttpsUrl(resp.text);
|
|
358
|
+
if (url !== null) {
|
|
359
|
+
opts.log?.(`Resolved signup URL for "${service}" via ${resp.backend}: ${url}`);
|
|
360
|
+
return url;
|
|
361
|
+
}
|
|
362
|
+
opts.log?.(`Model gave no usable signup URL for "${service}" (said ${JSON.stringify(resp.text.trim().slice(0, 40))}) — using guess`);
|
|
363
|
+
}
|
|
364
|
+
catch (err) {
|
|
365
|
+
opts.log?.(`signup-URL model resolve failed for "${service}" (${err instanceof Error ? err.message : String(err)}) — using guess`);
|
|
366
|
+
}
|
|
367
|
+
return guessSignupUrl(service);
|
|
334
368
|
}
|
|
335
369
|
// True when the URL is a Google search results page — used to gate
|
|
336
370
|
// the prewarm + the post-load "did we land somewhere useful?" check.
|
|
@@ -2907,7 +2941,16 @@ export class SignupAgent {
|
|
|
2907
2941
|
// than the signup page, and the bot would bail with
|
|
2908
2942
|
// oauth_required when it landed on a page that didn't show the
|
|
2909
2943
|
// OAuth buttons until you clicked "Sign up" first.
|
|
2910
|
-
|
|
2944
|
+
// A curated signupUrl (from the YAML queue) always wins. Otherwise
|
|
2945
|
+
// resolve via the model (promoted-skill signup_url → LLM → .com guess)
|
|
2946
|
+
// so non-.com products (xata.io, fly.io, …) don't die at navigation.
|
|
2947
|
+
const guessed = task.signupUrl ??
|
|
2948
|
+
(await resolveSignupUrl(task.service, this.llmPair.primary, {
|
|
2949
|
+
log: (m) => steps.push(m),
|
|
2950
|
+
...(task.lookupSkillUrl !== undefined
|
|
2951
|
+
? { lookupSkillUrl: () => task.lookupSkillUrl(task.service) }
|
|
2952
|
+
: {}),
|
|
2953
|
+
}));
|
|
2911
2954
|
let signupUrl = guessed;
|
|
2912
2955
|
// Prewarm the target origin before hitting the (often-strict) signup
|
|
2913
2956
|
// page. Two things this buys us:
|
|
@@ -2938,17 +2981,13 @@ export class SignupAgent {
|
|
|
2938
2981
|
// the bot recover from a wrong canonical guess (e.g. a service
|
|
2939
2982
|
// that uses /register or a non-`.com` TLD).
|
|
2940
2983
|
//
|
|
2941
|
-
//
|
|
2942
|
-
//
|
|
2943
|
-
//
|
|
2944
|
-
//
|
|
2945
|
-
//
|
|
2946
|
-
//
|
|
2947
|
-
|
|
2948
|
-
const usedKnownFullUrl = isKnownDomainFullUrlMatch(task.service, guessed);
|
|
2949
|
-
if (task.signupUrl === undefined &&
|
|
2950
|
-
!usedKnownFullUrl &&
|
|
2951
|
-
!(await this.looksLikeSignupPage())) {
|
|
2984
|
+
// A curated task.signupUrl is trusted as-is (no fallback). Otherwise
|
|
2985
|
+
// — whether the URL came from a promoted skill, the model, or the
|
|
2986
|
+
// .com guess — verify it looks like a signup page and fall back to
|
|
2987
|
+
// the search-and-find path if not. (A promoted-skill URL is replay-
|
|
2988
|
+
// verified, so it passes; an LLM/.com guess that's wrong is recovered
|
|
2989
|
+
// here.)
|
|
2990
|
+
if (task.signupUrl === undefined && !(await this.looksLikeSignupPage())) {
|
|
2952
2991
|
steps.push(`${guessed} didn't look like a signup page — searching for the real one`);
|
|
2953
2992
|
const fallbackSearch = `https://www.google.com/search?q=${encodeURIComponent(`${task.service} signup`)}`;
|
|
2954
2993
|
await this.browser.goto(fallbackSearch);
|
|
@@ -3366,7 +3405,7 @@ export class SignupAgent {
|
|
|
3366
3405
|
if (matchNum !== null) {
|
|
3367
3406
|
// rc.26 — surface in real-time via stderr as well as the
|
|
3368
3407
|
// step trail. The step trail only renders after the run
|
|
3369
|
-
// ends; stderr lands in the
|
|
3408
|
+
// ends; stderr lands in the housekeeper output immediately,
|
|
3370
3409
|
// inside the 2-minute window the user has to react.
|
|
3371
3410
|
console.error(`[universal-bot] GOOGLE NUMBER-MATCH: tap "${matchNum}" on your phone — 2 minute window`);
|
|
3372
3411
|
steps.push(`Google: match the number ${matchNum} on your phone — ` +
|
|
@@ -3877,7 +3916,7 @@ export class SignupAgent {
|
|
|
3877
3916
|
// that never clears for our Chromium fingerprint; the planner's
|
|
3878
3917
|
// done reason / wait reasons name the vendor explicitly. Classify
|
|
3879
3918
|
// as anti_bot_blocked so the operator sees an accurate status
|
|
3880
|
-
// (and the
|
|
3919
|
+
// (and the housekeeper routes it the same way as the form-fill-
|
|
3881
3920
|
// phase anti-bot detector does).
|
|
3882
3921
|
const ANTI_BOT_REASON = /\b(?:cloudflare\b.*?(?:verification|challenge|check)|just\s+a\s+moment|verifying\s+you\s+are\s+human|0\s+interactive\s+elements)/i;
|
|
3883
3922
|
if (this.lastPostVerifyDoneReason !== null &&
|
|
@@ -3911,7 +3950,7 @@ export class SignupAgent {
|
|
|
3911
3950
|
// (detectExistingAccountNoExtract) classifies a run that lands on
|
|
3912
3951
|
// an authenticated dashboard whose API-keys page surfaces only
|
|
3913
3952
|
// masked existing keys + no path to a fresh value. Surfacing this
|
|
3914
|
-
// distinctly so the
|
|
3953
|
+
// distinctly so the housekeeper can flag it (e.g. periodically wipe
|
|
3915
3954
|
// the chrome profile for the test identity) rather than treat it
|
|
3916
3955
|
// as a real bot failure.
|
|
3917
3956
|
if (this.lastPostVerifyDoneReason !== null &&
|
|
@@ -4445,6 +4484,15 @@ ${formatInventory(input.inventory)}`,
|
|
|
4445
4484
|
let stuckFiresAtUrl = 0;
|
|
4446
4485
|
let lastStuckFireUrl = null;
|
|
4447
4486
|
const triedFallbackUrls = new Set();
|
|
4487
|
+
// Dead-URL memory. The planner guesses credential-page URLs
|
|
4488
|
+
// (e.g. /user/personal_access_tokens/new) that 404; without memory it
|
|
4489
|
+
// re-guesses the same dead URL round after round — xata and fly each
|
|
4490
|
+
// burned all their post-verify rounds this way. Record any URL that
|
|
4491
|
+
// lands on a 404 and refuse to re-navigate to it, forcing a click-based
|
|
4492
|
+
// re-plan instead. (Separate from triedFallbackUrls, which is the bot's
|
|
4493
|
+
// OWN escalation guesses; this tracks the PLANNER's dead navigates.)
|
|
4494
|
+
const deadUrls = new Set();
|
|
4495
|
+
let lastNavigatedTo = null;
|
|
4448
4496
|
// 0.8.3-rc.1 — per-URL set of wizard-forward escalations attempted.
|
|
4449
4497
|
// Used so we only force-click the visible Next/Submit once per page
|
|
4450
4498
|
// state; if it didn't unstick, fall through to URL fallbacks.
|
|
@@ -4657,7 +4705,7 @@ ${formatInventory(input.inventory)}`,
|
|
|
4657
4705
|
// rc.22 — redact tokens before pushing to the step trail.
|
|
4658
4706
|
// The planner's reason field sometimes quotes the actual API
|
|
4659
4707
|
// value it just observed ("The full API token 'sbp_xxx' is
|
|
4660
|
-
// visible…"); the
|
|
4708
|
+
// visible…"); the housekeeper then posts step trails to a public
|
|
4661
4709
|
// GitHub issue, leaking the credential. Redactor patterns mirror
|
|
4662
4710
|
// tools/archived-harvester/redact.mjs — defense in depth.
|
|
4663
4711
|
args.steps.push(`Post-verify ${round + 1}/${args.maxRounds}: ${nextStep.kind} — ${redactCredentials(nextStep.reason)}`);
|
|
@@ -4704,6 +4752,27 @@ ${formatInventory(input.inventory)}`,
|
|
|
4704
4752
|
}
|
|
4705
4753
|
})();
|
|
4706
4754
|
}
|
|
4755
|
+
// Dead-URL memory. If the previous step navigated somewhere and we
|
|
4756
|
+
// landed on a 404, remember the target so we never go back.
|
|
4757
|
+
if (lastNavigatedTo !== null) {
|
|
4758
|
+
const t404 = (state.title ?? "").toLowerCase();
|
|
4759
|
+
if (t404.includes("404") || t404.includes("not found")) {
|
|
4760
|
+
deadUrls.add(lastNavigatedTo);
|
|
4761
|
+
args.steps.push(`Post-verify: navigate to ${lastNavigatedTo} hit a 404 — added to the do-not-revisit list (${deadUrls.size} dead URL(s)).`);
|
|
4762
|
+
}
|
|
4763
|
+
lastNavigatedTo = null;
|
|
4764
|
+
}
|
|
4765
|
+
// Refuse to re-navigate to a URL already known to 404 — force a
|
|
4766
|
+
// click-based re-plan instead of letting the planner re-guess it.
|
|
4767
|
+
if (nextStep.kind === "navigate" && deadUrls.has(nextStep.url)) {
|
|
4768
|
+
args.steps.push(`Post-verify: planner re-picked a known-dead URL (${nextStep.url}) — re-planning.`);
|
|
4769
|
+
hint =
|
|
4770
|
+
`The URL ${nextStep.url} returns a 404 — do NOT navigate there again. ` +
|
|
4771
|
+
`Dead URLs (404, avoid all): ${[...deadUrls].join(", ")}. ` +
|
|
4772
|
+
`Reach the credentials/API-keys page by CLICKING a link in the current ` +
|
|
4773
|
+
`inventory (e.g. "API Keys", "Tokens", "Settings"), not by guessing a URL.`;
|
|
4774
|
+
continue;
|
|
4775
|
+
}
|
|
4707
4776
|
// rc.39 — navigate-loop detector. Perplexity/Koyeb/Porter spun
|
|
4708
4777
|
// 5+ rounds of `navigate` because each navigate landed back at
|
|
4709
4778
|
// the same URL — the service redirected past the requested URL.
|
|
@@ -4738,6 +4807,9 @@ ${formatInventory(input.inventory)}`,
|
|
|
4738
4807
|
}
|
|
4739
4808
|
if (nextStep.kind === "navigate") {
|
|
4740
4809
|
prevNavigateFromUrl = state.url;
|
|
4810
|
+
// Remember where we're going so the next round can blocklist it
|
|
4811
|
+
// if it 404s.
|
|
4812
|
+
lastNavigatedTo = nextStep.url;
|
|
4741
4813
|
}
|
|
4742
4814
|
else {
|
|
4743
4815
|
prevNavigateFromUrl = null;
|