nolo-cli 0.82.0-alpha.6 → 0.82.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/{_executeModel-225YRU52.js → _executeModel-MA3D2J4W.js} +48 -48
- package/{action-D22U6CTH.js → action-YVYQEAAV.js} +11 -11
- package/{addContentAction-XAPUTGL4.js → addContentAction-O7R66HEX.js} +9 -9
- package/{addDialogAgentAction-M7VLLBZM.js → addDialogAgentAction-74OA7KYP.js} +8 -8
- package/{agentDeleteCommand-ZJNQGVR2.js → agentDeleteCommand-FHUJH5X4.js} +31 -29
- package/{agentEmailCommands-VLVWFWX2.js → agentEmailCommands-KNYBWNMA.js} +67 -63
- package/{agentGrantCommands-R3VQEZJR.js → agentGrantCommands-M3XFO6EN.js} +2 -2
- package/{agentListCommands-GHQGLAUU.js → agentListCommands-GATRXEMT.js} +40 -32
- package/{agentMachineCommands-QDXYENZJ.js → agentMachineCommands-N62I3D5Q.js} +31 -29
- package/{agentProviderCommands-65ZC2WB4.js → agentProviderCommands-GNPTL5XR.js} +87 -0
- package/{agentPullCommand-N7L2CT7L.js → agentPullCommand-O5MPVJ5E.js} +3 -3
- package/agentRecordCommands-GOC5K27T.js +128 -0
- package/{agentRunCommand-YSCD65HH.js → agentRunCommand-JP2U3MQF.js} +65 -61
- package/{agentRunControl-T44MESII.js → agentRunControl-AVJR4JW4.js} +2 -2
- package/{agentRuntimeLocal-ZOHB7OOO.js → agentRuntimeLocal-VXZSDIGT.js} +27 -25
- package/{agentSlice-O2SBU5TK.js → agentSlice-65ETD734.js} +10 -10
- package/{appDeleteCommands-PRT6K5N2.js → appDeleteCommands-PDZ7HQYH.js} +31 -29
- package/{appDeployCommands-63ZONFAN.js → appDeployCommands-KLLW32YA.js} +31 -29
- package/{appDeployStatusCommands-AFAYCVR3.js → appDeployStatusCommands-IPNJ445T.js} +31 -29
- package/{appGetCommands-TNZDZE36.js → appGetCommands-QA57XGXS.js} +31 -29
- package/{appListCommands-IA4SPG2X.js → appListCommands-YBTAUFZS.js} +31 -29
- package/{authCommand-EVGFLAHO.js → authCommand-F4EFRRX6.js} +164 -24
- package/{authCommands-ILTBI6JV.js → authCommands-RGOGCPP6.js} +4 -5
- package/builtinSkillRegistry-FUAVTRVZ.js +33 -0
- package/{chatQueueReduxAdapter-4SM3DAWX.js → chatQueueReduxAdapter-5QOW43T4.js} +24 -24
- package/{chromeCommands-VOIRNJBL.js → chromeCommands-FZYAU75D.js} +1 -1
- package/{chromeOpsCommands-M7DPCX2T.js → chromeOpsCommands-62P2Q2YB.js} +31 -1
- package/{chunk-C3FZR5EC.js → chunk-2F7RJC6L.js} +1 -1
- package/{chunk-A3NNC2LA.js → chunk-2FA3ITSX.js} +1235 -59
- package/{chunk-HQUORJTM.js → chunk-3BMYXEUW.js} +1 -1
- package/{chunk-3QPYFHAH.js → chunk-3DII57IT.js} +1 -1
- package/{chunk-NTW5GWDM.js → chunk-3VNWWVKB.js} +2 -0
- package/{chunk-DWUCB2A3.js → chunk-42V6BK2E.js} +1 -1
- package/{chunk-DSRXPQWA.js → chunk-4OEFYTWL.js} +43 -43
- package/{chunk-GBPZKFYK.js → chunk-53HEEOTT.js} +4 -4
- package/{chunk-KIS76A2P.js → chunk-5H7KJX7J.js} +38 -4
- package/{chunk-5XTOKQLW.js → chunk-5UTFL4QJ.js} +6 -2
- package/chunk-5ZUL4CUO.js +10 -0
- package/{chunk-E6RGHPDR.js → chunk-6D6VBVEW.js} +4 -6
- package/{chunk-CMH2SYHX.js → chunk-6OZ36FXI.js} +2 -2
- package/{chunk-HHLTFENG.js → chunk-6VFARHZW.js} +907 -317
- package/{chunk-NRALD3CC.js → chunk-76WEAXJB.js} +49 -10
- package/{chunk-BYEJ7K2Z.js → chunk-7S4YWN7P.js} +1 -1
- package/{chunk-SREASRV5.js → chunk-ABQYVJBJ.js} +1 -1
- package/chunk-ACTMNVHM.js +93 -0
- package/{chunk-3W2JJOH3.js → chunk-AD2L6YCC.js} +3 -3
- package/{chunk-XWNRAIUL.js → chunk-AFUORTY4.js} +6 -16
- package/{chunk-WL2RKIBF.js → chunk-BLJWCTRL.js} +1 -1
- package/chunk-BNGW5ASC.js +344 -0
- package/{chunk-SZLVDREM.js → chunk-BP4XNZRM.js} +3 -3
- package/{chunk-2KDR4CWE.js → chunk-BYMV6QZG.js} +24 -1
- package/{chunk-5LSS6MFZ.js → chunk-D2QT5FW4.js} +13 -15
- package/{chunk-MYU3MJCF.js → chunk-DHDMC6FO.js} +175 -7
- package/{chunk-SO7B7NW3.js → chunk-DHDVZFNC.js} +413 -62
- package/{chunk-E36HZARC.js → chunk-DNCEALKX.js} +93 -17
- package/{chunk-EXMHJN7C.js → chunk-EYAQT56M.js} +4 -3
- package/{chunk-CJCJF5XB.js → chunk-FDTR4QJ6.js} +4 -2
- package/{chunk-YSKEOTPH.js → chunk-FSX24MR3.js} +155 -795
- package/{chunk-NJ6WLAPS.js → chunk-FUUHG5LT.js} +1 -1
- package/{chunk-EM6MPSEI.js → chunk-GABFWSOQ.js} +52 -30
- package/{chunk-PYXL2CJL.js → chunk-GPCZ7UXG.js} +1 -1
- package/{chunk-K7AG465Q.js → chunk-GQBOR3G6.js} +4 -2
- package/{chunk-FP27MNSX.js → chunk-GZBATRJA.js} +3 -3
- package/{chunk-YFADVSZE.js → chunk-H62HCIUP.js} +6 -6
- package/{chunk-PZM3EENV.js → chunk-HJUYAD4A.js} +1 -1
- package/{chunk-3JQ2NRYU.js → chunk-HVURBGF3.js} +4 -4
- package/{chunk-HH65VA5U.js → chunk-I3TQJXQ7.js} +109 -6
- package/{chunk-ZVN6I33J.js → chunk-IIVGDG4I.js} +6 -5
- package/{chunk-UDQWGU7F.js → chunk-J4MOO56S.js} +1 -1
- package/{chunk-KC5FAHVS.js → chunk-JEDZAO7L.js} +1 -1
- package/{chunk-6XIE5ZGI.js → chunk-JPGCXHNM.js} +1 -1
- package/chunk-JRQFUXY7.js +1625 -0
- package/chunk-KQ4ONNQD.js +677 -0
- package/{chunk-CPSZJBLK.js → chunk-L5UXH3B2.js} +105 -26
- package/{chunk-RXX4GDIH.js → chunk-LS2ZANRJ.js} +1 -1
- package/{chunk-BJIRLHJR.js → chunk-M2EJHDJP.js} +4 -0
- package/{chunk-EVBFYPDC.js → chunk-MC4XLIJ7.js} +6 -2
- package/{chunk-6SD5OPQ4.js → chunk-N2WELJE7.js} +11 -173
- package/{chunk-UJ63UXGE.js → chunk-OIVSQH2O.js} +1006 -801
- package/{chunk-4UW2LDVA.js → chunk-PELKTR62.js} +15 -15
- package/{chunk-AETZ7AD6.js → chunk-Q554LLSI.js} +1 -1
- package/chunk-Q5FJJ6XI.js +103 -0
- package/{chunk-AJHEFRGJ.js → chunk-Q67DOFOO.js} +214 -5
- package/{chunk-UZ6XXCVR.js → chunk-QDSINZM3.js} +15 -2
- package/{chunk-D6XYLSOS.js → chunk-QIAVMDHY.js} +1 -1
- package/{chunk-YWG6EMH3.js → chunk-RG6JBBX5.js} +10 -6
- package/{chunk-QCZX4FTW.js → chunk-SH43IESU.js} +173 -15
- package/{chunk-FNGAF7C4.js → chunk-SNPMM7H3.js} +137 -12
- package/{chunk-SPAQ4PVV.js → chunk-SV5IJK6K.js} +1 -1
- package/{chunk-KVDUCO4Q.js → chunk-TDRTS7QW.js} +16 -12
- package/{chunk-BJCWNHVU.js → chunk-TOP2VXOR.js} +2 -2
- package/{chunk-Q46HQOW3.js → chunk-TVYSVSA2.js} +7 -7
- package/{chunk-4EJ5QYB5.js → chunk-UKZDAFYT.js} +1 -1
- package/{chunk-YXLXHIT2.js → chunk-UY2NBS4V.js} +6 -6
- package/{chunk-PGSKWZCB.js → chunk-UZGQNTVW.js} +1 -1
- package/{chunk-73IOJLK2.js → chunk-V4I3A7DR.js} +10 -10
- package/{chunk-ZZCJUXUI.js → chunk-V4MJDUSR.js} +2 -2
- package/{chunk-JYYZCK2Z.js → chunk-V7E4PXQD.js} +1 -1
- package/{chunk-OZX2IPKM.js → chunk-VLTIYV3X.js} +1 -1
- package/{chunk-NHRQCXIQ.js → chunk-VMFTFOWF.js} +13 -3
- package/{chunk-5J7W2VWW.js → chunk-WV42OMV7.js} +6 -265
- package/{chunk-DUJWWUGV.js → chunk-YQTQQX2H.js} +1 -1
- package/{chunk-BOYUESO7.js → chunk-Z77CRGTW.js} +1 -1
- package/{chunk-QC5LGHYP.js → chunk-ZCYXJSTU.js} +10 -5
- package/{chunk-LSZXYE64.js → chunk-ZMD2CQFC.js} +759 -80
- package/{contentThunks-ENAVF2YU.js → contentThunks-Y6FA2TCW.js} +25 -25
- package/{cooldownCommands-BSCH2W7P.js → cooldownCommands-REAWYVTY.js} +2 -2
- package/{createAgentAutomationAction-CH6BYC7K.js → createAgentAutomationAction-JXAFQO5V.js} +25 -25
- package/{createDialogAction-23UDOXSO.js → createDialogAction-O2QABXZF.js} +28 -28
- package/{createPageAction-J6AEMLHK.js → createPageAction-GUQDPKO5.js} +26 -26
- package/{dbSlice-GKGGFNOB.js → dbSlice-XVWBAGYN.js} +8 -8
- package/{deleteFile-LWSR674W.js → deleteFile-YG6QMJLU.js} +3 -3
- package/{dialogCommands-BJJGCCQR.js → dialogCommands-JJDASFIL.js} +35 -31
- package/{dialogSlice-F7RD6PUY.js → dialogSlice-J2YJNE6E.js} +24 -24
- package/{docCreateCommands-53GB2FU3.js → docCreateCommands-OB3X3EQM.js} +32 -30
- package/{docDeleteCommands-TAW5JEBU.js → docDeleteCommands-WMHRGF22.js} +33 -31
- package/{docReadCommands-F5N7N5E3.js → docReadCommands-NWGGLIAZ.js} +32 -30
- package/{docStore-WX4YBGXC.js → docStore-6KKYKAGQ.js} +9 -9
- package/{docUpdateCommands-YQ7TRT35.js → docUpdateCommands-3DDSOLPS.js} +32 -30
- package/{fetchMessages-DRABNDPZ.js → fetchMessages-EIU7UFFK.js} +3 -4
- package/{getPricing-HRMSOF3E.js → getPricing-LUSEABA6.js} +4 -4
- package/{handleSendMessageAction-CW4LULIR.js → handleSendMessageAction-A4XLEEPU.js} +24 -24
- package/index.js +102 -85
- package/{localDialogRead-PUQKFI73.js → localDialogRead-BTFJ4V2I.js} +2 -2
- package/{localRuntimeDb-P37ZTX55.js → localRuntimeDb-SYQGUF4U.js} +1 -1
- package/{machineCommands-FIYWY5EU.js → machineCommands-Y64KAIRW.js} +64 -60
- package/{machineWsRunDispatch-KQ4OFFNR.js → machineWsRunDispatch-M366L2LJ.js} +62 -58
- package/{memberThunks-KATHH3F4.js → memberThunks-QGFLFVCI.js} +9 -9
- package/{models-GS72DVJS.js → models-T3SG6MJ5.js} +2 -2
- package/{offlineMarxistsAgentCommand-GEH6SNNA.js → offlineMarxistsAgentCommand-HGXZV4XJ.js} +1 -1
- package/package.json +1 -1
- package/providerPresetApply-FG6NZ57W.js +214 -0
- package/providerRegistry-757OWH3O.js +31 -0
- package/{read-LC6HVYBN.js → read-COE3ZYR6.js} +5 -4
- package/{readDocTool-N3ERJHHF.js → readDocTool-5USN4A6V.js} +1 -1
- package/{readlineWorkspace-QYI6BRNA.js → readlineWorkspace-45XNHFXU.js} +144 -108
- package/{removeDialogAgentAction-F5GPTALR.js → removeDialogAgentAction-IX3MN2ZO.js} +11 -11
- package/{runAgentClientLoop-GZ5VUGAW.js → runAgentClientLoop-ADZRHNG6.js} +47 -47
- package/{runtimeDoctorCommands-CROTMULY.js → runtimeDoctorCommands-X6WDBEQX.js} +2 -2
- package/{setDialogExtraReferencesAction-AY4ZCF3A.js → setDialogExtraReferencesAction-X4HCPNZL.js} +9 -9
- package/{setPrimaryDialogAgentAction-HPMG7V3R.js → setPrimaryDialogAgentAction-4GMIQLOD.js} +11 -11
- package/{settingSlice-OEJA4NQO.js → settingSlice-ZQZVUPKK.js} +10 -10
- package/{spaceCommands-IYMIXCMC.js → spaceCommands-E7MQ4VU2.js} +30 -28
- package/{streamAgentChatTurn-EAXIUJTK.js → streamAgentChatTurn-TUP7YO3H.js} +59 -58
- package/{switchDialogAgentAction-HMDZTZ4I.js → switchDialogAgentAction-N52LRPA3.js} +8 -8
- package/{tableCommands-SUNTHAYX.js → tableCommands-O6NWHFKV.js} +1 -1
- package/{toolApiClient-VGYUB4P5.js → toolApiClient-QVJ6HDNN.js} +2 -2
- package/{tools-QWQOW6J4.js → tools-2VDNDFET.js} +43 -43
- package/tuiSummaryLlmCaller-WFRWERGK.js +127 -0
- package/{updateCommands-Y363MC3L.js → updateCommands-2M74UL7P.js} +2 -2
- package/{updateDialogTitleAction-2HCE2M7S.js → updateDialogTitleAction-KSWXWWFT.js} +45 -28
- package/agentRecordCommands-AQFYM5HS.js +0 -124
- package/chunk-3IT2PFHL.js +0 -611
- package/chunk-I42VC5KR.js +0 -15
- package/chunk-NG4UT4K4.js +0 -79
- package/codingSkills-E6KSDNSJ.js +0 -48
- package/tuiSummaryLlmCaller-3Z24VUWM.js +0 -116
- package/{chunk-3RAG2NAD.js → chunk-UKWGR5SS.js} +3 -3
- package/{db-VQSAOWAO.js → db-WK5MDZVN.js} +1 -1
- package/{localRuntimeAuthority-R5UBODT3.js → localRuntimeAuthority-6IR6BBXE.js} +3 -3
|
@@ -19,6 +19,7 @@ ${input}`;
|
|
|
19
19
|
}
|
|
20
20
|
let jsonStr;
|
|
21
21
|
try {
|
|
22
|
+
JSON.stringify(input);
|
|
22
23
|
const serialized = JSON.stringify(input, null, 2);
|
|
23
24
|
if (serialized === void 0) {
|
|
24
25
|
return task;
|
|
@@ -43,6 +44,7 @@ function calculateDelegatedPayloadMetrics(task, input, delegatedContent) {
|
|
|
43
44
|
serializedInputForTokens = input;
|
|
44
45
|
} else {
|
|
45
46
|
try {
|
|
47
|
+
JSON.stringify(input);
|
|
46
48
|
const serialized = JSON.stringify(input, null, 2);
|
|
47
49
|
if (serialized !== void 0) {
|
|
48
50
|
inputChars = serialized.length;
|
|
@@ -1,25 +1,61 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeTimingMs
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DNCEALKX.js";
|
|
4
4
|
import {
|
|
5
5
|
MODEL_LOOKUP_MAP
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-OIVSQH2O.js";
|
|
7
7
|
import {
|
|
8
8
|
ALL_MODELS
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ACTMNVHM.js";
|
|
10
|
+
import {
|
|
11
|
+
asTrimmedNonEmptyStringArray
|
|
12
|
+
} from "./chunk-VMFTFOWF.js";
|
|
10
13
|
import {
|
|
11
14
|
asOptionalFiniteNumber
|
|
12
15
|
} from "./chunk-WWC7I6TA.js";
|
|
13
|
-
import {
|
|
14
|
-
asTrimmedNonEmptyStringArray
|
|
15
|
-
} from "./chunk-I42VC5KR.js";
|
|
16
16
|
import {
|
|
17
17
|
BUILTIN_NOLO_AGENT_KEY
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-BNGW5ASC.js";
|
|
19
19
|
import {
|
|
20
20
|
asOptionalTrimmedString
|
|
21
21
|
} from "./chunk-G3SUCT4W.js";
|
|
22
22
|
|
|
23
|
+
// packages/ai/token/cacheTokenFields.ts
|
|
24
|
+
var finiteTokenCount = (value) => {
|
|
25
|
+
if (typeof value !== "number" || !Number.isFinite(value)) return void 0;
|
|
26
|
+
return Math.max(0, Math.floor(value));
|
|
27
|
+
};
|
|
28
|
+
var readNested = (value, path) => {
|
|
29
|
+
let cursor = value;
|
|
30
|
+
for (const key of path) {
|
|
31
|
+
if (!cursor || typeof cursor !== "object") return void 0;
|
|
32
|
+
cursor = cursor[key];
|
|
33
|
+
}
|
|
34
|
+
return finiteTokenCount(cursor);
|
|
35
|
+
};
|
|
36
|
+
var firstPositive = (usage, readers) => {
|
|
37
|
+
for (const read of readers) {
|
|
38
|
+
const value = read(usage);
|
|
39
|
+
if (value !== void 0 && value !== 0) return value;
|
|
40
|
+
}
|
|
41
|
+
return 0;
|
|
42
|
+
};
|
|
43
|
+
var topLevel = (field) => (usage) => {
|
|
44
|
+
if (!usage || typeof usage !== "object") return void 0;
|
|
45
|
+
return finiteTokenCount(usage[field]);
|
|
46
|
+
};
|
|
47
|
+
var nested = (path) => (usage) => readNested(usage, path);
|
|
48
|
+
var readCacheReadInputTokens = (usage) => firstPositive(usage, [
|
|
49
|
+
topLevel("cache_read_input_tokens"),
|
|
50
|
+
topLevel("prompt_cache_hit_tokens"),
|
|
51
|
+
nested(["input_tokens_details", "cached_tokens"]),
|
|
52
|
+
nested(["prompt_tokens_details", "cached_tokens"])
|
|
53
|
+
]);
|
|
54
|
+
var readCacheCreationInputTokens = (usage) => firstPositive(usage, [
|
|
55
|
+
topLevel("cache_creation_input_tokens"),
|
|
56
|
+
topLevel("prompt_cache_miss_tokens")
|
|
57
|
+
]);
|
|
58
|
+
|
|
23
59
|
// packages/ai/llm/getModelContextWindow.ts
|
|
24
60
|
var DEFAULT_CONTEXT_WINDOW = 256e3;
|
|
25
61
|
var QWEN_3_6_CONTEXT_WINDOW = 262144;
|
|
@@ -157,42 +193,6 @@ var getModelInfo = (modelName) => {
|
|
|
157
193
|
return map.get(modelName) || map.get(modelName.toLowerCase()) || null;
|
|
158
194
|
};
|
|
159
195
|
|
|
160
|
-
// packages/ai/token/cacheTokenFields.ts
|
|
161
|
-
var finiteTokenCount = (value) => {
|
|
162
|
-
if (typeof value !== "number" || !Number.isFinite(value)) return void 0;
|
|
163
|
-
return Math.max(0, Math.floor(value));
|
|
164
|
-
};
|
|
165
|
-
var readNested = (value, path) => {
|
|
166
|
-
let cursor = value;
|
|
167
|
-
for (const key of path) {
|
|
168
|
-
if (!cursor || typeof cursor !== "object") return void 0;
|
|
169
|
-
cursor = cursor[key];
|
|
170
|
-
}
|
|
171
|
-
return finiteTokenCount(cursor);
|
|
172
|
-
};
|
|
173
|
-
var firstPositive = (usage, readers) => {
|
|
174
|
-
for (const read of readers) {
|
|
175
|
-
const value = read(usage);
|
|
176
|
-
if (value !== void 0 && value !== 0) return value;
|
|
177
|
-
}
|
|
178
|
-
return 0;
|
|
179
|
-
};
|
|
180
|
-
var topLevel = (field) => (usage) => {
|
|
181
|
-
if (!usage || typeof usage !== "object") return void 0;
|
|
182
|
-
return finiteTokenCount(usage[field]);
|
|
183
|
-
};
|
|
184
|
-
var nested = (path) => (usage) => readNested(usage, path);
|
|
185
|
-
var readCacheReadInputTokens = (usage) => firstPositive(usage, [
|
|
186
|
-
topLevel("cache_read_input_tokens"),
|
|
187
|
-
topLevel("prompt_cache_hit_tokens"),
|
|
188
|
-
nested(["input_tokens_details", "cached_tokens"]),
|
|
189
|
-
nested(["prompt_tokens_details", "cached_tokens"])
|
|
190
|
-
]);
|
|
191
|
-
var readCacheCreationInputTokens = (usage) => firstPositive(usage, [
|
|
192
|
-
topLevel("cache_creation_input_tokens"),
|
|
193
|
-
topLevel("prompt_cache_miss_tokens")
|
|
194
|
-
]);
|
|
195
|
-
|
|
196
196
|
// packages/ai/token/normalizeUsage.ts
|
|
197
197
|
var normalizeStringArray = (value) => {
|
|
198
198
|
if (!Array.isArray(value)) return void 0;
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
getAntigravityUserAgent,
|
|
12
12
|
normalizeAntigravityTokenPayload,
|
|
13
13
|
refreshAntigravityToken
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-UZGQNTVW.js";
|
|
15
15
|
import {
|
|
16
16
|
writeOAuthCredential
|
|
17
17
|
} from "./chunk-ONXOABJR.js";
|
|
@@ -21,12 +21,12 @@ import {
|
|
|
21
21
|
import {
|
|
22
22
|
asOptionalFiniteNumber
|
|
23
23
|
} from "./chunk-WWC7I6TA.js";
|
|
24
|
-
import {
|
|
25
|
-
asTrimmedString
|
|
26
|
-
} from "./chunk-3EUW3WEO.js";
|
|
27
24
|
import {
|
|
28
25
|
isRecord
|
|
29
26
|
} from "./chunk-KUG52IAP.js";
|
|
27
|
+
import {
|
|
28
|
+
asTrimmedString
|
|
29
|
+
} from "./chunk-3EUW3WEO.js";
|
|
30
30
|
|
|
31
31
|
// packages/cli/oauth/callback-server.ts
|
|
32
32
|
import { createServer } from "node:http";
|
|
@@ -1,19 +1,25 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isDevinOAuthAgent
|
|
3
|
+
} from "./chunk-5ZUL4CUO.js";
|
|
4
|
+
import {
|
|
5
|
+
getModelContextWindow
|
|
6
|
+
} from "./chunk-4OEFYTWL.js";
|
|
1
7
|
import {
|
|
2
8
|
findModelConfig,
|
|
3
9
|
getProviderByModelName
|
|
4
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-OIVSQH2O.js";
|
|
5
11
|
import {
|
|
6
12
|
asOptionalFiniteNumber
|
|
7
13
|
} from "./chunk-WWC7I6TA.js";
|
|
8
14
|
import {
|
|
9
15
|
asTrimmedLowercaseString
|
|
10
16
|
} from "./chunk-QSJ3HFEF.js";
|
|
11
|
-
import {
|
|
12
|
-
asTrimmedString
|
|
13
|
-
} from "./chunk-3EUW3WEO.js";
|
|
14
17
|
import {
|
|
15
18
|
isRecord
|
|
16
19
|
} from "./chunk-KUG52IAP.js";
|
|
20
|
+
import {
|
|
21
|
+
asTrimmedString
|
|
22
|
+
} from "./chunk-3EUW3WEO.js";
|
|
17
23
|
import {
|
|
18
24
|
asOptionalTrimmedString
|
|
19
25
|
} from "./chunk-G3SUCT4W.js";
|
|
@@ -120,6 +126,33 @@ async function stripImagePartsForTextOnlyAgent(messages, agentConfig) {
|
|
|
120
126
|
return { messages: !supportsVision && hasImages ? stripImagePartsFromMessages(messages) : messages };
|
|
121
127
|
}
|
|
122
128
|
|
|
129
|
+
// packages/agent-runtime/devin/devinChannelWindows.ts
|
|
130
|
+
var DEVIN_CHANNEL_CONTEXT_WINDOWS = {
|
|
131
|
+
// SWE-2 家族(catalog 无裸 swe-2 selector;旧点号/裸写法如 swe-2、
|
|
132
|
+
// swe-1.7 实测均 permission_denied,已不是可用 selector)。
|
|
133
|
+
"swe-2-max": 262e3,
|
|
134
|
+
"swe-2-high": 262e3,
|
|
135
|
+
"swe-2-medium": 262e3,
|
|
136
|
+
// SWE-1.7 家族。
|
|
137
|
+
"swe-1-7": 262e3,
|
|
138
|
+
"swe-1-7-medium": 262e3,
|
|
139
|
+
"swe-1-7-lightning": 202752,
|
|
140
|
+
// SWE-1.6 家族(免费档默认)。
|
|
141
|
+
"swe-1-6": 2e5,
|
|
142
|
+
"swe-1-6-fast": 2e5,
|
|
143
|
+
// 经 devin 通道转售、且与厂商原生窗口不同的模型(catalog 枚举型 selector)。
|
|
144
|
+
"MODEL_GPT_5_2_LOW": 384e3,
|
|
145
|
+
"MODEL_GPT_5_2_MEDIUM": 384e3,
|
|
146
|
+
"MODEL_GPT_5_2_HIGH": 384e3,
|
|
147
|
+
"MODEL_GPT_5_2_XHIGH": 384e3
|
|
148
|
+
};
|
|
149
|
+
var devinChannelContextWindow = (model) => {
|
|
150
|
+
const raw = model?.trim();
|
|
151
|
+
if (!raw) return void 0;
|
|
152
|
+
return DEVIN_CHANNEL_CONTEXT_WINDOWS[raw];
|
|
153
|
+
};
|
|
154
|
+
var resolveAgentContextWindow = (agent) => (isDevinOAuthAgent(agent) ? devinChannelContextWindow(agent.model) : void 0) ?? getModelContextWindow(agent.model ?? "");
|
|
155
|
+
|
|
123
156
|
// packages/agent-runtime/agentRecordConfig.ts
|
|
124
157
|
function stringField(record, key) {
|
|
125
158
|
const value = record[key];
|
|
@@ -540,6 +573,7 @@ export {
|
|
|
540
573
|
resolveHistoricalToolContentCap,
|
|
541
574
|
projectToolMessageContent,
|
|
542
575
|
clipToolText,
|
|
576
|
+
resolveAgentContextWindow,
|
|
543
577
|
resolveAgentRuntimeConfigFromRecord,
|
|
544
578
|
buildDesktopAgentRuntimeAgentConfigSnapshot,
|
|
545
579
|
buildDesktopAgentRuntimeDialogHistorySnapshot,
|
|
@@ -18,9 +18,13 @@ var CORE_DRAINING_MAX_ATTEMPTS = 30;
|
|
|
18
18
|
var RETRYABLE_HTTP_STATUSES = /* @__PURE__ */ new Set([429, 503]);
|
|
19
19
|
function isTransientFetchError(error) {
|
|
20
20
|
const message = toErrorMessage(error);
|
|
21
|
-
return /certificate|handshake|network|socket|timed out|timeout|ECONNRESET/i.test(
|
|
21
|
+
return /certificate|handshake|network|socket|timed out|timeout|ECONNRESET|UND_ERR_SOCKET|other side closed/i.test(
|
|
22
22
|
message
|
|
23
|
-
)
|
|
23
|
+
) || // undici(Node fetch)连接中途被断开时抛 `TypeError: terminated`,message
|
|
24
|
+
// 就是裸的 "terminated"(真实 cause 是 UND_ERR_SOCKET)。只认「整条就是
|
|
25
|
+
// terminated」或「前缀: terminated」这种形态,避免把 access_terminated_error
|
|
26
|
+
// (配额封禁)或 "process was terminated by signal" 误判成可重试的网络抖动。
|
|
27
|
+
/(?:^|:\s*)terminated$/i.test(message.trim());
|
|
24
28
|
}
|
|
25
29
|
async function defaultSleep(ms) {
|
|
26
30
|
await new Promise((resolve) => setTimeout(resolve, ms));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// packages/agent-runtime/devinOAuthPure.ts
|
|
2
|
+
function isDevinOAuthAgent(agent) {
|
|
3
|
+
const ref = agent.apiKeyRef?.trim().toLowerCase();
|
|
4
|
+
const prov = agent.provider?.trim().toLowerCase();
|
|
5
|
+
return ref === "devin" || prov === "devin";
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export {
|
|
9
|
+
isDevinOAuthAgent
|
|
10
|
+
};
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-ESHYE7WU.js";
|
|
4
4
|
import {
|
|
5
5
|
getDefaultCliLocalRuntimeDb
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2F7RJC6L.js";
|
|
7
7
|
import {
|
|
8
8
|
buildCliRuntimeEnv,
|
|
9
9
|
clearProfileAuthToken,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
getProfileTokens,
|
|
13
13
|
loadProfileConfig,
|
|
14
14
|
saveDefaultProfile
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-BYMV6QZG.js";
|
|
16
16
|
import {
|
|
17
17
|
resolveAuthTokenFromEnv
|
|
18
18
|
} from "./chunk-A7GB5UGH.js";
|
|
@@ -20,14 +20,12 @@ import {
|
|
|
20
20
|
DEFAULT_NOLO_SERVER_URL
|
|
21
21
|
} from "./chunk-OLZBQWZU.js";
|
|
22
22
|
import {
|
|
23
|
+
asTrimmedNonEmptyStringArray,
|
|
23
24
|
createMemoryKey,
|
|
24
25
|
createMemoryOwnerIndexKey,
|
|
25
26
|
createMemorySubjectKindIndexKey,
|
|
26
27
|
memoryOwnerRange
|
|
27
|
-
} from "./chunk-
|
|
28
|
-
import {
|
|
29
|
-
asTrimmedNonEmptyStringArray
|
|
30
|
-
} from "./chunk-I42VC5KR.js";
|
|
28
|
+
} from "./chunk-VMFTFOWF.js";
|
|
31
29
|
import {
|
|
32
30
|
asTrimmedString
|
|
33
31
|
} from "./chunk-3EUW3WEO.js";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
resolvePlatformChatCompletionsEndpoint,
|
|
4
4
|
resolvePlatformHostedCredentialProvider,
|
|
5
5
|
resolvePlatformResponsesEndpoint
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GQBOR3G6.js";
|
|
7
7
|
import {
|
|
8
8
|
CLI_PROVIDER_VALUES
|
|
9
9
|
} from "./chunk-W7XHHYWM.js";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
CLIENT_VERSION_TOO_OLD_CODE,
|
|
12
12
|
buildClientVersionGateErrorDetail,
|
|
13
13
|
evaluatePlatformHostedClientVersionGate
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-Q67DOFOO.js";
|
|
15
15
|
import {
|
|
16
16
|
asTrimmedLowercaseString
|
|
17
17
|
} from "./chunk-QSJ3HFEF.js";
|