nolo-cli 0.33.0-alpha.9 → 0.34.0-alpha.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/{_executeModel-2WR4RTZZ.js → _executeModel-TMUXL7J5.js} +64 -65
- package/{action-OQWPNKAH.js → action-KMBZ3LCZ.js} +12 -12
- package/{addContentAction-YVINZQTF.js → addContentAction-KQ44UT2U.js} +10 -10
- package/{addDialogAgentAction-6IOCIEPI.js → addDialogAgentAction-ILSDCMYL.js} +9 -9
- package/{agentDeleteCommand-H22WRYC6.js → agentDeleteCommand-KA2IQAPG.js} +40 -39
- package/{agentEmailCommands-DGJVCMCG.js → agentEmailCommands-UIYBGCZW.js} +74 -75
- package/{agentListCommands-6NWMLIMQ.js → agentListCommands-L6JNUOLH.js} +47 -37
- package/{agentMachineCommands-5MUO6RDI.js → agentMachineCommands-5CQW5NZR.js} +37 -36
- package/agentProviderCommands-65ZC2WB4.js +122 -0
- package/{agentPullCommand-YH5GEBK4.js → agentPullCommand-TSWAJPS2.js} +1 -1
- package/agentRecordCommands-VUDJQIZH.js +112 -0
- package/agentRunCommand-EJWYF3BL.js +132 -0
- package/{agentRunControl-SCIVRZWX.js → agentRunControl-7MUPSYDQ.js} +7 -1
- package/{agentRuntimeLocal-PRAR3NCW.js → agentRuntimeLocal-XXBMDMBU.js} +33 -33
- package/{agentSlice-AMDSTXP5.js → agentSlice-HTIEYKIU.js} +12 -12
- package/agentSuperviseCommands-MKWW3ICX.js +640 -0
- package/{appDeleteCommands-L5PKC42V.js → appDeleteCommands-OUBL6VHB.js} +35 -34
- package/{appDeployCommands-3J7Z4XWV.js → appDeployCommands-BZSS2MX4.js} +35 -34
- package/{appDeployStatusCommands-YTRPXE72.js → appDeployStatusCommands-P2ZQOY5X.js} +35 -34
- package/{appGetCommands-JVXV5WXD.js → appGetCommands-WCFWQZZM.js} +35 -34
- package/{appListCommands-7KDEOJSO.js → appListCommands-FVJ3QNL7.js} +35 -34
- package/{authCommand-6Y5LTMZB.js → authCommand-B2XRHNJH.js} +19 -19
- package/{authCommands-EAPFGNHN.js → authCommands-GWABTFMR.js} +6 -6
- package/{chatQueueReduxAdapter-ZKSS6XRV.js → chatQueueReduxAdapter-ZP2ZS63U.js} +28 -28
- package/{chunk-UM4H3URE.js → chunk-23KKIMD5.js} +7 -7
- package/chunk-2BWU4ORW.js +2574 -0
- package/{chunk-2UECQ7RE.js → chunk-3AOLVADY.js} +1 -1
- package/{chunk-M2YMQOLC.js → chunk-4APLX2RT.js} +75 -10
- package/{chunk-ZHYK3N56.js → chunk-4AWH4LQA.js} +3 -1
- package/{chunk-3GZXL6FM.js → chunk-4DMPISV6.js} +7 -3
- package/{chunk-BQ3OHLR5.js → chunk-5GQ6XCJY.js} +1217 -691
- package/{chunk-GOIDVXK5.js → chunk-5LDKQUOT.js} +21 -8
- package/{chunk-OIQPORYI.js → chunk-64KIQZA2.js} +175 -2
- package/{chunk-6XIE5ZGI.js → chunk-6HIGYUBQ.js} +1 -1
- package/chunk-6XG52ZQ6.js +146 -0
- package/{chunk-FMEVI5TG.js → chunk-7CH6U3FL.js} +1 -1
- package/chunk-AA2YUJNV.js +54 -0
- package/{chunk-7INB7NXF.js → chunk-AE5GVFMG.js} +294 -54
- package/{chunk-UNOTBWZZ.js → chunk-B6H5XCT2.js} +8 -8
- package/{chunk-NNWHHCVP.js → chunk-BMB563Y6.js} +10 -4
- package/{chunk-DFUPZE6V.js → chunk-C6ELZQ7H.js} +249 -34
- package/{chunk-7KNERA53.js → chunk-E2OQ5N2F.js} +87 -13
- package/{chunk-6HYVJV7B.js → chunk-ESHYE7WU.js} +2 -1
- package/{chunk-KHCLMKZZ.js → chunk-EY7V7REW.js} +280 -6
- package/{chunk-JZPBVBIY.js → chunk-FD36SCCD.js} +19 -8
- package/{chunk-DKMOY3QI.js → chunk-FGLKRJDI.js} +54 -3
- package/{chunk-MQWVAOIU.js → chunk-FT4XBCK4.js} +33 -158
- package/{chunk-2QTEYCR7.js → chunk-FTM4KUOZ.js} +17 -17
- package/{chunk-U4TRT5V4.js → chunk-GEPHJJW4.js} +1 -1
- package/{chunk-7YYHKBJP.js → chunk-GKHV4UH5.js} +1 -1
- package/{chunk-2IVEXF7P.js → chunk-GUYMR3JL.js} +6 -33
- package/{chunk-YDTYDA5W.js → chunk-GZRMWK5R.js} +6 -4
- package/{chunk-X664KVEV.js → chunk-HHBXCRJS.js} +204 -123
- package/{chunk-AN7DGYMW.js → chunk-I7VDDN45.js} +4579 -3131
- package/{chunk-DSBGWT2C.js → chunk-IEEEWIVO.js} +10 -10
- package/{chunk-75U775RZ.js → chunk-IFS5CUEH.js} +1 -1
- package/{chunk-WLH5BAKX.js → chunk-IIOHYLIG.js} +9 -4
- package/{chunk-UEAUAXYS.js → chunk-ILZY5B4U.js} +2063 -214
- package/chunk-IMHO5LC6.js +370 -0
- package/{chunk-ADLYMQB6.js → chunk-IZCHPD7T.js} +52 -3
- package/{chunk-ITIA6OAQ.js → chunk-IZNJDUJ4.js} +5 -5
- package/{chunk-X2DAEZ3X.js → chunk-J5NMOM35.js} +1 -1
- package/{chunk-RPRRIFXV.js → chunk-JI2TIPLP.js} +1 -1
- package/{chunk-EGRJC4ZN.js → chunk-JIADXJYU.js} +1 -1
- package/{chunk-IHEC7VBF.js → chunk-K4KIFRIN.js} +1 -1
- package/{chunk-WJSW43QZ.js → chunk-L3JWI7WX.js} +0 -1
- package/{chunk-3RUW3ONU.js → chunk-LD6Y6RJY.js} +4 -4
- package/chunk-M3JQWYBC.js +387 -0
- package/{chunk-GM6PU7B6.js → chunk-MEYIRKDN.js} +0 -1
- package/{chunk-6YXDOOSH.js → chunk-MGIHZ5CJ.js} +4 -4
- package/{chunk-4F5M2MW5.js → chunk-MJWX4JQO.js} +2 -2
- package/{chunk-Q5ITEGIN.js → chunk-N4XRDM26.js} +1 -1
- package/{chunk-5CS33IBL.js → chunk-NQ4N4IGO.js} +11 -12
- package/{chunk-ZZ2MH7LE.js → chunk-O6OSWFZQ.js} +0 -1
- package/{chunk-RJKIB55Y.js → chunk-OSCSEJJR.js} +15 -8
- package/{chunk-HUCT7HID.js → chunk-P2I7ELDC.js} +3 -3
- package/{chunk-BXPBZVRE.js → chunk-PILJX4DH.js} +285 -251
- package/{chunk-SCUETSRP.js → chunk-PV734VZX.js} +1 -1
- package/{chunk-XLLTJXAD.js → chunk-QI3CHZUT.js} +39 -2672
- package/{chunk-WNHST4IE.js → chunk-RKRXAL3V.js} +5451 -5013
- package/{chunk-7E72JMBB.js → chunk-SMPAUSX5.js} +46 -5
- package/{chunk-5X4GQ53C.js → chunk-TLBZMLLJ.js} +7 -7
- package/{chunk-ASDXPOJH.js → chunk-U6QQLXWI.js} +1 -1
- package/{chunk-NUO3QFWD.js → chunk-UNHKVD2N.js} +1 -1
- package/{chunk-GE6IWA5N.js → chunk-UNZDCI3O.js} +126 -1
- package/{chunk-CPYYM4RJ.js → chunk-V5GA74HI.js} +19 -5
- package/{chunk-FXFGNOT2.js → chunk-VFVCYIRQ.js} +1 -1
- package/{chunk-G7E4NWFE.js → chunk-W445DPVT.js} +1 -1
- package/{chunk-EMW55KKX.js → chunk-WBZE7C6S.js} +1 -1
- package/{chunk-3UG2IIZ3.js → chunk-WN5AJG5I.js} +1 -1
- package/{chunk-KSRFVP36.js → chunk-WRN7L5CS.js} +1 -1
- package/{chunk-GJXRIOLS.js → chunk-WRP5TTM6.js} +4 -84
- package/chunk-X2K2JSO4.js +163 -0
- package/{chunk-OR2HNLVO.js → chunk-X6EN3KJX.js} +279 -477
- package/{chunk-VWY2CZD2.js → chunk-XMFDQYWA.js} +3 -3
- package/{chunk-IKWTTKWG.js → chunk-XQES6LXQ.js} +2 -2
- package/{chunk-IR6W62Q6.js → chunk-XT73C4VH.js} +18 -21
- package/{chunk-7L5CQQIT.js → chunk-Y5W623XU.js} +15 -15
- package/{chunk-RY57GLGW.js → chunk-YPREESF4.js} +42 -5
- package/{chunk-BQXOGBFN.js → chunk-YZ2WE6CW.js} +2 -2
- package/{chunk-DNQK7M7K.js → chunk-Z7COG62J.js} +4 -4
- package/{chunk-3WXRAHCG.js → chunk-ZBB3MZR3.js} +3 -3
- package/{cliExecutor-DW3PHGEL.js → cliExecutor-BBUVQU4L.js} +2 -2
- package/{clipboardy-MMBYVRLF.js → clipboardy-PRUHGPGC.js} +4 -3
- package/{codingSkills-DY5MINPG.js → codingSkills-6F4EQFCM.js} +4 -5
- package/cooldownCommands-C2SZLEEO.js +90 -0
- package/{createAgentAutomationAction-GVSJL2CI.js → createAgentAutomationAction-TGUXUZCY.js} +28 -30
- package/createDialogAction-FD5AEOUF.js +58 -0
- package/{createPageAction-M2VDKBYS.js → createPageAction-NPC3LYNK.js} +31 -34
- package/{dbSlice-UI2VCBLG.js → dbSlice-PIQGICNM.js} +9 -9
- package/{deleteFile-XQXPBFFB.js → deleteFile-NPZ64DFN.js} +4 -4
- package/{dialogCommands-26DBYNBT.js → dialogCommands-ZF2RSNCG.js} +37 -36
- package/{dialogSlice-FFGLRCBL.js → dialogSlice-6BINHWQT.js} +27 -27
- package/dist-VODFSGNG.js +7442 -0
- package/{docCreateCommands-F2ASWG6B.js → docCreateCommands-4VQ5MOHP.js} +36 -36
- package/{docDeleteCommands-A4URDZPI.js → docDeleteCommands-M7WLNVPB.js} +37 -37
- package/{docReadCommands-DO6VHDZD.js → docReadCommands-6LU6P2WT.js} +36 -36
- package/{docStore-EDAE7RNT.js → docStore-SIUFLABN.js} +29 -31
- package/{docUpdateCommands-ZTXZ3RTP.js → docUpdateCommands-S2LX4ENL.js} +39 -39
- package/{fetchMessages-7QRCCRYK.js → fetchMessages-CUEFN4GQ.js} +4 -4
- package/{getPricing-L2ENXWHV.js → getPricing-P3E2WRIH.js} +5 -5
- package/{handleSendMessageAction-CIRLGHOC.js → handleSendMessageAction-QVG5YNZY.js} +29 -29
- package/index.js +92 -77
- package/{localDialogRead-SLMPV5SK.js → localDialogRead-P7CHFMIC.js} +1 -1
- package/{localRuntimeAuthority-E3R24J4T.js → localRuntimeAuthority-S77B5QVB.js} +6 -2
- package/{localRuntimeDb-DDZCJFQZ.js → localRuntimeDb-N3H3HQ7G.js} +1 -1
- package/{machineCommands-NIQNCYJV.js → machineCommands-OSEBN7BZ.js} +76 -77
- package/{machineInfo-M6KB6HZN.js → machineInfo-66ZFUMLE.js} +1 -1
- package/{machineWsRunDispatch-EMTSQGAR.js → machineWsRunDispatch-NTJQCIIF.js} +68 -69
- package/{models-OX2S5C6Q.js → models-L7S2EKPM.js} +2 -2
- package/package.json +1 -1
- package/{read-2VHEHCAN.js → read-6C2XD3YZ.js} +5 -5
- package/{readDocTool-CSWD6NPC.js → readDocTool-Y7AB365O.js} +1 -1
- package/{readlineWorkspace-A2JBJWLI.js → readlineWorkspace-JPME5S7A.js} +4860 -3476
- package/{removeDialogAgentAction-2T7BPM3T.js → removeDialogAgentAction-KG5WMJRZ.js} +13 -13
- package/{runAgentClientLoop-BV4736ED.js → runAgentClientLoop-SOKEXCUF.js} +61 -61
- package/{runtimeDoctorCommands-KIKM6BIO.js → runtimeDoctorCommands-HT4O2PXL.js} +6 -6
- package/{setDialogExtraReferencesAction-GPT37HTW.js → setDialogExtraReferencesAction-O2NLXMSM.js} +10 -10
- package/{setPrimaryDialogAgentAction-3746P7IW.js → setPrimaryDialogAgentAction-FYYUY7PB.js} +13 -13
- package/{settingSlice-FIFOQ6OR.js → settingSlice-GPLI6E3M.js} +11 -11
- package/{skillDiscovery-KLLKXPUO.js → skillDiscovery-GPUDHDTZ.js} +3 -4
- package/{slateUtils-VO2FU36K.js → slateUtils-RIZES3PV.js} +1 -1
- package/{spaceCommands-AYZQHDB3.js → spaceCommands-Z5JLMFFJ.js} +223 -37
- package/{spaceSlice-43BNF22B.js → spaceSlice-Z3BGCLGX.js} +28 -30
- package/{streamAgentChatTurn-OLLRSITV.js → streamAgentChatTurn-INF5RGK4.js} +115 -129
- package/{switchDialogAgentAction-MQTUTQHL.js → switchDialogAgentAction-GH5P6Q3Z.js} +9 -9
- package/{chunk-IDAU4UFS.js → syncMapping-N6RGXGBW.js} +11 -11
- package/{tableCommands-QE47K72R.js → tableCommands-PQUJ55AS.js} +3 -3
- package/{tools-2SI3FXLL.js → tools-ZELMSJZ3.js} +45 -47
- package/{tuiSummaryLlmCaller-EAWQ3IZX.js → tuiSummaryLlmCaller-LH7F2SP7.js} +18 -18
- package/{updateCommands-AK2RDOFR.js → updateCommands-MNDUIKN7.js} +2 -2
- package/{updateDialogTitleAction-YJEQFYOA.js → updateDialogTitleAction-EDUCIB7G.js} +31 -33
- package/agentRecordCommands-YMGKT2WF.js +0 -113
- package/agentRunCommand-LYEMVQJH.js +0 -131
- package/chunk-AETZ7AD6.js +0 -274
- package/chunk-D5JI6VDM.js +0 -1800
- package/chunk-M3JEW6N6.js +0 -193
- package/chunk-ZURFOV5J.js +0 -105
- package/chunk-ZWS6DUHX.js +0 -480
- package/createDialogAction-VVR46Q2A.js +0 -61
- package/syncMapping-RK2MANUX.js +0 -43
- package/{chunk-KMSZPTM6.js → chunk-2WKUUY2E.js} +3 -3
- package/{chunk-CWMSB67P.js → chunk-AGGIDPCZ.js} +0 -0
- package/{chunk-SAQQLJZ5.js → chunk-JDSUTNYY.js} +3 -3
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
ANTIGRAVITY_CLOUD_CODE_BASE_URL,
|
|
6
6
|
isAntigravityOAuthAgent
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-PV734VZX.js";
|
|
8
8
|
import {
|
|
9
9
|
clipMultilineText,
|
|
10
10
|
fetchAndSerializeTable,
|
|
11
11
|
resolveBuiltinSkillPage,
|
|
12
12
|
waitForAbortableDelay
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-5GQ6XCJY.js";
|
|
14
14
|
import {
|
|
15
15
|
createDrainExhaustedResponse,
|
|
16
16
|
isCoreDrainingBody,
|
|
@@ -20,19 +20,24 @@ import {
|
|
|
20
20
|
} from "./chunk-RQSOAMPJ.js";
|
|
21
21
|
import {
|
|
22
22
|
slateToSimplifiedMarkdown
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-IFS5CUEH.js";
|
|
24
24
|
import {
|
|
25
25
|
extractCategorizedMentions
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-MEYIRKDN.js";
|
|
27
27
|
import {
|
|
28
28
|
fetchAndCacheMessages
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-PILJX4DH.js";
|
|
30
30
|
import {
|
|
31
31
|
shouldUseServerProxy
|
|
32
32
|
} from "./chunk-YYLHWIW6.js";
|
|
33
33
|
import {
|
|
34
34
|
fetchServerSyncedCredential
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-TLBZMLLJ.js";
|
|
36
|
+
import {
|
|
37
|
+
buildSkillGuidancePromptBlock,
|
|
38
|
+
extractRuntimePageCapabilities,
|
|
39
|
+
resolveSkillGraphFromRoots
|
|
40
|
+
} from "./chunk-P2I7ELDC.js";
|
|
36
41
|
import {
|
|
37
42
|
buildCurrentTimeBlock,
|
|
38
43
|
buildIdentityBlock,
|
|
@@ -40,73 +45,71 @@ import {
|
|
|
40
45
|
requiresBareImageUrl,
|
|
41
46
|
resolveToolGuidedSections,
|
|
42
47
|
toBareImageUrlMessages
|
|
43
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-M3JQWYBC.js";
|
|
44
49
|
import {
|
|
45
50
|
convertMessagesToResponsesInput,
|
|
46
51
|
getUsageRequestOptions,
|
|
47
52
|
preserveAgentStateFields
|
|
48
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-BMB563Y6.js";
|
|
49
54
|
import {
|
|
50
55
|
buildProviderAuthHeaders
|
|
51
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-GKHV4UH5.js";
|
|
52
57
|
import {
|
|
53
58
|
estimateTokenCount
|
|
54
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-FGLKRJDI.js";
|
|
55
60
|
import {
|
|
56
61
|
isOpenAiResponsesModel,
|
|
57
62
|
resolvePlatformChatCompletionsEndpoint,
|
|
58
63
|
resolvePlatformResponsesEndpoint
|
|
59
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-V5GA74HI.js";
|
|
60
65
|
import {
|
|
61
66
|
clampReasoningEffort,
|
|
62
67
|
getModelConfig,
|
|
63
68
|
isModelSupportReasoningEffort
|
|
64
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-C6ELZQ7H.js";
|
|
65
70
|
import {
|
|
66
71
|
createFileCredentialBroker
|
|
67
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-NQ4N4IGO.js";
|
|
73
|
+
import {
|
|
74
|
+
toErrorMessage
|
|
75
|
+
} from "./chunk-HNMXYYJR.js";
|
|
68
76
|
import {
|
|
69
77
|
MEMORY_USE_GUIDANCE,
|
|
70
78
|
buildUserResponseLanguageContext,
|
|
71
79
|
wrapHistoricalSummaryWithReplayGuard
|
|
72
|
-
} from "./chunk-
|
|
73
|
-
import {
|
|
74
|
-
buildSkillGuidancePromptBlock,
|
|
75
|
-
extractRuntimePageCapabilities,
|
|
76
|
-
resolveSkillGraphFromRoots
|
|
77
|
-
} from "./chunk-HUCT7HID.js";
|
|
80
|
+
} from "./chunk-7CH6U3FL.js";
|
|
78
81
|
import {
|
|
79
82
|
canonicalizeToolNames
|
|
80
|
-
} from "./chunk-
|
|
81
|
-
import {
|
|
82
|
-
toErrorMessage
|
|
83
|
-
} from "./chunk-HNMXYYJR.js";
|
|
83
|
+
} from "./chunk-O6OSWFZQ.js";
|
|
84
84
|
import {
|
|
85
85
|
isDeepInfraKimiModel,
|
|
86
86
|
isFireworksKimiModel,
|
|
87
87
|
resolveFireworksKimiModel
|
|
88
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-X6EN3KJX.js";
|
|
89
89
|
import {
|
|
90
90
|
createSpaceKey
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-MJWX4JQO.js";
|
|
92
92
|
import {
|
|
93
93
|
read
|
|
94
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-23KKIMD5.js";
|
|
95
95
|
import {
|
|
96
96
|
asTrimmedLowercaseString
|
|
97
97
|
} from "./chunk-QSJ3HFEF.js";
|
|
98
|
+
import {
|
|
99
|
+
extractCustomId
|
|
100
|
+
} from "./chunk-BJIRLHJR.js";
|
|
98
101
|
import {
|
|
99
102
|
getRuntimeServerContext
|
|
100
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-HHBXCRJS.js";
|
|
101
104
|
import {
|
|
102
105
|
isAbortError
|
|
103
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-L3JWI7WX.js";
|
|
107
|
+
import {
|
|
108
|
+
isRecord
|
|
109
|
+
} from "./chunk-KUG52IAP.js";
|
|
104
110
|
import {
|
|
105
111
|
asTrimmedString
|
|
106
112
|
} from "./chunk-3EUW3WEO.js";
|
|
107
|
-
import {
|
|
108
|
-
extractCustomId
|
|
109
|
-
} from "./chunk-BJIRLHJR.js";
|
|
110
113
|
import {
|
|
111
114
|
API_ENDPOINTS
|
|
112
115
|
} from "./chunk-LCBAMY2M.js";
|
|
@@ -557,16 +560,19 @@ ${description}
|
|
|
557
560
|
${content} ` : "";
|
|
558
561
|
var buildResponseGuidelines = (isMobile) => {
|
|
559
562
|
if (isMobile) {
|
|
560
|
-
return
|
|
561
|
-
\
|
|
562
|
-
- \
|
|
563
|
-
- \
|
|
564
|
-
- \
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
\
|
|
568
|
-
|
|
569
|
-
- \
|
|
563
|
+
return `--- \u54CD\u5E94\u5C55\u793A\u6307\u5357\uFF08\u7A84\u5C4F / TUI / \u79FB\u52A8\u7AEF\uFF09 ---
|
|
564
|
+
\u5F53\u524D\u5904\u4E8E\u7A84\u5C4F\u6216\u7EC8\u7AEF\u89C6\u56FE\uFF0C\u8BF7\u91C7\u7528\u7D27\u51D1\u3001\u9AD8\u626B\u63CF\u7387\u7684\u6392\u7248\uFF1A
|
|
565
|
+
- **\u7ED3\u6784\u4E0E\u7559\u767D**\uFF1A\u7ED3\u8BBA\u6216\u5173\u952E\u72B6\u6001\u7F6E\u9876\uFF0C\u76F4\u5954\u4E3B\u9898\uFF1B\u77ED\u6BB5\u843D\uFF082-4 \u53E5\uFF09\u5E76\u4FDD\u6301\u7A7A\u884C\u547C\u5438\uFF0C\u62D2\u7EDD\u957F\u6BB5\u6587\u5B57\u5899\u3002
|
|
566
|
+
- **\u5217\u8868\u4E0E\u7F29\u8FDB**\uFF1A\u5217\u8868\u9879\u7528\u300C- **\u6838\u5FC3\u8BCD**\uFF1A\u8BF4\u660E\u300D\uFF1B\u5D4C\u5957\u6700\u591A 2 \u5C42\uFF0C\u5B50\u5217\u8868\u7F29\u8FDB 2 \u7A7A\u683C\uFF0C\u9632\u6B62\u7EC8\u7AEF\u4E0E\u79FB\u52A8\u7AEF\u6298\u884C\u9519\u4F4D\uFF1B\u5E76\u5217\u7528\u65E0\u5E8F\u5217\u8868\uFF0C\u6B65\u9AA4\u7528\u6709\u5E8F\u5217\u8868\u3002
|
|
567
|
+
- **\u8868\u683C\u964D\u7EA7**\uFF1A\u4E25\u7981\u4F7F\u7528 \u22654 \u5217\u7684\u5927\u5BBD\u8868\uFF08\u7A84\u5C4F/\u7EC8\u7AEF\u4E0B\u6298\u884C\u4E25\u91CD\u9519\u4F4D\uFF09\uFF0C\u6539\u7528\u300C\u952E\u503C\u6E05\u5355\u300D\u6216\u7EB5\u5411\u5361\u7247\u3002
|
|
568
|
+
- **\u7B26\u53F7\u4E0E\u4EE3\u7801**\uFF1A\u514B\u5236\u4F7F\u7528\u300C---\u300D\u5206\u5272\u7EBF\uFF08\u4EC5\u5927\u4E3B\u9898\u5207\u6362\u6216\u7ED3\u8BBA\u524D\uFF0C\u524D\u540E\u7559\u7A7A\u884C\uFF09\uFF1B\u8DEF\u5F84\u3001\u547D\u4EE4\u4E0E\u53C2\u6570\u4E00\u5F8B\u7528\u53CD\u5F15\u53F7 \` \` \u5305\u88F9\uFF1B\u4EE3\u7801\u5757\u6807\u660E\u8BED\u8A00\u4E14\u907F\u514D\u6A2A\u5411\u8D85\u957F\u884C\uFF1B\u514B\u5236 Emoji\u3002`;
|
|
569
|
+
}
|
|
570
|
+
return `--- \u54CD\u5E94\u5C55\u793A\u6307\u5357\uFF08\u5BBD\u5C4F / \u684C\u9762\u7AEF\uFF09 ---
|
|
571
|
+
\u5F53\u524D\u5904\u4E8E\u5927\u5C4F\u89C6\u56FE\uFF0C\u53EF\u5145\u5206\u53D1\u6325\u7A7A\u95F4\u4F18\u52BF\uFF1A
|
|
572
|
+
- **\u7ED3\u6784\u4E0E\u7559\u767D**\uFF1A\u63D0\u4F9B\u5C42\u6B21\u6E05\u6670\u7684\u5168\u666F\u7ED3\u6784\uFF0C\u91CD\u8981\u6A21\u5757\u7528\u4E8C\u7EA7/\u4E09\u7EA7\u6807\u9898\u5212\u5206\uFF1B\u6BB5\u843D\u4FDD\u6301 2-4 \u53E5\u5E76\u7559\u7A7A\u884C\u547C\u5438\uFF0C\u76F4\u5954\u4E3B\u9898\u3002
|
|
573
|
+
- **\u5217\u8868\u4E0E\u7F29\u8FDB**\uFF1A\u5217\u8868\u9879\u7528\u300C- **\u6838\u5FC3\u8BCD**\uFF1A\u8BF4\u660E\u300D\uFF1B\u5D4C\u5957\u6700\u591A 2 \u5C42\uFF0C\u5B50\u5217\u8868\u7F29\u8FDB 2 \u7A7A\u683C\uFF1B\u5E76\u5217\u7528\u65E0\u5E8F\u5217\u8868\uFF0C\u6B65\u9AA4\u7528\u6709\u5E8F\u5217\u8868\u3002
|
|
574
|
+
- **\u8868\u683C\u4E0E\u5BF9\u6BD4**\uFF1A\u5BBD\u5C4F\u4E0B\u53EF\u9002\u5EA6\u4F7F\u7528 Markdown \u591A\u5217\u8868\u683C\u8FDB\u884C\u65B9\u6848\u6A2A\u5411\u5BF9\u6BD4\u3001\u53C2\u6570\u6C47\u603B\u6216\u77E9\u9635\u5206\u6790\u3002
|
|
575
|
+
- **\u7B26\u53F7\u4E0E\u4EE3\u7801**\uFF1A\u53EF\u5C55\u793A\u66F4\u5B8C\u6574\u7684\u4EE3\u7801\u4E0A\u4E0B\u6587\u4E0E\u591A\u6B65\u6267\u884C\u793A\u4F8B\uFF1B\u8DEF\u5F84\u3001\u547D\u4EE4\u4E0E\u53C2\u6570\u7528\u53CD\u5F15\u53F7 \` \` \u5305\u88F9\uFF0C\u4EE3\u7801\u5757\u6807\u660E\u8BED\u8A00\uFF1B\u514B\u5236\u4F7F\u7528\u5206\u5272\u7EBF\u4E0E Emoji\u3002`;
|
|
570
576
|
};
|
|
571
577
|
var buildReferenceMaterialsBlock = (contexts) => {
|
|
572
578
|
const sections = [
|
|
@@ -672,14 +678,13 @@ ${mainPrompt}` : "";
|
|
|
672
678
|
const {
|
|
673
679
|
startupProtocol,
|
|
674
680
|
contextLayerContract,
|
|
675
|
-
emailRegistrationWorkflow
|
|
676
|
-
webResearchToolPolicy
|
|
681
|
+
emailRegistrationWorkflow
|
|
677
682
|
} = buildRuntimeGuidanceBlocks(agentTools);
|
|
678
683
|
const clarifyingSection = !mainPrompt ? CLARIFICATION_MODE_INSTRUCTIONS : "";
|
|
679
684
|
const userGlobalPromptSection = contexts.userGlobalPrompt?.trim() ? `-- - \u7528\u6237\u5168\u5C40\u504F\u597D-- -
|
|
680
685
|
${contexts.userGlobalPrompt.trim()} ` : "";
|
|
681
|
-
const
|
|
682
|
-
const isMobile =
|
|
686
|
+
const effectiveViewport = viewport ?? contexts.viewport;
|
|
687
|
+
const isMobile = effectiveViewport !== void 0 ? effectiveViewport.width < mobileBreakpoint : typeof contexts.isMobile === "boolean" ? contexts.isMobile : isBrowser && typeof window !== "undefined" ? window.innerWidth < mobileBreakpoint : false;
|
|
683
688
|
const responseGuidelinesSection = buildResponseGuidelines(isMobile);
|
|
684
689
|
const editingContextSection = buildEditingContextBlock(contexts);
|
|
685
690
|
const appWorkingMemorySection = buildAppWorkingMemoryBlock(contexts);
|
|
@@ -715,12 +720,6 @@ ${wrapHistoricalSummaryWithReplayGuard(contexts.dialogSummary)}` : "";
|
|
|
715
720
|
cacheScope: "static",
|
|
716
721
|
content: emailRegistrationWorkflow
|
|
717
722
|
},
|
|
718
|
-
{
|
|
719
|
-
id: "web-research-tool-policy",
|
|
720
|
-
owner: "platform",
|
|
721
|
-
cacheScope: "static",
|
|
722
|
-
content: webResearchToolPolicy
|
|
723
|
-
},
|
|
724
723
|
{ id: "user-global-prompt", owner: "user", cacheScope: "session", content: userGlobalPromptSection },
|
|
725
724
|
{ id: "response-guidelines", owner: "platform", cacheScope: "session", content: responseGuidelinesSection },
|
|
726
725
|
{ id: "skill-guidance", owner: "runtime", cacheScope: "session", content: skillGuidanceSection },
|
|
@@ -1376,6 +1375,241 @@ var performFetchRequest = async (params) => {
|
|
|
1376
1375
|
}
|
|
1377
1376
|
};
|
|
1378
1377
|
|
|
1378
|
+
// packages/ai/chat/toolCallArgumentGuard.ts
|
|
1379
|
+
var INVALID_TOOL_ARGS_REPLACEMENT = '{"_invalid":true,"_reason":"arguments truncated or malformed"}';
|
|
1380
|
+
var INVALID_TOOL_ARGS_OUTBOUND_REPLACEMENT = '{"_invalid":true}';
|
|
1381
|
+
var INVALID_TOOL_RESULT_HINT = "\u5DE5\u5177\u53C2\u6570 JSON \u88AB\u622A\u65AD\uFF08\u5927\u6982\u7387\u8D85\u51FA\u8F93\u51FA\u957F\u5EA6\uFF09\u3002\u4E0D\u8981\u628A\u5B8C\u6574\u6E90\u7801\u585E\u8FDB\u4E00\u6B21\u5DE5\u5177\u8C03\u7528\uFF1A\u5148\u7528 appFileWrite \u5206\u6587\u4EF6\u591A\u6B21\u5199\u5165\uFF0C\u518D\u8C03\u7528\u4E0D\u5E26\u5185\u8054\u5927\u53C2\u6570\u7684 appPreflight/appDeploy\u3002";
|
|
1382
|
+
var ORPHAN_TOOL_RESULT_PLACEHOLDER = '{"error":"tool call was interrupted"}';
|
|
1383
|
+
function parseToolCallArguments(args) {
|
|
1384
|
+
if (isRecord(args)) {
|
|
1385
|
+
return { valid: true, parsed: args };
|
|
1386
|
+
}
|
|
1387
|
+
if (typeof args !== "string") return { valid: false };
|
|
1388
|
+
const trimmed = args.trim();
|
|
1389
|
+
if (!trimmed) return { valid: false };
|
|
1390
|
+
try {
|
|
1391
|
+
const parsed = JSON.parse(trimmed);
|
|
1392
|
+
if (!isRecord(parsed)) {
|
|
1393
|
+
return { valid: false };
|
|
1394
|
+
}
|
|
1395
|
+
return { valid: true, parsed };
|
|
1396
|
+
} catch {
|
|
1397
|
+
return { valid: false };
|
|
1398
|
+
}
|
|
1399
|
+
}
|
|
1400
|
+
function buildInvalidToolCallSelfHealResult(callId, toolName) {
|
|
1401
|
+
return JSON.stringify({
|
|
1402
|
+
error: true,
|
|
1403
|
+
toolCallId: callId,
|
|
1404
|
+
...toolName ? { toolName } : {},
|
|
1405
|
+
message: INVALID_TOOL_RESULT_HINT
|
|
1406
|
+
});
|
|
1407
|
+
}
|
|
1408
|
+
function isHexDigit(ch) {
|
|
1409
|
+
return ch >= "0" && ch <= "9" || ch >= "a" && ch <= "f" || ch >= "A" && ch <= "F";
|
|
1410
|
+
}
|
|
1411
|
+
function sanitizeTextContent(text) {
|
|
1412
|
+
if (typeof text !== "string") return text;
|
|
1413
|
+
let out = "";
|
|
1414
|
+
let i = 0;
|
|
1415
|
+
const n = text.length;
|
|
1416
|
+
while (i < n) {
|
|
1417
|
+
const code = text.charCodeAt(i);
|
|
1418
|
+
if (code >= 55296 && code <= 56319) {
|
|
1419
|
+
const next = i + 1 < n ? text.charCodeAt(i + 1) : -1;
|
|
1420
|
+
if (next >= 56320 && next <= 57343) {
|
|
1421
|
+
out += text[i] + text[i + 1];
|
|
1422
|
+
i += 2;
|
|
1423
|
+
continue;
|
|
1424
|
+
}
|
|
1425
|
+
out += "\uFFFD";
|
|
1426
|
+
i += 1;
|
|
1427
|
+
continue;
|
|
1428
|
+
}
|
|
1429
|
+
if (code >= 56320 && code <= 57343) {
|
|
1430
|
+
out += "\uFFFD";
|
|
1431
|
+
i += 1;
|
|
1432
|
+
continue;
|
|
1433
|
+
}
|
|
1434
|
+
if (code === 92) {
|
|
1435
|
+
let backslashRun = 0;
|
|
1436
|
+
let k = i;
|
|
1437
|
+
while (k >= 0 && text.charCodeAt(k) === 92) {
|
|
1438
|
+
backslashRun++;
|
|
1439
|
+
k--;
|
|
1440
|
+
}
|
|
1441
|
+
const alreadyEscaped = backslashRun % 2 === 0;
|
|
1442
|
+
const nextCh = i + 1 < n ? text[i + 1] : "";
|
|
1443
|
+
if (!alreadyEscaped && (nextCh === "x" || nextCh === "u")) {
|
|
1444
|
+
const hexLen = nextCh === "x" ? 2 : 4;
|
|
1445
|
+
let hexCount = 0;
|
|
1446
|
+
let j = i + 2;
|
|
1447
|
+
while (j < n && hexCount < hexLen && isHexDigit(text[j])) {
|
|
1448
|
+
hexCount++;
|
|
1449
|
+
j++;
|
|
1450
|
+
}
|
|
1451
|
+
if (hexCount < hexLen) {
|
|
1452
|
+
out += "\\\\";
|
|
1453
|
+
i += 1;
|
|
1454
|
+
continue;
|
|
1455
|
+
}
|
|
1456
|
+
out += text[i];
|
|
1457
|
+
i += 1;
|
|
1458
|
+
continue;
|
|
1459
|
+
}
|
|
1460
|
+
}
|
|
1461
|
+
out += text[i];
|
|
1462
|
+
i += 1;
|
|
1463
|
+
}
|
|
1464
|
+
return out;
|
|
1465
|
+
}
|
|
1466
|
+
function sanitizeContentText(content) {
|
|
1467
|
+
if (typeof content === "string") {
|
|
1468
|
+
return sanitizeTextContent(content);
|
|
1469
|
+
}
|
|
1470
|
+
if (Array.isArray(content)) {
|
|
1471
|
+
return content.map((part) => {
|
|
1472
|
+
if (part && typeof part === "object") {
|
|
1473
|
+
const p = part;
|
|
1474
|
+
if (typeof p.text === "string") {
|
|
1475
|
+
return { ...p, text: sanitizeTextContent(p.text) };
|
|
1476
|
+
}
|
|
1477
|
+
}
|
|
1478
|
+
return part;
|
|
1479
|
+
});
|
|
1480
|
+
}
|
|
1481
|
+
return content;
|
|
1482
|
+
}
|
|
1483
|
+
function sanitizeResponsesItemText(item) {
|
|
1484
|
+
if (!item || typeof item !== "object") return item;
|
|
1485
|
+
const type = item.type;
|
|
1486
|
+
if (type === "input_text" || type === "output_text") {
|
|
1487
|
+
if (typeof item.text === "string") {
|
|
1488
|
+
return { ...item, text: sanitizeTextContent(item.text) };
|
|
1489
|
+
}
|
|
1490
|
+
return item;
|
|
1491
|
+
}
|
|
1492
|
+
if (type === "function_call_output") {
|
|
1493
|
+
if (typeof item.output === "string") {
|
|
1494
|
+
return { ...item, output: sanitizeTextContent(item.output) };
|
|
1495
|
+
}
|
|
1496
|
+
if (Array.isArray(item.output)) {
|
|
1497
|
+
return { ...item, output: sanitizeContentText(item.output) };
|
|
1498
|
+
}
|
|
1499
|
+
return item;
|
|
1500
|
+
}
|
|
1501
|
+
if (type === "message" && "content" in item) {
|
|
1502
|
+
return { ...item, content: sanitizeContentText(item.content) };
|
|
1503
|
+
}
|
|
1504
|
+
return item;
|
|
1505
|
+
}
|
|
1506
|
+
function normalizeToolCallArgumentsInPlace(call, replacement) {
|
|
1507
|
+
if (!call || typeof call !== "object") return;
|
|
1508
|
+
const fn = call.function;
|
|
1509
|
+
if (!fn || typeof fn !== "object") return;
|
|
1510
|
+
const { valid } = parseToolCallArguments(fn.arguments);
|
|
1511
|
+
if (!valid) {
|
|
1512
|
+
fn.arguments = replacement;
|
|
1513
|
+
} else if (typeof fn.arguments !== "string") {
|
|
1514
|
+
try {
|
|
1515
|
+
fn.arguments = JSON.stringify(fn.arguments);
|
|
1516
|
+
} catch {
|
|
1517
|
+
fn.arguments = replacement;
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1520
|
+
}
|
|
1521
|
+
function sanitizeOutboundMessages(messages, opts = {}) {
|
|
1522
|
+
if (!Array.isArray(messages) || messages.length === 0) return messages ?? [];
|
|
1523
|
+
const argsReplacement = opts.argsReplacement ?? INVALID_TOOL_ARGS_OUTBOUND_REPLACEMENT;
|
|
1524
|
+
const orphanReplacement = opts.orphanReplacement ?? ORPHAN_TOOL_RESULT_PLACEHOLDER;
|
|
1525
|
+
const cloned = messages.map((msg) => ({ ...msg }));
|
|
1526
|
+
const answeredCallIds = /* @__PURE__ */ new Set();
|
|
1527
|
+
for (const msg of cloned) {
|
|
1528
|
+
if (msg?.role === "tool" && typeof msg.tool_call_id === "string") {
|
|
1529
|
+
answeredCallIds.add(msg.tool_call_id);
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1532
|
+
const result = [];
|
|
1533
|
+
for (const msg of cloned) {
|
|
1534
|
+
if (msg && typeof msg === "object" && "content" in msg) {
|
|
1535
|
+
msg.content = sanitizeContentText(msg.content);
|
|
1536
|
+
}
|
|
1537
|
+
if (msg?.role === "assistant" && Array.isArray(msg.tool_calls)) {
|
|
1538
|
+
msg.tool_calls = msg.tool_calls.map((call) => ({
|
|
1539
|
+
...call,
|
|
1540
|
+
function: { ...call?.function ?? {} }
|
|
1541
|
+
}));
|
|
1542
|
+
for (const call of msg.tool_calls) {
|
|
1543
|
+
normalizeToolCallArgumentsInPlace(call, argsReplacement);
|
|
1544
|
+
}
|
|
1545
|
+
result.push(msg);
|
|
1546
|
+
for (const call of msg.tool_calls) {
|
|
1547
|
+
const callId = typeof call?.id === "string" ? call.id : void 0;
|
|
1548
|
+
if (!callId) continue;
|
|
1549
|
+
if (answeredCallIds.has(callId)) continue;
|
|
1550
|
+
answeredCallIds.add(callId);
|
|
1551
|
+
result.push({
|
|
1552
|
+
role: "tool",
|
|
1553
|
+
tool_call_id: callId,
|
|
1554
|
+
content: orphanReplacement
|
|
1555
|
+
});
|
|
1556
|
+
}
|
|
1557
|
+
continue;
|
|
1558
|
+
}
|
|
1559
|
+
result.push(msg);
|
|
1560
|
+
}
|
|
1561
|
+
return result;
|
|
1562
|
+
}
|
|
1563
|
+
function sanitizeOutboundResponsesInput(input, opts = {}) {
|
|
1564
|
+
if (!Array.isArray(input) || input.length === 0) return input ?? [];
|
|
1565
|
+
const argsReplacement = opts.argsReplacement ?? INVALID_TOOL_ARGS_OUTBOUND_REPLACEMENT;
|
|
1566
|
+
const orphanReplacement = opts.orphanReplacement ?? ORPHAN_TOOL_RESULT_PLACEHOLDER;
|
|
1567
|
+
const answeredCallIds = /* @__PURE__ */ new Set();
|
|
1568
|
+
for (const item of input) {
|
|
1569
|
+
if (item?.type === "function_call_output" && typeof item.call_id === "string") {
|
|
1570
|
+
answeredCallIds.add(item.call_id);
|
|
1571
|
+
}
|
|
1572
|
+
}
|
|
1573
|
+
const result = [];
|
|
1574
|
+
for (const item of input) {
|
|
1575
|
+
if (item?.type === "function_call") {
|
|
1576
|
+
const cloned = { ...item };
|
|
1577
|
+
const { valid } = parseToolCallArguments(cloned.arguments);
|
|
1578
|
+
if (!valid) {
|
|
1579
|
+
cloned.arguments = argsReplacement;
|
|
1580
|
+
} else if (typeof cloned.arguments !== "string") {
|
|
1581
|
+
try {
|
|
1582
|
+
cloned.arguments = JSON.stringify(cloned.arguments);
|
|
1583
|
+
} catch {
|
|
1584
|
+
cloned.arguments = argsReplacement;
|
|
1585
|
+
}
|
|
1586
|
+
}
|
|
1587
|
+
result.push(cloned);
|
|
1588
|
+
const callId = typeof cloned.call_id === "string" ? cloned.call_id : void 0;
|
|
1589
|
+
if (callId && !answeredCallIds.has(callId)) {
|
|
1590
|
+
answeredCallIds.add(callId);
|
|
1591
|
+
result.push({
|
|
1592
|
+
type: "function_call_output",
|
|
1593
|
+
call_id: callId,
|
|
1594
|
+
output: orphanReplacement
|
|
1595
|
+
});
|
|
1596
|
+
}
|
|
1597
|
+
continue;
|
|
1598
|
+
}
|
|
1599
|
+
result.push(sanitizeResponsesItemText(item));
|
|
1600
|
+
}
|
|
1601
|
+
return result;
|
|
1602
|
+
}
|
|
1603
|
+
function sanitizeOutboundBody(body) {
|
|
1604
|
+
const next = { ...body };
|
|
1605
|
+
if (Array.isArray(body.messages)) {
|
|
1606
|
+
next.messages = sanitizeOutboundMessages(body.messages);
|
|
1607
|
+
} else if (Array.isArray(body.input)) {
|
|
1608
|
+
next.input = sanitizeOutboundResponsesInput(body.input);
|
|
1609
|
+
}
|
|
1610
|
+
return next;
|
|
1611
|
+
}
|
|
1612
|
+
|
|
1379
1613
|
// packages/create/editor/transforms/slateToText.ts
|
|
1380
1614
|
function getNodeText(node) {
|
|
1381
1615
|
if (node.text) {
|
|
@@ -1556,8 +1790,8 @@ var fetchDialogReference = async (dbKey, refContent, dispatch) => {
|
|
|
1556
1790
|
if (Array.isArray(checkpoint.lastToolNames) && checkpoint.lastToolNames.length) {
|
|
1557
1791
|
checkpointLines.push(`- lastToolNames: ${checkpoint.lastToolNames.join(", ")}`);
|
|
1558
1792
|
}
|
|
1559
|
-
if (Array.isArray(checkpoint.
|
|
1560
|
-
checkpointLines.push(`- availableToolNames: ${checkpoint.
|
|
1793
|
+
if (Array.isArray(checkpoint.toolSurface?.finalToolNames) && checkpoint.toolSurface.finalToolNames.length) {
|
|
1794
|
+
checkpointLines.push(`- availableToolNames: ${checkpoint.toolSurface.finalToolNames.join(", ")}`);
|
|
1561
1795
|
}
|
|
1562
1796
|
}
|
|
1563
1797
|
const recentToolEvidence = sortedMessages.filter((msg) => msg.role === "tool" || msg.toolName).slice(-3).map((msg) => {
|
|
@@ -1716,5 +1950,11 @@ export {
|
|
|
1716
1950
|
resolveAgentCallPlan,
|
|
1717
1951
|
generateRequestBody,
|
|
1718
1952
|
performServerProxyFetchWithRetry,
|
|
1719
|
-
performFetchRequest
|
|
1953
|
+
performFetchRequest,
|
|
1954
|
+
INVALID_TOOL_ARGS_REPLACEMENT,
|
|
1955
|
+
parseToolCallArguments,
|
|
1956
|
+
buildInvalidToolCallSelfHealResult,
|
|
1957
|
+
sanitizeOutboundMessages,
|
|
1958
|
+
sanitizeOutboundResponsesInput,
|
|
1959
|
+
sanitizeOutboundBody
|
|
1720
1960
|
};
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parsePositiveFiniteNumberOrFallback
|
|
3
3
|
} from "./chunk-Y5GCAMGP.js";
|
|
4
|
-
import {
|
|
5
|
-
asRecordOrEmpty
|
|
6
|
-
} from "./chunk-KX6YBIHG.js";
|
|
7
4
|
import {
|
|
8
5
|
DEFAULT_SYSTEM_AGENT_CAPABILITIES
|
|
9
6
|
} from "./chunk-UZ6XXCVR.js";
|
|
7
|
+
import {
|
|
8
|
+
asRecordOrEmpty
|
|
9
|
+
} from "./chunk-KX6YBIHG.js";
|
|
10
10
|
import {
|
|
11
11
|
patch,
|
|
12
12
|
readAndWait,
|
|
13
13
|
toTimestampMs,
|
|
14
14
|
upsert,
|
|
15
15
|
write
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-23KKIMD5.js";
|
|
17
17
|
import {
|
|
18
18
|
createUserKey,
|
|
19
19
|
createUserPreferenceKey,
|
|
20
20
|
ulid
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-2WKUUY2E.js";
|
|
22
22
|
import {
|
|
23
23
|
asTrimmedLowercaseString
|
|
24
24
|
} from "./chunk-QSJ3HFEF.js";
|
|
25
25
|
import {
|
|
26
26
|
BUILTIN_NOLO_AGENT_KEY
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-XT73C4VH.js";
|
|
28
28
|
import {
|
|
29
29
|
asyncThunkCreator,
|
|
30
30
|
buildCreateSlice,
|
|
@@ -32,12 +32,12 @@ import {
|
|
|
32
32
|
createAsyncThunk,
|
|
33
33
|
createSelector,
|
|
34
34
|
selectIdentityUserId
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-HHBXCRJS.js";
|
|
36
36
|
import {
|
|
37
37
|
getAllServers,
|
|
38
38
|
getIsDesktopApp,
|
|
39
39
|
isProduction
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-L3JWI7WX.js";
|
|
41
41
|
import {
|
|
42
42
|
SERVERS
|
|
43
43
|
} from "./chunk-LCBAMY2M.js";
|
|
@@ -27,14 +27,20 @@ var STREAM_USAGE_PROVIDERS = /* @__PURE__ */ new Set([
|
|
|
27
27
|
// DeepSeek official and Ollama honor stream_options.include_usage on their
|
|
28
28
|
// chat.completions endpoints. Without them, locally-configured agents lose
|
|
29
29
|
// token statistics / local billing (the whitelist replaced the previous
|
|
30
|
-
// always-on include_usage).
|
|
30
|
+
// always-on include_usage). ollama-cloud is the Ollama Cloud subscription
|
|
31
|
+
// endpoint (https://ollama.com/v1), an OpenAI-compatible API that likewise
|
|
32
|
+
// honors stream_options.include_usage.
|
|
31
33
|
"deepseek",
|
|
32
34
|
"ollama",
|
|
33
|
-
|
|
35
|
+
"ollama-cloud",
|
|
34
36
|
// OpenAI-compatible /v1/chat/completions endpoint; the hosted branch passes
|
|
35
|
-
// "
|
|
37
|
+
// "upstream-k3" as the usage provider so K3 streams request the terminal usage
|
|
36
38
|
// chunk (same capability decision as deepinfra/vultr).
|
|
37
|
-
"
|
|
39
|
+
"upstream-k3",
|
|
40
|
+
// RunInfra hosted fallback channel: OpenAI-compatible chat.completions
|
|
41
|
+
// endpoint, supports stream_options.include_usage (measured to return
|
|
42
|
+
// prompt_tokens_details.cached_tokens).
|
|
43
|
+
"runinfra"
|
|
38
44
|
]);
|
|
39
45
|
var EXTRA_USAGE_FIELD_PROVIDERS = /* @__PURE__ */ new Set(["openrouter"]);
|
|
40
46
|
var normalizeProviderName = (providerName) => asTrimmedLowercaseString(providerName);
|