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
|
@@ -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"}
|