@debugg-ai/debugg-ai-mcp 4.2.0 → 4.2.1
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 +2 -2
- package/dist/tools/probePage.js +8 -2
- package/dist/types/index.js +9 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -142,13 +142,13 @@ Fires a server-side browser-agent crawl to populate the project's knowledge grap
|
|
|
142
142
|
|
|
143
143
|
#### `probe_page`
|
|
144
144
|
|
|
145
|
-
**Lightweight no-LLM batch page probe.** Pass 1-20 URLs; each navigates,
|
|
145
|
+
**Lightweight no-LLM batch page probe.** Pass 1-20 URLs; each navigates, settles on content (the DOM going quiet, bounded — never on network silence, which a live app never reaches), and returns rendered state — screenshot + page metadata + structured console errors + network summary. No agent loop, no LLM cost, no scenario assertions. Use it for "did I just break /settings?", multi-route smoke after a refactor, CI per-PR sweeps, and quick is-it-up checks where `check_app_in_browser`'s 60-150s agent loop is overkill.
|
|
146
146
|
|
|
147
147
|
| Parameter | Type | Description |
|
|
148
148
|
|-----------|------|-------------|
|
|
149
149
|
| `targets` | array **required** | 1-20 entries: `[{url, waitForSelector?, waitForLoadState?, timeoutMs?}]` |
|
|
150
150
|
| `targets[].url` | string **required** | Public URL or localhost (auto-tunneled) |
|
|
151
|
-
| `targets[].waitForLoadState` | enum | `'
|
|
151
|
+
| `targets[].waitForLoadState` | enum | `'domcontentloaded'` (default, + a bounded content settle) / `'load'` (also blocks on third-party embeds) / `'networkidle'` (accepted, never issued — a live site's network does not go idle) |
|
|
152
152
|
| `targets[].waitForSelector` | string | Optional CSS selector to wait for after navigation |
|
|
153
153
|
| `targets[].timeoutMs` | number | Per-URL timeout, 1000-30000 (default 10000) |
|
|
154
154
|
| `includeHtml` | boolean | Return raw HTML in each result (default false) |
|
package/dist/tools/probePage.js
CHANGED
|
@@ -22,6 +22,8 @@ LOCALHOST SUPPORT: any localhost URL is auto-tunneled. Pre-flight TCP probe fail
|
|
|
22
22
|
|
|
23
23
|
BATCH MODE: pass up to 20 targets in one call to share browser session + tunnel — dramatically faster than firing parallel single-URL probes (one execution unit, not N). Per-URL waitForSelector / waitForLoadState / timeoutMs override defaults.
|
|
24
24
|
|
|
25
|
+
READINESS: navigation settles on CONTENT (the page's DOM going quiet), bounded — not on network silence, which never arrives on a live app, and not on 'load', which blocks on third-party embeds. The default is right for SPAs; reach for waitForSelector, not waitForLoadState, when you need to wait for something specific.
|
|
26
|
+
|
|
25
27
|
A single failed target's error appears in result.error without failing the whole batch — the other results stay valid.`;
|
|
26
28
|
const TARGET_PROPERTIES = {
|
|
27
29
|
url: {
|
|
@@ -35,11 +37,15 @@ const TARGET_PROPERTIES = {
|
|
|
35
37
|
waitForLoadState: {
|
|
36
38
|
type: 'string',
|
|
37
39
|
enum: ['load', 'domcontentloaded', 'networkidle'],
|
|
38
|
-
|
|
40
|
+
// sentinal-kvoou. This description used to read "Default 'load'. Use 'networkidle'
|
|
41
|
+
// for SPAs to wait until the bundle finishes rendering" — advice that hangs on
|
|
42
|
+
// exactly the class of app it names. See __tests__/tools/probePageWaitContract.ts
|
|
43
|
+
// for the measurement against https://debugg.ai.
|
|
44
|
+
description: "When to consider the page ready to capture. Default 'domcontentloaded', followed by a bounded content settle (the page's DOM going quiet) — that is what actually makes a client-rendered SPA safe to screenshot, and it needs no override. Only override for a specific reason: 'load' additionally blocks on every sub-resource, including third-party iframes and images we do not control, so a slow embed can time the whole probe out. 'networkidle' is accepted for compatibility but is never issued — a live site's network does not go idle (analytics, polling, websockets, ads) — and behaves as 'domcontentloaded'. To wait on something specific, use waitForSelector.",
|
|
39
45
|
},
|
|
40
46
|
timeoutMs: {
|
|
41
47
|
type: 'number',
|
|
42
|
-
description:
|
|
48
|
+
description: "Per-URL budget in milliseconds for navigating AND settling this target (1000-30000, default 10000). The content settle spends what the navigation left over, so this is the whole cost of the target, not just the goto.",
|
|
43
49
|
},
|
|
44
50
|
};
|
|
45
51
|
export function buildProbePageTool() {
|
package/dist/types/index.js
CHANGED
|
@@ -226,7 +226,15 @@ export var LogLevel;
|
|
|
226
226
|
export const ProbePageTargetSchema = z.object({
|
|
227
227
|
url: z.preprocess(normalizeUrl, z.string().url('Invalid URL. Pass a full URL like "http://localhost:3000" or "https://example.com". Localhost URLs are auto-tunneled to the remote browser.')),
|
|
228
228
|
waitForSelector: z.string().optional(),
|
|
229
|
-
|
|
229
|
+
// sentinal-kvoou: 'domcontentloaded', NOT 'load'. 'load' blocks on every
|
|
230
|
+
// sub-resource including third-party iframes we do not control — measured against
|
|
231
|
+
// https://debugg.ai (two YouTube embeds), the 'load' default timed the goto out at
|
|
232
|
+
// 10s and reported statusCode 0 on a page that renders in 3.5s. Readiness comes from
|
|
233
|
+
// the backend's bounded CONTENT settle after the goto, not from a load state.
|
|
234
|
+
// 'networkidle' stays in the enum (this package is published; removing it would turn
|
|
235
|
+
// an existing caller's probe into a hard validation error) and is neutralized
|
|
236
|
+
// server-side — never a wait, always domcontentloaded + settle.
|
|
237
|
+
waitForLoadState: z.enum(['load', 'domcontentloaded', 'networkidle']).default('domcontentloaded'),
|
|
230
238
|
timeoutMs: z.number().int().min(1000, 'timeoutMs minimum is 1000 (1s)').max(30000, 'timeoutMs maximum is 30000 (30s) — longer probes should use check_app_in_browser').default(10000),
|
|
231
239
|
}).strict();
|
|
232
240
|
export const ProbePageInputSchema = z.object({
|