@askalf/deepdive 0.25.0 → 0.25.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/browser.d.ts +5 -0
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +92 -31
- package/dist/browser.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -466,12 +466,12 @@ One command, aggregated health report. Paste the output when filing issues.
|
|
|
466
466
|
|
|
467
467
|
```bash
|
|
468
468
|
$ deepdive doctor
|
|
469
|
-
deepdive doctor — v0.25.
|
|
469
|
+
deepdive doctor — v0.25.1
|
|
470
470
|
|
|
471
471
|
# environment
|
|
472
472
|
OK Node v22.21.1
|
|
473
473
|
--- Platform win32 x64
|
|
474
|
-
--- deepdive v0.25.
|
|
474
|
+
--- deepdive v0.25.1
|
|
475
475
|
|
|
476
476
|
# cache
|
|
477
477
|
--- dir ~/.deepdive/cache
|
package/dist/browser.d.ts
CHANGED
|
@@ -17,6 +17,10 @@ export interface BrowserOptions {
|
|
|
17
17
|
cdpEndpoint?: string;
|
|
18
18
|
}
|
|
19
19
|
export declare const DEFAULT_USER_AGENT: string;
|
|
20
|
+
export declare class FetchWedgeError extends Error {
|
|
21
|
+
constructor(url: string, ms: number);
|
|
22
|
+
}
|
|
23
|
+
export declare function withHardDeadline<T>(work: Promise<T>, ms: number, url: string): Promise<T>;
|
|
20
24
|
export declare class BrowserSession {
|
|
21
25
|
private readonly opts;
|
|
22
26
|
private browser;
|
|
@@ -24,6 +28,7 @@ export declare class BrowserSession {
|
|
|
24
28
|
constructor(opts: BrowserOptions);
|
|
25
29
|
start(): Promise<void>;
|
|
26
30
|
fetch(url: string): Promise<FetchedPage>;
|
|
31
|
+
private extractViaPage;
|
|
27
32
|
private fetchPdf;
|
|
28
33
|
close(): Promise<void>;
|
|
29
34
|
}
|
package/dist/browser.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAaA,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAMlB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,UAAU,CAAC;CACpB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IAKnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,kBAAkB,QAEuB,CAAC;
|
|
1
|
+
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAaA,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAMlB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,UAAU,CAAC;CACpB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IAKnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,kBAAkB,QAEuB,CAAC;AAavD,qBAAa,eAAgB,SAAQ,KAAK;gBAC5B,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM;CAOpC;AAOD,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAOzF;AAYD,qBAAa,cAAc;IAIb,OAAO,CAAC,QAAQ,CAAC,IAAI;IAHjC,OAAO,CAAC,OAAO,CAAwB;IACvC,OAAO,CAAC,OAAO,CAA+B;gBAEjB,IAAI,EAAE,cAAc;IAE3C,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAgCtB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;YAsChC,cAAc;YAsCd,QAAQ;IA4BhB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAU7B;AAID,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAInF"}
|
package/dist/browser.js
CHANGED
|
@@ -11,6 +11,37 @@ import { chromium } from "playwright";
|
|
|
11
11
|
import { looksLikePdf } from "./pdf.js";
|
|
12
12
|
export const DEFAULT_USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 " +
|
|
13
13
|
"(KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36";
|
|
14
|
+
// #87 — the fetch-stage wedge. A run once hung 18+ minutes with every
|
|
15
|
+
// per-call timeout "passing": deepdive idle, chrome children idle, no
|
|
16
|
+
// progress. The per-call timeouts can't be airtight because the page work
|
|
17
|
+
// includes protocol calls that accept no timeout at all (page.evaluate —
|
|
18
|
+
// a renderer main thread blocked by a dialog, window.print(), or a
|
|
19
|
+
// never-settling document leaves it pending forever) and calls whose
|
|
20
|
+
// defaults a wedged renderer defeats. So fetch() races the ENTIRE page
|
|
21
|
+
// lifecycle against this hard deadline; on expiry the page is force-closed
|
|
22
|
+
// without awaiting it (a wedged page may never settle close() either) and
|
|
23
|
+
// the agent's existing failed-fetch path turns the wedge into one skipped
|
|
24
|
+
// source instead of a hung run.
|
|
25
|
+
export class FetchWedgeError extends Error {
|
|
26
|
+
constructor(url, ms) {
|
|
27
|
+
super(`fetch wedged: no result after ${ms}ms hard deadline — ${url}. ` +
|
|
28
|
+
`Page force-closed; run continues without this source (deepdive#87).`);
|
|
29
|
+
this.name = "FetchWedgeError";
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
// Exported for unit tests. Race `work` against a hard deadline. The timer is
|
|
33
|
+
// unref'd (never holds the process open) and cleared when work settles
|
|
34
|
+
// first. When the deadline wins, `work` keeps running detached — its later
|
|
35
|
+
// settlement is delivered to the already-settled race and cannot become an
|
|
36
|
+
// unhandled rejection.
|
|
37
|
+
export function withHardDeadline(work, ms, url) {
|
|
38
|
+
let timer;
|
|
39
|
+
const deadline = new Promise((_, reject) => {
|
|
40
|
+
timer = setTimeout(() => reject(new FetchWedgeError(url, ms)), ms);
|
|
41
|
+
timer.unref?.();
|
|
42
|
+
});
|
|
43
|
+
return Promise.race([work, deadline]).finally(() => clearTimeout(timer));
|
|
44
|
+
}
|
|
14
45
|
const STEALTH_ARGS = [
|
|
15
46
|
"--disable-blink-features=AutomationControlled",
|
|
16
47
|
"--disable-features=IsolateOrigins,site-per-process",
|
|
@@ -53,6 +84,11 @@ export class BrowserSession {
|
|
|
53
84
|
locale: "en-US",
|
|
54
85
|
javaScriptEnabled: true,
|
|
55
86
|
});
|
|
87
|
+
// #87: bound every protocol call on this context (newPage, content,
|
|
88
|
+
// title, …) by the fetch timeout instead of Playwright's 30s default.
|
|
89
|
+
// Calls that accept no timeout (evaluate) are covered by the hard
|
|
90
|
+
// deadline in fetch().
|
|
91
|
+
this.context.setDefaultTimeout(this.opts.timeoutMs);
|
|
56
92
|
}
|
|
57
93
|
async fetch(url) {
|
|
58
94
|
if (!this.context)
|
|
@@ -64,42 +100,67 @@ export class BrowserSession {
|
|
|
64
100
|
return await this.fetchPdf(url);
|
|
65
101
|
}
|
|
66
102
|
const page = await this.context.newPage();
|
|
103
|
+
// 2× the per-call timeout + grace: generous enough that the deadline
|
|
104
|
+
// only fires when the per-call timeouts have ALREADY failed to fire —
|
|
105
|
+
// i.e. a genuine wedge, not a slow page.
|
|
106
|
+
const hardMs = this.opts.timeoutMs * 2 + 10_000;
|
|
107
|
+
let result;
|
|
108
|
+
let wedged = false;
|
|
67
109
|
try {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
110
|
+
result = await withHardDeadline(this.extractViaPage(page, url), hardMs, url);
|
|
111
|
+
}
|
|
112
|
+
catch (err) {
|
|
113
|
+
wedged = err instanceof FetchWedgeError;
|
|
114
|
+
throw err;
|
|
115
|
+
}
|
|
116
|
+
finally {
|
|
117
|
+
if (wedged) {
|
|
118
|
+
// The page is unresponsive — close() may never settle. Fire and
|
|
119
|
+
// forget; context.close() at run end sweeps whatever remains.
|
|
120
|
+
void page.close().catch(() => undefined);
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
81
123
|
await page.close().catch(() => undefined);
|
|
82
|
-
return await this.fetchPdf(url);
|
|
83
124
|
}
|
|
84
|
-
const finalUrl = page.url();
|
|
85
|
-
const status = response?.status() ?? 0;
|
|
86
|
-
const title = await page.title().catch(() => "");
|
|
87
|
-
const html = (await page.content()).slice(0, this.opts.maxBytes);
|
|
88
|
-
const text = (await page.evaluate(() => document.body?.innerText ?? "")).slice(0, this.opts.maxBytes);
|
|
89
|
-
return {
|
|
90
|
-
url,
|
|
91
|
-
finalUrl,
|
|
92
|
-
status,
|
|
93
|
-
title,
|
|
94
|
-
text,
|
|
95
|
-
html,
|
|
96
|
-
fetchedAt: Date.now(),
|
|
97
|
-
mimeType: extractMimeType(ct),
|
|
98
|
-
};
|
|
99
125
|
}
|
|
100
|
-
|
|
101
|
-
|
|
126
|
+
// PDF-by-content-type redirect happens after the page is closed, on the
|
|
127
|
+
// request-API path with its own timeout.
|
|
128
|
+
if (result === "pdf")
|
|
129
|
+
return await this.fetchPdf(url);
|
|
130
|
+
return result;
|
|
131
|
+
}
|
|
132
|
+
// The page-scoped portion of fetch(), raced against the #87 hard deadline.
|
|
133
|
+
async extractViaPage(page, url) {
|
|
134
|
+
const response = await page.goto(url, {
|
|
135
|
+
waitUntil: "domcontentloaded",
|
|
136
|
+
timeout: this.opts.timeoutMs,
|
|
137
|
+
});
|
|
138
|
+
// Give SPAs a moment to finish painting after domcontentloaded.
|
|
139
|
+
await page
|
|
140
|
+
.waitForLoadState("networkidle", { timeout: Math.min(5000, this.opts.timeoutMs) })
|
|
141
|
+
.catch(() => undefined);
|
|
142
|
+
// If the response advertised a PDF content-type even though the
|
|
143
|
+
// URL didn't end in .pdf, redirect to the bytes path.
|
|
144
|
+
const headers = response?.headers() ?? {};
|
|
145
|
+
const ct = headers["content-type"] ?? "";
|
|
146
|
+
if (looksLikePdf({ contentType: ct })) {
|
|
147
|
+
return "pdf";
|
|
102
148
|
}
|
|
149
|
+
const finalUrl = page.url();
|
|
150
|
+
const status = response?.status() ?? 0;
|
|
151
|
+
const title = await page.title().catch(() => "");
|
|
152
|
+
const html = (await page.content()).slice(0, this.opts.maxBytes);
|
|
153
|
+
const text = (await page.evaluate(() => document.body?.innerText ?? "")).slice(0, this.opts.maxBytes);
|
|
154
|
+
return {
|
|
155
|
+
url,
|
|
156
|
+
finalUrl,
|
|
157
|
+
status,
|
|
158
|
+
title,
|
|
159
|
+
text,
|
|
160
|
+
html,
|
|
161
|
+
fetchedAt: Date.now(),
|
|
162
|
+
mimeType: extractMimeType(ct),
|
|
163
|
+
};
|
|
103
164
|
}
|
|
104
165
|
async fetchPdf(url) {
|
|
105
166
|
if (!this.context)
|
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,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;AACvF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@askalf/deepdive",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.1",
|
|
4
4
|
"description": "A local research agent. One command, cited answer. Routes every LLM call through your own proxy (dario, Anthropic-compat, OpenAI-compat). Headless browser + pluggable search + multi-provider LLM — zero hosted dependencies.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|