pi2dsh 0.4.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +54 -14
- package/README.zh.md +43 -14
- package/cordis.patch.yml +3 -0
- package/dist/cli.mjs +1 -1
- package/dist/compat/pi-ai.mjs +1 -1
- package/dist/compat/pi-coding-agent.mjs +1 -1
- package/dist/credentials-oauth.mjs +3 -3
- package/dist/host.mjs +2 -2
- package/dist/index.d.mts +30 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +98 -2
- package/dist/index.mjs.map +1 -0
- package/dist/{mcp-config-B3h5jTBb.mjs → mcp-config-vU1LZ7fC.mjs} +6 -6
- package/dist/mcp-config-vU1LZ7fC.mjs.map +1 -0
- package/dist/{oauth-bridge-C6fL1qSv.mjs → oauth-bridge-CfyImWx4.mjs} +2 -2
- package/dist/{oauth-bridge-C6fL1qSv.mjs.map → oauth-bridge-CfyImWx4.mjs.map} +1 -1
- package/dist/{pi-ai-B_88Wb0r.mjs → pi-ai-7HR3ciAs.mjs} +4 -42
- package/dist/{pi-ai-B_88Wb0r.mjs.map → pi-ai-7HR3ciAs.mjs.map} +1 -1
- package/dist/{pi-coding-agent-COMX0KHL.mjs → pi-coding-agent-CznNsOnV.mjs} +3 -3
- package/dist/{pi-coding-agent-COMX0KHL.mjs.map → pi-coding-agent-CznNsOnV.mjs.map} +1 -1
- package/dist/{runtime-B7mEIRf-.mjs → runtime-xNd10ACP.mjs} +194 -21
- package/dist/runtime-xNd10ACP.mjs.map +1 -0
- package/dist/runtime.d.mts.map +1 -1
- package/dist/runtime.mjs +1 -1
- package/package.json +9 -2
- package/dist/all-DSpxKvHa.mjs +0 -28512
- package/dist/all-DSpxKvHa.mjs.map +0 -1
- package/dist/anthropic-messages-BL9N1Idv.mjs +0 -6438
- package/dist/anthropic-messages-BL9N1Idv.mjs.map +0 -1
- package/dist/azure-openai-responses-A67VbaZ1.mjs +0 -209
- package/dist/azure-openai-responses-A67VbaZ1.mjs.map +0 -1
- package/dist/deferred-tools-BD4g5QUx.mjs +0 -32
- package/dist/deferred-tools-BD4g5QUx.mjs.map +0 -1
- package/dist/diagnostics-CJye1UFh.mjs +0 -99
- package/dist/diagnostics-CJye1UFh.mjs.map +0 -1
- package/dist/dist-BYA74yh_.mjs +0 -1246
- package/dist/dist-BYA74yh_.mjs.map +0 -1
- package/dist/dist-DeonWo7m.mjs +0 -1089
- package/dist/dist-DeonWo7m.mjs.map +0 -1
- package/dist/error-body-DKA3lknR.mjs +0 -104
- package/dist/error-body-DKA3lknR.mjs.map +0 -1
- package/dist/github-copilot-headers-CZo2QHrt.mjs +0 -25
- package/dist/github-copilot-headers-CZo2QHrt.mjs.map +0 -1
- package/dist/google-generative-ai-DT5S8D8y.mjs +0 -358
- package/dist/google-generative-ai-DT5S8D8y.mjs.map +0 -1
- package/dist/google-shared-DYP_9cnK.mjs +0 -29042
- package/dist/google-shared-DYP_9cnK.mjs.map +0 -1
- package/dist/google-vertex-Dpq7O7Be.mjs +0 -402
- package/dist/google-vertex-Dpq7O7Be.mjs.map +0 -1
- package/dist/hash-Dbggamac.mjs +0 -19
- package/dist/hash-Dbggamac.mjs.map +0 -1
- package/dist/headers-CPzZhJQn.mjs +0 -17
- package/dist/headers-CPzZhJQn.mjs.map +0 -1
- package/dist/images-models-DJtHo9Rp.mjs +0 -1068
- package/dist/images-models-DJtHo9Rp.mjs.map +0 -1
- package/dist/json-parse-Dz5sKMTv.mjs +0 -384
- package/dist/json-parse-Dz5sKMTv.mjs.map +0 -1
- package/dist/mcp-config-B3h5jTBb.mjs.map +0 -1
- package/dist/mistral-conversations-BsxbCCWx.mjs +0 -42007
- package/dist/mistral-conversations-BsxbCCWx.mjs.map +0 -1
- package/dist/multipart-parser-woKCuALW.mjs +0 -301
- package/dist/multipart-parser-woKCuALW.mjs.map +0 -1
- package/dist/openai-DkzRh5_G.mjs +0 -6732
- package/dist/openai-DkzRh5_G.mjs.map +0 -1
- package/dist/openai-codex-responses-C7vviVT2.mjs +0 -1169
- package/dist/openai-codex-responses-C7vviVT2.mjs.map +0 -1
- package/dist/openai-completions-By8QNX1P.mjs +0 -947
- package/dist/openai-completions-By8QNX1P.mjs.map +0 -1
- package/dist/openai-prompt-cache-BDWtZRKh.mjs +0 -11
- package/dist/openai-prompt-cache-BDWtZRKh.mjs.map +0 -1
- package/dist/openai-responses-DboJUcFN.mjs +0 -247
- package/dist/openai-responses-DboJUcFN.mjs.map +0 -1
- package/dist/openai-responses-shared-BDzn7nJY.mjs +0 -572
- package/dist/openai-responses-shared-BDzn7nJY.mjs.map +0 -1
- package/dist/openrouter-images-fG3Aj6M4.mjs +0 -127
- package/dist/openrouter-images-fG3Aj6M4.mjs.map +0 -1
- package/dist/otel-PimLMoiV.mjs +0 -24935
- package/dist/otel-PimLMoiV.mjs.map +0 -1
- package/dist/pi-messages-B-7Xo_I0.mjs +0 -306
- package/dist/pi-messages-B-7Xo_I0.mjs.map +0 -1
- package/dist/provider-env-D-cCRWzv.mjs +0 -40
- package/dist/provider-env-D-cCRWzv.mjs.map +0 -1
- package/dist/provider-retry-Cw6YJ4cr.mjs +0 -80
- package/dist/provider-retry-Cw6YJ4cr.mjs.map +0 -1
- package/dist/runtime-B7mEIRf-.mjs.map +0 -1
- package/dist/sanitize-unicode-wLA11KvZ.mjs +0 -29
- package/dist/sanitize-unicode-wLA11KvZ.mjs.map +0 -1
- package/dist/src-BEl3QrGL.mjs +0 -5031
- package/dist/src-BEl3QrGL.mjs.map +0 -1
- package/dist/transform-messages-DGq9mvhA.mjs +0 -379
- package/dist/transform-messages-DGq9mvhA.mjs.map +0 -1
- package/dist/uuid-DtFT7tOE.mjs +0 -65
- package/dist/uuid-DtFT7tOE.mjs.map +0 -1
|
@@ -2,44 +2,6 @@
|
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import { Type as Type$1 } from "typebox";
|
|
4
4
|
//#region \0rolldown/runtime.js
|
|
5
|
-
var __create = Object.create;
|
|
6
|
-
var __defProp = Object.defineProperty;
|
|
7
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
8
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
9
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
10
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
-
var __esmMin = (fn, res, err) => () => {
|
|
12
|
-
if (err) throw err[0];
|
|
13
|
-
try {
|
|
14
|
-
return fn && (res = fn(fn = 0)), res;
|
|
15
|
-
} catch (e) {
|
|
16
|
-
throw err = [e], e;
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
20
|
-
var __exportAll = (all, no_symbols) => {
|
|
21
|
-
let target = {};
|
|
22
|
-
for (var name in all) __defProp(target, name, {
|
|
23
|
-
get: all[name],
|
|
24
|
-
enumerable: true
|
|
25
|
-
});
|
|
26
|
-
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
27
|
-
return target;
|
|
28
|
-
};
|
|
29
|
-
var __copyProps = (to, from, except, desc) => {
|
|
30
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
31
|
-
key = keys[i];
|
|
32
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
33
|
-
get: ((k) => from[k]).bind(null, key),
|
|
34
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
return to;
|
|
38
|
-
};
|
|
39
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
40
|
-
value: mod,
|
|
41
|
-
enumerable: true
|
|
42
|
-
}) : target, mod));
|
|
43
5
|
var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
|
|
44
6
|
//#endregion
|
|
45
7
|
//#region src/compat/vendor/pi-ai-overflow.ts
|
|
@@ -2911,7 +2873,7 @@ function unbridgedTransport(api) {
|
|
|
2911
2873
|
}
|
|
2912
2874
|
let realPiAiPromise;
|
|
2913
2875
|
function loadRealPiAi() {
|
|
2914
|
-
realPiAiPromise ??= import("
|
|
2876
|
+
realPiAiPromise ??= import("@earendil-works/pi-ai").then((module) => module, () => void 0);
|
|
2915
2877
|
return realPiAiPromise;
|
|
2916
2878
|
}
|
|
2917
2879
|
async function realTransport(api, factoryName) {
|
|
@@ -2931,7 +2893,7 @@ async function realBuiltinProvider(providerId) {
|
|
|
2931
2893
|
const real = await loadRealPiAi();
|
|
2932
2894
|
if (real === void 0) return void 0;
|
|
2933
2895
|
try {
|
|
2934
|
-
const factory = (await import("
|
|
2896
|
+
const factory = (await import("@earendil-works/pi-ai/providers/all").catch(() => real)).builtinProviders ?? real.builtinProviders;
|
|
2935
2897
|
if (typeof factory !== "function") return void 0;
|
|
2936
2898
|
return factory().find((provider) => provider.id === providerId);
|
|
2937
2899
|
} catch {
|
|
@@ -3022,6 +2984,6 @@ function StringEnum(values, options = {}) {
|
|
|
3022
2984
|
};
|
|
3023
2985
|
}
|
|
3024
2986
|
//#endregion
|
|
3025
|
-
export { anthropicOAuth as A, isContextOverflow as B, realBuiltinProvider as C, unregisterApiProviders as D, stream as E, createProvider as F,
|
|
2987
|
+
export { anthropicOAuth as A, isContextOverflow as B, realBuiltinProvider as C, unregisterApiProviders as D, stream as E, createProvider as F, lazyApi as I, lazyStream as L, generatePKCE as M, pollOAuthDeviceCodeFlow as N, kimiCodingOAuth as O, ModelsError as P, AssistantMessageEventStream as R, openAIResponsesApi as S, registerProvider as T, isRecoverableLength as V, loadGitHubCopilotOAuth as _, builtinProviders as a, modelsAreEqual as b, contentText as c, getModel as d, getModels as f, loadAnthropicOAuth as g, getSupportedThinkingLevels as h, anthropicMessagesApi as i, openaiCodexOAuth as j, githubCopilotOAuth as k, getApiProvider as l, getProviders as m, Type$1 as n, clampThinkingLevel as o, getProvider as p, __setPiAiLlmBridge as r, complete as s, StringEnum as t, getApiProviders as u, loadKimiCodingOAuth as v, registerApiProvider as w, openAICompletionsApi as x, loadOpenAICodexOAuth as y, isRetryableAssistantError as z };
|
|
3026
2988
|
|
|
3027
|
-
//# sourceMappingURL=pi-ai-
|
|
2989
|
+
//# sourceMappingURL=pi-ai-7HR3ciAs.mjs.map
|