@xiaoso/dsh-tool-plus 0.1.0-beta.5 → 0.1.0-beta.6

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.
Files changed (71) hide show
  1. package/README.en.md +1 -1
  2. package/README.md +2 -2
  3. package/THIRD_PARTY_NOTICES.md +42 -42
  4. package/lib/{abort-dIkZBV7Q.mjs → abort-CsjZitYv.mjs} +1 -1
  5. package/lib/{amazon-bedrock-WQhvjHYu.mjs → amazon-bedrock-CfNIDi5k.mjs} +7 -7
  6. package/lib/{anthropic-CJCauvYz.mjs → anthropic-BVfZdnMp.mjs} +12 -12
  7. package/lib/{anthropic-tTntD8BD.mjs → anthropic-DGXmmg43.mjs} +2 -2
  8. package/lib/{api-key-login-BzqNdM2y.mjs → api-key-login-BikQAfD-.mjs} +1 -1
  9. package/lib/{aws-credentials-CXryMobh.mjs → aws-credentials-DrssNMn_.mjs} +4 -4
  10. package/lib/{azure-openai-responses-DuukbD0F.mjs → azure-openai-responses-C-5q-5K2.mjs} +8 -8
  11. package/lib/browser-render-z6b8Ljo9.mjs +183 -0
  12. package/lib/{bundled-references-Cavaffah.mjs → bundled-references-D71z7_T3.mjs} +2 -2
  13. package/lib/{callback-server-CQ5Jo8F-.mjs → callback-server-Di6C4RqI.mjs} +1 -1
  14. package/lib/client.js +327 -4
  15. package/lib/{cursor-B6TUEmgP.mjs → cursor-CQQtygwl.mjs} +1 -1
  16. package/lib/{cursor-DkSX2h3H.mjs → cursor-DXJxwdcg.mjs} +7 -7
  17. package/lib/{cursor-aJrXeYCb.mjs → cursor-Hr5Zw1gt.mjs} +3 -3
  18. package/lib/{device-code-DBo3B5nh.mjs → device-code-wZUbgPdB.mjs} +1 -1
  19. package/lib/{devin-BHZZyMhO.mjs → devin-CF6UhCFw.mjs} +2 -2
  20. package/lib/{devin-BK7DHeca.mjs → devin-DXJoDlW2.mjs} +1 -1
  21. package/lib/{devin-vNZTNUON.mjs → devin-P37gURs_.mjs} +5 -5
  22. package/lib/{dom-DGdYAVTv.mjs → dom-CawWi8fa.mjs} +14 -1
  23. package/lib/{error-Dd8DIqs-.mjs → error-DoHuatWw.mjs} +1 -1
  24. package/lib/{event-stream-BbFZJy-z.mjs → event-stream-C-FmBYUt.mjs} +1 -1
  25. package/lib/{github-copilot-CYkjeTi3.mjs → github-copilot-C2dTonBX.mjs} +3 -3
  26. package/lib/{github-copilot-B1yiyVRh.mjs → github-copilot-qETlj_bD.mjs} +1 -1
  27. package/lib/{gitlab-duo-CM7Ref1H.mjs → gitlab-duo-FQZiFRQe.mjs} +3 -3
  28. package/lib/{gitlab-duo-workflow-BGAF6JDw.mjs → gitlab-duo-workflow-DLTabzOy.mjs} +2 -2
  29. package/lib/{google-BS4T25Pn.mjs → google-BilwFSzx.mjs} +3 -3
  30. package/lib/{google-antigravity-DGmwC2KV.mjs → google-antigravity-BfBiINdu.mjs} +2 -2
  31. package/lib/{google-auth-B6gjsZvg.mjs → google-auth-CWlKXJ-H.mjs} +3 -3
  32. package/lib/{google-gemini-cli-Dsztq0N5.mjs → google-gemini-cli-CB89ljNz.mjs} +3 -3
  33. package/lib/{google-gemini-cli-Cqds_Q5T.mjs → google-gemini-cli-CygFcR6N.mjs} +8 -8
  34. package/lib/{google-oauth-shared-CuEHaDDj.mjs → google-oauth-shared-Cn82h1o2.mjs} +2 -2
  35. package/lib/{google-shared-Dr-VG-ap.mjs → google-shared-CF1JrqTM.mjs} +6 -6
  36. package/lib/{google-vertex-BDN2tLaD.mjs → google-vertex-DgMhhFw8.mjs} +5 -5
  37. package/lib/{identity-Da1GPU9a.mjs → identity-C0SPVyIZ.mjs} +1 -1
  38. package/lib/{idle-iterator-DUjKQEGT.mjs → idle-iterator-HzbbfXP4.mjs} +2 -2
  39. package/lib/index.mjs +310 -29
  40. package/lib/{kimi-Dh0pv3WZ.mjs → kimi-DHDO6Fde.mjs} +3 -3
  41. package/lib/launch-DwpE70Pv.mjs +148 -0
  42. package/lib/{markit-BL3cH47U.mjs → markit-B9exZ0ZV.mjs} +1 -1
  43. package/lib/{minimax-code-Uq8Qu9LW.mjs → minimax-code-vAhEXhev.mjs} +1 -1
  44. package/lib/{models-SGASygJ3.mjs → models-Cp3PzU3l.mjs} +1 -1
  45. package/lib/{ollama-DPzBmq89.mjs → ollama-TrkXTNqE.mjs} +8 -8
  46. package/lib/{openai-codex-Ch8CkT3p.mjs → openai-codex-CrjHtSH4.mjs} +3 -3
  47. package/lib/{openai-codex-responses-pejZgdZo.mjs → openai-codex-responses-C4uMpWNy.mjs} +10 -10
  48. package/lib/{openai-completions-DIf361kF.mjs → openai-completions-1ydXm5vF.mjs} +13 -13
  49. package/lib/{openai-reasoning-fallback-Nj6yB2rY.mjs → openai-reasoning-fallback-CigKCyzc.mjs} +2 -2
  50. package/lib/{openai-responses-Db_a-U4-.mjs → openai-responses-CN79gRGQ.mjs} +10 -10
  51. package/lib/{opencode-Rq_Q2vAO.mjs → opencode-CEGlimzL.mjs} +1 -1
  52. package/lib/{perplexity-C4iLVMUj.mjs → perplexity-BLJN-8dM.mjs} +2 -2
  53. package/lib/{proxy-pM_NIv-H.mjs → proxy-XOYi58TM.mjs} +1 -1
  54. package/lib/readability-Cpm-ocau.mjs +455 -0
  55. package/lib/{scrapers-1FTlHNQV.mjs → scrapers-BlWQMGjU.mjs} +11 -10
  56. package/lib/{src-BgpusnsB.mjs → src-D_e1qMwi.mjs} +5 -1
  57. package/lib/{stream-CRtexYLe.mjs → stream-DveNFWSN.mjs} +56 -56
  58. package/lib/{stream-markup-healing-KMkiAA00.mjs → stream-markup-healing-C9eC7Gf8.mjs} +3 -3
  59. package/lib/tool-errors-DoyxivAR.mjs +47 -0
  60. package/lib/types-BUO0JXO-.mjs +251 -0
  61. package/lib/{utils-D2YknRk4.mjs → utils-B-mTYQBc.mjs} +1 -1
  62. package/lib/{utils-C616y7eF.mjs → utils-D1QPFbRk.mjs} +28 -268
  63. package/lib/{utils-Cp76gCyk.mjs → utils-fnV2zzp3.mjs} +3 -3
  64. package/lib/{vision-guard-01qSwFpf.mjs → vision-guard-BsvOWmfB.mjs} +2 -2
  65. package/lib/{wafer-CgtPHerf.mjs → wafer-Dpy7tL3l.mjs} +1 -1
  66. package/lib/{xai-oauth-Buk8XVvM.mjs → xai-oauth-BkPNQS-q.mjs} +2 -2
  67. package/lib/{xiaomi-D2qT5cAC.mjs → xiaomi-CG3TsYRz.mjs} +1 -1
  68. package/lib/{zai-C59YnomG.mjs → zai--cewobzN.mjs} +2 -2
  69. package/lib/{zip-Cg9ANN_U.mjs → zip-CqKW2-TK.mjs} +3 -46
  70. package/package.json +147 -145
  71. package/presets/package.json +1 -1
