nolo-cli 0.226.0-alpha.2 → 0.226.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -5
- package/{_executeModel-IKZGZZXW.js → _executeModel-IZ2MCXHO.js} +89 -83
- package/{action-CK64LS6S.js → action-VDEW6WLI.js} +9 -6
- package/{addContentAction-EQXMFNPR.js → addContentAction-7YVXHIPQ.js} +15 -14
- package/{addDialogAgentAction-RSDZDASD.js → addDialogAgentAction-BX7B47HF.js} +18 -17
- package/{agentDeleteCommand-IZY3VF5F.js → agentDeleteCommand-N7ELXPLD.js} +145 -138
- package/{agentEmailCommands-YWL567CL.js → agentEmailCommands-OFS477PV.js} +144 -133
- package/{agentFavoriteCommands-2LKGKSUD.js → agentFavoriteCommands-7LOP3HUD.js} +5 -5
- package/{agentGrantCommands-QQV4N4JW.js → agentGrantCommands-L6O2HVJI.js} +5 -5
- package/agentListCommands-IQQHJSXP.js +644 -0
- package/{agentMachineCommands-AXJ4A772.js → agentMachineCommands-NS65BEW7.js} +75 -66
- package/{agentProviderCommands-7BSJH7TO.js → agentProviderCommands-SS6M6VGY.js} +6 -6
- package/{agentPullCommand-XN6ZPBUW.js → agentPullCommand-QQQZSC6S.js} +6 -6
- package/agentRecordCommands-4VE7CNLC.js +188 -0
- package/agentRunCommand-2MUXHKNW.js +223 -0
- package/{agentRunControl-DFEEOFC7.js → agentRunControl-55GL6Q3M.js} +23 -15
- package/{agentRuntimeLocal-GSTYFEX4.js → agentRuntimeLocal-5DB2P4MU.js} +63 -49
- package/{agentSlice-5F5U5X2U.js → agentSlice-5VTAFG43.js} +19 -18
- package/{appDeleteCommands-L7HL4AWF.js → appDeleteCommands-EDKUPHJM.js} +67 -58
- package/{appDeployCommands-SGSUNFZR.js → appDeployCommands-JO74GW4L.js} +67 -58
- package/{appDeployStatusCommands-AAA3XD54.js → appDeployStatusCommands-U77ZUHX7.js} +67 -58
- package/{appGetCommands-LN72GAOA.js → appGetCommands-QCMHBYPX.js} +67 -58
- package/{appListCommands-IJQQ3VND.js → appListCommands-ZQJYEXI6.js} +67 -58
- package/{authCommand-7JXW54U4.js → authCommand-W4KXRZLI.js} +33 -28
- package/{authCommands-YDNAIDEY.js → authCommands-6AUYO65N.js} +15 -10
- package/{builtinSkillRegistry-PXH7EGQB.js → builtinSkillRegistry-GHE3RD3V.js} +8 -8
- package/{chromeCommands-G5UDKVSV.js → chromeCommands-S7AW3AOD.js} +383 -6
- package/{chromeOpsCommands-YKX2QX3A.js → chromeOpsCommands-TBPM6MR4.js} +6 -6
- package/{chunk-7Z6EW7AH.js → chunk-247AAJRK.js} +13 -6
- package/{chunk-P2ZLUIW2.js → chunk-2BSLGODA.js} +350 -25
- package/{chunk-4HFTBHBF.js → chunk-2N4UBHUU.js} +8 -8
- package/chunk-2SXN7LAY.js +15 -0
- package/{chunk-GBUDWITV.js → chunk-2T5BHLID.js} +2871 -1565
- package/{chunk-XI2BWJM5.js → chunk-324FWHUA.js} +20 -3
- package/{chunk-VFBVA3U2.js → chunk-3OQFXODL.js} +131 -40
- package/{chunk-BGGHA5DV.js → chunk-3ORFJP2Z.js} +1 -1
- package/{chunk-E5EIYI34.js → chunk-3UNAGTBW.js} +32 -95
- package/{chunk-LM2PS3YS.js → chunk-4F7SWSWO.js} +26 -13
- package/{chunk-SBVTHMEG.js → chunk-4FE3IWRE.js} +1 -1
- package/{chunk-GOAPXKQU.js → chunk-4UK6UBXF.js} +4 -4
- package/{chunk-4JVNURX4.js → chunk-4YFC3DWW.js} +68 -16
- package/chunk-4ZCTKB27.js +31 -0
- package/chunk-53W5BXLN.js +340 -0
- package/{chunk-NEKH3XDV.js → chunk-5GRWWUB4.js} +4 -4
- package/{chunk-JWXITTQB.js → chunk-5HUO7SEX.js} +9 -107
- package/{chunk-ZH6MUQEO.js → chunk-6326DRQY.js} +1 -1
- package/{chunk-AVHRSJUH.js → chunk-6MQWGA5F.js} +31 -24
- package/{chunk-67BE44IS.js → chunk-6MX6S6TE.js} +3 -3
- package/chunk-6RSNVJGO.js +279 -0
- package/{chunk-L4NFXFFF.js → chunk-6S6CZUXK.js} +42 -33
- package/{chunk-PDCV7P5W.js → chunk-6XIE5ZGI.js} +1 -1
- package/{chunk-JHRQXQ4A.js → chunk-6XLWUNZB.js} +25 -25
- package/{chunk-YGMBIXCF.js → chunk-6XRPBZRS.js} +4 -2
- package/{chunk-62HXNQVV.js → chunk-776CXKMX.js} +1 -1
- package/{chunk-6J4TTPS2.js → chunk-7AWKDRXG.js} +5 -5
- package/{chunk-3KNEE64G.js → chunk-7GTXPS3D.js} +16 -16
- package/{chunk-RRVQ446B.js → chunk-7HUHOCIY.js} +147 -162
- package/{chunk-PWTNI4N7.js → chunk-ANUP75N2.js} +22 -0
- package/chunk-BEM6LPD2.js +734 -0
- package/{chunk-AGP3YSEC.js → chunk-BH7CEVOH.js} +46 -1
- package/chunk-BIDSIRTS.js +307 -0
- package/{chunk-4AMQZTE7.js → chunk-C4KX626C.js} +15 -15
- package/chunk-C5A54QS7.js +108 -0
- package/{chunk-BYH3HMUP.js → chunk-CHYYSFFM.js} +6 -6
- package/{chunk-VREDDN25.js → chunk-CJTB3OYB.js} +14 -9
- package/{chunk-YFLVRVYK.js → chunk-DLT2DN4M.js} +1 -1
- package/{chunk-LKA64WH4.js → chunk-DMPZMYH4.js} +37 -1
- package/{chunk-EOWLBDY6.js → chunk-DOK7GDRU.js} +1 -1
- package/{chunk-T3T57NVP.js → chunk-DPAIQLAL.js} +105 -102
- package/{chunk-KFHREHUQ.js → chunk-DXWGFL2Z.js} +89 -1
- package/{chunk-XN23AUVU.js → chunk-EKXPHL7M.js} +8 -5
- package/{chunk-DISQCYPE.js → chunk-ENYTIRIO.js} +6 -6
- package/{chunk-2TIQO6TC.js → chunk-ER3P6MBT.js} +206 -308
- package/{chunk-M3JEW6N6.js → chunk-F26GAEH3.js} +10 -0
- package/{chunk-JM5C4EUA.js → chunk-F4MCAOWN.js} +6 -6
- package/chunk-FDZ2GBWO.js +166 -0
- package/{chunk-PMDVQBGA.js → chunk-GAHJLSDO.js} +14 -7
- package/{chunk-N5PQJKCY.js → chunk-GES5GIAU.js} +14 -13
- package/{chunk-QTMIHVLE.js → chunk-HQVNO7FH.js} +66 -35
- package/chunk-HSWEFHFS.js +103 -0
- package/{chunk-S2NTVGA2.js → chunk-I2OYPD3Y.js} +1 -1
- package/{chunk-F7DU25CE.js → chunk-IIG3TT73.js} +460 -123
- package/{chunk-AK5O76CC.js → chunk-IZJFTY4R.js} +3 -3
- package/{chunk-2VA6TU4I.js → chunk-J25ESVUW.js} +22 -19
- package/{chunk-2COEG5ZV.js → chunk-J2XZZXIH.js} +4 -4
- package/{chunk-JVRQ6YVK.js → chunk-JBWXPACD.js} +1 -1
- package/{chunk-D726I5AZ.js → chunk-JVJ53XCH.js} +2 -2
- package/{chunk-TXGQ4O5S.js → chunk-KC2QVCI7.js} +20 -174
- package/{chunk-UKS7D2NL.js → chunk-KF2DWSAH.js} +113 -28
- package/chunk-KK3FCYZM.js +647 -0
- package/{chunk-HHL7WG65.js → chunk-KLD7K5FD.js} +349 -16
- package/{chunk-WSJMT3FA.js → chunk-KMW5CRRM.js} +1564 -2955
- package/{chunk-N5Z2V73W.js → chunk-LELADM5Q.js} +1 -1
- package/{chunk-4NA3YTBC.js → chunk-LMFMV5UC.js} +8 -8
- package/{chunk-KZU52OJ5.js → chunk-LZOOUQAZ.js} +6 -6
- package/{chunk-VV7TXWOC.js → chunk-M5EA44QU.js} +6 -6
- package/{chunk-UYOICCYG.js → chunk-MEDPR36J.js} +64 -89
- package/chunk-MFXJY44K.js +133 -0
- package/chunk-MVOZ22RZ.js +26 -0
- package/{chunk-3QFLXA24.js → chunk-N6EN3HK3.js} +3 -3
- package/{chunk-SOF4OWDM.js → chunk-NEG5LYK5.js} +1 -3
- package/{chunk-W772FYAQ.js → chunk-ODGSLWLO.js} +593 -370
- package/{chunk-OB6DVWPF.js → chunk-OGZE6BZG.js} +331 -99
- package/{chunk-KYH7XW3K.js → chunk-OJRTTERA.js} +77 -2
- package/{chunk-2VUZSVAS.js → chunk-OKPC4QNX.js} +57 -20
- package/{chunk-SOG7OEXX.js → chunk-ONFFUQYM.js} +1 -1
- package/{chunk-KNIIRXHF.js → chunk-P244EH4W.js} +46 -8
- package/chunk-P27E22MA.js +203 -0
- package/{chunk-YDBMZ7FV.js → chunk-PK7VT4ZU.js} +3 -3
- package/{chunk-EUCFKKDM.js → chunk-PVFYPUIM.js} +40 -10
- package/{chunk-HOCHUZQ7.js → chunk-QJTZ76CP.js} +24 -6
- package/{chunk-5RKUPJYL.js → chunk-QLUYDJST.js} +11 -3
- package/{chunk-EFX3Q5SM.js → chunk-QUJKDFZW.js} +17 -17
- package/{chunk-C4VAR65S.js → chunk-QXUVCIPB.js} +204 -124
- package/{chunk-BLSNUIZD.js → chunk-QYNABNNQ.js} +13 -13
- package/{chunk-MK2Q7ZJD.js → chunk-R7XWZDOH.js} +58 -24
- package/{chunk-5FUN7EG4.js → chunk-RD3QLZQV.js} +83 -47
- package/{chunk-KC4SCKXO.js → chunk-RGUWOMXU.js} +1234 -1451
- package/{chunk-IZIN2UNJ.js → chunk-RH44TIHX.js} +206 -27
- package/{chunk-GNHMRBYZ.js → chunk-RIMFTQMC.js} +282 -58
- package/{chunk-VQUWV3YR.js → chunk-S25VJYXV.js} +9 -3
- package/{chunk-EJU6WCDH.js → chunk-SBRJOYND.js} +723 -355
- package/{chunk-UEKXWO7A.js → chunk-SBRSXY67.js} +18 -7
- package/chunk-SR4FE5VD.js +9 -0
- package/{chunk-4WVJLODK.js → chunk-T23G6PXQ.js} +8 -3
- package/chunk-T3WSFTBS.js +62 -0
- package/{chunk-KEN3N2TN.js → chunk-TB5KTLNB.js} +15 -12
- package/{chunk-VP3BINY7.js → chunk-TOK555CQ.js} +31 -1
- package/{chunk-OBSEKCVK.js → chunk-U4VSBDO5.js} +88 -0
- package/{chunk-PPJYZRSQ.js → chunk-U5LOKQ2R.js} +30 -14
- package/{chunk-GGKNJ42M.js → chunk-UDT4SI37.js} +18 -108
- package/{chunk-CKT6QUE2.js → chunk-UHW6SCVK.js} +1 -1
- package/{chunk-GVGOEMNV.js → chunk-UQXOORR3.js} +5 -5
- package/{chunk-6O5YP6FX.js → chunk-UR7555FE.js} +9 -9
- package/{chunk-QLFCTYRH.js → chunk-UWOCASVL.js} +20 -13
- package/{chunk-C4WTX5TU.js → chunk-V2V5Q6DU.js} +2 -2
- package/{chunk-2ZKFCIJJ.js → chunk-VCU5GV42.js} +1 -1
- package/{chunk-FTQWYWUI.js → chunk-VMWY7TUA.js} +1 -1
- package/chunk-VNALJT32.js +33394 -0
- package/{chunk-HGDKT2D6.js → chunk-VTHWBTRE.js} +177 -1
- package/chunk-WBSJAIZP.js +170 -0
- package/chunk-WDWZPASX.js +29 -0
- package/chunk-WFGNWWJI.js +326 -0
- package/{chunk-UJKTI5PG.js → chunk-WRKMXMU7.js} +2 -1
- package/chunk-WVOZ35E4.js +1438 -0
- package/{chunk-FIYSMXHY.js → chunk-WWTSEBDF.js} +1 -1
- package/{chunk-E2BESSAW.js → chunk-X4O7FJF5.js} +2 -0
- package/{chunk-GIABSSWQ.js → chunk-XDNXKFWF.js} +6 -6
- package/{chunk-GBZ4YKEO.js → chunk-XLN2GD6Z.js} +7 -7
- package/{chunk-45LZIYXB.js → chunk-XNEDFWT4.js} +2 -2
- package/{chunk-EWPDMS4N.js → chunk-Y22P6ASC.js} +32 -17
- package/{chunk-LJSNEV7M.js → chunk-Y3DOUQQQ.js} +8 -8
- package/{chunk-KOXKKHFE.js → chunk-Y5EBOURK.js} +10 -5
- package/{chunk-L5I543VB.js → chunk-YGDYYFRX.js} +20 -24
- package/{chunk-6OVNSQHN.js → chunk-YLAHYLDQ.js} +5 -0
- package/{chunk-PVZY6P3S.js → chunk-YTEY27GN.js} +2 -2
- package/chunk-YUZ2DAIH.js +34 -0
- package/chunk-Z6YTCDU4.js +24 -0
- package/{chunk-MOMR7NMG.js → chunk-ZCVBIIUE.js} +4 -4
- package/{chunk-AZQZ5XPM.js → chunk-ZCZLTJEW.js} +98 -57
- package/{chunk-KN3HEZIQ.js → chunk-ZVOL2MAJ.js} +1 -1
- package/{cliAgentConfigHelpers-KICKKNYQ.js → cliAgentConfigHelpers-6OFDHJFT.js} +13 -13
- package/{cliAuthorityBrokerClient-XHH7MH2P.js → cliAuthorityBrokerClient-SFPC3WVK.js} +1 -1
- package/{cliEnvHelpers-VPSJ4XWC.js → cliEnvHelpers-CNMP3RDX.js} +1 -1
- package/{cliExecutor-4MAX3PZL.js → cliExecutor-K6FDZTQ2.js} +3 -1
- package/cliLocalAgentRecordReader-FHIMCBUK.js +102 -0
- package/{commandRegistry-6EQXVODF.js → commandRegistry-OKIWAJIS.js} +113 -101
- package/{contentThunks-ANUP57QV.js → contentThunks-VF2DCU46.js} +41 -38
- package/{cooldownCommands-X7P5M2V5.js → cooldownCommands-QL6DWGVU.js} +4 -4
- package/{createAgentAutomationAction-XMUWUDKQ.js → createAgentAutomationAction-BGET7Q6K.js} +41 -38
- package/{createDialogAction-43QJIQDH.js → createDialogAction-XYDQZETK.js} +42 -40
- package/{createPageAction-SJO7UC3J.js → createPageAction-74S5RO7U.js} +46 -43
- package/{db-CS4ZJQKV.js → db-6NRZLEW2.js} +10 -7
- package/{dbSlice-ZJPDIFER.js → dbSlice-FI7VNDR5.js} +14 -13
- package/{deleteFile-Q3YDB4ML.js → deleteFile-GD62MPZW.js} +10 -7
- package/{dialogCommands-V5IYEOQP.js → dialogCommands-Y6DHZUAM.js} +71 -64
- package/dialogMessageRecord-OAV77LT7.js +7 -0
- package/{dialogNotifyCommand-77B57PL6.js → dialogNotifyCommand-MKXL4NGL.js} +15 -15
- package/{dialogSlice-FQ6WOKWJ.js → dialogSlice-XAUKSWZ4.js} +41 -38
- package/{dialogUsageCommand-HTVPR2CX.js → dialogUsageCommand-BZPKR3DW.js} +6 -6
- package/{docCreateCommands-36WS33BK.js → docCreateCommands-PHDFOQBM.js} +66 -57
- package/{docDeleteCommands-C4CS4XLF.js → docDeleteCommands-OSHJM67Y.js} +69 -60
- package/{docReadCommands-QZMSFMPN.js → docReadCommands-E6QYCFMS.js} +66 -57
- package/{docStore-BZ2O7WLF.js → docStore-ZZT2BEBU.js} +16 -15
- package/{docUpdateCommands-BYI64HVV.js → docUpdateCommands-DHIOPK2C.js} +66 -57
- package/fetchMessages-TQEUZD7H.js +2 -2
- package/{getPricing-VNGFM4PN.js → getPricing-RNRITFOP.js} +6 -6
- package/{handleSendMessageAction-I5J7QR7K.js → handleSendMessageAction-ARUU6CNF.js} +83 -78
- package/{hostCredentialCreate-AVPMK7EQ.js → hostCredentialCreate-SNQT73H4.js} +131 -119
- package/index.js +56 -18
- package/keys-RWF7UCB4.js +1 -1
- package/{lib-OT5OTXRU.js → lib-62SWPXNF.js} +3 -7
- package/{localDialogRead-SVTPA5GY.js → localDialogRead-3T2KMCRC.js} +1 -1
- package/{localRuntimeAdapter-S56R76HN.js → localRuntimeAdapter-MHI6Y2IZ.js} +143 -130
- package/{localRuntimeAuthority-IBJAT62G.js → localRuntimeAuthority-7DKIT7UH.js} +4 -2
- package/{localRuntimeDb-N7KHDXS2.js → localRuntimeDb-5WZ4RJJO.js} +1 -1
- package/{machineCommands-77NFB2AE.js → machineCommands-3O6Y27R4.js} +283 -348
- package/machineWsRunDispatch-5PFLR5XC.js +203 -0
- package/markdownToSlate-KIYM7B3P.js +8 -0
- package/mcpLocalAuthorizeCommand-BQCQ2KRJ.js +106 -0
- package/{memberThunks-JRYNONYV.js → memberThunks-TU6A6OBV.js} +24 -19
- package/{memoryCommands-5WC3T66U.js → memoryCommands-BC6REPQB.js} +4 -4
- package/{models-H5NNZRLH.js → models-CINY5UZR.js} +2 -2
- package/{overlay-THLKYIWY.js → overlay-JA3SPVUS.js} +7 -3
- package/package.json +1 -1
- package/{projectArchive-GNOSYH6F.js → projectArchive-X2EVXU3N.js} +47 -44
- package/{providerPresetApply-J3WMRPD2.js → providerPresetApply-HUWNV2NI.js} +7 -7
- package/{providerRegistry-KJGB5XWS.js → providerRegistry-7FWKDKZJ.js} +7 -7
- package/{read-Q7GOHGNP.js → read-QAHEQID5.js} +9 -8
- package/{readDocTool-Z5OQ6422.js → readDocTool-KG5DP6EM.js} +1 -1
- package/{readlineWorkspace-2PONGBUP.js → readlineWorkspace-SO3APHVP.js} +8125 -6196
- package/rememberExplicit-CPAPONSI.js +15 -0
- package/{removeDialogAgentAction-U3F2MNAY.js → removeDialogAgentAction-QZCCVK2G.js} +20 -19
- package/{runAgentClientLoop-WEXFFHVS.js → runAgentClientLoop-FLHHCOVH.js} +106 -81
- package/{runtimeDoctorCommands-UXKXYBW6.js → runtimeDoctorCommands-DN3I52C6.js} +17 -17
- package/{secretCommands-LJXOOYA7.js → secretCommands-36BCE3UE.js} +4 -4
- package/{setDialogExtraReferencesAction-G3WSJ7EM.js → setDialogExtraReferencesAction-PDPTYSEW.js} +17 -16
- package/{setPrimaryDialogAgentAction-6FHAHZBB.js → setPrimaryDialogAgentAction-DOUIPR66.js} +20 -19
- package/{settingThunks-AXTBX3Q5.js → settingThunks-MHGGP6UE.js} +186 -67
- package/{skillDiscovery-B5V23AXP.js → skillDiscovery-MDDKPTW3.js} +4 -3
- package/{spaceCommands-GUKMDRWN.js → spaceCommands-JH7UYE3K.js} +70 -61
- package/{store-JRVN62NM.js → store-Z53ICFL3.js} +3 -1
- package/{streamAgentChatTurn-D2WFS5MF.js → streamAgentChatTurn-VDDA2TX6.js} +200 -195
- package/{switchDialogAgentAction-UOFIAGPL.js → switchDialogAgentAction-7USK3DAP.js} +18 -17
- package/{tableCommands-HITDSLHS.js → tableCommands-UONBFC7L.js} +15 -12
- package/{toolApiClient-OGQEBQVX.js → toolApiClient-53YMJ2G6.js} +8 -6
- package/{tools-YKE6PQHT.js → tools-MIOCXKMG.js} +72 -68
- package/tuiRestart-ET3QISZ5.js +41 -0
- package/{tuiSummaryLlmCaller-7WLUKNP2.js → tuiSummaryLlmCaller-MSINBP3M.js} +21 -20
- package/{updateCommands-RJVCRSBP.js → updateCommands-5OYND6EF.js} +8 -6
- package/{updateDialogTitleAction-D5NCA4FC.js → updateDialogTitleAction-2L4CC4YO.js} +43 -40
- package/{usageCommand-YPJ2ZI2F.js → usageCommand-JTKDAG6I.js} +3 -3
- package/{usageRebuildCommand-FERQO74C.js → usageRebuildCommand-4TFZCKXM.js} +4 -4
- package/webapi-24RZDIIQ.js +2488 -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-YBNOQ5T3.js +0 -991
- package/agentRecordCommands-WUUC2CX7.js +0 -177
- package/agentRunCommand-W6MDKVLJ.js +0 -208
- package/chunk-2THCNKE4.js +0 -147
- package/chunk-2WZXXAQD.js +0 -57
- package/chunk-5ZMIIR23.js +0 -265
- package/chunk-BJF2MHJ3.js +0 -118
- package/chunk-KEPOVMF4.js +0 -91
- package/chunk-OLMJR6UM.js +0 -357
- package/chunk-QVBXJNZ2.js +0 -81
- package/chunk-QZI44GWV.js +0 -776
- package/cliLocalAgentRecordReader-6FXGFBI3.js +0 -90
- package/machineWsRunDispatch-5XWFUJ53.js +0 -192
- package/{accountResolver-EK2S4PWF.js → accountResolver-QETKNC7T.js} +3 -3
- package/{chunk-W6RFEDN4.js → chunk-AETZ7AD6.js} +3 -3
- package/{chunk-BLVSFYQ3.js → chunk-LISC7BD4.js} +3 -3
- package/{chunk-SNBZZPYH.js → chunk-OQHIVPG4.js} +3 -3
- package/{chunk-47ITIXO7.js → chunk-USGHJSGO.js} +3 -3
- package/{chunk-FJ23FZXF.js → chunk-VIYVRPMJ.js} +0 -0
- package/{offlineMarxistsAgentCommand-4IC3Y4C6.js → offlineMarxistsAgentCommand-XVXUE6G5.js} +3 -3
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
gBase64
|
|
3
|
+
} from "./chunk-WBSJAIZP.js";
|
|
1
4
|
import {
|
|
2
5
|
createClientLogger
|
|
3
6
|
} from "./chunk-QQ56R7KS.js";
|
|
@@ -7,6 +10,9 @@ import {
|
|
|
7
10
|
import {
|
|
8
11
|
isAbortError
|
|
9
12
|
} from "./chunk-7DPNBQSV.js";
|
|
13
|
+
import {
|
|
14
|
+
isPublicBuiltinPlatformAgentKey
|
|
15
|
+
} from "./chunk-WRKMXMU7.js";
|
|
10
16
|
import {
|
|
11
17
|
API_ENDPOINTS,
|
|
12
18
|
NOLO_CLUSTER_SERVERS,
|
|
@@ -18,6 +24,39 @@ import {
|
|
|
18
24
|
normalizeServerOrigin
|
|
19
25
|
} from "./chunk-CF7PE763.js";
|
|
20
26
|
|
|
27
|
+
// packages/core/googleSessionScope.ts
|
|
28
|
+
function isGoogleAuthoritySession(token) {
|
|
29
|
+
if (typeof token !== "string") return false;
|
|
30
|
+
try {
|
|
31
|
+
return JSON.parse(gBase64.decode(token.split(".")[0])).authKind === "google-session-v1";
|
|
32
|
+
} catch {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function googleSessionServer(token, configuredServer) {
|
|
37
|
+
if (!isGoogleAuthoritySession(token)) return void 0;
|
|
38
|
+
const origin = typeof window !== "undefined" ? window.location?.origin : void 0;
|
|
39
|
+
if (typeof origin !== "string" || !/^https?:\/\//.test(origin)) return "";
|
|
40
|
+
return normalizeServerOrigin(origin);
|
|
41
|
+
}
|
|
42
|
+
function scopeGoogleSessionServers(token, configuredServer, servers) {
|
|
43
|
+
const server = googleSessionServer(token, configuredServer);
|
|
44
|
+
return server === void 0 ? servers : server ? [server] : [];
|
|
45
|
+
}
|
|
46
|
+
function googleSessionRequestToken(token, target, allowAnonymousPublic = false) {
|
|
47
|
+
if (!isGoogleAuthoritySession(token)) return token;
|
|
48
|
+
const authority = googleSessionServer(token);
|
|
49
|
+
let origin;
|
|
50
|
+
try {
|
|
51
|
+
origin = new URL(target).origin;
|
|
52
|
+
} catch {
|
|
53
|
+
throw new Error("google_session_origin_blocked");
|
|
54
|
+
}
|
|
55
|
+
if (authority && origin === authority) return token;
|
|
56
|
+
if (allowAnonymousPublic) return void 0;
|
|
57
|
+
throw new Error("google_session_origin_blocked");
|
|
58
|
+
}
|
|
59
|
+
|
|
21
60
|
// packages/app/utils/env.ts
|
|
22
61
|
var processEnv = typeof process !== "undefined" ? process.env : void 0;
|
|
23
62
|
var reactNativeDev = typeof globalThis !== "undefined" && "__DEV__" in globalThis ? globalThis.__DEV__ : void 0;
|
|
@@ -124,6 +163,7 @@ var createReadTimeoutError = (server, dbKey) => {
|
|
|
124
163
|
};
|
|
125
164
|
var isReadTimeoutError = (error) => error instanceof Error && error.name === READ_TIMEOUT_ERROR_NAME;
|
|
126
165
|
var fetchFromServer = async (server, dbKey, token, signal) => {
|
|
166
|
+
const requestToken = googleSessionRequestToken(token, server, isPublicBuiltinPlatformAgentKey(dbKey));
|
|
127
167
|
if (signal?.aborted) {
|
|
128
168
|
throw new DOMException("Aborted", "AbortError");
|
|
129
169
|
}
|
|
@@ -140,9 +180,10 @@ var fetchFromServer = async (server, dbKey, token, signal) => {
|
|
|
140
180
|
`${server}${buildReadUrl(dbKey)}`,
|
|
141
181
|
{
|
|
142
182
|
signal: controller.signal,
|
|
183
|
+
...isGoogleAuthoritySession(token) || !token ? { credentials: "omit", redirect: "error" } : {},
|
|
143
184
|
headers: {
|
|
144
185
|
"Content-Type": "application/json",
|
|
145
|
-
...
|
|
186
|
+
...requestToken && { Authorization: `Bearer ${requestToken}` }
|
|
146
187
|
}
|
|
147
188
|
}
|
|
148
189
|
);
|
|
@@ -173,6 +214,10 @@ var normalizeTimeFields = (data) => ({
|
|
|
173
214
|
});
|
|
174
215
|
|
|
175
216
|
export {
|
|
217
|
+
isGoogleAuthoritySession,
|
|
218
|
+
googleSessionServer,
|
|
219
|
+
scopeGoogleSessionServers,
|
|
220
|
+
googleSessionRequestToken,
|
|
176
221
|
isDevelopment,
|
|
177
222
|
getIsDesktopApp,
|
|
178
223
|
logger,
|
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DEFAULT_NOLO_SERVER_URL
|
|
3
|
+
} from "./chunk-OLZBQWZU.js";
|
|
4
|
+
import {
|
|
5
|
+
NOLO_CLUSTER_SERVERS
|
|
6
|
+
} from "./chunk-LCBAMY2M.js";
|
|
7
|
+
import {
|
|
8
|
+
asOptionalTrimmedString
|
|
9
|
+
} from "./chunk-G3SUCT4W.js";
|
|
10
|
+
import {
|
|
11
|
+
DEFAULT_LOCAL_API_ORIGIN
|
|
12
|
+
} from "./chunk-4SN6J65J.js";
|
|
13
|
+
import {
|
|
14
|
+
normalizeServerOrigin
|
|
15
|
+
} from "./chunk-CF7PE763.js";
|
|
16
|
+
|
|
17
|
+
// packages/cli/agentRunProtocol.ts
|
|
18
|
+
import { createHash } from "node:crypto";
|
|
19
|
+
import { existsSync, lstatSync, statSync, readFileSync, readdirSync, realpathSync } from "node:fs";
|
|
20
|
+
import { dirname, extname, join, relative } from "node:path";
|
|
21
|
+
import { fileURLToPath } from "node:url";
|
|
22
|
+
var AGENT_RUN_PROTOCOL = "nolo-agent-run/2";
|
|
23
|
+
var RuntimeProtocolMismatchError = class extends Error {
|
|
24
|
+
code = "runtime_protocol_mismatch";
|
|
25
|
+
constructor() {
|
|
26
|
+
super("runtime_protocol_mismatch: parent and child agent-run protocols differ");
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
function validateAgentRunProtocol(expected) {
|
|
30
|
+
if (expected !== AGENT_RUN_PROTOCOL) throw new RuntimeProtocolMismatchError();
|
|
31
|
+
}
|
|
32
|
+
var RuntimeVersionMismatchError = class extends Error {
|
|
33
|
+
code = "runtime_version_mismatch";
|
|
34
|
+
constructor(detail) {
|
|
35
|
+
super(`runtime_version_mismatch: ${detail}; restart CLI/desktop before retrying`);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
var ignoredDirectories = /* @__PURE__ */ new Set([
|
|
39
|
+
"node_modules",
|
|
40
|
+
".git",
|
|
41
|
+
".nolo",
|
|
42
|
+
".worktrees",
|
|
43
|
+
"data",
|
|
44
|
+
"nolodata",
|
|
45
|
+
"credentials",
|
|
46
|
+
"dist",
|
|
47
|
+
"build",
|
|
48
|
+
"public",
|
|
49
|
+
"assets",
|
|
50
|
+
"docs",
|
|
51
|
+
"logs",
|
|
52
|
+
"artifacts",
|
|
53
|
+
"coverage",
|
|
54
|
+
"__tests__",
|
|
55
|
+
"__fixtures__",
|
|
56
|
+
"fixtures",
|
|
57
|
+
"testHelpers",
|
|
58
|
+
"test-helpers"
|
|
59
|
+
]);
|
|
60
|
+
var codeFile = /\.[cm]?[jt]sx?$/;
|
|
61
|
+
var testFile = /(?:\.(?:test|spec)\.[^.]+$|^tsconfig\.)/;
|
|
62
|
+
function captureRuntimeContent(root, source) {
|
|
63
|
+
const hash = createHash("sha256");
|
|
64
|
+
const active = /* @__PURE__ */ new Set();
|
|
65
|
+
const visit = (directory) => {
|
|
66
|
+
const canonical = realpathSync(directory);
|
|
67
|
+
if (active.has(canonical)) throw new RuntimeVersionMismatchError("runtime code contains a symlink cycle");
|
|
68
|
+
active.add(canonical);
|
|
69
|
+
for (const name of readdirSync(directory).sort()) {
|
|
70
|
+
if (name.startsWith(".") || ignoredDirectories.has(name)) continue;
|
|
71
|
+
const path = join(directory, name);
|
|
72
|
+
let stat = lstatSync(path);
|
|
73
|
+
if (stat.isSymbolicLink()) {
|
|
74
|
+
try {
|
|
75
|
+
stat = statSync(path);
|
|
76
|
+
} catch {
|
|
77
|
+
if (codeFile.test(name) || name === "package.json") throw new RuntimeVersionMismatchError("runtime code link is unreadable");
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
if (stat.isDirectory()) visit(path);
|
|
82
|
+
else if (codeFile.test(name) && !testFile.test(name) || name === "package.json") {
|
|
83
|
+
const bytes = readFileSync(path);
|
|
84
|
+
hash.update(JSON.stringify([relative(root, path), bytes.length]));
|
|
85
|
+
hash.update(bytes);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
active.delete(canonical);
|
|
89
|
+
};
|
|
90
|
+
if (source) {
|
|
91
|
+
visit(join(root, "packages"));
|
|
92
|
+
for (const name of ["package.json", "bun.lock", "bun.lockb", "bunfig.toml", "tsconfig.json"]) {
|
|
93
|
+
hash.update(name);
|
|
94
|
+
const path = join(root, name);
|
|
95
|
+
hash.update(existsSync(path) ? readFileSync(path) : "<absent>");
|
|
96
|
+
}
|
|
97
|
+
} else visit(root);
|
|
98
|
+
return hash.digest("hex");
|
|
99
|
+
}
|
|
100
|
+
function createRuntimeContentGuard(root, source) {
|
|
101
|
+
const canonical = realpathSync(root);
|
|
102
|
+
const startupContent = captureRuntimeContent(canonical, source);
|
|
103
|
+
return Object.assign(() => {
|
|
104
|
+
try {
|
|
105
|
+
if (captureRuntimeContent(canonical, source) !== startupContent) {
|
|
106
|
+
throw new RuntimeVersionMismatchError("runtime content changed since host startup");
|
|
107
|
+
}
|
|
108
|
+
} catch (error) {
|
|
109
|
+
if (error instanceof RuntimeVersionMismatchError) throw error;
|
|
110
|
+
throw new RuntimeVersionMismatchError("startup runtime content is no longer readable");
|
|
111
|
+
}
|
|
112
|
+
}, { identity: startupContent });
|
|
113
|
+
}
|
|
114
|
+
function captureHostRuntimeGuard() {
|
|
115
|
+
try {
|
|
116
|
+
const url = import.meta.url;
|
|
117
|
+
if (url.includes("/$bunfs/")) {
|
|
118
|
+
const executable = getHostRuntimeExecutable();
|
|
119
|
+
const digest = createHash("sha256").update(readFileSync(executable)).digest("hex");
|
|
120
|
+
return Object.assign(() => {
|
|
121
|
+
try {
|
|
122
|
+
if (createHash("sha256").update(readFileSync(executable)).digest("hex") !== digest) {
|
|
123
|
+
throw new RuntimeVersionMismatchError("host executable changed since startup");
|
|
124
|
+
}
|
|
125
|
+
} catch (error) {
|
|
126
|
+
if (error instanceof RuntimeVersionMismatchError) throw error;
|
|
127
|
+
throw new RuntimeVersionMismatchError("startup executable is no longer readable");
|
|
128
|
+
}
|
|
129
|
+
}, { identity: digest });
|
|
130
|
+
}
|
|
131
|
+
const modulePath = fileURLToPath(url);
|
|
132
|
+
const source = extname(modulePath) === ".ts";
|
|
133
|
+
return createRuntimeContentGuard(source ? dirname(dirname(dirname(modulePath))) : dirname(modulePath), source);
|
|
134
|
+
} catch {
|
|
135
|
+
return Object.assign(() => {
|
|
136
|
+
throw new RuntimeVersionMismatchError("host startup identity unavailable");
|
|
137
|
+
}, { identity: "unavailable" });
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
var hostExecutable;
|
|
141
|
+
function getHostRuntimeExecutable() {
|
|
142
|
+
return hostExecutable ?? realpathSync(process.execPath);
|
|
143
|
+
}
|
|
144
|
+
var hostGuard;
|
|
145
|
+
var HOST_RUNTIME_CONTENT_IDENTITY = "uninitialized";
|
|
146
|
+
function initializeHostRuntimeIdentity() {
|
|
147
|
+
if (hostGuard) return;
|
|
148
|
+
hostExecutable = realpathSync(process.execPath);
|
|
149
|
+
hostGuard = captureHostRuntimeGuard();
|
|
150
|
+
HOST_RUNTIME_CONTENT_IDENTITY = hostGuard.identity;
|
|
151
|
+
}
|
|
152
|
+
function isAgentRuntimeHostCommand(args, interactive) {
|
|
153
|
+
if (args.some((arg) => ["--help", "-h", "--version", "-v"].includes(arg))) return false;
|
|
154
|
+
if (!args.length) return interactive;
|
|
155
|
+
return args[0] === "chat" || args[0] === "tui" || args[0] === "connect" || args[0] === "agent" && ["run", "continue", "smoke-current"].includes(args[1]);
|
|
156
|
+
}
|
|
157
|
+
function resolveExactRuntimeEntrypoint(path) {
|
|
158
|
+
try {
|
|
159
|
+
if (!existsSync(path)) throw new Error("missing");
|
|
160
|
+
return realpathSync(path);
|
|
161
|
+
} catch {
|
|
162
|
+
throw new RuntimeVersionMismatchError("explicit runtime entrypoint is missing or unreadable");
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// packages/cli/cliEnvHelpers.ts
|
|
167
|
+
import { dirname as dirname2, extname as extname2, join as join2 } from "node:path";
|
|
168
|
+
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
169
|
+
import { existsSync as existsSync2, realpathSync as realpathSync2 } from "node:fs";
|
|
170
|
+
function resolveServerUrlFromEnv(env) {
|
|
171
|
+
return normalizeServerOrigin(
|
|
172
|
+
env.NOLO_SERVER || env.BASE_URL || DEFAULT_NOLO_SERVER_URL
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
function isCliArgs(value) {
|
|
176
|
+
return Array.isArray(value);
|
|
177
|
+
}
|
|
178
|
+
function buildServerCandidates(values) {
|
|
179
|
+
return [...new Set(
|
|
180
|
+
values.filter((value) => typeof value === "string" && value.trim().length > 0).map((value) => normalizeServerOrigin(value))
|
|
181
|
+
)];
|
|
182
|
+
}
|
|
183
|
+
function resolveServerUrl(input, env) {
|
|
184
|
+
if (isCliArgs(input)) {
|
|
185
|
+
const explicit = readOption(input, "--server-url") || readOption(input, "--server");
|
|
186
|
+
return normalizeServerOrigin(explicit) || resolveServerUrlFromEnv(env ?? {});
|
|
187
|
+
}
|
|
188
|
+
return resolveServerUrlFromEnv(input);
|
|
189
|
+
}
|
|
190
|
+
function resolveServerCandidates(input, envOrPreferred, preferred) {
|
|
191
|
+
if (isCliArgs(input)) {
|
|
192
|
+
const env2 = envOrPreferred ?? {};
|
|
193
|
+
const explicitServer = resolveServerUrl(input, env2);
|
|
194
|
+
return buildServerCandidates([
|
|
195
|
+
explicitServer,
|
|
196
|
+
preferred?.trim(),
|
|
197
|
+
env2.NOLO_SERVER,
|
|
198
|
+
env2.BASE_URL,
|
|
199
|
+
env2.NOLO_SERVER_URL,
|
|
200
|
+
DEFAULT_NOLO_SERVER_URL,
|
|
201
|
+
...NOLO_CLUSTER_SERVERS
|
|
202
|
+
]);
|
|
203
|
+
}
|
|
204
|
+
const env = input;
|
|
205
|
+
return buildServerCandidates([
|
|
206
|
+
asOptionalTrimmedString(envOrPreferred),
|
|
207
|
+
env.NOLO_SERVER,
|
|
208
|
+
env.BASE_URL,
|
|
209
|
+
env.NOLO_SERVER_URL,
|
|
210
|
+
DEFAULT_NOLO_SERVER_URL,
|
|
211
|
+
...NOLO_CLUSTER_SERVERS
|
|
212
|
+
]);
|
|
213
|
+
}
|
|
214
|
+
function resolveDeleteServerCandidatesFromEnv(env, ...preferredValues) {
|
|
215
|
+
return buildServerCandidates([
|
|
216
|
+
...preferredValues,
|
|
217
|
+
env.NOLO_SERVER,
|
|
218
|
+
env.BASE_URL,
|
|
219
|
+
env.NOLO_SERVER_URL,
|
|
220
|
+
env.READ_DIALOG_BASE,
|
|
221
|
+
DEFAULT_NOLO_SERVER_URL,
|
|
222
|
+
...NOLO_CLUSTER_SERVERS,
|
|
223
|
+
DEFAULT_LOCAL_API_ORIGIN
|
|
224
|
+
]);
|
|
225
|
+
}
|
|
226
|
+
function resolveDeleteServerCandidates(input, envOrPreferred, preferred) {
|
|
227
|
+
if (isCliArgs(input)) {
|
|
228
|
+
const env2 = envOrPreferred ?? {};
|
|
229
|
+
const explicitServer = resolveServerUrl(input, env2);
|
|
230
|
+
return resolveDeleteServerCandidatesFromEnv(env2, explicitServer, preferred?.trim());
|
|
231
|
+
}
|
|
232
|
+
const env = input;
|
|
233
|
+
return resolveDeleteServerCandidatesFromEnv(
|
|
234
|
+
env,
|
|
235
|
+
asOptionalTrimmedString(envOrPreferred)
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
function resolveAuthTokenFromEnv(env, extraEnvKeys = []) {
|
|
239
|
+
for (const key of ["AUTH_TOKEN", "AUTH", "NOLO_MACHINE_API_KEY", ...extraEnvKeys]) {
|
|
240
|
+
const value = env[key];
|
|
241
|
+
if (typeof value === "string" && value.trim()) return value;
|
|
242
|
+
}
|
|
243
|
+
return "";
|
|
244
|
+
}
|
|
245
|
+
function resolveAuthToken(input, envOrExtraEnvKeys, extraEnvKeys = []) {
|
|
246
|
+
if (isCliArgs(input)) {
|
|
247
|
+
const env = envOrExtraEnvKeys ?? {};
|
|
248
|
+
return readOption(input, "--token") || readOption(input, "--machine-key") || resolveAuthTokenFromEnv(env, extraEnvKeys);
|
|
249
|
+
}
|
|
250
|
+
return resolveAuthTokenFromEnv(input, envOrExtraEnvKeys ?? []);
|
|
251
|
+
}
|
|
252
|
+
function parseUserIdFromAuthToken(token) {
|
|
253
|
+
const parts = token.trim().split(".").filter(Boolean);
|
|
254
|
+
const payloadCandidates = parts.length >= 3 ? [parts[1], parts[0]] : [parts[0]];
|
|
255
|
+
for (const payload of payloadCandidates) {
|
|
256
|
+
if (!payload) continue;
|
|
257
|
+
try {
|
|
258
|
+
const parsed = JSON.parse(Buffer.from(payload, "base64").toString("utf8"));
|
|
259
|
+
if (typeof parsed?.userId === "string") return parsed.userId;
|
|
260
|
+
} catch {
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
return "";
|
|
264
|
+
}
|
|
265
|
+
function readOption(args, flag) {
|
|
266
|
+
const index = args.indexOf(flag);
|
|
267
|
+
return index >= 0 ? args[index + 1] : void 0;
|
|
268
|
+
}
|
|
269
|
+
function isCompiledBinary() {
|
|
270
|
+
try {
|
|
271
|
+
const url = import.meta.url;
|
|
272
|
+
return url.startsWith("file:///$bunfs/root/") || url.startsWith("/$bunfs/root/");
|
|
273
|
+
} catch {
|
|
274
|
+
return false;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
function resolveCliEntrypointPath(fromModuleUrl = import.meta.url) {
|
|
278
|
+
if (isCompiledBinary()) {
|
|
279
|
+
return getHostRuntimeExecutable();
|
|
280
|
+
}
|
|
281
|
+
const modulePath = fileURLToPath2(fromModuleUrl);
|
|
282
|
+
const sourcePath = existsSync2(modulePath) ? realpathSync2(modulePath) : modulePath;
|
|
283
|
+
const ext = extname2(sourcePath) || ".ts";
|
|
284
|
+
return join2(dirname2(sourcePath), `index${ext}`);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
export {
|
|
288
|
+
AGENT_RUN_PROTOCOL,
|
|
289
|
+
RuntimeProtocolMismatchError,
|
|
290
|
+
validateAgentRunProtocol,
|
|
291
|
+
RuntimeVersionMismatchError,
|
|
292
|
+
getHostRuntimeExecutable,
|
|
293
|
+
HOST_RUNTIME_CONTENT_IDENTITY,
|
|
294
|
+
initializeHostRuntimeIdentity,
|
|
295
|
+
isAgentRuntimeHostCommand,
|
|
296
|
+
resolveExactRuntimeEntrypoint,
|
|
297
|
+
resolveServerUrlFromEnv,
|
|
298
|
+
resolveServerUrl,
|
|
299
|
+
resolveServerCandidates,
|
|
300
|
+
resolveDeleteServerCandidates,
|
|
301
|
+
resolveAuthTokenFromEnv,
|
|
302
|
+
resolveAuthToken,
|
|
303
|
+
parseUserIdFromAuthToken,
|
|
304
|
+
readOption,
|
|
305
|
+
isCompiledBinary,
|
|
306
|
+
resolveCliEntrypointPath
|
|
307
|
+
};
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
refreshSubscriptionQuotas
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-P27E22MA.js";
|
|
4
4
|
import {
|
|
5
5
|
getReadableCliDb
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-DLT2DN4M.js";
|
|
7
7
|
import {
|
|
8
8
|
clearCliLocalRuntimePreparedAgentCache
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-KMW5CRRM.js";
|
|
10
10
|
import {
|
|
11
11
|
readCredentialAvailability
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-WWTSEBDF.js";
|
|
13
|
+
import {
|
|
14
|
+
BIGMODEL_PROVIDER_TARGET,
|
|
15
|
+
buildCredentialUseGrant,
|
|
16
|
+
verifyCredentialUseGrant
|
|
17
|
+
} from "./chunk-XFYFMTOM.js";
|
|
13
18
|
import {
|
|
14
19
|
buildCreatedAgentRecord,
|
|
15
20
|
buildUpdatedAgentRecord,
|
|
@@ -20,22 +25,17 @@ import {
|
|
|
20
25
|
resolveAgentRecordFromHybridStore,
|
|
21
26
|
sanitizeAgentRecordForCliOutput,
|
|
22
27
|
writeAgentRecord
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import {
|
|
25
|
-
BIGMODEL_PROVIDER_TARGET,
|
|
26
|
-
buildCredentialUseGrant,
|
|
27
|
-
verifyCredentialUseGrant
|
|
28
|
-
} from "./chunk-XFYFMTOM.js";
|
|
28
|
+
} from "./chunk-J25ESVUW.js";
|
|
29
29
|
import {
|
|
30
30
|
resolveCliAgentKeyInput
|
|
31
31
|
} from "./chunk-BR3GT6MR.js";
|
|
32
|
-
import {
|
|
33
|
-
toErrorMessage
|
|
34
|
-
} from "./chunk-HNMXYYJR.js";
|
|
35
32
|
import {
|
|
36
33
|
parseUserIdFromAuthToken,
|
|
37
34
|
resolveAuthToken
|
|
38
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-BIDSIRTS.js";
|
|
36
|
+
import {
|
|
37
|
+
toErrorMessage
|
|
38
|
+
} from "./chunk-HNMXYYJR.js";
|
|
39
39
|
|
|
40
40
|
// packages/cli/agentRecordCommands.ts
|
|
41
41
|
async function runAgentReadCommand(args, deps = {}) {
|
|
@@ -256,7 +256,7 @@ async function runAgentCreateCommand(args, deps = {}) {
|
|
|
256
256
|
let verifyResult;
|
|
257
257
|
if (parsed.verify) {
|
|
258
258
|
try {
|
|
259
|
-
const { verifyCustomProvider } = await import("./agentProviderCommands-
|
|
259
|
+
const { verifyCustomProvider } = await import("./agentProviderCommands-SS6M6VGY.js");
|
|
260
260
|
const rec = built.nextRecord;
|
|
261
261
|
const verifyCredentialRef = typeof rec.credentialRef === "string" && rec.credentialRef.trim() ? rec.credentialRef.trim() : "";
|
|
262
262
|
if (verifyCredentialRef) {
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import {
|
|
2
|
+
applyMemoryInterpreterMutation
|
|
3
|
+
} from "./chunk-6RSNVJGO.js";
|
|
4
|
+
import {
|
|
5
|
+
getMemoryEvidenceVNextStrict,
|
|
6
|
+
listMemoryStatesForEntityVNext,
|
|
7
|
+
loadMemoryVNextCatalog
|
|
8
|
+
} from "./chunk-324FWHUA.js";
|
|
9
|
+
|
|
10
|
+
// packages/ai/memory/vnext/workContext.ts
|
|
11
|
+
import { createHash } from "crypto";
|
|
12
|
+
var facet = "work-context";
|
|
13
|
+
var statuses = ["active", "paused", "completed", "cancelled"];
|
|
14
|
+
var hash = (v) => createHash("sha256").update(JSON.stringify(v)).digest("hex");
|
|
15
|
+
var isWorkContextState = (state) => state.facet === facet;
|
|
16
|
+
var bounded = (s, max) => typeof s === "string" && s.trim().length > 0 && s.length <= max;
|
|
17
|
+
var list = (x, maxCount, maxLength) => Array.isArray(x) && x.length <= maxCount && x.every((v) => bounded(v, maxLength));
|
|
18
|
+
var object = (x) => !!x && typeof x === "object" && !Array.isArray(x);
|
|
19
|
+
var validScope = (s) => {
|
|
20
|
+
if (!s || !bounded(s.ownerId, 256) || !bounded(s.dialogId, 512) || !(s.spaceId === null || bounded(s.spaceId, 256))) throw new Error("invalid authorized scope");
|
|
21
|
+
};
|
|
22
|
+
function validValue(v) {
|
|
23
|
+
return object(v) && v.version === 1 && Number.isSafeInteger(v.revision) && v.revision > 0 && statuses.includes(v.status) && bounded(v.goal, 4096) && list(v.constraints, 50, 2048) && list(v.openItems, 50, 2048) && (v.nextStep === void 0 || typeof v.nextStep === "string" && v.nextStep.length <= 4096) && list(v.latestSourceRefs, 20, 2048) && v.latestSourceRefs.length > 0 && (v.spaceId === null || bounded(v.spaceId, 256)) && list(v.dialogIds, 100, 512) && v.dialogIds.length > 0;
|
|
24
|
+
}
|
|
25
|
+
function validPatch(p) {
|
|
26
|
+
if (!object(p) || Object.keys(p).some((k) => !["status", "goal", "constraints", "openItems", "nextStep"].includes(k))) throw new Error("invalid patch");
|
|
27
|
+
if (p.status !== void 0 && !statuses.includes(p.status)) throw new Error("invalid status");
|
|
28
|
+
if (p.goal !== void 0 && !bounded(p.goal, 4096)) throw new Error("invalid goal");
|
|
29
|
+
if (p.nextStep !== void 0 && (typeof p.nextStep !== "string" || p.nextStep.length > 4096)) throw new Error("invalid nextStep");
|
|
30
|
+
for (const a of [p.constraints, p.openItems]) if (a !== void 0 && !list(a, 50, 2048)) throw new Error("invalid list");
|
|
31
|
+
}
|
|
32
|
+
async function updateWorkContext(db, scope, input) {
|
|
33
|
+
validScope(scope);
|
|
34
|
+
if (!object(input) || Object.keys(input).some((k) => !["activityId", "expectedRevision", "itemKey", "originRef", "changeId", "sourceRefs", "patch"].includes(k))) throw new Error("invalid input");
|
|
35
|
+
validPatch(input.patch);
|
|
36
|
+
if (!bounded(input.changeId, 256) || !list(input.sourceRefs, 20, 2048) || !input.sourceRefs.length) throw new Error("source and changeId required");
|
|
37
|
+
const creating = input.activityId === void 0;
|
|
38
|
+
if (creating && (!bounded(input.itemKey, 256) || !bounded(input.originRef, 2048) || input.expectedRevision !== void 0)) throw new Error("origin and itemKey required");
|
|
39
|
+
if (!creating && (!bounded(input.activityId, 256) || !Number.isSafeInteger(input.expectedRevision) || input.expectedRevision < 1 || input.itemKey !== void 0 || input.originRef !== void 0)) throw new Error("activityId and revision required");
|
|
40
|
+
const activityId = creating ? `work-${hash([scope.ownerId, scope.spaceId, input.originRef, input.itemKey])}` : input.activityId;
|
|
41
|
+
const evidenceId = `work-change-${hash([activityId, input.changeId])}`;
|
|
42
|
+
const fingerprint = hash([scope.spaceId, scope.dialogId, input]);
|
|
43
|
+
let result;
|
|
44
|
+
await applyMemoryInterpreterMutation(db, scope.ownerId, async () => {
|
|
45
|
+
const states = (await listMemoryStatesForEntityVNext(db, scope.ownerId, activityId)).filter(isWorkContextState);
|
|
46
|
+
const currents = states.filter((s) => !s.retiredAt);
|
|
47
|
+
if (currents.length > 1 || currents[0] && !validValue(currents[0].value)) throw new Error("invalid work context state");
|
|
48
|
+
const current = currents[0];
|
|
49
|
+
const old = current?.value;
|
|
50
|
+
if (old && old.spaceId !== scope.spaceId) {
|
|
51
|
+
result = { activityId, revision: 0, outcome: "conflict" };
|
|
52
|
+
return { action: "no_op", reason: "scope mismatch" };
|
|
53
|
+
}
|
|
54
|
+
const receipt = await getMemoryEvidenceVNextStrict(db, scope.ownerId, evidenceId);
|
|
55
|
+
if (receipt) {
|
|
56
|
+
const matching = states.find((s) => s.evidenceIds.includes(evidenceId));
|
|
57
|
+
const savedValue = matching && validValue(matching.value) ? matching.value : void 0;
|
|
58
|
+
const match = receipt.text === fingerprint && !!savedValue;
|
|
59
|
+
result = { activityId, revision: match ? savedValue.revision : old?.revision ?? 0, outcome: match ? savedValue.revision === 1 ? "created" : "updated" : "conflict" };
|
|
60
|
+
return { action: "no_op", reason: "duplicate change" };
|
|
61
|
+
}
|
|
62
|
+
if (creating && current || !creating && (!old || old.revision !== input.expectedRevision)) {
|
|
63
|
+
result = { activityId, revision: old?.revision ?? 0, outcome: "conflict" };
|
|
64
|
+
return { action: "no_op", reason: "revision conflict" };
|
|
65
|
+
}
|
|
66
|
+
if (!old && !input.patch.goal) throw new Error("goal required");
|
|
67
|
+
const status = input.patch.status ?? old?.status ?? "active";
|
|
68
|
+
const dialogIds = [.../* @__PURE__ */ new Set([...old?.dialogIds ?? [], scope.dialogId])];
|
|
69
|
+
if (dialogIds.length > 100) throw new Error("dialog association limit exceeded");
|
|
70
|
+
const value = { version: 1, revision: (old?.revision ?? 0) + 1, status, goal: input.patch.goal ?? old.goal, constraints: input.patch.constraints ?? old?.constraints ?? [], openItems: input.patch.openItems ?? old?.openItems ?? [], nextStep: input.patch.nextStep ?? old?.nextStep, latestSourceRefs: input.sourceRefs, spaceId: scope.spaceId, dialogIds };
|
|
71
|
+
const unchanged = !!old && JSON.stringify([old.status, old.goal, old.constraints, old.openItems, old.nextStep]) === JSON.stringify([value.status, value.goal, value.constraints, value.openItems, value.nextStep]);
|
|
72
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
73
|
+
result = { activityId, revision: unchanged ? old.revision : value.revision, outcome: unchanged ? "unchanged" : old ? "updated" : "created" };
|
|
74
|
+
if (unchanged) return { action: "no_op", reason: "unchanged" };
|
|
75
|
+
const evidence = { id: evidenceId, ownerId: scope.ownerId, text: fingerprint, sourceRef: input.sourceRefs[0], confidence: 1, createdAt: now };
|
|
76
|
+
return { action: old ? "update" : "create", reason: "work context", entities: old ? [] : [{ id: activityId, ownerId: scope.ownerId, type: "activity", subtype: facet, name: value.goal, createdAt: now, updatedAt: now }], evidence: [evidence], states: [{ id: `work-state-${hash([activityId, value.revision])}`, ownerId: scope.ownerId, entityId: activityId, facet, value, text: value.goal, evidenceIds: [evidenceId], createdAt: now, updatedAt: now }], supersededStateIds: current ? [current.id] : [] };
|
|
77
|
+
});
|
|
78
|
+
return result;
|
|
79
|
+
}
|
|
80
|
+
async function readWorkContexts(db, scope, query = {}) {
|
|
81
|
+
validScope(scope);
|
|
82
|
+
if (!object(query) || Object.keys(query).some((k) => !["activityId", "status", "query", "limit", "discovery"].includes(k))) throw new Error("invalid query");
|
|
83
|
+
const limit = query.limit ?? 20;
|
|
84
|
+
if (typeof limit !== "number" || !Number.isInteger(limit) || limit < 1 || limit > 100) throw new Error("limit must be 1..100");
|
|
85
|
+
if (query.status !== void 0 && query.status !== "all" && !statuses.some((status) => status === query.status)) throw new Error("invalid status");
|
|
86
|
+
if (query.discovery !== void 0 && query.discovery !== "dialog" && query.discovery !== "scope") throw new Error("invalid discovery");
|
|
87
|
+
if (query.activityId !== void 0 && !bounded(query.activityId, 256)) throw new Error("invalid activityId");
|
|
88
|
+
if (query.query !== void 0 && !bounded(query.query, 512)) throw new Error("invalid query text");
|
|
89
|
+
const states = query.activityId ? await listMemoryStatesForEntityVNext(db, scope.ownerId, query.activityId) : (await loadMemoryVNextCatalog(db, scope.ownerId)).states;
|
|
90
|
+
const items = [];
|
|
91
|
+
for (const state of states) {
|
|
92
|
+
if (!isWorkContextState(state) || state.retiredAt) continue;
|
|
93
|
+
if (!validValue(state.value) || !bounded(state.entityId, 256) || !bounded(state.updatedAt, 128)) throw new Error("invalid work context state");
|
|
94
|
+
const value = state.value;
|
|
95
|
+
if (value.spaceId !== scope.spaceId || !query.activityId && query.discovery !== "scope" && !value.dialogIds.includes(scope.dialogId)) continue;
|
|
96
|
+
if (query.status !== "all" && value.status !== (query.status ?? (query.activityId ? value.status : "active"))) continue;
|
|
97
|
+
if (query.query && !JSON.stringify([value.goal, value.constraints, value.openItems, value.nextStep]).toLowerCase().includes(query.query.toLowerCase())) continue;
|
|
98
|
+
items.push({ activityId: state.entityId, value, updatedAt: state.updatedAt });
|
|
99
|
+
}
|
|
100
|
+
items.sort((a, b) => Number(b.value.dialogIds.includes(scope.dialogId)) - Number(a.value.dialogIds.includes(scope.dialogId)) || b.updatedAt.localeCompare(a.updatedAt) || a.activityId.localeCompare(b.activityId));
|
|
101
|
+
return { items: items.slice(0, limit), hasMore: items.length > limit };
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export {
|
|
105
|
+
isWorkContextState,
|
|
106
|
+
updateWorkContext,
|
|
107
|
+
readWorkContexts
|
|
108
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
require_formatISO
|
|
3
3
|
} from "./chunk-UVLYNWIE.js";
|
|
4
|
-
import {
|
|
5
|
-
require_react
|
|
6
|
-
} from "./chunk-5FUN7EG4.js";
|
|
7
4
|
import {
|
|
8
5
|
patch,
|
|
9
6
|
readAndWait
|
|
10
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-6MQWGA5F.js";
|
|
8
|
+
import {
|
|
9
|
+
require_react
|
|
10
|
+
} from "./chunk-RD3QLZQV.js";
|
|
11
11
|
import {
|
|
12
12
|
toErrorMessage
|
|
13
13
|
} from "./chunk-HNMXYYJR.js";
|
|
@@ -335,7 +335,7 @@ async function saveDocState(arg, { dispatch, getState }) {
|
|
|
335
335
|
).unwrap();
|
|
336
336
|
if (dbSpaceId) {
|
|
337
337
|
try {
|
|
338
|
-
const { updateContentTitle } = await import("./contentThunks-
|
|
338
|
+
const { updateContentTitle } = await import("./contentThunks-VF2DCU46.js");
|
|
339
339
|
await dispatch(
|
|
340
340
|
updateContentTitle({
|
|
341
341
|
spaceId: dbSpaceId,
|
|
@@ -378,7 +378,7 @@ async function saveDocState(arg, { dispatch, getState }) {
|
|
|
378
378
|
}
|
|
379
379
|
}
|
|
380
380
|
async function createDocState(args, thunkApi) {
|
|
381
|
-
const { createPageAction } = await import("./createPageAction-
|
|
381
|
+
const { createPageAction } = await import("./createPageAction-74S5RO7U.js");
|
|
382
382
|
return createPageAction(args, thunkApi);
|
|
383
383
|
}
|
|
384
384
|
function subscribe(listener) {
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createSelector
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-247AAJRK.js";
|
|
4
4
|
import {
|
|
5
5
|
getAllServers,
|
|
6
|
-
getIsDesktopApp
|
|
7
|
-
|
|
6
|
+
getIsDesktopApp,
|
|
7
|
+
googleSessionServer,
|
|
8
|
+
scopeGoogleSessionServers
|
|
9
|
+
} from "./chunk-BH7CEVOH.js";
|
|
10
|
+
import {
|
|
11
|
+
selectIdentityToken
|
|
12
|
+
} from "./chunk-PXYBUFDB.js";
|
|
8
13
|
import {
|
|
9
14
|
SERVERS
|
|
10
15
|
} from "./chunk-LCBAMY2M.js";
|
|
@@ -19,20 +24,20 @@ var resolveDesktopSafeServer = (value) => {
|
|
|
19
24
|
};
|
|
20
25
|
var selectSettings = (state) => state.settings;
|
|
21
26
|
var selectCurrentServer = createSelector(
|
|
22
|
-
[selectSettings],
|
|
23
|
-
(settings) => resolveDesktopSafeServer(settings.currentServer)
|
|
27
|
+
[selectSettings, selectIdentityToken],
|
|
28
|
+
(settings, token) => googleSessionServer(token, settings.currentServer) ?? resolveDesktopSafeServer(settings.currentServer)
|
|
24
29
|
);
|
|
25
30
|
var selectSyncServers = createSelector(
|
|
26
|
-
[selectSettings],
|
|
27
|
-
(settings) => (settings.syncServers || []).filter(
|
|
31
|
+
[selectSettings, selectIdentityToken],
|
|
32
|
+
(settings, token) => googleSessionServer(token, settings.currentServer) !== void 0 ? [] : (settings.syncServers || []).filter(
|
|
28
33
|
(server) => !getIsDesktopApp() || !isLocalServerUrl(server)
|
|
29
34
|
)
|
|
30
35
|
);
|
|
31
36
|
var selectRemoteServer = selectCurrentServer;
|
|
32
37
|
var selectRemoteSyncServers = selectSyncServers;
|
|
33
38
|
var selectRemoteServers = createSelector(
|
|
34
|
-
[selectRemoteServer, selectRemoteSyncServers],
|
|
35
|
-
(currentServer, syncServers) => getAllServers(currentServer, syncServers)
|
|
39
|
+
[selectRemoteServer, selectRemoteSyncServers, selectIdentityToken],
|
|
40
|
+
(currentServer, syncServers, token) => scopeGoogleSessionServers(token, currentServer, getAllServers(currentServer, syncServers))
|
|
36
41
|
);
|
|
37
42
|
|
|
38
43
|
export {
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
|
|
5
5
|
// packages/cli/agentCommandSupport.ts
|
|
6
6
|
async function getDefaultCliDb() {
|
|
7
|
-
const { getDefaultCliLocalRuntimeDb } = await import("./localRuntimeDb-
|
|
7
|
+
const { getDefaultCliLocalRuntimeDb } = await import("./localRuntimeDb-5WZ4RJJO.js");
|
|
8
8
|
return getDefaultCliLocalRuntimeDb();
|
|
9
9
|
}
|
|
10
10
|
function createNullCliDb() {
|