pi2dsh 0.3.4 → 0.4.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.
Files changed (74) hide show
  1. package/dist/{all-Rt4K68QA.mjs → all-DSpxKvHa.mjs} +10 -10
  2. package/dist/{all-Rt4K68QA.mjs.map → all-DSpxKvHa.mjs.map} +1 -1
  3. package/dist/{anthropic-messages-Beym0_aC.mjs → anthropic-messages-BL9N1Idv.mjs} +3 -3
  4. package/dist/{anthropic-messages-Beym0_aC.mjs.map → anthropic-messages-BL9N1Idv.mjs.map} +1 -1
  5. package/dist/{azure-openai-responses-cHqZTgLD.mjs → azure-openai-responses-A67VbaZ1.mjs} +3 -3
  6. package/dist/{azure-openai-responses-cHqZTgLD.mjs.map → azure-openai-responses-A67VbaZ1.mjs.map} +1 -1
  7. package/dist/cli.mjs +1 -1
  8. package/dist/compat/pi-ai.d.mts +3 -38
  9. package/dist/compat/pi-ai.d.mts.map +1 -1
  10. package/dist/compat/pi-ai.mjs +3 -3
  11. package/dist/compat/pi-coding-agent.d.mts +71 -32
  12. package/dist/compat/pi-coding-agent.d.mts.map +1 -1
  13. package/dist/compat/pi-coding-agent.mjs +2 -2
  14. package/dist/credentials-oauth.mjs +2 -2
  15. package/dist/{dist-QBBA-dL_.mjs → dist-BYA74yh_.mjs} +2 -2
  16. package/dist/{dist-QBBA-dL_.mjs.map → dist-BYA74yh_.mjs.map} +1 -1
  17. package/dist/dist-DeonWo7m.mjs +1089 -0
  18. package/dist/dist-DeonWo7m.mjs.map +1 -0
  19. package/dist/{google-generative-ai-B7OZs5lu.mjs → google-generative-ai-DT5S8D8y.mjs} +2 -2
  20. package/dist/{google-generative-ai-B7OZs5lu.mjs.map → google-generative-ai-DT5S8D8y.mjs.map} +1 -1
  21. package/dist/{google-shared-CRsAUItF.mjs → google-shared-DYP_9cnK.mjs} +4 -4
  22. package/dist/{google-shared-CRsAUItF.mjs.map → google-shared-DYP_9cnK.mjs.map} +1 -1
  23. package/dist/{google-vertex-DmdaHQtB.mjs → google-vertex-Dpq7O7Be.mjs} +3 -3
  24. package/dist/{google-vertex-DmdaHQtB.mjs.map → google-vertex-Dpq7O7Be.mjs.map} +1 -1
  25. package/dist/host.mjs +1 -1
  26. package/dist/index.d.mts.map +1 -1
  27. package/dist/index.mjs +1 -1
  28. package/dist/{json-parse-CFyFZSLJ.mjs → json-parse-Dz5sKMTv.mjs} +2 -2
  29. package/dist/{json-parse-CFyFZSLJ.mjs.map → json-parse-Dz5sKMTv.mjs.map} +1 -1
  30. package/dist/{mcp-config-D2B3kv-Z.mjs → mcp-config-B3h5jTBb.mjs} +9 -8
  31. package/dist/mcp-config-B3h5jTBb.mjs.map +1 -0
  32. package/dist/{mistral-conversations-HHZCcFv_.mjs → mistral-conversations-BsxbCCWx.mjs} +4 -4
  33. package/dist/{mistral-conversations-HHZCcFv_.mjs.map → mistral-conversations-BsxbCCWx.mjs.map} +1 -1
  34. package/dist/{multipart-parser-CIa5BbwO.mjs → multipart-parser-woKCuALW.mjs} +3 -3
  35. package/dist/{multipart-parser-CIa5BbwO.mjs.map → multipart-parser-woKCuALW.mjs.map} +1 -1
  36. package/dist/{openai-codex-responses-vmovNu-q.mjs → openai-codex-responses-C7vviVT2.mjs} +3 -3
  37. package/dist/{openai-codex-responses-vmovNu-q.mjs.map → openai-codex-responses-C7vviVT2.mjs.map} +1 -1
  38. package/dist/{openai-completions-fXHhRolF.mjs → openai-completions-By8QNX1P.mjs} +3 -3
  39. package/dist/{openai-completions-fXHhRolF.mjs.map → openai-completions-By8QNX1P.mjs.map} +1 -1
  40. package/dist/{openai-responses-DKdCYf3h.mjs → openai-responses-DboJUcFN.mjs} +3 -3
  41. package/dist/{openai-responses-DKdCYf3h.mjs.map → openai-responses-DboJUcFN.mjs.map} +1 -1
  42. package/dist/{openai-responses-shared-D0Jq7yVP.mjs → openai-responses-shared-BDzn7nJY.mjs} +2 -2
  43. package/dist/{openai-responses-shared-D0Jq7yVP.mjs.map → openai-responses-shared-BDzn7nJY.mjs.map} +1 -1
  44. package/dist/{otel-BQSQRBLF.mjs → otel-PimLMoiV.mjs} +3 -3
  45. package/dist/{otel-BQSQRBLF.mjs.map → otel-PimLMoiV.mjs.map} +1 -1
  46. package/dist/{pi-ai-DhYGgq4Y.mjs → pi-ai-B_88Wb0r.mjs} +49 -6
  47. package/dist/{pi-ai-DhYGgq4Y.mjs.map → pi-ai-B_88Wb0r.mjs.map} +1 -1
  48. package/dist/{pi-coding-agent-fPHwKP4d.mjs → pi-coding-agent-COMX0KHL.mjs} +109 -34
  49. package/dist/pi-coding-agent-COMX0KHL.mjs.map +1 -0
  50. package/dist/{pi-messages-CV-Ts8An.mjs → pi-messages-B-7Xo_I0.mjs} +3 -3
  51. package/dist/{pi-messages-CV-Ts8An.mjs.map → pi-messages-B-7Xo_I0.mjs.map} +1 -1
  52. package/dist/pi-types-KazmR2O5.d.mts +62 -0
  53. package/dist/pi-types-KazmR2O5.d.mts.map +1 -0
  54. package/dist/pi-uuid-Db8ShZsK.mjs +47 -0
  55. package/dist/pi-uuid-Db8ShZsK.mjs.map +1 -0
  56. package/dist/{provider-env-C72pF4vP.mjs → provider-env-D-cCRWzv.mjs} +2 -2
  57. package/dist/{provider-env-C72pF4vP.mjs.map → provider-env-D-cCRWzv.mjs.map} +1 -1
  58. package/dist/{runtime-B9R7bDWT.mjs → runtime-B7mEIRf-.mjs} +1183 -52
  59. package/dist/runtime-B7mEIRf-.mjs.map +1 -0
  60. package/dist/runtime.d.mts.map +1 -1
  61. package/dist/runtime.mjs +1 -1
  62. package/dist/{src-C3WBfOks.mjs → src-BEl3QrGL.mjs} +3 -3
  63. package/dist/{src-C3WBfOks.mjs.map → src-BEl3QrGL.mjs.map} +1 -1
  64. package/package.json +2 -2
  65. package/dist/build-BG7p2Lbr.mjs +0 -4416
  66. package/dist/build-BG7p2Lbr.mjs.map +0 -1
  67. package/dist/dist-IQKOgQyt.mjs +0 -10035
  68. package/dist/dist-IQKOgQyt.mjs.map +0 -1
  69. package/dist/mcp-config-D2B3kv-Z.mjs.map +0 -1
  70. package/dist/pi-coding-agent-fPHwKP4d.mjs.map +0 -1
  71. package/dist/pi-types-BLt46jaf.d.mts +0 -2494
  72. package/dist/pi-types-BLt46jaf.d.mts.map +0 -1
  73. package/dist/rolldown-runtime-CTfmNlz1.mjs +0 -44
  74. package/dist/runtime-B9R7bDWT.mjs.map +0 -1