package/lib/client.js CHANGED
@@ -7,6 +7,7 @@ window.__ModuleLoader__.load({
7
7
  let react = require("react");
8
8
  let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
9
9
  let react_jsx_runtime = require("react/jsx-runtime");
10
+ let _deepseek_ai_dsh_client_connection_client = require("@deepseek-ai/dsh-client-connection/client");
10
11
  //#region src/config/fields.ts
11
12
  /** Field group ids -> locale key of the group heading. */
12
13
  const TOOL_PLUS_GROUP_LABELS = {
@@ -442,6 +443,64 @@ window.__ModuleLoader__.load({
442
443
  tool: "read",
443
444
  visibility: { requiresEnabled: "fetchEnabled" }
444
445
  },
446
+ {
447
+ name: "fetchReader",
448
+ kind: "select",
449
+ default: "auto",
450
+ labelKey: "fetchReader",
451
+ hintKey: "fetchReaderHint",
452
+ group: "fetch",
453
+ tool: "read",
454
+ options: [
455
+ {
456
+ value: "auto",
457
+ labelKey: "optReaderAuto"
458
+ },
459
+ {
460
+ value: "native",
461
+ labelKey: "optReaderNative"
462
+ },
463
+ {
464
+ value: "trafilatura",
465
+ labelKey: "optReaderTrafilatura"
466
+ },
467
+ {
468
+ value: "lynx",
469
+ labelKey: "optReaderLynx"
470
+ },
471
+ {
472
+ value: "parallel",
473
+ labelKey: "optReaderParallel"
474
+ },
475
+ {
476
+ value: "jina",
477
+ labelKey: "optReaderJina"
478
+ },
479
+ {
480
+ value: "browser",
481
+ labelKey: "optReaderBrowser"
482
+ }
483
+ ]
484
+ },
485
+ {
486
+ name: "browserReaderEnabled",
487
+ kind: "boolean",
488
+ default: true,
489
+ labelKey: "browserReaderEnabled",
490
+ hintKey: "browserReaderEnabledHint",
491
+ group: "fetch",
492
+ tool: "read"
493
+ },
494
+ {
495
+ name: "browserProbe",
496
+ kind: "action",
497
+ default: "",
498
+ labelKey: "browserProbe",
499
+ hintKey: "browserProbeHint",
500
+ group: "fetch",
501
+ tool: "read",
502
+ actionKey: "browser/detect"
503
+ },
445
504
  {
446
505
  name: "imagesBlockImages",
447
506
  kind: "boolean",
@@ -703,6 +762,19 @@ window.__ModuleLoader__.load({
703
762
  .tp-switch input:focus-visible+.tp-switchTrack{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}
704
763
  .tp-thumb{position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:999px;background:var(--dsw-alias-bg-layer-3);transition:transform .16s;pointer-events:none}
705
764
  .tp-switch input:checked~.tp-thumb{transform:translateX(16px)}
765
+ .tp-actionField{display:flex;flex-direction:column;gap:8px;padding:12px 0;border-bottom:1px solid var(--dsw-alias-border-l2)}
766
+ .tp-actionField:last-child{border-bottom:none}
767
+ .tp-actionHead{display:flex;align-items:center;gap:12px}
768
+ .tp-actionInfo{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
769
+ .tp-actionTitle{font-size:14px;font-weight:400;line-height:22px;color:var(--dsw-alias-label-primary)}
770
+ .tp-actionDesc{font-size:12px;font-weight:400;line-height:18px;color:var(--dsw-alias-label-tertiary)}
771
+ .tp-actionButton{appearance:none;flex:none;border:1px solid var(--dsw-alias-border-l2);border-radius:8px;background:var(--dsw-alias-bg-layer-3);padding:5px 14px;font:inherit;font-size:13px;line-height:1.5;color:var(--dsw-alias-label-primary);cursor:pointer;transition:background .14s}
772
+ .tp-actionButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}
773
+ .tp-actionButton:disabled{opacity:.55;cursor:default}
774
+ .tp-actionButton:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}
775
+ .tp-actionResult{margin:0;font-size:12px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}
776
+ .tp-actionResult[data-state="ok"]{color:var(--dsw-alias-label-secondary)}
777
+ .tp-actionResult[data-state="error"]{color:var(--dsw-alias-label-error)}
706
778
  @media (prefers-reduced-motion: reduce){
707
779
  .tp-switch,.tp-switchTrack,.tp-thumb,.tp-selectTrigger,.tp-selectChevron{transition:none}
708
780
  }
@@ -873,6 +945,42 @@ window.__ModuleLoader__.load({
873
945
  ]
874
946
  });
875
947
  }
948
+ /**
949
+ * Action row: Title + desc stacked on left, a button on the right that calls
950
+ * the host RPC endpoint named by `control.actionKey` (via the Connection
951
+ * channel; the caller owns the RPC). The result line renders below, colored
952
+ * by outcome (`ok` / `error`).
953
+ */
954
+ function ActionRow(props) {
955
+ const { t, control, disabled, running, result, onRun } = props;
956
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
957
+ className: "tp-actionField",
958
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
959
+ className: "tp-actionHead",
960
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
961
+ className: "tp-actionInfo",
962
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
963
+ className: "tp-actionTitle",
964
+ children: t(control.labelKey)
965
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
966
+ className: "tp-actionDesc",
967
+ children: t(control.hintKey)
968
+ })]
969
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
970
+ type: "button",
971
+ className: "tp-actionButton",
972
+ disabled: disabled || running,
973
+ onClick: () => onRun(control.actionKey),
974
+ children: running ? t("browserProbeRunning") : t(control.labelKey)
975
+ })]
976
+ }), result !== null ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
977
+ className: "tp-actionResult",
978
+ role: "status",
979
+ "data-state": result.ok ? "ok" : "error",
980
+ children: result.text
981
+ }) : null]
982
+ });
983
+ }
876
984
  //#endregion
877
985
  //#region src/client/BashPlusCard.tsx
