nolo-cli 0.227.0-alpha.1 → 0.227.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-JKQGZ3HU.js → _executeModel-CXOFYVHC.js} +93 -87
- package/{action-CK64LS6S.js → action-R2EIXR7I.js} +11 -8
- package/{addContentAction-CARFID6E.js → addContentAction-W6JVLQ6H.js} +17 -16
- package/{addDialogAgentAction-APLZLFW5.js → addDialogAgentAction-LVNKMXKZ.js} +20 -19
- package/{agentDeleteCommand-NVR2V2HH.js → agentDeleteCommand-VFSZPEQ5.js} +145 -137
- package/{agentEmailCommands-UCVOWD3S.js → agentEmailCommands-KRUIF4EH.js} +149 -137
- package/{agentFavoriteCommands-4PDOP3GW.js → agentFavoriteCommands-7LOP3HUD.js} +6 -6
- package/{agentGrantCommands-FLCEXLUH.js → agentGrantCommands-L6O2HVJI.js} +7 -7
- package/agentListCommands-TDFOLWN3.js +644 -0
- package/{agentMachineCommands-V3DGEJU4.js → agentMachineCommands-PSH7Q5PF.js} +76 -67
- package/{agentProviderCommands-7QBFRFRK.js → agentProviderCommands-C5T7C5KZ.js} +7 -7
- package/{agentPullCommand-E6JBGBVG.js → agentPullCommand-QQQZSC6S.js} +7 -7
- package/agentRecordCommands-KCKCW2QU.js +188 -0
- package/agentRunCommand-EF2T2QWD.js +223 -0
- package/{agentRunControl-SNZZ5XP4.js → agentRunControl-CSMSJFFB.js} +25 -17
- package/{agentRuntimeLocal-GOX2DIY7.js → agentRuntimeLocal-6QXQS3TS.js} +64 -50
- package/{agentSlice-N7H2FRJA.js → agentSlice-IZ5ANAF7.js} +19 -18
- package/{appDeleteCommands-LZDN26FU.js → appDeleteCommands-4M7ETEEG.js} +68 -59
- package/{appDeployCommands-6IO6TTZH.js → appDeployCommands-2VJ2NDW5.js} +68 -59
- package/{appDeployStatusCommands-FG3LX24J.js → appDeployStatusCommands-LDFSWOPQ.js} +68 -59
- package/{appGetCommands-NAKVDVD4.js → appGetCommands-RHVNOPT4.js} +68 -59
- package/{appListCommands-KL56RN73.js → appListCommands-U3XEVTL4.js} +68 -59
- package/{authCommand-AUN5MXV2.js → authCommand-PVZ45QRO.js} +36 -31
- package/{authCommands-D2IPS6ES.js → authCommands-6AUYO65N.js} +18 -13
- package/{builtinSkillRegistry-UQGLKRYP.js → builtinSkillRegistry-LRVAQCPW.js} +6 -6
- package/{chromeCommands-G5UDKVSV.js → chromeCommands-S7AW3AOD.js} +383 -6
- package/{chromeOpsCommands-UJWN5HWH.js → chromeOpsCommands-TBPM6MR4.js} +8 -8
- package/{chunk-ABGULE7H.js → chunk-22YUCKMK.js} +16 -16
- package/{chunk-P2ZLUIW2.js → chunk-2BSLGODA.js} +350 -25
- package/{chunk-GOLPOTG5.js → chunk-2COM7SAH.js} +4 -4
- package/{chunk-ULAQPRHX.js → chunk-2FK2KZSL.js} +1 -1
- package/{chunk-PLPLH2XZ.js → chunk-2IPR4PBB.js} +2 -2
- package/chunk-2SXN7LAY.js +15 -0
- package/{chunk-XI2BWJM5.js → chunk-324FWHUA.js} +20 -3
- package/{chunk-7Z3WUZ4Q.js → chunk-3YYFU6H7.js} +74 -46
- package/{chunk-C2B7M567.js → chunk-4OXPN3WC.js} +17 -6
- package/chunk-4TVOZGOS.js +62 -0
- package/chunk-4ZCTKB27.js +31 -0
- package/chunk-53AEDFBL.js +33394 -0
- package/chunk-53W5BXLN.js +340 -0
- package/{chunk-OXA5GWHU.js → chunk-56O2J2Y4.js} +3 -3
- package/{chunk-IAJJYHIB.js → chunk-56PB7FEN.js} +8 -8
- package/{chunk-JWXITTQB.js → chunk-5HUO7SEX.js} +9 -107
- package/{chunk-AGP3YSEC.js → chunk-5PASH2MB.js} +46 -1
- package/{chunk-PHOSZT3E.js → chunk-5UAKGCQG.js} +1 -1
- package/{chunk-5RKRXQ2H.js → chunk-5VVP7DW3.js} +20 -13
- package/chunk-6ASGEP5D.js +21 -0
- package/chunk-6PXFEPHL.js +103 -0
- package/chunk-6RSNVJGO.js +279 -0
- package/{chunk-YGMBIXCF.js → chunk-6XRPBZRS.js} +4 -2
- package/{chunk-KMRKZNGT.js → chunk-6YYTTLJV.js} +14 -13
- package/{chunk-VREDDN25.js → chunk-76HAJUOJ.js} +14 -9
- package/{chunk-FKEZOMIF.js → chunk-7DXFOL5B.js} +1410 -768
- package/{chunk-LA7JYAKF.js → chunk-AKPKOI5Z.js} +6 -6
- package/{chunk-PWTNI4N7.js → chunk-ANUP75N2.js} +22 -0
- package/{chunk-F5AY2UZL.js → chunk-AO6T7U62.js} +592 -68
- package/{chunk-LJSNEV7M.js → chunk-AS6L5KSD.js} +8 -8
- package/{chunk-GOQ6ZVTN.js → chunk-AVSZ6PBM.js} +5 -5
- package/chunk-BIDSIRTS.js +307 -0
- package/chunk-C5A54QS7.js +108 -0
- package/{chunk-KYH7XW3K.js → chunk-CD2DK5JA.js} +135 -14
- package/{chunk-G6HJUMST.js → chunk-CJQBWHNM.js} +2 -2
- package/{chunk-EVGU5P4U.js → chunk-CO6E7YK6.js} +1 -1
- package/{chunk-ZYA2YDB6.js → chunk-CT5JXREL.js} +17 -17
- package/{chunk-VPAZ6BEN.js → chunk-CTWCZKNS.js} +42 -17
- package/{chunk-4OKTPFNX.js → chunk-CX2LYFZQ.js} +107 -66
- package/{chunk-YFLVRVYK.js → chunk-DLT2DN4M.js} +1 -1
- package/{chunk-LKA64WH4.js → chunk-DMPZMYH4.js} +37 -1
- package/{chunk-KFHREHUQ.js → chunk-DXWGFL2Z.js} +89 -1
- package/{chunk-OQHIVPG4.js → chunk-E6A5NHDH.js} +4 -1
- package/{chunk-IX2BXN2K.js → chunk-EDT65EUE.js} +6 -6
- package/{chunk-VP3BINY7.js → chunk-EQZZASCD.js} +31 -1
- package/{chunk-45LZIYXB.js → chunk-ESN4WNWU.js} +3 -2
- package/{chunk-M3JEW6N6.js → chunk-F26GAEH3.js} +10 -0
- package/{chunk-CVERLOJM.js → chunk-F4XIS5DL.js} +1215 -1431
- package/chunk-FDZ2GBWO.js +166 -0
- package/chunk-FGHEF6WI.js +34 -0
- package/{chunk-CSW7IPVD.js → chunk-FMYNIAI6.js} +61 -24
- package/{chunk-VIHDJ3FK.js → chunk-FNT5VENS.js} +15 -15
- package/{chunk-PMDVQBGA.js → chunk-GAHJLSDO.js} +14 -7
- package/{chunk-GRXSJR2Z.js → chunk-GVTFSLNI.js} +112 -109
- package/{chunk-UN7HIYMH.js → chunk-GX6DITLQ.js} +1 -1
- package/{chunk-3VFYQH3I.js → chunk-HIDVLMZC.js} +203 -156
- package/{chunk-5LQDHFBN.js → chunk-IDFGIROZ.js} +20 -17
- package/{chunk-UCFPVYP7.js → chunk-IFWXH7LH.js} +1 -1
- package/{chunk-LXTC53TN.js → chunk-J45ACAOQ.js} +815 -361
- package/{chunk-S6K5F3KP.js → chunk-JP2BH4NC.js} +1 -1
- package/{chunk-X2KRQP7V.js → chunk-JV5FHHF7.js} +1 -1
- package/{chunk-6EDAMVG6.js → chunk-K26XPZRB.js} +11 -11
- package/{chunk-RU6DULV4.js → chunk-KB5RQRSJ.js} +1 -1
- package/{chunk-T43K75CK.js → chunk-KC2QVCI7.js} +24 -178
- package/chunk-KK3FCYZM.js +647 -0
- package/{chunk-XZODOEKU.js → chunk-KMDHRVS7.js} +29 -5
- package/{chunk-4JVNURX4.js → chunk-KQHEGELM.js} +68 -16
- package/{chunk-UAPNPNSG.js → chunk-KW72WVHO.js} +2085 -1046
- package/{chunk-ILHQ2AXT.js → chunk-KZAT2M2V.js} +14 -8
- package/{chunk-L42CBKBZ.js → chunk-KZKMH374.js} +3 -3
- package/{chunk-ZI5SZ3MV.js → chunk-L6BLA6BT.js} +40 -31
- package/{chunk-AK5O76CC.js → chunk-LC5CVWP2.js} +3 -3
- package/{chunk-N5Z2V73W.js → chunk-LELADM5Q.js} +1 -1
- package/chunk-LHCGKAFO.js +739 -0
- package/{chunk-YOT437BH.js → chunk-LOF2EFUE.js} +203 -123
- package/{chunk-YQETUZ5V.js → chunk-LTVEOOZL.js} +29 -16
- package/{chunk-T2BEPTAG.js → chunk-MAA42MMV.js} +272 -26
- package/{chunk-NAOO4PVX.js → chunk-MECW2HJG.js} +16 -16
- package/{chunk-5HL4KC4A.js → chunk-MEDPR36J.js} +62 -87
- package/chunk-MVOZ22RZ.js +26 -0
- package/{chunk-YPPKC6FL.js → chunk-MYYNZG2M.js} +140 -40
- package/{chunk-UVUVQVZ6.js → chunk-MZVCFV3T.js} +19 -15
- package/{chunk-CQVGR3MX.js → chunk-N7MXFYLU.js} +7 -7
- package/{chunk-IC2I373Q.js → chunk-NEG5LYK5.js} +4 -4
- package/chunk-NJJK3PDA.js +133 -0
- package/{chunk-OB6DVWPF.js → chunk-OGZE6BZG.js} +331 -99
- package/{chunk-M3Y4IBIR.js → chunk-OHUYN3YU.js} +6 -6
- package/chunk-P27E22MA.js +203 -0
- package/{chunk-SFTTXGPM.js → chunk-PDAXMBLW.js} +35 -28
- package/{chunk-OBSEKCVK.js → chunk-PQ63BDV3.js} +210 -51
- package/{chunk-EUCFKKDM.js → chunk-PVFYPUIM.js} +40 -10
- package/{chunk-SRG5CNLC.js → chunk-QIVE5WJE.js} +8 -8
- package/{chunk-HOCHUZQ7.js → chunk-QJTZ76CP.js} +24 -6
- package/{chunk-5RKUPJYL.js → chunk-QLUYDJST.js} +11 -3
- package/{chunk-7Z6EW7AH.js → chunk-QOURTDZL.js} +97 -11
- package/{chunk-VZW34YUL.js → chunk-QWSH3UAQ.js} +8 -5
- package/{chunk-MK2Q7ZJD.js → chunk-R7XWZDOH.js} +58 -24
- package/{chunk-5FUN7EG4.js → chunk-RD3QLZQV.js} +83 -47
- package/{chunk-SW6OD4KE.js → chunk-RDPAIR67.js} +351 -18
- package/{chunk-NO3VBWTL.js → chunk-RXTZB2DH.js} +4 -4
- package/{chunk-AXYH4734.js → chunk-S25VJYXV.js} +21 -15
- package/{chunk-MWHOH4RJ.js → chunk-SESKIWB4.js} +6 -6
- package/{chunk-GUVXQSFZ.js → chunk-SF4GMDZO.js} +18 -108
- package/{chunk-TINJKQSO.js → chunk-SQRKAYQW.js} +25 -25
- package/chunk-SR4FE5VD.js +9 -0
- package/{chunk-3HTP4WZQ.js → chunk-SX6AWTNK.js} +46 -8
- package/{chunk-4WVJLODK.js → chunk-T23G6PXQ.js} +8 -3
- package/{chunk-CLCXHIBS.js → chunk-T4QY3HZ5.js} +1 -1
- package/{chunk-HVUDBOQG.js → chunk-TB5KTLNB.js} +9 -6
- package/{chunk-KRRE4A7D.js → chunk-TKE4OJ4B.js} +280 -56
- package/{chunk-S2NTVGA2.js → chunk-U35UUM5K.js} +2 -1
- package/{chunk-PPJYZRSQ.js → chunk-U5LOKQ2R.js} +30 -14
- package/{chunk-CKT6QUE2.js → chunk-UHW6SCVK.js} +1 -1
- package/{chunk-T5N6NHAT.js → chunk-UPOW5HTG.js} +6 -6
- package/{chunk-WJP4TH6U.js → chunk-VEVLLBFK.js} +2 -2
- package/{chunk-HGDKT2D6.js → chunk-VTHWBTRE.js} +177 -1
- package/{chunk-KJAAPGBE.js → chunk-VUHKG4KS.js} +6 -6
- package/{chunk-TOKPHZ55.js → chunk-W3HSD32M.js} +17 -10
- package/{chunk-2SKTCNWO.js → chunk-W5OJBZLZ.js} +4 -4
- package/chunk-WBSJAIZP.js +170 -0
- package/chunk-WDWZPASX.js +29 -0
- package/chunk-WFGNWWJI.js +326 -0
- package/{chunk-FIYSMXHY.js → chunk-WWTSEBDF.js} +1 -1
- package/{chunk-E2BESSAW.js → chunk-X4O7FJF5.js} +2 -0
- package/{chunk-HYKGIXNO.js → chunk-XGWRH3OF.js} +114 -29
- package/{chunk-XIEYGCN6.js → chunk-XKV53E4E.js} +460 -117
- package/{chunk-JHF6VLVL.js → chunk-XYRTC2Y3.js} +155 -170
- package/{chunk-L5I543VB.js → chunk-YGDYYFRX.js} +20 -24
- package/{chunk-ZADGPNTV.js → chunk-YHWMKGOX.js} +77 -103
- package/{chunk-6OVNSQHN.js → chunk-YLAHYLDQ.js} +5 -0
- package/chunk-Z6YTCDU4.js +24 -0
- package/{chunk-PVAWNHP5.js → chunk-ZP26NIZE.js} +647 -387
- package/{chunk-2G3YSVO6.js → chunk-ZQ6K57FJ.js} +3 -3
- package/{cliAgentConfigHelpers-QVSQYTKC.js → cliAgentConfigHelpers-37ZNEY5Y.js} +16 -16
- package/{cliAuthorityBrokerClient-XHH7MH2P.js → cliAuthorityBrokerClient-SFPC3WVK.js} +1 -1
- package/{cliEnvHelpers-D6HMC46Z.js → cliEnvHelpers-CNMP3RDX.js} +2 -2
- package/{cliExecutor-4MAX3PZL.js → cliExecutor-K6FDZTQ2.js} +3 -1
- package/cliLocalAgentRecordReader-53773JID.js +102 -0
- package/{commandRegistry-TKR6OWXP.js → commandRegistry-RJUO2VOD.js} +113 -101
- package/{contentThunks-BQWRPCTM.js → contentThunks-4EFHLUTB.js} +44 -41
- package/{cooldownCommands-FZYQOWI5.js → cooldownCommands-QL6DWGVU.js} +3 -3
- package/{createAgentAutomationAction-GFI6SJZV.js → createAgentAutomationAction-ZFFGJ7CZ.js} +44 -41
- package/{createDialogAction-MMBIHFFU.js → createDialogAction-SDUGVTPS.js} +45 -43
- package/{createPageAction-EEYUE5FB.js → createPageAction-NNM3OFLY.js} +49 -46
- package/{db-CS4ZJQKV.js → db-6NRZLEW2.js} +10 -7
- package/{dbSlice-X4Z4E4QU.js → dbSlice-5MQ3ELID.js} +16 -15
- package/{deleteFile-QOOP2UK7.js → deleteFile-VCCHS72Y.js} +12 -9
- package/{dialogCommands-OXBQ73DD.js → dialogCommands-SJK5KWXU.js} +73 -66
- package/dialogMessageRecord-OAV77LT7.js +7 -0
- package/{dialogNotifyCommand-VWS5G4OO.js → dialogNotifyCommand-PST75COP.js} +19 -19
- package/{dialogSlice-KGYIABDY.js → dialogSlice-2KLMHECR.js} +44 -41
- package/{dialogUsageCommand-FEWCN7IA.js → dialogUsageCommand-BZPKR3DW.js} +8 -8
- package/{docCreateCommands-LS32VKY3.js → docCreateCommands-K7CDL2HY.js} +66 -57
- package/{docDeleteCommands-JTYR5RPH.js → docDeleteCommands-ZEY5YCSP.js} +69 -60
- package/{docReadCommands-E5LTVKWN.js → docReadCommands-A4ROLIQG.js} +66 -57
- package/{docStore-TVS2FNER.js → docStore-A4O6YJAM.js} +19 -18
- package/{docUpdateCommands-I3J3JDZ2.js → docUpdateCommands-6HTFQY4O.js} +66 -57
- package/{fetchMessages-Q3INLN5F.js → fetchMessages-TQEUZD7H.js} +3 -3
- package/{getPricing-VNGFM4PN.js → getPricing-FCHYVRJU.js} +6 -6
- package/{handleSendMessageAction-SSON36TJ.js → handleSendMessageAction-6WEFYBUC.js} +87 -82
- package/{hostCredentialCreate-WTW4THJF.js → hostCredentialCreate-WOWCNOYM.js} +136 -123
- package/index.js +54 -16
- package/keys-RWF7UCB4.js +1 -1
- package/{lib-OT5OTXRU.js → lib-62SWPXNF.js} +3 -7
- package/{localDialogRead-V36DX2Q2.js → localDialogRead-3T2KMCRC.js} +2 -2
- package/{localRuntimeAdapter-MI2JGXSF.js → localRuntimeAdapter-7EDBDRYW.js} +147 -133
- package/{localRuntimeAuthority-IBJAT62G.js → localRuntimeAuthority-7DKIT7UH.js} +4 -2
- package/{localRuntimeDb-N7KHDXS2.js → localRuntimeDb-5WZ4RJJO.js} +1 -1
- package/{machineCommands-3LROJZDK.js → machineCommands-XRPC67LL.js} +290 -354
- package/machineWsRunDispatch-SOGFW472.js +203 -0
- package/markdownToSlate-KIYM7B3P.js +8 -0
- package/mcpLocalAuthorizeCommand-VOJARP3M.js +106 -0
- package/{memberThunks-CFEPHAND.js → memberThunks-KC3WJGL3.js} +26 -21
- package/{memoryCommands-JQMEJO7J.js → memoryCommands-BC6REPQB.js} +6 -6
- package/{models-H5NNZRLH.js → models-EP7VG6N2.js} +2 -2
- package/{overlay-THLKYIWY.js → overlay-JA3SPVUS.js} +7 -3
- package/package.json +1 -1
- package/{projectArchive-3X54XFVN.js → projectArchive-GDVPIZX2.js} +50 -47
- package/{providerPresetApply-FO36N5TX.js → providerPresetApply-4H7YP5D7.js} +9 -9
- package/{providerRegistry-U2BSFE6K.js → providerRegistry-F3UPOTIY.js} +9 -9
- package/{read-KA3L2V7O.js → read-T7VU2IMO.js} +11 -10
- package/{readDocTool-AMAZAPAW.js → readDocTool-BPQ3QJSD.js} +1 -1
- package/{readlineWorkspace-Z3YUH4SX.js → readlineWorkspace-OWQIIUGH.js} +9406 -6791
- package/rememberExplicit-CPAPONSI.js +15 -0
- package/{removeDialogAgentAction-JQOJSUM7.js → removeDialogAgentAction-FEUUVMYC.js} +23 -22
- package/{runAgentClientLoop-4FCFLMDJ.js → runAgentClientLoop-SJREK2B7.js} +107 -86
- package/{runtimeDoctorCommands-CXOCVDPU.js → runtimeDoctorCommands-XQD4MN4I.js} +19 -19
- package/{secretCommands-GGUAWAE7.js → secretCommands-LH7QTJO2.js} +3 -3
- package/{setDialogExtraReferencesAction-YXQTGXIN.js → setDialogExtraReferencesAction-JSTQJPXL.js} +19 -18
- package/{setPrimaryDialogAgentAction-YNLB66WE.js → setPrimaryDialogAgentAction-Z2BQE3IY.js} +23 -22
- package/{settingThunks-E6N7RSSS.js → settingThunks-C2YWCNYI.js} +186 -67
- package/{skillDiscovery-B5V23AXP.js → skillDiscovery-MDDKPTW3.js} +4 -3
- package/{spaceCommands-DB5DKC2J.js → spaceCommands-YRBQ52PG.js} +71 -62
- package/{store-JRVN62NM.js → store-Z53ICFL3.js} +3 -1
- package/{streamAgentChatTurn-FCBGMD4D.js → streamAgentChatTurn-NCA4BKDZ.js} +244 -185
- package/{switchDialogAgentAction-LAHLUECU.js → switchDialogAgentAction-G7XVAOGH.js} +20 -19
- package/{tableCommands-VNSXHAMG.js → tableCommands-UHEA5QNL.js} +14 -11
- package/{toolApiClient-OGQEBQVX.js → toolApiClient-N5PYW2R3.js} +8 -6
- package/{tools-6JD36D6K.js → tools-6WQVUGKV.js} +74 -70
- package/tuiRestart-3J7LRMPR.js +41 -0
- package/{tuiSummaryLlmCaller-UHZIPGAX.js → tuiSummaryLlmCaller-2J6NG53N.js} +24 -23
- package/{updateCommands-KZ54HCU5.js → updateCommands-5OYND6EF.js} +8 -6
- package/{updateDialogTitleAction-RV3EUEN3.js → updateDialogTitleAction-QCSN3RYO.js} +46 -43
- package/{usageCommand-KFVV6UL3.js → usageCommand-SK7JTEPC.js} +3 -3
- package/{usageRebuildCommand-HHFSNK46.js → usageRebuildCommand-DF3HUP6F.js} +4 -4
- package/webapi-QVV65DQF.js +2487 -0
- package/{windowsSelfUpdate-KERHIAB4.js → windowsSelfUpdate-HIYNL3VR.js} +2 -2
- package/workContext-Y3ADAPZU.js +14 -0
- package/workContextAccess-UZHDLBUR.js +11 -0
- package/workContextWriteNotice-YCSSMHN4.js +7 -0
- package/{workloadLifecycle-O2I3NZ2Q.js → workloadLifecycle-ZCSQCHG3.js} +9 -9
- package/agentListCommands-C65UESYM.js +0 -1004
- package/agentRecordCommands-6RCJS2EY.js +0 -176
- package/agentRunCommand-P3GRKXKS.js +0 -208
- package/chunk-2WZXXAQD.js +0 -57
- package/chunk-5ZMIIR23.js +0 -265
- package/chunk-62HXNQVV.js +0 -134
- package/chunk-BJF2MHJ3.js +0 -118
- package/chunk-KEPOVMF4.js +0 -91
- package/chunk-PXKF5CV4.js +0 -357
- package/chunk-WACI5I6V.js +0 -147
- package/chunk-YGILMZ7N.js +0 -81
- package/cliLocalAgentRecordReader-SPKAJYME.js +0 -90
- package/machineWsRunDispatch-BUUJRUUB.js +0 -191
- package/{accountResolver-EK2S4PWF.js → accountResolver-QETKNC7T.js} +4 -4
- package/{chunk-VXL2FZTP.js → chunk-HXER7YJF.js} +3 -3
- package/{chunk-BLVSFYQ3.js → chunk-LISC7BD4.js} +3 -3
- package/{chunk-SSGTV4FC.js → chunk-USGHJSGO.js} +5 -5
- package/{chunk-FJ23FZXF.js → chunk-VIYVRPMJ.js} +0 -0
- package/{offlineMarxistsAgentCommand-AGA2X5E4.js → offlineMarxistsAgentCommand-XVXUE6G5.js} +5 -5
|
@@ -1,32 +1,35 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeTimingMs
|
|
3
3
|
} from "./chunk-H57T64RA.js";
|
|
4
|
+
import {
|
|
5
|
+
sha256Hex
|
|
6
|
+
} from "./chunk-SR4FE5VD.js";
|
|
4
7
|
import {
|
|
5
8
|
estimateTokenCount
|
|
6
9
|
} from "./chunk-PSCNXBYA.js";
|
|
7
10
|
import {
|
|
8
11
|
isAbortError
|
|
9
12
|
} from "./chunk-7DPNBQSV.js";
|
|
10
|
-
import {
|
|
11
|
-
ALL_MODELS
|
|
12
|
-
} from "./chunk-62HXNQVV.js";
|
|
13
|
-
import {
|
|
14
|
-
MODEL_LOOKUP_MAP
|
|
15
|
-
} from "./chunk-KYH7XW3K.js";
|
|
16
|
-
import {
|
|
17
|
-
PLATFORM_HOSTED_DEEPSEEK_FLASH_MODEL,
|
|
18
|
-
isPlatformManagedProvider,
|
|
19
|
-
resolvePlatformEffectiveModel
|
|
20
|
-
} from "./chunk-OBSEKCVK.js";
|
|
21
13
|
import {
|
|
22
14
|
asTrimmedNonEmptyStringArray
|
|
23
15
|
} from "./chunk-I42VC5KR.js";
|
|
16
|
+
import {
|
|
17
|
+
ALL_MODELS
|
|
18
|
+
} from "./chunk-6ASGEP5D.js";
|
|
24
19
|
import {
|
|
25
20
|
asOptionalFiniteNumber
|
|
26
21
|
} from "./chunk-WWC7I6TA.js";
|
|
22
|
+
import {
|
|
23
|
+
MODEL_LOOKUP_MAP
|
|
24
|
+
} from "./chunk-CD2DK5JA.js";
|
|
27
25
|
import {
|
|
28
26
|
asOptionalTrimmedString
|
|
29
27
|
} from "./chunk-G3SUCT4W.js";
|
|
28
|
+
import {
|
|
29
|
+
PLATFORM_HOSTED_DEEPSEEK_FLASH_MODEL,
|
|
30
|
+
isPlatformManagedProvider,
|
|
31
|
+
resolvePlatformEffectiveModel
|
|
32
|
+
} from "./chunk-PQ63BDV3.js";
|
|
30
33
|
|
|
31
34
|
// packages/core/chat/messageContentSerialize.ts
|
|
32
35
|
var serializeMessageContent = (content, imagePlaceholder = "[\u56FE\u7247]") => {
|
|
@@ -321,12 +324,6 @@ async function runSummaryWithContract(args) {
|
|
|
321
324
|
return execute("current");
|
|
322
325
|
}
|
|
323
326
|
|
|
324
|
-
// packages/core/sha256.ts
|
|
325
|
-
import SHA256 from "crypto-js/sha256.js";
|
|
326
|
-
function sha256Hex(text) {
|
|
327
|
-
return SHA256(text).toString();
|
|
328
|
-
}
|
|
329
|
-
|
|
330
327
|
// packages/ai/context/toolOutputCap.ts
|
|
331
328
|
var TOOL_OUTPUT_CAP_WINDOW_RATIO = 0.12;
|
|
332
329
|
var TOOL_OUTPUT_CAP_MIN_TOKENS = 4e3;
|
|
@@ -753,6 +750,73 @@ var DECLARATION_RESERVE = 40;
|
|
|
753
750
|
var USER_MESSAGE_MAX_DEMAND = 600;
|
|
754
751
|
var SUMMARY_USER_SHARE = 0.2;
|
|
755
752
|
var DECLARATION_SPLIT_COST = 20;
|
|
753
|
+
function interruptedBatchMarker(declared, returned) {
|
|
754
|
+
const scope = "[\u672C\u6BB5\u5386\u53F2\u8303\u56F4\u5185";
|
|
755
|
+
return returned === 0 ? `${scope}\uFF0C\u8BE5\u5DE5\u5177\u6279\u6B21\u5728\u540E\u7EED\u7528\u6237\u6D88\u606F\u524D\u6CA1\u6709\u8BB0\u5F55\u5230\u7ED3\u679C\uFF0C\u6309\u4E2D\u65AD\u5904\u7406\uFF1A\u58F0\u660E\u8FC7\u7684\u8C03\u7528\u4E0D\u8BA1\u4E3A\u5DF2\u5B8C\u6210\u3002]` : `${scope}\uFF0C\u8BE5\u5DE5\u5177\u6279\u6B21\u58F0\u660E\u4E86 ${declared} \u4E2A\u8C03\u7528\uFF0C\u53EA\u8BB0\u5F55\u4E86 ${returned} \u4E2A\u7ED3\u679C\uFF1B\u672A\u8BB0\u5F55\u7ED3\u679C\u7684\u8C03\u7528\u6309\u4E2D\u65AD\u5904\u7406\uFF0C\u4E0D\u8BA1\u4E3A\u5DF2\u5B8C\u6210\u3002]`;
|
|
756
|
+
}
|
|
757
|
+
function projectInterruptedHistoricalBatches(source) {
|
|
758
|
+
const resultIndices = /* @__PURE__ */ new Map();
|
|
759
|
+
source.forEach((msg, index) => {
|
|
760
|
+
const resultId = msg.role === "tool" ? msg.tool_call_id : void 0;
|
|
761
|
+
if (typeof resultId !== "string" || !resultId) return;
|
|
762
|
+
const existing = resultIndices.get(resultId);
|
|
763
|
+
if (existing) existing.push(index);
|
|
764
|
+
else resultIndices.set(resultId, [index]);
|
|
765
|
+
});
|
|
766
|
+
return source.map((msg, index) => {
|
|
767
|
+
if (msg.role !== "assistant" || !msg.tool_calls?.length) return msg;
|
|
768
|
+
const declared = msg.tool_calls.map((call) => call?.id);
|
|
769
|
+
if (declared.some((id) => typeof id !== "string" || !id) || new Set(declared).size !== declared.length) return msg;
|
|
770
|
+
const declaredIds = declared;
|
|
771
|
+
let cursor = index + 1;
|
|
772
|
+
const returned = [];
|
|
773
|
+
while (cursor < source.length && source[cursor].role === "tool") {
|
|
774
|
+
const resultId = source[cursor].tool_call_id;
|
|
775
|
+
if (typeof resultId !== "string" || !resultId || !declaredIds.includes(resultId) || returned.includes(resultId)) return msg;
|
|
776
|
+
returned.push(resultId);
|
|
777
|
+
cursor++;
|
|
778
|
+
}
|
|
779
|
+
if (source[cursor]?.role !== "user") return msg;
|
|
780
|
+
if (returned.length === declaredIds.length) return msg;
|
|
781
|
+
const returnedSet = new Set(returned);
|
|
782
|
+
const ambiguous = declaredIds.some((id) => !returnedSet.has(id) && (resultIndices.get(id) ?? []).some((at) => at < index + 1 || at > cursor - 1));
|
|
783
|
+
if (ambiguous) return msg;
|
|
784
|
+
const keptCalls = msg.tool_calls.filter((call) => returnedSet.has(call.id));
|
|
785
|
+
const { tool_calls: _declaredCalls, ...rest } = msg;
|
|
786
|
+
const text = serializeMessageContent(msg.content);
|
|
787
|
+
const marker = interruptedBatchMarker(declaredIds.length, returned.length);
|
|
788
|
+
return {
|
|
789
|
+
...rest,
|
|
790
|
+
...keptCalls.length ? { tool_calls: keptCalls } : {},
|
|
791
|
+
content: text ? `${text}
|
|
792
|
+
${marker}` : marker
|
|
793
|
+
};
|
|
794
|
+
});
|
|
795
|
+
}
|
|
796
|
+
function buildHistoricalCompactionRequest(args) {
|
|
797
|
+
const source = args.msgsToCompress;
|
|
798
|
+
const projected = projectInterruptedHistoricalBatches(source);
|
|
799
|
+
const bounded = buildBoundedCompactionRequest({ ...args, msgsToCompress: projected });
|
|
800
|
+
if (bounded.status !== "ready") return bounded;
|
|
801
|
+
const sourceIndexById = /* @__PURE__ */ new Map();
|
|
802
|
+
source.forEach((msg, index) => {
|
|
803
|
+
if (!sourceIndexById.has(msg.id)) sourceIndexById.set(msg.id, index);
|
|
804
|
+
});
|
|
805
|
+
const coveredMessages = bounded.coveredMessages.map((msg) => {
|
|
806
|
+
const index = sourceIndexById.get(msg.id);
|
|
807
|
+
if (index === void 0) {
|
|
808
|
+
throw new Error(`historical compaction coverage returned an unknown message id: ${msg.id}`);
|
|
809
|
+
}
|
|
810
|
+
return source[index];
|
|
811
|
+
});
|
|
812
|
+
const isOrderedPrefix = !bounded.partial && coveredMessages.length === source.length && coveredMessages.every((msg, position) => msg === source[position]);
|
|
813
|
+
if (!isOrderedPrefix) {
|
|
814
|
+
throw new Error(
|
|
815
|
+
`historical compaction coverage is no longer an ordered 1:1 prefix of the source (covered ${coveredMessages.length} of ${source.length}, partial=${bounded.partial})`
|
|
816
|
+
);
|
|
817
|
+
}
|
|
818
|
+
return { ...bounded, coveredMessages };
|
|
819
|
+
}
|
|
756
820
|
function buildBoundedCompactionRequest(args) {
|
|
757
821
|
const { msgsToCompress: msgs, previousSummary, contextWindow } = args;
|
|
758
822
|
const windowValid = Number.isFinite(contextWindow) && contextWindow > 0;
|
|
@@ -1145,6 +1209,185 @@ function computeSummarySourceMetadata(messagesWithIds, summarizedBeforeId) {
|
|
|
1145
1209
|
schemaVersion: COMPACTION_SUMMARY_SCHEMA_VERSION
|
|
1146
1210
|
};
|
|
1147
1211
|
}
|
|
1212
|
+
function buildSummarySourceDiagnostics(messages, anchor) {
|
|
1213
|
+
const end = anchor ? messages.findIndex((message) => message.id === anchor) : -1;
|
|
1214
|
+
if (end < 0) return [];
|
|
1215
|
+
const width = Math.max(1, Math.ceil((end + 1) / 64));
|
|
1216
|
+
const sorted = (value) => {
|
|
1217
|
+
if (Array.isArray(value)) return value.map(sorted);
|
|
1218
|
+
if (value && typeof value === "object") return Object.fromEntries(
|
|
1219
|
+
Object.entries(value).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0).map(([key, child]) => [key, sorted(child)])
|
|
1220
|
+
);
|
|
1221
|
+
return value;
|
|
1222
|
+
};
|
|
1223
|
+
const rows = [];
|
|
1224
|
+
for (let start = 0; start <= end; start += width) {
|
|
1225
|
+
const group = messages.slice(start, Math.min(end + 1, start + width));
|
|
1226
|
+
const content = group.map((message) => ({
|
|
1227
|
+
role: message.role,
|
|
1228
|
+
content: message.content ?? "",
|
|
1229
|
+
...Array.isArray(message.tool_calls) ? { tool_calls: message.tool_calls } : {}
|
|
1230
|
+
}));
|
|
1231
|
+
rows.push({
|
|
1232
|
+
start,
|
|
1233
|
+
count: group.length,
|
|
1234
|
+
idHash: sha256Hex(JSON.stringify(group.map((message) => message.id ?? null))).slice(0, 16),
|
|
1235
|
+
messageHash: sha256Hex(JSON.stringify(content)).slice(0, 16),
|
|
1236
|
+
canonicalHash: sha256Hex(JSON.stringify(sorted(content))).slice(0, 16)
|
|
1237
|
+
});
|
|
1238
|
+
}
|
|
1239
|
+
return rows;
|
|
1240
|
+
}
|
|
1241
|
+
var MAX_SUMMARY_SOURCE_SEGMENTS = 16;
|
|
1242
|
+
function buildSummarySourceSegments(messages, anchor) {
|
|
1243
|
+
if (!anchor) return [];
|
|
1244
|
+
let end = messages.findIndex((message) => message.id === anchor);
|
|
1245
|
+
if (end === -1) {
|
|
1246
|
+
const legacy = /^local-(0|[1-9]\d*)$/.exec(anchor);
|
|
1247
|
+
if (legacy) {
|
|
1248
|
+
const index = Number(legacy[1]);
|
|
1249
|
+
if (Number.isSafeInteger(index) && index < messages.length) {
|
|
1250
|
+
end = index;
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
}
|
|
1254
|
+
if (end < 0) return [];
|
|
1255
|
+
const totalCount = end + 1;
|
|
1256
|
+
const width = Math.max(1, Math.ceil(totalCount / MAX_SUMMARY_SOURCE_SEGMENTS));
|
|
1257
|
+
const segments = [];
|
|
1258
|
+
for (let start = 0; start < totalCount; start += width) {
|
|
1259
|
+
const segEnd = Math.min(end, start + width - 1);
|
|
1260
|
+
const group = messages.slice(start, segEnd + 1);
|
|
1261
|
+
const roleCounts = /* @__PURE__ */ new Map();
|
|
1262
|
+
for (const message of group) {
|
|
1263
|
+
const role = typeof message.role === "string" && message.role ? message.role : "unknown";
|
|
1264
|
+
roleCounts.set(role, (roleCounts.get(role) ?? 0) + 1);
|
|
1265
|
+
}
|
|
1266
|
+
const roles = Array.from(roleCounts.entries()).map(([role, count]) => `${role}:${count}`).join(",");
|
|
1267
|
+
const canonical = group.map((message, offset) => ({
|
|
1268
|
+
id: `local-${start + offset}`,
|
|
1269
|
+
role: message.role,
|
|
1270
|
+
content: message.content ?? "",
|
|
1271
|
+
...Array.isArray(message.tool_calls) ? { tool_calls: message.tool_calls } : {}
|
|
1272
|
+
}));
|
|
1273
|
+
const hash = sha256Hex(JSON.stringify(canonical)).slice(0, 16);
|
|
1274
|
+
segments.push({
|
|
1275
|
+
start,
|
|
1276
|
+
end: segEnd,
|
|
1277
|
+
count: group.length,
|
|
1278
|
+
roles,
|
|
1279
|
+
hash
|
|
1280
|
+
});
|
|
1281
|
+
}
|
|
1282
|
+
return segments;
|
|
1283
|
+
}
|
|
1284
|
+
function diffSummarySourceSegments(savedSegments, currentSegments) {
|
|
1285
|
+
const saved = Array.isArray(savedSegments) ? savedSegments : [];
|
|
1286
|
+
const current = Array.isArray(currentSegments) ? currentSegments : [];
|
|
1287
|
+
const savedTotalCount = saved.reduce(
|
|
1288
|
+
(sum, seg) => sum + (typeof seg?.count === "number" && Number.isFinite(seg.count) ? seg.count : 0),
|
|
1289
|
+
0
|
|
1290
|
+
);
|
|
1291
|
+
const currentTotalCount = current.reduce(
|
|
1292
|
+
(sum, seg) => sum + (typeof seg?.count === "number" && Number.isFinite(seg.count) ? seg.count : 0),
|
|
1293
|
+
0
|
|
1294
|
+
);
|
|
1295
|
+
if (saved.length === 0) {
|
|
1296
|
+
return {
|
|
1297
|
+
matched: false,
|
|
1298
|
+
reason: "legacy_no_segments",
|
|
1299
|
+
firstMismatchIndex: null,
|
|
1300
|
+
savedSegmentCount: 0,
|
|
1301
|
+
currentSegmentCount: current.length,
|
|
1302
|
+
savedTotalCount: 0,
|
|
1303
|
+
currentTotalCount,
|
|
1304
|
+
savedSegment: null,
|
|
1305
|
+
currentSegment: null
|
|
1306
|
+
};
|
|
1307
|
+
}
|
|
1308
|
+
if (current.length === 0) {
|
|
1309
|
+
return {
|
|
1310
|
+
matched: false,
|
|
1311
|
+
reason: "anchor_missing",
|
|
1312
|
+
firstMismatchIndex: null,
|
|
1313
|
+
savedSegmentCount: saved.length,
|
|
1314
|
+
currentSegmentCount: 0,
|
|
1315
|
+
savedTotalCount,
|
|
1316
|
+
currentTotalCount: 0,
|
|
1317
|
+
savedSegment: saved[0] ?? null,
|
|
1318
|
+
currentSegment: null
|
|
1319
|
+
};
|
|
1320
|
+
}
|
|
1321
|
+
const minLen = Math.min(saved.length, current.length);
|
|
1322
|
+
let firstDiff = null;
|
|
1323
|
+
for (let i = 0; i < minLen; i++) {
|
|
1324
|
+
const s = saved[i];
|
|
1325
|
+
const c = current[i];
|
|
1326
|
+
if (!s || !c || s.start !== c.start || s.end !== c.end || s.count !== c.count || s.roles !== c.roles || s.hash !== c.hash) {
|
|
1327
|
+
firstDiff = i;
|
|
1328
|
+
break;
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
if (savedTotalCount !== currentTotalCount || saved.length !== current.length) {
|
|
1332
|
+
const idx = firstDiff ?? minLen;
|
|
1333
|
+
return {
|
|
1334
|
+
matched: false,
|
|
1335
|
+
reason: "count_changed",
|
|
1336
|
+
firstMismatchIndex: idx,
|
|
1337
|
+
savedSegmentCount: saved.length,
|
|
1338
|
+
currentSegmentCount: current.length,
|
|
1339
|
+
savedTotalCount,
|
|
1340
|
+
currentTotalCount,
|
|
1341
|
+
savedSegment: saved[idx] ?? null,
|
|
1342
|
+
currentSegment: current[idx] ?? null
|
|
1343
|
+
};
|
|
1344
|
+
}
|
|
1345
|
+
if (firstDiff !== null) {
|
|
1346
|
+
const s = saved[firstDiff] ?? null;
|
|
1347
|
+
const c = current[firstDiff] ?? null;
|
|
1348
|
+
const boundsChanged = !s || !c || s.start !== c.start || s.end !== c.end || s.count !== c.count;
|
|
1349
|
+
return {
|
|
1350
|
+
matched: false,
|
|
1351
|
+
reason: boundsChanged ? "count_changed" : "segment_hash_changed",
|
|
1352
|
+
firstMismatchIndex: firstDiff,
|
|
1353
|
+
savedSegmentCount: saved.length,
|
|
1354
|
+
currentSegmentCount: current.length,
|
|
1355
|
+
savedTotalCount,
|
|
1356
|
+
currentTotalCount,
|
|
1357
|
+
savedSegment: s,
|
|
1358
|
+
currentSegment: c
|
|
1359
|
+
};
|
|
1360
|
+
}
|
|
1361
|
+
return {
|
|
1362
|
+
matched: true,
|
|
1363
|
+
reason: "matched",
|
|
1364
|
+
firstMismatchIndex: null,
|
|
1365
|
+
savedSegmentCount: saved.length,
|
|
1366
|
+
currentSegmentCount: current.length,
|
|
1367
|
+
savedTotalCount,
|
|
1368
|
+
currentTotalCount,
|
|
1369
|
+
savedSegment: null,
|
|
1370
|
+
currentSegment: null
|
|
1371
|
+
};
|
|
1372
|
+
}
|
|
1373
|
+
function sanitizeSummarySourceSegments(raw) {
|
|
1374
|
+
if (!Array.isArray(raw) || raw.length === 0) return void 0;
|
|
1375
|
+
const sanitized = [];
|
|
1376
|
+
for (const item of raw.slice(0, MAX_SUMMARY_SOURCE_SEGMENTS)) {
|
|
1377
|
+
if (!item || typeof item !== "object") continue;
|
|
1378
|
+
const candidate = item;
|
|
1379
|
+
const start = candidate.start;
|
|
1380
|
+
const end = candidate.end;
|
|
1381
|
+
const count = candidate.count;
|
|
1382
|
+
const roles = candidate.roles;
|
|
1383
|
+
const hash = candidate.hash;
|
|
1384
|
+
if (typeof start !== "number" || !Number.isSafeInteger(start) || start < 0 || typeof end !== "number" || !Number.isSafeInteger(end) || end < start || typeof count !== "number" || !Number.isSafeInteger(count) || count < 1 || typeof roles !== "string" || roles.length === 0 || roles.length > 128 || /[\r\n\0]/.test(roles) || typeof hash !== "string" || !/^[0-9a-f]{16}$/.test(hash)) {
|
|
1385
|
+
continue;
|
|
1386
|
+
}
|
|
1387
|
+
sanitized.push({ start, end, count, roles, hash });
|
|
1388
|
+
}
|
|
1389
|
+
return sanitized.length > 0 ? sanitized : void 0;
|
|
1390
|
+
}
|
|
1148
1391
|
|
|
1149
1392
|
// packages/ai/llm/getModelContextWindow.ts
|
|
1150
1393
|
var DEFAULT_CONTEXT_WINDOW = 256e3;
|
|
@@ -1152,7 +1395,7 @@ var QWEN_3_6_CONTEXT_WINDOW = 262144;
|
|
|
1152
1395
|
var GLM_5_2_CONTEXT_WINDOW = 1e6;
|
|
1153
1396
|
var GPT_6_1_SOL_CONTEXT_WINDOW = 5e5;
|
|
1154
1397
|
var GPT_6_1_SOL_PATTERN = /(^|\/)gpt-6\.1[- ]sol(?![a-z])/;
|
|
1155
|
-
var GPT_6_1_PINNED_PATTERN = /(^|\/)gpt-6\.1[- ](sol|terra)(?![a-z0-9])/;
|
|
1398
|
+
var GPT_6_1_PINNED_PATTERN = /(^|\/)gpt-(?:6\.1[- ](sol|terra)|6\.2[- ](sol|astra))(?![a-z0-9])/;
|
|
1156
1399
|
var GPT_272K_PINNED_PATTERN = /(^|\/)(gpt-6[- ](astra|luna|sol)|gpt-5\.6[- ](sol|terra|luna))(?![a-z0-9])/;
|
|
1157
1400
|
var GPT_272K_CONTEXT_WINDOW = 272e3;
|
|
1158
1401
|
function channelPinnedContextWindow(normalizedName) {
|
|
@@ -1351,6 +1594,11 @@ var getModelInfo = (modelName) => {
|
|
|
1351
1594
|
};
|
|
1352
1595
|
|
|
1353
1596
|
export {
|
|
1597
|
+
DEFAULT_CONTEXT_WINDOW,
|
|
1598
|
+
findCodexOAuthPinnedContextWindow,
|
|
1599
|
+
findModelContextWindow,
|
|
1600
|
+
getModelContextWindow,
|
|
1601
|
+
getModelInfo,
|
|
1354
1602
|
readCacheReadInputTokens,
|
|
1355
1603
|
readCacheReadInputTokensOrNull,
|
|
1356
1604
|
readCacheCreationInputTokens,
|
|
@@ -1361,22 +1609,20 @@ export {
|
|
|
1361
1609
|
getMessageTokenCount,
|
|
1362
1610
|
resolveEffectiveCompactionBudgets,
|
|
1363
1611
|
planCompression,
|
|
1364
|
-
DEFAULT_CONTEXT_WINDOW,
|
|
1365
|
-
findCodexOAuthPinnedContextWindow,
|
|
1366
|
-
findModelContextWindow,
|
|
1367
|
-
getModelContextWindow,
|
|
1368
|
-
getModelInfo,
|
|
1369
1612
|
createSummaryBudget,
|
|
1370
1613
|
classifySummaryError,
|
|
1371
1614
|
isTruncatedCompletion,
|
|
1372
1615
|
summaryCompletionTokens,
|
|
1373
1616
|
selectSummaryRoute,
|
|
1374
1617
|
runSummaryWithContract,
|
|
1375
|
-
sha256Hex,
|
|
1376
1618
|
COMPACTION_SUMMARY_SCHEMA_VERSION,
|
|
1377
1619
|
COMPACTION_SUMMARY_SYSTEM_PROMPT,
|
|
1378
|
-
|
|
1620
|
+
buildHistoricalCompactionRequest,
|
|
1379
1621
|
buildCompactionMetricsFromPlan,
|
|
1380
1622
|
formatCompactionMetricsLog,
|
|
1381
|
-
computeSummarySourceMetadata
|
|
1623
|
+
computeSummarySourceMetadata,
|
|
1624
|
+
buildSummarySourceDiagnostics,
|
|
1625
|
+
buildSummarySourceSegments,
|
|
1626
|
+
diffSummarySourceSegments,
|
|
1627
|
+
sanitizeSummarySourceSegments
|
|
1382
1628
|
};
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
defaultOpenBrowser
|
|
3
|
+
} from "./chunk-KC2QVCI7.js";
|
|
1
4
|
import {
|
|
2
5
|
generateCloudflareEmailRoutingToken,
|
|
3
6
|
parseFlagWithOptionalValue,
|
|
4
7
|
runCloudflareOAuthLogin,
|
|
5
8
|
upsertEnvVariable
|
|
6
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-KB5RQRSJ.js";
|
|
7
10
|
import {
|
|
8
11
|
ANTHROPIC_OAUTH_AUTHORIZE_URL,
|
|
9
12
|
ANTHROPIC_OAUTH_CALLBACK_PORT,
|
|
@@ -47,10 +50,7 @@ import {
|
|
|
47
50
|
startCallbackServer,
|
|
48
51
|
validateXAIEndpoint,
|
|
49
52
|
xaiOAuthDiscovery
|
|
50
|
-
} from "./chunk-
|
|
51
|
-
import {
|
|
52
|
-
defaultOpenBrowser
|
|
53
|
-
} from "./chunk-T43K75CK.js";
|
|
53
|
+
} from "./chunk-XGWRH3OF.js";
|
|
54
54
|
import {
|
|
55
55
|
extractGoogleValidationLink
|
|
56
56
|
} from "./chunk-BMQ2MJUK.js";
|
|
@@ -60,33 +60,33 @@ import {
|
|
|
60
60
|
detectLocalDevinCredentials,
|
|
61
61
|
extractDevinToken,
|
|
62
62
|
fetchAntigravityCloudCodeCompletion
|
|
63
|
-
} from "./chunk-
|
|
64
|
-
import {
|
|
65
|
-
toErrorMessage
|
|
66
|
-
} from "./chunk-HNMXYYJR.js";
|
|
63
|
+
} from "./chunk-MYYNZG2M.js";
|
|
67
64
|
import {
|
|
68
|
-
|
|
69
|
-
|
|
65
|
+
createOAuthTokenStore,
|
|
66
|
+
resolveFreshAccessToken
|
|
67
|
+
} from "./chunk-G7Y4GXTY.js";
|
|
70
68
|
import {
|
|
71
69
|
parseUserIdFromAuthToken
|
|
72
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-BIDSIRTS.js";
|
|
73
71
|
import {
|
|
74
72
|
getProfileOAuthSync,
|
|
75
73
|
saveProfileOAuthSync
|
|
76
74
|
} from "./chunk-R5GO3YZP.js";
|
|
77
75
|
import {
|
|
78
76
|
t
|
|
79
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-OGZE6BZG.js";
|
|
80
78
|
import {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
} from "./chunk-G7Y4GXTY.js";
|
|
79
|
+
toErrorMessage
|
|
80
|
+
} from "./chunk-HNMXYYJR.js";
|
|
84
81
|
import {
|
|
85
82
|
asTrimmedString
|
|
86
83
|
} from "./chunk-3EUW3WEO.js";
|
|
87
84
|
import {
|
|
88
85
|
asOptionalFiniteNumber
|
|
89
86
|
} from "./chunk-WWC7I6TA.js";
|
|
87
|
+
import {
|
|
88
|
+
isRecord
|
|
89
|
+
} from "./chunk-KUG52IAP.js";
|
|
90
90
|
|
|
91
91
|
// packages/cli/oauth/flows/xai.ts
|
|
92
92
|
function buildXAIAuthorizeUrl(opts) {
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isCompiledBinary
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BIDSIRTS.js";
|
|
4
4
|
import {
|
|
5
5
|
DEFAULT_NOLO_SERVER_URL
|
|
6
6
|
} from "./chunk-OLZBQWZU.js";
|
|
7
|
-
import {
|
|
8
|
-
normalizeServerOrigin
|
|
9
|
-
} from "./chunk-CF7PE763.js";
|
|
10
7
|
import {
|
|
11
8
|
loadProfileConfig
|
|
12
9
|
} from "./chunk-R5GO3YZP.js";
|
|
@@ -15,19 +12,22 @@ import {
|
|
|
15
12
|
} from "./chunk-4O22PGNQ.js";
|
|
16
13
|
import {
|
|
17
14
|
scheduleWindowsSelfUpdate
|
|
18
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-QLUYDJST.js";
|
|
19
16
|
import {
|
|
20
17
|
t
|
|
21
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-OGZE6BZG.js";
|
|
19
|
+
import {
|
|
20
|
+
normalizeServerOrigin
|
|
21
|
+
} from "./chunk-CF7PE763.js";
|
|
22
22
|
|
|
23
23
|
// packages/cli/updateCommands.ts
|
|
24
|
-
import { existsSync, readFileSync, accessSync, constants } from "node:fs";
|
|
24
|
+
import { existsSync, readFileSync, accessSync, constants, realpathSync } from "node:fs";
|
|
25
25
|
import { homedir } from "node:os";
|
|
26
26
|
import { dirname, join } from "node:path";
|
|
27
27
|
import { fileURLToPath } from "node:url";
|
|
28
28
|
function resolvePackageJsonPath() {
|
|
29
29
|
if (isCompiledBinary()) {
|
|
30
|
-
const execDir = dirname(process.execPath);
|
|
30
|
+
const execDir = dirname(realpathSync(process.execPath));
|
|
31
31
|
const candidate2 = join(execDir, "package.json");
|
|
32
32
|
if (existsSync(candidate2)) return candidate2;
|
|
33
33
|
return null;
|
|
@@ -125,7 +125,8 @@ function readPackageInfo() {
|
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
127
|
function buildCliVersionText(info) {
|
|
128
|
-
|
|
128
|
+
const normalizedName = info.name === "nolo-cli" || info.name.startsWith("nolo-cli-") ? "nolo-cli" : info.name;
|
|
129
|
+
return `${normalizedName} ${info.version}`;
|
|
129
130
|
}
|
|
130
131
|
function buildSelfUpdateCommand(serverUrl) {
|
|
131
132
|
return buildNpmSelfUpdateCommand(getCliInstallChannel(serverUrl));
|
|
@@ -212,6 +213,35 @@ async function runShellScript(script, {
|
|
|
212
213
|
]);
|
|
213
214
|
return exitCode;
|
|
214
215
|
}
|
|
216
|
+
function buildManagedNpmUpdateScript(channel) {
|
|
217
|
+
return `set -eu
|
|
218
|
+
PREFIX=$(npm prefix -g)
|
|
219
|
+
ENTRY="$PREFIX/bin/nolo"
|
|
220
|
+
ROOT="\${NOLO_HOME:-$HOME/.nolo}/cli/versions"
|
|
221
|
+
mkdir -p "$ROOT" "\${ENTRY%/*}"
|
|
222
|
+
STAGING=$(mktemp -d "$ROOT/npm.XXXXXXXX")
|
|
223
|
+
# npm writes only into the newly reserved prefix, never the global package.
|
|
224
|
+
npm install -g --prefix "$STAGING" ${shellQuote(`nolo-cli@${channel}`)} --progress
|
|
225
|
+
PACKAGE="$STAGING/lib/node_modules/nolo-cli"
|
|
226
|
+
node -e 'const p=require(process.argv[1]); if(p.name!=="nolo-cli" || !/^[0-9]+\\.[0-9]+\\.[0-9]+(?:[-+][0-9A-Za-z.+-]+)?$/.test(p.version)) process.exit(1)' "$PACKAGE/package.json"
|
|
227
|
+
VERSION_TEXT=$("$PACKAGE/index.js" -v)
|
|
228
|
+
case "$VERSION_TEXT" in
|
|
229
|
+
"nolo-cli "*) ACTUAL_VERSION=\${VERSION_TEXT#nolo-cli } ;;
|
|
230
|
+
"nolo-cli-"?*" "*) ACTUAL_VERSION=\${VERSION_TEXT#* } ;;
|
|
231
|
+
*) echo "Error: invalid staged CLI version" >&2; exit 1 ;;
|
|
232
|
+
esac
|
|
233
|
+
# Fail before touching the live entry. Version is a health check, not identity:
|
|
234
|
+
# every install has a unique permanent prefix, including same-version builds.
|
|
235
|
+
EXPECTED=$(node -p 'require(process.argv[1]).version' "$PACKAGE/package.json")
|
|
236
|
+
[ "$ACTUAL_VERSION" = "$EXPECTED" ]
|
|
237
|
+
if [ -d "$ENTRY" ] || { [ -e "$ENTRY" ] && [ ! -L "$ENTRY" ]; }; then echo "Error: refusing non-symlink entrypoint; retain it and migrate explicitly" >&2; exit 1; fi
|
|
238
|
+
LINK="$ENTRY.new.$$"
|
|
239
|
+
if [ -e "$LINK" ] || [ -L "$LINK" ]; then exit 1; fi
|
|
240
|
+
ln -s "$PACKAGE/index.js" "$LINK"
|
|
241
|
+
mv -f "$LINK" "$ENTRY"
|
|
242
|
+
echo "nolo updated to $ENTRY"
|
|
243
|
+
`;
|
|
244
|
+
}
|
|
215
245
|
function shellQuote(value) {
|
|
216
246
|
return "'" + value.replace(/'/g, "'\\''") + "'";
|
|
217
247
|
}
|
|
@@ -221,39 +251,19 @@ function buildStandaloneUpdateScript(args) {
|
|
|
221
251
|
EXTRACT_DIR=${shellQuote(args.extractDir)}
|
|
222
252
|
ENTRY=${shellQuote(args.symlinkPath)}
|
|
223
253
|
CURRENT_VERSION=${shellQuote(args.currentVersion)}
|
|
224
|
-
|
|
225
|
-
|
|
254
|
+
if [ -L "$EXTRACT_DIR" ]; then
|
|
255
|
+
echo "Error: refusing symlink bundle directory" >&2
|
|
256
|
+
exit 1
|
|
257
|
+
fi
|
|
258
|
+
# mktemp reserves a fresh directory even for rebuilds of the same version.
|
|
259
|
+
mkdir -p "$EXTRACT_DIR.versions"
|
|
260
|
+
STAGING=$(mktemp -d "$EXTRACT_DIR.versions/build.XXXXXXXX")
|
|
226
261
|
LINK="$ENTRY.new.$$"
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
committed=0
|
|
230
|
-
cleanup() {
|
|
231
|
-
status=$?
|
|
232
|
-
trap - 0 HUP INT TERM
|
|
233
|
-
if [ "$committed" = 0 ]; then
|
|
234
|
-
if [ "$new_moved" = 1 ] && [ -d "$EXTRACT_DIR" ]; then
|
|
235
|
-
mv "$EXTRACT_DIR" "$STAGING" || exit 1
|
|
236
|
-
fi
|
|
237
|
-
if [ "$old_moved" = 1 ] && [ -d "$BACKUP" ]; then
|
|
238
|
-
mv "$BACKUP" "$EXTRACT_DIR" || exit 1
|
|
239
|
-
fi
|
|
240
|
-
fi
|
|
241
|
-
rm -rf "$STAGING" || true
|
|
242
|
-
rm -f "$LINK" || true
|
|
243
|
-
exit "$status"
|
|
244
|
-
}
|
|
245
|
-
# Refuse collisions before installing cleanup: never remove somebody else's path.
|
|
246
|
-
if [ -e "$STAGING" ] || [ -L "$STAGING" ] ||
|
|
247
|
-
[ -e "$BACKUP" ] || [ -L "$BACKUP" ] ||
|
|
248
|
-
[ -e "$LINK" ] || [ -L "$LINK" ]; then
|
|
249
|
-
echo "Error: update staging path already exists" >&2
|
|
262
|
+
if [ -e "$LINK" ] || [ -L "$LINK" ]; then
|
|
263
|
+
echo "Error: update link staging path already exists" >&2
|
|
250
264
|
exit 1
|
|
251
265
|
fi
|
|
252
|
-
|
|
253
|
-
mkdir "$STAGING"
|
|
254
|
-
trap cleanup 0
|
|
255
|
-
trap 'exit 1' HUP INT TERM
|
|
256
|
-
|
|
266
|
+
# Failed staged bundles are retained too; no old runtime is ever removed.
|
|
257
267
|
echo ${shellQuote(`Downloading nolo from ${args.tarballUrl}...`)}
|
|
258
268
|
if ! ${curl} ${shellQuote(args.tarballUrl)} -o "$STAGING/bundle.tar.gz"; then
|
|
259
269
|
${args.tarballUrl !== args.fallbackUrl ? `echo ${shellQuote(`Primary source unavailable, trying ${args.fallbackUrl}...`)}
|
|
@@ -264,12 +274,12 @@ if ! ${curl} ${shellQuote(args.tarballUrl)} -o "$STAGING/bundle.tar.gz"; then
|
|
|
264
274
|
exit 1`}
|
|
265
275
|
fi
|
|
266
276
|
tar -xzf "$STAGING/bundle.tar.gz" -C "$STAGING"
|
|
267
|
-
rm -f "$STAGING/bundle.tar.gz"
|
|
268
277
|
chmod +x "$STAGING/nolo"
|
|
269
278
|
# A failing, empty or malformed version response must not touch the live install.
|
|
270
279
|
VERSION_TEXT=$("$STAGING/nolo" -v)
|
|
271
280
|
case "$VERSION_TEXT" in
|
|
272
281
|
"nolo-cli "*) VERSION=\${VERSION_TEXT#nolo-cli } ;;
|
|
282
|
+
"nolo-cli-"?*" "*) VERSION=\${VERSION_TEXT#* } ;;
|
|
273
283
|
*) VERSION=$VERSION_TEXT ;;
|
|
274
284
|
esac
|
|
275
285
|
CORE=\${VERSION%%[-+]*}
|
|
@@ -289,6 +299,7 @@ case "$VERSION" in
|
|
|
289
299
|
esac
|
|
290
300
|
case "$CURRENT_VERSION" in
|
|
291
301
|
"nolo-cli "*) CUR_VER=\${CURRENT_VERSION#nolo-cli } ;;
|
|
302
|
+
"nolo-cli-"?*" "*) CUR_VER=\${CURRENT_VERSION#* } ;;
|
|
292
303
|
*) CUR_VER=$CURRENT_VERSION ;;
|
|
293
304
|
esac
|
|
294
305
|
CUR_CORE=\${CUR_VER%%[-+]*}
|
|
@@ -321,32 +332,14 @@ if [ -n "$CUR_MAJOR" ] && [ -n "$CUR_MINOR" ] && [ -n "$CUR_PATCH" ]; then
|
|
|
321
332
|
;;
|
|
322
333
|
esac
|
|
323
334
|
fi
|
|
324
|
-
if [ "$VERSION" = "$CURRENT_VERSION" ]; then
|
|
325
|
-
echo "\u2713 Already up to date (nolo-cli $VERSION)."
|
|
326
|
-
exit 10
|
|
327
|
-
fi
|
|
328
335
|
mkdir -p "\${ENTRY%/*}"
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
echo "Error: refusing directory entrypoint or symlink bundle directory" >&2
|
|
336
|
+
if [ -d "$ENTRY" ] || { [ -e "$ENTRY" ] && [ ! -L "$ENTRY" ]; }; then
|
|
337
|
+
echo "Error: refusing non-symlink entrypoint; retain it and migrate explicitly" >&2
|
|
332
338
|
exit 1
|
|
333
339
|
fi
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
old_moved=1
|
|
337
|
-
mv "$EXTRACT_DIR" "$BACKUP"
|
|
338
|
-
fi
|
|
339
|
-
new_moved=1
|
|
340
|
-
mv "$STAGING" "$EXTRACT_DIR"
|
|
340
|
+
# The staged path becomes permanent. Never rename the running bundle.
|
|
341
|
+
ln -s "$STAGING/nolo" "$LINK"
|
|
341
342
|
mv -f "$LINK" "$ENTRY"
|
|
342
|
-
committed=1
|
|
343
|
-
# Retain only the newest recovery copy from this run; prune older backups.
|
|
344
|
-
for old_copy in "$EXTRACT_DIR.old."*; do
|
|
345
|
-
if [ -d "$old_copy" ] && [ ! -L "$old_copy" ] && [ "$old_copy" != "$BACKUP" ]; then
|
|
346
|
-
rm -rf "$old_copy" || true
|
|
347
|
-
fi
|
|
348
|
-
done
|
|
349
|
-
# Retain the previous bundle as a recovery copy; never unlink the live entry.
|
|
350
343
|
echo "nolo updated to $ENTRY"
|
|
351
344
|
`;
|
|
352
345
|
}
|
|
@@ -369,7 +362,7 @@ async function runStandaloneBundleUpdate(options) {
|
|
|
369
362
|
const tarballUrl = `${repoBase}/public/downloads/${bundleName}`;
|
|
370
363
|
const fallbackUrl = `https://nolo.chat/public/downloads/${bundleName}`;
|
|
371
364
|
const extractDir = join(homedir(), ".nolo", extractSubdir);
|
|
372
|
-
const installDir = resolveStandaloneInstallDir();
|
|
365
|
+
const installDir = env.NOLO_INSTALL_DIR || resolveStandaloneInstallDir();
|
|
373
366
|
const symlinkPath = join(installDir, "nolo");
|
|
374
367
|
const script = buildStandaloneUpdateScript({
|
|
375
368
|
tarballUrl,
|
|
@@ -543,31 +536,12 @@ ${t("updateInstallerTitle")}
|
|
|
543
536
|
`);
|
|
544
537
|
output.write(`${t("updateNpmDownloading")}
|
|
545
538
|
`);
|
|
546
|
-
const
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
stdout: useCustomSink ? "pipe" : "inherit",
|
|
552
|
-
stderr: useCustomSink ? "pipe" : "inherit",
|
|
553
|
-
env
|
|
539
|
+
const exitCode = await runShellScript(buildManagedNpmUpdateScript(channel), {
|
|
540
|
+
output,
|
|
541
|
+
spawn,
|
|
542
|
+
env,
|
|
543
|
+
useCustomSink: options.output !== void 0
|
|
554
544
|
});
|
|
555
|
-
if (!useCustomSink) {
|
|
556
|
-
const exitCode2 = await proc.exited;
|
|
557
|
-
if (exitCode2 === 0) {
|
|
558
|
-
output.write(` ${renderProgressBar(100)}
|
|
559
|
-
`);
|
|
560
|
-
output.write(`${t("updateCompleted")}
|
|
561
|
-
|
|
562
|
-
`);
|
|
563
|
-
}
|
|
564
|
-
return { exitCode: exitCode2, disposition: "completed" };
|
|
565
|
-
}
|
|
566
|
-
const [exitCode] = await Promise.all([
|
|
567
|
-
proc.exited,
|
|
568
|
-
forwardSpawnOutput(proc.stdout, output),
|
|
569
|
-
forwardSpawnOutput(proc.stderr, output)
|
|
570
|
-
]);
|
|
571
545
|
if (exitCode === 0) {
|
|
572
546
|
output.write(` ${renderProgressBar(100)}
|
|
573
547
|
`);
|
|
@@ -594,6 +568,7 @@ export {
|
|
|
594
568
|
buildSelfUpdateCommand,
|
|
595
569
|
resolveSelfUpdateServerUrl,
|
|
596
570
|
buildCliDoctorText,
|
|
571
|
+
buildManagedNpmUpdateScript,
|
|
597
572
|
buildStandaloneUpdateScript,
|
|
598
573
|
runStandaloneBundleUpdate,
|
|
599
574
|
NOLO_UPDATE_CHECK_KILL_SWITCH,
|