@developerz.ai/ui-debugger-mcp 1.3.1 → 1.5.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.
- package/README.md +14 -0
- package/dist/adapters/android/adb.js +3 -1
- package/dist/adapters/android/adb.js.map +1 -1
- package/dist/adapters/android/android-adapter.js +24 -14
- package/dist/adapters/android/android-adapter.js.map +1 -1
- package/dist/adapters/android/commands.d.ts +7 -4
- package/dist/adapters/android/commands.js +11 -6
- package/dist/adapters/android/commands.js.map +1 -1
- package/dist/adapters/browser/browser-adapter.d.ts +4 -50
- package/dist/adapters/browser/browser-adapter.js +55 -223
- package/dist/adapters/browser/browser-adapter.js.map +1 -1
- package/dist/adapters/browser/cdp.d.ts +12 -42
- package/dist/adapters/browser/cdp.js +122 -261
- package/dist/adapters/browser/cdp.js.map +1 -1
- package/dist/adapters/browser/geometry.d.ts +97 -0
- package/dist/adapters/browser/geometry.js +158 -0
- package/dist/adapters/browser/geometry.js.map +1 -0
- package/dist/adapters/browser/launch.d.ts +42 -2
- package/dist/adapters/browser/launch.js +77 -2
- package/dist/adapters/browser/launch.js.map +1 -1
- package/dist/adapters/browser/locate.d.ts +44 -0
- package/dist/adapters/browser/locate.js +93 -0
- package/dist/adapters/browser/locate.js.map +1 -0
- package/dist/adapters/browser/log-filters.d.ts +25 -0
- package/dist/adapters/browser/log-filters.js +149 -0
- package/dist/adapters/browser/log-filters.js.map +1 -0
- package/dist/adapters/browser/log-format.d.ts +52 -0
- package/dist/adapters/browser/log-format.js +131 -0
- package/dist/adapters/browser/log-format.js.map +1 -0
- package/dist/adapters/contract.d.ts +22 -2
- package/dist/adapters/desktop/atspi.d.ts +7 -0
- package/dist/adapters/desktop/atspi.js +3 -0
- package/dist/adapters/desktop/atspi.js.map +1 -1
- package/dist/adapters/desktop/desktop-adapter.d.ts +8 -1
- package/dist/adapters/desktop/desktop-adapter.js +38 -20
- package/dist/adapters/desktop/desktop-adapter.js.map +1 -1
- package/dist/adapters/desktop/input.d.ts +8 -1
- package/dist/adapters/desktop/input.js +12 -3
- package/dist/adapters/desktop/input.js.map +1 -1
- package/dist/adapters/desktop/proc.d.ts +13 -2
- package/dist/adapters/desktop/proc.js +42 -2
- package/dist/adapters/desktop/proc.js.map +1 -1
- package/dist/adapters/factory.js +5 -1
- package/dist/adapters/factory.js.map +1 -1
- package/dist/agent/belt/act.d.ts +3 -2
- package/dist/agent/belt/act.js +51 -7
- package/dist/agent/belt/act.js.map +1 -1
- package/dist/agent/belt/look.d.ts +5 -8
- package/dist/agent/belt/look.js +47 -8
- package/dist/agent/belt/look.js.map +1 -1
- package/dist/agent/belt/observe.d.ts +28 -2
- package/dist/agent/belt/observe.js +102 -27
- package/dist/agent/belt/observe.js.map +1 -1
- package/dist/agent/capabilities.d.ts +9 -0
- package/dist/agent/capabilities.js +10 -1
- package/dist/agent/capabilities.js.map +1 -1
- package/dist/agent/loop.d.ts +11 -2
- package/dist/agent/loop.js +55 -6
- package/dist/agent/loop.js.map +1 -1
- package/dist/agent/prompts/android-addendum.d.ts +1 -1
- package/dist/agent/prompts/android-addendum.js +20 -5
- package/dist/agent/prompts/android-addendum.js.map +1 -1
- package/dist/agent/prompts/compose.d.ts +8 -0
- package/dist/agent/prompts/compose.js +15 -2
- package/dist/agent/prompts/compose.js.map +1 -1
- package/dist/agent/prompts/debug-agent.js +12 -0
- package/dist/agent/prompts/debug-agent.js.map +1 -1
- package/dist/agent/prompts/desktop-addendum.d.ts +1 -1
- package/dist/agent/prompts/desktop-addendum.js +18 -5
- package/dist/agent/prompts/desktop-addendum.js.map +1 -1
- package/dist/agent/prompts/web-addendum.d.ts +1 -1
- package/dist/agent/prompts/web-addendum.js +0 -10
- package/dist/agent/prompts/web-addendum.js.map +1 -1
- package/dist/config/fingerprint.d.ts +6 -0
- package/dist/config/fingerprint.js +16 -4
- package/dist/config/fingerprint.js.map +1 -1
- package/dist/config/schema.d.ts +10 -4
- package/dist/config/schema.js +21 -5
- package/dist/config/schema.js.map +1 -1
- package/dist/errors.d.ts +4 -0
- package/dist/errors.js +8 -0
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/main.js +11 -13
- package/dist/main.js.map +1 -1
- package/dist/services/debug-service.d.ts +2 -1
- package/dist/services/debug-service.js +82 -29
- package/dist/services/debug-service.js.map +1 -1
- package/dist/services/replay.d.ts +14 -3
- package/dist/services/replay.js +57 -10
- package/dist/services/replay.js.map +1 -1
- package/dist/services/session-builder.js +36 -5
- package/dist/services/session-builder.js.map +1 -1
- package/dist/services/shutdown.d.ts +37 -0
- package/dist/services/shutdown.js +51 -0
- package/dist/services/shutdown.js.map +1 -0
- package/dist/session/cleanup.d.ts +42 -0
- package/dist/session/cleanup.js +69 -0
- package/dist/session/cleanup.js.map +1 -0
- package/dist/session/findings-store.d.ts +15 -6
- package/dist/session/findings-store.js +49 -11
- package/dist/session/findings-store.js.map +1 -1
- package/dist/session/session.d.ts +4 -2
- package/dist/session/session.js +7 -2
- package/dist/session/session.js.map +1 -1
- package/dist/session/state-file.d.ts +8 -2
- package/dist/session/state-file.js +8 -2
- package/dist/session/state-file.js.map +1 -1
- package/dist/session/workspace.d.ts +15 -4
- package/dist/session/workspace.js +49 -7
- package/dist/session/workspace.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shutdown.js","sourceRoot":"","sources":["../../src/services/shutdown.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,6EAA6E;AAC7E,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC;AAc1C;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,IAAkB;IAC/C,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,IAAI,mBAAmB,CAAC;IACxD,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IAClE,OAAO,CAAC,IAAY,EAAE,EAAE;QACtB,IAAI,IAAI,GAAG,KAAK,CAAC;QACjB,MAAM,MAAM,GAAG,CAAC,QAAgB,EAAE,EAAE;YAClC,IAAI,IAAI;gBAAE,OAAO;YACjB,IAAI,GAAG,IAAI,CAAC;YACZ,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACtB,CAAC,CAAC;QACF,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE;YAC5B,IAAI,CACF,4DAA4D,SAAS,uBAAuB;gBAC1F,uDAAuD,CAC1D,CAAC;YACF,MAAM,CAAC,IAAI,CAAC,CAAC;QACf,CAAC,EAAE,SAAS,CAAC,CAAC;QACd,IAAI;aACD,SAAS,EAAE;aACX,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC;aACtB,OAAO,CAAC,GAAG,EAAE;YACZ,YAAY,CAAC,KAAK,CAAC,CAAC;YACpB,MAAM,CAAC,IAAI,CAAC,CAAC;QACf,CAAC,CAAC,CAAC;IACP,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session retention — keep the workspace from growing without bound.
|
|
3
|
+
*
|
|
4
|
+
* Every run drops a `sessions/<id>/` directory holding `story.md`,
|
|
5
|
+
* `findings.json`, the full `logs/` trail, every screenshot and (when ffmpeg is
|
|
6
|
+
* around) a `replay.mp4`. A single dogfood afternoon is hundreds of megabytes,
|
|
7
|
+
* and nothing ever removed them: the workspace only ever grew.
|
|
8
|
+
*
|
|
9
|
+
* So a new run prunes the old ones: the {@link SESSION_RETENTION} newest survive,
|
|
10
|
+
* the rest are removed. "Newest" is the id's own byte order — {@link
|
|
11
|
+
* generateSessionId} emits fixed-width `YYYY-MM-DD_HH-MM-SS-NNNN`, so sorting the
|
|
12
|
+
* directory names IS sorting by time, with no `stat` per entry and no race with a
|
|
13
|
+
* run that is still writing.
|
|
14
|
+
*
|
|
15
|
+
* Fails LOUD ({@link WorkspaceError}): a workspace we cannot manage is a real
|
|
16
|
+
* problem, and silently accumulating gigabytes is exactly the failure this exists
|
|
17
|
+
* to end. The message names the directories so the fix is one `rm` away.
|
|
18
|
+
*/
|
|
19
|
+
import type { WorkspacePaths } from './workspace.js';
|
|
20
|
+
/** How many session directories survive a prune — the newest N by id. */
|
|
21
|
+
export declare const SESSION_RETENTION = 5;
|
|
22
|
+
/** Knobs for {@link pruneSessions}; both have sensible defaults. */
|
|
23
|
+
export interface PruneOptions {
|
|
24
|
+
/** How many to keep (newest first). Defaults to {@link SESSION_RETENTION}. */
|
|
25
|
+
keep?: number;
|
|
26
|
+
/**
|
|
27
|
+
* A session id that must survive regardless of where it sorts — the run being
|
|
28
|
+
* started. Its id is normally the newest anyway; this holds even if the clock
|
|
29
|
+
* moved backwards (NTP correction, DST) between runs.
|
|
30
|
+
*/
|
|
31
|
+
protect?: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Remove all but the newest `keep` session directories under `workspace.sessions`.
|
|
35
|
+
*
|
|
36
|
+
* A missing `sessions/` dir is not an error (nothing has run here yet) — it prunes
|
|
37
|
+
* nothing. Loose files in `sessions/` are left alone; only directories are runs.
|
|
38
|
+
*
|
|
39
|
+
* @returns the ids that were removed, oldest first.
|
|
40
|
+
* @throws {WorkspaceError} if the directory cannot be read, or any removal fails.
|
|
41
|
+
*/
|
|
42
|
+
export declare function pruneSessions(workspace: WorkspacePaths, { keep, protect }?: PruneOptions): Promise<string[]>;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session retention — keep the workspace from growing without bound.
|
|
3
|
+
*
|
|
4
|
+
* Every run drops a `sessions/<id>/` directory holding `story.md`,
|
|
5
|
+
* `findings.json`, the full `logs/` trail, every screenshot and (when ffmpeg is
|
|
6
|
+
* around) a `replay.mp4`. A single dogfood afternoon is hundreds of megabytes,
|
|
7
|
+
* and nothing ever removed them: the workspace only ever grew.
|
|
8
|
+
*
|
|
9
|
+
* So a new run prunes the old ones: the {@link SESSION_RETENTION} newest survive,
|
|
10
|
+
* the rest are removed. "Newest" is the id's own byte order — {@link
|
|
11
|
+
* generateSessionId} emits fixed-width `YYYY-MM-DD_HH-MM-SS-NNNN`, so sorting the
|
|
12
|
+
* directory names IS sorting by time, with no `stat` per entry and no race with a
|
|
13
|
+
* run that is still writing.
|
|
14
|
+
*
|
|
15
|
+
* Fails LOUD ({@link WorkspaceError}): a workspace we cannot manage is a real
|
|
16
|
+
* problem, and silently accumulating gigabytes is exactly the failure this exists
|
|
17
|
+
* to end. The message names the directories so the fix is one `rm` away.
|
|
18
|
+
*/
|
|
19
|
+
import { readdir, rm } from 'node:fs/promises';
|
|
20
|
+
import { join } from 'node:path';
|
|
21
|
+
import { WorkspaceError } from '../errors.js';
|
|
22
|
+
/** How many session directories survive a prune — the newest N by id. */
|
|
23
|
+
export const SESSION_RETENTION = 5;
|
|
24
|
+
/**
|
|
25
|
+
* Remove all but the newest `keep` session directories under `workspace.sessions`.
|
|
26
|
+
*
|
|
27
|
+
* A missing `sessions/` dir is not an error (nothing has run here yet) — it prunes
|
|
28
|
+
* nothing. Loose files in `sessions/` are left alone; only directories are runs.
|
|
29
|
+
*
|
|
30
|
+
* @returns the ids that were removed, oldest first.
|
|
31
|
+
* @throws {WorkspaceError} if the directory cannot be read, or any removal fails.
|
|
32
|
+
*/
|
|
33
|
+
export async function pruneSessions(workspace, { keep = SESSION_RETENTION, protect } = {}) {
|
|
34
|
+
let ids;
|
|
35
|
+
try {
|
|
36
|
+
const entries = await readdir(workspace.sessions, { withFileTypes: true });
|
|
37
|
+
ids = entries.filter((entry) => entry.isDirectory()).map((entry) => entry.name);
|
|
38
|
+
}
|
|
39
|
+
catch (err) {
|
|
40
|
+
if (err.code === 'ENOENT')
|
|
41
|
+
return [];
|
|
42
|
+
throw new WorkspaceError(`Failed to list session directories in '${workspace.sessions}': ${message(err)}`);
|
|
43
|
+
}
|
|
44
|
+
// Descending byte order == newest first (ids are fixed-width and time-ordered).
|
|
45
|
+
const newestFirst = ids.sort().reverse();
|
|
46
|
+
const doomed = newestFirst.slice(Math.max(0, keep)).filter((id) => id !== protect);
|
|
47
|
+
if (doomed.length === 0)
|
|
48
|
+
return [];
|
|
49
|
+
const failures = [];
|
|
50
|
+
for (const id of doomed) {
|
|
51
|
+
try {
|
|
52
|
+
await rm(join(workspace.sessions, id), { recursive: true, force: true });
|
|
53
|
+
}
|
|
54
|
+
catch (err) {
|
|
55
|
+
failures.push(`${id} (${message(err)})`);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
if (failures.length > 0) {
|
|
59
|
+
throw new WorkspaceError(`Failed to prune old session directories under '${workspace.sessions}': ` +
|
|
60
|
+
`${failures.join('; ')}. Remove them by hand, or point 'workspace' somewhere writable.`);
|
|
61
|
+
}
|
|
62
|
+
// Oldest first reads naturally in a log line ("pruned A, B, C").
|
|
63
|
+
return doomed.reverse();
|
|
64
|
+
}
|
|
65
|
+
/** Best-effort message off an unknown thrown value. */
|
|
66
|
+
function message(err) {
|
|
67
|
+
return err instanceof Error ? err.message : String(err);
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=cleanup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cleanup.js","sourceRoot":"","sources":["../../src/session/cleanup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAG9C,yEAAyE;AACzE,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAcnC;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,SAAyB,EACzB,EAAE,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ACb,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAC3C,CAAC;IACH,CAAC;IACD,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACxB,MAAM,IAAI,cAAc,CACtB,kDAAkD,SAAS,CAAC,QAAQ,KAAK;YACvE,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,iEAAiE,CAC1F,CAAC;IACJ,CAAC;IACD,iEAAiE;IACjE,OAAO,MAAM,CAAC,OAAO,EAAE,CAAC;AAC1B,CAAC;AAED,uDAAuD;AACvD,SAAS,OAAO,CAAC,GAAY;IAC3B,OAAO,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAC1D,CAAC"}
|
|
@@ -40,13 +40,22 @@ export declare class FindingsStore {
|
|
|
40
40
|
tryReadFindings(): Promise<Findings | null>;
|
|
41
41
|
/** Append a line to `logs/<channel>.log` (newline added if absent). Returns its path. */
|
|
42
42
|
appendLog(channel: LogChannel, line: string): Promise<string>;
|
|
43
|
-
/** Save a PNG as `screenshots/NNN-<label>.png` (auto-numbered). Returns its path. */
|
|
44
|
-
saveScreenshot(label: string, data: Uint8Array): Promise<string>;
|
|
45
43
|
/**
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
|
|
44
|
+
* Save a frame as `screenshots/NNN-<label>.<ext>` (auto-numbered). Returns its path.
|
|
45
|
+
* `extension` defaults to `png`; `look` passes `jpg` when it fell back to JPEG for a
|
|
46
|
+
* photo-heavy frame, so the file on disk matches the bytes the model actually saw.
|
|
47
|
+
*/
|
|
48
|
+
saveScreenshot(label: string, data: Uint8Array, extension?: string): Promise<string>;
|
|
49
|
+
/**
|
|
50
|
+
* List saved screenshots as ordered frames (`NNN-<label>.<png|jpg>`), ascending
|
|
51
|
+
* by sequence — the capture order the replay video stitches. Returns `[]` when
|
|
52
|
+
* none were saved yet (or the dir is missing); files that don't match the pattern
|
|
53
|
+
* are skipped. Decodes the step label back from the filename slug.
|
|
54
|
+
*
|
|
55
|
+
* BOTH extensions, not just `.png`: `look` re-captures a photo-heavy frame as
|
|
56
|
+
* JPEG (`saveScreenshot(..., 'jpg')`), and a png-only match silently dropped
|
|
57
|
+
* exactly those frames from the replay — the run's most visual evidence, gone
|
|
58
|
+
* from the clip with nothing to say why.
|
|
50
59
|
*/
|
|
51
60
|
listScreenshots(): Promise<ScreenshotFrame[]>;
|
|
52
61
|
}
|
|
@@ -105,19 +105,28 @@ export class FindingsStore {
|
|
|
105
105
|
await appendFile(file, line.endsWith('\n') ? line : `${line}\n`, 'utf8');
|
|
106
106
|
return file;
|
|
107
107
|
}
|
|
108
|
-
/**
|
|
109
|
-
|
|
108
|
+
/**
|
|
109
|
+
* Save a frame as `screenshots/NNN-<label>.<ext>` (auto-numbered). Returns its path.
|
|
110
|
+
* `extension` defaults to `png`; `look` passes `jpg` when it fell back to JPEG for a
|
|
111
|
+
* photo-heavy frame, so the file on disk matches the bytes the model actually saw.
|
|
112
|
+
*/
|
|
113
|
+
async saveScreenshot(label, data, extension = 'png') {
|
|
110
114
|
await this.#ensureDirs();
|
|
111
115
|
const seq = await this.#nextSeq();
|
|
112
|
-
const file = join(this.#paths.screenshots, `${String(seq).padStart(3, '0')}-${slug(label)}
|
|
116
|
+
const file = join(this.#paths.screenshots, `${String(seq).padStart(3, '0')}-${slug(label)}.${extension}`);
|
|
113
117
|
await writeFile(file, data);
|
|
114
118
|
return file;
|
|
115
119
|
}
|
|
116
120
|
/**
|
|
117
|
-
* List saved screenshots as ordered frames (`NNN-<label
|
|
118
|
-
* sequence — the capture order the replay video stitches. Returns `[]` when
|
|
119
|
-
* were saved yet (or the dir is missing); files that don't match the pattern
|
|
120
|
-
* skipped. Decodes the step label back from the filename slug.
|
|
121
|
+
* List saved screenshots as ordered frames (`NNN-<label>.<png|jpg>`), ascending
|
|
122
|
+
* by sequence — the capture order the replay video stitches. Returns `[]` when
|
|
123
|
+
* none were saved yet (or the dir is missing); files that don't match the pattern
|
|
124
|
+
* are skipped. Decodes the step label back from the filename slug.
|
|
125
|
+
*
|
|
126
|
+
* BOTH extensions, not just `.png`: `look` re-captures a photo-heavy frame as
|
|
127
|
+
* JPEG (`saveScreenshot(..., 'jpg')`), and a png-only match silently dropped
|
|
128
|
+
* exactly those frames from the replay — the run's most visual evidence, gone
|
|
129
|
+
* from the clip with nothing to say why.
|
|
121
130
|
*/
|
|
122
131
|
async listScreenshots() {
|
|
123
132
|
let entries;
|
|
@@ -129,7 +138,7 @@ export class FindingsStore {
|
|
|
129
138
|
}
|
|
130
139
|
const frames = [];
|
|
131
140
|
for (const entry of entries) {
|
|
132
|
-
const match = /^(\d+)-(.*)\.png$/.exec(entry);
|
|
141
|
+
const match = /^(\d+)-(.*)\.(?:png|jpe?g)$/.exec(entry);
|
|
133
142
|
const digits = match?.[1];
|
|
134
143
|
const slug = match?.[2];
|
|
135
144
|
if (digits === undefined || slug === undefined)
|
|
@@ -142,26 +151,55 @@ export class FindingsStore {
|
|
|
142
151
|
}
|
|
143
152
|
return frames.sort((a, b) => a.seq - b.seq);
|
|
144
153
|
}
|
|
145
|
-
/**
|
|
154
|
+
/**
|
|
155
|
+
* Create `screenshots/` + `logs/` (and the session root) once; idempotent.
|
|
156
|
+
*
|
|
157
|
+
* A FAILED attempt is not cached: one transient `EMFILE`/`ENOSPC` would
|
|
158
|
+
* otherwise poison every later `writeFindings`/`appendLog`/`saveScreenshot` on
|
|
159
|
+
* this store — including the driver's terminal `report` — long after the
|
|
160
|
+
* condition cleared, ending the run with no `findings.json` at all.
|
|
161
|
+
*/
|
|
146
162
|
#ensureDirs() {
|
|
147
163
|
if (this.#dirsReady === null) {
|
|
148
|
-
|
|
164
|
+
const attempt = Promise.all([
|
|
149
165
|
mkdir(this.#paths.screenshots, { recursive: true }),
|
|
150
166
|
mkdir(this.#paths.logs, { recursive: true }),
|
|
151
167
|
]).then(() => undefined);
|
|
168
|
+
this.#dirsReady = attempt;
|
|
169
|
+
this.#forgetOnFailure(attempt, 'dirs');
|
|
152
170
|
}
|
|
153
171
|
return this.#dirsReady;
|
|
154
172
|
}
|
|
173
|
+
/**
|
|
174
|
+
* Drop a rejected cached attempt so the next call retries it. Guarded by
|
|
175
|
+
* identity: a newer attempt already in the field is never cleared. The `catch`
|
|
176
|
+
* here handles this branch only — the attempt itself is still returned to (and
|
|
177
|
+
* awaited by) the caller, so the failure is never swallowed.
|
|
178
|
+
*/
|
|
179
|
+
#forgetOnFailure(attempt, field) {
|
|
180
|
+
attempt.catch(() => {
|
|
181
|
+
if (field === 'dirs') {
|
|
182
|
+
if (this.#dirsReady === attempt)
|
|
183
|
+
this.#dirsReady = null;
|
|
184
|
+
}
|
|
185
|
+
else if (this.#seqReady === attempt) {
|
|
186
|
+
this.#seqReady = null;
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
}
|
|
155
190
|
/**
|
|
156
191
|
* Next screenshot index, seeding from existing files so resume never overwrites.
|
|
157
192
|
* The seed scan is cached as a promise (like `#ensureDirs`) so concurrent first
|
|
158
193
|
* saves share one scan and still get distinct numbers — never a duplicate `001`.
|
|
194
|
+
* A failed scan is dropped from the cache (same reason as `#ensureDirs`).
|
|
159
195
|
*/
|
|
160
196
|
async #nextSeq() {
|
|
161
197
|
if (this.#seqReady === null) {
|
|
162
|
-
|
|
198
|
+
const attempt = this.#scanMaxSeq().then((max) => {
|
|
163
199
|
this.#screenshotSeq = max;
|
|
164
200
|
});
|
|
201
|
+
this.#seqReady = attempt;
|
|
202
|
+
this.#forgetOnFailure(attempt, 'seq');
|
|
165
203
|
}
|
|
166
204
|
await this.#seqReady;
|
|
167
205
|
this.#screenshotSeq += 1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findings-store.js","sourceRoot":"","sources":["../../src/session/findings-store.ts"],"names":[],"mappings":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I,CAAC,CAAC,GAAG,EAAE,EAAE;gBAC9C,IAAI,CAAC,cAAc,GAAG,GAAG,CAAC;YAC5B,CAAC,CAAC,CAAC;YACH,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC;YACzB,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QACxC,CAAC;QACD,MAAM,IAAI,CAAC,SAAS,CAAC;QACrB,IAAI,CAAC,cAAc,IAAI,CAAC,CAAC;QACzB,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAED,6EAA6E;IAC7E,KAAK,CAAC,WAAW;QACf,IAAI,OAAiB,CAAC;QACtB,IAAI,CAAC;YACH,OAAO,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QACnD,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,CAAC,CAAC;QACX,CAAC;QACD,IAAI,GAAG,GAAG,CAAC,CAAC;QACZ,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;YAC5B,MAAM,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;YACvC,IAAI,GAAG,KAAK,SAAS;gBAAE,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;QAC1D,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAC;CACF"}
|
|
@@ -62,9 +62,11 @@ export type ReplayOutcome = {
|
|
|
62
62
|
* captioned `replay.mp4` for PR evidence, reporting its {@link ReplayOutcome}. Bound
|
|
63
63
|
* to ffmpeg + the session paths OUTSIDE the session, so the session stays tool- and
|
|
64
64
|
* path-blind (the same shape as {@link SummarizeStep}). It probes for ffmpeg and
|
|
65
|
-
* skips gracefully when absent — never crashing teardown.
|
|
65
|
+
* skips gracefully when absent — never crashing teardown. Receives the session's
|
|
66
|
+
* abort signal so teardown KILLS the encoder instead of orphaning it: the process
|
|
67
|
+
* can exit moments later, and a detached ffmpeg would outlive the run.
|
|
66
68
|
*/
|
|
67
|
-
export type ReplayStep = () => Promise<ReplayOutcome>;
|
|
69
|
+
export type ReplayStep = (signal?: AbortSignal) => Promise<ReplayOutcome>;
|
|
68
70
|
/** Everything needed to construct a session. The loop is handed to `start()`, not the constructor. */
|
|
69
71
|
export interface SessionOptions<A extends SessionAdapter> {
|
|
70
72
|
/** Stable session id (from `generateSessionId`). */
|
package/dist/session/session.js
CHANGED
|
@@ -201,12 +201,17 @@ export class Session {
|
|
|
201
201
|
* verdict. A `skipped` outcome with a `note` (e.g. ffmpeg absent) is recorded as a
|
|
202
202
|
* step so the missing video is explained, not silent. Writes back under the settled
|
|
203
203
|
* terminal `status`, never a stale `running`.
|
|
204
|
+
*
|
|
205
|
+
* Skipped outright once the session has aborted: `#raceAbort` only stops the
|
|
206
|
+
* *waiting*, and the step is evaluated before it — so without this check a
|
|
207
|
+
* teardown would still spawn ffmpeg, `close()` would resolve, the process would
|
|
208
|
+
* exit and orphan the encoder (whose write-back would land after the run ended).
|
|
204
209
|
*/
|
|
205
210
|
async #ensureReplay() {
|
|
206
|
-
if (this.#replay === undefined)
|
|
211
|
+
if (this.#replay === undefined || this.#abort.signal.aborted)
|
|
207
212
|
return;
|
|
208
213
|
try {
|
|
209
|
-
const outcome = await this.#replay();
|
|
214
|
+
const outcome = await this.#replay(this.#abort.signal);
|
|
210
215
|
if (outcome.kind === 'skipped') {
|
|
211
216
|
if (outcome.note !== undefined)
|
|
212
217
|
await this.#noteReplaySkipped(outcome.note);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/session/session.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/session/session.ts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,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;IAChE,CAAC;CACF;AAED,+FAA+F;AAC/F,SAAS,YAAY,CAAC,KAAc;IAClC,IAAI,KAAK,YAAY,UAAU;QAAE,OAAO,KAAK,CAAC;IAC9C,OAAO,IAAI,UAAU,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AAChF,CAAC;AAED,0FAA0F;AAC1F,SAAS,OAAO,CAAC,KAAyB;IACxC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;AAC9D,CAAC"}
|
|
@@ -7,7 +7,13 @@
|
|
|
7
7
|
* which run is active, the server `pid` (so `stop` can signal it and `status` can
|
|
8
8
|
* tell live from stale), and where the session's `findings.json` lives (so
|
|
9
9
|
* `status` can read the authoritative verdict + counts). Written on start, marked
|
|
10
|
-
* `ended` on a clean end.
|
|
10
|
+
* `ended` on a clean end.
|
|
11
|
+
*
|
|
12
|
+
* `record()` fails LOUD: a run nobody can see is a run nobody can stop — the
|
|
13
|
+
* profile would stay locked with no way to reach the owner short of killing the
|
|
14
|
+
* server by hand — so the service tears the start down instead. `clear()` stays
|
|
15
|
+
* best-effort: the run is already down, and the stale breadcrumb it leaves names
|
|
16
|
+
* a pid whose liveness the CLI checks anyway.
|
|
11
17
|
*
|
|
12
18
|
* The {@link StatePort} seam keeps {@link DebugService} fs-free in unit tests — a
|
|
13
19
|
* no-op port by default, the real {@link FileStatePort} wired at boot.
|
|
@@ -60,7 +66,7 @@ export interface ForeignRun {
|
|
|
60
66
|
}
|
|
61
67
|
/** The seam {@link DebugService} writes run lifecycle through (no-op in tests). */
|
|
62
68
|
export interface StatePort {
|
|
63
|
-
/** Record
|
|
69
|
+
/** Record the run as `running`. Throws when the breadcrumb cannot be written. */
|
|
64
70
|
record(run: RunState): Promise<void>;
|
|
65
71
|
/** Mark the active run `ended` (clean end). */
|
|
66
72
|
clear(): Promise<void>;
|
|
@@ -7,7 +7,13 @@
|
|
|
7
7
|
* which run is active, the server `pid` (so `stop` can signal it and `status` can
|
|
8
8
|
* tell live from stale), and where the session's `findings.json` lives (so
|
|
9
9
|
* `status` can read the authoritative verdict + counts). Written on start, marked
|
|
10
|
-
* `ended` on a clean end.
|
|
10
|
+
* `ended` on a clean end.
|
|
11
|
+
*
|
|
12
|
+
* `record()` fails LOUD: a run nobody can see is a run nobody can stop — the
|
|
13
|
+
* profile would stay locked with no way to reach the owner short of killing the
|
|
14
|
+
* server by hand — so the service tears the start down instead. `clear()` stays
|
|
15
|
+
* best-effort: the run is already down, and the stale breadcrumb it leaves names
|
|
16
|
+
* a pid whose liveness the CLI checks anyway.
|
|
11
17
|
*
|
|
12
18
|
* The {@link StatePort} seam keeps {@link DebugService} fs-free in unit tests — a
|
|
13
19
|
* no-op port by default, the real {@link FileStatePort} wired at boot.
|
|
@@ -94,7 +100,7 @@ export class FileStatePort {
|
|
|
94
100
|
updatedAt: iso,
|
|
95
101
|
sessionDir: sessionPaths(this.#workspace, run.sessionId).root,
|
|
96
102
|
identity: captureIdentity(this.#pid),
|
|
97
|
-
})
|
|
103
|
+
});
|
|
98
104
|
}
|
|
99
105
|
async clear() {
|
|
100
106
|
await markStatus(this.#workspace.stateJson, 'ended', this.#now()).catch(() => undefined);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state-file.js","sourceRoot":"","sources":["../../src/session/state-file.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"state-file.js","sourceRoot":"","sources":["../../src/session/state-file.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,OAA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19 @@
|
|
|
5
5
|
/** Reset internal counter — testing only. */
|
|
6
6
|
export declare function _resetCounter(): void;
|
|
7
7
|
/**
|
|
8
|
-
* Generate a session ID.
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* Generate a session ID: `YYYY-MM-DD_HH-MM-SS-<0000-padded counter>`, e.g.
|
|
9
|
+
* `2026-07-27_14-30-05-0001`.
|
|
10
|
+
*
|
|
11
|
+
* The id IS the session directory name, so a human listing
|
|
12
|
+
* `sessions/` reads *when* each run happened instead of decoding an epoch. Local
|
|
13
|
+
* time, deliberately — the reader is sitting at the machine that ran it.
|
|
14
|
+
*
|
|
15
|
+
* Fixed-width and zero-padded on purpose: byte order == chronological order, which
|
|
16
|
+
* is what {@link pruneSessions} sorts by to decide which runs are the newest. (A
|
|
17
|
+
* DST fall-back hour can invert one pair; the only consequence is which of two
|
|
18
|
+
* same-hour runs is pruned first.)
|
|
19
|
+
*
|
|
20
|
+
* @param now - injected epoch ms (e.g. Date.now() from the caller)
|
|
11
21
|
*/
|
|
12
22
|
export declare function generateSessionId(now: number): string;
|
|
13
23
|
export interface WorkspacePaths {
|
|
@@ -39,7 +49,8 @@ export declare function resolveProject(cwd: string): string;
|
|
|
39
49
|
/**
|
|
40
50
|
* Build workspace paths for a project.
|
|
41
51
|
* @param cwd - absolute path to the project root (session key)
|
|
42
|
-
* @param base - override the workspace root
|
|
52
|
+
* @param base - override the workspace root, absolute or relative to `cwd`
|
|
53
|
+
* (default: `<cwd>/tmp/ui-debugger-mcp`)
|
|
43
54
|
*/
|
|
44
55
|
export declare function workspacePaths(cwd: string, base?: string): WorkspacePaths;
|
|
45
56
|
/**
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
* Workspace path resolver and directory bootstrapper.
|
|
3
3
|
* Derives project name from cwd basename; builds and creates all required paths.
|
|
4
4
|
*/
|
|
5
|
+
import { createHash } from 'node:crypto';
|
|
5
6
|
import { mkdir } from 'node:fs/promises';
|
|
6
|
-
import { basename, join, resolve } from 'node:path';
|
|
7
|
+
import { basename, isAbsolute, join, relative, resolve } from 'node:path';
|
|
7
8
|
// --- ID generator -----------------------------------------------------------
|
|
8
9
|
// Counter+injected-time avoids both Date.now-only collisions and non-determinism in tests.
|
|
9
10
|
let _counter = 0;
|
|
@@ -11,27 +12,68 @@ let _counter = 0;
|
|
|
11
12
|
export function _resetCounter() {
|
|
12
13
|
_counter = 0;
|
|
13
14
|
}
|
|
15
|
+
/** Zero-pad a number to `width` digits. */
|
|
16
|
+
function pad(value, width = 2) {
|
|
17
|
+
return String(value).padStart(width, '0');
|
|
18
|
+
}
|
|
14
19
|
/**
|
|
15
|
-
* Generate a session ID.
|
|
16
|
-
*
|
|
17
|
-
*
|
|
20
|
+
* Generate a session ID: `YYYY-MM-DD_HH-MM-SS-<0000-padded counter>`, e.g.
|
|
21
|
+
* `2026-07-27_14-30-05-0001`.
|
|
22
|
+
*
|
|
23
|
+
* The id IS the session directory name, so a human listing
|
|
24
|
+
* `sessions/` reads *when* each run happened instead of decoding an epoch. Local
|
|
25
|
+
* time, deliberately — the reader is sitting at the machine that ran it.
|
|
26
|
+
*
|
|
27
|
+
* Fixed-width and zero-padded on purpose: byte order == chronological order, which
|
|
28
|
+
* is what {@link pruneSessions} sorts by to decide which runs are the newest. (A
|
|
29
|
+
* DST fall-back hour can invert one pair; the only consequence is which of two
|
|
30
|
+
* same-hour runs is pruned first.)
|
|
31
|
+
*
|
|
32
|
+
* @param now - injected epoch ms (e.g. Date.now() from the caller)
|
|
18
33
|
*/
|
|
19
34
|
export function generateSessionId(now) {
|
|
20
35
|
_counter = (_counter + 1) % 10_000;
|
|
21
|
-
|
|
36
|
+
const d = new Date(now);
|
|
37
|
+
const date = `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`;
|
|
38
|
+
const time = `${pad(d.getHours())}-${pad(d.getMinutes())}-${pad(d.getSeconds())}`;
|
|
39
|
+
return `${date}_${time}-${pad(_counter, 4)}`;
|
|
22
40
|
}
|
|
23
41
|
// --- Path builders ----------------------------------------------------------
|
|
24
42
|
/** Derive the project slug from an absolute cwd path. */
|
|
25
43
|
export function resolveProject(cwd) {
|
|
26
44
|
return basename(cwd);
|
|
27
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* The project's own directory inside the workspace base.
|
|
48
|
+
*
|
|
49
|
+
* A base that lives *under* the project root is already unique to this cwd — the
|
|
50
|
+
* default `./tmp/ui-debugger-mcp` and any relative `workspace` resolve there — so
|
|
51
|
+
* the plain project name stands and existing installs keep their chrome profile
|
|
52
|
+
* and session history. A base pointed somewhere shared (an absolute `workspace`)
|
|
53
|
+
* is NOT unique: `~/work/api` and `~/oss/api` would otherwise share one
|
|
54
|
+
* `state.json`, one `chrome-user-data/` and one profile lock, so a live run in
|
|
55
|
+
* either would falsely report the other busy. Those get a short, stable hash of
|
|
56
|
+
* the full cwd appended.
|
|
57
|
+
*/
|
|
58
|
+
function projectDir(cwd, base) {
|
|
59
|
+
const name = resolveProject(cwd);
|
|
60
|
+
const rel = relative(cwd, base);
|
|
61
|
+
const nested = rel === '' || (!rel.startsWith('..') && !isAbsolute(rel));
|
|
62
|
+
if (nested)
|
|
63
|
+
return name;
|
|
64
|
+
return `${name}-${createHash('sha256').update(cwd).digest('hex').slice(0, 8)}`;
|
|
65
|
+
}
|
|
28
66
|
/**
|
|
29
67
|
* Build workspace paths for a project.
|
|
30
68
|
* @param cwd - absolute path to the project root (session key)
|
|
31
|
-
* @param base - override the workspace root
|
|
69
|
+
* @param base - override the workspace root, absolute or relative to `cwd`
|
|
70
|
+
* (default: `<cwd>/tmp/ui-debugger-mcp`)
|
|
32
71
|
*/
|
|
33
72
|
export function workspacePaths(cwd, base) {
|
|
34
|
-
|
|
73
|
+
// A relative base is anchored at the project root — the same resolution the CLI
|
|
74
|
+
// does before it reads `state.json`, so both processes land on one workspace.
|
|
75
|
+
const resolvedBase = base === undefined ? join(cwd, 'tmp', 'ui-debugger-mcp') : resolve(cwd, base);
|
|
76
|
+
const root = join(resolvedBase, projectDir(cwd, resolvedBase));
|
|
35
77
|
return {
|
|
36
78
|
root,
|
|
37
79
|
chromeUserData: join(root, 'chrome-user-data'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../src/session/workspace.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../src/session/workspace.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE1E,+EAA+E;AAC/E,2FAA2F;AAE3F,IAAI,QAAQ,GAAG,CAAC,CAAC;AAEjB,6CAA6C;AAC7C,MAAM,UAAU,aAAa;IAC3B,QAAQ,GAAG,CAAC,CAAC;AACf,CAAC;AAED,2CAA2C;AAC3C,SAAS,GAAG,CAAC,KAAa,EAAE,KAAK,GAAG,CAAC;IACnC,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AAC5C,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,iBAAiB,CAAC,GAAW;IAC3C,QAAQ,GAAG,CAAC,QAAQ,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IACnC,MAAM,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC;IACxB,MAAM,IAAI,GAAG,GAAG,CAAC,CAAC,WAAW,EAAE,IAAI,GAAG,CAAC,CAAC,CAA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AAC,CAAC;IACvD,MAAM,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;AACnD,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,KAAmB;IACrD,MAAM,KAAK,CAAC,KAAK,CAAC,WAAW,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACpD,MAAM,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;AAC/C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@developerz.ai/ui-debugger-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "Autonomous UI debugging MCP server. Give a goal; a fast agent drives the browser/desktop, finds bugs + visual issues, and reports back.",
|
|
5
5
|
"mcpName": "io.github.developerz-ai/ui-debugger-mcp",
|
|
6
6
|
"license": "MIT",
|