@xiaoso/dsh-tool-plus 0.1.10-beta.2 → 0.1.10

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 (72) hide show
  1. package/README.en.md +14 -5
  2. package/README.md +14 -5
  3. package/lib/{abort-BtBy5Svf.mjs → abort-DZ54CaKU.mjs} +1 -1
  4. package/lib/{alibaba-coding-plan-oxHCHJtG.mjs → alibaba-coding-plan-DODpkcqi.mjs} +2 -2
  5. package/lib/{alibaba-token-plan-B0WzvYnB.mjs → alibaba-token-plan-C6lpKCda.mjs} +2 -2
  6. package/lib/{amazon-bedrock-BvfYGhrD.mjs → amazon-bedrock-Dx0rr9dY.mjs} +6 -6
  7. package/lib/{anthropic-Id561lwb.mjs → anthropic-ClCw0PV_.mjs} +14 -14
  8. package/lib/{anthropic-C6-vdduI.mjs → anthropic-Dv_GGX6g.mjs} +2 -2
  9. package/lib/{anthropic-wire-Cb8AQ1tS.mjs → anthropic-wire-lbGAFzYb.mjs} +5 -5
  10. package/lib/{api-key-validation-BXJKlsJg.mjs → api-key-validation-MnMf_ihX.mjs} +1 -1
  11. package/lib/{azure-openai-responses-CGws_ijz.mjs → azure-openai-responses-WE_bgFWp.mjs} +9 -9
  12. package/lib/{browser-render-i7uYOl4f.mjs → browser-render-BZXt548F.mjs} +2 -2
  13. package/lib/{cline-pass-Bwg3esu9.mjs → cline-pass-BT9CBEOj.mjs} +1 -1
  14. package/lib/{cloudflare-ai-gateway-B_kWnF30.mjs → cloudflare-ai-gateway-CrMa97Ap.mjs} +1 -1
  15. package/lib/{cloudflare-ai-gateway-BK6eadm9.mjs → cloudflare-ai-gateway-DReN6ohJ.mjs} +2 -2
  16. package/lib/{collapse-DU3g7d3B.mjs → collapse-CkMNRNr7.mjs} +1 -1
  17. package/lib/{coreweave-CkR_FlQi.mjs → coreweave-C68UgRQO.mjs} +2 -2
  18. package/lib/{cursor-BXx_5h4a.mjs → cursor-C6jaIJDg.mjs} +2 -2
  19. package/lib/{cursor-BcHwv8qq.mjs → cursor-D-XZYDf_.mjs} +9 -9
  20. package/lib/{cursor-BjWbJJLe.mjs → cursor-_gHHq-Dq.mjs} +2 -2
  21. package/lib/{cursor-proto-DPXXYx8S.mjs → cursor-proto-Cr_WEMuv.mjs} +1 -1
  22. package/lib/{devin-Ce3Wz8_E.mjs → devin-QpfTSl9H.mjs} +5 -5
  23. package/lib/{devin-proto-B6HwDwHK.mjs → devin-proto-DYhp4Ty6.mjs} +1 -1
  24. package/lib/{devin-BZBfzyIz.mjs → devin-u0ljw5P6.mjs} +6 -6
  25. package/lib/{error-DdCn4m1q.mjs → error-O63pC8zg.mjs} +1 -1
  26. package/lib/{event-stream-ldcUvOA0.mjs → event-stream-BKEtb45Y.mjs} +1 -1
  27. package/lib/{fs-promises-shim-Bx0fpxuk.mjs → fs-promises-shim-B2YFWkcd.mjs} +1 -0
  28. package/lib/{github-copilot-BT5dkIJl.mjs → github-copilot-BMEcw8N1.mjs} +2 -2
  29. package/lib/{github-copilot-headers-BGL8JO5c.mjs → github-copilot-headers-DnjGEbko.mjs} +2 -2
  30. package/lib/{gitlab-duo-B0qSYCa3.mjs → gitlab-duo-DnHqJjFY.mjs} +1 -1
  31. package/lib/{google-antigravity-D1llOVad.mjs → google-antigravity-B1mSckrK.mjs} +3 -3
  32. package/lib/{google-auth-DYhqX1rJ.mjs → google-auth-qAN-6DMW.mjs} +3 -3
  33. package/lib/{google-gemini-cli-ByQUuKp9.mjs → google-gemini-cli-B2Aw1S5w.mjs} +7 -7
  34. package/lib/{google-gemini-cli-CjHy6mFG.mjs → google-gemini-cli-DJwThCCn.mjs} +3 -3
  35. package/lib/{google-6cRgRmh0.mjs → google-lTxuq28n.mjs} +3 -3
  36. package/lib/{google-oauth-shared-CSwCT0Yl.mjs → google-oauth-shared-BctLpVUN.mjs} +1 -1
  37. package/lib/{google-shared-DYjJp0mQ.mjs → google-shared-Y01j9xOr.mjs} +5 -5
  38. package/lib/{google-vertex-CbOvlE5j.mjs → google-vertex-DcM-FRC5.mjs} +4 -4
  39. package/lib/{idle-iterator-DTBaEIbM.mjs → idle-iterator-D0ZXEcUq.mjs} +2 -2
  40. package/lib/index.mjs +89 -9
  41. package/lib/{kilo-cVG1aNZM.mjs → kilo-BEgEwMJQ.mjs} +1 -1
  42. package/lib/{kimi-BFfnFDhu.mjs → kimi-T9NldEIJ.mjs} +2 -2
  43. package/lib/{launch-Uq7920ng.mjs → launch-BIWNyrBB.mjs} +1 -1
  44. package/lib/{markit-BmsfOFVh.mjs → markit-Dvp2JPdT.mjs} +4 -4
  45. package/lib/{muse-code-CtcevJab.mjs → muse-code-CNvqqAp6.mjs} +2 -2
  46. package/lib/{ollama-B5hR1P1p.mjs → ollama-6R0oXZks.mjs} +9 -9
  47. package/lib/{openai-codex-CxkPyvyt.mjs → openai-codex-D5-CyTxa.mjs} +2 -2
  48. package/lib/{openai-codex-responses-BbM3Q7nJ.mjs → openai-codex-responses-C8bnBWOe.mjs} +11 -11
  49. package/lib/{openai-completions-CffXVOCL.mjs → openai-completions-DNr3mUsn.mjs} +15 -15
  50. package/lib/{openai-reasoning-fallback-DFdD1ok5.mjs → openai-reasoning-fallback-Ju-5pSR8.mjs} +2 -2
  51. package/lib/{openai-responses-DgqOvSn_.mjs → openai-responses-CjpafAEr.mjs} +10 -10
  52. package/lib/{perplexity-JFp3knZN.mjs → perplexity-A2PEoGaC.mjs} +2 -2
  53. package/lib/{protobuf-BJHNU9-E.mjs → protobuf-BMgDYu_U.mjs} +1 -1
  54. package/lib/{proxy-B51IWEMt.mjs → proxy-DxvCQOCA.mjs} +2 -2
  55. package/lib/{request-debug-NQN0BjHH.mjs → request-debug-BwPOqN_j.mjs} +1 -1
  56. package/lib/{scrapers-DSArdJ6N.mjs → scrapers-CqlagBff.mjs} +5 -5
  57. package/lib/{src-DUUqyo9y.mjs → src-AELUUb5U.mjs} +1 -1
  58. package/lib/{stream-DHdFrAG4.mjs → stream-AVOoe5Hj.mjs} +46 -46
  59. package/lib/{stream-markup-healing-DlJ9abTw.mjs → stream-markup-healing-CN3RsqG9.mjs} +2 -2
  60. package/lib/{thinking-D6LJxkz_.mjs → thinking-ngMwf_1Y.mjs} +1 -1
  61. package/lib/{turndown-DrX1M4WG.mjs → turndown-D6fof1OX.mjs} +1 -1
  62. package/lib/types/host/win32-console.d.ts +40 -0
  63. package/lib/{types-DT9vgZ3S.mjs → types-BLrLohwK.mjs} +2 -2
  64. package/lib/{utils-D31VFael.mjs → utils-I4I8azHN.mjs} +1 -1
  65. package/lib/{utils-DA8R1_Q8.mjs → utils-OUcqmx9L.mjs} +28 -28
  66. package/lib/{utils-BMmwLB0f.mjs → utils-cZX3f_Ls.mjs} +2 -2
  67. package/lib/{vision-guard-BlAAqGUC.mjs → vision-guard-BCpXWUj3.mjs} +1 -1
  68. package/lib/{xai-oauth-QPyScm4X.mjs → xai-oauth-CbeldUSV.mjs} +2 -2
  69. package/lib/{xiaomi-CLzjxHAi.mjs → xiaomi-Dl3VSs04.mjs} +1 -1
  70. package/lib/{zai-wDp0g7VC.mjs → zai-FyjGSypr.mjs} +1 -1
  71. package/lib/{zip-CNtIFfyV.mjs → zip-DRrycScC.mjs} +1 -1
  72. package/package.json +4 -1
