@vibe-lark/larkpal 0.1.86 → 0.1.87
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/dist/account-id-BM1T6029-BzQ_cMoi.mjs +1 -0
- package/dist/activation-context--5yu1dPF-XV0Y0pTy.mjs +1 -0
- package/dist/anthropic-CFZUCb1w.mjs +39 -0
- package/dist/assistant-visible-text-DuFWokAt-BOJV_zwc.mjs +9 -0
- package/dist/azure-openai-responses-BEuiMaF-.mjs +1 -0
- package/dist/boundary-file-read-BSd9MXPy-gnNVhPKT.mjs +1 -0
- package/dist/browser-lifecycle-cleanup-BdNsMhMD-BM97qA_M.mjs +1 -0
- package/dist/build-Bkj0hOS2.mjs +3 -0
- package/dist/bundled-compat-BpaDaAAu-DJtrIX6i.mjs +27 -0
- package/dist/bundled-dir-U738ay4K-BxbzrJOo.mjs +1 -0
- package/dist/call-DimWbpgJ-B4pv55RH.mjs +20 -0
- package/dist/channel-bootstrap.runtime-BVclcGv1-CEZ0-JP9.mjs +1 -0
- package/dist/channel-bootstrap.runtime-Cwcr38m2-Dt6QlQkX.mjs +1 -0
- package/dist/chunk-DHbaKqs-.mjs +1 -0
- package/dist/cli.mjs +7 -92
- package/dist/command-format-LSnUCVVF-Dn4h9IOh.mjs +16 -0
- package/dist/config-Bim2pi8a-03N-28sw.mjs +1 -0
- package/dist/delivery-context.shared-j5hC5qb1-BSLQG47q.mjs +1 -0
- package/dist/diagnostic-ClMwNnUA-BMKvPQJT.mjs +1 -0
- package/dist/dist-J5UB83Ws.mjs +601 -0
- package/dist/dist-coestTs9.mjs +5 -0
- package/dist/env-api-keys-Cuz5irWW.mjs +1 -0
- package/dist/event-stream-B7Ei41Bu.mjs +1 -0
- package/dist/facade-loader-DFzIYYt_-4bzFvy-b.mjs +1 -0
- package/dist/from-Ba69_5cR.mjs +14 -0
- package/dist/gateway-method-policy-C7rf0SeV-CTJcMQCE.mjs +1 -0
- package/dist/github-copilot-headers-BfhryVuU.mjs +1 -0
- package/dist/google-ABo-1guT.mjs +1 -0
- package/dist/google-gemini-cli-CGlN1zUA.mjs +2 -0
- package/dist/google-shared-C60sNhwd.mjs +301 -0
- package/dist/google-vertex-De0nAItu.mjs +1 -0
- package/dist/hash-Dw-N8Y9l.mjs +1 -0
- package/dist/headers-Bpsp70B9.mjs +1 -0
- package/dist/home-dir-C44RaPME-B5iLWwCq.mjs +1 -0
- package/dist/ids-BPsM98Uu-CJBJAeVC.mjs +1 -0
- package/dist/image-2w3cApg7-CrpUMCvm.mjs +3 -0
- package/dist/interactive-init-C5MFL5MW.mjs +8 -0
- package/dist/io-CH2g3vsv-JJtUIa_U.mjs +10 -0
- package/dist/jiti-loader-cache-Bat69wam-DNIteTtO.mjs +9 -0
- package/dist/json-file-BQRNuxmK-hRjIgOXI.mjs +1 -0
- package/dist/json-parse-BESd8UAM.mjs +3 -0
- package/dist/jws-YaZ38F_i.mjs +12 -0
- package/dist/lark-cli-provider-BLMxH6CN.mjs +4 -0
- package/dist/lark-logger-xpMKNNtY.mjs +1 -0
- package/dist/live-smoke-DpURW676.mjs +33 -0
- package/dist/load-context-mb7uvLSn-3xYwSnOZ.mjs +1 -0
- package/dist/loader-708jrx4Y-BbJRXNlQ.mjs +4 -0
- package/dist/main.mjs +153 -74571
- package/dist/manifest-registry-_hxKCS2K-OL8KK_o4.mjs +15 -0
- package/dist/mcp-server.mjs +4 -527
- package/dist/message-channel-Bk_YHfQg-n2Hw2Y0L.mjs +1 -0
- package/dist/message-channel-core-DTA--Gjh-CIh10vfo.mjs +1 -0
- package/dist/message.config.runtime-K-k4XOyq-F_h0Cgkl.mjs +1 -0
- package/dist/message.gateway.runtime-DqHOHRTQ-ge4c5p4s.mjs +1 -0
- package/dist/mistral-DyL3Zo1b.mjs +7 -0
- package/dist/model-auth-env-oyg2Hexc-DJbt9J3o.mjs +1 -0
- package/dist/models-config-BmpSQJQF-BL6S5qAo.mjs +1 -0
- package/dist/models-config.runtime-SOhLEw-f.mjs +1 -0
- package/dist/multipart-parser-B9dwXBqu.mjs +2 -0
- package/dist/oauth-25y2wc7K.mjs +75 -0
- package/dist/openai-C-rgGb7X.mjs +16 -0
- package/dist/openai-codex-responses-BbyAPsP1.mjs +7 -0
- package/dist/openai-completions-Bu5qvQzb.mjs +5 -0
- package/dist/openai-responses-pIdwQBc4.mjs +1 -0
- package/dist/openai-responses-shared-DqW1JSux.mjs +10 -0
- package/dist/paths-D6msg0S1-BO4XgM1u.mjs +1 -0
- package/dist/paths-D92DjaZ--DdtJ-zYp.mjs +1 -0
- package/dist/pi-model-discovery-Bd0TWzo8-DvSM0eWu.mjs +1 -0
- package/dist/pi-model-discovery-runtime-PrjWOmsV.mjs +1 -0
- package/dist/pi-tools.before-tool-call.runtime-Bn7uqKie-WPxU5oNX.mjs +2 -0
- package/dist/plugin-auto-enable-DdH3n9V8-Dr_bUXkG.mjs +1 -0
- package/dist/process-scoped-map-B2cWkYET-Co-i-MXA.mjs +1 -0
- package/dist/provider-discovery.runtime-DY0VWQ81.mjs +1 -0
- package/dist/provider-model-compat-CFqcq0it-BUwZENrz.mjs +1 -0
- package/dist/provider-runtime-C8rljsNs-BDvu6FW3.mjs +1 -0
- package/dist/provider-runtime-CT50mNIX-DImw7ZZu.mjs +79 -0
- package/dist/provider-stream-COLujAAo-Dpq1DSIk.mjs +248 -0
- package/dist/providers.runtime-Ba7tOlq7-B4t6ywCr.mjs +1 -0
- package/dist/public-surface-loader-BVl0NQAE-TfJ3izj1.mjs +1 -0
- package/dist/resolve-C33B7eeu-DZM_z6Wr.mjs +1 -0
- package/dist/runtime-Cym-fqI8-1GOIuRRQ.mjs +1 -0
- package/dist/runtime-channel-state-CohMybAh-BBzhl07Q.mjs +1 -0
- package/dist/runtime-snapshot-C54O1-gI-DxusscPf.mjs +1 -0
- package/dist/runtime-state-IBOIXKOx-Cw1GA1td.mjs +1 -0
- package/dist/runtime-web-tools-fallback.runtime-Ca-qn1mj-BsYE2gOd.mjs +1 -0
- package/dist/runtime-web-tools-manifest.runtime-BgxQTjmq-P6MKP9gQ.mjs +1 -0
- package/dist/runtime-web-tools-public-artifacts.runtime-D9qcoWIX-5VoyjouO.mjs +1 -0
- package/dist/session-archive.runtime-B52_5vs4-cU2tYbBz.mjs +1 -0
- package/dist/session-key-Cn2QoOyX-QZeYmbxd.mjs +1 -0
- package/dist/session-transcript-files.fs-DEeFXruQ-CXIAFSsr.mjs +1 -0
- package/dist/src-CCDx_C-U.mjs +3 -0
- package/dist/src-DACmA9V6.mjs +5 -0
- package/dist/subagent-announce-L5WsQatW--rMn240x.mjs +2 -0
- package/dist/subagent-announce.registry.runtime-DiqZyeTs-DNfNHsls.mjs +1 -0
- package/dist/subagent-registry-steer-runtime-DFgZFC0j-XYS1_qwl.mjs +1 -0
- package/dist/subagent-system-prompt-C1qnN--K-CsU4f97T.mjs +23 -0
- package/dist/target-parsing-loaded-DKkb6jJY-B830OA1a.mjs +12 -0
- package/dist/task-registry-delivery-runtime-Dd1CUkZF-B2Hj2k8C.mjs +16 -0
- package/dist/task-registry-delivery-runtime-ragbeVx5-Bdvo2Q5u.mjs +1 -0
- package/dist/thinking-Bh-7MqXz-uApNUe6g.mjs +1 -0
- package/dist/transcript-E_-ISOkD-VTwb782D.mjs +5 -0
- package/dist/transcript.runtime-BqhvZZdl-B4E0TiX5.mjs +1 -0
- package/dist/transform-messages-BTA3xbAI.mjs +1 -0
- package/dist/web-provider-public-artifacts-BlpRwIUS-DbVhDOrY.mjs +1 -0
- package/dist/web-search-providers.runtime--0aUtC3b-Bjh4Bmrz.mjs +1 -0
- package/package.json +2 -3
- package/dist/account-id-BM1T6029-DYjVxojW.mjs +0 -46
- package/dist/activation-context--5yu1dPF-Bwsn3moT.mjs +0 -172
- package/dist/anthropic-TH8ERTXK.mjs +0 -5962
- package/dist/assistant-visible-text-DuFWokAt-CsbII5KS.mjs +0 -596
- package/dist/azure-openai-responses-Bt_Ag9Er.mjs +0 -166
- package/dist/boundary-file-read-BSd9MXPy--KThL5e6.mjs +0 -594
- package/dist/browser-lifecycle-cleanup-BdNsMhMD-O3tnAM4i.mjs +0 -60
- package/dist/build-DgTrEpge.mjs +0 -3333
- package/dist/bundled-compat-BpaDaAAu-D7oazKjD.mjs +0 -5216
- package/dist/bundled-dir-U738ay4K-DXK0q_TV.mjs +0 -258
- package/dist/call-DimWbpgJ-ColD4W-y.mjs +0 -9993
- package/dist/channel-bootstrap.runtime-BVclcGv1-DJv_Z-Kr.mjs +0 -2
- package/dist/channel-bootstrap.runtime-Cwcr38m2-VRfVCR-i.mjs +0 -33
- package/dist/chunk-D6SyT4dJ.mjs +0 -36
- package/dist/command-format-LSnUCVVF-BQ2SMKka.mjs +0 -685
- package/dist/config-Bim2pi8a-BQUdfiEi.mjs +0 -9
- package/dist/delivery-context.shared-j5hC5qb1-CI83RXXZ.mjs +0 -72
- package/dist/diagnostic-ClMwNnUA-D6nUtLnb.mjs +0 -140
- package/dist/dist-CEGw8-2W.mjs +0 -429
- package/dist/dist-DD2aJ2UL.mjs +0 -125135
- package/dist/env-api-keys-BVvSg7T2.mjs +0 -68
- package/dist/event-stream-xaQWmyas.mjs +0 -15226
- package/dist/facade-loader-DFzIYYt_-CIr4HKtE.mjs +0 -194
- package/dist/from-DF7cl2wz.mjs +0 -3842
- package/dist/gateway-method-policy-C7rf0SeV-CJQMEYIE.mjs +0 -28
- package/dist/github-copilot-headers-DjqWtUoP.mjs +0 -22
- package/dist/google-C2pVrgBZ.mjs +0 -336
- package/dist/google-gemini-cli-BBxgS5Ho.mjs +0 -623
- package/dist/google-shared-BsWgwEk1.mjs +0 -22791
- package/dist/google-vertex-BsVLJrrC.mjs +0 -358
- package/dist/hash-DAFtW_W7.mjs +0 -16
- package/dist/headers-R3HdCbAE.mjs +0 -8
- package/dist/home-dir-C44RaPME-CBRS4HLP.mjs +0 -93
- package/dist/ids-BPsM98Uu-CwuxvUai.mjs +0 -77
- package/dist/image-2w3cApg7-CxpHvoB5.mjs +0 -207
- package/dist/interactive-init-BXQBalNr.mjs +0 -450
- package/dist/io-CH2g3vsv-BOGlLlB8.mjs +0 -26218
- package/dist/jiti-loader-cache-Bat69wam-D6hCxboy.mjs +0 -5049
- package/dist/json-file-BQRNuxmK-DhJM5NsG.mjs +0 -108
- package/dist/json-parse-v_HIJjjI.mjs +0 -381
- package/dist/jws-GFcTvvVT.mjs +0 -2291
- package/dist/lark-cli-provider-BARgbbmo.mjs +0 -554
- package/dist/lark-logger-D7_pEVQc.mjs +0 -143
- package/dist/live-smoke-BhkBOcH9.mjs +0 -7135
- package/dist/load-context-mb7uvLSn-B10MAi3I.mjs +0 -29
- package/dist/loader-708jrx4Y-BOswuvpe.mjs +0 -5053
- package/dist/manifest-registry-_hxKCS2K-CZdeyN0f.mjs +0 -3512
- package/dist/message-channel-Bk_YHfQg-AeNrPPpp.mjs +0 -50
- package/dist/message-channel-core-DTA--Gjh-CY4Tkb7N.mjs +0 -29
- package/dist/message.config.runtime-K-k4XOyq-DZTmXomP.mjs +0 -2
- package/dist/message.gateway.runtime-DqHOHRTQ-DH4ml0YF.mjs +0 -2
- package/dist/mistral-CaR4DiLu.mjs +0 -28657
- package/dist/model-auth-env-oyg2Hexc-DU_rOUU5.mjs +0 -1306
- package/dist/models-config-BmpSQJQF-Gfvh1n3A.mjs +0 -1282
- package/dist/models-config.runtime-BsU_22xk.mjs +0 -2
- package/dist/multipart-parser-DedmaB5g.mjs +0 -294
- package/dist/oauth-DOJeGfcE.mjs +0 -6392
- package/dist/openai-BDtIh3Ja.mjs +0 -6693
- package/dist/openai-codex-responses-C5EORu31.mjs +0 -664
- package/dist/openai-completions-CR_cS6gX.mjs +0 -669
- package/dist/openai-responses-oGxwZyuC.mjs +0 -184
- package/dist/openai-responses-shared-BixMSDZE.mjs +0 -398
- package/dist/paths-D6msg0S1-C2lYuisN.mjs +0 -189
- package/dist/paths-D92DjaZ--CTOESW2b.mjs +0 -192
- package/dist/pi-model-discovery-Bd0TWzo8-BFsJmeMb.mjs +0 -227
- package/dist/pi-model-discovery-runtime-CCCZxkd8.mjs +0 -2
- package/dist/pi-tools.before-tool-call.runtime-Bn7uqKie-C5ewk8kK.mjs +0 -399
- package/dist/plugin-auto-enable-DdH3n9V8-DsA1isaF.mjs +0 -1456
- package/dist/process-scoped-map-B2cWkYET-CXwUZ8CZ.mjs +0 -61
- package/dist/provider-discovery.runtime-BPzz1PFj.mjs +0 -58
- package/dist/provider-model-compat-CFqcq0it-BDDuBI3A.mjs +0 -118
- package/dist/provider-runtime-C8rljsNs-CIT93zoy.mjs +0 -2
- package/dist/provider-runtime-CT50mNIX-BwEV6GyO.mjs +0 -573
- package/dist/provider-stream-COLujAAo-CbJPDngm.mjs +0 -35449
- package/dist/providers.runtime-Ba7tOlq7-CXkhkzU9.mjs +0 -219
- package/dist/public-surface-loader-BVl0NQAE-C0piXtsT.mjs +0 -117
- package/dist/resolve-C33B7eeu-BNvYTl6k.mjs +0 -1041
- package/dist/runtime-Cym-fqI8-DaSDMH-a.mjs +0 -120
- package/dist/runtime-channel-state-CohMybAh-hXR6y5Gx.mjs +0 -19
- package/dist/runtime-snapshot-C54O1-gI-40cbyi7P.mjs +0 -677
- package/dist/runtime-state-IBOIXKOx-Bf9tcLvc.mjs +0 -10
- package/dist/runtime-web-tools-fallback.runtime-Ca-qn1mj-BCVImm7a.mjs +0 -39
- package/dist/runtime-web-tools-manifest.runtime-BgxQTjmq-Cb4nJkRT.mjs +0 -2
- package/dist/runtime-web-tools-public-artifacts.runtime-D9qcoWIX-BrQdXzOQ.mjs +0 -2
- package/dist/session-archive.runtime-B52_5vs4-BG-_IwNJ.mjs +0 -2
- package/dist/session-key-Cn2QoOyX-CuHbJMgR.mjs +0 -82
- package/dist/session-transcript-files.fs-DEeFXruQ-B1PF6nLy.mjs +0 -147
- package/dist/src-BgCX0MLG.mjs +0 -813
- package/dist/src-DYbqlAqf.mjs +0 -1177
- package/dist/subagent-announce-L5WsQatW-CQWI9GMd.mjs +0 -344
- package/dist/subagent-announce.registry.runtime-DiqZyeTs-BKuniyi3.mjs +0 -28
- package/dist/subagent-registry-steer-runtime-DFgZFC0j-BhBz0roy.mjs +0 -211
- package/dist/subagent-system-prompt-C1qnN--K-DpnTFP47.mjs +0 -3061
- package/dist/target-parsing-loaded-DKkb6jJY-BMD4CkpS.mjs +0 -1002
- package/dist/task-registry-delivery-runtime-Dd1CUkZF-C8U40a3O.mjs +0 -2950
- package/dist/task-registry-delivery-runtime-ragbeVx5-CNbFAkjD.mjs +0 -2
- package/dist/thinking-Bh-7MqXz-D3woGbO7.mjs +0 -2
- package/dist/transcript-E_-ISOkD-DWCfZP2p.mjs +0 -2019
- package/dist/transcript.runtime-BqhvZZdl-BPy42vBP.mjs +0 -2
- package/dist/transform-messages-DbhIzTxq.mjs +0 -207
- package/dist/web-provider-public-artifacts-BlpRwIUS-CGPSV4W2.mjs +0 -295
- package/dist/web-search-providers.runtime--0aUtC3b-DyuhC95V.mjs +0 -200
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
//#region node_modules/.pnpm/@mariozechner+pi-ai@0.69.0_@modelcontextprotocol+sdk@1.29.0_zod@4.3.6__ws@8.21.0_zod@4.3.6/node_modules/@mariozechner/pi-ai/dist/utils/sanitize-unicode.js
|
|
2
|
-
/**
|
|
3
|
-
* Removes unpaired Unicode surrogate characters from a string.
|
|
4
|
-
*
|
|
5
|
-
* Unpaired surrogates (high surrogates 0xD800-0xDBFF without matching low surrogates 0xDC00-0xDFFF,
|
|
6
|
-
* or vice versa) cause JSON serialization errors in many API providers.
|
|
7
|
-
*
|
|
8
|
-
* Valid emoji and other characters outside the Basic Multilingual Plane use properly paired
|
|
9
|
-
* surrogates and will NOT be affected by this function.
|
|
10
|
-
*
|
|
11
|
-
* @param text - The text to sanitize
|
|
12
|
-
* @returns The sanitized text with unpaired surrogates removed
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* // Valid emoji (properly paired surrogates) are preserved
|
|
16
|
-
* sanitizeSurrogates("Hello 🙈 World") // => "Hello 🙈 World"
|
|
17
|
-
*
|
|
18
|
-
* // Unpaired high surrogate is removed
|
|
19
|
-
* const unpaired = String.fromCharCode(0xD83D); // high surrogate without low
|
|
20
|
-
* sanitizeSurrogates(`Text ${unpaired} here`) // => "Text here"
|
|
21
|
-
*/
|
|
22
|
-
function sanitizeSurrogates(text) {
|
|
23
|
-
return text.replace(/[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/g, "");
|
|
24
|
-
}
|
|
25
|
-
//#endregion
|
|
26
|
-
//#region node_modules/.pnpm/@mariozechner+pi-ai@0.69.0_@modelcontextprotocol+sdk@1.29.0_zod@4.3.6__ws@8.21.0_zod@4.3.6/node_modules/@mariozechner/pi-ai/dist/providers/simple-options.js
|
|
27
|
-
function buildBaseOptions(model, options, apiKey) {
|
|
28
|
-
return {
|
|
29
|
-
temperature: options?.temperature,
|
|
30
|
-
maxTokens: options?.maxTokens ?? (model.maxTokens > 0 ? Math.min(model.maxTokens, 32e3) : void 0),
|
|
31
|
-
signal: options?.signal,
|
|
32
|
-
apiKey: apiKey || options?.apiKey,
|
|
33
|
-
cacheRetention: options?.cacheRetention,
|
|
34
|
-
sessionId: options?.sessionId,
|
|
35
|
-
headers: options?.headers,
|
|
36
|
-
onPayload: options?.onPayload,
|
|
37
|
-
onResponse: options?.onResponse,
|
|
38
|
-
maxRetryDelayMs: options?.maxRetryDelayMs,
|
|
39
|
-
metadata: options?.metadata
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
function clampReasoning(effort) {
|
|
43
|
-
return effort === "xhigh" ? "high" : effort;
|
|
44
|
-
}
|
|
45
|
-
function adjustMaxTokensForThinking(baseMaxTokens, modelMaxTokens, reasoningLevel, customBudgets) {
|
|
46
|
-
const budgets = {
|
|
47
|
-
minimal: 1024,
|
|
48
|
-
low: 2048,
|
|
49
|
-
medium: 8192,
|
|
50
|
-
high: 16384,
|
|
51
|
-
...customBudgets
|
|
52
|
-
};
|
|
53
|
-
const minOutputTokens = 1024;
|
|
54
|
-
let thinkingBudget = budgets[clampReasoning(reasoningLevel)];
|
|
55
|
-
const maxTokens = Math.min(baseMaxTokens + thinkingBudget, modelMaxTokens);
|
|
56
|
-
if (maxTokens <= thinkingBudget) thinkingBudget = Math.max(0, maxTokens - minOutputTokens);
|
|
57
|
-
return {
|
|
58
|
-
maxTokens,
|
|
59
|
-
thinkingBudget
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
//#endregion
|
|
63
|
-
//#region node_modules/.pnpm/@mariozechner+pi-ai@0.69.0_@modelcontextprotocol+sdk@1.29.0_zod@4.3.6__ws@8.21.0_zod@4.3.6/node_modules/@mariozechner/pi-ai/dist/providers/transform-messages.js
|
|
64
|
-
const NON_VISION_USER_IMAGE_PLACEHOLDER = "(image omitted: model does not support images)";
|
|
65
|
-
const NON_VISION_TOOL_IMAGE_PLACEHOLDER = "(tool image omitted: model does not support images)";
|
|
66
|
-
function replaceImagesWithPlaceholder(content, placeholder) {
|
|
67
|
-
const result = [];
|
|
68
|
-
let previousWasPlaceholder = false;
|
|
69
|
-
for (const block of content) {
|
|
70
|
-
if (block.type === "image") {
|
|
71
|
-
if (!previousWasPlaceholder) result.push({
|
|
72
|
-
type: "text",
|
|
73
|
-
text: placeholder
|
|
74
|
-
});
|
|
75
|
-
previousWasPlaceholder = true;
|
|
76
|
-
continue;
|
|
77
|
-
}
|
|
78
|
-
result.push(block);
|
|
79
|
-
previousWasPlaceholder = block.text === placeholder;
|
|
80
|
-
}
|
|
81
|
-
return result;
|
|
82
|
-
}
|
|
83
|
-
function downgradeUnsupportedImages(messages, model) {
|
|
84
|
-
if (model.input.includes("image")) return messages;
|
|
85
|
-
return messages.map((msg) => {
|
|
86
|
-
if (msg.role === "user" && Array.isArray(msg.content)) return {
|
|
87
|
-
...msg,
|
|
88
|
-
content: replaceImagesWithPlaceholder(msg.content, NON_VISION_USER_IMAGE_PLACEHOLDER)
|
|
89
|
-
};
|
|
90
|
-
if (msg.role === "toolResult") return {
|
|
91
|
-
...msg,
|
|
92
|
-
content: replaceImagesWithPlaceholder(msg.content, NON_VISION_TOOL_IMAGE_PLACEHOLDER)
|
|
93
|
-
};
|
|
94
|
-
return msg;
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Normalize tool call ID for cross-provider compatibility.
|
|
99
|
-
* OpenAI Responses API generates IDs that are 450+ chars with special characters like `|`.
|
|
100
|
-
* Anthropic APIs require IDs matching ^[a-zA-Z0-9_-]+$ (max 64 chars).
|
|
101
|
-
*/
|
|
102
|
-
function transformMessages(messages, model, normalizeToolCallId) {
|
|
103
|
-
const toolCallIdMap = /* @__PURE__ */ new Map();
|
|
104
|
-
const transformed = downgradeUnsupportedImages(messages, model).map((msg) => {
|
|
105
|
-
if (msg.role === "user") return msg;
|
|
106
|
-
if (msg.role === "toolResult") {
|
|
107
|
-
const normalizedId = toolCallIdMap.get(msg.toolCallId);
|
|
108
|
-
if (normalizedId && normalizedId !== msg.toolCallId) return {
|
|
109
|
-
...msg,
|
|
110
|
-
toolCallId: normalizedId
|
|
111
|
-
};
|
|
112
|
-
return msg;
|
|
113
|
-
}
|
|
114
|
-
if (msg.role === "assistant") {
|
|
115
|
-
const assistantMsg = msg;
|
|
116
|
-
const isSameModel = assistantMsg.provider === model.provider && assistantMsg.api === model.api && assistantMsg.model === model.id;
|
|
117
|
-
const transformedContent = assistantMsg.content.flatMap((block) => {
|
|
118
|
-
if (block.type === "thinking") {
|
|
119
|
-
if (block.redacted) return isSameModel ? block : [];
|
|
120
|
-
if (isSameModel && block.thinkingSignature) return block;
|
|
121
|
-
if (!block.thinking || block.thinking.trim() === "") return [];
|
|
122
|
-
if (isSameModel) return block;
|
|
123
|
-
return {
|
|
124
|
-
type: "text",
|
|
125
|
-
text: block.thinking
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
if (block.type === "text") {
|
|
129
|
-
if (isSameModel) return block;
|
|
130
|
-
return {
|
|
131
|
-
type: "text",
|
|
132
|
-
text: block.text
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
if (block.type === "toolCall") {
|
|
136
|
-
const toolCall = block;
|
|
137
|
-
let normalizedToolCall = toolCall;
|
|
138
|
-
if (!isSameModel && toolCall.thoughtSignature) {
|
|
139
|
-
normalizedToolCall = { ...toolCall };
|
|
140
|
-
delete normalizedToolCall.thoughtSignature;
|
|
141
|
-
}
|
|
142
|
-
if (!isSameModel && normalizeToolCallId) {
|
|
143
|
-
const normalizedId = normalizeToolCallId(toolCall.id, model, assistantMsg);
|
|
144
|
-
if (normalizedId !== toolCall.id) {
|
|
145
|
-
toolCallIdMap.set(toolCall.id, normalizedId);
|
|
146
|
-
normalizedToolCall = {
|
|
147
|
-
...normalizedToolCall,
|
|
148
|
-
id: normalizedId
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
return normalizedToolCall;
|
|
153
|
-
}
|
|
154
|
-
return block;
|
|
155
|
-
});
|
|
156
|
-
return {
|
|
157
|
-
...assistantMsg,
|
|
158
|
-
content: transformedContent
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
return msg;
|
|
162
|
-
});
|
|
163
|
-
const result = [];
|
|
164
|
-
let pendingToolCalls = [];
|
|
165
|
-
let existingToolResultIds = /* @__PURE__ */ new Set();
|
|
166
|
-
const insertSyntheticToolResults = () => {
|
|
167
|
-
if (pendingToolCalls.length > 0) {
|
|
168
|
-
for (const tc of pendingToolCalls) if (!existingToolResultIds.has(tc.id)) result.push({
|
|
169
|
-
role: "toolResult",
|
|
170
|
-
toolCallId: tc.id,
|
|
171
|
-
toolName: tc.name,
|
|
172
|
-
content: [{
|
|
173
|
-
type: "text",
|
|
174
|
-
text: "No result provided"
|
|
175
|
-
}],
|
|
176
|
-
isError: true,
|
|
177
|
-
timestamp: Date.now()
|
|
178
|
-
});
|
|
179
|
-
pendingToolCalls = [];
|
|
180
|
-
existingToolResultIds = /* @__PURE__ */ new Set();
|
|
181
|
-
}
|
|
182
|
-
};
|
|
183
|
-
for (let i = 0; i < transformed.length; i++) {
|
|
184
|
-
const msg = transformed[i];
|
|
185
|
-
if (msg.role === "assistant") {
|
|
186
|
-
insertSyntheticToolResults();
|
|
187
|
-
const assistantMsg = msg;
|
|
188
|
-
if (assistantMsg.stopReason === "error" || assistantMsg.stopReason === "aborted") continue;
|
|
189
|
-
const toolCalls = assistantMsg.content.filter((b) => b.type === "toolCall");
|
|
190
|
-
if (toolCalls.length > 0) {
|
|
191
|
-
pendingToolCalls = toolCalls;
|
|
192
|
-
existingToolResultIds = /* @__PURE__ */ new Set();
|
|
193
|
-
}
|
|
194
|
-
result.push(msg);
|
|
195
|
-
} else if (msg.role === "toolResult") {
|
|
196
|
-
existingToolResultIds.add(msg.toolCallId);
|
|
197
|
-
result.push(msg);
|
|
198
|
-
} else if (msg.role === "user") {
|
|
199
|
-
insertSyntheticToolResults();
|
|
200
|
-
result.push(msg);
|
|
201
|
-
} else result.push(msg);
|
|
202
|
-
}
|
|
203
|
-
insertSyntheticToolResults();
|
|
204
|
-
return result;
|
|
205
|
-
}
|
|
206
|
-
//#endregion
|
|
207
|
-
export { sanitizeSurrogates as a, clampReasoning as i, adjustMaxTokensForThinking as n, buildBaseOptions as r, transformMessages as t };
|
|
@@ -1,295 +0,0 @@
|
|
|
1
|
-
import { l as resolveManifestContractPluginIds, o as loadPluginManifestRegistry } from "./manifest-registry-_hxKCS2K-CZdeyN0f.mjs";
|
|
2
|
-
import { t as loadBundledPluginPublicArtifactModuleSync } from "./public-surface-loader-BVl0NQAE-C0piXtsT.mjs";
|
|
3
|
-
import { g as createPluginIdScopeSet, v as normalizePluginIdScope, y as serializePluginIdScope } from "./plugin-auto-enable-DdH3n9V8-DsA1isaF.mjs";
|
|
4
|
-
import { n as resolveBundledPluginCompatibleLoadValues } from "./activation-context--5yu1dPF-Bwsn3moT.mjs";
|
|
5
|
-
import path from "node:path";
|
|
6
|
-
//#region node_modules/.pnpm/openclaw@2026.4.22_@napi-rs+canvas@0.1.99/node_modules/openclaw/dist/web-provider-public-artifacts.explicit-D5Okdel5.js
|
|
7
|
-
const WEB_SEARCH_ARTIFACT_CANDIDATES = [
|
|
8
|
-
"web-search-contract-api.js",
|
|
9
|
-
"web-search-provider.js",
|
|
10
|
-
"web-search.js"
|
|
11
|
-
];
|
|
12
|
-
const WEB_FETCH_ARTIFACT_CANDIDATES = [
|
|
13
|
-
"web-fetch-contract-api.js",
|
|
14
|
-
"web-fetch-provider.js",
|
|
15
|
-
"web-fetch.js"
|
|
16
|
-
];
|
|
17
|
-
function isRecord(value) {
|
|
18
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
19
|
-
}
|
|
20
|
-
function isStringArray(value) {
|
|
21
|
-
return Array.isArray(value) && value.every((entry) => typeof entry === "string");
|
|
22
|
-
}
|
|
23
|
-
function isWebProviderPlugin(value) {
|
|
24
|
-
return isRecord(value) && typeof value.id === "string" && typeof value.label === "string" && typeof value.hint === "string" && isStringArray(value.envVars) && typeof value.placeholder === "string" && typeof value.signupUrl === "string" && typeof value.credentialPath === "string" && typeof value.getCredentialValue === "function" && typeof value.setCredentialValue === "function" && typeof value.createTool === "function";
|
|
25
|
-
}
|
|
26
|
-
function isWebSearchProviderPlugin(value) {
|
|
27
|
-
return isWebProviderPlugin(value);
|
|
28
|
-
}
|
|
29
|
-
function isWebFetchProviderPlugin(value) {
|
|
30
|
-
return isWebProviderPlugin(value);
|
|
31
|
-
}
|
|
32
|
-
function collectProviderFactories(params) {
|
|
33
|
-
const providers = [];
|
|
34
|
-
for (const [name, exported] of Object.entries(params.mod).toSorted(([left], [right]) => left.localeCompare(right))) {
|
|
35
|
-
if (typeof exported !== "function" || exported.length !== 0 || !name.startsWith("create") || !name.endsWith(params.suffix)) continue;
|
|
36
|
-
const candidate = exported();
|
|
37
|
-
if (params.isProvider(candidate)) providers.push(candidate);
|
|
38
|
-
}
|
|
39
|
-
return providers;
|
|
40
|
-
}
|
|
41
|
-
function tryLoadBundledPublicArtifactModule(params) {
|
|
42
|
-
for (const artifactBasename of params.artifactCandidates) try {
|
|
43
|
-
return loadBundledPluginPublicArtifactModuleSync({
|
|
44
|
-
dirName: params.dirName,
|
|
45
|
-
artifactBasename
|
|
46
|
-
});
|
|
47
|
-
} catch (error) {
|
|
48
|
-
if (error instanceof Error && error.message.startsWith("Unable to resolve bundled plugin public surface ")) continue;
|
|
49
|
-
throw error;
|
|
50
|
-
}
|
|
51
|
-
return null;
|
|
52
|
-
}
|
|
53
|
-
function normalizeExplicitBundledPluginIds(pluginIds) {
|
|
54
|
-
return [...new Set(pluginIds)].toSorted((left, right) => left.localeCompare(right));
|
|
55
|
-
}
|
|
56
|
-
function loadBundledProviderEntriesFromDir(params) {
|
|
57
|
-
const mod = tryLoadBundledPublicArtifactModule({
|
|
58
|
-
dirName: params.dirName,
|
|
59
|
-
artifactCandidates: params.artifactCandidates
|
|
60
|
-
});
|
|
61
|
-
if (!mod) return null;
|
|
62
|
-
const providers = collectProviderFactories({
|
|
63
|
-
mod,
|
|
64
|
-
suffix: params.suffix,
|
|
65
|
-
isProvider: params.isProvider
|
|
66
|
-
});
|
|
67
|
-
if (providers.length === 0) return null;
|
|
68
|
-
return providers.map((provider) => Object.assign({}, provider, { pluginId: params.pluginId }));
|
|
69
|
-
}
|
|
70
|
-
function loadBundledWebSearchProviderEntriesFromDir(params) {
|
|
71
|
-
return loadBundledProviderEntriesFromDir({
|
|
72
|
-
dirName: params.dirName,
|
|
73
|
-
pluginId: params.pluginId,
|
|
74
|
-
artifactCandidates: WEB_SEARCH_ARTIFACT_CANDIDATES,
|
|
75
|
-
suffix: "WebSearchProvider",
|
|
76
|
-
isProvider: isWebSearchProviderPlugin
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
function loadBundledWebFetchProviderEntriesFromDir(params) {
|
|
80
|
-
return loadBundledProviderEntriesFromDir({
|
|
81
|
-
dirName: params.dirName,
|
|
82
|
-
pluginId: params.pluginId,
|
|
83
|
-
artifactCandidates: WEB_FETCH_ARTIFACT_CANDIDATES,
|
|
84
|
-
suffix: "WebFetchProvider",
|
|
85
|
-
isProvider: isWebFetchProviderPlugin
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
function resolveBundledExplicitWebSearchProvidersFromPublicArtifacts(params) {
|
|
89
|
-
const providers = [];
|
|
90
|
-
for (const pluginId of normalizeExplicitBundledPluginIds(params.onlyPluginIds)) {
|
|
91
|
-
const loadedProviders = loadBundledWebSearchProviderEntriesFromDir({
|
|
92
|
-
dirName: pluginId,
|
|
93
|
-
pluginId
|
|
94
|
-
});
|
|
95
|
-
if (!loadedProviders) return null;
|
|
96
|
-
providers.push(...loadedProviders);
|
|
97
|
-
}
|
|
98
|
-
return providers;
|
|
99
|
-
}
|
|
100
|
-
function resolveBundledExplicitWebFetchProvidersFromPublicArtifacts(params) {
|
|
101
|
-
const providers = [];
|
|
102
|
-
for (const pluginId of normalizeExplicitBundledPluginIds(params.onlyPluginIds)) {
|
|
103
|
-
const loadedProviders = loadBundledWebFetchProviderEntriesFromDir({
|
|
104
|
-
dirName: pluginId,
|
|
105
|
-
pluginId
|
|
106
|
-
});
|
|
107
|
-
if (!loadedProviders) return null;
|
|
108
|
-
providers.push(...loadedProviders);
|
|
109
|
-
}
|
|
110
|
-
return providers;
|
|
111
|
-
}
|
|
112
|
-
//#endregion
|
|
113
|
-
//#region node_modules/.pnpm/openclaw@2026.4.22_@napi-rs+canvas@0.1.99/node_modules/openclaw/dist/web-search-providers.shared-CS3LsWf9.js
|
|
114
|
-
function comparePluginProvidersAlphabetically(left, right) {
|
|
115
|
-
return left.id.localeCompare(right.id) || left.pluginId.localeCompare(right.pluginId);
|
|
116
|
-
}
|
|
117
|
-
function sortPluginProviders(providers) {
|
|
118
|
-
return providers.toSorted(comparePluginProvidersAlphabetically);
|
|
119
|
-
}
|
|
120
|
-
function pluginManifestDeclaresProviderConfig(record, configKey, contract) {
|
|
121
|
-
if ((record.contracts?.[contract]?.length ?? 0) > 0) return true;
|
|
122
|
-
if (Object.keys(record.configUiHints ?? {}).some((key) => key === configKey || key.startsWith(`${configKey}.`))) return true;
|
|
123
|
-
const properties = record.configSchema?.properties;
|
|
124
|
-
return typeof properties === "object" && properties !== null && configKey in properties;
|
|
125
|
-
}
|
|
126
|
-
function resolveManifestDeclaredWebProviderCandidatePluginIds(params) {
|
|
127
|
-
const scopedPluginIds = normalizePluginIdScope(params.onlyPluginIds);
|
|
128
|
-
const onlyPluginIdSet = createPluginIdScopeSet(scopedPluginIds);
|
|
129
|
-
const ids = loadPluginManifestRegistry({
|
|
130
|
-
config: params.config,
|
|
131
|
-
workspaceDir: params.workspaceDir,
|
|
132
|
-
env: params.env
|
|
133
|
-
}).plugins.filter((plugin) => (!params.origin || plugin.origin === params.origin) && (!onlyPluginIdSet || onlyPluginIdSet.has(plugin.id)) && pluginManifestDeclaresProviderConfig(plugin, params.configKey, params.contract)).map((plugin) => plugin.id).toSorted((left, right) => left.localeCompare(right));
|
|
134
|
-
if (ids.length > 0) return ids;
|
|
135
|
-
return scopedPluginIds?.length === 0 ? [] : void 0;
|
|
136
|
-
}
|
|
137
|
-
function resolveBundledWebProviderCompatPluginIds(params) {
|
|
138
|
-
return resolveManifestContractPluginIds({
|
|
139
|
-
contract: params.contract,
|
|
140
|
-
origin: "bundled",
|
|
141
|
-
config: params.config,
|
|
142
|
-
workspaceDir: params.workspaceDir,
|
|
143
|
-
env: params.env
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
function resolveBundledWebProviderResolutionConfig(params) {
|
|
147
|
-
const activation = resolveBundledPluginCompatibleLoadValues({
|
|
148
|
-
rawConfig: params.config,
|
|
149
|
-
env: params.env,
|
|
150
|
-
workspaceDir: params.workspaceDir,
|
|
151
|
-
applyAutoEnable: true,
|
|
152
|
-
compatMode: {
|
|
153
|
-
allowlist: params.bundledAllowlistCompat,
|
|
154
|
-
enablement: "always",
|
|
155
|
-
vitest: true
|
|
156
|
-
},
|
|
157
|
-
resolveCompatPluginIds: (compatParams) => resolveBundledWebProviderCompatPluginIds({
|
|
158
|
-
contract: params.contract,
|
|
159
|
-
...compatParams
|
|
160
|
-
})
|
|
161
|
-
});
|
|
162
|
-
return {
|
|
163
|
-
config: activation.config,
|
|
164
|
-
activationSourceConfig: activation.activationSourceConfig,
|
|
165
|
-
autoEnabledReasons: activation.autoEnabledReasons
|
|
166
|
-
};
|
|
167
|
-
}
|
|
168
|
-
function buildWebProviderSnapshotCacheKey(params) {
|
|
169
|
-
const envKey = typeof params.envKey === "string" ? params.envKey : Object.entries(params.envKey).toSorted(([left], [right]) => left.localeCompare(right));
|
|
170
|
-
const onlyPluginIds = normalizePluginIdScope(params.onlyPluginIds);
|
|
171
|
-
return JSON.stringify({
|
|
172
|
-
workspaceDir: params.workspaceDir ?? "",
|
|
173
|
-
bundledAllowlistCompat: params.bundledAllowlistCompat === true,
|
|
174
|
-
origin: params.origin ?? "",
|
|
175
|
-
onlyPluginIds: serializePluginIdScope(onlyPluginIds),
|
|
176
|
-
env: envKey
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
|
-
function mapRegistryProviders(params) {
|
|
180
|
-
const onlyPluginIdSet = createPluginIdScopeSet(normalizePluginIdScope(params.onlyPluginIds));
|
|
181
|
-
return params.sortProviders(params.entries.filter((entry) => !onlyPluginIdSet || onlyPluginIdSet.has(entry.pluginId)).map((entry) => Object.assign({}, entry.provider, { pluginId: entry.pluginId })));
|
|
182
|
-
}
|
|
183
|
-
function sortWebFetchProviders(providers) {
|
|
184
|
-
return sortPluginProviders(providers);
|
|
185
|
-
}
|
|
186
|
-
function resolveBundledWebFetchResolutionConfig(params) {
|
|
187
|
-
return resolveBundledWebProviderResolutionConfig({
|
|
188
|
-
contract: "webFetchProviders",
|
|
189
|
-
config: params.config,
|
|
190
|
-
workspaceDir: params.workspaceDir,
|
|
191
|
-
env: params.env,
|
|
192
|
-
bundledAllowlistCompat: params.bundledAllowlistCompat
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
|
-
function sortWebSearchProviders(providers) {
|
|
196
|
-
return sortPluginProviders(providers);
|
|
197
|
-
}
|
|
198
|
-
function resolveBundledWebSearchResolutionConfig(params) {
|
|
199
|
-
return resolveBundledWebProviderResolutionConfig({
|
|
200
|
-
contract: "webSearchProviders",
|
|
201
|
-
config: params.config,
|
|
202
|
-
workspaceDir: params.workspaceDir,
|
|
203
|
-
env: params.env,
|
|
204
|
-
bundledAllowlistCompat: params.bundledAllowlistCompat
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
//#endregion
|
|
208
|
-
//#region node_modules/.pnpm/openclaw@2026.4.22_@napi-rs+canvas@0.1.99/node_modules/openclaw/dist/web-provider-public-artifacts-BlpRwIUS.js
|
|
209
|
-
function resolveBundledCandidatePluginIds(params) {
|
|
210
|
-
if (params.onlyPluginIds && params.onlyPluginIds.length > 0) return [...new Set(params.onlyPluginIds)].toSorted((left, right) => left.localeCompare(right));
|
|
211
|
-
const resolvedConfig = params.contract === "webSearchProviders" ? resolveBundledWebSearchResolutionConfig(params).config : resolveBundledWebFetchResolutionConfig(params).config;
|
|
212
|
-
return resolveManifestDeclaredWebProviderCandidatePluginIds({
|
|
213
|
-
contract: params.contract,
|
|
214
|
-
configKey: params.configKey,
|
|
215
|
-
config: resolvedConfig,
|
|
216
|
-
workspaceDir: params.workspaceDir,
|
|
217
|
-
env: params.env,
|
|
218
|
-
onlyPluginIds: params.onlyPluginIds,
|
|
219
|
-
origin: "bundled"
|
|
220
|
-
}) ?? [];
|
|
221
|
-
}
|
|
222
|
-
function resolveBundledManifestRecordsByPluginId(params) {
|
|
223
|
-
const allowedPluginIds = new Set(params.onlyPluginIds);
|
|
224
|
-
return new Map(loadPluginManifestRegistry({
|
|
225
|
-
config: params.config,
|
|
226
|
-
workspaceDir: params.workspaceDir,
|
|
227
|
-
env: params.env
|
|
228
|
-
}).plugins.filter((record) => record.origin === "bundled" && allowedPluginIds.has(record.id)).map((record) => [record.id, record]));
|
|
229
|
-
}
|
|
230
|
-
function resolveBundledWebSearchProvidersFromPublicArtifacts(params) {
|
|
231
|
-
const pluginIds = resolveBundledCandidatePluginIds({
|
|
232
|
-
contract: "webSearchProviders",
|
|
233
|
-
configKey: "webSearch",
|
|
234
|
-
config: params.config,
|
|
235
|
-
workspaceDir: params.workspaceDir,
|
|
236
|
-
env: params.env,
|
|
237
|
-
bundledAllowlistCompat: params.bundledAllowlistCompat,
|
|
238
|
-
onlyPluginIds: params.onlyPluginIds
|
|
239
|
-
});
|
|
240
|
-
if (pluginIds.length === 0) return [];
|
|
241
|
-
const directProviders = resolveBundledExplicitWebSearchProvidersFromPublicArtifacts({ onlyPluginIds: pluginIds });
|
|
242
|
-
if (directProviders) return directProviders;
|
|
243
|
-
const recordsByPluginId = resolveBundledManifestRecordsByPluginId({
|
|
244
|
-
config: params.config,
|
|
245
|
-
workspaceDir: params.workspaceDir,
|
|
246
|
-
env: params.env,
|
|
247
|
-
onlyPluginIds: pluginIds
|
|
248
|
-
});
|
|
249
|
-
const providers = [];
|
|
250
|
-
for (const pluginId of pluginIds) {
|
|
251
|
-
const record = recordsByPluginId.get(pluginId);
|
|
252
|
-
if (!record) return null;
|
|
253
|
-
const loadedProviders = loadBundledWebSearchProviderEntriesFromDir({
|
|
254
|
-
dirName: path.basename(record.rootDir),
|
|
255
|
-
pluginId
|
|
256
|
-
});
|
|
257
|
-
if (!loadedProviders) return null;
|
|
258
|
-
providers.push(...loadedProviders);
|
|
259
|
-
}
|
|
260
|
-
return providers;
|
|
261
|
-
}
|
|
262
|
-
function resolveBundledWebFetchProvidersFromPublicArtifacts(params) {
|
|
263
|
-
const pluginIds = resolveBundledCandidatePluginIds({
|
|
264
|
-
contract: "webFetchProviders",
|
|
265
|
-
configKey: "webFetch",
|
|
266
|
-
config: params.config,
|
|
267
|
-
workspaceDir: params.workspaceDir,
|
|
268
|
-
env: params.env,
|
|
269
|
-
bundledAllowlistCompat: params.bundledAllowlistCompat,
|
|
270
|
-
onlyPluginIds: params.onlyPluginIds
|
|
271
|
-
});
|
|
272
|
-
if (pluginIds.length === 0) return [];
|
|
273
|
-
const directProviders = resolveBundledExplicitWebFetchProvidersFromPublicArtifacts({ onlyPluginIds: pluginIds });
|
|
274
|
-
if (directProviders) return directProviders;
|
|
275
|
-
const recordsByPluginId = resolveBundledManifestRecordsByPluginId({
|
|
276
|
-
config: params.config,
|
|
277
|
-
workspaceDir: params.workspaceDir,
|
|
278
|
-
env: params.env,
|
|
279
|
-
onlyPluginIds: pluginIds
|
|
280
|
-
});
|
|
281
|
-
const providers = [];
|
|
282
|
-
for (const pluginId of pluginIds) {
|
|
283
|
-
const record = recordsByPluginId.get(pluginId);
|
|
284
|
-
if (!record) return null;
|
|
285
|
-
const loadedProviders = loadBundledWebFetchProviderEntriesFromDir({
|
|
286
|
-
dirName: path.basename(record.rootDir),
|
|
287
|
-
pluginId
|
|
288
|
-
});
|
|
289
|
-
if (!loadedProviders) return null;
|
|
290
|
-
providers.push(...loadedProviders);
|
|
291
|
-
}
|
|
292
|
-
return providers;
|
|
293
|
-
}
|
|
294
|
-
//#endregion
|
|
295
|
-
export { resolveBundledWebFetchResolutionConfig as a, sortWebFetchProviders as c, mapRegistryProviders as i, sortWebSearchProviders as l, resolveBundledWebSearchProvidersFromPublicArtifacts as n, resolveBundledWebSearchResolutionConfig as o, buildWebProviderSnapshotCacheKey as r, resolveManifestDeclaredWebProviderCandidatePluginIds as s, resolveBundledWebFetchProvidersFromPublicArtifacts as t };
|