nolo-cli 0.33.0-alpha.3 → 0.33.0-alpha.31
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-RWPVI3YV.js → _executeModel-BTZJ6QKO.js} +56 -58
- package/{action-SMLG6OTB.js → action-LKQAGKHH.js} +11 -11
- package/{addContentAction-SFO244QN.js → addContentAction-IP2B6UUB.js} +9 -9
- package/{addDialogAgentAction-W44ZCEHB.js → addDialogAgentAction-JNIAUFE6.js} +8 -8
- package/{agentDeleteCommand-KU2RXQPP.js → agentDeleteCommand-WG6T4OTP.js} +48 -44
- package/{agentEmailCommands-MPCMDENS.js → agentEmailCommands-4CEZD4JW.js} +83 -80
- package/{agentListCommands-EPD4N6FX.js → agentListCommands-2YHWZHLD.js} +56 -43
- package/{agentMachineCommands-AF7C3YRT.js → agentMachineCommands-LKCUIDHA.js} +46 -42
- package/agentProviderCommands-65ZC2WB4.js +122 -0
- package/{agentPullCommand-YH5GEBK4.js → agentPullCommand-NYHSK6EW.js} +3 -3
- package/{agentRecordCommands-EYE6MZZG.js → agentRecordCommands-VSBYJUBN.js} +74 -71
- package/{agentRunCommand-LL22SGTN.js → agentRunCommand-LAD7TRWT.js} +80 -76
- package/{agentRuntimeLocal-JX34G47Z.js → agentRuntimeLocal-TEJECMTH.js} +34 -31
- package/{agentSlice-TNMFQQOV.js → agentSlice-3U3H657P.js} +11 -11
- package/{appDeleteCommands-43K5VXQB.js → appDeleteCommands-5QCUYGTX.js} +41 -37
- package/{appDeployCommands-FEEJSVDZ.js → appDeployCommands-GMIAIMDB.js} +41 -37
- package/{appDeployStatusCommands-H76CG45R.js → appDeployStatusCommands-ZTJ6APB6.js} +41 -37
- package/{appGetCommands-MDZYFTYZ.js → appGetCommands-PI4NTPKT.js} +41 -37
- package/{appListCommands-TUJJXPWG.js → appListCommands-QMRCLRJ6.js} +41 -37
- package/{authCommand-T7UK4CWS.js → authCommand-4ICNA46V.js} +21 -20
- package/{authCommands-EAPFGNHN.js → authCommands-W74NRPA6.js} +6 -6
- package/{chatQueueReduxAdapter-LVQXC4ZY.js → chatQueueReduxAdapter-5GNVXJ5T.js} +25 -24
- package/{chunk-JZ5AMMXU.js → chunk-244YJUYS.js} +4 -4
- package/{chunk-2UECQ7RE.js → chunk-3AOLVADY.js} +1 -1
- package/{chunk-AFV4FOT2.js → chunk-3GDKZAPT.js} +4 -91
- package/{chunk-M4NC7NF6.js → chunk-3H3FPUCI.js} +2 -2
- package/chunk-3Z32AD6X.js +22 -0
- package/{chunk-B2BSG6QQ.js → chunk-4EXK5Q2M.js} +18 -18
- package/{chunk-UK5JGQVU.js → chunk-52DHSNJC.js} +14 -20
- package/{chunk-LOD75GOS.js → chunk-6PI2635O.js} +3884 -1562
- package/{chunk-HDKRSRYU.js → chunk-7CH6ONWB.js} +636 -210
- package/{chunk-FMEVI5TG.js → chunk-7CH6U3FL.js} +1 -1
- package/{chunk-FSSX3XRY.js → chunk-7URTEFXJ.js} +1 -1
- package/{chunk-JTSGWTYZ.js → chunk-ASA3CJSG.js} +2 -2
- package/{chunk-6SXC35F4.js → chunk-AXCXE35O.js} +13 -13
- package/{chunk-2QTEYCR7.js → chunk-C2UKEL7P.js} +17 -7
- package/{chunk-I6N2UVVY.js → chunk-CBYBNR2K.js} +1 -1
- package/{chunk-WHD6BG7M.js → chunk-DMOWI2S7.js} +48 -44
- package/{chunk-3GZXL6FM.js → chunk-DZPK4YQY.js} +1 -1
- package/{chunk-6HYVJV7B.js → chunk-ESHYE7WU.js} +2 -1
- package/{chunk-TFPUAELY.js → chunk-ET4UZQN3.js} +3 -3
- package/{chunk-3WXRAHCG.js → chunk-EU7POTD4.js} +3 -3
- package/{chunk-DPMBNHOJ.js → chunk-FAMAQ3A7.js} +1 -1
- package/{chunk-JZPBVBIY.js → chunk-FD36SCCD.js} +19 -8
- package/{chunk-57QJXIB6.js → chunk-FEDK54U6.js} +10 -10
- package/{chunk-MPZJVZDC.js → chunk-FL3KRU3X.js} +41 -2674
- package/{chunk-ZURFOV5J.js → chunk-FS5VNMPF.js} +3 -3
- package/{chunk-2H3XIBY4.js → chunk-FSOCQPX7.js} +4 -82
- package/{chunk-M2YMQOLC.js → chunk-G34SHBSK.js} +11 -11
- package/{chunk-U4TRT5V4.js → chunk-GEPHJJW4.js} +1 -1
- package/{chunk-OIQPORYI.js → chunk-GN6ENM54.js} +178 -2
- package/{chunk-X664KVEV.js → chunk-HHBXCRJS.js} +204 -123
- package/chunk-HJ23CUHW.js +109 -0
- package/{chunk-RAZOLMJR.js → chunk-HXV5GJFC.js} +15 -8
- package/{chunk-OR2HNLVO.js → chunk-HYQSSY7V.js} +71 -79
- package/{chunk-WLH5BAKX.js → chunk-IIOHYLIG.js} +9 -4
- package/{chunk-2IVEXF7P.js → chunk-ISQZFROX.js} +2 -9
- package/{chunk-IHEC7VBF.js → chunk-J36P3SH5.js} +1 -1
- package/{chunk-PREQU5QV.js → chunk-J5STUEYU.js} +1 -1
- package/{chunk-O6GEBMIY.js → chunk-JE4J3T7A.js} +5296 -4981
- package/{chunk-VH2F7ZB6.js → chunk-JG43PNFR.js} +1 -1
- package/{chunk-GTYM4HKV.js → chunk-JZ6JDSWD.js} +5 -5
- package/{chunk-X2DAEZ3X.js → chunk-KWPXU3W5.js} +1 -1
- package/{chunk-WJSW43QZ.js → chunk-L3JWI7WX.js} +0 -1
- package/{chunk-NNWHHCVP.js → chunk-LI6SNQF6.js} +2 -3
- package/{chunk-GM6PU7B6.js → chunk-MEYIRKDN.js} +0 -1
- package/{chunk-Q5ITEGIN.js → chunk-N4XRDM26.js} +1 -1
- package/{chunk-7E72JMBB.js → chunk-N543Q3VR.js} +57 -16
- package/{chunk-YDTYDA5W.js → chunk-NBIS3WYT.js} +8 -6
- package/{chunk-JMPYDFHY.js → chunk-NI72ISCU.js} +21 -8
- package/{chunk-5CS33IBL.js → chunk-NQ4N4IGO.js} +11 -12
- package/chunk-OH4Q4VVA.js +38 -0
- package/{chunk-CLP2K7U4.js → chunk-OS63QEVB.js} +7 -7
- package/{chunk-DFUPZE6V.js → chunk-P35OZHD4.js} +3 -16
- package/{chunk-GMXWYXAF.js → chunk-PJT3CCBL.js} +4 -4
- package/{chunk-3VAQHAXT.js → chunk-PYLC3472.js} +27 -27
- package/{chunk-ADLYMQB6.js → chunk-QUK7UZW7.js} +137 -0
- package/{chunk-37V5LNEQ.js → chunk-RRYRKT7X.js} +1 -1
- package/{chunk-AAGCMVFT.js → chunk-S6QP3AK4.js} +895 -175
- package/{chunk-73GINUCW.js → chunk-SQPMYIR5.js} +135 -56
- package/{chunk-XCCGU6QB.js → chunk-SSK4QDFL.js} +1 -1
- package/{chunk-IL545V3E.js → chunk-TACRGJZO.js} +7 -7
- package/chunk-TVXJEOU2.js +78 -0
- package/{chunk-NUO3QFWD.js → chunk-UNHKVD2N.js} +1 -1
- package/{chunk-GE6IWA5N.js → chunk-UNZDCI3O.js} +126 -1
- package/chunk-UOLENXLQ.js +1132 -0
- package/{chunk-5SBK2MTI.js → chunk-UOVE5ZHK.js} +24 -71
- package/{chunk-ZJMME4DS.js → chunk-VBJVODPE.js} +6 -6
- package/{chunk-FXFGNOT2.js → chunk-VFVCYIRQ.js} +1 -1
- package/{chunk-AOXVOC6D.js → chunk-W2DNU6FK.js} +3 -3
- package/chunk-X6WFECZY.js +97 -0
- package/{chunk-RY57GLGW.js → chunk-YPREESF4.js} +42 -5
- package/{chunk-HUCT7HID.js → chunk-YXB5JR6N.js} +1 -1
- package/{chunk-BQXOGBFN.js → chunk-YZ2WE6CW.js} +2 -2
- package/{cliExecutor-DW3PHGEL.js → cliExecutor-BBUVQU4L.js} +2 -2
- package/{codingSkills-DY5MINPG.js → codingSkills-FXKII4C6.js} +3 -3
- package/{createAgentAutomationAction-INQT23LX.js → createAgentAutomationAction-CMOMDO6G.js} +25 -26
- package/{createDialogAction-LDCPDI73.js → createDialogAction-QG7DKUA7.js} +28 -29
- package/{createPageAction-5YXOG2M4.js → createPageAction-JCMCNMTK.js} +30 -31
- package/{dbSlice-3SD5L5H2.js → dbSlice-ZNHRC4BK.js} +8 -8
- package/{deleteFile-XQXPBFFB.js → deleteFile-NPZ64DFN.js} +5 -5
- package/{dialogCommands-CHJO47AX.js → dialogCommands-T43TTFWR.js} +40 -36
- package/{dialogSlice-DOWKOILN.js → dialogSlice-5VZFBHCA.js} +24 -23
- package/{docCreateCommands-OVZARUFX.js → docCreateCommands-DQBKKPOC.js} +42 -38
- package/{docDeleteCommands-E2XJ62LD.js → docDeleteCommands-ULM4MTP3.js} +43 -39
- package/{docReadCommands-I7OSREPJ.js → docReadCommands-3FXTVWVJ.js} +42 -38
- package/{docStore-UAWSKZ2Y.js → docStore-LTAGA6XZ.js} +26 -27
- package/{docUpdateCommands-X4Z26VJM.js → docUpdateCommands-ZE6B3SLE.js} +44 -40
- package/emscripten-module-EDQBMDVK.js +576 -0
- package/emscripten-module-LCBQ7VWY.js +1506 -0
- package/emscripten-module-OFHQ7EL3.js +482 -0
- package/emscripten-module-XM7NDJQA.js +4536 -0
- package/fetchMessages-7QRCCRYK.js +1 -1
- package/ffi-6ZSX3QJ4.js +80 -0
- package/ffi-742Y76PE.js +92 -0
- package/ffi-AEYWSYLM.js +80 -0
- package/ffi-KQC27OUM.js +92 -0
- package/{getPricing-L2ENXWHV.js → getPricing-5R7P4JLI.js} +4 -4
- package/{handleSendMessageAction-C3TSDWKH.js → handleSendMessageAction-7GF5IU4J.js} +26 -25
- package/index.js +78 -76
- package/{localRuntimeAuthority-E3R24J4T.js → localRuntimeAuthority-S77B5QVB.js} +6 -2
- package/{localRuntimeDb-DDZCJFQZ.js → localRuntimeDb-N3H3HQ7G.js} +1 -1
- package/{machineCommands-BUOIYJAD.js → machineCommands-57UG5TRO.js} +84 -81
- package/{machineInfo-M6KB6HZN.js → machineInfo-66ZFUMLE.js} +1 -1
- package/{machineWsRunDispatch-7CRWAA6O.js → machineWsRunDispatch-L3GQ7ASL.js} +72 -69
- package/{models-OX2S5C6Q.js → models-CQOLEOPZ.js} +2 -2
- package/module-ES6BEMUI-AFCVSBMS.js +14 -0
- package/module-asyncify-2EFITU5U-DEP2F2QP.js +9 -0
- package/package.json +1 -1
- package/{read-6G73BMEY.js → read-QOLSHOT5.js} +6 -6
- package/{readDocTool-DK4EI2GA.js → readDocTool-X7HLXXBW.js} +1 -1
- package/{readlineWorkspace-ZDWEASJV.js → readlineWorkspace-SFUQOD4C.js} +3746 -3155
- package/{removeDialogAgentAction-E7H557UO.js → removeDialogAgentAction-UBYX7RVR.js} +12 -12
- package/{runAgentClientLoop-U7HYA3O5.js → runAgentClientLoop-VCTFHJVP.js} +53 -54
- package/{runtimeDoctorCommands-KIKM6BIO.js → runtimeDoctorCommands-HT4O2PXL.js} +6 -6
- package/{setDialogExtraReferencesAction-RMMGBR5F.js → setDialogExtraReferencesAction-GMXZTTQA.js} +9 -9
- package/{setPrimaryDialogAgentAction-FWBKKLVA.js → setPrimaryDialogAgentAction-JKVEILI3.js} +12 -12
- package/{settingSlice-73PV4KG4.js → settingSlice-EQKEXSTU.js} +10 -10
- package/{skillDiscovery-KLLKXPUO.js → skillDiscovery-6YSTRCQ7.js} +3 -3
- package/{slateUtils-VO2FU36K.js → slateUtils-RIZES3PV.js} +1 -1
- package/{spaceCommands-GEWZXGHM.js → spaceCommands-3PVSEEGH.js} +235 -46
- package/{spaceSlice-B6MOVY4N.js → spaceSlice-OEBVDZGG.js} +25 -26
- package/{streamAgentChatTurn-T527EQTT.js → streamAgentChatTurn-YLUPK5CI.js} +107 -120
- package/{switchDialogAgentAction-US6QNL3N.js → switchDialogAgentAction-DSC2T3JW.js} +8 -8
- package/{chunk-IDAU4UFS.js → syncMapping-N6RGXGBW.js} +11 -11
- package/{tableCommands-QE47K72R.js → tableCommands-SQSOF2XK.js} +9 -9
- package/{tools-XMWCVMPM.js → tools-IZUS4UM5.js} +41 -42
- package/{tuiSummaryLlmCaller-NCAJSVSD.js → tuiSummaryLlmCaller-ZFPTFGXJ.js} +17 -16
- package/{updateCommands-AK2RDOFR.js → updateCommands-MNDUIKN7.js} +2 -2
- package/{updateDialogTitleAction-XPJZRJEL.js → updateDialogTitleAction-BB53DOCT.js} +31 -32
- package/chunk-6PO2SYCS.js +0 -1800
- package/chunk-M3JEW6N6.js +0 -193
- package/syncMapping-RK2MANUX.js +0 -43
- package/{agentGrantCommands-2LEZDADN.js → agentGrantCommands-OPIGFRDO.js} +2 -2
- package/{chunk-ZHYK3N56.js → chunk-G7HTVVFL.js} +3 -3
- package/{chunk-SAQQLJZ5.js → chunk-JDSUTNYY.js} +3 -3
- package/{offlineMarxistsAgentCommand-GEH6SNNA.js → offlineMarxistsAgentCommand-HDIQVGKN.js} +3 -3
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
buildSkillDiscoveryLayer
|
|
3
|
-
} from "./chunk-2UECQ7RE.js";
|
|
4
1
|
import {
|
|
5
2
|
load
|
|
6
3
|
} from "./chunk-KHCLMKZZ.js";
|
|
4
|
+
import {
|
|
5
|
+
buildSkillDiscoveryLayer
|
|
6
|
+
} from "./chunk-3AOLVADY.js";
|
|
7
7
|
|
|
8
8
|
// packages/agent-runtime/skillDiscovery.ts
|
|
9
9
|
import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
|
|
@@ -1,87 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MODEL_LOOKUP_MAP
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-P35OZHD4.js";
|
|
4
4
|
import {
|
|
5
5
|
ALL_MODELS
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-C2UKEL7P.js";
|
|
7
7
|
import {
|
|
8
|
-
PUBLIC_DEEPSEEK_V4_FLASH_AGENT_KEY
|
|
9
|
-
|
|
10
|
-
builtinRuntimeFallbackEntries,
|
|
11
|
-
isBuiltinPlatformAgentKey
|
|
12
|
-
} from "./chunk-UK5JGQVU.js";
|
|
13
|
-
import {
|
|
14
|
-
parsePublicAgentId,
|
|
15
|
-
publicAgentKey
|
|
16
|
-
} from "./chunk-BJIRLHJR.js";
|
|
17
|
-
|
|
18
|
-
// packages/agent-runtime/builtinPlatformAgentConfigs.ts
|
|
19
|
-
function buildConfig(e) {
|
|
20
|
-
const key = publicAgentKey(e.id);
|
|
21
|
-
const rawRecord = {
|
|
22
|
-
dbKey: key,
|
|
23
|
-
isPublic: true,
|
|
24
|
-
provider: e.provider,
|
|
25
|
-
model: e.model,
|
|
26
|
-
apiSource: e.apiSource ?? "platform",
|
|
27
|
-
useServerProxy: e.useServerProxy ?? true
|
|
28
|
-
};
|
|
29
|
-
if (e.hasImageOutput) rawRecord.hasImageOutput = true;
|
|
30
|
-
if (e.imageModel) rawRecord.imageModel = e.imageModel;
|
|
31
|
-
if (e.imageWorkflow) rawRecord.imageWorkflow = e.imageWorkflow;
|
|
32
|
-
if (e.imageConfig) rawRecord.imageConfig = e.imageConfig;
|
|
33
|
-
return {
|
|
34
|
-
key,
|
|
35
|
-
name: e.name,
|
|
36
|
-
provider: e.provider,
|
|
37
|
-
model: e.model,
|
|
38
|
-
apiSource: e.apiSource ?? "platform",
|
|
39
|
-
useServerProxy: e.useServerProxy ?? true,
|
|
40
|
-
rawRecord
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
var BUILTIN_PLATFORM_AGENT_CONFIGS = Object.fromEntries(
|
|
44
|
-
builtinRuntimeFallbackEntries().map((e) => [publicAgentKey(e.id), buildConfig(e)])
|
|
45
|
-
);
|
|
46
|
-
function resolveBuiltinPlatformAgentConfig(agentRef) {
|
|
47
|
-
return BUILTIN_PLATFORM_AGENT_CONFIGS[agentRef] ?? null;
|
|
48
|
-
}
|
|
49
|
-
function resolveBuiltinPlatformAgentRecord(agentRef) {
|
|
50
|
-
const config = resolveBuiltinPlatformAgentConfig(agentRef);
|
|
51
|
-
if (!config) return null;
|
|
52
|
-
return {
|
|
53
|
-
...config.rawRecord,
|
|
54
|
-
dbKey: agentRef,
|
|
55
|
-
...config.name ? { name: config.name } : {}
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
function resolveBuiltinAgentRuntimeFields(agentKey) {
|
|
59
|
-
if (!isBuiltinPlatformAgentKey(agentKey)) return null;
|
|
60
|
-
const entry = builtinAgentCatalogEntryById(parsePublicAgentId(agentKey));
|
|
61
|
-
if (!entry) return null;
|
|
62
|
-
return { provider: entry.provider, model: entry.model };
|
|
63
|
-
}
|
|
64
|
-
function applyBuiltinAgentRuntimeOverride(agentKey, record) {
|
|
65
|
-
const fields = resolveBuiltinAgentRuntimeFields(agentKey);
|
|
66
|
-
if (!fields) return record;
|
|
67
|
-
const current = record;
|
|
68
|
-
const rawNeedsOverride = current.rawRecord != null && (current.rawRecord.provider !== fields.provider || current.rawRecord.model !== fields.model);
|
|
69
|
-
if (current.provider === fields.provider && current.model === fields.model && !rawNeedsOverride) {
|
|
70
|
-
return record;
|
|
71
|
-
}
|
|
72
|
-
return {
|
|
73
|
-
...record,
|
|
74
|
-
provider: fields.provider,
|
|
75
|
-
model: fields.model,
|
|
76
|
-
...current.rawRecord ? {
|
|
77
|
-
rawRecord: {
|
|
78
|
-
...current.rawRecord,
|
|
79
|
-
provider: fields.provider,
|
|
80
|
-
model: fields.model
|
|
81
|
-
}
|
|
82
|
-
} : {}
|
|
83
|
-
};
|
|
84
|
-
}
|
|
8
|
+
PUBLIC_DEEPSEEK_V4_FLASH_AGENT_KEY
|
|
9
|
+
} from "./chunk-52DHSNJC.js";
|
|
85
10
|
|
|
86
11
|
// packages/ai/llm/getModelContextWindow.ts
|
|
87
12
|
var DEFAULT_CONTEXT_WINDOW = 256e3;
|
|
@@ -228,9 +153,6 @@ var DEFAULT_AUTO_EXECUTION_PROFILE = AUTO_EXECUTION_PROFILES[DEFAULT_AUTO_EXECUT
|
|
|
228
153
|
var resolveAutoExecutionProfile = (tier) => AUTO_EXECUTION_PROFILES[tier ?? DEFAULT_AUTO_EXECUTION_TIER] ?? DEFAULT_AUTO_EXECUTION_PROFILE;
|
|
229
154
|
|
|
230
155
|
export {
|
|
231
|
-
resolveBuiltinPlatformAgentConfig,
|
|
232
|
-
resolveBuiltinPlatformAgentRecord,
|
|
233
|
-
applyBuiltinAgentRuntimeOverride,
|
|
234
156
|
DEFAULT_CONTEXT_WINDOW,
|
|
235
157
|
getModelContextWindow,
|
|
236
158
|
getModelInfo,
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
listUserRecordsFromServers,
|
|
8
8
|
readDbRecordFromServers,
|
|
9
9
|
readLiveDbRecordAfterTombstoneMerge
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-J36P3SH5.js";
|
|
11
11
|
import {
|
|
12
12
|
buildDialogAttachmentPlan,
|
|
13
13
|
extractFileContentIds
|
|
@@ -18,14 +18,6 @@ import {
|
|
|
18
18
|
import {
|
|
19
19
|
toErrorMessage
|
|
20
20
|
} from "./chunk-HNMXYYJR.js";
|
|
21
|
-
import {
|
|
22
|
-
parseUserIdFromAuthToken,
|
|
23
|
-
readOption,
|
|
24
|
-
resolveAuthToken,
|
|
25
|
-
resolveDeleteServerCandidates,
|
|
26
|
-
resolveServerCandidates,
|
|
27
|
-
resolveServerUrl
|
|
28
|
-
} from "./chunk-A7GB5UGH.js";
|
|
29
21
|
import {
|
|
30
22
|
parsePositiveFiniteNumberOrFallback
|
|
31
23
|
} from "./chunk-Y5GCAMGP.js";
|
|
@@ -39,12 +31,20 @@ import {
|
|
|
39
31
|
import {
|
|
40
32
|
isLevelNotFoundError
|
|
41
33
|
} from "./chunk-OW765XBU.js";
|
|
34
|
+
import {
|
|
35
|
+
isRecord
|
|
36
|
+
} from "./chunk-KUG52IAP.js";
|
|
42
37
|
import {
|
|
43
38
|
asTrimmedString
|
|
44
39
|
} from "./chunk-3EUW3WEO.js";
|
|
45
40
|
import {
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
parseUserIdFromAuthToken,
|
|
42
|
+
readOption,
|
|
43
|
+
resolveAuthToken,
|
|
44
|
+
resolveDeleteServerCandidates,
|
|
45
|
+
resolveServerCandidates,
|
|
46
|
+
resolveServerUrl
|
|
47
|
+
} from "./chunk-A7GB5UGH.js";
|
|
48
48
|
import {
|
|
49
49
|
asOptionalTrimmedString
|
|
50
50
|
} from "./chunk-G3SUCT4W.js";
|
|
@@ -194,7 +194,7 @@ function readCliAuthorityDriver(env) {
|
|
|
194
194
|
function resolveCliAuthorityRunDir(options = {}) {
|
|
195
195
|
return path.join(resolveNoloHome({
|
|
196
196
|
...options,
|
|
197
|
-
env: options.env ??
|
|
197
|
+
env: options.env ?? process.env
|
|
198
198
|
}), "run");
|
|
199
199
|
}
|
|
200
200
|
function hashString(value) {
|
|
@@ -1,16 +1,125 @@
|
|
|
1
|
+
import {
|
|
2
|
+
findModelConfig,
|
|
3
|
+
getProviderByModelName
|
|
4
|
+
} from "./chunk-P35OZHD4.js";
|
|
1
5
|
import {
|
|
2
6
|
asOptionalFiniteNumber
|
|
3
7
|
} from "./chunk-WWC7I6TA.js";
|
|
4
8
|
import {
|
|
5
|
-
|
|
6
|
-
} from "./chunk-
|
|
9
|
+
asTrimmedLowercaseString
|
|
10
|
+
} from "./chunk-QSJ3HFEF.js";
|
|
7
11
|
import {
|
|
8
12
|
isRecord
|
|
9
13
|
} from "./chunk-KUG52IAP.js";
|
|
14
|
+
import {
|
|
15
|
+
asTrimmedString
|
|
16
|
+
} from "./chunk-3EUW3WEO.js";
|
|
10
17
|
import {
|
|
11
18
|
asOptionalTrimmedString
|
|
12
19
|
} from "./chunk-G3SUCT4W.js";
|
|
13
20
|
|
|
21
|
+
// packages/ai/llm/agentCapabilities.ts
|
|
22
|
+
var ANTIGRAVITY_EFFORT_SUFFIXES = [
|
|
23
|
+
"-tiered",
|
|
24
|
+
"-extra-low",
|
|
25
|
+
"-low",
|
|
26
|
+
"-medium",
|
|
27
|
+
"-high"
|
|
28
|
+
];
|
|
29
|
+
function stripEffortSuffix(model) {
|
|
30
|
+
for (const suffix of ANTIGRAVITY_EFFORT_SUFFIXES) {
|
|
31
|
+
if (model.endsWith(suffix) && model.length > suffix.length) {
|
|
32
|
+
return model.slice(0, -suffix.length);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return model;
|
|
36
|
+
}
|
|
37
|
+
function stripPreviewSuffix(model) {
|
|
38
|
+
const suffix = "-preview";
|
|
39
|
+
if (model.endsWith(suffix) && model.length > suffix.length) {
|
|
40
|
+
return model.slice(0, -suffix.length);
|
|
41
|
+
}
|
|
42
|
+
return model;
|
|
43
|
+
}
|
|
44
|
+
var lookupKnownModelVision = (provider, model) => {
|
|
45
|
+
if (!model) return void 0;
|
|
46
|
+
const candidates = [model];
|
|
47
|
+
const strippedEffort = stripEffortSuffix(model);
|
|
48
|
+
if (strippedEffort !== model) candidates.push(strippedEffort);
|
|
49
|
+
const strippedPreview = stripPreviewSuffix(model);
|
|
50
|
+
if (strippedPreview !== model) candidates.push(strippedPreview);
|
|
51
|
+
for (const candidate of candidates) {
|
|
52
|
+
if (provider && provider !== "custom") {
|
|
53
|
+
const direct = findModelConfig(provider, candidate);
|
|
54
|
+
if (direct && typeof direct.hasVision === "boolean") return direct.hasVision;
|
|
55
|
+
}
|
|
56
|
+
const detected = getProviderByModelName(candidate);
|
|
57
|
+
if (detected) {
|
|
58
|
+
const found = findModelConfig(detected, candidate)?.hasVision;
|
|
59
|
+
if (found !== void 0) return found;
|
|
60
|
+
}
|
|
61
|
+
if (candidate.includes("/")) {
|
|
62
|
+
const slash = candidate.indexOf("/");
|
|
63
|
+
const modelProvider = candidate.slice(0, slash).toLowerCase();
|
|
64
|
+
const modelName = candidate.slice(slash + 1);
|
|
65
|
+
const nested = findModelConfig(modelProvider, modelName);
|
|
66
|
+
if (nested && typeof nested.hasVision === "boolean") return nested.hasVision;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return void 0;
|
|
70
|
+
};
|
|
71
|
+
var resolveAgentImageInputSupport = (agent) => {
|
|
72
|
+
if (!agent) return true;
|
|
73
|
+
const provider = asTrimmedLowercaseString(agent.provider) || null;
|
|
74
|
+
const model = asOptionalTrimmedString(agent.model) ?? "";
|
|
75
|
+
const catalogHasVision = lookupKnownModelVision(
|
|
76
|
+
provider,
|
|
77
|
+
model
|
|
78
|
+
);
|
|
79
|
+
if (catalogHasVision !== void 0) {
|
|
80
|
+
return catalogHasVision;
|
|
81
|
+
}
|
|
82
|
+
if (typeof agent.hasVision === "boolean") {
|
|
83
|
+
return agent.hasVision;
|
|
84
|
+
}
|
|
85
|
+
return true;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
// packages/ai/agent/imagePreprocessing.ts
|
|
89
|
+
function extractImageUrlsFromMessages(messages) {
|
|
90
|
+
const urls = [];
|
|
91
|
+
for (const msg of messages) {
|
|
92
|
+
if (!Array.isArray(msg.content)) continue;
|
|
93
|
+
for (const part of msg.content) {
|
|
94
|
+
if (part && typeof part === "object" && part.type === "image_url" && part.image_url && typeof part.image_url.url === "string" && part.image_url.url.trim()) {
|
|
95
|
+
urls.push(part.image_url.url);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return urls;
|
|
100
|
+
}
|
|
101
|
+
function hasImageInRuntimeMessages(messages) {
|
|
102
|
+
return extractImageUrlsFromMessages(messages).length > 0;
|
|
103
|
+
}
|
|
104
|
+
var IMAGE_OMITTED_PLACEHOLDER = "[Image content omitted: model does not support image input]";
|
|
105
|
+
function stripImagePartsFromContent(content) {
|
|
106
|
+
if (!Array.isArray(content)) return content;
|
|
107
|
+
const filtered = content.filter((part) => part?.type !== "image_url");
|
|
108
|
+
if (filtered.length === 0) return IMAGE_OMITTED_PLACEHOLDER;
|
|
109
|
+
return filtered;
|
|
110
|
+
}
|
|
111
|
+
function stripImagePartsFromMessages(messages) {
|
|
112
|
+
return messages.map((msg) => ({
|
|
113
|
+
...msg,
|
|
114
|
+
content: stripImagePartsFromContent(msg.content)
|
|
115
|
+
}));
|
|
116
|
+
}
|
|
117
|
+
async function stripImagePartsForTextOnlyAgent(messages, agentConfig) {
|
|
118
|
+
const supportsVision = resolveAgentImageInputSupport(agentConfig);
|
|
119
|
+
const hasImages = hasImageInRuntimeMessages(messages);
|
|
120
|
+
return { messages: !supportsVision && hasImages ? stripImagePartsFromMessages(messages) : messages };
|
|
121
|
+
}
|
|
122
|
+
|
|
14
123
|
// packages/agent-runtime/agentRecordConfig.ts
|
|
15
124
|
function stringField(record, key) {
|
|
16
125
|
const value = record[key];
|
|
@@ -97,6 +206,63 @@ function resolveAgentRuntimeConfigFromRecord(key, record) {
|
|
|
97
206
|
};
|
|
98
207
|
}
|
|
99
208
|
|
|
209
|
+
// packages/ai/agent/toolOutputPolicy.ts
|
|
210
|
+
var MAX_HISTORICAL_TOOL_CONTENT_CHARS = 1600;
|
|
211
|
+
var MAX_IN_TURN_TOOL_CONTENT_CHARS = 4e3;
|
|
212
|
+
var FRESH_TOOL_OUTPUT_MAX_CHARS = 32e3;
|
|
213
|
+
var DEFAULT_TOOL_OUTPUT_PROFILE = {
|
|
214
|
+
maxChars: MAX_IN_TURN_TOOL_CONTENT_CHARS,
|
|
215
|
+
headRatio: 0.5
|
|
216
|
+
};
|
|
217
|
+
var TOOL_OUTPUT_PROFILES = {
|
|
218
|
+
readFile: { maxChars: 4800, headRatio: 0.68, historicalMaxChars: 4800 },
|
|
219
|
+
read_file: { maxChars: 4800, headRatio: 0.68, historicalMaxChars: 4800 },
|
|
220
|
+
readWorkspaceFile: { maxChars: 4800, headRatio: 0.68, historicalMaxChars: 4800 },
|
|
221
|
+
searchFiles: { maxChars: 3600, headRatio: 0.78 },
|
|
222
|
+
search_files: { maxChars: 3600, headRatio: 0.78 },
|
|
223
|
+
listFiles: { maxChars: 2800, headRatio: 0.85 },
|
|
224
|
+
globFiles: { maxChars: 2800, headRatio: 0.85 },
|
|
225
|
+
execShell: { maxChars: 4e3, headRatio: 0.35 },
|
|
226
|
+
runCommand: { maxChars: 4e3, headRatio: 0.35 },
|
|
227
|
+
launchProcess: { maxChars: 2800, headRatio: 0.35 },
|
|
228
|
+
editFile: { maxChars: 2800, headRatio: 0.62 },
|
|
229
|
+
writeFile: { maxChars: 2400, headRatio: 0.62 },
|
|
230
|
+
readPastedText: { maxChars: 4800, headRatio: 0.5, historicalMaxChars: 4800 }
|
|
231
|
+
};
|
|
232
|
+
function resolveToolOutputProfile(toolName) {
|
|
233
|
+
return (toolName ? TOOL_OUTPUT_PROFILES[toolName] : void 0) ?? DEFAULT_TOOL_OUTPUT_PROFILE;
|
|
234
|
+
}
|
|
235
|
+
function resolveHistoricalToolContentCap(toolName, historicalMaxChars) {
|
|
236
|
+
const profile = toolName ? TOOL_OUTPUT_PROFILES[toolName] : void 0;
|
|
237
|
+
return profile?.historicalMaxChars !== void 0 ? Math.max(historicalMaxChars, profile.historicalMaxChars) : historicalMaxChars;
|
|
238
|
+
}
|
|
239
|
+
function projectToolMessageContent(input) {
|
|
240
|
+
const { content, isFresh, toolName, historicalMaxChars } = input;
|
|
241
|
+
if (isFresh) {
|
|
242
|
+
if (content.length <= FRESH_TOOL_OUTPUT_MAX_CHARS) return content;
|
|
243
|
+
return clipToolText(
|
|
244
|
+
content,
|
|
245
|
+
FRESH_TOOL_OUTPUT_MAX_CHARS,
|
|
246
|
+
resolveToolOutputProfile(toolName).headRatio,
|
|
247
|
+
`
|
|
248
|
+
\u2026[\u622A\u65AD\uFF0C\u539F\u59CB\u957F\u5EA6 ${content.length} \u5B57\u7B26]`
|
|
249
|
+
);
|
|
250
|
+
}
|
|
251
|
+
const cap = resolveHistoricalToolContentCap(toolName, historicalMaxChars);
|
|
252
|
+
if (content.length <= cap) return content;
|
|
253
|
+
return content.slice(0, cap) + `
|
|
254
|
+
\u2026[\u622A\u65AD\uFF0C\u539F\u59CB\u957F\u5EA6 ${content.length} \u5B57\u7B26]`;
|
|
255
|
+
}
|
|
256
|
+
function clipToolText(content, maxChars, headRatio, marker = "\n\n[... tool output middle omitted; head/tail preserved ...]\n\n") {
|
|
257
|
+
const normalized = content.replace(/\r\n/g, "\n").trim();
|
|
258
|
+
if (normalized.length <= maxChars) return normalized;
|
|
259
|
+
if (maxChars <= marker.length + 2) return normalized.slice(0, maxChars);
|
|
260
|
+
const available = maxChars - marker.length;
|
|
261
|
+
const headChars = Math.max(1, Math.floor(available * headRatio));
|
|
262
|
+
const tailChars = Math.max(1, available - headChars);
|
|
263
|
+
return `${normalized.slice(0, headChars)}${marker}${normalized.slice(-tailChars)}`;
|
|
264
|
+
}
|
|
265
|
+
|
|
100
266
|
// packages/agent-runtime/desktopRequestSnapshot.ts
|
|
101
267
|
var DESKTOP_AGENT_CONFIG_SNAPSHOT_STRING_FIELDS = [
|
|
102
268
|
"name",
|
|
@@ -376,6 +542,16 @@ function assertDesktopAgentRuntimeTurnBodyHasNoRawSecrets(body) {
|
|
|
376
542
|
}
|
|
377
543
|
|
|
378
544
|
export {
|
|
545
|
+
resolveAgentImageInputSupport,
|
|
546
|
+
hasImageInRuntimeMessages,
|
|
547
|
+
stripImagePartsFromMessages,
|
|
548
|
+
stripImagePartsForTextOnlyAgent,
|
|
549
|
+
MAX_HISTORICAL_TOOL_CONTENT_CHARS,
|
|
550
|
+
FRESH_TOOL_OUTPUT_MAX_CHARS,
|
|
551
|
+
resolveToolOutputProfile,
|
|
552
|
+
resolveHistoricalToolContentCap,
|
|
553
|
+
projectToolMessageContent,
|
|
554
|
+
clipToolText,
|
|
379
555
|
resolveAgentRuntimeConfigFromRecord,
|
|
380
556
|
buildDesktopAgentRuntimeAgentConfigSnapshot,
|
|
381
557
|
buildDesktopAgentRuntimeDialogHistorySnapshot,
|