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.
Files changed (93) hide show
  1. package/README.md +54 -14
  2. package/README.zh.md +43 -14
  3. package/cordis.patch.yml +3 -0
  4. package/dist/cli.mjs +1 -1
  5. package/dist/compat/pi-ai.mjs +1 -1
  6. package/dist/compat/pi-coding-agent.mjs +1 -1
  7. package/dist/credentials-oauth.mjs +3 -3
  8. package/dist/host.mjs +2 -2
  9. package/dist/index.d.mts +30 -1
  10. package/dist/index.d.mts.map +1 -1
  11. package/dist/index.mjs +98 -2
  12. package/dist/index.mjs.map +1 -0
  13. package/dist/{mcp-config-B3h5jTBb.mjs → mcp-config-vU1LZ7fC.mjs} +6 -6
  14. package/dist/mcp-config-vU1LZ7fC.mjs.map +1 -0
  15. package/dist/{oauth-bridge-C6fL1qSv.mjs → oauth-bridge-CfyImWx4.mjs} +2 -2
  16. package/dist/{oauth-bridge-C6fL1qSv.mjs.map → oauth-bridge-CfyImWx4.mjs.map} +1 -1
  17. package/dist/{pi-ai-B_88Wb0r.mjs → pi-ai-7HR3ciAs.mjs} +4 -42
  18. package/dist/{pi-ai-B_88Wb0r.mjs.map → pi-ai-7HR3ciAs.mjs.map} +1 -1
  19. package/dist/{pi-coding-agent-COMX0KHL.mjs → pi-coding-agent-CznNsOnV.mjs} +3 -3
  20. package/dist/{pi-coding-agent-COMX0KHL.mjs.map → pi-coding-agent-CznNsOnV.mjs.map} +1 -1
  21. package/dist/{runtime-B7mEIRf-.mjs → runtime-xNd10ACP.mjs} +194 -21
  22. package/dist/runtime-xNd10ACP.mjs.map +1 -0
  23. package/dist/runtime.d.mts.map +1 -1
  24. package/dist/runtime.mjs +1 -1
  25. package/package.json +9 -2
  26. package/dist/all-DSpxKvHa.mjs +0 -28512
  27. package/dist/all-DSpxKvHa.mjs.map +0 -1
  28. package/dist/anthropic-messages-BL9N1Idv.mjs +0 -6438
  29. package/dist/anthropic-messages-BL9N1Idv.mjs.map +0 -1
  30. package/dist/azure-openai-responses-A67VbaZ1.mjs +0 -209
  31. package/dist/azure-openai-responses-A67VbaZ1.mjs.map +0 -1
  32. package/dist/deferred-tools-BD4g5QUx.mjs +0 -32
  33. package/dist/deferred-tools-BD4g5QUx.mjs.map +0 -1
  34. package/dist/diagnostics-CJye1UFh.mjs +0 -99
  35. package/dist/diagnostics-CJye1UFh.mjs.map +0 -1
  36. package/dist/dist-BYA74yh_.mjs +0 -1246
  37. package/dist/dist-BYA74yh_.mjs.map +0 -1
  38. package/dist/dist-DeonWo7m.mjs +0 -1089
  39. package/dist/dist-DeonWo7m.mjs.map +0 -1
  40. package/dist/error-body-DKA3lknR.mjs +0 -104
  41. package/dist/error-body-DKA3lknR.mjs.map +0 -1
  42. package/dist/github-copilot-headers-CZo2QHrt.mjs +0 -25
  43. package/dist/github-copilot-headers-CZo2QHrt.mjs.map +0 -1
  44. package/dist/google-generative-ai-DT5S8D8y.mjs +0 -358
  45. package/dist/google-generative-ai-DT5S8D8y.mjs.map +0 -1
  46. package/dist/google-shared-DYP_9cnK.mjs +0 -29042
  47. package/dist/google-shared-DYP_9cnK.mjs.map +0 -1
  48. package/dist/google-vertex-Dpq7O7Be.mjs +0 -402
  49. package/dist/google-vertex-Dpq7O7Be.mjs.map +0 -1
  50. package/dist/hash-Dbggamac.mjs +0 -19
  51. package/dist/hash-Dbggamac.mjs.map +0 -1
  52. package/dist/headers-CPzZhJQn.mjs +0 -17
  53. package/dist/headers-CPzZhJQn.mjs.map +0 -1
  54. package/dist/images-models-DJtHo9Rp.mjs +0 -1068
  55. package/dist/images-models-DJtHo9Rp.mjs.map +0 -1
  56. package/dist/json-parse-Dz5sKMTv.mjs +0 -384
  57. package/dist/json-parse-Dz5sKMTv.mjs.map +0 -1
  58. package/dist/mcp-config-B3h5jTBb.mjs.map +0 -1
  59. package/dist/mistral-conversations-BsxbCCWx.mjs +0 -42007
  60. package/dist/mistral-conversations-BsxbCCWx.mjs.map +0 -1
  61. package/dist/multipart-parser-woKCuALW.mjs +0 -301
  62. package/dist/multipart-parser-woKCuALW.mjs.map +0 -1
  63. package/dist/openai-DkzRh5_G.mjs +0 -6732
  64. package/dist/openai-DkzRh5_G.mjs.map +0 -1
  65. package/dist/openai-codex-responses-C7vviVT2.mjs +0 -1169
  66. package/dist/openai-codex-responses-C7vviVT2.mjs.map +0 -1
  67. package/dist/openai-completions-By8QNX1P.mjs +0 -947
  68. package/dist/openai-completions-By8QNX1P.mjs.map +0 -1
  69. package/dist/openai-prompt-cache-BDWtZRKh.mjs +0 -11
  70. package/dist/openai-prompt-cache-BDWtZRKh.mjs.map +0 -1
  71. package/dist/openai-responses-DboJUcFN.mjs +0 -247
  72. package/dist/openai-responses-DboJUcFN.mjs.map +0 -1
  73. package/dist/openai-responses-shared-BDzn7nJY.mjs +0 -572
  74. package/dist/openai-responses-shared-BDzn7nJY.mjs.map +0 -1
  75. package/dist/openrouter-images-fG3Aj6M4.mjs +0 -127
  76. package/dist/openrouter-images-fG3Aj6M4.mjs.map +0 -1
  77. package/dist/otel-PimLMoiV.mjs +0 -24935
  78. package/dist/otel-PimLMoiV.mjs.map +0 -1
  79. package/dist/pi-messages-B-7Xo_I0.mjs +0 -306
  80. package/dist/pi-messages-B-7Xo_I0.mjs.map +0 -1
  81. package/dist/provider-env-D-cCRWzv.mjs +0 -40
  82. package/dist/provider-env-D-cCRWzv.mjs.map +0 -1
  83. package/dist/provider-retry-Cw6YJ4cr.mjs +0 -80
  84. package/dist/provider-retry-Cw6YJ4cr.mjs.map +0 -1
  85. package/dist/runtime-B7mEIRf-.mjs.map +0 -1
  86. package/dist/sanitize-unicode-wLA11KvZ.mjs +0 -29
  87. package/dist/sanitize-unicode-wLA11KvZ.mjs.map +0 -1
  88. package/dist/src-BEl3QrGL.mjs +0 -5031
  89. package/dist/src-BEl3QrGL.mjs.map +0 -1
  90. package/dist/transform-messages-DGq9mvhA.mjs +0 -379
  91. package/dist/transform-messages-DGq9mvhA.mjs.map +0 -1
  92. package/dist/uuid-DtFT7tOE.mjs +0 -65
  93. package/dist/uuid-DtFT7tOE.mjs.map +0 -1
