nolo-cli 0.29.2 → 0.30.0-alpha.2
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-BFVTGZXE.js → _executeModel-VBHHG7LT.js} +62 -68
- package/{action-LG32A6DJ.js → action-FENWPT3C.js} +14 -15
- package/{addContentAction-MPGMBJTQ.js → addContentAction-Z5S5ZQ7I.js} +12 -12
- package/{addDialogAgentAction-ZH23WDID.js → addDialogAgentAction-VUNVD2XR.js} +11 -11
- package/{agentDeleteCommand-4S4STG42.js → agentDeleteCommand-LLGZXUYJ.js} +60 -39
- package/{agentEmailCommands-3F4IP4DI.js → agentEmailCommands-LC2FPN6G.js} +76 -81
- package/{agentGrantCommands-JNDE4RWR.js → agentGrantCommands-E7ZZFRHK.js} +2 -1
- package/{agentListCommands-JCRV2XF6.js → agentListCommands-A6OBQ3QX.js} +57 -40
- package/{agentMachineCommands-KYXPYSFP.js → agentMachineCommands-4O4Q5B5X.js} +53 -35
- package/{agentPullCommand-ZZGU5KOY.js → agentPullCommand-4V36XNGV.js} +4 -3
- package/{agentRecordCommands-UADUPIXO.js → agentRecordCommands-W22RIQRV.js} +73 -78
- package/{agentRunCommand-MJWSR53W.js → agentRunCommand-V4OBU4FB.js} +77 -82
- package/{agentRunControl-SNUKXN6J.js → agentRunControl-AKBN2366.js} +13 -1
- package/{agentRuntimeLocal-PC5RRRPT.js → agentRuntimeLocal-I57YSGH4.js} +48 -30
- package/{agentSlice-C5OYLNBT.js → agentSlice-3ZHY7RAO.js} +12 -13
- package/{appDeleteCommands-ZXODZ5AD.js → appDeleteCommands-DJJF466K.js} +53 -35
- package/{appDeployCommands-AWC6JPZH.js → appDeployCommands-WJZGIOEZ.js} +53 -35
- package/{appDeployStatusCommands-74NXMDAI.js → appDeployStatusCommands-ICYXUJNO.js} +53 -35
- package/{appGetCommands-6YGIAP5L.js → appGetCommands-UOCWYJPV.js} +53 -35
- package/{appListCommands-DZWBHMNK.js → appListCommands-EOKWTXPW.js} +53 -35
- package/{authCommand-XMQHBK5L.js → authCommand-H5KE7K7K.js} +16 -16
- package/{authCommands-JSOG2H4E.js → authCommands-CXJ6PI2O.js} +7 -7
- package/{chunk-OEWEE4VW.js → chunk-2XM5KUNE.js} +4 -2
- package/{chunk-7H3UTGPM.js → chunk-3AUWC6EM.js} +82 -3
- package/{chunk-HEXXIS77.js → chunk-3RIWR23B.js} +1 -1
- package/{chunk-R7LOFGRE.js → chunk-446VANPP.js} +18 -14
- package/{chunk-RZNYL4LW.js → chunk-4SAV7BD7.js} +65 -1
- package/{chunk-QC6ZWDSV.js → chunk-56IUA7RU.js} +3 -3
- package/{chunk-R3JSTDQO.js → chunk-66O5MZYH.js} +1 -1
- package/{chunk-PSK2RUHV.js → chunk-7CD24PU4.js} +360 -2
- package/{chunk-G2BZ43DV.js → chunk-A4JDTA5T.js} +13 -13
- package/{chunk-DZ3XJVET.js → chunk-AOS5IN2I.js} +1 -1
- package/{chunk-SKDNBYZK.js → chunk-BOL2D2JW.js} +1 -1
- package/{chunk-YTA2QOEE.js → chunk-CAENRKNJ.js} +15 -0
- package/{chunk-2TYLTEAH.js → chunk-CV6I4HBA.js} +1 -1
- package/chunk-DCDL3GC4.js +171 -0
- package/{chunk-FVOSIYXM.js → chunk-DCWBP2O7.js} +42 -393
- package/{chunk-OLWMGSW2.js → chunk-DI6MXJK5.js} +37 -37
- package/{chunk-HRPWRVBI.js → chunk-DKRT67FG.js} +11 -11
- package/{chunk-L6RBX4L4.js → chunk-DWQNDGO7.js} +20 -8
- package/{chunk-VKBTAQWT.js → chunk-FS5TTXPS.js} +6 -6
- package/chunk-G5JHHUAK.js +73 -0
- package/{chunk-TOGGHWHI.js → chunk-G6VITLCZ.js} +3 -3
- package/{chunk-RJBTU7AS.js → chunk-GAGUBI42.js} +302 -14
- package/{chunk-NXMJ55RU.js → chunk-GVKTKT3O.js} +3 -3
- package/{chunk-5ZXNLOAG.js → chunk-HI7QZNWX.js} +17 -10
- package/{chunk-DF7SMWEV.js → chunk-HLG6GAUD.js} +1 -1
- package/{chunk-MQRZ5QUH.js → chunk-IXZX5CJK.js} +1 -1
- package/{chunk-IC7W63RM.js → chunk-IZ3CBMD5.js} +3 -3
- package/{chunk-VHBWHNVT.js → chunk-K6QEHQZ3.js} +8 -4
- package/chunk-KW47OSRJ.js +3246 -0
- package/{chunk-Q5RXHXKU.js → chunk-KWKD3BCC.js} +189 -122
- package/{chunk-L65QKSVJ.js → chunk-L3GCUVOH.js} +1 -1
- package/{chunk-4BDPDTJU.js → chunk-L3VQOVKK.js} +8 -8
- package/{chunk-HALKDXKP.js → chunk-MEUZFIAJ.js} +8 -4
- package/{chunk-H5S4XUGI.js → chunk-MMCVBEAD.js} +174 -149
- package/{chunk-XOIF2TNF.js → chunk-OB6FBSH3.js} +13 -0
- package/chunk-OYK7PA5U.js +1707 -0
- package/{chunk-6HTWA77J.js → chunk-Q24P6TUS.js} +1 -1
- package/{chunk-GMJS5AYP.js → chunk-QLV2GKU5.js} +16 -178
- package/{chunk-WMB7GVPN.js → chunk-SWOTB2TX.js} +134 -1166
- package/{chunk-GC34RRTQ.js → chunk-SWYMCHM7.js} +1 -69
- package/{chunk-BBGRJB5E.js → chunk-SZ5CBYMZ.js} +4 -4
- package/chunk-T27IEBNQ.js +149 -0
- package/{chunk-WX3ZOSTL.js → chunk-T3Y5EMJS.js} +24 -26
- package/{chunk-UFL6WHHJ.js → chunk-THTAR67C.js} +1056 -137
- package/{chunk-2FX23RGA.js → chunk-TJYWZ3LO.js} +4 -4
- package/{chunk-KEF5OBOZ.js → chunk-UKC5HU2C.js} +33 -27
- package/{chunk-HRJEPMZY.js → chunk-UTQZ73QQ.js} +2 -2
- package/{chunk-GT3GG2H7.js → chunk-VSTUQGLT.js} +1 -1
- package/{chunk-32ZM6HVI.js → chunk-W2YKDXT7.js} +95 -95
- package/{chunk-L3QFIBZG.js → chunk-WTGCTVJG.js} +1 -1
- package/{chunk-XS7UPVR7.js → chunk-XD5NQEOH.js} +5 -5
- package/{chunk-WSQLK2KR.js → chunk-XFGM5PJP.js} +6 -6
- package/{chunk-JSB4N6NU.js → chunk-YLADSPDU.js} +3 -3
- package/{chunk-FRN5QOKN.js → chunk-YWGSCF37.js} +19 -4
- package/{codingSkills-EN6Z6G6U.js → codingSkills-V35TRR4Y.js} +1 -2
- package/{createAgentAutomationAction-BK4UZJKU.js → createAgentAutomationAction-3GMH6ORX.js} +30 -37
- package/{createDialogAction-MJJUI2MK.js → createDialogAction-R5MCL4RE.js} +32 -38
- package/{createPageAction-YMZ7K363.js → createPageAction-QYTG656R.js} +43 -50
- package/{dbSlice-6QJYQUBV.js → dbSlice-OBV7VFCF.js} +11 -11
- package/{deleteFile-WDZ3VM7B.js → deleteFile-AC45HYSM.js} +5 -5
- package/{dialogCommands-OKH45ASS.js → dialogCommands-NUQGIXVZ.js} +53 -37
- package/{dialogSlice-UDOKNDHB.js → dialogSlice-CFDECXEU.js} +27 -34
- package/{docCreateCommands-MCLMR4TE.js → docCreateCommands-UNFCXB5N.js} +52 -36
- package/{docDeleteCommands-ONDHI7JV.js → docDeleteCommands-NG5IVKE5.js} +54 -38
- package/{docReadCommands-FCXBMISW.js → docReadCommands-6J7MUUX6.js} +52 -36
- package/{docStore-N66O4CGH.js → docStore-MZZWJM4F.js} +28 -35
- package/{docUpdateCommands-T3XN6XOX.js → docUpdateCommands-6AW3VZOX.js} +55 -39
- package/{fetchMessages-W4IKHPCS.js → fetchMessages-VPPQDDZ4.js} +3 -3
- package/{getPricing-X6I23RN6.js → getPricing-XQYSSVV6.js} +6 -7
- package/{handleSendMessageAction-KC4AYUZP.js → handleSendMessageAction-IU2QNTLM.js} +30 -37
- package/index.js +72 -72
- package/{localDialogRead-UFLBS6OT.js → localDialogRead-P72W2U2R.js} +1 -1
- package/{machineCommands-DIMRFA3Y.js → machineCommands-Z2QEWTHZ.js} +76 -81
- package/{machineWsRunDispatch-2DYJZI6Z.js → machineWsRunDispatch-SJTYHZHN.js} +71 -76
- package/{models-YT32CTT5.js → models-WDUTTYFS.js} +2 -2
- package/{offlineMarxistsAgentCommand-5OOWZLJI.js → offlineMarxistsAgentCommand-E6LUG63A.js} +6 -2
- package/package.json +1 -1
- package/{read-C7Y6LSBM.js → read-QK7ZRX6G.js} +6 -6
- package/{readDocTool-TOHRYJHP.js → readDocTool-EYDMVRBL.js} +2 -1
- package/{readlineWorkspace-HUPHMLDG.js → readlineWorkspace-BGKPABK4.js} +208 -183
- package/{removeDialogAgentAction-WZXPOH5S.js → removeDialogAgentAction-TBW3UZJW.js} +15 -16
- package/{runAgentClientLoop-5TGSUKHV.js → runAgentClientLoop-N3YDLTMS.js} +61 -66
- package/{setDialogExtraReferencesAction-INZY2ENI.js → setDialogExtraReferencesAction-Q3ANF2NR.js} +12 -12
- package/{setPrimaryDialogAgentAction-WCVLPYCF.js → setPrimaryDialogAgentAction-FQ5R3EFJ.js} +15 -16
- package/{settingSlice-IDUM4LWU.js → settingSlice-JKKV2T7O.js} +13 -14
- package/{skillDiscovery-ITA7BI7A.js → skillDiscovery-I3QRA7NE.js} +2 -2
- package/{spaceCommands-XSSDB3YK.js → spaceCommands-R6AEQNLG.js} +57 -40
- package/{spaceSlice-BXDCO6PT.js → spaceSlice-MCH7RLLP.js} +27 -34
- package/{streamAgentChatTurn-HRFMVSVC.js → streamAgentChatTurn-Q4U2CVMI.js} +130 -1300
- package/{switchDialogAgentAction-YBFFCBOD.js → switchDialogAgentAction-QQGVE4SL.js} +11 -11
- package/{toolApiClient-WVTUYOFM.js → toolApiClient-ARGFDJAG.js} +2 -2
- package/{tools-5V6FHWQU.js → tools-Y3UBLLYW.js} +50 -56
- package/{tuiSummaryLlmCaller-GCUPULOV.js → tuiSummaryLlmCaller-4474IBTI.js} +12 -12
- package/{updateDialogTitleAction-W62C4W4K.js → updateDialogTitleAction-3J7GH67I.js} +35 -43
- package/chunk-5CS33IBL.js +0 -301
- package/chunk-5MMAK75Q.js +0 -15
- package/chunk-HYSJHRWD.js +0 -669
- package/chunk-MRC4Q34M.js +0 -188
- package/chunk-SIZQB7BD.js +0 -91
- package/chunk-UEOPA6MV.js +0 -641
- package/chunk-VIDPVFP3.js +0 -20
- package/chunk-W2LZV5GE.js +0 -231
- package/chunk-Y5GCAMGP.js +0 -9
- package/chunk-YYLHWIW6.js +0 -48
- package/chunk-Z54ZAZZC.js +0 -1791
- package/chunk-ZZ2MH7LE.js +0 -84
- package/{chunk-OMP5L5NF.js → chunk-44HACRCK.js} +3 -3
- package/{chunk-ZVZMT3EA.js → chunk-KWCLUYGQ.js} +3 -3
- package/{chunk-NRY4GCKJ.js → chunk-WHLVPK32.js} +3 -3
- package/{chunk-RQSOAMPJ.js → chunk-Z5MXSEOJ.js} +2 -2
- package/{chunk-XMLRJUU5.js → chunk-ZFTCLBEX.js} +9 -9
- package/{runtimeDoctorCommands-HSU632DY.js → runtimeDoctorCommands-E2OUORHK.js} +3 -3
- package/{tableCommands-QSZILI7I.js → tableCommands-PRJNWN6Q.js} +6 -6
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
resolveRawAgentInput,
|
|
7
7
|
resolveServerUrl,
|
|
8
8
|
writeUsage
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-AOS5IN2I.js";
|
|
10
10
|
import {
|
|
11
11
|
resolveMachineId
|
|
12
12
|
} from "./chunk-6HYVJV7B.js";
|
|
@@ -19,7 +19,18 @@ import {
|
|
|
19
19
|
parseAgentRunEvent,
|
|
20
20
|
t,
|
|
21
21
|
toolLabel
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-MMCVBEAD.js";
|
|
23
|
+
import {
|
|
24
|
+
createRunActivityTracker,
|
|
25
|
+
finalizeRunRecord,
|
|
26
|
+
spawnLocalBackgroundRun
|
|
27
|
+
} from "./chunk-4SAV7BD7.js";
|
|
28
|
+
import {
|
|
29
|
+
CliProviderQuotaError
|
|
30
|
+
} from "./chunk-JDSUTNYY.js";
|
|
31
|
+
import {
|
|
32
|
+
getDefaultCliLocalRuntimeDb
|
|
33
|
+
} from "./chunk-WJRJDX2W.js";
|
|
23
34
|
import {
|
|
24
35
|
getReadableCliDb
|
|
25
36
|
} from "./chunk-WFHXMLHZ.js";
|
|
@@ -27,42 +38,18 @@ import {
|
|
|
27
38
|
normalizeAgentHandle,
|
|
28
39
|
readDbRecord,
|
|
29
40
|
resolveAgentRecordFromHybridStore
|
|
30
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-56IUA7RU.js";
|
|
31
42
|
import {
|
|
32
43
|
NOLO_PROJECT_MANAGER_AGENT_KEY,
|
|
33
44
|
isLocalCliAgentKey
|
|
34
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-K6QEHQZ3.js";
|
|
46
|
+
import {
|
|
47
|
+
buildSkillDiscoveryContextLayer
|
|
48
|
+
} from "./chunk-KWCLUYGQ.js";
|
|
35
49
|
import {
|
|
36
50
|
applyModelLayerOverride,
|
|
37
51
|
buildModelLayerOverride
|
|
38
52
|
} from "./chunk-LTRXGFMS.js";
|
|
39
|
-
import {
|
|
40
|
-
formatAgentListCard
|
|
41
|
-
} from "./chunk-WMB7GVPN.js";
|
|
42
|
-
import {
|
|
43
|
-
isGatewayHttpStatus
|
|
44
|
-
} from "./chunk-RQSOAMPJ.js";
|
|
45
|
-
import {
|
|
46
|
-
getDefaultCliLocalRuntimeDb
|
|
47
|
-
} from "./chunk-WJRJDX2W.js";
|
|
48
|
-
import {
|
|
49
|
-
buildMemorySubjectsForAgent,
|
|
50
|
-
chooseMemoryOwners,
|
|
51
|
-
loadMemoryCandidatesFromDb,
|
|
52
|
-
resolveAgentMemoryPolicy
|
|
53
|
-
} from "./chunk-GMJS5AYP.js";
|
|
54
|
-
import {
|
|
55
|
-
API_REPORTED_COST_MULTIPLIER,
|
|
56
|
-
normalizeUsage,
|
|
57
|
-
parseUiAskChoiceContent
|
|
58
|
-
} from "./chunk-UFL6WHHJ.js";
|
|
59
|
-
import {
|
|
60
|
-
buildSkillDiscoveryContextLayer
|
|
61
|
-
} from "./chunk-ZVZMT3EA.js";
|
|
62
|
-
import {
|
|
63
|
-
parseExternalSkillMarkdown,
|
|
64
|
-
parseSkillDocProtocol
|
|
65
|
-
} from "./chunk-ZWJOGMKH.js";
|
|
66
53
|
import {
|
|
67
54
|
resolveAgentRuntimeConfigFromRecord
|
|
68
55
|
} from "./chunk-OIQPORYI.js";
|
|
@@ -71,25 +58,12 @@ import {
|
|
|
71
58
|
LOCAL_TURN_ABORTED_CODE,
|
|
72
59
|
readActionGate,
|
|
73
60
|
readCommandActionGatePayload
|
|
74
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-KW47OSRJ.js";
|
|
75
62
|
import {
|
|
76
63
|
createThinkParserState,
|
|
77
64
|
flushThinkParser,
|
|
78
65
|
processThinkChunk
|
|
79
66
|
} from "./chunk-N7J63Q6C.js";
|
|
80
|
-
import {
|
|
81
|
-
resolvePlatformAuthToken
|
|
82
|
-
} from "./chunk-XS7UPVR7.js";
|
|
83
|
-
import {
|
|
84
|
-
DEFAULT_CONTEXT_WINDOW,
|
|
85
|
-
getModelContextWindow
|
|
86
|
-
} from "./chunk-HYSJHRWD.js";
|
|
87
|
-
import {
|
|
88
|
-
clipCompactText
|
|
89
|
-
} from "./chunk-5MMAK75Q.js";
|
|
90
|
-
import {
|
|
91
|
-
findModelConfig
|
|
92
|
-
} from "./chunk-GT3GG2H7.js";
|
|
93
67
|
import {
|
|
94
68
|
buildAgentsMdLayer,
|
|
95
69
|
buildMemoryOverlayLayer,
|
|
@@ -98,13 +72,14 @@ import {
|
|
|
98
72
|
renderTurnContextBlocksWithScope
|
|
99
73
|
} from "./chunk-PJY5AH5A.js";
|
|
100
74
|
import {
|
|
101
|
-
|
|
102
|
-
} from "./chunk-
|
|
75
|
+
resolvePlatformAuthToken
|
|
76
|
+
} from "./chunk-XD5NQEOH.js";
|
|
103
77
|
import {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
78
|
+
formatAgentListCard
|
|
79
|
+
} from "./chunk-SWOTB2TX.js";
|
|
80
|
+
import {
|
|
81
|
+
isGatewayHttpStatus
|
|
82
|
+
} from "./chunk-Z5MXSEOJ.js";
|
|
108
83
|
import {
|
|
109
84
|
formatFinishedRunCard,
|
|
110
85
|
formatListRunsCard,
|
|
@@ -116,11 +91,30 @@ import {
|
|
|
116
91
|
runShowsLogTail
|
|
117
92
|
} from "./chunk-KXKQO4Q6.js";
|
|
118
93
|
import {
|
|
119
|
-
|
|
120
|
-
|
|
94
|
+
buildMemorySubjectsForAgent,
|
|
95
|
+
chooseMemoryOwners,
|
|
96
|
+
loadMemoryCandidatesFromDb,
|
|
97
|
+
resolveAgentMemoryPolicy
|
|
98
|
+
} from "./chunk-QLV2GKU5.js";
|
|
99
|
+
import {
|
|
100
|
+
API_REPORTED_COST_MULTIPLIER,
|
|
101
|
+
DEFAULT_CONTEXT_WINDOW,
|
|
102
|
+
getModelContextWindow,
|
|
103
|
+
normalizeUsage,
|
|
104
|
+
parseUiAskChoiceContent
|
|
105
|
+
} from "./chunk-THTAR67C.js";
|
|
106
|
+
import {
|
|
107
|
+
clipCompactText
|
|
108
|
+
} from "./chunk-OB6FBSH3.js";
|
|
121
109
|
import {
|
|
122
110
|
toErrorMessage
|
|
123
111
|
} from "./chunk-HNMXYYJR.js";
|
|
112
|
+
import {
|
|
113
|
+
compactWhitespace
|
|
114
|
+
} from "./chunk-DWLEOOGR.js";
|
|
115
|
+
import {
|
|
116
|
+
findModelConfig
|
|
117
|
+
} from "./chunk-VSTUQGLT.js";
|
|
124
118
|
import {
|
|
125
119
|
readPipeText,
|
|
126
120
|
spawnProcess
|
|
@@ -130,24 +124,27 @@ import {
|
|
|
130
124
|
} from "./chunk-A7GB5UGH.js";
|
|
131
125
|
import {
|
|
132
126
|
parsePositiveFiniteNumberOrFallback
|
|
133
|
-
} from "./chunk-
|
|
134
|
-
import {
|
|
135
|
-
createMemoryKey
|
|
136
|
-
} from "./chunk-NRY4GCKJ.js";
|
|
127
|
+
} from "./chunk-446VANPP.js";
|
|
137
128
|
import {
|
|
138
129
|
asTrimmedLowercaseString
|
|
139
130
|
} from "./chunk-QSJ3HFEF.js";
|
|
140
131
|
import {
|
|
141
132
|
BUILTIN_NOLO_AGENT_KEY,
|
|
142
|
-
PUBLIC_DEEPSEEK_V4_FLASH_AGENT_KEY
|
|
143
|
-
|
|
144
|
-
|
|
133
|
+
PUBLIC_DEEPSEEK_V4_FLASH_AGENT_KEY
|
|
134
|
+
} from "./chunk-DWQNDGO7.js";
|
|
135
|
+
import {
|
|
136
|
+
isLoopbackUrl
|
|
137
|
+
} from "./chunk-4SN6J65J.js";
|
|
138
|
+
import {
|
|
139
|
+
createMemoryKey
|
|
140
|
+
} from "./chunk-WHLVPK32.js";
|
|
145
141
|
import {
|
|
146
142
|
asTrimmedString
|
|
147
143
|
} from "./chunk-3EUW3WEO.js";
|
|
148
144
|
import {
|
|
149
|
-
|
|
150
|
-
|
|
145
|
+
parseExternalSkillMarkdown,
|
|
146
|
+
parseSkillDocProtocol
|
|
147
|
+
} from "./chunk-ZWJOGMKH.js";
|
|
151
148
|
import {
|
|
152
149
|
asOptionalTrimmedString
|
|
153
150
|
} from "./chunk-G3SUCT4W.js";
|
|
@@ -163,11 +160,6 @@ var CLI_AUTO_TIER_MODELS = {
|
|
|
163
160
|
balanced: "deepseek-v4-flash",
|
|
164
161
|
quality: "deepseek-v4-flash"
|
|
165
162
|
};
|
|
166
|
-
var CLI_IMAGE_AGENT_KEY = PUBLIC_KIMI_K26_IMAGE_AGENT_KEY;
|
|
167
|
-
var CLI_IMAGE_AGENT_MODEL = "kimi-k2.6";
|
|
168
|
-
var CLI_AUTO_TIER_AGENT_KEY_TABLE = {
|
|
169
|
-
[CLI_AUTO_TIER_AGENT_KEYS.flash]: true
|
|
170
|
-
};
|
|
171
163
|
function resolveCliAutoAgentModel(agentKey) {
|
|
172
164
|
if (agentKey === CLI_AUTO_TIER_AGENT_KEYS.flash) return CLI_AUTO_TIER_MODELS.flash;
|
|
173
165
|
if (agentKey === CLI_AUTO_TIER_AGENT_KEYS.balanced) {
|
|
@@ -176,13 +168,9 @@ function resolveCliAutoAgentModel(agentKey) {
|
|
|
176
168
|
if (agentKey === CLI_AUTO_TIER_AGENT_KEYS.quality) {
|
|
177
169
|
return CLI_AUTO_TIER_MODELS.quality;
|
|
178
170
|
}
|
|
179
|
-
if (agentKey === CLI_IMAGE_AGENT_KEY) return CLI_IMAGE_AGENT_MODEL;
|
|
180
171
|
return void 0;
|
|
181
172
|
}
|
|
182
173
|
function classifyCliAutoRoute(_text, options) {
|
|
183
|
-
if (options.hasImages) {
|
|
184
|
-
return { agentKey: CLI_IMAGE_AGENT_KEY, tier: "image", classified: true };
|
|
185
|
-
}
|
|
186
174
|
return {
|
|
187
175
|
agentKey: CLI_AUTO_TIER_AGENT_KEYS.flash,
|
|
188
176
|
tier: "flash",
|
|
@@ -948,19 +936,19 @@ function renderSurfaceLine(args) {
|
|
|
948
936
|
return `${surface}${reopened}${padding}\x1B[0m`;
|
|
949
937
|
}
|
|
950
938
|
function renderDiffLine(args) {
|
|
951
|
-
const { kind, text } = args;
|
|
939
|
+
const { kind, text, highlightedText } = args;
|
|
952
940
|
const env = args.env ?? process.env;
|
|
953
941
|
const colorEnabled = args.colorEnabled ?? resolveCliColorEnabled();
|
|
954
942
|
if (!colorEnabled) return text;
|
|
955
943
|
const seqs = diffLineSequences(env);
|
|
956
944
|
if (!seqs) {
|
|
957
|
-
if (kind === "context") return text;
|
|
945
|
+
if (kind === "context") return highlightedText ?? text;
|
|
958
946
|
const token = kind === "added" ? "success" : kind === "removed" ? "danger" : "info";
|
|
959
|
-
return `${themeColorSequence(token, env)}${text}\x1B[39m`;
|
|
947
|
+
return `${themeColorSequence(token, env)}${highlightedText ?? text}\x1B[39m`;
|
|
960
948
|
}
|
|
961
949
|
const seq = seqs[kind];
|
|
962
950
|
return renderSurfaceLine({
|
|
963
|
-
text: `${seq.fg}${text}`,
|
|
951
|
+
text: highlightedText ?? `${seq.fg}${text}`,
|
|
964
952
|
surface: seq.bg,
|
|
965
953
|
padTo: args.padTo ?? visibleWidth(text)
|
|
966
954
|
});
|
|
@@ -1027,11 +1015,13 @@ function readFenceLanguage(line) {
|
|
|
1027
1015
|
return m ? (m[1] ?? "").toLowerCase() : "";
|
|
1028
1016
|
}
|
|
1029
1017
|
function normalizeCodeLang(raw) {
|
|
1030
|
-
switch (raw) {
|
|
1018
|
+
switch (raw.toLowerCase()) {
|
|
1031
1019
|
case "js":
|
|
1032
1020
|
case "jsx":
|
|
1033
1021
|
case "ts":
|
|
1034
1022
|
case "tsx":
|
|
1023
|
+
case "mjs":
|
|
1024
|
+
case "cjs":
|
|
1035
1025
|
case "javascript":
|
|
1036
1026
|
case "typescript":
|
|
1037
1027
|
return "js";
|
|
@@ -1162,6 +1152,11 @@ function scanStringCommentRegions(line, lang) {
|
|
|
1162
1152
|
}
|
|
1163
1153
|
return regions;
|
|
1164
1154
|
}
|
|
1155
|
+
function detectCodeLangFromPath(filePath) {
|
|
1156
|
+
if (!filePath) return "unknown";
|
|
1157
|
+
const ext = filePath.split(".").pop() ?? "";
|
|
1158
|
+
return normalizeCodeLang(ext);
|
|
1159
|
+
}
|
|
1165
1160
|
function highlightCodeLine(line, lang, brightness) {
|
|
1166
1161
|
const info = colorSeq("info", brightness);
|
|
1167
1162
|
if (lang === "unknown") {
|
|
@@ -1943,8 +1938,20 @@ function compactResultHint(event) {
|
|
|
1943
1938
|
if (range) return { inline: range };
|
|
1944
1939
|
}
|
|
1945
1940
|
if (event.toolName === "editFile" && event.metadata) {
|
|
1946
|
-
const
|
|
1947
|
-
if (
|
|
1941
|
+
const res = formatEditFileSnippet(event.metadata);
|
|
1942
|
+
if (res) {
|
|
1943
|
+
const stats = [];
|
|
1944
|
+
if (res.addedCount > 0) stats.push(`+${res.addedCount}`);
|
|
1945
|
+
if (res.removedCount > 0) stats.push(`-${res.removedCount}`);
|
|
1946
|
+
const inline = stats.length > 0 ? `(${stats.join(", ")})` : "";
|
|
1947
|
+
return { inline, detail: res.lines };
|
|
1948
|
+
}
|
|
1949
|
+
}
|
|
1950
|
+
if (event.toolName === "writeFile" && event.metadata) {
|
|
1951
|
+
const totalLines = event.metadata.totalLines ?? event.metadata.lines;
|
|
1952
|
+
if (typeof totalLines === "number" && totalLines > 0) {
|
|
1953
|
+
return { inline: `(+${totalLines})` };
|
|
1954
|
+
}
|
|
1948
1955
|
}
|
|
1949
1956
|
const summary = event.summary;
|
|
1950
1957
|
if (!summary) return { inline: "" };
|
|
@@ -1963,39 +1970,63 @@ function readReadFileRange(metadata) {
|
|
|
1963
1970
|
if (!truncated && startLine === 1 && endLine === totalLines) return void 0;
|
|
1964
1971
|
return `${startLine}-${endLine}/${totalLines}`;
|
|
1965
1972
|
}
|
|
1966
|
-
var EDIT_SNIPPET_MAX_LINES =
|
|
1967
|
-
var
|
|
1973
|
+
var EDIT_SNIPPET_MAX_LINES = 24;
|
|
1974
|
+
var DEFAULT_EDIT_SNIPPET_MAX_WIDTH = 96;
|
|
1975
|
+
function resolveEditSnippetMaxWidth(env = process.env, columns) {
|
|
1976
|
+
if (env.NOLO_TEST_DIFF_WIDTH) {
|
|
1977
|
+
const parsed = parseInt(env.NOLO_TEST_DIFF_WIDTH, 10);
|
|
1978
|
+
if (!Number.isNaN(parsed) && parsed > 0) return parsed;
|
|
1979
|
+
}
|
|
1980
|
+
const cols = typeof columns === "number" ? columns : typeof process !== "undefined" && typeof process.stdout?.columns === "number" ? process.stdout.columns : 0;
|
|
1981
|
+
if (cols > 0) {
|
|
1982
|
+
return Math.max(80, Math.min(160, cols - 8));
|
|
1983
|
+
}
|
|
1984
|
+
return DEFAULT_EDIT_SNIPPET_MAX_WIDTH;
|
|
1985
|
+
}
|
|
1968
1986
|
function formatEditFileSnippet(metadata) {
|
|
1969
1987
|
const oldSnippet = typeof metadata.oldSnippet === "string" ? metadata.oldSnippet : void 0;
|
|
1970
1988
|
const newSnippet = typeof metadata.newSnippet === "string" ? metadata.newSnippet : void 0;
|
|
1971
1989
|
if (!oldSnippet && !newSnippet) return void 0;
|
|
1990
|
+
const maxWidth = resolveEditSnippetMaxWidth();
|
|
1972
1991
|
if (oldSnippet && !newSnippet) {
|
|
1973
|
-
|
|
1992
|
+
const lines = snippetLinesWithKind(oldSnippet, "removed", maxWidth);
|
|
1993
|
+
return { lines, addedCount: 0, removedCount: lines.length };
|
|
1974
1994
|
}
|
|
1975
1995
|
if (newSnippet && !oldSnippet) {
|
|
1976
|
-
|
|
1996
|
+
const lines = snippetLinesWithKind(newSnippet, "added", maxWidth);
|
|
1997
|
+
return { lines, addedCount: lines.length, removedCount: 0 };
|
|
1977
1998
|
}
|
|
1978
1999
|
const parts = diffLines(oldSnippet, newSnippet);
|
|
1979
2000
|
const all = [];
|
|
2001
|
+
let addedCount = 0;
|
|
2002
|
+
let removedCount = 0;
|
|
1980
2003
|
for (const part of parts) {
|
|
1981
2004
|
const kind = part.added ? "added" : part.removed ? "removed" : "context";
|
|
1982
2005
|
const raw = part.value.split("\n");
|
|
1983
2006
|
if (raw.length > 0 && raw[raw.length - 1] === "") raw.pop();
|
|
1984
|
-
for (const line of raw)
|
|
2007
|
+
for (const line of raw) {
|
|
2008
|
+
if (kind === "added") addedCount++;
|
|
2009
|
+
if (kind === "removed") removedCount++;
|
|
2010
|
+
all.push(buildEditLine(kind, line, maxWidth));
|
|
2011
|
+
}
|
|
1985
2012
|
}
|
|
1986
2013
|
const changeCount = all.filter((l) => l.kind !== "context").length;
|
|
1987
2014
|
if (changeCount === 0) return void 0;
|
|
1988
|
-
return
|
|
2015
|
+
return {
|
|
2016
|
+
lines: windowAndTruncate(all, EDIT_SNIPPET_MAX_LINES),
|
|
2017
|
+
addedCount,
|
|
2018
|
+
removedCount
|
|
2019
|
+
};
|
|
1989
2020
|
}
|
|
1990
2021
|
function prefixFor(kind) {
|
|
1991
2022
|
return kind === "added" ? "+ " : kind === "removed" ? "- " : " ";
|
|
1992
2023
|
}
|
|
1993
|
-
function buildEditLine(kind, body) {
|
|
1994
|
-
return { kind, text: prefixFor(kind) + truncateByDisplayWidth(body,
|
|
2024
|
+
function buildEditLine(kind, body, maxWidth = resolveEditSnippetMaxWidth()) {
|
|
2025
|
+
return { kind, text: prefixFor(kind) + truncateByDisplayWidth(body, maxWidth) };
|
|
1995
2026
|
}
|
|
1996
|
-
function snippetLinesWithKind(snippet, kind) {
|
|
2027
|
+
function snippetLinesWithKind(snippet, kind, maxWidth = resolveEditSnippetMaxWidth()) {
|
|
1997
2028
|
const lines = snippet.split(/\r?\n/).filter((line) => line.length > 0);
|
|
1998
|
-
return lines.slice(0, EDIT_SNIPPET_MAX_LINES).map((line) => buildEditLine(kind, line));
|
|
2029
|
+
return lines.slice(0, EDIT_SNIPPET_MAX_LINES).map((line) => buildEditLine(kind, line, maxWidth));
|
|
1999
2030
|
}
|
|
2000
2031
|
function truncateByDisplayWidth(line, maxWidth) {
|
|
2001
2032
|
if (displayWidth(line) <= maxWidth) return line;
|
|
@@ -2561,17 +2592,41 @@ function formatCompactToolLine(event, pending, colorEnabled) {
|
|
|
2561
2592
|
`;
|
|
2562
2593
|
}
|
|
2563
2594
|
if (!hint.detail?.length) return mainLine;
|
|
2564
|
-
|
|
2595
|
+
const filePath = typeof event.metadata?.path === "string" ? event.metadata.path : event.argumentsPreview;
|
|
2596
|
+
return `${mainLine}${formatEditDetailBlock(hint.detail, colorEnabled, filePath)}`;
|
|
2565
2597
|
}
|
|
2566
|
-
function formatEditDetailBlock(lines, colorEnabled) {
|
|
2598
|
+
function formatEditDetailBlock(lines, colorEnabled, filePath, env = process.env) {
|
|
2567
2599
|
if (!colorEnabled) {
|
|
2568
2600
|
return lines.map((line) => ` ${line.text}
|
|
2569
2601
|
`).join("");
|
|
2570
2602
|
}
|
|
2603
|
+
const isTruecolor = supportsTruecolor(env);
|
|
2604
|
+
const lang = isTruecolor ? detectCodeLangFromPath(filePath) : "unknown";
|
|
2605
|
+
const brightness = resolveTuiBrightness(env);
|
|
2571
2606
|
const padTo = Math.max(...lines.map((line) => displayWidth(line.text))) + 1;
|
|
2572
|
-
return lines.map((line) => ` ${renderDiffLine({
|
|
2607
|
+
return lines.map((line) => ` ${renderDiffLine({
|
|
2608
|
+
kind: line.kind,
|
|
2609
|
+
text: line.text,
|
|
2610
|
+
highlightedText: shouldHighlightEditLine(line, lang, isTruecolor) ? buildHighlightedEditLine(line, lang, brightness, env) : void 0,
|
|
2611
|
+
padTo,
|
|
2612
|
+
colorEnabled: true,
|
|
2613
|
+
env
|
|
2614
|
+
})}
|
|
2573
2615
|
`).join("");
|
|
2574
2616
|
}
|
|
2617
|
+
function shouldHighlightEditLine(line, lang, isTruecolor) {
|
|
2618
|
+
if (!isTruecolor || lang === "unknown") return false;
|
|
2619
|
+
if (line.text.startsWith(" \u2026") || line.text.startsWith("\u2026")) return false;
|
|
2620
|
+
return line.text.length >= 2;
|
|
2621
|
+
}
|
|
2622
|
+
function buildHighlightedEditLine(line, lang, brightness, env) {
|
|
2623
|
+
const prefix = line.text.slice(0, 2);
|
|
2624
|
+
const body = line.text.slice(2);
|
|
2625
|
+
const prefixToken = line.kind === "added" ? "success" : line.kind === "removed" ? "danger" : "chrome";
|
|
2626
|
+
const coloredPrefix = themeText(prefix, prefixToken, true, env);
|
|
2627
|
+
const highlightedBody = highlightCodeLine(body, lang, brightness);
|
|
2628
|
+
return `${coloredPrefix}${highlightedBody}`;
|
|
2629
|
+
}
|
|
2575
2630
|
function createToolEventFormatter(mode, colorEnabled = resolveCliColorEnabled(), opts = {}) {
|
|
2576
2631
|
const suppressRunProgressCards = opts.suppressRunProgressCards === true;
|
|
2577
2632
|
const pending = /* @__PURE__ */ new Map();
|
|
@@ -3483,7 +3538,7 @@ function findCollapsedPasteSpanAt(buffer, pos, opts = {}) {
|
|
|
3483
3538
|
// packages/cli/client/agentRun.ts
|
|
3484
3539
|
import { ulid } from "ulid";
|
|
3485
3540
|
async function loadRunLocalAgentTurn() {
|
|
3486
|
-
const { runLocalAgentTurn } = await import("./agentRuntimeLocal-
|
|
3541
|
+
const { runLocalAgentTurn } = await import("./agentRuntimeLocal-I57YSGH4.js");
|
|
3487
3542
|
return runLocalAgentTurn;
|
|
3488
3543
|
}
|
|
3489
3544
|
async function resolveCurrentMachineId(options) {
|
|
@@ -3672,44 +3727,58 @@ function classifyLocalRunError(message) {
|
|
|
3672
3727
|
return { kind: "upstream", transport, status };
|
|
3673
3728
|
}
|
|
3674
3729
|
var HISTORY_REPLAY_REJECTION_RE = /invalid_request_error|invalid\s+tool\s+call\s+arguments?/i;
|
|
3730
|
+
var RUN_UNAVAILABLE_PREFIX = "[nolo] auto runtime: local run unavailable";
|
|
3731
|
+
var NO_FALLBACK = "Not falling back to server.";
|
|
3732
|
+
var SERVER_FALLBACK_HINT = "or use --server to run on the server explicitly.";
|
|
3733
|
+
function buildAuthFailure(ctx) {
|
|
3734
|
+
const fix = ctx.where === "server chat proxy" ? `Check the agent's provider/api-key settings on nolo.chat` : `Fix the local credential/config and retry`;
|
|
3735
|
+
return `${RUN_UNAVAILABLE_PREFIX} (${ctx.where} returned HTTP ${ctx.status}, auth rejected). Detail: ${ctx.message} ${NO_FALLBACK} ${fix}, ${SERVER_FALLBACK_HINT}.
|
|
3736
|
+
`;
|
|
3737
|
+
}
|
|
3738
|
+
function buildRejectedPayloadFailure(ctx) {
|
|
3739
|
+
const looksLikeHistoryReplay = HISTORY_REPLAY_REJECTION_RE.test(ctx.message);
|
|
3740
|
+
const cause = looksLikeHistoryReplay ? ` This usually happens when the dialog history contains tool_calls or reasoning produced by a different model/provider (e.g. after /switch); the new provider rejects that history. Start a fresh dialog, or clean the offending history.` : "";
|
|
3741
|
+
return `${RUN_UNAVAILABLE_PREFIX} (${ctx.where} returned HTTP ${ctx.status}, the provider rejected the request body \u2014 this is NOT a local credential/config issue). Detail: ${ctx.message}${cause} ${NO_FALLBACK} Use --server to run on the server explicitly, or start a fresh dialog.
|
|
3742
|
+
`;
|
|
3743
|
+
}
|
|
3744
|
+
function buildRateLimitFailure(ctx) {
|
|
3745
|
+
return `${RUN_UNAVAILABLE_PREFIX} (${ctx.where} returned HTTP ${ctx.status}, rate limited). Detail: ${ctx.message} ${NO_FALLBACK} Retry shortly, ${SERVER_FALLBACK_HINT}.
|
|
3746
|
+
`;
|
|
3747
|
+
}
|
|
3748
|
+
function buildTransientFailure(ctx) {
|
|
3749
|
+
return `${RUN_UNAVAILABLE_PREFIX} (${ctx.where} returned HTTP ${ctx.status}; this is an upstream/gateway issue, not your local credential or config). Detail: ${ctx.message} ${NO_FALLBACK} Retry shortly, ${SERVER_FALLBACK_HINT}.
|
|
3750
|
+
`;
|
|
3751
|
+
}
|
|
3752
|
+
function buildUpstreamFailure(ctx) {
|
|
3753
|
+
const fix = ctx.where === "server chat proxy" ? `Check the agent's provider/api-key settings on nolo.chat` : `Check the agent's endpoint/model settings`;
|
|
3754
|
+
return `${RUN_UNAVAILABLE_PREFIX} (${ctx.where} returned HTTP ${ctx.status}). Detail: ${ctx.message} ${NO_FALLBACK} ${fix}, ${SERVER_FALLBACK_HINT}.
|
|
3755
|
+
`;
|
|
3756
|
+
}
|
|
3757
|
+
var FAILURE_BUILDERS = {
|
|
3758
|
+
auth: buildAuthFailure,
|
|
3759
|
+
"rejected-payload": buildRejectedPayloadFailure,
|
|
3760
|
+
"rate-limit": buildRateLimitFailure,
|
|
3761
|
+
transient: buildTransientFailure,
|
|
3762
|
+
upstream: buildUpstreamFailure
|
|
3763
|
+
};
|
|
3675
3764
|
function describeLocalRunFailure(message) {
|
|
3676
3765
|
if (/UPSTREAM_402|Insufficient Balance|余额不足|insufficient\s+balance/i.test(
|
|
3677
3766
|
message
|
|
3678
3767
|
)) {
|
|
3679
|
-
return
|
|
3768
|
+
return `${RUN_UNAVAILABLE_PREFIX} (${message}). ${NO_FALLBACK} Top up your balance, then send again (or say "\u7EE7\u7EED") \u2014 if a dialog was kept, context is preserved.
|
|
3680
3769
|
`;
|
|
3681
3770
|
}
|
|
3682
3771
|
const cls = classifyLocalRunError(message);
|
|
3683
3772
|
if (cls.kind === "generic") {
|
|
3684
|
-
return
|
|
3685
|
-
`;
|
|
3686
|
-
}
|
|
3687
|
-
const where = cls.transport === "platform" ? "server chat proxy" : "local provider";
|
|
3688
|
-
const detail = message ? ` Detail: ${message}` : "";
|
|
3689
|
-
switch (cls.kind) {
|
|
3690
|
-
case "auth":
|
|
3691
|
-
return cls.transport === "platform" ? `[nolo] auto runtime: local run unavailable (${where} returned HTTP ${cls.status}, auth rejected).${detail} Not falling back to server. Check the agent's provider/api-key settings on nolo.chat, or use --server to run on the server explicitly.
|
|
3692
|
-
` : `[nolo] auto runtime: local run unavailable (${where} returned HTTP ${cls.status}, auth rejected).${detail} Not falling back to server. Fix the local credential/config and retry, or use --server to run on the server explicitly.
|
|
3773
|
+
return `${RUN_UNAVAILABLE_PREFIX} (${message}). ${NO_FALLBACK} Fix the local credential/config and retry, ${SERVER_FALLBACK_HINT}.
|
|
3693
3774
|
`;
|
|
3694
|
-
case "rejected-payload": {
|
|
3695
|
-
const looksLikeHistoryReplay = HISTORY_REPLAY_REJECTION_RE.test(message);
|
|
3696
|
-
const cause = looksLikeHistoryReplay ? ` This usually happens when the dialog history contains tool_calls or reasoning produced by a different model/provider (e.g. after /switch); the new provider rejects that history. Start a fresh dialog, or clean the offending history.` : "";
|
|
3697
|
-
return `[nolo] auto runtime: local run unavailable (${where} returned HTTP ${cls.status}, the provider rejected the request body \u2014 this is NOT a local credential/config issue).${detail}${cause} Not falling back to server. Use --server to run on the server explicitly, or start a fresh dialog.
|
|
3698
|
-
`;
|
|
3699
|
-
}
|
|
3700
|
-
case "rate-limit":
|
|
3701
|
-
return `[nolo] auto runtime: local run unavailable (${where} returned HTTP ${cls.status}, rate limited).${detail} Not falling back to server. Retry shortly, or use --server to run on the server explicitly.
|
|
3702
|
-
`;
|
|
3703
|
-
case "transient":
|
|
3704
|
-
return `[nolo] auto runtime: local run unavailable (${where} returned HTTP ${cls.status}; this is an upstream/gateway issue, not your local credential or config).${detail} Not falling back to server. Retry shortly, or use --server to run on the server explicitly.
|
|
3705
|
-
`;
|
|
3706
|
-
case "upstream":
|
|
3707
|
-
default: {
|
|
3708
|
-
return cls.transport === "platform" ? `[nolo] auto runtime: local run unavailable (${where} returned HTTP ${cls.status}).${detail} Not falling back to server. Check the agent's provider/api-key settings on nolo.chat, or use --server to run on the server explicitly.
|
|
3709
|
-
` : `[nolo] auto runtime: local run unavailable (${where} returned HTTP ${cls.status}).${detail} Not falling back to server. Check the agent's endpoint/model settings, or use --server to run on the server explicitly.
|
|
3710
|
-
`;
|
|
3711
|
-
}
|
|
3712
3775
|
}
|
|
3776
|
+
const ctx = {
|
|
3777
|
+
message,
|
|
3778
|
+
where: cls.transport === "platform" ? "server chat proxy" : "local provider",
|
|
3779
|
+
status: cls.status
|
|
3780
|
+
};
|
|
3781
|
+
return FAILURE_BUILDERS[cls.kind](ctx);
|
|
3713
3782
|
}
|
|
3714
3783
|
function shouldAttemptAutoLocal(options) {
|
|
3715
3784
|
if (options.localRuntimeAdapter || options.localRuntimeAdapterFactory)
|
|
@@ -5238,8 +5307,6 @@ function isBalanceExhaustedError(error) {
|
|
|
5238
5307
|
}
|
|
5239
5308
|
|
|
5240
5309
|
export {
|
|
5241
|
-
CLI_IMAGE_AGENT_KEY,
|
|
5242
|
-
CLI_AUTO_TIER_AGENT_KEY_TABLE,
|
|
5243
5310
|
classifyCliAutoRoute,
|
|
5244
5311
|
resolveAgentContextWindow,
|
|
5245
5312
|
formatTokenCount,
|
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
listUserRecordsFromServers,
|
|
8
8
|
readDbRecordFromServers,
|
|
9
9
|
readLiveDbRecordAfterTombstoneMerge
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-HLG6GAUD.js";
|
|
11
11
|
import {
|
|
12
12
|
buildDialogAttachmentPlan,
|
|
13
13
|
extractFileContentIds
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-THTAR67C.js";
|
|
15
15
|
import {
|
|
16
16
|
toErrorMessage
|
|
17
17
|
} from "./chunk-HNMXYYJR.js";
|
|
@@ -25,20 +25,20 @@ import {
|
|
|
25
25
|
} from "./chunk-A7GB5UGH.js";
|
|
26
26
|
import {
|
|
27
27
|
parsePositiveFiniteNumberOrFallback
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-446VANPP.js";
|
|
29
29
|
import {
|
|
30
30
|
asRecordOrEmpty
|
|
31
31
|
} from "./chunk-KX6YBIHG.js";
|
|
32
|
-
import {
|
|
33
|
-
asNonEmptyStringArray,
|
|
34
|
-
asTrimmedNonEmptyStringArray
|
|
35
|
-
} from "./chunk-I42VC5KR.js";
|
|
36
32
|
import {
|
|
37
33
|
asTrimmedString
|
|
38
34
|
} from "./chunk-3EUW3WEO.js";
|
|
39
35
|
import {
|
|
40
36
|
isRecord
|
|
41
37
|
} from "./chunk-KUG52IAP.js";
|
|
38
|
+
import {
|
|
39
|
+
asNonEmptyStringArray,
|
|
40
|
+
asTrimmedNonEmptyStringArray
|
|
41
|
+
} from "./chunk-I42VC5KR.js";
|
|
42
42
|
import {
|
|
43
43
|
asOptionalTrimmedString
|
|
44
44
|
} from "./chunk-G3SUCT4W.js";
|
|
@@ -625,7 +625,7 @@ async function tryHttpDialogCandidates(args) {
|
|
|
625
625
|
throw Object.assign(new Error("All HTTP dialog reads failed"), { attempts });
|
|
626
626
|
}
|
|
627
627
|
async function readDialogFromLocalDb(dialogKey, dialogId, limit, readLocalDialog) {
|
|
628
|
-
const reader = readLocalDialog ?? (await import("./localDialogRead-
|
|
628
|
+
const reader = readLocalDialog ?? (await import("./localDialogRead-P72W2U2R.js")).readDialogFromLocalDb;
|
|
629
629
|
const result = await reader({ dialogKey, dialogId, limit });
|
|
630
630
|
return {
|
|
631
631
|
...result,
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
sanitizeForOutbound
|
|
3
|
+
} from "./chunk-T27IEBNQ.js";
|
|
1
4
|
import {
|
|
2
5
|
accumulateToolCallDelta,
|
|
3
6
|
extractThinkContent,
|
|
@@ -24,10 +27,10 @@ import {
|
|
|
24
27
|
resolvePlatformAuthToken,
|
|
25
28
|
resolvePlatformServerUrl,
|
|
26
29
|
resolveProviderTransportDecision
|
|
27
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-XD5NQEOH.js";
|
|
28
31
|
import {
|
|
29
32
|
clipCompactText
|
|
30
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-OB6FBSH3.js";
|
|
31
34
|
import {
|
|
32
35
|
isRecord
|
|
33
36
|
} from "./chunk-KUG52IAP.js";
|
|
@@ -351,12 +354,13 @@ function buildPlatformChatCompletionRequest(args) {
|
|
|
351
354
|
args.providerConfig.provider,
|
|
352
355
|
args.providerConfig.model
|
|
353
356
|
);
|
|
357
|
+
const sanitizedMessages = sanitizeForOutbound(args.messages, args.tools);
|
|
354
358
|
const body = {
|
|
355
359
|
model: args.providerConfig.model,
|
|
356
360
|
...usesResponsesApi ? {
|
|
357
|
-
input: convertMessagesToResponsesInput(
|
|
361
|
+
input: convertMessagesToResponsesInput(sanitizedMessages)
|
|
358
362
|
} : {
|
|
359
|
-
messages: toOpenAiCompatibleMessages(
|
|
363
|
+
messages: toOpenAiCompatibleMessages(sanitizedMessages, {
|
|
360
364
|
stripReasoningContent: shouldStripReasoning
|
|
361
365
|
})
|
|
362
366
|
},
|