@@ -1,6 +1,6 @@
1
1
  import { installBunShim as __installBunShim } from "./bun-shim.mjs";
2
2
  __installBunShim();
3
- import { f as OAuthError, m as LoginCancelledError } from "./error-DdCn4m1q.mjs";
3
+ import { f as OAuthError, m as LoginCancelledError } from "./error-O63pC8zg.mjs";
4
4
  //#region node_modules/.pnpm/@oh-my-pi+pi-ai@18.1.17/node_modules/@oh-my-pi/pi-ai/src/registry/oauth/google-oauth-shared.ts
5
5
  /**
6
6
  * Shared OAuth flow for Google-style providers (Gemini CLI, Antigravity).
@@ -1,11 +1,11 @@
1
1
  import { installBunShim as __installBunShim } from "./bun-shim.mjs";
2
2
  __installBunShim();
3
- import { o as readSseJson } from "./src-DUUqyo9y.mjs";
4
- import { R as GoogleApiError, _ as AbortError, c as finalize, r as ValidationError, s as ProviderResponseError, t as ConfigurationError } from "./error-DdCn4m1q.mjs";
5
- import { A as toolWireSchema, N as normalizeSchemaForCCA, P as normalizeSchemaForGoogle, T as renderDemotedThinking, h as transformMessages, o as normalizeSystemPrompts } from "./utils-BMmwLB0f.mjs";
3
+ import { o as readSseJson } from "./src-AELUUb5U.mjs";
4
+ import { R as GoogleApiError, _ as AbortError, c as finalize, r as ValidationError, s as ProviderResponseError, t as ConfigurationError } from "./error-O63pC8zg.mjs";
5
+ import { A as toolWireSchema, N as normalizeSchemaForCCA, P as normalizeSchemaForGoogle, T as renderDemotedThinking, h as transformMessages, o as normalizeSystemPrompts } from "./utils-cZX3f_Ls.mjs";
6
6
  import { t as calculateCost } from "./models-DnXMYGcJ.mjs";
7
- import { o as shouldSendServiceTier, t as NON_VISION_IMAGE_PLACEHOLDER } from "./vision-guard-BlAAqGUC.mjs";
8
- import { t as AssistantMessageEventStream } from "./event-stream-ldcUvOA0.mjs";
7
+ import { o as shouldSendServiceTier, t as NON_VISION_IMAGE_PLACEHOLDER } from "./vision-guard-BCpXWUj3.mjs";
8
+ import { t as AssistantMessageEventStream } from "./event-stream-BKEtb45Y.mjs";
9
9
  import { scheduler } from "node:timers/promises";
10
10
  //#region node_modules/.pnpm/@oh-my-pi+pi-ai@18.1.17/node_modules/@oh-my-pi/pi-ai/src/dialect/thinking-fence-strip.ts
11
11
  /**
@@ -1,10 +1,10 @@
1
1
  import { installBunShim as __installBunShim } from "./bun-shim.mjs";
2
2
  __installBunShim();
3
- import { N as $env } from "./src-DUUqyo9y.mjs";
4
- import { t as ConfigurationError } from "./error-DdCn4m1q.mjs";
3
+ import { N as $env } from "./src-AELUUb5U.mjs";
4
+ import { t as ConfigurationError } from "./error-O63pC8zg.mjs";
5
5
  import { i as resolveVertexEndpointHost } from "./hosts-00rjRzUD.mjs";
6
- import { t as getVertexAccessToken } from "./google-auth-DYhqX1rJ.mjs";
7
- import { p as streamGoogleGenAI, t as buildGoogleGenerateContentParams } from "./google-shared-DYjJp0mQ.mjs";
6
+ import { t as getVertexAccessToken } from "./google-auth-qAN-6DMW.mjs";
7
+ import { p as streamGoogleGenAI, t as buildGoogleGenerateContentParams } from "./google-shared-Y01j9xOr.mjs";
8
8
  //#region node_modules/.pnpm/@oh-my-pi+pi-ai@18.1.17/node_modules/@oh-my-pi/pi-ai/src/providers/google-vertex.ts
9
9
  const API_VERSION = "v1";
10
10
  const streamGoogleVertex = (model, context, options) => {
@@ -1,7 +1,7 @@
1
1
  import { installBunShim as __installBunShim } from "./bun-shim.mjs";
2
2
  __installBunShim();
3
- import { N as $env } from "./src-DUUqyo9y.mjs";
4
- import { _ as AbortError, n as StreamTimeoutError } from "./error-DdCn4m1q.mjs";
3
+ import { N as $env } from "./src-AELUUb5U.mjs";
4
+ import { _ as AbortError, n as StreamTimeoutError } from "./error-O63pC8zg.mjs";
5
5
  //#region node_modules/.pnpm/@oh-my-pi+pi-ai@18.1.17/node_modules/@oh-my-pi/pi-ai/src/utils/idle-iterator.ts
6
6
  const DEFAULT_STREAM_IDLE_TIMEOUT_MS = 3e5;
7
7
  const DEFAULT_STREAM_FIRST_EVENT_TIMEOUT_MS = 3e5;
package/lib/index.mjs CHANGED
@@ -1,14 +1,15 @@
1
1
  import { installBunShim as __installBunShim } from "./bun-shim.mjs";
2
2
  __installBunShim();
3
- import { n as fs_promises_shim_exports, t as exists } from "./fs-promises-shim-Bx0fpxuk.mjs";
4
- import { i as setRuntimeLogger, n as systemChromiumCandidatesForTest, r as runtimeLogger } from "./launch-Uq7920ng.mjs";
5
- import { $ as isEnoent, A as formatCount, C as warn, D as installBunShim, F as $flag, N as $env, O as formatAge, P as $envpos, Q as hasFsCode, U as getAutoQaDbPath, V as VERSION, X as getRemoteDir, Y as getPuppeteerDir, at as findOnPath, b as debug, c as combineSignals, d as $which, et as isEnotdir, it as untilAborted, k as formatBytes$1, l as exec, m as readImageMetadata, nt as peekFile, q as getInstallId, tt as isProbablyBinary, u as render, x as error } from "./src-DUUqyo9y.mjs";
6
- import { C as truncateToWidth$1, S as replaceTabs, _ as formatCodeFrameLine, a as fetchBinary, b as LRUCache, c as getParallelExtractContent, d as convertFileWithMarkit, f as Settings, g as capParseErrors, h as OMP_DEFAULTS, i as convertWithMarkit, l as ensureTool, m as settings, o as extractWithParallel, p as isSettingsInitialized, s as findParallelApiKey, u as CONVERTIBLE_EXTENSIONS, v as formatParseErrors, x as padding, y as shortenPath } from "./utils-DA8R1_Q8.mjs";
3
+ import { n as fs_promises_shim_exports, t as exists } from "./fs-promises-shim-B2YFWkcd.mjs";
4
+ import { i as setRuntimeLogger, n as systemChromiumCandidatesForTest, r as runtimeLogger } from "./launch-BIWNyrBB.mjs";
5
+ import { $ as isEnoent, A as formatCount, C as warn, D as installBunShim, F as $flag, N as $env, O as formatAge, P as $envpos, Q as hasFsCode, U as getAutoQaDbPath, V as VERSION, X as getRemoteDir, Y as getPuppeteerDir, at as findOnPath, b as debug, c as combineSignals, d as $which, et as isEnotdir, it as untilAborted, k as formatBytes$1, l as exec, m as readImageMetadata, nt as peekFile, q as getInstallId, tt as isProbablyBinary, u as render, x as error } from "./src-AELUUb5U.mjs";
6
+ import { C as truncateToWidth$1, S as replaceTabs, _ as formatCodeFrameLine, a as fetchBinary, b as LRUCache, c as getParallelExtractContent, d as convertFileWithMarkit, f as Settings, g as capParseErrors, h as OMP_DEFAULTS, i as convertWithMarkit, l as ensureTool, m as settings, o as extractWithParallel, p as isSettingsInitialized, s as findParallelApiKey, u as CONVERTIBLE_EXTENSIONS, v as formatParseErrors, x as padding, y as shortenPath } from "./utils-OUcqmx9L.mjs";
7
7
  import { t as sanitizeText } from "./sanitize-text-BCf5KmCf.mjs";
8
8
  import { n as isRecord$5 } from "./type-guards-CttAANEx.mjs";
9
9
  import { n as ToolError, r as throwIfAborted, t as ToolAbortError } from "./tool-errors-DoyxivAR.mjs";
10
- import { a as openArchive, c as sniffArchiveFormat, d as writeArchive, i as listArchiveRoot, o as parseArchivePathCandidates, r as formatArchiveEntryLines, s as readArchiveEntries, t as archiveFormatFromPath } from "./zip-CNtIFfyV.mjs";
11
- import { a as finalizeOutput, d as looksLikeHtml, n as MAX_OUTPUT_CHARS, t as MAX_BYTES, u as loadPage } from "./types-DT9vgZ3S.mjs";
10
+ import { a as openArchive, c as sniffArchiveFormat, d as writeArchive, i as listArchiveRoot, o as parseArchivePathCandidates, r as formatArchiveEntryLines, s as readArchiveEntries, t as archiveFormatFromPath } from "./zip-DRrycScC.mjs";
11
+ import { a as finalizeOutput, d as looksLikeHtml, n as MAX_OUTPUT_CHARS, t as MAX_BYTES, u as loadPage } from "./types-BLrLohwK.mjs";
12
+ import { createRequire } from "node:module";
12
13
  import * as fs from "node:fs";
13
14
  import { copyFileSync, existsSync, readFileSync, readdirSync } from "node:fs";
14
15
  import { TOOL_ABORTED, defineTool } from "@deepseek-ai/dsh-tools";
@@ -5770,6 +5771,84 @@ function installBrowserProbeRpc(ctx, deps) {
5770
5771
  };
5771
5772
  }
5772
5773
  //#endregion
5774
+ //#region src/host/win32-console.ts
5775
+ /**
5776
+ * Windows:给宿主进程补一个**不可见**控制台,让它的 console 子进程去继承。
5777
+ *
5778
+ * 宿主是 GUI 子系统镜像(`DeepSeek Harness.exe` + `ELECTRON_RUN_AS_NODE=1`),
5779
+ * Windows 从不给它分配控制台;父进程没有控制台时子进程会**新建**一个,而默认
5780
+ * 终端是 Windows Terminal → 每条命令闪一个窗口。宿主自己 `AllocConsole()` +
5781
+ * `SW_HIDE` 之后,子进程就只是继承它,不再新建。
5782
+ *
5783
+ * 三条硬约束(都有测试钉住):只在 win32 生效、宿主已有控制台时零副作用;
5784
+ * `AllocConsole` 会重指标准句柄,必须先存后还(宿主 stdio 是启动方给的 pipe);
5785
+ * 任何失败只降级不抛。FFI 只从本包自己的依赖取,拿不到就降级。
5786
+ * @module @xiaoso/dsh-tool-plus/host/win32-console
5787
+ */
5788
+ /** 三个标准句柄的 Win32 编号,顺序即存取顺序。 */
5789
+ const STD_HANDLES = [
5790
+ -10,
5791
+ -11,
5792
+ -12
5793
+ ];
5794
+ /** `ShowWindow` 的 `SW_HIDE`。 */
5795
+ const SW_HIDE = 0;
5796
+ /**
5797
+ * 安装隐藏控制台(幂等)。宿主已有控制台时返回 `console-present` 且零副作用。
5798
+ * @param platform - 当前平台(注入以便测试非 win32 分支)。
5799
+ * @param load - 取 Win32 调用集合;拿不到(没有 koffi)时返回 undefined。
5800
+ * @returns 本次安装的结果。
5801
+ */
5802
+ function installHiddenHostConsole(platform, load) {
5803
+ if (platform !== "win32") return "not-windows";
5804
+ try {
5805
+ const bindings = load();
5806
+ if (bindings === void 0) return "ffi-unavailable";
5807
+ if (bindings.getConsoleWindow() !== null) return "console-present";
5808
+ const saved = STD_HANDLES.map((index) => bindings.getStdHandle(index));
5809
+ if (!bindings.allocConsole()) return "alloc-failed";
5810
+ const window = bindings.getConsoleWindow();
5811
+ if (window !== null) bindings.showWindow(window, SW_HIDE);
5812
+ STD_HANDLES.forEach((index, at) => bindings.setStdHandle(index, saved[at]));
5813
+ return "allocated";
5814
+ } catch {
5815
+ return "ffi-unavailable";
5816
+ }
5817
+ }
5818
+ /** 把 koffi 的 `func()` 产物收窄成本模块的调用签名。 */
5819
+ function asCall(value) {
5820
+ return value;
5821
+ }
5822
+ /**
5823
+ * 真实加载:只从**本包自己的依赖**解析 koffi(`optionalDependencies`)。
5824
+ *
5825
+ * 刻意不去宿主运行时的 node_modules 里找:宿主的内部布局不是契约,跨包按路径解析
5826
+ * 是耦合。拿不到(没装、平台没有预编译包)就返回 undefined,功能降级。
5827
+ */
5828
+ function loadKoffiBindings() {
5829
+ try {
5830
+ const koffi = createRequire(import.meta.url)("koffi");
5831
+ const kernel32 = koffi.load("kernel32.dll");
5832
+ const user32 = koffi.load("user32.dll");
5833
+ return {
5834
+ getConsoleWindow: asCall(kernel32.func("void *GetConsoleWindow()")),
5835
+ allocConsole: asCall(kernel32.func("bool AllocConsole()")),
5836
+ showWindow: asCall(user32.func("bool ShowWindow(void *hWnd, int nCmdShow)")),
5837
+ getStdHandle: asCall(kernel32.func("void *GetStdHandle(int nStdHandle)")),
5838
+ setStdHandle: asCall(kernel32.func("bool SetStdHandle(int nStdHandle, void *h)"))
5839
+ };
5840
+ } catch {
5841
+ return;
5842
+ }
5843
+ }
5844
+ /**
5845
+ * 插件入口调用:win32 且能拿到 FFI 时才安装,结果只用于日志。
5846
+ * @returns 本次安装的结果。
5847
+ */
5848
+ function ensureInheritableHiddenConsole() {
5849
+ return installHiddenHostConsole(process.platform, loadKoffiBindings);
5850
+ }
5851
+ //#endregion
5773
5852
  //#region src/presets/rows.ts
