nolo-cli 0.80.0-alpha.2 → 0.80.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/README.md +2 -2
- package/{_executeModel-T3FPYFVF.js → _executeModel-UXVEB3GO.js} +46 -46
- 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-JCDEGE35.js → agentDeleteCommand-OODHSL4K.js} +30 -28
- package/{agentEmailCommands-IP5NOVLR.js → agentEmailCommands-3R73WSCD.js} +64 -60
- package/{agentGrantCommands-R3VQEZJR.js → agentGrantCommands-M3XFO6EN.js} +2 -2
- package/{agentListCommands-IWIHYQT3.js → agentListCommands-TBTEXV2E.js} +38 -30
- package/{agentMachineCommands-A2WJJOAL.js → agentMachineCommands-3GKE6ZHG.js} +30 -28
- package/{agentProviderCommands-65ZC2WB4.js → agentProviderCommands-GNPTL5XR.js} +87 -0
- package/{agentPullCommand-N7L2CT7L.js → agentPullCommand-O5MPVJ5E.js} +3 -3
- package/{agentRecordCommands-2URSSQJS.js → agentRecordCommands-3664GLRE.js} +61 -57
- package/{agentRunCommand-HICCPFML.js → agentRunCommand-YNSEOBTR.js} +62 -58
- package/{agentRunControl-T44MESII.js → agentRunControl-XLGD3UZ5.js} +1 -1
- package/{agentRuntimeLocal-C3VUNWAT.js → agentRuntimeLocal-5BX6PI4X.js} +28 -26
- package/{agentSlice-EACXUOWW.js → agentSlice-KTVOEUDX.js} +10 -10
- package/{appDeleteCommands-KYL3Z76U.js → appDeleteCommands-UNTBD55Y.js} +30 -28
- package/{appDeployCommands-3RSNVJ7Q.js → appDeployCommands-LOF4JNBZ.js} +30 -28
- package/{appDeployStatusCommands-2Z4N3G2G.js → appDeployStatusCommands-MMLE6BDW.js} +30 -28
- package/{appGetCommands-J2WLYQRO.js → appGetCommands-WFJAJK6B.js} +30 -28
- package/{appListCommands-XT2ZCBMO.js → appListCommands-NC265RGX.js} +30 -28
- 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-XEIJO5WR.js → chatQueueReduxAdapter-4YQF4NHY.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-IPTKVTHL.js → chunk-35EWBHJO.js} +10 -10
- package/{chunk-HQUORJTM.js → chunk-3BMYXEUW.js} +1 -1
- package/{chunk-3QPYFHAH.js → chunk-3DII57IT.js} +1 -1
- package/{chunk-KIS76A2P.js → chunk-3IIEFNGY.js} +38 -4
- package/{chunk-MEVSATIF.js → chunk-4OZYL5FG.js} +66 -792
- package/{chunk-GBPZKFYK.js → chunk-53HEEOTT.js} +4 -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-QA6YKM3H.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-XWNRAIUL.js → chunk-AFUORTY4.js} +6 -16
- package/{chunk-AFIWC5NH.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-HH65VA5U.js → chunk-CPH3W5A7.js} +15 -3
- package/{chunk-U6LKJRJB.js → chunk-D2P6UDPQ.js} +42 -26
- package/{chunk-L2Y24GRM.js → chunk-DEUUPHOO.js} +16 -12
- package/{chunk-MYU3MJCF.js → chunk-DHDMC6FO.js} +175 -7
- package/{chunk-CDVGNZDA.js → chunk-EFVDQUCT.js} +11 -173
- package/{chunk-EXMHJN7C.js → chunk-EYAQT56M.js} +4 -3
- package/{chunk-KSQLYFKT.js → chunk-FLLFOP5L.js} +6 -6
- package/{chunk-H7UKKEIS.js → chunk-GFD4ALW3.js} +1 -1
- package/{chunk-PYXL2CJL.js → chunk-GPCZ7UXG.js} +1 -1
- package/{chunk-K7AG465Q.js → chunk-GQBOR3G6.js} +4 -2
- package/{chunk-QUH3XHL5.js → chunk-H3PIH2EO.js} +7 -7
- package/{chunk-YFADVSZE.js → chunk-H62HCIUP.js} +6 -6
- package/{chunk-PZM3EENV.js → chunk-HJUYAD4A.js} +1 -1
- package/{chunk-ALGK6TIE.js → chunk-HMPEO3ZE.js} +3 -3
- package/{chunk-3JQ2NRYU.js → chunk-HVURBGF3.js} +4 -4
- package/{chunk-FPTQQSS6.js → chunk-IAO6JBYW.js} +26 -5
- package/{chunk-V3ZKNK5D.js → chunk-IIVGDG4I.js} +11 -10
- package/{chunk-UDQWGU7F.js → chunk-J4MOO56S.js} +1 -1
- package/{chunk-DSRXPQWA.js → chunk-JAXOVNM4.js} +43 -43
- 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-D74EWXL4.js → chunk-LBEDNSMY.js} +419 -72
- package/{chunk-X7Z7U4Z6.js → chunk-LIIKM7DD.js} +15 -15
- 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-THWDM2R6.js → chunk-MPV6E6WR.js} +608 -60
- package/{chunk-HI374WVI.js → chunk-MWAO7TZZ.js} +902 -301
- package/{chunk-QRBAZ5PW.js → chunk-NKRYKK7T.js} +3 -3
- package/{chunk-ZLPA7K55.js → chunk-OA6Q2A4I.js} +29 -10
- package/{chunk-QC5LGHYP.js → chunk-OF7AQZUG.js} +10 -5
- package/{chunk-UJ63UXGE.js → chunk-OIVSQH2O.js} +1006 -801
- 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-AFIKMMGC.js → chunk-QIAVMDHY.js} +1 -1
- package/{chunk-QCZX4FTW.js → chunk-SH43IESU.js} +173 -15
- package/{chunk-FSFQ3A7S.js → chunk-SNPMM7H3.js} +137 -12
- package/{chunk-P7FA2HMM.js → chunk-SQZDZXP5.js} +13 -15
- package/{chunk-SPAQ4PVV.js → chunk-SV5IJK6K.js} +1 -1
- package/{chunk-BJCWNHVU.js → chunk-TOP2VXOR.js} +2 -2
- package/{chunk-L5E7NSWK.js → chunk-TRCMIJA7.js} +1198 -50
- package/{chunk-4EJ5QYB5.js → chunk-UKZDAFYT.js} +1 -1
- package/{chunk-PGSKWZCB.js → chunk-UZGQNTVW.js} +1 -1
- 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-E36HZARC.js → chunk-WADCY6G6.js} +3 -3
- package/{chunk-5J7W2VWW.js → chunk-WV42OMV7.js} +6 -265
- package/{chunk-DWPNOYMB.js → chunk-YQTQQX2H.js} +1 -1
- package/{chunk-Q6FF2MCK.js → chunk-Z77CRGTW.js} +1 -1
- package/{contentThunks-3SPROFG5.js → contentThunks-2USKJBI4.js} +25 -25
- package/{createAgentAutomationAction-EIP2EG3O.js → createAgentAutomationAction-NTLU42X2.js} +25 -25
- package/{createDialogAction-RLUSTN4D.js → createDialogAction-UCYF4BUN.js} +28 -28
- package/{createPageAction-4Y52G7WG.js → createPageAction-QFGUGZ5M.js} +26 -26
- package/{dbSlice-GKGGFNOB.js → dbSlice-XVWBAGYN.js} +8 -8
- package/{deleteFile-LWSR674W.js → deleteFile-YG6QMJLU.js} +3 -3
- package/{dialogCommands-IPCKBWGL.js → dialogCommands-X4OB6SC6.js} +34 -30
- package/{dialogSlice-THY45JWM.js → dialogSlice-HQFQIQDZ.js} +24 -24
- package/{docCreateCommands-QGJ2IM64.js → docCreateCommands-DFST4PFR.js} +31 -29
- package/{docDeleteCommands-ZZXWBKNG.js → docDeleteCommands-V37JZOSP.js} +32 -30
- package/{docReadCommands-FE37G3KU.js → docReadCommands-Z64VDPDQ.js} +31 -29
- package/{docStore-ZQ3ECOPY.js → docStore-GVWEDN5E.js} +9 -9
- package/{docUpdateCommands-EOHC5LRT.js → docUpdateCommands-I6FB6ENK.js} +31 -29
- package/{fetchMessages-DRABNDPZ.js → fetchMessages-EIU7UFFK.js} +3 -4
- package/{getPricing-HRMSOF3E.js → getPricing-LUSEABA6.js} +4 -4
- package/{handleSendMessageAction-CE4M5XIE.js → handleSendMessageAction-TLB2SAU4.js} +24 -24
- package/index.js +101 -84
- package/{localDialogRead-PUQKFI73.js → localDialogRead-BTFJ4V2I.js} +2 -2
- package/{localRuntimeDb-P37ZTX55.js → localRuntimeDb-SYQGUF4U.js} +1 -1
- package/{machineCommands-KSONYK2P.js → machineCommands-PV5XA7UF.js} +61 -57
- package/{machineWsRunDispatch-RBSOKO6F.js → machineWsRunDispatch-W2DPC7TZ.js} +59 -55
- 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-WVK6LIF5.js → readlineWorkspace-PHZXJKJM.js} +187 -108
- package/{removeDialogAgentAction-F5GPTALR.js → removeDialogAgentAction-IX3MN2ZO.js} +11 -11
- package/{runAgentClientLoop-NE5EHXSS.js → runAgentClientLoop-26DG6ZEY.js} +45 -45
- 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-FRU7SOMI.js → spaceCommands-3QH2QFNW.js} +29 -27
- package/{streamAgentChatTurn-A6L6O22P.js → streamAgentChatTurn-BY7IPY5C.js} +57 -56
- 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-JS475NYO.js → tools-4Y2EYH5D.js} +41 -39
- package/tuiSummaryLlmCaller-T2SHYMDZ.js +127 -0
- package/{updateCommands-Y363MC3L.js → updateCommands-2M74UL7P.js} +2 -2
- package/{updateDialogTitleAction-GMZUT6RP.js → updateDialogTitleAction-2S4DCP35.js} +45 -28
- 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
|
@@ -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";
|
|
@@ -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";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildLocalAgentLookupKeys,
|
|
3
3
|
shouldReadAgentKeyRemotely
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-Z77CRGTW.js";
|
|
5
5
|
import {
|
|
6
6
|
resolveCliAgentKeyInput
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-SV5IJK6K.js";
|
|
8
8
|
import {
|
|
9
9
|
toErrorMessage
|
|
10
10
|
} from "./chunk-HNMXYYJR.js";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
} from "./chunk-A7GB5UGH.js";
|
|
22
22
|
import {
|
|
23
23
|
createAgentKey
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-VMFTFOWF.js";
|
|
25
25
|
|
|
26
26
|
// packages/cli/agentRecordHelpers.ts
|
|
27
27
|
import { readFileSync } from "node:fs";
|
|
@@ -266,18 +266,26 @@ async function resolveAgentRecordFromHybridStore(args) {
|
|
|
266
266
|
if (record && typeof record === "object") {
|
|
267
267
|
const cacheAge = Date.now() - (Number(record?.cachedAt) || 0);
|
|
268
268
|
const STALE_CACHE_MS = 6e4;
|
|
269
|
-
if (record?.serverOrigin && shouldReadAgentKeyRemotely(key) && cacheAge > STALE_CACHE_MS) {
|
|
269
|
+
if (record?.serverOrigin && shouldReadAgentKeyRemotely(key) && (args.fresh === true || cacheAge > STALE_CACHE_MS)) {
|
|
270
270
|
try {
|
|
271
|
-
await readAgentRecord({
|
|
271
|
+
const fresh = await readAgentRecord({
|
|
272
272
|
agentKey: key,
|
|
273
273
|
authToken,
|
|
274
274
|
fallbackFetchImpl: args.fallbackFetchImpl,
|
|
275
275
|
fetchImpl: args.fetchImpl,
|
|
276
276
|
serverUrl: record.serverOrigin
|
|
277
277
|
});
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
278
|
+
if (fresh) {
|
|
279
|
+
try {
|
|
280
|
+
await args.db.put(key, { ...fresh, dbKey: key, cachedAt: Date.now() });
|
|
281
|
+
} catch {
|
|
282
|
+
}
|
|
283
|
+
return {
|
|
284
|
+
agentKey: key,
|
|
285
|
+
record: fresh,
|
|
286
|
+
source: record?.serverOrigin ? "remote-cache" : "local-cache",
|
|
287
|
+
cacheHit: false
|
|
288
|
+
};
|
|
281
289
|
}
|
|
282
290
|
} catch (err) {
|
|
283
291
|
const msg = toErrorMessage(err);
|
|
@@ -293,7 +301,10 @@ async function resolveAgentRecordFromHybridStore(args) {
|
|
|
293
301
|
return {
|
|
294
302
|
agentKey: key,
|
|
295
303
|
record,
|
|
296
|
-
source: record?.serverOrigin ? "remote-cache" : "local-cache"
|
|
304
|
+
source: record?.serverOrigin ? "remote-cache" : "local-cache",
|
|
305
|
+
// 明确告知调用方「这是缓存视图」——缓存可能持有字段子集,也可能已过期。
|
|
306
|
+
// 调用方据此决定是否用 fresh 重读,而不是把不完整视图当成真值。
|
|
307
|
+
cacheHit: true
|
|
297
308
|
};
|
|
298
309
|
}
|
|
299
310
|
} catch {
|
|
@@ -459,6 +470,7 @@ function parseAgentUpdateArgs(args) {
|
|
|
459
470
|
const name = readOption(args, "--name");
|
|
460
471
|
const customProviderUrl = readOption(args, "--custom-provider-url");
|
|
461
472
|
const apiKey = readOption(args, "--api-key") ?? readOption(args, "--provider-api-key");
|
|
473
|
+
const presetId = readOption(args, "--preset") ?? readOption(args, "--provider-preset");
|
|
462
474
|
const verify = args.includes("--verify");
|
|
463
475
|
const verifyPrompt = readOption(args, "--verify-prompt");
|
|
464
476
|
const maxConcurrent = parsePositiveIntegerOption(
|
|
@@ -498,13 +510,40 @@ function parseAgentUpdateArgs(args) {
|
|
|
498
510
|
throw new Error("No updates provided. Use --model / --cli-provider / --api-source / --field key=value.");
|
|
499
511
|
}
|
|
500
512
|
}
|
|
501
|
-
return { agentInput, updates, promptDoc, copyProviderFrom, verify, verifyPrompt };
|
|
513
|
+
return { agentInput, updates, promptDoc, copyProviderFrom, verify, verifyPrompt, presetId };
|
|
502
514
|
}
|
|
503
515
|
async function buildCreatedAgentRecord(args) {
|
|
504
516
|
const serverUrl = args.cliArgs ? resolveServerUrl(args.cliArgs, args.env) : resolveServerUrl(args.env);
|
|
505
517
|
const userId = parseUserIdFromAuthToken(args.authToken);
|
|
506
518
|
const resolvedAgentInput = resolveCliAgentKeyInput(args.parsed.agentInput);
|
|
507
519
|
const agentKey = resolvedAgentInput.startsWith("agent-") ? resolvedAgentInput : createAgentKey.private(userId || "local", resolvedAgentInput);
|
|
520
|
+
if (args.parsed.presetId) {
|
|
521
|
+
const { resolveProviderPresetFields } = await import("./providerPresetApply-FG6NZ57W.js");
|
|
522
|
+
const fields = resolveProviderPresetFields(args.parsed.presetId);
|
|
523
|
+
if (fields.kind === "manual") {
|
|
524
|
+
throw new Error(
|
|
525
|
+
`unknown --preset "${args.parsed.presetId}". Run \`nolo agent providers\` to list preset ids.`
|
|
526
|
+
);
|
|
527
|
+
}
|
|
528
|
+
if (fields.kind === "oauth" || fields.requiresDesktopOAuth) {
|
|
529
|
+
throw new Error(
|
|
530
|
+
`--preset "${args.parsed.presetId}" is an OAuth subscription; create it in Nolo Desktop (OAuth login required).`
|
|
531
|
+
);
|
|
532
|
+
}
|
|
533
|
+
const u = args.parsed.updates;
|
|
534
|
+
u.apiSource = "custom";
|
|
535
|
+
u.provider = u.provider ?? fields.provider;
|
|
536
|
+
if (fields.customProviderUrl && !u.customProviderUrl) {
|
|
537
|
+
u.customProviderUrl = fields.customProviderUrl;
|
|
538
|
+
}
|
|
539
|
+
if (fields.apiKeyHeader && !u.apiKeyHeader) {
|
|
540
|
+
u.apiKeyHeader = fields.apiKeyHeader;
|
|
541
|
+
}
|
|
542
|
+
if (!u.model && fields.model) u.model = fields.model;
|
|
543
|
+
if (fields.defaultReasoningEffort && u.reasoning_effort == null) {
|
|
544
|
+
u.reasoning_effort = fields.defaultReasoningEffort;
|
|
545
|
+
}
|
|
546
|
+
}
|
|
508
547
|
if (args.parsed.copyProviderFrom) {
|
|
509
548
|
const providerSource = await resolveAgentRecordFromHybridStore({
|
|
510
549
|
agentInput: args.parsed.copyProviderFrom,
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cloudflareModels,
|
|
3
|
+
gmiModels,
|
|
4
|
+
openrouterModels,
|
|
5
|
+
platformHostedModels,
|
|
6
|
+
zaiModels
|
|
7
|
+
} from "./chunk-Q67DOFOO.js";
|
|
8
|
+
|
|
9
|
+
// packages/ai/llm/modelAbility.ts
|
|
10
|
+
var MODEL_ABILITY_TABLE = {
|
|
11
|
+
"claude-opus-5": { passAt1: 74, benchmarkScore: 61, writingScore: 82, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/anthropic", intelligenceIndex: 51, outputSpeedTps: 54, firstAnswerTokenS: 50.63, costPerTaskUsd: 5.86 }, aaEvals: { "aa-analyst-agent": 53.8, "aa-briefcase-v1.1": 1673, "aa-omniscience": 60.9, "automationbench-aa": 56.6, "critpt": 29.1, "enterprise-ops-gym-aa": 47.5, "gdp-pdf": 21.6, "gdpval-aa-v2.1": 1708, "harvey-lab-aa": 93.5, "humanitys-last-exam": 54.9, "mlcr-aa": 59.4, "mmmu-pro": 84.7, "scicode": 56.4, "terminal-bench-4.0": 49 } },
|
|
12
|
+
"claude-opus-5-5": { aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/anthropic", intelligenceIndex: 58, costPerTaskUsd: 5.98 }, aaEvals: { "aa-briefcase-v1.1": 1822, "aa-lcr-v1.1": 84.7, "aa-omniscience": 66.2, "aa-omniscience-non-hallucination": 58.6, "automationbench-aa": 69.5, "critpt": 31.7, "gdp-pdf": 28.8, "gdpval-aa-v2.1": 1846, "harvey-lab-aa": 91.2, "humanitys-last-exam": 61.4, "mlcr-aa": 66.7, "mmmu-pro": 87.7, "scicode": 66.9, "terminal-bench-4.0": 59.6 } },
|
|
13
|
+
"gpt-6-astra": { passAt1: 85, benchmarkScore: 90, writingScore: 92, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/openai", intelligenceIndex: 53, outputSpeedTps: 52, firstAnswerTokenS: 352.15, costPerTaskUsd: 3.26 }, aaEvals: { "aa-analyst-agent": 51.2, "aa-briefcase-v1.1": 1569, "aa-omniscience": 62.6, "aa-omniscience-non-hallucination": 51.3, "automationbench-aa": 68.5, "critpt": 31.7, "gdp-pdf": 32.2, "gdpval-aa-v2.1": 1542, "humanitys-last-exam": 54.7, "mlcr-aa": 35, "mmmu-pro": 86.9, "scicode": 56.5, "terminal-bench-4.0": 59.6 } },
|
|
14
|
+
"claude-opus-4-6": { passAt1: 65, benchmarkScore: 68, writingScore: 78, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/anthropic", intelligenceIndex: 32, outputSpeedTps: 40, firstAnswerTokenS: 21.89 } },
|
|
15
|
+
"gpt-5.6-sol": { passAt1: 73, benchmarkScore: 59, writingScore: 80, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/openai", intelligenceIndex: 47, outputSpeedTps: 77, firstAnswerTokenS: 113.21, costPerTaskUsd: 1.99 }, aaEvals: { "aa-analyst-agent": 47.5, "aa-briefcase-v1.1": 1487, "aa-lcr-v1.1": 84, "aa-omniscience": 59.4, "automationbench-aa": 60.1, "critpt": 32.3, "enterprise-ops-gym-aa": 42.9, "gdp-pdf": 27.2, "gdpval-aa-v2.1": 1588, "harvey-lab-aa": 87.2, "humanitys-last-exam": 49.5, "ifbench": 72.7, "itbench-aa": 56.2, "mlcr-aa": 26.1, "mmmu-pro": 83.4, "scicode": 57.1, "terminal-bench-4.0": 39.9 } },
|
|
16
|
+
"claude-fable-5": { passAt1: 70, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/anthropic", intelligenceIndex: 50, outputSpeedTps: 68, firstAnswerTokenS: 110.36, costPerTaskUsd: 8.75 }, aaEvals: { "aa-analyst-agent": 48.8, "aa-omniscience": 65.3, "enterprise-ops-gym-aa": 51.1, "harvey-lab-aa": 93.6, "humanitys-last-exam": 55.5, "mlcr-aa": 64.4, "scicode": 61 } },
|
|
17
|
+
"gpt-5.6-terra": { passAt1: 70, benchmarkScore: 55, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/openai", intelligenceIndex: 42, outputSpeedTps: 83, firstAnswerTokenS: 211.09, costPerTaskUsd: 1.4 }, aaEvals: { "apex-agents-aa": 38.9, "itbench-aa": 51 } },
|
|
18
|
+
"kimi-k3": { passAt1: 69, benchmarkScore: 57, writingScore: 81, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/kimi", intelligenceIndex: 44, outputSpeedTps: 37, firstAnswerTokenS: 4.08, costPerTaskUsd: 2 }, aaEvals: { "aa-analyst-agent": 38.8, "aa-briefcase-v1.1": 1504, "aa-lcr-v1.1": 88.7, "aa-omniscience": 47.6, "aa-omniscience-non-hallucination": 53.2, "apex-agents-aa": 41.3, "automationbench-aa": 58.3, "critpt": 23.4, "enterprise-ops-gym-aa": 45.3, "gdp-pdf": 22, "gdpval-aa-v2.1": 1524, "harvey-lab-aa": 94.6, "humanitys-last-exam": 46.9, "itbench-aa": 47.7, "mlcr-aa": 38.3, "mmmu-pro": 80.5, "scicode": 59.5 } },
|
|
19
|
+
"gpt-5.5": { passAt1: 67, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/openai", intelligenceIndex: 38, outputSpeedTps: 91, firstAnswerTokenS: 62.45, costPerTaskUsd: 2.63 }, aaEvals: { "aa-analyst-agent": 50, "aa-lcr-v1.1": 84.3, "apex-agents-aa": 37.7, "itbench-aa": 45.8 } },
|
|
20
|
+
"gpt-5.6-luna": { passAt1: 67, benchmarkScore: 51, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/openai", intelligenceIndex: 37, outputSpeedTps: 133, firstAnswerTokenS: 114.02, costPerTaskUsd: 0.18 }, aaEvals: { "aa-lcr-v1.1": 83.7, "aa-omniscience": 42.7, "apex-agents-aa": 35.8, "critpt": 20.6, "enterprise-ops-gym-aa": 40.8, "gdp-pdf": 24, "harvey-lab-aa": 87.9, "itbench-aa": 40.3, "mlcr-aa": 19.4, "mmmu-pro": 78.6 } },
|
|
21
|
+
"gpt-6-luna": { aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/openai", intelligenceIndex: 37, outputSpeedTps: 132, firstAnswerTokenS: 104.42, costPerTaskUsd: 0.07 }, aaEvals: { "aa-lcr-v1.1": 83.3, "aa-omniscience": 43.8, "critpt": 19.4, "gdp-pdf": 20.4, "mmmu-pro": 75.5, "scicode": 54.6 } },
|
|
22
|
+
"grok-4.6": { passAt1: 67, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/xai", intelligenceIndex: 44, outputSpeedTps: 61, firstAnswerTokenS: 45.3, costPerTaskUsd: 1.86 }, aaEvals: { "aa-analyst-agent": 41.2, "aa-briefcase-v1.1": 1546, "aa-omniscience": 48.2, "aa-omniscience-non-hallucination": 34.3, "automationbench-aa": 67, "enterprise-ops-gym-aa": 48.3, "gdp-pdf": 17, "gdpval-aa-v2.1": 1605, "humanitys-last-exam": 42.9, "scicode": 56.5, "terminal-bench-4.0": 21.2 } },
|
|
23
|
+
"deepseek-v4-pro": { passAt1: 63, writingScore: 79, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/models/deepseek-v4-pro", intelligenceIndex: 36, outputSpeedTps: 66, firstAnswerTokenS: 1.7, costPerTaskUsd: 0.67 }, aaEvals: { "enterprise-ops-gym-aa": 49.6 } },
|
|
24
|
+
"qwen3.8-max": { passAt1: 57, writingScore: 77, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/models/qwen3-8-max", intelligenceIndex: 45, outputSpeedTps: 39.3, costPerTaskUsd: 5.41 }, aaEvals: { "aa-briefcase-v1.1": 1640, "aa-omniscience-non-hallucination": 28.8, "gdp-pdf": 22.8, "gdpval-aa-v2.1": 1668, "humanitys-last-exam": 43.1, "mlcr-aa": 20, "mmmu-pro": 82.8, "terminal-bench-4.0": 38.9 } },
|
|
25
|
+
"muse-spark-1.3": { aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/meta", intelligenceIndex: 48, outputSpeedTps: 219, firstAnswerTokenS: 24.12, costPerTaskUsd: 1.6 }, aaEvals: { "aa-briefcase-v1.1": 1597, "aa-lcr-v1.1": 83, "aa-omniscience": 43.6, "aa-omniscience-non-hallucination": 32.9, "automationbench-aa": 57.9, "critpt": 24.9, "gdp-pdf": 26.6, "gdpval-aa-v2.1": 1674, "harvey-lab-aa": 95.5, "humanitys-last-exam": 48.7, "mlcr-aa": 43.3, "scicode": 58.8, "terminal-bench-4.0": 33.3 } },
|
|
26
|
+
"muse-spark-1.2": { passAt1: 55, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/meta", intelligenceIndex: 40, outputSpeedTps: 187, firstAnswerTokenS: 16.6, costPerTaskUsd: 0.97 } },
|
|
27
|
+
"grok-4.5": { passAt1: 54, benchmarkScore: 54, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/xai", intelligenceIndex: 39, outputSpeedTps: 55, firstAnswerTokenS: 11.28, costPerTaskUsd: 1.04 } },
|
|
28
|
+
"claude-sonnet-5": { passAt1: 54, benchmarkScore: 53, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/anthropic", intelligenceIndex: 38, outputSpeedTps: 79, firstAnswerTokenS: 150.02, costPerTaskUsd: 5.09 }, aaEvals: { "aa-analyst-agent": 46.2, "mlcr-aa": 55 } },
|
|
29
|
+
"deepseek-flash": { passAt1: 53 },
|
|
30
|
+
"deepseek-v4-flash": { passAt1: 53, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/models/deepseek-v4-flash", intelligenceIndex: 34, outputSpeedTps: 221, firstAnswerTokenS: 1.16, costPerTaskUsd: 0.22 } },
|
|
31
|
+
"gemini-3.7-flash": { passAt1: 58, benchmarkScore: 65, writingScore: 88, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/google", intelligenceIndex: 40, outputSpeedTps: 281, firstAnswerTokenS: 4.9 }, aaEvals: { "aa-analyst-agent": 60, "enterprise-ops-gym-aa": 50.4, "scicode": 59.8 } },
|
|
32
|
+
// TODO(benchmark): gemini-3.8-flash 官方基准快照未出,暂沿用 3.7 分数占位,确认后更新。
|
|
33
|
+
"gemini-3.8-flash": { passAt1: 58, benchmarkScore: 65, writingScore: 88, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/google", intelligenceIndex: 41, outputSpeedTps: 291, firstAnswerTokenS: 15.14, costPerTaskUsd: 1.24 }, aaEvals: { "aa-lcr-v1.1": 81.3, "aa-omniscience": 54.6, "aa-omniscience-non-hallucination": 55.2, "automationbench-aa": 59.9, "critpt": 18.3, "gdp-pdf": 21, "humanitys-last-exam": 47.8, "mlcr-aa": 21.7, "mmmu-pro": 85.6, "scicode": 56.6 } },
|
|
34
|
+
"muse-spark-1.1": { passAt1: 53, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/meta", intelligenceIndex: 34, costPerTaskUsd: 1.38 } },
|
|
35
|
+
"gpt-5.4": { passAt1: 52, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/openai", intelligenceIndex: 39, outputSpeedTps: 140, firstAnswerTokenS: 141.55 }, aaEvals: { "apex-agents-aa": 33.3 } },
|
|
36
|
+
"gemini-3.6-flash": { passAt1: 49, benchmarkScore: 50, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/google", intelligenceIndex: 34, outputSpeedTps: 178, firstAnswerTokenS: 17.32, costPerTaskUsd: 0.93 } },
|
|
37
|
+
"glm-5.3": { passAt1: 52, benchmarkScore: 60, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/models/glm-5-3", intelligenceIndex: 45, outputSpeedTps: 57, costPerTaskUsd: 2.01 }, aaEvals: { "aa-briefcase-v1.1": 1516, "aa-omniscience-non-hallucination": 29.6, "automationbench-aa": 62.2, "critpt": 19.1, "enterprise-ops-gym-aa": 36.4, "gdpval-aa-v2.1": 1646, "humanitys-last-exam": 42.3, "mlcr-aa": 51.1, "scicode": 59, "terminal-bench-4.0": 41.9 } },
|
|
38
|
+
"glm-5.2": { passAt1: 44, benchmarkScore: 51, aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/models/glm-5-2", intelligenceIndex: 34, outputSpeedTps: 69.2, costPerTaskUsd: 0.96 }, aaEvals: { "apex-agents-aa": 33.7, "itbench-aa": 42.7 } },
|
|
39
|
+
// ── StepFun(阶跃星辰)─ 仅有 AA 快照,无 pass@1 等旧字段。
|
|
40
|
+
// 来源:https://artificialanalysis.ai/providers/stepfun 对比表。
|
|
41
|
+
// 其中 3.5-flash-2603 已被 AA 标记 deprecated(官方推荐 3.7-flash)。
|
|
42
|
+
"step-5-preview": { aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/stepfun", intelligenceIndex: 44, outputSpeedTps: 85, firstAnswerTokenS: 3.48, costPerTaskUsd: 0.72 }, aaEvals: { "aa-briefcase-v1.1": 1432, "aa-lcr-v1.1": 88.3, "aa-omniscience-non-hallucination": 43, "critpt": 20.9, "gdpval-aa-v2.1": 1566, "humanitys-last-exam": 46.5, "mmmu-pro": 76.4, "scicode": 58.9, "terminal-bench-4.0": 33.3 } },
|
|
43
|
+
"step-3.7-flash": { aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/stepfun", intelligenceIndex: 19, outputSpeedTps: 190, firstAnswerTokenS: 2.66 } },
|
|
44
|
+
"step-3.5-flash-2603": { aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/stepfun", intelligenceIndex: 17, outputSpeedTps: 133, firstAnswerTokenS: 3.33 } },
|
|
45
|
+
"step-3.5-flash": { aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/stepfun", intelligenceIndex: 17, outputSpeedTps: 137, firstAnswerTokenS: 3.5 } },
|
|
46
|
+
// ── Xiaomi MiMo ── AA 只收录 Pro 档(V2.6-Pro / V2.5-Pro);
|
|
47
|
+
// mimo-v2.6-flash 与 mimo-v2.6-pro-ultraspeed AA 未收录,缺失即缺失。
|
|
48
|
+
"mimo-v2.6-pro": { aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/xiaomi", intelligenceIndex: 46, outputSpeedTps: 49, firstAnswerTokenS: 2.93, costPerTaskUsd: 0.13 }, aaEvals: { "aa-briefcase-v1.1": 1522, "aa-lcr-v1.1": 86.3, "aa-omniscience-non-hallucination": 40.6, "automationbench-aa": 58.6, "critpt": 26.6, "gdp-pdf": 19.2, "gdpval-aa-v2.1": 1673, "humanitys-last-exam": 49.4, "scicode": 60.9, "terminal-bench-4.0": 34.8 } },
|
|
49
|
+
"mimo-v2.5-pro": { aaSnapshot: { measuredAt: "2026-09-24", sourceUrl: "https://artificialanalysis.ai/providers/xiaomi", intelligenceIndex: 26, outputSpeedTps: 52, firstAnswerTokenS: 7.95, costPerTaskUsd: 0.05 } }
|
|
50
|
+
};
|
|
51
|
+
var EFFORT_SUFFIXES = [
|
|
52
|
+
"-extra-low",
|
|
53
|
+
"-low",
|
|
54
|
+
"-medium",
|
|
55
|
+
"-high",
|
|
56
|
+
"-thinking",
|
|
57
|
+
"-tiered",
|
|
58
|
+
":cloud"
|
|
59
|
+
];
|
|
60
|
+
function normalizeModelName(raw) {
|
|
61
|
+
let name = raw.trim().toLowerCase();
|
|
62
|
+
const slash = name.indexOf("/");
|
|
63
|
+
if (slash !== -1) name = name.slice(slash + 1);
|
|
64
|
+
for (const suffix of EFFORT_SUFFIXES) {
|
|
65
|
+
if (name.endsWith(suffix) && name.length > suffix.length) {
|
|
66
|
+
name = name.slice(0, name.length - suffix.length);
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return name;
|
|
71
|
+
}
|
|
72
|
+
function getModelAbility(modelName) {
|
|
73
|
+
const entry = MODEL_ABILITY_TABLE[normalizeModelName(modelName)];
|
|
74
|
+
return entry ? { ...entry } : void 0;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// packages/ai/llm/models.ts
|
|
78
|
+
var withProvider = (provider) => (models) => models.map((model) => ({ ...model, provider }));
|
|
79
|
+
var ALL_MODELS = [
|
|
80
|
+
...withProvider("nolo")(platformHostedModels),
|
|
81
|
+
...withProvider("openrouter")(openrouterModels),
|
|
82
|
+
...withProvider("cloudflare")(cloudflareModels),
|
|
83
|
+
...withProvider("gmi")(gmiModels),
|
|
84
|
+
...withProvider("zai")(zaiModels)
|
|
85
|
+
].map((model) => {
|
|
86
|
+
const ability = getModelAbility(model.name);
|
|
87
|
+
return ability ? { ...model, ability } : model;
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
export {
|
|
91
|
+
getModelAbility,
|
|
92
|
+
ALL_MODELS
|
|
93
|
+
};
|
|
@@ -2,8 +2,9 @@ import {
|
|
|
2
2
|
parsePositiveFiniteNumberOrFallback
|
|
3
3
|
} from "./chunk-Y5GCAMGP.js";
|
|
4
4
|
import {
|
|
5
|
-
DEFAULT_SYSTEM_AGENT_CAPABILITIES
|
|
6
|
-
|
|
5
|
+
DEFAULT_SYSTEM_AGENT_CAPABILITIES,
|
|
6
|
+
noloAgentId
|
|
7
|
+
} from "./chunk-QDSINZM3.js";
|
|
7
8
|
import {
|
|
8
9
|
asRecordOrEmpty
|
|
9
10
|
} from "./chunk-KX6YBIHG.js";
|
|
@@ -13,25 +14,22 @@ import {
|
|
|
13
14
|
toTimestampMs,
|
|
14
15
|
upsert,
|
|
15
16
|
write
|
|
16
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-H62HCIUP.js";
|
|
17
18
|
import {
|
|
18
19
|
createUserKey,
|
|
19
20
|
createUserPreferenceKey,
|
|
20
21
|
ulid
|
|
21
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-VMFTFOWF.js";
|
|
22
23
|
import {
|
|
23
24
|
asTrimmedLowercaseString
|
|
24
25
|
} from "./chunk-QSJ3HFEF.js";
|
|
25
|
-
import {
|
|
26
|
-
BUILTIN_NOLO_AGENT_KEY
|
|
27
|
-
} from "./chunk-5J7W2VWW.js";
|
|
28
26
|
import {
|
|
29
27
|
asyncThunkCreator,
|
|
30
28
|
buildCreateSlice,
|
|
31
29
|
createAction,
|
|
32
30
|
createAsyncThunk,
|
|
33
31
|
createSelector
|
|
34
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-UKWGR5SS.js";
|
|
35
33
|
import {
|
|
36
34
|
getAllServers,
|
|
37
35
|
getIsDesktopApp,
|
|
@@ -1016,12 +1014,6 @@ var withSettingsRecordSchema = (changes) => ({
|
|
|
1016
1014
|
schemaVersion: SETTINGS_RECORD_SCHEMA_VERSION
|
|
1017
1015
|
});
|
|
1018
1016
|
|
|
1019
|
-
// packages/core/init.ts
|
|
1020
|
-
var nolotusId = "0e95801d90";
|
|
1021
|
-
var ADMIN_IDS = /* @__PURE__ */ new Set([nolotusId]);
|
|
1022
|
-
var isSystemAdmin = (userId) => userId != null && ADMIN_IDS.has(userId);
|
|
1023
|
-
var noloAgentId = BUILTIN_NOLO_AGENT_KEY;
|
|
1024
|
-
|
|
1025
1017
|
// packages/app/settings/settingNormalizers.ts
|
|
1026
1018
|
var hasOwn = (target, key) => Object.prototype.hasOwnProperty.call(target, key);
|
|
1027
1019
|
var normalizeDefaultAgentIdSetting = (value) => {
|
|
@@ -1994,8 +1986,6 @@ export {
|
|
|
1994
1986
|
AGENT_UPDATE_FIELD_NAMES,
|
|
1995
1987
|
normalizeAgentUpdateFieldList,
|
|
1996
1988
|
SYSTEM_DEFAULT_AGENT_ID,
|
|
1997
|
-
nolotusId,
|
|
1998
|
-
isSystemAdmin,
|
|
1999
1989
|
normalizeSettingChanges,
|
|
2000
1990
|
LOCAL_FIRST_APPEARANCE_KEYS,
|
|
2001
1991
|
LOCAL_ONLY_SETTINGS_KEYS,
|