nolo-cli 0.228.0-alpha.2 → 0.228.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-VYCHHZVT.js → _executeModel-AKCTHGMP.js} +89 -83
- package/{accountResolver-QETKNC7T.js → accountResolver-NGICIMEE.js} +1 -1
- package/{action-GDZDXPMB.js → action-C6IQAKN4.js} +8 -5
- package/{addContentAction-7RO4AMRI.js → addContentAction-53364YDW.js} +13 -12
- package/{addDialogAgentAction-EVYBGTXB.js → addDialogAgentAction-U5DD5EN5.js} +16 -15
- package/{agentDeleteCommand-QWQKT54A.js → agentDeleteCommand-2E5FAGUO.js} +128 -115
- package/{agentEmailCommands-EISMBIRE.js → agentEmailCommands-UGZZAH7E.js} +128 -111
- package/{agentListCommands-4WLG32IW.js → agentListCommands-JCTW3J2K.js} +398 -179
- package/{agentMachineCommands-DC6NKWTU.js → agentMachineCommands-QPG5ZXF4.js} +58 -47
- package/{agentProviderCommands-STI3DQ6A.js → agentProviderCommands-QLTABYR7.js} +2 -2
- package/{agentPullCommand-KHV4EELF.js → agentPullCommand-2EYJ5ENC.js} +1 -1
- package/agentRecordCommands-4NTVR6MZ.js +194 -0
- package/agentRunCommand-VHF34PYC.js +232 -0
- package/{agentRunControl-MBG4U6SL.js → agentRunControl-QYTXUQGY.js} +14 -9
- package/{agentRuntimeLocal-HOXKWCYO.js → agentRuntimeLocal-U54AKHXH.js} +58 -43
- package/{agentSlice-UG76KEBH.js → agentSlice-4JGDEXWK.js} +14 -13
- package/{appDeleteCommands-WWCC6WA5.js → appDeleteCommands-XBE5QJ6P.js} +58 -47
- package/{appDeployCommands-AU4IUN33.js → appDeployCommands-QIYLXXGA.js} +58 -47
- package/{appDeployStatusCommands-STUW7WXL.js → appDeployStatusCommands-JXS6ZQZZ.js} +58 -47
- package/{appGetCommands-BGTLIQ4K.js → appGetCommands-SZS7SJPK.js} +58 -47
- package/{appListCommands-CUCPRUXW.js → appListCommands-B3GBJSNV.js} +58 -47
- package/{authCommand-OZ2KTP4Z.js → authCommand-V6EOMZX6.js} +25 -19
- package/{authCommands-55OGQGCR.js → authCommands-T5FODCEG.js} +12 -6
- package/{builtinSkillRegistry-BAE2LDXF.js → builtinSkillRegistry-ZQC3IIO2.js} +8 -7
- package/{chromeCommands-G5UDKVSV.js → chromeCommands-O4IIKTBD.js} +384 -7
- package/{chromeOpsCommands-WAA45NCS.js → chromeOpsCommands-OFX7ZGKP.js} +3 -3
- package/{chunk-DBUR22G5.js → chunk-223KZUJ6.js} +19 -15
- package/{chunk-3U44JB3O.js → chunk-2C5VN7NH.js} +1 -1
- package/{chunk-PWTNI4N7.js → chunk-2E4BYAUE.js} +22 -0
- package/{chunk-L32W3PRP.js → chunk-2FZVXOFX.js} +234 -18
- package/{chunk-HBRDSQ3M.js → chunk-2JHGUL5K.js} +3 -2
- package/chunk-2SXN7LAY.js +15 -0
- package/chunk-3A5NNQCN.js +64 -0
- package/chunk-3F2FRLIO.js +372 -0
- package/{chunk-DEA37IUY.js → chunk-46FETNLF.js} +2 -2
- package/{chunk-ZEVQHCLM.js → chunk-4GYVS4PM.js} +8 -6
- package/{chunk-CBUZ6DKA.js → chunk-4YPH5KRA.js} +1 -1
- package/chunk-4ZCTKB27.js +31 -0
- package/chunk-53W5BXLN.js +340 -0
- package/{chunk-7FEP5USX.js → chunk-5AYP5QBB.js} +5 -5
- package/{chunk-XAG3FWBE.js → chunk-5ISNPTQH.js} +5 -5
- package/{chunk-EVGU5P4U.js → chunk-5P3PPQVP.js} +1 -1
- package/{chunk-XSW4EXQV.js → chunk-6BMTKYAO.js} +55 -18
- package/chunk-6PAHSSD2.js +33401 -0
- package/{chunk-ZOHO6MOF.js → chunk-6RSNVJGO.js} +2 -99
- package/{chunk-7JGMNKKG.js → chunk-6SOWMEAY.js} +30 -9
- package/{chunk-RG2DGNL6.js → chunk-6VEO7Z3Y.js} +3 -3
- package/{chunk-PDCV7P5W.js → chunk-6XIE5ZGI.js} +1 -1
- package/{chunk-DGYCDA6W.js → chunk-7BIJFGKS.js} +36 -17
- package/{chunk-WFDNADFX.js → chunk-7OVOZRZF.js} +8 -8
- package/{chunk-WCFFRBL5.js → chunk-7PON4LBY.js} +45 -27
- package/{chunk-QRGDJA4B.js → chunk-7WHCIA5V.js} +33 -7
- package/{chunk-CMMI3DAT.js → chunk-ADYWV732.js} +59 -30
- package/{chunk-QYB23WUH.js → chunk-AIFQKNPP.js} +1 -1
- package/{chunk-HGDKT2D6.js → chunk-BPB3T5EU.js} +174 -1
- package/{chunk-DUUDXSLX.js → chunk-BZLGPM5B.js} +28 -4
- package/{chunk-ATEKLSLR.js → chunk-BZMDWGQQ.js} +14 -9
- package/chunk-C5A54QS7.js +108 -0
- package/{chunk-S6K5F3KP.js → chunk-CEKRIR22.js} +1 -1
- package/{chunk-42OKN2LI.js → chunk-D634SL2Y.js} +9 -107
- package/{chunk-DLXMMTGM.js → chunk-DHRPLRIR.js} +1283 -786
- package/{chunk-LKA64WH4.js → chunk-DMPZMYH4.js} +37 -1
- package/{chunk-OBIC6EG7.js → chunk-DNNPARJK.js} +9 -5
- package/{chunk-X3E6EHJW.js → chunk-E3LSO6EI.js} +292 -207
- package/{chunk-OQHIVPG4.js → chunk-E6A5NHDH.js} +4 -1
- package/chunk-EHFBP6IK.js +791 -0
- package/chunk-EJQE5HB7.js +21 -0
- package/{chunk-VQ5N5GSV.js → chunk-EL5NRJHI.js} +4 -4
- package/chunk-EUGTFFO6.js +42 -0
- package/{chunk-7BCG67EI.js → chunk-EVHTYVD2.js} +1199 -442
- package/{chunk-6XRPBZRS.js → chunk-EYLGAEB4.js} +0 -134
- package/{chunk-262R3XNN.js → chunk-FEIVARWR.js} +377 -112
- package/{chunk-3VZLEKV2.js → chunk-FLBJ7IJI.js} +14 -14
- package/{chunk-EEOOBRA7.js → chunk-FXEPZKNJ.js} +13 -6
- package/{chunk-XTJKU3Z4.js → chunk-FYAMUU55.js} +677 -140
- package/{chunk-M3OZRQNH.js → chunk-FZANZZ63.js} +1 -1
- package/chunk-GAHJLSDO.js +107 -0
- package/{chunk-WWTSEBDF.js → chunk-GIXWVN2W.js} +1 -1
- package/{chunk-4N6G2CKP.js → chunk-HDKMVYNJ.js} +47 -1
- package/chunk-HEVRQGGH.js +106 -0
- package/{chunk-BIWI5M4E.js → chunk-HFHJPHFK.js} +1 -1
- package/{chunk-R6Z5S5GA.js → chunk-HPDLPEUG.js} +60 -17
- package/{chunk-YKY4OVOX.js → chunk-HQUGB2HM.js} +17 -170
- package/chunk-IIRJ4P4I.js +24 -0
- package/chunk-IVK2KT3H.js +209 -0
- package/{chunk-ALAES342.js → chunk-IYLUK67R.js} +9 -5
- package/{chunk-N5Z2V73W.js → chunk-J55F3IEZ.js} +1 -1
- package/{chunk-S6FDXXZV.js → chunk-J7JRCOIW.js} +2 -2
- package/{chunk-OWKNSIXL.js → chunk-JAKRY74O.js} +470 -83
- package/{chunk-VS276URX.js → chunk-JCQ3WCQ3.js} +4 -2
- package/chunk-JLZJL3WC.js +988 -0
- package/{chunk-OBSEKCVK.js → chunk-JPXACKSW.js} +219 -52
- package/{chunk-OTKSESZR.js → chunk-KDBDOXOM.js} +138 -54
- package/{chunk-VP3BINY7.js → chunk-KDDHQMSH.js} +31 -1
- package/{chunk-RBPUNSG5.js → chunk-KG27JIG4.js} +18 -108
- package/{chunk-4WVJLODK.js → chunk-KHYSFS3W.js} +88 -7
- package/{chunk-TCZ2VJZQ.js → chunk-KKIQAVDR.js} +9 -9
- package/{chunk-4JVNURX4.js → chunk-KQHEGELM.js} +68 -16
- package/chunk-KXOPLLFP.js +190 -0
- package/{chunk-HS7MLR74.js → chunk-KZ4A7EIV.js} +3 -5
- package/{chunk-HYLRQDEE.js → chunk-LLUBUHNT.js} +6 -6
- package/{chunk-QJTZ76CP.js → chunk-LS5KAVFQ.js} +1 -0
- package/{chunk-RTHFJZ6M.js → chunk-LVZVSLKO.js} +29 -9
- package/{chunk-TI2EPRHE.js → chunk-MNFUKRRU.js} +3 -3
- package/chunk-MVOZ22RZ.js +26 -0
- package/{chunk-CNMY2XM6.js → chunk-O3A2CHAL.js} +6 -6
- package/{chunk-TSPMLCWI.js → chunk-OB4FBZXJ.js} +5 -5
- package/{chunk-LYD6C7OU.js → chunk-OJSJJKHF.js} +6 -6
- package/{chunk-M4SFKP5L.js → chunk-OKAXQFON.js} +3 -3
- package/{chunk-CD3RU7XL.js → chunk-OKH74FML.js} +121 -14
- package/{chunk-U2HBB7RS.js → chunk-OOV5JN25.js} +130 -30
- package/{chunk-ZH3KXFHS.js → chunk-OOVOAG4Q.js} +1 -1
- package/chunk-OQFOE4SJ.js +405 -0
- package/{chunk-M3JEW6N6.js → chunk-OYUMJMC5.js} +15 -0
- package/chunk-P27E22MA.js +203 -0
- package/{chunk-SRCCSTIM.js → chunk-P4R5KXU7.js} +4 -4
- package/{chunk-FJ23FZXF.js → chunk-PHREU2KZ.js} +5 -3
- package/{chunk-HSSBDZLD.js → chunk-PIVTQRX6.js} +43 -13
- package/{chunk-XFXFPUO7.js → chunk-PJL7OJRC.js} +13 -39
- package/{chunk-RRDRQOEC.js → chunk-PNLDLUMO.js} +276 -303
- package/{chunk-4I2MXV5Q.js → chunk-PVFYPUIM.js} +2 -0
- package/{chunk-HHFGE2WF.js → chunk-QGFLVQ6E.js} +5 -5
- package/{chunk-EGHP7KOY.js → chunk-QONAOHVW.js} +38 -29
- package/chunk-R3FZHW4Q.js +103 -0
- package/{chunk-ZYKJBRZ3.js → chunk-R3MV2GII.js} +1 -47
- package/chunk-R72QWIFO.js +50 -0
- package/{chunk-5FUN7EG4.js → chunk-RD3QLZQV.js} +83 -47
- package/{chunk-ILHQ2AXT.js → chunk-RIWKZT7E.js} +36 -8
- package/{chunk-OOJNQK6V.js → chunk-S25VJYXV.js} +8 -2
- package/{chunk-45CAVC35.js → chunk-S7H4KTMB.js} +2568 -337
- package/{chunk-OJ45MEEI.js → chunk-SA356NGW.js} +1 -1
- package/{chunk-F6Z6ZCUV.js → chunk-SCAC3NM5.js} +3 -3
- package/{chunk-YVFH2MFB.js → chunk-SLUN7W6S.js} +7 -7
- package/chunk-SQL7YNED.js +650 -0
- package/chunk-SR4FE5VD.js +9 -0
- package/{chunk-HF7BLF3F.js → chunk-SSOR2EDT.js} +107 -104
- package/chunk-TRRXYFTR.js +46 -0
- package/{chunk-3QIYD3VM.js → chunk-TUOHSUK5.js} +20068 -18402
- package/chunk-TYJCIA2O.js +835 -0
- package/{chunk-S2NTVGA2.js → chunk-U35UUM5K.js} +2 -1
- package/{chunk-GAYNXB6T.js → chunk-U3BUWDUP.js} +1031 -2155
- package/{chunk-BP5ZJ6B4.js → chunk-U6QNVOR5.js} +1 -1
- package/{chunk-UAIHKQIA.js → chunk-U6RD332P.js} +18 -2
- package/chunk-UAF5VQCE.js +77 -0
- package/{chunk-TQEKUOTI.js → chunk-UFGUJ2IH.js} +12 -12
- package/{chunk-VMJVAJ6W.js → chunk-UP7KBWLE.js} +109 -33
- package/{chunk-2X7WFDT6.js → chunk-UUCYUN6Y.js} +1 -1
- package/{chunk-5YMA6DDZ.js → chunk-UZKBVQUX.js} +1 -1
- package/chunk-V5TI7HJH.js +133 -0
- package/{chunk-WFGNWWJI.js → chunk-VH7UO6E5.js} +252 -114
- package/{chunk-MNEZUL5S.js → chunk-VJFDG3ZG.js} +63 -94
- package/{chunk-G7IUT2V3.js → chunk-WC3J5SL2.js} +635 -350
- package/{chunk-HXB4VDGK.js → chunk-WD5547ZF.js} +33 -30
- package/chunk-WDWZPASX.js +29 -0
- package/{chunk-4ZGPHFLE.js → chunk-WS36XPJD.js} +2 -2
- package/{chunk-6QHKRARD.js → chunk-WSLL7VV4.js} +29 -5
- package/chunk-XRGBJHZX.js +136 -0
- package/{chunk-MZG5CETE.js → chunk-Y2KWJTOZ.js} +4 -4
- package/{dialogUsageCommand-W2WCSGKF.js → chunk-Y2TCTNUD.js} +27 -20
- package/chunk-YJPK35HB.js +175 -0
- package/{chunk-6OVNSQHN.js → chunk-YLAHYLDQ.js} +5 -0
- package/{chunk-547ENH5T.js → chunk-YN23INFZ.js} +4 -4
- package/{chunk-4QYJPWHH.js → chunk-YXK3GJF5.js} +232 -10
- package/{chunk-MJI3UAXN.js → chunk-Z2OWAYMI.js} +77 -51
- package/{chunk-7Z6EW7AH.js → chunk-ZTHAJU3O.js} +106 -14
- package/{chunk-YFLVRVYK.js → chunk-ZYPXOQS2.js} +1 -1
- package/{cliAgentConfigHelpers-BTRHMPW2.js → cliAgentConfigHelpers-BXHQ3PXP.js} +9 -9
- package/{cliAuthorityBrokerClient-XHH7MH2P.js → cliAuthorityBrokerClient-TFNXJLXL.js} +1 -1
- package/cliAuthorityBrokerProcess-5ZFBTHLB.js +22 -0
- package/cliLocalAgentRecordReader-47PXMHPH.js +104 -0
- package/{commandRegistry-FVYPE2IN.js → commandRegistry-CTMPAQH2.js} +111 -162
- package/{contentThunks-GNFPG32S.js → contentThunks-CAHIIZO5.js} +38 -36
- package/{cooldownCommands-YB5H5BBK.js → cooldownCommands-WDOI5VD7.js} +3 -3
- package/{createAgentAutomationAction-PB4QIFQ4.js → createAgentAutomationAction-M25XZSPD.js} +38 -36
- package/{createDialogAction-EVTOPY7A.js → createDialogAction-4SN7FKI7.js} +39 -37
- package/{createPageAction-2UYF2IDZ.js → createPageAction-N7QPDN3M.js} +43 -41
- package/{db-M7FU2GNK.js → db-VR74ADGC.js} +7 -2
- package/{dbSlice-XRUZOGSU.js → dbSlice-RWPSVHBC.js} +12 -11
- package/{deleteFile-6URDHYRB.js → deleteFile-ECU6FU5C.js} +15 -7
- package/{dialogCommands-6SZD4TYP.js → dialogCommands-BBHWCKDP.js} +69 -53
- package/dialogMessageRecord-OAV77LT7.js +7 -0
- package/{dialogNotifyCommand-SHGPCU22.js → dialogNotifyCommand-IASQGEMW.js} +11 -11
- package/{dialogSlice-5EQ2A6LY.js → dialogSlice-JI3J22RV.js} +39 -37
- package/dialogTraceCommand-EW2KK6A4.js +961 -0
- package/dialogUsageCommand-WJ3U6KZU.js +27 -0
- package/{docCreateCommands-25E6PGN3.js → docCreateCommands-QSX3X5U4.js} +57 -46
- package/{docDeleteCommands-F7ZVGEHW.js → docDeleteCommands-63JBG2HQ.js} +59 -48
- package/{docReadCommands-JY2E5XEN.js → docReadCommands-CQFKRQUI.js} +57 -46
- package/{docStore-OKKIKLT3.js → docStore-XLBKGGNM.js} +14 -13
- package/{docUpdateCommands-OZ4CUSIQ.js → docUpdateCommands-534LUK25.js} +57 -46
- package/ebookDownloaderAgentCommand-DYSKF5ZY.js +677 -0
- package/fetchMessages-TQEUZD7H.js +1 -1
- package/{getPricing-LF5C4XSI.js → getPricing-5BLZRPTM.js} +4 -4
- package/{handleSendMessageAction-LNT7SZND.js → handleSendMessageAction-Q2VMEVOR.js} +127 -81
- package/{hostCredentialCreate-XUU2CSHI.js → hostCredentialCreate-C57T7YPE.js} +127 -109
- package/index.js +23 -11
- package/{localDialogRead-CCOCVGAP.js → localDialogRead-BJJT3TF5.js} +1 -1
- package/{localRuntimeAdapter-IBSTMSX7.js → localRuntimeAdapter-OALZPFZU.js} +134 -115
- package/localRuntimeAuthority-UF2DAQ3F.js +28 -0
- package/{localRuntimeDb-N7KHDXS2.js → localRuntimeDb-ZJFGNHML.js} +1 -1
- package/{machineCommands-HSQHDHOT.js → machineCommands-N6IVWRZT.js} +262 -325
- package/machineWsRunDispatch-PDWYB33B.js +209 -0
- package/markdownToSlate-PXYAIBVL.js +8 -0
- package/mcpLocalAuthorizeCommand-KYI4EGF5.js +110 -0
- package/{memberThunks-7Y3OYSJQ.js → memberThunks-43B7UYC5.js} +21 -16
- package/{models-H5NNZRLH.js → models-ZX2BYIMB.js} +2 -2
- package/{overlay-BBQZXGYI.js → overlay-JA3SPVUS.js} +5 -3
- package/package.json +2 -1
- package/{projectArchive-FQO654Z3.js → projectArchive-TJNW5DLM.js} +46 -44
- package/{providerPresetApply-WHAMP2D5.js → providerPresetApply-NTJUINI6.js} +36 -17
- package/{providerRegistry-ZI2KORJ7.js → providerRegistry-W45SLUV6.js} +6 -6
- package/{read-TYMBGEXO.js → read-KG6INYUT.js} +13 -7
- package/{readDocTool-SKQVHBLO.js → readDocTool-N3GA52JR.js} +1 -1
- package/{readlineWorkspace-7U272DSA.js → readlineWorkspace-PJZJVGA5.js} +7486 -4492
- package/rememberExplicit-CPAPONSI.js +15 -0
- package/{removeDialogAgentAction-F5QE2O2B.js → removeDialogAgentAction-EEVSOQOJ.js} +18 -17
- package/{runAgentClientLoop-AF4JQIJ7.js → runAgentClientLoop-3VC5TCDW.js} +107 -76
- package/{runtimeDoctorCommands-RRKPBGVO.js → runtimeDoctorCommands-V3M3JTUV.js} +14 -11
- package/{secretCommands-KZWBZIYS.js → secretCommands-KVVZS7A6.js} +3 -3
- package/{setDialogExtraReferencesAction-72L27ERM.js → setDialogExtraReferencesAction-DNO5POHA.js} +15 -14
- package/{setPrimaryDialogAgentAction-GJJDUSGJ.js → setPrimaryDialogAgentAction-QABBEO4C.js} +18 -17
- package/{settingThunks-ZRGWVGZD.js → settingThunks-DVKG4X4S.js} +181 -66
- package/{skillDiscovery-BHHPCUHZ.js → skillDiscovery-ZMJH36AK.js} +4 -3
- package/{spaceCommands-5VNWMDBE.js → spaceCommands-AGGZXPY3.js} +235 -87
- package/{streamAgentChatTurn-YSPEFY4K.js → streamAgentChatTurn-4GTLL2OF.js} +242 -169
- package/{switchDialogAgentAction-IIJBPND3.js → switchDialogAgentAction-KYWJSGOO.js} +16 -15
- package/{tableCommands-FTAOCBTX.js → tableCommands-EFA754RE.js} +7 -4
- package/{toolApiClient-OGQEBQVX.js → toolApiClient-N5PYW2R3.js} +8 -6
- package/{tools-M35PTIFB.js → tools-5AGPOPLW.js} +69 -65
- package/{tuiRestart-2IL37YIB.js → tuiRestart-77E7PL4R.js} +11 -10
- package/{tuiSummaryLlmCaller-W2QN4VAC.js → tuiSummaryLlmCaller-HROLGN4F.js} +16 -15
- package/{updateCommands-CPATDG6J.js → updateCommands-GJGRS6JK.js} +3 -3
- package/{updateDialogTitleAction-IMIRJRQQ.js → updateDialogTitleAction-5OSEDGRK.js} +40 -38
- package/{usageCommand-2BF74MKF.js → usageCommand-WI6SQOPB.js} +2 -2
- package/{usageRebuildCommand-UHB55BQM.js → usageRebuildCommand-WQRLLZAT.js} +3 -3
- package/webapi-QVV65DQF.js +2487 -0
- package/{windowsSelfUpdate-ZFD6J5HF.js → windowsSelfUpdate-C7LGVWYX.js} +2 -2
- package/workContext-Y3ADAPZU.js +14 -0
- package/workContextAccess-VU5I4LKZ.js +11 -0
- package/workContextWriteNotice-YCSSMHN4.js +7 -0
- package/{workloadLifecycle-HFJIN5IZ.js → workloadLifecycle-P2SJVV3S.js} +2 -2
- package/agentRecordCommands-IZYUVHME.js +0 -177
- package/agentRunCommand-QM7ETUTX.js +0 -209
- package/chunk-2YGBI2XB.js +0 -30
- package/chunk-5ZMIIR23.js +0 -265
- package/chunk-5ZUOVCKT.js +0 -32
- package/chunk-62HXNQVV.js +0 -134
- package/chunk-FJSNBZXR.js +0 -142
- package/chunk-FPBJM2BW.js +0 -689
- package/chunk-JQZRSXS5.js +0 -90
- package/chunk-P2ZLUIW2.js +0 -795
- package/chunk-PPJYZRSQ.js +0 -160
- package/chunk-TUSTONB3.js +0 -81
- package/chunk-ZXF6D3I6.js +0 -359
- package/cliLocalAgentRecordReader-H3HYQRRR.js +0 -91
- package/lib-OT5OTXRU.js +0 -21046
- package/localRuntimeAuthority-IBJAT62G.js +0 -16
- package/machineWsRunDispatch-L6H7J66T.js +0 -192
- package/{chunk-W6RFEDN4.js → chunk-AETZ7AD6.js} +3 -3
|
@@ -1,62 +1,62 @@
|
|
|
1
1
|
import {
|
|
2
|
-
DEFAULT_USER_PREFERENCE_PROFILE,
|
|
3
2
|
SYSTEM_DEFAULT_AGENT_ID,
|
|
4
3
|
hasOwn,
|
|
5
4
|
normalizeAgentUpdateFieldList,
|
|
6
5
|
normalizeAuthorityHomeServerSetting,
|
|
7
6
|
normalizeDefaultAgentIdSetting,
|
|
8
|
-
normalizeEnabledPromptSkills,
|
|
9
|
-
normalizeEnabledSkills,
|
|
10
7
|
normalizePolicyLevelSetting,
|
|
11
8
|
normalizeSystemBuiltinSkills,
|
|
12
9
|
normalizeTonePresetSetting,
|
|
10
|
+
normalizeUiPlugins,
|
|
13
11
|
omitKeys,
|
|
14
12
|
resolveDefaultAgentIdSetting
|
|
15
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-KG27JIG4.js";
|
|
16
14
|
import {
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
DEFAULT_USER_PREFERENCE_PROFILE,
|
|
16
|
+
normalizeEnabledPromptSkills,
|
|
17
|
+
normalizeEnabledSkills
|
|
18
|
+
} from "./chunk-R3FZHW4Q.js";
|
|
19
19
|
import {
|
|
20
20
|
patch,
|
|
21
21
|
readAndWait,
|
|
22
22
|
toTimestampMs,
|
|
23
23
|
upsert,
|
|
24
24
|
write
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-ADYWV732.js";
|
|
26
26
|
import "./chunk-3PVYUPXK.js";
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import
|
|
27
|
+
import "./chunk-WS36XPJD.js";
|
|
28
|
+
import {
|
|
29
|
+
require_react
|
|
30
|
+
} from "./chunk-RD3QLZQV.js";
|
|
31
|
+
import "./chunk-7BIJFGKS.js";
|
|
29
32
|
import {
|
|
30
33
|
getRuntimeServerContext
|
|
31
|
-
} from "./chunk-
|
|
32
|
-
import "./chunk-UEILX4EV.js";
|
|
34
|
+
} from "./chunk-HPDLPEUG.js";
|
|
33
35
|
import {
|
|
34
36
|
createAction,
|
|
35
37
|
createAsyncThunk
|
|
36
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-ZTHAJU3O.js";
|
|
37
39
|
import {
|
|
38
40
|
fetchFromServer
|
|
39
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-HDKMVYNJ.js";
|
|
42
|
+
import "./chunk-YJPK35HB.js";
|
|
43
|
+
import "./chunk-UEILX4EV.js";
|
|
44
|
+
import "./chunk-QQ56R7KS.js";
|
|
40
45
|
import {
|
|
41
46
|
getSessionGenerationForState,
|
|
47
|
+
getSessionSnapshotForState,
|
|
42
48
|
selectIdentityUserId
|
|
43
49
|
} from "./chunk-PXYBUFDB.js";
|
|
44
|
-
import "./chunk-QQ56R7KS.js";
|
|
45
|
-
import "./chunk-BV3FLP2L.js";
|
|
46
|
-
import "./chunk-FJSNBZXR.js";
|
|
47
50
|
import {
|
|
48
51
|
asRecordOrEmpty
|
|
49
52
|
} from "./chunk-KX6YBIHG.js";
|
|
50
53
|
import "./chunk-7DPNBQSV.js";
|
|
51
54
|
import "./chunk-OW765XBU.js";
|
|
55
|
+
import "./chunk-BV3FLP2L.js";
|
|
52
56
|
import {
|
|
53
57
|
DEFAULT_SYSTEM_AGENT_CAPABILITIES
|
|
54
|
-
} from "./chunk-
|
|
55
|
-
import "./chunk-
|
|
56
|
-
import "./chunk-W6RFEDN4.js";
|
|
57
|
-
import "./chunk-EVGU5P4U.js";
|
|
58
|
-
import "./chunk-ILHQ2AXT.js";
|
|
59
|
-
import "./chunk-M2EJHDJP.js";
|
|
58
|
+
} from "./chunk-EUGTFFO6.js";
|
|
59
|
+
import "./chunk-5P3PPQVP.js";
|
|
60
60
|
import {
|
|
61
61
|
createUserKey,
|
|
62
62
|
createUserPreferenceKey
|
|
@@ -65,13 +65,14 @@ import {
|
|
|
65
65
|
ulid
|
|
66
66
|
} from "./chunk-OJKUU3LP.js";
|
|
67
67
|
import "./chunk-YZMNK53S.js";
|
|
68
|
+
import "./chunk-RIWKZT7E.js";
|
|
69
|
+
import "./chunk-M2EJHDJP.js";
|
|
68
70
|
import "./chunk-I42VC5KR.js";
|
|
69
71
|
import "./chunk-U6VC4MU4.js";
|
|
70
|
-
import "./chunk-KHCLMKZZ.js";
|
|
71
72
|
import "./chunk-LCBAMY2M.js";
|
|
72
73
|
import "./chunk-3EUW3WEO.js";
|
|
73
|
-
import "./chunk-KUG52IAP.js";
|
|
74
74
|
import "./chunk-WWC7I6TA.js";
|
|
75
|
+
import "./chunk-KUG52IAP.js";
|
|
75
76
|
import "./chunk-G3SUCT4W.js";
|
|
76
77
|
import "./chunk-4SN6J65J.js";
|
|
77
78
|
import "./chunk-CF7PE763.js";
|
|
@@ -208,6 +209,7 @@ var recordSettingsWriteFailure = createAction(
|
|
|
208
209
|
var recordServerAuthorityEcho = createAction(
|
|
209
210
|
"settings/_recordServerAuthorityEcho"
|
|
210
211
|
);
|
|
212
|
+
var publishUiPlugins = createAction("settings/_publishUiPlugins");
|
|
211
213
|
|
|
212
214
|
// packages/app/settings/accountSettingsWriteQueue.ts
|
|
213
215
|
var queues = /* @__PURE__ */ new WeakMap();
|
|
@@ -227,6 +229,25 @@ function enqueueAccountSettingsWrite(getState, accountId, write2) {
|
|
|
227
229
|
return result;
|
|
228
230
|
}
|
|
229
231
|
|
|
232
|
+
// packages/database/retiredSettings.ts
|
|
233
|
+
var RETIRED_SETTINGS_FIELDS = [
|
|
234
|
+
"userTonePreset",
|
|
235
|
+
"knowledgeCaptureLevel",
|
|
236
|
+
"spaceContextLevel",
|
|
237
|
+
"enableReadCurrentSpace",
|
|
238
|
+
"globalPrompt",
|
|
239
|
+
"preferredAnimationSet",
|
|
240
|
+
"createMenuOpenCount"
|
|
241
|
+
];
|
|
242
|
+
var retired = new Set(RETIRED_SETTINGS_FIELDS);
|
|
243
|
+
function stripRetiredSettingsFields(record) {
|
|
244
|
+
if (!record || typeof record !== "object" || Array.isArray(record)) return record;
|
|
245
|
+
return Object.fromEntries(Object.entries(record).filter(([key]) => {
|
|
246
|
+
const root = key.match(/^(?:([^.[\]]+)|\[(?:"([^"]+)"|'([^']+)'|([^\]]+))\])/);
|
|
247
|
+
return !root || !retired.has(root[1] ?? root[2] ?? root[3] ?? root[4]);
|
|
248
|
+
}));
|
|
249
|
+
}
|
|
250
|
+
|
|
230
251
|
// packages/app/settings/dbActionThunks.ts
|
|
231
252
|
var getDefaultSettingDbActionThunks = () => ({
|
|
232
253
|
readAndWait,
|
|
@@ -251,15 +272,18 @@ var withSettingsRecordSchema = (changes) => ({
|
|
|
251
272
|
|
|
252
273
|
// packages/app/settings/settingPersistence.ts
|
|
253
274
|
var normalizeSettingChanges = (changes) => {
|
|
254
|
-
let normalizedChanges = omitKeys(changes, [
|
|
255
|
-
"preferredAnimationSet",
|
|
256
|
-
"createMenuOpenCount",
|
|
275
|
+
let normalizedChanges = omitKeys(stripRetiredSettingsFields(changes), [
|
|
257
276
|
// 本地意图世代只活在 redux 状态里:既不能从服务端 record 写回,也不能写云。
|
|
258
277
|
"localIntentEpoch",
|
|
278
|
+
// 每个键的本地意图世代同理:纯本地判据,不入云端 record、不被远端回灌。
|
|
279
|
+
"localIntentKeyEpochs",
|
|
259
280
|
// 权威回显世代同理:纯本地世代标记,不入云端 record、不被远端回灌。
|
|
260
281
|
"serverAuthorityEchoSeq",
|
|
261
282
|
// 写失败状态同样是纯本地 observability:绝不进入云端 settings record。
|
|
262
283
|
"lastWriteFailure",
|
|
284
|
+
// uiPlugins 的归属账号同样只活在本地:不写云端、不被 record 回灌。
|
|
285
|
+
"uiPluginsOwnerAccountId",
|
|
286
|
+
"uiPluginsGeneration",
|
|
263
287
|
// Retired device appearance is never accepted by Redux, including legacy callers.
|
|
264
288
|
"themeName",
|
|
265
289
|
"themeMode",
|
|
@@ -323,6 +347,12 @@ var normalizeSettingChanges = (changes) => {
|
|
|
323
347
|
)
|
|
324
348
|
};
|
|
325
349
|
}
|
|
350
|
+
if (hasOwn(normalizedChanges, "uiPlugins")) {
|
|
351
|
+
normalizedChanges = {
|
|
352
|
+
...normalizedChanges,
|
|
353
|
+
uiPlugins: normalizeUiPlugins(normalizedChanges.uiPlugins)
|
|
354
|
+
};
|
|
355
|
+
}
|
|
326
356
|
if (hasOwn(normalizedChanges, "enabledPromptSkills")) {
|
|
327
357
|
normalizedChanges = {
|
|
328
358
|
...normalizedChanges,
|
|
@@ -370,12 +400,10 @@ var isLocalFirstAppearanceChange = (changes) => {
|
|
|
370
400
|
);
|
|
371
401
|
};
|
|
372
402
|
var stripRegisterBackedFieldsFromSettingsWrite = (changes) => {
|
|
373
|
-
return omitKeys(changes, [
|
|
403
|
+
return omitKeys(stripRetiredSettingsFields(changes), [
|
|
374
404
|
"autoApproveCredits",
|
|
375
405
|
"defaultSpaceId",
|
|
376
406
|
"userAuthorityRegistry",
|
|
377
|
-
"preferredAnimationSet",
|
|
378
|
-
"createMenuOpenCount",
|
|
379
407
|
...LOCAL_APPEARANCE_KEY_NAMES
|
|
380
408
|
]);
|
|
381
409
|
};
|
|
@@ -384,11 +412,13 @@ var sanitizeStoredSettingsRecord = (settingsRecord) => {
|
|
|
384
412
|
return null;
|
|
385
413
|
}
|
|
386
414
|
const record = settingsRecord;
|
|
387
|
-
const sanitizedSettings = omitKeys(record, [
|
|
415
|
+
const sanitizedSettings = omitKeys(stripRetiredSettingsFields(record), [
|
|
388
416
|
"autoApproveCredits",
|
|
389
417
|
"defaultSpaceId",
|
|
390
418
|
"schemaVersion",
|
|
391
|
-
|
|
419
|
+
// 归属标记只活在本地;远端 record 里的同名键一律丢弃。
|
|
420
|
+
"uiPluginsOwnerAccountId",
|
|
421
|
+
"uiPluginsGeneration",
|
|
392
422
|
...LOCAL_APPEARANCE_KEY_NAMES
|
|
393
423
|
]);
|
|
394
424
|
return Object.keys(sanitizedSettings).length > 0 ? sanitizedSettings : null;
|
|
@@ -414,6 +444,10 @@ var hydrateStoredSettings = ({
|
|
|
414
444
|
const hydratedSettings = {
|
|
415
445
|
...baseSettings,
|
|
416
446
|
enabledPromptSkills: resolvedEnabledPromptSkills,
|
|
447
|
+
// UI 插件启用状态**无条件**归一化:记录里没有该键(旧记录 / 另一个从未开启过
|
|
448
|
+
// 插件的账号)也必须显式回落到全 absent,否则 Redux 会保留上一个账号的启用
|
|
449
|
+
// 状态——这正是跨账号泄漏的入口。
|
|
450
|
+
uiPlugins: normalizeUiPlugins(record.uiPlugins),
|
|
417
451
|
...hasRecordEnabledSkills ? { enabledSkills: normalizeEnabledSkills(record.enabledSkills) } : {},
|
|
418
452
|
// 服务端独占字段:只读回显(缺失时沿用初始值 0,非法值按 0)
|
|
419
453
|
...hasOwn(record, "autoApproveCredits") ? { autoApproveCredits: typeof record.autoApproveCredits === "number" && Number.isFinite(record.autoApproveCredits) && record.autoApproveCredits >= 0 ? record.autoApproveCredits : 0 } : {},
|
|
@@ -477,7 +511,7 @@ var getCachedDefaultAgentRegisterRecord = (getState, registerKey) => {
|
|
|
477
511
|
if (!record || typeof record !== "object") return null;
|
|
478
512
|
return record;
|
|
479
513
|
};
|
|
480
|
-
var persistDefaultAgentRegister = async (dispatch, getState, userId, value) => {
|
|
514
|
+
var persistDefaultAgentRegister = async (dispatch, getState, userId, value, canWrite) => {
|
|
481
515
|
const registerKey = createUserPreferenceKey.defaultAgent(userId);
|
|
482
516
|
let previousRecord = getCachedDefaultAgentRegisterRecord(getState, registerKey);
|
|
483
517
|
if (!previousRecord) {
|
|
@@ -492,6 +526,7 @@ var persistDefaultAgentRegister = async (dispatch, getState, userId, value) => {
|
|
|
492
526
|
if (previousRecord && previousValue === value) {
|
|
493
527
|
return;
|
|
494
528
|
}
|
|
529
|
+
if (canWrite && !canWrite()) return;
|
|
495
530
|
await dispatch(
|
|
496
531
|
getSettingDbActionThunks().write({
|
|
497
532
|
customKey: registerKey,
|
|
@@ -514,6 +549,13 @@ var readLocalIntentEpoch = (getState) => {
|
|
|
514
549
|
const value = getState()?.settings?.localIntentEpoch;
|
|
515
550
|
return typeof value === "number" && Number.isFinite(value) ? value : 0;
|
|
516
551
|
};
|
|
552
|
+
var readLocalIntentKeyEpoch = (getState, key) => {
|
|
553
|
+
const epochs = getState()?.settings?.localIntentKeyEpochs;
|
|
554
|
+
if (!epochs || typeof epochs !== "object") return 0;
|
|
555
|
+
const value = epochs[key];
|
|
556
|
+
return typeof value === "number" && Number.isFinite(value) ? value : 0;
|
|
557
|
+
};
|
|
558
|
+
var isLocalIntentSupersededForKeys = (getState, intentEpoch, keys) => keys.some((key) => readLocalIntentKeyEpoch(getState, key) > intentEpoch);
|
|
517
559
|
var SettingsWriteSupersededError = class extends Error {
|
|
518
560
|
constructor(message = "Settings write superseded by a newer local intent.") {
|
|
519
561
|
super(message);
|
|
@@ -613,13 +655,15 @@ var describeSettingsWriteFailure = async ({
|
|
|
613
655
|
reconciliation: "not-attempted",
|
|
614
656
|
unresolvedKeys: [...persistedKeys].sort()
|
|
615
657
|
};
|
|
616
|
-
if (
|
|
658
|
+
if (isLocalIntentSupersededForKeys(getState, intentEpoch, intentKeys))
|
|
659
|
+
return base;
|
|
617
660
|
const remoteRecord = await readSettingsAuthorityRecord(
|
|
618
661
|
createUserKey.settings(accountId),
|
|
619
662
|
getState,
|
|
620
663
|
accountId
|
|
621
664
|
);
|
|
622
|
-
if (
|
|
665
|
+
if (isLocalIntentSupersededForKeys(getState, intentEpoch, intentKeys))
|
|
666
|
+
return base;
|
|
623
667
|
const serverRecord = sanitizeStoredSettingsRecord(remoteRecord);
|
|
624
668
|
if (!serverRecord) {
|
|
625
669
|
return {
|
|
@@ -643,22 +687,32 @@ var readServerAuthorityEchoSeq = (getState) => {
|
|
|
643
687
|
const value = getState()?.settings?.serverAuthorityEchoSeq;
|
|
644
688
|
return typeof value === "number" && Number.isFinite(value) ? value : 0;
|
|
645
689
|
};
|
|
690
|
+
var readUiPluginIntentSnapshot = (getState) => {
|
|
691
|
+
const state = getState()?.settings;
|
|
692
|
+
return {
|
|
693
|
+
value: state?.uiPlugins,
|
|
694
|
+
ownerAccountId: state?.uiPluginsOwnerAccountId ?? null,
|
|
695
|
+
generation: state?.uiPluginsGeneration
|
|
696
|
+
};
|
|
697
|
+
};
|
|
698
|
+
var isSameUiPluginIntent = (a, b) => a.value === b.value && a.ownerAccountId === b.ownerAccountId && a.generation === b.generation;
|
|
646
699
|
var latestChatHydrations = /* @__PURE__ */ new WeakMap();
|
|
647
700
|
var getSettings = createAsyncThunk("settings/getSettings", async (_, { dispatch, getState }) => {
|
|
648
701
|
const userId = selectIdentityUserId(getState());
|
|
649
|
-
if (!userId) return null;
|
|
702
|
+
if (!userId || getSessionSnapshotForState(getState()) && getSessionSnapshotForState(getState())?.transition !== "idle") return null;
|
|
650
703
|
const session = getSessionGenerationForState(getState());
|
|
651
704
|
const hydration = {};
|
|
652
705
|
latestChatHydrations.set(getState, hydration);
|
|
653
706
|
const startLocalIntentEpoch = readLocalIntentEpoch(getState);
|
|
654
707
|
const startAuthorityEchoSeq = readServerAuthorityEchoSeq(getState);
|
|
708
|
+
const startUiPluginIntent = readUiPluginIntentSnapshot(getState);
|
|
655
709
|
const settingsKey = createUserKey.settings(userId);
|
|
656
710
|
const authorityHomeKey = createUserPreferenceKey.authorityHome(userId);
|
|
657
711
|
const [settingsRecord, authorityHomeRecord] = await Promise.all([
|
|
658
712
|
dispatch(getSettingDbActionThunks().readAndWait(settingsKey)).unwrap().catch(() => null),
|
|
659
713
|
dispatch(getSettingDbActionThunks().readAndWait(authorityHomeKey)).unwrap().catch(() => null)
|
|
660
714
|
]);
|
|
661
|
-
if (selectIdentityUserId(getState()) !== userId || getSessionGenerationForState(getState()) !== session || latestChatHydrations.get(getState) !== hydration) return null;
|
|
715
|
+
if (selectIdentityUserId(getState()) !== userId || getSessionSnapshotForState(getState()) && getSessionSnapshotForState(getState())?.transition !== "idle" || getSessionGenerationForState(getState()) !== session || latestChatHydrations.get(getState) !== hydration) return null;
|
|
662
716
|
const authorityHomeServer = readUserPreferenceRegisterValue(
|
|
663
717
|
authorityHomeRecord,
|
|
664
718
|
USER_PREFERENCE_NAMES.AUTHORITY_HOME
|
|
@@ -673,7 +727,7 @@ var getSettings = createAsyncThunk("settings/getSettings", async (_, { dispatch,
|
|
|
673
727
|
hydrated
|
|
674
728
|
);
|
|
675
729
|
const { currentServer: _ignored, ...settingsToApply } = normalizedPayload;
|
|
676
|
-
if (selectIdentityUserId(getState()) !== userId || getSessionGenerationForState(getState()) !== session || latestChatHydrations.get(getState) !== hydration) return null;
|
|
730
|
+
if (selectIdentityUserId(getState()) !== userId || getSessionSnapshotForState(getState()) && getSessionSnapshotForState(getState())?.transition !== "idle" || getSessionGenerationForState(getState()) !== session || latestChatHydrations.get(getState) !== hydration) return null;
|
|
677
731
|
const intentChanged = readLocalIntentEpoch(getState) !== startLocalIntentEpoch;
|
|
678
732
|
const echoChanged = readServerAuthorityEchoSeq(getState) !== startAuthorityEchoSeq;
|
|
679
733
|
const authoritative = pickServerAuthoritativeSettings(hydrated);
|
|
@@ -683,7 +737,16 @@ var getSettings = createAsyncThunk("settings/getSettings", async (_, { dispatch,
|
|
|
683
737
|
...preferenceFields
|
|
684
738
|
} = settingsToApply;
|
|
685
739
|
const applied = {};
|
|
686
|
-
|
|
740
|
+
const pluginIntentChanged = !isSameUiPluginIntent(
|
|
741
|
+
startUiPluginIntent,
|
|
742
|
+
readUiPluginIntentSnapshot(getState)
|
|
743
|
+
);
|
|
744
|
+
if (!pluginIntentChanged) {
|
|
745
|
+
dispatch(publishUiPlugins({ value: settingsToApply.uiPlugins, accountId: userId, generation: session }));
|
|
746
|
+
}
|
|
747
|
+
if (!intentChanged) {
|
|
748
|
+
Object.assign(applied, preferenceFields);
|
|
749
|
+
}
|
|
687
750
|
if (!echoChanged && hasOwn(authoritative, "autoApproveCredits")) {
|
|
688
751
|
applied.autoApproveCredits = authoritative.autoApproveCredits;
|
|
689
752
|
}
|
|
@@ -709,6 +772,7 @@ var persistSettingsChanges = createAsyncThunk("settings/persistSettingsChanges",
|
|
|
709
772
|
const normalizedChanges = normalizeSettingChanges(changes);
|
|
710
773
|
const previousDefaultAgentId = normalizeDefaultAgentIdSetting(currentSettings.defaultAgentId) ?? SYSTEM_DEFAULT_AGENT_ID;
|
|
711
774
|
const userId = selectIdentityUserId(getState());
|
|
775
|
+
if (hasOwn(normalizedChanges, "uiPlugins") && getSessionSnapshotForState(getState())?.transition !== "idle") throw new Error("Session is transitioning.");
|
|
712
776
|
if (!userId) {
|
|
713
777
|
const hasAppearanceChanges = Object.keys(normalizedChanges).length > 0;
|
|
714
778
|
if (hasAppearanceChanges) {
|
|
@@ -718,7 +782,7 @@ var persistSettingsChanges = createAsyncThunk("settings/persistSettingsChanges",
|
|
|
718
782
|
} else {
|
|
719
783
|
throw new Error("User not found for persisting settings.");
|
|
720
784
|
}
|
|
721
|
-
dispatch(bumpLocalIntentEpoch());
|
|
785
|
+
dispatch(bumpLocalIntentEpoch({ keys: Object.keys(normalizedChanges) }));
|
|
722
786
|
dispatch(updateSettingsState(normalizedChanges));
|
|
723
787
|
return normalizedChanges;
|
|
724
788
|
}
|
|
@@ -730,49 +794,75 @@ var persistSettingsChanges = createAsyncThunk("settings/persistSettingsChanges",
|
|
|
730
794
|
});
|
|
731
795
|
if (selectIdentityUserId(getState()) !== userId) return {};
|
|
732
796
|
const owner = getAccountChatDisplayOwner(getState);
|
|
733
|
-
|
|
797
|
+
const intentKeys = Object.keys(normalizedChanges);
|
|
798
|
+
dispatch(bumpLocalIntentEpoch({ keys: intentKeys }));
|
|
734
799
|
const intentEpoch = readLocalIntentEpoch(getState);
|
|
735
800
|
owner.setAccount(userId);
|
|
736
801
|
owner.updateForAccount(userId, pickAccountChatDisplayPreferences(persistencePlan.normalizedChanges));
|
|
802
|
+
if (hasOwn(persistencePlan.normalizedChanges, "uiPlugins")) {
|
|
803
|
+
dispatch(publishUiPlugins({ value: persistencePlan.normalizedChanges.uiPlugins, accountId: userId, generation: session }));
|
|
804
|
+
}
|
|
737
805
|
dispatch(updateSettingsState(omitAccountChatDisplayPreferences(persistencePlan.normalizedChanges)));
|
|
738
|
-
const
|
|
739
|
-
const
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
806
|
+
const isSameAccountSession = () => (!getSessionSnapshotForState(getState()) || getSessionSnapshotForState(getState())?.transition === "idle") && selectIdentityUserId(getState()) === userId && getSessionGenerationForState(getState()) === session;
|
|
807
|
+
const isSupersededKey = (key) => readLocalIntentKeyEpoch(getState, key) > intentEpoch;
|
|
808
|
+
const resolveEffectiveWrite = () => {
|
|
809
|
+
const patchChanges = persistencePlan.settingsPatch?.changes ?? {};
|
|
810
|
+
const effectiveChanges = {};
|
|
811
|
+
for (const [key, value] of Object.entries(patchChanges)) {
|
|
812
|
+
if (!isSupersededKey(key)) effectiveChanges[key] = value;
|
|
813
|
+
}
|
|
814
|
+
const effectiveIntentKeys = intentKeys.filter((key) => !isSupersededKey(key));
|
|
815
|
+
const effectivePersistedKeys = Object.keys(effectiveChanges).filter(
|
|
816
|
+
(key) => key !== "schemaVersion"
|
|
817
|
+
);
|
|
818
|
+
return { effectiveChanges, effectiveIntentKeys, effectivePersistedKeys };
|
|
819
|
+
};
|
|
743
820
|
const performWrite = async () => {
|
|
744
|
-
if (!
|
|
821
|
+
if (!isSameAccountSession()) {
|
|
822
|
+
throw new SettingsWriteSupersededError();
|
|
823
|
+
}
|
|
824
|
+
const effective = resolveEffectiveWrite();
|
|
825
|
+
if (effective.effectiveIntentKeys.length === 0) {
|
|
745
826
|
throw new SettingsWriteSupersededError();
|
|
746
827
|
}
|
|
747
828
|
const nextDefaultAgentId = normalizeDefaultAgentIdSetting(
|
|
748
829
|
persistencePlan.normalizedChanges.defaultAgentId
|
|
749
830
|
) ?? null;
|
|
750
|
-
if (hasOwn(changes, "defaultAgentId") && previousDefaultAgentId !== (nextDefaultAgentId ?? SYSTEM_DEFAULT_AGENT_ID)) {
|
|
831
|
+
if (hasOwn(changes, "defaultAgentId") && previousDefaultAgentId !== (nextDefaultAgentId ?? SYSTEM_DEFAULT_AGENT_ID) && !isSupersededKey("defaultAgentId")) {
|
|
751
832
|
await persistDefaultAgentRegister(
|
|
752
833
|
dispatch,
|
|
753
834
|
getState,
|
|
754
835
|
userId,
|
|
755
|
-
nextDefaultAgentId
|
|
836
|
+
nextDefaultAgentId,
|
|
837
|
+
() => isSameAccountSession() && !isSupersededKey("defaultAgentId")
|
|
756
838
|
);
|
|
757
839
|
}
|
|
758
|
-
if (
|
|
840
|
+
if (!isSameAccountSession()) {
|
|
841
|
+
throw new SettingsWriteSupersededError();
|
|
842
|
+
}
|
|
843
|
+
const effectiveAfterAwait = resolveEffectiveWrite();
|
|
844
|
+
if (effectiveAfterAwait.effectiveIntentKeys.length === 0) {
|
|
845
|
+
throw new SettingsWriteSupersededError();
|
|
846
|
+
}
|
|
847
|
+
if (persistencePlan.settingsPatch && Object.keys(effectiveAfterAwait.effectiveChanges).length > 0) {
|
|
759
848
|
await dispatch(
|
|
760
849
|
getSettingDbActionThunks().upsert({
|
|
761
850
|
dbKey: persistencePlan.settingsPatch.dbKey,
|
|
762
|
-
data:
|
|
851
|
+
data: effectiveAfterAwait.effectiveChanges
|
|
763
852
|
})
|
|
764
853
|
).unwrap();
|
|
765
854
|
}
|
|
855
|
+
return effectiveAfterAwait;
|
|
766
856
|
};
|
|
767
|
-
const settleSettingsWriteFailureAfterSuccess = () => {
|
|
768
|
-
if (!
|
|
857
|
+
const settleSettingsWriteFailureAfterSuccess = (effective) => {
|
|
858
|
+
if (!isSameAccountSession()) return;
|
|
769
859
|
const existing = getState()?.settings?.lastWriteFailure;
|
|
770
860
|
if (!existing) return;
|
|
771
861
|
const next = resolveSettingsWriteFailureAfterSuccess({
|
|
772
862
|
failure: existing,
|
|
773
863
|
accountId: userId,
|
|
774
|
-
intentKeys,
|
|
775
|
-
persistedKeys
|
|
864
|
+
intentKeys: effective.effectiveIntentKeys,
|
|
865
|
+
persistedKeys: effective.effectivePersistedKeys
|
|
776
866
|
});
|
|
777
867
|
if (next === existing) return;
|
|
778
868
|
dispatch(recordSettingsWriteFailure(next));
|
|
@@ -780,32 +870,46 @@ var persistSettingsChanges = createAsyncThunk("settings/persistSettingsChanges",
|
|
|
780
870
|
await enqueueAccountSettingsWrite(getState, userId, async () => {
|
|
781
871
|
let firstFailureAt = 0;
|
|
782
872
|
try {
|
|
783
|
-
await performWrite();
|
|
784
|
-
settleSettingsWriteFailureAfterSuccess();
|
|
873
|
+
const effective = await performWrite();
|
|
874
|
+
settleSettingsWriteFailureAfterSuccess(effective);
|
|
785
875
|
return;
|
|
786
876
|
} catch (firstError) {
|
|
787
877
|
if (isSettingsWriteSupersededError(firstError)) return;
|
|
788
878
|
firstFailureAt = Date.now();
|
|
789
|
-
if (!
|
|
879
|
+
if (!isSameAccountSession()) return;
|
|
790
880
|
await delaySettingsWriteRetry(SETTINGS_WRITE_RETRY_BACKOFF_MS);
|
|
791
|
-
if (!isCurrentIntent()) return;
|
|
792
881
|
try {
|
|
793
|
-
await performWrite();
|
|
794
|
-
settleSettingsWriteFailureAfterSuccess();
|
|
882
|
+
const effective = await performWrite();
|
|
883
|
+
settleSettingsWriteFailureAfterSuccess(effective);
|
|
795
884
|
return;
|
|
796
885
|
} catch (retryError) {
|
|
797
886
|
if (isSettingsWriteSupersededError(retryError)) return;
|
|
798
|
-
if (!
|
|
887
|
+
if (!isSameAccountSession()) return;
|
|
888
|
+
const effective = resolveEffectiveWrite();
|
|
889
|
+
if (effective.effectiveIntentKeys.length === 0) return;
|
|
799
890
|
const failure = await describeSettingsWriteFailure({
|
|
800
891
|
getState,
|
|
801
892
|
accountId: userId,
|
|
802
893
|
intentEpoch,
|
|
803
|
-
intentKeys,
|
|
804
|
-
persistedKeys,
|
|
894
|
+
intentKeys: effective.effectiveIntentKeys,
|
|
895
|
+
persistedKeys: effective.effectivePersistedKeys,
|
|
805
896
|
at: firstFailureAt
|
|
806
897
|
});
|
|
807
|
-
if (!
|
|
808
|
-
|
|
898
|
+
if (!isSameAccountSession()) return;
|
|
899
|
+
const ownedAfterReconcile = new Set(
|
|
900
|
+
resolveEffectiveWrite().effectiveIntentKeys
|
|
901
|
+
);
|
|
902
|
+
const ownedKeys = failure.keys.filter((key) => ownedAfterReconcile.has(key));
|
|
903
|
+
if (ownedKeys.length === 0) return;
|
|
904
|
+
dispatch(
|
|
905
|
+
recordSettingsWriteFailure({
|
|
906
|
+
...failure,
|
|
907
|
+
keys: ownedKeys,
|
|
908
|
+
unresolvedKeys: failure.unresolvedKeys.filter(
|
|
909
|
+
(key) => ownedAfterReconcile.has(key)
|
|
910
|
+
)
|
|
911
|
+
})
|
|
912
|
+
);
|
|
809
913
|
throw retryError;
|
|
810
914
|
}
|
|
811
915
|
}
|
|
@@ -942,6 +1046,16 @@ var setDefaultAgentId = createAsyncThunk(
|
|
|
942
1046
|
})
|
|
943
1047
|
).unwrap()
|
|
944
1048
|
);
|
|
1049
|
+
var setUiPluginState = createAsyncThunk(
|
|
1050
|
+
"settings/setUiPluginState",
|
|
1051
|
+
async ({ id, value, session }, { dispatch, getState }) => {
|
|
1052
|
+
const current = getSessionSnapshotForState(getState());
|
|
1053
|
+
if (!session || session.transition !== "idle" || current?.transition !== "idle" || current.activeAccountId !== session.activeAccountId || current.sessionGeneration !== session.sessionGeneration) throw new Error("Session changed; reopen plugin configuration.");
|
|
1054
|
+
const state = getState().settings;
|
|
1055
|
+
if (state.uiPluginsOwnerAccountId !== current.activeAccountId || state.uiPluginsGeneration !== current.sessionGeneration) throw new Error("Plugin settings are not hydrated for this session.");
|
|
1056
|
+
await dispatch(setSettings({ uiPlugins: { ...state.uiPlugins, [id]: value } })).unwrap();
|
|
1057
|
+
}
|
|
1058
|
+
);
|
|
945
1059
|
export {
|
|
946
1060
|
getSettings,
|
|
947
1061
|
setAccountChatDisplayPreferences,
|
|
@@ -959,6 +1073,7 @@ export {
|
|
|
959
1073
|
setSettings,
|
|
960
1074
|
setSidebarWidth,
|
|
961
1075
|
setSpaceContextLevel,
|
|
1076
|
+
setUiPluginState,
|
|
962
1077
|
setUserTonePreset,
|
|
963
1078
|
toggleEditorAutoSave,
|
|
964
1079
|
toggleEditorShortcut,
|
|
@@ -9,9 +9,10 @@ import {
|
|
|
9
9
|
listLocalWorkspaceSkillCatalogEntries,
|
|
10
10
|
parseSkillFrontmatter,
|
|
11
11
|
resolveSkillByName
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-UZKBVQUX.js";
|
|
13
|
+
import "./chunk-D634SL2Y.js";
|
|
14
|
+
import "./chunk-UAF5VQCE.js";
|
|
15
|
+
import "./chunk-2SXN7LAY.js";
|
|
15
16
|
import "./chunk-KHCLMKZZ.js";
|
|
16
17
|
import "./chunk-U67V476Y.js";
|
|
17
18
|
export {
|