nolo-cli 0.240.0-alpha.3 → 0.242.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -5
- package/{_executeModel-5NA4USGG.js → _executeModel-IZ2MCXHO.js} +77 -77
- package/{action-X75O3XPH.js → action-VDEW6WLI.js} +9 -9
- package/{addContentAction-GVC77QSN.js → addContentAction-7YVXHIPQ.js} +14 -14
- package/{addDialogAgentAction-KKDVAMW3.js → addDialogAgentAction-BX7B47HF.js} +17 -17
- package/{agentDeleteCommand-2RFGKFAB.js → agentDeleteCommand-N7ELXPLD.js} +107 -108
- package/{agentEmailCommands-GQCQKKOR.js → agentEmailCommands-OFS477PV.js} +110 -111
- package/{agentListCommands-HSGLDPDQ.js → agentListCommands-IQQHJSXP.js} +202 -164
- package/{agentMachineCommands-BISF6PVV.js → agentMachineCommands-NS65BEW7.js} +52 -49
- package/{agentProviderCommands-O3Q25PKU.js → agentProviderCommands-SS6M6VGY.js} +2 -2
- package/{agentPullCommand-G6U2LHMW.js → agentPullCommand-QQQZSC6S.js} +1 -1
- package/{agentRecordCommands-AOXPGYAJ.js → agentRecordCommands-4VE7CNLC.js} +103 -104
- package/{agentRunCommand-AFAIP7U7.js → agentRunCommand-2MUXHKNW.js} +109 -108
- package/{agentRunControl-VBL7UFSG.js → agentRunControl-55GL6Q3M.js} +11 -9
- package/{agentRuntimeLocal-T7BX2WGL.js → agentRuntimeLocal-5DB2P4MU.js} +51 -43
- package/{agentSlice-XJNKE3PG.js → agentSlice-5VTAFG43.js} +14 -14
- package/{appDeleteCommands-LURUSPY7.js → appDeleteCommands-EDKUPHJM.js} +52 -49
- package/{appDeployCommands-SMEW4AK2.js → appDeployCommands-JO74GW4L.js} +52 -49
- package/{appDeployStatusCommands-VYPJTBJK.js → appDeployStatusCommands-U77ZUHX7.js} +52 -49
- package/{appGetCommands-N4NI5GGJ.js → appGetCommands-QCMHBYPX.js} +52 -49
- package/{appListCommands-5C6ONN3Z.js → appListCommands-ZQJYEXI6.js} +52 -49
- package/{authCommand-4CVBDADE.js → authCommand-W4KXRZLI.js} +23 -19
- package/{authCommands-EHU2BHOX.js → authCommands-6AUYO65N.js} +10 -6
- package/{builtinSkillRegistry-AYWYQVA4.js → builtinSkillRegistry-GHE3RD3V.js} +6 -6
- package/{chromeCommands-G5UDKVSV.js → chromeCommands-S7AW3AOD.js} +383 -6
- package/{chromeOpsCommands-CSDG2HYN.js → chromeOpsCommands-TBPM6MR4.js} +1 -1
- package/{chunk-7TTMMOKH.js → chunk-247AAJRK.js} +1 -1
- package/{chunk-4X5AVCM7.js → chunk-2BSLGODA.js} +258 -23
- package/{chunk-P3IZUMIC.js → chunk-2N4UBHUU.js} +4 -4
- package/{chunk-A74QP4FI.js → chunk-2T5BHLID.js} +572 -208
- package/{chunk-H7ZYKHAZ.js → chunk-3OQFXODL.js} +102 -31
- package/{chunk-BIABIPGW.js → chunk-3ORFJP2Z.js} +1 -1
- package/{chunk-3FBAVU2Y.js → chunk-3UNAGTBW.js} +19 -84
- package/{chunk-DNZ4JJ7C.js → chunk-4F7SWSWO.js} +19 -6
- package/{chunk-2X7WFDT6.js → chunk-4FE3IWRE.js} +1 -1
- package/{chunk-N2JROHD3.js → chunk-4UK6UBXF.js} +3 -3
- package/{chunk-XS5A3EKX.js → chunk-4YFC3DWW.js} +75 -1
- package/chunk-53W5BXLN.js +340 -0
- package/{chunk-E5KJOZWY.js → chunk-5GRWWUB4.js} +3 -3
- package/{chunk-HCNOO374.js → chunk-6326DRQY.js} +1 -1
- package/{chunk-RM4UMFY4.js → chunk-6MQWGA5F.js} +10 -10
- package/{chunk-TEMLHVGX.js → chunk-6MX6S6TE.js} +3 -3
- package/{chunk-6WOLPIPY.js → chunk-6RSNVJGO.js} +2 -102
- package/{chunk-Y5OWZQMJ.js → chunk-6S6CZUXK.js} +19 -19
- package/{chunk-PDCV7P5W.js → chunk-6XIE5ZGI.js} +1 -1
- package/{chunk-FZKA3XFA.js → chunk-6XLWUNZB.js} +27 -27
- package/{chunk-62HXNQVV.js → chunk-776CXKMX.js} +1 -1
- package/{chunk-MYPKBJJO.js → chunk-7AWKDRXG.js} +2 -2
- package/{chunk-GDUC4VS2.js → chunk-7GTXPS3D.js} +10 -10
- package/{chunk-Z2WZAE4P.js → chunk-7HUHOCIY.js} +36 -30
- package/{chunk-PWTNI4N7.js → chunk-ANUP75N2.js} +22 -0
- package/{chunk-ULLHVDTZ.js → chunk-BH7CEVOH.js} +4 -4
- package/{chunk-A3LUWRQK.js → chunk-C4KX626C.js} +5 -5
- package/chunk-C5A54QS7.js +108 -0
- package/{chunk-DXW5WDHZ.js → chunk-CHYYSFFM.js} +6 -6
- package/{chunk-O6IPRAVV.js → chunk-CJTB3OYB.js} +2 -2
- package/{chunk-AVJDELEA.js → chunk-DLT2DN4M.js} +1 -1
- package/{chunk-LKA64WH4.js → chunk-DMPZMYH4.js} +37 -1
- package/{chunk-MM73SP4K.js → chunk-DOK7GDRU.js} +1 -1
- package/{chunk-VREG6ANQ.js → chunk-DPAIQLAL.js} +16 -16
- package/{chunk-ANJRDS6U.js → chunk-EKXPHL7M.js} +3 -3
- package/{chunk-TWTJV35S.js → chunk-ENYTIRIO.js} +3 -3
- package/{chunk-PGKA77TZ.js → chunk-ER3P6MBT.js} +170 -107
- package/{chunk-EEOOBRA7.js → chunk-F4MCAOWN.js} +2 -2
- package/{chunk-7NIBQ4HY.js → chunk-FDZ2GBWO.js} +30 -2
- package/{chunk-VSRISJXZ.js → chunk-GAHJLSDO.js} +1 -1
- package/{chunk-U3G7RRXJ.js → chunk-GES5GIAU.js} +8 -8
- package/{chunk-4IQVE43Z.js → chunk-HQVNO7FH.js} +22 -22
- package/{chunk-DVYAFH2Q.js → chunk-HSWEFHFS.js} +1 -1
- package/{chunk-MECDGHLK.js → chunk-IIG3TT73.js} +43 -6
- package/{chunk-YGCOJNFZ.js → chunk-IZJFTY4R.js} +3 -3
- package/{chunk-BXSMFPTG.js → chunk-J25ESVUW.js} +10 -10
- package/{chunk-CVJRVBJL.js → chunk-J2XZZXIH.js} +4 -4
- package/{chunk-3EMIEC27.js → chunk-JVJ53XCH.js} +1 -1
- package/{chunk-AH5R7BYW.js → chunk-KC2QVCI7.js} +6 -6
- package/{chunk-MYOSN6BT.js → chunk-KF2DWSAH.js} +34 -13
- package/chunk-KK3FCYZM.js +647 -0
- package/{chunk-PRMEU7BT.js → chunk-KLD7K5FD.js} +7 -7
- package/{chunk-7AJRJGSQ.js → chunk-KMW5CRRM.js} +801 -381
- package/{chunk-Y2MF4DCJ.js → chunk-LELADM5Q.js} +1 -1
- package/{chunk-RTHFJZ6M.js → chunk-LMFMV5UC.js} +2 -2
- package/{chunk-2574ANSV.js → chunk-LZOOUQAZ.js} +4 -4
- package/{chunk-HOM6LTEW.js → chunk-M5EA44QU.js} +6 -6
- package/{chunk-IUMS6F53.js → chunk-MEDPR36J.js} +9 -5
- package/{chunk-6D25V6CB.js → chunk-MFXJY44K.js} +4 -4
- package/chunk-MVOZ22RZ.js +26 -0
- package/{chunk-CBUZ6DKA.js → chunk-N6EN3HK3.js} +1 -1
- package/{chunk-VS276URX.js → chunk-NEG5LYK5.js} +1 -1
- package/{chunk-B7DE5XJW.js → chunk-ODGSLWLO.js} +249 -66
- package/{chunk-S2MHR4PU.js → chunk-OGZE6BZG.js} +190 -118
- package/{chunk-CD3RU7XL.js → chunk-OJRTTERA.js} +62 -2
- package/{chunk-GXXY2NL3.js → chunk-OKPC4QNX.js} +37 -2
- package/{chunk-5QZSEQSK.js → chunk-ONFFUQYM.js} +1 -1
- package/{chunk-BGGAY6OK.js → chunk-P244EH4W.js} +3 -3
- package/chunk-P27E22MA.js +203 -0
- package/{chunk-UFC4J7OY.js → chunk-PK7VT4ZU.js} +3 -3
- package/{chunk-4FIO2S7Z.js → chunk-QLUYDJST.js} +1 -1
- package/{chunk-AEQMKYZN.js → chunk-QUJKDFZW.js} +7 -7
- package/{chunk-G22P367E.js → chunk-QXUVCIPB.js} +62 -18
- package/{chunk-IJTXNLQE.js → chunk-QYNABNNQ.js} +6 -6
- package/{chunk-TRHJ4NJB.js → chunk-RGUWOMXU.js} +626 -237
- package/{chunk-L32W3PRP.js → chunk-RH44TIHX.js} +165 -16
- package/{chunk-EBKHA63G.js → chunk-RIMFTQMC.js} +178 -46
- package/{chunk-OOJNQK6V.js → chunk-S25VJYXV.js} +8 -2
- package/{chunk-BGGV6B5O.js → chunk-SBRJOYND.js} +280 -139
- package/{chunk-KZPEGO6D.js → chunk-SBRSXY67.js} +6 -6
- package/chunk-SR4FE5VD.js +9 -0
- package/{chunk-4WVJLODK.js → chunk-T23G6PXQ.js} +8 -3
- package/{chunk-D374I563.js → chunk-T3WSFTBS.js} +1 -1
- package/{chunk-VP3BINY7.js → chunk-TOK555CQ.js} +31 -1
- package/{chunk-OBSEKCVK.js → chunk-U4VSBDO5.js} +88 -0
- package/{chunk-OX6GNNVT.js → chunk-U5LOKQ2R.js} +24 -13
- package/{chunk-LYDEFPQP.js → chunk-UDT4SI37.js} +1 -1
- package/{chunk-CKZPMJNU.js → chunk-UQXOORR3.js} +5 -5
- package/{chunk-FFYE5ATM.js → chunk-UR7555FE.js} +11 -11
- package/{chunk-F3XI6WQP.js → chunk-UWOCASVL.js} +5 -5
- package/{chunk-A5EVA6HU.js → chunk-V2V5Q6DU.js} +2 -2
- package/{chunk-PROOOQZ3.js → chunk-VCU5GV42.js} +1 -1
- package/{chunk-F6YWDVIB.js → chunk-VMWY7TUA.js} +1 -1
- package/{chunk-RETQOQ4D.js → chunk-VNALJT32.js} +2 -2
- package/{chunk-HGDKT2D6.js → chunk-VTHWBTRE.js} +177 -1
- package/{chunk-X7IA2B7R.js → chunk-WBSJAIZP.js} +7 -3
- package/{chunk-ZEKUFJLW.js → chunk-WVOZ35E4.js} +7 -7
- package/{chunk-B5SV4H3J.js → chunk-XDNXKFWF.js} +4 -4
- package/{chunk-4Q6HQORG.js → chunk-XLN2GD6Z.js} +4 -4
- package/{chunk-HBRDSQ3M.js → chunk-XNEDFWT4.js} +2 -2
- package/{chunk-6CKUO32A.js → chunk-Y22P6ASC.js} +11 -8
- package/{chunk-SRCCSTIM.js → chunk-Y3DOUQQQ.js} +4 -4
- package/{chunk-6WZVM33D.js → chunk-Y5EBOURK.js} +3 -3
- package/{chunk-6OVNSQHN.js → chunk-YLAHYLDQ.js} +5 -0
- package/{chunk-T6VROBY7.js → chunk-YTEY27GN.js} +2 -2
- package/{chunk-5ZUOVCKT.js → chunk-YUZ2DAIH.js} +3 -1
- package/{chunk-IUTUWIKE.js → chunk-ZCVBIIUE.js} +4 -4
- package/{chunk-VM72HKW2.js → chunk-ZCZLTJEW.js} +9 -36
- package/{cliAgentConfigHelpers-U5OAVAKQ.js → cliAgentConfigHelpers-6OFDHJFT.js} +8 -8
- package/{cliAuthorityBrokerClient-S42VMGB6.js → cliAuthorityBrokerClient-SFPC3WVK.js} +1 -1
- package/{cliLocalAgentRecordReader-HVZAQCUD.js → cliLocalAgentRecordReader-FHIMCBUK.js} +52 -45
- package/{commandRegistry-TME7INFU.js → commandRegistry-OKIWAJIS.js} +101 -93
- package/{contentThunks-U6OC4R2N.js → contentThunks-VF2DCU46.js} +33 -32
- package/{cooldownCommands-U7XSRVJP.js → cooldownCommands-QL6DWGVU.js} +1 -1
- package/{createAgentAutomationAction-IP4LFN3W.js → createAgentAutomationAction-BGET7Q6K.js} +34 -33
- package/{createDialogAction-IAGQJ3LH.js → createDialogAction-XYDQZETK.js} +34 -33
- package/{createPageAction-AZ3UIFKA.js → createPageAction-74S5RO7U.js} +38 -37
- package/{db-M7FU2GNK.js → db-6NRZLEW2.js} +1 -1
- package/{dbSlice-DKKMJJYY.js → dbSlice-FI7VNDR5.js} +13 -13
- package/{deleteFile-TQSONMVU.js → deleteFile-GD62MPZW.js} +8 -8
- package/{dialogCommands-PCDRMBWG.js → dialogCommands-Y6DHZUAM.js} +56 -54
- package/{dialogNotifyCommand-O35MWMOS.js → dialogNotifyCommand-MKXL4NGL.js} +10 -10
- package/{dialogSlice-QAKYN4DE.js → dialogSlice-XAUKSWZ4.js} +32 -31
- package/{dialogUsageCommand-2SSLTXKO.js → dialogUsageCommand-BZPKR3DW.js} +5 -5
- package/{docCreateCommands-CFQFZOAD.js → docCreateCommands-PHDFOQBM.js} +51 -48
- package/{docDeleteCommands-5CPNTIIS.js → docDeleteCommands-OSHJM67Y.js} +53 -50
- package/{docReadCommands-XQILYSAJ.js → docReadCommands-E6QYCFMS.js} +51 -48
- package/{docStore-GIVRT7TQ.js → docStore-ZZT2BEBU.js} +15 -15
- package/{docUpdateCommands-VETKSUDD.js → docUpdateCommands-DHIOPK2C.js} +51 -48
- package/fetchMessages-TQEUZD7H.js +1 -1
- package/{getPricing-LF5C4XSI.js → getPricing-RNRITFOP.js} +4 -4
- package/{handleSendMessageAction-HKIW4ZNO.js → handleSendMessageAction-ARUU6CNF.js} +71 -70
- package/{hostCredentialCreate-6VDJFNDO.js → hostCredentialCreate-SNQT73H4.js} +103 -104
- package/index.js +8 -8
- package/{localDialogRead-AV2VKKPG.js → localDialogRead-3T2KMCRC.js} +1 -1
- package/{localRuntimeAdapter-BQ4F5PZV.js → localRuntimeAdapter-MHI6Y2IZ.js} +112 -111
- package/{localRuntimeAuthority-WCNA4A3G.js → localRuntimeAuthority-7DKIT7UH.js} +2 -2
- package/{localRuntimeDb-CRNIBOOM.js → localRuntimeDb-5WZ4RJJO.js} +1 -1
- package/{machineCommands-K6XIGOAD.js → machineCommands-3O6Y27R4.js} +229 -321
- package/{machineWsRunDispatch-4OO7Z6UM.js → machineWsRunDispatch-5PFLR5XC.js} +101 -102
- package/markdownToSlate-KIYM7B3P.js +8 -0
- package/{mcpLocalAuthorizeCommand-ZP6ESAGE.js → mcpLocalAuthorizeCommand-BQCQ2KRJ.js} +15 -15
- package/{memberThunks-PBJPZ2JU.js → memberThunks-TU6A6OBV.js} +16 -16
- package/{models-H5NNZRLH.js → models-CINY5UZR.js} +2 -2
- package/package.json +1 -1
- package/{projectArchive-G7AOQPRW.js → projectArchive-X2EVXU3N.js} +40 -39
- package/{providerPresetApply-OPBCAONX.js → providerPresetApply-HUWNV2NI.js} +6 -6
- package/{providerRegistry-J2HCVTHE.js → providerRegistry-7FWKDKZJ.js} +6 -6
- package/{read-JEGPITEW.js → read-QAHEQID5.js} +8 -8
- package/{readDocTool-TE3XIU4Y.js → readDocTool-KG5DP6EM.js} +1 -1
- package/{readlineWorkspace-SOW5QUGZ.js → readlineWorkspace-SO3APHVP.js} +3300 -1518
- package/rememberExplicit-CPAPONSI.js +15 -0
- package/{removeDialogAgentAction-CX3OAH4Y.js → removeDialogAgentAction-QZCCVK2G.js} +19 -19
- package/{runAgentClientLoop-HQJPDFGQ.js → runAgentClientLoop-FLHHCOVH.js} +77 -77
- package/{runtimeDoctorCommands-GUH2YGMH.js → runtimeDoctorCommands-DN3I52C6.js} +8 -8
- package/{secretCommands-NJXFVHZU.js → secretCommands-36BCE3UE.js} +2 -2
- package/{setDialogExtraReferencesAction-CGM67EEQ.js → setDialogExtraReferencesAction-PDPTYSEW.js} +15 -15
- package/{setPrimaryDialogAgentAction-3ABWPPXR.js → setPrimaryDialogAgentAction-DOUIPR66.js} +19 -19
- package/{settingThunks-AY76OHYX.js → settingThunks-MHGGP6UE.js} +23 -23
- package/{spaceCommands-G63QGYQO.js → spaceCommands-JH7UYE3K.js} +54 -51
- package/{streamAgentChatTurn-E3XH2KFD.js → streamAgentChatTurn-VDDA2TX6.js} +118 -118
- package/{switchDialogAgentAction-G6EZRKCQ.js → switchDialogAgentAction-7USK3DAP.js} +17 -17
- package/{tableCommands-JI75ZHDI.js → tableCommands-UONBFC7L.js} +6 -6
- package/{toolApiClient-62UUPDUA.js → toolApiClient-53YMJ2G6.js} +7 -3
- package/{tools-7RSX22FT.js → tools-MIOCXKMG.js} +59 -60
- package/{tuiRestart-KAAA7TND.js → tuiRestart-ET3QISZ5.js} +10 -10
- package/{tuiSummaryLlmCaller-BVNHMWLR.js → tuiSummaryLlmCaller-MSINBP3M.js} +15 -14
- package/{updateCommands-ASK5XYPH.js → updateCommands-5OYND6EF.js} +3 -3
- package/{updateDialogTitleAction-SEWV252V.js → updateDialogTitleAction-2L4CC4YO.js} +35 -34
- package/{usageCommand-JVT5J3DC.js → usageCommand-JTKDAG6I.js} +2 -2
- package/{usageRebuildCommand-IZYYUTEW.js → usageRebuildCommand-4TFZCKXM.js} +3 -3
- package/{windowsSelfUpdate-BSDIS2J5.js → windowsSelfUpdate-HIYNL3VR.js} +2 -2
- package/{workContext-MM3P5GP5.js → workContext-Y3ADAPZU.js} +2 -1
- package/{workloadLifecycle-YIZ7KLUP.js → workloadLifecycle-ZCSQCHG3.js} +6 -6
- package/chunk-TUSTONB3.js +0 -81
- package/chunk-XBAEM4RI.js +0 -272
- package/{accountResolver-EK2S4PWF.js → accountResolver-QETKNC7T.js} +3 -3
- package/{chunk-W6RFEDN4.js → chunk-AETZ7AD6.js} +3 -3
- package/{chunk-VMJVAJ6W.js → chunk-TB5KTLNB.js} +3 -3
- /package/{chunk-FJ23FZXF.js → chunk-VIYVRPMJ.js} +0 -0
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
streamSseDataValues
|
|
3
3
|
} from "./chunk-HNUWUO75.js";
|
|
4
|
-
import {
|
|
5
|
-
resolveToolImagePolicy
|
|
6
|
-
} from "./chunk-BGGAY6OK.js";
|
|
7
4
|
import {
|
|
8
5
|
projectOpenAiToolImages
|
|
9
6
|
} from "./chunk-X4O7FJF5.js";
|
|
7
|
+
import {
|
|
8
|
+
resolveToolImagePolicy
|
|
9
|
+
} from "./chunk-P244EH4W.js";
|
|
10
10
|
import {
|
|
11
11
|
getAntigravityUserAgent,
|
|
12
12
|
readAntigravityProjectId,
|
|
13
13
|
resolveAntigravityCloudCodeBaseUrl
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-Y22P6ASC.js";
|
|
15
15
|
import {
|
|
16
16
|
asOptionalTrimmedString
|
|
17
17
|
} from "./chunk-G3SUCT4W.js";
|
|
@@ -51,30 +51,69 @@ var WIRE_PROFILES = {
|
|
|
51
51
|
// Antigravity discovery exposes 3.7 Flash as one tiered wire model.
|
|
52
52
|
// The UI labels its effort variants (Low/Medium/High), but the literal
|
|
53
53
|
// -medium/-high ids return 404 from streamGenerateContent.
|
|
54
|
-
"gemini-3.7-flash-tiered": {
|
|
54
|
+
"gemini-3.7-flash-tiered": {
|
|
55
|
+
modelEnum: "MODEL_PLACEHOLDER_M301",
|
|
56
|
+
maxOutputTokens: 65536
|
|
57
|
+
},
|
|
55
58
|
// Gemini 3.8 Flash 沿用 3.7 的 tiered 兼容策略:仓库内暂无 Antigravity discovery
|
|
56
59
|
// 证据确认 3.8 的 wire modelEnum,禁止虚构,先只声明同档输出上限;enum 待
|
|
57
60
|
// discovery 证据到位后补齐。
|
|
58
61
|
"gemini-3.8-flash-tiered": { maxOutputTokens: 65536 },
|
|
59
62
|
// Discovery (2026-11-16) exposes separate enabled Argon effort variants.
|
|
60
|
-
"gemini-4-argon-low": {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
+
"gemini-4-argon-low": {
|
|
64
|
+
modelEnum: "MODEL_PLACEHOLDER_M419",
|
|
65
|
+
maxOutputTokens: 65536
|
|
66
|
+
},
|
|
67
|
+
"gemini-4-argon-medium": {
|
|
68
|
+
modelEnum: "MODEL_PLACEHOLDER_M418",
|
|
69
|
+
maxOutputTokens: 65536
|
|
70
|
+
},
|
|
71
|
+
"gemini-4-argon-high": {
|
|
72
|
+
modelEnum: "MODEL_PLACEHOLDER_M417",
|
|
73
|
+
maxOutputTokens: 65536
|
|
74
|
+
},
|
|
63
75
|
// Discovery (2026-11-17) exposes Carbon effort variants with their own enums and a
|
|
64
76
|
// 262144 output cap (Argon caps at 65536). 裸 gemini-4-carbon 不在 discovery 里,
|
|
65
77
|
// 必须折叠到 effort 变体,否则上游回 404。
|
|
66
|
-
"gemini-4-carbon-low": {
|
|
67
|
-
|
|
68
|
-
|
|
78
|
+
"gemini-4-carbon-low": {
|
|
79
|
+
modelEnum: "MODEL_PLACEHOLDER_M438",
|
|
80
|
+
maxOutputTokens: 262144
|
|
81
|
+
},
|
|
82
|
+
"gemini-4-carbon-medium": {
|
|
83
|
+
modelEnum: "MODEL_PLACEHOLDER_M437",
|
|
84
|
+
maxOutputTokens: 262144
|
|
85
|
+
},
|
|
86
|
+
"gemini-4-carbon-high": {
|
|
87
|
+
modelEnum: "MODEL_PLACEHOLDER_M427",
|
|
88
|
+
maxOutputTokens: 262144
|
|
89
|
+
},
|
|
90
|
+
// Antigravity discovery 暴露 -medium / -high 变体;尚无 modelEnum 证据时不虚构 enum,仅声明 65536 输出上限。
|
|
91
|
+
"gemini-4-hydrogen-medium": { maxOutputTokens: 65536 },
|
|
92
|
+
"gemini-4-hydrogen-high": { maxOutputTokens: 65536 },
|
|
69
93
|
"gemini-3.6-flash-low": { maxOutputTokens: 65536 },
|
|
70
94
|
"gemini-3.6-flash-medium": { maxOutputTokens: 65536 },
|
|
71
95
|
"gemini-3.6-flash-high": { maxOutputTokens: 65536 },
|
|
72
96
|
// 旧模型 wire 映射保留:存量自定义 agent 仍可能引用(注册表已下线不影响此处)。
|
|
73
|
-
"gemini-3.5-flash-extra-low": {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
"gemini-
|
|
97
|
+
"gemini-3.5-flash-extra-low": {
|
|
98
|
+
modelEnum: "MODEL_PLACEHOLDER_M187",
|
|
99
|
+
maxOutputTokens: 65536
|
|
100
|
+
},
|
|
101
|
+
"gemini-3.5-flash-low": {
|
|
102
|
+
modelEnum: "MODEL_PLACEHOLDER_M20",
|
|
103
|
+
maxOutputTokens: 65536
|
|
104
|
+
},
|
|
105
|
+
"gemini-3-flash-agent": {
|
|
106
|
+
modelEnum: "MODEL_PLACEHOLDER_M132",
|
|
107
|
+
maxOutputTokens: 65536
|
|
108
|
+
},
|
|
109
|
+
"gemini-3.1-pro-low": {
|
|
110
|
+
modelEnum: "MODEL_PLACEHOLDER_M36",
|
|
111
|
+
maxOutputTokens: 65535
|
|
112
|
+
},
|
|
113
|
+
"gemini-pro-agent": {
|
|
114
|
+
modelEnum: "MODEL_PLACEHOLDER_M16",
|
|
115
|
+
maxOutputTokens: 65535
|
|
116
|
+
},
|
|
78
117
|
"claude-sonnet-5": { maxOutputTokens: 64e3 },
|
|
79
118
|
"claude-sonnet-4-6": { maxOutputTokens: 64e3 },
|
|
80
119
|
"claude-opus-4-6-thinking": { maxOutputTokens: 64e3 },
|
|
@@ -88,15 +127,25 @@ function resolveAntigravityWireModel(logicalModelId, reasoningEffort) {
|
|
|
88
127
|
const wireModelId = "gemini-3.5-flash-low";
|
|
89
128
|
return { wireModelId, profile: WIRE_PROFILES[wireModelId] };
|
|
90
129
|
}
|
|
91
|
-
if (lower === "gemini-3.7-flash" || [
|
|
130
|
+
if (lower === "gemini-3.7-flash" || [
|
|
131
|
+
"gemini-3.7-flash-low",
|
|
132
|
+
"gemini-3.7-flash-medium",
|
|
133
|
+
"gemini-3.7-flash-high"
|
|
134
|
+
].includes(lower)) {
|
|
92
135
|
const wireModelId = "gemini-3.7-flash-tiered";
|
|
93
136
|
return { wireModelId, profile: WIRE_PROFILES[wireModelId] };
|
|
94
137
|
}
|
|
95
|
-
if (lower === "gemini-3.8-flash" || [
|
|
138
|
+
if (lower === "gemini-3.8-flash" || [
|
|
139
|
+
"gemini-3.8-flash-low",
|
|
140
|
+
"gemini-3.8-flash-medium",
|
|
141
|
+
"gemini-3.8-flash-high"
|
|
142
|
+
].includes(lower)) {
|
|
96
143
|
const wireModelId = "gemini-3.8-flash-tiered";
|
|
97
144
|
return { wireModelId, profile: WIRE_PROFILES[wireModelId] };
|
|
98
145
|
}
|
|
99
|
-
const gemini4 = /^gemini-4-(argon|carbon)(?:-(low|medium|high))?$/.exec(
|
|
146
|
+
const gemini4 = /^gemini-4-(argon|carbon)(?:-(low|medium|high))?$/.exec(
|
|
147
|
+
lower
|
|
148
|
+
);
|
|
100
149
|
if (gemini4) {
|
|
101
150
|
const family = gemini4[1] ?? "argon";
|
|
102
151
|
const explicitEffort = gemini4[2];
|
|
@@ -105,6 +154,14 @@ function resolveAntigravityWireModel(logicalModelId, reasoningEffort) {
|
|
|
105
154
|
const wireModelId = `gemini-4-${family}-${selected}`;
|
|
106
155
|
return { wireModelId, profile: WIRE_PROFILES[wireModelId] };
|
|
107
156
|
}
|
|
157
|
+
const hydrogen = /^gemini-4-hydrogen(?:-(medium|high))?$/.exec(lower);
|
|
158
|
+
if (hydrogen) {
|
|
159
|
+
const explicitEffort = hydrogen[1];
|
|
160
|
+
const effort = reasoningEffort?.trim().toLowerCase();
|
|
161
|
+
const selected = explicitEffort ?? (effort === "high" ? "high" : "medium");
|
|
162
|
+
const wireModelId = `gemini-4-hydrogen-${selected}`;
|
|
163
|
+
return { wireModelId, profile: WIRE_PROFILES[wireModelId] };
|
|
164
|
+
}
|
|
108
165
|
if (lower === "gemini-3.6-flash") {
|
|
109
166
|
const wireModelId = "gemini-3.6-flash-low";
|
|
110
167
|
return { wireModelId, profile: WIRE_PROFILES[wireModelId] };
|
|
@@ -623,10 +680,13 @@ function sanitizeGeminiSchemaNodeInner(src, out, seen) {
|
|
|
623
680
|
const branchRequired = Array.isArray(sanitized.required) ? sanitized.required : [];
|
|
624
681
|
requiredIntersection = requiredIntersection === void 0 ? [...branchRequired] : requiredIntersection.filter((r) => branchRequired.includes(r));
|
|
625
682
|
}
|
|
626
|
-
|
|
683
|
+
const combinedProperties = {
|
|
627
684
|
...out.properties ?? {},
|
|
628
685
|
...mergedProperties
|
|
629
686
|
};
|
|
687
|
+
out.properties = Object.fromEntries(
|
|
688
|
+
Object.keys(combinedProperties).sort().map((key) => [key, combinedProperties[key]])
|
|
689
|
+
);
|
|
630
690
|
if (requiredIntersection !== void 0 && requiredIntersection.length > 0) {
|
|
631
691
|
out.required = requiredIntersection;
|
|
632
692
|
}
|
|
@@ -654,10 +714,13 @@ function sanitizeGeminiSchemaNodeInner(src, out, seen) {
|
|
|
654
714
|
for (const branch of src.allOf) {
|
|
655
715
|
const sanitized = sanitizeGeminiSchemaNode(branch, seen);
|
|
656
716
|
if (out.type === void 0 || out.type === "object" || out.properties || sanitized.properties) {
|
|
657
|
-
|
|
717
|
+
const merged = {
|
|
658
718
|
...out.properties ?? {},
|
|
659
719
|
...sanitized.properties ?? {}
|
|
660
720
|
};
|
|
721
|
+
out.properties = Object.fromEntries(
|
|
722
|
+
Object.keys(merged).sort().map((key) => [key, merged[key]])
|
|
723
|
+
);
|
|
661
724
|
}
|
|
662
725
|
if (Array.isArray(sanitized.required)) {
|
|
663
726
|
out.required = [
|
|
@@ -671,11 +734,10 @@ function sanitizeGeminiSchemaNodeInner(src, out, seen) {
|
|
|
671
734
|
if (typeof out.type !== "string") out.type = "object";
|
|
672
735
|
}
|
|
673
736
|
if (src.properties && typeof src.properties === "object") {
|
|
737
|
+
const rawProperties = src.properties;
|
|
674
738
|
const properties = {};
|
|
675
|
-
for (const
|
|
676
|
-
|
|
677
|
-
)) {
|
|
678
|
-
properties[key] = sanitizeGeminiSchemaNode(value, seen);
|
|
739
|
+
for (const key of Object.keys(rawProperties).sort()) {
|
|
740
|
+
properties[key] = sanitizeGeminiSchemaNode(rawProperties[key], seen);
|
|
679
741
|
}
|
|
680
742
|
out.properties = properties;
|
|
681
743
|
if (typeof out.type !== "string") out.type = "object";
|
|
@@ -721,6 +783,7 @@ function convertOpenAiToolsToGemini(tools) {
|
|
|
721
783
|
});
|
|
722
784
|
}
|
|
723
785
|
if (declarations.length === 0) return void 0;
|
|
786
|
+
declarations.sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0);
|
|
724
787
|
return [{ functionDeclarations: declarations }];
|
|
725
788
|
}
|
|
726
789
|
function createGeminiAccumulatorState() {
|
|
@@ -736,19 +799,25 @@ function applyGeminiChunk(chunk, state, options) {
|
|
|
736
799
|
const response = "response" in chunk && chunk.response && typeof chunk.response === "object" ? chunk.response : chunk;
|
|
737
800
|
if ("usageMetadata" in response && response.usageMetadata && typeof response.usageMetadata === "object") {
|
|
738
801
|
const meta = response.usageMetadata;
|
|
739
|
-
const
|
|
802
|
+
const hasPromptTokenCount = typeof meta.promptTokenCount === "number" && Number.isFinite(meta.promptTokenCount);
|
|
803
|
+
const hasCachedContentTokenCount = typeof meta.cachedContentTokenCount === "number" && Number.isFinite(meta.cachedContentTokenCount);
|
|
804
|
+
const prompt = hasPromptTokenCount ? meta.promptTokenCount : 0;
|
|
740
805
|
const candidates2 = typeof meta.candidatesTokenCount === "number" ? meta.candidatesTokenCount : 0;
|
|
741
806
|
const total = typeof meta.totalTokenCount === "number" ? meta.totalTokenCount : prompt + candidates2;
|
|
742
|
-
const
|
|
807
|
+
const clampedPrompt = Math.max(0, Math.floor(prompt));
|
|
808
|
+
const cached = hasCachedContentTokenCount ? (
|
|
743
809
|
// cached ⊆ prompt;对畸形上游防御性钳位,避免 cache_read > input 破坏归一化与计费
|
|
744
|
-
Math.min(
|
|
810
|
+
Math.min(
|
|
811
|
+
Math.max(0, Math.floor(meta.cachedContentTokenCount)),
|
|
812
|
+
clampedPrompt
|
|
813
|
+
)
|
|
745
814
|
) : 0;
|
|
746
815
|
const thoughts = typeof meta.thoughtsTokenCount === "number" ? meta.thoughtsTokenCount : Array.isArray(meta.candidatesTokensDetails) && typeof meta.candidatesTokensDetails[0]?.tokensCount === "number" ? meta.candidatesTokensDetails[0].tokensCount : void 0;
|
|
747
816
|
state.usage = {
|
|
748
817
|
prompt_tokens: prompt,
|
|
749
818
|
completion_tokens: candidates2,
|
|
750
819
|
total_tokens: total,
|
|
751
|
-
...
|
|
820
|
+
...hasPromptTokenCount || hasCachedContentTokenCount ? { cache_read_input_tokens: cached } : {},
|
|
752
821
|
...thoughts !== void 0 ? {
|
|
753
822
|
completion_tokens_details: {
|
|
754
823
|
reasoning_tokens: thoughts
|
|
@@ -855,7 +924,7 @@ function buildGeminiGenerateContentRequest(args) {
|
|
|
855
924
|
maxImagesPerRequest: toolImagePolicy.maxImagesPerRequest
|
|
856
925
|
}
|
|
857
926
|
);
|
|
858
|
-
const request = {
|
|
927
|
+
const request = {};
|
|
859
928
|
if (systemTexts.length > 0) {
|
|
860
929
|
request.systemInstruction = {
|
|
861
930
|
role: "user",
|
|
@@ -867,6 +936,7 @@ function buildGeminiGenerateContentRequest(args) {
|
|
|
867
936
|
request.tools = toolsResult;
|
|
868
937
|
request.toolConfig = { functionCallingConfig: { mode: "AUTO" } };
|
|
869
938
|
}
|
|
939
|
+
request.contents = contents;
|
|
870
940
|
const generationConfig = {};
|
|
871
941
|
if (typeof args.maxTokens === "number" && args.maxTokens > 0) {
|
|
872
942
|
generationConfig.maxOutputTokens = args.maxTokens;
|
|
@@ -935,7 +1005,7 @@ function buildCloudCodeAssistPayload(args) {
|
|
|
935
1005
|
}
|
|
936
1006
|
const prompt = args.agentConfig.prompt?.trim();
|
|
937
1007
|
if (prompt && !hasAssembledAgentPrompt(rawMessages)) systemTexts.unshift(prompt);
|
|
938
|
-
const request = {
|
|
1008
|
+
const request = {};
|
|
939
1009
|
if (systemTexts.length > 0) {
|
|
940
1010
|
request.systemInstruction = {
|
|
941
1011
|
role: "user",
|
|
@@ -949,6 +1019,7 @@ function buildCloudCodeAssistPayload(args) {
|
|
|
949
1019
|
request.tools = tools;
|
|
950
1020
|
request.toolConfig = { functionCallingConfig: { mode: "AUTO" } };
|
|
951
1021
|
}
|
|
1022
|
+
request.contents = contents;
|
|
952
1023
|
const generationConfig = {};
|
|
953
1024
|
if (profile?.maxOutputTokens) {
|
|
954
1025
|
generationConfig.maxOutputTokens = profile.maxOutputTokens;
|
|
@@ -206,7 +206,7 @@ async function readDocFunc(args, thunkApi) {
|
|
|
206
206
|
throw new Error(`\u65E0\u6548\u7684\u9875\u9762 ID: ${id}\u3002\u9875\u9762 ID \u901A\u5E38\u4EE5 "page-" \u5F00\u5934\u3002`);
|
|
207
207
|
}
|
|
208
208
|
try {
|
|
209
|
-
const { readAction } = await import("./read-
|
|
209
|
+
const { readAction } = await import("./read-QAHEQID5.js");
|
|
210
210
|
const pageData = await readAction({ dbKey: id }, thunkApi);
|
|
211
211
|
if (!pageData) {
|
|
212
212
|
throw new Error(`\u672A\u627E\u5230 ID \u4E3A ${id} \u7684\u9875\u9762\u3002`);
|
|
@@ -3,26 +3,19 @@ import {
|
|
|
3
3
|
} from "./chunk-HS7MLR74.js";
|
|
4
4
|
import {
|
|
5
5
|
performServerProxyFetchWithRetry
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6S6CZUXK.js";
|
|
7
7
|
import {
|
|
8
8
|
fetchServerSyncedCredential
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-QYNABNNQ.js";
|
|
10
10
|
import {
|
|
11
|
-
CREDENTIAL_HYGIENE_RULE,
|
|
12
|
-
DELETE_SAFETY_RED_LINE,
|
|
13
|
-
DISPATCH_BACKEND_POLICY,
|
|
14
|
-
DISPATCH_CANDIDATE_POLICY,
|
|
15
|
-
PARALLEL_DISPATCH_DEFAULT_RULE,
|
|
16
|
-
PLATFORM_RISK_CONTROL_RULE,
|
|
17
|
-
VERIFY_BEFORE_CONCLUDING_RULE,
|
|
18
|
-
buildConsultationModeBlock,
|
|
19
11
|
buildIdentityBlock,
|
|
12
|
+
buildPlatformStaticContextLayers,
|
|
20
13
|
buildResponseGuidelines,
|
|
21
14
|
buildRuntimeGuidanceBlocks,
|
|
22
15
|
compileContextLayers,
|
|
23
16
|
detectDispatchIntentFromMessages,
|
|
24
17
|
resolveToolGuidedSections
|
|
25
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-ER3P6MBT.js";
|
|
26
19
|
import {
|
|
27
20
|
convertMessagesToResponsesInput,
|
|
28
21
|
getUsageRequestOptions,
|
|
@@ -31,21 +24,14 @@ import {
|
|
|
31
24
|
resolveReasoningReplayOptions,
|
|
32
25
|
shouldStripReasoningContentForOutbound,
|
|
33
26
|
stablePromptCacheKey
|
|
34
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-F4MCAOWN.js";
|
|
35
28
|
import {
|
|
36
29
|
resolveAgentCallPlan,
|
|
37
30
|
resolveClientWire
|
|
38
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-ENYTIRIO.js";
|
|
39
32
|
import {
|
|
40
33
|
createFileCredentialBroker
|
|
41
34
|
} from "./chunk-OQHIVPG4.js";
|
|
42
|
-
import {
|
|
43
|
-
WORKTREE_ISOLATION_PRELUDE,
|
|
44
|
-
buildSkillGuidancePromptBlock
|
|
45
|
-
} from "./chunk-EBKHA63G.js";
|
|
46
|
-
import {
|
|
47
|
-
canonicalizeToolNames
|
|
48
|
-
} from "./chunk-6OVNSQHN.js";
|
|
49
35
|
import {
|
|
50
36
|
MEMORY_USE_GUIDANCE,
|
|
51
37
|
buildUserResponseLanguageContext
|
|
@@ -53,15 +39,21 @@ import {
|
|
|
53
39
|
import {
|
|
54
40
|
wrapHistoricalSummaryWithReplayGuard
|
|
55
41
|
} from "./chunk-2SXN7LAY.js";
|
|
42
|
+
import {
|
|
43
|
+
buildSkillGuidancePromptBlock
|
|
44
|
+
} from "./chunk-RIMFTQMC.js";
|
|
45
|
+
import {
|
|
46
|
+
canonicalizeToolNames
|
|
47
|
+
} from "./chunk-YLAHYLDQ.js";
|
|
56
48
|
import {
|
|
57
49
|
API_ENDPOINTS
|
|
58
50
|
} from "./chunk-LCBAMY2M.js";
|
|
59
|
-
import {
|
|
60
|
-
buildProviderAuthHeaders
|
|
61
|
-
} from "./chunk-RTHFJZ6M.js";
|
|
62
51
|
import {
|
|
63
52
|
toErrorMessage
|
|
64
53
|
} from "./chunk-HNMXYYJR.js";
|
|
54
|
+
import {
|
|
55
|
+
buildProviderAuthHeaders
|
|
56
|
+
} from "./chunk-LMFMV5UC.js";
|
|
65
57
|
import {
|
|
66
58
|
asTrimmedString
|
|
67
59
|
} from "./chunk-3EUW3WEO.js";
|
|
@@ -69,7 +61,7 @@ import {
|
|
|
69
61
|
clampReasoningEffort,
|
|
70
62
|
getModelConfig,
|
|
71
63
|
isModelSupportReasoningEffort
|
|
72
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-OJRTTERA.js";
|
|
73
65
|
import {
|
|
74
66
|
isRecord
|
|
75
67
|
} from "./chunk-KUG52IAP.js";
|
|
@@ -84,7 +76,7 @@ import {
|
|
|
84
76
|
isFireworksKimiModel,
|
|
85
77
|
isPlatformMimoProviderModel,
|
|
86
78
|
resolveFireworksKimiModel
|
|
87
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-U4VSBDO5.js";
|
|
88
80
|
|
|
89
81
|
// packages/agent-runtime/responsesConversationState.ts
|
|
90
82
|
function supportsResponsesConversationState(agent) {
|
|
@@ -268,65 +260,8 @@ ${mainPrompt}` : "";
|
|
|
268
260
|
const dialogSummarySection = contexts.dialogSummary?.trim() ? `--- \u5386\u53F2\u5BF9\u8BDD\u6458\u8981 ---
|
|
269
261
|
${wrapHistoricalSummaryWithReplayGuard(contexts.dialogSummary)}` : "";
|
|
270
262
|
return compileContextLayers([
|
|
271
|
-
//
|
|
272
|
-
|
|
273
|
-
{
|
|
274
|
-
id: "delete-safety-red-line",
|
|
275
|
-
owner: "platform",
|
|
276
|
-
cacheScope: "static",
|
|
277
|
-
content: DELETE_SAFETY_RED_LINE
|
|
278
|
-
},
|
|
279
|
-
// 凭据纪律:与红线同为无条件系统层块,四条装配线同源。
|
|
280
|
-
{
|
|
281
|
-
id: "credential-hygiene",
|
|
282
|
-
owner: "platform",
|
|
283
|
-
cacheScope: "static",
|
|
284
|
-
content: CREDENTIAL_HYGIENE_RULE
|
|
285
|
-
},
|
|
286
|
-
// 先验证再下结论:一切动作的前提,紧随凭据纪律、先于并行/派发/发布规则。
|
|
287
|
-
{
|
|
288
|
-
id: "verify-before-concluding",
|
|
289
|
-
owner: "platform",
|
|
290
|
-
cacheScope: "static",
|
|
291
|
-
content: VERIFY_BEFORE_CONCLUDING_RULE
|
|
292
|
-
},
|
|
293
|
-
// 并行是默认:系统层固定块,紧随红线(同为无条件前缀,不随工具/轮次变化)。
|
|
294
|
-
{
|
|
295
|
-
id: "parallel-dispatch-default",
|
|
296
|
-
owner: "platform",
|
|
297
|
-
cacheScope: "static",
|
|
298
|
-
content: PARALLEL_DISPATCH_DEFAULT_RULE
|
|
299
|
-
},
|
|
300
|
-
// 派发落点:并行派发纪律的下一层(派到哪个执行后端),紧随并行块。
|
|
301
|
-
{
|
|
302
|
-
id: "dispatch-backend-policy",
|
|
303
|
-
owner: "platform",
|
|
304
|
-
cacheScope: "static",
|
|
305
|
-
content: DISPATCH_BACKEND_POLICY
|
|
306
|
-
},
|
|
307
|
-
// 派发选人:可用性重扫与速度口径(与后端块同级,紧随其后)。
|
|
308
|
-
{
|
|
309
|
-
id: "dispatch-candidate-policy",
|
|
310
|
-
owner: "platform",
|
|
311
|
-
cacheScope: "static",
|
|
312
|
-
content: DISPATCH_CANDIDATE_POLICY
|
|
313
|
-
},
|
|
314
|
-
// 平台风控纪律:无条件静态前缀,紧随并行派发块。
|
|
315
|
-
{
|
|
316
|
-
id: "platform-risk-control",
|
|
317
|
-
owner: "platform",
|
|
318
|
-
cacheScope: "static",
|
|
319
|
-
content: PLATFORM_RISK_CONTROL_RULE
|
|
320
|
-
},
|
|
321
|
-
{ id: "consultation-mode", owner: "platform", cacheScope: "static", content: buildConsultationModeBlock() },
|
|
322
|
-
// Git 任务隔离:仓库改动前置,系统层固定块(原 worktree-isolation skill 上移,
|
|
323
|
-
// 不受 skill 配置 disabled 影响)。排在既有平台块之后,不扰动其顺序契约。
|
|
324
|
-
{
|
|
325
|
-
id: "worktree-isolation-prelude",
|
|
326
|
-
owner: "platform",
|
|
327
|
-
cacheScope: "static",
|
|
328
|
-
content: WORKTREE_ISOLATION_PRELUDE
|
|
329
|
-
},
|
|
263
|
+
// 顶部固定平台层(唯一真源见 agent-runtime/platformStaticPromptLayers.ts)。
|
|
264
|
+
...buildPlatformStaticContextLayers(),
|
|
330
265
|
{ id: "identity", owner: "platform", cacheScope: "session", content: identitySection },
|
|
331
266
|
{ id: "user-response-language", owner: "platform", cacheScope: "session", content: buildUserResponseLanguageContext({ language: safeLanguage }) },
|
|
332
267
|
{ id: "startup-protocol", owner: "platform", cacheScope: "static", content: startupProtocol },
|
|
@@ -3,10 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-5ZUL4CUO.js";
|
|
4
4
|
import {
|
|
5
5
|
getModelContextWindow
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import {
|
|
8
|
-
BUILTIN_NOLO_AGENT_KEY
|
|
9
|
-
} from "./chunk-WRKMXMU7.js";
|
|
6
|
+
} from "./chunk-RH44TIHX.js";
|
|
10
7
|
import {
|
|
11
8
|
isPageKey,
|
|
12
9
|
isTableMetaKey
|
|
@@ -14,6 +11,9 @@ import {
|
|
|
14
11
|
import {
|
|
15
12
|
isDialogRecordKey
|
|
16
13
|
} from "./chunk-OJKUU3LP.js";
|
|
14
|
+
import {
|
|
15
|
+
BUILTIN_NOLO_AGENT_KEY
|
|
16
|
+
} from "./chunk-WRKMXMU7.js";
|
|
17
17
|
import {
|
|
18
18
|
asTrimmedString
|
|
19
19
|
} from "./chunk-3EUW3WEO.js";
|
|
@@ -453,11 +453,24 @@ function resolveEmptyAssistantFallbackMessage(reason) {
|
|
|
453
453
|
if (reason === "stagnant_tool_calls") return STAGNANT_TOOL_CALLS_FALLBACK_MESSAGE;
|
|
454
454
|
return EMPTY_ASSISTANT_FALLBACK_MESSAGE;
|
|
455
455
|
}
|
|
456
|
+
var DEGENERATE_CLOSING_BRACKET_FRAGMENT_RE = /^[}\])]+$/;
|
|
457
|
+
var MAX_DEGENERATE_FRAGMENT_CHARS = 4;
|
|
458
|
+
function isDegenerateClosingBracketFragment(text) {
|
|
459
|
+
if (typeof text !== "string") return false;
|
|
460
|
+
const compact = text.replace(/\s+/g, "");
|
|
461
|
+
return compact.length >= 1 && compact.length <= MAX_DEGENERATE_FRAGMENT_CHARS && DEGENERATE_CLOSING_BRACKET_FRAGMENT_RE.test(compact);
|
|
462
|
+
}
|
|
456
463
|
function hasAssistantVisibleOutput(content) {
|
|
457
|
-
if (typeof content === "string")
|
|
464
|
+
if (typeof content === "string") {
|
|
465
|
+
const trimmed = content.trim();
|
|
466
|
+
return trimmed.length > 0 && !isDegenerateClosingBracketFragment(trimmed);
|
|
467
|
+
}
|
|
458
468
|
if (!Array.isArray(content)) return false;
|
|
459
469
|
return content.some((part) => {
|
|
460
|
-
if (part?.type === "text"
|
|
470
|
+
if (part?.type === "text") {
|
|
471
|
+
const text = String(part.text ?? "").trim();
|
|
472
|
+
return text.length > 0 && !isDegenerateClosingBracketFragment(text);
|
|
473
|
+
}
|
|
461
474
|
if (part?.type === "image_url") {
|
|
462
475
|
const url = part?.image_url?.url;
|
|
463
476
|
return typeof url === "string" && url.trim().length > 0;
|
|
@@ -20,17 +20,17 @@ import {
|
|
|
20
20
|
} from "./chunk-M2EJHDJP.js";
|
|
21
21
|
import {
|
|
22
22
|
getModelPricing
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-Y3DOUQQQ.js";
|
|
24
24
|
import {
|
|
25
25
|
getModelConfig
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-OJRTTERA.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-U4VSBDO5.js";
|
|
34
34
|
|
|
35
35
|
// packages/core/publicAgentSeeds.ts
|
|
36
36
|
var AGENT_SEED_DEFAULTS = {
|
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeMediaConfirmExecutionRevision
|
|
3
3
|
} from "./chunk-QYPE3TS3.js";
|
|
4
|
+
import {
|
|
5
|
+
getActiveDialogKey
|
|
6
|
+
} from "./chunk-I2OYPD3Y.js";
|
|
4
7
|
import {
|
|
5
8
|
selectIdentityToken
|
|
6
9
|
} from "./chunk-PXYBUFDB.js";
|
|
7
10
|
import {
|
|
8
11
|
compactWhitespace
|
|
9
12
|
} from "./chunk-DWLEOOGR.js";
|
|
13
|
+
import {
|
|
14
|
+
splitDialogKeyIdentity
|
|
15
|
+
} from "./chunk-YZMNK53S.js";
|
|
16
|
+
import {
|
|
17
|
+
isRecord
|
|
18
|
+
} from "./chunk-KUG52IAP.js";
|
|
10
19
|
import {
|
|
11
20
|
asTrimmedLowercaseString
|
|
12
21
|
} from "./chunk-QSJ3HFEF.js";
|
|
@@ -32,6 +41,55 @@ var selectCurrentTokenFromState = (state) => {
|
|
|
32
41
|
const token = selectIdentityToken(state);
|
|
33
42
|
return typeof token === "string" ? token : null;
|
|
34
43
|
};
|
|
44
|
+
var selectCurrentDialogKeyFromState = (_state) => getActiveDialogKey();
|
|
45
|
+
var CONTROL_OR_WHITESPACE_RE = /[\u0000-\u001f\u007f\s]/;
|
|
46
|
+
var hasSuppliedDialogValue = (value) => value != null && (typeof value !== "string" || value.trim().length > 0);
|
|
47
|
+
var normalizeToolDialogId = (value) => {
|
|
48
|
+
if (typeof value !== "string") return null;
|
|
49
|
+
if (/[\u0000-\u001f\u007f]/.test(value)) return null;
|
|
50
|
+
const trimmed = value.trim();
|
|
51
|
+
if (!trimmed || CONTROL_OR_WHITESPACE_RE.test(trimmed)) return null;
|
|
52
|
+
if (trimmed.includes("-msg-")) return null;
|
|
53
|
+
if (trimmed.startsWith("dialog-")) {
|
|
54
|
+
const identity = splitDialogKeyIdentity(trimmed);
|
|
55
|
+
const parsedId = identity?.dialogId?.trim();
|
|
56
|
+
if (!parsedId || CONTROL_OR_WHITESPACE_RE.test(parsedId) || parsedId.includes("-msg-")) {
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
return parsedId;
|
|
60
|
+
}
|
|
61
|
+
return trimmed;
|
|
62
|
+
};
|
|
63
|
+
var resolveToolDialogId = (thunkApi, options = {}) => {
|
|
64
|
+
if (hasSuppliedDialogValue(options?.dialogId)) {
|
|
65
|
+
return normalizeToolDialogId(options.dialogId);
|
|
66
|
+
}
|
|
67
|
+
if (hasSuppliedDialogValue(options?.dialogKey)) {
|
|
68
|
+
return normalizeToolDialogId(options.dialogKey);
|
|
69
|
+
}
|
|
70
|
+
if (hasSuppliedDialogValue(thunkApi?.extra?.dialogId)) {
|
|
71
|
+
return normalizeToolDialogId(thunkApi.extra.dialogId);
|
|
72
|
+
}
|
|
73
|
+
if (hasSuppliedDialogValue(thunkApi?.extra?.dialogKey)) {
|
|
74
|
+
return normalizeToolDialogId(thunkApi.extra.dialogKey);
|
|
75
|
+
}
|
|
76
|
+
if (hasSuppliedDialogValue(thunkApi?.dialogId)) {
|
|
77
|
+
return normalizeToolDialogId(thunkApi.dialogId);
|
|
78
|
+
}
|
|
79
|
+
if (hasSuppliedDialogValue(thunkApi?.dialogKey)) {
|
|
80
|
+
return normalizeToolDialogId(thunkApi.dialogKey);
|
|
81
|
+
}
|
|
82
|
+
let state;
|
|
83
|
+
try {
|
|
84
|
+
state = typeof thunkApi?.getState === "function" ? thunkApi.getState() : void 0;
|
|
85
|
+
} catch {
|
|
86
|
+
state = void 0;
|
|
87
|
+
}
|
|
88
|
+
if (hasSuppliedDialogValue(state?.dialog?.currentDialogKey)) {
|
|
89
|
+
return normalizeToolDialogId(state.dialog.currentDialogKey);
|
|
90
|
+
}
|
|
91
|
+
return normalizeToolDialogId(selectCurrentDialogKeyFromState(state));
|
|
92
|
+
};
|
|
35
93
|
var resolveToolBaseUrl = (currentServer) => {
|
|
36
94
|
const _window = globalThis.window;
|
|
37
95
|
if (!_window) return (currentServer || "").replace(/\/+$/, "");
|
|
@@ -127,11 +185,26 @@ var buildToolRequestHeaders = (thunkApi, options = {}) => {
|
|
|
127
185
|
if (agentKey && typeof agentKey === "string" && agentKey.trim()) {
|
|
128
186
|
headers["X-Nolo-Agent-Key"] = agentKey.trim();
|
|
129
187
|
}
|
|
188
|
+
const dialogId = resolveToolDialogId(thunkApi, options);
|
|
189
|
+
if (dialogId) {
|
|
190
|
+
headers["X-Nolo-Dialog-Id"] = dialogId;
|
|
191
|
+
}
|
|
130
192
|
if (typeof window !== "undefined" && window.__NOLO_DESKTOP__) {
|
|
131
193
|
headers["X-Nolo-Desktop-Tool"] = "1";
|
|
132
194
|
}
|
|
133
195
|
return headers;
|
|
134
196
|
};
|
|
197
|
+
var buildToolRequestBody = (thunkApi, body, options) => {
|
|
198
|
+
if (!options.injectDialogId) return body;
|
|
199
|
+
if (!isRecord(body)) return body;
|
|
200
|
+
if ("dialogId" in body) return body;
|
|
201
|
+
const dialogId = resolveToolDialogId(thunkApi, options);
|
|
202
|
+
if (!dialogId) return body;
|
|
203
|
+
return {
|
|
204
|
+
...body,
|
|
205
|
+
dialogId
|
|
206
|
+
};
|
|
207
|
+
};
|
|
135
208
|
var buildResponsePreview = (text) => compactWhitespace(text).slice(0, 240);
|
|
136
209
|
var looksLikeHtmlResponse = (text, contentType) => {
|
|
137
210
|
if (contentType?.toLowerCase().includes("text/html")) return true;
|
|
@@ -149,7 +222,7 @@ async function callToolApi(thunkApi, path, body, options = {}) {
|
|
|
149
222
|
method,
|
|
150
223
|
headers,
|
|
151
224
|
...options.signal ? { signal: options.signal } : {},
|
|
152
|
-
...method === "GET" ? {} : { body: JSON.stringify(body) }
|
|
225
|
+
...method === "GET" ? {} : { body: JSON.stringify(buildToolRequestBody(thunkApi, body, options)) }
|
|
153
226
|
});
|
|
154
227
|
const contentType = response.headers.get("content-type");
|
|
155
228
|
const responseText = await response.text();
|
|
@@ -204,6 +277,7 @@ async function callToolApi(thunkApi, path, body, options = {}) {
|
|
|
204
277
|
}
|
|
205
278
|
|
|
206
279
|
export {
|
|
280
|
+
resolveToolDialogId,
|
|
207
281
|
resolveToolBaseUrl,
|
|
208
282
|
resolveToolApiBaseUrl,
|
|
209
283
|
getRequestConfig,
|