5774
5853
  /** 行 id 的取值(非空字符串才认,与官方对 `name` 的要求同款)。 */
5775
5854
  function rowId(row) {
@@ -11179,7 +11258,7 @@ async function renderHtmlToText(url, html, timeout, settings, userSignal, storag
11179
11258
  },
11180
11259
  browser: async () => {
11181
11260
  if (settings.get("browser.readerEnabled") === false) return null;
11182
- const { renderUrlWithBrowser } = await import("./browser-render-i7uYOl4f.mjs");
11261
+ const { renderUrlWithBrowser } = await import("./browser-render-BZXt548F.mjs");
11183
11262
  return renderUrlWithBrowser(url, {
11184
11263
  timeoutMs: remoteBudgetMs,
11185
11264
  signal: userSignal
@@ -11400,7 +11479,7 @@ let specialHandlersPromise;
11400
11479
  * requires a special handler, so we keep them out of the cold-startup graph.
11401
11480
  */
11402
11481
  function loadSpecialHandlers() {
11403
- specialHandlersPromise ??= import("./scrapers-DSArdJ6N.mjs").then((m) => m.specialHandlers);
11482
+ specialHandlersPromise ??= import("./scrapers-CqlagBff.mjs").then((m) => m.specialHandlers);
11404
11483
  return specialHandlersPromise;
11405
11484
  }
11406
11485
  /**
@@ -15408,7 +15487,7 @@ async function writethroughNoop(dst, content, _signal, file) {
15408
15487
  }
15409
15488
  /** Async UTF-8 write (node:fs) used when no file handle is supplied. */
15410
15489
  async function writeFileUtf8(dst, content) {
15411
- const { writeFile, mkdir } = await import("./fs-promises-shim-Bx0fpxuk.mjs").then((n) => n.n);
15490
+ const { writeFile, mkdir } = await import("./fs-promises-shim-B2YFWkcd.mjs").then((n) => n.n);
15412
15491
  const { dirname } = await import("node:path");
15413
15492
  try {
15414
15493
  await writeFile(dst, content, "utf8");
@@ -23563,6 +23642,7 @@ function apply(ctx, config = {}) {
23563
23642
  installBunShim();
23564
23643
  let cfg = resolveConfig(config);
23565
23644
  setRuntimeLogger(ctx.logger);
23645
+ runtimeLogger().debug("host console", { outcome: ensureInheritableHiddenConsole() });
23566
23646
  sweepStaleSpillFiles();
23567
23647
  let disposeModeSensitive = [];
23568
23648
  const registerModeSensitive = () => {
@@ -1,6 +1,6 @@
1
1
  import { installBunShim as __installBunShim } from "./bun-shim.mjs";
2
2
  __installBunShim();
3
- import { f as OAuthError, m as LoginCancelledError } from "./error-DdCn4m1q.mjs";
3
+ import { f as OAuthError, m as LoginCancelledError } from "./error-O63pC8zg.mjs";
4
4
  //#region node_modules/.pnpm/@oh-my-pi+pi-ai@18.1.17/node_modules/@oh-my-pi/pi-ai/src/registry/oauth/kilo.ts
5
5
  const KILO_DEVICE_AUTH_BASE_URL = "https://api.kilo.ai/api/device-auth";
6
6
  const POLL_INTERVAL_MS = 5e3;
@@ -1,7 +1,7 @@
1
1
  import { installBunShim as __installBunShim } from "./bun-shim.mjs";
2
2
  __installBunShim();
3
- import { r as __exportAll } from "./fs-promises-shim-Bx0fpxuk.mjs";
4
- import { H as getAgentDir } from "./src-DUUqyo9y.mjs";
3
+ import { r as __exportAll } from "./fs-promises-shim-B2YFWkcd.mjs";
4
+ import { H as getAgentDir } from "./src-AELUUb5U.mjs";
5
5
  import * as fs from "node:fs";
6
6
  import * as path$1 from "node:path";
7
7
  import * as os from "node:os";
@@ -1,6 +1,6 @@
1
1
  import { installBunShim as __installBunShim } from "./bun-shim.mjs";
2
2
  __installBunShim();
3
- import { d as $which, l as exec } from "./src-DUUqyo9y.mjs";
3
+ import { d as $which, l as exec } from "./src-AELUUb5U.mjs";
4
4
  import * as fs from "node:fs";
5
5
  import * as path$1 from "node:path";
6
6
  import * as os from "node:os";
@@ -1,9 +1,9 @@
1
1
  import { installBunShim as __installBunShim } from "./bun-shim.mjs";
2
2
  __installBunShim();
3
- import { n as fs_promises_shim_exports } from "./fs-promises-shim-Bx0fpxuk.mjs";
4
- import { k as formatBytes } from "./src-DUUqyo9y.mjs";
5
- import { l as unzip, u as unzipText } from "./zip-CNtIFfyV.mjs";
6
- import { n as normalizeTablesHtml, t as createTurndown } from "./turndown-DrX1M4WG.mjs";
3
+ import { n as fs_promises_shim_exports } from "./fs-promises-shim-B2YFWkcd.mjs";
4
+ import { k as formatBytes } from "./src-AELUUb5U.mjs";
5
+ import { l as unzip, u as unzipText } from "./zip-DRrycScC.mjs";
6
+ import { n as normalizeTablesHtml, t as createTurndown } from "./turndown-D6fof1OX.mjs";
7
7
  import { pdfToMarkdown } from "@oh-my-pi/pi-natives";
8
8
  import * as path$1 from "node:path";
9
9
  import * as zlib from "node:zlib";
@@ -1,7 +1,7 @@
1
1
  import { installBunShim as __installBunShim } from "./bun-shim.mjs";
2
2
  __installBunShim();
3
- import { r as __exportAll } from "./fs-promises-shim-Bx0fpxuk.mjs";
4
- import { f as OAuthError, t as ConfigurationError } from "./error-DdCn4m1q.mjs";
3
+ import { r as __exportAll } from "./fs-promises-shim-B2YFWkcd.mjs";
4
+ import { f as OAuthError, t as ConfigurationError } from "./error-O63pC8zg.mjs";
5
5
  import { type } from "@oh-my-pi/omptype";
6
6
  //#region node_modules/.pnpm/@oh-my-pi+pi-ai@18.1.17/node_modules/@oh-my-pi/pi-ai/src/registry/oauth/muse-code.ts
7
7
  var muse_code_exports = /* @__PURE__ */ __exportAll({
@@ -1,14 +1,14 @@
1
1
  import { installBunShim as __installBunShim } from "./bun-shim.mjs";
2
2
  __installBunShim();
3
- import { r as __exportAll } from "./fs-promises-shim-Bx0fpxuk.mjs";
4
- import { _ as parseStreamingJson, i as readJsonl } from "./src-DUUqyo9y.mjs";
5
- import { G as fetchWithRetry, c as finalize, h as MissingApiKeyError, y as LLAMA_CPP_TOOL_CALL_PARSE_PATTERN, z as OllamaApiError } from "./error-DdCn4m1q.mjs";
6
- import { A as toolWireSchema, R as sanitizeSchemaForOllama, g as clearStreamingPartialJson, h as transformMessages, o as normalizeSystemPrompts, w as kStreamingPartialJson } from "./utils-BMmwLB0f.mjs";
7
- import { At as withReplaySafeStreamRetry, n as getEnvApiKey } from "./stream-DHdFrAG4.mjs";
8
- import { i as partitionVisionContent, r as joinTextWithImagePlaceholder } from "./vision-guard-BlAAqGUC.mjs";
9
- import { t as AssistantMessageEventStream } from "./event-stream-ldcUvOA0.mjs";
10
- import { n as getOpenAIStreamFirstEventTimeoutMs, r as getOpenAIStreamIdleTimeoutMs, t as armPreResponseTimeout } from "./idle-iterator-DTBaEIbM.mjs";
11
- import { n as getStreamMarkupHealingPattern, t as StreamMarkupHealing } from "./stream-markup-healing-DlJ9abTw.mjs";
3
+ import { r as __exportAll } from "./fs-promises-shim-B2YFWkcd.mjs";
4
+ import { _ as parseStreamingJson, i as readJsonl } from "./src-AELUUb5U.mjs";
5
+ import { G as fetchWithRetry, c as finalize, h as MissingApiKeyError, y as LLAMA_CPP_TOOL_CALL_PARSE_PATTERN, z as OllamaApiError } from "./error-O63pC8zg.mjs";
6
+ import { A as toolWireSchema, R as sanitizeSchemaForOllama, g as clearStreamingPartialJson, h as transformMessages, o as normalizeSystemPrompts, w as kStreamingPartialJson } from "./utils-cZX3f_Ls.mjs";
7
+ import { At as withReplaySafeStreamRetry, n as getEnvApiKey } from "./stream-AVOoe5Hj.mjs";
8
+ import { i as partitionVisionContent, r as joinTextWithImagePlaceholder } from "./vision-guard-BCpXWUj3.mjs";
9
+ import { t as AssistantMessageEventStream } from "./event-stream-BKEtb45Y.mjs";
10
+ import { n as getOpenAIStreamFirstEventTimeoutMs, r as getOpenAIStreamIdleTimeoutMs, t as armPreResponseTimeout } from "./idle-iterator-D0ZXEcUq.mjs";
11
+ import { n as getStreamMarkupHealingPattern, t as StreamMarkupHealing } from "./stream-markup-healing-CN3RsqG9.mjs";
12
12
  //#region node_modules/.pnpm/@oh-my-pi+pi-ai@18.1.17/node_modules/@oh-my-pi/pi-ai/src/providers/ollama.ts
13
13
  var ollama_exports = /* @__PURE__ */ __exportAll({ streamOllama: () => streamOllama });
14
14
  function normalizeBaseUrl(baseUrl) {
@@ -1,7 +1,7 @@
1
1
  import { installBunShim as __installBunShim } from "./bun-shim.mjs";
2
2
  __installBunShim();
3
- import { f as OAuthError, m as LoginCancelledError } from "./error-DdCn4m1q.mjs";
4
- import "./utils-BMmwLB0f.mjs";
3
+ import { f as OAuthError, m as LoginCancelledError } from "./error-O63pC8zg.mjs";
4
+ import "./utils-cZX3f_Ls.mjs";
5
5
  import { n as isRecord } from "./type-guards-CttAANEx.mjs";
6
6
  //#region node_modules/.pnpm/@oh-my-pi+pi-ai@18.1.17/node_modules/@oh-my-pi/pi-ai/src/registry/oauth/openai-codex.ts
7
7
  const CLIENT_ID = "app_EMoamEEZ73f0CkXaXp7hrann";
@@ -1,19 +1,19 @@
1
1
  import { installBunShim as __installBunShim } from "./bun-shim.mjs";
2
2
  __installBunShim();
3
- import { r as __exportAll } from "./fs-promises-shim-Bx0fpxuk.mjs";
4
- import { B as USER_AGENT, F as $flag, N as $env, S as time, _ as parseStreamingJson, b as debug, o as readSseJson, q as getInstallId, t as structuredCloneJSON, x as error } from "./src-DUUqyo9y.mjs";
5
- import { G as fetchWithRetry, V as ProviderHttpError, _ as AbortError, b as PYTHON_HTTP2_STREAM_RESET_PATTERN, c as finalize, h as MissingApiKeyError, i as isProviderRetryableError, x as PYTHON_HTTP_INCOMPLETE_CHUNK_PATTERN } from "./error-DdCn4m1q.mjs";
6
- import { A as toolWireSchema, M as adaptSchemaForStrict, f as stripOpenAIResponsesComputerLinkedReasoningIdsForReplay, g as clearStreamingPartialJson, h as transformMessages, i as getOpenAIResponsesHistoryPayload, j as NO_STRICT, l as sanitizeOpenAIResponsesAssistantFallbackItemsForReplay, m as redactSensitiveInObject, o as normalizeSystemPrompts, r as getOpenAIResponsesHistoryItems, t as createOpenAIResponsesHistoryPayload, u as sanitizeOpenAIResponsesAssistantHistoryItemsForReplay, w as kStreamingPartialJson, z as sanitizeSchemaForOpenAIResponses } from "./utils-BMmwLB0f.mjs";
3
+ import { r as __exportAll } from "./fs-promises-shim-B2YFWkcd.mjs";
4
+ import { B as USER_AGENT, F as $flag, N as $env, S as time, _ as parseStreamingJson, b as debug, o as readSseJson, q as getInstallId, t as structuredCloneJSON, x as error } from "./src-AELUUb5U.mjs";
5
+ import { G as fetchWithRetry, V as ProviderHttpError, _ as AbortError, b as PYTHON_HTTP2_STREAM_RESET_PATTERN, c as finalize, h as MissingApiKeyError, i as isProviderRetryableError, x as PYTHON_HTTP_INCOMPLETE_CHUNK_PATTERN } from "./error-O63pC8zg.mjs";
6
+ import { A as toolWireSchema, M as adaptSchemaForStrict, f as stripOpenAIResponsesComputerLinkedReasoningIdsForReplay, g as clearStreamingPartialJson, h as transformMessages, i as getOpenAIResponsesHistoryPayload, j as NO_STRICT, l as sanitizeOpenAIResponsesAssistantFallbackItemsForReplay, m as redactSensitiveInObject, o as normalizeSystemPrompts, r as getOpenAIResponsesHistoryItems, t as createOpenAIResponsesHistoryPayload, u as sanitizeOpenAIResponsesAssistantHistoryItemsForReplay, w as kStreamingPartialJson, z as sanitizeSchemaForOpenAIResponses } from "./utils-cZX3f_Ls.mjs";
7
7
  import { t as asRecord } from "./type-guards-CttAANEx.mjs";
8
- import { B as convertResponsesInputContent, D as applyOpenAIServiceTier, Dt as escapeHarmonyControlTokens, G as encodeResponsesToolCallId, J as finalizeCustomToolCallInputDone, K as encodeTextSignatureV1, Ot as isHarmonyDialectModel, P as buildResponsesDeltaInput, Q as finalizeToolCallArgumentsDone, R as computerCallMetadata, U as createSequentialCutoffSummaryState, X as finalizePendingResponsesToolCalls, Y as finalizeMessageText, Z as finalizeReasoningThinking, _ as appendReasoningSummaryPart, a as CODEX_BASE_URL, b as appendResponsesImageResult, c as OPENAI_HEADER_VALUES, ct as mapOpenAIReasoningEffort, d as getCodexAccountId, et as getOpenAIPromptCacheKey, ft as populateResponsesUsageFromResponse, g as appendMessageTextDelta, h as appendMessageContentPart, it as hasExecutableIncompleteResponsesToolCalls, k as applyReasoningSummaryDone, kt as hasVisibleAssistantContent, l as applyCodexResidencyHeader, lt as mapOpenAIResponsesStopReason, m as accumulateToolCallArgumentsDelta, mt as promoteResponsesToolUseStopReason, n as getEnvApiKey, o as CODEX_CLIENT_VERSION, ot as isOpenAIResponsesProgressEvent, p as accumulateCustomToolCallInputDelta, q as escapeReplayedControlTokens, r as isOfficialCodexApiUrl, s as OPENAI_HEADERS, u as codexRoutingHint, ut as normalizeOpenAIPromptCacheKey, v as appendReasoningSummaryPartDone, x as appendResponsesToolResultMessages, y as appendReasoningSummaryTextDelta, z as convertResponsesAssistantMessage } from "./stream-DHdFrAG4.mjs";
9
- import { a as toNumber } from "./utils-D31VFael.mjs";
10
- import { o as requireSupportedEffort } from "./anthropic-wire-Cb8AQ1tS.mjs";
11
- import { n as getProxyForUrl } from "./proxy-B51IWEMt.mjs";
8
+ import { B as convertResponsesInputContent, D as applyOpenAIServiceTier, Dt as escapeHarmonyControlTokens, G as encodeResponsesToolCallId, J as finalizeCustomToolCallInputDone, K as encodeTextSignatureV1, Ot as isHarmonyDialectModel, P as buildResponsesDeltaInput, Q as finalizeToolCallArgumentsDone, R as computerCallMetadata, U as createSequentialCutoffSummaryState, X as finalizePendingResponsesToolCalls, Y as finalizeMessageText, Z as finalizeReasoningThinking, _ as appendReasoningSummaryPart, a as CODEX_BASE_URL, b as appendResponsesImageResult, c as OPENAI_HEADER_VALUES, ct as mapOpenAIReasoningEffort, d as getCodexAccountId, et as getOpenAIPromptCacheKey, ft as populateResponsesUsageFromResponse, g as appendMessageTextDelta, h as appendMessageContentPart, it as hasExecutableIncompleteResponsesToolCalls, k as applyReasoningSummaryDone, kt as hasVisibleAssistantContent, l as applyCodexResidencyHeader, lt as mapOpenAIResponsesStopReason, m as accumulateToolCallArgumentsDelta, mt as promoteResponsesToolUseStopReason, n as getEnvApiKey, o as CODEX_CLIENT_VERSION, ot as isOpenAIResponsesProgressEvent, p as accumulateCustomToolCallInputDelta, q as escapeReplayedControlTokens, r as isOfficialCodexApiUrl, s as OPENAI_HEADERS, u as codexRoutingHint, ut as normalizeOpenAIPromptCacheKey, v as appendReasoningSummaryPartDone, x as appendResponsesToolResultMessages, y as appendReasoningSummaryTextDelta, z as convertResponsesAssistantMessage } from "./stream-AVOoe5Hj.mjs";
9
+ import { a as toNumber } from "./utils-I4I8azHN.mjs";
10
+ import { o as requireSupportedEffort } from "./anthropic-wire-lbGAFzYb.mjs";
11
+ import { n as getProxyForUrl } from "./proxy-DxvCQOCA.mjs";
12
12
  import "./effort-BdtQMN-_.mjs";
13
13
  import { t as calculateCost } from "./models-DnXMYGcJ.mjs";
14
- import { t as AssistantMessageEventStream } from "./event-stream-ldcUvOA0.mjs";
15
- import { n as getOpenAIStreamFirstEventTimeoutMs, o as iterateWithIdleTimeout, r as getOpenAIStreamIdleTimeoutMs, t as armPreResponseTimeout } from "./idle-iterator-DTBaEIbM.mjs";
16
- import { n as isRequestDebugEnabled, t as createRequestDebugSession } from "./request-debug-NQN0BjHH.mjs";
14
+ import { t as AssistantMessageEventStream } from "./event-stream-BKEtb45Y.mjs";
15
+ import { n as getOpenAIStreamFirstEventTimeoutMs, o as iterateWithIdleTimeout, r as getOpenAIStreamIdleTimeoutMs, t as armPreResponseTimeout } from "./idle-iterator-D0ZXEcUq.mjs";
16
+ import { n as isRequestDebugEnabled, t as createRequestDebugSession } from "./request-debug-BwPOqN_j.mjs";
17
17
  import { t as notifyRawSseEvent } from "./sse-debug-B-tkLCPW.mjs";
18
18
  import { n as planStableOpenAIEffort, r as compactGrammarDefinition, t as getOpenAIEffortControlState } from "./openai-configuration-update-xMYUjaK_.mjs";
19
19
  import { scheduler } from "node:timers/promises";
@@ -1,23 +1,23 @@
1
1
  import { installBunShim as __installBunShim } from "./bun-shim.mjs";
2
2
  __installBunShim();
3
- import { r as __exportAll } from "./fs-promises-shim-Bx0fpxuk.mjs";
4
- import { C as warn, N as $env, _ as parseStreamingJson, v as parseStreamingJsonThrottled } from "./src-DUUqyo9y.mjs";
5
- import { B as OpenAIHttpError, V as ProviderHttpError, _ as AbortError, c as finalize, n as StreamTimeoutError, s as ProviderResponseError, t as ConfigurationError } from "./error-DdCn4m1q.mjs";
6
- import { A as toolWireSchema, C as kStreamingLastParseLen, F as normalizeSchemaForMoonshot, L as sanitizeSchemaForGrammar, M as adaptSchemaForStrict, T as renderDemotedThinking, _ as isDemotedThinking, c as resolveCacheRetention, h as transformMessages, j as NO_STRICT, k as flattenExclusiveRequiredRootUnion, o as normalizeSystemPrompts } from "./utils-BMmwLB0f.mjs";
7
- import { At as withReplaySafeStreamRetry, C as applyChatCompletionsToolStream, D as applyOpenAIServiceTier, E as applyOpenAIGatewayRouting, H as createOpenAIStrictToolsState, I as calculateOpenAIUsageAccounting, L as clearOpenAIStrictToolsState, N as applyWireModelIdTransform, O as applyProviderReportedCost, S as applyChatCompletionsReasoningParams, St as shouldRetryWithoutStrictTools, T as applyOpenAIExtraBody, Tt as mapToOpenAICompletionsToolChoice, V as createInitialResponsesAssistantMessage, W as disableStrictToolsForScope, _t as resolveOpenAIOutputTokenParam, at as isCompiledGrammarTooLargeStrictError, dt as parseAzureDeploymentNameMap, et as getOpenAIPromptCacheKey, gt as resolveOpenAICompletionsOutputClamp, ht as resolveOpenAICompatPolicy, kt as hasVisibleAssistantContent, n as getEnvApiKey, nt as getOpenAIStrictToolsScope, st as isStrictToolsDisabledForScope, vt as resolveOpenAIRequestSetup, wt as isForcedToolChoice, xt as shouldDropAutoToolChoiceForReasoning } from "./stream-DHdFrAG4.mjs";
8
- import { s as resolveWireModelId } from "./anthropic-wire-Cb8AQ1tS.mjs";
9
- import { t as createAbortSourceTracker } from "./abort-BtBy5Svf.mjs";
3
+ import { r as __exportAll } from "./fs-promises-shim-B2YFWkcd.mjs";
4
+ import { C as warn, N as $env, _ as parseStreamingJson, v as parseStreamingJsonThrottled } from "./src-AELUUb5U.mjs";
5
+ import { B as OpenAIHttpError, V as ProviderHttpError, _ as AbortError, c as finalize, n as StreamTimeoutError, s as ProviderResponseError, t as ConfigurationError } from "./error-O63pC8zg.mjs";
6
+ import { A as toolWireSchema, C as kStreamingLastParseLen, F as normalizeSchemaForMoonshot, L as sanitizeSchemaForGrammar, M as adaptSchemaForStrict, T as renderDemotedThinking, _ as isDemotedThinking, c as resolveCacheRetention, h as transformMessages, j as NO_STRICT, k as flattenExclusiveRequiredRootUnion, o as normalizeSystemPrompts } from "./utils-cZX3f_Ls.mjs";
7
+ import { At as withReplaySafeStreamRetry, C as applyChatCompletionsToolStream, D as applyOpenAIServiceTier, E as applyOpenAIGatewayRouting, H as createOpenAIStrictToolsState, I as calculateOpenAIUsageAccounting, L as clearOpenAIStrictToolsState, N as applyWireModelIdTransform, O as applyProviderReportedCost, S as applyChatCompletionsReasoningParams, St as shouldRetryWithoutStrictTools, T as applyOpenAIExtraBody, Tt as mapToOpenAICompletionsToolChoice, V as createInitialResponsesAssistantMessage, W as disableStrictToolsForScope, _t as resolveOpenAIOutputTokenParam, at as isCompiledGrammarTooLargeStrictError, dt as parseAzureDeploymentNameMap, et as getOpenAIPromptCacheKey, gt as resolveOpenAICompletionsOutputClamp, ht as resolveOpenAICompatPolicy, kt as hasVisibleAssistantContent, n as getEnvApiKey, nt as getOpenAIStrictToolsScope, st as isStrictToolsDisabledForScope, vt as resolveOpenAIRequestSetup, wt as isForcedToolChoice, xt as shouldDropAutoToolChoiceForReasoning } from "./stream-AVOoe5Hj.mjs";
8
+ import { s as resolveWireModelId } from "./anthropic-wire-lbGAFzYb.mjs";
9
+ import { t as createAbortSourceTracker } from "./abort-DZ54CaKU.mjs";
10
10
  import { t as calculateCost } from "./models-DnXMYGcJ.mjs";
11
- import { i as resolveCopilotRequestIdentity, o as wrapFetchForCopilotFallback } from "./github-copilot-headers-BGL8JO5c.mjs";
12
- import { n as isOpenAICompletionsVisionSupported, r as joinTextWithImagePlaceholder, t as NON_VISION_IMAGE_PLACEHOLDER } from "./vision-guard-BlAAqGUC.mjs";
11
+ import { i as resolveCopilotRequestIdentity, o as wrapFetchForCopilotFallback } from "./github-copilot-headers-DnjGEbko.mjs";
12
+ import { n as isOpenAICompletionsVisionSupported, r as joinTextWithImagePlaceholder, t as NON_VISION_IMAGE_PLACEHOLDER } from "./vision-guard-BCpXWUj3.mjs";
13
13
  import { t as findStrictToolSchemaViolation } from "./strict-tool-validation-CBTz1dAA.mjs";
14
- import { t as AssistantMessageEventStream } from "./event-stream-ldcUvOA0.mjs";
15
- import { n as clinePassClientHeaders } from "./cline-pass-Bwg3esu9.mjs";
16
- import { n as getOpenAIStreamFirstEventTimeoutMs, o as iterateWithIdleTimeout, r as getOpenAIStreamIdleTimeoutMs, s as iterateWithTerminalGrace } from "./idle-iterator-DTBaEIbM.mjs";
17
- import { t as getKimiCommonHeaders } from "./kimi-BFfnFDhu.mjs";
14
+ import { t as AssistantMessageEventStream } from "./event-stream-BKEtb45Y.mjs";
15
+ import { n as clinePassClientHeaders } from "./cline-pass-BT9CBEOj.mjs";
16
+ import { n as getOpenAIStreamFirstEventTimeoutMs, o as iterateWithIdleTimeout, r as getOpenAIStreamIdleTimeoutMs, s as iterateWithTerminalGrace } from "./idle-iterator-D0ZXEcUq.mjs";
17
+ import { t as getKimiCommonHeaders } from "./kimi-T9NldEIJ.mjs";
18
18
  import { t as notifyProviderResponse } from "./provider-response-SqKSkkUc.mjs";
19
- import { a as getOpenAIReasoningEffortFallback, c as postOpenAIStream, i as createOpenAIReasoningEffortFallbackState, n as clearOpenAIReasoningEffortFallbackState, o as rememberOpenAIReasoningEffortFallback, r as createOpenAIReasoningEffortFallbackKey, s as resolveOpenAIReasoningEffortFallback, t as applyOpenAIReasoningEffortFallback } from "./openai-reasoning-fallback-DFdD1ok5.mjs";
20
- import { t as StreamMarkupHealing } from "./stream-markup-healing-DlJ9abTw.mjs";
19
+ import { a as getOpenAIReasoningEffortFallback, c as postOpenAIStream, i as createOpenAIReasoningEffortFallbackState, n as clearOpenAIReasoningEffortFallbackState, o as rememberOpenAIReasoningEffortFallback, r as createOpenAIReasoningEffortFallbackKey, s as resolveOpenAIReasoningEffortFallback, t as applyOpenAIReasoningEffortFallback } from "./openai-reasoning-fallback-Ju-5pSR8.mjs";
20
+ import { t as StreamMarkupHealing } from "./stream-markup-healing-CN3RsqG9.mjs";
21
21
  //#region node_modules/.pnpm/@oh-my-pi+pi-ai@18.1.17/node_modules/@oh-my-pi/pi-ai/src/providers/openai-completions.ts
22
22
  var openai_completions_exports = /* @__PURE__ */ __exportAll({
23
23
  convertMessages: () => convertMessages,
@@ -1,7 +1,7 @@
1
1
  import { installBunShim as __installBunShim } from "./bun-shim.mjs";
2
2
  __installBunShim();
3
- import { o as readSseJson } from "./src-DUUqyo9y.mjs";
4
- import { B as OpenAIHttpError, G as fetchWithRetry, W as extractHttpStatusFromError, s as ProviderResponseError } from "./error-DdCn4m1q.mjs";
3
+ import { o as readSseJson } from "./src-AELUUb5U.mjs";
4
+ import { B as OpenAIHttpError, G as fetchWithRetry, W as extractHttpStatusFromError, s as ProviderResponseError } from "./error-O63pC8zg.mjs";
5
5
  //#region node_modules/.pnpm/@oh-my-pi+pi-ai@18.1.17/node_modules/@oh-my-pi/pi-ai/src/utils/openai-http.ts
6
6
  /**
7
7
  * JSON-POST → SSE transport for OpenAI-wire streaming endpoints (chat
@@ -1,18 +1,18 @@
1
1
  import { installBunShim as __installBunShim } from "./bun-shim.mjs";
2
2
  __installBunShim();
3
- import { r as __exportAll } from "./fs-promises-shim-Bx0fpxuk.mjs";
4
- import { C as warn, F as $flag, b as debug, t as structuredCloneJSON } from "./src-DUUqyo9y.mjs";
5
- import { A as isTransientStreamParseError, B as OpenAIHttpError, _ as AbortError, c as finalize, i as isProviderRetryableError, n as StreamTimeoutError, s as ProviderResponseError, t as ConfigurationError } from "./error-DdCn4m1q.mjs";
6
- import { A as toolWireSchema, F as normalizeSchemaForMoonshot, M as adaptSchemaForStrict, c as resolveCacheRetention, j as NO_STRICT, k as flattenExclusiveRequiredRootUnion, o as normalizeSystemPrompts, t as createOpenAIResponsesHistoryPayload, u as sanitizeOpenAIResponsesAssistantHistoryItemsForReplay, z as sanitizeSchemaForOpenAIResponses } from "./utils-BMmwLB0f.mjs";
7
- import { $ as getJuiceValue, A as applyResponsesCompatPolicy, At as withReplaySafeStreamRetry, E as applyOpenAIGatewayRouting, Et as mapToOpenAIResponsesToolChoice, F as buildResponsesInput, H as createOpenAIStrictToolsState, L as clearOpenAIStrictToolsState, M as applyVercelResponsesCacheControls, N as applyWireModelIdTransform, P as buildResponsesDeltaInput, St as shouldRetryWithoutStrictTools, T as applyOpenAIExtraBody, V as createInitialResponsesAssistantMessage, W as disableStrictToolsForScope, _t as resolveOpenAIOutputTokenParam, at as isCompiledGrammarTooLargeStrictError, bt as resolveReasoningSummaryOption, et as getOpenAIPromptCacheKey, ht as resolveOpenAICompatPolicy, n as getEnvApiKey, nt as getOpenAIStrictToolsScope, ot as isOpenAIResponsesProgressEvent, pt as processResponsesStream, rt as getOpenRouterResponsesSessionId, st as isStrictToolsDisabledForScope, tt as getOpenAIResponsesRoutingSessionId, vt as resolveOpenAIRequestSetup, w as applyCommonResponsesSamplingParams, wt as isForcedToolChoice, xt as shouldDropAutoToolChoiceForReasoning, yt as resolveOpenAIResponsesOutputClamp } from "./stream-DHdFrAG4.mjs";
8
- import { t as createAbortSourceTracker } from "./abort-BtBy5Svf.mjs";
9
- import { i as resolveCopilotRequestIdentity, o as wrapFetchForCopilotFallback } from "./github-copilot-headers-BGL8JO5c.mjs";
3
+ import { r as __exportAll } from "./fs-promises-shim-B2YFWkcd.mjs";
4
+ import { C as warn, F as $flag, b as debug, t as structuredCloneJSON } from "./src-AELUUb5U.mjs";
5
+ import { A as isTransientStreamParseError, B as OpenAIHttpError, _ as AbortError, c as finalize, i as isProviderRetryableError, n as StreamTimeoutError, s as ProviderResponseError, t as ConfigurationError } from "./error-O63pC8zg.mjs";
6
+ import { A as toolWireSchema, F as normalizeSchemaForMoonshot, M as adaptSchemaForStrict, c as resolveCacheRetention, j as NO_STRICT, k as flattenExclusiveRequiredRootUnion, o as normalizeSystemPrompts, t as createOpenAIResponsesHistoryPayload, u as sanitizeOpenAIResponsesAssistantHistoryItemsForReplay, z as sanitizeSchemaForOpenAIResponses } from "./utils-cZX3f_Ls.mjs";
7
+ import { $ as getJuiceValue, A as applyResponsesCompatPolicy, At as withReplaySafeStreamRetry, E as applyOpenAIGatewayRouting, Et as mapToOpenAIResponsesToolChoice, F as buildResponsesInput, H as createOpenAIStrictToolsState, L as clearOpenAIStrictToolsState, M as applyVercelResponsesCacheControls, N as applyWireModelIdTransform, P as buildResponsesDeltaInput, St as shouldRetryWithoutStrictTools, T as applyOpenAIExtraBody, V as createInitialResponsesAssistantMessage, W as disableStrictToolsForScope, _t as resolveOpenAIOutputTokenParam, at as isCompiledGrammarTooLargeStrictError, bt as resolveReasoningSummaryOption, et as getOpenAIPromptCacheKey, ht as resolveOpenAICompatPolicy, n as getEnvApiKey, nt as getOpenAIStrictToolsScope, ot as isOpenAIResponsesProgressEvent, pt as processResponsesStream, rt as getOpenRouterResponsesSessionId, st as isStrictToolsDisabledForScope, tt as getOpenAIResponsesRoutingSessionId, vt as resolveOpenAIRequestSetup, w as applyCommonResponsesSamplingParams, wt as isForcedToolChoice, xt as shouldDropAutoToolChoiceForReasoning, yt as resolveOpenAIResponsesOutputClamp } from "./stream-AVOoe5Hj.mjs";
8
+ import { t as createAbortSourceTracker } from "./abort-DZ54CaKU.mjs";
9
+ import { i as resolveCopilotRequestIdentity, o as wrapFetchForCopilotFallback } from "./github-copilot-headers-DnjGEbko.mjs";
10
10
  import { t as findStrictToolSchemaViolation } from "./strict-tool-validation-CBTz1dAA.mjs";
11
- import { t as AssistantMessageEventStream } from "./event-stream-ldcUvOA0.mjs";
12
- import { n as getOpenAIStreamFirstEventTimeoutMs, o as iterateWithIdleTimeout, r as getOpenAIStreamIdleTimeoutMs } from "./idle-iterator-DTBaEIbM.mjs";
11
+ import { t as AssistantMessageEventStream } from "./event-stream-BKEtb45Y.mjs";
12
+ import { n as getOpenAIStreamFirstEventTimeoutMs, o as iterateWithIdleTimeout, r as getOpenAIStreamIdleTimeoutMs } from "./idle-iterator-D0ZXEcUq.mjs";
13
13
  import { t as notifyProviderResponse } from "./provider-response-SqKSkkUc.mjs";
14
14
  import { n as planStableOpenAIEffort, r as compactGrammarDefinition, t as getOpenAIEffortControlState } from "./openai-configuration-update-xMYUjaK_.mjs";
15
- import { a as getOpenAIReasoningEffortFallback, c as postOpenAIStream, i as createOpenAIReasoningEffortFallbackState, n as clearOpenAIReasoningEffortFallbackState, o as rememberOpenAIReasoningEffortFallback, r as createOpenAIReasoningEffortFallbackKey, s as resolveOpenAIReasoningEffortFallback, t as applyOpenAIReasoningEffortFallback } from "./openai-reasoning-fallback-DFdD1ok5.mjs";
15
+ import { a as getOpenAIReasoningEffortFallback, c as postOpenAIStream, i as createOpenAIReasoningEffortFallbackState, n as clearOpenAIReasoningEffortFallbackState, o as rememberOpenAIReasoningEffortFallback, r as createOpenAIReasoningEffortFallbackKey, s as resolveOpenAIReasoningEffortFallback, t as applyOpenAIReasoningEffortFallback } from "./openai-reasoning-fallback-Ju-5pSR8.mjs";
16
16
  import { scheduler } from "node:timers/promises";
17
17
  //#region node_modules/.pnpm/@oh-my-pi+pi-ai@18.1.17/node_modules/@oh-my-pi/pi-ai/src/providers/openai-responses.ts
18
18
  var openai_responses_exports = /* @__PURE__ */ __exportAll({
@@ -1,7 +1,7 @@
1
1
  import { installBunShim as __installBunShim } from "./bun-shim.mjs";
2
2
  __installBunShim();
3
- import { E as CookieMap, N as $env, T as Cookie, w as $ } from "./src-DUUqyo9y.mjs";
4
- import { V as ProviderHttpError, f as OAuthError, g as OnPromptRequiredError, m as LoginCancelledError } from "./error-DdCn4m1q.mjs";
3
+ import { E as CookieMap, N as $env, T as Cookie, w as $ } from "./src-AELUUb5U.mjs";
4
+ import { V as ProviderHttpError, f as OAuthError, g as OnPromptRequiredError, m as LoginCancelledError } from "./error-O63pC8zg.mjs";
5
5
  import * as os from "node:os";
6
6
  //#region node_modules/.pnpm/@oh-my-pi+pi-ai@18.1.17/node_modules/@oh-my-pi/pi-ai/src/registry/oauth/perplexity.ts
7
7
  /**
@@ -1,6 +1,6 @@
1
1
  import { installBunShim as __installBunShim } from "./bun-shim.mjs";
2
2
  __installBunShim();
3
- import "./src-DUUqyo9y.mjs";
3
+ import "./src-AELUUb5U.mjs";
4
4
  import { n as isRecord } from "./type-guards-CttAANEx.mjs";
5
5
  //#region node_modules/.pnpm/@oh-my-pi+pi-catalog@18.1.17/node_modules/@oh-my-pi/pi-catalog/src/discovery/protobuf.ts
6
6
  const textEncoder = new TextEncoder();
@@ -1,7 +1,7 @@
1
1
  import { installBunShim as __installBunShim } from "./bun-shim.mjs";
2
2
  __installBunShim();
3
- import { b as debug } from "./src-DUUqyo9y.mjs";
4
- import { _ as AbortError, n as StreamTimeoutError, r as ValidationError } from "./error-DdCn4m1q.mjs";
3
+ import { b as debug } from "./src-AELUUb5U.mjs";
4
+ import { _ as AbortError, n as StreamTimeoutError, r as ValidationError } from "./error-O63pC8zg.mjs";
5
5
  import * as tls from "node:tls";
6
6
  import * as net from "node:net";
7
7
  //#region node_modules/.pnpm/@oh-my-pi+pi-ai@18.1.17/node_modules/@oh-my-pi/pi-ai/src/utils/proxy.ts
@@ -1,6 +1,6 @@
1
1
  import { installBunShim as __installBunShim } from "./bun-shim.mjs";
2
2
  __installBunShim();
3
- import { n as fs_promises_shim_exports } from "./fs-promises-shim-Bx0fpxuk.mjs";
3
+ import { n as fs_promises_shim_exports } from "./fs-promises-shim-B2YFWkcd.mjs";
4
4
  import "node:buffer";
5
5
  //#region node_modules/.pnpm/@oh-my-pi+pi-ai@18.1.17/node_modules/@oh-my-pi/pi-ai/src/utils/request-debug.ts
6
6
  const REQUEST_DEBUG_ENV = "PI_REQ_DEBUG";
@@ -1,12 +1,12 @@
1
1
  import { installBunShim as __installBunShim } from "./bun-shim.mjs";
2
2
  __installBunShim();
3
- import { n as fs_promises_shim_exports } from "./fs-promises-shim-Bx0fpxuk.mjs";
4
- import { $ as isEnoent, B as USER_AGENT, C as warn, G as getDocsRsCacheDir, N as $env, c as combineSignals, j as formatNumber, k as formatBytes, l as exec, s as Snowflake, y as parseFrontmatter } from "./src-DUUqyo9y.mjs";
5
- import { W as tryParseJson } from "./utils-BMmwLB0f.mjs";
6
- import { a as fetchBinary, c as getParallelExtractContent, i as convertWithMarkit, l as ensureTool, m as settings, n as asRecord, o as extractWithParallel, r as asString, s as findParallelApiKey, t as asNumber } from "./utils-DA8R1_Q8.mjs";
3
+ import { n as fs_promises_shim_exports } from "./fs-promises-shim-B2YFWkcd.mjs";
4
+ import { $ as isEnoent, B as USER_AGENT, C as warn, G as getDocsRsCacheDir, N as $env, c as combineSignals, j as formatNumber, k as formatBytes, l as exec, s as Snowflake, y as parseFrontmatter } from "./src-AELUUb5U.mjs";
5
+ import { W as tryParseJson } from "./utils-cZX3f_Ls.mjs";
6
+ import { a as fetchBinary, c as getParallelExtractContent, i as convertWithMarkit, l as ensureTool, m as settings, n as asRecord, o as extractWithParallel, r as asString, s as findParallelApiKey, t as asNumber } from "./utils-OUcqmx9L.mjs";
7
7
  import { n as isRecord } from "./type-guards-CttAANEx.mjs";
8
8
  import { r as throwIfAborted, t as ToolAbortError } from "./tool-errors-DoyxivAR.mjs";
9
- import { c as getLocalizedText, d as looksLikeHtml, i as decodeHtmlEntities, l as htmlToBasicMarkdown, o as formatIsoDate, r as buildResult, s as formatMediaDuration, u as loadPage } from "./types-DT9vgZ3S.mjs";
9
+ import { c as getLocalizedText, d as looksLikeHtml, i as decodeHtmlEntities, l as htmlToBasicMarkdown, o as formatIsoDate, r as buildResult, s as formatMediaDuration, u as loadPage } from "./types-BLrLohwK.mjs";
10
10
  import * as path$1 from "node:path";
11
11
  import * as os from "node:os";
12
12
  import { gunzipSync } from "node:zlib";
@@ -1,6 +1,6 @@
1
1
  import { installBunShim as __installBunShim } from "./bun-shim.mjs";
2
2
  __installBunShim();
3
- import { n as fs_promises_shim_exports } from "./fs-promises-shim-Bx0fpxuk.mjs";
3
+ import { n as fs_promises_shim_exports } from "./fs-promises-shim-B2YFWkcd.mjs";
4
4
  import * as fs from "node:fs";
5
5
  import { Process } from "@oh-my-pi/pi-natives";
6
6
  import * as path$1 from "node:path";