nolo-cli 0.259.0-alpha.1 → 0.260.0-alpha.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 +1 -1
- package/{_executeModel-MTM4BJK3.js → _executeModel-EO6JFCOF.js} +97 -83
- package/accountResolver-NGICIMEE.js +1 -1
- package/{action-C6IQAKN4.js → action-WIA56QT4.js} +12 -10
- package/{addContentAction-53364YDW.js → addContentAction-OCMWZLYG.js} +14 -13
- package/{addDialogAgentAction-U5DD5EN5.js → addDialogAgentAction-ER2NZ7BC.js} +20 -24
- package/{agentDeleteCommand-53NN3VSK.js → agentDeleteCommand-KSXSNPAU.js} +184 -146
- package/{agentEmailCommands-KOGGIT6I.js → agentEmailCommands-NXRWS7NS.js} +142 -126
- package/{agentGrantCommands-L6O2HVJI.js → agentGrantCommands-D2S7LCTU.js} +8 -5
- package/{agentListCommands-62UYUQDI.js → agentListCommands-PFXGZZ3Y.js} +87 -68
- package/{agentMachineCommands-W6TNJXEA.js → agentMachineCommands-2Q55CSL4.js} +68 -59
- package/{agentProviderCommands-QLTABYR7.js → agentProviderCommands-EUNS7Y2Z.js} +10 -7
- package/{agentPullCommand-2EYJ5ENC.js → agentPullCommand-S2VMPSWL.js} +9 -6
- package/agentRecordCommands-FUFI526H.js +210 -0
- package/agentRun-ZNMUPDHF.js +250 -0
- package/agentRunCommand-ISVQ2UYC.js +248 -0
- package/{agentRunControl-LXMADX3N.js → agentRunControl-NEK44LDM.js} +19 -12
- package/{agentRuntimeLocal-YGNJMQW3.js → agentRuntimeLocal-SST4EPLT.js} +62 -49
- package/{agentSlice-3HHYUQLM.js → agentSlice-4ZJJJN4M.js} +15 -18
- package/appConfigCommands-MPHS6FHD.js +417 -0
- package/{appDeleteCommands-5COJ6CSG.js → appDeleteCommands-W26WGENW.js} +68 -58
- package/{appDeployCommands-3JPAT3XO.js → appDeployCommands-ER7IOF5E.js} +74 -59
- package/{appDeployStatusCommands-RHZKF3G4.js → appDeployStatusCommands-VKLL3A77.js} +68 -58
- package/{appGetCommands-73DXOAQW.js → appGetCommands-P6GXJNUD.js} +74 -58
- package/{appListCommands-HD5LOQ3G.js → appListCommands-ACA2IZZM.js} +74 -58
- package/appMigrateCommands-OGF4E2W6.js +230 -0
- package/appSourceCommands-GAHVBRUM.js +279 -0
- package/{authCommand-V6EOMZX6.js → authCommand-PXE7NZTQ.js} +26 -40
- package/{authCommands-T5FODCEG.js → authCommands-AZPYXTUB.js} +20 -17
- package/{builtinSkillRegistry-EDHD2UHU.js → builtinSkillRegistry-6XUWMAV5.js} +8 -6
- package/{chromeOpsCommands-3SSTDFRF.js → chromeOpsCommands-7UKKUOBU.js} +68 -18
- package/{chunk-KLMBM6P6.js → chunk-2CKFROQS.js} +2454 -1115
- package/{chunk-MJBLXJMP.js → chunk-2I4R6ZRV.js} +12 -9
- package/{chunk-FXEPZKNJ.js → chunk-2MIZHEND.js} +506 -64
- package/{chunk-TLE77UJ5.js → chunk-2OROOEOQ.js} +0 -1
- package/{chunk-6RSNVJGO.js → chunk-2ZBPWX7N.js} +4 -4
- package/chunk-35JIFLIG.js +30 -0
- package/{chunk-ZYPXOQS2.js → chunk-3EPED3UO.js} +1 -1
- package/{chunk-DNNPARJK.js → chunk-3QMN3T6L.js} +50 -37
- package/{chunk-DMPZMYH4.js → chunk-3R4AYHJR.js} +13 -1
- package/{chunk-HPDLPEUG.js → chunk-42JZNSAY.js} +267 -234
- package/{chunk-223KZUJ6.js → chunk-4HZCBA4Q.js} +18 -15
- package/{chunk-C5A54QS7.js → chunk-4INJGWE3.js} +18 -5
- package/chunk-4IVMDQBA.js +261 -0
- package/chunk-4Y6CZ2N4.js +82 -0
- package/{chunk-OKAXQFON.js → chunk-52BNL6GP.js} +4 -4
- package/{chunk-KZ4A7EIV.js → chunk-56OAS5RZ.js} +1 -1
- package/{chunk-QGFLVQ6E.js → chunk-6KUTNAPU.js} +4 -14
- package/{chunk-MNFUKRRU.js → chunk-6XAAKRJB.js} +7 -7
- package/{chunk-P27E22MA.js → chunk-6Z6DGDPI.js} +1 -1
- package/chunk-72VWN4VK.js +51 -0
- package/{chunk-L4XST72F.js → chunk-75FZ2Z7C.js} +16027 -17392
- package/{chunk-ADYWV732.js → chunk-76B6YUQS.js} +264 -177
- package/{chunk-MXA54TQM.js → chunk-76K4GTY5.js} +1 -1
- package/{chunk-VNHZJEQN.js → chunk-7HUCUD2I.js} +3 -3
- package/chunk-7LR2IFUH.js +100 -0
- package/{chunk-S73EPYNC.js → chunk-7LS5ATRP.js} +20 -6
- package/{chunk-Y2TCTNUD.js → chunk-7QO6YSA4.js} +4 -4
- package/{chunk-DBJODIZ6.js → chunk-7RYH7YIY.js} +19 -27
- package/{chunk-KHYSFS3W.js → chunk-A454UXB6.js} +148 -73
- package/chunk-AMNZPQCY.js +635 -0
- package/chunk-AMTF6FJD.js +356 -0
- package/{chunk-4MXYCQBS.js → chunk-AQNWWJLH.js} +2 -56
- package/{chunk-WSLL7VV4.js → chunk-B4NA5UJR.js} +9 -9
- package/{chunk-LHCGKAFO.js → chunk-BKP325XS.js} +184 -112
- package/{chunk-PENRYZ4D.js → chunk-BPB3T5EU.js} +4 -7
- package/{chunk-46FETNLF.js → chunk-BTIFQBYW.js} +7 -6
- package/{chunk-2JHGUL5K.js → chunk-BVYHE6QD.js} +2 -2
- package/{chunk-KXOPLLFP.js → chunk-CA7LGAHV.js} +69 -9
- package/{chunk-2FZVXOFX.js → chunk-CEIWXKHP.js} +112 -200
- package/{chunk-AIFQKNPP.js → chunk-CL33RFD7.js} +1 -1
- package/{chunk-MPGR4ZNR.js → chunk-CRGPRAJ4.js} +46 -42
- package/{chunk-P4R5KXU7.js → chunk-CW6LRDSF.js} +5 -5
- package/{chunk-R3TUHCSJ.js → chunk-CZHIOBBK.js} +8 -3
- package/chunk-D3ONA3FP.js +762 -0
- package/chunk-D3SAQ6T7.js +1697 -0
- package/{chunk-PIVTQRX6.js → chunk-DDKA6V6X.js} +111 -12
- package/{chunk-KQHEGELM.js → chunk-DEAII55O.js} +16 -6
- package/{chunk-J55F3IEZ.js → chunk-DKJQEFNG.js} +1 -1
- package/chunk-DLXL4NSL.js +1179 -0
- package/{chunk-EJQE5HB7.js → chunk-DSBRIUX5.js} +4 -2
- package/{chunk-XRGBJHZX.js → chunk-E36V7MPY.js} +9 -5
- package/{chunk-4YPH5KRA.js → chunk-EDKMRDET.js} +1 -1
- package/chunk-EJHLDJWZ.js +58 -0
- package/{chunk-6B2OBX5B.js → chunk-EMFZXJTN.js} +15 -47
- package/chunk-ER6NTALN.js +34 -0
- package/chunk-EUHMI5KG.js +101 -0
- package/{chunk-YQLAFJRQ.js → chunk-FBNVJ2TO.js} +1 -1
- package/{chunk-Q2EERN52.js → chunk-FF5ZRKW7.js} +12 -7
- package/{chunk-YFEK7ACQ.js → chunk-FGD4NMTP.js} +4 -4
- package/{chunk-6XIE5ZGI.js → chunk-FGFJUFPS.js} +5 -6
- package/chunk-FI4DPLR7.js +902 -0
- package/chunk-FKVLQNGJ.js +25 -0
- package/{chunk-JCQ3WCQ3.js → chunk-FOC4TORM.js} +69 -3
- package/{chunk-JPXACKSW.js → chunk-G22P2J7O.js} +30 -81
- package/{chunk-7WHCIA5V.js → chunk-G5IAIGGD.js} +3 -8
- package/{chunk-5BIDJVNX.js → chunk-G5JGA5YM.js} +180 -31
- package/{chunk-57V4PADY.js → chunk-GMBWWBSJ.js} +781 -449
- package/{chunk-WS36XPJD.js → chunk-GYFKKTDI.js} +82 -6
- package/{chunk-KT7S7ANZ.js → chunk-GZ4I5EMM.js} +9 -9
- package/{chunk-324FWHUA.js → chunk-HHXF57CL.js} +12 -3
- package/chunk-HJTI7RZV.js +94 -0
- package/{chunk-QXTEEEIN.js → chunk-HPIY372N.js} +7 -7
- package/{chunk-Q2MPKE4B.js → chunk-HVRG27HI.js} +76 -26
- package/{chunk-HDKMVYNJ.js → chunk-I3NWAILT.js} +6 -4
- package/{chunk-JZO7KUF3.js → chunk-IM7HCFB4.js} +313 -275
- package/{chunk-UWWOWTW2.js → chunk-INN2PBW7.js} +1 -1
- package/chunk-IV6VUVLJ.js +88 -0
- package/chunk-J42X32PV.js +472 -0
- package/{chunk-UA3QTA2S.js → chunk-JHQNWV2C.js} +4441 -2569
- package/{chunk-R7XWZDOH.js → chunk-JUMQJSQF.js} +1423 -282
- package/{chunk-BIDSIRTS.js → chunk-JUNYPVL6.js} +10 -16
- package/chunk-JVEKCQAP.js +222 -0
- package/{chunk-KVMLM5VD.js → chunk-KAHYBAEN.js} +211 -472
- package/chunk-KDDXC2IH.js +148 -0
- package/chunk-KGKTN2NX.js +25 -0
- package/chunk-KGWE224L.js +246 -0
- package/chunk-L3UFGEDU.js +17157 -0
- package/{chunk-CBIGMWMI.js → chunk-LHJB4BXJ.js} +1 -1
- package/{chunk-7OVOZRZF.js → chunk-LIH7WSX5.js} +23 -379
- package/chunk-LJOPY4TL.js +443 -0
- package/{chunk-TRRXYFTR.js → chunk-LOFRSJX2.js} +1 -0
- package/{chunk-SQL7YNED.js → chunk-LPXBBC32.js} +71 -5
- package/chunk-LXP53WGF.js +168 -0
- package/chunk-MDAYRIP7.js +1889 -0
- package/chunk-MRACVEPZ.js +7 -0
- package/chunk-NHLLXINQ.js +8 -0
- package/{chunk-FP37ELBT.js → chunk-NTBTVKKB.js} +17 -25
- package/{chunk-LVZVSLKO.js → chunk-O7ZY6SUK.js} +5 -22
- package/{chunk-2C5VN7NH.js → chunk-P4XAHM4B.js} +1 -1
- package/chunk-PL5RKESU.js +40 -0
- package/{chunk-MHKPUGPD.js → chunk-PQ3QZMJK.js} +20 -4
- package/chunk-Q5FJJ6XI.js +103 -0
- package/{createAgentAutomationAction-GRZ6XY7Q.js → chunk-QKM55LP2.js} +3 -160
- package/{chunk-6YX2RAQN.js → chunk-QZCLCAYC.js} +89 -164
- package/{chunk-FE7G6DSP.js → chunk-R72QWIFO.js} +14 -4
- package/{chunk-JLZJL3WC.js → chunk-RDZ5OIAT.js} +370 -39
- package/{chunk-5RGU3J7P.js → chunk-REAE2SZK.js} +0 -1
- package/chunk-RF576RYE.js +117 -0
- package/chunk-RI7SXDJW.js +1317 -0
- package/{chunk-FEIVARWR.js → chunk-RIOAPUGV.js} +238 -25
- package/{chunk-2CT2J3O6.js → chunk-RL6H2A2Z.js} +2493 -4055
- package/{chunk-BZLGPM5B.js → chunk-RNLKWUVY.js} +7 -12
- package/{chunk-J7JRCOIW.js → chunk-RWXHGPWJ.js} +1 -1
- package/chunk-S7BF2OGX.js +432 -0
- package/{chunk-6VEO7Z3Y.js → chunk-SD4MBKZ7.js} +6 -6
- package/{chunk-KWNVPY6M.js → chunk-SGEBRBF3.js} +7 -4
- package/{chunk-6SOWMEAY.js → chunk-SR57FDTX.js} +2 -258
- package/{chunk-CEKRIR22.js → chunk-SU4NCTW4.js} +1 -1
- package/{chunk-Y2GWUBNS.js → chunk-SX6PDLBZ.js} +279 -149
- package/{chunk-XNNBXUEM.js → chunk-T4WU747C.js} +5 -5
- package/{chunk-53W5BXLN.js → chunk-TCOHWKDM.js} +54 -55
- package/{chunk-QIGQFON2.js → chunk-TXMFSGRY.js} +1 -1
- package/{chunk-UUCYUN6Y.js → chunk-UB7NV7NN.js} +1 -1
- package/{chunk-NCFKHYDM.js → chunk-UOLGGEEC.js} +774 -119
- package/{chunk-4EACJPZI.js → chunk-USFG4EWQ.js} +51 -42
- package/{chunk-LLUBUHNT.js → chunk-UYZOBSSO.js} +5 -9
- package/{chunk-XPETQ4MR.js → chunk-VDC3BW24.js} +24 -10
- package/chunk-VH356OQ3.js +425 -0
- package/{chunk-U6QNVOR5.js → chunk-VKM7DOYB.js} +130 -6
- package/{chunk-CJOOF4L5.js → chunk-VPAO5WQX.js} +17 -14
- package/{chunk-OYUMJMC5.js → chunk-W2RQYNPI.js} +5 -0
- package/{chunk-6BMTKYAO.js → chunk-W2Z5E2R7.js} +126 -698
- package/{chunk-4ZCTKB27.js → chunk-W5GKF5ZW.js} +1 -0
- package/{chunk-NUHQO3RB.js → chunk-WIVVNJUS.js} +1 -1
- package/chunk-WLJNHFEB.js +1710 -0
- package/chunk-WMBJDXMY.js +408 -0
- package/chunk-WSQLCWLQ.js +201 -0
- package/{chunk-YN23INFZ.js → chunk-WXD6Y7DW.js} +23 -2
- package/{chunk-OOVOAG4Q.js → chunk-WY6DMHMG.js} +1 -1
- package/{chunk-6K32PBRY.js → chunk-XJW6SLBZ.js} +3 -3
- package/{chunk-7BIJFGKS.js → chunk-XQFDCRG3.js} +105 -51
- package/chunk-XT6C2QZW.js +46 -0
- package/{chunk-5YS6QHGT.js → chunk-Y7THFNVJ.js} +9 -9
- package/{chunk-ZEZC7IIM.js → chunk-YFSM2366.js} +35 -35
- package/{chunk-RD3QLZQV.js → chunk-YM5XULB2.js} +324 -2
- package/{chunk-FZENZCIA.js → chunk-YNP3ITPU.js} +19 -12
- package/{chunk-U35UUM5K.js → chunk-YOUSQIIK.js} +1 -1
- package/{chunk-RIWKZT7E.js → chunk-YRPIUIEQ.js} +11 -9
- package/{chunk-IYLUK67R.js → chunk-YU235GGN.js} +25 -8
- package/chunk-YWEZSBLL.js +790 -0
- package/chunk-Z3KTXWWB.js +76 -0
- package/{chunk-YLAHYLDQ.js → chunk-ZC3CMUKU.js} +2 -89
- package/chunk-ZD7OULYZ.js +368 -0
- package/{chunk-5P3PPQVP.js → chunk-ZQAADXSF.js} +1 -1
- package/{chunk-HQUGB2HM.js → chunk-ZTCMXPIS.js} +62 -50
- package/{cliAgentConfigHelpers-BXHQ3PXP.js → cliAgentConfigHelpers-KMXS7JP5.js} +20 -14
- package/{cliAuthorityBrokerClient-TFNXJLXL.js → cliAuthorityBrokerClient-3SKOA7OZ.js} +3 -1
- package/cliAuthorityBrokerProcess-DCCUT4YQ.js +34 -0
- package/{cliEnvHelpers-CNMP3RDX.js → cliEnvHelpers-YDGDHIEE.js} +5 -2
- package/{cliExecutor-K6FDZTQ2.js → cliExecutor-Z62UBJ5S.js} +12 -6
- package/cliLocalAgentRecordReader-X2YHEBWI.js +113 -0
- package/cloudAutomationCommands-C6Q3BFRB.js +310 -0
- package/{commandRegistry-IFYQLPGM.js → commandRegistry-TYYYTW5E.js} +260 -121
- package/{contentThunks-QCFCD2X3.js → contentThunks-E6BJ5YSX.js} +45 -43
- package/{cooldownCommands-WDOI5VD7.js → cooldownCommands-FPAFS7XG.js} +1 -1
- package/createAgentAutomationAction-L3NLCIIW.js +172 -0
- package/{createDialogAction-ZAJERW62.js → createDialogAction-QSWKRPWQ.js} +46 -42
- package/{createPageAction-QCVBMP4C.js → createPageAction-ZVVUT4CZ.js} +49 -45
- package/{db-VR74ADGC.js → db-KTQ3LL2Q.js} +3 -3
- package/{dbSlice-RWPSVHBC.js → dbSlice-SEVKNA7A.js} +21 -16
- package/deleteDbKey-43MTK2DI.js +86 -0
- package/{dialogCommands-4IEQUALS.js → dialogCommands-UVMTIFSA.js} +80 -66
- package/{dialogMessageRecord-OAV77LT7.js → dialogMessageRecord-2HJTEXQX.js} +1 -1
- package/{dialogNotifyCommand-IASQGEMW.js → dialogNotifyCommand-LMWF7EQI.js} +22 -14
- package/dialogPortabilityCommands-PAMLEBST.js +3036 -0
- package/{dialogSlice-XFYID6KE.js → dialogSlice-VHPXENDZ.js} +43 -42
- package/{dialogTraceCommand-Y67NRFCV.js → dialogTraceCommand-SO2WKAXW.js} +83 -69
- package/{dialogUsageCommand-WJ3U6KZU.js → dialogUsageCommand-EUO6JXTD.js} +6 -3
- package/{docCreateCommands-QLRIWRQE.js → docCreateCommands-H4RLIUNX.js} +68 -59
- package/{docDeleteCommands-XPRYA532.js → docDeleteCommands-OVAKCBMT.js} +68 -59
- package/{docReadCommands-EXQI7ETH.js → docReadCommands-KFISIUVA.js} +67 -58
- package/{docStore-MWFUKZL2.js → docStore-X7BEA735.js} +16 -17
- package/{docUpdateCommands-EFBFQV77.js → docUpdateCommands-VOEER36L.js} +68 -59
- package/{ebookDownloaderAgentCommand-DYSKF5ZY.js → ebookDownloaderAgentCommand-2DHPGEOQ.js} +14 -17
- package/{fetchMessages-TQEUZD7H.js → fetchMessages-RGPIYEPZ.js} +2 -2
- package/{getPricing-5BLZRPTM.js → getPricing-BK6CUBAE.js} +8 -4
- package/{handleSendMessageAction-GG3TR62X.js → handleSendMessageAction-GQ2KKOET.js} +265 -119
- package/{hostCredentialCreate-26S6DDJ5.js → hostCredentialCreate-PJAIKZQP.js} +138 -122
- package/index.js +35 -21
- package/{keys-RWF7UCB4.js → keys-FXEGMKSG.js} +2 -2
- package/localAutomationCommands-UU66LOWB.js +198 -0
- package/localAutomationRuntime-SW4R42SZ.js +60 -0
- package/{localDialogRead-BJJT3TF5.js → localDialogRead-W2EVXISA.js} +2 -2
- package/{localRuntimeAdapter-VREWZWPC.js → localRuntimeAdapter-WRBLXFUZ.js} +136 -119
- package/localRuntimeAuthority-3YDFZD3L.js +44 -0
- package/{localRuntimeDb-ZJFGNHML.js → localRuntimeDb-CJWJK47G.js} +1 -1
- package/{machineCommands-CL5XK5UC.js → machineCommands-JFYED66N.js} +251 -357
- package/{machineInfo-LWHTEBHJ.js → machineInfo-BJIU3WQ5.js} +4 -2
- package/machineWsRunDispatch-CZUV2FXE.js +227 -0
- package/{mcpLocalAuthorizeCommand-RBXJDE6J.js → mcpLocalAuthorizeCommand-HLU72QME.js} +40 -22
- package/mcpLocalManageCommands-OHHU6F5C.js +212 -0
- package/{memberThunks-43B7UYC5.js → memberThunks-FJW4GPM5.js} +102 -22
- package/{memoryCommands-BC6REPQB.js → memoryCommands-2RLHDMU2.js} +25 -34
- package/{models-ZX2BYIMB.js → models-TOXYINNM.js} +3 -2
- package/{offlineMarxistsAgentCommand-XVXUE6G5.js → offlineMarxistsAgentCommand-WZBJBCPZ.js} +16 -22
- package/package.json +3 -3
- package/parityCommands-7EWR34P3.js +613 -0
- package/{projectArchive-OC63TWTD.js → projectArchive-JIVRMXVV.js} +49 -45
- package/{providerPresetApply-NTJUINI6.js → providerPresetApply-IRJ56XIZ.js} +12 -16
- package/{providerRegistry-W45SLUV6.js → providerRegistry-26PAUYH2.js} +3 -13
- package/{read-KG6INYUT.js → read-6YR57D6V.js} +11 -10
- package/{readDocTool-N3GA52JR.js → readDocTool-NKOGL2MW.js} +5 -1
- package/{readlineWorkspace-2NO6D6IZ.js → readlineWorkspace-V26AN2FL.js} +926 -572
- package/{rememberExplicit-CPAPONSI.js → rememberExplicit-7KX4HXQC.js} +4 -4
- package/remove-BF33RCTH.js +32 -0
- package/{removeDialogAgentAction-EEVSOQOJ.js → removeDialogAgentAction-GWHBWF4W.js} +22 -26
- package/{runAgentClientLoop-U7V32UTD.js → runAgentClientLoop-EKD2EEEA.js} +117 -82
- package/{runtimeDoctorCommands-V3M3JTUV.js → runtimeDoctorCommands-IALUR5BZ.js} +23 -16
- package/{secretCommands-KVVZS7A6.js → secretCommands-CSTQYB6T.js} +2 -2
- package/{setDialogExtraReferencesAction-DNO5POHA.js → setDialogExtraReferencesAction-RL6FGO7T.js} +16 -17
- package/{setPrimaryDialogAgentAction-QABBEO4C.js → setPrimaryDialogAgentAction-XJASBB3K.js} +23 -27
- package/{settingThunks-DVKG4X4S.js → settingThunks-ZT7ZYXXL.js} +170 -497
- package/{skillDiscovery-5GEGWJ6N.js → skillDiscovery-IUEZZG2B.js} +3 -3
- package/{spaceCommands-7QKXKBDQ.js → spaceCommands-65WQHVOI.js} +68 -57
- package/spacePruneCommand-PTMRUWYJ.js +233 -0
- package/{store-Z53ICFL3.js → store-WSAVTR32.js} +3 -1
- package/{streamAgentChatTurn-UAGFOXNJ.js → streamAgentChatTurn-B5NICHZW.js} +225 -137
- package/{switchDialogAgentAction-KYWJSGOO.js → switchDialogAgentAction-X6DFOIAX.js} +19 -23
- package/{tableCommands-EFA754RE.js → tableCommands-6E77VD73.js} +28 -49
- package/{toolApiClient-N5PYW2R3.js → toolApiClient-GTTWEV6P.js} +15 -4
- package/{tools-2Q2LBDUC.js → tools-UMCPIQX6.js} +73 -63
- package/{tuiRestart-4QDWLHYZ.js → tuiRestart-O7UDLNQU.js} +20 -13
- package/tuiSummaryLlmCaller-7APIUIIV.js +52 -0
- package/{updateCommands-GJGRS6JK.js → updateCommands-DXDIAQFS.js} +12 -7
- package/{updateDialogTitleAction-GGNTTI5L.js → updateDialogTitleAction-HZLKWVKM.js} +57 -58
- package/{usageCommand-WI6SQOPB.js → usageCommand-WYLNBDHB.js} +6 -8
- package/{usageRebuildCommand-WQRLLZAT.js → usageRebuildCommand-AEUPY2PE.js} +11 -15
- package/{windowsSelfUpdate-C7LGVWYX.js → windowsSelfUpdate-SXSVXK4X.js} +2 -2
- package/workContext-ZAW6VXT7.js +18 -0
- package/workContextQueryProjection-CACY5VFE.js +23 -0
- package/{workloadLifecycle-DYX5ZMAT.js → workloadLifecycle-P2SJVV3S.js} +1 -1
- package/agentFavoriteCommands-7LOP3HUD.js +0 -186
- package/agentRecordCommands-TPE7NSZ6.js +0 -194
- package/agentRunCommand-DMVGBPLI.js +0 -232
- package/chunk-2MBTWINN.js +0 -89
- package/chunk-523DITKR.js +0 -32
- package/chunk-BUDVRYES.js +0 -2213
- package/chunk-BZMDWGQQ.js +0 -47
- package/chunk-GAHJLSDO.js +0 -107
- package/chunk-GYX6XTAI.js +0 -84
- package/chunk-HNUWUO75.js +0 -93
- package/chunk-HSBHS6KT.js +0 -33401
- package/chunk-KG27JIG4.js +0 -136
- package/chunk-OB4FBZXJ.js +0 -364
- package/chunk-OKH74FML.js +0 -3746
- package/chunk-OLZBQWZU.js +0 -6
- package/chunk-OOV5JN25.js +0 -1317
- package/chunk-OQFOE4SJ.js +0 -405
- package/chunk-PXYBUFDB.js +0 -53
- package/chunk-R3FZHW4Q.js +0 -103
- package/chunk-R3MV2GII.js +0 -106
- package/chunk-SCAC3NM5.js +0 -11751
- package/chunk-SR4FE5VD.js +0 -9
- package/chunk-SYTHYBMI.js +0 -3558
- package/chunk-UKZX3NHN.js +0 -48
- package/chunk-UVLYNWIE.js +0 -74
- package/chunk-VQX5JJNI.js +0 -861
- package/chunk-X4O7FJF5.js +0 -160
- package/chunk-YJPK35HB.js +0 -175
- package/chunk-YNIYE47Z.js +0 -105
- package/chunk-Z4PCXPUE.js +0 -127
- package/chunk-ZR5IVL4N.js +0 -862
- package/chunk-ZTHAJU3O.js +0 -2537
- package/cliAuthorityBrokerProcess-5ZFBTHLB.js +0 -22
- package/cliLocalAgentRecordReader-34UKRBLY.js +0 -104
- package/deleteFile-ECU6FU5C.js +0 -55
- package/localRuntimeAuthority-UF2DAQ3F.js +0 -28
- package/machineWsRunDispatch-TBVOYOAH.js +0 -209
- package/markdownToSlate-PXYAIBVL.js +0 -8
- package/tuiSummaryLlmCaller-HROLGN4F.js +0 -45
- package/webapi-QVV65DQF.js +0 -2487
- package/workContext-Y3ADAPZU.js +0 -14
- package/{chunk-USGHJSGO.js → chunk-GX2MFKF3.js} +3 -3
- package/{chunk-PHREU2KZ.js → chunk-WX266G2C.js} +0 -0
- package/{chunk-DXWGFL2Z.js → chunk-YY7IGJMN.js} +3 -3
|
@@ -1,44 +1,52 @@
|
|
|
1
1
|
import {
|
|
2
|
-
createSelector,
|
|
3
2
|
noloDeleteRequest,
|
|
4
3
|
noloPatchRequest,
|
|
5
4
|
noloUploadRequest,
|
|
6
5
|
noloWriteRequest,
|
|
7
6
|
syncWithServers
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import {
|
|
10
|
-
getAllServers,
|
|
11
|
-
getIsDesktopApp,
|
|
12
|
-
googleSessionServer,
|
|
13
|
-
scopeGoogleSessionServers
|
|
14
|
-
} from "./chunk-HDKMVYNJ.js";
|
|
7
|
+
} from "./chunk-AMTF6FJD.js";
|
|
15
8
|
import {
|
|
16
9
|
fnv1a32
|
|
17
10
|
} from "./chunk-UEILX4EV.js";
|
|
18
11
|
import {
|
|
12
|
+
getRuntimeServerSnapshot,
|
|
13
|
+
normalizeAuthorityServerOrigin,
|
|
14
|
+
require_react,
|
|
15
|
+
resolveUserAuthorityServer,
|
|
19
16
|
selectIdentityToken,
|
|
20
17
|
selectIdentityUser,
|
|
21
18
|
selectIdentityUserId
|
|
22
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-YM5XULB2.js";
|
|
20
|
+
import {
|
|
21
|
+
getAllServers,
|
|
22
|
+
getIsDesktopApp,
|
|
23
|
+
googleSessionServer,
|
|
24
|
+
scopeGoogleSessionServers
|
|
25
|
+
} from "./chunk-I3NWAILT.js";
|
|
23
26
|
import {
|
|
24
|
-
|
|
27
|
+
getRecordTimestamp,
|
|
28
|
+
isTombstoneRecord,
|
|
29
|
+
shouldReplaceWithNextRecord
|
|
25
30
|
} from "./chunk-BV3FLP2L.js";
|
|
26
31
|
import {
|
|
27
32
|
isTokenStatsKey
|
|
28
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-DLXL4NSL.js";
|
|
29
34
|
import {
|
|
30
|
-
|
|
31
|
-
} from "./chunk-
|
|
32
|
-
import {
|
|
33
|
-
SERVERS,
|
|
34
|
-
normalizeKnownServerOrigin
|
|
35
|
-
} from "./chunk-LCBAMY2M.js";
|
|
35
|
+
isDialogRecordKey
|
|
36
|
+
} from "./chunk-OJKUU3LP.js";
|
|
36
37
|
import {
|
|
37
38
|
asTrimmedString
|
|
38
39
|
} from "./chunk-3EUW3WEO.js";
|
|
40
|
+
import {
|
|
41
|
+
asOptionalPositiveFiniteNumber
|
|
42
|
+
} from "./chunk-U6VC4MU4.js";
|
|
39
43
|
import {
|
|
40
44
|
isRecord
|
|
41
45
|
} from "./chunk-KUG52IAP.js";
|
|
46
|
+
import {
|
|
47
|
+
SERVERS,
|
|
48
|
+
normalizeKnownServerOrigin
|
|
49
|
+
} from "./chunk-LCBAMY2M.js";
|
|
42
50
|
import {
|
|
43
51
|
asOptionalTrimmedString
|
|
44
52
|
} from "./chunk-G3SUCT4W.js";
|
|
@@ -48,97 +56,143 @@ import {
|
|
|
48
56
|
import {
|
|
49
57
|
normalizeServerOrigin
|
|
50
58
|
} from "./chunk-CF7PE763.js";
|
|
59
|
+
import {
|
|
60
|
+
__toESM
|
|
61
|
+
} from "./chunk-U67V476Y.js";
|
|
51
62
|
|
|
52
|
-
// packages/
|
|
53
|
-
var
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
var selectConfiguredSyncServers = (state) => state.settings?.syncServers;
|
|
68
|
-
var selectRuntimeRemoteSyncServers = createSelector(
|
|
69
|
-
[selectConfiguredSyncServers],
|
|
70
|
-
(syncServers) => {
|
|
71
|
-
if (!Array.isArray(syncServers) || syncServers.length === 0) {
|
|
72
|
-
return EMPTY_SYNC_SERVERS;
|
|
63
|
+
// packages/core/keyedTaskQueue.ts
|
|
64
|
+
var queues = /* @__PURE__ */ new Map();
|
|
65
|
+
async function runKeyed(key, task) {
|
|
66
|
+
const previous = queues.get(key) ?? Promise.resolve();
|
|
67
|
+
const next = previous.catch(() => void 0).then(task);
|
|
68
|
+
const cleanup = next.then(
|
|
69
|
+
() => void 0,
|
|
70
|
+
() => void 0
|
|
71
|
+
);
|
|
72
|
+
queues.set(key, cleanup);
|
|
73
|
+
try {
|
|
74
|
+
return await next;
|
|
75
|
+
} finally {
|
|
76
|
+
if (queues.get(key) === cleanup) {
|
|
77
|
+
queues.delete(key);
|
|
73
78
|
}
|
|
74
|
-
const normalized = syncServers.map(normalizeKnownServerOrigin).filter((server) => !!server);
|
|
75
|
-
if (!getIsDesktopApp()) return normalized;
|
|
76
|
-
return normalized.filter((server) => !isLocalServerUrl(server));
|
|
77
79
|
}
|
|
78
|
-
|
|
79
|
-
var selectLocalRuntimeOrigin = () => {
|
|
80
|
-
if (typeof window !== "undefined" && typeof window.location?.origin === "string" && /^https?:\/\//.test(window.location.origin)) {
|
|
81
|
-
return window.location.origin.replace(/\/+$/, "");
|
|
82
|
-
}
|
|
83
|
-
return void 0;
|
|
84
|
-
};
|
|
85
|
-
var selectRuntimeSnapshot = createSelector(
|
|
86
|
-
[
|
|
87
|
-
selectCurrentToken,
|
|
88
|
-
selectCurrentUserId,
|
|
89
|
-
selectRuntimeRemoteServer,
|
|
90
|
-
selectRuntimeRemoteSyncServers,
|
|
91
|
-
selectLocalRuntimeOrigin
|
|
92
|
-
],
|
|
93
|
-
(currentToken, currentUserId, currentServer, syncServers, localRuntimeOrigin) => ({
|
|
94
|
-
currentToken,
|
|
95
|
-
currentUserId,
|
|
96
|
-
currentServer: googleSessionServer(currentToken, currentServer) ?? currentServer,
|
|
97
|
-
syncServers: googleSessionServer(currentToken, currentServer) === void 0 ? syncServers : [],
|
|
98
|
-
localRuntimeOrigin
|
|
99
|
-
})
|
|
100
|
-
);
|
|
101
|
-
var selectRuntimeCurrentServer = createSelector(
|
|
102
|
-
[selectRuntimeSnapshot],
|
|
103
|
-
(runtime) => runtime.currentServer
|
|
104
|
-
);
|
|
105
|
-
var selectRuntimeRemoteServers = createSelector(
|
|
106
|
-
[selectRuntimeSnapshot],
|
|
107
|
-
(runtime) => scopeGoogleSessionServers(runtime.currentToken, runtime.currentServer, getAllServers(runtime.currentServer, runtime.syncServers))
|
|
108
|
-
);
|
|
80
|
+
}
|
|
109
81
|
|
|
110
|
-
// packages/database/
|
|
111
|
-
var
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
82
|
+
// packages/database/actions/readResolution.ts
|
|
83
|
+
var toComparableTimestamp = (data) => {
|
|
84
|
+
if (!data || typeof data !== "object") return 0;
|
|
85
|
+
const updatedAtMs = asOptionalPositiveFiniteNumber(
|
|
86
|
+
new Date(data.updatedAt).getTime()
|
|
87
|
+
);
|
|
88
|
+
if (updatedAtMs !== void 0) return updatedAtMs;
|
|
89
|
+
const createdAtMs = asOptionalPositiveFiniteNumber(
|
|
90
|
+
new Date(data.createdAt).getTime()
|
|
91
|
+
);
|
|
92
|
+
if (createdAtMs !== void 0) return createdAtMs;
|
|
93
|
+
return asOptionalPositiveFiniteNumber(Number(data?.meta?.createdAt)) ?? 0;
|
|
94
|
+
};
|
|
95
|
+
var partitionReadServers = ({
|
|
96
|
+
allServers,
|
|
97
|
+
preferredServerOrigin
|
|
98
|
+
}) => {
|
|
99
|
+
const preferredServer = typeof preferredServerOrigin === "string" && preferredServerOrigin.trim().length > 0 ? normalizeServerOrigin(preferredServerOrigin) : null;
|
|
100
|
+
const fallbackServers = preferredServer ? allServers.filter(
|
|
101
|
+
(server) => normalizeServerOrigin(server) !== preferredServer
|
|
102
|
+
) : allServers;
|
|
118
103
|
return {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
syncServers,
|
|
123
|
-
userAuthorityRegistry: resolveRuntimeUserAuthorityRegistry(state),
|
|
124
|
-
remoteServers: scopeGoogleSessionServers(currentToken, currentServer, getAllServers(
|
|
125
|
-
currentServer,
|
|
126
|
-
syncServers,
|
|
127
|
-
preferredServerOrigin
|
|
128
|
-
))
|
|
104
|
+
preferredServer,
|
|
105
|
+
fallbackServers,
|
|
106
|
+
orderedServersForLocalHit: preferredServer ? [preferredServer, ...fallbackServers] : fallbackServers
|
|
129
107
|
};
|
|
130
108
|
};
|
|
131
|
-
var
|
|
132
|
-
|
|
133
|
-
if (
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
109
|
+
var compareRemoteRecordsByComparableTime = (left, right) => toComparableTimestamp(left) - toComparableTimestamp(right);
|
|
110
|
+
var isPageRecord = (record) => {
|
|
111
|
+
if (!record || typeof record !== "object") return false;
|
|
112
|
+
if (typeof record.type === "string") return record.type === "page";
|
|
113
|
+
return typeof record.dbKey === "string" && record.dbKey.startsWith("page-");
|
|
114
|
+
};
|
|
115
|
+
var hasRecordBodyPayload = (record) => {
|
|
116
|
+
if (!record || typeof record !== "object") return false;
|
|
117
|
+
if (Array.isArray(record.slateData)) return true;
|
|
118
|
+
return typeof record.content === "string";
|
|
119
|
+
};
|
|
120
|
+
var shouldPreferRemoteBodyOverLocalProjection = (localData, remoteData) => {
|
|
121
|
+
if (!isPageRecord(localData) || !isPageRecord(remoteData)) return false;
|
|
122
|
+
if (isTombstoneRecord(localData) || isTombstoneRecord(remoteData)) return false;
|
|
123
|
+
if (!hasRecordBodyPayload(remoteData)) return false;
|
|
124
|
+
if (hasRecordBodyPayload(localData)) return false;
|
|
125
|
+
return compareRemoteRecordsByComparableTime(localData, remoteData) <= 0;
|
|
126
|
+
};
|
|
127
|
+
var isDialogRecord = (record) => {
|
|
128
|
+
if (!record || typeof record !== "object") return false;
|
|
129
|
+
if (typeof record.type === "string") return record.type === "dialog";
|
|
130
|
+
return typeof record.dbKey === "string" && isDialogRecordKey(record.dbKey);
|
|
131
|
+
};
|
|
132
|
+
var hasDialogContinuityMetadata = (record) => record?.runtimeBinding?.target != null || record?.originMachineId != null || record?.originCwd != null || record?.localRuntime != null || asOptionalPositiveFiniteNumber(record?.dialogRevision) !== void 0;
|
|
133
|
+
var hasFullDialogPayload = (record) => hasDialogContinuityMetadata(record) || record?.runtimeBinding?.version === 1;
|
|
134
|
+
var isDialogSummaryDowngrade = (candidate, baseline) => isDialogRecord(candidate) && isDialogRecord(baseline) && !isTombstoneRecord(candidate) && !isTombstoneRecord(baseline) && !hasFullDialogPayload(candidate) && hasFullDialogPayload(baseline);
|
|
135
|
+
var isTableMetaRecord = (record) => {
|
|
136
|
+
if (!record || typeof record !== "object") return false;
|
|
137
|
+
if (typeof record.type === "string") return record.type === "table";
|
|
138
|
+
return typeof record.dbKey === "string" && (record.dbKey.startsWith("meta-") || record.dbKey.startsWith("table-"));
|
|
139
|
+
};
|
|
140
|
+
var hasTableMetaSchemaPayload = (record) => Boolean(record && typeof record === "object" && Array.isArray(record.columns));
|
|
141
|
+
var isTableMetaSummaryDowngrade = (candidate, baseline) => isTableMetaRecord(candidate) && isTableMetaRecord(baseline) && !isTombstoneRecord(candidate) && !isTombstoneRecord(baseline) && !hasTableMetaSchemaPayload(candidate) && hasTableMetaSchemaPayload(baseline);
|
|
142
|
+
var shouldPreferRemoteTableMetaOverLocalProjection = (localData, remoteData) => {
|
|
143
|
+
if (!isTableMetaRecord(localData) || !isTableMetaRecord(remoteData)) return false;
|
|
144
|
+
if (isTombstoneRecord(localData) || isTombstoneRecord(remoteData)) return false;
|
|
145
|
+
if (!hasTableMetaSchemaPayload(remoteData) || hasTableMetaSchemaPayload(localData)) return false;
|
|
146
|
+
return compareRemoteRecordsByComparableTime(localData, remoteData) <= 0;
|
|
147
|
+
};
|
|
148
|
+
var withDialogCacheWrite = (dbKey, task) => isDialogRecordKey(dbKey) ? runKeyed(`dialog-client-cache:${dbKey}`, task) : task();
|
|
149
|
+
var pickBestSettledRemoteRecord = ({
|
|
150
|
+
settledResults,
|
|
151
|
+
isBetterCandidate
|
|
152
|
+
}) => {
|
|
153
|
+
const validResults = settledResults.map((result, index) => ({
|
|
154
|
+
data: result.status === "fulfilled" ? result.value : null,
|
|
155
|
+
index
|
|
156
|
+
})).filter((item) => item.data !== null && typeof item.data === "object");
|
|
157
|
+
if (validResults.length === 0) return null;
|
|
158
|
+
const latest = validResults.reduce(
|
|
159
|
+
(best, current) => isBetterCandidate(current.data, best.data) ? current : best
|
|
160
|
+
);
|
|
161
|
+
return { index: latest.index, data: latest.data };
|
|
162
|
+
};
|
|
163
|
+
var shouldReplaceLocalWithRemoteRecord = ({
|
|
164
|
+
localData,
|
|
165
|
+
remoteData,
|
|
166
|
+
isRemoteNewer = shouldReplaceWithNextRecord,
|
|
167
|
+
fromDetailRead = false
|
|
168
|
+
}) => {
|
|
169
|
+
if (!remoteData || typeof remoteData !== "object") return false;
|
|
170
|
+
if (!localData || typeof localData !== "object") return true;
|
|
171
|
+
if (shouldPreferRemoteBodyOverLocalProjection(localData, remoteData)) return true;
|
|
172
|
+
if (shouldPreferRemoteTableMetaOverLocalProjection(localData, remoteData)) return true;
|
|
173
|
+
if (!fromDetailRead && (isDialogSummaryDowngrade(remoteData, localData) || isTableMetaSummaryDowngrade(remoteData, localData))) return false;
|
|
174
|
+
if (isDialogSummaryDowngrade(localData, remoteData) && getRecordTimestamp(remoteData) === getRecordTimestamp(localData)) return true;
|
|
175
|
+
return isRemoteNewer(remoteData, localData);
|
|
176
|
+
};
|
|
177
|
+
var shouldReplicateLocalRecord = ({
|
|
178
|
+
localData,
|
|
179
|
+
remoteData,
|
|
180
|
+
remoteTargetCount
|
|
181
|
+
}) => !!localData && !remoteData && remoteTargetCount > 0;
|
|
182
|
+
var compactUniqueServers = (servers) => {
|
|
183
|
+
const out = [];
|
|
184
|
+
for (const server of servers) {
|
|
185
|
+
if (typeof server !== "string" || server.trim().length === 0) continue;
|
|
186
|
+
const normalized = normalizeServerOrigin(server);
|
|
187
|
+
if (!out.includes(normalized)) out.push(normalized);
|
|
139
188
|
}
|
|
140
|
-
return
|
|
189
|
+
return out;
|
|
141
190
|
};
|
|
191
|
+
var planAuthorityReadServers = ({
|
|
192
|
+
allServers,
|
|
193
|
+
authorityServer,
|
|
194
|
+
serverOrigin
|
|
195
|
+
}) => compactUniqueServers([authorityServer, serverOrigin, ...allServers]);
|
|
142
196
|
|
|
143
197
|
// packages/database/authority/ownerKey.ts
|
|
144
198
|
var USER_OWNED_SECOND_SEGMENT_PREFIXES = /* @__PURE__ */ new Set([
|
|
@@ -293,34 +347,8 @@ var resolveRecordOwnerUserId = (record) => {
|
|
|
293
347
|
return fromKey;
|
|
294
348
|
};
|
|
295
349
|
|
|
296
|
-
// packages/database/authority/userAuthorityRegistry.ts
|
|
297
|
-
var normalizeAuthorityServerOrigin = (value) => {
|
|
298
|
-
const normalized = normalizeServerOrigin(value);
|
|
299
|
-
return /^https?:\/\//i.test(normalized) ? normalized : null;
|
|
300
|
-
};
|
|
301
|
-
var normalizeUserId = (value) => asOptionalTrimmedString(value) ?? null;
|
|
302
|
-
var readEntryAuthorityServer = (entry) => {
|
|
303
|
-
if (typeof entry === "string") {
|
|
304
|
-
return normalizeAuthorityServerOrigin(entry);
|
|
305
|
-
}
|
|
306
|
-
if (!isRecord(entry)) {
|
|
307
|
-
return null;
|
|
308
|
-
}
|
|
309
|
-
return normalizeAuthorityServerOrigin(entry.authorityServer) ?? normalizeAuthorityServerOrigin(entry.homeServer) ?? normalizeAuthorityServerOrigin(entry.primaryServer);
|
|
310
|
-
};
|
|
311
|
-
var resolveUserAuthorityServer = ({
|
|
312
|
-
ownerUserId,
|
|
313
|
-
registry
|
|
314
|
-
}) => {
|
|
315
|
-
const normalizedOwner = normalizeUserId(ownerUserId);
|
|
316
|
-
if (!normalizedOwner || !registry || typeof registry !== "object") {
|
|
317
|
-
return null;
|
|
318
|
-
}
|
|
319
|
-
return readEntryAuthorityServer(registry[normalizedOwner]);
|
|
320
|
-
};
|
|
321
|
-
|
|
322
350
|
// packages/database/authority/recordAuthority.ts
|
|
323
|
-
var
|
|
351
|
+
var normalizeUserId = (value) => asOptionalTrimmedString(value) ?? null;
|
|
324
352
|
var getRegistryOwnerCandidates = (registry) => isRecord(registry) ? Object.keys(registry) : [];
|
|
325
353
|
var resolveRecordAuthority = ({
|
|
326
354
|
dbKey,
|
|
@@ -331,18 +359,18 @@ var resolveRecordAuthority = ({
|
|
|
331
359
|
}) => {
|
|
332
360
|
const ownerUserId = parseOwnerUserIdFromDbKey(dbKey, {
|
|
333
361
|
candidateOwnerUserIds: [
|
|
334
|
-
|
|
335
|
-
|
|
362
|
+
normalizeUserId(record?.userId),
|
|
363
|
+
normalizeUserId(currentUserId),
|
|
336
364
|
...getRegistryOwnerCandidates(userAuthorityRegistry)
|
|
337
365
|
]
|
|
338
|
-
}) ??
|
|
366
|
+
}) ?? normalizeUserId(record?.userId);
|
|
339
367
|
const serverOrigin = normalizeAuthorityServerOrigin(record?.serverOrigin);
|
|
340
368
|
const explicitAuthority = normalizeAuthorityServerOrigin(record?.authorityServer);
|
|
341
369
|
const registryAuthority = resolveUserAuthorityServer({
|
|
342
370
|
ownerUserId,
|
|
343
371
|
registry: userAuthorityRegistry
|
|
344
372
|
});
|
|
345
|
-
const currentUserAuthority = ownerUserId && ownerUserId ===
|
|
373
|
+
const currentUserAuthority = ownerUserId && ownerUserId === normalizeUserId(currentUserId) ? normalizeAuthorityServerOrigin(currentServer) : null;
|
|
346
374
|
return {
|
|
347
375
|
ownerUserId,
|
|
348
376
|
authorityServer: explicitAuthority ?? registryAuthority ?? currentUserAuthority ?? serverOrigin,
|
|
@@ -350,95 +378,6 @@ var resolveRecordAuthority = ({
|
|
|
350
378
|
};
|
|
351
379
|
};
|
|
352
380
|
|
|
353
|
-
// packages/database/actions/readResolution.ts
|
|
354
|
-
var toComparableTimestamp = (data) => {
|
|
355
|
-
if (!data || typeof data !== "object") return 0;
|
|
356
|
-
const updatedAtMs = asOptionalPositiveFiniteNumber(
|
|
357
|
-
new Date(data.updatedAt).getTime()
|
|
358
|
-
);
|
|
359
|
-
if (updatedAtMs !== void 0) return updatedAtMs;
|
|
360
|
-
const createdAtMs = asOptionalPositiveFiniteNumber(
|
|
361
|
-
new Date(data.createdAt).getTime()
|
|
362
|
-
);
|
|
363
|
-
if (createdAtMs !== void 0) return createdAtMs;
|
|
364
|
-
return asOptionalPositiveFiniteNumber(Number(data?.meta?.createdAt)) ?? 0;
|
|
365
|
-
};
|
|
366
|
-
var partitionReadServers = ({
|
|
367
|
-
allServers,
|
|
368
|
-
preferredServerOrigin
|
|
369
|
-
}) => {
|
|
370
|
-
const preferredServer = typeof preferredServerOrigin === "string" && preferredServerOrigin.trim().length > 0 ? normalizeServerOrigin(preferredServerOrigin) : null;
|
|
371
|
-
const fallbackServers = preferredServer ? allServers.filter(
|
|
372
|
-
(server) => normalizeServerOrigin(server) !== preferredServer
|
|
373
|
-
) : allServers;
|
|
374
|
-
return {
|
|
375
|
-
preferredServer,
|
|
376
|
-
fallbackServers,
|
|
377
|
-
orderedServersForLocalHit: preferredServer ? [preferredServer, ...fallbackServers] : fallbackServers
|
|
378
|
-
};
|
|
379
|
-
};
|
|
380
|
-
var compareRemoteRecordsByComparableTime = (left, right) => toComparableTimestamp(left) - toComparableTimestamp(right);
|
|
381
|
-
var isPageRecord = (record) => {
|
|
382
|
-
if (!record || typeof record !== "object") return false;
|
|
383
|
-
if (typeof record.type === "string") return record.type === "page";
|
|
384
|
-
return typeof record.dbKey === "string" && record.dbKey.startsWith("page-");
|
|
385
|
-
};
|
|
386
|
-
var hasRecordBodyPayload = (record) => {
|
|
387
|
-
if (!record || typeof record !== "object") return false;
|
|
388
|
-
if (Array.isArray(record.slateData)) return true;
|
|
389
|
-
return typeof record.content === "string";
|
|
390
|
-
};
|
|
391
|
-
var shouldPreferRemoteBodyOverLocalProjection = (localData, remoteData) => {
|
|
392
|
-
if (!isPageRecord(localData) || !isPageRecord(remoteData)) return false;
|
|
393
|
-
if (isTombstoneRecord(localData) || isTombstoneRecord(remoteData)) return false;
|
|
394
|
-
if (!hasRecordBodyPayload(remoteData)) return false;
|
|
395
|
-
if (hasRecordBodyPayload(localData)) return false;
|
|
396
|
-
return compareRemoteRecordsByComparableTime(localData, remoteData) <= 0;
|
|
397
|
-
};
|
|
398
|
-
var pickBestSettledRemoteRecord = ({
|
|
399
|
-
settledResults,
|
|
400
|
-
isBetterCandidate
|
|
401
|
-
}) => {
|
|
402
|
-
const validResults = settledResults.map((result, index) => ({
|
|
403
|
-
data: result.status === "fulfilled" ? result.value : null,
|
|
404
|
-
index
|
|
405
|
-
})).filter((item) => item.data !== null && typeof item.data === "object");
|
|
406
|
-
if (validResults.length === 0) return null;
|
|
407
|
-
const latest = validResults.reduce(
|
|
408
|
-
(best, current) => isBetterCandidate(current.data, best.data) ? current : best
|
|
409
|
-
);
|
|
410
|
-
return { index: latest.index, data: latest.data };
|
|
411
|
-
};
|
|
412
|
-
var shouldReplaceLocalWithRemoteRecord = ({
|
|
413
|
-
localData,
|
|
414
|
-
remoteData,
|
|
415
|
-
isRemoteNewer
|
|
416
|
-
}) => {
|
|
417
|
-
if (!remoteData || typeof remoteData !== "object") return false;
|
|
418
|
-
if (!localData || typeof localData !== "object") return true;
|
|
419
|
-
if (shouldPreferRemoteBodyOverLocalProjection(localData, remoteData)) return true;
|
|
420
|
-
return isRemoteNewer(remoteData, localData);
|
|
421
|
-
};
|
|
422
|
-
var shouldReplicateLocalRecord = ({
|
|
423
|
-
localData,
|
|
424
|
-
remoteData,
|
|
425
|
-
remoteTargetCount
|
|
426
|
-
}) => !!localData && !remoteData && remoteTargetCount > 0;
|
|
427
|
-
var compactUniqueServers = (servers) => {
|
|
428
|
-
const out = [];
|
|
429
|
-
for (const server of servers) {
|
|
430
|
-
if (typeof server !== "string" || server.trim().length === 0) continue;
|
|
431
|
-
const normalized = normalizeServerOrigin(server);
|
|
432
|
-
if (!out.includes(normalized)) out.push(normalized);
|
|
433
|
-
}
|
|
434
|
-
return out;
|
|
435
|
-
};
|
|
436
|
-
var planAuthorityReadServers = ({
|
|
437
|
-
allServers,
|
|
438
|
-
authorityServer,
|
|
439
|
-
serverOrigin
|
|
440
|
-
}) => compactUniqueServers([authorityServer, serverOrigin, ...allServers]);
|
|
441
|
-
|
|
442
381
|
// packages/database/fileRing.ts
|
|
443
382
|
var chooseServersByKey = (allServers, key, replicaCount) => {
|
|
444
383
|
if (!allServers.length || replicaCount <= 0) return [];
|
|
@@ -508,12 +447,15 @@ var beginWriteAck = (dbKey) => {
|
|
|
508
447
|
});
|
|
509
448
|
const entry = {
|
|
510
449
|
promise,
|
|
450
|
+
status: "pending",
|
|
511
451
|
settledAt: null,
|
|
512
452
|
servers: [],
|
|
513
453
|
primaryTargetKey: null,
|
|
514
454
|
planRegistered: false,
|
|
515
455
|
targetAcks: /* @__PURE__ */ new Map(),
|
|
516
456
|
settle: (status) => {
|
|
457
|
+
if (entry.settledAt !== null) return;
|
|
458
|
+
entry.status = status;
|
|
517
459
|
entry.settledAt = Date.now();
|
|
518
460
|
resolveOutcome(status);
|
|
519
461
|
}
|
|
@@ -594,6 +536,16 @@ var waitForWriteAck = async (dbKey, options = {}) => {
|
|
|
594
536
|
}
|
|
595
537
|
return { outcome: { status: raced }, timedOut: false, waitedMs, waitTarget };
|
|
596
538
|
};
|
|
539
|
+
var capturePendingWriteAck = (dbKey) => {
|
|
540
|
+
const entry = ackEntries.get(dbKey);
|
|
541
|
+
if (!entry || entry.status !== "pending") return void 0;
|
|
542
|
+
return {
|
|
543
|
+
get status() {
|
|
544
|
+
return entry.status;
|
|
545
|
+
},
|
|
546
|
+
outcome: entry.promise
|
|
547
|
+
};
|
|
548
|
+
};
|
|
597
549
|
|
|
598
550
|
// packages/database/actions/replication.ts
|
|
599
551
|
var isReadonlyPublicRecordKey = (dbKey) => dbKey.startsWith("agent-pub-");
|
|
@@ -623,7 +575,7 @@ var resolveAuthorityReplicationServers = ({
|
|
|
623
575
|
record,
|
|
624
576
|
currentUserId: selectIdentityUserId(state),
|
|
625
577
|
currentServer,
|
|
626
|
-
userAuthorityRegistry: state
|
|
578
|
+
userAuthorityRegistry: getRuntimeServerSnapshot(state).userAuthorityRegistry ?? selectIdentityUser(state)?.authorityRegistry
|
|
627
579
|
});
|
|
628
580
|
if (isDeviceLocalOwnerId(authority.ownerUserId) || isDeviceLocalOwnerId(record?.userId) || isDeviceLocalDbKey(dbKey)) {
|
|
629
581
|
return [];
|
|
@@ -720,7 +672,7 @@ var resolveUploadReplicationServers = ({
|
|
|
720
672
|
record: uploadConfig.metadata,
|
|
721
673
|
currentUserId: selectIdentityUserId(state),
|
|
722
674
|
currentServer,
|
|
723
|
-
userAuthorityRegistry: state
|
|
675
|
+
userAuthorityRegistry: getRuntimeServerSnapshot(state).userAuthorityRegistry ?? selectIdentityUser(state)?.authorityRegistry
|
|
724
676
|
});
|
|
725
677
|
if (authority.ownerUserId || authority.authorityServer) {
|
|
726
678
|
return scopeGoogleSessionServers(selectIdentityToken(state), currentServer, planAuthorityReadServers({
|
|
@@ -752,7 +704,7 @@ var scheduleExistingRecordReplication = ({
|
|
|
752
704
|
record: localData,
|
|
753
705
|
currentUserId,
|
|
754
706
|
currentServer,
|
|
755
|
-
userAuthorityRegistry: state
|
|
707
|
+
userAuthorityRegistry: getRuntimeServerSnapshot(state).userAuthorityRegistry ?? selectIdentityUser(state)?.authorityRegistry
|
|
756
708
|
});
|
|
757
709
|
if (authority.ownerUserId && currentUserId && authority.ownerUserId !== currentUserId) {
|
|
758
710
|
return [];
|
|
@@ -962,28 +914,106 @@ var scheduleDeleteReplication = ({
|
|
|
962
914
|
return servers;
|
|
963
915
|
};
|
|
964
916
|
|
|
917
|
+
// packages/app/stateViews/runtime.ts
|
|
918
|
+
var import_react = __toESM(require_react());
|
|
919
|
+
var selectCurrentToken = (state) => {
|
|
920
|
+
const token = selectIdentityToken(state);
|
|
921
|
+
return typeof token === "string" ? token : void 0;
|
|
922
|
+
};
|
|
923
|
+
var selectCurrentUserId = (state) => {
|
|
924
|
+
const userId = selectIdentityUserId(state);
|
|
925
|
+
return typeof userId === "string" ? userId : void 0;
|
|
926
|
+
};
|
|
927
|
+
var EMPTY_SYNC_SERVERS = [];
|
|
928
|
+
var normalizeServer = (currentServer) => {
|
|
929
|
+
const configured = normalizeKnownServerOrigin(currentServer) ?? void 0;
|
|
930
|
+
return (getIsDesktopApp() && isLocalServerUrl(configured) ? void 0 : configured) || SERVERS.MAIN;
|
|
931
|
+
};
|
|
932
|
+
var normalizeSyncServers = (syncServers) => {
|
|
933
|
+
if (!syncServers.length) return EMPTY_SYNC_SERVERS;
|
|
934
|
+
return syncServers.map(normalizeKnownServerOrigin).filter((server) => !!server && (!getIsDesktopApp() || !isLocalServerUrl(server)));
|
|
935
|
+
};
|
|
936
|
+
var selectLocalRuntimeOrigin = () => {
|
|
937
|
+
if (typeof window !== "undefined" && typeof window.location?.origin === "string" && /^https?:\/\//.test(window.location.origin)) {
|
|
938
|
+
return window.location.origin.replace(/\/+$/, "");
|
|
939
|
+
}
|
|
940
|
+
return void 0;
|
|
941
|
+
};
|
|
942
|
+
function resolveRuntimeSnapshot(servers, currentToken, currentUserId, localRuntimeOrigin) {
|
|
943
|
+
const currentServer = normalizeServer(servers.currentServer);
|
|
944
|
+
const googleServer = googleSessionServer(currentToken, currentServer);
|
|
945
|
+
return {
|
|
946
|
+
currentToken,
|
|
947
|
+
currentUserId,
|
|
948
|
+
currentServer: googleServer ?? currentServer,
|
|
949
|
+
syncServers: googleServer === void 0 ? normalizeSyncServers(servers.syncServers) : EMPTY_SYNC_SERVERS,
|
|
950
|
+
localRuntimeOrigin
|
|
951
|
+
};
|
|
952
|
+
}
|
|
953
|
+
var selectRuntimeSnapshot = (state) => resolveRuntimeSnapshot(
|
|
954
|
+
getRuntimeServerSnapshot(state),
|
|
955
|
+
selectCurrentToken(state),
|
|
956
|
+
selectCurrentUserId(state),
|
|
957
|
+
selectLocalRuntimeOrigin()
|
|
958
|
+
);
|
|
959
|
+
var selectRuntimeCurrentServer = (state) => selectRuntimeSnapshot(state).currentServer;
|
|
960
|
+
|
|
961
|
+
// packages/database/runtimeServerContext.ts
|
|
962
|
+
var getRuntimeServerContext = (state, preferredServerOrigin) => {
|
|
963
|
+
const {
|
|
964
|
+
currentToken,
|
|
965
|
+
currentUserId,
|
|
966
|
+
currentServer,
|
|
967
|
+
syncServers = []
|
|
968
|
+
} = selectRuntimeSnapshot(state);
|
|
969
|
+
return {
|
|
970
|
+
currentToken,
|
|
971
|
+
currentUserId,
|
|
972
|
+
currentServer,
|
|
973
|
+
syncServers,
|
|
974
|
+
userAuthorityRegistry: resolveRuntimeUserAuthorityRegistry(state),
|
|
975
|
+
remoteServers: scopeGoogleSessionServers(currentToken, currentServer, getAllServers(
|
|
976
|
+
currentServer,
|
|
977
|
+
syncServers,
|
|
978
|
+
preferredServerOrigin
|
|
979
|
+
))
|
|
980
|
+
};
|
|
981
|
+
};
|
|
982
|
+
var resolveRuntimeUserAuthorityRegistry = (state) => {
|
|
983
|
+
const settingsRegistry = getRuntimeServerSnapshot(state).userAuthorityRegistry;
|
|
984
|
+
if (settingsRegistry && typeof settingsRegistry === "object") {
|
|
985
|
+
return settingsRegistry;
|
|
986
|
+
}
|
|
987
|
+
const userRegistry = selectIdentityUser(state)?.authorityRegistry;
|
|
988
|
+
if (userRegistry && typeof userRegistry === "object") {
|
|
989
|
+
return userRegistry;
|
|
990
|
+
}
|
|
991
|
+
return void 0;
|
|
992
|
+
};
|
|
993
|
+
|
|
965
994
|
export {
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
995
|
+
runKeyed,
|
|
996
|
+
partitionReadServers,
|
|
997
|
+
compareRemoteRecordsByComparableTime,
|
|
998
|
+
shouldPreferRemoteBodyOverLocalProjection,
|
|
999
|
+
hasDialogContinuityMetadata,
|
|
1000
|
+
withDialogCacheWrite,
|
|
1001
|
+
pickBestSettledRemoteRecord,
|
|
1002
|
+
shouldReplaceLocalWithRemoteRecord,
|
|
1003
|
+
shouldReplicateLocalRecord,
|
|
1004
|
+
planAuthorityReadServers,
|
|
969
1005
|
parseOwnerUserIdFromDbKey,
|
|
970
1006
|
DEVICE_LOCAL_OWNER_ID,
|
|
971
1007
|
isDeviceLocalOwnerId,
|
|
972
1008
|
resolveEffectiveSpaceActorId,
|
|
973
1009
|
isDeviceLocalSpaceMembership,
|
|
974
1010
|
isDeviceLocalSpaceBody,
|
|
1011
|
+
isDeviceLocalDbKey,
|
|
975
1012
|
resolveRecordOwnerUserId,
|
|
976
|
-
resolveUserAuthorityServer,
|
|
977
1013
|
resolveRecordAuthority,
|
|
978
1014
|
beginWriteAck,
|
|
979
1015
|
waitForWriteAck,
|
|
980
|
-
|
|
981
|
-
compareRemoteRecordsByComparableTime,
|
|
982
|
-
shouldPreferRemoteBodyOverLocalProjection,
|
|
983
|
-
pickBestSettledRemoteRecord,
|
|
984
|
-
shouldReplaceLocalWithRemoteRecord,
|
|
985
|
-
shouldReplicateLocalRecord,
|
|
986
|
-
planAuthorityReadServers,
|
|
1016
|
+
capturePendingWriteAck,
|
|
987
1017
|
resolveReplicationServers,
|
|
988
1018
|
resolveAuthorityReplicationServers,
|
|
989
1019
|
scheduleWriteReplication,
|
|
@@ -992,5 +1022,8 @@ export {
|
|
|
992
1022
|
scheduleConfiguredPatchReplication,
|
|
993
1023
|
scheduleUploadReplication,
|
|
994
1024
|
uploadToCurrentServer,
|
|
995
|
-
scheduleDeleteReplication
|
|
1025
|
+
scheduleDeleteReplication,
|
|
1026
|
+
selectRuntimeSnapshot,
|
|
1027
|
+
selectRuntimeCurrentServer,
|
|
1028
|
+
getRuntimeServerContext
|
|
996
1029
|
};
|