@joeytheman/gemini-mcp-tool 1.3.0 → 2.2.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 (115) hide show
  1. package/README.md +123 -34
  2. package/dist/__tests__/ask-gemini.test.js +99 -37
  3. package/dist/__tests__/ask-gemini.test.js.map +1 -1
  4. package/dist/__tests__/live-pass.test.d.ts +2 -0
  5. package/dist/__tests__/live-pass.test.d.ts.map +1 -0
  6. package/dist/__tests__/live-pass.test.js +725 -0
  7. package/dist/__tests__/live-pass.test.js.map +1 -0
  8. package/dist/__tests__/screen-review.test.d.ts +2 -0
  9. package/dist/__tests__/screen-review.test.d.ts.map +1 -0
  10. package/dist/__tests__/screen-review.test.js +444 -0
  11. package/dist/__tests__/screen-review.test.js.map +1 -0
  12. package/dist/__tests__/server.test.js +17 -12
  13. package/dist/__tests__/server.test.js.map +1 -1
  14. package/dist/__tests__/simple-tools.test.d.ts +2 -0
  15. package/dist/__tests__/simple-tools.test.d.ts.map +1 -0
  16. package/dist/__tests__/simple-tools.test.js +25 -0
  17. package/dist/__tests__/simple-tools.test.js.map +1 -0
  18. package/dist/__tests__/tools.test.js +63 -0
  19. package/dist/__tests__/tools.test.js.map +1 -1
  20. package/dist/__tests__/utils/agyExecutor.test.d.ts +2 -0
  21. package/dist/__tests__/utils/agyExecutor.test.d.ts.map +1 -0
  22. package/dist/__tests__/utils/agyExecutor.test.js +616 -0
  23. package/dist/__tests__/utils/agyExecutor.test.js.map +1 -0
  24. package/dist/__tests__/utils/agyTranscriptRecovery.test.d.ts +2 -0
  25. package/dist/__tests__/utils/agyTranscriptRecovery.test.d.ts.map +1 -0
  26. package/dist/__tests__/utils/agyTranscriptRecovery.test.js +127 -0
  27. package/dist/__tests__/utils/agyTranscriptRecovery.test.js.map +1 -0
  28. package/dist/__tests__/utils/chunkCache.test.js +26 -2
  29. package/dist/__tests__/utils/chunkCache.test.js.map +1 -1
  30. package/dist/__tests__/utils/commandExecutor.test.js +30 -6
  31. package/dist/__tests__/utils/commandExecutor.test.js.map +1 -1
  32. package/dist/__tests__/utils/fileReferences.test.d.ts +2 -0
  33. package/dist/__tests__/utils/fileReferences.test.d.ts.map +1 -0
  34. package/dist/__tests__/utils/fileReferences.test.js +87 -0
  35. package/dist/__tests__/utils/fileReferences.test.js.map +1 -0
  36. package/dist/__tests__/utils/gitStatusGuard.test.d.ts +2 -0
  37. package/dist/__tests__/utils/gitStatusGuard.test.d.ts.map +1 -0
  38. package/dist/__tests__/utils/gitStatusGuard.test.js +106 -0
  39. package/dist/__tests__/utils/gitStatusGuard.test.js.map +1 -0
  40. package/dist/__tests__/utils/responseCache.test.js +31 -11
  41. package/dist/__tests__/utils/responseCache.test.js.map +1 -1
  42. package/dist/__tests__/utils/test-helpers.d.ts +4 -0
  43. package/dist/__tests__/utils/test-helpers.d.ts.map +1 -1
  44. package/dist/__tests__/utils/test-helpers.js +16 -0
  45. package/dist/__tests__/utils/test-helpers.js.map +1 -1
  46. package/dist/constants.d.ts +68 -26
  47. package/dist/constants.d.ts.map +1 -1
  48. package/dist/constants.js +69 -28
  49. package/dist/constants.js.map +1 -1
  50. package/dist/index.js +2 -2
  51. package/dist/index.js.map +1 -1
  52. package/dist/tools/ask-gemini.tool.d.ts +34 -0
  53. package/dist/tools/ask-gemini.tool.d.ts.map +1 -1
  54. package/dist/tools/ask-gemini.tool.js +38 -22
  55. package/dist/tools/ask-gemini.tool.js.map +1 -1
  56. package/dist/tools/brainstorm.tool.d.ts.map +1 -1
  57. package/dist/tools/brainstorm.tool.js +5 -4
  58. package/dist/tools/brainstorm.tool.js.map +1 -1
  59. package/dist/tools/index.d.ts.map +1 -1
  60. package/dist/tools/index.js +3 -1
  61. package/dist/tools/index.js.map +1 -1
  62. package/dist/tools/live-pass.tool.d.ts +183 -0
  63. package/dist/tools/live-pass.tool.d.ts.map +1 -0
  64. package/dist/tools/live-pass.tool.js +548 -0
  65. package/dist/tools/live-pass.tool.js.map +1 -0
  66. package/dist/tools/registry.d.ts +4 -2
  67. package/dist/tools/registry.d.ts.map +1 -1
  68. package/dist/tools/registry.js +12 -9
  69. package/dist/tools/registry.js.map +1 -1
  70. package/dist/tools/screen-review.tool.d.ts +121 -0
  71. package/dist/tools/screen-review.tool.d.ts.map +1 -0
  72. package/dist/tools/screen-review.tool.js +415 -0
  73. package/dist/tools/screen-review.tool.js.map +1 -0
  74. package/dist/tools/simple-tools.d.ts.map +1 -1
  75. package/dist/tools/simple-tools.js +4 -2
  76. package/dist/tools/simple-tools.js.map +1 -1
  77. package/dist/utils/agyExecutor.d.ts +68 -0
  78. package/dist/utils/agyExecutor.d.ts.map +1 -0
  79. package/dist/utils/agyExecutor.js +443 -0
  80. package/dist/utils/agyExecutor.js.map +1 -0
  81. package/dist/utils/agyReport.d.ts +19 -0
  82. package/dist/utils/agyReport.d.ts.map +1 -0
  83. package/dist/utils/agyReport.js +62 -0
  84. package/dist/utils/agyReport.js.map +1 -0
  85. package/dist/utils/agyTranscriptRecovery.d.ts +16 -0
  86. package/dist/utils/agyTranscriptRecovery.d.ts.map +1 -0
  87. package/dist/utils/agyTranscriptRecovery.js +149 -0
  88. package/dist/utils/agyTranscriptRecovery.js.map +1 -0
  89. package/dist/utils/chunkCache.d.ts.map +1 -1
  90. package/dist/utils/chunkCache.js +19 -5
  91. package/dist/utils/chunkCache.js.map +1 -1
  92. package/dist/utils/commandExecutor.d.ts.map +1 -1
  93. package/dist/utils/commandExecutor.js +15 -7
  94. package/dist/utils/commandExecutor.js.map +1 -1
  95. package/dist/utils/fileReferences.d.ts +45 -0
  96. package/dist/utils/fileReferences.d.ts.map +1 -0
  97. package/dist/utils/fileReferences.js +169 -0
  98. package/dist/utils/fileReferences.js.map +1 -0
  99. package/dist/utils/gitStatusGuard.d.ts +35 -0
  100. package/dist/utils/gitStatusGuard.d.ts.map +1 -0
  101. package/dist/utils/gitStatusGuard.js +82 -0
  102. package/dist/utils/gitStatusGuard.js.map +1 -0
  103. package/dist/utils/responseCache.d.ts +3 -3
  104. package/dist/utils/responseCache.d.ts.map +1 -1
  105. package/dist/utils/responseCache.js +11 -6
  106. package/dist/utils/responseCache.js.map +1 -1
  107. package/package.json +10 -9
  108. package/dist/__tests__/utils/geminiExecutor.test.d.ts +0 -2
  109. package/dist/__tests__/utils/geminiExecutor.test.d.ts.map +0 -1
  110. package/dist/__tests__/utils/geminiExecutor.test.js +0 -337
  111. package/dist/__tests__/utils/geminiExecutor.test.js.map +0 -1
  112. package/dist/utils/geminiExecutor.d.ts +0 -17
  113. package/dist/utils/geminiExecutor.d.ts.map +0 -1
  114. package/dist/utils/geminiExecutor.js +0 -238
  115. package/dist/utils/geminiExecutor.js.map +0 -1