878
986
  /**
@@ -1473,6 +1581,113 @@ window.__ModuleLoader__.load({
1473
1581
  });
1474
1582
  }
1475
1583
  //#endregion
1584
+ //#region src/tools/shared/browser-rpc-channel.ts
1585
+ /**
1586
+ * Shared RPC channel constants for the browser-detection round trip between
1587
+ * the settings panel (client half) and the host. Both halves import this
1588
+ * module so the channel/endpoint never drift.
1589
+ *
1590
+ * The channel rides the official `@deepseek-ai/dsh-client-connection` generic
1591
+ * RPC transport (host registers with `ctx.connection.rpc.handle`; the client
1592
+ * calls via `createWebConnectionRpc().call`). Channel names must match
1593
+ * `/^\/[A-Za-z0-9._~-]+$/` and `/api` is reserved — `/tool-plus` is ours.
1594
+ * @module @xiaoso/dsh-tool-plus/browser-rpc-channel
1595
+ */
1596
+ /** Logical RPC channel registered by the host half of this plugin. */
1597
+ const TOOL_PLUS_RPC_CHANNEL = "/tool-plus";
1598
+ //#endregion
1599
+ //#region src/client/web-connection-rpc.ts
1600
+ /**
1601
+ * Browser caller for the plugin's Connection RPC channel.
1602
+ *
1603
+ * The official `@deepseek-ai/dsh-client-connection/client` package ships the
1604
+ * protocol primitives as types (`RpcFetch`, `ClientConnectionRpc`, `RpcResult`)
1605
+ * and the `RpcId` brand, but its published `createWebConnectionRpc` factory is
1606
+ * internal to the bundle — not re-exported. This module re-implements that
1607
+ * factory against the same public wire contract (docs/api-gateway.md, the
1608
+ * client `rpc.ts` source): a `POST {origin}/{channel}/{endpoint}` with a
1609
+ * `client-request` JSON envelope, answered by a `server-response` envelope
1610
+ * echoing the rpcId. Host-side registration uses the official
1611
+ * `ctx.connection.rpc.handle` — this file only mirrors the caller half.
1612
+ * @module @xiaoso/dsh-tool-plus/client/web-connection-rpc
1613
+ */
1614
+ const INTERNAL_BASE = "http://dsh.internal";
1615
+ const CHANNEL_PATTERN = /^\/[A-Za-z0-9._~-]+$/;
1616
+ const ENDPOINT_SEGMENT_PATTERN = /^[A-Za-z0-9_$.-]+$/;
1617
+ function randomUuid() {
1618
+ const g = globalThis;
1619
+ if (g.crypto?.randomUUID !== void 0) return g.crypto.randomUUID();
1620
+ return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => {
1621
+ const r = Math.random() * 16 | 0;
1622
+ return (c === "x" ? r : r & 3 | 8).toString(16);
1623
+ });
1624
+ }
1625
+ function isRecord(value) {
1626
+ return typeof value === "object" && value !== null && !Array.isArray(value);
1627
+ }
1628
+ function parseConnectionResponse(value) {
1629
+ if (!isRecord(value) || value.type !== "server-response" || typeof value.rpcId !== "string") throw new TypeError("connection: invalid server-response envelope");
1630
+ const result = value.result;
1631
+ if (!isRecord(result)) throw new TypeError("connection: invalid server-response result");
1632
+ if (result.ok === true) return {
1633
+ rpcId: value.rpcId,
1634
+ result: {
1635
+ ok: true,
1636
+ value: result.value
1637
+ }
1638
+ };
1639
+ if (result.ok !== false || !isRecord(result.error)) throw new TypeError("connection: invalid server-response result");
1640
+ const error = result.error;
1641
+ if (typeof error.code !== "string" || typeof error.message !== "string" || !isRecord(error.details)) throw new TypeError("connection: invalid server-response failure");
1642
+ return {
1643
+ rpcId: value.rpcId,
1644
+ result: {
1645
+ ok: false,
1646
+ error: {
1647
+ code: error.code,
1648
+ message: error.message,
1649
+ details: error.details
1650
+ }
1651
+ }
1652
+ };
1653
+ }
1654
+ function resolveBase() {
1655
+ const location = globalThis.location;
1656
+ return location?.origin !== void 0 && location.origin !== "null" ? location.origin : INTERNAL_BASE;
1657
+ }
1658
+ function assertTarget(channel, endpoint) {
1659
+ const segments = endpoint.split("/");
1660
+ if (!CHANNEL_PATTERN.test(channel) || segments.some((segment) => segment === "" || segment === "." || segment === ".." || !ENDPOINT_SEGMENT_PATTERN.test(segment))) throw new Error(`connection: invalid RPC target ${JSON.stringify(`${channel}/${endpoint}`)}`);
1661
+ }
1662
+ /**
1663
+ * Create the browser-backed generic RPC caller for the plugin's channel
1664
+ * (the `/tool-plus` host registration). Wire-compatible with the official
1665
+ * ClientConnectionRpc contract; only the transport override differs.
1666
+ * @param doFetch - transport override; defaults to the page's global fetch.
1667
+ */
1668
+ function createWebConnectionRpc(doFetch) {
1669
+ const send = doFetch ?? ((input, init) => globalThis.fetch(input, init));
1670
+ return { async call(channel, endpoint, payload, signal) {
1671
+ assertTarget(channel, endpoint);
1672
+ const rpcId = (0, _deepseek_ai_dsh_client_connection_client.RpcId)(randomUuid());
1673
+ const response = await send(new URL(`${channel}/${endpoint}`, resolveBase()), {
1674
+ method: "POST",
1675
+ headers: { "content-type": "application/json" },
1676
+ body: JSON.stringify({
1677
+ type: "client-request",
1678
+ rpcId,
1679
+ method: endpoint,
1680
+ payload
1681
+ }),
1682
+ ...signal === void 0 ? {} : { signal }
1683
+ });
1684
+ if (!response.ok) throw new Error(`transport failure for ${channel}/${endpoint}: HTTP ${response.status}`);
1685
+ const full = parseConnectionResponse(await response.json());
1686
+ if (full.rpcId !== rpcId) throw new Error(`rpcId mismatch for ${endpoint}: sent ${rpcId}, got ${full.rpcId}`);
1687
+ return full.result;
1688
+ } };
1689
+ }
1690
+ //#endregion
1476
1691
  //#region src/client/forms.ts
