@developerz.ai/ui-debugger-mcp 1.5.2 → 1.7.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 (43) hide show
  1. package/README.md +71 -3
  2. package/dist/adapters/browser/browser-adapter.d.ts +1 -1
  3. package/dist/adapters/browser/browser-adapter.js +11 -4
  4. package/dist/adapters/browser/browser-adapter.js.map +1 -1
  5. package/dist/adapters/browser/launch.d.ts +12 -0
  6. package/dist/adapters/browser/launch.js +33 -0
  7. package/dist/adapters/browser/launch.js.map +1 -1
  8. package/dist/adapters/browser/log-format.d.ts +17 -5
  9. package/dist/adapters/browser/log-format.js +41 -4
  10. package/dist/adapters/browser/log-format.js.map +1 -1
  11. package/dist/agent/prompts/compose.d.ts +29 -2
  12. package/dist/agent/prompts/compose.js +37 -4
  13. package/dist/agent/prompts/compose.js.map +1 -1
  14. package/dist/config/schema.d.ts +54 -0
  15. package/dist/config/schema.js +62 -0
  16. package/dist/config/schema.js.map +1 -1
  17. package/dist/errors.d.ts +11 -0
  18. package/dist/errors.js +15 -0
  19. package/dist/errors.js.map +1 -1
  20. package/dist/index.d.ts +1 -1
  21. package/dist/index.js +1 -1
  22. package/dist/mcp/tools/describe.js +5 -2
  23. package/dist/mcp/tools/describe.js.map +1 -1
  24. package/dist/mcp/tools/get-findings.js +16 -4
  25. package/dist/mcp/tools/get-findings.js.map +1 -1
  26. package/dist/mcp/tools/output.d.ts +11 -0
  27. package/dist/mcp/tools/output.js +25 -0
  28. package/dist/mcp/tools/output.js.map +1 -1
  29. package/dist/mcp/tools/result.d.ts +17 -3
  30. package/dist/mcp/tools/result.js +24 -10
  31. package/dist/mcp/tools/result.js.map +1 -1
  32. package/dist/mcp/tools/start-debug.js +21 -1
  33. package/dist/mcp/tools/start-debug.js.map +1 -1
  34. package/dist/services/debug-service.d.ts +56 -1
  35. package/dist/services/debug-service.js +85 -11
  36. package/dist/services/debug-service.js.map +1 -1
  37. package/dist/services/login.d.ts +78 -0
  38. package/dist/services/login.js +200 -0
  39. package/dist/services/login.js.map +1 -0
  40. package/dist/services/session-builder.d.ts +4 -1
  41. package/dist/services/session-builder.js +62 -15
  42. package/dist/services/session-builder.js.map +1 -1
  43. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"start-debug.js","sourceRoot":"","sources":["../../../src/mcp/tools/start-debug.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,qEAAqE;AACrE,MAAM,UAAU,cAAc,CAAC,OAAiB;IAC9C,OAAO;QACL,IAAI,EAAE,aAAa;QACnB,QAAQ,CAAC,MAAM;YACb,MAAM,CAAC,YAAY,CACjB,aAAa,EACb;gBACE,KAAK,EAAE,mBAAmB;gBAC1B,WAAW,EACT,mFAAmF;oBACnF,sFAAsF;oBACtF,qFAAqF;oBACrF,oEAAoE;gBACtE,WAAW,EAAE;oBACX,eAAe,EAAE,KAAK;oBACtB,aAAa,EAAE,IAAI;iBACpB;gBACD,WAAW,EAAE;oBACX,MAAM,EAAE,CAAC;yBACN,MAAM,EAAE;yBACR,GAAG,CAAC,CAAC,CAAC;yBACN,QAAQ,CACP,4FAA4F,CAC7F;oBACH,IAAI,EAAE,CAAC;yBACJ,MAAM,EAAE;yBACR,GAAG,CAAC,CAAC,CAAC;yBACN,QAAQ,CACP,8FAA8F,CAC/F;oBACH,GAAG,EAAE,CAAC;yBACH,GAAG,EAAE;yBACL,QAAQ,EAAE;yBACV,QAAQ,CACP,qOAAqO,CACtO;oBACH,QAAQ,EAAE,CAAC;yBACR,MAAM,EAAE;yBACR,QAAQ,EAAE;yBACV,QAAQ,CACP,+EAA+E,CAChF;oBACH,OAAO,EAAE,CAAC;yBACP,MAAM,EAAE;yBACR,GAAG,EAAE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,EAAE;yBACR,GAAG,CAAC,CAAC,CAAC;yBACN,QAAQ,CACP,8FAA8F,CAC/F;oBACH,GAAG,EAAE,CAAC;yBACH,GAAG,EAAE;yBACL,QAAQ,EAAE;yBACV,QAAQ,CACP,qOAAqO,CACtO;oBACH,EAAE,EAAE,CAAC;yBACF,MAAM,EAAE;yBACR,GAAG,CAAC,CAAC,CAAC;yBACN,QAAQ,EAAE;yBACV,QAAQ,CACP,8EAA8E;wBAC5E,uEAAuE;wBACvE,+EAA+E;wBAC/E,kEAAkE,CACrE;oBACH,OAAO,EAAE,CAAC;yBACP,OAAO,EAAE;yBACT,QAAQ,EAAE;yBACV,QAAQ,CACP,gFAAgF;wBAC9E,iFAAiF;wBACjF,iFAAiF;wBACjF,8EAA8E;wBAC9E,0EAA0E,CAC7E;oBACH,QAAQ,EAAE,CAAC;yBACR,MAAM,EAAE;yBACR,QAAQ,EAAE;yBACV,QAAQ,CACP,+EAA+E,CAChF;oBACH,OAAO,EAAE,CAAC;yBACP,MAAM,EAAE;yBACR,GAAG,EAAE;yBACL,QAAQ,EAAE;yBACV,GAAG,CAAC,SAAS,CAAC;yBACd,QAAQ,EAAE;yBACV,QAAQ,CACP,oPAAoP,CACrP;iBACJ;gBACD,YAAY,EAAE,iBAAiB;aAChC,EACD,KAAK,EAAE,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,CAC7B,YAAY,CACV,MAAM,OAAO,CAAC,KAAK,CAAC;gBAClB,GAAG,IAAI;gBACP,GAAG,CAAC,OAAO,KAAK,SAAS,IAAI,EAAE,SAAS,EAAE,OAAO,GAAG,IAAI,EAAE,CAAC;aAC5D,CAAC,CACH,CACJ,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -29,7 +29,7 @@ import { type ResolvedConfig } from '../config/load.js';
29
29
  import type { Target } from '../config/schema.js';
30
30
  import { type Findings } from '../findings/schema.js';
31
31
  import type { SessionManager } from '../session/manager.js';
32
- import type { Session, SnapshotField } from '../session/session.js';
32
+ import type { Session, SessionStatus, SnapshotField } from '../session/session.js';
33
33
  import { type StatePort } from '../session/state-file.js';
34
34
  import type { SessionBuilder } from './session-builder.js';
35
35
  /** Default wall-clock cap on a debug run before it auto-ends (overridable per run). */
@@ -41,6 +41,24 @@ export interface StartInput {
41
41
  criteria?: string;
42
42
  /** Per-run URL the caller points the driver at (web); overrides the target's configured url. */
43
43
  url?: string;
44
+ /**
45
+ * Named auth persona to open the run as — a key in the target's `auth` map. The
46
+ * run signs in out-of-band before the driver's first step; an unknown key fails
47
+ * loud rather than running the goal signed out.
48
+ */
49
+ as?: string;
50
+ /**
51
+ * Take the project over instead of being refused when a run is already active
52
+ * here: end that run first (through the `end_session` path), then start.
53
+ *
54
+ * OFF by default, and it must stay off by default — a silent takeover kills a
55
+ * healthy run its own caller is still watching. Opt in when the active run is
56
+ * yours and you lost its id (a compacted context, a crashed client) or it is
57
+ * stuck. Only ever replaces a run THIS server owns; one held by another live
58
+ * server is still refused ({@link SessionBusyError}), since its browser is not
59
+ * ours to close.
60
+ */
61
+ replace?: boolean;
44
62
  /**
45
63
  * Wall-clock cap (ms) before the run auto-ends, counted from THIS call — assembly,
46
64
  * launch and the first navigation spend it too. Defaults to
@@ -84,6 +102,31 @@ export interface TargetInfo {
84
102
  url?: string;
85
103
  /** Web headless flag, when applicable. */
86
104
  headless?: boolean;
105
+ /**
106
+ * Named auth personas configured for this target — the valid `start_debug({as})`
107
+ * values. NAMES ONLY; the credentials never leave `.ui-debugger-mcp.json`.
108
+ * Absent when the target has no `auth` block.
109
+ */
110
+ personas?: string[];
111
+ /**
112
+ * The target's standing `notes` — what is EXPECTED of this app (seeded data,
113
+ * onboarding modals, dark mode), verbatim from config. Also composed into the
114
+ * driver's prompt; surfaced here so a caller can see what the run was told.
115
+ */
116
+ notes?: string;
117
+ }
118
+ /**
119
+ * The run this server holds for the project, as `describe` reports it — the way
120
+ * back in-band for a caller that lost its `session_id` (a compacted context, a
121
+ * client restart). Without it the only recovery was the out-of-band CLI.
122
+ */
123
+ export interface RunInfo {
124
+ /** Pass to `get_findings` / `send_message` / `end_session`. */
125
+ id: string;
126
+ /** `running`, or the verdict it settled on (still readable, still holding the slot). */
127
+ status: SessionStatus;
128
+ /** The goal this run was started with — enough to tell whose run it is. */
129
+ goal: string;
87
130
  }
88
131
  /** `describe` output — configured targets plus the resolved models + workspace. */
89
132
  export interface DescribeResult {
@@ -95,6 +138,12 @@ export interface DescribeResult {
95
138
  };
96
139
  /** Resolved per-project workspace root (`<base>/<project>`) — where evidence lands. */
97
140
  workspace: string;
141
+ /**
142
+ * The active run for this project (or the retained snapshot of the last one that
143
+ * auto-ended). Absent when this server holds no run. A run another live server
144
+ * owns is NOT reported here — `start_debug` names that one in its refusal.
145
+ */
146
+ session?: RunInfo;
98
147
  }
99
148
  /** The surface the outer MCP tools call. Implemented by {@link DebugService}. */
100
149
  export interface DebugApi {
@@ -146,6 +195,12 @@ export declare class DebugService implements DebugApi {
146
195
  * `timeout` is wall-clock from HERE: the deadline is fixed on entry and the
147
196
  * remaining budget is threaded into the build and the first navigation, so a slow
148
197
  * Chrome launch spends the caller's cap instead of sitting outside it.
198
+ *
199
+ * The refusal is the default and stays the default; `replace: true` is the
200
+ * caller's explicit takeover. Either way the caller ends up with a way forward:
201
+ * the refusal names the active id and the exact calls that read, close or
202
+ * replace it, and `describe` reports that id at any time — so a lost session id
203
+ * is a detour, not the dead end that used to need the out-of-band CLI.
149
204
  */
150
205
  start(input: StartInput): Promise<StartResult>;
151
206
  /**
@@ -96,18 +96,32 @@ export class DebugService {
96
96
  * `timeout` is wall-clock from HERE: the deadline is fixed on entry and the
97
97
  * remaining budget is threaded into the build and the first navigation, so a slow
98
98
  * Chrome launch spends the caller's cap instead of sitting outside it.
99
+ *
100
+ * The refusal is the default and stays the default; `replace: true` is the
101
+ * caller's explicit takeover. Either way the caller ends up with a way forward:
102
+ * the refusal names the active id and the exact calls that read, close or
103
+ * replace it, and `describe` reports that id at any time — so a lost session id
104
+ * is a detour, not the dead end that used to need the out-of-band CLI.
99
105
  */
100
106
  async start(input) {
101
107
  const cwd = this.#cwd;
102
- if (this.#manager.has(cwd)) {
103
- throw new SessionBusyError(`A debug session ('${this.#manager.get(cwd).id}') is already active for '${cwd}'. ` +
104
- 'End it before starting another — one run per project at a time.');
105
- }
106
- // Taken synchronously (no await since the has() check) — a concurrent start
107
- // must fail here, not launch a second browser on the same profile.
108
+ // Checked first, and synchronously (no await before `#starting` is set) — a
109
+ // concurrent start must fail here, not launch a second browser on the same
110
+ // profile. Ahead of `replace` on purpose: a run that is still opening owns no
111
+ // manager slot to hand over, and racing its teardown is how a half-launched
112
+ // Chrome gets orphaned on the profile lock.
108
113
  if (this.#starting !== undefined) {
109
- throw new SessionBusyError(`A debug session is already starting for '${cwd}'. ` +
110
- 'Wait for it to open (or end it) before starting another — one run per project at a time.');
114
+ throw new SessionBusyError(`A debug session is already starting for '${cwd}' — one run per project at a time. ` +
115
+ 'Wait a moment for it to open, then describe() names it, ' +
116
+ 'get_findings({session_id}) reads it, and end_session({session_id}) closes it.');
117
+ }
118
+ if (this.#manager.has(cwd) && input.replace !== true) {
119
+ const active = this.#manager.get(cwd).id;
120
+ throw new SessionBusyError(`A debug session ('${active}') is already active for '${cwd}' — one run per project at a ` +
121
+ `time. Read what it is doing with get_findings({session_id:'${active}'}), close it with ` +
122
+ `end_session({session_id:'${active}'}), or take the project over with ` +
123
+ 'start_debug({…, replace:true}), which ends that run first. describe() reports this id ' +
124
+ 'at any time, so a lost session id never wedges the project.');
111
125
  }
112
126
  // Before anything is launched: a run built from config the caller has already
113
127
  // replaced is worse than no run — it reproduces the very failure they just fixed.
@@ -135,11 +149,15 @@ export class DebugService {
135
149
  * already came up and drops the breadcrumb, so nothing is left holding the
136
150
  * project's profile lock.
137
151
  */
138
- async #launch({ target, goal, criteria, url }, deadline, signal) {
152
+ async #launch({ target, goal, criteria, url, as, replace }, deadline, signal) {
139
153
  const cwd = this.#cwd;
140
154
  /** Budget left on the caller's cap; never negative — a blown budget is simply spent. */
141
155
  const remaining = () => Math.max(0, deadline - this.#now());
142
156
  await this.#assertNoForeignRun(cwd);
157
+ // The caller asked to take the project over. Before the breadcrumb, so the
158
+ // takeover's `clear()` cannot wipe the record of the run replacing it.
159
+ if (replace === true)
160
+ await this.#takeOverActive();
143
161
  const id = generateSessionId(this.#now());
144
162
  // The breadcrumb goes down BEFORE the launch, not after it: a cold Chrome start
145
163
  // takes 5-20s, and until `state.json` exists the run is invisible out-of-band —
@@ -150,7 +168,15 @@ export class DebugService {
150
168
  await this.#state.record({ sessionId: id, target, goal });
151
169
  try {
152
170
  this.#assertStartNotAborted(signal, id);
153
- const built = await this.#build({ id, target, goal, criteria, url, timeoutMs: remaining() });
171
+ const built = await this.#build({
172
+ id,
173
+ target,
174
+ goal,
175
+ criteria,
176
+ url,
177
+ as,
178
+ timeoutMs: remaining(),
179
+ });
154
180
  try {
155
181
  this.#assertStartNotAborted(signal, id);
156
182
  this.#manager.start(cwd, built.session);
@@ -195,6 +221,23 @@ export class DebugService {
195
221
  'is shutting down (SIGTERM, `ui-debugger-mcp stop`, or the MCP client disconnected). ' +
196
222
  'Nothing was left running; start again once the server is back.');
197
223
  }
224
+ /**
225
+ * `replace: true` — end the run this server holds for the project so the new one
226
+ * can have it. No-op when nothing is active: replacing nothing is just a start.
227
+ *
228
+ * Deliberately routed through {@link end}, the very method `end_session` calls,
229
+ * rather than a private teardown: releasing a target correctly means the managed
230
+ * browser is STOPPED while an attached one is only DISCONNECTED, the wall-clock
231
+ * timer is cleared and the breadcrumb dropped — a second implementation of that
232
+ * would drift, and the drift would show up as a leaked Chrome sitting on the
233
+ * profile lock. A teardown that throws fails the start, loudly; the manager frees
234
+ * the slot before closing, so the project is not wedged either way.
235
+ */
236
+ async #takeOverActive() {
237
+ if (!this.#manager.has(this.#cwd))
238
+ return;
239
+ await this.end({ session_id: this.#manager.get(this.#cwd).id });
240
+ }
198
241
  /**
199
242
  * Refuse to start on config this server can no longer honour.
200
243
  *
@@ -303,6 +346,7 @@ export class DebugService {
303
346
  if (target !== undefined && selected.length === 0) {
304
347
  throw new TargetNotFoundError(`target '${target}' not found in config.targets`);
305
348
  }
349
+ const session = this.#currentRun();
306
350
  return {
307
351
  targets: selected.map(([name, config]) => describeTarget(name, config)),
308
352
  models: this.#config.models,
@@ -310,8 +354,26 @@ export class DebugService {
310
354
  // this to the relative evidence paths it gets back, and `./tmp/ui-debugger-mcp`
311
355
  // would send it looking one directory short of where anything lands.
312
356
  workspace: workspacePaths(this.#cwd, this.#config.workspace).root,
357
+ ...(session && { session }),
313
358
  };
314
359
  }
360
+ /**
361
+ * The run this server holds for the project — the active one, or the retained
362
+ * snapshot of the last run that auto-ended (both are readable and both are
363
+ * `end_session`-able by their id). `undefined` when there is none.
364
+ *
365
+ * This is the in-band answer to a lost `session_id`: without it, a caller whose
366
+ * context was compacted mid-conversation could neither read the run nor close
367
+ * it, and the only recovery left was `ui-debugger-mcp stop` in a shell the
368
+ * caller may not have. A start still in flight is deliberately not reported —
369
+ * it has no id to hand out yet, and the busy error says to wait for it.
370
+ */
371
+ #currentRun() {
372
+ const session = this.#manager.has(this.#cwd) ? this.#manager.get(this.#cwd) : this.#retained;
373
+ if (session === undefined)
374
+ return undefined;
375
+ return { id: session.id, status: session.status, goal: session.story };
376
+ }
315
377
  /**
316
378
  * End the active run: abort the loop, close the adapter, free the profile lock.
317
379
  * Ending a run that already auto-ended (timeout / client death) is not an error
@@ -418,9 +480,21 @@ function describeTarget(name, target) {
418
480
  adapter: target.adapter,
419
481
  mode: isAttach(target) ? 'attach' : 'managed',
420
482
  operational: true,
483
+ // What the project declares is EXPECTED of this app — the driver already gets
484
+ // it in its prompt; the caller sees it here so "the table is empty" coming back
485
+ // as a non-finding is explainable without opening the config file.
486
+ ...(target.notes !== undefined && { notes: target.notes }),
421
487
  };
422
488
  if (target.adapter === 'browser') {
423
- return { ...base, url: target.url, headless: target.headless };
489
+ // Persona NAMES are the discoverable half — a caller can pick a valid `as`
490
+ // without opening the config file, and never sees the values.
491
+ const personas = Object.keys(target.auth ?? {});
492
+ return {
493
+ ...base,
494
+ url: target.url,
495
+ headless: target.headless,
496
+ ...(personas.length > 0 && { personas }),
497
+ };
424
498
  }
425
499
  return base;
426
500
  }
@@ -1 +1 @@
1
- {"version":3,"file":"debug-service.js","sourceRoot":"","sources":["../../src/services/debug-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,eAAe,EAAuB,MAAM,mBAAmB,CAAC;AAEzE,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAiB,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGtE,OAAO,EAAE,aAAa,EAAkB,MAAM,0BAA0B,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAG5E,uFAAuF;AACvF,MAAM,CAAC,MAAM,0BAA0B,GAAG,OAAO,CAAC;AA2GlD;;;GAGG;AACH,SAAS,eAAe,CAAC,QAAkB,EAAE,MAAgC;IAC3E,MAAM,GAAG,GAAsB,EAAE,CAAC;IAClC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,2EAA2E;QAC3E,kEAAkE;QACjE,GAA+B,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC5D,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,OAAO,YAAY;IACd,QAAQ,CAA0B;IAClC,OAAO,CAAiB;IACxB,IAAI,CAAS;IACb,MAAM,CAAiB;IACvB,MAAM,CAAY;IAClB,iBAAiB,CAAS;IAC1B,IAAI,CAAe;IACnB,cAAc,CAAgB;IACvC,2EAA2E;IAC3E,MAAM,CAA4C;IAClD;;;;;OAKG;IACH,SAAS,CAA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C,IAAY,EAAE,MAAc;IAClD,MAAM,IAAI,GAAe;QACvB,IAAI;QACJ,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;QAC7C,WAAW,EAAE,IAAI;QACjB,8EAA8E;QAC9E,gFAAgF;QAChF,mEAAmE;QACnE,GAAG,CAAC,MAAM,CAAC,KAAK,KAAK,SAAS,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC;KAC3D,CAAC;IACF,IAAI,MAAM,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;QACjC,2EAA2E;QAC3E,8DAA8D;QAC9D,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;QAChD,OAAO;YACL,GAAG,IAAI;YACP,GAAG,EAAE,MAAM,CAAC,GAAG;YACf,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,GAAG,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,QAAQ,EAAE,CAAC;SACzC,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,78 @@
1
+ /**
2
+ * Named auth personas — signing in for the run, before the driver's first step.
3
+ *
4
+ * `debugLogin` skips a CAPTCHA; it never skipped auth. So every goal string had
5
+ * to re-teach the login flow in prose, which cost driver steps on every run and
6
+ * put credentials in a free-text field that gets logged. A persona
7
+ * (`targets.<t>.auth.<name>` — see `config/schema.ts`) states the recipe once and
8
+ * `start_debug({as})` names it.
9
+ *
10
+ * **Out-of-band, not in-trail.** The login runs HERE, through the same adapter
11
+ * contract the belt uses, between `adapter.open()` and the loop's first step —
12
+ * the driver never performs it. Two reasons, both structural:
13
+ *
14
+ * - *The secret must never enter the model's context.* That is already the rule
15
+ * for credential headers and `?token=` params (`log-format.ts`). A recipe
16
+ * composed into the system prompt would ship the password to the provider on
17
+ * EVERY step, which is a strictly worse posture than the one the repo holds
18
+ * everywhere else.
19
+ * - *Steps are the scarce resource.* An in-trail login spends 4-8 of the run's
20
+ * steps, and the run's context, on work that has one correct answer.
21
+ *
22
+ * The cost is that a changed form cannot be improvised around. That is paid back
23
+ * as an {@link AuthError} naming the persona and the control that did not
24
+ * resolve, thrown out of `start_debug` before a step is spent — which is a better
25
+ * answer than a driver quietly reporting empty pages behind a login it never got
26
+ * through.
27
+ *
28
+ * The trail stays honest: every action here is recorded as a {@link Step} the
29
+ * same way `act` records its own, marked as the pre-run login rather than a
30
+ * driver decision, with the values never written down.
31
+ */
32
+ import type { Adapter } from '../adapters/contract.js';
33
+ import type { AuthPersona, Target } from '../config/schema.js';
34
+ import type { Step } from '../findings/schema.js';
35
+ /** What `start_debug({as})` resolved to — the persona plus the key that named it. */
36
+ export interface ResolvedAuth {
37
+ /** The `as` key, as the caller typed it — every failure names it. */
38
+ name: string;
39
+ persona: AuthPersona;
40
+ }
41
+ /**
42
+ * Resolve `start_debug({as})` against the target's configured personas.
43
+ *
44
+ * Fails loud ({@link ConfigError}) on an unknown key, listing the valid ones — an
45
+ * `as` typo must NEVER fall through to a signed-out run, because every screen
46
+ * behind the login then reads as a broken UI.
47
+ */
48
+ export declare function resolveAuth(target: Target, targetName: string, as: string | undefined): ResolvedAuth | undefined;
49
+ /**
50
+ * Selectors to try for a field, most specific first — `name`, then `id`/`type`,
51
+ * then `data-testid`, then the two label-ish attributes.
52
+ *
53
+ * Ordered candidates rather than one comma-joined list on purpose: a CSS list
54
+ * resolves in DOCUMENT order, so `{"password": …}` on a page with a "Forgot
55
+ * password?" link above the input would type the password into the link.
56
+ */
57
+ export declare function fieldCandidates(key: string): string[];
58
+ /** Selectors to try for the submit control — the named button, then link, then plain text. */
59
+ export declare function submitCandidates(submit: string): string[];
60
+ /** Everything {@link performLogin} needs beyond the adapter itself. */
61
+ export interface LoginOptions extends ResolvedAuth {
62
+ /** Absolute login URL — `persona.path` already resolved against the target url. */
63
+ loginUrl: string;
64
+ /** The run's remaining wall-clock budget (ms); only ever shortens the login's waits. */
65
+ timeoutMs?: number;
66
+ /** Breadcrumb sink (`logs/agent.log`). The caller's sink is already secret-redacting. */
67
+ log?: (line: string) => void;
68
+ }
69
+ /**
70
+ * Sign in as `persona`, returning the {@link Step}s to splice onto the run's trail.
71
+ *
72
+ * Every failure is an {@link AuthError} that names the persona and the exact
73
+ * control that did not resolve, so the caller fixes the config instead of reading
74
+ * a run's worth of findings about a login page.
75
+ */
76
+ export declare function performLogin(adapter: Adapter, options: LoginOptions): Promise<Step[]>;
77
+ /** Same origin + same path — the query/hash a login flow adds (`?error=1`) does not make it a new page. */
78
+ export declare function samePage(a: string, b: string): boolean;
@@ -0,0 +1,200 @@
1
+ /**
2
+ * Named auth personas — signing in for the run, before the driver's first step.
3
+ *
4
+ * `debugLogin` skips a CAPTCHA; it never skipped auth. So every goal string had
5
+ * to re-teach the login flow in prose, which cost driver steps on every run and
6
+ * put credentials in a free-text field that gets logged. A persona
7
+ * (`targets.<t>.auth.<name>` — see `config/schema.ts`) states the recipe once and
8
+ * `start_debug({as})` names it.
9
+ *
10
+ * **Out-of-band, not in-trail.** The login runs HERE, through the same adapter
11
+ * contract the belt uses, between `adapter.open()` and the loop's first step —
12
+ * the driver never performs it. Two reasons, both structural:
13
+ *
14
+ * - *The secret must never enter the model's context.* That is already the rule
15
+ * for credential headers and `?token=` params (`log-format.ts`). A recipe
16
+ * composed into the system prompt would ship the password to the provider on
17
+ * EVERY step, which is a strictly worse posture than the one the repo holds
18
+ * everywhere else.
19
+ * - *Steps are the scarce resource.* An in-trail login spends 4-8 of the run's
20
+ * steps, and the run's context, on work that has one correct answer.
21
+ *
22
+ * The cost is that a changed form cannot be improvised around. That is paid back
23
+ * as an {@link AuthError} naming the persona and the control that did not
24
+ * resolve, thrown out of `start_debug` before a step is spent — which is a better
25
+ * answer than a driver quietly reporting empty pages behind a login it never got
26
+ * through.
27
+ *
28
+ * The trail stays honest: every action here is recorded as a {@link Step} the
29
+ * same way `act` records its own, marked as the pre-run login rather than a
30
+ * driver decision, with the values never written down.
31
+ */
32
+ import { capWait } from '../adapters/budget.js';
33
+ import { AuthError, ConfigError } from '../errors.js';
34
+ /** Whole-login default budget; the run's remaining cap may only shorten it. */
35
+ const LOGIN_TIMEOUT_MS = 30_000;
36
+ /**
37
+ * Resolve `start_debug({as})` against the target's configured personas.
38
+ *
39
+ * Fails loud ({@link ConfigError}) on an unknown key, listing the valid ones — an
40
+ * `as` typo must NEVER fall through to a signed-out run, because every screen
41
+ * behind the login then reads as a broken UI.
42
+ */
43
+ export function resolveAuth(target, targetName, as) {
44
+ if (as === undefined)
45
+ return undefined;
46
+ if (target.adapter !== 'browser') {
47
+ throw new ConfigError(`'as' (auth persona) only applies to web targets, but '${targetName}' is '${target.adapter}'`);
48
+ }
49
+ const auth = target.auth;
50
+ // `hasOwn`, never a plain index read — `auth['constructor']` walks the prototype
51
+ // chain and answers truthy, and the run would die deeper with a persona of `{}`.
52
+ const persona = auth && Object.hasOwn(auth, as) ? auth[as] : undefined;
53
+ if (persona)
54
+ return { name: as, persona };
55
+ const configured = Object.keys(auth ?? {});
56
+ const known = configured.length > 0
57
+ ? `configured personas: ${configured.map((k) => `'${k}'`).join(', ')}`
58
+ : `target '${targetName}' has no 'auth' block`;
59
+ throw new ConfigError(`unknown auth persona '${as}' for target '${targetName}' — ${known}. ` +
60
+ `Add it under targets.${targetName}.auth in .ui-debugger-mcp.json, or omit 'as' to run signed out.`);
61
+ }
62
+ /**
63
+ * A field key / submit label that is already a selector — used verbatim, never
64
+ * expanded. Deliberately narrow (a leading `.`/`#`/`[`, a `tag#id`/`tag[attr]`, an
65
+ * explicit engine prefix, or XPath) so an ordinary label like `Email address` or
66
+ * `Sign in` is never mistaken for one.
67
+ */
68
+ const SELECTORISH = /^[.#[]|^[a-zA-Z][\w-]*[#[]|^(css|role|text|id|data-testid|xpath)=|^\/\//;
69
+ /** A key safe to interpolate into an `#id` / `[type=…]` selector without quoting. */
70
+ const IDENTIFIER = /^[a-zA-Z][\w-]*$/;
71
+ /**
72
+ * Selectors to try for a field, most specific first — `name`, then `id`/`type`,
73
+ * then `data-testid`, then the two label-ish attributes.
74
+ *
75
+ * Ordered candidates rather than one comma-joined list on purpose: a CSS list
76
+ * resolves in DOCUMENT order, so `{"password": …}` on a page with a "Forgot
77
+ * password?" link above the input would type the password into the link.
78
+ */
79
+ export function fieldCandidates(key) {
80
+ if (SELECTORISH.test(key))
81
+ return [key];
82
+ const v = JSON.stringify(key); // quoted + escaped for an attribute value
83
+ const candidates = [`css=input[name=${v} i], textarea[name=${v} i]`];
84
+ if (IDENTIFIER.test(key)) {
85
+ candidates.push(`css=input#${key}, textarea#${key}`, `css=input[type="${key.toLowerCase()}" i]`);
86
+ }
87
+ candidates.push(`css=input[data-testid=${v} i], textarea[data-testid=${v} i]`, `css=input[aria-label*=${v} i], textarea[aria-label*=${v} i]`, `css=input[placeholder*=${v} i], textarea[placeholder*=${v} i]`, `role=textbox[name=${v} i]`);
88
+ return candidates;
89
+ }
90
+ /** Selectors to try for the submit control — the named button, then link, then plain text. */
91
+ export function submitCandidates(submit) {
92
+ if (SELECTORISH.test(submit))
93
+ return [submit];
94
+ const v = JSON.stringify(submit);
95
+ return [`role=button[name=${v} i]`, `role=link[name=${v} i]`, `text=${submit}`];
96
+ }
97
+ /** First candidate that resolves to a node, or `null` when none of them do. */
98
+ async function findFirst(adapter, candidates) {
99
+ for (const query of candidates) {
100
+ const node = await adapter.find({ query });
101
+ if (node)
102
+ return node;
103
+ }
104
+ return null;
105
+ }
106
+ /** The active tab's URL, or `null` on a target with no tab concept (desktop/android). */
107
+ async function currentUrl(adapter) {
108
+ const tabs = await adapter.tabs?.();
109
+ return tabs?.find((tab) => tab.active)?.url ?? null;
110
+ }
111
+ /**
112
+ * Sign in as `persona`, returning the {@link Step}s to splice onto the run's trail.
113
+ *
114
+ * Every failure is an {@link AuthError} that names the persona and the exact
115
+ * control that did not resolve, so the caller fixes the config instead of reading
116
+ * a run's worth of findings about a login page.
117
+ */
118
+ export async function performLogin(adapter, options) {
119
+ const { name, persona, loginUrl, timeoutMs } = options;
120
+ const log = options.log ?? (() => undefined);
121
+ const budget = capWait(LOGIN_TIMEOUT_MS, timeoutMs);
122
+ const steps = [];
123
+ /** Marks every step here as the pre-run login, not something the driver chose. */
124
+ const note = `auth persona ${JSON.stringify(name)} — signed in before the run's first step`;
125
+ log(`auth: signing in as ${JSON.stringify(name)} at ${loginUrl}`);
126
+ await adapter.open(loginUrl, budget);
127
+ steps.push({ step: `open ${loginUrl}`, ok: true, note });
128
+ for (const [key, value] of Object.entries(persona.fields)) {
129
+ const node = await findFirst(adapter, fieldCandidates(key));
130
+ if (!node) {
131
+ throw new AuthError(`auth persona '${name}': no input matching field '${key}' on ${loginUrl}. ` +
132
+ "Rename the key to the field's name/id/type/data-testid/aria-label/placeholder, " +
133
+ 'or use a selector as the key (e.g. "#user", "[data-testid=\'email\']").');
134
+ }
135
+ // `type` APPENDS (it focuses and types, it does not `fill`), so a browser that
136
+ // restored a saved value would produce a spliced credential and a failed login
137
+ // that looks like wrong config. Same clear-then-type as `act({clear:true})`.
138
+ await adapter.type(node, '');
139
+ await adapter.pressKey('Control+a');
140
+ await adapter.pressKey('Delete');
141
+ await adapter.type(node, value);
142
+ // The value is NOT written down — length is the diagnostic part.
143
+ steps.push({ step: `type ${value.length} chars into field "${key}"`, ok: true, note });
144
+ }
145
+ const submit = await findFirst(adapter, submitCandidates(persona.submit));
146
+ if (!submit) {
147
+ throw new AuthError(`auth persona '${name}': no button, link or text matching submit '${persona.submit}' on ${loginUrl}. ` +
148
+ 'Use the control\'s visible label, or a selector (e.g. "button[type=submit]").');
149
+ }
150
+ await adapter.click(submit);
151
+ steps.push({ step: `click submit "${persona.submit}"`, ok: true, note });
152
+ await assertSignedIn(adapter, options, budget);
153
+ // Where the login LANDED, not where the run was configured to start: submitting
154
+ // usually redirects, so this is the page the driver's first step actually reads.
155
+ const landed = await currentUrl(adapter);
156
+ log(`auth: signed in as ${JSON.stringify(name)}${landed ? ` → ${landed}` : ''}`);
157
+ steps.push({ step: `signed in as "${name}"${landed ? ` → ${landed}` : ''}`, ok: true, note });
158
+ return steps;
159
+ }
160
+ /**
161
+ * Prove the login took, or fail loud. `expect` is the explicit proof; without one
162
+ * the run requires that submitting LEFT the login page — a real signal, and the
163
+ * error says how to replace it for an app that signs in without navigating.
164
+ */
165
+ async function assertSignedIn(adapter, { name, persona, loginUrl }, budget) {
166
+ if (persona.expect !== undefined) {
167
+ try {
168
+ await adapter.waitFor({ query: persona.expect, timeout: budget });
169
+ }
170
+ catch (error) {
171
+ throw new AuthError(`auth persona '${name}': submitted the form but '${persona.expect}' never appeared — ` +
172
+ `the credentials are probably wrong, or 'expect' names something this app does not render. ` +
173
+ `(${error instanceof Error ? error.message : String(error)})`);
174
+ }
175
+ return;
176
+ }
177
+ await adapter.waitFor({ networkIdle: true, timeout: budget }).catch(() => undefined);
178
+ const after = await currentUrl(adapter);
179
+ if (after === null) {
180
+ throw new AuthError(`auth persona '${name}': this target cannot report its current location, so the login ` +
181
+ "cannot be verified — set 'expect' on the persona to a selector that only exists once signed in.");
182
+ }
183
+ if (samePage(after, loginUrl)) {
184
+ throw new AuthError(`auth persona '${name}': still on ${after} after submitting '${persona.submit}' — the login ` +
185
+ 'did not take. Check the credentials and the field keys; if this app signs in WITHOUT ' +
186
+ "navigating away, set 'expect' on the persona to a selector that only exists once signed in.");
187
+ }
188
+ }
189
+ /** Same origin + same path — the query/hash a login flow adds (`?error=1`) does not make it a new page. */
190
+ export function samePage(a, b) {
191
+ try {
192
+ const left = new URL(a);
193
+ const right = new URL(b);
194
+ return left.origin === right.origin && left.pathname === right.pathname;
195
+ }
196
+ catch {
197
+ return a === b;
198
+ }
199
+ }
200
+ //# sourceMappingURL=login.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"login.js","sourceRoot":"","sources":["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,OAAO,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;IACrF,MAAM,KAAK,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,CAAC;IACxC,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QACnB,MAAM,IAAI,SAAS,CACjB,iBAAiB,IAAI,kEAAkE;YACrF,iGAAiG,CACpG,CAAC;IACJ,CAAC;IACD,IAAI,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,SAAS,CACjB,iBAAiB,IAAI,eAAe,KAAK,sBAAsB,OAAO,CAAC,MAAM,gBAAgB;YAC3F,uFAAuF;YACvF,6FAA6F,CAChG,CAAC;IACJ,CAAC;AACH,CAAC;AAED,2GAA2G;AAC3G,MAAM,UAAU,QAAQ,CAAC,CAAS,EAAE,CAAS;IAC3C,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC;QACxB,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC;QACzB,OAAO,IAAI,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC,QAAQ,KAAK,KAAK,CAAC,QAAQ,CAAC;IAC1E,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,CAAC,KAAK,CAAC,CAAC;IACjB,CAAC;AACH,CAAC"}
@@ -51,6 +51,8 @@ export interface BuildSessionParams {
51
51
  criteria?: string;
52
52
  /** Per-run URL the caller points the driver at (web); overrides the target's configured url. */
53
53
  url?: string;
54
+ /** Named auth persona to sign in as before the first step — a key in the target's `auth`. */
55
+ as?: string;
54
56
  /**
55
57
  * The run's remaining wall-clock budget (ms) at build time. Assembly happens inside
56
58
  * the caller's `timeout`, so the launch/connect wait shortens to fit it.
@@ -62,7 +64,8 @@ export interface BuiltSession {
62
64
  /** Ready to register with the manager; not yet opened or started. */
63
65
  session: Session;
64
66
  /**
65
- * Navigate the adapter to the target (launches/attaches the browser page).
67
+ * Navigate the adapter to the target (launches/attaches the browser page), then
68
+ * — when `as` named a persona — sign in out-of-band, before the loop starts.
66
69
  * `timeoutMs` is the run's budget left AFTER the build — the first navigation
67
70
  * spends the caller's cap, never a fresh one of its own.
68
71
  */