@@ -0,0 +1,548 @@
1
+ import { z } from 'zod';
2
+ import * as fs from 'fs';
3
+ import * as path from 'path';
4
+ import { execFile } from 'child_process';
5
+ import { promisify } from 'util';
6
+ import { formatZodIssues } from './registry.js';
7
+ import { deniedActionsSummary, executeAgyJson, formatAgyUsageLine, formatConversationLine, toAgyJsonSchema, } from '../utils/agyExecutor.js';
8
+ import { bulletList, section, renderUnparsableEnvelope, formatWorkingTreeSection, failWithWorkingTree } from '../utils/agyReport.js';
9
+ import { isWithin, resolveWorkingDirectory, realpathOfExistingPrefix } from '../utils/fileReferences.js';
10
+ import { snapshotWorkingTree, diffWorkingTree } from '../utils/gitStatusGuard.js';
11
+ import { ERROR_MESSAGES, LIVE_PASS, MODELS, MODEL_CHOICE_DESCRIPTION } from '../constants.js';
12
+ const execFileAsync = promisify(execFile);
13
+ const PUBLISH_MAX_BUFFER = 10 * 1024 * 1024;
14
+ const PUBLISH_TIMEOUT_MS = 5 * 60 * 1000;
15
+ const FILES_PLACEHOLDER = '{files}';
16
+ // ---------------------------------------------------------------- arguments
17
+ export const livePassTargetSchema = z.object({
18
+ screen: z.string().min(1).describe("Screen or route name, e.g. 'orders' or 'settings/profile'."),
19
+ state: z.string().min(1).describe("State to capture, e.g. 'default', 'empty', 'offline', 'error', 'sheet-open'."),
20
+ viewport: z.string().min(1).describe("Viewport as WxH, e.g. '390x844' or '1280x800'. For the maestro driver, the device form factor."),
21
+ expected: z.string().min(1).describe("What this frame must show for a PASS. For an intentional error/empty/offline state, name the reason text and the recovery affordance."),
22
+ });
23
+ export const livePassArgsSchema = z.object({
24
+ targets: z.array(livePassTargetSchema).min(1).describe("Every frame the pass must produce. The verdict is derived from this list: a target that produced no frame fails the pass, whether Gemini skipped it with a reason or never reported it at all — a skip explains missing evidence, it does not excuse it."),
25
+ brief: z.string().refine(value => value.trim().length > 0, ERROR_MESSAGES.LIVE_PASS_NO_BRIEF)
26
+ .describe("Narrative context: base URL or app id, the served-branch marker, the seed case, navigation hints, and anything Gemini cannot infer from the targets."),
27
+ workingDirectory: z.string().min(1).describe("Absolute path to the worktree under test. Used as the agy cwd and workspace root; must exist and must not be a filesystem root."),
28
+ artifactDir: z.string().optional().describe("Absolute directory for the captured PNGs and manifest.json. Must be strictly inside workingDirectory. Defaults to <workingDirectory>/.live-pass/<timestamp>."),
29
+ driver: z.enum(['playwright', 'maestro']).describe("Which MCP server Gemini drives: 'playwright' for web, 'maestro' for a booted simulator."),
30
+ model: z.string().default(MODELS.MEDIUM).describe(`${MODEL_CHOICE_DESCRIPTION} Defaults to '${MODELS.MEDIUM}'.`),
31
+ printTimeout: z.string().default(LIVE_PASS.DEFAULT_PRINT_TIMEOUT).describe("agy --print-timeout for the whole walk. A full pass takes minutes."),
32
+ yolo: z.boolean().default(true).describe("Pass --dangerously-skip-permissions so Gemini may drive its MCP servers unattended. Without it agy denies the tool calls and the pass is BLOCKED. Refused when workingDirectory is a filesystem root."),
33
+ publishCommand: z.string().optional().describe("Optional shell command run in code after validation, with {files} replaced by the shell-quoted paths of the frames that validated OK. Its stdout is returned as PR markdown. Never run on a BLOCKED pass."),
34
+ conversationId: z.string().min(1).optional().describe("Resume a previous pass so Gemini can report deltas (resolved / regressions / changes) against what it saw then. The browser or simulator still starts fresh."),
35
+ }).superRefine((value, ctx) => {
36
+ const seen = new Set();
37
+ value.targets.forEach((target, index) => {
38
+ const key = targetKey(target);
39
+ if (seen.has(key)) {
40
+ ctx.addIssue({
41
+ code: 'custom',
42
+ message: `duplicate target: ${target.screen} / ${target.state} / ${target.viewport}`,
43
+ path: ['targets', index],
44
+ });
45
+ }
46
+ seen.add(key);
47
+ });
48
+ });
49
+ // ------------------------------------------------------------ result schema
50
+ const frameSchema = z.object({
51
+ file: z.string().describe("Absolute path of the PNG you saved for this frame."),
52
+ screen: z.string().describe("The requested target's screen string, copied exactly."),
53
+ state: z.string().describe("The requested target's state string, copied exactly."),
54
+ expected: z.string().describe("What the brief said this state must show."),
55
+ viewport: z.string().describe("The requested target's viewport string, copied exactly."),
56
+ verdict: z.enum(['PASS', 'FAIL']),
57
+ observed: z.string().describe("What the image actually shows, in your own words, after opening it."),
58
+ });
59
+ const findingSchema = z.object({
60
+ severity: z.enum(['BLOCKER', 'MAJOR', 'MINOR']),
61
+ screen: z.string(),
62
+ description: z.string(),
63
+ evidence_file: z.string().optional(),
64
+ });
65
+ const noteSchema = z.object({
66
+ screen: z.string(),
67
+ description: z.string(),
68
+ evidence_file: z.string().optional(),
69
+ });
70
+ export const livePassResultSchema = z.object({
71
+ verdict: z.enum(['PASS', 'FAIL', 'BLOCKED']),
72
+ summary: z.string(),
73
+ served_branch_check: z.string().describe("How you confirmed the running app is the branch under test, or why you could not."),
74
+ frames: z.array(frameSchema),
75
+ findings: z.array(findingSchema),
76
+ regressions: z.array(findingSchema).describe("Behaviour that worked in the earlier pass of this conversation and is broken now. Empty on a fresh pass."),
77
+ resolved: z.array(noteSchema).describe("Defects reported earlier in this conversation that are now fixed. Never affects the verdict. Empty on a fresh pass."),
78
+ changes: z.array(noteSchema).describe("Neutral differences from the earlier pass that are neither broken nor a fix. Empty on a fresh pass."),
79
+ skipped: z.array(z.object({ target: z.string(), reason: z.string() })),
80
+ });
81
+ export const LIVE_PASS_RESULT_JSON_SCHEMA = toAgyJsonSchema(livePassResultSchema);
82
+ const LIVE_PASS_RESULT_SCHEMA_TEXT = JSON.stringify(LIVE_PASS_RESULT_JSON_SCHEMA);
83
+ // ------------------------------------------------------------------- prompt
84
+ function normalize(value) {
85
+ return value.trim().toLowerCase().replace(/\s+/g, '');
86
+ }
87
+ function targetKey(target) {
88
+ return [normalize(target.screen), normalize(target.state), normalize(target.viewport)].join('|');
89
+ }
90
+ function slugify(value) {
91
+ return value.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '') || 'x';
92
+ }
93
+ /**
94
+ * The one filename a target's evidence may use. Derived in code from the whole
95
+ * screen/state/viewport triple so two targets can never share a file — letting
96
+ * Gemini name frames allowed one overwritten screenshot to satisfy several
97
+ * targets at once.
98
+ */
99
+ export function frameFileName(target) {
100
+ return `${slugify(target.screen)}-${slugify(target.state)}-${slugify(target.viewport)}.png`;
101
+ }
102
+ /**
103
+ * One filename per target, keyed by target. Slugifying can map two distinct
104
+ * targets (`a/b` and `a-b`) onto one name, so a collision is suffixed rather
105
+ * than left to collapse two targets into one file.
106
+ */
107
+ export function prescribedFrameNames(targets) {
108
+ const used = new Set();
109
+ const byTarget = new Map();
110
+ for (const target of targets) {
111
+ const base = frameFileName(target);
112
+ let name = base;
113
+ for (let suffix = 2; used.has(name); suffix++) {
114
+ name = base.replace(/\.png$/, `-${suffix}.png`);
115
+ }
116
+ used.add(name);
117
+ byTarget.set(targetKey(target), name);
118
+ }
119
+ return byTarget;
120
+ }
121
+ function renderTargets(targets, artifactDir) {
122
+ const names = prescribedFrameNames(targets);
123
+ return targets
124
+ .map((target, index) => `${index + 1}. screen: ${target.screen} | state: ${target.state} | viewport: ${target.viewport}\n` +
125
+ ` expected: ${target.expected}\n` +
126
+ ` file: ${path.join(artifactDir, names.get(targetKey(target)))}`)
127
+ .join('\n');
128
+ }
129
+ const PLAYWRIGHT_PROCEDURE = `Driver: the "${LIVE_PASS.PLAYWRIGHT_MCP_NAME}" MCP server.
130
+ For each target, in order:
131
+ - browser_navigate to the target's route.
132
+ - Wait until the marker named in the brief is present. Never screenshot a page that still shows a spinner or skeleton when a content state was requested.
133
+ - browser_resize to the target's viewport.
134
+ - browser_take_screenshot with filename set to the exact absolute path printed as "file:" for that target below. Never invent a filename, never reuse another target's file, and never use fullPage.
135
+ - For a scrolling screen: browser_resize to (width, 4000), then browser_evaluate this snippet to measure the real content height, then browser_resize to (width, measured) and shoot:
136
+ () => { const skip = (el) => el.closest('[aria-hidden="true"]') || el.closest('[role="tab"]'); let bottom = 0; for (const el of document.querySelectorAll('body *')) { if (skip(el)) continue; const hasText = Array.from(el.childNodes).some(n => n.nodeType === 3 && n.textContent.trim()); if (!hasText) continue; bottom = Math.max(bottom, el.getBoundingClientRect().bottom + window.scrollY); } return Math.ceil(bottom + 24); }
137
+ - Capture centred/terminal states and sheets at 390x844 and again at 320x568 when the targets ask for both.
138
+ - browser_snapshot only to locate an element. Never copy a snapshot or accessibility tree into your answer.
139
+ - Scroll a virtualized list to its end before asserting that something is absent.`;
140
+ const MAESTRO_PROCEDURE = `Driver: the "${LIVE_PASS.MAESTRO_MCP_NAME}" MCP server.
141
+ For each target, in order:
142
+ - list_devices first and use the returned udid for every later call. Never guess a device.
143
+ - run an inline YAML flow to reach the state, then inspect_screen to confirm it settled.
144
+ - Never use take_screenshot for evidence: it returns an image inline and saves nothing.
145
+ - After each settled state, shell out: xcrun simctl io <udid> screenshot <the exact absolute path printed as "file:" for that target below>. Never invent a filename and never reuse another target's file.
146
+ - Only one driver may own a simulator at a time. If the device is busy, record the target as skipped with that reason rather than fighting for it — the pass then FAILS for missing evidence, which is the honest outcome. Never fabricate or reuse a frame.`;
147
+ const RESUMED_DELTA_SECTION = `## Delta reporting (this conversation has an earlier pass)
148
+ Compare against the frames and findings you reported earlier in this conversation.
149
+ - A defect you reported before that is now fixed goes in "resolved".
150
+ - Behaviour that worked before and is broken now goes in "regressions".
151
+ - A difference that is neither (a moved control, changed copy that reads correctly) goes in "changes".
152
+ - A new defect goes in "findings".
153
+ Never put an improvement in "findings" or "regressions". The browser or simulator starts fresh: walk every target again, do not answer from memory.`;
154
+ export function buildLivePassPrompt(config) {
155
+ const { brief, driver, targets, workingDirectory, artifactDir, resumed } = config;
156
+ const procedure = driver === 'maestro' ? MAESTRO_PROCEDURE : PLAYWRIGHT_PROCEDURE;
157
+ return `# Live UI pass
158
+
159
+ You are walking a running application, capturing screenshots, looking at them yourself, and reporting what you saw as text. The caller never opens an image, so everything you see in a screenshot must become a sentence in your answer.
160
+ Your answer is ONLY the schema JSON. No prose before or after it, no markdown fences, no image data, no base64, no accessibility trees.
161
+
162
+ ## Environment
163
+ - Artifact directory (write here, and only here): ${artifactDir}
164
+ - Working directory (read-only): ${workingDirectory}
165
+ - Never read, list or glob outside those two directories.
166
+ - Never edit product code, never create or modify files outside the artifact directory, and never run a git command that changes state (no add, commit, checkout, stash, restore, clean).
167
+
168
+ ## Procedure
169
+ ${procedure}
170
+
171
+ ## Targets
172
+ Capture exactly these, use these exact screen / state / viewport strings in your frames, and save each one to its own "file:" path — copied verbatim into that frame's "file". One file per target: a file that answers two targets is treated as no evidence at all.
173
+ ${renderTargets(targets, artifactDir)}
174
+
175
+ ## Served-branch check first
176
+ Before any capture, confirm the running app is the build under test using the marker in the brief. If you cannot confirm it, stop, set verdict BLOCKED, and explain in served_branch_check. Never report on an app you cannot identify.
177
+
178
+ ## Evidence discipline
179
+ - Open every PNG you saved and describe it in "observed". "observed" is what the image shows, not what you expected it to show.
180
+ - Judge each frame against the state the brief requested for it, using that target's "expected" as the checklist:
181
+ - Where a content state was requested, a spinner, blank page, skeleton, error, or the wrong screen is a FAIL.
182
+ - Where the brief intentionally exercises an error, empty, offline, permission-denied or other terminal state, the frame PASSES when it shows that state with everything "expected" names (for instance the reason text and the recovery affordance, when "expected" names them) and FAILS when any of that is missing. An intentional state that renders as "expected" describes it is never a finding by itself.
183
+ - Something "expected" does not ask for is at most a MINOR finding. It never makes the frame FAIL.
184
+ - Report position separately from presence: "the control exists but sits below the fold" is not "the control is missing".
185
+ - If a target is unreachable, delete any stale PNG already sitting at that frame's filename, add the target to "skipped" with the reason, and do not invent a frame for it.
186
+ - If you cannot open a PNG you saved, say so in "observed" and mark that frame FAIL.
187
+
188
+ ## Manifest
189
+ Write ${artifactDir}/${LIVE_PASS.MANIFEST_FILE} containing {"run_started": <ISO timestamp>, "driver": "${driver}", "frames": [...], "skipped": [...]} mirroring your answer.
190
+
191
+ ## Verdict rules
192
+ - PASS only when every requested target was captured and each frame matches the state the brief requested.
193
+ - FAIL when any frame is FAIL, any finding is BLOCKER or MAJOR, or anything regressed.
194
+ - BLOCKED when the environment stopped you: the app is not the branch under test, the driver would not start, or a tool call was denied.
195
+ ${resumed ? `\n${RESUMED_DELTA_SECTION}\n` : '\nThis is a fresh pass: return empty arrays for "resolved", "regressions" and "changes".\n'}
196
+ ## Brief
197
+ ${brief}`;
198
+ }
199
+ /**
200
+ * Realpath'd like the artifact dir, so a frame reported through a symlinked
201
+ * spelling of the same directory is not mistaken for an escape.
202
+ */
203
+ function frameAbsolutePath(file, artifactDir) {
204
+ return realpathOfExistingPrefix(path.isAbsolute(file) ? file : path.resolve(artifactDir, file));
205
+ }
206
+ function checkFrameFile(absFile, artifactDir, runStartMs) {
207
+ if (!isWithin(artifactDir, absFile))
208
+ return 'OUTSIDE';
209
+ try {
210
+ const stat = fs.statSync(absFile);
211
+ if (!stat.isFile())
212
+ return 'MISSING';
213
+ if (stat.size === 0)
214
+ return 'EMPTY';
215
+ if (stat.mtimeMs < runStartMs - LIVE_PASS.FRESHNESS_TOLERANCE_MS)
216
+ return 'STALE';
217
+ return 'OK';
218
+ }
219
+ catch {
220
+ return 'MISSING';
221
+ }
222
+ }
223
+ function readManifestProblems(artifactDir, frameCount, runStartMs) {
224
+ const manifestPath = path.join(artifactDir, LIVE_PASS.MANIFEST_FILE);
225
+ let raw;
226
+ let writtenMs;
227
+ try {
228
+ raw = fs.readFileSync(manifestPath, 'utf-8');
229
+ writtenMs = fs.statSync(manifestPath).mtimeMs;
230
+ }
231
+ catch {
232
+ return [`${LIVE_PASS.MANIFEST_FILE} was not written`];
233
+ }
234
+ // A reused artifact directory can still hold an earlier run's manifest, which
235
+ // would pass a shape-and-count check while describing frames nobody captured.
236
+ if (writtenMs < runStartMs - LIVE_PASS.FRESHNESS_TOLERANCE_MS) {
237
+ return [`${LIVE_PASS.MANIFEST_FILE} predates this run: it is left over from an earlier pass`];
238
+ }
239
+ let parsed;
240
+ try {
241
+ parsed = JSON.parse(raw);
242
+ }
243
+ catch {
244
+ return [`${LIVE_PASS.MANIFEST_FILE} is not valid JSON`];
245
+ }
246
+ const manifestFrames = parsed?.frames;
247
+ if (!Array.isArray(manifestFrames)) {
248
+ return [`${LIVE_PASS.MANIFEST_FILE} has no frames array`];
249
+ }
250
+ if (manifestFrames.length !== frameCount) {
251
+ return [`${LIVE_PASS.MANIFEST_FILE} lists ${manifestFrames.length} frames but the answer reports ${frameCount}`];
252
+ }
253
+ return [];
254
+ }
255
+ function listCaptures(artifactDir) {
256
+ try {
257
+ return fs.readdirSync(artifactDir)
258
+ .filter(name => /\.(png|jpe?g)$/i.test(name))
259
+ .map(name => path.join(artifactDir, name));
260
+ }
261
+ catch {
262
+ return [];
263
+ }
264
+ }
265
+ /** Check every reported frame against the disk. Never throws. */
266
+ export function validateFrames(result, artifactDir, runStartMs, targets = []) {
267
+ const prescribed = prescribedFrameNames(targets);
268
+ const claimedBy = new Set();
269
+ const notes = [];
270
+ const checks = result.frames.map(frame => {
271
+ const absFile = frameAbsolutePath(frame.file, artifactDir);
272
+ const expectedName = prescribed.get(targetKey(frame));
273
+ // A second frame pointing at the same file is one screenshot answering two
274
+ // targets — no evidence for either, however good the picture is.
275
+ const status = claimedBy.has(absFile)
276
+ ? 'DUPLICATE'
277
+ : checkFrameFile(absFile, artifactDir, runStartMs);
278
+ claimedBy.add(absFile);
279
+ const misnamed = Boolean(expectedName) && path.basename(absFile) !== expectedName;
280
+ if (misnamed) {
281
+ notes.push(`MISNAMED: ${absFile} (${frame.screen} / ${frame.state}) — expected ${expectedName}`);
282
+ }
283
+ return { file: absFile, screen: frame.screen, state: frame.state, status, misnamed };
284
+ });
285
+ const problems = [
286
+ ...checks.filter(check => check.status !== 'OK').map(check => check.status === 'DUPLICATE'
287
+ ? `DUPLICATE: reused evidence file ${check.file} (${check.screen} / ${check.state})`
288
+ : `${check.status}: ${check.file} (${check.screen} / ${check.state})`),
289
+ ...readManifestProblems(artifactDir, result.frames.length, runStartMs),
290
+ ];
291
+ return {
292
+ checks,
293
+ okFiles: checks.filter(check => check.status === 'OK').map(check => check.file),
294
+ problems,
295
+ notes,
296
+ unreportedCaptures: listCaptures(artifactDir).filter(file => !claimedBy.has(file)),
297
+ };
298
+ }
299
+ /** Match each requested target to a reported frame, case- and whitespace-insensitively. */
300
+ export function checkCoverage(targets, result) {
301
+ const frameKeys = new Map();
302
+ for (const frame of result.frames) {
303
+ frameKeys.set(targetKey(frame), frame.file);
304
+ }
305
+ const uncovered = [];
306
+ const skipped = [];
307
+ const matchedKeys = new Set();
308
+ for (const target of targets) {
309
+ const key = targetKey(target);
310
+ if (frameKeys.has(key)) {
311
+ matchedKeys.add(key);
312
+ continue;
313
+ }
314
+ const skip = result.skipped.find(entry => {
315
+ const haystack = normalize(entry.target);
316
+ return haystack.includes(normalize(target.screen)) && haystack.includes(normalize(target.state));
317
+ });
318
+ if (skip) {
319
+ skipped.push({ target, reason: skip.reason });
320
+ }
321
+ else {
322
+ uncovered.push(target);
323
+ }
324
+ }
325
+ const extraFrames = result.frames
326
+ .filter(frame => !matchedKeys.has(targetKey(frame)))
327
+ .map(frame => frame.file);
328
+ return { uncovered, skipped, extraFrames };
329
+ }
330
+ /** Gemini's own verdict is advisory; this is the one the caller acts on. */
331
+ export function deriveVerdict(input) {
332
+ const { result, validation, coverage, deniedActions } = input;
333
+ const reasons = [];
334
+ if (deniedActions)
335
+ reasons.push(`agy denied required actions: ${deniedActions}`);
336
+ if (result.verdict === 'BLOCKED')
337
+ reasons.push('Gemini reported BLOCKED');
338
+ if (reasons.length > 0)
339
+ return { verdict: 'BLOCKED', reported: result.verdict, reasons };
340
+ for (const frame of result.frames.filter(frame => frame.verdict === 'FAIL')) {
341
+ reasons.push(`frame FAIL: ${frame.screen} / ${frame.state}`);
342
+ }
343
+ reasons.push(...validation.problems);
344
+ for (const target of coverage.uncovered) {
345
+ reasons.push(`uncovered target: ${target.screen} / ${target.state} / ${target.viewport}`);
346
+ }
347
+ for (const entry of coverage.skipped) {
348
+ reasons.push(`skipped target: ${entry.target.screen} / ${entry.target.state} (${entry.reason})`);
349
+ }
350
+ for (const regression of result.regressions) {
351
+ reasons.push(`regression: ${regression.screen} — ${regression.description}`);
352
+ }
353
+ for (const finding of result.findings.filter(f => f.severity === 'BLOCKER' || f.severity === 'MAJOR')) {
354
+ reasons.push(`${finding.severity} finding: ${finding.screen} — ${finding.description}`);
355
+ }
356
+ return {
357
+ verdict: reasons.length > 0 ? 'FAIL' : 'PASS',
358
+ reported: result.verdict,
359
+ reasons,
360
+ };
361
+ }
362
+ function shellQuote(value) {
363
+ return `'${value.replace(/'/g, `'\\''`)}'`;
364
+ }
365
+ export async function runPublishCommand(command, okFiles, cwd) {
366
+ if (!command?.trim()) {
367
+ return { ran: false, stdout: '', stderr: '', exitCode: null };
368
+ }
369
+ if (okFiles.length === 0) {
370
+ return { ran: false, stdout: '', stderr: '', exitCode: null, skippedReason: 'no frames validated OK' };
371
+ }
372
+ const resolved = command.split(FILES_PLACEHOLDER).join(okFiles.map(shellQuote).join(' '));
373
+ try {
374
+ const running = execFileAsync('/bin/sh', ['-c', resolved], {
375
+ cwd,
376
+ maxBuffer: PUBLISH_MAX_BUFFER,
377
+ timeout: PUBLISH_TIMEOUT_MS,
378
+ });
379
+ // Close stdin so a command that reads it (an upload prompting for input)
380
+ // fails fast instead of hanging the MCP call after a finished pass.
381
+ running.child.stdin?.end();
382
+ const { stdout, stderr } = await running;
383
+ return { ran: true, command: resolved, stdout: stdout.trim(), stderr: stderr.trim(), exitCode: 0 };
384
+ }
385
+ catch (error) {
386
+ const failure = error;
387
+ return {
388
+ ran: true,
389
+ command: resolved,
390
+ stdout: (failure.stdout ?? '').trim(),
391
+ stderr: (failure.stderr ?? failure.message ?? '').trim(),
392
+ exitCode: typeof failure.code === 'number' ? failure.code : null,
393
+ };
394
+ }
395
+ }
396
+ // ------------------------------------------------------------------ report
397
+ export function formatLivePassReport(input) {
398
+ const { envelope, result, decision, validation, coverage, driver, model, artifactDir } = input;
399
+ const statusById = new Map(validation.checks.map(check => [check.file, check.status]));
400
+ const headline = decision.verdict === decision.reported
401
+ ? `# Live pass: ${decision.verdict}`
402
+ : `# Live pass: ${decision.verdict} (Gemini reported ${decision.reported})`;
403
+ const parts = [];
404
+ if (envelope.conversation_id)
405
+ parts.push(formatConversationLine(envelope.conversation_id));
406
+ parts.push(headline);
407
+ parts.push(`driver: ${driver} · model: ${model} · artifacts: ${artifactDir}`);
408
+ parts.push(formatAgyUsageLine(envelope));
409
+ parts.push(section('Why', bulletList(decision.reasons)));
410
+ parts.push(section('Served-branch check', result.served_branch_check || '- not reported'));
411
+ parts.push(section('Summary', result.summary || '- not reported'));
412
+ parts.push(section('Frames', bulletList(result.frames.map(frame => {
413
+ const abs = frameAbsolutePath(frame.file, artifactDir);
414
+ return `${frame.verdict} [${statusById.get(abs) ?? 'UNKNOWN'}] ${frame.screen} / ${frame.state} / ${frame.viewport}\n` +
415
+ ` file: ${abs}\n expected: ${frame.expected}\n observed: ${frame.observed}`;
416
+ }))));
417
+ const renderFindings = (items) => bulletList(items.map(item => `${item.severity} ${item.screen}: ${item.description}${item.evidence_file ? ` (${item.evidence_file})` : ''}`));
418
+ const renderNotes = (items) => bulletList(items.map(item => `${item.screen}: ${item.description}${item.evidence_file ? ` (${item.evidence_file})` : ''}`));
419
+ parts.push(section('Findings', renderFindings(result.findings)));
420
+ parts.push(section('Regressions', renderFindings(result.regressions)));
421
+ parts.push(section('Resolved', renderNotes(result.resolved)));
422
+ parts.push(section('Changes', renderNotes(result.changes)));
423
+ parts.push(section('Skipped', bulletList([
424
+ ...result.skipped.map(entry => `${entry.target}: ${entry.reason}`),
425
+ ...coverage.uncovered.map(target => `${target.screen} / ${target.state} / ${target.viewport}: no frame and no skip reason`),
426
+ ])));
427
+ const validationLines = [...validation.problems, ...validation.notes];
428
+ if (validation.unreportedCaptures.length > 0) {
429
+ validationLines.push(`captures not reported as frames: ${validation.unreportedCaptures.join(', ')}`);
430
+ }
431
+ if (coverage.extraFrames.length > 0) {
432
+ validationLines.push(`frames matching no requested target: ${coverage.extraFrames.join(', ')}`);
433
+ }
434
+ parts.push(section('Validation', bulletList(validationLines)));
435
+ if (input.deniedActions) {
436
+ parts.push(section('Denied actions', `- ${input.deniedActions}`));
437
+ }
438
+ const workingTreeSection = formatWorkingTreeSection(input.workingTree);
439
+ if (workingTreeSection)
440
+ parts.push(workingTreeSection);
441
+ const { publish } = input;
442
+ if (publish.ran) {
443
+ parts.push(section('PR markdown', publish.exitCode === 0
444
+ ? publish.stdout || '- publish command produced no output'
445
+ : `- publish command exited ${publish.exitCode ?? 'unknown'}\n- ${publish.stderr || 'no stderr'}`));
446
+ }
447
+ else if (publish.skippedReason) {
448
+ parts.push(section('PR markdown', `- publish command not run: ${publish.skippedReason}`));
449
+ }
450
+ return parts.join('\n\n');
451
+ }
452
+ // ------------------------------------------------------------------ execute
453
+ function resolveArtifactDir(workingDirectory, requested) {
454
+ // The default candidate goes through the same resolve-and-contain check as an
455
+ // explicit one: a `.live-pass` symlink pointing outside the worktree would
456
+ // otherwise let the default escape the boundary the tool advertises.
457
+ const stamp = new Date().toISOString().replace(/[:.]/g, '-');
458
+ const candidate = requested ?? path.join(workingDirectory, LIVE_PASS.DEFAULT_ARTIFACT_SEGMENT, stamp);
459
+ const resolved = realpathOfExistingPrefix(candidate);
460
+ const strictlyInside = path.isAbsolute(candidate) &&
461
+ isWithin(workingDirectory, resolved) &&
462
+ resolved !== workingDirectory;
463
+ if (!strictlyInside) {
464
+ throw new Error(`${ERROR_MESSAGES.LIVE_PASS_ARTIFACT_DIR}. Received '${candidate}'.`);
465
+ }
466
+ return resolved;
467
+ }
468
+ export const livePassTool = {
469
+ name: "live-pass",
470
+ description: "Delegate a live UI pass to Gemini: it drives its own Playwright or Maestro MCP server, captures screenshots into a worktree-local artifact directory, looks at them itself, and returns a text verdict with per-frame observations. No image ever reaches the caller's context.",
471
+ zodSchema: livePassArgsSchema,
472
+ prompt: {
473
+ description: "Walk a running app with Gemini driving Playwright or Maestro, capture the requested screen/state/viewport frames, and return a PASS/FAIL/BLOCKED verdict with per-frame observations, findings, and optional PR markdown.",
474
+ },
475
+ category: 'gemini',
476
+ annotations: {
477
+ title: "Live UI Pass",
478
+ readOnlyHint: false,
479
+ openWorldHint: true,
480
+ },
481
+ execute: async (args, onProgress) => {
482
+ const input = livePassArgsSchema.parse(args);
483
+ const workingDirectory = resolveWorkingDirectory(input.workingDirectory);
484
+ const artifactDir = resolveArtifactDir(workingDirectory, input.artifactDir);
485
+ fs.mkdirSync(artifactDir, { recursive: true });
486
+ const runStartMs = Date.now();
487
+ const before = await snapshotWorkingTree(workingDirectory);
488
+ const afterWorkingTree = async () => diffWorkingTree(before, await snapshotWorkingTree(workingDirectory), { ignoreDirectory: artifactDir });
489
+ let envelope;
490
+ try {
491
+ envelope = await executeAgyJson(buildLivePassPrompt({
492
+ brief: input.brief,
493
+ driver: input.driver,
494
+ targets: input.targets,
495
+ workingDirectory,
496
+ artifactDir,
497
+ resumed: Boolean(input.conversationId),
498
+ }), {
499
+ model: input.model,
500
+ yolo: input.yolo,
501
+ printTimeout: input.printTimeout,
502
+ conversationId: input.conversationId,
503
+ includeDirectories: [workingDirectory, artifactDir],
504
+ cwd: workingDirectory,
505
+ jsonSchema: LIVE_PASS_RESULT_SCHEMA_TEXT,
506
+ noCache: true,
507
+ }, onProgress);
508
+ }
509
+ catch (error) {
510
+ // A timeout, a non-zero exit or an ERROR envelope can all land after
511
+ // Gemini has already used its shell: the warning must survive the failure.
512
+ failWithWorkingTree(error, await afterWorkingTree());
513
+ }
514
+ // Snapshot before branching: an off-schema answer must still report edits
515
+ // Gemini made with the shell this pass handed it.
516
+ const workingTree = await afterWorkingTree();
517
+ const parsed = livePassResultSchema.safeParse(envelope.structured_output);
518
+ if (!parsed.success) {
519
+ return [
520
+ renderUnparsableEnvelope(envelope, '# Live pass: BLOCKED', formatZodIssues(parsed.error), `artifacts: ${artifactDir}`),
521
+ formatWorkingTreeSection(workingTree),
522
+ ].filter(Boolean).join('\n\n');
523
+ }
524
+ const result = parsed.data;
525
+ const validation = validateFrames(result, artifactDir, runStartMs, input.targets);
526
+ const coverage = checkCoverage(input.targets, result);
527
+ const deniedActions = deniedActionsSummary(envelope);
528
+ const decision = deriveVerdict({ result, validation, coverage, deniedActions });
529
+ // A BLOCKED pass proves nothing, so its frames are never published.
530
+ const publish = decision.verdict === 'BLOCKED'
531
+ ? { ran: false, stdout: '', stderr: '', exitCode: null, skippedReason: 'pass was BLOCKED' }
532
+ : await runPublishCommand(input.publishCommand, validation.okFiles, workingDirectory);
533
+ return formatLivePassReport({
534
+ envelope,
535
+ result,
536
+ decision,
537
+ validation,
538
+ coverage,
539
+ driver: input.driver,
540
+ model: input.model,
541
+ artifactDir,
542
+ deniedActions,
543
+ workingTree,
544
+ publish,
545
+ });
546
+ },
547
+ };
548
+ //# sourceMappingURL=live-pass.tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"live-pass.tool.js","sourceRoot":"","sources":["../../src/tools/live-pass.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACjC,OAAO,EAAe,eAAe,E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YACR,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,WAAW;YACX,aAAa;YACb,WAAW;YACX,OAAO;SACR,CAAC,CAAC;IACL,CAAC;CACF,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { Tool, Prompt } from "@modelcontextprotocol/sdk/types.js";
2
2
  import { ToolArguments } from "../constants.js";