1477
1692
  /**
1478
1693
  * Generic staged-form model over the plugin's flat settings namespace,
@@ -1643,7 +1858,7 @@ window.__ModuleLoader__.load({
1643
1858
  }
1644
1859
  if (field.kind === "number") group.numbers.push(renderNumber(field, numbers, value, snap, defaults));
1645
1860
  else if (field.kind === "select") group.selects.push(renderSelect(field, selects, value, snap, defaults));
1646
- else group.toggles.push(renderToggle(field, toggles, value, snap, defaults));
1861
+ else if (field.kind === "boolean") group.toggles.push(renderToggle(field, toggles, value, snap, defaults));
1647
1862
  }
1648
1863
  return order.map((key) => map.get(key));
1649
1864
  }, [
@@ -1780,6 +1995,10 @@ window.__ModuleLoader__.load({
1780
1995
  * without keeping hidden panels mounted — the same flat schema the Bash card
1781
1996
  * edits, from the same single-source field table.
1782
1997
  *
1998
+ * `action`-kind fields (e.g. 探测浏览器) are not part of the staged form:
1999
+ * they run a host RPC endpoint over the official Connection channel
2000
+ * (`/tool-plus`), with per-field running/result state kept at the page level.
2001
+ *
1783
2002
  * Tab chrome mirrors the official Plugins settings section
1784
2003
  * (ui-settings-plugins): `role="tablist"` + tab/panel roles, aria wiring,
1785
2004
  * and arrow/Home/End keyboard roaming.
@@ -1853,10 +2072,11 @@ window.__ModuleLoader__.load({
1853
2072
  * Render one tool tab's panel content: fields in table order (master
1854
2073
  * switches first, per their declaration order), grouped under their group
1855
2074
  * heading, or the no-config placeholder for tools without global settings.
1856
- * Fields whose visibility condition is unmet are omitted.
2075
+ * Fields whose visibility condition is unmet are omitted. `action` fields
2076
+ * render their own button row (host RPC via the caller's `run`).
1857
2077
  */