@@ -1,29 +0,0 @@
1
-
2
- //#region node_modules/.pnpm/@earendil-works+pi-ai@0.84.1_ws@8.21.3_zod@4.4.3/node_modules/@earendil-works/pi-ai/dist/utils/sanitize-unicode.js
3
- /**
4
- * Removes unpaired Unicode surrogate characters from a string.
5
- *
6
- * Unpaired surrogates (high surrogates 0xD800-0xDBFF without matching low surrogates 0xDC00-0xDFFF,
7
- * or vice versa) cause JSON serialization errors in many API providers.
8
- *
9
- * Valid emoji and other characters outside the Basic Multilingual Plane use properly paired
10
- * surrogates and will NOT be affected by this function.
11
- *
12
- * @param text - The text to sanitize
13
- * @returns The sanitized text with unpaired surrogates removed
14
- *
15
- * @example
16
- * // Valid emoji (properly paired surrogates) are preserved
17
- * sanitizeSurrogates("Hello 🙈 World") // => "Hello 🙈 World"
18
- *
19
- * // Unpaired high surrogate is removed
20
- * const unpaired = String.fromCharCode(0xD83D); // high surrogate without low
21
- * sanitizeSurrogates(`Text ${unpaired} here`) // => "Text here"
22
- */
23
- function sanitizeSurrogates(text) {
24
- return text.replace(/[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/g, "");
25
- }
26
- //#endregion
27
- export { sanitizeSurrogates as t };
28
-
29
- //# sourceMappingURL=sanitize-unicode-wLA11KvZ.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sanitize-unicode-wLA11KvZ.mjs","names":[],"sources":["../node_modules/.pnpm/@earendil-works+pi-ai@0.84.1_ws@8.21.3_zod@4.4.3/node_modules/@earendil-works/pi-ai/dist/utils/sanitize-unicode.js"],"sourcesContent":["/**\n * Removes unpaired Unicode surrogate characters from a string.\n *\n * Unpaired surrogates (high surrogates 0xD800-0xDBFF without matching low surrogates 0xDC00-0xDFFF,\n * or vice versa) cause JSON serialization errors in many API providers.\n *\n * Valid emoji and other characters outside the Basic Multilingual Plane use properly paired\n * surrogates and will NOT be affected by this function.\n *\n * @param text - The text to sanitize\n * @returns The sanitized text with unpaired surrogates removed\n *\n * @example\n * // Valid emoji (properly paired surrogates) are preserved\n * sanitizeSurrogates(\"Hello 🙈 World\") // => \"Hello 🙈 World\"\n *\n * // Unpaired high surrogate is removed\n * const unpaired = String.fromCharCode(0xD83D); // high surrogate without low\n * sanitizeSurrogates(`Text ${unpaired} here`) // => \"Text here\"\n */\nexport function sanitizeSurrogates(text) {\n // Replace unpaired high surrogates (0xD800-0xDBFF not followed by low surrogate)\n // Replace unpaired low surrogates (0xDC00-0xDFFF not preceded by high surrogate)\n return text.replace(/[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?<![\\uD800-\\uDBFF])[\\uDC00-\\uDFFF]/g, \"\");\n}\n//# sourceMappingURL=sanitize-unicode.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAoBA,SAAgB,mBAAmB,MAAM;CAGrC,OAAO,KAAK,QAAQ,2EAA2E,EAAE;AACrG"}