@@ -1,6 +1,47 @@
1
1
 
2
- import { i as __require } from "./rolldown-runtime-CTfmNlz1.mjs";
3
- import "./build-BG7p2Lbr.mjs";
2
+ import { createRequire } from "node:module";
3
+ import { Type as Type$1 } from "typebox";
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
+ var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
44
+ //#endregion
4
45
  //#region src/compat/vendor/pi-ai-overflow.ts
5
46
  /**
6
47
  * Regex patterns to detect context overflow errors from different providers.
@@ -2870,10 +2911,12 @@ function unbridgedTransport(api) {
2870
2911
  }
2871
2912
  let realPiAiPromise;
2872
2913
  function loadRealPiAi() {
2873
- realPiAiPromise ??= import("./dist-IQKOgQyt.mjs").then((module) => module, () => void 0);
2914
+ realPiAiPromise ??= import("./dist-DeonWo7m.mjs").then((module) => module, () => void 0);
2874
2915
  return realPiAiPromise;
2875
2916
  }
2876
2917
  async function realTransport(api, factoryName) {
2918
+ const subpath = await import(`@earendil-works/pi-ai/api/${api}`).catch(() => void 0);
2919
+ if (typeof subpath?.stream === "function") return subpath;
2877
2920
  const factory = (await loadRealPiAi())?.[factoryName];
2878
2921
  if (typeof factory !== "function") unbridgedTransport(api);
2879
2922
  return factory();
@@ -2888,7 +2931,7 @@ async function realBuiltinProvider(providerId) {
2888
2931
  const real = await loadRealPiAi();
2889
2932
  if (real === void 0) return void 0;
2890
2933
  try {
2891
- const factory = (await import("./all-Rt4K68QA.mjs").catch(() => real)).builtinProviders ?? real.builtinProviders;
2934
+ const factory = (await import("./all-DSpxKvHa.mjs").catch(() => real)).builtinProviders ?? real.builtinProviders;
2892
2935
  if (typeof factory !== "function") return void 0;
2893
2936
  return factory().find((provider) => provider.id === providerId);
2894
2937
  } catch {
@@ -2979,6 +3022,6 @@ function StringEnum(values, options = {}) {
2979
3022
  };
2980
3023
  }
2981
3024
  //#endregion
2982
- export { openaiCodexOAuth as A, isRecoverableLength as B, registerApiProvider as C, kimiCodingOAuth as D, unregisterApiProviders as E, lazyApi as F, lazyStream as I, AssistantMessageEventStream as L, pollOAuthDeviceCodeFlow as M, ModelsError as N, githubCopilotOAuth as O, createProvider as P, isRetryableAssistantError as R, realBuiltinProvider as S, stream as T, loadKimiCodingOAuth as _, clampThinkingLevel as a, openAICompletionsApi as b, getApiProvider as c, getModels as d, getProvider as f, loadGitHubCopilotOAuth as g, loadAnthropicOAuth as h, builtinProviders as i, generatePKCE as j, anthropicOAuth as k, getApiProviders as l, getSupportedThinkingLevels as m, __setPiAiLlmBridge as n, complete as o, getProviders as p, anthropicMessagesApi as r, contentText as s, StringEnum as t, getModel as u, loadOpenAICodexOAuth as v, registerProvider as w, openAIResponsesApi as x, modelsAreEqual as y, isContextOverflow as z };
3025
+ export { anthropicOAuth as A, isContextOverflow as B, realBuiltinProvider as C, unregisterApiProviders as D, stream as E, createProvider as F, __require as G, __commonJSMin as H, lazyApi as I, __toESM as K, lazyStream as L, generatePKCE as M, pollOAuthDeviceCodeFlow as N, kimiCodingOAuth as O, ModelsError as P, AssistantMessageEventStream as R, openAIResponsesApi as S, registerProvider as T, __esmMin as U, isRecoverableLength as V, __exportAll as W, 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 };
2983
3026
 
2984
- //# sourceMappingURL=pi-ai-DhYGgq4Y.mjs.map
3027
+ //# sourceMappingURL=pi-ai-B_88Wb0r.mjs.map