1858
2078
  function ToolTabPanel(props) {
1859
- const { tab, t, form, writable, openSelect, onOpenChange } = props;
2079
+ const { tab, t, form, writable, openSelect, onOpenChange, actionState, actionResults, runAction } = props;
1860
2080
  if (tab.fields.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1861
2081
  className: "tps-empty",
1862
2082
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
@@ -1905,6 +2125,22 @@ window.__ModuleLoader__.load({
1905
2125
  className: "tps-groupTitle",
1906
2126
  children: t(TOOL_PLUS_GROUP_LABELS[group.group] ?? "title")
1907
2127
  }), group.fields.map((field) => {
2128
+ if (field.kind === "action") {
2129
+ const actionControl = {
2130
+ field: field.name,
2131
+ labelKey: field.labelKey,
2132
+ hintKey: field.hintKey,
2133
+ actionKey: field.actionKey ?? ""
2134
+ };
2135
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ActionRow, {
2136
+ t,
2137
+ control: actionControl,
2138
+ disabled: !writable,
2139
+ running: actionState[field.name] === "running",
2140
+ result: actionResults[field.name] ?? null,
2141
+ onRun: (_actionKey) => runAction(field)
2142
+ }, field.name);
2143
+ }
1908
2144
  const entry = controlOf(field);
1909
2145
  if (entry === void 0) return null;
1910
2146
  if (entry.kind === "number") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(NumberRow, {
@@ -1941,6 +2177,56 @@ window.__ModuleLoader__.load({
1941
2177
  const tabRefs = (0, react.useRef)([]);
1942
2178
  const [activeId, setActiveId] = (0, react.useState)();
1943
2179
  const [openSelect, setOpenSelect] = (0, react.useState)(null);
2180
+ const [actionState, setActionState] = (0, react.useState)({});
2181
+ const [actionResults, setActionResults] = (0, react.useState)({});
2182
+ const runAction = (0, react.useCallback)((field) => {
2183
+ const actionKey = field.actionKey;
2184
+ if (!actionKey) return;
2185
+ setActionState((prev) => ({
2186
+ ...prev,
2187
+ [field.name]: "running"
2188
+ }));
2189
+ setActionResults((prev) => ({
2190
+ ...prev,
2191
+ [field.name]: null
2192
+ }));
2193
+ (async () => {
2194
+ try {
2195
+ const result = await createWebConnectionRpc().call(TOOL_PLUS_RPC_CHANNEL, actionKey, {});
2196
+ if (!result.ok) setActionResults((prev) => ({
2197
+ ...prev,
2198
+ [field.name]: {
2199
+ ok: false,
2200
+ text: result.error.message
2201
+ }
2202
+ }));
2203
+ else {
2204
+ const found = result.value?.found ?? [];
2205
+ const text = found.length === 0 ? t("browserProbeNone") : found.map((browser) => `${browser.name}: ${browser.path}`).join("\n");
2206
+ setActionResults((prev) => ({
2207
+ ...prev,
2208
+ [field.name]: {
2209
+ ok: found.length > 0,
2210
+ text
2211
+ }
2212
+ }));
2213
+ }
2214
+ } catch {
2215
+ setActionResults((prev) => ({
2216
+ ...prev,
2217
+ [field.name]: {
2218
+ ok: false,
2219
+ text: t("browserProbeUnavailable")
2220
+ }
2221
+ }));
2222
+ } finally {
2223
+ setActionState((prev) => ({
2224
+ ...prev,
2225
+ [field.name]: "done"
2226
+ }));
2227
+ }
2228
+ })();
2229
+ }, [t]);
1944
2230
  (0, react.useEffect)(() => {
1945
2231
  injectSectionCss();
1946
2232
  injectSettingsRowsCss();
@@ -2022,7 +2308,10 @@ window.__ModuleLoader__.load({
2022
2308
  form,
2023
2309
  writable,
2024
2310
  openSelect,
2025
- onOpenChange: setOpenSelect
2311
+ onOpenChange: setOpenSelect,
2312
+ actionState,
2313
+ actionResults,
2314
+ runAction
2026
2315
  })]
2027
2316
  }, row.id)),
2028
2317
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
@@ -2104,6 +2393,23 @@ window.__ModuleLoader__.load({
2104
2393
  fetchEnabledHint: "read 处理 http(s) URL(网页转 Markdown 供模型阅读)时是否启用抓取。",
2105
2394
  fetchMaxTimeoutSeconds: "抓取超时(秒)",
2106
2395
  fetchMaxTimeoutSecondsHint: "URL 抓取超时上限;0 表示使用默认的 30 秒。",
2396
+ fetchReader: "网页转 Markdown 后端",
2397
+ fetchReaderHint: "优先使用的网页正文提取后端;auto 按内置顺序依次尝试(含浏览器 JS 渲染)。设为具体后端时,该后端优先,其余按原顺序兜底。",
2398
+ browserReaderEnabled: "浏览器 JS 渲染",
2399
+ browserReaderEnabledHint: "启用本地无头浏览器渲染(SPA 页面需执行 JavaScript 才能出正文)。未安装可用浏览器时自动跳过,不影响其他后端。",
2400
+ browserProbe: "探测浏览器",
2401
+ browserProbeHint: "检测本机可用的浏览器(Edge / Chrome / Chromium),read 的浏览器渲染将使用第一个命中的。",
2402
+ browserProbeRunning: "探测中…",
2403
+ browserProbeNone: "未找到可用浏览器:URL 渲染将跳过浏览器后端。",
2404
+ browserProbeFailed: "探测失败:",
2405
+ browserProbeUnavailable: "探测不可用:当前部署未启用浏览器 RPC 通道。",
2406
+ optReaderAuto: "auto(自动)",
2407
+ optReaderNative: "native(内置转换)",
2408
+ optReaderTrafilatura: "trafilatura",
2409
+ optReaderLynx: "lynx",
2410
+ optReaderParallel: "Parallel Reader",
2411
+ optReaderJina: "Jina Reader",
2412
+ optReaderBrowser: "browser(浏览器渲染)",
2107
2413
  groupFetch: "抓取",
2108
2414
  groupImages: "图片",
2109
2415
  imagesAutoResize: "图片自动缩放",
@@ -2258,6 +2564,23 @@ window.__ModuleLoader__.load({
2258
2564
  fetchEnabledHint: "Whether fetching is enabled when read handles http(s) URLs.",
2259
2565
  fetchMaxTimeoutSeconds: "Fetch timeout (s)",
2260
2566
  fetchMaxTimeoutSecondsHint: "URL fetch timeout cap; 0 = default 30s.",
2567
+ fetchReader: "HTML-to-Markdown backend",
2568
+ fetchReaderHint: "Preferred reader backend for extracting page bodies; auto tries the built-in order (including browser JS rendering). A concrete backend goes first, the rest fall back in order.",
2569
+ browserReaderEnabled: "Browser JS rendering",
2570
+ browserReaderEnabledHint: "Render pages in a local headless browser (SPA pages need JavaScript to produce a body). Skipped automatically when no usable browser is installed.",
2571
+ browserProbe: "Probe browsers",
2572
+ browserProbeHint: "Detect usable browsers on this machine (Edge / Chrome / Chromium); read’s browser rendering uses the first hit.",
2573
+ browserProbeRunning: "Probing…",
2574
+ browserProbeNone: "No usable browser found: URL rendering will skip the browser backend.",
2575
+ browserProbeFailed: "Probe failed: ",
2576
+ browserProbeUnavailable: "Probing unavailable: this deployment does not enable the browser RPC channel.",
2577
+ optReaderAuto: "auto",
2578
+ optReaderNative: "native (built-in conversion)",
2579
+ optReaderTrafilatura: "trafilatura",
2580
+ optReaderLynx: "lynx",
2581
+ optReaderParallel: "Parallel Reader",
2582
+ optReaderJina: "Jina Reader",
2583
+ optReaderBrowser: "browser (JS rendering)",
2261
2584
  groupFetch: "Fetching",
2262
2585
  groupImages: "Images",
2263
2586
  imagesAutoResize: "Auto-resize images",
@@ -1,7 +1,7 @@
1
1
  import { installBunShim as __installBunShim } from "./bun-shim.mjs";
2
2
  __installBunShim();
3
3
  import { r as __exportAll } from "./fs-promises-shim-Bx0fpxuk.mjs";
4
- import { c as OAuthError } from "./error-Dd8DIqs-.mjs";
4
+ import { c as OAuthError } from "./error-DoHuatWw.mjs";
5
5
  import { t as generatePKCE } from "./pkce-BlQikGPu.mjs";
6
6
  //#region node_modules/.pnpm/@oh-my-pi+pi-ai@17.3.5/node_modules/@oh-my-pi/pi-ai/src/registry/oauth/cursor.ts
7
7
  var cursor_exports = /* @__PURE__ */ __exportAll({
@@ -1,14 +1,14 @@
1
1
  import { installBunShim as __installBunShim } from "./bun-shim.mjs";
2
2
  __installBunShim();
3
3
  import { n as fs_promises_shim_exports } from "./fs-promises-shim-Bx0fpxuk.mjs";
4
- import { P as $env, T as warn, _ as parseStreamingJsonThrottled, g as parseStreamingJson, h as parseJsonWithRepair } from "./src-BgpusnsB.mjs";
5
- import { g as MissingApiKeyError, l as finalize, r as ValidationError, s as ProviderResponseError, v as AbortError } from "./error-Dd8DIqs-.mjs";
6
- import { C as kStreamingPartialJson, S as kStreamingLastParseLen, _ as kCursorExecResolved, a as normalizeSystemPrompts, b as kStreamingBlockKind, h as clearStreamingPartialJson, k as toolWireSchema, x as kStreamingEnvelopeId, y as kStreamingBlockIndex } from "./utils-Cp76gCyk.mjs";
4
+ import { P as $env, T as warn, _ as parseStreamingJsonThrottled, g as parseStreamingJson, h as parseJsonWithRepair } from "./src-D_e1qMwi.mjs";
5
+ import { g as MissingApiKeyError, l as finalize, r as ValidationError, s as ProviderResponseError, v as AbortError } from "./error-DoHuatWw.mjs";
6
+ import { C as kStreamingPartialJson, S as kStreamingLastParseLen, _ as kCursorExecResolved, a as normalizeSystemPrompts, b as kStreamingBlockKind, h as clearStreamingPartialJson, k as toolWireSchema, x as kStreamingEnvelopeId, y as kStreamingBlockIndex } from "./utils-fnV2zzp3.mjs";
7
7
  import { t as sanitizeText } from "./sanitize-text-CfcXzw5X.mjs";
8
- import { a as shouldBypassProxy, n as getProxyForProvider, t as connectProxiedSocket } from "./proxy-pM_NIv-H.mjs";
9
- import { t as calculateCost, y as isKimiK3ModelId } from "./models-SGASygJ3.mjs";
10
- import "./identity-Da1GPU9a.mjs";
11
- import { t as AssistantMessageEventStream } from "./event-stream-BbFZJy-z.mjs";
8
+ import { a as shouldBypassProxy, n as getProxyForProvider, t as connectProxiedSocket } from "./proxy-XOYi58TM.mjs";
9
+ import { t as calculateCost, y as isKimiK3ModelId } from "./models-Cp3PzU3l.mjs";
10
+ import "./identity-C0SPVyIZ.mjs";
11
+ import { t as AssistantMessageEventStream } from "./event-stream-C-FmBYUt.mjs";
12
12
  import { n as isRequestDebugEnabled, t as createRequestDebugSession } from "./request-debug-HJMoJncL.mjs";
13
13
  import { A as isObject, B as scalarZeroValue, C as getTextEncoding, D as hasCustomJsonRepresentation, E as create, F as unsafeGet, H as ScalarType, I as unsafeIsSet, L as unsafeLocal, M as isReflectMap, N as isReflectMessage, O as isWrapper, P as unsafeClear, R as unsafeOneofCase, T as isFieldError, U as isMessage, V as protoInt64, _ as BinaryWriter, a as makeReadContext$1, c as messageDesc, d as base64Decode, f as base64Encode, g as BinaryReader, h as wktStructToReflect, i as fromBinary, j as isReflectList, k as isWrapperDesc, l as protoCamelCase, m as wktStructToLocal, n as writeField, o as readField, p as localMessageMapper, r as fileDesc, t as toBinary, u as protoSnakeCase, w as FieldError, z as unsafeSet } from "./to-binary-B1BEBIPC.mjs";
14
14
  import { $ as GrepUnionResultSchema, $t as PiWriteExecSuccessSchema, A as DiagnosticsSuccessSchema, An as ShellStreamStdoutSchema, At as PiBashExecErrorSchema, B as ForceBackgroundSubagentResultSchema, Bn as SubagentStopRequestResponseSchema, Bt as PiGrepExecErrorSchema, C as DeleteErrorSchema, Cn as ShellFailureSchema, Ct as McpToolCallSchema, D as DiagnosticsErrorSchema, Dn as ShellStreamSchema, Dt as McpToolResultContentItemSchema, E as DeleteSuccessSchema, En as ShellStreamExitSchema, Et as McpToolNotFoundSchema, F as ExecuteHookResponseSchema, Fn as SubagentAwaitNotFoundSchema, Ft as PiEditExecResultSchema, G as GrepContentResultSchema, Gn as WebFetchAllowlistPrecheckResultSchema, Gt as PiLsExecSuccessSchema, Hn as ToolCallSchema, Ht as PiGrepExecSuccessSchema, I as ExecuteHookResultSchema, In as SubagentAwaitResultSchema, It as PiEditExecSuccessSchema, J as GrepFileCountSchema, Jn as WriteResultSchema, Jt as PiReadExecSuccessSchema, K as GrepCountResultSchema, Kn as WriteErrorSchema, Kt as PiReadExecErrorSchema, L as FetchErrorSchema, Ln as SubagentErrorSchema, Lt as PiFindExecErrorSchema, M as ExecClientMessageSchema, Mn as SmartModeClassifierErrorSchema, Mt as PiBashExecSuccessSchema, N as ExecClientStreamCloseSchema, Nn as SmartModeClassifierResultSchema, Nt as PiEditExecErrorSchema, O as DiagnosticsRejectedSchema, On as ShellStreamStartSchema, Ot as McpToolResultSchema, P as ExecClientThrowSchema, Pn as StopRequestResponseSchema, Pt as PiEditExecRejectedSchema, Q as GrepSuccessSchema, Qt as PiWriteExecResultSchema, R as FetchResultSchema, Rn as SubagentResultSchema, Rt as PiFindExecResultSchema, S as ConversationTurnStructureSchema, Sn as ShellAllowlistPrecheckResultSchema, St as McpTextContentSchema, T as DeleteResultSchema, Tn as ShellResultSchema, Tt as McpToolErrorSchema, Un as UserMessageActionSchema, Ut as PiLsExecErrorSchema, V as GetBlobResultSchema, Vn as ThinkingMessageSchema, Vt as PiGrepExecResultSchema, W as GrepContentMatchSchema, Wn as UserMessageSchema, Wt as PiLsExecResultSchema, X as GrepFilesResultSchema, Xn as WriteShellStdinResultSchema, Xt as PiWriteExecErrorSchema, Y as GrepFileMatchSchema, Yn as WriteShellStdinErrorSchema, Yt as PiTruncationSchema, Z as GrepResultSchema, Zn as WriteSuccessSchema, Zt as PiWriteExecRejectedSchema, _ as ConversationActionSchema, _n as RequestedModelSchema, _t as McpResultSchema, a as AgentRunRequestSchema, an as ReadMcpResourceErrorSchema, at as LsDirectoryTreeNodeSchema, b as ConversationStateStructureSchema, bn as SelectedImageSchema, bt as McpStateSuccessSchema, c as AgentStoreConflictResultSchema, cn as ReadMcpResourceSuccessSchema, ct as LsRejectedSchema, d as BeforeSubmitPromptRequestResponseSchema, dn as ReadSuccessSchema, dt as McpAllowlistPrecheckResultSchema, en as PostToolUseFailureRequestResponseSchema, et as KvClientMessageSchema, f as CanvasDiagnosticsErrorSchema, fn as RecordScreenFailureSchema, ft as McpApprovedSchema, g as ComputerUseResultSchema, gn as RequestContextSuccessSchema, gt as McpRejectedSchema, h as ComputerUseErrorSchema, hn as RequestContextSchema, ht as McpImageContentSchema, i as AgentConversationTurnStructureSchema, in as ReadErrorSchema, it as ListMcpResourcesSuccessSchema, j as ExecClientControlMessageSchema, jn as ShellSuccessSchema, jt as PiBashExecResultSchema, k as DiagnosticsResultSchema, kn as ShellStreamStderrSchema, kt as ModelDetailsSchema, l as AssistantMessageSchema, ln as ReadRejectedSchema, lt as LsResultSchema, m as ClientHeartbeatSchema, mn as RequestContextResultSchema, mt as McpErrorSchema, n as AfterAgentThoughtRequestResponseSchema, nn as PreCompactRequestResponseSchema, nt as ListMcpResourcesExecResultSchema, o as AgentServerMessageSchema, on as ReadMcpResourceExecResultSchema, ot as LsDirectoryTreeNode_FileSchema, p as CanvasDiagnosticsResultSchema, pn as RecordScreenResultSchema, pt as McpArgsSchema, q as GrepErrorSchema, qn as WriteRejectedSchema, qt as PiReadExecResultSchema, r as AgentClientMessageSchema, rn as PreToolUseRequestResponseSchema, rt as ListMcpResourcesExecResult_McpResourceSchema, s as AgentStoreConflictErrorSchema, sn as ReadMcpResourceNotFoundSchema, st as LsErrorSchema, t as AfterAgentResponseRequestResponseSchema, tn as PostToolUseRequestResponseSchema, tt as ListMcpResourcesErrorSchema, u as BackgroundShellSpawnResultSchema, un as ReadResultSchema, ut as LsSuccessSchema, v as ConversationSearchErrorSchema, vn as ResumeActionSchema, vt as McpStateExecResultSchema, w as DeleteRejectedSchema, wn as ShellRejectedSchema, wt as McpToolDefinitionSchema, x as ConversationStepSchema, xn as SetBlobResultSchema, xt as McpSuccessSchema, y as ConversationSearchResultSchema, yn as SelectedContextSchema, yt as McpStateServerSchema, z as ForceBackgroundShellResultSchema, zn as SubagentStartRequestResponseSchema, zt as PiFindExecSuccessSchema } from "./agent_pb-Rizyt9Zg.mjs";
@@ -1,8 +1,8 @@
1
1
  import { installBunShim as __installBunShim } from "./bun-shim.mjs";
2
2
  __installBunShim();
3
- import { A as semverGte, D as bareModelId, O as parseGlmModel, r as getBundledModels, y as isKimiK3ModelId } from "./models-SGASygJ3.mjs";
4
- import "./identity-Da1GPU9a.mjs";
5
- import { r as toModelSpec } from "./bundled-references-Cavaffah.mjs";
3
+ import { A as semverGte, D as bareModelId, O as parseGlmModel, r as getBundledModels, y as isKimiK3ModelId } from "./models-Cp3PzU3l.mjs";
4
+ import "./identity-C0SPVyIZ.mjs";
5
+ import { r as toModelSpec } from "./bundled-references-D71z7_T3.mjs";
6
6
  import { E as create, i as fromBinary, t as toBinary } from "./to-binary-B1BEBIPC.mjs";
7
7
  import { H as GetUsableModelsRequestSchema, U as GetUsableModelsResponseSchema } from "./agent_pb-Rizyt9Zg.mjs";
8
8
  import { type } from "@oh-my-pi/omptype";
@@ -1,6 +1,6 @@
1
1
  import { installBunShim as __installBunShim } from "./bun-shim.mjs";
2
2
  __installBunShim();
3
- import { c as OAuthError, h as LoginCancelledError } from "./error-Dd8DIqs-.mjs";
3
+ import { c as OAuthError, h as LoginCancelledError } from "./error-DoHuatWw.mjs";
4
4
  //#region node_modules/.pnpm/@oh-my-pi+pi-ai@17.3.5/node_modules/@oh-my-pi/pi-ai/src/registry/oauth/device-code.ts
5
5
  const DEVICE_FLOW_CANCEL_MESSAGE = "Login cancelled";
6
6
  const DEVICE_FLOW_TIMEOUT_MESSAGE = "Device flow timed out";
@@ -1,7 +1,7 @@
1
1
  import { installBunShim as __installBunShim } from "./bun-shim.mjs";
2
2
  __installBunShim();
3
- import { c as OAuthError } from "./error-Dd8DIqs-.mjs";
4
- import { t as OAuthCallbackFlow } from "./callback-server-CQ5Jo8F-.mjs";
3
+ import { c as OAuthError } from "./error-DoHuatWw.mjs";
4
+ import { t as OAuthCallbackFlow } from "./callback-server-Di6C4RqI.mjs";
5
5
  import { t as generatePKCE } from "./pkce-BlQikGPu.mjs";
6
6
  //#region node_modules/.pnpm/@oh-my-pi+pi-ai@17.3.5/node_modules/@oh-my-pi/pi-ai/src/registry/oauth/devin.ts
7
7
  const DEVIN_WEBAPP_URL = "https://app.devin.ai";
@@ -1,6 +1,6 @@
1
1
  import { installBunShim as __installBunShim } from "./bun-shim.mjs";
2
2
  __installBunShim();
3
- import { n as discoveryFetch } from "./utils-D2YknRk4.mjs";
3
+ import { n as discoveryFetch } from "./utils-B-mTYQBc.mjs";
4
4
  import { E as create, i as fromBinary, t as toBinary } from "./to-binary-B1BEBIPC.mjs";
5
5
  import { f as MetadataSchema, i as GetCliModelConfigsResponseSchema, r as GetCliModelConfigsRequestSchema } from "./api_server_pb-CDZgLMta.mjs";
6
6
  import { gunzipSync } from "node:zlib";
@@ -1,10 +1,10 @@
1
1
  import { installBunShim as __installBunShim } from "./bun-shim.mjs";
2
2
  __installBunShim();
3
- import { C as error, S as debug, T as warn, _ as parseStreamingJsonThrottled, g as parseStreamingJson } from "./src-BgpusnsB.mjs";
4
- import { l as finalize, o as DevinApiError, r as ValidationError, s as ProviderResponseError, w as create, x as attach, y as Flag } from "./error-Dd8DIqs-.mjs";
5
- import { a as normalizeSystemPrompts, g as isDemotedThinking, k as toolWireSchema, m as transformMessages } from "./utils-Cp76gCyk.mjs";
6
- import { t as calculateCost } from "./models-SGASygJ3.mjs";
7
- import { t as AssistantMessageEventStream } from "./event-stream-BbFZJy-z.mjs";
3
+ import { C as error, S as debug, T as warn, _ as parseStreamingJsonThrottled, g as parseStreamingJson } from "./src-D_e1qMwi.mjs";
4
+ import { l as finalize, o as DevinApiError, r as ValidationError, s as ProviderResponseError, w as create, x as attach, y as Flag } from "./error-DoHuatWw.mjs";
5
+ import { a as normalizeSystemPrompts, g as isDemotedThinking, k as toolWireSchema, m as transformMessages } from "./utils-fnV2zzp3.mjs";
6
+ import { t as calculateCost } from "./models-Cp3PzU3l.mjs";
7
+ import { t as AssistantMessageEventStream } from "./event-stream-C-FmBYUt.mjs";
8
8
  import { E as create$1, c as messageDesc, i as fromBinary, r as fileDesc, t as toBinary } from "./to-binary-B1BEBIPC.mjs";
9
9
  import { a as ChatMessagePromptSchema, c as PromptCacheOptionsSchema, d as ImageDataSchema, f as MetadataSchema, l as ChatToolCallSchema, m as file_buf_validate_validate, n as GetChatMessageResponseSchema, o as ChatToolChoiceSchema, p as file_exa_codeium_common_pb_codeium_common, s as ChatToolDefinitionSchema, t as GetChatMessageRequestSchema, u as CompletionConfigurationSchema } from "./api_server_pb-CDZgLMta.mjs";
10
10
  import { t as deterministicUuid } from "./deterministic-id-D-yIV_eI.mjs";
@@ -592,6 +592,19 @@ function querySelectorAllFrom(root, selector, includeRoot) {
592
592
  else for (const child of root.childNodes) visit(child);
593
593
  return result;
594
594
  }
595
+ //#endregion
596
+ //#region node_modules/.pnpm/@oh-my-pi+pi-utils@17.3.5/node_modules/@oh-my-pi/pi-utils/src/dom/core.ts
597
+ /** Behavior-compatible reimplementation of linkedom's used surface. */
598
+ /** DOM node type constants. */
599
+ let NodeType = /* @__PURE__ */ function(NodeType) {
600
+ NodeType[NodeType["ELEMENT"] = 1] = "ELEMENT";
601
+ NodeType[NodeType["ATTRIBUTE"] = 2] = "ATTRIBUTE";
602
+ NodeType[NodeType["TEXT"] = 3] = "TEXT";
603
+ NodeType[NodeType["COMMENT"] = 8] = "COMMENT";
604
+ NodeType[NodeType["DOCUMENT"] = 9] = "DOCUMENT";
605
+ NodeType[NodeType["DOCUMENT_FRAGMENT"] = 11] = "DOCUMENT_FRAGMENT";
606
+ return NodeType;
607
+ }({});
595
608
  /** Minimal browser event implementation. */
596
609
  var Event = class {
597
610
  type;
@@ -1599,4 +1612,4 @@ function parseHTML(html) {
1599
1612
  return new DOMWindow(parseDocument(html));
1600
1613
  }
1601
1614
  //#endregion
1602
- export { parseHTML };
1615
+ export { Attr, CSSStyleDeclaration, Comment, CustomEvent, DOMTokenList, DOMWindow, Document, DocumentFragment, Element, Event, EventTarget, HTMLElement, HTMLIFrameElement, HTMLMetaElement, HTMLTemplateElement, NamedNodeMap, Node, NodeType, SVGElement, Text, parseHTML, serializeNode };
@@ -1,6 +1,6 @@
1
1
  import { installBunShim as __installBunShim } from "./bun-shim.mjs";
2
2
  __installBunShim();
3
- import { J as getLogsDir, R as isBunTestRuntime } from "./src-BgpusnsB.mjs";
3
+ import { J as getLogsDir, R as isBunTestRuntime } from "./src-D_e1qMwi.mjs";
4
4
  import * as path from "node:path";
5
5
  import { scheduler } from "node:timers/promises";
6
6
  //#region node_modules/.pnpm/@oh-my-pi+pi-utils@17.3.5/node_modules/@oh-my-pi/pi-utils/src/fetch-retry.ts
@@ -1,6 +1,6 @@
1
1
  import { installBunShim as __installBunShim } from "./bun-shim.mjs";
2
2
  __installBunShim();
3
- import { C as classifyMessage, s as ProviderResponseError } from "./error-Dd8DIqs-.mjs";
3
+ import { C as classifyMessage, s as ProviderResponseError } from "./error-DoHuatWw.mjs";
4
4
  //#region node_modules/.pnpm/@oh-my-pi+pi-ai@17.3.5/node_modules/@oh-my-pi/pi-ai/src/utils/event-stream.ts
5
5
  var EventStream = class {
6
6
  queue = [];
@@ -1,8 +1,8 @@
1
1
  import { installBunShim as __installBunShim } from "./bun-shim.mjs";
2
2
  __installBunShim();
3
- import { V as ProviderHttpError, c as OAuthError, h as LoginCancelledError } from "./error-Dd8DIqs-.mjs";
4
- import { r as getBundledModels } from "./models-SGASygJ3.mjs";
5
- import { a as getGitHubCopilotBaseUrl, c as normalizeDomain, i as discoverGitHubCopilotApiEndpoint, l as normalizeGitHubCopilotEnterpriseDomain, n as OPENCODE_HEADERS, s as isPublicGitHubHost, t as COPILOT_API_HEADERS } from "./github-copilot-B1yiyVRh.mjs";
3
+ import { V as ProviderHttpError, c as OAuthError, h as LoginCancelledError } from "./error-DoHuatWw.mjs";
4
+ import { r as getBundledModels } from "./models-Cp3PzU3l.mjs";
5
+ import { a as getGitHubCopilotBaseUrl, c as normalizeDomain, i as discoverGitHubCopilotApiEndpoint, l as normalizeGitHubCopilotEnterpriseDomain, n as OPENCODE_HEADERS, s as isPublicGitHubHost, t as COPILOT_API_HEADERS } from "./github-copilot-qETlj_bD.mjs";
6
6
  import { scheduler } from "node:timers/promises";
7
7
  //#region node_modules/.pnpm/@oh-my-pi+pi-ai@17.3.5/node_modules/@oh-my-pi/pi-ai/src/registry/oauth/github-copilot.ts
8
8
  /**
@@ -1,7 +1,7 @@
1
1
  import { installBunShim as __installBunShim } from "./bun-shim.mjs";
2
2
  __installBunShim();
3
3
  import { n as isRecord } from "./type-guards-B9VVjRDK.mjs";
4
- import "./utils-D2YknRk4.mjs";
4
+ import "./utils-B-mTYQBc.mjs";
5
5
  const OPENCODE_HEADERS = { "User-Agent": "opencode/1.3.15" };
6
6
  /**
7
7
  * Copilot API version sent on `api.githubcopilot.com` requests (`/models`,
@@ -1,8 +1,8 @@
1
1
  import { installBunShim as __installBunShim } from "./bun-shim.mjs";
2
2
  __installBunShim();
3
- import { c as OAuthError } from "./error-Dd8DIqs-.mjs";
4
- import { i as clearGitLabDuoDirectAccessCache } from "./stream-CRtexYLe.mjs";
5
- import { t as OAuthCallbackFlow } from "./callback-server-CQ5Jo8F-.mjs";
3
+ import { c as OAuthError } from "./error-DoHuatWw.mjs";
4
+ import { i as clearGitLabDuoDirectAccessCache } from "./stream-DveNFWSN.mjs";
5
+ import { t as OAuthCallbackFlow } from "./callback-server-Di6C4RqI.mjs";
6
6
  import { t as generatePKCE } from "./pkce-BlQikGPu.mjs";
7
7
  //#region node_modules/.pnpm/@oh-my-pi+pi-ai@17.3.5/node_modules/@oh-my-pi/pi-ai/src/registry/oauth/gitlab-duo.ts
8
8
  const GITLAB_COM_URL = "https://gitlab.com";
@@ -1,7 +1,7 @@
1
1
  import { installBunShim as __installBunShim } from "./bun-shim.mjs";
2
2
  __installBunShim();
3
- import { c as OAuthError } from "./error-Dd8DIqs-.mjs";
4
- import { t as OAuthCallbackFlow } from "./callback-server-CQ5Jo8F-.mjs";
3
+ import { c as OAuthError } from "./error-DoHuatWw.mjs";
4
+ import { t as OAuthCallbackFlow } from "./callback-server-Di6C4RqI.mjs";
5
5
  import { t as generatePKCE } from "./pkce-BlQikGPu.mjs";
6
6
  //#region node_modules/.pnpm/@oh-my-pi+pi-ai@17.3.5/node_modules/@oh-my-pi/pi-ai/src/registry/oauth/gitlab-duo-workflow.ts
7
7
  const GITLAB_COM_URL = "https://gitlab.com";
@@ -1,8 +1,8 @@
1
1
  import { installBunShim as __installBunShim } from "./bun-shim.mjs";
2
2
  __installBunShim();
3
- import { g as MissingApiKeyError } from "./error-Dd8DIqs-.mjs";
4
- import { n as getEnvApiKey } from "./stream-CRtexYLe.mjs";
5
- import { p as streamGoogleGenAI, t as buildGoogleGenerateContentParams } from "./google-shared-Dr-VG-ap.mjs";
3
+ import { g as MissingApiKeyError } from "./error-DoHuatWw.mjs";
4
+ import { n as getEnvApiKey } from "./stream-DveNFWSN.mjs";
5
+ import { p as streamGoogleGenAI, t as buildGoogleGenerateContentParams } from "./google-shared-CF1JrqTM.mjs";
6
6
  //#region node_modules/.pnpm/@oh-my-pi+pi-ai@17.3.5/node_modules/@oh-my-pi/pi-ai/src/providers/google.ts
7
7
  const DEFAULT_GENERATIVE_LANGUAGE_BASE = "https://generativelanguage.googleapis.com/v1beta";
8
8
  const streamGoogle = (model, context, options) => {
@@ -1,8 +1,8 @@
1
1
  import { installBunShim as __installBunShim } from "./bun-shim.mjs";
2
2
  __installBunShim();
3
- import { c as OAuthError, h as LoginCancelledError } from "./error-Dd8DIqs-.mjs";
3
+ import { c as OAuthError, h as LoginCancelledError } from "./error-DoHuatWw.mjs";
4
4
  import { n as getAntigravityUserAgent, r as getAntigravityVersion } from "./gemini-headers-DKUShltF.mjs";
5
- import { n as runGoogleOAuthLogin, r as throwIfLoginCancelled, t as oauthFetch } from "./google-oauth-shared-CuEHaDDj.mjs";
5
+ import { n as runGoogleOAuthLogin, r as throwIfLoginCancelled, t as oauthFetch } from "./google-oauth-shared-Cn82h1o2.mjs";
6
6
  //#region node_modules/.pnpm/@oh-my-pi+pi-ai@17.3.5/node_modules/@oh-my-pi/pi-ai/src/registry/oauth/google-antigravity.ts
7
7
  /**
8
8
  * Antigravity OAuth flow (Gemini 3, Claude, GPT-OSS via Google Cloud)