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
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
import {
|
|
2
|
+
applyMemoryInterpreterMutation
|
|
3
|
+
} from "./chunk-6RSNVJGO.js";
|
|
4
|
+
import {
|
|
5
|
+
getMemoryEntityVNext,
|
|
6
|
+
getMemoryEvidenceVNextStrict,
|
|
7
|
+
getMemoryStateVNext,
|
|
8
|
+
listMemoryStatesForEntityVNext
|
|
9
|
+
} from "./chunk-324FWHUA.js";
|
|
10
|
+
import {
|
|
11
|
+
normalizeTopicKey
|
|
12
|
+
} from "./chunk-MVOZ22RZ.js";
|
|
13
|
+
import {
|
|
14
|
+
sha256Hex
|
|
15
|
+
} from "./chunk-SR4FE5VD.js";
|
|
16
|
+
|
|
17
|
+
// packages/ai/memory/vnext/rememberExplicit.ts
|
|
18
|
+
async function rememberExplicitVNext(db, item) {
|
|
19
|
+
const ownerId = `${item.ownerType}:${encodeURIComponent(item.ownerId)}`;
|
|
20
|
+
const topicKey = normalizeTopicKey(item.topicKey);
|
|
21
|
+
if (!topicKey) {
|
|
22
|
+
const digest = sha256Hex(
|
|
23
|
+
JSON.stringify([
|
|
24
|
+
ownerId,
|
|
25
|
+
item.subjectType,
|
|
26
|
+
item.subjectId,
|
|
27
|
+
item.kind,
|
|
28
|
+
item.content
|
|
29
|
+
])
|
|
30
|
+
);
|
|
31
|
+
const entityId2 = `explicit-${digest}`;
|
|
32
|
+
const stateId = `explicit-${digest}`;
|
|
33
|
+
let saved2;
|
|
34
|
+
await applyMemoryInterpreterMutation(db, ownerId, async () => {
|
|
35
|
+
const existing = await getMemoryStateVNext(db, ownerId, stateId);
|
|
36
|
+
if (existing?.retiredAt)
|
|
37
|
+
throw new Error("Explicit memory conflicts with a retired state");
|
|
38
|
+
const entity = await getMemoryEntityVNext(db, ownerId, entityId2);
|
|
39
|
+
const createdAt = existing?.createdAt ?? item.createdAt;
|
|
40
|
+
const oldValue = existing?.value && typeof existing.value === "object" ? existing.value : {};
|
|
41
|
+
const confidence = Math.max(
|
|
42
|
+
Number(oldValue.confidence) || 0,
|
|
43
|
+
item.confidence ?? 0
|
|
44
|
+
);
|
|
45
|
+
const resident = oldValue.resident === true || item.resident === true;
|
|
46
|
+
const evidenceId = `explicit-${digest}-${sha256Hex(
|
|
47
|
+
JSON.stringify([
|
|
48
|
+
item.confidence,
|
|
49
|
+
item.sourceDialogId ?? null,
|
|
50
|
+
item.provenance ?? null
|
|
51
|
+
])
|
|
52
|
+
).slice(0, 24)}`;
|
|
53
|
+
const evidence = await getMemoryEvidenceVNextStrict(
|
|
54
|
+
db,
|
|
55
|
+
ownerId,
|
|
56
|
+
evidenceId
|
|
57
|
+
);
|
|
58
|
+
saved2 = {
|
|
59
|
+
...item,
|
|
60
|
+
id: `vnext-state-${stateId}`,
|
|
61
|
+
createdAt,
|
|
62
|
+
confidence,
|
|
63
|
+
...resident ? { resident: true } : {}
|
|
64
|
+
};
|
|
65
|
+
return {
|
|
66
|
+
action: existing ? "update" : "create",
|
|
67
|
+
reason: "Explicit memory save",
|
|
68
|
+
entities: entity ? [] : [
|
|
69
|
+
{
|
|
70
|
+
id: entityId2,
|
|
71
|
+
ownerId,
|
|
72
|
+
type: "concept",
|
|
73
|
+
name: item.content,
|
|
74
|
+
createdAt,
|
|
75
|
+
updatedAt: createdAt
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
evidence: evidence ? [] : [
|
|
79
|
+
{
|
|
80
|
+
id: evidenceId,
|
|
81
|
+
ownerId,
|
|
82
|
+
text: item.content,
|
|
83
|
+
confidence: item.confidence,
|
|
84
|
+
...item.provenance ? { provenance: item.provenance } : {},
|
|
85
|
+
sourceRef: item.sourceDialogId ? `dialog:${item.sourceDialogId}` : `explicit:${digest}`,
|
|
86
|
+
createdAt
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
states: [
|
|
90
|
+
{
|
|
91
|
+
id: stateId,
|
|
92
|
+
ownerId,
|
|
93
|
+
entityId: entityId2,
|
|
94
|
+
facet: "explicit-memory",
|
|
95
|
+
text: item.content,
|
|
96
|
+
value: {
|
|
97
|
+
...oldValue,
|
|
98
|
+
kind: item.kind,
|
|
99
|
+
subjectType: item.subjectType,
|
|
100
|
+
subjectId: item.subjectId,
|
|
101
|
+
confidence,
|
|
102
|
+
resident,
|
|
103
|
+
visibility: item.visibility,
|
|
104
|
+
tags: item.tags,
|
|
105
|
+
importance: item.importance,
|
|
106
|
+
patternKey: item.patternKey,
|
|
107
|
+
recurrenceEvidence: item.recurrenceEvidence,
|
|
108
|
+
provenance: item.provenance,
|
|
109
|
+
sourceKind: item.sourceKind,
|
|
110
|
+
sourceDialogId: item.sourceDialogId
|
|
111
|
+
},
|
|
112
|
+
evidenceIds: [
|
|
113
|
+
.../* @__PURE__ */ new Set([...existing?.evidenceIds ?? [], evidenceId])
|
|
114
|
+
],
|
|
115
|
+
createdAt,
|
|
116
|
+
updatedAt: item.createdAt
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
};
|
|
120
|
+
});
|
|
121
|
+
return saved2;
|
|
122
|
+
}
|
|
123
|
+
const topicDigest = sha256Hex(
|
|
124
|
+
JSON.stringify([
|
|
125
|
+
ownerId,
|
|
126
|
+
item.subjectType,
|
|
127
|
+
item.subjectId,
|
|
128
|
+
item.kind,
|
|
129
|
+
topicKey
|
|
130
|
+
])
|
|
131
|
+
);
|
|
132
|
+
const entityId = `explicit-topic-${topicDigest}`;
|
|
133
|
+
const contentDigest = sha256Hex(
|
|
134
|
+
JSON.stringify([
|
|
135
|
+
ownerId,
|
|
136
|
+
item.subjectType,
|
|
137
|
+
item.subjectId,
|
|
138
|
+
item.kind,
|
|
139
|
+
item.content
|
|
140
|
+
])
|
|
141
|
+
);
|
|
142
|
+
let saved;
|
|
143
|
+
await applyMemoryInterpreterMutation(db, ownerId, async () => {
|
|
144
|
+
const entity = await getMemoryEntityVNext(db, ownerId, entityId);
|
|
145
|
+
const entityStates = (await listMemoryStatesForEntityVNext(db, ownerId, entityId)).filter((state) => state.facet === "explicit-memory");
|
|
146
|
+
const activeStates = entityStates.filter((state) => !state.retiredAt);
|
|
147
|
+
const matchingCurrent = activeStates.find(
|
|
148
|
+
(state) => state.text === item.content
|
|
149
|
+
);
|
|
150
|
+
if (matchingCurrent) {
|
|
151
|
+
const stateId2 = matchingCurrent.id;
|
|
152
|
+
const createdAt2 = matchingCurrent.createdAt;
|
|
153
|
+
const oldValue = matchingCurrent.value && typeof matchingCurrent.value === "object" ? matchingCurrent.value : {};
|
|
154
|
+
const confidence2 = Math.max(
|
|
155
|
+
Number(oldValue.confidence) || 0,
|
|
156
|
+
item.confidence ?? 0
|
|
157
|
+
);
|
|
158
|
+
const resident2 = oldValue.resident === true || item.resident === true;
|
|
159
|
+
const existingSupersedes = Array.isArray(oldValue.supersedesStateIds) ? oldValue.supersedesStateIds.map(String) : void 0;
|
|
160
|
+
const evidenceId2 = `${stateId2}-${sha256Hex(
|
|
161
|
+
JSON.stringify([
|
|
162
|
+
item.confidence,
|
|
163
|
+
item.sourceDialogId ?? null,
|
|
164
|
+
item.provenance ?? null
|
|
165
|
+
])
|
|
166
|
+
).slice(0, 24)}`;
|
|
167
|
+
const evidence2 = await getMemoryEvidenceVNextStrict(
|
|
168
|
+
db,
|
|
169
|
+
ownerId,
|
|
170
|
+
evidenceId2
|
|
171
|
+
);
|
|
172
|
+
saved = {
|
|
173
|
+
...item,
|
|
174
|
+
topicKey,
|
|
175
|
+
...existingSupersedes?.length ? { supersedesStateIds: existingSupersedes } : {},
|
|
176
|
+
id: `vnext-state-${stateId2}`,
|
|
177
|
+
createdAt: createdAt2,
|
|
178
|
+
confidence: confidence2,
|
|
179
|
+
...resident2 ? { resident: true } : {}
|
|
180
|
+
};
|
|
181
|
+
return {
|
|
182
|
+
action: "update",
|
|
183
|
+
reason: "Explicit memory save (topicKey idempotent update)",
|
|
184
|
+
entities: entity ? [] : [
|
|
185
|
+
{
|
|
186
|
+
id: entityId,
|
|
187
|
+
ownerId,
|
|
188
|
+
type: "concept",
|
|
189
|
+
subtype: "explicit-topic",
|
|
190
|
+
name: topicKey,
|
|
191
|
+
createdAt: createdAt2,
|
|
192
|
+
updatedAt: createdAt2
|
|
193
|
+
}
|
|
194
|
+
],
|
|
195
|
+
evidence: evidence2 ? [] : [
|
|
196
|
+
{
|
|
197
|
+
id: evidenceId2,
|
|
198
|
+
ownerId,
|
|
199
|
+
text: item.content,
|
|
200
|
+
confidence: item.confidence,
|
|
201
|
+
...item.provenance ? { provenance: item.provenance } : {},
|
|
202
|
+
sourceRef: item.sourceDialogId ? `dialog:${item.sourceDialogId}` : `explicit:${topicDigest}`,
|
|
203
|
+
createdAt: item.createdAt
|
|
204
|
+
}
|
|
205
|
+
],
|
|
206
|
+
states: [
|
|
207
|
+
{
|
|
208
|
+
id: stateId2,
|
|
209
|
+
ownerId,
|
|
210
|
+
entityId,
|
|
211
|
+
facet: "explicit-memory",
|
|
212
|
+
text: item.content,
|
|
213
|
+
value: {
|
|
214
|
+
...oldValue,
|
|
215
|
+
kind: item.kind,
|
|
216
|
+
subjectType: item.subjectType,
|
|
217
|
+
subjectId: item.subjectId,
|
|
218
|
+
confidence: confidence2,
|
|
219
|
+
resident: resident2,
|
|
220
|
+
visibility: item.visibility,
|
|
221
|
+
tags: item.tags,
|
|
222
|
+
importance: item.importance,
|
|
223
|
+
patternKey: item.patternKey,
|
|
224
|
+
recurrenceEvidence: item.recurrenceEvidence,
|
|
225
|
+
provenance: item.provenance,
|
|
226
|
+
sourceKind: item.sourceKind,
|
|
227
|
+
sourceDialogId: item.sourceDialogId,
|
|
228
|
+
topicKey,
|
|
229
|
+
...existingSupersedes?.length ? { supersedesStateIds: existingSupersedes } : {}
|
|
230
|
+
},
|
|
231
|
+
evidenceIds: [
|
|
232
|
+
.../* @__PURE__ */ new Set([...matchingCurrent.evidenceIds, evidenceId2])
|
|
233
|
+
],
|
|
234
|
+
createdAt: createdAt2,
|
|
235
|
+
updatedAt: item.createdAt
|
|
236
|
+
}
|
|
237
|
+
]
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
const supersededIds = activeStates.map((state) => state.id);
|
|
241
|
+
const isSupersede = supersededIds.length > 0;
|
|
242
|
+
const version = entityStates.length + 1;
|
|
243
|
+
const stateId = `explicit-topic-${topicDigest.slice(0, 24)}-v${version}-${contentDigest.slice(0, 16)}`;
|
|
244
|
+
const createdAt = item.createdAt;
|
|
245
|
+
const confidence = item.confidence ?? 0;
|
|
246
|
+
const resident = item.resident === true;
|
|
247
|
+
const evidenceId = `${stateId}-${sha256Hex(
|
|
248
|
+
JSON.stringify([
|
|
249
|
+
item.confidence,
|
|
250
|
+
item.sourceDialogId ?? null,
|
|
251
|
+
item.provenance ?? null
|
|
252
|
+
])
|
|
253
|
+
).slice(0, 24)}`;
|
|
254
|
+
const evidence = await getMemoryEvidenceVNextStrict(
|
|
255
|
+
db,
|
|
256
|
+
ownerId,
|
|
257
|
+
evidenceId
|
|
258
|
+
);
|
|
259
|
+
const relations = supersededIds.map(
|
|
260
|
+
(oldId, idx) => ({
|
|
261
|
+
id: `rel-supersedes-${stateId}-${idx}`,
|
|
262
|
+
ownerId,
|
|
263
|
+
from: stateId,
|
|
264
|
+
type: "supersedes",
|
|
265
|
+
to: oldId,
|
|
266
|
+
createdAt
|
|
267
|
+
})
|
|
268
|
+
);
|
|
269
|
+
saved = {
|
|
270
|
+
...item,
|
|
271
|
+
topicKey,
|
|
272
|
+
...isSupersede ? { supersedesStateIds: supersededIds } : {},
|
|
273
|
+
id: `vnext-state-${stateId}`,
|
|
274
|
+
createdAt,
|
|
275
|
+
confidence,
|
|
276
|
+
...resident ? { resident: true } : {}
|
|
277
|
+
};
|
|
278
|
+
return {
|
|
279
|
+
action: isSupersede ? "supersede" : "create",
|
|
280
|
+
reason: isSupersede ? "Explicit memory topicKey supersede" : "Explicit memory save (topicKey)",
|
|
281
|
+
entities: entity ? [] : [
|
|
282
|
+
{
|
|
283
|
+
id: entityId,
|
|
284
|
+
ownerId,
|
|
285
|
+
type: "concept",
|
|
286
|
+
subtype: "explicit-topic",
|
|
287
|
+
name: topicKey,
|
|
288
|
+
createdAt,
|
|
289
|
+
updatedAt: createdAt
|
|
290
|
+
}
|
|
291
|
+
],
|
|
292
|
+
evidence: evidence ? [] : [
|
|
293
|
+
{
|
|
294
|
+
id: evidenceId,
|
|
295
|
+
ownerId,
|
|
296
|
+
text: item.content,
|
|
297
|
+
confidence: item.confidence,
|
|
298
|
+
...item.provenance ? { provenance: item.provenance } : {},
|
|
299
|
+
sourceRef: item.sourceDialogId ? `dialog:${item.sourceDialogId}` : `explicit:${topicDigest}`,
|
|
300
|
+
createdAt
|
|
301
|
+
}
|
|
302
|
+
],
|
|
303
|
+
states: [
|
|
304
|
+
{
|
|
305
|
+
id: stateId,
|
|
306
|
+
ownerId,
|
|
307
|
+
entityId,
|
|
308
|
+
facet: "explicit-memory",
|
|
309
|
+
text: item.content,
|
|
310
|
+
value: {
|
|
311
|
+
kind: item.kind,
|
|
312
|
+
subjectType: item.subjectType,
|
|
313
|
+
subjectId: item.subjectId,
|
|
314
|
+
confidence,
|
|
315
|
+
resident,
|
|
316
|
+
visibility: item.visibility,
|
|
317
|
+
tags: item.tags,
|
|
318
|
+
importance: item.importance,
|
|
319
|
+
patternKey: item.patternKey,
|
|
320
|
+
recurrenceEvidence: item.recurrenceEvidence,
|
|
321
|
+
provenance: item.provenance,
|
|
322
|
+
sourceKind: item.sourceKind,
|
|
323
|
+
sourceDialogId: item.sourceDialogId,
|
|
324
|
+
topicKey,
|
|
325
|
+
...isSupersede ? { supersedesStateIds: supersededIds } : {}
|
|
326
|
+
},
|
|
327
|
+
evidenceIds: [evidenceId],
|
|
328
|
+
createdAt,
|
|
329
|
+
updatedAt: item.createdAt
|
|
330
|
+
}
|
|
331
|
+
],
|
|
332
|
+
...isSupersede ? { supersededStateIds: supersededIds, relations } : {}
|
|
333
|
+
};
|
|
334
|
+
});
|
|
335
|
+
return saved;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
export {
|
|
339
|
+
rememberExplicitVNext
|
|
340
|
+
};
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
} from "./chunk-YNIYE47Z.js";
|
|
37
37
|
import {
|
|
38
38
|
getDefaultCliLocalRuntimeDb
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-LELADM5Q.js";
|
|
40
40
|
import {
|
|
41
41
|
createTokenStatsKey
|
|
42
42
|
} from "./chunk-SYTHYBMI.js";
|
|
@@ -11658,7 +11658,7 @@ async function runUsageCommand(args, deps) {
|
|
|
11658
11658
|
const output = deps.output ?? process.stdout;
|
|
11659
11659
|
const errorOutput = deps.errorOutput ?? process.stderr;
|
|
11660
11660
|
if (args[0] === "rebuild") {
|
|
11661
|
-
const { runUsageRebuildCommand } = await import("./usageRebuildCommand-
|
|
11661
|
+
const { runUsageRebuildCommand } = await import("./usageRebuildCommand-DF3HUP6F.js");
|
|
11662
11662
|
return runUsageRebuildCommand(args.slice(1), deps);
|
|
11663
11663
|
}
|
|
11664
11664
|
if (hasFlag(args, "-h") || hasFlag(args, "--help")) {
|
|
@@ -11729,7 +11729,7 @@ async function runUsageCommand(args, deps) {
|
|
|
11729
11729
|
return 0;
|
|
11730
11730
|
}
|
|
11731
11731
|
async function resolveUsageUserId(env) {
|
|
11732
|
-
const { resolveLocalUserId } = await import("./cliAgentConfigHelpers-
|
|
11732
|
+
const { resolveLocalUserId } = await import("./cliAgentConfigHelpers-37ZNEY5Y.js");
|
|
11733
11733
|
return resolveLocalUserId(env);
|
|
11734
11734
|
}
|
|
11735
11735
|
function isLocalDbMissingError(error) {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
markdownToSlate
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VIYVRPMJ.js";
|
|
4
|
+
import {
|
|
5
|
+
buildSkillSummaryMarker
|
|
6
|
+
} from "./chunk-VF4K2QE6.js";
|
|
4
7
|
import {
|
|
5
8
|
createEmptyParagraph,
|
|
6
9
|
splitSlateTitleAndBody
|
|
@@ -8,22 +11,19 @@ import {
|
|
|
8
11
|
import {
|
|
9
12
|
slateToRenderMarkdown
|
|
10
13
|
} from "./chunk-63W5N6P3.js";
|
|
11
|
-
import {
|
|
12
|
-
buildSkillSummaryMarker
|
|
13
|
-
} from "./chunk-VF4K2QE6.js";
|
|
14
14
|
import {
|
|
15
15
|
addContentToSpace,
|
|
16
16
|
resolveCreationSpaceId
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-SQRKAYQW.js";
|
|
18
18
|
import {
|
|
19
19
|
runtime_default
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-ZP26NIZE.js";
|
|
21
21
|
import {
|
|
22
22
|
getCurrentSpaceId
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-RXTZB2DH.js";
|
|
24
24
|
import {
|
|
25
25
|
write
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-PDAXMBLW.js";
|
|
27
27
|
import {
|
|
28
28
|
selectIdentityUserId
|
|
29
29
|
} from "./chunk-PXYBUFDB.js";
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
|
-
MEMORY_USE_GUIDANCE
|
|
2
|
+
MEMORY_USE_GUIDANCE
|
|
3
|
+
} from "./chunk-YGDYYFRX.js";
|
|
4
|
+
import {
|
|
3
5
|
wrapHistoricalSummaryWithReplayGuard
|
|
4
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2SXN7LAY.js";
|
|
5
7
|
|
|
6
8
|
// packages/agent-runtime/skillCatalog.ts
|
|
7
9
|
var SKILL_CATALOG_PRIORITY = Object.freeze([
|
|
@@ -190,79 +192,8 @@ function resolveSkillCatalogSync(sources, query = {}, budget = DEFAULT_SKILL_CAT
|
|
|
190
192
|
}
|
|
191
193
|
|
|
192
194
|
// packages/agent-runtime/turnContext.ts
|
|
193
|
-
var DEFAULT_RECENT_CONTENT_LIMIT = 10;
|
|
194
195
|
var asTrimmed = (value) => typeof value === "string" ? value.trim() : "";
|
|
195
|
-
var asFiniteNumber = (value) => typeof value === "number" && Number.isFinite(value) ? value : 0;
|
|
196
|
-
var spaceRecordKey = (spaceId) => spaceId.startsWith("space-") ? spaceId : `space-${spaceId}`;
|
|
197
196
|
var makeLayer = (id, content, cacheScope = "turn") => ({ id, owner: "runtime", cacheScope, content });
|
|
198
|
-
var renderSpaceStructure = (spaceRecord, recentLimit) => {
|
|
199
|
-
const categories = spaceRecord.categories ?? {};
|
|
200
|
-
const validCategories = Object.entries(categories).filter((entry) => entry[1] !== null).sort(
|
|
201
|
-
(a, b) => asFiniteNumber(a[1].order) - asFiniteNumber(b[1].order)
|
|
202
|
-
);
|
|
203
|
-
const categoryNameById = /* @__PURE__ */ new Map();
|
|
204
|
-
let struct = "Directory Structure (Categories):\n";
|
|
205
|
-
if (validCategories.length === 0) struct += "(No categories defined)\n";
|
|
206
|
-
validCategories.forEach(([id, category]) => {
|
|
207
|
-
const name = asTrimmed(category.name) || id;
|
|
208
|
-
categoryNameById.set(id, name);
|
|
209
|
-
struct += `- ${name} (ID: ${id})
|
|
210
|
-
`;
|
|
211
|
-
});
|
|
212
|
-
const contents = spaceRecord.contents ?? {};
|
|
213
|
-
const recentContents = recentLimit > 0 ? Object.values(contents).filter((content) => content !== null).sort(
|
|
214
|
-
(a, b) => asFiniteNumber(b.updatedAt) - asFiniteNumber(a.updatedAt)
|
|
215
|
-
).slice(0, recentLimit) : [];
|
|
216
|
-
if (recentContents.length > 0) {
|
|
217
|
-
struct += `
|
|
218
|
-
Recent Contents (Top ${recentLimit}):
|
|
219
|
-
`;
|
|
220
|
-
recentContents.forEach((content) => {
|
|
221
|
-
const categoryId = asTrimmed(content.categoryId);
|
|
222
|
-
const categoryName = categoryId ? categoryNameById.get(categoryId) || "Unknown" : "Uncategorized";
|
|
223
|
-
struct += `- [${asTrimmed(content.type) || "content"}] ${asTrimmed(content.title)} (Category: ${categoryName}, dbKey: ${asTrimmed(content.contentKey)})
|
|
224
|
-
`;
|
|
225
|
-
});
|
|
226
|
-
}
|
|
227
|
-
return struct;
|
|
228
|
-
};
|
|
229
|
-
var buildSpaceContextLayer = async (args) => {
|
|
230
|
-
const spaceId = asTrimmed(args.spaceId);
|
|
231
|
-
if (!spaceId) return null;
|
|
232
|
-
const recentLimit = args.recentContentLimit ?? DEFAULT_RECENT_CONTENT_LIMIT;
|
|
233
|
-
let spaceRecord = null;
|
|
234
|
-
let readError = null;
|
|
235
|
-
try {
|
|
236
|
-
spaceRecord = await args.source.readRecord(spaceRecordKey(spaceId));
|
|
237
|
-
} catch (error) {
|
|
238
|
-
readError = error instanceof Error ? error.message : String(error);
|
|
239
|
-
}
|
|
240
|
-
if (!spaceRecord) {
|
|
241
|
-
return makeLayer(
|
|
242
|
-
"space-context",
|
|
243
|
-
[
|
|
244
|
-
"--- \u5F53\u524D\u7A7A\u95F4\uFF08Space\uFF09---",
|
|
245
|
-
`\u672C\u5BF9\u8BDD\u8BB0\u5F55\u58F0\u660E\u5C5E\u4E8E Space ${spaceId}\uFF0C\u4F46\u5F53\u524D\u65E0\u6CD5\u8BFB\u53D6\u8BE5 Space \u7684\u6570\u636E${readError ? `\uFF08${readError}\uFF09` : "\uFF08\u8BB0\u5F55\u4E0D\u5B58\u5728\u6216\u4E0D\u53EF\u8FBE\uFF09"}\u3002`,
|
|
246
|
-
"\u5982\u88AB\u95EE\u53CA\uFF0C\u8BF7\u5982\u5B9E\u8BF4\u660E\u300C\u5BF9\u8BDD\u5C5E\u4E8E\u8BE5 Space \u4F46\u6682\u65F6\u8BFB\u4E0D\u5230\u7A7A\u95F4\u8BE6\u60C5\u300D\uFF0C\u4E0D\u8981\u58F0\u79F0\u5BF9\u8BDD\u4E0D\u5C5E\u4E8E\u4EFB\u4F55\u7A7A\u95F4\u3002"
|
|
247
|
-
].join("\n")
|
|
248
|
-
);
|
|
249
|
-
}
|
|
250
|
-
const name = asTrimmed(spaceRecord.name);
|
|
251
|
-
const description = asTrimmed(spaceRecord.description);
|
|
252
|
-
const structure = renderSpaceStructure(spaceRecord, recentLimit);
|
|
253
|
-
return makeLayer(
|
|
254
|
-
"space-context",
|
|
255
|
-
[
|
|
256
|
-
"--- \u5F53\u524D\u7A7A\u95F4\uFF08Space\uFF09---",
|
|
257
|
-
"\u672C\u5BF9\u8BDD\u5C5E\u4E8E\u4EE5\u4E0B Space\uFF1A",
|
|
258
|
-
`Space Title: ${name || spaceId}`,
|
|
259
|
-
`Space ID: ${spaceId}`,
|
|
260
|
-
`Description: ${description || "N/A"}`,
|
|
261
|
-
"",
|
|
262
|
-
structure.trimEnd()
|
|
263
|
-
].join("\n")
|
|
264
|
-
);
|
|
265
|
-
};
|
|
266
197
|
var buildSkillDiscoveryCatalogLayer = (catalog) => {
|
|
267
198
|
if (catalog.entries.length === 0) return null;
|
|
268
199
|
const sources = catalog.entries.map((entry) => entry.source).filter((source, index, all) => all.indexOf(source) === index);
|
|
@@ -311,37 +242,6 @@ var buildAgentsMdLayer = (content, fileName = "AGENTS.md") => {
|
|
|
311
242
|
"session"
|
|
312
243
|
);
|
|
313
244
|
};
|
|
314
|
-
var buildLinkedSpacesSection = async (args) => {
|
|
315
|
-
const ids = (args.linkedSpaceIds ?? []).filter(
|
|
316
|
-
(id) => typeof id === "string" && id.trim() !== ""
|
|
317
|
-
);
|
|
318
|
-
if (ids.length === 0) return null;
|
|
319
|
-
const lines = [];
|
|
320
|
-
for (const rawId of ids) {
|
|
321
|
-
const spaceId = asTrimmed(rawId);
|
|
322
|
-
let spaceData = null;
|
|
323
|
-
try {
|
|
324
|
-
spaceData = await args.source.readRecord(spaceRecordKey(spaceId));
|
|
325
|
-
} catch {
|
|
326
|
-
spaceData = null;
|
|
327
|
-
}
|
|
328
|
-
if (spaceData) {
|
|
329
|
-
const name = asTrimmed(spaceData.name) || spaceId;
|
|
330
|
-
const desc = asTrimmed(spaceData.description);
|
|
331
|
-
lines.push(`- ${name} (ID: ${spaceId})${desc ? `: ${desc}` : ""}`);
|
|
332
|
-
} else {
|
|
333
|
-
lines.push(`- [\u65E0\u6CD5\u8BBF\u95EE] ${spaceId}`);
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
if (lines.length === 0) return null;
|
|
337
|
-
return [
|
|
338
|
-
"--- \u5173\u8054\u7A7A\u95F4 (Linked Spaces) ---",
|
|
339
|
-
"\u4EE5\u4E0B\u662F Agent \u53EF\u8BBF\u95EE\u7684\u5176\u4ED6\u5DE5\u4F5C\u7A7A\u95F4\uFF08\u7C97\u7565\u4E0A\u4E0B\u6587\uFF09\uFF1A",
|
|
340
|
-
lines.join("\n"),
|
|
341
|
-
"",
|
|
342
|
-
"\u63D0\u793A\uFF1A\u5982\u9700\u67E5\u8BE2\u8FD9\u4E9B\u7A7A\u95F4\u7684\u8BE6\u7EC6\u5185\u5BB9\uFF0C\u53EF\u4F7F\u7528 read \u5DE5\u5177\u914D\u5408\u5BF9\u5E94\u7684 dbKey\u3002"
|
|
343
|
-
].join("\n");
|
|
344
|
-
};
|
|
345
245
|
var renderTurnContextBlocksWithScope = (layers) => layers.filter((layer) => Boolean(layer?.content?.trim())).map((layer) => ({
|
|
346
246
|
content: layer.content.trim(),
|
|
347
247
|
cacheScope: layer.cacheScope
|
|
@@ -358,6 +258,9 @@ var buildDialogSummaryLayer = (args) => {
|
|
|
358
258
|
return makeLayer("dialog-summary", `--- \u5386\u53F2\u5BF9\u8BDD\u6458\u8981 ---
|
|
359
259
|
${historical}`);
|
|
360
260
|
};
|
|
261
|
+
var hasMemoryTools = (toolNames) => Array.isArray(toolNames) ? toolNames.some(
|
|
262
|
+
(name) => typeof name === "string" && /memory/i.test(name)
|
|
263
|
+
) : false;
|
|
361
264
|
var buildMemoryOverlayLayer = (args) => {
|
|
362
265
|
const promptBlock = asTrimmed(args.promptBlock);
|
|
363
266
|
if (!promptBlock) return null;
|
|
@@ -365,7 +268,7 @@ var buildMemoryOverlayLayer = (args) => {
|
|
|
365
268
|
};
|
|
366
269
|
var buildMemoryUseGuidanceLayer = (args) => {
|
|
367
270
|
const promptBlock = asTrimmed(args.promptBlock);
|
|
368
|
-
if (!promptBlock) return null;
|
|
271
|
+
if (!promptBlock && args.hasMemoryTools !== true) return null;
|
|
369
272
|
return makeLayer(
|
|
370
273
|
"memory-use-guidance",
|
|
371
274
|
MEMORY_USE_GUIDANCE,
|
|
@@ -379,14 +282,13 @@ export {
|
|
|
379
282
|
mapDiscoveredSkillsToCatalogEntries,
|
|
380
283
|
resolveSkillCatalog,
|
|
381
284
|
resolveSkillCatalogSync,
|
|
382
|
-
buildSpaceContextLayer,
|
|
383
285
|
buildSkillDiscoveryCatalogLayer,
|
|
384
286
|
buildAgentsMdLayerHeader,
|
|
385
287
|
buildAgentsMdLayer,
|
|
386
|
-
buildLinkedSpacesSection,
|
|
387
288
|
renderTurnContextBlocksWithScope,
|
|
388
289
|
partitionScopedBlocks,
|
|
389
290
|
buildDialogSummaryLayer,
|
|
291
|
+
hasMemoryTools,
|
|
390
292
|
buildMemoryOverlayLayer,
|
|
391
293
|
buildMemoryUseGuidanceLayer
|
|
392
294
|
};
|
|
@@ -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-KZAT2M2V.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,
|