@developerz.ai/ui-debugger-mcp 1.9.0 → 1.11.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 +63 -47
- package/dist/adapters/android/abortable.d.ts +6 -0
- package/dist/adapters/android/abortable.js +22 -0
- package/dist/adapters/android/abortable.js.map +1 -0
- package/dist/adapters/android/adb.d.ts +19 -7
- package/dist/adapters/android/adb.js +50 -13
- package/dist/adapters/android/adb.js.map +1 -1
- package/dist/adapters/android/android-adapter.d.ts +20 -12
- package/dist/adapters/android/android-adapter.js +113 -165
- package/dist/adapters/android/android-adapter.js.map +1 -1
- package/dist/adapters/android/commands.d.ts +10 -0
- package/dist/adapters/android/commands.js +22 -0
- package/dist/adapters/android/commands.js.map +1 -1
- package/dist/adapters/android/emulator.d.ts +41 -0
- package/dist/adapters/android/emulator.js +115 -0
- package/dist/adapters/android/emulator.js.map +1 -0
- package/dist/adapters/android/logcat.d.ts +87 -0
- package/dist/adapters/android/logcat.js +352 -0
- package/dist/adapters/android/logcat.js.map +1 -0
- package/dist/adapters/android/ports.js.map +1 -1
- package/dist/adapters/android/sdk.d.ts +65 -0
- package/dist/adapters/android/sdk.js +107 -0
- package/dist/adapters/android/sdk.js.map +1 -0
- package/dist/adapters/android/uiautomator.d.ts +23 -7
- package/dist/adapters/android/uiautomator.js +31 -7
- package/dist/adapters/android/uiautomator.js.map +1 -1
- package/dist/adapters/availability.d.ts +39 -0
- package/dist/adapters/availability.js +62 -0
- package/dist/adapters/availability.js.map +1 -0
- package/dist/adapters/browser/browser-adapter.d.ts +11 -22
- package/dist/adapters/browser/browser-adapter.js +90 -71
- package/dist/adapters/browser/browser-adapter.js.map +1 -1
- package/dist/adapters/browser/cdp.d.ts +22 -17
- package/dist/adapters/browser/cdp.js +118 -72
- package/dist/adapters/browser/cdp.js.map +1 -1
- package/dist/adapters/browser/exchange-read.d.ts +39 -0
- package/dist/adapters/browser/exchange-read.js +102 -0
- package/dist/adapters/browser/exchange-read.js.map +1 -0
- package/dist/adapters/browser/extractor.js +9 -2
- package/dist/adapters/browser/extractor.js.map +1 -1
- package/dist/adapters/browser/filters.d.ts +1 -1
- package/dist/adapters/browser/filters.js.map +1 -1
- package/dist/adapters/browser/geometry.js.map +1 -1
- package/dist/adapters/browser/launch.d.ts +14 -5
- package/dist/adapters/browser/launch.js +14 -5
- package/dist/adapters/browser/launch.js.map +1 -1
- package/dist/adapters/browser/lifecycle.d.ts +91 -0
- package/dist/adapters/browser/lifecycle.js +141 -0
- package/dist/adapters/browser/lifecycle.js.map +1 -0
- package/dist/adapters/browser/locate.d.ts +18 -2
- package/dist/adapters/browser/locate.js +48 -3
- package/dist/adapters/browser/locate.js.map +1 -1
- package/dist/adapters/browser/log-filters.d.ts +2 -2
- package/dist/adapters/browser/log-filters.js +15 -4
- package/dist/adapters/browser/log-filters.js.map +1 -1
- package/dist/adapters/browser/log-format.d.ts +23 -20
- package/dist/adapters/browser/log-format.js +133 -56
- package/dist/adapters/browser/log-format.js.map +1 -1
- package/dist/adapters/browser/tab-context.d.ts +30 -0
- package/dist/adapters/browser/tab-context.js +41 -0
- package/dist/adapters/browser/tab-context.js.map +1 -0
- package/dist/adapters/contract.d.ts +113 -10
- package/dist/adapters/contract.js +7 -2
- package/dist/adapters/contract.js.map +1 -1
- package/dist/adapters/desktop/atspi-busctl.d.ts +26 -0
- package/dist/adapters/desktop/atspi-busctl.js +332 -0
- package/dist/adapters/desktop/atspi-busctl.js.map +1 -0
- package/dist/adapters/desktop/atspi-parse.d.ts +39 -0
- package/dist/adapters/desktop/atspi-parse.js +155 -0
- package/dist/adapters/desktop/atspi-parse.js.map +1 -0
- package/dist/adapters/desktop/atspi.d.ts +81 -50
- package/dist/adapters/desktop/atspi.js +64 -285
- package/dist/adapters/desktop/atspi.js.map +1 -1
- package/dist/adapters/desktop/capture.d.ts +11 -20
- package/dist/adapters/desktop/capture.js +68 -37
- package/dist/adapters/desktop/capture.js.map +1 -1
- package/dist/adapters/desktop/desktop-adapter.d.ts +22 -2
- package/dist/adapters/desktop/desktop-adapter.js +202 -86
- package/dist/adapters/desktop/desktop-adapter.js.map +1 -1
- package/dist/adapters/desktop/input.d.ts +19 -5
- package/dist/adapters/desktop/input.js +29 -13
- package/dist/adapters/desktop/input.js.map +1 -1
- package/dist/adapters/desktop/managed-app.d.ts +43 -0
- package/dist/adapters/desktop/managed-app.js +114 -0
- package/dist/adapters/desktop/managed-app.js.map +1 -0
- package/dist/adapters/desktop/proc.d.ts +34 -4
- package/dist/adapters/desktop/proc.js +37 -6
- package/dist/adapters/desktop/proc.js.map +1 -1
- package/dist/adapters/desktop/wait-poll.d.ts +17 -0
- package/dist/adapters/desktop/wait-poll.js +38 -0
- package/dist/adapters/desktop/wait-poll.js.map +1 -0
- package/dist/adapters/factory.d.ts +13 -6
- package/dist/adapters/factory.js +30 -4
- package/dist/adapters/factory.js.map +1 -1
- package/dist/adapters/log-format.d.ts +38 -0
- package/dist/adapters/log-format.js +47 -0
- package/dist/adapters/log-format.js.map +1 -0
- package/dist/agent/belt/act.d.ts +426 -23
- package/dist/agent/belt/act.js +44 -64
- package/dist/agent/belt/act.js.map +1 -1
- package/dist/agent/belt/look.d.ts +479 -16
- package/dist/agent/belt/look.js +94 -16
- package/dist/agent/belt/look.js.map +1 -1
- package/dist/agent/belt/observe.d.ts +652 -65
- package/dist/agent/belt/observe.js +119 -231
- package/dist/agent/belt/observe.js.map +1 -1
- package/dist/agent/belt/redact-output.d.ts +20 -0
- package/dist/agent/belt/redact-output.js +70 -0
- package/dist/agent/belt/redact-output.js.map +1 -0
- package/dist/agent/belt/report.d.ts +754 -48
- package/dist/agent/belt/report.js +121 -38
- package/dist/agent/belt/report.js.map +1 -1
- package/dist/agent/belt/same-origin.d.ts +21 -0
- package/dist/agent/belt/same-origin.js +38 -0
- package/dist/agent/belt/same-origin.js.map +1 -0
- package/dist/agent/belt/target-refs.d.ts +39 -0
- package/dist/agent/belt/target-refs.js +60 -0
- package/dist/agent/belt/target-refs.js.map +1 -0
- package/dist/agent/belt/trail.d.ts +44 -16
- package/dist/agent/belt/trail.js +46 -11
- package/dist/agent/belt/trail.js.map +1 -1
- package/dist/agent/belt/tree-targets.d.ts +79 -0
- package/dist/agent/belt/tree-targets.js +242 -0
- package/dist/agent/belt/tree-targets.js.map +1 -0
- package/dist/agent/capabilities.js.map +1 -1
- package/dist/agent/fallback.d.ts +33 -0
- package/dist/agent/fallback.js +84 -0
- package/dist/agent/fallback.js.map +1 -0
- package/dist/agent/loop-frames.d.ts +26 -0
- package/dist/agent/loop-frames.js +106 -0
- package/dist/agent/loop-frames.js.map +1 -0
- package/dist/agent/loop.d.ts +56 -65
- package/dist/agent/loop.js +122 -189
- package/dist/agent/loop.js.map +1 -1
- package/dist/agent/models.d.ts +10 -6
- package/dist/agent/models.js +15 -9
- package/dist/agent/models.js.map +1 -1
- package/dist/agent/prompts/compose.d.ts +1 -1
- package/dist/agent/prompts/debug-agent.js +48 -10
- package/dist/agent/prompts/debug-agent.js.map +1 -1
- package/dist/agent/prompts/web-addendum.d.ts +2 -2
- package/dist/agent/prompts/web-addendum.js +26 -25
- package/dist/agent/prompts/web-addendum.js.map +1 -1
- package/dist/agent/provider.d.ts +41 -1
- package/dist/agent/provider.js +59 -5
- package/dist/agent/provider.js.map +1 -1
- package/dist/boot.d.ts +64 -0
- package/dist/boot.js +147 -0
- package/dist/boot.js.map +1 -0
- package/dist/cli/chromium-libs.d.ts +267 -0
- package/dist/cli/chromium-libs.js +546 -0
- package/dist/cli/chromium-libs.js.map +1 -0
- package/dist/cli/control.js +79 -12
- package/dist/cli/control.js.map +1 -1
- package/dist/cli/init.d.ts +52 -3
- package/dist/cli/init.js +62 -10
- package/dist/cli/init.js.map +1 -1
- package/dist/config/load.d.ts +25 -8
- package/dist/config/load.js +50 -13
- package/dist/config/load.js.map +1 -1
- package/dist/config/schema.d.ts +18 -6
- package/dist/config/schema.js +34 -17
- package/dist/config/schema.js.map +1 -1
- package/dist/errors.d.ts +30 -15
- package/dist/errors.js +49 -30
- package/dist/errors.js.map +1 -1
- package/dist/findings/schema.d.ts +44 -6
- package/dist/findings/schema.js +39 -3
- package/dist/findings/schema.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/main.js +4 -82
- package/dist/main.js.map +1 -1
- package/dist/mcp/server.js +10 -1
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/tools/describe.d.ts +5 -4
- package/dist/mcp/tools/describe.js +14 -10
- package/dist/mcp/tools/describe.js.map +1 -1
- package/dist/mcp/tools/end-session.d.ts +3 -1
- package/dist/mcp/tools/end-session.js +8 -3
- package/dist/mcp/tools/end-session.js.map +1 -1
- package/dist/mcp/tools/output.d.ts +12 -4
- package/dist/mcp/tools/output.js +15 -2
- package/dist/mcp/tools/output.js.map +1 -1
- package/dist/mcp/tools/result.d.ts +10 -1
- package/dist/mcp/tools/result.js +12 -7
- package/dist/mcp/tools/result.js.map +1 -1
- package/dist/mcp/tools/start-debug.js +7 -5
- package/dist/mcp/tools/start-debug.js.map +1 -1
- package/dist/redact.d.ts +44 -0
- package/dist/redact.js +166 -0
- package/dist/redact.js.map +1 -0
- package/dist/services/auth-persona.d.ts +19 -0
- package/dist/services/auth-persona.js +32 -0
- package/dist/services/auth-persona.js.map +1 -0
- package/dist/services/catalog.d.ts +28 -0
- package/dist/services/catalog.js +65 -0
- package/dist/services/catalog.js.map +1 -0
- package/dist/services/debug-api.d.ts +179 -0
- package/dist/services/debug-api.js +9 -0
- package/dist/services/debug-api.js.map +1 -0
- package/dist/services/debug-service.d.ts +26 -174
- package/dist/services/debug-service.js +159 -227
- package/dist/services/debug-service.js.map +1 -1
- package/dist/services/foreign-findings.d.ts +22 -0
- package/dist/services/foreign-findings.js +38 -0
- package/dist/services/foreign-findings.js.map +1 -0
- package/dist/services/login-failure.d.ts +10 -0
- package/dist/services/login-failure.js +24 -0
- package/dist/services/login-failure.js.map +1 -0
- package/dist/services/login-selectors.d.ts +18 -0
- package/dist/services/login-selectors.js +44 -0
- package/dist/services/login-selectors.js.map +1 -0
- package/dist/services/login-session.d.ts +25 -0
- package/dist/services/login-session.js +59 -0
- package/dist/services/login-session.js.map +1 -0
- package/dist/services/login.d.ts +16 -29
- package/dist/services/login.js +269 -97
- package/dist/services/login.js.map +1 -1
- package/dist/services/replay.js +15 -3
- package/dist/services/replay.js.map +1 -1
- package/dist/services/retained-snapshot.d.ts +36 -0
- package/dist/services/retained-snapshot.js +63 -0
- package/dist/services/retained-snapshot.js.map +1 -0
- package/dist/services/session-builder.d.ts +26 -0
- package/dist/services/session-builder.js +63 -21
- package/dist/services/session-builder.js.map +1 -1
- package/dist/services/shutdown.d.ts +8 -4
- package/dist/services/shutdown.js +21 -8
- package/dist/services/shutdown.js.map +1 -1
- package/dist/services/start-guards.d.ts +37 -0
- package/dist/services/start-guards.js +61 -0
- package/dist/services/start-guards.js.map +1 -0
- package/dist/services/summarize.d.ts +12 -3
- package/dist/services/summarize.js +13 -5
- package/dist/services/summarize.js.map +1 -1
- package/dist/session/cleanup.d.ts +3 -2
- package/dist/session/cleanup.js +6 -2
- package/dist/session/cleanup.js.map +1 -1
- package/dist/session/finalize.d.ts +45 -0
- package/dist/session/finalize.js +150 -0
- package/dist/session/finalize.js.map +1 -0
- package/dist/session/findings-store.d.ts +2 -1
- package/dist/session/findings-store.js +30 -2
- package/dist/session/findings-store.js.map +1 -1
- package/dist/session/flock-backend.d.ts +117 -0
- package/dist/session/flock-backend.js +293 -0
- package/dist/session/flock-backend.js.map +1 -0
- package/dist/session/live-pointer.d.ts +19 -0
- package/dist/session/live-pointer.js +41 -0
- package/dist/session/live-pointer.js.map +1 -0
- package/dist/session/manager.d.ts +11 -1
- package/dist/session/manager.js +46 -2
- package/dist/session/manager.js.map +1 -1
- package/dist/session/owner-lock.d.ts +117 -0
- package/dist/session/owner-lock.js +218 -0
- package/dist/session/owner-lock.js.map +1 -0
- package/dist/session/process-identity.js.map +1 -1
- package/dist/session/session.js +40 -109
- package/dist/session/session.js.map +1 -1
- package/dist/session/state-file.d.ts +74 -14
- package/dist/session/state-file.js +211 -21
- package/dist/session/state-file.js.map +1 -1
- package/dist/session/workspace.d.ts +32 -2
- package/dist/session/workspace.js +65 -4
- package/dist/session/workspace.js.map +1 -1
- package/package.json +11 -11
- package/dist/adapters/android/android-adapter.test-helpers.d.ts +0 -52
- package/dist/adapters/android/android-adapter.test-helpers.js +0 -115
- package/dist/adapters/android/android-adapter.test-helpers.js.map +0 -1
- package/dist/mcp/server.test-helpers.d.ts +0 -23
- package/dist/mcp/server.test-helpers.js +0 -49
- package/dist/mcp/server.test-helpers.js.map +0 -1
|
@@ -15,6 +15,12 @@
|
|
|
15
15
|
* sub-schemas (`StepSchema` · `BugSchema` · `VisualIssueSchema`) so the verdict
|
|
16
16
|
* the driver emits is byte-for-byte the verdict the store persists.
|
|
17
17
|
*
|
|
18
|
+
* The write MERGES, never replaces: the run's streamed evidence — act steps,
|
|
19
|
+
* console errors, look issues the belt recorded as they happened — is carried
|
|
20
|
+
* into the verdict even when the driver's own arrays omit it. Omission cannot
|
|
21
|
+
* erase evidence; only `dismissStreamed: true` (a deliberate ruling-out) drops
|
|
22
|
+
* unrestated streamed entries.
|
|
23
|
+
*
|
|
18
24
|
* Store-only seam: it touches just `writeFindings` via the {@link FindingsWriter}
|
|
19
25
|
* slice — adapter-blind like the rest of the belt. Fails loud: an invalid verdict
|
|
20
26
|
* surfaces the store's `FindingsError`; we never write a half-formed findings file
|
|
@@ -22,15 +28,22 @@
|
|
|
22
28
|
*/
|
|
23
29
|
import { tool } from 'ai';
|
|
24
30
|
import { z } from 'zod';
|
|
25
|
-
import { BugSchema, StepSchema, VisualIssueSchema } from '../../findings/schema.js';
|
|
26
|
-
|
|
27
|
-
|
|
31
|
+
import { BUG_KINDS, BugSchema, StepSchema, TERMINAL_STATUSES, VisualIssueSchema, } from '../../findings/schema.js';
|
|
32
|
+
import { evidenceKey } from './trail.js';
|
|
33
|
+
/** The empty evidence set — what a run with no wired trail streams. */
|
|
34
|
+
export const EMPTY_EVIDENCE = { steps: [], bugs: [], visual: [] };
|
|
28
35
|
/**
|
|
29
36
|
* `report` input — the findings shape with a terminal `status`. Reuses the
|
|
30
37
|
* canonical findings sub-schemas so the emitted verdict matches what the store
|
|
31
38
|
* persists; arrays default to `[]` so a clean pass needs only `{ status }`.
|
|
32
39
|
*/
|
|
33
40
|
export const ReportInputSchema = z.object({
|
|
41
|
+
/**
|
|
42
|
+
* Terminal verdicts `report` may emit — `running` is excluded: it is the
|
|
43
|
+
* in-flight state the session overlays before a verdict exists, and a run
|
|
44
|
+
* that is both concluded and not is a contradiction, so the input schema
|
|
45
|
+
* rejects it.
|
|
46
|
+
*/
|
|
34
47
|
status: z
|
|
35
48
|
.enum(TERMINAL_STATUSES)
|
|
36
49
|
.describe('terminal verdict: passed (goal met, no blockers) | failed (blocking bug/visual issue)'),
|
|
@@ -41,30 +54,20 @@ export const ReportInputSchema = z.object({
|
|
|
41
54
|
bugs: z
|
|
42
55
|
.array(BugSchema)
|
|
43
56
|
.default([])
|
|
44
|
-
.describe(
|
|
57
|
+
.describe(`functional bugs found: { kind: ${BUG_KINDS.join('|')}, detail, evidence? }`),
|
|
45
58
|
visual: z
|
|
46
59
|
.array(VisualIssueSchema)
|
|
47
60
|
.default([])
|
|
48
61
|
.describe('visual issues from look: { issue, where, severity, screenshot? }'),
|
|
62
|
+
dismissStreamed: z
|
|
63
|
+
.boolean()
|
|
64
|
+
.default(false)
|
|
65
|
+
.describe('findings you already surfaced (look issues, console errors) that you did not list above are carried into the verdict; set true ONLY to dismiss them deliberately'),
|
|
49
66
|
summary: z
|
|
50
67
|
.string()
|
|
51
68
|
.optional()
|
|
52
69
|
.describe('one-paragraph, actionable verdict for the smart agent: what broke, where, what to fix'),
|
|
53
70
|
});
|
|
54
|
-
/**
|
|
55
|
-
* Build the canonical findings record from a validated report input. The base
|
|
56
|
-
* verdict shape; {@link terminalFindings} merges the loop's recorded act-trail
|
|
57
|
-
* into its `steps`, so both the persisted write and the returned counts agree.
|
|
58
|
-
*/
|
|
59
|
-
export function reportFindings(input) {
|
|
60
|
-
return {
|
|
61
|
-
status: input.status,
|
|
62
|
-
steps: input.steps,
|
|
63
|
-
bugs: input.bugs,
|
|
64
|
-
visual: input.visual,
|
|
65
|
-
...(input.summary !== undefined && { summary: input.summary }),
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
71
|
/** Pairing key for a reported step and a recorded one — case- and whitespace-insensitive. */
|
|
69
72
|
function stepKey(step) {
|
|
70
73
|
return step.step.trim().toLowerCase().replace(/\s+/g, ' ');
|
|
@@ -128,24 +131,102 @@ export function mergeSteps(reported, trail) {
|
|
|
128
131
|
return merged;
|
|
129
132
|
}
|
|
130
133
|
/**
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
|
|
135
|
-
|
|
134
|
+
* Fuse one reported bug with the streamed console error it restates: the
|
|
135
|
+
* driver's wording wins, the streamed row fills the evidence location the
|
|
136
|
+
* driver never saw.
|
|
137
|
+
*/
|
|
138
|
+
function fuseBug(streamed, reported) {
|
|
139
|
+
const evidence = reported.evidence ?? streamed.evidence;
|
|
140
|
+
return {
|
|
141
|
+
kind: reported.kind,
|
|
142
|
+
detail: reported.detail,
|
|
143
|
+
...(evidence !== undefined && { evidence }),
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Fuse one reported visual issue with the streamed look issue it restates: the
|
|
148
|
+
* driver's wording wins, the streamed entry fills the screenshot path the
|
|
149
|
+
* driver never has at hand.
|
|
136
150
|
*/
|
|
137
|
-
|
|
138
|
-
const
|
|
139
|
-
return {
|
|
151
|
+
function fuseVisual(streamed, reported) {
|
|
152
|
+
const screenshot = reported.screenshot ?? streamed.screenshot;
|
|
153
|
+
return {
|
|
154
|
+
issue: reported.issue,
|
|
155
|
+
where: reported.where,
|
|
156
|
+
severity: reported.severity,
|
|
157
|
+
...(screenshot !== undefined && { screenshot }),
|
|
158
|
+
};
|
|
140
159
|
}
|
|
141
160
|
/**
|
|
142
|
-
*
|
|
143
|
-
* the
|
|
144
|
-
*
|
|
161
|
+
* Merge reported findings with the streamed ones, streamed order as the spine —
|
|
162
|
+
* the same discipline as {@link mergeSteps}, for the bugs/visual streams. A
|
|
163
|
+
* restatement (matched by normalized key) fuses in place, driver fields winning
|
|
164
|
+
* and streamed evidence filling the gaps; reported entries that restate nothing
|
|
165
|
+
* append in reported order. Unrestated streamed entries are carried (`keep:
|
|
166
|
+
* true`) or dropped (`keep: false` — a deliberate `dismissStreamed`); `carried`
|
|
167
|
+
* counts what was included, so it is always 0 under `keep: false`.
|
|
168
|
+
*/
|
|
169
|
+
function mergeStreamed(reported, streamed, keyOf, fuse, keep) {
|
|
170
|
+
const pending = new Map();
|
|
171
|
+
reported.forEach((item, index) => {
|
|
172
|
+
const queue = pending.get(keyOf(item));
|
|
173
|
+
if (queue)
|
|
174
|
+
queue.push({ index, item });
|
|
175
|
+
else
|
|
176
|
+
pending.set(keyOf(item), [{ index, item }]);
|
|
177
|
+
});
|
|
178
|
+
const fused = new Set();
|
|
179
|
+
const merged = [];
|
|
180
|
+
let carried = 0;
|
|
181
|
+
for (const entry of streamed) {
|
|
182
|
+
const hit = pending.get(keyOf(entry))?.shift();
|
|
183
|
+
if (hit) {
|
|
184
|
+
fused.add(hit.index);
|
|
185
|
+
merged.push(fuse(entry, hit.item));
|
|
186
|
+
}
|
|
187
|
+
else if (keep) {
|
|
188
|
+
carried += 1;
|
|
189
|
+
merged.push(entry);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
for (const [index, item] of reported.entries()) {
|
|
193
|
+
if (!fused.has(index))
|
|
194
|
+
merged.push(item);
|
|
195
|
+
}
|
|
196
|
+
return { merged, carried };
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Everything the terminal write needs, derived in ONE pass: the merged evidence
|
|
200
|
+
* streams and the carried counts. The single source of truth for the persisted
|
|
201
|
+
* findings AND the returned counts, so they never drift.
|
|
202
|
+
*/
|
|
203
|
+
function mergeEvidence(input, evidence) {
|
|
204
|
+
const steps = mergeSteps(input.steps, evidence.steps);
|
|
205
|
+
const bugMerge = mergeStreamed(input.bugs, evidence.bugs, (bug) => evidenceKey(bug.detail), fuseBug, !input.dismissStreamed);
|
|
206
|
+
const visualMerge = mergeStreamed(input.visual, evidence.visual, (issue) => evidenceKey(issue.issue, issue.where), fuseVisual, !input.dismissStreamed);
|
|
207
|
+
return {
|
|
208
|
+
steps,
|
|
209
|
+
bugs: bugMerge.merged,
|
|
210
|
+
visual: visualMerge.merged,
|
|
211
|
+
// Already 0 across the board under `dismissStreamed` — nothing unrestated was kept.
|
|
212
|
+
carried: { bugs: bugMerge.carried, visual: visualMerge.carried },
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Write the terminal verdict and report the stop. Both the persisted findings
|
|
217
|
+
* and the returned counts/carried derive from ONE {@link mergeEvidence} pass —
|
|
218
|
+
* the run's streamed evidence merged with the driver's verdict. Pure over the
|
|
145
219
|
* {@link FindingsWriter} seam, so it unit-tests against a fake with no disk.
|
|
146
220
|
*/
|
|
147
|
-
export async function runReport(writer, input,
|
|
148
|
-
const
|
|
221
|
+
export async function runReport(writer, input, evidence = EMPTY_EVIDENCE) {
|
|
222
|
+
const { steps, bugs, visual, carried } = mergeEvidence(input, evidence);
|
|
223
|
+
const findings = {
|
|
224
|
+
status: input.status,
|
|
225
|
+
steps,
|
|
226
|
+
bugs,
|
|
227
|
+
visual,
|
|
228
|
+
...(input.summary !== undefined && { summary: input.summary }),
|
|
229
|
+
};
|
|
149
230
|
const path = await writer.writeFindings(findings);
|
|
150
231
|
return {
|
|
151
232
|
status: input.status,
|
|
@@ -155,25 +236,27 @@ export async function runReport(writer, input, trail = []) {
|
|
|
155
236
|
bugs: findings.bugs.length,
|
|
156
237
|
visual: findings.visual.length,
|
|
157
238
|
},
|
|
239
|
+
carried,
|
|
158
240
|
stop: true,
|
|
159
241
|
};
|
|
160
242
|
}
|
|
161
243
|
/**
|
|
162
244
|
* Build the `report` tool bound to one findings store, for the debug agent's belt.
|
|
163
|
-
* `getTrail` (when wired by the loop) supplies the
|
|
164
|
-
* written verdict
|
|
245
|
+
* `getTrail` (when wired by the loop) supplies the run's streamed evidence so the
|
|
246
|
+
* written verdict carries the console errors and look issues the belt recorded,
|
|
247
|
+
* not just what the driver chose to list.
|
|
165
248
|
*
|
|
166
249
|
* It may be async — and the wired one is. `report` executes CONCURRENTLY with the
|
|
167
|
-
* other tool calls of its own step, so when the driver emits `
|
|
168
|
-
* together the
|
|
250
|
+
* other tool calls of its own step, so when the driver emits `look` + `report`
|
|
251
|
+
* together the look is still running here; the wired read is the evidence trail's
|
|
169
252
|
* `settled()`, which waits for it (see `belt/trail.ts`). Waiting is safe: the
|
|
170
|
-
* step's own `Promise.all` already awaits that
|
|
253
|
+
* step's own `Promise.all` already awaits that call.
|
|
171
254
|
*/
|
|
172
255
|
export function createReportTool(writer, getTrail) {
|
|
173
256
|
return tool({
|
|
174
|
-
description: 'Emit the final structured findings and END the run. Call exactly once, when the goal is met or you hit the step limit. Validates and writes findings.json: status (passed|failed) plus steps/bugs/visual/summary. This is terminal — the loop stops after report, so do not act again. Make summary actionable for the smart agent: what broke, where, what to fix.',
|
|
257
|
+
description: 'Emit the final structured findings and END the run. Call exactly once, when the goal is met or you hit the step limit. Validates and writes findings.json: status (passed|failed) plus steps/bugs/visual/summary. Console errors you surfaced earlier are carried in even if you forget to list them; look issues too when a separate vision model judges the looks. Dismissal is deliberate (dismissStreamed). This is terminal — the loop stops after report, so do not act again. Make summary actionable for the smart agent: what broke, where, what to fix.',
|
|
175
258
|
inputSchema: ReportInputSchema,
|
|
176
|
-
execute: async (input) => runReport(writer, input, (await getTrail?.()) ??
|
|
259
|
+
execute: async (input) => runReport(writer, input, (await getTrail?.()) ?? EMPTY_EVIDENCE),
|
|
177
260
|
});
|
|
178
261
|
}
|
|
179
262
|
//# sourceMappingURL=report.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"report.js","sourceRoot":"","sources":["../../../src/agent/belt/report.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"report.js","sourceRoot":"","sources":["../../../src/agent/belt/report.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAC1B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,SAAS,EACT,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,WAAW,EAAsB,MAAM,YAAY,CAAC;AAE7D,uEAAuE;AACvE,MAAM,CAAC,MAAM,cAAc,GAAkB,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;AAEjF;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC;;;;;OAKG;IACH,MAAM,EAAE,CAAC;SACN,IAAI,CAAC,iBAAiB,CAAC;SACvB,QAAQ,CACP,uFAAuF,CACxF;IACH,KAAK,EAAE,CAAC;SACL,KAAK,CAAC,UAAU,CAAC;SACjB,OAAO,CAAC,EAAE,CAAC;SACX,QAAQ,CAAC,0DAA0D,CAAC;IACvE,IAAI,EAAE,CAAC;SACJ,KAAK,CAAC,SAAS,CAAC;SAChB,OAAO,CAAC,EAAE,CAAC;SACX,QAAQ,CAAC,kCAAkC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,uBAAuB,CAAC;IACzF,MAAM,EAAE,CAAC;SACN,KAAK,CAAC,iBAAiB,CAAC;SACxB,OAAO,CAAC,EAAE,CAAC;SACX,QAAQ,CAAC,kEAAkE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iB;QAC9B,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,SAAS,CAAC,MAAM,EAAE,KAAK,EAAE,CAAC,MAAM,QAAQ,EAAE,EAAE,CAAC,IAAI,cAAc,CAAC;KAC3F,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The navigation guard `act` applies to `navigate` — the run stays on the app
|
|
3
|
+
* under test. Split from `act.ts` (one responsibility per file).
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Refuse a `navigate` that leaves the app under test.
|
|
7
|
+
*
|
|
8
|
+
* Observed end-to-end: driven at the local fixture with the goal "debug the Nimbus
|
|
9
|
+
* Store home page", the driver's FIRST action was
|
|
10
|
+
* `navigate → https://nimbus-store.vercel.app` — a public site it inferred from the
|
|
11
|
+
* goal text. It never returned, and the run ended with six confident, fully-evidenced
|
|
12
|
+
* bugs about a stranger's production app, with nothing in the output hinting the
|
|
13
|
+
* target had been left. The smart agent would have gone hunting for a CORS bug that
|
|
14
|
+
* does not exist in its repo.
|
|
15
|
+
*
|
|
16
|
+
* `origin` is the run's own origin (web only; empty for desktop/android, whose
|
|
17
|
+
* `navigate` means a window title or an app package). Same-origin URLs and relative
|
|
18
|
+
* paths pass; anything else fails loud, naming where the driver is supposed to be.
|
|
19
|
+
* A run that wanders off the app under test is worse than a run that stops.
|
|
20
|
+
*/
|
|
21
|
+
export declare function assertSameOrigin(target: string, origin: string | undefined): void;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The navigation guard `act` applies to `navigate` — the run stays on the app
|
|
3
|
+
* under test. Split from `act.ts` (one responsibility per file).
|
|
4
|
+
*/
|
|
5
|
+
import { AgentError } from '../../errors.js';
|
|
6
|
+
/**
|
|
7
|
+
* Refuse a `navigate` that leaves the app under test.
|
|
8
|
+
*
|
|
9
|
+
* Observed end-to-end: driven at the local fixture with the goal "debug the Nimbus
|
|
10
|
+
* Store home page", the driver's FIRST action was
|
|
11
|
+
* `navigate → https://nimbus-store.vercel.app` — a public site it inferred from the
|
|
12
|
+
* goal text. It never returned, and the run ended with six confident, fully-evidenced
|
|
13
|
+
* bugs about a stranger's production app, with nothing in the output hinting the
|
|
14
|
+
* target had been left. The smart agent would have gone hunting for a CORS bug that
|
|
15
|
+
* does not exist in its repo.
|
|
16
|
+
*
|
|
17
|
+
* `origin` is the run's own origin (web only; empty for desktop/android, whose
|
|
18
|
+
* `navigate` means a window title or an app package). Same-origin URLs and relative
|
|
19
|
+
* paths pass; anything else fails loud, naming where the driver is supposed to be.
|
|
20
|
+
* A run that wanders off the app under test is worse than a run that stops.
|
|
21
|
+
*/
|
|
22
|
+
export function assertSameOrigin(target, origin) {
|
|
23
|
+
if (!origin)
|
|
24
|
+
return; // non-web target, or no origin to enforce
|
|
25
|
+
let destination;
|
|
26
|
+
try {
|
|
27
|
+
destination = new URL(target, origin); // relative paths resolve against the app
|
|
28
|
+
}
|
|
29
|
+
catch {
|
|
30
|
+
return; // not URL-shaped — let the adapter reject it with its own message
|
|
31
|
+
}
|
|
32
|
+
if (destination.origin === origin)
|
|
33
|
+
return;
|
|
34
|
+
throw new AgentError(`act 'navigate' refused: '${target}' leaves the app under test (${origin}). ` +
|
|
35
|
+
'Findings about another site cannot be acted on. Use a path or a URL on ' +
|
|
36
|
+
`${origin}; if the app genuinely lives elsewhere, the smart agent must pass that url to start_debug.`);
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=same-origin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"same-origin.js","sourceRoot":"","sources":["../../../src/agent/belt/same-origin.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAc,EAAE,MAA0B;IACzE,IAAI,CAAC,MAAM;QAAE,OAAO,CAAC,0CAA0C;IAC/D,IAAI,WAAgB,CAAC;IACrB,IAAI,CAAC;QACH,WAAW,GAAG,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,yCAAyC;IAClF,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,CAAC,kEAAkE;IAC5E,CAAC;IACD,IAAI,WAAW,CAAC,MAAM,KAAK,MAAM;QAAE,OAAO;IAC1C,MAAM,IAAI,UAAU,CAClB,4BAA4B,MAAM,gCAAgC,MAAM,KAAK;QAC3E,yEAAyE;QACzE,GAAG,MAAM,4FAA4F,CACxG,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Opaque target references — how a node stays addressable when its selector
|
|
3
|
+
* would carry one of the run's secrets.
|
|
4
|
+
*
|
|
5
|
+
* `observe` builds each node's `target` from its accessible name. A page that
|
|
6
|
+
* echoes a persona value in visible text ("Signed in as …") therefore puts the
|
|
7
|
+
* secret into a selector the driver reads and the SDK re-sends every step.
|
|
8
|
+
* Masking the selector would break it; omitting it leaves the node unreachable
|
|
9
|
+
* (its name is masked too). So the belt hands out a reference instead and keeps
|
|
10
|
+
* the real selector here, keyed by the run's adapter — `observe` issues, `act`
|
|
11
|
+
* (and `observe`'s own `query`/`within`) resolve. One adapter per run, so a
|
|
12
|
+
* reference can never resolve against another run's page.
|
|
13
|
+
*
|
|
14
|
+
* ## The spelling: `@@ref:N`
|
|
15
|
+
*
|
|
16
|
+
* It must not collide with a selector a driver could mean. Both dialects accept
|
|
17
|
+
* ANY string as visible text in the end, so no printable spelling is impossible
|
|
18
|
+
* outright — this one is chosen to mean nothing ELSE, and resolution is by exact
|
|
19
|
+
* issued string, never by shape alone:
|
|
20
|
+
* - web (`browser/query.ts`): not an engine (`css=`, `text=`, `role=`, `id=`,
|
|
21
|
+
* `data-testid=`, `xpath=`, `internal:…=` — and Playwright's own `aria-ref=`
|
|
22
|
+
* — all need `name=`; this has no `=`), not `role "name"`, not a bare tag,
|
|
23
|
+
* and not valid CSS (`@` cannot start a selector).
|
|
24
|
+
* - native (`desktop/atspi-parse.ts`, `android/uiautomator.ts`): not
|
|
25
|
+
* `role "name"`; it could only be a literal name substring.
|
|
26
|
+
* So the one reading left is "visible text that literally says `@@ref:3`" — and
|
|
27
|
+
* that passes through untouched unless this run issued exactly that string. A
|
|
28
|
+
* plain `ref=1` selector is never touched at all.
|
|
29
|
+
*/
|
|
30
|
+
import type { Adapter } from '../../adapters/contract.js';
|
|
31
|
+
/** The reference standing in for `selector` on this adapter — stable across re-reads. */
|
|
32
|
+
export declare function targetRefFor(adapter: Adapter, selector: string): string;
|
|
33
|
+
/**
|
|
34
|
+
* The real selector behind `target` when it is EXACTLY a reference this adapter
|
|
35
|
+
* issued; every other string — including a reference-shaped one nobody issued —
|
|
36
|
+
* passes through untouched and the adapter reports the miss as it would for any
|
|
37
|
+
* selector that matches nothing.
|
|
38
|
+
*/
|
|
39
|
+
export declare function resolveTargetRef(adapter: Adapter, target: string): string;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Opaque target references — how a node stays addressable when its selector
|
|
3
|
+
* would carry one of the run's secrets.
|
|
4
|
+
*
|
|
5
|
+
* `observe` builds each node's `target` from its accessible name. A page that
|
|
6
|
+
* echoes a persona value in visible text ("Signed in as …") therefore puts the
|
|
7
|
+
* secret into a selector the driver reads and the SDK re-sends every step.
|
|
8
|
+
* Masking the selector would break it; omitting it leaves the node unreachable
|
|
9
|
+
* (its name is masked too). So the belt hands out a reference instead and keeps
|
|
10
|
+
* the real selector here, keyed by the run's adapter — `observe` issues, `act`
|
|
11
|
+
* (and `observe`'s own `query`/`within`) resolve. One adapter per run, so a
|
|
12
|
+
* reference can never resolve against another run's page.
|
|
13
|
+
*
|
|
14
|
+
* ## The spelling: `@@ref:N`
|
|
15
|
+
*
|
|
16
|
+
* It must not collide with a selector a driver could mean. Both dialects accept
|
|
17
|
+
* ANY string as visible text in the end, so no printable spelling is impossible
|
|
18
|
+
* outright — this one is chosen to mean nothing ELSE, and resolution is by exact
|
|
19
|
+
* issued string, never by shape alone:
|
|
20
|
+
* - web (`browser/query.ts`): not an engine (`css=`, `text=`, `role=`, `id=`,
|
|
21
|
+
* `data-testid=`, `xpath=`, `internal:…=` — and Playwright's own `aria-ref=`
|
|
22
|
+
* — all need `name=`; this has no `=`), not `role "name"`, not a bare tag,
|
|
23
|
+
* and not valid CSS (`@` cannot start a selector).
|
|
24
|
+
* - native (`desktop/atspi-parse.ts`, `android/uiautomator.ts`): not
|
|
25
|
+
* `role "name"`; it could only be a literal name substring.
|
|
26
|
+
* So the one reading left is "visible text that literally says `@@ref:3`" — and
|
|
27
|
+
* that passes through untouched unless this run issued exactly that string. A
|
|
28
|
+
* plain `ref=1` selector is never touched at all.
|
|
29
|
+
*/
|
|
30
|
+
const registries = new WeakMap();
|
|
31
|
+
/** The exact shape of an issued reference; capture = its 1-based number. */
|
|
32
|
+
const REF = /^@@ref:([1-9]\d*)$/;
|
|
33
|
+
/** The reference standing in for `selector` on this adapter — stable across re-reads. */
|
|
34
|
+
export function targetRefFor(adapter, selector) {
|
|
35
|
+
let registry = registries.get(adapter);
|
|
36
|
+
if (!registry) {
|
|
37
|
+
registry = { selectors: [], refs: new Map() };
|
|
38
|
+
registries.set(adapter, registry);
|
|
39
|
+
}
|
|
40
|
+
const known = registry.refs.get(selector);
|
|
41
|
+
if (known !== undefined)
|
|
42
|
+
return known;
|
|
43
|
+
registry.selectors.push(selector);
|
|
44
|
+
const ref = `@@ref:${registry.selectors.length}`;
|
|
45
|
+
registry.refs.set(selector, ref);
|
|
46
|
+
return ref;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* The real selector behind `target` when it is EXACTLY a reference this adapter
|
|
50
|
+
* issued; every other string — including a reference-shaped one nobody issued —
|
|
51
|
+
* passes through untouched and the adapter reports the miss as it would for any
|
|
52
|
+
* selector that matches nothing.
|
|
53
|
+
*/
|
|
54
|
+
export function resolveTargetRef(adapter, target) {
|
|
55
|
+
const match = REF.exec(target);
|
|
56
|
+
if (!match)
|
|
57
|
+
return target;
|
|
58
|
+
return registries.get(adapter)?.selectors[Number(match[1]) - 1] ?? target;
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=target-refs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"target-refs.js","sourceRoot":"","sources":["../../../src/agent/belt/target-refs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAYH,MAAM,UAAU,GAAG,IAAI,OAAO,EAAqB,CAAC;AAEpD,4EAA4E;AAC5E,MAAM,GAAG,GAAG,oBAAoB,CAAC;AAEjC,yFAAyF;AACzF,MAAM,UAAU,YAAY,CAAC,OAAgB,EAAE,QAAgB;IAC7D,IAAI,QAAQ,GAAG,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACvC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,QAAQ,GAAG,EAAE,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,GAAG,EAAE,EAAE,CAAC;QAC9C,UAAU,CAAC,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IACpC,CAAC;IACD,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC1C,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IACtC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAClC,MAAM,GAAG,GAAG,SAAS,QAAQ,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC;IACjD,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IACjC,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAAgB,EAAE,MAAc;IAC/D,MAAM,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC/B,IAAI,CAAC,KAAK;QAAE,OAAO,MAAM,CAAC;IAC1B,OAAO,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,MAAM,CAAC;AAC5E,CAAC"}
|
|
@@ -1,34 +1,62 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The run's shared
|
|
2
|
+
* The run's shared evidence trail — the spine `act`/`look`/`observe` write and
|
|
3
|
+
* `report` reads.
|
|
3
4
|
*
|
|
4
|
-
* `act` records every step it finishes, ok or not, AT ACT TIME
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* `act` records every step it finishes, ok or not, AT ACT TIME; `look` records
|
|
6
|
+
* each visual issue the vision guy flags; `observe` records every error-level
|
|
7
|
+
* console row it reads back. The timing is the whole point. The SDK runs a
|
|
8
|
+
* step's tool calls CONCURRENTLY (`Promise.all` over the call list) and
|
|
9
|
+
* `onStepFinish` only fires once they have all settled, so when the driver
|
|
10
|
+
* emits a tool and `report` in ONE step — which models do, despite the prompt
|
|
11
|
+
* calling `report` terminal — `report` executes while that tool is still in
|
|
9
12
|
* flight. A trail lifted at step end reaches the terminal read too late: the
|
|
10
13
|
* verdict ships without the last thing the run did.
|
|
11
14
|
*
|
|
12
|
-
* So the trail also counts the
|
|
13
|
-
* ({@link ActTrail.settled}). That can never deadlock: the step's own
|
|
14
|
-
* already awaits every
|
|
15
|
-
* for its own step to finish at all.
|
|
15
|
+
* So the trail also counts the work in flight and the terminal read waits for
|
|
16
|
+
* it ({@link ActTrail.settled}). That can never deadlock: the step's own
|
|
17
|
+
* `Promise.all` already awaits every tool call, so `report` only ever waits on
|
|
18
|
+
* work that must finish for its own step to finish at all.
|
|
16
19
|
*/
|
|
17
|
-
import type { Step } from '../../findings/schema.js';
|
|
20
|
+
import type { Bug, Step, VisualIssue } from '../../findings/schema.js';
|
|
18
21
|
/**
|
|
19
|
-
* The
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
+
* The three evidence streams a run accumulates, as `report` (and the loop's
|
|
23
|
+
* running flush) consume them. Live arrays — everything recorded so far, in
|
|
24
|
+
* call order, already deduped.
|
|
22
25
|
*/
|
|
23
|
-
export interface
|
|
26
|
+
export interface TrailEvidence {
|
|
27
|
+
/** Ordered act steps, written by `act` as each act finishes. */
|
|
28
|
+
readonly steps: readonly Step[];
|
|
29
|
+
/** Bugs seen so far (console errors today), deduped by normalized detail. */
|
|
30
|
+
readonly bugs: readonly Bug[];
|
|
31
|
+
/** Visual issues seen so far, deduped by normalized issue + location. */
|
|
32
|
+
readonly visual: readonly VisualIssue[];
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The shared trail: the run's {@link TrailEvidence} plus the in-flight
|
|
36
|
+
* bookkeeping the terminal read needs. One per run — `act` writes steps, `look`
|
|
37
|
+
* and `observe` write the streamed findings, the loop's running flush snapshots
|
|
38
|
+
* all three, `report` merges them into the verdict.
|
|
39
|
+
*/
|
|
40
|
+
export interface ActTrail extends TrailEvidence {
|
|
24
41
|
/** Recorded steps in act order — the array the loop's running flush snapshots. */
|
|
25
42
|
readonly steps: Step[];
|
|
26
43
|
/** Announce an act in flight; call the returned function once it settles. */
|
|
27
44
|
begin(): () => void;
|
|
28
45
|
/** Record one finished act — `ok: true` with its frame, or `ok: false` with the error. */
|
|
29
46
|
record(step: Step): void;
|
|
47
|
+
/** Record one functional bug (a console error). Deduped by normalized `detail`. */
|
|
48
|
+
recordBug(bug: Bug): void;
|
|
49
|
+
/** Record one visual issue. Deduped by normalized `issue` + `where`. */
|
|
50
|
+
recordVisual(issue: VisualIssue): void;
|
|
30
51
|
/** The trail once no act is in flight — the read `report` takes before it writes. */
|
|
31
|
-
settled(): Promise<
|
|
52
|
+
settled(): Promise<TrailEvidence>;
|
|
32
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* Normalized pairing key for two descriptions of the same evidence — case- and
|
|
56
|
+
* whitespace-insensitive (the same normalization the running flush has always
|
|
57
|
+
* applied). One key per stream: bugs pair on {@link evidenceKey} of `detail`,
|
|
58
|
+
* visual issues on `issue` + `where`.
|
|
59
|
+
*/
|
|
60
|
+
export declare function evidenceKey(...parts: string[]): string;
|
|
33
61
|
/** Build a fresh {@link ActTrail} for one run. */
|
|
34
62
|
export declare function createActTrail(): ActTrail;
|
package/dist/agent/belt/trail.js
CHANGED
|
@@ -1,19 +1,31 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The run's shared
|
|
2
|
+
* The run's shared evidence trail — the spine `act`/`look`/`observe` write and
|
|
3
|
+
* `report` reads.
|
|
3
4
|
*
|
|
4
|
-
* `act` records every step it finishes, ok or not, AT ACT TIME
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* `act` records every step it finishes, ok or not, AT ACT TIME; `look` records
|
|
6
|
+
* each visual issue the vision guy flags; `observe` records every error-level
|
|
7
|
+
* console row it reads back. The timing is the whole point. The SDK runs a
|
|
8
|
+
* step's tool calls CONCURRENTLY (`Promise.all` over the call list) and
|
|
9
|
+
* `onStepFinish` only fires once they have all settled, so when the driver
|
|
10
|
+
* emits a tool and `report` in ONE step — which models do, despite the prompt
|
|
11
|
+
* calling `report` terminal — `report` executes while that tool is still in
|
|
9
12
|
* flight. A trail lifted at step end reaches the terminal read too late: the
|
|
10
13
|
* verdict ships without the last thing the run did.
|
|
11
14
|
*
|
|
12
|
-
* So the trail also counts the
|
|
13
|
-
* ({@link ActTrail.settled}). That can never deadlock: the step's own
|
|
14
|
-
* already awaits every
|
|
15
|
-
* for its own step to finish at all.
|
|
15
|
+
* So the trail also counts the work in flight and the terminal read waits for
|
|
16
|
+
* it ({@link ActTrail.settled}). That can never deadlock: the step's own
|
|
17
|
+
* `Promise.all` already awaits every tool call, so `report` only ever waits on
|
|
18
|
+
* work that must finish for its own step to finish at all.
|
|
16
19
|
*/
|
|
20
|
+
/**
|
|
21
|
+
* Normalized pairing key for two descriptions of the same evidence — case- and
|
|
22
|
+
* whitespace-insensitive (the same normalization the running flush has always
|
|
23
|
+
* applied). One key per stream: bugs pair on {@link evidenceKey} of `detail`,
|
|
24
|
+
* visual issues on `issue` + `where`.
|
|
25
|
+
*/
|
|
26
|
+
export function evidenceKey(...parts) {
|
|
27
|
+
return parts.join(' @ ').trim().toLowerCase().replace(/\s+/g, ' ');
|
|
28
|
+
}
|
|
17
29
|
/** Let already-queued microtasks run — one full turn of the event loop. */
|
|
18
30
|
function nextTurn() {
|
|
19
31
|
return new Promise((resolve) => setTimeout(resolve, 0));
|
|
@@ -21,11 +33,20 @@ function nextTurn() {
|
|
|
21
33
|
/** Build a fresh {@link ActTrail} for one run. */
|
|
22
34
|
export function createActTrail() {
|
|
23
35
|
const steps = [];
|
|
36
|
+
const bugs = [];
|
|
37
|
+
const visual = [];
|
|
38
|
+
// Dedupe keys mirror the arrays: the console channel is a ring buffer read
|
|
39
|
+
// non-destructively, and looks repeat on an unchanged screen, so a re-read
|
|
40
|
+
// must add nothing.
|
|
41
|
+
const bugKeys = new Set();
|
|
42
|
+
const visualKeys = new Set();
|
|
24
43
|
let inFlight = 0;
|
|
25
44
|
let idle = null;
|
|
26
45
|
let markIdle = null;
|
|
27
46
|
return {
|
|
28
47
|
steps,
|
|
48
|
+
bugs,
|
|
49
|
+
visual,
|
|
29
50
|
begin() {
|
|
30
51
|
inFlight += 1;
|
|
31
52
|
idle ??= new Promise((resolve) => {
|
|
@@ -48,6 +69,20 @@ export function createActTrail() {
|
|
|
48
69
|
record(step) {
|
|
49
70
|
steps.push(step);
|
|
50
71
|
},
|
|
72
|
+
recordBug(bug) {
|
|
73
|
+
const key = evidenceKey(bug.detail);
|
|
74
|
+
if (bugKeys.has(key))
|
|
75
|
+
return;
|
|
76
|
+
bugKeys.add(key);
|
|
77
|
+
bugs.push(bug);
|
|
78
|
+
},
|
|
79
|
+
recordVisual(issue) {
|
|
80
|
+
const key = evidenceKey(issue.issue, issue.where);
|
|
81
|
+
if (visualKeys.has(key))
|
|
82
|
+
return;
|
|
83
|
+
visualKeys.add(key);
|
|
84
|
+
visual.push(issue);
|
|
85
|
+
},
|
|
51
86
|
async settled() {
|
|
52
87
|
// Yield a full turn before checking: the sibling tool calls of this step are
|
|
53
88
|
// launched in microtasks, so an act listed AFTER `report` in the call list has
|
|
@@ -57,7 +92,7 @@ export function createActTrail() {
|
|
|
57
92
|
await nextTurn();
|
|
58
93
|
while (idle !== null)
|
|
59
94
|
await idle;
|
|
60
|
-
return steps;
|
|
95
|
+
return { steps, bugs, visual };
|
|
61
96
|
},
|
|
62
97
|
};
|
|
63
98
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trail.js","sourceRoot":"","sources":["../../../src/agent/belt/trail.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"trail.js","sourceRoot":"","sources":["../../../src/agent/belt/trail.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAuCH;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,GAAG,KAAe;IAC5C,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AACrE,CAAC;AAED,2EAA2E;AAC3E,SAAS,QAAQ;IACf,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;AAC1D,CAAC;AAED,kDAAkD;AAClD,MAAM,UAAU,cAAc;IAC5B,MAAM,KAAK,GAAW,EAAE,CAAC;IACzB,MAAM,IAAI,GAAU,EAAE,CAAC;IACvB,MAAM,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