@xiaoso/dsh-tool-plus 0.1.16 → 0.1.17-beta.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/lib/{abort-DZ54CaKU.mjs → abort-BTblp0Rt.mjs} +2 -2
- package/lib/{alibaba-coding-plan-DODpkcqi.mjs → alibaba-coding-plan-t3R4YKCB.mjs} +3 -3
- package/lib/{alibaba-token-plan-C6lpKCda.mjs → alibaba-token-plan-CO4djG1y.mjs} +4 -4
- package/lib/{alibaba-token-plan-CHGyWOfX.mjs → alibaba-token-plan-CUjYJX0-.mjs} +1 -1
- package/lib/{anthropic-Dv_GGX6g.mjs → anthropic-nf7w6so1.mjs} +48 -21
- package/lib/{api-key-validation-MnMf_ihX.mjs → api-key-validation-C_tZ7Y9a.mjs} +2 -2
- package/lib/behavior-BwvTUtag.mjs +111 -0
- package/lib/{browser-render-BZXt548F.mjs → browser-render-BQaEVK_n.mjs} +4 -4
- package/lib/{reference-CtvM4zLU.mjs → bundled-references-CrQ4dQcT.mjs} +57 -4
- package/lib/cascade-BWjRTD1q.mjs +30265 -0
- package/lib/{cline-pass-BT9CBEOj.mjs → cline-pass-Bjm-O8GG.mjs} +2 -2
- package/lib/cloudflare-CKXRJ0l9.mjs +37 -0
- package/lib/{cloudflare-ai-gateway-DReN6ohJ.mjs → cloudflare-ai-gateway-BpnBSjwV.mjs} +8 -4
- package/lib/cloudflare-workers-ai-odj9XswL.mjs +32 -0
- package/lib/collapse-_nkb2dn7.mjs +1945 -0
- package/lib/{coreweave-C82HrLpb.mjs → coreweave-CGDZOD8-.mjs} +1 -1
- package/lib/{coreweave-C68UgRQO.mjs → coreweave-DwffcgW5.mjs} +4 -4
- package/lib/cursor-BgOuV7Qf.mjs +794 -0
- package/lib/{cursor-_gHHq-Dq.mjs → cursor-CF1iHHbv.mjs} +68 -19
- package/lib/{cursor-proto-Cr_WEMuv.mjs → cursor-proto-BuNTjX3L.mjs} +823 -23
- package/lib/{devin-QpfTSl9H.mjs → devin-7OEeEb80.mjs} +112 -31
- package/lib/{devin-proto-DYhp4Ty6.mjs → devin-proto-C-QreeAv.mjs} +71 -5
- package/lib/{dom-DG3sPESc.mjs → dom-BmbZv4v9.mjs} +598 -182
- package/lib/{error-O63pC8zg.mjs → error-8LVo7tug.mjs} +725 -104
- package/lib/factory-droid-ChhmsGWb.mjs +71 -0
- package/lib/{fs-promises-shim-B2YFWkcd.mjs → fs-promises-shim-CANAxFWh.mjs} +10 -1
- package/lib/{github-copilot-BMEcw8N1.mjs → github-copilot-QwevdT30.mjs} +4 -4
- package/lib/{github-copilot-headers-DnjGEbko.mjs → github-copilot-headers-CAUZ0rUD.mjs} +138 -26
- package/lib/{gitlab-duo-DnHqJjFY.mjs → gitlab-duo-DigV7k_o.mjs} +2 -2
- package/lib/{google-antigravity-B1mSckrK.mjs → google-antigravity-D-oe0r8A.mjs} +6 -7
- package/lib/{google-gemini-cli-DJwThCCn.mjs → google-gemini-cli-CQBHgGJT.mjs} +5 -6
- package/lib/{google-oauth-shared-BctLpVUN.mjs → google-oauth-shared-CvgVIUwJ.mjs} +2 -2
- package/lib/google-validation-CdvRj4ec.mjs +126 -0
- package/lib/id-EJwVLDHE.mjs +2548 -0
- package/lib/index.mjs +248 -258
- package/lib/{kilo-BEgEwMJQ.mjs → kilo-5r6OffCa.mjs} +2 -2
- package/lib/{kimi-T9NldEIJ.mjs → kimi-DOOtbXmm.mjs} +9 -10
- package/lib/{launch-BIWNyrBB.mjs → launch-DkAjib7h.mjs} +1 -1
- package/lib/{markit-Dvp2JPdT.mjs → markit-CCcyeAds.mjs} +359 -140
- package/lib/{models-DnXMYGcJ.mjs → models-DCpDT_im.mjs} +199203 -112275
- package/lib/{muse-code-CNvqqAp6.mjs → muse-code-CYf8zj_B.mjs} +5 -5
- package/lib/{openai-codex-D5-CyTxa.mjs → openai-codex-Cj-TvSFh.mjs} +13 -10
- package/lib/{perplexity-A2PEoGaC.mjs → perplexity-Dh_Qgsmx.mjs} +68 -25
- package/lib/{pkce-BYjmugmw.mjs → pkce-DO-jBJLV.mjs} +1 -1
- package/lib/pricing-DusBEhwm.mjs +593 -0
- package/lib/{readability-uGhqb4GC.mjs → readability-XHK0o3bv.mjs} +287 -27
- package/lib/{scrapers-C1ujjV8k.mjs → scrapers-B6PADOVm.mjs} +13 -13
- package/lib/slugify-ynYWBIA5.mjs +11 -0
- package/lib/snowflake-B_jap6lz.mjs +666 -0
- package/lib/snowflake-Cu1ZyOp6.mjs +151 -0
- package/lib/{src-AELUUb5U.mjs → src-BhinCSpi.mjs} +1172 -458
- package/lib/{stream-AVOoe5Hj.mjs → stream-D2ivg3GH.mjs} +3740 -5311
- package/lib/{turndown-D6fof1OX.mjs → turndown-Vya8SavL.mjs} +82 -30
- package/lib/types/tools/hashline/native/index.d.ts +2 -2
- package/lib/types/tools/hashline/native/policy.d.ts +19 -21
- package/lib/types/tools/omp/session/agent-storage.d.ts +3 -3
- package/lib/types/tools/shared/bun-named-shim.d.ts +5 -0
- package/lib/{types-BLrLohwK.mjs → types-tH1v9uRm.mjs} +2 -2
- package/lib/{utils-cZX3f_Ls.mjs → utils-C_Ncya1r.mjs} +1737 -509
- package/lib/utils-D2tK38xq.mjs +34006 -0
- package/lib/{utils-I4I8azHN.mjs → utils-DrDwmNtu.mjs} +8 -3
- package/lib/{xai-oauth-CbeldUSV.mjs → xai-oauth-DLLzX6my.mjs} +4 -4
- package/lib/{xiaomi-Dl3VSs04.mjs → xiaomi-CqK-KivK.mjs} +2 -2
- package/lib/{zai-FyjGSypr.mjs → zai-DoJ2xPIH.mjs} +2 -2
- package/lib/{zip-DRrycScC.mjs → zip-DG1mUV6X.mjs} +1 -1
- package/package.json +8 -8
- package/lib/amazon-bedrock-Dx0rr9dY.mjs +0 -996
- package/lib/anthropic-ClCw0PV_.mjs +0 -3624
- package/lib/anthropic-wire-lbGAFzYb.mjs +0 -927
- package/lib/azure-openai-responses-WE_bgFWp.mjs +0 -285
- package/lib/bundled-references-DY3EJxZV.mjs +0 -56
- package/lib/cloudflare-ai-gateway-CrMa97Ap.mjs +0 -44
- package/lib/collapse-CkMNRNr7.mjs +0 -2304
- package/lib/cursor-C6jaIJDg.mjs +0 -283
- package/lib/cursor-D-XZYDf_.mjs +0 -4544
- package/lib/deterministic-id-CUEIMSqR.mjs +0 -17
- package/lib/devin-ExGIghmx.mjs +0 -69
- package/lib/devin-u0ljw5P6.mjs +0 -628
- package/lib/effort-BdtQMN-_.mjs +0 -23
- package/lib/event-stream-BKEtb45Y.mjs +0 -167
- package/lib/gemini-headers-Co9cVvex.mjs +0 -54
- package/lib/google-auth-qAN-6DMW.mjs +0 -232
- package/lib/google-gemini-cli-B2Aw1S5w.mjs +0 -844
- package/lib/google-lTxuq28n.mjs +0 -38
- package/lib/google-shared-Y01j9xOr.mjs +0 -856
- package/lib/google-validation-BEkNs-Bx.mjs +0 -18
- package/lib/google-vertex-DcM-FRC5.mjs +0 -99
- package/lib/hosts-00rjRzUD.mjs +0 -203
- package/lib/id-AL5obQzR.mjs +0 -71
- package/lib/idle-iterator-D0ZXEcUq.mjs +0 -366
- package/lib/ollama-6R0oXZks.mjs +0 -574
- package/lib/openai-codex-responses-C8bnBWOe.mjs +0 -3232
- package/lib/openai-completions-DNr3mUsn.mjs +0 -1430
- package/lib/openai-configuration-update-xMYUjaK_.mjs +0 -150
- package/lib/openai-reasoning-fallback-Ju-5pSR8.mjs +0 -380
- package/lib/openai-responses-CjpafAEr.mjs +0 -861
- package/lib/protobuf-BMgDYu_U.mjs +0 -717
- package/lib/provider-response-SqKSkkUc.mjs +0 -22
- package/lib/proxy-DxvCQOCA.mjs +0 -230
- package/lib/request-debug-BwPOqN_j.mjs +0 -183
- package/lib/sanitize-text-BCf5KmCf.mjs +0 -33
- package/lib/sse-debug-B-tkLCPW.mjs +0 -11
- package/lib/stream-markup-healing-CN3RsqG9.mjs +0 -267
- package/lib/strict-tool-validation-CBTz1dAA.mjs +0 -105
- package/lib/taxonomy-DSIM99rS.mjs +0 -15392
- package/lib/thinking-ngMwf_1Y.mjs +0 -336
- package/lib/type-guards-CttAANEx.mjs +0 -11
- package/lib/utils-CE3DSebh.mjs +0 -11763
- package/lib/vision-guard-BCpXWUj3.mjs +0 -77
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
import { installBunShim as __installBunShim } from "./bun-shim.mjs";
|
|
2
2
|
__installBunShim();
|
|
3
|
-
import {
|
|
4
|
-
//#region node_modules/.pnpm/@oh-my-pi+pi-utils@18.
|
|
5
|
-
|
|
3
|
+
import { i as __exportAll } from "./fs-promises-shim-CANAxFWh.mjs";
|
|
4
|
+
//#region node_modules/.pnpm/@oh-my-pi+pi-utils@18.12.6/node_modules/@oh-my-pi/pi-utils/src/turndown/gfm.ts
|
|
5
|
+
/** Elements named `name` below `node` in document order, not descending into nested tables. */
|
|
6
|
+
function descendantElements(node, name, limit = Number.POSITIVE_INFINITY) {
|
|
6
7
|
const matches = [];
|
|
7
|
-
|
|
8
|
+
const stack = [];
|
|
9
|
+
const pushChildren = (parent) => {
|
|
10
|
+
const children = parent.children;
|
|
11
|
+
for (let index = children.length - 1; index >= 0; index--) stack.push(children[index]);
|
|
12
|
+
};
|
|
13
|
+
pushChildren(node);
|
|
14
|
+
while (stack.length > 0 && matches.length < limit) {
|
|
15
|
+
const child = stack.pop();
|
|
8
16
|
if (child.nodeName === name) matches.push(child);
|
|
9
|
-
if (child.nodeName !== "TABLE")
|
|
17
|
+
if (child.nodeName !== "TABLE") pushChildren(child);
|
|
10
18
|
}
|
|
11
19
|
return matches;
|
|
12
20
|
}
|
|
13
21
|
function isHeadingTable(node) {
|
|
14
22
|
if (node.nodeName !== "TABLE") return false;
|
|
15
|
-
const firstRow = descendantElements(node, "TR")[0];
|
|
23
|
+
const firstRow = descendantElements(node, "TR", 1)[0];
|
|
16
24
|
if (!firstRow) return false;
|
|
17
25
|
const cells = Array.from(firstRow.children);
|
|
18
26
|
return cells.length > 0 && cells.every((cell) => cell.nodeName === "TH");
|
|
@@ -47,12 +55,13 @@ function renderTable(service, table) {
|
|
|
47
55
|
/** Install GitHub fenced code blocks selected by `highlight-source-*` wrappers. */
|
|
48
56
|
const highlightedCodeBlock = (service) => {
|
|
49
57
|
service.addRule("highlightedCodeBlock", {
|
|
58
|
+
skipContent: true,
|
|
50
59
|
filter(node) {
|
|
51
60
|
return node.nodeName === "DIV" && /(?:^|\s)highlight-source-([^\s]+)/.test(node.getAttribute("class") ?? "");
|
|
52
61
|
},
|
|
53
62
|
replacement(_content, node, options) {
|
|
54
63
|
const language = /(?:^|\s)highlight-source-([^\s]+)/.exec(node.getAttribute("class") ?? "")?.[1] ?? "";
|
|
55
|
-
const text = descendantElements(node, "PRE")[0]?.textContent ?? "";
|
|
64
|
+
const text = descendantElements(node, "PRE", 1)[0]?.textContent ?? "";
|
|
56
65
|
return `\n\n${options.fence}${language}\n${text}\n${options.fence}\n\n`;
|
|
57
66
|
}
|
|
58
67
|
});
|
|
@@ -73,6 +82,7 @@ const strikethrough = (service) => {
|
|
|
73
82
|
/** Install GFM task-list checkbox conversion. */
|
|
74
83
|
const taskListItems = (service) => {
|
|
75
84
|
service.addRule("taskListItems", {
|
|
85
|
+
skipContent: true,
|
|
76
86
|
filter(node) {
|
|
77
87
|
return node.nodeName === "INPUT" && node.parentNode?.nodeName === "LI" && (node.getAttribute("type") ?? "").toLowerCase() === "checkbox";
|
|
78
88
|
},
|
|
@@ -84,6 +94,7 @@ const taskListItems = (service) => {
|
|
|
84
94
|
/** Install GFM table conversion for tables with a heading row. */
|
|
85
95
|
const tables = (service) => {
|
|
86
96
|
service.addRule("table", {
|
|
97
|
+
skipContent: true,
|
|
87
98
|
filter: isHeadingTable,
|
|
88
99
|
replacement(_content, node) {
|
|
89
100
|
return renderTable(service, node);
|
|
@@ -98,7 +109,7 @@ const gfm = (service) => {
|
|
|
98
109
|
taskListItems(service);
|
|
99
110
|
};
|
|
100
111
|
//#endregion
|
|
101
|
-
//#region node_modules/.pnpm/@oh-my-pi+pi-utils@18.
|
|
112
|
+
//#region node_modules/.pnpm/@oh-my-pi+pi-utils@18.12.6/node_modules/@oh-my-pi/pi-utils/src/turndown/html.ts
|
|
102
113
|
const VOID_ELEMENTS = {
|
|
103
114
|
AREA: true,
|
|
104
115
|
BASE: true,
|
|
@@ -151,8 +162,13 @@ function escapeAttribute(value) {
|
|
|
151
162
|
var HtmlNode = class {
|
|
152
163
|
parentNode = null;
|
|
153
164
|
childNodes = [];
|
|
165
|
+
/** Position in the parent's `childNodes`; assigned on append (the tree is immutable after parse). */
|
|
166
|
+
index = -1;
|
|
167
|
+
/** Position in the parent's `children`; -1 for non-element nodes. */
|
|
168
|
+
elementIndex = -1;
|
|
169
|
+
#elements = [];
|
|
154
170
|
get children() {
|
|
155
|
-
return this
|
|
171
|
+
return this.#elements;
|
|
156
172
|
}
|
|
157
173
|
get firstChild() {
|
|
158
174
|
return this.childNodes[0] ?? null;
|
|
@@ -161,17 +177,27 @@ var HtmlNode = class {
|
|
|
161
177
|
return this.childNodes[this.childNodes.length - 1] ?? null;
|
|
162
178
|
}
|
|
163
179
|
get previousSibling() {
|
|
164
|
-
if (!this.parentNode) return null;
|
|
165
|
-
|
|
166
|
-
return index > 0 ? this.parentNode.childNodes[index - 1] ?? null : null;
|
|
180
|
+
if (!this.parentNode || this.index <= 0) return null;
|
|
181
|
+
return this.parentNode.childNodes[this.index - 1] ?? null;
|
|
167
182
|
}
|
|
168
183
|
get nextSibling() {
|
|
169
184
|
if (!this.parentNode) return null;
|
|
170
|
-
|
|
171
|
-
return index >= 0 ? this.parentNode.childNodes[index + 1] ?? null : null;
|
|
185
|
+
return this.parentNode.childNodes[this.index + 1] ?? null;
|
|
172
186
|
}
|
|
173
187
|
get textContent() {
|
|
174
|
-
|
|
188
|
+
const parts = [];
|
|
189
|
+
const stack = [];
|
|
190
|
+
for (let index = this.childNodes.length - 1; index >= 0; index--) stack.push(this.childNodes[index]);
|
|
191
|
+
while (stack.length > 0) {
|
|
192
|
+
const node = stack.pop();
|
|
193
|
+
if (node instanceof HtmlText) {
|
|
194
|
+
parts.push(node.value);
|
|
195
|
+
continue;
|
|
196
|
+
}
|
|
197
|
+
const childNodes = node.childNodes;
|
|
198
|
+
for (let index = childNodes.length - 1; index >= 0; index--) stack.push(childNodes[index]);
|
|
199
|
+
}
|
|
200
|
+
return parts.join("");
|
|
175
201
|
}
|
|
176
202
|
getAttribute(_name) {
|
|
177
203
|
return null;
|
|
@@ -181,7 +207,12 @@ var HtmlNode = class {
|
|
|
181
207
|
}
|
|
182
208
|
append(child) {
|
|
183
209
|
child.parentNode = this;
|
|
210
|
+
child.index = this.childNodes.length;
|
|
184
211
|
this.childNodes.push(child);
|
|
212
|
+
if (child.nodeType === 1) {
|
|
213
|
+
child.elementIndex = this.#elements.length;
|
|
214
|
+
this.#elements.push(child);
|
|
215
|
+
}
|
|
185
216
|
}
|
|
186
217
|
};
|
|
187
218
|
var HtmlText = class extends HtmlNode {
|
|
@@ -317,7 +348,7 @@ function serializeNode(node) {
|
|
|
317
348
|
return Array.from(node.childNodes).map(serializeNode).join("");
|
|
318
349
|
}
|
|
319
350
|
//#endregion
|
|
320
|
-
//#region node_modules/.pnpm/@oh-my-pi+pi-utils@18.
|
|
351
|
+
//#region node_modules/.pnpm/@oh-my-pi+pi-utils@18.12.6/node_modules/@oh-my-pi/pi-utils/src/turndown/service.ts
|
|
321
352
|
const BLOCK_ELEMENTS = {
|
|
322
353
|
ADDRESS: true,
|
|
323
354
|
ARTICLE: true,
|
|
@@ -396,11 +427,30 @@ const DEFAULT_OPTIONS = {
|
|
|
396
427
|
linkReferenceStyle: "full",
|
|
397
428
|
preformattedCode: false
|
|
398
429
|
};
|
|
399
|
-
function
|
|
430
|
+
function normalizeFilter(filter) {
|
|
431
|
+
if (typeof filter === "function") return filter;
|
|
432
|
+
if (typeof filter === "string") return filter.toLowerCase();
|
|
433
|
+
return filter.map((tag) => tag.toLowerCase());
|
|
434
|
+
}
|
|
435
|
+
function matchesFilter(filter, node, name, options) {
|
|
400
436
|
if (typeof filter === "function") return filter(node, options);
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
437
|
+
if (typeof filter === "string") return name === filter;
|
|
438
|
+
return filter.includes(name);
|
|
439
|
+
}
|
|
440
|
+
/** Equivalent to `node.textContent.trim() !== ""` without building the subtree text. */
|
|
441
|
+
function hasNonWhitespaceText(node) {
|
|
442
|
+
const stack = [node];
|
|
443
|
+
while (stack.length > 0) {
|
|
444
|
+
const current = stack.pop();
|
|
445
|
+
const type = current.nodeType;
|
|
446
|
+
if (type === 3 || type === 4) {
|
|
447
|
+
if (/\S/.test(current.textContent ?? "")) return true;
|
|
448
|
+
} else if (type === 1 || type === 9 || type === 11) {
|
|
449
|
+
const childNodes = current.childNodes;
|
|
450
|
+
for (let index = 0; index < childNodes.length; index++) stack.push(childNodes[index]);
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
return false;
|
|
404
454
|
}
|
|
405
455
|
function contentWithFlankingWhitespace(content, delimiter) {
|
|
406
456
|
const leading = content.match(/^\s+/)?.[0] ?? "";
|
|
@@ -416,8 +466,8 @@ function listItemPrefix(node, options) {
|
|
|
416
466
|
const parent = node.parentNode;
|
|
417
467
|
if (parent?.nodeName !== "OL") return `${options.bulletListMarker} `;
|
|
418
468
|
const start = Number(parent.getAttribute("start") ?? "1");
|
|
419
|
-
const
|
|
420
|
-
return `${(Number.isFinite(start) ? start : 1) +
|
|
469
|
+
const index = node.elementIndex ?? Array.prototype.indexOf.call(parent.children, node);
|
|
470
|
+
return `${(Number.isFinite(start) ? start : 1) + index}. `;
|
|
421
471
|
}
|
|
422
472
|
function hasNonblankDescendant(node) {
|
|
423
473
|
for (const child of Array.from(node.children)) if (NONBLANK_EMPTY_ELEMENTS[child.nodeName] || hasNonblankDescendant(child)) return true;
|
|
@@ -443,18 +493,19 @@ var TurndownService = class {
|
|
|
443
493
|
if (previous >= 0) this.#rules.splice(previous, 1);
|
|
444
494
|
this.#rules.unshift({
|
|
445
495
|
key,
|
|
446
|
-
rule
|
|
496
|
+
rule,
|
|
497
|
+
filter: normalizeFilter(rule.filter)
|
|
447
498
|
});
|
|
448
499
|
return this;
|
|
449
500
|
}
|
|
450
501
|
/** Preserve matching elements as HTML when no custom rule handles them. */
|
|
451
502
|
keep(filter) {
|
|
452
|
-
this.#keepFilters.unshift(filter);
|
|
503
|
+
this.#keepFilters.unshift(normalizeFilter(filter));
|
|
453
504
|
return this;
|
|
454
505
|
}
|
|
455
506
|
/** Drop matching elements and all of their converted content. */
|
|
456
507
|
remove(filter) {
|
|
457
|
-
this.#removeFilters.unshift(filter);
|
|
508
|
+
this.#removeFilters.unshift(normalizeFilter(filter));
|
|
458
509
|
return this;
|
|
459
510
|
}
|
|
460
511
|
/** Install one plugin or an ordered list of plugins. */
|
|
@@ -496,16 +547,17 @@ var TurndownService = class {
|
|
|
496
547
|
return node.parentNode?.nodeName === "CODE" ? collapsed : this.escape(collapsed);
|
|
497
548
|
}
|
|
498
549
|
if (node.nodeType !== 1) return this.#convertChildren(node);
|
|
499
|
-
if (!(node
|
|
550
|
+
if (!hasNonWhitespaceText(node) && !NONBLANK_EMPTY_ELEMENTS[node.nodeName] && !hasNonblankDescendant(node)) return this.options.blankReplacement?.("", node, this.options) ?? (BLOCK_ELEMENTS[node.nodeName] ? "\n\n" : "");
|
|
551
|
+
const name = node.nodeName.toLowerCase();
|
|
552
|
+
const custom = this.#rules.find((entry) => matchesFilter(entry.filter, node, name, this.options));
|
|
500
553
|
const block = Boolean(BLOCK_ELEMENTS[node.nodeName]);
|
|
501
554
|
if (block) this.#previousSourceWhitespace = false;
|
|
502
|
-
const content = this.#convertChildren(node);
|
|
555
|
+
const content = custom?.rule.skipContent ? "" : this.#convertChildren(node);
|
|
503
556
|
if (block) this.#previousSourceWhitespace = false;
|
|
504
557
|
if (node.nodeName === "CODE") this.#previousSourceWhitespace = false;
|
|
505
|
-
const custom = this.#rules.find((entry) => matchesFilter(entry.rule.filter, node, this.options));
|
|
506
558
|
if (custom) return custom.rule.replacement(content, node, this.options);
|
|
507
|
-
if (this.#keepFilters.some((filter) => matchesFilter(filter, node, this.options))) return this.options.keepReplacement?.(content, node, this.options) ?? serializeNode(node);
|
|
508
|
-
if (this.#removeFilters.some((filter) => matchesFilter(filter, node, this.options))) return "";
|
|
559
|
+
if (this.#keepFilters.some((filter) => matchesFilter(filter, node, name, this.options))) return this.options.keepReplacement?.(content, node, this.options) ?? serializeNode(node);
|
|
560
|
+
if (this.#removeFilters.some((filter) => matchesFilter(filter, node, name, this.options))) return "";
|
|
509
561
|
return this.#defaultReplacement(content, node);
|
|
510
562
|
}
|
|
511
563
|
#defaultReplacement(content, node) {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* ast-edit / ast-grep / plan-mode-guard) import it directly.
|
|
24
24
|
*/
|
|
25
25
|
import { blockRangeAt, EditSession, EditStore, editAutoGeneratedMessage, editDescription, editDiffString, editGrammar, editInspect, hashlineCountOps, structuredPatchHunks } from "@oh-my-pi/pi-natives";
|
|
26
|
-
import type { BlockRange, BlockRangeOptions, EditApplyOutcome, EditApplyRequest, EditDiffResult, EditFileOpIntent, EditFileOutcome, EditFilePreview, EditInspection, EditMatcherEntry, EditPolicy, EditPreviewBatch,
|
|
26
|
+
import type { BlockRange, BlockRangeOptions, EditApplyOutcome, EditApplyRequest, EditDiffResult, EditFileOpIntent, EditFileOutcome, EditFilePreview, EditInspection, EditMatcherEntry, EditPolicy, EditPreviewBatch, EditWriteRequest, EditWriteResponse } from "@oh-my-pi/pi-natives";
|
|
27
27
|
import { buildCompactDiffPreview } from "./diff-preview.ts";
|
|
28
28
|
import type { CompactDiffOptions, CompactDiffPreview } from "./diff-preview.ts";
|
|
29
29
|
import { detectLineEnding, normalizeToLF, restoreLineEndings, stripBom } from "./normalize.ts";
|
|
@@ -106,4 +106,4 @@ export declare class MismatchError extends Error {
|
|
|
106
106
|
constructor(message: string);
|
|
107
107
|
}
|
|
108
108
|
export { blockRangeAt, buildCompactDiffPreview, detectLineEnding, EditStore, EditSession, editAutoGeneratedMessage, editDescription, editDiffString, editGrammar, editInspect, hashlineCountOps, normalizeToLF, restoreLineEndings, stripBom, structuredPatchHunks, };
|
|
109
|
-
export type { BlockRange, BlockRangeOptions, BomResult, CompactDiffOptions, CompactDiffPreview, EditApplyOutcome, EditApplyRequest, EditDiffResult, EditFileOpIntent, EditFileOutcome, EditFilePreview, EditInspection, EditMatcherEntry, EditPolicy, EditPreviewBatch,
|
|
109
|
+
export type { BlockRange, BlockRangeOptions, BomResult, CompactDiffOptions, CompactDiffPreview, EditApplyOutcome, EditApplyRequest, EditDiffResult, EditFileOpIntent, EditFileOutcome, EditFilePreview, EditInspection, EditMatcherEntry, EditPolicy, EditPreviewBatch, EditWriteRequest, EditWriteResponse, LineEnding, };
|
|
@@ -70,27 +70,25 @@ export declare function canonicalCwd(cwd: string): string;
|
|
|
70
70
|
* documents `enforcePlanModeWrite` as a deliberate
|
|
71
71
|
* no-op), and no DSH session installs
|
|
72
72
|
* `getPlanModeState`, so this resolves to `false`.
|
|
73
|
-
* - `
|
|
74
|
-
* `
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
* - `vaultRoots` — upstream `isVaultEnabled() ? cachedVaultRoots() : …`.
|
|
93
|
-
* DSH has no `vault://` protocol → `undefined`.
|
|
73
|
+
* - `maxColumns` — upstream `displayMaxColumns(settings)`: read's
|
|
74
|
+
* `tools.outputMaxColumns` bounded by
|
|
75
|
+
* `DEFAULT_MAX_COLUMN` (512), or 512 when read never
|
|
76
|
+
* cuts lines. DSH resolves the same setting through
|
|
77
|
+
* `resolveOutputMaxColumns`, so the mapping stays
|
|
78
|
+
* identical; the engine uses this cap to decide when a
|
|
79
|
+
* hashline anchor on a long line needs recorded read
|
|
80
|
+
* provenance.
|
|
81
|
+
* - `urlSchemes` / `urlAliasSchemes` — upstream lists the internal-URL
|
|
82
|
+
* router specs (and the schemes whose `scheme:/x`
|
|
83
|
+
* spelling aliases `scheme://x`). DSH wires no
|
|
84
|
+
* internal-URL router into the edit path and installs
|
|
85
|
+
* no `resolveUrl` callback, so both stay empty: the
|
|
86
|
+
* engine only ever sees plain paths here.
|
|
87
|
+
* - `planWritableRoots` — upstream `router.sandboxRoots(context)`: plain-path
|
|
88
|
+
* roots writable while plan mode is active. DSH's
|
|
89
|
+
* plan mode is a hint layer with no sandbox roots, so
|
|
90
|
+
* this stays empty while `planActive` still carries
|
|
91
|
+
* the hint.
|
|
94
92
|
* - `homeDir` — `os.homedir()` (upstream :571); the engine uses it
|
|
95
93
|
* to recognise and refuse home-directory escapes.
|
|
96
94
|
* - `rawInput` — see {@link HashlinePolicyOptions.rawInput}.
|
|
@@ -120,7 +120,7 @@ export declare class AgentStorage {
|
|
|
120
120
|
* @param credentials - New credentials to store
|
|
121
121
|
* @returns Array of newly stored credentials with their database IDs
|
|
122
122
|
*/
|
|
123
|
-
|
|
123
|
+
replaceAuthCredentials(provider: string, credentials: AuthCredential[]): Promise<StoredAuthCredential[]>;
|
|
124
124
|
/**
|
|
125
125
|
* Updates an existing auth credential by ID.
|
|
126
126
|
* @param id - Database row ID of the credential to update
|
|
@@ -132,13 +132,13 @@ export declare class AgentStorage {
|
|
|
132
132
|
* @param id - Database row ID of the credential to disable
|
|
133
133
|
* @param disabledCause - Human-readable cause stored with the disabled row
|
|
134
134
|
*/
|
|
135
|
-
deleteAuthCredential(id: number, disabledCause: string):
|
|
135
|
+
deleteAuthCredential(id: number, disabledCause: string): Promise<boolean>;
|
|
136
136
|
/**
|
|
137
137
|
* Disables all auth credentials for a provider with a persisted cause.
|
|
138
138
|
* @param provider - Provider name whose credentials should be disabled
|
|
139
139
|
* @param disabledCause - Human-readable cause stored with the disabled rows
|
|
140
140
|
*/
|
|
141
|
-
|
|
141
|
+
deleteAuthCredentials(provider: string, disabledCause: string): Promise<void>;
|
|
142
142
|
/**
|
|
143
143
|
* Gets a cached value by key. Returns null if not found or expired.
|
|
144
144
|
*/
|
|
@@ -5,6 +5,11 @@ export declare const YAML: {
|
|
|
5
5
|
parse: (s: string) => unknown;
|
|
6
6
|
stringify: (v: unknown) => string;
|
|
7
7
|
};
|
|
8
|
+
/** Bun.JSONC (pi-tui keybindings) — json5 is a tolerant superset of JSONC. */
|
|
9
|
+
export declare const JSONC: {
|
|
10
|
+
parse: (s: string) => unknown;
|
|
11
|
+
stringify: (v: unknown) => string;
|
|
12
|
+
};
|
|
8
13
|
/** Bun build plugin hook (pi-utils module-timer) — inert under Node. */
|
|
9
14
|
export declare function plugin(): void;
|
|
10
15
|
/** Minimal Bun-shell result (pi-ai perplexity OAuth; never reached on non-macOS). */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { installBunShim as __installBunShim } from "./bun-shim.mjs";
|
|
2
2
|
__installBunShim();
|
|
3
|
-
import {
|
|
3
|
+
import { u as combineSignals } from "./src-BhinCSpi.mjs";
|
|
4
4
|
import { t as ToolAbortError } from "./tool-errors-DoyxivAR.mjs";
|
|
5
5
|
import { scheduler } from "node:timers/promises";
|
|
6
6
|
//#region src/tools/omp/web/scrapers/types.ts
|
|
@@ -176,7 +176,7 @@ function getTurndown() {
|
|
|
176
176
|
return turndownPromise;
|
|
177
177
|
}
|
|
178
178
|
async function initTurndown() {
|
|
179
|
-
const { createTurndown } = await import("./turndown-
|
|
179
|
+
const { createTurndown } = await import("./turndown-Vya8SavL.mjs").then((n) => n.r);
|
|
180
180
|
return createTurndown();
|
|
181
181
|
}
|
|
182
182
|
/**
|