3
- import { ZodTypeAny } from "zod";
3
+ import { type ZodType, ZodError } from "zod";
4
4
  /**
5
5
  * MCP Tool annotations per specification.
6
6
  * @see https://spec.modelcontextprotocol.io/specification/2025-03-26/server/tools/#annotations
@@ -20,7 +20,7 @@ export interface ToolAnnotations {
20
20
  export interface UnifiedTool {
21
21
  name: string;
22
22
  description: string;
23
- zodSchema: ZodTypeAny;
23
+ zodSchema: ZodType;
24
24
  prompt?: {
25
25
  description: string;
26
26
  arguments?: Array<{
@@ -38,6 +38,8 @@ export declare const toolRegistry: UnifiedTool[];
38
38
  export declare function toolExists(toolName: string): boolean;
39
39
  export declare function getToolDefinitions(): Tool[];
40
40
  export declare function getPromptDefinitions(): Prompt[];
41
+ /** Zod issues as `path: message` lines, for error text and schema-mismatch reports. */
42
+ export declare function formatZodIssues(error: ZodError): string[];
41
43
  export declare function executeTool(toolName: string, args: ToolArguments, onProgress?: (newOutput: string) => void): Promise<string>;
42
44
  export declare function getPromptMessage(toolName: string, args: Record<string, any>): string;
43
45
  //# sourceMappingURL=registry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/tools/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAElE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAY,MAAM,KAAK,CAAC;AAG3C;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,wCAAwC;IACxC,KAAK,CAAC,EAAE,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