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,6 +1,11 @@
|
|
|
1
1
|
// packages/cli/tui/ciStatus.ts
|
|
2
2
|
import { execFile } from "node:child_process";
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
// packages/core/infraHosts.ts
|
|
5
|
+
var ALPHA_ORIGIN_IP = "62.83.99.45";
|
|
6
|
+
|
|
7
|
+
// packages/cli/tui/ciStatus.ts
|
|
8
|
+
var DEFAULT_SSH_HOST = `root@${ALPHA_ORIGIN_IP}`;
|
|
4
9
|
var DEFAULT_CI_PORT = "3900";
|
|
5
10
|
function resolveCiSshTarget(env = process.env) {
|
|
6
11
|
const override = env.NOLO_CI_SSH_HOST?.trim();
|
|
@@ -21,8 +26,15 @@ function buildCiStatusCommand(limit, env = process.env) {
|
|
|
21
26
|
const safeLimit = Math.max(1, Math.min(20, Math.trunc(limit) || 5));
|
|
22
27
|
return compactStatusBeforeTransport(`curl -s -m 3 "http://127.0.0.1:${resolveCiPort(env)}/status?limit=${safeLimit}"`);
|
|
23
28
|
}
|
|
24
|
-
function
|
|
25
|
-
return
|
|
29
|
+
function isCiStatusTestOrCiEnvironment(env = process.env) {
|
|
30
|
+
return env.NODE_ENV === "test" || process.env.NODE_ENV === "test" || env.BUN_ENV === "test" || process.env.BUN_ENV === "test" || Boolean(
|
|
31
|
+
env.CI || process.env.CI || env.GITHUB_ACTIONS || process.env.GITHUB_ACTIONS
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
function shouldBlockRealSsh(env, execFileImpl) {
|
|
35
|
+
if (execFileImpl !== execFile) return false;
|
|
36
|
+
if (env.NOLO_CI_STATUS_ALLOW_SSH === "1") return false;
|
|
37
|
+
return isCiStatusTestOrCiEnvironment(env);
|
|
26
38
|
}
|
|
27
39
|
function asRecord(value) {
|
|
28
40
|
return typeof value === "object" && value !== null ? value : void 0;
|
|
@@ -74,13 +86,16 @@ function parseCiStatusPayload(raw) {
|
|
|
74
86
|
const single = toCiJob(parsed);
|
|
75
87
|
return single ? [single] : void 0;
|
|
76
88
|
}
|
|
77
|
-
function buildRemoteCommand(limit) {
|
|
78
|
-
return buildCiStatusCommand(limit);
|
|
89
|
+
function buildRemoteCommand(limit, env = process.env) {
|
|
90
|
+
return buildCiStatusCommand(limit, env);
|
|
79
91
|
}
|
|
80
|
-
function fetchCiStatus(limit = 5, timeoutMs = 4e3, signal) {
|
|
81
|
-
return fetchCiPayload(buildRemoteCommand(limit), parseCiStatusPayload, timeoutMs,
|
|
92
|
+
function fetchCiStatus(limit = 5, timeoutMs = 4e3, signal, env = process.env, execFileImpl = execFile) {
|
|
93
|
+
return fetchCiPayload(buildRemoteCommand(limit, env), parseCiStatusPayload, timeoutMs, resolveCiSshTarget(env), signal, execFileImpl, env);
|
|
82
94
|
}
|
|
83
|
-
function fetchCiPayload(command, parse, timeoutMs, sshTarget, signal, execFileImpl = execFile) {
|
|
95
|
+
function fetchCiPayload(command, parse, timeoutMs, sshTarget, signal, execFileImpl = execFile, env = process.env) {
|
|
96
|
+
if (shouldBlockRealSsh(env, execFileImpl)) {
|
|
97
|
+
return Promise.resolve(void 0);
|
|
98
|
+
}
|
|
84
99
|
return new Promise((resolve) => {
|
|
85
100
|
let settled = false;
|
|
86
101
|
let guard;
|
|
@@ -132,24 +147,25 @@ function summarizeLatest(jobs) {
|
|
|
132
147
|
}
|
|
133
148
|
return `ci:${sha} ${latest.status}`;
|
|
134
149
|
}
|
|
135
|
-
function buildCancelCommand(jobId) {
|
|
136
|
-
const port = resolveCiPort();
|
|
150
|
+
function buildCancelCommand(jobId, env = process.env) {
|
|
151
|
+
const port = resolveCiPort(env);
|
|
137
152
|
const body = JSON.stringify({ jobId }).replace(/'/g, "'\\''");
|
|
138
153
|
const endpoint = `http://127.0.0.1:${port}/cancel`;
|
|
139
154
|
const tokenRef = `$(grep -m1 '^NOLO_CI_ADMIN_TOKEN=' "$HOME/.config/nolo-ci.env" 2>/dev/null | cut -d= -f2-)`;
|
|
140
155
|
return `curl -s -m 110 -H "Authorization: Bearer ${tokenRef}" -H 'Content-Type: application/json' -X POST --data '${body}' "${endpoint}"`;
|
|
141
156
|
}
|
|
142
|
-
function fetchCiCancel(jobId, timeoutMs = 12e4, execFileImpl = execFile) {
|
|
157
|
+
function fetchCiCancel(jobId, timeoutMs = 12e4, execFileImpl = execFile, env = process.env) {
|
|
143
158
|
return fetchCiPayload(
|
|
144
|
-
buildCancelCommand(jobId),
|
|
159
|
+
buildCancelCommand(jobId, env),
|
|
145
160
|
(stdout) => {
|
|
146
161
|
const response = JSON.parse(stdout);
|
|
147
162
|
return response?.ok === true && response?.cancelled === true && response?.jobId === jobId ? true : false;
|
|
148
163
|
},
|
|
149
164
|
timeoutMs,
|
|
150
|
-
|
|
165
|
+
resolveCiSshTarget(env),
|
|
151
166
|
void 0,
|
|
152
|
-
execFileImpl
|
|
167
|
+
execFileImpl,
|
|
168
|
+
env
|
|
153
169
|
);
|
|
154
170
|
}
|
|
155
171
|
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
resolveRuntimeAuthToken
|
|
3
|
-
} from "./chunk-UN7HIYMH.js";
|
|
4
1
|
import {
|
|
5
2
|
NOLO_DEFAULT_AGENT_ID,
|
|
6
3
|
NOLO_DEFAULT_AGENT_KEY
|
|
7
4
|
} from "./chunk-BR3GT6MR.js";
|
|
8
5
|
import {
|
|
9
6
|
resolveRuntimeToolSurfaceForAgent
|
|
10
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-NEG5LYK5.js";
|
|
8
|
+
import {
|
|
9
|
+
resolveRuntimeAuthToken
|
|
10
|
+
} from "./chunk-GX6DITLQ.js";
|
|
11
11
|
import {
|
|
12
12
|
isSystemBuiltinTrustedAgentKey
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-KZAT2M2V.js";
|
|
14
14
|
import {
|
|
15
15
|
parseUserIdFromAuthToken
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-BIDSIRTS.js";
|
|
17
17
|
import {
|
|
18
18
|
asOptionalTrimmedString
|
|
19
19
|
} from "./chunk-G3SUCT4W.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
+
ALWAYS_EXCLUDED_GLOBS,
|
|
2
3
|
buildExecutionTicket
|
|
3
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ANUP75N2.js";
|
|
4
5
|
|
|
5
6
|
// packages/agent-runtime/docker/executionTicket.ts
|
|
6
7
|
function buildPrimaryExecutionTicket(runGrant, executionClass = "session") {
|
|
@@ -35,6 +36,126 @@ var isDestructiveShellCommand = (params) => {
|
|
|
35
36
|
|
|
36
37
|
// packages/agent-runtime/docker/sandboxWorkspaceHelper.ts
|
|
37
38
|
import * as path from "node:path";
|
|
39
|
+
|
|
40
|
+
// packages/agent-runtime/docker/sandboxSearchKernel.generated.ts
|
|
41
|
+
var SANDBOX_SEARCH_KERNEL_JS = '// packages/agent-runtime/fileTextSearch.ts\nimport { readdir, readFile as readFile2, stat as stat2 } from "node:fs/promises";\nimport { basename, relative, resolve as resolve2 } from "node:path";\nimport { spawn as spawnChildProcess } from "node:child_process";\n\n// packages/agent-runtime/runtimeCompat.ts\nimport { existsSync, readdirSync, statSync } from "node:fs";\nimport { join } from "node:path";\nvar IS_WINDOWS = process.platform === "win32";\nfunction isExecutableFile(candidate) {\n if (!existsSync(candidate))\n return false;\n try {\n return statSync(candidate).isFile();\n } catch {\n return false;\n }\n}\nfunction resolveExecutableOnPath(name) {\n if (IS_WINDOWS && !/\\.[a-z]+$/i.test(name)) {\n const exts = (process.env.PATHEXT || ".EXE;.CMD;.BAT").split(";").filter(Boolean);\n for (const ext of exts) {\n const found = resolveExecutableOnPath(name + ext);\n if (found)\n return found;\n }\n return null;\n }\n const pathEnv = process.env.PATH ?? "";\n const sep = pathEnv.includes(";") && IS_WINDOWS ? ";" : ":";\n const pathDirs = pathEnv.split(sep).filter(Boolean);\n const fallbackDirs = IS_WINDOWS ? [] : [\n "/opt/homebrew/bin",\n "/usr/local/bin",\n "/usr/bin",\n "/bin",\n `${process.env.HOME ?? ""}/.local/bin`\n ].filter(Boolean);\n for (const dir of [...pathDirs, ...fallbackDirs]) {\n const candidate = join(dir, name);\n if (isExecutableFile(candidate))\n return candidate;\n }\n return null;\n}\n\n// packages/agent-runtime/gitignore.ts\nimport { readFile, stat } from "node:fs/promises";\nimport { resolve } from "node:path";\nfunction isIgnorableFsError(err) {\n if (err && typeof err === "object" && "code" in err) {\n const code = err.code;\n return code === "ENOENT" || code === "ENOTDIR";\n }\n return false;\n}\nasync function readRootGitignorePatterns(workspaceRoot) {\n let content;\n try {\n content = await readFile(resolve(workspaceRoot, ".gitignore"), "utf8");\n } catch (err) {\n if (isIgnorableFsError(err))\n return [];\n throw err;\n }\n return content.split(/\\r?\\n/).map((line) => line.trim()).filter((line) => line && !line.startsWith("#") && !line.startsWith("!")).flatMap((line) => {\n const unanchored = line.replace(/^\\//, "");\n if (unanchored.endsWith("/"))\n return [`${unanchored}**`];\n if (unanchored.includes("**"))\n return [unanchored];\n return [unanchored, `${unanchored}/**`];\n });\n}\n\n// packages/agent-runtime/fileTextSearch.ts\nvar normalizePath = (value) => value.replaceAll("\\\\", "/");\nvar pathFor = (root, file, absolute = false) => absolute ? normalizePath(file) : normalizePath(relative(root, file) || basename(file));\nvar COMMAND_LIMIT_HEADROOM = 1;\nvar MAX_SEARCH_FILE_BYTES = 8 * 1024 * 1024;\nvar MAX_SEARCH_LINE_CHARS = 2000;\nasync function runCommand(binary, args, cwd, maxResults) {\n const recordLimit = maxResults === undefined ? 0 : Math.max(0, maxResults) + COMMAND_LIMIT_HEADROOM;\n return await new Promise((done) => {\n let stdout = "", stderr = "", recordCount = 0, stopped = false;\n try {\n const child = spawnChildProcess(binary, args, { cwd, stdio: ["ignore", "pipe", "pipe"], windowsHide: true });\n child.stdout.on("data", (chunk) => {\n const room = MAX_SEARCH_FILE_BYTES - stdout.length;\n stdout += chunk.toString().slice(0, Math.max(0, room));\n if (stdout.length >= MAX_SEARCH_FILE_BYTES && !stopped) {\n stopped = true;\n child.kill();\n }\n recordCount = parseMatches(cwd, stdout).length;\n if (recordLimit > 0 && recordCount >= recordLimit && !stopped) {\n stopped = true;\n child.kill();\n }\n });\n child.stderr.on("data", (chunk) => {\n stderr += chunk.toString();\n });\n child.on("error", () => done({ stdout, stderr, outcome: { kind: "spawn-failed" } }));\n child.on("close", (exitCode) => done({ stdout, stderr, outcome: stopped ? { kind: "stopped-by-limit" } : { kind: "completed", exitCode } }));\n } catch {\n done({ stdout, stderr, outcome: { kind: "spawn-failed" } });\n }\n });\n}\nfunction extractGrepExcludeDir(pattern) {\n const p = pattern.replaceAll("\\\\", "/");\n if (!p)\n return null;\n if (!/\\/(\\*{1,2})?$/.test(p))\n return null;\n const clean = p.replace(/\\/(\\*{1,2})?$/, "");\n if (!clean || clean.includes("/") || /[*?{}[\\]]/.test(clean))\n return null;\n return clean;\n}\nfunction isGrepExpressibleExclude(pattern) {\n return extractGrepExcludeDir(pattern) !== null;\n}\nfunction commandArgs(o, binary, target) {\n const args = binary === "rg" ? ["--line-number", "--no-heading", "--color", "never", "--null"] : ["-RIn", "--binary-files=without-match", "--null"];\n if (binary === "rg")\n args.push("--no-require-git", "--max-columns", String(MAX_SEARCH_LINE_CHARS), "--max-columns-preview");\n if (o.regex !== true)\n args.push(binary === "rg" ? "--fixed-strings" : "-F");\n else if (binary === "grep")\n args.push("-E");\n if (o.caseSensitive === false)\n args.push("-i");\n if (binary === "rg") {\n if (o.includeIgnored)\n args.push("--no-ignore");\n for (const x of o.exclude ?? [])\n args.push("--glob", `!${x}`);\n if (o.include)\n args.push("--type-add", `noloSearch:${o.include}`, "--type", "noloSearch");\n } else {\n for (const x of o.exclude ?? []) {\n const clean = extractGrepExcludeDir(x);\n if (clean)\n args.push("--exclude-dir", clean);\n }\n if (o.include)\n args.push("--include", o.include);\n }\n args.push("--", o.query, target);\n return args;\n}\nfunction parseMatches(root, output) {\n const records = [];\n const pattern = /(?:^|\\n)([^\\0\\n]+)\\0(\\d+):(.*?)(?=\\n[^\\0\\n]+\\0|$)/gs;\n for (const match of output.matchAll(pattern)) {\n records.push({ file: resolve2(root, match[1] ?? ""), line: Number(match[2]), text: (match[3] ?? "").replace(/\\n$/, "") });\n }\n return records;\n}\nasync function decorate(root, raw, context, absolute = false) {\n const out = [];\n for (const x of raw) {\n let lines = [];\n if (context > 0) {\n try {\n if ((await stat2(x.file)).size <= MAX_SEARCH_FILE_BYTES) {\n lines = (await readFile2(x.file, "utf8")).split(/\\r\\n|\\r|\\n/);\n }\n } catch {}\n }\n const i = x.line - 1;\n out.push({\n path: pathFor(root, x.file, absolute),\n line: x.line,\n text: (lines[i] ?? x.text).slice(0, MAX_SEARCH_LINE_CHARS),\n before: lines.slice(Math.max(0, i - context), i).map((line) => line.slice(0, MAX_SEARCH_LINE_CHARS)),\n after: lines.slice(i + 1, i + context + 1).map((line) => line.slice(0, MAX_SEARCH_LINE_CHARS))\n });\n }\n return out;\n}\nfunction globMatch(pattern, value) {\n const p = normalizePath(pattern).replace(/^!/, "");\n const brace = /\\{([^{}]+)\\}/.exec(p);\n if (brace)\n return brace[1].split(",").some((part) => globMatch(p.slice(0, brace.index) + part + p.slice(brace.index + brace[0].length), value));\n let source = "";\n for (let i = 0;i < p.length; i++) {\n const c = p[i];\n if (c === "*" && p[i + 1] === "*") {\n i++;\n if (p[i + 1] === "/") {\n i++;\n source += "(?:.*/)?";\n } else\n source += ".*";\n } else if (c === "*")\n source += "[^/]*";\n else if (c === "?")\n source += "[^/]";\n else\n source += c.replace(/[.+^${}()|[\\]\\\\]/g, "\\\\$&");\n }\n const r = new RegExp(`^${source}$`);\n return r.test(value) || r.test(basename(value));\n}\nvar defaultReadTextFile = (filePath) => readFile2(filePath, "utf8").catch(() => "");\nasync function jsSearch(o, targetPath) {\n const max = o.maxResults ?? Number.MAX_SAFE_INTEGER;\n const excludes = o.exclude ?? [];\n const readText = o.readTextFile ?? defaultReadTextFile;\n const files = [];\n const targetStat = await stat2(targetPath).catch(() => null);\n if (!targetStat)\n return { matches: [], totalMatches: 0, truncated: false, engine: "js" };\n const ignorePatterns = o.includeIgnored ? [] : await readRootGitignorePatterns(o.root);\n const isIgnored = (rel) => ignorePatterns.some((pattern) => globMatch(pattern, rel));\n const isSearchableFile = (filePath) => {\n const rel = pathFor(o.root, filePath);\n return !excludes.some((pattern) => globMatch(pattern, rel)) && !isIgnored(rel) && (!o.include || globMatch(o.include, rel));\n };\n if (targetStat.isFile()) {\n if (isSearchableFile(targetPath))\n files.push(targetPath);\n } else {\n const walk = async (dir) => {\n for (const e of await readdir(dir, { withFileTypes: true })) {\n const f = resolve2(dir, e.name), rel = pathFor(o.root, f);\n if (e.isDirectory()) {\n if (!excludes.some((p) => globMatch(p, rel)))\n await walk(f);\n } else if (e.isFile() && !excludes.some((p) => globMatch(p, rel)) && !isIgnored(rel) && (!o.include || globMatch(o.include, rel))) {\n files.push(f);\n }\n }\n };\n await walk(targetPath);\n }\n const matcher = o.regex ? new RegExp(o.query, o.caseSensitive === false ? "i" : "") : null;\n const needle = o.caseSensitive === false ? o.query.toLowerCase() : o.query;\n const out = [], context = o.contextLines ?? 0;\n for (const file of files) {\n const info = await stat2(file).catch(() => null);\n if (!info || info.size > MAX_SEARCH_FILE_BYTES)\n continue;\n const text = await readText(file);\n if (!text || text.includes("\\x00"))\n continue;\n const lines = text.split(/\\r\\n|\\r|\\n/);\n for (let i = 0;i < lines.length; i++) {\n const line = lines[i] ?? "";\n const hit = matcher ? matcher.test(line) : o.caseSensitive === false ? line.toLowerCase().includes(needle) : line.includes(needle);\n if (!hit)\n continue;\n if (out.length >= max)\n return { matches: out, totalMatches: max, truncated: true, engine: "js" };\n out.push({ path: pathFor(o.root, file, o.absolutePaths === true), line: i + 1, text: line.slice(0, MAX_SEARCH_LINE_CHARS), before: lines.slice(Math.max(0, i - context), i).map((line) => line.slice(0, MAX_SEARCH_LINE_CHARS)), after: lines.slice(i + 1, i + context + 1).map((line) => line.slice(0, MAX_SEARCH_LINE_CHARS)) });\n }\n }\n return { matches: out, totalMatches: out.length, truncated: false, engine: "js" };\n}\nasync function canGrepFulfillOptions(o) {\n if (!o.includeIgnored) {\n const gitignorePatterns = await readRootGitignorePatterns(o.root);\n if (gitignorePatterns.length > 0)\n return false;\n }\n if (o.include) {\n if (o.include.includes("/") || o.include.includes("\\\\") || o.include.includes("**") || /[{}[\\]]/.test(o.include)) {\n return false;\n }\n }\n if (o.exclude && o.exclude.length > 0) {\n for (const pattern of o.exclude) {\n if (!isGrepExpressibleExclude(pattern))\n return false;\n }\n }\n return true;\n}\nvar COMMAND_ENGINES = [\n { engine: "ripgrep", binaryOption: "resolveRipgrepBinary", binaryName: "rg", argsKey: "rg" },\n { engine: "grep", binaryOption: "resolveGrepBinary", binaryName: "grep", argsKey: "grep" }\n];\nasync function searchFileTextMatches(o) {\n const targetPath = resolve2(o.root, o.target || ".");\n const targetStat = await stat2(targetPath).catch(() => null);\n if (!targetStat)\n return { matches: [], totalMatches: 0, truncated: false, engine: "js" };\n if (targetStat.isFile())\n return jsSearch(o, targetPath);\n const run = o.runCommand ?? runCommand, max = o.maxResults;\n for (const entry of COMMAND_ENGINES) {\n if (entry.engine === "ripgrep" && o.include && /[/\\\\]/.test(o.include))\n continue;\n if (entry.engine === "grep" && !await canGrepFulfillOptions(o))\n continue;\n const injectedResolver = o[entry.binaryOption];\n const binary = injectedResolver ? injectedResolver() : resolveExecutableOnPath(entry.binaryName);\n if (!binary)\n continue;\n const result = await run(binary, commandArgs(o, entry.argsKey, o.target || "."), o.root, max);\n const raw = parseMatches(o.root, result.stdout);\n const hardFailed = result.outcome.kind === "spawn-failed" || result.outcome.kind === "completed" && result.outcome.exitCode !== 0 && result.outcome.exitCode !== 1;\n if (hardFailed)\n continue;\n const truncated = raw.length > (max ?? Number.MAX_SAFE_INTEGER);\n const matches = await decorate(o.root, raw.slice(0, max), o.contextLines ?? 0, o.absolutePaths === true);\n return {\n matches,\n totalMatches: truncated ? matches.length : raw.length,\n truncated,\n engine: entry.engine\n };\n }\n return jsSearch(o, targetPath);\n}\nexport {\n canGrepFulfillOptions,\n extractGrepExcludeDir,\n isGrepExpressibleExclude,\n searchFileTextMatches\n};\n';
|
|
42
|
+
var SANDBOX_SCRUBBER_JS = `// packages/agent-runtime/secretScrubber.ts
|
|
43
|
+
var SECRET_PATTERNS = [
|
|
44
|
+
{
|
|
45
|
+
kind: "PRIVATE_KEY",
|
|
46
|
+
placeholder: "[REDACTED:PRIVATE_KEY]",
|
|
47
|
+
regex: /-----BEGIN (?:[A-Z0-9 ]+)?PRIVATE KEY-----[\\s\\S]+?-----END (?:[A-Z0-9 ]+)?PRIVATE KEY-----/g
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
kind: "ANTHROPIC_KEY",
|
|
51
|
+
placeholder: "[REDACTED:ANTHROPIC_KEY]",
|
|
52
|
+
regex: /\\bsk-ant-[a-zA-Z0-9_\\-]{20,}\\b/g
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
kind: "API_KEY",
|
|
56
|
+
placeholder: "[REDACTED:API_KEY]",
|
|
57
|
+
regex: /\\bsk-[a-zA-Z0-9_\\-]{24,}\\b/g
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
kind: "BIGMODEL_KEY",
|
|
61
|
+
placeholder: "[REDACTED:BIGMODEL_KEY]",
|
|
62
|
+
regex: /\\b[0-9a-fA-F]{32}\\.[A-Za-z0-9]{16}\\b/g
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
kind: "GITHUB_TOKEN",
|
|
66
|
+
placeholder: "[REDACTED:GITHUB_TOKEN]",
|
|
67
|
+
regex: /\\b(?:gh[pousr]_[a-zA-Z0-9]{30,}|github_pat_[a-zA-Z0-9_]{40,})\\b/g
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
kind: "BEARER_TOKEN",
|
|
71
|
+
placeholder: "Bearer [REDACTED:BEARER_TOKEN]",
|
|
72
|
+
regex: /\\bBearer\\s+[a-zA-Z0-9_\\-\\.]{25,}\\b/gi
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
kind: "PASSWORD",
|
|
76
|
+
placeholder: "$1=[REDACTED:PASSWORD]",
|
|
77
|
+
regex: /\\b((?:DB_|DATABASE_|ADMIN_|ROOT_|MYSQL_|POSTGRES_)?(?:PASSWORD|PASSWD|SECRET_KEY))\\s*=\\s*['"]?([^\\s'"]{4,})['"]?/gi
|
|
78
|
+
}
|
|
79
|
+
];
|
|
80
|
+
var QUICK_PROBE_SUBSTRINGS = [
|
|
81
|
+
"sk-",
|
|
82
|
+
"ghp_",
|
|
83
|
+
"gho_",
|
|
84
|
+
"ghu_",
|
|
85
|
+
"ghs_",
|
|
86
|
+
"ghr_",
|
|
87
|
+
"github_pat_",
|
|
88
|
+
"PRIVATE KEY",
|
|
89
|
+
"Bearer ",
|
|
90
|
+
"bearer ",
|
|
91
|
+
"PASSWORD",
|
|
92
|
+
"password",
|
|
93
|
+
"PASSWD",
|
|
94
|
+
"SECRET_KEY"
|
|
95
|
+
];
|
|
96
|
+
var UNPREFIXED_PROBE_REGEX = /\\b[0-9a-fA-F]{32}\\.[A-Za-z0-9]{16}\\b/;
|
|
97
|
+
function hasPotentialSecrets(text) {
|
|
98
|
+
if (typeof text !== "string" || text.length === 0)
|
|
99
|
+
return false;
|
|
100
|
+
if (QUICK_PROBE_SUBSTRINGS.some((probe) => text.includes(probe)))
|
|
101
|
+
return true;
|
|
102
|
+
return UNPREFIXED_PROBE_REGEX.test(text);
|
|
103
|
+
}
|
|
104
|
+
function scrubSecrets(text) {
|
|
105
|
+
if (typeof text !== "string" || text.length === 0) {
|
|
106
|
+
return { cleaned: text, redactedCount: 0, matchedKinds: [] };
|
|
107
|
+
}
|
|
108
|
+
if (!hasPotentialSecrets(text)) {
|
|
109
|
+
return { cleaned: text, redactedCount: 0, matchedKinds: [] };
|
|
110
|
+
}
|
|
111
|
+
let cleaned = text;
|
|
112
|
+
let redactedCount = 0;
|
|
113
|
+
const matchedKinds = [];
|
|
114
|
+
for (const pattern of SECRET_PATTERNS) {
|
|
115
|
+
pattern.regex.lastIndex = 0;
|
|
116
|
+
const matches = cleaned.match(pattern.regex);
|
|
117
|
+
if (matches && matches.length > 0) {
|
|
118
|
+
redactedCount += matches.length;
|
|
119
|
+
if (!matchedKinds.includes(pattern.kind)) {
|
|
120
|
+
matchedKinds.push(pattern.kind);
|
|
121
|
+
}
|
|
122
|
+
cleaned = cleaned.replace(pattern.regex, pattern.placeholder);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return { cleaned, redactedCount, matchedKinds };
|
|
126
|
+
}
|
|
127
|
+
function scrubObjectSecrets(val) {
|
|
128
|
+
if (val === null || val === undefined)
|
|
129
|
+
return val;
|
|
130
|
+
if (typeof val === "string") {
|
|
131
|
+
return scrubSecrets(val).cleaned;
|
|
132
|
+
}
|
|
133
|
+
if (Array.isArray(val)) {
|
|
134
|
+
return val.map((item) => scrubObjectSecrets(item));
|
|
135
|
+
}
|
|
136
|
+
if (typeof val === "object") {
|
|
137
|
+
if (val instanceof Date || val instanceof RegExp)
|
|
138
|
+
return val;
|
|
139
|
+
const result = {};
|
|
140
|
+
for (const [k, v] of Object.entries(val)) {
|
|
141
|
+
result[k] = scrubObjectSecrets(v);
|
|
142
|
+
}
|
|
143
|
+
return result;
|
|
144
|
+
}
|
|
145
|
+
return val;
|
|
146
|
+
}
|
|
147
|
+
export {
|
|
148
|
+
SECRET_PATTERNS,
|
|
149
|
+
hasPotentialSecrets,
|
|
150
|
+
scrubObjectSecrets,
|
|
151
|
+
scrubSecrets
|
|
152
|
+
};
|
|
153
|
+
`;
|
|
154
|
+
|
|
155
|
+
// packages/agent-runtime/docker/sandboxWorkspaceHelper.ts
|
|
156
|
+
function toJavascriptDataUrl(jsSource) {
|
|
157
|
+
return "data:text/javascript;base64," + Buffer.from(jsSource, "utf8").toString("base64");
|
|
158
|
+
}
|
|
38
159
|
var SANDBOX_WORKSPACE_ROOT = "/home/bun/app";
|
|
39
160
|
var SANDBOX_HELPER_PATH = "/tmp/nolo-tools/workspace-tool.mjs";
|
|
40
161
|
function posixQuote(value) {
|
|
@@ -98,6 +219,9 @@ function buildWorkspaceHelperSource() {
|
|
|
98
219
|
import path from "node:path";
|
|
99
220
|
|
|
100
221
|
const ROOT = "${SANDBOX_WORKSPACE_ROOT}";
|
|
222
|
+
const SEARCH_EXCLUDES = ${JSON.stringify(ALWAYS_EXCLUDED_GLOBS)};
|
|
223
|
+
const SEARCH_KERNEL_URL = ${JSON.stringify(toJavascriptDataUrl(SANDBOX_SEARCH_KERNEL_JS))};
|
|
224
|
+
const SCRUBBER_URL = ${JSON.stringify(toJavascriptDataUrl(SANDBOX_SCRUBBER_JS))};
|
|
101
225
|
const MAX_SERIALIZED_CHARS = ${SANDBOX_OUTPUT_LIMITS.maxSerializedChars};
|
|
102
226
|
const READ_HEAD_CHARS = ${SANDBOX_OUTPUT_LIMITS.readHeadChars};
|
|
103
227
|
const READ_TAIL_CHARS = ${SANDBOX_OUTPUT_LIMITS.readTailChars};
|
|
@@ -325,6 +449,31 @@ async function main() {
|
|
|
325
449
|
return emitValue(withMarker(capped.items, capped.omitted));
|
|
326
450
|
}
|
|
327
451
|
|
|
452
|
+
case "searchFiles": {
|
|
453
|
+
const p = resolvePath(args.path || ROOT);
|
|
454
|
+
if (!p.ok) return console.log(JSON.stringify({ ok: false, error: p.error }));
|
|
455
|
+
const { searchFileTextMatches } = await import(SEARCH_KERNEL_URL);
|
|
456
|
+
const { scrubSecrets } = await import(SCRUBBER_URL);
|
|
457
|
+
const query = args.query === undefined ? args.pattern : args.query;
|
|
458
|
+
if (typeof query !== "string" || !query.length) throw new Error("missing_query");
|
|
459
|
+
const result = await searchFileTextMatches({ root: ROOT, target: p.path, query,
|
|
460
|
+
regex: args.regex === true, caseSensitive: args.caseSensitive !== false,
|
|
461
|
+
include: typeof args.include === "string" ? args.include : undefined,
|
|
462
|
+
exclude: [...SEARCH_EXCLUDES, ...(Array.isArray(args.exclude) ? args.exclude.filter((x) => typeof x === "string") : [])],
|
|
463
|
+
contextLines: Number.isInteger(args.contextLines) && args.contextLines >= 0 && args.contextLines <= 5 ? args.contextLines : 0,
|
|
464
|
+
maxResults: Number.isInteger(args.maxResults) && args.maxResults >= 1 && args.maxResults <= 1000 ? args.maxResults : 100,
|
|
465
|
+
includeIgnored: args.includeIgnored === true });
|
|
466
|
+
const lines = result.matches.flatMap((m) => [
|
|
467
|
+
...m.before.map((text, i) => m.path + ":" + (m.line - m.before.length + i) + "-" + text),
|
|
468
|
+
m.path + ":" + m.line + ":" + m.text,
|
|
469
|
+
...m.after.map((text, i) => m.path + ":" + (m.line + i + 1) + "-" + text),
|
|
470
|
+
]);
|
|
471
|
+
const raw = scrubSecrets(lines.join(NL)).cleaned;
|
|
472
|
+
const content = raw.slice(0, ARRAY_CHAR_BUDGET);
|
|
473
|
+
return emitValue({ content, metadata: { searchEngine: result.engine, count: lines.length,
|
|
474
|
+
totalMatches: result.totalMatches, matchCount: result.totalMatches,
|
|
475
|
+
truncated: result.truncated || content.length !== raw.length, limitedByMaxResults: result.truncated } });
|
|
476
|
+
}
|
|
328
477
|
case "mkdir": {
|
|
329
478
|
const p = resolvePath(args.path);
|
|
330
479
|
if (!p.ok) return console.log(JSON.stringify({ ok: false, error: p.error }));
|
|
@@ -414,6 +563,32 @@ function buildToolInvocation(toolName, args) {
|
|
|
414
563
|
}
|
|
415
564
|
break;
|
|
416
565
|
}
|
|
566
|
+
case "searchFiles": {
|
|
567
|
+
const query = args.query === void 0 ? args.pattern : args.query;
|
|
568
|
+
if (typeof query !== "string" || !query.length) return { ok: false, error: "missing_query" };
|
|
569
|
+
const res = resolveSandboxPath(typeof args.path === "string" ? args.path : ".");
|
|
570
|
+
if (!res.ok) return { ok: false, error: res.error };
|
|
571
|
+
for (const key of ["regex", "caseSensitive", "includeIgnored"]) {
|
|
572
|
+
if (args[key] !== void 0 && typeof args[key] !== "boolean") return { ok: false, error: "invalid_" + key };
|
|
573
|
+
}
|
|
574
|
+
if (args.path !== void 0 && typeof args.path !== "string") return { ok: false, error: "invalid_path" };
|
|
575
|
+
if (args.include !== void 0 && typeof args.include !== "string") return { ok: false, error: "invalid_include" };
|
|
576
|
+
if (args.exclude !== void 0 && (!Array.isArray(args.exclude) || !args.exclude.every((x) => typeof x === "string"))) return { ok: false, error: "invalid_exclude" };
|
|
577
|
+
for (const [key, min, max] of [["contextLines", 0, 5], ["maxResults", 1, 1e3]]) {
|
|
578
|
+
if (args[key] !== void 0 && (!Number.isInteger(args[key]) || Number(args[key]) < min || Number(args[key]) > max)) return { ok: false, error: "invalid_" + key };
|
|
579
|
+
}
|
|
580
|
+
op = "searchFiles";
|
|
581
|
+
validatedArgs.path = res.path;
|
|
582
|
+
validatedArgs.query = query;
|
|
583
|
+
validatedArgs.regex = args.regex === true;
|
|
584
|
+
validatedArgs.caseSensitive = args.caseSensitive !== false;
|
|
585
|
+
validatedArgs.include = args.include;
|
|
586
|
+
validatedArgs.exclude = args.exclude;
|
|
587
|
+
validatedArgs.contextLines = args.contextLines;
|
|
588
|
+
validatedArgs.maxResults = args.maxResults ?? 100;
|
|
589
|
+
validatedArgs.includeIgnored = args.includeIgnored === true;
|
|
590
|
+
break;
|
|
591
|
+
}
|
|
417
592
|
case "grep":
|
|
418
593
|
case "grepFiles": {
|
|
419
594
|
if (typeof args.pattern !== "string" || !args.pattern.trim()) {
|
|
@@ -510,6 +685,7 @@ var dockerExecutionToolNames = [
|
|
|
510
685
|
"writeFile",
|
|
511
686
|
"editFile",
|
|
512
687
|
"globFiles",
|
|
688
|
+
"searchFiles",
|
|
513
689
|
"grepFiles"
|
|
514
690
|
];
|
|
515
691
|
var deny = (error) => JSON.stringify({ ok: false, error, workloadLocation: "docker" });
|
|
@@ -5,21 +5,21 @@ import {
|
|
|
5
5
|
ANTIGRAVITY_CLOUD_CODE_BASE_URL,
|
|
6
6
|
isAntigravityCloudCodeBaseUrl,
|
|
7
7
|
isAntigravityOAuthAgent
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-CTWCZKNS.js";
|
|
9
9
|
import {
|
|
10
10
|
isOpenAiResponsesModel,
|
|
11
11
|
resolvePlatformChatCompletionsEndpoint,
|
|
12
12
|
resolvePlatformResponsesEndpoint
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ESN4WNWU.js";
|
|
14
14
|
import {
|
|
15
15
|
findModelConfig
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import {
|
|
18
|
-
asTrimmedLowercaseString
|
|
19
|
-
} from "./chunk-QSJ3HFEF.js";
|
|
16
|
+
} from "./chunk-CD2DK5JA.js";
|
|
20
17
|
import {
|
|
21
18
|
asOptionalTrimmedString
|
|
22
19
|
} from "./chunk-G3SUCT4W.js";
|
|
20
|
+
import {
|
|
21
|
+
asTrimmedLowercaseString
|
|
22
|
+
} from "./chunk-QSJ3HFEF.js";
|
|
23
23
|
|
|
24
24
|
// packages/agent-runtime/agentCallPlan.ts
|
|
25
25
|
var CODEX_RESPONSES_URL = "https://chatgpt.com/backend-api/codex/responses";
|
|
@@ -7,24 +7,24 @@ import {
|
|
|
7
7
|
hadToolImages,
|
|
8
8
|
projectOpenAiToolImages,
|
|
9
9
|
toolImages
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-X4O7FJF5.js";
|
|
11
11
|
import {
|
|
12
12
|
getModelContextWindow
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-MAA42MMV.js";
|
|
14
14
|
import {
|
|
15
15
|
isRecord
|
|
16
16
|
} from "./chunk-KUG52IAP.js";
|
|
17
17
|
import {
|
|
18
|
-
|
|
18
|
+
asOptionalTrimmedString
|
|
19
|
+
} from "./chunk-G3SUCT4W.js";
|
|
20
|
+
import {
|
|
19
21
|
isFireworksKimiModel,
|
|
20
|
-
isNoloHostedProvider
|
|
21
|
-
|
|
22
|
+
isNoloHostedProvider,
|
|
23
|
+
resolvePlatformEffectiveModel
|
|
24
|
+
} from "./chunk-PQ63BDV3.js";
|
|
22
25
|
import {
|
|
23
26
|
asTrimmedLowercaseString
|
|
24
27
|
} from "./chunk-QSJ3HFEF.js";
|
|
25
|
-
import {
|
|
26
|
-
asOptionalTrimmedString
|
|
27
|
-
} from "./chunk-G3SUCT4W.js";
|
|
28
28
|
|
|
29
29
|
// packages/integrations/openai/responsesHelpers.ts
|
|
30
30
|
var RESPONSES_TOP_LEVEL_SCHEMA_KEYS = ["anyOf", "oneOf", "allOf", "enum", "not"];
|
|
@@ -1165,12 +1165,19 @@ function stablePromptCacheKey(parts, namespace) {
|
|
|
1165
1165
|
|
|
1166
1166
|
// packages/integrations/openai/providerBodyCompatibility.ts
|
|
1167
1167
|
var MOONSHOT_KIMI_K3_MODEL = "kimi-k3";
|
|
1168
|
+
var MOONSHOT_KIMI_K31_PRO_MODEL = "kimi-k3.1-pro";
|
|
1168
1169
|
var isKimiK3ProviderModel = (provider, model) => {
|
|
1169
1170
|
const normalizedModel = asTrimmedLowercaseString(model);
|
|
1171
|
+
const isFamilyId = (id) => id === MOONSHOT_KIMI_K3_MODEL || id === MOONSHOT_KIMI_K31_PRO_MODEL;
|
|
1170
1172
|
if (asTrimmedLowercaseString(provider) === "moonshot") {
|
|
1171
|
-
return normalizedModel
|
|
1173
|
+
return isFamilyId(normalizedModel);
|
|
1172
1174
|
}
|
|
1173
|
-
|
|
1175
|
+
if (!isNoloHostedProvider(provider)) return false;
|
|
1176
|
+
if (isFamilyId(normalizedModel)) return true;
|
|
1177
|
+
const effectiveModel = asTrimmedLowercaseString(
|
|
1178
|
+
resolvePlatformEffectiveModel(model) ?? model
|
|
1179
|
+
);
|
|
1180
|
+
return isFamilyId(effectiveModel);
|
|
1174
1181
|
};
|
|
1175
1182
|
var isOllamaProviderOrEndpoint = (provider, endpoint) => {
|
|
1176
1183
|
const p = asTrimmedLowercaseString(provider);
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
toolRegistry
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-J45ACAOQ.js";
|
|
4
4
|
import {
|
|
5
5
|
runtime_default
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZP26NIZE.js";
|
|
7
7
|
import {
|
|
8
8
|
canonicalizeToolNames
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-YLAHYLDQ.js";
|
|
10
10
|
import {
|
|
11
11
|
isRecord
|
|
12
12
|
} from "./chunk-KUG52IAP.js";
|
|
13
13
|
import {
|
|
14
14
|
isNoloHostedProvider
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-PQ63BDV3.js";
|
|
16
16
|
import {
|
|
17
17
|
asTrimmedLowercaseString
|
|
18
18
|
} from "./chunk-QSJ3HFEF.js";
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
// node_modules/js-base64/base64.mjs
|
|
2
|
+
var version = "3.9.7";
|
|
3
|
+
var VERSION = version;
|
|
4
|
+
var _TD = typeof TextDecoder === "function" ? new TextDecoder("utf-8", { ignoreBOM: true }) : void 0;
|
|
5
|
+
var _TE = typeof TextEncoder === "function" ? new TextEncoder() : void 0;
|
|
6
|
+
var b64ch = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
|
7
|
+
var b64chs = Array.prototype.slice.call(b64ch);
|
|
8
|
+
var b64tab = ((a) => {
|
|
9
|
+
let tab = {};
|
|
10
|
+
a.forEach((c, i) => tab[c] = i);
|
|
11
|
+
return tab;
|
|
12
|
+
})(b64chs);
|
|
13
|
+
var b64re = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;
|
|
14
|
+
var _fromCC = String.fromCharCode.bind(String);
|
|
15
|
+
var _mkUriSafe = (src) => src.replace(/=/g, "").replace(/[+\/]/g, (m0) => m0 == "+" ? "-" : "_");
|
|
16
|
+
var _tidyB64 = (s) => s.replace(/[^A-Za-z0-9\+\/]/g, "");
|
|
17
|
+
var btoaPolyfill = (bin) => {
|
|
18
|
+
let u32, c0, c1, c2, asc = "";
|
|
19
|
+
const pad = bin.length % 3;
|
|
20
|
+
for (let i = 0; i < bin.length; ) {
|
|
21
|
+
if ((c0 = bin.charCodeAt(i++)) > 255 || (c1 = bin.charCodeAt(i++)) > 255 || (c2 = bin.charCodeAt(i++)) > 255)
|
|
22
|
+
throw new TypeError("invalid character found");
|
|
23
|
+
u32 = c0 << 16 | c1 << 8 | c2;
|
|
24
|
+
asc += b64chs[u32 >> 18 & 63] + b64chs[u32 >> 12 & 63] + b64chs[u32 >> 6 & 63] + b64chs[u32 & 63];
|
|
25
|
+
}
|
|
26
|
+
return pad ? asc.slice(0, pad - 3) + "===".substring(pad) : asc;
|
|
27
|
+
};
|
|
28
|
+
var _btoa = typeof btoa === "function" ? (bin) => btoa(bin) : btoaPolyfill;
|
|
29
|
+
var _fromUint8Array = typeof Uint8Array.prototype.toBase64 === "function" ? Function.prototype.call.bind(Uint8Array.prototype.toBase64) : (u8a) => {
|
|
30
|
+
const maxargs = 4096;
|
|
31
|
+
let strs = [];
|
|
32
|
+
for (let i = 0, l = u8a.length; i < l; i += maxargs) {
|
|
33
|
+
strs.push(_fromCC.apply(null, u8a.subarray(i, i + maxargs)));
|
|
34
|
+
}
|
|
35
|
+
return _btoa(strs.join(""));
|
|
36
|
+
};
|
|
37
|
+
var fromUint8Array = (u8a, urlsafe = false) => urlsafe ? _mkUriSafe(_fromUint8Array(u8a)) : _fromUint8Array(u8a);
|
|
38
|
+
var cb_utob = (c) => {
|
|
39
|
+
if (c.length < 2) {
|
|
40
|
+
var cc = c.charCodeAt(0);
|
|
41
|
+
return cc < 128 ? c : cc < 2048 ? _fromCC(192 | cc >>> 6) + _fromCC(128 | cc & 63) : _fromCC(224 | cc >>> 12 & 15) + _fromCC(128 | cc >>> 6 & 63) + _fromCC(128 | cc & 63);
|
|
42
|
+
} else {
|
|
43
|
+
var cc = 65536 + (c.charCodeAt(0) - 55296) * 1024 + (c.charCodeAt(1) - 56320);
|
|
44
|
+
return _fromCC(240 | cc >>> 18 & 7) + _fromCC(128 | cc >>> 12 & 63) + _fromCC(128 | cc >>> 6 & 63) + _fromCC(128 | cc & 63);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\x00-\x7F]/g;
|
|
48
|
+
var utob = (u) => u.replace(re_utob, cb_utob);
|
|
49
|
+
var _encode = _TE ? (s) => _fromUint8Array(_TE.encode(s)) : (s) => _btoa(utob(s));
|
|
50
|
+
var encode = (src, urlsafe = false) => urlsafe ? _mkUriSafe(_encode(src)) : _encode(src);
|
|
51
|
+
var encodeURI = (src) => encode(src, true);
|
|
52
|
+
var re_btou = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g;
|
|
53
|
+
var cb_btou = (cccc) => {
|
|
54
|
+
switch (cccc.length) {
|
|
55
|
+
case 4:
|
|
56
|
+
var cp = (7 & cccc.charCodeAt(0)) << 18 | (63 & cccc.charCodeAt(1)) << 12 | (63 & cccc.charCodeAt(2)) << 6 | 63 & cccc.charCodeAt(3), offset = cp - 65536;
|
|
57
|
+
return _fromCC((offset >>> 10) + 55296) + _fromCC((offset & 1023) + 56320);
|
|
58
|
+
case 3:
|
|
59
|
+
return _fromCC((15 & cccc.charCodeAt(0)) << 12 | (63 & cccc.charCodeAt(1)) << 6 | 63 & cccc.charCodeAt(2));
|
|
60
|
+
default:
|
|
61
|
+
return _fromCC((31 & cccc.charCodeAt(0)) << 6 | 63 & cccc.charCodeAt(1));
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
var btou = (b) => b.replace(re_btou, cb_btou);
|
|
65
|
+
var atobPolyfill = (asc) => {
|
|
66
|
+
asc = asc.replace(/\s+/g, "");
|
|
67
|
+
if (!b64re.test(asc))
|
|
68
|
+
throw new TypeError("malformed base64.");
|
|
69
|
+
asc += "==".slice(2 - (asc.length & 3));
|
|
70
|
+
let u24, r1, r2;
|
|
71
|
+
let binArray = [];
|
|
72
|
+
for (let i = 0; i < asc.length; ) {
|
|
73
|
+
u24 = b64tab[asc.charAt(i++)] << 18 | b64tab[asc.charAt(i++)] << 12 | (r1 = b64tab[asc.charAt(i++)]) << 6 | (r2 = b64tab[asc.charAt(i++)]);
|
|
74
|
+
if (r1 === 64) {
|
|
75
|
+
binArray.push(_fromCC(u24 >> 16 & 255));
|
|
76
|
+
} else if (r2 === 64) {
|
|
77
|
+
binArray.push(_fromCC(u24 >> 16 & 255, u24 >> 8 & 255));
|
|
78
|
+
} else {
|
|
79
|
+
binArray.push(_fromCC(u24 >> 16 & 255, u24 >> 8 & 255, u24 & 255));
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return binArray.join("");
|
|
83
|
+
};
|
|
84
|
+
var _atob = typeof atob === "function" ? (asc) => atob(_tidyB64(asc)) : atobPolyfill;
|
|
85
|
+
var _toUint8Array = typeof Uint8Array.fromBase64 === "function" ? (a) => Uint8Array.fromBase64(a) : (a) => {
|
|
86
|
+
const bin = _atob(a), l = bin.length, u8a = new Uint8Array(l);
|
|
87
|
+
for (let i = 0; i < l; i++)
|
|
88
|
+
u8a[i] = bin.charCodeAt(i);
|
|
89
|
+
return u8a;
|
|
90
|
+
};
|
|
91
|
+
var toUint8Array = (a) => _toUint8Array(_unURI(a));
|
|
92
|
+
var _decode = _TD ? (a) => _TD.decode(_toUint8Array(a)) : (a) => btou(_atob(a));
|
|
93
|
+
var _unURI = (a) => _tidyB64(a.replace(/[-_]/g, (m0) => m0 == "-" ? "+" : "/"));
|
|
94
|
+
var decode = (src) => _decode(_unURI(src));
|
|
95
|
+
var isValid = (src) => {
|
|
96
|
+
if (typeof src !== "string")
|
|
97
|
+
return false;
|
|
98
|
+
const s = src.replace(/\s+/g, "").replace(/={0,2}$/, "");
|
|
99
|
+
if (s.length % 4 === 1)
|
|
100
|
+
return false;
|
|
101
|
+
return !/[^\s0-9a-zA-Z\+/]/.test(s) || !/[^\s0-9a-zA-Z\-_]/.test(s);
|
|
102
|
+
};
|
|
103
|
+
var _noEnum = (v) => {
|
|
104
|
+
return {
|
|
105
|
+
value: v,
|
|
106
|
+
enumerable: false,
|
|
107
|
+
writable: true,
|
|
108
|
+
configurable: true
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
var extendString = function() {
|
|
112
|
+
const _add = (name, body) => Object.defineProperty(String.prototype, name, _noEnum(body));
|
|
113
|
+
_add("fromBase64", function() {
|
|
114
|
+
return decode(this);
|
|
115
|
+
});
|
|
116
|
+
_add("toBase64", function(urlsafe) {
|
|
117
|
+
return encode(this, urlsafe);
|
|
118
|
+
});
|
|
119
|
+
_add("toBase64URI", function() {
|
|
120
|
+
return encode(this, true);
|
|
121
|
+
});
|
|
122
|
+
_add("toBase64URL", function() {
|
|
123
|
+
return encode(this, true);
|
|
124
|
+
});
|
|
125
|
+
_add("toUint8Array", function() {
|
|
126
|
+
return toUint8Array(this);
|
|
127
|
+
});
|
|
128
|
+
};
|
|
129
|
+
var extendUint8Array = function() {
|
|
130
|
+
const _add = (name, body) => Object.defineProperty(Uint8Array.prototype, name, _noEnum(body));
|
|
131
|
+
_add("toBase64", function(urlsafe) {
|
|
132
|
+
return fromUint8Array(this, urlsafe);
|
|
133
|
+
});
|
|
134
|
+
_add("toBase64URI", function() {
|
|
135
|
+
return fromUint8Array(this, true);
|
|
136
|
+
});
|
|
137
|
+
_add("toBase64URL", function() {
|
|
138
|
+
return fromUint8Array(this, true);
|
|
139
|
+
});
|
|
140
|
+
};
|
|
141
|
+
var extendBuiltins = () => {
|
|
142
|
+
extendString();
|
|
143
|
+
extendUint8Array();
|
|
144
|
+
};
|
|
145
|
+
var gBase64 = {
|
|
146
|
+
version,
|
|
147
|
+
VERSION,
|
|
148
|
+
atob: _atob,
|
|
149
|
+
atobPolyfill,
|
|
150
|
+
btoa: _btoa,
|
|
151
|
+
btoaPolyfill,
|
|
152
|
+
fromBase64: decode,
|
|
153
|
+
toBase64: encode,
|
|
154
|
+
encode,
|
|
155
|
+
encodeURI,
|
|
156
|
+
encodeURL: encodeURI,
|
|
157
|
+
utob,
|
|
158
|
+
btou,
|
|
159
|
+
decode,
|
|
160
|
+
isValid,
|
|
161
|
+
fromUint8Array,
|
|
162
|
+
toUint8Array,
|
|
163
|
+
extendString,
|
|
164
|
+
extendUint8Array,
|
|
165
|
+
extendBuiltins
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
export {
|
|
169
|
+
gBase64
|
|
170
|
+
};
|