nolo-cli 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_executeModel-UD44KGZ4.js +203 -0
- package/action-ZJWE3Y5S.js +28 -0
- package/addContentAction-TVDBNJM5.js +26 -0
- package/addDialogAgentAction-EKH774VT.js +68 -0
- package/agentDeleteCommand-TCPEFJTF.js +327 -0
- package/agentEmailCommands-CZ3UILZ4.js +626 -0
- package/agentListCommands-SJKO2FFB.js +223 -0
- package/agentMachineCommands-PSNABISZ.js +425 -0
- package/agentPullCommand-O2MTUAFR.js +122 -0
- package/agentRecordCommands-MH2JKFHS.js +94 -0
- package/agentRunCommand-4KH6MIZR.js +110 -0
- package/agentRunControl-K4VKNEHF.js +57 -0
- package/agentRuntimeLocal-SKHJUWSS.js +104 -0
- package/agentSlice-3WXXN4VK.js +42 -0
- package/authCommand-PXFX6JDT.js +581 -0
- package/authCommands-356AYWEK.js +35 -0
- package/chunk-2EISRLRC.js +238 -0
- package/chunk-2FTTDCD4.js +675 -0
- package/chunk-2K2ECKSG.js +222 -0
- package/chunk-2PUGVR6E.js +19 -0
- package/chunk-3ASDTTEI.js +1774 -0
- package/chunk-3EUW3WEO.js +8 -0
- package/chunk-3LY4F7SV.js +9293 -0
- package/chunk-3TZDXYSF.js +71 -0
- package/chunk-3WYQEUBI.js +34 -0
- package/chunk-4CQLVGRV.js +50 -0
- package/chunk-4IJYA27C.js +342 -0
- package/chunk-4K2KKCSD.js +577 -0
- package/chunk-4SN6J65J.js +38 -0
- package/chunk-4VNS5WPM.js +42 -0
- package/chunk-4ZDM73SD.js +34 -0
- package/chunk-5CS33IBL.js +301 -0
- package/chunk-5KLGBAAR.js +386 -0
- package/chunk-5MIDPSSK.js +206 -0
- package/chunk-5MMAK75Q.js +15 -0
- package/chunk-5PJ3VWCS.js +360 -0
- package/chunk-63SLEOLK.js +175 -0
- package/chunk-63W5N6P3.js +150 -0
- package/chunk-6GANEXVO.js +231 -0
- package/chunk-6HYVJV7B.js +102 -0
- package/chunk-6WD3OOJS.js +20 -0
- package/chunk-7OOXPE3N.js +628 -0
- package/chunk-7QRKCBOP.js +1078 -0
- package/chunk-ATNTHIZI.js +13 -0
- package/chunk-AUQ747NZ.js +902 -0
- package/chunk-AVMKZHBC.js +85 -0
- package/chunk-AZPCASRE.js +36 -0
- package/chunk-BBYVOSU2.js +792 -0
- package/chunk-C3RUNRHT.js +51 -0
- package/chunk-CF2WZF4N.js +134 -0
- package/chunk-CF7PE763.js +10 -0
- package/chunk-CKOJQDKR.js +198 -0
- package/chunk-COMXDWNM.js +807 -0
- package/chunk-CPB2YM4D.js +171 -0
- package/chunk-CWMSB67P.js +34 -0
- package/chunk-DCOA4QSN.js +105 -0
- package/chunk-DFFIZ25G.js +30 -0
- package/chunk-DWLEOOGR.js +8 -0
- package/chunk-DZ3XJVET.js +231 -0
- package/chunk-EHLHSX7R.js +1433 -0
- package/chunk-ELRRLDWI.js +478 -0
- package/chunk-EXTIQUCI.js +482 -0
- package/chunk-EYEEHCU4.js +3066 -0
- package/chunk-G3SUCT4W.js +8 -0
- package/chunk-G43KEVSC.js +1447 -0
- package/chunk-GAKEBQD6.js +30 -0
- package/chunk-GBRG75BQ.js +86 -0
- package/chunk-GG4AJPSR.js +191 -0
- package/chunk-H33743XH.js +25 -0
- package/chunk-HNMXYYJR.js +12 -0
- package/chunk-I42VC5KR.js +15 -0
- package/chunk-IDZTNRP2.js +85 -0
- package/chunk-ISNCLGUZ.js +146 -0
- package/chunk-IWX4UW2E.js +548 -0
- package/chunk-JBTJAPUF.js +35 -0
- package/chunk-JEXVIMYZ.js +55 -0
- package/chunk-JRKKFRAV.js +537 -0
- package/chunk-JZPBVBIY.js +94 -0
- package/chunk-KKY4B2Q2.js +21 -0
- package/chunk-KOCA5FCS.js +4750 -0
- package/chunk-KQHGZWSV.js +63 -0
- package/chunk-KTVVPRJS.js +138 -0
- package/chunk-KUG52IAP.js +8 -0
- package/chunk-KX6YBIHG.js +8 -0
- package/chunk-LARL2V6G.js +9017 -0
- package/chunk-LCBAMY2M.js +60 -0
- package/chunk-LM6IYQ3F.js +16 -0
- package/chunk-M76ECQRD.js +13658 -0
- package/chunk-MGOJ5R6J.js +113 -0
- package/chunk-MKMWT7SA.js +27196 -0
- package/chunk-MRC4Q34M.js +188 -0
- package/chunk-OLZBQWZU.js +6 -0
- package/chunk-OPZYGHUC.js +89 -0
- package/chunk-OWOHNGCN.js +50 -0
- package/chunk-PAKN26FP.js +239 -0
- package/chunk-PCWC3JTN.js +91 -0
- package/chunk-PG5PNA7Y.js +939 -0
- package/chunk-Q2YZULBH.js +104 -0
- package/chunk-QSJ3HFEF.js +8 -0
- package/chunk-QYXLLLGL.js +4519 -0
- package/chunk-ROWQEJRP.js +139 -0
- package/chunk-S7Z2HMCN.js +25 -0
- package/chunk-SBR32ZZS.js +1901 -0
- package/chunk-SH2CFQOH.js +3391 -0
- package/chunk-SL35K7AH.js +226 -0
- package/chunk-TILFE6LV.js +381 -0
- package/chunk-TSS3XJY4.js +2052 -0
- package/chunk-U4TRT5V4.js +246 -0
- package/chunk-U6VC4MU4.js +8 -0
- package/chunk-UAD2WT54.js +64 -0
- package/chunk-UUJDGGAK.js +421 -0
- package/chunk-VF4K2QE6.js +21 -0
- package/chunk-VHBWHNVT.js +59 -0
- package/chunk-VIDPVFP3.js +20 -0
- package/chunk-VP4WJWKW.js +8882 -0
- package/chunk-W4NVOSFF.js +37 -0
- package/chunk-WKM6FH35.js +190 -0
- package/chunk-WWC7I6TA.js +8 -0
- package/chunk-X7W4TNB4.js +1550 -0
- package/chunk-XE635NI4.js +1948 -0
- package/chunk-XKIMRZO2.js +221 -0
- package/chunk-XS466O7S.js +933 -0
- package/chunk-Y5GCAMGP.js +9 -0
- package/chunk-YBWOP46I.js +3272 -0
- package/chunk-YPRZSPF3.js +148 -0
- package/chunk-YYUCRDOK.js +69 -0
- package/chunk-Z4NR32XR.js +50 -0
- package/chunk-ZIG5LJ7X.js +24765 -0
- package/chunk-ZNFJWEN4.js +56 -0
- package/chunk-ZQ2UM4KG.js +2878 -0
- package/cliExecutor-DNE7TCC4.js +36 -0
- package/clipboardy-BVE3LVEH.js +12001 -0
- package/createAgentAutomationAction-63OIP6X5.js +866 -0
- package/createDialogAction-ZLYZDYBB.js +54 -0
- package/createPageAction-AL5FSDCK.js +171 -0
- package/db-HCJ5PRB5.js +271 -0
- package/dbSlice-PR44QPXY.js +60 -0
- package/deleteFile-4SKGPHOZ.js +41 -0
- package/dialogCommands-F6YI5742.js +63 -0
- package/dialogSlice-JSBNZRLR.js +148 -0
- package/docCreateCommands-4CTO7ERT.js +219 -0
- package/docDeleteCommands-VBWERDRG.js +180 -0
- package/docReadCommands-KNP4MFYB.js +133 -0
- package/docStore-ADP5VYY4.js +98 -0
- package/docUpdateCommands-4BCBJQHA.js +317 -0
- package/fetchMessages-U6ZHN56A.js +17 -0
- package/getPricing-3E6UNPKL.js +30 -0
- package/handleSendMessageAction-IJDQ6ARA.js +185 -0
- package/index.js +188 -112943
- package/lib-FYYBQIXS.js +19839 -0
- package/localDialogRead-Z5UTAJPU.js +26 -0
- package/localFirstLog-DHNOY2NA.js +19 -0
- package/localRuntimeAuthority-TEGCOWX4.js +471 -0
- package/localRuntimeDb-LGDF6FQP.js +12 -0
- package/machineCommands-EA3M4XTN.js +779 -0
- package/machineInfo-M6KB6HZN.js +10 -0
- package/machineWsRunDispatch-NAPKE5ZA.js +110 -0
- package/memoryCommands-O4MIPIWQ.js +476 -0
- package/models-4OPOOLFS.js +9 -0
- package/offlineMarxistsAgentCommand-BCPJITJL.js +242 -0
- package/package.json +3 -25
- package/read-RIJCIVKX.js +17 -0
- package/readDocTool-GZD2N3LO.js +16 -0
- package/readlineWorkspace-KMWT4T4S.js +5509 -0
- package/removeDialogAgentAction-GJQJNDW6.js +73 -0
- package/runAgentClientLoop-U5Q6NDTJ.js +291 -0
- package/runtimeDoctorCommands-LRHLPDRC.js +289 -0
- package/setDialogExtraReferencesAction-M7OQG54N.js +60 -0
- package/setPrimaryDialogAgentAction-46UNFJDL.js +80 -0
- package/settingSlice-FVUUH4JA.js +199 -0
- package/skillSummaryMarker-42HKSXYY.js +9 -0
- package/slateToRenderMarkdown-Y5IYN73U.js +7 -0
- package/slateUtils-2M7MUTWX.js +19 -0
- package/spaceCommands-E2CFRPZJ.js +454 -0
- package/spaceSlice-L3R6IMXE.js +147 -0
- package/streamAgentChatTurn-UBDAOQWE.js +4528 -0
- package/tableCommands-GOFP7QKA.js +1286 -0
- package/toolApiClient-QI3YBNWB.js +26 -0
- package/tools-TMJXZTCA.js +85 -0
- package/tuiSummaryLlmCaller-RV3THLZF.js +78 -0
- package/understanding-GQKNDDWM.js +271 -0
- package/updateCommands-VOSPKXFF.js +31 -0
- package/updateDialogTitleAction-ZTWRDXI2.js +188 -0
|
@@ -0,0 +1,548 @@
|
|
|
1
|
+
import {
|
|
2
|
+
asTrimmedLowercaseString
|
|
3
|
+
} from "./chunk-QSJ3HFEF.js";
|
|
4
|
+
|
|
5
|
+
// packages/integrations/deepseek/models.ts
|
|
6
|
+
var deepSeekModels = [
|
|
7
|
+
{
|
|
8
|
+
name: "deepseek-v4-flash",
|
|
9
|
+
displayName: "DeepSeek V4 Flash",
|
|
10
|
+
hasVision: false,
|
|
11
|
+
contextWindow: 1e6,
|
|
12
|
+
maxOutputTokens: 384e3,
|
|
13
|
+
jsonOutput: true,
|
|
14
|
+
fnCall: true,
|
|
15
|
+
supportsTool: true,
|
|
16
|
+
supportsReasoningEffort: true,
|
|
17
|
+
price: {
|
|
18
|
+
input: 1,
|
|
19
|
+
inputCacheHit: 0.02,
|
|
20
|
+
output: 2
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: "deepseek-v4-pro",
|
|
25
|
+
displayName: "DeepSeek V4 Pro",
|
|
26
|
+
hasVision: false,
|
|
27
|
+
contextWindow: 1e6,
|
|
28
|
+
maxOutputTokens: 384e3,
|
|
29
|
+
jsonOutput: true,
|
|
30
|
+
fnCall: true,
|
|
31
|
+
supportsTool: true,
|
|
32
|
+
supportsReasoningEffort: true,
|
|
33
|
+
price: {
|
|
34
|
+
input: 3,
|
|
35
|
+
inputCacheHit: 0.1,
|
|
36
|
+
output: 6
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
];
|
|
40
|
+
|
|
41
|
+
// packages/ai/agent/liveAudioModel.ts
|
|
42
|
+
var DEFAULT_GOOGLE_LIVE_AUDIO_MODEL = "gemini-3.1-flash-live-preview";
|
|
43
|
+
|
|
44
|
+
// packages/integrations/google/models.ts
|
|
45
|
+
var GOOGLE_IMAGE_ASPECT_RATIOS = [
|
|
46
|
+
"1:1",
|
|
47
|
+
"2:3",
|
|
48
|
+
"3:2",
|
|
49
|
+
"3:4",
|
|
50
|
+
"4:3",
|
|
51
|
+
"4:5",
|
|
52
|
+
"5:4",
|
|
53
|
+
"9:16",
|
|
54
|
+
"16:9",
|
|
55
|
+
"21:9"
|
|
56
|
+
];
|
|
57
|
+
var GOOGLE_IMAGE_SIZES = ["1K", "2K", "4K"];
|
|
58
|
+
var createGoogleImageModel = ({
|
|
59
|
+
name,
|
|
60
|
+
displayName,
|
|
61
|
+
inputPrice,
|
|
62
|
+
outputPrice,
|
|
63
|
+
imageTokenPricePerMillion,
|
|
64
|
+
imageOutputTokenEstimateBySize,
|
|
65
|
+
pricePerImage,
|
|
66
|
+
maxOutputTokens,
|
|
67
|
+
contextWindow,
|
|
68
|
+
imageGenerationWaitTimeSeconds,
|
|
69
|
+
imageGenerationProfiles
|
|
70
|
+
}) => ({
|
|
71
|
+
name,
|
|
72
|
+
displayName,
|
|
73
|
+
provider: "google",
|
|
74
|
+
hasVision: true,
|
|
75
|
+
hasImageOutput: true,
|
|
76
|
+
supportsImageOutput: true,
|
|
77
|
+
supportsImageConfig: true,
|
|
78
|
+
requiresImageModalities: true,
|
|
79
|
+
defaultModalities: ["image", "text"],
|
|
80
|
+
supportedAspectRatios: GOOGLE_IMAGE_ASPECT_RATIOS,
|
|
81
|
+
supportedImageSizes: GOOGLE_IMAGE_SIZES,
|
|
82
|
+
price: {
|
|
83
|
+
input: inputPrice,
|
|
84
|
+
output: outputPrice
|
|
85
|
+
},
|
|
86
|
+
imageTokenPricePerMillion,
|
|
87
|
+
imageOutputTokenEstimateBySize,
|
|
88
|
+
pricePerImage,
|
|
89
|
+
maxOutputTokens,
|
|
90
|
+
contextWindow,
|
|
91
|
+
imageGenerationWaitTimeSeconds,
|
|
92
|
+
imageGenerationProfiles,
|
|
93
|
+
supportsTool: false
|
|
94
|
+
});
|
|
95
|
+
var googleModels = [
|
|
96
|
+
{
|
|
97
|
+
name: DEFAULT_GOOGLE_LIVE_AUDIO_MODEL,
|
|
98
|
+
displayName: "Gemini 3.1 Flash Live",
|
|
99
|
+
provider: "google",
|
|
100
|
+
description: "Gemini Live API model for low-latency real-time voice conversations.",
|
|
101
|
+
hasVision: true,
|
|
102
|
+
hasAudio: true,
|
|
103
|
+
contextWindow: 1048576,
|
|
104
|
+
maxOutputTokens: 65500,
|
|
105
|
+
supportsTool: true,
|
|
106
|
+
price: {
|
|
107
|
+
input: 0.5 * 7,
|
|
108
|
+
output: 3 * 7,
|
|
109
|
+
cachingWrite: 0.05 * 7,
|
|
110
|
+
cachingRead: 0.05 * 7
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
name: "gemini-3.6-flash",
|
|
115
|
+
displayName: "Gemini 3.6 Flash",
|
|
116
|
+
provider: "google",
|
|
117
|
+
description: "Gemini 3.6 Flash model for fast frontier agentic, coding, and multimodal tasks.",
|
|
118
|
+
hasVision: true,
|
|
119
|
+
hasAudio: true,
|
|
120
|
+
contextWindow: 1048576,
|
|
121
|
+
maxOutputTokens: 65536,
|
|
122
|
+
supportsTool: true,
|
|
123
|
+
supportsReasoningEffort: true,
|
|
124
|
+
// TODO(pricing): gemini-3.6-flash 官方定价未确认,暂沿用 3.5-flash 费率,确认后更新。
|
|
125
|
+
price: {
|
|
126
|
+
input: 1.5 * 7,
|
|
127
|
+
output: 9 * 7,
|
|
128
|
+
cachingWrite: 0.15 * 7,
|
|
129
|
+
cachingRead: 0.15 * 7
|
|
130
|
+
},
|
|
131
|
+
serviceTierPriceMultipliers: {
|
|
132
|
+
batch: { inputOutput: 0.5, cache: 0.5 },
|
|
133
|
+
flex: { inputOutput: 0.5, cache: 0.08 / 0.15 },
|
|
134
|
+
priority: { inputOutput: 1.8, cache: 1.8 }
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
createGoogleImageModel({
|
|
138
|
+
name: "gemini-3-pro-image-preview",
|
|
139
|
+
displayName: "Nano Banana Pro (Gemini 3 Pro Image Preview)",
|
|
140
|
+
inputPrice: 2 * 7,
|
|
141
|
+
outputPrice: 12 * 7,
|
|
142
|
+
imageTokenPricePerMillion: 120 * 7,
|
|
143
|
+
imageOutputTokenEstimateBySize: {
|
|
144
|
+
"1K": 1120,
|
|
145
|
+
"2K": 1120,
|
|
146
|
+
"4K": 2e3
|
|
147
|
+
},
|
|
148
|
+
maxOutputTokens: 8192,
|
|
149
|
+
contextWindow: 65536,
|
|
150
|
+
imageGenerationWaitTimeSeconds: {
|
|
151
|
+
min: 25,
|
|
152
|
+
max: 60
|
|
153
|
+
},
|
|
154
|
+
imageGenerationProfiles: [
|
|
155
|
+
{
|
|
156
|
+
key: "speed",
|
|
157
|
+
label: "\u901F\u5EA6\u4F18\u5148",
|
|
158
|
+
imageModel: "gemini-3.1-flash-image-preview",
|
|
159
|
+
waitTimeSeconds: {
|
|
160
|
+
min: 10,
|
|
161
|
+
max: 25
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
key: "quality",
|
|
166
|
+
label: "\u8D28\u91CF\u4F18\u5148",
|
|
167
|
+
imageModel: "gemini-3-pro-image-preview",
|
|
168
|
+
waitTimeSeconds: {
|
|
169
|
+
min: 25,
|
|
170
|
+
max: 60
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
]
|
|
174
|
+
}),
|
|
175
|
+
createGoogleImageModel({
|
|
176
|
+
name: "gemini-3.1-flash-image-preview",
|
|
177
|
+
displayName: "Nano Banana 2 (Gemini 3.1 Flash Image Preview)",
|
|
178
|
+
inputPrice: 0.5 * 7,
|
|
179
|
+
outputPrice: 3 * 7,
|
|
180
|
+
imageTokenPricePerMillion: 60 * 7,
|
|
181
|
+
imageOutputTokenEstimateBySize: {
|
|
182
|
+
"1K": 1120,
|
|
183
|
+
"2K": 1680,
|
|
184
|
+
"4K": 2520
|
|
185
|
+
},
|
|
186
|
+
maxOutputTokens: 65536,
|
|
187
|
+
contextWindow: 65536,
|
|
188
|
+
imageGenerationWaitTimeSeconds: {
|
|
189
|
+
min: 10,
|
|
190
|
+
max: 25
|
|
191
|
+
},
|
|
192
|
+
imageGenerationProfiles: [
|
|
193
|
+
{
|
|
194
|
+
key: "speed",
|
|
195
|
+
label: "\u901F\u5EA6\u4F18\u5148",
|
|
196
|
+
imageModel: "gemini-3.1-flash-image-preview",
|
|
197
|
+
waitTimeSeconds: {
|
|
198
|
+
min: 10,
|
|
199
|
+
max: 25
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
key: "quality",
|
|
204
|
+
label: "\u8D28\u91CF\u4F18\u5148",
|
|
205
|
+
imageModel: "gemini-3-pro-image-preview",
|
|
206
|
+
waitTimeSeconds: {
|
|
207
|
+
min: 25,
|
|
208
|
+
max: 60
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
]
|
|
212
|
+
}),
|
|
213
|
+
createGoogleImageModel({
|
|
214
|
+
name: "gemini-3.1-flash-lite-image",
|
|
215
|
+
displayName: "Nano Banana 2 Lite (Gemini 3.1 Flash Lite Image)",
|
|
216
|
+
inputPrice: 0.25 * 7,
|
|
217
|
+
outputPrice: 1.5 * 7,
|
|
218
|
+
pricePerImage: 0.034 * 7,
|
|
219
|
+
maxOutputTokens: 65536,
|
|
220
|
+
contextWindow: 65536,
|
|
221
|
+
imageGenerationWaitTimeSeconds: {
|
|
222
|
+
min: 4,
|
|
223
|
+
max: 10
|
|
224
|
+
},
|
|
225
|
+
imageGenerationProfiles: [
|
|
226
|
+
{
|
|
227
|
+
key: "speed",
|
|
228
|
+
label: "\u901F\u5EA6\u4F18\u5148",
|
|
229
|
+
imageModel: "gemini-3.1-flash-lite-image",
|
|
230
|
+
waitTimeSeconds: {
|
|
231
|
+
min: 4,
|
|
232
|
+
max: 10
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
key: "quality",
|
|
237
|
+
label: "\u8D28\u91CF\u4F18\u5148",
|
|
238
|
+
imageModel: "gemini-3-pro-image-preview",
|
|
239
|
+
waitTimeSeconds: {
|
|
240
|
+
min: 25,
|
|
241
|
+
max: 60
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
]
|
|
245
|
+
})
|
|
246
|
+
];
|
|
247
|
+
|
|
248
|
+
// packages/integrations/openai/models.ts
|
|
249
|
+
var GPT_5_5_STANDARD_PRICE = {
|
|
250
|
+
input: 5 * 8,
|
|
251
|
+
output: 30 * 8,
|
|
252
|
+
inputCacheHit: 0.5 * 8
|
|
253
|
+
};
|
|
254
|
+
var GPT_5_5_LONG_CONTEXT_PRICE = {
|
|
255
|
+
input: 10 * 8,
|
|
256
|
+
output: 45 * 8,
|
|
257
|
+
inputCacheHit: 1 * 8
|
|
258
|
+
};
|
|
259
|
+
var GPT_5_5_PRO_STANDARD_PRICE = {
|
|
260
|
+
input: 30 * 8,
|
|
261
|
+
output: 180 * 8,
|
|
262
|
+
inputCacheHit: 0
|
|
263
|
+
};
|
|
264
|
+
var GPT_5_5_PRO_LONG_CONTEXT_PRICE = {
|
|
265
|
+
input: 60 * 8,
|
|
266
|
+
output: 270 * 8,
|
|
267
|
+
inputCacheHit: 0
|
|
268
|
+
};
|
|
269
|
+
var GPT_5_6_SOL_STANDARD_PRICE = {
|
|
270
|
+
input: 5 * 8,
|
|
271
|
+
output: 30 * 8,
|
|
272
|
+
inputCacheHit: 0.5 * 8
|
|
273
|
+
};
|
|
274
|
+
var GPT_5_6_SOL_LONG_CONTEXT_PRICE = {
|
|
275
|
+
input: 10 * 8,
|
|
276
|
+
output: 45 * 8,
|
|
277
|
+
inputCacheHit: 1 * 8
|
|
278
|
+
};
|
|
279
|
+
var GPT_5_6_TERRA_STANDARD_PRICE = {
|
|
280
|
+
input: 2 * 8,
|
|
281
|
+
output: 12 * 8,
|
|
282
|
+
inputCacheHit: 0.2 * 8
|
|
283
|
+
};
|
|
284
|
+
var GPT_5_6_TERRA_LONG_CONTEXT_PRICE = {
|
|
285
|
+
input: 4 * 8,
|
|
286
|
+
output: 18 * 8,
|
|
287
|
+
inputCacheHit: 0.4 * 8
|
|
288
|
+
};
|
|
289
|
+
var GPT_5_6_LUNA_PRICE = {
|
|
290
|
+
input: 0.2 * 8,
|
|
291
|
+
output: 1.2 * 8,
|
|
292
|
+
inputCacheHit: 0.02 * 8
|
|
293
|
+
};
|
|
294
|
+
var openAIModels = [
|
|
295
|
+
{
|
|
296
|
+
name: "gpt-5.5",
|
|
297
|
+
displayName: "GPT-5.5 Standard",
|
|
298
|
+
endpointKey: "responses",
|
|
299
|
+
hasVision: true,
|
|
300
|
+
contextWindow: 1047576,
|
|
301
|
+
maxOutputTokens: 128e3,
|
|
302
|
+
supportsReasoningEffort: true,
|
|
303
|
+
price: GPT_5_5_STANDARD_PRICE,
|
|
304
|
+
pricingStrategy: {
|
|
305
|
+
type: "tiered_context",
|
|
306
|
+
tiers: [
|
|
307
|
+
{
|
|
308
|
+
minContext: 272001,
|
|
309
|
+
price: GPT_5_5_LONG_CONTEXT_PRICE
|
|
310
|
+
}
|
|
311
|
+
]
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
name: "gpt-5.6-sol",
|
|
316
|
+
displayName: "GPT-5.6 Sol (Flagship)",
|
|
317
|
+
endpointKey: "responses",
|
|
318
|
+
hasVision: true,
|
|
319
|
+
contextWindow: 105e4,
|
|
320
|
+
maxOutputTokens: 128e3,
|
|
321
|
+
supportsReasoningEffort: true,
|
|
322
|
+
price: GPT_5_6_SOL_STANDARD_PRICE,
|
|
323
|
+
pricingStrategy: {
|
|
324
|
+
type: "tiered_context",
|
|
325
|
+
tiers: [
|
|
326
|
+
{
|
|
327
|
+
minContext: 272001,
|
|
328
|
+
price: GPT_5_6_SOL_LONG_CONTEXT_PRICE
|
|
329
|
+
}
|
|
330
|
+
]
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
name: "gpt-5.6-terra",
|
|
335
|
+
displayName: "GPT-5.6 Terra (Balanced)",
|
|
336
|
+
endpointKey: "responses",
|
|
337
|
+
hasVision: true,
|
|
338
|
+
contextWindow: 105e4,
|
|
339
|
+
maxOutputTokens: 128e3,
|
|
340
|
+
supportsReasoningEffort: true,
|
|
341
|
+
price: GPT_5_6_TERRA_STANDARD_PRICE,
|
|
342
|
+
pricingStrategy: {
|
|
343
|
+
type: "tiered_context",
|
|
344
|
+
tiers: [
|
|
345
|
+
{
|
|
346
|
+
minContext: 272001,
|
|
347
|
+
price: GPT_5_6_TERRA_LONG_CONTEXT_PRICE
|
|
348
|
+
}
|
|
349
|
+
]
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
name: "gpt-5.6-luna",
|
|
354
|
+
displayName: "GPT-5.6 Luna (Fast)",
|
|
355
|
+
endpointKey: "responses",
|
|
356
|
+
hasVision: true,
|
|
357
|
+
contextWindow: 105e4,
|
|
358
|
+
maxOutputTokens: 128e3,
|
|
359
|
+
supportsReasoningEffort: true,
|
|
360
|
+
price: GPT_5_6_LUNA_PRICE
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
name: "gpt-5.5-pro",
|
|
364
|
+
displayName: "GPT-5.5 Pro",
|
|
365
|
+
endpointKey: "responses",
|
|
366
|
+
hasVision: true,
|
|
367
|
+
contextWindow: 1047576,
|
|
368
|
+
maxOutputTokens: 128e3,
|
|
369
|
+
supportsReasoningEffort: true,
|
|
370
|
+
price: GPT_5_5_PRO_STANDARD_PRICE,
|
|
371
|
+
pricingStrategy: {
|
|
372
|
+
type: "tiered_context",
|
|
373
|
+
tiers: [
|
|
374
|
+
{
|
|
375
|
+
minContext: 272001,
|
|
376
|
+
price: GPT_5_5_PRO_LONG_CONTEXT_PRICE
|
|
377
|
+
}
|
|
378
|
+
]
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
name: "gpt-image-2",
|
|
383
|
+
displayName: "GPT Image 2",
|
|
384
|
+
endpointKey: "responses",
|
|
385
|
+
hasVision: true,
|
|
386
|
+
hasImageOutput: true,
|
|
387
|
+
supportsImageOutput: true,
|
|
388
|
+
supportsTool: false,
|
|
389
|
+
contextWindow: 128e3,
|
|
390
|
+
maxOutputTokens: 32768,
|
|
391
|
+
price: { input: 5 * 8, output: 0, inputCacheHit: 1.25 * 8 },
|
|
392
|
+
pricePerImage: void 0,
|
|
393
|
+
// Dynamic cost via imageTokenPricePerMillion and quality/size
|
|
394
|
+
imageTokenPricePerMillion: 30 * 8,
|
|
395
|
+
// $30.00 per 1M output tokens
|
|
396
|
+
// Official GPT Image 2 output estimates from the OpenAI image guide:
|
|
397
|
+
// low/medium/high cost by size divided by $30 per 1M output tokens.
|
|
398
|
+
imageOutputTokenEstimateBySize: {
|
|
399
|
+
"1K": { low: 200, medium: 1766, high: 7033 },
|
|
400
|
+
"2K": { low: 166, medium: 1366, high: 5500 },
|
|
401
|
+
"4K": { low: 166, medium: 1366, high: 5500 }
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
];
|
|
405
|
+
|
|
406
|
+
// packages/ai/llm/openrouterModels.ts
|
|
407
|
+
var OPENROUTER_MODELS = [];
|
|
408
|
+
var openrouterModels = OPENROUTER_MODELS;
|
|
409
|
+
|
|
410
|
+
// packages/ai/llm/deepinfra.ts
|
|
411
|
+
var deepinfraModels = [
|
|
412
|
+
{
|
|
413
|
+
name: "anthropic/claude-haiku-4-5",
|
|
414
|
+
displayName: "Anthropic: Claude Haiku 4.5",
|
|
415
|
+
hasVision: true,
|
|
416
|
+
price: {
|
|
417
|
+
input: 1 * 9,
|
|
418
|
+
output: 5 * 9
|
|
419
|
+
},
|
|
420
|
+
contextWindow: 195e3,
|
|
421
|
+
maxOutputTokens: 4092,
|
|
422
|
+
supportsTool: false
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
name: "anthropic/claude-sonnet-5",
|
|
426
|
+
displayName: "Anthropic: Claude Sonnet 5",
|
|
427
|
+
hasVision: true,
|
|
428
|
+
price: {
|
|
429
|
+
input: 3 * 9,
|
|
430
|
+
output: 15 * 9
|
|
431
|
+
},
|
|
432
|
+
contextWindow: 976e3,
|
|
433
|
+
maxOutputTokens: 4092,
|
|
434
|
+
supportsTool: false
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
name: "anthropic/claude-opus-4-8",
|
|
438
|
+
displayName: "Anthropic: Claude Opus 4.8",
|
|
439
|
+
hasVision: true,
|
|
440
|
+
price: {
|
|
441
|
+
input: 5 * 9,
|
|
442
|
+
output: 25 * 9
|
|
443
|
+
},
|
|
444
|
+
contextWindow: 976e3,
|
|
445
|
+
maxOutputTokens: 4092,
|
|
446
|
+
supportsTool: false
|
|
447
|
+
}
|
|
448
|
+
];
|
|
449
|
+
|
|
450
|
+
// packages/integrations/xai/models.ts
|
|
451
|
+
var xaiModels = [
|
|
452
|
+
{
|
|
453
|
+
name: "grok-4.5",
|
|
454
|
+
displayName: "Grok 4.5",
|
|
455
|
+
hasVision: true,
|
|
456
|
+
contextWindow: 5e5,
|
|
457
|
+
price: { input: 2 * 7, output: 6 * 7 },
|
|
458
|
+
// $2/$6 per MTok × 7
|
|
459
|
+
fnCall: true,
|
|
460
|
+
jsonOutput: true
|
|
461
|
+
}
|
|
462
|
+
];
|
|
463
|
+
|
|
464
|
+
// packages/ai/llm/fireworks.ts
|
|
465
|
+
var fireworksModels = [
|
|
466
|
+
{
|
|
467
|
+
name: "accounts/fireworks/models/minimax-m3",
|
|
468
|
+
displayName: "MiniMax: MiniMax M3",
|
|
469
|
+
hasVision: true,
|
|
470
|
+
price: {
|
|
471
|
+
input: 0.3 * 8,
|
|
472
|
+
output: 1.2 * 8,
|
|
473
|
+
cachingRead: 0.06 * 8
|
|
474
|
+
},
|
|
475
|
+
contextWindow: 512e3,
|
|
476
|
+
supportsTool: true
|
|
477
|
+
}
|
|
478
|
+
];
|
|
479
|
+
|
|
480
|
+
// packages/ai/llm/cloudflare.ts
|
|
481
|
+
var getCloudflareWorkersAiChatCompletionsUrl = (accountId = process.env.CLOUDFLARE_ACCOUNT_ID?.trim()) => {
|
|
482
|
+
if (!accountId) {
|
|
483
|
+
throw new Error(
|
|
484
|
+
"CLOUDFLARE_ACCOUNT_ID is required for Cloudflare Workers AI chat completions"
|
|
485
|
+
);
|
|
486
|
+
}
|
|
487
|
+
return `https://api.cloudflare.com/client/v4/accounts/${accountId}/ai/v1/chat/completions`;
|
|
488
|
+
};
|
|
489
|
+
var cloudflareModels = [];
|
|
490
|
+
|
|
491
|
+
// packages/ai/llm/gmi.ts
|
|
492
|
+
var GMI_CHAT_COMPLETIONS_URL = "https://api.gmi-serving.com/v1/chat/completions";
|
|
493
|
+
var gmiModels = [];
|
|
494
|
+
|
|
495
|
+
// packages/ai/llm/zai.ts
|
|
496
|
+
var zaiModels = [];
|
|
497
|
+
|
|
498
|
+
// packages/ai/llm/kimi.ts
|
|
499
|
+
var PLATFORM_HOSTED_KIMI_K3_MODEL = "kimi-k3";
|
|
500
|
+
var PLATFORM_HOSTED_KIMI_K26_MODEL = "kimi-k2.6";
|
|
501
|
+
var PLATFORM_HOSTED_KIMI_K27_CODE_MODEL = "kimi-k2.7-code";
|
|
502
|
+
var OLLAMA_CLOUD_KIMI_K3_MODEL = PLATFORM_HOSTED_KIMI_K3_MODEL;
|
|
503
|
+
var OLLAMA_CLOUD_KIMI_K26_MODEL = PLATFORM_HOSTED_KIMI_K26_MODEL;
|
|
504
|
+
var OLLAMA_CLOUD_KIMI_K27_CODE_MODEL = PLATFORM_HOSTED_KIMI_K27_CODE_MODEL;
|
|
505
|
+
var PLATFORM_HOSTED_KIMI_PROVIDER = "nolo";
|
|
506
|
+
var LEGACY_OLLAMA_CLOUD_PROVIDER = "ollama-cloud";
|
|
507
|
+
var isNoloHostedProvider = (provider) => {
|
|
508
|
+
const normalized = asTrimmedLowercaseString(provider);
|
|
509
|
+
return normalized === PLATFORM_HOSTED_KIMI_PROVIDER || normalized === LEGACY_OLLAMA_CLOUD_PROVIDER;
|
|
510
|
+
};
|
|
511
|
+
var FIREWORKS_KIMI_LATEST_MODEL = "accounts/fireworks/models/kimi-latest";
|
|
512
|
+
var FIREWORKS_KIMI_CURRENT_MODEL = "accounts/fireworks/models/kimi-k2p7-code";
|
|
513
|
+
var FIREWORKS_KIMI_K2P6_MODEL = "accounts/fireworks/models/kimi-k2p6";
|
|
514
|
+
var DEEPINFRA_KIMI_FALLBACK_MODEL = "moonshotai/Kimi-K2.6";
|
|
515
|
+
var isFireworksKimiModel = (model) => model === FIREWORKS_KIMI_LATEST_MODEL || model === FIREWORKS_KIMI_CURRENT_MODEL || model === FIREWORKS_KIMI_K2P6_MODEL;
|
|
516
|
+
var isDeepInfraKimiModel = (model) => model === DEEPINFRA_KIMI_FALLBACK_MODEL;
|
|
517
|
+
var resolveFireworksKimiModel = (model) => {
|
|
518
|
+
if (model === FIREWORKS_KIMI_LATEST_MODEL) {
|
|
519
|
+
return FIREWORKS_KIMI_CURRENT_MODEL;
|
|
520
|
+
}
|
|
521
|
+
return model ?? "";
|
|
522
|
+
};
|
|
523
|
+
|
|
524
|
+
export {
|
|
525
|
+
deepSeekModels,
|
|
526
|
+
googleModels,
|
|
527
|
+
openAIModels,
|
|
528
|
+
openrouterModels,
|
|
529
|
+
deepinfraModels,
|
|
530
|
+
xaiModels,
|
|
531
|
+
fireworksModels,
|
|
532
|
+
PLATFORM_HOSTED_KIMI_K3_MODEL,
|
|
533
|
+
PLATFORM_HOSTED_KIMI_K26_MODEL,
|
|
534
|
+
PLATFORM_HOSTED_KIMI_K27_CODE_MODEL,
|
|
535
|
+
OLLAMA_CLOUD_KIMI_K3_MODEL,
|
|
536
|
+
OLLAMA_CLOUD_KIMI_K26_MODEL,
|
|
537
|
+
OLLAMA_CLOUD_KIMI_K27_CODE_MODEL,
|
|
538
|
+
PLATFORM_HOSTED_KIMI_PROVIDER,
|
|
539
|
+
isNoloHostedProvider,
|
|
540
|
+
isFireworksKimiModel,
|
|
541
|
+
isDeepInfraKimiModel,
|
|
542
|
+
resolveFireworksKimiModel,
|
|
543
|
+
getCloudflareWorkersAiChatCompletionsUrl,
|
|
544
|
+
cloudflareModels,
|
|
545
|
+
GMI_CHAT_COMPLETIONS_URL,
|
|
546
|
+
gmiModels,
|
|
547
|
+
zaiModels
|
|
548
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// packages/connector-experimental/codexBinary.ts
|
|
2
|
+
import { copyFileSync, existsSync, mkdirSync } from "node:fs";
|
|
3
|
+
import { homedir } from "node:os";
|
|
4
|
+
import { dirname, join } from "node:path";
|
|
5
|
+
var WINDOWS_APPS_CODEX_PATTERN = /\\WindowsApps\\OpenAI\.Codex_[^\\]+\\app\\resources$/i;
|
|
6
|
+
function pathEntries(env) {
|
|
7
|
+
return (env.PATH ?? process.env.PATH ?? "").split(process.platform === "win32" ? ";" : ":");
|
|
8
|
+
}
|
|
9
|
+
function findWindowsAppsCodex(env) {
|
|
10
|
+
if (process.platform !== "win32") return "";
|
|
11
|
+
for (const entry of pathEntries(env)) {
|
|
12
|
+
if (!WINDOWS_APPS_CODEX_PATTERN.test(entry)) continue;
|
|
13
|
+
const candidate = join(entry, "codex.exe");
|
|
14
|
+
if (existsSync(candidate)) return candidate;
|
|
15
|
+
}
|
|
16
|
+
return "";
|
|
17
|
+
}
|
|
18
|
+
function copyCodexToUserBin(source, env) {
|
|
19
|
+
const target = env.NOLO_CODEX_SHIM_PATH ?? join(homedir(), ".nolo", "bin", "codex.exe");
|
|
20
|
+
if (existsSync(target)) return target;
|
|
21
|
+
mkdirSync(dirname(target), { recursive: true });
|
|
22
|
+
copyFileSync(source, target);
|
|
23
|
+
return target;
|
|
24
|
+
}
|
|
25
|
+
function resolveLaunchableCodexCommand(env = process.env) {
|
|
26
|
+
const explicit = env.NOLO_CODEX_BIN?.trim();
|
|
27
|
+
if (explicit) return explicit;
|
|
28
|
+
const windowsAppsCodex = findWindowsAppsCodex(env);
|
|
29
|
+
if (windowsAppsCodex) return copyCodexToUserBin(windowsAppsCodex, env);
|
|
30
|
+
return "codex";
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export {
|
|
34
|
+
resolveLaunchableCodexCommand
|
|
35
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// packages/core/clipHeadAndTail.ts
|
|
2
|
+
import { writeFileSync, mkdirSync } from "node:fs";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import { tmpdir } from "node:os";
|
|
5
|
+
function clipHeadAndTail(rawContent, options = {}) {
|
|
6
|
+
const maxHeadBytes = options.maxHeadBytes ?? 1e3;
|
|
7
|
+
const maxTailBytes = options.maxTailBytes ?? 2500;
|
|
8
|
+
const maxTotalBytes = options.maxTotalBytes ?? 4e3;
|
|
9
|
+
const originalBytes = Buffer.byteLength(rawContent, "utf8");
|
|
10
|
+
if (originalBytes <= maxTotalBytes) {
|
|
11
|
+
return { content: rawContent, clipped: false, originalBytes };
|
|
12
|
+
}
|
|
13
|
+
const buf = Buffer.from(rawContent, "utf8");
|
|
14
|
+
let headEnd = Math.min(maxHeadBytes, buf.length);
|
|
15
|
+
while (headEnd > 0 && (buf[headEnd] & 192) === 128) {
|
|
16
|
+
headEnd--;
|
|
17
|
+
}
|
|
18
|
+
let tailStart = Math.max(0, buf.length - maxTailBytes);
|
|
19
|
+
while (tailStart < buf.length && (buf[tailStart] & 192) === 128) {
|
|
20
|
+
tailStart++;
|
|
21
|
+
}
|
|
22
|
+
if (tailStart < headEnd) {
|
|
23
|
+
tailStart = headEnd;
|
|
24
|
+
}
|
|
25
|
+
const headStr = buf.toString("utf8", 0, headEnd);
|
|
26
|
+
const tailStr = buf.toString("utf8", tailStart, buf.length);
|
|
27
|
+
const elidedBytes = Math.max(0, originalBytes - headEnd - (buf.length - tailStart));
|
|
28
|
+
let logPath = void 0;
|
|
29
|
+
if (options.saveTempLog !== false) {
|
|
30
|
+
try {
|
|
31
|
+
const dir = join(tmpdir(), "nolo-tool-logs");
|
|
32
|
+
mkdirSync(dir, { recursive: true });
|
|
33
|
+
const safeId = (options.toolCallId || `tool-${Date.now()}`).replace(/[^a-zA-Z0-9_-]/g, "_");
|
|
34
|
+
logPath = join(dir, `${safeId}.log`);
|
|
35
|
+
writeFileSync(logPath, rawContent, "utf8");
|
|
36
|
+
} catch {
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
const logHint = logPath ? ` Full output saved to ${logPath}` : "";
|
|
40
|
+
const notice = `
|
|
41
|
+
|
|
42
|
+
[... truncated ${elidedBytes} bytes.${logHint}]
|
|
43
|
+
|
|
44
|
+
`;
|
|
45
|
+
return {
|
|
46
|
+
content: `${headStr}${notice}${tailStr}`,
|
|
47
|
+
clipped: true,
|
|
48
|
+
logPath,
|
|
49
|
+
originalBytes
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export {
|
|
54
|
+
clipHeadAndTail
|
|
55
|
+
};
|