@duckmind/dm-darwin-x64 0.66.8 → 0.67.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 +6 -2
- package/dm +1 -1
- package/extensions/.dm-extensions.json +2 -2
- package/extensions/dm-web-access/dist/index.js +8 -16
- package/extensions/dm-web-access/dist/mcp-cli.js +7 -8
- package/extensions/dm-web-access/duckduckgo.js +1 -1
- package/extensions/dm-web-access/extract.js +4 -5
- package/extensions/dm-web-access/tool-activation.js +1 -8
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -4,7 +4,11 @@
|
|
|
4
4
|
No UI overhead. Just plan, run, and get things done.
|
|
5
5
|
</p>
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Requires Node.js 22.19.0 or newer for bundled web access (including `undici`).
|
|
8
|
+
If your Node.js is older, upgrade it before installing or updating DM.
|
|
9
|
+
Install `@duckmind/dm`, not a platform package for a different OS.
|
|
8
10
|
|
|
9
|
-
What
|
|
11
|
+
## What's new in 0.67.0
|
|
12
|
+
|
|
13
|
+
Bug fixes.
|
|
10
14
|
|
package/dm
CHANGED
|
@@ -840,8 +840,8 @@
|
|
|
840
840
|
"zai.js"
|
|
841
841
|
],
|
|
842
842
|
"file_count": 93,
|
|
843
|
-
"before_bytes":
|
|
844
|
-
"after_bytes":
|
|
843
|
+
"before_bytes": 3519525,
|
|
844
|
+
"after_bytes": 3343594,
|
|
845
845
|
"runtime_specifier_rewrites": 72,
|
|
846
846
|
"runtime_filename_rewrites": 90,
|
|
847
847
|
"declaration_files_removed": 1
|
|
@@ -10225,7 +10225,11 @@ __export(extract_exports, {
|
|
|
10225
10225
|
resolveFetchTimeoutMs: () => resolveFetchTimeoutMs
|
|
10226
10226
|
});
|
|
10227
10227
|
import { existsSync as existsSync53, readFileSync as readFileSync55 } from "node:fs";
|
|
10228
|
+
import { Readability } from "@mozilla/readability";
|
|
10229
|
+
import { Defuddle } from "defuddle/node";
|
|
10230
|
+
import { parseHTML as parseHTML2 } from "linkedom";
|
|
10228
10231
|
import pLimit from "p-limit";
|
|
10232
|
+
import TurndownService from "turndown";
|
|
10229
10233
|
function loadFetchTimeoutMs() {
|
|
10230
10234
|
if (!existsSync53(WEB_SEARCH_CONFIG_PATH3))
|
|
10231
10235
|
return DEFAULT_TIMEOUT_MS4;
|
|
@@ -10262,9 +10266,7 @@ function isDefuddleConsoleError(args) {
|
|
|
10262
10266
|
return prefix === "Defuddle" || typeof prefix === "string" && /^Defuddle(?:\s|:)/.test(prefix);
|
|
10263
10267
|
}
|
|
10264
10268
|
async function extractWithDefuddle(text4, url) {
|
|
10265
|
-
const {
|
|
10266
|
-
const { parseHTML } = await import("linkedom");
|
|
10267
|
-
const { document } = parseHTML(text4);
|
|
10269
|
+
const { document } = parseHTML2(text4);
|
|
10268
10270
|
Object.defineProperty(document, "location", {
|
|
10269
10271
|
value: new URL(url),
|
|
10270
10272
|
configurable: true
|
|
@@ -10444,7 +10446,6 @@ function abortedResult(url) {
|
|
|
10444
10446
|
return { url, title: "", content: "", error: "Aborted" };
|
|
10445
10447
|
}
|
|
10446
10448
|
async function loadTurndown() {
|
|
10447
|
-
const { default: TurndownService } = await import("turndown");
|
|
10448
10449
|
return new TurndownService({
|
|
10449
10450
|
headingStyle: "atx",
|
|
10450
10451
|
codeBlockStyle: "fenced"
|
|
@@ -11369,11 +11370,9 @@ ${result.pages > 0 ? `Pages: ${result.pages}
|
|
|
11369
11370
|
Browser retry failed: ${normal.error}` : "")
|
|
11370
11371
|
};
|
|
11371
11372
|
}
|
|
11372
|
-
const {
|
|
11373
|
-
const { document } = parseHTML(text4);
|
|
11373
|
+
const { document } = parseHTML2(text4);
|
|
11374
11374
|
const documentTitle = document.title?.trim() ?? "";
|
|
11375
11375
|
const declaredLinks = discoverDeclaredWebLinks(document, response.headers.get("link"), response.url || url);
|
|
11376
|
-
const { Readability } = await import("@mozilla/readability");
|
|
11377
11376
|
const reader = new Readability(document);
|
|
11378
11377
|
const article = reader.parse();
|
|
11379
11378
|
if (!article) {
|
|
@@ -15041,6 +15040,7 @@ async function searchWithDegoog(query, options = {}) {
|
|
|
15041
15040
|
init_activity();
|
|
15042
15041
|
init_domain_filter_normalization();
|
|
15043
15042
|
init_search_result_count_normalization();
|
|
15043
|
+
import { parseHTML } from "linkedom";
|
|
15044
15044
|
var SEARCH_URL = "https://html.duckduckgo.com/html/";
|
|
15045
15045
|
var SEARCH_TIMEOUT_MS18 = 30000;
|
|
15046
15046
|
function normalizeDomainFilters5(domainFilter) {
|
|
@@ -15096,7 +15096,6 @@ async function searchWithDuckDuckGo(query, options = {}) {
|
|
|
15096
15096
|
const body = await response.text();
|
|
15097
15097
|
throw new Error(`DuckDuckGo search error ${response.status}: ${body.slice(0, 300)}`);
|
|
15098
15098
|
}
|
|
15099
|
-
const { parseHTML } = await import("linkedom");
|
|
15100
15099
|
const { document } = parseHTML(await response.text());
|
|
15101
15100
|
if (response.status === 202 || document.querySelector(".anomaly-modal__box, #challenge-form")) {
|
|
15102
15101
|
throw new Error(`DuckDuckGo blocked the request with a bot check (HTTP ${response.status}, rate limited); use another search provider`);
|
|
@@ -24434,13 +24433,7 @@ var CAPABILITY_LABELS = {
|
|
|
24434
24433
|
"stored-content": "stored-result retrieval"
|
|
24435
24434
|
};
|
|
24436
24435
|
function supportsDynamicTools(pi) {
|
|
24437
|
-
|
|
24438
|
-
return false;
|
|
24439
|
-
const unsubscribe = pi.on("session_start", () => {});
|
|
24440
|
-
if (typeof unsubscribe !== "function")
|
|
24441
|
-
return false;
|
|
24442
|
-
unsubscribe();
|
|
24443
|
-
return true;
|
|
24436
|
+
return typeof pi.on === "function" && typeof pi.getAllTools === "function" && typeof pi.getActiveTools === "function" && typeof pi.setActiveTools === "function";
|
|
24444
24437
|
}
|
|
24445
24438
|
function addsToolsWithoutCheckpoint(model) {
|
|
24446
24439
|
const compat = model?.compat;
|
|
@@ -24476,7 +24469,6 @@ function registerWebToolActivation(pi, tools, mode) {
|
|
|
24476
24469
|
if (tools.length === 0)
|
|
24477
24470
|
return;
|
|
24478
24471
|
if (!supportsDynamicTools(pi)) {
|
|
24479
|
-
console.warn("[dm-web-access] Dynamic tool activation requires DM 0.86.0 or newer; web tools remain eagerly available.");
|
|
24480
24472
|
return;
|
|
24481
24473
|
}
|
|
24482
24474
|
const names = tools.map((tool) => tool.name);
|
|
@@ -10079,7 +10079,11 @@ __export(extract_exports, {
|
|
|
10079
10079
|
resolveFetchTimeoutMs: () => resolveFetchTimeoutMs
|
|
10080
10080
|
});
|
|
10081
10081
|
import { existsSync as existsSync52, readFileSync as readFileSync54 } from "node:fs";
|
|
10082
|
+
import { Readability } from "@mozilla/readability";
|
|
10083
|
+
import { Defuddle } from "defuddle/node";
|
|
10084
|
+
import { parseHTML as parseHTML2 } from "linkedom";
|
|
10082
10085
|
import pLimit from "p-limit";
|
|
10086
|
+
import TurndownService from "turndown";
|
|
10083
10087
|
function loadFetchTimeoutMs() {
|
|
10084
10088
|
if (!existsSync52(WEB_SEARCH_CONFIG_PATH3))
|
|
10085
10089
|
return DEFAULT_TIMEOUT_MS4;
|
|
@@ -10116,9 +10120,7 @@ function isDefuddleConsoleError(args) {
|
|
|
10116
10120
|
return prefix === "Defuddle" || typeof prefix === "string" && /^Defuddle(?:\s|:)/.test(prefix);
|
|
10117
10121
|
}
|
|
10118
10122
|
async function extractWithDefuddle(text4, url) {
|
|
10119
|
-
const {
|
|
10120
|
-
const { parseHTML } = await import("linkedom");
|
|
10121
|
-
const { document } = parseHTML(text4);
|
|
10123
|
+
const { document } = parseHTML2(text4);
|
|
10122
10124
|
Object.defineProperty(document, "location", {
|
|
10123
10125
|
value: new URL(url),
|
|
10124
10126
|
configurable: true
|
|
@@ -10298,7 +10300,6 @@ function abortedResult(url) {
|
|
|
10298
10300
|
return { url, title: "", content: "", error: "Aborted" };
|
|
10299
10301
|
}
|
|
10300
10302
|
async function loadTurndown() {
|
|
10301
|
-
const { default: TurndownService } = await import("turndown");
|
|
10302
10303
|
return new TurndownService({
|
|
10303
10304
|
headingStyle: "atx",
|
|
10304
10305
|
codeBlockStyle: "fenced"
|
|
@@ -11223,11 +11224,9 @@ ${result.pages > 0 ? `Pages: ${result.pages}
|
|
|
11223
11224
|
Browser retry failed: ${normal.error}` : "")
|
|
11224
11225
|
};
|
|
11225
11226
|
}
|
|
11226
|
-
const {
|
|
11227
|
-
const { document } = parseHTML(text4);
|
|
11227
|
+
const { document } = parseHTML2(text4);
|
|
11228
11228
|
const documentTitle = document.title?.trim() ?? "";
|
|
11229
11229
|
const declaredLinks = discoverDeclaredWebLinks(document, response.headers.get("link"), response.url || url);
|
|
11230
|
-
const { Readability } = await import("@mozilla/readability");
|
|
11231
11230
|
const reader = new Readability(document);
|
|
11232
11231
|
const article = reader.parse();
|
|
11233
11232
|
if (!article) {
|
|
@@ -21940,6 +21939,7 @@ async function searchWithDegoog(query, options = {}) {
|
|
|
21940
21939
|
init_activity();
|
|
21941
21940
|
init_domain_filter_normalization();
|
|
21942
21941
|
init_search_result_count_normalization();
|
|
21942
|
+
import { parseHTML } from "linkedom";
|
|
21943
21943
|
var SEARCH_URL = "https://html.duckduckgo.com/html/";
|
|
21944
21944
|
var SEARCH_TIMEOUT_MS18 = 30000;
|
|
21945
21945
|
function normalizeDomainFilters5(domainFilter) {
|
|
@@ -21995,7 +21995,6 @@ async function searchWithDuckDuckGo(query, options = {}) {
|
|
|
21995
21995
|
const body = await response.text();
|
|
21996
21996
|
throw new Error(`DuckDuckGo search error ${response.status}: ${body.slice(0, 300)}`);
|
|
21997
21997
|
}
|
|
21998
|
-
const { parseHTML } = await import("linkedom");
|
|
21999
21998
|
const { document } = parseHTML(await response.text());
|
|
22000
21999
|
if (response.status === 202 || document.querySelector(".anomaly-modal__box, #challenge-form")) {
|
|
22001
22000
|
throw new Error(`DuckDuckGo blocked the request with a bot check (HTTP ${response.status}, rate limited); use another search provider`);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { parseHTML } from "linkedom";
|
|
1
2
|
import { activityMonitor } from "./activity.js";
|
|
2
3
|
import { normalizeDomain } from "./domain-filter-normalization.js";
|
|
3
4
|
import { normalizeSearchResultCount } from "./search-result-count-normalization.js";
|
|
@@ -56,7 +57,6 @@ export async function searchWithDuckDuckGo(query, options = {}) {
|
|
|
56
57
|
const body = await response.text();
|
|
57
58
|
throw new Error(`DuckDuckGo search error ${response.status}: ${body.slice(0, 300)}`);
|
|
58
59
|
}
|
|
59
|
-
const { parseHTML } = await import("linkedom");
|
|
60
60
|
const { document } = parseHTML(await response.text());
|
|
61
61
|
if (response.status === 202 || document.querySelector(".anomaly-modal__box, #challenge-form")) {
|
|
62
62
|
throw new Error(`DuckDuckGo blocked the request with a bot check (HTTP ${response.status}, rate limited); use another search provider`);
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from "node:fs";
|
|
2
|
+
import { Readability } from "@mozilla/readability";
|
|
3
|
+
import { Defuddle } from "defuddle/node";
|
|
4
|
+
import { parseHTML } from "linkedom";
|
|
2
5
|
import pLimit from "p-limit";
|
|
6
|
+
import TurndownService from "turndown";
|
|
3
7
|
import { activityMonitor } from "./activity.js";
|
|
4
8
|
import { extractRSCContent } from "./rsc-extract.js";
|
|
5
9
|
import { extractPDFToMarkdown, isPDF, loadPDFConfig } from "./pdf-extract.js";
|
|
@@ -72,8 +76,6 @@ function isDefuddleConsoleError(args) {
|
|
|
72
76
|
return prefix === "Defuddle" || typeof prefix === "string" && /^Defuddle(?:\s|:)/.test(prefix);
|
|
73
77
|
}
|
|
74
78
|
async function extractWithDefuddle(text, url) {
|
|
75
|
-
const { Defuddle } = await import("defuddle/node");
|
|
76
|
-
const { parseHTML } = await import("linkedom");
|
|
77
79
|
const { document } = parseHTML(text);
|
|
78
80
|
Object.defineProperty(document, "location", {
|
|
79
81
|
value: new URL(url),
|
|
@@ -257,7 +259,6 @@ function abortedResult(url) {
|
|
|
257
259
|
}
|
|
258
260
|
let turndownInstance;
|
|
259
261
|
async function loadTurndown() {
|
|
260
|
-
const { default: TurndownService } = await import("turndown");
|
|
261
262
|
return new TurndownService({
|
|
262
263
|
headingStyle: "atx",
|
|
263
264
|
codeBlockStyle: "fenced"
|
|
@@ -1188,11 +1189,9 @@ ${result.pages > 0 ? `Pages: ${result.pages}
|
|
|
1188
1189
|
Browser retry failed: ${normal.error}` : "")
|
|
1189
1190
|
};
|
|
1190
1191
|
}
|
|
1191
|
-
const { parseHTML } = await import("linkedom");
|
|
1192
1192
|
const { document } = parseHTML(text);
|
|
1193
1193
|
const documentTitle = document.title?.trim() ?? "";
|
|
1194
1194
|
const declaredLinks = discoverDeclaredWebLinks(document, response.headers.get("link"), response.url || url);
|
|
1195
|
-
const { Readability } = await import("@mozilla/readability");
|
|
1196
1195
|
const reader = new Readability(document);
|
|
1197
1196
|
const article = reader.parse();
|
|
1198
1197
|
if (!article) {
|
|
@@ -8,13 +8,7 @@ const CAPABILITY_LABELS = {
|
|
|
8
8
|
"stored-content": "stored-result retrieval"
|
|
9
9
|
};
|
|
10
10
|
function supportsDynamicTools(pi) {
|
|
11
|
-
|
|
12
|
-
return false;
|
|
13
|
-
const unsubscribe = pi.on("session_start", () => {});
|
|
14
|
-
if (typeof unsubscribe !== "function")
|
|
15
|
-
return false;
|
|
16
|
-
unsubscribe();
|
|
17
|
-
return true;
|
|
11
|
+
return typeof pi.on === "function" && typeof pi.getAllTools === "function" && typeof pi.getActiveTools === "function" && typeof pi.setActiveTools === "function";
|
|
18
12
|
}
|
|
19
13
|
function addsToolsWithoutCheckpoint(model) {
|
|
20
14
|
const compat = model?.compat;
|
|
@@ -50,7 +44,6 @@ export function registerWebToolActivation(pi, tools, mode) {
|
|
|
50
44
|
if (tools.length === 0)
|
|
51
45
|
return;
|
|
52
46
|
if (!supportsDynamicTools(pi)) {
|
|
53
|
-
console.warn("[dm-web-access] Dynamic tool activation requires DM 0.86.0 or newer; web tools remain eagerly available.");
|
|
54
47
|
return;
|
|
55
48
|
}
|
|
56
49
|
const names = tools.map((tool) => tool.name);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@duckmind/dm-darwin-x64",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.67.0",
|
|
4
4
|
"description": "DuckMind (dm) binary payload for darwin x64",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"os": [
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"bin": {
|
|
13
13
|
"dm": "dm"
|
|
14
14
|
},
|
|
15
|
-
"
|
|
15
|
+
"dmConfig": {
|
|
16
16
|
"name": "dm",
|
|
17
17
|
"configDir": ".dm"
|
|
18
18
|
},
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"terminal"
|
|
25
25
|
],
|
|
26
26
|
"engines": {
|
|
27
|
-
"node": ">=
|
|
27
|
+
"node": ">=22.19.0"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@js-temporal/polyfill": "0.5.1",
|