xkzoom 1.5.2 → 1.5.3
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 +57 -43
- package/dist/{chunk-VPRVZWF3.mjs → chunk-37LYF6K2.mjs} +1 -1
- package/dist/{chunk-OCQUSYRP.mjs → chunk-3EV63LAA.mjs} +12 -12
- package/dist/{chunk-W4MKSQGZ.mjs → chunk-3FF266OG.mjs} +1 -1
- package/dist/{chunk-J5HTLG3V.mjs → chunk-3LR4CLDE.mjs} +1 -1
- package/dist/{chunk-CDLS44GZ.mjs → chunk-3TTLV2GM.mjs} +1 -1
- package/dist/{chunk-JG3EPJ32.mjs → chunk-54GVKP6B.mjs} +6 -6
- package/dist/{chunk-M52HZV6R.mjs → chunk-5VR6UOGC.mjs} +1 -1
- package/dist/{chunk-GBG4AJON.mjs → chunk-6EI5MFLD.mjs} +4 -4
- package/dist/{chunk-A23OTVH2.mjs → chunk-6LKZYMIW.mjs} +30 -30
- package/dist/{chunk-TAQQSDJN.mjs → chunk-6SYECCCG.mjs} +6 -6
- package/dist/{chunk-24GJWXMG.mjs → chunk-7MOQ462O.mjs} +1 -1
- package/dist/{chunk-LFZAVCVW.mjs → chunk-AJNXWGX2.mjs} +1 -1
- package/dist/{chunk-5DMSAPS2.mjs → chunk-APQRVOZQ.mjs} +5 -5
- package/dist/{chunk-YAD4VG2K.mjs → chunk-BHT6B2TV.mjs} +36 -6
- package/dist/{chunk-BV76CMVR.mjs → chunk-BN273XTH.mjs} +1 -1
- package/dist/{chunk-IXYH42YO.mjs → chunk-C5VQPAOA.mjs} +1 -1
- package/dist/{chunk-PY7W2X6W.mjs → chunk-CQAQRU4P.mjs} +114 -107
- package/dist/{chunk-Q4XUEIOE.mjs → chunk-CVIZMDMZ.mjs} +1 -1
- package/dist/{chunk-SIIEMWE3.mjs → chunk-DB4XTPJF.mjs} +7 -7
- package/dist/{chunk-URF75O5Z.mjs → chunk-DBYEZK64.mjs} +1 -1
- package/dist/{chunk-GIAML5K5.mjs → chunk-DQ7J7RST.mjs} +1 -1
- package/dist/{chunk-BHMWYAVS.mjs → chunk-DXPZNBSQ.mjs} +3 -3
- package/dist/chunk-E5LABIPO.mjs +201 -0
- package/dist/{chunk-A5DUSLHF.mjs → chunk-ED4H2DM7.mjs} +1 -1
- package/dist/{chunk-KYTJH3R3.mjs → chunk-EE3NRJLQ.mjs} +1 -1
- package/dist/{chunk-T4LPE43H.mjs → chunk-ESYRDWFO.mjs} +11 -11
- package/dist/{chunk-CQUISJWG.mjs → chunk-EYK3W2NV.mjs} +1 -1
- package/dist/{chunk-Z7GTU7KF.mjs → chunk-FAJHYXNU.mjs} +5 -5
- package/dist/{chunk-XHO73X2N.mjs → chunk-FKCGJ3BF.mjs} +2 -2
- package/dist/{chunk-HJN232FK.mjs → chunk-FLVJABFP.mjs} +1 -1
- package/dist/{chunk-H5DIQHEQ.mjs → chunk-FZ7NLBVP.mjs} +45 -16
- package/dist/{chunk-HTU5W436.mjs → chunk-G5LQ2PQ6.mjs} +2 -2
- package/dist/{chunk-LTBQWMAJ.mjs → chunk-GSIZ5FR6.mjs} +2 -2
- package/dist/{chunk-UANVP2AV.mjs → chunk-H4BNL7XG.mjs} +1 -1
- package/dist/{chunk-Q6XX6X24.mjs → chunk-I4LMW3IM.mjs} +1 -1
- package/dist/{chunk-VIZQURO5.mjs → chunk-IGJFAE72.mjs} +9 -9
- package/dist/{chunk-7AZVQS2H.mjs → chunk-IVR74IXK.mjs} +7 -7
- package/dist/{chunk-YILSXMZI.mjs → chunk-KI7AMK7P.mjs} +3 -3
- package/dist/{chunk-EQNHKW6L.mjs → chunk-LJF6JSJB.mjs} +1 -1
- package/dist/{chunk-JD5NPIMO.mjs → chunk-LSQ47CLM.mjs} +27 -27
- package/dist/{chunk-IPIV4NGB.mjs → chunk-LXEKUNXI.mjs} +6 -6
- package/dist/{chunk-HR43WO4Q.mjs → chunk-M6VHS3HQ.mjs} +2 -2
- package/dist/{chunk-4DYFM3EC.mjs → chunk-MI6GFOCU.mjs} +4 -4
- package/dist/{chunk-CFZVBILR.mjs → chunk-MIXYB6BH.mjs} +1 -1
- package/dist/{chunk-K4RHLREV.mjs → chunk-MVKCMXBY.mjs} +1 -1
- package/dist/{chunk-JG3K4N5B.mjs → chunk-NIV5GVCE.mjs} +1 -1
- package/dist/{chunk-ZTKJR7OC.mjs → chunk-OWIXULFQ.mjs} +1 -1
- package/dist/{chunk-Y6SJUTY6.mjs → chunk-P262PAGZ.mjs} +15 -2
- package/dist/{chunk-5JGUBBXN.mjs → chunk-PBBRBETA.mjs} +4 -4
- package/dist/{chunk-EGWLJJY7.mjs → chunk-QSHIFD37.mjs} +2 -2
- package/dist/{chunk-WJIY3BIA.mjs → chunk-QSQ274C6.mjs} +44 -16
- package/dist/{chunk-H5TJYSTV.mjs → chunk-QSUD6TNR.mjs} +5 -5
- package/dist/{chunk-YPAQRMUI.mjs → chunk-QYXYVBTO.mjs} +2 -2
- package/dist/{chunk-OB4JJLDC.mjs → chunk-RVW5XO4A.mjs} +4 -4
- package/dist/{chunk-CNHOCDRM.mjs → chunk-RYSPXH7G.mjs} +2 -2
- package/dist/{chunk-CCCPWU2O.mjs → chunk-RZW4EEPW.mjs} +22 -22
- package/dist/{chunk-GGWUDW5W.mjs → chunk-S5ROBD7X.mjs} +2 -2
- package/dist/{chunk-QUXUHJZW.mjs → chunk-SQHTVHQ7.mjs} +7 -7
- package/dist/{chunk-ZM23SMRO.mjs → chunk-T5ZCLYLJ.mjs} +1 -1
- package/dist/{chunk-NYG3IUXK.mjs → chunk-TER7DFHP.mjs} +1 -1
- package/dist/{chunk-RTANSWHW.mjs → chunk-THN36GA5.mjs} +27 -27
- package/dist/{chunk-GUADF3KN.mjs → chunk-ULXTQSV6.mjs} +4 -0
- package/dist/{chunk-PG5CHH66.mjs → chunk-VHRFLCMY.mjs} +1 -1
- package/dist/{chunk-BSQF7NF4.mjs → chunk-W7OJPFTN.mjs} +2 -2
- package/dist/{chunk-S7FQBXOO.mjs → chunk-WGLYR2YT.mjs} +1 -1
- package/dist/{chunk-G5ZU7562.mjs → chunk-WNI5ZPQY.mjs} +7 -7
- package/dist/{chunk-7FLALKSN.mjs → chunk-WRRJFJ2N.mjs} +7 -7
- package/dist/{chunk-ILROJZBI.mjs → chunk-WV6OKJ4J.mjs} +37 -9
- package/dist/{chunk-ASIBETCT.mjs → chunk-X7P6B2LK.mjs} +10 -10
- package/dist/{chunk-MWRQORKQ.mjs → chunk-XF4EURDX.mjs} +1 -1
- package/dist/{chunk-ETD5LGJY.mjs → chunk-Z3COATFF.mjs} +1 -1
- package/dist/index.js +336 -31
- package/dist/index.mjs +169 -168
- package/dist/mobile/action-planner.js +21 -1
- package/dist/mobile/action-planner.mjs +95 -94
- package/dist/mobile/agent-capabilities.js +21 -1
- package/dist/mobile/agent-capabilities.mjs +96 -95
- package/dist/mobile/agent-shop/handlers.mjs +3 -3
- package/dist/mobile/anthropic-incremental-deliver.js +19 -0
- package/dist/mobile/anthropic-incremental-deliver.mjs +3 -2
- package/dist/mobile/anthropic-messages-turn-runner.js +224 -8
- package/dist/mobile/anthropic-messages-turn-runner.mjs +104 -103
- package/dist/mobile/anthropic-owned-tool-executor.js +21 -1
- package/dist/mobile/anthropic-owned-tool-executor.mjs +103 -102
- package/dist/mobile/api.mjs +49 -49
- package/dist/mobile/context-compact/compact-artifact-enrich.js +19 -0
- package/dist/mobile/context-compact/compact-artifact-enrich.mjs +16 -15
- package/dist/mobile/context-compact/compact-artifact-writer.mjs +4 -4
- package/dist/mobile/context-compact/compact-engine-artifacts.mjs +5 -5
- package/dist/mobile/context-compact/compact-memory-distill-job.mjs +3 -3
- package/dist/mobile/context-compact/compact-message-collector.mjs +2 -2
- package/dist/mobile/context-compact/compact-orchestrator.js +21 -1
- package/dist/mobile/context-compact/compact-orchestrator.mjs +34 -33
- package/dist/mobile/context-compact/compact-resume-prefetch.mjs +4 -4
- package/dist/mobile/context-compact/compact-summarizer-engine-artifact.js +19 -0
- package/dist/mobile/context-compact/compact-summarizer-engine-artifact.mjs +18 -17
- package/dist/mobile/context-compact/compact-summarizer-llm-request.js +19 -0
- package/dist/mobile/context-compact/compact-summarizer-llm-request.mjs +10 -9
- package/dist/mobile/context-compact/compact-summarizer-llm.js +19 -0
- package/dist/mobile/context-compact/compact-summarizer-llm.mjs +11 -10
- package/dist/mobile/context-compact/compact-summarizer.js +19 -0
- package/dist/mobile/context-compact/compact-summarizer.mjs +15 -14
- package/dist/mobile/context-compact/compact-write-verifier.mjs +2 -2
- package/dist/mobile/context-compact/context-budget-gate.js +14 -2
- package/dist/mobile/context-compact/context-budget-gate.mjs +2 -2
- package/dist/mobile/context-compact/runtime-compact-hook.js +33 -2
- package/dist/mobile/context-compact/runtime-compact-hook.mjs +99 -98
- package/dist/mobile/group/conductor-llm.js +19 -0
- package/dist/mobile/group/conductor-llm.mjs +13 -12
- package/dist/mobile/group/conductor-plan-llm.js +19 -0
- package/dist/mobile/group/conductor-plan-llm.mjs +19 -18
- package/dist/mobile/group/delivery-verification.mjs +4 -4
- package/dist/mobile/group/direct-chat-group-context.mjs +1 -1
- package/dist/mobile/group/execution-plan.mjs +5 -5
- package/dist/mobile/group/floor-scheduler.mjs +7 -7
- package/dist/mobile/group/floor-state-store.mjs +6 -6
- package/dist/mobile/group/group-api-handlers.mjs +38 -38
- package/dist/mobile/group/group-peer-private-context.mjs +1 -1
- package/dist/mobile/group/group-session.mjs +19 -19
- package/dist/mobile/group/index.mjs +32 -32
- package/dist/mobile/group/memory-supplement.mjs +10 -10
- package/dist/mobile/group/orchestrator.mjs +30 -30
- package/dist/mobile/group/pipeline-ceo-dept-mention-parse.mjs +3 -3
- package/dist/mobile/group/pipeline-handoff-verification.mjs +3 -3
- package/dist/mobile/group/pipeline-turn-outcome.mjs +2 -2
- package/dist/mobile/group/plan-runtime.mjs +18 -18
- package/dist/mobile/group/relation-distill.mjs +8 -8
- package/dist/mobile/group/runtime-integration.mjs +36 -36
- package/dist/mobile/index.js +336 -31
- package/dist/mobile/index.mjs +164 -163
- package/dist/mobile/interrupted-turn.js +5 -0
- package/dist/mobile/interrupted-turn.mjs +3 -1
- package/dist/mobile/memory-contract-r1-prefetch.mjs +11 -11
- package/dist/mobile/memory-contract-r5-empty-result.mjs +12 -12
- package/dist/mobile/memory-runtime-v2/eval-runner.mjs +4 -4
- package/dist/mobile/memory-runtime-v2/evidence-plan.mjs +5 -5
- package/dist/mobile/memory-runtime-v2/index.mjs +15 -15
- package/dist/mobile/memory-runtime-v2/memory-control-plane.mjs +5 -5
- package/dist/mobile/memory-runtime-v2/memory-readiness.mjs +5 -5
- package/dist/mobile/memory-runtime-v2/orchestrator.mjs +3 -3
- package/dist/mobile/memory-runtime-v2/public-api.mjs +6 -6
- package/dist/mobile/model-context-window-budget.js +16 -2
- package/dist/mobile/model-context-window-budget.mjs +3 -1
- package/dist/mobile/native-anthropic-messages-stream.js +223 -7
- package/dist/mobile/native-anthropic-messages-stream.mjs +11 -10
- package/dist/mobile/native-anthropic-turn-errors.mjs +2 -2
- package/dist/mobile/native-openai-text-stream.js +223 -6
- package/dist/mobile/native-openai-text-stream.mjs +2 -1
- package/dist/mobile/native-reply-route.js +19 -0
- package/dist/mobile/native-reply-route.mjs +10 -9
- package/dist/mobile/native-reply-system-prompt-layers.js +21 -1
- package/dist/mobile/native-reply-system-prompt-layers.mjs +96 -95
- package/dist/mobile/native-request-diagnostics.js +230 -0
- package/dist/mobile/native-request-diagnostics.mjs +17 -0
- package/dist/mobile/native-stream-block-emit.js +19 -0
- package/dist/mobile/native-stream-block-emit.mjs +2 -1
- package/dist/mobile/openai-completions-turn-runner.js +224 -8
- package/dist/mobile/openai-completions-turn-runner.mjs +104 -103
- package/dist/mobile/reply-dispatch-warmup.mjs +2 -2
- package/dist/mobile/runtime.js +336 -31
- package/dist/mobile/runtime.mjs +161 -160
- package/dist/mobile/stream-inbound/mobile-text-stream-pipeline.mjs +3 -3
- package/dist/mobile/tool-use-input-normalize.js +21 -1
- package/dist/mobile/tool-use-input-normalize.mjs +98 -97
- package/dist/mobile/tools/mobile-compact-tool-bridge.js +21 -1
- package/dist/mobile/tools/mobile-compact-tool-bridge.mjs +98 -97
- package/dist/org/dept-context.mjs +4 -4
- package/dist/org/index.mjs +14 -14
- package/dist/owned-tools/ceo-confirm-requirements.mjs +12 -12
- package/dist/owned-tools/ceo-decision.mjs +18 -18
- package/dist/owned-tools/ceo-ops-brief.mjs +12 -12
- package/dist/owned-tools/ceo-redirect.mjs +37 -37
- package/dist/owned-tools/commit-stack-lesson.mjs +13 -13
- package/dist/owned-tools/compact/execute.js +21 -1
- package/dist/owned-tools/compact/execute.mjs +96 -95
- package/dist/owned-tools/compact/gateway-tool-factory.js +21 -1
- package/dist/owned-tools/compact/gateway-tool-factory.mjs +97 -96
- package/dist/owned-tools/compact/registry.js +21 -1
- package/dist/owned-tools/compact/registry.mjs +95 -94
- package/dist/owned-tools/context-compact.js +21 -1
- package/dist/owned-tools/context-compact.mjs +42 -41
- package/dist/owned-tools/groups-history.mjs +1 -1
- package/dist/owned-tools/handoff.mjs +17 -17
- package/dist/owned-tools/memory-control.mjs +7 -7
- package/dist/owned-tools/memory-runtime-eval.mjs +6 -6
- package/dist/owned-tools/message.mjs +2 -2
- package/dist/owned-tools/models-list.mjs +2 -2
- package/dist/owned-tools/register-owned-providers.mjs +5 -5
- package/dist/owned-tools/registry.js +21 -1
- package/dist/owned-tools/registry.mjs +94 -93
- package/dist/owned-tools/router.js +21 -1
- package/dist/owned-tools/router.mjs +95 -94
- package/dist/owned-tools/runtime-bridge.js +21 -1
- package/dist/owned-tools/runtime-bridge.mjs +96 -95
- package/dist/owned-tools/session-status.mjs +1 -1
- package/dist/owned-tools/sessions-history-resolver.mjs +2 -2
- package/dist/owned-tools/sessions-history.mjs +1 -1
- package/dist/owned-tools/sessions-send.mjs +1 -1
- package/dist/owned-tools/subagents.mjs +1 -1
- package/dist/owned-tools/tool-contract-prompt.js +21 -1
- package/dist/owned-tools/tool-contract-prompt.mjs +95 -94
- package/dist/owned-tools/tool-result-envelope.js +21 -1
- package/dist/owned-tools/tool-result-envelope.mjs +97 -96
- package/dist/owned-tools/tool-usage-guide.js +21 -1
- package/dist/owned-tools/tool-usage-guide.mjs +94 -93
- package/dist/owned-tools/tts.mjs +4 -4
- package/dist/owned-tools/web-smoke.mjs +6 -6
- package/dist/project/file-tool-scope-default.mjs +6 -6
- package/dist/project-pipeline/handlers.mjs +37 -37
- package/dist/project-pipeline/index.mjs +40 -40
- package/dist/project-pipeline/pipeline-routing.mjs +2 -2
- package/dist/project-pipeline/post-close-skill-evolution.mjs +5 -5
- package/dist/project-pipeline/project-store.mjs +5 -5
- package/package.json +2 -2
- package/dist/{chunk-UNZ3D3B3.mjs → chunk-3OXBG4OP.mjs} +5 -5
- package/dist/{chunk-NRJWLPTI.mjs → chunk-6AY6OPO5.mjs} +3 -3
- package/dist/{chunk-JA65ZG3H.mjs → chunk-6ZWKLMY3.mjs} +4 -4
- package/dist/{chunk-T23H5D4O.mjs → chunk-AINHKBJW.mjs} +3 -3
- package/dist/{chunk-2BGXTBZX.mjs → chunk-D3N7EHB2.mjs} +8 -8
- package/dist/{chunk-JIY7IOQ5.mjs → chunk-DRY7AJMM.mjs} +3 -3
- package/dist/{chunk-QM7MTC5Q.mjs → chunk-H6LMX5G5.mjs} +3 -3
- package/dist/{chunk-2TBXT3PD.mjs → chunk-J74WVZGF.mjs} +6 -6
- package/dist/{chunk-WPLDZLAL.mjs → chunk-L7PMYQN5.mjs} +3 -3
- package/dist/{chunk-CORUFGMR.mjs → chunk-N3YQ5IL6.mjs} +7 -7
- package/dist/{chunk-5LUTMHVL.mjs → chunk-NXKHSX4M.mjs} +3 -3
- package/dist/{chunk-MGWYJD5Q.mjs → chunk-QCSNRVL2.mjs} +8 -8
|
@@ -1,37 +1,40 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildAgentCapabilities
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-FAJHYXNU.mjs";
|
|
4
|
+
import "../chunk-F2KFLTBF.mjs";
|
|
5
|
+
import "../chunk-THN36GA5.mjs";
|
|
5
6
|
import "../chunk-4IUL5JAK.mjs";
|
|
6
7
|
import "../chunk-CKXZA326.mjs";
|
|
7
8
|
import "../chunk-3JF27U3D.mjs";
|
|
8
9
|
import "../chunk-77HWNHNA.mjs";
|
|
9
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-I23YODIQ.mjs";
|
|
11
|
+
import "../chunk-EYK3W2NV.mjs";
|
|
10
12
|
import "../chunk-PINXXWFJ.mjs";
|
|
11
13
|
import "../chunk-5A6PJOVC.mjs";
|
|
12
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-DRY7AJMM.mjs";
|
|
13
15
|
import "../chunk-M3PHJAPB.mjs";
|
|
14
16
|
import "../chunk-ZW24EQKD.mjs";
|
|
15
17
|
import "../chunk-EUZU6RVZ.mjs";
|
|
16
18
|
import "../chunk-DS3VLDJA.mjs";
|
|
17
|
-
import "../chunk-I23YODIQ.mjs";
|
|
18
19
|
import "../chunk-WXELBVXY.mjs";
|
|
19
20
|
import "../chunk-Z2JNJLJM.mjs";
|
|
21
|
+
import "../chunk-23G5U4RO.mjs";
|
|
20
22
|
import "../chunk-5ZMY6RTR.mjs";
|
|
23
|
+
import "../chunk-634RMCSZ.mjs";
|
|
21
24
|
import "../chunk-MJ6DSJJF.mjs";
|
|
22
25
|
import "../chunk-TRMEHTAT.mjs";
|
|
23
26
|
import "../chunk-CTKIQWTE.mjs";
|
|
24
|
-
import "../chunk-
|
|
25
|
-
import "../chunk-S7FQBXOO.mjs";
|
|
27
|
+
import "../chunk-WGLYR2YT.mjs";
|
|
26
28
|
import "../chunk-N2CMVW47.mjs";
|
|
27
|
-
import "../chunk-
|
|
29
|
+
import "../chunk-M6VHS3HQ.mjs";
|
|
28
30
|
import "../chunk-VWAUDB4X.mjs";
|
|
29
|
-
import "../chunk-
|
|
30
|
-
import "../chunk-
|
|
31
|
+
import "../chunk-6AY6OPO5.mjs";
|
|
32
|
+
import "../chunk-ESYRDWFO.mjs";
|
|
31
33
|
import "../chunk-F4QXCGDQ.mjs";
|
|
32
34
|
import "../chunk-PUND56EY.mjs";
|
|
33
35
|
import "../chunk-LT2FPTFV.mjs";
|
|
34
36
|
import "../chunk-WXLTNKDF.mjs";
|
|
37
|
+
import "../chunk-IT2GAHAL.mjs";
|
|
35
38
|
import "../chunk-56MXMULP.mjs";
|
|
36
39
|
import "../chunk-T6XDJ2QQ.mjs";
|
|
37
40
|
import "../chunk-BRJJML7A.mjs";
|
|
@@ -44,104 +47,94 @@ import "../chunk-BFSOQ5IG.mjs";
|
|
|
44
47
|
import "../chunk-IKQ7CLX3.mjs";
|
|
45
48
|
import "../chunk-VA7SUI2L.mjs";
|
|
46
49
|
import "../chunk-C5FHWCQN.mjs";
|
|
47
|
-
import "../chunk-
|
|
48
|
-
import "../chunk-
|
|
49
|
-
import "../chunk-
|
|
50
|
-
import "../chunk-
|
|
51
|
-
import "../chunk-
|
|
52
|
-
import "../chunk-
|
|
53
|
-
import "../chunk-
|
|
50
|
+
import "../chunk-2IZUNNW7.mjs";
|
|
51
|
+
import "../chunk-UPNUSBKT.mjs";
|
|
52
|
+
import "../chunk-AV3DCNW4.mjs";
|
|
53
|
+
import "../chunk-RYSPXH7G.mjs";
|
|
54
|
+
import "../chunk-PBBRBETA.mjs";
|
|
55
|
+
import "../chunk-GSIZ5FR6.mjs";
|
|
56
|
+
import "../chunk-WRRJFJ2N.mjs";
|
|
57
|
+
import "../chunk-S5ROBD7X.mjs";
|
|
58
|
+
import "../chunk-MVKCMXBY.mjs";
|
|
54
59
|
import "../chunk-X3BY5KPX.mjs";
|
|
55
|
-
import "../chunk-
|
|
60
|
+
import "../chunk-RZW4EEPW.mjs";
|
|
56
61
|
import "../chunk-M5OZFTYB.mjs";
|
|
57
62
|
import "../chunk-H2UCPL5O.mjs";
|
|
58
63
|
import "../chunk-I5A67DYI.mjs";
|
|
59
64
|
import "../chunk-NRPJCCDI.mjs";
|
|
60
|
-
import "../chunk-
|
|
61
|
-
import "../chunk-IMJV6WJP.mjs";
|
|
65
|
+
import "../chunk-FLVJABFP.mjs";
|
|
62
66
|
import "../chunk-4IWTTXQE.mjs";
|
|
63
|
-
import "../chunk-
|
|
64
|
-
import "../chunk-GBG4AJON.mjs";
|
|
67
|
+
import "../chunk-IMJV6WJP.mjs";
|
|
65
68
|
import "../chunk-7NIZD2CT.mjs";
|
|
66
|
-
import "../chunk-
|
|
67
|
-
import "../chunk-
|
|
68
|
-
import "../chunk-
|
|
69
|
-
import "../chunk-
|
|
69
|
+
import "../chunk-OWIXULFQ.mjs";
|
|
70
|
+
import "../chunk-6EI5MFLD.mjs";
|
|
71
|
+
import "../chunk-DBYEZK64.mjs";
|
|
72
|
+
import "../chunk-QSUD6TNR.mjs";
|
|
73
|
+
import "../chunk-6S7LAZFT.mjs";
|
|
74
|
+
import "../chunk-54GVKP6B.mjs";
|
|
75
|
+
import "../chunk-RVW5XO4A.mjs";
|
|
70
76
|
import "../chunk-AAVCVONC.mjs";
|
|
71
77
|
import "../chunk-NH3HEDTR.mjs";
|
|
72
78
|
import "../chunk-NHI2FACI.mjs";
|
|
73
79
|
import "../chunk-HICPBFBW.mjs";
|
|
74
|
-
import "../chunk-
|
|
75
|
-
import "../chunk-
|
|
76
|
-
import "../chunk-VIZQURO5.mjs";
|
|
80
|
+
import "../chunk-MIXYB6BH.mjs";
|
|
81
|
+
import "../chunk-IGJFAE72.mjs";
|
|
77
82
|
import "../chunk-VY2APE6F.mjs";
|
|
78
|
-
import "../chunk-
|
|
83
|
+
import "../chunk-UHHTLW2Z.mjs";
|
|
84
|
+
import "../chunk-L7PMYQN5.mjs";
|
|
85
|
+
import "../chunk-NDHB4EIS.mjs";
|
|
86
|
+
import "../chunk-OIMCXCOZ.mjs";
|
|
79
87
|
import "../chunk-E4GA33KE.mjs";
|
|
80
|
-
import "../chunk-
|
|
81
|
-
import "../chunk-
|
|
88
|
+
import "../chunk-H6LMX5G5.mjs";
|
|
89
|
+
import "../chunk-NXKHSX4M.mjs";
|
|
82
90
|
import "../chunk-GR7LH34J.mjs";
|
|
83
91
|
import "../chunk-ME6MMQWE.mjs";
|
|
84
|
-
import "../chunk-NDHB4EIS.mjs";
|
|
85
|
-
import "../chunk-OIMCXCOZ.mjs";
|
|
86
|
-
import "../chunk-UHHTLW2Z.mjs";
|
|
87
92
|
import "../chunk-UUUBYCJP.mjs";
|
|
88
|
-
import "../chunk-
|
|
93
|
+
import "../chunk-FKCGJ3BF.mjs";
|
|
89
94
|
import "../chunk-IHH6JKPK.mjs";
|
|
90
95
|
import "../chunk-UJHGVFHZ.mjs";
|
|
91
96
|
import "../chunk-QWFX5VEN.mjs";
|
|
92
97
|
import "../chunk-KJR74IUO.mjs";
|
|
93
|
-
import "../chunk-IT2GAHAL.mjs";
|
|
94
98
|
import "../chunk-MJDJIPB4.mjs";
|
|
95
99
|
import "../chunk-TYJNITLS.mjs";
|
|
96
100
|
import "../chunk-PRXIJYAJ.mjs";
|
|
97
101
|
import "../chunk-LBZCBBHU.mjs";
|
|
98
|
-
import "../chunk-2IZUNNW7.mjs";
|
|
99
|
-
import "../chunk-UPNUSBKT.mjs";
|
|
100
|
-
import "../chunk-AV3DCNW4.mjs";
|
|
101
102
|
import "../chunk-VA632PNM.mjs";
|
|
102
103
|
import "../chunk-4ELPLFOH.mjs";
|
|
103
|
-
import "../chunk-Y6SJUTY6.mjs";
|
|
104
|
-
import "../chunk-H5DIQHEQ.mjs";
|
|
105
104
|
import "../chunk-44L5RQKZ.mjs";
|
|
105
|
+
import "../chunk-P262PAGZ.mjs";
|
|
106
|
+
import "../chunk-FZ7NLBVP.mjs";
|
|
107
|
+
import "../chunk-GOSSEVA6.mjs";
|
|
106
108
|
import "../chunk-XQFQO4EA.mjs";
|
|
109
|
+
import "../chunk-X7ZWYPCN.mjs";
|
|
107
110
|
import "../chunk-GU4CQC5I.mjs";
|
|
108
111
|
import "../chunk-5BXGR5C2.mjs";
|
|
109
|
-
import "../chunk-GOSSEVA6.mjs";
|
|
110
|
-
import "../chunk-X7ZWYPCN.mjs";
|
|
111
112
|
import "../chunk-BW737ZQN.mjs";
|
|
112
113
|
import "../chunk-3UZNL3V3.mjs";
|
|
113
|
-
import "../chunk-CDLS44GZ.mjs";
|
|
114
|
-
import "../chunk-YAD4VG2K.mjs";
|
|
115
|
-
import "../chunk-C36JYBG7.mjs";
|
|
116
|
-
import "../chunk-PJDUIH5J.mjs";
|
|
117
|
-
import "../chunk-NEDXMES6.mjs";
|
|
118
|
-
import "../chunk-LR5GC3NZ.mjs";
|
|
119
114
|
import "../chunk-UQLGVSQH.mjs";
|
|
120
115
|
import "../chunk-E7BFLHLM.mjs";
|
|
121
|
-
import "../chunk-5AM5MS43.mjs";
|
|
122
116
|
import "../chunk-SPO74LMZ.mjs";
|
|
123
|
-
import "../chunk-LJ5OPMYI.mjs";
|
|
124
117
|
import "../chunk-MORFK46T.mjs";
|
|
125
118
|
import "../chunk-K5GKQRJY.mjs";
|
|
126
119
|
import "../chunk-54MLYQ72.mjs";
|
|
127
|
-
import "../chunk-
|
|
120
|
+
import "../chunk-3EV63LAA.mjs";
|
|
128
121
|
import "../chunk-UFV3WER4.mjs";
|
|
129
122
|
import "../chunk-BSG6WLML.mjs";
|
|
130
|
-
import "../chunk-
|
|
131
|
-
import "../chunk-
|
|
123
|
+
import "../chunk-6LKZYMIW.mjs";
|
|
124
|
+
import "../chunk-TER7DFHP.mjs";
|
|
132
125
|
import "../chunk-A5OB3QEO.mjs";
|
|
133
126
|
import "../chunk-CRN5R5GG.mjs";
|
|
134
127
|
import "../chunk-VAERBRDX.mjs";
|
|
135
128
|
import "../chunk-L4Z7ND7Z.mjs";
|
|
136
|
-
import "../chunk-
|
|
129
|
+
import "../chunk-KI7AMK7P.mjs";
|
|
137
130
|
import "../chunk-UPZP6IT3.mjs";
|
|
138
131
|
import "../chunk-YH3GFC5X.mjs";
|
|
139
132
|
import "../chunk-C3CZKA3E.mjs";
|
|
140
|
-
import "../chunk-
|
|
133
|
+
import "../chunk-DQ7J7RST.mjs";
|
|
141
134
|
import "../chunk-DCAXPHP4.mjs";
|
|
142
135
|
import "../chunk-QFW3ZP6R.mjs";
|
|
143
136
|
import "../chunk-RSMNVCI6.mjs";
|
|
144
|
-
import "../chunk-
|
|
137
|
+
import "../chunk-DXPZNBSQ.mjs";
|
|
145
138
|
import "../chunk-MXXTDG5V.mjs";
|
|
146
139
|
import "../chunk-FY2QAWA6.mjs";
|
|
147
140
|
import "../chunk-7XD4NIAR.mjs";
|
|
@@ -155,47 +148,43 @@ import "../chunk-HJCKITZG.mjs";
|
|
|
155
148
|
import "../chunk-TOCC5J66.mjs";
|
|
156
149
|
import "../chunk-DT2WBACK.mjs";
|
|
157
150
|
import "../chunk-AZVEPDT6.mjs";
|
|
158
|
-
import "../chunk-S4AIBE4O.mjs";
|
|
159
|
-
import "../chunk-LOGWIK2T.mjs";
|
|
160
|
-
import "../chunk-Z7C7KX3U.mjs";
|
|
161
|
-
import "../chunk-QRMV5CAE.mjs";
|
|
162
151
|
import "../chunk-RZOILUDC.mjs";
|
|
163
152
|
import "../chunk-BJ6YI2DJ.mjs";
|
|
153
|
+
import "../chunk-6SZCPHCL.mjs";
|
|
164
154
|
import "../chunk-4POYX4AW.mjs";
|
|
165
155
|
import "../chunk-NJYJS6MU.mjs";
|
|
166
|
-
import "../chunk-
|
|
167
|
-
import "../chunk-LFZAVCVW.mjs";
|
|
156
|
+
import "../chunk-AJNXWGX2.mjs";
|
|
168
157
|
import "../chunk-INHFVKZY.mjs";
|
|
169
|
-
import "../chunk-
|
|
170
|
-
import "../chunk-
|
|
171
|
-
import "../chunk-
|
|
172
|
-
import "../chunk-
|
|
158
|
+
import "../chunk-7MOQ462O.mjs";
|
|
159
|
+
import "../chunk-Z3COATFF.mjs";
|
|
160
|
+
import "../chunk-XF4EURDX.mjs";
|
|
161
|
+
import "../chunk-AINHKBJW.mjs";
|
|
173
162
|
import "../chunk-BHA3SMKH.mjs";
|
|
174
163
|
import "../chunk-GYZ4IXUD.mjs";
|
|
175
|
-
import "../chunk-
|
|
176
|
-
import "../chunk-
|
|
164
|
+
import "../chunk-ED4H2DM7.mjs";
|
|
165
|
+
import "../chunk-I4LMW3IM.mjs";
|
|
177
166
|
import "../chunk-XQUKAHWK.mjs";
|
|
178
167
|
import "../chunk-DDD2BA7K.mjs";
|
|
179
168
|
import "../chunk-DDNZWJII.mjs";
|
|
180
169
|
import "../chunk-ZZLJUAEK.mjs";
|
|
181
170
|
import "../chunk-6SJTUWEO.mjs";
|
|
182
|
-
import "../chunk-
|
|
171
|
+
import "../chunk-IVR74IXK.mjs";
|
|
183
172
|
import "../chunk-UAQDS6V2.mjs";
|
|
184
|
-
import "../chunk-
|
|
185
|
-
import "../chunk-VS2URZFN.mjs";
|
|
173
|
+
import "../chunk-N3YQ5IL6.mjs";
|
|
186
174
|
import "../chunk-J72V5GVI.mjs";
|
|
187
175
|
import "../chunk-2AHSYECT.mjs";
|
|
176
|
+
import "../chunk-VS2URZFN.mjs";
|
|
188
177
|
import "../chunk-LWCO2YNI.mjs";
|
|
189
178
|
import "../chunk-TSIQCRWD.mjs";
|
|
190
179
|
import "../chunk-KCZIK3TH.mjs";
|
|
191
180
|
import "../chunk-NJAPWQ4D.mjs";
|
|
192
181
|
import "../chunk-5Z5IS4XG.mjs";
|
|
193
|
-
import "../chunk-73SN5UQC.mjs";
|
|
194
182
|
import "../chunk-DUB3FBYX.mjs";
|
|
195
183
|
import "../chunk-EL6TOIFZ.mjs";
|
|
196
184
|
import "../chunk-UH6VXWMV.mjs";
|
|
197
185
|
import "../chunk-XL3MUGFG.mjs";
|
|
198
186
|
import "../chunk-4WWT6OC2.mjs";
|
|
187
|
+
import "../chunk-73SN5UQC.mjs";
|
|
199
188
|
import "../chunk-Q7NYATKS.mjs";
|
|
200
189
|
import "../chunk-M2GS2K6H.mjs";
|
|
201
190
|
import "../chunk-24ASGNQU.mjs";
|
|
@@ -215,46 +204,58 @@ import "../chunk-R4TQVAMP.mjs";
|
|
|
215
204
|
import "../chunk-U2HA2HLE.mjs";
|
|
216
205
|
import "../chunk-KPJOJH6H.mjs";
|
|
217
206
|
import "../chunk-QJX4OXDZ.mjs";
|
|
218
|
-
import "../chunk-LCR7EVVU.mjs";
|
|
219
207
|
import "../chunk-6ZVXCJTG.mjs";
|
|
220
208
|
import "../chunk-VTZUX3F6.mjs";
|
|
221
209
|
import "../chunk-DPNXFDFK.mjs";
|
|
222
210
|
import "../chunk-WRZWEAMN.mjs";
|
|
223
211
|
import "../chunk-IKQPTA2J.mjs";
|
|
212
|
+
import "../chunk-LCR7EVVU.mjs";
|
|
224
213
|
import "../chunk-GEXTQELG.mjs";
|
|
225
|
-
import "../chunk-
|
|
214
|
+
import "../chunk-AFD4DOFH.mjs";
|
|
215
|
+
import "../chunk-APQRVOZQ.mjs";
|
|
226
216
|
import "../chunk-LDBMLTV2.mjs";
|
|
227
|
-
import "../chunk-OJYZLNSD.mjs";
|
|
228
217
|
import "../chunk-F23B3GJV.mjs";
|
|
229
|
-
import "../chunk-
|
|
218
|
+
import "../chunk-3OXBG4OP.mjs";
|
|
230
219
|
import "../chunk-NMPWPD2P.mjs";
|
|
231
|
-
import "../chunk-
|
|
232
|
-
import "../chunk-
|
|
233
|
-
import "../chunk-JA65ZG3H.mjs";
|
|
234
|
-
import "../chunk-LREFRIQQ.mjs";
|
|
235
|
-
import "../chunk-KHQZ35IL.mjs";
|
|
236
|
-
import "../chunk-QOKQVPZ6.mjs";
|
|
237
|
-
import "../chunk-HQLCDNMN.mjs";
|
|
238
|
-
import "../chunk-6XBAYBWZ.mjs";
|
|
239
|
-
import "../chunk-I3T745ZX.mjs";
|
|
240
|
-
import "../chunk-Q7YUHFMS.mjs";
|
|
241
|
-
import "../chunk-2B6C5VWQ.mjs";
|
|
242
|
-
import "../chunk-KDZWHGGN.mjs";
|
|
243
|
-
import "../chunk-AFD4DOFH.mjs";
|
|
220
|
+
import "../chunk-FXJGKIYT.mjs";
|
|
221
|
+
import "../chunk-VE2NKY44.mjs";
|
|
244
222
|
import "../chunk-DJPMIVQY.mjs";
|
|
245
223
|
import "../chunk-DAQHVMKF.mjs";
|
|
246
224
|
import "../chunk-AKGVDH6O.mjs";
|
|
247
|
-
import "../chunk-FXJGKIYT.mjs";
|
|
248
225
|
import "../chunk-IXY2XMGE.mjs";
|
|
249
|
-
import "../chunk-BF7STJF7.mjs";
|
|
250
226
|
import "../chunk-PS6X3CND.mjs";
|
|
251
|
-
import "../chunk-
|
|
227
|
+
import "../chunk-BF7STJF7.mjs";
|
|
228
|
+
import "../chunk-3TTLV2GM.mjs";
|
|
229
|
+
import "../chunk-BHT6B2TV.mjs";
|
|
230
|
+
import "../chunk-E5LABIPO.mjs";
|
|
231
|
+
import "../chunk-C36JYBG7.mjs";
|
|
232
|
+
import "../chunk-PJDUIH5J.mjs";
|
|
233
|
+
import "../chunk-NEDXMES6.mjs";
|
|
234
|
+
import "../chunk-LR5GC3NZ.mjs";
|
|
252
235
|
import "../chunk-JHQIGDVB.mjs";
|
|
253
236
|
import "../chunk-DSSVZ47P.mjs";
|
|
254
237
|
import "../chunk-SBBPQQYS.mjs";
|
|
255
238
|
import "../chunk-6GQKKEQA.mjs";
|
|
256
239
|
import "../chunk-QWSPMYE5.mjs";
|
|
257
|
-
import "../chunk-
|
|
240
|
+
import "../chunk-LJ5OPMYI.mjs";
|
|
241
|
+
import "../chunk-5AM5MS43.mjs";
|
|
242
|
+
import "../chunk-S4AIBE4O.mjs";
|
|
243
|
+
import "../chunk-LOGWIK2T.mjs";
|
|
244
|
+
import "../chunk-OJYZLNSD.mjs";
|
|
245
|
+
import "../chunk-Z7C7KX3U.mjs";
|
|
246
|
+
import "../chunk-QRMV5CAE.mjs";
|
|
247
|
+
import "../chunk-6SYECCCG.mjs";
|
|
248
|
+
import "../chunk-HJK5A3DD.mjs";
|
|
249
|
+
import "../chunk-6ZWKLMY3.mjs";
|
|
250
|
+
import "../chunk-KHQZ35IL.mjs";
|
|
251
|
+
import "../chunk-QOKQVPZ6.mjs";
|
|
252
|
+
import "../chunk-HQLCDNMN.mjs";
|
|
253
|
+
import "../chunk-6XBAYBWZ.mjs";
|
|
254
|
+
import "../chunk-LREFRIQQ.mjs";
|
|
255
|
+
import "../chunk-I3T745ZX.mjs";
|
|
256
|
+
import "../chunk-KDZWHGGN.mjs";
|
|
257
|
+
import "../chunk-Q7YUHFMS.mjs";
|
|
258
|
+
import "../chunk-2B6C5VWQ.mjs";
|
|
258
259
|
import "../chunk-JYDRRVX4.mjs";
|
|
259
260
|
import "../chunk-YT3WVUYZ.mjs";
|
|
260
261
|
import "../chunk-DT4YTQQN.mjs";
|
|
@@ -3,17 +3,17 @@ import {
|
|
|
3
3
|
handleDevSignedInstall,
|
|
4
4
|
handlePurchaseDone,
|
|
5
5
|
tryHandleAgentShopRoute
|
|
6
|
-
} from "../../chunk-
|
|
6
|
+
} from "../../chunk-QCSNRVL2.mjs";
|
|
7
|
+
import "../../chunk-67YS7CQL.mjs";
|
|
7
8
|
import "../../chunk-TQGB7JQ4.mjs";
|
|
8
9
|
import "../../chunk-OIM3Z5NC.mjs";
|
|
10
|
+
import "../../chunk-HDCDFMIL.mjs";
|
|
9
11
|
import "../../chunk-XW47FVOP.mjs";
|
|
10
|
-
import "../../chunk-67YS7CQL.mjs";
|
|
11
12
|
import "../../chunk-EL2I7XXK.mjs";
|
|
12
13
|
import "../../chunk-M5NH4H7H.mjs";
|
|
13
14
|
import "../../chunk-BLJ2IDXT.mjs";
|
|
14
15
|
import "../../chunk-PUTO5VCN.mjs";
|
|
15
16
|
import "../../chunk-GDGWDSRV.mjs";
|
|
16
|
-
import "../../chunk-HDCDFMIL.mjs";
|
|
17
17
|
import "../../chunk-5PLZMLLY.mjs";
|
|
18
18
|
import "../../chunk-3WT4B3JZ.mjs";
|
|
19
19
|
import "../../chunk-AFD4DOFH.mjs";
|
|
@@ -630,6 +630,25 @@ var minimaxOpenAiCompletionsAdapter = {
|
|
|
630
630
|
id: "minimax"
|
|
631
631
|
};
|
|
632
632
|
|
|
633
|
+
// src/mobile/native-request-diagnostics.ts
|
|
634
|
+
var RETRYABLE_NATIVE_FETCH_RE = new RegExp(
|
|
635
|
+
[
|
|
636
|
+
"fetch failed",
|
|
637
|
+
"UND_ERR_CONNECT_TIMEOUT",
|
|
638
|
+
"UND_ERR_HEADERS_TIMEOUT",
|
|
639
|
+
"UND_ERR_SOCKET",
|
|
640
|
+
"ECONNRESET",
|
|
641
|
+
"ETIMEDOUT",
|
|
642
|
+
"ECONNREFUSED",
|
|
643
|
+
"ENOTFOUND",
|
|
644
|
+
"EAI_AGAIN",
|
|
645
|
+
"socket hang up",
|
|
646
|
+
"network connection lost",
|
|
647
|
+
"network request failed"
|
|
648
|
+
].join("|"),
|
|
649
|
+
"i"
|
|
650
|
+
);
|
|
651
|
+
|
|
633
652
|
// src/mobile/native-openai-text-stream.ts
|
|
634
653
|
function mergeOpenAiCompatibleStreamChunk(fullSoFar, incoming) {
|
|
635
654
|
if (incoming.length === 0) {
|
|
@@ -2,8 +2,9 @@ import {
|
|
|
2
2
|
AnthropicIncrementalDeliverer,
|
|
3
3
|
NATIVE_ANTHROPIC_STREAM_BLOCK_MIN_CHARS,
|
|
4
4
|
shouldEmitAnthropicIncrementalBlock
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-3TTLV2GM.mjs";
|
|
6
|
+
import "../chunk-BHT6B2TV.mjs";
|
|
7
|
+
import "../chunk-E5LABIPO.mjs";
|
|
7
8
|
import "../chunk-C36JYBG7.mjs";
|
|
8
9
|
import "../chunk-PJDUIH5J.mjs";
|
|
9
10
|
import "../chunk-NEDXMES6.mjs";
|
|
@@ -17665,6 +17665,199 @@ var minimaxOpenAiCompletionsAdapter = {
|
|
|
17665
17665
|
id: "minimax"
|
|
17666
17666
|
};
|
|
17667
17667
|
|
|
17668
|
+
// src/mobile/native-request-diagnostics.ts
|
|
17669
|
+
function compactLogValue(value, maxLen = 180) {
|
|
17670
|
+
const text = String(value ?? "").replace(/\s+/g, " ").trim();
|
|
17671
|
+
if (!text) {
|
|
17672
|
+
return "";
|
|
17673
|
+
}
|
|
17674
|
+
return text.length > maxLen ? `${text.slice(0, maxLen)}...` : text;
|
|
17675
|
+
}
|
|
17676
|
+
function readErrorProp(value, key) {
|
|
17677
|
+
return value && typeof value === "object" ? value[key] : void 0;
|
|
17678
|
+
}
|
|
17679
|
+
function positiveInteger(value) {
|
|
17680
|
+
if (typeof value !== "number" || !Number.isFinite(value) || value <= 0) {
|
|
17681
|
+
return void 0;
|
|
17682
|
+
}
|
|
17683
|
+
return Math.trunc(value);
|
|
17684
|
+
}
|
|
17685
|
+
function formatNativeFetchErrorForLog(error) {
|
|
17686
|
+
const parts = [];
|
|
17687
|
+
let current = error;
|
|
17688
|
+
for (let depth = 0; depth < 4 && current !== null && current !== void 0; depth += 1) {
|
|
17689
|
+
const prefix = depth === 0 ? "error" : `cause${depth}`;
|
|
17690
|
+
const name = compactLogValue(readErrorProp(current, "name"));
|
|
17691
|
+
const message = current instanceof Error ? compactLogValue(current.message) : compactLogValue(readErrorProp(current, "message") ?? current);
|
|
17692
|
+
const code = compactLogValue(readErrorProp(current, "code"));
|
|
17693
|
+
const errno = compactLogValue(readErrorProp(current, "errno"));
|
|
17694
|
+
if (name) parts.push(`${prefix}Name=${name}`);
|
|
17695
|
+
if (message) parts.push(`${prefix}Message=${message}`);
|
|
17696
|
+
if (code) parts.push(`${prefix}Code=${code}`);
|
|
17697
|
+
if (errno) parts.push(`${prefix}Errno=${errno}`);
|
|
17698
|
+
current = readErrorProp(current, "cause");
|
|
17699
|
+
}
|
|
17700
|
+
return parts.join(" ") || "error=unknown";
|
|
17701
|
+
}
|
|
17702
|
+
function applyConfiguredMaxTokens(requestBody, maxTokens) {
|
|
17703
|
+
const configured = positiveInteger(maxTokens);
|
|
17704
|
+
if (configured === void 0) {
|
|
17705
|
+
return;
|
|
17706
|
+
}
|
|
17707
|
+
const existing = positiveInteger(requestBody.max_tokens);
|
|
17708
|
+
requestBody.max_tokens = existing === void 0 ? configured : Math.min(existing, configured);
|
|
17709
|
+
}
|
|
17710
|
+
function stringifyJsonRequestBody(requestBody) {
|
|
17711
|
+
const bodyText = JSON.stringify(requestBody);
|
|
17712
|
+
return {
|
|
17713
|
+
bodyText,
|
|
17714
|
+
bodyBytes: Buffer.byteLength(bodyText, "utf8")
|
|
17715
|
+
};
|
|
17716
|
+
}
|
|
17717
|
+
function formatRequestShape(input) {
|
|
17718
|
+
const messageCount = Array.isArray(input.messages) ? input.messages.length : 0;
|
|
17719
|
+
const toolCount = Array.isArray(input.tools) ? input.tools.length : 0;
|
|
17720
|
+
const maxTokens = positiveInteger(input.maxTokens);
|
|
17721
|
+
return `bodyBytes=${input.bodyBytes} messages=${messageCount} tools=${toolCount} max_tokens=${maxTokens ?? "n/a"}`;
|
|
17722
|
+
}
|
|
17723
|
+
var DEFAULT_PROVIDER_FETCH_MAX_ATTEMPTS = 2;
|
|
17724
|
+
var HARD_PROVIDER_FETCH_MAX_ATTEMPTS = 4;
|
|
17725
|
+
var DEFAULT_PROVIDER_FETCH_RETRY_BASE_MS = 350;
|
|
17726
|
+
var HARD_PROVIDER_FETCH_RETRY_BASE_MS = 5e3;
|
|
17727
|
+
var RETRYABLE_NATIVE_FETCH_RE = new RegExp(
|
|
17728
|
+
[
|
|
17729
|
+
"fetch failed",
|
|
17730
|
+
"UND_ERR_CONNECT_TIMEOUT",
|
|
17731
|
+
"UND_ERR_HEADERS_TIMEOUT",
|
|
17732
|
+
"UND_ERR_SOCKET",
|
|
17733
|
+
"ECONNRESET",
|
|
17734
|
+
"ETIMEDOUT",
|
|
17735
|
+
"ECONNREFUSED",
|
|
17736
|
+
"ENOTFOUND",
|
|
17737
|
+
"EAI_AGAIN",
|
|
17738
|
+
"socket hang up",
|
|
17739
|
+
"network connection lost",
|
|
17740
|
+
"network request failed"
|
|
17741
|
+
].join("|"),
|
|
17742
|
+
"i"
|
|
17743
|
+
);
|
|
17744
|
+
function readClampedPositiveEnvInt(env, key, fallback, max) {
|
|
17745
|
+
const raw = (env[key] ?? "").trim();
|
|
17746
|
+
const n = Number.parseInt(raw, 10);
|
|
17747
|
+
if (!Number.isFinite(n) || n <= 0) {
|
|
17748
|
+
return fallback;
|
|
17749
|
+
}
|
|
17750
|
+
return Math.min(Math.trunc(n), max);
|
|
17751
|
+
}
|
|
17752
|
+
function readClampedNonNegativeEnvInt(env, key, fallback, max) {
|
|
17753
|
+
const raw = (env[key] ?? "").trim();
|
|
17754
|
+
const n = Number.parseInt(raw, 10);
|
|
17755
|
+
if (!Number.isFinite(n) || n < 0) {
|
|
17756
|
+
return fallback;
|
|
17757
|
+
}
|
|
17758
|
+
return Math.min(Math.trunc(n), max);
|
|
17759
|
+
}
|
|
17760
|
+
function readProviderFetchMaxAttempts(env) {
|
|
17761
|
+
return readClampedPositiveEnvInt(
|
|
17762
|
+
env,
|
|
17763
|
+
"XKZOOM_NATIVE_PROVIDER_FETCH_MAX_ATTEMPTS",
|
|
17764
|
+
DEFAULT_PROVIDER_FETCH_MAX_ATTEMPTS,
|
|
17765
|
+
HARD_PROVIDER_FETCH_MAX_ATTEMPTS
|
|
17766
|
+
);
|
|
17767
|
+
}
|
|
17768
|
+
function readProviderFetchRetryBaseMs(env) {
|
|
17769
|
+
return readClampedNonNegativeEnvInt(
|
|
17770
|
+
env,
|
|
17771
|
+
"XKZOOM_NATIVE_PROVIDER_FETCH_RETRY_BASE_MS",
|
|
17772
|
+
DEFAULT_PROVIDER_FETCH_RETRY_BASE_MS,
|
|
17773
|
+
HARD_PROVIDER_FETCH_RETRY_BASE_MS
|
|
17774
|
+
);
|
|
17775
|
+
}
|
|
17776
|
+
function isAbortLikeFetchError(error) {
|
|
17777
|
+
const name = compactLogValue(readErrorProp(error, "name"));
|
|
17778
|
+
return name === "AbortError";
|
|
17779
|
+
}
|
|
17780
|
+
function collectFetchErrorText(error) {
|
|
17781
|
+
const parts = [];
|
|
17782
|
+
let current = error;
|
|
17783
|
+
for (let depth = 0; depth < 4 && current !== null && current !== void 0; depth += 1) {
|
|
17784
|
+
parts.push(
|
|
17785
|
+
compactLogValue(readErrorProp(current, "name")),
|
|
17786
|
+
current instanceof Error ? compactLogValue(current.message) : compactLogValue(readErrorProp(current, "message") ?? current),
|
|
17787
|
+
compactLogValue(readErrorProp(current, "code")),
|
|
17788
|
+
compactLogValue(readErrorProp(current, "errno"))
|
|
17789
|
+
);
|
|
17790
|
+
current = readErrorProp(current, "cause");
|
|
17791
|
+
}
|
|
17792
|
+
return parts.filter(Boolean).join(" ");
|
|
17793
|
+
}
|
|
17794
|
+
function isRetryableNativeProviderFetchError(error) {
|
|
17795
|
+
return !isAbortLikeFetchError(error) && RETRYABLE_NATIVE_FETCH_RE.test(collectFetchErrorText(error));
|
|
17796
|
+
}
|
|
17797
|
+
function formatProviderRetryContext(context) {
|
|
17798
|
+
const parts = [
|
|
17799
|
+
`provider=${context.providerId}`,
|
|
17800
|
+
`model=${context.model}`,
|
|
17801
|
+
context.adapter ? `adapter=${context.adapter}` : "",
|
|
17802
|
+
typeof context.iteration === "number" ? `iteration=${context.iteration}` : ""
|
|
17803
|
+
];
|
|
17804
|
+
return parts.filter(Boolean).join(" ");
|
|
17805
|
+
}
|
|
17806
|
+
function asAbortSignal(signal) {
|
|
17807
|
+
if (signal && typeof signal === "object" && "aborted" in signal) {
|
|
17808
|
+
return signal;
|
|
17809
|
+
}
|
|
17810
|
+
return void 0;
|
|
17811
|
+
}
|
|
17812
|
+
async function waitForProviderFetchRetryDelay(delayMs, signal) {
|
|
17813
|
+
if (delayMs <= 0) {
|
|
17814
|
+
return;
|
|
17815
|
+
}
|
|
17816
|
+
if (signal?.aborted) {
|
|
17817
|
+
throw new DOMException("Aborted", "AbortError");
|
|
17818
|
+
}
|
|
17819
|
+
await new Promise((resolve9, reject) => {
|
|
17820
|
+
const timer = setTimeout(() => {
|
|
17821
|
+
signal?.removeEventListener("abort", onAbort);
|
|
17822
|
+
resolve9();
|
|
17823
|
+
}, delayMs);
|
|
17824
|
+
const onAbort = () => {
|
|
17825
|
+
clearTimeout(timer);
|
|
17826
|
+
reject(new DOMException("Aborted", "AbortError"));
|
|
17827
|
+
};
|
|
17828
|
+
signal?.addEventListener("abort", onAbort, { once: true });
|
|
17829
|
+
});
|
|
17830
|
+
}
|
|
17831
|
+
async function fetchNativeProviderWithRetry(url, init, context, env = process.env) {
|
|
17832
|
+
const maxAttempts = readProviderFetchMaxAttempts(env);
|
|
17833
|
+
const retryBaseMs = readProviderFetchRetryBaseMs(env);
|
|
17834
|
+
const signal = asAbortSignal(init.signal);
|
|
17835
|
+
for (let attempt = 1; attempt <= maxAttempts; attempt += 1) {
|
|
17836
|
+
try {
|
|
17837
|
+
return await fetch(url, init);
|
|
17838
|
+
} catch (error) {
|
|
17839
|
+
const retry = attempt < maxAttempts && !signal?.aborted && isRetryableNativeProviderFetchError(error);
|
|
17840
|
+
context.log(
|
|
17841
|
+
`[XKZOOM][native-reply][${context.label}] fetch_failed ${url} ${formatProviderRetryContext(context)} attempt=${attempt}/${maxAttempts} retry=${retry ? 1 : 0} ${formatRequestShape({
|
|
17842
|
+
bodyBytes: context.bodyBytes,
|
|
17843
|
+
messages: context.messages,
|
|
17844
|
+
tools: context.tools,
|
|
17845
|
+
maxTokens: context.maxTokens
|
|
17846
|
+
})} ${formatNativeFetchErrorForLog(error)}`
|
|
17847
|
+
);
|
|
17848
|
+
if (!retry) {
|
|
17849
|
+
throw error;
|
|
17850
|
+
}
|
|
17851
|
+
const delayMs = retryBaseMs * attempt;
|
|
17852
|
+
context.log(
|
|
17853
|
+
`[XKZOOM][native-reply][${context.label}] fetch_retry ${url} ${formatProviderRetryContext(context)} nextAttempt=${attempt + 1}/${maxAttempts} delayMs=${delayMs}`
|
|
17854
|
+
);
|
|
17855
|
+
await waitForProviderFetchRetryDelay(delayMs, signal);
|
|
17856
|
+
}
|
|
17857
|
+
}
|
|
17858
|
+
throw new Error(`native provider fetch retry exhausted: ${url}`);
|
|
17859
|
+
}
|
|
17860
|
+
|
|
17668
17861
|
// src/mobile/native-openai-text-stream.ts
|
|
17669
17862
|
var isRecord3 = isGatewayConfigRecord;
|
|
17670
17863
|
function resolveOpenAiCompletionsBodyExtras(provider, baseUrl) {
|
|
@@ -24975,7 +25168,8 @@ var IMAGE_BLOCK_BUDGET_BYTES = 8 * 1024;
|
|
|
24975
25168
|
|
|
24976
25169
|
// src/mobile/model-context-window-budget.ts
|
|
24977
25170
|
var MIN_TRANSCRIPT_BUDGET_BYTES = 64 * 1024;
|
|
24978
|
-
var
|
|
25171
|
+
var DEFAULT_MAX_NATIVE_TRANSCRIPT_BUDGET_BYTES = 128 * 1024;
|
|
25172
|
+
var HARD_MAX_TRANSCRIPT_BUDGET_BYTES = 4 * 1024 * 1024;
|
|
24979
25173
|
|
|
24980
25174
|
// src/mobile/context-compact/context-budget-gate.ts
|
|
24981
25175
|
function resolveContextBudgetSignalSource() {
|
|
@@ -39977,15 +40171,37 @@ function createFetchAnthropicTurnStreamFn(cfg, log, providerAccelerationPlan, pr
|
|
|
39977
40171
|
toolChoiceLog = `skipped(${policy.kind}:adapter-undefined)`;
|
|
39978
40172
|
}
|
|
39979
40173
|
}
|
|
40174
|
+
applyConfiguredMaxTokens(requestBody, cfg.maxTokens);
|
|
40175
|
+
const { bodyText, bodyBytes } = stringifyJsonRequestBody(requestBody);
|
|
39980
40176
|
log(
|
|
39981
|
-
`[XKZOOM][native-reply][anthropic-turn] POST ${url} adapter=${adapter.id} provider=${cfg.providerId} model=${cfg.model} iteration=${req.iteration} tools=${Array.isArray(req.tools) ? req.tools.length : 0} tool_choice=${toolChoiceLog}` + (requestBody.thinking !== void 0 && requestBody.thinking !== null ? ` thinking=${requestBody.thinking.type ?? "1"}` : " thinking=0")
|
|
40177
|
+
`[XKZOOM][native-reply][anthropic-turn] POST ${url} adapter=${adapter.id} provider=${cfg.providerId} model=${cfg.model} iteration=${req.iteration} tools=${Array.isArray(req.tools) ? req.tools.length : 0} tool_choice=${toolChoiceLog}` + (requestBody.thinking !== void 0 && requestBody.thinking !== null ? ` thinking=${requestBody.thinking.type ?? "1"}` : " thinking=0") + ` ${formatRequestShape({
|
|
40178
|
+
bodyBytes,
|
|
40179
|
+
messages: req.messages,
|
|
40180
|
+
tools: req.tools,
|
|
40181
|
+
maxTokens: requestBody.max_tokens
|
|
40182
|
+
})}`
|
|
40183
|
+
);
|
|
40184
|
+
const res = await fetchNativeProviderWithRetry(
|
|
40185
|
+
url,
|
|
40186
|
+
{
|
|
40187
|
+
method: "POST",
|
|
40188
|
+
headers,
|
|
40189
|
+
body: bodyText,
|
|
40190
|
+
signal
|
|
40191
|
+
},
|
|
40192
|
+
{
|
|
40193
|
+
label: "anthropic-turn",
|
|
40194
|
+
providerId: cfg.providerId,
|
|
40195
|
+
model: cfg.model,
|
|
40196
|
+
adapter: adapter.id,
|
|
40197
|
+
iteration: req.iteration,
|
|
40198
|
+
bodyBytes,
|
|
40199
|
+
messages: req.messages,
|
|
40200
|
+
tools: req.tools,
|
|
40201
|
+
maxTokens: requestBody.max_tokens,
|
|
40202
|
+
log
|
|
40203
|
+
}
|
|
39982
40204
|
);
|
|
39983
|
-
const res = await fetch(url, {
|
|
39984
|
-
method: "POST",
|
|
39985
|
-
headers,
|
|
39986
|
-
body: JSON.stringify(requestBody),
|
|
39987
|
-
signal
|
|
39988
|
-
});
|
|
39989
40205
|
if (!res.ok) {
|
|
39990
40206
|
const t = await res.text();
|
|
39991
40207
|
throw new Error(`native anthropic-turn HTTP ${res.status}: ${t.slice(0, 500)}`);
|