@xiaoso/dsh-tool-plus 0.1.10-beta.1 → 0.1.10-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{abort-BtBy5Svf.mjs → abort-DZ54CaKU.mjs} +1 -1
- package/lib/{alibaba-coding-plan-oxHCHJtG.mjs → alibaba-coding-plan-DODpkcqi.mjs} +2 -2
- package/lib/{alibaba-token-plan-B0WzvYnB.mjs → alibaba-token-plan-C6lpKCda.mjs} +2 -2
- package/lib/{amazon-bedrock-BvfYGhrD.mjs → amazon-bedrock-Dx0rr9dY.mjs} +6 -6
- package/lib/{anthropic-Id561lwb.mjs → anthropic-ClCw0PV_.mjs} +14 -14
- package/lib/{anthropic-C6-vdduI.mjs → anthropic-Dv_GGX6g.mjs} +2 -2
- package/lib/{anthropic-wire-Cb8AQ1tS.mjs → anthropic-wire-lbGAFzYb.mjs} +5 -5
- package/lib/{api-key-validation-BXJKlsJg.mjs → api-key-validation-MnMf_ihX.mjs} +1 -1
- package/lib/{azure-openai-responses-CGws_ijz.mjs → azure-openai-responses-WE_bgFWp.mjs} +9 -9
- package/lib/{browser-render-i7uYOl4f.mjs → browser-render-BZXt548F.mjs} +2 -2
- package/lib/client.js +131 -751
- package/lib/{cline-pass-Bwg3esu9.mjs → cline-pass-BT9CBEOj.mjs} +1 -1
- package/lib/{cloudflare-ai-gateway-B_kWnF30.mjs → cloudflare-ai-gateway-CrMa97Ap.mjs} +1 -1
- package/lib/{cloudflare-ai-gateway-BK6eadm9.mjs → cloudflare-ai-gateway-DReN6ohJ.mjs} +2 -2
- package/lib/{collapse-DU3g7d3B.mjs → collapse-CkMNRNr7.mjs} +1 -1
- package/lib/{coreweave-CkR_FlQi.mjs → coreweave-C68UgRQO.mjs} +2 -2
- package/lib/{cursor-BXx_5h4a.mjs → cursor-C6jaIJDg.mjs} +2 -2
- package/lib/{cursor-BcHwv8qq.mjs → cursor-D-XZYDf_.mjs} +9 -9
- package/lib/{cursor-BjWbJJLe.mjs → cursor-_gHHq-Dq.mjs} +2 -2
- package/lib/{cursor-proto-DPXXYx8S.mjs → cursor-proto-Cr_WEMuv.mjs} +1 -1
- package/lib/{devin-Ce3Wz8_E.mjs → devin-QpfTSl9H.mjs} +5 -5
- package/lib/{devin-proto-B6HwDwHK.mjs → devin-proto-DYhp4Ty6.mjs} +1 -1
- package/lib/{devin-BZBfzyIz.mjs → devin-u0ljw5P6.mjs} +6 -6
- package/lib/{error-DdCn4m1q.mjs → error-O63pC8zg.mjs} +1 -1
- package/lib/{event-stream-ldcUvOA0.mjs → event-stream-BKEtb45Y.mjs} +1 -1
- package/lib/{fs-promises-shim-Bx0fpxuk.mjs → fs-promises-shim-B2YFWkcd.mjs} +1 -0
- package/lib/{github-copilot-BT5dkIJl.mjs → github-copilot-BMEcw8N1.mjs} +2 -2
- package/lib/{github-copilot-headers-BGL8JO5c.mjs → github-copilot-headers-DnjGEbko.mjs} +2 -2
- package/lib/{gitlab-duo-B0qSYCa3.mjs → gitlab-duo-DnHqJjFY.mjs} +1 -1
- package/lib/{google-antigravity-D1llOVad.mjs → google-antigravity-B1mSckrK.mjs} +3 -3
- package/lib/{google-auth-DYhqX1rJ.mjs → google-auth-qAN-6DMW.mjs} +3 -3
- package/lib/{google-gemini-cli-ByQUuKp9.mjs → google-gemini-cli-B2Aw1S5w.mjs} +7 -7
- package/lib/{google-gemini-cli-CjHy6mFG.mjs → google-gemini-cli-DJwThCCn.mjs} +3 -3
- package/lib/{google-6cRgRmh0.mjs → google-lTxuq28n.mjs} +3 -3
- package/lib/{google-oauth-shared-CSwCT0Yl.mjs → google-oauth-shared-BctLpVUN.mjs} +1 -1
- package/lib/{google-shared-DYjJp0mQ.mjs → google-shared-Y01j9xOr.mjs} +5 -5
- package/lib/{google-vertex-CbOvlE5j.mjs → google-vertex-DcM-FRC5.mjs} +4 -4
- package/lib/{idle-iterator-DTBaEIbM.mjs → idle-iterator-D0ZXEcUq.mjs} +2 -2
- package/lib/index.mjs +120 -16
- package/lib/{kilo-cVG1aNZM.mjs → kilo-BEgEwMJQ.mjs} +1 -1
- package/lib/{kimi-BFfnFDhu.mjs → kimi-T9NldEIJ.mjs} +2 -2
- package/lib/{launch-Uq7920ng.mjs → launch-BIWNyrBB.mjs} +1 -1
- package/lib/{markit-BmsfOFVh.mjs → markit-Dvp2JPdT.mjs} +4 -4
- package/lib/{muse-code-CtcevJab.mjs → muse-code-CNvqqAp6.mjs} +2 -2
- package/lib/{ollama-B5hR1P1p.mjs → ollama-6R0oXZks.mjs} +9 -9
- package/lib/{openai-codex-CxkPyvyt.mjs → openai-codex-D5-CyTxa.mjs} +2 -2
- package/lib/{openai-codex-responses-BbM3Q7nJ.mjs → openai-codex-responses-C8bnBWOe.mjs} +11 -11
- package/lib/{openai-completions-CffXVOCL.mjs → openai-completions-DNr3mUsn.mjs} +15 -15
- package/lib/{openai-reasoning-fallback-DFdD1ok5.mjs → openai-reasoning-fallback-Ju-5pSR8.mjs} +2 -2
- package/lib/{openai-responses-DgqOvSn_.mjs → openai-responses-CjpafAEr.mjs} +10 -10
- package/lib/{perplexity-JFp3knZN.mjs → perplexity-A2PEoGaC.mjs} +2 -2
- package/lib/{protobuf-BJHNU9-E.mjs → protobuf-BMgDYu_U.mjs} +1 -1
- package/lib/{proxy-B51IWEMt.mjs → proxy-DxvCQOCA.mjs} +2 -2
- package/lib/{request-debug-NQN0BjHH.mjs → request-debug-BwPOqN_j.mjs} +1 -1
- package/lib/{scrapers-DODCPcZW.mjs → scrapers-C6EY0T00.mjs} +5 -5
- package/lib/{src-DUUqyo9y.mjs → src-AELUUb5U.mjs} +1 -1
- package/lib/{stream-DHdFrAG4.mjs → stream-AVOoe5Hj.mjs} +46 -46
- package/lib/{stream-markup-healing-DlJ9abTw.mjs → stream-markup-healing-CN3RsqG9.mjs} +2 -2
- package/lib/{thinking-D6LJxkz_.mjs → thinking-ngMwf_1Y.mjs} +1 -1
- package/lib/{turndown-DrX1M4WG.mjs → turndown-D6fof1OX.mjs} +1 -1
- package/lib/types/client/index.d.ts +18 -14
- package/lib/types/host/win32-console.d.ts +54 -0
- package/lib/{types-DT9vgZ3S.mjs → types-BLrLohwK.mjs} +2 -2
- package/lib/{utils-D80w8vry.mjs → utils-BZWfyz9e.mjs} +28 -28
- package/lib/{utils-D31VFael.mjs → utils-I4I8azHN.mjs} +1 -1
- package/lib/{utils-BMmwLB0f.mjs → utils-cZX3f_Ls.mjs} +2 -2
- package/lib/{vision-guard-BlAAqGUC.mjs → vision-guard-BCpXWUj3.mjs} +1 -1
- package/lib/{xai-oauth-QPyScm4X.mjs → xai-oauth-CbeldUSV.mjs} +2 -2
- package/lib/{xiaomi-CLzjxHAi.mjs → xiaomi-Dl3VSs04.mjs} +1 -1
- package/lib/{zai-wDp0g7VC.mjs → zai-FyjGSypr.mjs} +1 -1
- package/lib/{zip-CNtIFfyV.mjs → zip-DRrycScC.mjs} +1 -1
- package/package.json +169 -166
- package/lib/types/client/BashPlusCard.d.ts +0 -53
|
@@ -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-
|
|
4
|
-
import { H as getAgentDir } from "./src-
|
|
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-
|
|
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-
|
|
4
|
-
import { k as formatBytes } from "./src-
|
|
5
|
-
import { l as unzip, u as unzipText } from "./zip-
|
|
6
|
-
import { n as normalizeTablesHtml, t as createTurndown } from "./turndown-
|
|
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-
|
|
4
|
-
import { f as OAuthError, t as ConfigurationError } from "./error-
|
|
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-
|
|
4
|
-
import { _ as parseStreamingJson, i as readJsonl } from "./src-
|
|
5
|
-
import { G as fetchWithRetry, c as finalize, h as MissingApiKeyError, y as LLAMA_CPP_TOOL_CALL_PARSE_PATTERN, z as OllamaApiError } from "./error-
|
|
6
|
-
import { A as toolWireSchema, R as sanitizeSchemaForOllama, g as clearStreamingPartialJson, h as transformMessages, o as normalizeSystemPrompts, w as kStreamingPartialJson } from "./utils-
|
|
7
|
-
import { At as withReplaySafeStreamRetry, n as getEnvApiKey } from "./stream-
|
|
8
|
-
import { i as partitionVisionContent, r as joinTextWithImagePlaceholder } from "./vision-guard-
|
|
9
|
-
import { t as AssistantMessageEventStream } from "./event-stream-
|
|
10
|
-
import { n as getOpenAIStreamFirstEventTimeoutMs, r as getOpenAIStreamIdleTimeoutMs, t as armPreResponseTimeout } from "./idle-iterator-
|
|
11
|
-
import { n as getStreamMarkupHealingPattern, t as StreamMarkupHealing } from "./stream-markup-healing-
|
|
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-
|
|
4
|
-
import "./utils-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
9
|
-
import { a as toNumber } from "./utils-
|
|
10
|
-
import { o as requireSupportedEffort } from "./anthropic-wire-
|
|
11
|
-
import { n as getProxyForUrl } from "./proxy-
|
|
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-
|
|
15
|
-
import { n as getOpenAIStreamFirstEventTimeoutMs, o as iterateWithIdleTimeout, r as getOpenAIStreamIdleTimeoutMs, t as armPreResponseTimeout } from "./idle-iterator-
|
|
16
|
-
import { n as isRequestDebugEnabled, t as createRequestDebugSession } from "./request-debug-
|
|
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-
|
|
4
|
-
import { C as warn, N as $env, _ as parseStreamingJson, v as parseStreamingJsonThrottled } from "./src-
|
|
5
|
-
import { B as OpenAIHttpError, V as ProviderHttpError, _ as AbortError, c as finalize, n as StreamTimeoutError, s as ProviderResponseError, t as ConfigurationError } from "./error-
|
|
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-
|
|
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-
|
|
8
|
-
import { s as resolveWireModelId } from "./anthropic-wire-
|
|
9
|
-
import { t as createAbortSourceTracker } from "./abort-
|
|
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-
|
|
12
|
-
import { n as isOpenAICompletionsVisionSupported, r as joinTextWithImagePlaceholder, t as NON_VISION_IMAGE_PLACEHOLDER } from "./vision-guard-
|
|
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-
|
|
15
|
-
import { n as clinePassClientHeaders } from "./cline-pass-
|
|
16
|
-
import { n as getOpenAIStreamFirstEventTimeoutMs, o as iterateWithIdleTimeout, r as getOpenAIStreamIdleTimeoutMs, s as iterateWithTerminalGrace } from "./idle-iterator-
|
|
17
|
-
import { t as getKimiCommonHeaders } from "./kimi-
|
|
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-
|
|
20
|
-
import { t as StreamMarkupHealing } from "./stream-markup-healing-
|
|
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,
|
package/lib/{openai-reasoning-fallback-DFdD1ok5.mjs → openai-reasoning-fallback-Ju-5pSR8.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { installBunShim as __installBunShim } from "./bun-shim.mjs";
|
|
2
2
|
__installBunShim();
|
|
3
|
-
import { o as readSseJson } from "./src-
|
|
4
|
-
import { B as OpenAIHttpError, G as fetchWithRetry, W as extractHttpStatusFromError, s as ProviderResponseError } from "./error-
|
|
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-
|
|
4
|
-
import { C as warn, F as $flag, b as debug, t as structuredCloneJSON } from "./src-
|
|
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-
|
|
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-
|
|
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-
|
|
8
|
-
import { t as createAbortSourceTracker } from "./abort-
|
|
9
|
-
import { i as resolveCopilotRequestIdentity, o as wrapFetchForCopilotFallback } from "./github-copilot-headers-
|
|
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-
|
|
12
|
-
import { n as getOpenAIStreamFirstEventTimeoutMs, o as iterateWithIdleTimeout, r as getOpenAIStreamIdleTimeoutMs } from "./idle-iterator-
|
|
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-
|
|
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-
|
|
4
|
-
import { V as ProviderHttpError, f as OAuthError, g as OnPromptRequiredError, m as LoginCancelledError } from "./error-
|
|
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-
|
|
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-
|
|
4
|
-
import { _ as AbortError, n as StreamTimeoutError, r as ValidationError } from "./error-
|
|
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-
|
|
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-
|
|
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-
|
|
5
|
-
import { W as tryParseJson } from "./utils-
|
|
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-
|
|
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-BZWfyz9e.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-
|
|
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-
|
|
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";
|
|
@@ -1,37 +1,37 @@
|
|
|
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-
|
|
4
|
-
import { B as USER_AGENT, C as warn, I as $pickenv, N as $env, _ as parseStreamingJson, h as classifyJsonPrefix, p as parseImageMetadata, q as getInstallId, rt as once, t as structuredCloneJSON, v as parseStreamingJsonThrottled } from "./src-
|
|
5
|
-
import { C as classify, E as is, G as fetchWithRetry, W as extractHttpStatusFromError, f as OAuthError, g as OnPromptRequiredError, h as MissingApiKeyError, i as isProviderRetryableError, m as LoginCancelledError, p as ApiKeyRequiredError, s as ProviderResponseError, t as ConfigurationError, v as Flag } from "./error-
|
|
6
|
-
import { C as kStreamingLastParseLen, H as getBundledModelReferenceIndex, U as stringifyJson, a as normalizeResponsesToolCallId, c as resolveCacheRetention, d as sanitizeOpenAIResponsesHistoryItemsForReplay, g as clearStreamingPartialJson, h as transformMessages, i as getOpenAIResponsesHistoryPayload, l as sanitizeOpenAIResponsesAssistantFallbackItemsForReplay, o as normalizeSystemPrompts, p as stripUnpairedOpenAIResponsesComputerReasoningIdsForReplay, r as getOpenAIResponsesHistoryItems, u as sanitizeOpenAIResponsesAssistantHistoryItemsForReplay, w as kStreamingPartialJson, y as kStreamingArgumentsDone } from "./utils-
|
|
3
|
+
import { n as fs_promises_shim_exports } from "./fs-promises-shim-B2YFWkcd.mjs";
|
|
4
|
+
import { B as USER_AGENT, C as warn, I as $pickenv, N as $env, _ as parseStreamingJson, h as classifyJsonPrefix, p as parseImageMetadata, q as getInstallId, rt as once, t as structuredCloneJSON, v as parseStreamingJsonThrottled } from "./src-AELUUb5U.mjs";
|
|
5
|
+
import { C as classify, E as is, G as fetchWithRetry, W as extractHttpStatusFromError, f as OAuthError, g as OnPromptRequiredError, h as MissingApiKeyError, i as isProviderRetryableError, m as LoginCancelledError, p as ApiKeyRequiredError, s as ProviderResponseError, t as ConfigurationError, v as Flag } from "./error-O63pC8zg.mjs";
|
|
6
|
+
import { C as kStreamingLastParseLen, H as getBundledModelReferenceIndex, U as stringifyJson, a as normalizeResponsesToolCallId, c as resolveCacheRetention, d as sanitizeOpenAIResponsesHistoryItemsForReplay, g as clearStreamingPartialJson, h as transformMessages, i as getOpenAIResponsesHistoryPayload, l as sanitizeOpenAIResponsesAssistantFallbackItemsForReplay, o as normalizeSystemPrompts, p as stripUnpairedOpenAIResponsesComputerReasoningIdsForReplay, r as getOpenAIResponsesHistoryItems, u as sanitizeOpenAIResponsesAssistantHistoryItemsForReplay, w as kStreamingPartialJson, y as kStreamingArgumentsDone } from "./utils-cZX3f_Ls.mjs";
|
|
7
7
|
import { n as isRecord } from "./type-guards-CttAANEx.mjs";
|
|
8
8
|
import { d as compareRevision, f as parseRevision, l as auth, n as classifyModel, s as globMatch, t as billingVariantPlain, u as behavior$1 } from "./taxonomy-DSIM99rS.mjs";
|
|
9
9
|
import { r as parseAlibabaTokenPlanCredential, t as ALIBABA_TOKEN_PLAN_BASE_URL } from "./alibaba-token-plan-CHGyWOfX.mjs";
|
|
10
|
-
import { a as toNumber, i as toBoolean, n as discoveryFetch, o as toPositiveNumber, r as isAnthropicOAuthToken } from "./utils-
|
|
11
|
-
import { a as parseCloudflareAiGatewayCredential, i as CLOUDFLARE_AI_GATEWAY_OPENAI_BASE_URL, r as CLOUDFLARE_AI_GATEWAY_COMPAT_BASE_URL, t as CLOUDFLARE_AI_GATEWAY_ANTHROPIC_BASE_URL } from "./cloudflare-ai-gateway-
|
|
12
|
-
import { c as invalidateAwsCredentialCache, d as resolveAwsBearerToken, f as resolveAwsRegistryApiKey, h as resolveAwsRegion, i as getSupportedEfforts, l as resolveAwsCredentials, p as AUTHENTICATED_SENTINEL, u as signRequest } from "./anthropic-wire-
|
|
13
|
-
import "./abort-
|
|
14
|
-
import "./proxy-
|
|
10
|
+
import { a as toNumber, i as toBoolean, n as discoveryFetch, o as toPositiveNumber, r as isAnthropicOAuthToken } from "./utils-I4I8azHN.mjs";
|
|
11
|
+
import { a as parseCloudflareAiGatewayCredential, i as CLOUDFLARE_AI_GATEWAY_OPENAI_BASE_URL, r as CLOUDFLARE_AI_GATEWAY_COMPAT_BASE_URL, t as CLOUDFLARE_AI_GATEWAY_ANTHROPIC_BASE_URL } from "./cloudflare-ai-gateway-CrMa97Ap.mjs";
|
|
12
|
+
import { c as invalidateAwsCredentialCache, d as resolveAwsBearerToken, f as resolveAwsRegistryApiKey, h as resolveAwsRegion, i as getSupportedEfforts, l as resolveAwsCredentials, p as AUTHENTICATED_SENTINEL, u as signRequest } from "./anthropic-wire-lbGAFzYb.mjs";
|
|
13
|
+
import "./abort-DZ54CaKU.mjs";
|
|
14
|
+
import "./proxy-DxvCQOCA.mjs";
|
|
15
15
|
import { n as THINKING_EFFORTS } from "./effort-BdtQMN-_.mjs";
|
|
16
16
|
import { r as getBundledModels, t as calculateCost } from "./models-DnXMYGcJ.mjs";
|
|
17
17
|
import { i as removeBlankCoreWeaveProjectHeaders, n as coreWeaveProjectHeaders, r as hasCoreWeaveProjectHeader, t as COREWEAVE_PROJECT_HEADER } from "./coreweave-C82HrLpb.mjs";
|
|
18
|
-
import { a as resolveGitHubCopilotBaseUrl, b as parseGitHubCopilotApiKey, f as discoverGitHubCopilotApiEndpoint, g as mergeCopilotApiHeaders, i as resolveCopilotRequestIdentity, l as COPILOT_DISCOVERY_HEADERS, m as isPersonalGitHubCopilotBaseUrl, n as hasCopilotVisionInput, p as getGitHubCopilotBaseUrl, s as COPILOT_API_HEADERS, t as buildCopilotDynamicHeaders } from "./github-copilot-headers-
|
|
19
|
-
import { i as partitionVisionContent, o as shouldSendServiceTier, r as joinTextWithImagePlaceholder, t as NON_VISION_IMAGE_PLACEHOLDER } from "./vision-guard-
|
|
18
|
+
import { a as resolveGitHubCopilotBaseUrl, b as parseGitHubCopilotApiKey, f as discoverGitHubCopilotApiEndpoint, g as mergeCopilotApiHeaders, i as resolveCopilotRequestIdentity, l as COPILOT_DISCOVERY_HEADERS, m as isPersonalGitHubCopilotBaseUrl, n as hasCopilotVisionInput, p as getGitHubCopilotBaseUrl, s as COPILOT_API_HEADERS, t as buildCopilotDynamicHeaders } from "./github-copilot-headers-DnjGEbko.mjs";
|
|
19
|
+
import { i as partitionVisionContent, o as shouldSendServiceTier, r as joinTextWithImagePlaceholder, t as NON_VISION_IMAGE_PLACEHOLDER } from "./vision-guard-BCpXWUj3.mjs";
|
|
20
20
|
import { r as resolveModelReference } from "./reference-CtvM4zLU.mjs";
|
|
21
|
-
import { t as AssistantMessageEventStream } from "./event-stream-
|
|
22
|
-
import { n as validateApiKeyAgainstModelsEndpoint, r as validateOpenAICompatibleApiKey, t as validateAnthropicCompatibleApiKey } from "./api-key-validation-
|
|
21
|
+
import { t as AssistantMessageEventStream } from "./event-stream-BKEtb45Y.mjs";
|
|
22
|
+
import { n as validateApiKeyAgainstModelsEndpoint, r as validateOpenAICompatibleApiKey, t as validateAnthropicCompatibleApiKey } from "./api-key-validation-MnMf_ihX.mjs";
|
|
23
23
|
import { t as generatePKCE } from "./pkce-BYjmugmw.mjs";
|
|
24
|
-
import { r as claudeCodeSdkVersion } from "./anthropic-
|
|
25
|
-
import { n as buildModel, r as resolveModelPolicy } from "./collapse-
|
|
26
|
-
import { n as parseMuseCodeCredential } from "./muse-code-
|
|
24
|
+
import { r as claudeCodeSdkVersion } from "./anthropic-Dv_GGX6g.mjs";
|
|
25
|
+
import { n as buildModel, r as resolveModelPolicy } from "./collapse-CkMNRNr7.mjs";
|
|
26
|
+
import { n as parseMuseCodeCredential } from "./muse-code-CNvqqAp6.mjs";
|
|
27
27
|
import { n as createReferenceResolver, r as toModelSpec, t as createBundledReferenceMap } from "./bundled-references-DY3EJxZV.mjs";
|
|
28
|
-
import { n as clinePassClientHeaders, t as CLINEPASS_API_BASE_URL } from "./cline-pass-
|
|
28
|
+
import { n as clinePassClientHeaders, t as CLINEPASS_API_BASE_URL } from "./cline-pass-BT9CBEOj.mjs";
|
|
29
29
|
import { t as DEVIN_DEFAULT_BASE_URL } from "./devin-ExGIghmx.mjs";
|
|
30
|
-
import "./idle-iterator-
|
|
31
|
-
import "./google-auth-
|
|
32
|
-
import "./kimi-
|
|
33
|
-
import "./thinking-
|
|
34
|
-
import "./request-debug-
|
|
30
|
+
import "./idle-iterator-D0ZXEcUq.mjs";
|
|
31
|
+
import "./google-auth-qAN-6DMW.mjs";
|
|
32
|
+
import "./kimi-T9NldEIJ.mjs";
|
|
33
|
+
import "./thinking-ngMwf_1Y.mjs";
|
|
34
|
+
import "./request-debug-BwPOqN_j.mjs";
|
|
35
35
|
import * as fs from "node:fs";
|
|
36
36
|
import { NativeOAuthCallback } from "@oh-my-pi/pi-natives";
|
|
37
37
|
import * as path$1 from "node:path";
|
|
@@ -2937,32 +2937,32 @@ const bedrockMantleTransport = {
|
|
|
2937
2937
|
//#endregion
|
|
2938
2938
|
//#region node_modules/.pnpm/@oh-my-pi+pi-ai@18.1.17/node_modules/@oh-my-pi/pi-ai/src/registry/hooks/api-key.ts
|
|
2939
2939
|
const API_KEY_HEADERS_HOOKS = {
|
|
2940
|
-
"coreweave-project": () => import("./coreweave-
|
|
2941
|
-
"cline-pass-client": () => import("./cline-pass-
|
|
2940
|
+
"coreweave-project": () => import("./coreweave-C68UgRQO.mjs").then((m) => m.requireCoreWeaveProjectHeaders),
|
|
2941
|
+
"cline-pass-client": () => import("./cline-pass-BT9CBEOj.mjs").then((n) => n.r).then((m) => m.clinePassClientHeaders)
|
|
2942
2942
|
};
|
|
2943
2943
|
const API_KEY_LOGIN_HOOKS = {
|
|
2944
|
-
"alibaba-coding-plan": () => import("./alibaba-coding-plan-
|
|
2945
|
-
"alibaba-token-plan": () => import("./alibaba-token-plan-
|
|
2946
|
-
"cloudflare-ai-gateway": () => import("./cloudflare-ai-gateway-
|
|
2947
|
-
kilo: () => import("./kilo-
|
|
2948
|
-
xiaomi: () => import("./xiaomi-
|
|
2944
|
+
"alibaba-coding-plan": () => import("./alibaba-coding-plan-DODpkcqi.mjs").then((m) => m.loginAlibabaCodingPlan),
|
|
2945
|
+
"alibaba-token-plan": () => import("./alibaba-token-plan-C6lpKCda.mjs").then((m) => m.loginAlibabaTokenPlan),
|
|
2946
|
+
"cloudflare-ai-gateway": () => import("./cloudflare-ai-gateway-DReN6ohJ.mjs").then((m) => m.loginCloudflareAiGateway),
|
|
2947
|
+
kilo: () => import("./kilo-BEgEwMJQ.mjs").then((m) => m.loginKilo),
|
|
2948
|
+
xiaomi: () => import("./xiaomi-Dl3VSs04.mjs").then((m) => m.loginXiaomi)
|
|
2949
2949
|
};
|
|
2950
2950
|
//#endregion
|
|
2951
2951
|
//#region node_modules/.pnpm/@oh-my-pi+pi-ai@18.1.17/node_modules/@oh-my-pi/pi-ai/src/registry/hooks/custom.ts
|
|
2952
2952
|
const CUSTOM_LOGIN_HOOKS = {
|
|
2953
|
-
"github-copilot": () => import("./github-copilot-
|
|
2954
|
-
cursor: () => import("./cursor-
|
|
2955
|
-
perplexity: () => import("./perplexity-
|
|
2953
|
+
"github-copilot": () => import("./github-copilot-BMEcw8N1.mjs").then((module) => module.loginGitHubCopilotHook),
|
|
2954
|
+
cursor: () => import("./cursor-_gHHq-Dq.mjs").then((n) => n.t).then((module) => module.loginCursorHook),
|
|
2955
|
+
perplexity: () => import("./perplexity-A2PEoGaC.mjs").then((module) => module.loginPerplexity)
|
|
2956
2956
|
};
|
|
2957
2957
|
const CUSTOM_REFRESH_HOOKS = {
|
|
2958
|
-
"github-copilot": () => import("./github-copilot-
|
|
2959
|
-
cursor: () => import("./cursor-
|
|
2958
|
+
"github-copilot": () => import("./github-copilot-BMEcw8N1.mjs").then((module) => module.refreshGitHubCopilotHook),
|
|
2959
|
+
cursor: () => import("./cursor-_gHHq-Dq.mjs").then((n) => n.t).then((module) => module.refreshCursorHook)
|
|
2960
2960
|
};
|
|
2961
2961
|
//#endregion
|
|
2962
2962
|
//#region node_modules/.pnpm/@oh-my-pi+pi-ai@18.1.17/node_modules/@oh-my-pi/pi-ai/src/registry/hooks/device-code.ts
|
|
2963
|
-
const DEVICE_CODE_HEADERS_HOOKS = { "kimi-fingerprint": () => import("./kimi-
|
|
2964
|
-
const DEVICE_CODE_VALUE_HOOKS = { "xai-token-endpoint": () => import("./xai-oauth-
|
|
2965
|
-
const DEVICE_CODE_AFTER_EXCHANGE_HOOKS = { "muse-code-key": () => import("./muse-code-
|
|
2963
|
+
const DEVICE_CODE_HEADERS_HOOKS = { "kimi-fingerprint": () => import("./kimi-T9NldEIJ.mjs").then((n) => n.n).then((module) => module.getKimiCommonHeaders) };
|
|
2964
|
+
const DEVICE_CODE_VALUE_HOOKS = { "xai-token-endpoint": () => import("./xai-oauth-CbeldUSV.mjs").then((n) => n.a).then((module) => module.getXAITokenEndpoint) };
|
|
2965
|
+
const DEVICE_CODE_AFTER_EXCHANGE_HOOKS = { "muse-code-key": () => import("./muse-code-CNvqqAp6.mjs").then((n) => n.t).then((module) => module.attachMuseCodeApiKey) };
|
|
2966
2966
|
//#endregion
|
|
2967
2967
|
//#region node_modules/.pnpm/@oh-my-pi+pi-ai@18.1.17/node_modules/@oh-my-pi/pi-ai/src/utils/foundry.ts
|
|
2968
2968
|
function isFoundryEnabled() {
|
|
@@ -2999,15 +2999,15 @@ const ENV_HOOKS = {
|
|
|
2999
2999
|
//#endregion
|
|
3000
3000
|
//#region node_modules/.pnpm/@oh-my-pi+pi-ai@18.1.17/node_modules/@oh-my-pi/pi-ai/src/registry/hooks/oauth-code.ts
|
|
3001
3001
|
const OAUTH_CODE_AFTER_EXCHANGE_HOOKS = {
|
|
3002
|
-
"anthropic-identity": () => import("./anthropic-
|
|
3003
|
-
"gitlab-duo-clear-cache": () => import("./gitlab-duo-
|
|
3004
|
-
"openai-codex-profile": () => import("./openai-codex-
|
|
3005
|
-
"zai-mint-key": () => import("./zai-
|
|
3006
|
-
"google-gemini-cli-project": () => import("./google-gemini-cli-
|
|
3007
|
-
"google-antigravity-project": () => import("./google-antigravity-
|
|
3002
|
+
"anthropic-identity": () => import("./anthropic-Dv_GGX6g.mjs").then((n) => n.t).then((m) => m.anthropicIdentityHook),
|
|
3003
|
+
"gitlab-duo-clear-cache": () => import("./gitlab-duo-DnHqJjFY.mjs").then((m) => m.gitLabDuoClearCacheHook),
|
|
3004
|
+
"openai-codex-profile": () => import("./openai-codex-D5-CyTxa.mjs").then((m) => m.openAICodexProfileHook),
|
|
3005
|
+
"zai-mint-key": () => import("./zai-FyjGSypr.mjs").then((m) => m.zaiMintKeyHook),
|
|
3006
|
+
"google-gemini-cli-project": () => import("./google-gemini-cli-DJwThCCn.mjs").then((m) => m.googleGeminiCliProjectHook),
|
|
3007
|
+
"google-antigravity-project": () => import("./google-antigravity-B1mSckrK.mjs").then((m) => m.googleAntigravityProjectHook)
|
|
3008
3008
|
};
|
|
3009
3009
|
const OAUTH_CODE_VALUE_HOOKS = {};
|
|
3010
|
-
const OAUTH_CODE_LOGIN_HOOKS = { "openai-codex-device": () => import("./openai-codex-
|
|
3010
|
+
const OAUTH_CODE_LOGIN_HOOKS = { "openai-codex-device": () => import("./openai-codex-D5-CyTxa.mjs").then((m) => m.loginOpenAICodexDevice) };
|
|
3011
3011
|
//#endregion
|
|
3012
3012
|
//#region node_modules/.pnpm/@oh-my-pi+pi-ai@18.1.17/node_modules/@oh-my-pi/pi-ai/src/registry/hooks/index.ts
|
|
3013
3013
|
/**
|
|
@@ -10649,7 +10649,7 @@ function cursorModelManagerOptions(config = {}) {
|
|
|
10649
10649
|
} } : void 0
|
|
10650
10650
|
};
|
|
10651
10651
|
}
|
|
10652
|
-
const cursorDiscovery = once(() => import("./cursor-
|
|
10652
|
+
const cursorDiscovery = once(() => import("./cursor-C6jaIJDg.mjs"));
|
|
10653
10653
|
function gitLabDuoWorkflowModelManagerOptions(config = {}) {
|
|
10654
10654
|
const apiKey = config.apiKey;
|
|
10655
10655
|
return {
|
|
@@ -10747,7 +10747,7 @@ function devinModelManagerOptions(config = {}) {
|
|
|
10747
10747
|
} } : void 0
|
|
10748
10748
|
};
|
|
10749
10749
|
}
|
|
10750
|
-
const devinDiscovery = once(() => import("./devin-
|
|
10750
|
+
const devinDiscovery = once(() => import("./devin-QpfTSl9H.mjs"));
|
|
10751
10751
|
/** Creates model-manager options for Z.AI's mixed native and Anthropic transports. */
|
|
10752
10752
|
function zaiModelManagerOptions(_config = {}) {
|
|
10753
10753
|
return { providerId: "zai" };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { installBunShim as __installBunShim } from "./bun-shim.mjs";
|
|
2
2
|
__installBunShim();
|
|
3
|
-
import { E as createInbandScanner } from "./utils-
|
|
4
|
-
import { t as ThinkingInbandScanner } from "./thinking-
|
|
3
|
+
import { E as createInbandScanner } from "./utils-cZX3f_Ls.mjs";
|
|
4
|
+
import { t as ThinkingInbandScanner } from "./thinking-ngMwf_1Y.mjs";
|
|
5
5
|
//#region node_modules/.pnpm/@oh-my-pi+pi-ai@18.1.17/node_modules/@oh-my-pi/pi-ai/src/dialect/qwen-xml.ts
|
|
6
6
|
const SECTION_OPEN = "<tool_calls>";
|
|
7
7
|
const SECTION_CLOSE = "</tool_calls>";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { installBunShim as __installBunShim } from "./bun-shim.mjs";
|
|
2
2
|
__installBunShim();
|
|
3
|
-
import { D as FencedThinkingScanner, O as partialSuffixOverlapAny } from "./utils-
|
|
3
|
+
import { D as FencedThinkingScanner, O as partialSuffixOverlapAny } from "./utils-cZX3f_Ls.mjs";
|
|
4
4
|
//#region node_modules/.pnpm/@oh-my-pi+pi-ai@18.1.17/node_modules/@oh-my-pi/pi-ai/src/dialect/thinking.ts
|
|
5
5
|
/**
|
|
6
6
|
* Every dialect's in-band thinking section in its canonical `renderThinking`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { installBunShim as __installBunShim } from "./bun-shim.mjs";
|
|
2
2
|
__installBunShim();
|
|
3
|
-
import { r as __exportAll } from "./fs-promises-shim-
|
|
3
|
+
import { r as __exportAll } from "./fs-promises-shim-B2YFWkcd.mjs";
|
|
4
4
|
//#region node_modules/.pnpm/@oh-my-pi+pi-utils@18.1.17/node_modules/@oh-my-pi/pi-utils/src/turndown/gfm.ts
|
|
5
5
|
function descendantElements(node, name) {
|
|
6
6
|
const matches = [];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Tool-plus settings
|
|
3
|
-
*
|
|
2
|
+
* Tool-plus settings surface, browser half: the plugin's own Settings
|
|
3
|
+
* navigation page and the binding of the `tool-plus` namespace it reads and
|
|
4
|
+
* writes.
|
|
4
5
|
*
|
|
5
6
|
* dsh 0.1.7 replaced the settings surface contract this file used to speak:
|
|
6
7
|
*
|
|
@@ -9,20 +10,23 @@
|
|
|
9
10
|
* form for one Host entry, keyed by the settings namespace (the entry's own
|
|
10
11
|
* id, which this package spells `tool-plus` because a client package must
|
|
11
12
|
* not depend on the Host package that registers it);
|
|
12
|
-
* - the keyed `settings.plugin.item` card slot is gone.
|
|
13
|
-
*
|
|
14
|
-
* (`settings.plugins.tab`)
|
|
15
|
-
* (`
|
|
16
|
-
*
|
|
13
|
+
* - the keyed `settings.plugin.item` card slot is gone. Its 0.1.7
|
|
14
|
+
* replacement — a tab inside the official Plugins section
|
|
15
|
+
* (`settings.plugins.tab`) — is deliberately NOT used: this plugin already
|
|
16
|
+
* ships a full Settings page of its own (`settings.section`, id
|
|
17
|
+
* `tool-plus`) that carries every tool's configuration, so a second entry
|
|
18
|
+
* point inside the Plugins page would only duplicate it and split the one
|
|
19
|
+
* form across two surfaces;
|
|
20
|
+
* - the page registers through `configForms.whileServed([ns], ...)`, so a
|
|
17
21
|
* deployment whose Host does not serve the `tool-plus` namespace shows no
|
|
18
|
-
* trace of
|
|
22
|
+
* trace of it (the official rule: a page for a namespace nobody serves is
|
|
19
23
|
* never dispatched).
|
|
20
24
|
*
|
|
21
|
-
* The
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
25
|
+
* The navigation page (`settings.section`, id `tool-plus`) keeps its order
|
|
26
|
+
* right after the Plugins section. Only officially exported APIs are used (the
|
|
27
|
+
* `dsh-client-ui-slots` slot registry, the `dsh-client-locale` dictionary
|
|
28
|
+
* registration, the `dsh-client-ui-settings` configuration forms, and this
|
|
29
|
+
* package's own section component).
|
|
26
30
|
*
|
|
27
31
|
* @module @xiaoso/dsh-tool-plus/client
|
|
28
32
|
*/
|
|
@@ -36,7 +40,7 @@ export declare const BASH_PLUS_CLIENT_NS = "tool-plus";
|
|
|
36
40
|
/** Required services (cordis fiber inject): slots + locale + the shared configuration forms. */
|
|
37
41
|
export declare const inject: string[];
|
|
38
42
|
/**
|
|
39
|
-
* Mount the tool-plus settings
|
|
43
|
+
* Mount the tool-plus settings page.
|
|
40
44
|
* @param ctx - the browser plugin context.
|
|
41
45
|
*/
|
|
42
46
|
export declare function apply(ctx: ClientContext): void;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Windows:让宿主进程自己持有一个「不可见控制台」。
|
|
3
|
+
*
|
|
4
|
+
* 为什么需要(2026-09-25 实测):桌面端宿主是 GUI 子系统镜像
|
|
5
|
+
* (`DeepSeek Harness.exe` + `ELECTRON_RUN_AS_NODE=1`),Windows 永远不会给它
|
|
6
|
+
* 分配控制台;于是它的每个 console 子进程(pi-shell 的 `where git` 探测、快照
|
|
7
|
+
* `bash.exe`、任何插件 spawn 的 CLI)都要**新建**一个控制台,而默认终端应用是
|
|
8
|
+
* Windows Terminal → 每条命令闪一个窗口。
|
|
9
|
+
*
|
|
10
|
+
* 控制台是「父进程有 → 子进程默认继承;父进程没有 → 子进程新建」:宿主自己先
|
|
11
|
+
* `AllocConsole()` 再立刻 `SW_HIDE`,之后所有 console 子进程都继承它,不再新建
|
|
12
|
+
* 窗口。实测(无控制台宿主里 spawn 一个 `where.exe`):不装 → 新开一个可见 WT
|
|
13
|
+
* 窗口(窗口里的进程正是那个 where.exe);装了 → 子进程报「继承了我的控制台」、
|
|
14
|
+
* 零新窗口。代价:分配那一刻会出现一个 WT 窗口、可见约 1.8s —— 默认终端是 WT 时
|
|
15
|
+
* `ShowWindow(GetConsoleWindow())` 只藏得住 conhost 侧那个窗口对象,藏不住
|
|
16
|
+
* wt.exe 宿主窗口。这一次性的窗口只能在源头消除(上游给 `where` 探测加
|
|
17
|
+
* `CREATE_NO_WINDOW`,或让宿主从 console 子系统父进程继承一个 CREATE_NO_WINDOW
|
|
18
|
+
* 的控制台)。
|
|
19
|
+
*
|
|
20
|
+
* 三条硬约束(都有测试钉住):
|
|
21
|
+
* - 只在 win32 生效;宿主**已经有**控制台(CLI 在终端里跑)时什么都不做,否则会
|
|
22
|
+
* 凭空多出一个控制台;
|
|
23
|
+
* - `AllocConsole` 会重指 STD_INPUT/OUTPUT/ERROR,而宿主的 stdio 是启动方给的
|
|
24
|
+
* pipe → 必须先存后还,否则可能污染宿主输出、弄断 shell 的管道;
|
|
25
|
+
* - 任何失败(没有 koffi、句柄取不到、`AllocConsole` 失败)都只降级,不抛。
|
|
26
|
+
* @module @xiaoso/dsh-tool-plus/host/win32-console
|
|
27
|
+
*/
|
|
28
|
+
/** Win32 调用集合;真实实现走 koffi,测试注入 fake。 */
|
|
29
|
+
export interface Win32ConsoleBindings {
|
|
30
|
+
/** 本进程当前的控制台窗口;没有控制台时为 null。 */
|
|
31
|
+
getConsoleWindow(): unknown;
|
|
32
|
+
/** 分配一个控制台;本进程已有控制台时返回 false。 */
|
|
33
|
+
allocConsole(): boolean;
|
|
34
|
+
/** 显示/隐藏窗口(`SW_HIDE` = 0)。 */
|
|
35
|
+
showWindow(window: unknown, show: number): unknown;
|
|
36
|
+
/** 读标准句柄(-10 输入 / -11 输出 / -12 错误)。 */
|
|
37
|
+
getStdHandle(index: number): unknown;
|
|
38
|
+
/** 写回标准句柄。 */
|
|
39
|
+
setStdHandle(index: number, handle: unknown): unknown;
|
|
40
|
+
}
|
|
41
|
+
/** 一次安装的结果;调用方只用来记日志。 */
|
|
42
|
+
export type HiddenConsoleOutcome = 'not-windows' | 'ffi-unavailable' | 'console-present' | 'alloc-failed' | 'allocated';
|
|
43
|
+
/**
|
|
44
|
+
* 安装隐藏控制台(幂等)。宿主已有控制台时返回 `console-present` 且零副作用。
|
|
45
|
+
* @param platform - 当前平台(注入以便测试非 win32 分支)。
|
|
46
|
+
* @param load - 取 Win32 调用集合;拿不到(没有 koffi)时返回 undefined。
|
|
47
|
+
* @returns 本次安装的结果。
|
|
48
|
+
*/
|
|
49
|
+
export declare function installHiddenHostConsole(platform: NodeJS.Platform, load: () => Win32ConsoleBindings | undefined): HiddenConsoleOutcome;
|
|
50
|
+
/**
|
|
51
|
+
* 插件入口调用:win32 且能拿到 FFI 时才安装,结果只用于日志。
|
|
52
|
+
* @returns 本次安装的结果。
|
|
53
|
+
*/
|
|
54
|
+
export declare function ensureInheritableHiddenConsole(): HiddenConsoleOutcome;
|