nolo-cli 0.201.0-alpha.2 → 0.202.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{_executeModel-BNYZLAN6.js → _executeModel-IPRTPSW7.js} +34 -33
- package/{agentDeleteCommand-4V4YSAXS.js → agentDeleteCommand-6HFA37FH.js} +49 -47
- package/{agentEmailCommands-EYIQEH6Z.js → agentEmailCommands-TDBNVIAT.js} +51 -49
- package/{agentListCommands-2KGUT7UB.js → agentListCommands-YSQSDQM3.js} +81 -45
- package/{agentMachineCommands-WUN47ILO.js → agentMachineCommands-5W23BLFR.js} +28 -26
- package/{agentProviderCommands-T6E3JCR6.js → agentProviderCommands-5ALOQLE5.js} +2 -2
- package/{agentRecordCommands-XL2CON36.js → agentRecordCommands-SRIMZZFK.js} +47 -45
- package/{agentRunCommand-R237ZGMQ.js → agentRunCommand-BLYHIN6S.js} +49 -47
- package/{agentRunControl-6HHESKDB.js → agentRunControl-ABDUPJLX.js} +10 -5
- package/{agentRuntimeLocal-XLLWFAVI.js → agentRuntimeLocal-FE66EBRC.js} +24 -22
- package/{agentSlice-Z5NKGMB7.js → agentSlice-BFDKYW6H.js} +4 -3
- package/{appDeleteCommands-IPF2VI3W.js → appDeleteCommands-BEVZGCAG.js} +29 -27
- package/{appDeployCommands-IBQ7GUXO.js → appDeployCommands-E7TFCHSP.js} +29 -27
- package/{appDeployStatusCommands-6ESVU6XE.js → appDeployStatusCommands-MYY5Z5G3.js} +29 -27
- package/{appGetCommands-VTSYTM4V.js → appGetCommands-HNED5JUU.js} +29 -27
- package/{appListCommands-VCP5TUX7.js → appListCommands-MSBFWPIY.js} +29 -27
- package/{authCommand-RV5MQDWN.js → authCommand-W34UWJGR.js} +14 -13
- package/{builtinSkillRegistry-7RAJP7FD.js → builtinSkillRegistry-NJVHQIKY.js} +1 -1
- package/{chromeOpsCommands-BA6CS4DI.js → chromeOpsCommands-USKE4B4K.js} +15 -4
- package/{chunk-RE3B2OCC.js → chunk-266E37EL.js} +69 -14
- package/chunk-2BMURXSB.js +1863 -0
- package/{chunk-NABJEYPJ.js → chunk-2Q3LOAFE.js} +38 -3
- package/{chunk-EOLPKHSB.js → chunk-326HCB6L.js} +28 -24
- package/{chunk-4CEAZRZ4.js → chunk-33W4IFUU.js} +1 -1
- package/{chunk-V3MGT3RF.js → chunk-3CWF2EUZ.js} +8 -8
- package/{chunk-G6OOUQWJ.js → chunk-4KB6WQUL.js} +2 -0
- package/{chunk-DYQXB46J.js → chunk-4KPB3KWX.js} +2 -2
- package/{chunk-WAZ6BTSC.js → chunk-5E4FSR4J.js} +1 -1
- package/{chunk-PVD7CRYV.js → chunk-6I7ZP7KJ.js} +3 -3
- package/chunk-6UBGXX2W.js +12 -0
- package/{chunk-ZBCBFOWC.js → chunk-A2ZMIRLN.js} +2 -2
- package/{chunk-Z646E5YH.js → chunk-ASG7VWPK.js} +3 -3
- package/{chunk-QWVGFBOQ.js → chunk-BLFZULEQ.js} +3 -3
- package/{chunk-RRHJJUA3.js → chunk-BRZTSZBG.js} +174 -100
- package/{chunk-JIFYXQRD.js → chunk-BTYQAODF.js} +26 -8
- package/{chunk-KORCRPLO.js → chunk-C7PKPHK6.js} +334 -12
- package/{chunk-6WZQGT5X.js → chunk-CJ37ZMCQ.js} +6 -2
- package/{chunk-VHGD6FHV.js → chunk-CKAHAVMK.js} +40 -10
- package/{chunk-UNOILAZP.js → chunk-CLTGWJVT.js} +76 -4
- package/{chunk-Q6RMLYSA.js → chunk-CMLBKYEI.js} +4 -2
- package/{chunk-NVOYW6H4.js → chunk-CQHMBWZH.js} +12 -8
- package/{chunk-7KWPNGVJ.js → chunk-CTZ4O3XD.js} +1 -1
- package/{chunk-OHRDHS4N.js → chunk-CVCRAO6Q.js} +9 -4
- package/{chunk-26CRLZFD.js → chunk-D57YYGMD.js} +2 -2
- package/{chunk-TEC5UHQK.js → chunk-DHJXDGC3.js} +2 -2
- package/{chunk-QYOB7RVA.js → chunk-DKZJJ2NQ.js} +3 -2
- package/{chunk-4YX7VQOC.js → chunk-E2FC5RMU.js} +17 -14
- package/{chunk-EH4MNUMF.js → chunk-ETTDZBK5.js} +4 -4
- package/{chunk-ZWQUWF6W.js → chunk-G7Y4GXTY.js} +8 -14
- package/{chunk-5KTQVMCX.js → chunk-GOO6G4PY.js} +85 -0
- package/{chunk-FMOZ57LN.js → chunk-H7HWWNJB.js} +1 -1
- package/{chunk-SW5AAI5D.js → chunk-HKMPGHFZ.js} +5 -5
- package/{chunk-H44LQSZ2.js → chunk-HKWGI3TM.js} +178 -311
- package/{chunk-BBGYSMUE.js → chunk-JH7KMNGT.js} +143 -19
- package/{chunk-YXMZHGNA.js → chunk-KDUYNEJ5.js} +33 -16
- package/{chunk-FEKMTBKJ.js → chunk-LAYFVGS4.js} +192 -55
- package/{chunk-O5V7QQAF.js → chunk-LEX6DEH4.js} +114 -2
- package/{chunk-BTBT2566.js → chunk-MNUOMXJH.js} +412 -9
- package/{chunk-N7E3LQ4A.js → chunk-MZXWSY4E.js} +1 -1
- package/{chunk-ZQ3EAOY3.js → chunk-NTLJGRAT.js} +1 -1
- package/{chunk-BUXH3H5M.js → chunk-OIB4GARE.js} +3743 -4848
- package/{chunk-WFUIXNKC.js → chunk-P4YLK2OD.js} +3 -3
- package/chunk-PRJ473FK.js +63 -0
- package/{chunk-2SHLT6JB.js → chunk-Q7GNBUT4.js} +2 -2
- package/{chunk-C2UXCAMB.js → chunk-RIKSN62L.js} +3 -3
- package/{chunk-GTP6VNWH.js → chunk-RQ22OZD7.js} +3 -3
- package/{chunk-H7NIQGTU.js → chunk-RS66RJLA.js} +2 -2
- package/{chunk-GC64WGMD.js → chunk-SM3NSZJV.js} +16 -5
- package/{chunk-QKDMI22S.js → chunk-SSK4WNJA.js} +1 -1
- package/{chunk-6MAFLMAO.js → chunk-SUBNV2JH.js} +3 -3
- package/{chunk-HLAL63BZ.js → chunk-T43B7LB2.js} +1 -1
- package/{chunk-HTLIKE5U.js → chunk-TWVVTUNG.js} +2 -2
- package/{chunk-X3RWBJDQ.js → chunk-U7HTU2S7.js} +1 -1
- package/{chunk-76YUTLOT.js → chunk-UIOEHFF6.js} +1 -1
- package/{chunk-IIX6VWLW.js → chunk-VCFU3BO5.js} +224 -38
- package/{chunk-QU3TLYBR.js → chunk-VEUSD6OF.js} +35 -11
- package/{chunk-4YMD7B4Y.js → chunk-WPOKOKZA.js} +2 -2
- package/{chunk-A5VR65AE.js → chunk-WPQGLJHU.js} +4 -4
- package/{chunk-K6TZSON4.js → chunk-WTKYP6QO.js} +19 -5
- package/{chunk-ZSO5B6SW.js → chunk-Y2WUYX4I.js} +9 -0
- package/{chunk-A3SXTJDE.js → chunk-YAGFPXOX.js} +14 -14
- package/{chunk-TVGX5QIN.js → chunk-YUA6OAH5.js} +2 -2
- package/{chunk-NYE2INIO.js → chunk-YV2RSLM4.js} +13 -13
- package/{chunk-MJWUBTK7.js → chunk-YZGNKHUM.js} +2 -2
- package/{commandRegistry-YFXWA5SF.js → commandRegistry-ZU3RX7A2.js} +87 -67
- package/{contentThunks-2BV7CFUP.js → contentThunks-I4IHSDTM.js} +14 -13
- package/{cooldownCommands-KRILPXOZ.js → cooldownCommands-5SJ74DNP.js} +1 -1
- package/{createAgentAutomationAction-T6CGXCSO.js → createAgentAutomationAction-WQCH5HR2.js} +14 -13
- package/{createDialogAction-X27IA3G2.js → createDialogAction-CKMZK5JQ.js} +15 -14
- package/{createPageAction-EHDHNW5P.js → createPageAction-QAZHQGY7.js} +14 -13
- package/{dialogCommands-XZXH3HSQ.js → dialogCommands-NEQ6NW5H.js} +30 -28
- package/{dialogSlice-AZNPVOCU.js → dialogSlice-GEGACCH2.js} +13 -12
- package/{docCreateCommands-Z64V5BFZ.js → docCreateCommands-EXV267FP.js} +28 -26
- package/{docDeleteCommands-7UFHIM4C.js → docDeleteCommands-TSBILA2Z.js} +29 -27
- package/{docReadCommands-NLU7Y67R.js → docReadCommands-AKVYHITD.js} +28 -26
- package/{docStore-M37Q6JFO.js → docStore-B4EFT53J.js} +1 -1
- package/{docUpdateCommands-S2KGBEG3.js → docUpdateCommands-G6GULDGZ.js} +28 -26
- package/{fetchMessages-HWBVATSE.js → fetchMessages-YY4SATNR.js} +1 -1
- package/{getPricing-E2PLNWCR.js → getPricing-3PQY3TGI.js} +3 -3
- package/{handleSendMessageAction-KUJQZ6B6.js → handleSendMessageAction-4BACQWOG.js} +70 -29
- package/index.js +7 -7
- package/{lib-4YTWAGY7.js → lib-5KKIBFIT.js} +439 -272
- package/{localDialogRead-CT5HGDMC.js → localDialogRead-FUXGZ57B.js} +1 -1
- package/{localRuntimeAdapter-5BNHO6JZ.js → localRuntimeAdapter-MTDULOUZ.js} +45 -43
- package/{machineCommands-2KDROAVV.js → machineCommands-OGHHBRV3.js} +48 -46
- package/{machineWsRunDispatch-4NP5M574.js → machineWsRunDispatch-R6DNC3H7.js} +46 -44
- package/{models-UUNO6DOL.js → models-PJBE6JDV.js} +2 -2
- package/{oauthTokenStore-PADKLNOC.js → oauthTokenStore-OEERZFUC.js} +2 -1
- package/package.json +1 -1
- package/{providerPresetApply-JGNMO2KX.js → providerPresetApply-HBBUUVJD.js} +6 -6
- package/{providerRegistry-33J3ZYFJ.js → providerRegistry-5LK2NXYE.js} +6 -6
- package/{readlineWorkspace-MKUSR6HA.js → readlineWorkspace-NC2O4DQP.js} +290 -121
- package/{runAgentClientLoop-J32KRVN7.js → runAgentClientLoop-QKV66PX5.js} +31 -30
- package/{runtimeDoctorCommands-NYBOTA6D.js → runtimeDoctorCommands-3VFVTGPI.js} +8 -7
- package/{secretCommands-N6CMCJDZ.js → secretCommands-MKU25CDP.js} +311 -3
- package/{settingThunks-YRYNPWJM.js → settingThunks-4WU7YE62.js} +2 -2
- package/{skillDiscovery-F3TMVQOJ.js → skillDiscovery-BKLWW2EZ.js} +2 -2
- package/{spaceCommands-VV4K7TGI.js → spaceCommands-J7BRTTM3.js} +27 -25
- package/{streamAgentChatTurn-S2Q7STXS.js → streamAgentChatTurn-GM3UNSLS.js} +46 -43
- package/{tools-KOIPW4ZA.js → tools-UJLEQBKI.js} +25 -24
- package/{tuiSummaryLlmCaller-FSOADMXK.js → tuiSummaryLlmCaller-73QO3HAD.js} +12 -12
- package/{updateCommands-KE6LP3QX.js → updateCommands-RVDAFHBT.js} +3 -3
- package/{updateDialogTitleAction-ILS5OIXF.js → updateDialogTitleAction-24QO27NT.js} +14 -13
- package/{windowsSelfUpdate-26TSFXEZ.js → windowsSelfUpdate-N2VH2OBW.js} +2 -2
|
@@ -5,15 +5,15 @@ import {
|
|
|
5
5
|
ANTIGRAVITY_CLOUD_CODE_BASE_URL,
|
|
6
6
|
isAntigravityCloudCodeBaseUrl,
|
|
7
7
|
isAntigravityOAuthAgent
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-VEUSD6OF.js";
|
|
9
9
|
import {
|
|
10
10
|
isOpenAiResponsesModel,
|
|
11
11
|
resolvePlatformChatCompletionsEndpoint,
|
|
12
12
|
resolvePlatformResponsesEndpoint
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-YUA6OAH5.js";
|
|
14
14
|
import {
|
|
15
15
|
findModelConfig
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-SM3NSZJV.js";
|
|
17
17
|
import {
|
|
18
18
|
asOptionalTrimmedString
|
|
19
19
|
} from "./chunk-G3SUCT4W.js";
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// packages/agent-runtime/skillSlashReference.ts
|
|
2
|
+
var DEFAULT_SKILL_SLASH_USER_PROMPT = "\u8BF7\u6309\u7167\u8BE5\u6280\u80FD\u7684\u6307\u793A\u6267\u884C\u3002";
|
|
3
|
+
function resolveSkillSlashUserPrompt(args) {
|
|
4
|
+
const trimmed = args.replace(/^\s+/, "");
|
|
5
|
+
return trimmed.length > 0 ? trimmed : DEFAULT_SKILL_SLASH_USER_PROMPT;
|
|
6
|
+
}
|
|
7
|
+
function isNonEmpty(value) {
|
|
8
|
+
return typeof value === "string" && value.trim().length > 0;
|
|
9
|
+
}
|
|
10
|
+
function formatSkillSlashReference(reference) {
|
|
11
|
+
let payload;
|
|
12
|
+
switch (reference.source) {
|
|
13
|
+
case "builtin":
|
|
14
|
+
if (!isNonEmpty(reference.id)) throw new TypeError("Empty builtin skill id");
|
|
15
|
+
payload = reference.id;
|
|
16
|
+
break;
|
|
17
|
+
case "space":
|
|
18
|
+
if (!isNonEmpty(reference.dbKey)) throw new TypeError("Empty space skill dbKey");
|
|
19
|
+
payload = reference.dbKey;
|
|
20
|
+
break;
|
|
21
|
+
case "project":
|
|
22
|
+
if (!isNonEmpty(reference.projectBinding) || !isNonEmpty(reference.relativePath)) {
|
|
23
|
+
throw new TypeError("Empty project skill binding or relative path");
|
|
24
|
+
}
|
|
25
|
+
payload = JSON.stringify([reference.projectBinding, reference.relativePath]);
|
|
26
|
+
break;
|
|
27
|
+
default:
|
|
28
|
+
throw new TypeError("Unknown skill source");
|
|
29
|
+
}
|
|
30
|
+
return `/skill@${reference.source}:${encodeURIComponent(payload)}`;
|
|
31
|
+
}
|
|
32
|
+
function parseSkillSlashReference(input) {
|
|
33
|
+
const match = /^\/skill@([^:\s]+):(\S+)([\s\S]*)$/.exec(input);
|
|
34
|
+
if (!match) return null;
|
|
35
|
+
const [, source, encoded, args] = match;
|
|
36
|
+
if (source !== "builtin" && source !== "space" && source !== "project") return null;
|
|
37
|
+
try {
|
|
38
|
+
const payload = decodeURIComponent(encoded);
|
|
39
|
+
if (!isNonEmpty(payload)) return null;
|
|
40
|
+
switch (source) {
|
|
41
|
+
case "builtin":
|
|
42
|
+
return { reference: { source, id: payload }, args };
|
|
43
|
+
case "space":
|
|
44
|
+
return { reference: { source, dbKey: payload }, args };
|
|
45
|
+
case "project": {
|
|
46
|
+
const pair = JSON.parse(payload);
|
|
47
|
+
if (!Array.isArray(pair) || pair.length !== 2 || !pair.every(isNonEmpty)) return null;
|
|
48
|
+
return {
|
|
49
|
+
reference: { source, projectBinding: pair[0], relativePath: pair[1] },
|
|
50
|
+
args
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
} catch {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export {
|
|
60
|
+
resolveSkillSlashUserPrompt,
|
|
61
|
+
formatSkillSlashReference,
|
|
62
|
+
parseSkillSlashReference
|
|
63
|
+
};
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
isAgentSkillDisabled,
|
|
5
5
|
resolveAgentSkillConfig,
|
|
6
6
|
resolveUserEnabledSkills
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-DKZJJ2NQ.js";
|
|
8
8
|
import {
|
|
9
9
|
resolveBuiltinSkillEntry,
|
|
10
10
|
resolveBuiltinSkillPage,
|
|
11
11
|
resolveSkillGraphFromRoots
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-LEX6DEH4.js";
|
|
13
13
|
import {
|
|
14
14
|
parseSkillDocProtocol
|
|
15
15
|
} from "./chunk-AETZ7AD6.js";
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
clipMultilineText,
|
|
3
3
|
fetchAndSerializeTable,
|
|
4
4
|
waitForAbortableDelay
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-C7PKPHK6.js";
|
|
6
6
|
import {
|
|
7
7
|
isGatewayHttpStatus
|
|
8
8
|
} from "./chunk-NF64D32W.js";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
} from "./chunk-AGIM7IMJ.js";
|
|
22
22
|
import {
|
|
23
23
|
fetchAndCacheMessages
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-326HCB6L.js";
|
|
25
25
|
import {
|
|
26
26
|
createSpaceKey
|
|
27
27
|
} from "./chunk-UAD2WT54.js";
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
extractRuntimePageCapabilities,
|
|
36
36
|
resolveBuiltinSkillPage,
|
|
37
37
|
resolveSkillGraphFromRoots
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-LEX6DEH4.js";
|
|
39
39
|
import {
|
|
40
40
|
isAbortError
|
|
41
41
|
} from "./chunk-7DPNBQSV.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getModelPricing
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-A2ZMIRLN.js";
|
|
4
4
|
import {
|
|
5
5
|
PUBLIC_DEEPSEEK_V4_FLASH_AGENT_ID,
|
|
6
6
|
PUBLIC_DEEPSEEK_V4_PRO_AGENT_ID,
|
|
@@ -23,14 +23,14 @@ import {
|
|
|
23
23
|
} from "./chunk-M2EJHDJP.js";
|
|
24
24
|
import {
|
|
25
25
|
getModelConfig
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-SM3NSZJV.js";
|
|
27
27
|
import {
|
|
28
28
|
isRecord
|
|
29
29
|
} from "./chunk-KUG52IAP.js";
|
|
30
30
|
import {
|
|
31
31
|
isNoloHostedProvider,
|
|
32
32
|
isPlatformHostedImageModel
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-GOO6G4PY.js";
|
|
34
34
|
|
|
35
35
|
// packages/core/publicAgentSeeds.ts
|
|
36
36
|
var AGENT_SEED_DEFAULTS = {
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
} from "./chunk-NBTY7YJF.js";
|
|
6
6
|
import {
|
|
7
7
|
resolveCliLocalRuntimeKeyCapability
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-HKWGI3TM.js";
|
|
9
9
|
import {
|
|
10
10
|
HIGH_RISK_MUTATION_TOOL_NAMES
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-2Q3LOAFE.js";
|
|
12
12
|
import {
|
|
13
13
|
DEFAULT_NOLO_SERVER_URL
|
|
14
14
|
} from "./chunk-OLZBQWZU.js";
|
|
@@ -7,9 +7,10 @@ import {
|
|
|
7
7
|
gmiModels,
|
|
8
8
|
openrouterModels,
|
|
9
9
|
platformHostedModels,
|
|
10
|
+
resolvePlatformEffectiveModel,
|
|
10
11
|
toCnyCredits,
|
|
11
12
|
zaiModels
|
|
12
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-GOO6G4PY.js";
|
|
13
14
|
|
|
14
15
|
// packages/integrations/qwen/models.ts
|
|
15
16
|
var qwenModels = [
|
|
@@ -2361,11 +2362,12 @@ var REASONING_EFFORT_OPTIONS = [
|
|
|
2361
2362
|
"medium",
|
|
2362
2363
|
"high",
|
|
2363
2364
|
"xhigh",
|
|
2364
|
-
"max"
|
|
2365
|
+
"max",
|
|
2366
|
+
"ultra"
|
|
2365
2367
|
];
|
|
2366
2368
|
var PROVIDER_REASONING_EFFORT_VALUES = {
|
|
2367
|
-
openai: ["none", "minimal", "low", "medium", "high", "xhigh", "max"],
|
|
2368
|
-
openrouter: ["none", "minimal", "low", "medium", "high", "xhigh", "max"],
|
|
2369
|
+
openai: ["none", "minimal", "low", "medium", "high", "xhigh", "max", "ultra"],
|
|
2370
|
+
openrouter: ["none", "minimal", "low", "medium", "high", "xhigh", "max", "ultra"],
|
|
2369
2371
|
deepseek: ["low", "high", "max"],
|
|
2370
2372
|
// nolo (Ollama Cloud) 支持 DeepSeek/Kimi/GLM 等 thinking 模型,
|
|
2371
2373
|
// reasoning_effort 通过 OpenAI 兼容端点透传到 Ollama Cloud。
|
|
@@ -3219,6 +3221,7 @@ var REASONING_MODEL_NAMES = /* @__PURE__ */ new Set([
|
|
|
3219
3221
|
"gpt-5.5-pro",
|
|
3220
3222
|
"gpt-6-astra",
|
|
3221
3223
|
"gpt-6.1-sol",
|
|
3224
|
+
"gpt-6.1-terra",
|
|
3222
3225
|
"gpt-6-sol",
|
|
3223
3226
|
"gpt-6-luna",
|
|
3224
3227
|
"gpt-5.6-sol",
|
|
@@ -3254,7 +3257,8 @@ var EFFORT_ORDER = [
|
|
|
3254
3257
|
"medium",
|
|
3255
3258
|
"high",
|
|
3256
3259
|
"xhigh",
|
|
3257
|
-
"max"
|
|
3260
|
+
"max",
|
|
3261
|
+
"ultra"
|
|
3258
3262
|
];
|
|
3259
3263
|
function nearestSupportedEffort(effort, supported) {
|
|
3260
3264
|
const effortIdx = EFFORT_ORDER.indexOf(effort);
|
|
@@ -3440,6 +3444,13 @@ var findOpenRouterUpstreamModel = (name) => {
|
|
|
3440
3444
|
function findModelConfig(provider, name) {
|
|
3441
3445
|
const normalizedProvider = normalizeLookupProvider(provider);
|
|
3442
3446
|
if (!normalizedProvider) return null;
|
|
3447
|
+
if (normalizedProvider === "nolo") {
|
|
3448
|
+
const effective = resolvePlatformEffectiveModel(name);
|
|
3449
|
+
if (effective && effective !== name) {
|
|
3450
|
+
const aliased = findCandidateInProvider(normalizedProvider, effective);
|
|
3451
|
+
if (aliased) return aliased;
|
|
3452
|
+
}
|
|
3453
|
+
}
|
|
3443
3454
|
const direct = findCandidateInProvider(normalizedProvider, name);
|
|
3444
3455
|
if (direct) return direct;
|
|
3445
3456
|
if (normalizedProvider === "openrouter") {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fetchReferenceContents,
|
|
3
3
|
resolveReferenceAssets
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RIKSN62L.js";
|
|
5
5
|
import {
|
|
6
6
|
updateTokensAction
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-326HCB6L.js";
|
|
8
8
|
import {
|
|
9
9
|
applyUpdateTokensFulfilled
|
|
10
10
|
} from "./chunk-OWYYDMGJ.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
extractReasoningFromResponseOutput,
|
|
13
13
|
extractTextFromResponseOutput,
|
|
14
14
|
extractToolCallsFromResponseOutput
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-CVCRAO6Q.js";
|
|
16
16
|
import {
|
|
17
17
|
isRecord
|
|
18
18
|
} from "./chunk-KUG52IAP.js";
|
|
@@ -15,10 +15,10 @@ import {
|
|
|
15
15
|
} from "./chunk-Y6ROFCZO.js";
|
|
16
16
|
import {
|
|
17
17
|
scheduleWindowsSelfUpdate
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-5E4FSR4J.js";
|
|
19
19
|
import {
|
|
20
20
|
t
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-CLTGWJVT.js";
|
|
22
22
|
|
|
23
23
|
// packages/cli/updateCommands.ts
|
|
24
24
|
import { existsSync, readFileSync, accessSync, constants } from "node:fs";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-HNUWUO75.js";
|
|
4
4
|
import {
|
|
5
5
|
resolveToolImagePolicy
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6I7ZP7KJ.js";
|
|
7
7
|
import {
|
|
8
8
|
projectOpenAiToolImages
|
|
9
9
|
} from "./chunk-E2BESSAW.js";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
getAntigravityUserAgent,
|
|
12
12
|
readAntigravityProjectId,
|
|
13
13
|
resolveAntigravityCloudCodeBaseUrl
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-VEUSD6OF.js";
|
|
15
15
|
import {
|
|
16
16
|
asOptionalTrimmedString
|
|
17
17
|
} from "./chunk-G3SUCT4W.js";
|
|
@@ -408,7 +408,8 @@ function sanitizeGeminiSchemaNodeInner(src, out, seen) {
|
|
|
408
408
|
if (typeof firstNonNull === "string") out.type = firstNonNull;
|
|
409
409
|
out.nullable = true;
|
|
410
410
|
} else if (typeof src.type === "string") {
|
|
411
|
-
out.type = src.type;
|
|
411
|
+
out.type = src.type === "null" ? "string" : src.type;
|
|
412
|
+
if (src.type === "null") out.nullable = true;
|
|
412
413
|
}
|
|
413
414
|
if (typeof src.description === "string") out.description = src.description;
|
|
414
415
|
if (typeof src.minimum === "number") out.minimum = src.minimum;
|
|
@@ -420,54 +421,229 @@ function sanitizeGeminiSchemaNodeInner(src, out, seen) {
|
|
|
420
421
|
enumMetaByNode.set(out, { values: enumValues, baseDescription });
|
|
421
422
|
applyGeminiEnum(out, geminiEnumFields(enumValues, baseDescription));
|
|
422
423
|
}
|
|
424
|
+
if (src.type === "null") {
|
|
425
|
+
out.description = [out.description, "null only"].filter(Boolean).join("\n");
|
|
426
|
+
}
|
|
423
427
|
const variantBranches = [
|
|
424
428
|
...Array.isArray(src.oneOf) ? src.oneOf : [],
|
|
425
429
|
...Array.isArray(src.anyOf) ? src.anyOf : []
|
|
426
430
|
];
|
|
427
431
|
if (variantBranches.length > 0) {
|
|
428
|
-
const
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
432
|
+
const rawBranches = variantBranches.map(
|
|
433
|
+
(branch) => branch && typeof branch === "object" && !Array.isArray(branch) ? branch : {}
|
|
434
|
+
);
|
|
435
|
+
const allSanitized = variantBranches.map(
|
|
436
|
+
(branch) => sanitizeGeminiSchemaNode(branch, seen)
|
|
437
|
+
);
|
|
438
|
+
if (rawBranches.some(
|
|
439
|
+
(branch, index) => branch.type === "null" || allSanitized[index]?.nullable === true || rawEnumValues(branch)?.includes(null)
|
|
440
|
+
)) out.nullable = true;
|
|
441
|
+
const nonNullIndices = rawBranches.flatMap(
|
|
442
|
+
(branch, index) => branch.type === "null" ? [] : [index]
|
|
443
|
+
);
|
|
444
|
+
const branches = nonNullIndices.map((index) => rawBranches[index]);
|
|
445
|
+
const sanitizedBranches = nonNullIndices.map((index) => allSanitized[index]);
|
|
446
|
+
const inferType = (branch) => {
|
|
447
|
+
if (typeof branch.type === "string") return branch.type;
|
|
448
|
+
const values = rawEnumValues(branch)?.filter((value) => value !== null);
|
|
449
|
+
if (!values?.length) return void 0;
|
|
450
|
+
if (values.every((value) => typeof value === "number")) {
|
|
451
|
+
return values.every((value) => Number.isInteger(value)) ? "integer" : "number";
|
|
452
|
+
}
|
|
453
|
+
if (values.every((value) => typeof value === "boolean")) return "boolean";
|
|
454
|
+
if (values.every((value) => typeof value === "string")) return "string";
|
|
455
|
+
return void 0;
|
|
456
|
+
};
|
|
457
|
+
const candidateTypes = (branch, active = /* @__PURE__ */ new Set()) => {
|
|
458
|
+
if (active.has(branch)) return [];
|
|
459
|
+
active.add(branch);
|
|
460
|
+
const nested = [branch.oneOf, branch.anyOf].flatMap((value) => Array.isArray(value) ? value : []);
|
|
461
|
+
const type = inferType(branch);
|
|
462
|
+
const types = [
|
|
463
|
+
...type && type !== "null" ? [type] : [],
|
|
464
|
+
...nested.flatMap((value) => value && typeof value === "object" ? candidateTypes(value, active) : [])
|
|
465
|
+
];
|
|
466
|
+
active.delete(branch);
|
|
467
|
+
return types;
|
|
468
|
+
};
|
|
469
|
+
const unconstrainedBranch = branches.some(
|
|
470
|
+
(branch) => branch.type === void 0 && rawEnumValues(branch) === void 0 && branch.properties === void 0 && branch.oneOf === void 0 && branch.anyOf === void 0 && branch.allOf === void 0 && branch.$ref === void 0
|
|
471
|
+
);
|
|
472
|
+
if (sanitizedBranches.every(
|
|
473
|
+
(branch) => branch.properties === void 0 && branch.required === void 0
|
|
474
|
+
)) {
|
|
475
|
+
const types = [...new Set(branches.flatMap((branch) => candidateTypes(branch)))];
|
|
476
|
+
const first = sanitizedBranches[0] ?? {};
|
|
477
|
+
const baseDescription = typeof out.description === "string" ? out.description : typeof branches[0]?.description === "string" ? branches[0].description : void 0;
|
|
478
|
+
const scalar = {
|
|
479
|
+
...first,
|
|
480
|
+
type: types.length > 0 && types.every((type) => type === "integer" || type === "number") ? types.includes("number") ? "number" : "integer" : types[0] ?? "string",
|
|
481
|
+
...out
|
|
482
|
+
};
|
|
483
|
+
delete scalar.description;
|
|
484
|
+
if (baseDescription !== void 0) scalar.description = baseDescription;
|
|
485
|
+
if (!enumValues) {
|
|
486
|
+
delete scalar.enum;
|
|
487
|
+
const values = branches.flatMap(
|
|
488
|
+
(branch, index) => rawEnumValues(branch) ?? enumMetaOf(sanitizedBranches[index])?.values ?? []
|
|
489
|
+
);
|
|
490
|
+
const allEnum = branches.length > 0 && branches.every(
|
|
491
|
+
(branch, index) => rawEnumValues(branch) !== void 0 || enumMetaOf(sanitizedBranches[index]) !== void 0
|
|
492
|
+
);
|
|
493
|
+
if (values.length > 0) {
|
|
494
|
+
if (allEnum) {
|
|
495
|
+
if (typeof out.type !== "string") {
|
|
496
|
+
scalar.type = inferType({ enum: values }) ?? "string";
|
|
497
|
+
}
|
|
498
|
+
applyGeminiEnum(scalar, geminiEnumFields(values, baseDescription));
|
|
499
|
+
enumMetaByNode.set(out, { values, baseDescription });
|
|
500
|
+
} else {
|
|
501
|
+
scalar.description = [
|
|
502
|
+
baseDescription,
|
|
503
|
+
`Candidates: ${[...new Set(values.map(geminiEnumLiteral))].join(", ")}`
|
|
504
|
+
].filter(Boolean).join("\n");
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
const conflictingRanges = [];
|
|
509
|
+
for (const key of ["minimum", "maximum", "minLength", "maxLength"]) {
|
|
510
|
+
if (typeof src[key] === "number") {
|
|
511
|
+
scalar[key] = src[key];
|
|
512
|
+
continue;
|
|
513
|
+
}
|
|
514
|
+
const values = branches.map((branch) => branch[key]).filter((value) => typeof value === "number");
|
|
515
|
+
if (values.length !== branches.length || new Set(values).size > 1) {
|
|
516
|
+
delete scalar[key];
|
|
517
|
+
if (values.length > 0 && conflictingRanges.length === 0) {
|
|
518
|
+
conflictingRanges.push(...branches.map((branch) => Object.fromEntries(
|
|
519
|
+
["minimum", "maximum", "minLength", "maxLength"].flatMap(
|
|
520
|
+
(name) => typeof branch[name] === "number" ? [[name, branch[name]]] : []
|
|
521
|
+
)
|
|
522
|
+
)));
|
|
523
|
+
}
|
|
524
|
+
} else if (values.length > 0) scalar[key] = values[0];
|
|
525
|
+
}
|
|
526
|
+
if (conflictingRanges.length > 0) {
|
|
527
|
+
scalar.description = [
|
|
528
|
+
scalar.description,
|
|
529
|
+
`Original ranges: ${conflictingRanges.map((range) => JSON.stringify(range)).join(" | ")}`
|
|
530
|
+
].filter(Boolean).join("\n");
|
|
531
|
+
}
|
|
532
|
+
const stableValue = (value) => {
|
|
533
|
+
if (Array.isArray(value)) return value.map(stableValue);
|
|
534
|
+
if (value && typeof value === "object") return Object.fromEntries(
|
|
535
|
+
Object.keys(value).sort().map((key) => [key, stableValue(value[key])])
|
|
536
|
+
);
|
|
537
|
+
return value;
|
|
538
|
+
};
|
|
539
|
+
if (src.items === void 0 && branches.some((branch) => branch.items !== void 0)) {
|
|
540
|
+
const firstItems = branches[0]?.items;
|
|
541
|
+
const sameItems = firstItems !== void 0 && branches.every(
|
|
542
|
+
(branch) => branch.items !== void 0 && JSON.stringify(stableValue(branch.items)) === JSON.stringify(stableValue(firstItems))
|
|
543
|
+
);
|
|
544
|
+
if (!sameItems) {
|
|
545
|
+
const itemTypes = branches.map((branch) => {
|
|
546
|
+
const items = branch.items;
|
|
547
|
+
return items && typeof items === "object" && !Array.isArray(items) ? items.type : void 0;
|
|
548
|
+
});
|
|
549
|
+
const commonType = itemTypes[0];
|
|
550
|
+
const fallbackType = typeof commonType === "string" && ["string", "integer", "number", "boolean", "object", "array"].includes(commonType) && itemTypes.every((type) => type === commonType) ? commonType : "string";
|
|
551
|
+
scalar.items = fallbackType === "array" ? { type: "array", items: { type: "string" } } : { type: fallbackType };
|
|
552
|
+
scalar.description = [
|
|
553
|
+
scalar.description,
|
|
554
|
+
`Original items: ${branches.map((branch) => branch.items === void 0 ? "unconstrained" : geminiEnumLiteral(branch.items)).join(" | ")}`
|
|
555
|
+
].filter(Boolean).join("\n");
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
const originalConstraints = branches.map((branch) => Object.fromEntries(
|
|
559
|
+
["pattern", "format"].flatMap((key) => branch[key] !== void 0 ? [[key, branch[key]]] : [])
|
|
560
|
+
));
|
|
561
|
+
if (originalConstraints.some((constraints) => Object.keys(constraints).length > 0)) {
|
|
562
|
+
scalar.description = [
|
|
563
|
+
scalar.description,
|
|
564
|
+
`Original constraints: ${originalConstraints.map((value) => JSON.stringify(value)).join(" | ")}`
|
|
565
|
+
].filter(Boolean).join("\n");
|
|
566
|
+
}
|
|
567
|
+
for (let index = 0; index < branches.length; index++) {
|
|
568
|
+
if ((branches[index].oneOf || branches[index].anyOf) && sanitizedBranches[index].description) {
|
|
569
|
+
scalar.description = [
|
|
570
|
+
scalar.description,
|
|
571
|
+
`Branch ${index + 1}: ${sanitizedBranches[index].description}`
|
|
572
|
+
].filter(Boolean).join("\n");
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
if (types.length > 1) {
|
|
576
|
+
scalar.description = [scalar.description, `One of: ${types.join(" | ")}`].filter(Boolean).join("\n");
|
|
577
|
+
}
|
|
578
|
+
if (branches.length === 0) {
|
|
579
|
+
scalar.description = [scalar.description, "null only"].filter(Boolean).join("\n");
|
|
580
|
+
} else if (branches.some((branch) => inferType(branch) === void 0 && rawEnumValues(branch)?.some((value) => value !== null))) {
|
|
581
|
+
scalar.description = [scalar.description, "Mixed enum types; using a fallback type"].filter(Boolean).join("\n");
|
|
582
|
+
}
|
|
583
|
+
Object.assign(out, scalar);
|
|
584
|
+
} else {
|
|
585
|
+
const mergedProperties = {};
|
|
586
|
+
let requiredIntersection;
|
|
587
|
+
for (const sanitized of sanitizedBranches) {
|
|
588
|
+
const branchProperties = sanitized.properties ?? {};
|
|
589
|
+
for (const [key, value] of Object.entries(branchProperties)) {
|
|
590
|
+
const previous = mergedProperties[key];
|
|
591
|
+
const prevMeta = enumMetaOf(previous);
|
|
592
|
+
const nextMeta = enumMetaOf(value);
|
|
593
|
+
if (prevMeta && nextMeta) {
|
|
594
|
+
const values = [...prevMeta.values, ...nextMeta.values];
|
|
595
|
+
const baseDescription = nextMeta.baseDescription ?? prevMeta.baseDescription;
|
|
596
|
+
const node = {
|
|
597
|
+
...value
|
|
598
|
+
};
|
|
599
|
+
delete node.enum;
|
|
600
|
+
delete node.description;
|
|
601
|
+
applyGeminiEnum(node, geminiEnumFields(values, baseDescription));
|
|
602
|
+
enumMetaByNode.set(node, { values, baseDescription });
|
|
603
|
+
mergedProperties[key] = node;
|
|
604
|
+
} else {
|
|
605
|
+
mergedProperties[key] = value;
|
|
606
|
+
}
|
|
450
607
|
}
|
|
608
|
+
const branchRequired = Array.isArray(sanitized.required) ? sanitized.required : [];
|
|
609
|
+
requiredIntersection = requiredIntersection === void 0 ? [...branchRequired] : requiredIntersection.filter((r) => branchRequired.includes(r));
|
|
610
|
+
}
|
|
611
|
+
out.properties = {
|
|
612
|
+
...out.properties ?? {},
|
|
613
|
+
...mergedProperties
|
|
614
|
+
};
|
|
615
|
+
if (requiredIntersection !== void 0 && requiredIntersection.length > 0) {
|
|
616
|
+
out.required = requiredIntersection;
|
|
617
|
+
}
|
|
618
|
+
if (typeof out.type !== "string") out.type = "object";
|
|
619
|
+
if (sanitizedBranches.some((branch) => branch.properties === void 0)) {
|
|
620
|
+
const types = [...new Set(branches.flatMap(
|
|
621
|
+
(branch) => branch.properties !== void 0 ? ["object"] : candidateTypes(branch)
|
|
622
|
+
))].sort();
|
|
623
|
+
if (rawBranches.some((branch) => branch.type === "null")) types.push("null");
|
|
624
|
+
out.description = [
|
|
625
|
+
out.description,
|
|
626
|
+
`One of: ${types.join(" | ")}. This declaration represents only one branch of the union; other candidates are not structurally represented.`
|
|
627
|
+
].filter(Boolean).join("\n");
|
|
451
628
|
}
|
|
452
|
-
const branchRequired = Array.isArray(sanitized.required) ? sanitized.required : [];
|
|
453
|
-
requiredIntersection = requiredIntersection === void 0 ? [...branchRequired] : requiredIntersection.filter((r) => branchRequired.includes(r));
|
|
454
629
|
}
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
out.
|
|
630
|
+
if (unconstrainedBranch) {
|
|
631
|
+
out.description = [
|
|
632
|
+
out.description,
|
|
633
|
+
"An unconstrained branch accepts any JSON value (any value, including null). This declaration uses a fallback type and cannot express the full union."
|
|
634
|
+
].filter(Boolean).join("\n");
|
|
635
|
+
if (src.type === void 0) out.nullable = true;
|
|
461
636
|
}
|
|
462
|
-
if (typeof out.type !== "string") out.type = "object";
|
|
463
637
|
}
|
|
464
638
|
if (Array.isArray(src.allOf)) {
|
|
465
639
|
for (const branch of src.allOf) {
|
|
466
640
|
const sanitized = sanitizeGeminiSchemaNode(branch, seen);
|
|
467
|
-
out.properties
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
641
|
+
if (out.type === void 0 || out.type === "object" || out.properties || sanitized.properties) {
|
|
642
|
+
out.properties = {
|
|
643
|
+
...out.properties ?? {},
|
|
644
|
+
...sanitized.properties ?? {}
|
|
645
|
+
};
|
|
646
|
+
}
|
|
471
647
|
if (Array.isArray(sanitized.required)) {
|
|
472
648
|
out.required = [
|
|
473
649
|
.../* @__PURE__ */ new Set([
|
|
@@ -501,6 +677,16 @@ function sanitizeGeminiSchemaNodeInner(src, out, seen) {
|
|
|
501
677
|
if (typeof out.type !== "string") out.type = "array";
|
|
502
678
|
}
|
|
503
679
|
if (typeof out.type !== "string") out.type = "object";
|
|
680
|
+
if (out.type === "array" && !out.items) out.items = { type: "string" };
|
|
681
|
+
if (out.type !== "object" && !out.properties) {
|
|
682
|
+
const dropped = Object.fromEntries(["minLength", "maxLength", "pattern", "format"].flatMap(
|
|
683
|
+
(key) => src[key] !== void 0 && out[key] === void 0 ? [[key, src[key]]] : []
|
|
684
|
+
));
|
|
685
|
+
if (Object.keys(dropped).length > 0) out.description = [
|
|
686
|
+
out.description,
|
|
687
|
+
`Original constraints: ${JSON.stringify(dropped)}`
|
|
688
|
+
].filter(Boolean).join("\n");
|
|
689
|
+
}
|
|
504
690
|
return out;
|
|
505
691
|
}
|
|
506
692
|
function convertOpenAiToolsToGemini(tools) {
|