nolo-cli 0.213.0 → 0.220.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/{_executeModel-CUJLCFWR.js → _executeModel-BNEMFCAO.js} +125 -96
- package/{accountResolver-4LKIHEKL.js → accountResolver-QETKNC7T.js} +4 -4
- package/{action-DF5UYSJF.js → action-GDZDXPMB.js} +14 -13
- package/{addContentAction-WERAONNY.js → addContentAction-7RO4AMRI.js} +21 -20
- package/{addDialogAgentAction-7VI7YRML.js → addDialogAgentAction-EVYBGTXB.js} +26 -25
- package/{agentDeleteCommand-XJORXPGU.js → agentDeleteCommand-7QTQNFCO.js} +145 -137
- package/{agentEmailCommands-XTYYFR6Z.js → agentEmailCommands-I7SHOSD6.js} +146 -139
- package/{agentFavoriteCommands-EDK743YA.js → agentFavoriteCommands-7LOP3HUD.js} +11 -12
- package/{agentGrantCommands-RQWK2TEV.js → agentGrantCommands-L6O2HVJI.js} +9 -9
- package/{agentListCommands-OBLRBLHS.js → agentListCommands-GUGMORTK.js} +180 -103
- package/{agentMachineCommands-5FMT3OT5.js → agentMachineCommands-UMDKILU3.js} +75 -66
- package/{agentProviderCommands-Q5O33MED.js → agentProviderCommands-STI3DQ6A.js} +8 -8
- package/{agentPullCommand-6EM3URVK.js → agentPullCommand-KHV4EELF.js} +11 -11
- package/agentRecordCommands-YTAMTHOY.js +175 -0
- package/agentRunCommand-DBM6YNO6.js +207 -0
- package/{agentRunControl-TAMHJQSR.js → agentRunControl-MBG4U6SL.js} +40 -19
- package/{agentRuntimeLocal-SOO2OPJG.js → agentRuntimeLocal-TU4LA353.js} +55 -48
- package/{agentSlice-CHR6KOZN.js → agentSlice-DPG7Q7IA.js} +24 -23
- package/{appDeleteCommands-GUP6P5YE.js → appDeleteCommands-JWP3XPUA.js} +67 -58
- package/{appDeployCommands-MH2FX4O5.js → appDeployCommands-6E4TQCWI.js} +67 -58
- package/{appDeployStatusCommands-SUHN3HPJ.js → appDeployStatusCommands-ALU4SADG.js} +67 -58
- package/{appGetCommands-YWDEX6Z4.js → appGetCommands-JEY4L6L4.js} +67 -58
- package/{appListCommands-ZQVMLPAY.js → appListCommands-PCAVHU7M.js} +67 -58
- package/{authCommand-PWX2ZNUP.js → authCommand-CGRIIOOV.js} +37 -33
- package/{authCommands-HV3EAU3V.js → authCommands-55OGQGCR.js} +16 -12
- package/{builtinSkillRegistry-2QETTQPM.js → builtinSkillRegistry-BAE2LDXF.js} +11 -13
- package/{chromeCommands-REEAH4SX.js → chromeCommands-G5UDKVSV.js} +3 -3
- package/{chromeOpsCommands-DIVM2K3T.js → chromeOpsCommands-WAA45NCS.js} +23 -13
- package/{chunk-VNYYOX3V.js → chunk-262R3XNN.js} +157 -50
- package/chunk-2MCB7CD7.js +98 -0
- package/{chunk-CTPXME7U.js → chunk-2NPD3FTX.js} +30 -7
- package/{chunk-YB3YZK56.js → chunk-2WZXXAQD.js} +1 -67
- package/{chunk-HRMJUN5J.js → chunk-2X7WFDT6.js} +1 -1
- package/chunk-2YGBI2XB.js +30 -0
- package/{chunk-TY3TIUJK.js → chunk-324FWHUA.js} +85 -3
- package/{chunk-KFLT5KAD.js → chunk-3NNXR7EH.js} +20 -20
- package/{chunk-ZRSNONOB.js → chunk-3P54D2E4.js} +8 -3
- package/{chunk-7OCO4TDT.js → chunk-3U44JB3O.js} +1 -1
- package/{chunk-TX5EYMGT.js → chunk-44J7Z5AQ.js} +34 -258
- package/chunk-4D4QD7FT.js +201 -0
- package/chunk-4I2MXV5Q.js +275 -0
- package/{chunk-MYOH447Z.js → chunk-4JVNURX4.js} +1 -1
- package/{chunk-COFEN36Z.js → chunk-4ZGPHFLE.js} +3 -3
- package/{chunk-ZXOUUDCG.js → chunk-53MFERZ3.js} +3869 -362
- package/chunk-547ENH5T.js +226 -0
- package/{chunk-YDH3FDFQ.js → chunk-5FUN7EG4.js} +1 -1
- package/{chunk-6DWMYIUY.js → chunk-5WKDR7HS.js} +14 -9
- package/chunk-5ZUOVCKT.js +32 -0
- package/{chunk-T43B7LB2.js → chunk-62HXNQVV.js} +1 -1
- package/{chunk-ZC3CMUKU.js → chunk-6OVNSQHN.js} +84 -2
- package/{chunk-IXNGOHV5.js → chunk-6QHKRARD.js} +12 -153
- package/{chunk-4T2WNOY7.js → chunk-6RDBLXVQ.js} +28 -17
- package/{chunk-EYLGAEB4.js → chunk-6XRPBZRS.js} +134 -0
- package/{chunk-KIM6CLW5.js → chunk-7JGMNKKG.js} +57 -26
- package/{chunk-P5L7CXOC.js → chunk-7Z6EW7AH.js} +3 -2
- package/chunk-AGYPUBFW.js +686 -0
- package/{chunk-Y63ZSOR6.js → chunk-AL3TYDIF.js} +1 -1
- package/{chunk-NOKUNJON.js → chunk-ALAES342.js} +75 -94
- package/{chunk-4I7ERB7F.js → chunk-ATEKLSLR.js} +2 -2
- package/{chunk-CRHOO2ZR.js → chunk-AUAJTAFM.js} +8 -8
- package/{chunk-LLRPJECG.js → chunk-AWIL6EHN.js} +15 -157
- package/chunk-BIDSIRTS.js +307 -0
- package/chunk-BIWI5M4E.js +62 -0
- package/{chunk-4VJAC32I.js → chunk-BNMPUQW6.js} +3 -2
- package/{chunk-RLBNLZVC.js → chunk-BP5ZJ6B4.js} +1 -1
- package/{chunk-NBTY7YJF.js → chunk-BR3GT6MR.js} +1 -0
- package/{chunk-7RFNTILS.js → chunk-BUDVRYES.js} +2 -2
- package/{chunk-SVYO6AO7.js → chunk-BV3FLP2L.js} +41 -1
- package/{chunk-ZL5RAEEB.js → chunk-CBUZ6DKA.js} +3 -3
- package/{chunk-SM3NSZJV.js → chunk-CD3RU7XL.js} +36 -2
- package/chunk-CMMI3DAT.js +1621 -0
- package/{chunk-J2NHJ7WX.js → chunk-CYWNWA77.js} +6 -6
- package/{chunk-MOIJOHA5.js → chunk-D6YNCNM6.js} +35 -21
- package/{chunk-H2TJUNCH.js → chunk-DBUR22G5.js} +16 -16
- package/chunk-DEA37IUY.js +271 -0
- package/{chunk-O2TZF4AI.js → chunk-DGYCDA6W.js} +4 -4
- package/{chunk-YWSEPJ7C.js → chunk-DUUDXSLX.js} +21 -7
- package/{chunk-KFHREHUQ.js → chunk-DXWGFL2Z.js} +89 -1
- package/{chunk-H5HF7TJA.js → chunk-EEOOBRA7.js} +6 -6
- package/{chunk-Y6ORVLSS.js → chunk-EVGU5P4U.js} +1 -1
- package/chunk-EWQ3HGNZ.js +90 -0
- package/{chunk-6VLJ6YA7.js → chunk-F6Z6ZCUV.js} +9 -9
- package/{chunk-75XIDFBW.js → chunk-FJ23FZXF.js} +72 -28
- package/chunk-FJSNBZXR.js +142 -0
- package/{chunk-WRYQ35LQ.js → chunk-G7IUT2V3.js} +860 -57
- package/{chunk-PCLE46CE.js → chunk-GBWGPTA7.js} +2 -1
- package/{chunk-H7PPIYWP.js → chunk-GPOV42YM.js} +19 -19
- package/{chunk-W4S457LU.js → chunk-GUXZK7SE.js} +42 -6
- package/{chunk-QHPRUL4O.js → chunk-GV6PRJBU.js} +4 -4
- package/{chunk-YUA6OAH5.js → chunk-HBRDSQ3M.js} +2 -2
- package/{chunk-G7MLNNEX.js → chunk-HHFGE2WF.js} +7 -7
- package/{chunk-OQPKUBPB.js → chunk-HSSBDZLD.js} +19 -7
- package/{chunk-EHSZD5OI.js → chunk-HXER7YJF.js} +4 -4
- package/{chunk-TAKB25RM.js → chunk-HYLRQDEE.js} +6 -6
- package/{chunk-LOEO7LRC.js → chunk-ILHQ2AXT.js} +10 -8
- package/{chunk-BBJ22CLB.js → chunk-JJMR2EA3.js} +64 -34
- package/{chunk-G2BQWAVT.js → chunk-JLAMNSBC.js} +4 -4
- package/{chunk-RSHTSUEG.js → chunk-JUSHVFNF.js} +2133 -622
- package/{chunk-YJAFKXMU.js → chunk-KHVFJSVE.js} +54 -49
- package/{chunk-X7SDOJUM.js → chunk-KRI6N5QZ.js} +16 -16
- package/{chunk-7BT37FK3.js → chunk-L32W3PRP.js} +675 -128
- package/chunk-LKA64WH4.js +227 -0
- package/{chunk-HUBHAQK2.js → chunk-LMRRCEDE.js} +31 -31
- package/chunk-M4SFKP5L.js +675 -0
- package/{chunk-MDB67IWP.js → chunk-MSMHU36U.js} +12 -12
- package/{chunk-7Y4YTDQF.js → chunk-MXKWTPUM.js} +288 -166
- package/{chunk-WYDI6TGM.js → chunk-MXRUXMZ3.js} +94 -135
- package/{chunk-AZMYUSVF.js → chunk-N5Z2V73W.js} +1 -1
- package/{chunk-QG4AOSON.js → chunk-NHY322ZU.js} +154 -32
- package/{chunk-UHJGXRJ4.js → chunk-OBIC6EG7.js} +6 -6
- package/{chunk-GOO6G4PY.js → chunk-OBSEKCVK.js} +123 -70
- package/{chunk-WMTBPBMP.js → chunk-OG6MQOQG.js} +130 -60
- package/{chunk-XJWWBO34.js → chunk-OJKUU3LP.js} +5 -7
- package/{chunk-ALQ3657A.js → chunk-OOJNQK6V.js} +21 -1
- package/{chunk-NSAPDIN2.js → chunk-OWKNSIXL.js} +679 -74
- package/{chunk-6XIE5ZGI.js → chunk-PDCV7P5W.js} +1 -1
- package/{chunk-A7TFUNZO.js → chunk-PPJYZRSQ.js} +6 -2
- package/{chunk-F6UUQOG6.js → chunk-Q3IVPFVO.js} +4 -4
- package/{chunk-VO4WSAVP.js → chunk-QBZCGP34.js} +3 -3
- package/chunk-QCB42576.js +13 -0
- package/chunk-QHEN7NZ7.js +46 -0
- package/{chunk-3UKL3HPD.js → chunk-QJTZ76CP.js} +32 -84
- package/{chunk-V5Y3R6BT.js → chunk-QRGDJA4B.js} +215 -212
- package/{chunk-4KB6WQUL.js → chunk-QYB23WUH.js} +1 -1
- package/{chunk-ZNWI6OVT.js → chunk-R44TU3MZ.js} +85 -11
- package/{chunk-PYRUW7XN.js → chunk-R6Z5S5GA.js} +139 -57
- package/{chunk-VL5KOY2C.js → chunk-R7XWZDOH.js} +125 -29
- package/{chunk-R5O4QAWG.js → chunk-RBPUNSG5.js} +11 -77
- package/{chunk-NJLL224W.js → chunk-RG2DGNL6.js} +3 -3
- package/{chunk-C6KNNXWU.js → chunk-RGQ4UUWZ.js} +25 -2
- package/{chunk-TCZHTTUU.js → chunk-RTHFJZ6M.js} +11 -11
- package/{chunk-RZOV7OMV.js → chunk-RYOLWYBK.js} +146 -200
- package/{chunk-OWYYDMGJ.js → chunk-S2NTVGA2.js} +4 -2
- package/{chunk-XHQC4PXX.js → chunk-S5NA3C52.js} +488 -226
- package/{secretCommands-LXDWOLZ6.js → chunk-S6FDXXZV.js} +190 -15
- package/chunk-S6K5F3KP.js +99 -0
- package/{chunk-INN4LTAJ.js → chunk-SRCCSTIM.js} +8 -8
- package/{chunk-JY5NGFFH.js → chunk-SYTHYBMI.js} +5 -5
- package/{chunk-UYD5HQ6T.js → chunk-SZVMASJ2.js} +3300 -1396
- package/{chunk-FUGMREBO.js → chunk-TGNIKIHR.js} +3 -3
- package/{chunk-HPFCI4SK.js → chunk-TI2EPRHE.js} +4 -4
- package/chunk-TLE77UJ5.js +230 -0
- package/chunk-TSPMLCWI.js +364 -0
- package/{chunk-YGILMZ7N.js → chunk-TUSTONB3.js} +1 -1
- package/{chunk-4VNS5WPM.js → chunk-U67V476Y.js} +1 -8
- package/{chunk-F7CI2ZC5.js → chunk-UAIHKQIA.js} +2 -1
- package/{chunk-WPORQFYN.js → chunk-UVLYNWIE.js} +2 -2
- package/{chunk-H4UOTUOX.js → chunk-VMJVAJ6W.js} +152 -19
- package/{chunk-KC4XDTT3.js → chunk-VS276URX.js} +4 -4
- package/{chunk-YTF4WH7J.js → chunk-WWTSEBDF.js} +1 -1
- package/{chunk-E2BESSAW.js → chunk-X4O7FJF5.js} +2 -0
- package/{chunk-RPQXPZZF.js → chunk-XSW4EXQV.js} +976 -17
- package/{chunk-7QTZCMKL.js → chunk-XTETTSKN.js} +3036 -2468
- package/{chunk-J5JTMQIA.js → chunk-YFLVRVYK.js} +1 -1
- package/chunk-YKY4OVOX.js +1141 -0
- package/{chunk-MMA3LZ3W.js → chunk-YNIYE47Z.js} +1 -1
- package/chunk-YZMNK53S.js +68 -0
- package/{chunk-FY7F4Q6X.js → chunk-Z4PCXPUE.js} +2 -2
- package/{chunk-INUFILG6.js → chunk-ZH3KXFHS.js} +11 -3
- package/chunk-ZOHO6MOF.js +376 -0
- package/{cliAgentConfigHelpers-WJBZQTLW.js → cliAgentConfigHelpers-BTRHMPW2.js} +18 -19
- package/{cliAuthorityBrokerClient-PM3U6Q6J.js → cliAuthorityBrokerClient-XHH7MH2P.js} +1 -1
- package/{cliAuthorityStoreDriver-TKLXNNTG.js → cliAuthorityStoreDriver-6FE3BJNB.js} +1 -1
- package/{cliEnvHelpers-BVYTMUPJ.js → cliEnvHelpers-CNMP3RDX.js} +3 -3
- package/{cliExecutor-BWBF2MTI.js → cliExecutor-K6FDZTQ2.js} +4 -2
- package/cliLocalAgentRecordReader-M3F76NIP.js +90 -0
- package/{commandRegistry-W63CYRZJ.js → commandRegistry-T3UBK6OA.js} +105 -97
- package/{contentThunks-U7PL5MQD.js → contentThunks-YEPZAHXU.js} +53 -48
- package/{cooldownCommands-TIGUHXTD.js → cooldownCommands-YB5H5BBK.js} +5 -4
- package/{createAgentAutomationAction-OLBQDD6R.js → createAgentAutomationAction-TBIIO5WT.js} +51 -48
- package/{createDialogAction-SVH6B3SB.js → createDialogAction-KBKMYFTQ.js} +52 -53
- package/{createPageAction-F4DIWZ2Z.js → createPageAction-3FGAPLJO.js} +56 -53
- package/{cursorProvider-YGGNMVWX.js → cursorProvider-2RACMEMF.js} +1 -1
- package/{db-HUCI5R4G.js → db-M7FU2GNK.js} +10 -7
- package/{dbSlice-BVH2YZPQ.js → dbSlice-XRUZOGSU.js} +20 -19
- package/{deleteFile-5YOEKV4U.js → deleteFile-6URDHYRB.js} +12 -12
- package/{desktopFolderProjects-SFY5EZS3.js → desktopFolderProjects-4POAMVJN.js} +2 -2
- package/{dialogCommands-KHIEPY3M.js → dialogCommands-NRLCOPJR.js} +71 -64
- package/dialogNotifyCommand-SHGPCU22.js +36 -0
- package/{dialogSlice-ZCTDV2PZ.js → dialogSlice-DP2WTMNO.js} +48 -45
- package/{dialogUsageCommand-7KCPYGHG.js → dialogUsageCommand-W2WCSGKF.js} +11 -10
- package/{docCreateCommands-DPMZI7G5.js → docCreateCommands-YJRDA3RX.js} +66 -59
- package/{docDeleteCommands-IRQQLUBT.js → docDeleteCommands-A5QIHZNF.js} +69 -62
- package/{docReadCommands-LK37XH6L.js → docReadCommands-CF2LTMYH.js} +66 -59
- package/{docStore-V2KECILA.js → docStore-NDY3K3PK.js} +25 -24
- package/{docUpdateCommands-O6T3HJHH.js → docUpdateCommands-QRKV4ZXE.js} +69 -62
- package/{fetchMessages-NR4KNQLO.js → fetchMessages-TQEUZD7H.js} +8 -7
- package/{getPricing-2MNMXEVG.js → getPricing-LF5C4XSI.js} +7 -7
- package/{handleSendMessageAction-2PE25WM3.js → handleSendMessageAction-IUGVVJ43.js} +206 -314
- package/{hostCredentialCreate-S233UMAP.js → hostCredentialCreate-X2ZFRXDR.js} +132 -124
- package/index.js +65 -27
- package/{keys-BEGDOTRL.js → keys-RWF7UCB4.js} +5 -4
- package/legacyMigration-TF4SYJCZ.js +19 -0
- package/{lib-5KKIBFIT.js → lib-OT5OTXRU.js} +7087 -6664
- package/{localDialogRead-7NNDVVF7.js → localDialogRead-CCOCVGAP.js} +3 -3
- package/{localFirstLog-DHNOY2NA.js → localFirstLog-OIETGK66.js} +1 -1
- package/localRecall-BDYKXB46.js +17 -0
- package/{localRuntimeAdapter-KY6WXNBR.js → localRuntimeAdapter-KAG3T4LF.js} +138 -130
- package/{localRuntimeAuthority-OYH4AE4G.js → localRuntimeAuthority-IBJAT62G.js} +1 -1
- package/{localRuntimeDb-VBIMCWUC.js → localRuntimeDb-N7KHDXS2.js} +2 -2
- package/{machineCommands-Q6HA3IXF.js → machineCommands-6NIQJE2A.js} +143 -135
- package/{machineInfo-UKPTZO5Y.js → machineInfo-LWHTEBHJ.js} +1 -1
- package/machineWsRunDispatch-RA5NOSGG.js +190 -0
- package/{memberThunks-7EDJADWU.js → memberThunks-7Y3OYSJQ.js} +30 -29
- package/{memoryCommands-ASCE5STX.js → memoryCommands-BC6REPQB.js} +7 -7
- package/models-H5NNZRLH.js +9 -0
- package/{oauthTokenStore-OEERZFUC.js → oauthTokenStore-RUYNYALS.js} +1 -1
- package/{offlineMarxistsAgentCommand-2QTHJCHV.js → offlineMarxistsAgentCommand-XVXUE6G5.js} +6 -6
- package/overlay-BBQZXGYI.js +13 -0
- package/package.json +2 -2
- package/{pdf-U6KSUEZZ.js → pdf-KE3QI2V7.js} +1 -1
- package/{processSpawn-ZU5QFM43.js → processSpawn-6GEO77KV.js} +1 -1
- package/{profileConfig-KN3N2BLF.js → profileConfig-KOWK4HOG.js} +1 -1
- package/{projectArchive-DRTDIMEV.js → projectArchive-OIUP63MV.js} +59 -56
- package/{providerPresetApply-YXGV6NXB.js → providerPresetApply-WHAMP2D5.js} +20 -13
- package/{providerRegistry-S6UL6UNA.js → providerRegistry-ZI2KORJ7.js} +11 -11
- package/{read-4V2RMG7N.js → read-TYMBGEXO.js} +13 -13
- package/{readDocTool-BH6ATGQO.js → readDocTool-SKQVHBLO.js} +2 -2
- package/{readlineWorkspace-2W4WRCOU.js → readlineWorkspace-ZGC4KSXG.js} +7760 -6499
- package/{removeDialogAgentAction-LYAZGNKW.js → removeDialogAgentAction-F5QE2O2B.js} +29 -28
- package/{runAgentClientLoop-J2VQBS2Z.js → runAgentClientLoop-NKUW2DSJ.js} +94 -88
- package/{runtimeDoctorCommands-QAI3MBKQ.js → runtimeDoctorCommands-RRKPBGVO.js} +19 -19
- package/{runtimeModeArgs-2Y7BALTO.js → runtimeModeArgs-X7DL7PUN.js} +1 -1
- package/secretCommands-KZWBZIYS.js +24 -0
- package/{setDialogExtraReferencesAction-OCRPGPYH.js → setDialogExtraReferencesAction-72L27ERM.js} +25 -24
- package/{setPrimaryDialogAgentAction-HFJDQIBU.js → setPrimaryDialogAgentAction-GJJDUSGJ.js} +29 -28
- package/{settingThunks-RAMHMTGM.js → settingThunks-ZRGWVGZD.js} +99 -90
- package/{skillDiscovery-XKHROSH2.js → skillDiscovery-I37M5KJC.js} +4 -4
- package/{skillSummaryMarker-42HKSXYY.js → skillSummaryMarker-62UW7HI7.js} +1 -1
- package/{slateToRenderMarkdown-Y5IYN73U.js → slateToRenderMarkdown-R3X74MCX.js} +1 -1
- package/{slateUtils-NGV2NMKM.js → slateUtils-ESQAJ6RN.js} +1 -1
- package/{spaceCommands-KVJZVKVO.js → spaceCommands-MEH3HJBC.js} +66 -57
- package/store-Z53ICFL3.js +48 -0
- package/{streamAgentChatTurn-GHBMJJ6S.js → streamAgentChatTurn-FJTUUXHJ.js} +886 -668
- package/{switchDialogAgentAction-EBRMW3RA.js → switchDialogAgentAction-IIJBPND3.js} +26 -25
- package/{tableCommands-MP6VFSVT.js → tableCommands-FTAOCBTX.js} +13 -13
- package/tombstones-FQQMEDOW.js +32 -0
- package/{toolApiClient-HGNO53TC.js → toolApiClient-OGQEBQVX.js} +4 -4
- package/{tools-EWKCPKMS.js → tools-ZXHIAOSP.js} +82 -81
- package/tuiRestart-2IL37YIB.js +41 -0
- package/tuiSummaryLlmCaller-W2QN4VAC.js +44 -0
- package/{updateCommands-ZQYU6SCI.js → updateCommands-CPATDG6J.js} +11 -7
- package/{updateDialogTitleAction-5GGMBTDF.js → updateDialogTitleAction-JMKLKL4P.js} +54 -51
- package/{usageCommand-F4IPVMIZ.js → usageCommand-2BF74MKF.js} +11 -10
- package/{usageRebuildCommand-HAW2AD5N.js → usageRebuildCommand-UHB55BQM.js} +12 -11
- package/userDataMerge-HT2ZVHBJ.js +13 -0
- package/{windowsSelfUpdate-257DV2T6.js → windowsSelfUpdate-ZFD6J5HF.js} +3 -3
- package/{workloadLifecycle-4C42SVBD.js → workloadLifecycle-HFJIN5IZ.js} +4 -4
- package/agentRecordCommands-ZQ7SVYGG.js +0 -167
- package/agentRunCommand-WS7IGO2W.js +0 -196
- package/chunk-3CGG2PAL.js +0 -594
- package/chunk-5MQRBSMW.js +0 -862
- package/chunk-5XBUWM6I.js +0 -89
- package/chunk-CJEIOP3E.js +0 -0
- package/chunk-EHGEOAHI.js +0 -636
- package/chunk-FW6YHHLI.js +0 -842
- package/chunk-GPVRUGGY.js +0 -115
- package/chunk-HSVBJRF4.js +0 -339
- package/chunk-LEC5ALIN.js +0 -91
- package/chunk-WACI5I6V.js +0 -147
- package/chunk-WJZOQR2J.js +0 -151
- package/chunk-ZCWRMUWT.js +0 -89
- package/dist-M676ULYG.js +0 -7314
- package/machineWsRunDispatch-WWJQ6WR3.js +0 -182
- package/models-PJBE6JDV.js +0 -9
- package/tuiSummaryLlmCaller-ALQYUUWB.js +0 -189
- package/{chunk-AGP3YSEC.js → chunk-4N6G2CKP.js} +3 -3
- package/{chunk-BLVSFYQ3.js → chunk-LISC7BD4.js} +3 -3
- package/{chunk-2QHFH3DR.js → chunk-USGHJSGO.js} +3 -3
- package/{chunk-AETZ7AD6.js → chunk-W6RFEDN4.js} +3 -3
|
@@ -2,279 +2,62 @@ import {
|
|
|
2
2
|
clipMultilineText,
|
|
3
3
|
fetchAndSerializeTable,
|
|
4
4
|
waitForAbortableDelay
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-LMRRCEDE.js";
|
|
6
6
|
import {
|
|
7
7
|
isGatewayHttpStatus
|
|
8
8
|
} from "./chunk-NF64D32W.js";
|
|
9
|
-
import {
|
|
10
|
-
createDrainExhaustedResponse,
|
|
11
|
-
isCoreDrainingBody,
|
|
12
|
-
normalizeNonNegativeMs,
|
|
13
|
-
parseRetryAfterHeaderMs
|
|
14
|
-
} from "./chunk-3L2WKC3W.js";
|
|
15
9
|
import {
|
|
16
10
|
resolvePageReadMarkdown,
|
|
17
11
|
slateToSimplifiedMarkdown
|
|
18
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-BP5ZJ6B4.js";
|
|
19
13
|
import {
|
|
20
14
|
extractCategorizedMentions
|
|
21
15
|
} from "./chunk-AGIM7IMJ.js";
|
|
22
16
|
import {
|
|
23
17
|
fetchAndCacheMessages
|
|
24
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-53MFERZ3.js";
|
|
19
|
+
import {
|
|
20
|
+
createDrainExhaustedResponse,
|
|
21
|
+
isCoreDrainingBody,
|
|
22
|
+
normalizeNonNegativeMs,
|
|
23
|
+
parseRetryAfterHeaderMs
|
|
24
|
+
} from "./chunk-3L2WKC3W.js";
|
|
25
25
|
import {
|
|
26
26
|
createSpaceKey
|
|
27
27
|
} from "./chunk-UAD2WT54.js";
|
|
28
28
|
import {
|
|
29
29
|
read
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-CMMI3DAT.js";
|
|
31
31
|
import {
|
|
32
32
|
getRuntimeServerContext
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-R6Z5S5GA.js";
|
|
34
34
|
import {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
resolveSkillGraphFromRoots
|
|
38
|
-
} from "./chunk-WRYQ35LQ.js";
|
|
35
|
+
classifyGenerationError
|
|
36
|
+
} from "./chunk-TLE77UJ5.js";
|
|
39
37
|
import {
|
|
40
38
|
isAbortError
|
|
41
39
|
} from "./chunk-7DPNBQSV.js";
|
|
42
40
|
import {
|
|
43
|
-
|
|
44
|
-
} from "./chunk-
|
|
41
|
+
estimateTokenCount
|
|
42
|
+
} from "./chunk-PSCNXBYA.js";
|
|
43
|
+
import {
|
|
44
|
+
extractRuntimePageCapabilities,
|
|
45
|
+
resolveBuiltinSkillPage,
|
|
46
|
+
resolveSkillGraphFromRoots
|
|
47
|
+
} from "./chunk-G7IUT2V3.js";
|
|
45
48
|
import {
|
|
46
49
|
extractCustomId
|
|
47
50
|
} from "./chunk-M2EJHDJP.js";
|
|
48
|
-
import {
|
|
49
|
-
estimateTokenCount
|
|
50
|
-
} from "./chunk-PSCNXBYA.js";
|
|
51
51
|
import {
|
|
52
52
|
isDialogRecordKey
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-OJKUU3LP.js";
|
|
54
|
+
import {
|
|
55
|
+
wrapHistoricalSummaryWithReplayGuard
|
|
56
|
+
} from "./chunk-BNMPUQW6.js";
|
|
54
57
|
import {
|
|
55
58
|
asTrimmedString
|
|
56
59
|
} from "./chunk-3EUW3WEO.js";
|
|
57
60
|
|
|
58
|
-
// packages/ai/chat/errorDiagnostics.ts
|
|
59
|
-
var record = (value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : {};
|
|
60
|
-
function httpOrigin(value) {
|
|
61
|
-
if (typeof value !== "string") return void 0;
|
|
62
|
-
try {
|
|
63
|
-
const url = new URL(value);
|
|
64
|
-
return url.protocol === "http:" || url.protocol === "https:" ? url.origin : void 0;
|
|
65
|
-
} catch {
|
|
66
|
-
return void 0;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
var identifier = (value, max = 160) => typeof value === "string" && value.length <= max && /^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$/.test(value) && !value.includes("://") && !/^(sk-|Bearer|AIza)/i.test(value) ? value : void 0;
|
|
70
|
-
function sanitizeErrorDiagnostics(value) {
|
|
71
|
-
const input = record(value);
|
|
72
|
-
const out = {};
|
|
73
|
-
for (const key of ["requestId", "provider", "model", "code"]) {
|
|
74
|
-
const safe = identifier(input[key], key === "code" ? 80 : 160);
|
|
75
|
-
if (safe) out[key] = safe;
|
|
76
|
-
}
|
|
77
|
-
if (typeof input.releaseSha === "string" && /^[a-fA-F0-9]{7,64}$/.test(input.releaseSha)) out.releaseSha = input.releaseSha;
|
|
78
|
-
const origin = httpOrigin(input.requestOrigin);
|
|
79
|
-
if (origin) out.requestOrigin = origin;
|
|
80
|
-
if (["found", "not_found", "invalid_record", "lookup_error", "not_requested"].includes(input.lookupStatus)) out.lookupStatus = input.lookupStatus;
|
|
81
|
-
if (typeof input.status === "number" && Number.isInteger(input.status) && input.status >= 100 && input.status <= 599) out.status = input.status;
|
|
82
|
-
if (["config_protocol", "empty", "policy", "quota", "transient"].includes(input.category)) out.category = input.category;
|
|
83
|
-
return Object.keys(out).length ? out : void 0;
|
|
84
|
-
}
|
|
85
|
-
function extractErrorDiagnostics(value, status) {
|
|
86
|
-
const envelope = record(value);
|
|
87
|
-
const error = record(envelope.error ?? value);
|
|
88
|
-
const diagnostics = record(record(error.details).diagnostics);
|
|
89
|
-
return sanitizeErrorDiagnostics({ ...diagnostics, code: error.code, status: status ?? error.status });
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
// packages/ai/chat/parseApiError.ts
|
|
93
|
-
var CONTEXT_OVERFLOW_ACTIONS = [
|
|
94
|
-
"compact-and-retry",
|
|
95
|
-
"new-dialog",
|
|
96
|
-
"switch-model",
|
|
97
|
-
"retry"
|
|
98
|
-
];
|
|
99
|
-
var CONTEXT_TOO_LARGE_ACTIONS = [
|
|
100
|
-
"new-dialog",
|
|
101
|
-
"switch-model",
|
|
102
|
-
"retry"
|
|
103
|
-
];
|
|
104
|
-
var truncateErrorMessage = (message, maxChars = 320) => message.length <= maxChars ? message : `${message.slice(0, maxChars)}\u2026`;
|
|
105
|
-
var isContextOverflowText = (message) => /maximum context|context (length|window|overflow|limit)|context_length_exceed\w*|requested about .*tokens|too many tokens|prompt is too long|exceeds? (the )?(model|max)/i.test(
|
|
106
|
-
message
|
|
107
|
-
);
|
|
108
|
-
var isQuotaExhaustedError = (status, ...texts) => status === 402 || /insufficient[_\s-]?(?:quota|balance|credits)|余额不足|wallet\s+balance\s+is\s+insufficient|payment[_ ]required/i.test(
|
|
109
|
-
texts.filter((t) => typeof t === "string").join(" ")
|
|
110
|
-
);
|
|
111
|
-
var QUOTA_EXHAUSTED_MESSAGE = "\u4F59\u989D\u6216\u914D\u989D\u5DF2\u8017\u5C3D\uFF0C\u672C\u6B21\u8BF7\u6C42\u672A\u88AB\u53D7\u7406\u3002\u8BF7\u5728 console \u7684 Billing \u9875\u9762\u5145\u503C\u540E\u91CD\u8BD5\uFF1B\u76F4\u63A5\u91CD\u53D1\u540C\u4E00\u8BF7\u6C42\u4E0D\u4F1A\u89E3\u51B3\u6B64\u95EE\u9898\u3002";
|
|
112
|
-
function classifyApiError(input) {
|
|
113
|
-
const { status, message, body, code } = input;
|
|
114
|
-
const errorMessage = message;
|
|
115
|
-
let defaultMessage = `\u72B6\u6001\u7801 ${status} ${input.statusText ?? ""}`;
|
|
116
|
-
switch (status) {
|
|
117
|
-
case 400:
|
|
118
|
-
if (isContextOverflowText(errorMessage) || isContextOverflowText(body) || code === "UPSTREAM_400") {
|
|
119
|
-
return {
|
|
120
|
-
kind: "context_overflow",
|
|
121
|
-
message: "\u4E0A\u4E0B\u6587\u8FC7\u957F\uFF1A\u672C\u8F6E\u6D88\u606F\u6216\u5DE5\u5177\u7ED3\u679C\u592A\u5927\u3002\u8BF7\u7F29\u5C0F\u8303\u56F4\uFF0C\u6216\u5148\u8BFB\u53D6\u66F4\u5C0F\u7247\u6BB5\u540E\u518D\u7EE7\u7EED\u3002",
|
|
122
|
-
code,
|
|
123
|
-
status,
|
|
124
|
-
retryable: true,
|
|
125
|
-
actions: [...CONTEXT_OVERFLOW_ACTIONS]
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
if (code === "MISSING_PROVIDER_API_KEY") {
|
|
129
|
-
return {
|
|
130
|
-
kind: "generic",
|
|
131
|
-
message: truncateErrorMessage(errorMessage),
|
|
132
|
-
code,
|
|
133
|
-
status,
|
|
134
|
-
retryable: false
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
if (errorMessage && errorMessage !== defaultMessage) {
|
|
138
|
-
return {
|
|
139
|
-
kind: "generic",
|
|
140
|
-
message: `\u8BF7\u6C42\u53C2\u6570\u9519\u8BEF: ${truncateErrorMessage(errorMessage)}`,
|
|
141
|
-
code,
|
|
142
|
-
status,
|
|
143
|
-
retryable: false
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
return { kind: "generic", message: "\u8BF7\u6C42\u53C2\u6570\u9519\u8BEF\uFF0C\u8BF7\u68C0\u67E5\u8F93\u5165", code, status, retryable: false };
|
|
147
|
-
case 413:
|
|
148
|
-
return {
|
|
149
|
-
kind: "context_too_large",
|
|
150
|
-
message: "\u8BF7\u6C42\u5185\u5BB9\u8FC7\u5927\uFF1A\u8BF7\u51CF\u5C11\u4E00\u6B21\u53D1\u9001\u7684\u6D88\u606F\u3001\u6587\u4EF6\u6216\u5DE5\u5177\u7ED3\u679C\u3002",
|
|
151
|
-
code,
|
|
152
|
-
status,
|
|
153
|
-
retryable: true,
|
|
154
|
-
actions: [...CONTEXT_TOO_LARGE_ACTIONS]
|
|
155
|
-
};
|
|
156
|
-
case 401:
|
|
157
|
-
return {
|
|
158
|
-
kind: "auth",
|
|
159
|
-
message: code === "AUTH_TOKEN_EXPIRED" ? "\u767B\u5F55\u72B6\u6001\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u5148\u767B\u51FA\u540E\u91CD\u65B0\u767B\u5F55" : code === "AUTH_ACCOUNT_INVALID" ? "\u8D26\u6237\u65E0\u6548\u6216\u5DF2\u88AB\u505C\u7528\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458" : code === "AUTH_NO_TOKEN" ? "\u672A\u68C0\u6D4B\u5230\u767B\u5F55\u72B6\u6001\uFF0C\u8BF7\u5148\u767B\u5F55" : code === "AUTH_INVALID_TOKEN" ? "\u767B\u5F55\u51ED\u8BC1\u65E0\u6548\uFF0C\u8BF7\u5148\u767B\u51FA\u540E\u91CD\u65B0\u767B\u5F55" : code === "AUTH_TOKEN_NOT_ACTIVE" ? "\u4EE4\u724C\u5C1A\u672A\u751F\u6548\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5" : errorMessage && errorMessage !== `\u72B6\u6001\u7801 401 Unauthorized` ? `\u8BA4\u8BC1\u9519\u8BEF: ${truncateErrorMessage(errorMessage)}` : "\u8EAB\u4EFD\u9A8C\u8BC1\u5931\u8D25\uFF0C\u8BF7\u5148\u767B\u51FA\u540E\u91CD\u65B0\u767B\u5F55",
|
|
160
|
-
code,
|
|
161
|
-
status,
|
|
162
|
-
retryable: true,
|
|
163
|
-
actions: ["retry"]
|
|
164
|
-
};
|
|
165
|
-
case 503:
|
|
166
|
-
return {
|
|
167
|
-
kind: "server",
|
|
168
|
-
message: errorMessage && errorMessage !== `\u72B6\u6001\u7801 503 Service Unavailable` ? truncateErrorMessage(errorMessage) : "\u670D\u52A1\u6682\u65F6\u4E0D\u53EF\u7528\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5",
|
|
169
|
-
code,
|
|
170
|
-
status,
|
|
171
|
-
retryable: true,
|
|
172
|
-
actions: ["retry"]
|
|
173
|
-
};
|
|
174
|
-
case 504:
|
|
175
|
-
return {
|
|
176
|
-
kind: "timeout",
|
|
177
|
-
message: "\u8BF7\u6C42\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5",
|
|
178
|
-
code,
|
|
179
|
-
status,
|
|
180
|
-
retryable: true,
|
|
181
|
-
actions: ["retry"]
|
|
182
|
-
};
|
|
183
|
-
// 402 Payment Required(LithosAI/OpenAI 兼容网关的余额耗尽)。此前无 case,
|
|
184
|
-
// 落进 default(generic + retryable:true + 重试按钮),误导用户重发。
|
|
185
|
-
case 402:
|
|
186
|
-
return {
|
|
187
|
-
kind: "quota",
|
|
188
|
-
message: QUOTA_EXHAUSTED_MESSAGE,
|
|
189
|
-
code,
|
|
190
|
-
status,
|
|
191
|
-
// 余额耗尽重发无效:上游亦带 x-should-retry:false。
|
|
192
|
-
retryable: false
|
|
193
|
-
};
|
|
194
|
-
default:
|
|
195
|
-
if (isQuotaExhaustedError(status, errorMessage, body, code)) {
|
|
196
|
-
return {
|
|
197
|
-
kind: "quota",
|
|
198
|
-
message: QUOTA_EXHAUSTED_MESSAGE,
|
|
199
|
-
code,
|
|
200
|
-
status,
|
|
201
|
-
retryable: false
|
|
202
|
-
};
|
|
203
|
-
}
|
|
204
|
-
return {
|
|
205
|
-
kind: "generic",
|
|
206
|
-
message: `API\u8BF7\u6C42\u5931\u8D25: ${truncateErrorMessage(errorMessage)}`,
|
|
207
|
-
code,
|
|
208
|
-
status,
|
|
209
|
-
retryable: true,
|
|
210
|
-
actions: ["retry"]
|
|
211
|
-
};
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
async function parseApiErrorInfo(response) {
|
|
215
|
-
const errorBody = await response.text();
|
|
216
|
-
let errorMessage = `\u72B6\u6001\u7801 ${response.status} ${response.statusText}`;
|
|
217
|
-
let errorCode = `E${response.status}`;
|
|
218
|
-
try {
|
|
219
|
-
const errorJson = JSON.parse(errorBody);
|
|
220
|
-
errorMessage = errorJson?.error?.message || errorJson?.message || errorJson?.msg || errorBody || errorMessage;
|
|
221
|
-
errorCode = errorJson?.error?.code || errorJson?.code || errorCode;
|
|
222
|
-
} catch (_e) {
|
|
223
|
-
if (errorBody) {
|
|
224
|
-
errorMessage = errorBody;
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
return classifyApiError({
|
|
228
|
-
status: response.status,
|
|
229
|
-
statusText: response.statusText,
|
|
230
|
-
message: errorMessage,
|
|
231
|
-
body: errorBody,
|
|
232
|
-
code: errorCode
|
|
233
|
-
});
|
|
234
|
-
}
|
|
235
|
-
async function parseApiError(response) {
|
|
236
|
-
return (await parseApiErrorInfo(response)).message;
|
|
237
|
-
}
|
|
238
|
-
var UPSTREAM_AUTH_FAILURE_MESSAGE = "\u4E0A\u6E38\u9274\u6743\u5931\u8D25\uFF08401/403\uFF09\u3002\u82E5\u4F7F\u7528\u5E73\u53F0\u6258\u7BA1\u6A21\u578B\uFF0C\u8FD9\u662F\u5E73\u53F0\u4FA7\u51ED\u636E\u95EE\u9898\u3001\u4E0D\u662F\u4F60\u7684\u914D\u7F6E\u95EE\u9898\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\uFF1B\u82E5\u4F7F\u7528\u81EA\u5DF1\u7684 API Key\uFF0C\u8BF7\u68C0\u67E5\u8BE5 Key \u662F\u5426\u6709\u6548\u3002\u91CD\u590D\u53D1\u9001\u4E0D\u4F1A\u89E3\u51B3\u6B64\u95EE\u9898\u3002";
|
|
239
|
-
function classifyGenerationError(data, status) {
|
|
240
|
-
const error = data?.error ?? data;
|
|
241
|
-
const upstreamStatus = error?.status ?? data?.status;
|
|
242
|
-
if (status === void 0 && typeof upstreamStatus === "number") status = upstreamStatus;
|
|
243
|
-
const rawCode = error?.code ?? data?.code;
|
|
244
|
-
const code = typeof rawCode === "string" && /^[a-zA-Z0-9_.:-]{1,80}$/.test(rawCode) && !/^(sk-|Bearer|AIza)/i.test(rawCode) ? rawCode : void 0;
|
|
245
|
-
const message = typeof error?.message === "string" ? error.message : typeof error?.msg === "string" ? error.msg : typeof data === "string" ? data : "";
|
|
246
|
-
const evidence = `${code ?? ""} ${message}`;
|
|
247
|
-
let category = "config_protocol";
|
|
248
|
-
if (/content[_ -]filter|content[_ -]policy|safety[_ -](?:violation|blocked)|policy[_ -]violation|prohibited[_ -]content/i.test(evidence)) {
|
|
249
|
-
category = "policy";
|
|
250
|
-
} else if (isQuotaExhaustedError(status ?? 0, evidence, code)) {
|
|
251
|
-
category = "quota";
|
|
252
|
-
} else if (/thought_signature|reasoning_effort|not supported|invalid[_ -](?:request|argument)|authentication|api[_ -]key/i.test(evidence) || status === 401 || status === 403) {
|
|
253
|
-
category = "config_protocol";
|
|
254
|
-
} else if (code === "EMPTY_RESPONSE" || /空响应|empty response/i.test(message)) {
|
|
255
|
-
category = "empty";
|
|
256
|
-
} else if (status === 408 || status === 429 || status !== void 0 && status >= 500 || /timeout|timed out|秒内没有返回新内容|network|fetch failed|failed to fetch|ECONNRESET|ECONNREFUSED|EPIPE|socket hang up|connection (?:reset|closed)|rate[_ -]limit|overloaded|temporarily unavailable|internal_server_error|service_unavailable/i.test(evidence)) {
|
|
257
|
-
category = "transient";
|
|
258
|
-
}
|
|
259
|
-
const authFailure = status === 401 || status === 403 || /authentication|unauthori[sz]ed|forbidden|invalid[_ -]api[_ -]key|api[_ -]key (?:invalid|revoked)/i.test(
|
|
260
|
-
evidence
|
|
261
|
-
);
|
|
262
|
-
const messages = {
|
|
263
|
-
config_protocol: authFailure ? UPSTREAM_AUTH_FAILURE_MESSAGE : "\u6A21\u578B\u914D\u7F6E\u6216\u5DE5\u5177\u901A\u4FE1\u4E0D\u517C\u5BB9\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u68C0\u67E5\u914D\u7F6E\uFF1B\u91CD\u590D\u53D1\u9001\u4E0D\u4F1A\u89E3\u51B3\u6B64\u95EE\u9898\u3002",
|
|
264
|
-
empty: "\u6A21\u578B\u8FD4\u56DE\u4E86\u7A7A\u54CD\u5E94\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u68C0\u67E5\u670D\u52A1\u54CD\u5E94\u3002",
|
|
265
|
-
policy: "\u670D\u52A1\u5546\u7684\u5185\u5BB9\u5B89\u5168\u89C4\u5219\u963B\u6B62\u4E86\u672C\u6B21\u8BF7\u6C42\u3002\u8BF7\u68C0\u67E5\u8BF7\u6C42\u662F\u5426\u7B26\u5408\u5176\u89C4\u5219\uFF1B\u4E0D\u4F1A\u81EA\u52A8\u91CD\u8BD5\u6216\u6539\u5199\u5185\u5BB9\u3002",
|
|
266
|
-
quota: QUOTA_EXHAUSTED_MESSAGE,
|
|
267
|
-
transient: "\u6A21\u578B\u670D\u52A1\u6682\u65F6\u4E0D\u53EF\u7528\u3002\u4F60\u53EF\u4EE5\u7A0D\u540E\u624B\u52A8\u91CD\u8BD5\u540C\u4E00\u6A21\u578B\uFF08\u65B0\u8BF7\u6C42\u53EF\u80FD\u4EA7\u751F\u8D39\u7528\uFF09\u3002"
|
|
268
|
-
};
|
|
269
|
-
return {
|
|
270
|
-
category,
|
|
271
|
-
message: messages[category],
|
|
272
|
-
retryable: category === "transient",
|
|
273
|
-
actions: category === "transient" ? ["retry"] : [],
|
|
274
|
-
diagnostic: { ...extractErrorDiagnostics(data, status) }
|
|
275
|
-
};
|
|
276
|
-
}
|
|
277
|
-
|
|
278
61
|
// packages/ai/chat/serverProxyRetry.ts
|
|
279
62
|
var DEFAULT_SERVER_PROXY_RETRY_AFTER_MS = 1500;
|
|
280
63
|
var MAX_SERVER_PROXY_RETRIES = 2;
|
|
@@ -464,12 +247,12 @@ var resolveReferenceAssets = async (references, dispatch) => {
|
|
|
464
247
|
}
|
|
465
248
|
const resolvedSkillLinks = await resolveSkillGraphFromRoots({
|
|
466
249
|
roots: [
|
|
467
|
-
...Array.from(hardSkillKeys).map((
|
|
468
|
-
...Array.from(softSkillKeys).map((
|
|
250
|
+
...Array.from(hardSkillKeys).map((identifier) => ({ identifier, mode: "required" })),
|
|
251
|
+
...Array.from(softSkillKeys).map((identifier) => ({ identifier, mode: "recommended" }))
|
|
469
252
|
],
|
|
470
|
-
loadPage: async (
|
|
471
|
-
const loaded = await loadContentsByKeys([
|
|
472
|
-
return loaded.get(
|
|
253
|
+
loadPage: async (identifier) => {
|
|
254
|
+
const loaded = await loadContentsByKeys([identifier], dispatch, contentByKey);
|
|
255
|
+
return loaded.get(identifier) ?? null;
|
|
473
256
|
},
|
|
474
257
|
contentByKey
|
|
475
258
|
});
|
|
@@ -532,12 +315,12 @@ var resolveToolsFromKeys = async (keys, dispatch, preloaded) => {
|
|
|
532
315
|
}
|
|
533
316
|
const resolvedSkillLinks = await resolveSkillGraphFromRoots({
|
|
534
317
|
roots: [
|
|
535
|
-
...Array.from(hardSkillKeys).map((
|
|
536
|
-
...Array.from(softSkillKeys).map((
|
|
318
|
+
...Array.from(hardSkillKeys).map((identifier) => ({ identifier, mode: "required" })),
|
|
319
|
+
...Array.from(softSkillKeys).map((identifier) => ({ identifier, mode: "recommended" }))
|
|
537
320
|
],
|
|
538
|
-
loadPage: async (
|
|
539
|
-
const loaded = await loadContentsByKeys([
|
|
540
|
-
return loaded.get(
|
|
321
|
+
loadPage: async (identifier) => {
|
|
322
|
+
const loaded = await loadContentsByKeys([identifier], dispatch, contentByKey);
|
|
323
|
+
return loaded.get(identifier) ?? null;
|
|
541
324
|
},
|
|
542
325
|
contentByKey
|
|
543
326
|
});
|
|
@@ -900,13 +683,6 @@ var fetchReferenceContents = async (references, dispatch, options = { format: "s
|
|
|
900
683
|
};
|
|
901
684
|
|
|
902
685
|
export {
|
|
903
|
-
extractErrorDiagnostics,
|
|
904
|
-
CONTEXT_OVERFLOW_ACTIONS,
|
|
905
|
-
CONTEXT_TOO_LARGE_ACTIONS,
|
|
906
|
-
isContextOverflowText,
|
|
907
|
-
classifyApiError,
|
|
908
|
-
parseApiError,
|
|
909
|
-
classifyGenerationError,
|
|
910
686
|
performServerProxyFetchWithRetry,
|
|
911
687
|
fetchReferenceContents,
|
|
912
688
|
mergeReferences,
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
// packages/ai/memory/rank.ts
|
|
2
|
+
var CJK_SEQUENCE_REGEX = /[\u3400-\u4dbf\u4e00-\u9fff]+/g;
|
|
3
|
+
var MEMORY_IDENTIFIER_REGEX = /\b(?:memory|noise)-[a-z0-9][a-z0-9-]*/gi;
|
|
4
|
+
var buildCjkTokens = (text) => {
|
|
5
|
+
const sequences = text.match(CJK_SEQUENCE_REGEX) ?? [];
|
|
6
|
+
const tokens = [];
|
|
7
|
+
for (const sequence of sequences) {
|
|
8
|
+
if (sequence.length >= 2) {
|
|
9
|
+
tokens.push(sequence);
|
|
10
|
+
}
|
|
11
|
+
for (let index = 0; index < sequence.length - 1; index += 1) {
|
|
12
|
+
tokens.push(sequence.slice(index, index + 2));
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return tokens;
|
|
16
|
+
};
|
|
17
|
+
var tokenize = (text) => {
|
|
18
|
+
const normalized = text.toLowerCase();
|
|
19
|
+
const wordTokens = normalized.split(/[\s,.;:!?()[\]{}"'`,。!?:;、]+/).map((token) => token.trim()).filter((token) => token.length >= 2);
|
|
20
|
+
return [...wordTokens, ...buildCjkTokens(normalized)];
|
|
21
|
+
};
|
|
22
|
+
var keywordScore = (query, item) => {
|
|
23
|
+
const queryTokens = new Set(tokenize(query));
|
|
24
|
+
if (queryTokens.size === 0) return 0;
|
|
25
|
+
const haystack = /* @__PURE__ */ new Set([
|
|
26
|
+
...tokenize(item.content),
|
|
27
|
+
...(item.tags ?? []).map((tag) => tag.toLowerCase()),
|
|
28
|
+
item.patternKey?.toLowerCase() ?? ""
|
|
29
|
+
]);
|
|
30
|
+
let matches = 0;
|
|
31
|
+
for (const token of queryTokens) {
|
|
32
|
+
if (haystack.has(token)) matches += 1;
|
|
33
|
+
}
|
|
34
|
+
return Math.min(1, matches / Math.max(2, queryTokens.size));
|
|
35
|
+
};
|
|
36
|
+
var identifierScore = (query, item) => {
|
|
37
|
+
const identifiers = query.match(MEMORY_IDENTIFIER_REGEX) ?? [];
|
|
38
|
+
if (identifiers.length === 0) return 0;
|
|
39
|
+
const content = item.content.toLowerCase();
|
|
40
|
+
const matches = identifiers.filter(
|
|
41
|
+
(identifier) => content.includes(identifier.toLowerCase())
|
|
42
|
+
).length;
|
|
43
|
+
return matches / identifiers.length;
|
|
44
|
+
};
|
|
45
|
+
var DAY_MS = 864e5;
|
|
46
|
+
var UNRETRIEVED_MEMORY_GRACE_DAYS = 3;
|
|
47
|
+
var MIN_UNRETRIEVED_SCORE_FACTOR = 0.3;
|
|
48
|
+
var UNRETRIEVED_DECAY_HALF_LIFE_DAYS = 7;
|
|
49
|
+
var retrievalFrequencyScore = (item, nowMs) => {
|
|
50
|
+
const lastRetrievedMs = Date.parse(item.lastActivatedAt || item.createdAt);
|
|
51
|
+
const ageDays = Math.max(0, (nowMs - lastRetrievedMs) / DAY_MS);
|
|
52
|
+
const recency = 1 / (1 + ageDays / 7);
|
|
53
|
+
const frequency = Math.min(1, Math.log1p(item.activationCount ?? 0) / 3);
|
|
54
|
+
return 0.7 * recency + 0.3 * frequency;
|
|
55
|
+
};
|
|
56
|
+
var unretrievedDecayFactor = (item, nowMs) => {
|
|
57
|
+
if ((item.activationCount ?? 0) !== 0) return 1;
|
|
58
|
+
const createdAgeDays = Math.max(0, (nowMs - Date.parse(item.createdAt)) / DAY_MS);
|
|
59
|
+
if (createdAgeDays <= UNRETRIEVED_MEMORY_GRACE_DAYS) return 1;
|
|
60
|
+
const overdue = createdAgeDays - UNRETRIEVED_MEMORY_GRACE_DAYS;
|
|
61
|
+
return Math.max(
|
|
62
|
+
MIN_UNRETRIEVED_SCORE_FACTOR,
|
|
63
|
+
1 / (1 + overdue / UNRETRIEVED_DECAY_HALF_LIFE_DAYS)
|
|
64
|
+
);
|
|
65
|
+
};
|
|
66
|
+
var retrievalScore = (item, nowMs) => retrievalFrequencyScore(item, nowMs) * unretrievedDecayFactor(item, nowMs);
|
|
67
|
+
var creationRecencyScore = (item, nowMs) => {
|
|
68
|
+
const createdMs = Date.parse(item.createdAt);
|
|
69
|
+
const ageDays = Math.max(0, (nowMs - createdMs) / 864e5);
|
|
70
|
+
return 1 / (1 + ageDays / 7);
|
|
71
|
+
};
|
|
72
|
+
var typeFitScore = (item) => {
|
|
73
|
+
if (item.kind === "episodic") return 0.75;
|
|
74
|
+
if (item.kind === "semantic") return 0.9;
|
|
75
|
+
return 0.85;
|
|
76
|
+
};
|
|
77
|
+
var understandingScore = (item) => {
|
|
78
|
+
if (!item.tags?.includes("understanding-memory")) return 0;
|
|
79
|
+
if (item.facet === "unfinished") return 1;
|
|
80
|
+
if (item.facet === "tension") return 0.95;
|
|
81
|
+
if (item.facet === "preference") return 0.85;
|
|
82
|
+
if (item.facet === "style") return 0.75;
|
|
83
|
+
return 0.8;
|
|
84
|
+
};
|
|
85
|
+
var pathScore = (item, context) => {
|
|
86
|
+
let score = 0;
|
|
87
|
+
if (context?.currentOwner && item.ownerType === context.currentOwner.ownerType && item.ownerId === context.currentOwner.ownerId) {
|
|
88
|
+
score += 0.65;
|
|
89
|
+
}
|
|
90
|
+
if (context?.currentSubject && item.subjectType === context.currentSubject.subjectType && item.subjectId === context.currentSubject.subjectId) {
|
|
91
|
+
score += 0.85;
|
|
92
|
+
}
|
|
93
|
+
return Math.min(1, score);
|
|
94
|
+
};
|
|
95
|
+
var scoreMemoryItem = (item, query, nowMs = Date.now(), context) => {
|
|
96
|
+
const queryMatch = keywordScore(query, item);
|
|
97
|
+
const identifierMatch = identifierScore(query, item);
|
|
98
|
+
const retrieval = retrievalScore(item, nowMs);
|
|
99
|
+
const createdRecency = creationRecencyScore(item, nowMs);
|
|
100
|
+
const importance = item.importance ?? 0;
|
|
101
|
+
const confidence = item.confidence ?? 0;
|
|
102
|
+
const typeFit = typeFitScore(item);
|
|
103
|
+
const understanding = understandingScore(item);
|
|
104
|
+
const path = pathScore(item, context);
|
|
105
|
+
return 0.25 * queryMatch + 0.2 * identifierMatch + 0.2 * path + 0.09 * retrieval + // weak retrieval signal, NOT successful-use reinforcement
|
|
106
|
+
0.16 * createdRecency + 0.06 * importance + 0.03 * confidence + 0.02 * typeFit + 0.01 * understanding;
|
|
107
|
+
};
|
|
108
|
+
var rankMemoryCandidates = (items, query, context) => {
|
|
109
|
+
const nowMs = Date.now();
|
|
110
|
+
return [...items].sort((a, b) => {
|
|
111
|
+
const aExplicit = a.sourceKind === "explicit-user-directive";
|
|
112
|
+
const bExplicit = b.sourceKind === "explicit-user-directive";
|
|
113
|
+
if (aExplicit !== bExplicit) return bExplicit ? 1 : -1;
|
|
114
|
+
if (aExplicit) {
|
|
115
|
+
return Date.parse(b.createdAt) - Date.parse(a.createdAt);
|
|
116
|
+
}
|
|
117
|
+
return scoreMemoryItem(b, query, nowMs, context) - scoreMemoryItem(a, query, nowMs, context);
|
|
118
|
+
});
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
// packages/ai/memory/vnext/localRecall.ts
|
|
122
|
+
var MIN_SHARED_TOKENS = 2;
|
|
123
|
+
var MAX_LOCAL_RECALL_STATES = 8;
|
|
124
|
+
var IDF_MIN_CORPUS = 20;
|
|
125
|
+
var RARE_DF_RATIO = 0.05;
|
|
126
|
+
var RARE_DF_MAX_DOCS = 5;
|
|
127
|
+
var SAFE_TECHNICAL_SYNONYMS = {
|
|
128
|
+
pr: ["\u5BA1\u67E5", "\u4EE3\u7801\u5BA1\u67E5", "diff"],
|
|
129
|
+
diff: ["\u5BA1\u67E5", "\u4EE3\u7801\u5BA1\u67E5"],
|
|
130
|
+
review: ["\u5BA1\u67E5", "\u4EE3\u7801\u5BA1\u67E5"],
|
|
131
|
+
deploy: ["\u90E8\u7F72", "\u53D1\u7248"],
|
|
132
|
+
release: ["\u53D1\u7248", "\u53D1\u5E03"],
|
|
133
|
+
desktop: ["\u684C\u9762", "\u684C\u9762\u7AEF"]
|
|
134
|
+
};
|
|
135
|
+
var distinctTokens = (text) => new Set(tokenize(text).filter((token) => token.length >= 2));
|
|
136
|
+
var haystackTokens = (state, entity) => distinctTokens(
|
|
137
|
+
[state.facet, state.text, entity?.name ?? "", ...entity?.aliases ?? []].join(" ")
|
|
138
|
+
);
|
|
139
|
+
var recallMemoryVNextLocal = (input) => {
|
|
140
|
+
const rawTokens = distinctTokens(input.query);
|
|
141
|
+
if (rawTokens.size === 0) return [];
|
|
142
|
+
const queryTokens = new Set(rawTokens);
|
|
143
|
+
for (const token of rawTokens) {
|
|
144
|
+
const syns = SAFE_TECHNICAL_SYNONYMS[token.toLowerCase()];
|
|
145
|
+
if (syns) {
|
|
146
|
+
for (const syn of syns) {
|
|
147
|
+
for (const t of distinctTokens(syn)) queryTokens.add(t);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
const entityById = new Map(input.entities.map((entity) => [entity.id, entity]));
|
|
152
|
+
const prepared = [];
|
|
153
|
+
for (const state of input.states) {
|
|
154
|
+
if (state.retiredAt || !state.text.trim()) continue;
|
|
155
|
+
prepared.push({
|
|
156
|
+
state,
|
|
157
|
+
tokens: haystackTokens(state, entityById.get(state.entityId))
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
if (prepared.length === 0) return [];
|
|
161
|
+
const useIdf = prepared.length >= IDF_MIN_CORPUS;
|
|
162
|
+
const rareCutoff = Math.min(prepared.length * RARE_DF_RATIO, RARE_DF_MAX_DOCS);
|
|
163
|
+
const rareTokens = /* @__PURE__ */ new Set();
|
|
164
|
+
if (useIdf) {
|
|
165
|
+
for (const token of queryTokens) {
|
|
166
|
+
let df = 0;
|
|
167
|
+
for (const item of prepared) if (item.tokens.has(token)) df++;
|
|
168
|
+
if (df > 0 && df <= rareCutoff) rareTokens.add(token);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
const scored = [];
|
|
172
|
+
for (const item of prepared) {
|
|
173
|
+
let sharedTokens = 0;
|
|
174
|
+
let rareShared = 0;
|
|
175
|
+
for (const token of queryTokens) {
|
|
176
|
+
if (!item.tokens.has(token)) continue;
|
|
177
|
+
sharedTokens++;
|
|
178
|
+
if (rareTokens.has(token)) rareShared++;
|
|
179
|
+
}
|
|
180
|
+
if (sharedTokens < MIN_SHARED_TOKENS) {
|
|
181
|
+
if (!(useIdf && rareShared >= 1)) continue;
|
|
182
|
+
}
|
|
183
|
+
if (useIdf && rareTokens.size > 0 && rareShared === 0) continue;
|
|
184
|
+
scored.push({
|
|
185
|
+
state: item.state,
|
|
186
|
+
sharedTokens,
|
|
187
|
+
score: useIdf ? rareShared * 10 + sharedTokens : sharedTokens
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
return scored.sort((a, b) => b.score - a.score || a.state.id.localeCompare(b.state.id)).slice(0, input.limit ?? MAX_LOCAL_RECALL_STATES).map(({ state, sharedTokens }) => ({ state, sharedTokens }));
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
export {
|
|
194
|
+
rankMemoryCandidates,
|
|
195
|
+
MIN_SHARED_TOKENS,
|
|
196
|
+
MAX_LOCAL_RECALL_STATES,
|
|
197
|
+
IDF_MIN_CORPUS,
|
|
198
|
+
RARE_DF_RATIO,
|
|
199
|
+
RARE_DF_MAX_DOCS,
|
|
200
|
+
recallMemoryVNextLocal
|
|
201
|
+
};
|