nolo-cli 0.227.0-alpha.1 → 0.228.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/{_executeModel-JKQGZ3HU.js → _executeModel-WZKT6XEU.js} +76 -77
- package/{action-CK64LS6S.js → action-GDZDXPMB.js} +9 -9
- package/{addContentAction-CARFID6E.js → addContentAction-7RO4AMRI.js} +14 -14
- package/{addDialogAgentAction-APLZLFW5.js → addDialogAgentAction-EVYBGTXB.js} +16 -16
- package/{agentDeleteCommand-NVR2V2HH.js → agentDeleteCommand-PZWRHNXY.js} +113 -114
- package/{agentEmailCommands-UCVOWD3S.js → agentEmailCommands-QTKMEICX.js} +116 -117
- package/{agentFavoriteCommands-4PDOP3GW.js → agentFavoriteCommands-7LOP3HUD.js} +6 -6
- package/{agentGrantCommands-FLCEXLUH.js → agentGrantCommands-L6O2HVJI.js} +7 -7
- package/{agentListCommands-C65UESYM.js → agentListCommands-GUGMORTK.js} +72 -71
- package/{agentMachineCommands-V3DGEJU4.js → agentMachineCommands-7QGICJLM.js} +57 -56
- package/{agentProviderCommands-7QBFRFRK.js → agentProviderCommands-STI3DQ6A.js} +7 -7
- package/{agentPullCommand-E6JBGBVG.js → agentPullCommand-KHV4EELF.js} +6 -6
- package/{agentRecordCommands-6RCJS2EY.js → agentRecordCommands-SLLADS5C.js} +104 -105
- package/{agentRunCommand-P3GRKXKS.js → agentRunCommand-OFQLOF5Y.js} +110 -111
- package/{agentRunControl-SNZZ5XP4.js → agentRunControl-MBG4U6SL.js} +23 -17
- package/{agentRuntimeLocal-GOX2DIY7.js → agentRuntimeLocal-TU4LA353.js} +44 -44
- package/{agentSlice-N7H2FRJA.js → agentSlice-L4SBGWTB.js} +17 -17
- package/{appDeleteCommands-LZDN26FU.js → appDeleteCommands-JWP3XPUA.js} +52 -51
- package/{appDeployCommands-6IO6TTZH.js → appDeployCommands-6E4TQCWI.js} +52 -51
- package/{appDeployStatusCommands-FG3LX24J.js → appDeployStatusCommands-ALU4SADG.js} +52 -51
- package/{appGetCommands-NAKVDVD4.js → appGetCommands-JEY4L6L4.js} +52 -51
- package/{appListCommands-KL56RN73.js → appListCommands-PCAVHU7M.js} +52 -51
- package/{authCommand-AUN5MXV2.js → authCommand-CGRIIOOV.js} +30 -31
- package/{authCommands-D2IPS6ES.js → authCommands-55OGQGCR.js} +12 -13
- package/{builtinSkillRegistry-UQGLKRYP.js → builtinSkillRegistry-BAE2LDXF.js} +4 -4
- package/{chromeOpsCommands-UJWN5HWH.js → chromeOpsCommands-WAA45NCS.js} +8 -8
- package/{chunk-OB6DVWPF.js → chunk-262R3XNN.js} +16 -2
- package/{chunk-KMRKZNGT.js → chunk-2MCB7CD7.js} +13 -12
- package/{chunk-YPPKC6FL.js → chunk-2NPD3FTX.js} +3 -3
- package/{chunk-UN7HIYMH.js → chunk-2X7WFDT6.js} +1 -1
- package/{chunk-XI2BWJM5.js → chunk-324FWHUA.js} +20 -3
- package/{chunk-JWXITTQB.js → chunk-3P54D2E4.js} +1 -1
- package/{chunk-RU6DULV4.js → chunk-3U44JB3O.js} +1 -1
- package/{chunk-EUCFKKDM.js → chunk-4I2MXV5Q.js} +38 -10
- package/{chunk-PLPLH2XZ.js → chunk-4ZGPHFLE.js} +2 -2
- package/{chunk-NO3VBWTL.js → chunk-547ENH5T.js} +1 -1
- package/chunk-5ZUOVCKT.js +32 -0
- package/{chunk-XZODOEKU.js → chunk-6QHKRARD.js} +2 -2
- package/{chunk-YGMBIXCF.js → chunk-6XRPBZRS.js} +4 -2
- package/{chunk-VPAZ6BEN.js → chunk-7JGMNKKG.js} +18 -14
- package/{chunk-3VFYQH3I.js → chunk-AGYPUBFW.js} +14 -39
- package/{chunk-5HL4KC4A.js → chunk-ALAES342.js} +57 -86
- package/{chunk-VREDDN25.js → chunk-ATEKLSLR.js} +1 -1
- package/{chunk-CQVGR3MX.js → chunk-AUAJTAFM.js} +8 -8
- package/chunk-BIDSIRTS.js +307 -0
- package/chunk-BIWI5M4E.js +62 -0
- package/{chunk-L5I543VB.js → chunk-BNMPUQW6.js} +1 -1
- package/{chunk-UCFPVYP7.js → chunk-BP5ZJ6B4.js} +1 -1
- package/{chunk-2G3YSVO6.js → chunk-CBUZ6DKA.js} +3 -3
- package/{chunk-KYH7XW3K.js → chunk-CD3RU7XL.js} +16 -1
- package/{chunk-SFTTXGPM.js → chunk-CMMI3DAT.js} +16 -16
- package/{chunk-VZW34YUL.js → chunk-CYWNWA77.js} +5 -5
- package/{chunk-5LQDHFBN.js → chunk-D6YNCNM6.js} +14 -11
- package/{chunk-UVUVQVZ6.js → chunk-DBUR22G5.js} +2 -2
- package/{chunk-7Z3WUZ4Q.js → chunk-DDC6P6EH.js} +24 -24
- package/{chunk-G6HJUMST.js → chunk-DEA37IUY.js} +2 -2
- package/{chunk-5RKRXQ2H.js → chunk-DGYCDA6W.js} +2 -2
- package/{chunk-3HTP4WZQ.js → chunk-DUUDXSLX.js} +21 -7
- package/{chunk-KFHREHUQ.js → chunk-DXWGFL2Z.js} +89 -1
- package/{chunk-TOKPHZ55.js → chunk-EEOOBRA7.js} +5 -5
- package/{chunk-UAPNPNSG.js → chunk-EXJK7TQO.js} +1040 -582
- package/{chunk-OXA5GWHU.js → chunk-F6Z6ZCUV.js} +2 -2
- package/{chunk-X2KRQP7V.js → chunk-FJSNBZXR.js} +1 -1
- package/{chunk-KRRE4A7D.js → chunk-G7IUT2V3.js} +3 -2
- package/{chunk-VIHDJ3FK.js → chunk-GACR7H6T.js} +14 -14
- package/{chunk-GOLPOTG5.js → chunk-GOCSSER3.js} +3 -3
- package/{chunk-NAOO4PVX.js → chunk-GPOV42YM.js} +16 -16
- package/{chunk-C2B7M567.js → chunk-GUXZK7SE.js} +5 -5
- package/{chunk-TINJKQSO.js → chunk-GYS5FUYR.js} +20 -20
- package/{chunk-IAJJYHIB.js → chunk-H6L2NFHY.js} +7 -7
- package/{chunk-45LZIYXB.js → chunk-HBRDSQ3M.js} +1 -1
- package/{chunk-T5N6NHAT.js → chunk-HHFGE2WF.js} +3 -3
- package/{chunk-IX2BXN2K.js → chunk-HSSBDZLD.js} +3 -3
- package/{chunk-MWHOH4RJ.js → chunk-HYLRQDEE.js} +4 -4
- package/{chunk-ZYA2YDB6.js → chunk-IAAIUH64.js} +16 -16
- package/{chunk-LXTC53TN.js → chunk-IXG6YXQM.js} +143 -123
- package/{chunk-CVERLOJM.js → chunk-JUSHVFNF.js} +236 -182
- package/{chunk-ABGULE7H.js → chunk-K67C2JUC.js} +12 -12
- package/{chunk-T2BEPTAG.js → chunk-L32W3PRP.js} +47 -17
- package/{chunk-M3Y4IBIR.js → chunk-M4SFKP5L.js} +4 -4
- package/{chunk-ZI5SZ3MV.js → chunk-MDZWUD3R.js} +20 -20
- package/{chunk-F5AY2UZL.js → chunk-NHY322ZU.js} +8 -8
- package/{chunk-KJAAPGBE.js → chunk-OBIC6EG7.js} +6 -6
- package/{chunk-4OKTPFNX.js → chunk-OG6MQOQG.js} +105 -37
- package/{chunk-AXYH4734.js → chunk-OOJNQK6V.js} +13 -13
- package/{chunk-XIEYGCN6.js → chunk-OWKNSIXL.js} +149 -48
- package/{chunk-JHF6VLVL.js → chunk-OYU2MA5S.js} +29 -29
- package/{chunk-6XIE5ZGI.js → chunk-PDCV7P5W.js} +1 -1
- package/{chunk-CKT6QUE2.js → chunk-Q3IVPFVO.js} +1 -1
- package/{chunk-PHOSZT3E.js → chunk-QBZCGP34.js} +1 -1
- package/{chunk-CLCXHIBS.js → chunk-QCB42576.js} +1 -1
- package/{chunk-HOCHUZQ7.js → chunk-QJTZ76CP.js} +24 -6
- package/{chunk-YQETUZ5V.js → chunk-QRGDJA4B.js} +11 -11
- package/{chunk-ULAQPRHX.js → chunk-QYB23WUH.js} +1 -1
- package/{chunk-PVAWNHP5.js → chunk-R3NEQZ53.js} +295 -102
- package/{chunk-CSW7IPVD.js → chunk-R6Z5S5GA.js} +11 -11
- package/{chunk-MK2Q7ZJD.js → chunk-R7XWZDOH.js} +58 -24
- package/{chunk-GUVXQSFZ.js → chunk-RBPUNSG5.js} +1 -1
- package/{chunk-GOQ6ZVTN.js → chunk-RG2DGNL6.js} +3 -3
- package/{chunk-6EDAMVG6.js → chunk-RTHFJZ6M.js} +10 -10
- package/{chunk-YOT437BH.js → chunk-RYOLWYBK.js} +122 -118
- package/{chunk-WJP4TH6U.js → chunk-S6FDXXZV.js} +1 -1
- package/{chunk-SW6OD4KE.js → chunk-SMJEXX2S.js} +123 -12
- package/{chunk-LJSNEV7M.js → chunk-SRCCSTIM.js} +7 -7
- package/{chunk-FKEZOMIF.js → chunk-STJ6LSQE.js} +453 -193
- package/{chunk-L42CBKBZ.js → chunk-TGNIKIHR.js} +3 -3
- package/{chunk-AK5O76CC.js → chunk-TI2EPRHE.js} +2 -2
- package/{chunk-SRG5CNLC.js → chunk-TSPMLCWI.js} +6 -6
- package/{chunk-YGILMZ7N.js → chunk-TUSTONB3.js} +1 -1
- package/{chunk-2SKTCNWO.js → chunk-UE2EVEYS.js} +2 -2
- package/{chunk-ZADGPNTV.js → chunk-UWAIJOF2.js} +29 -29
- package/{chunk-HVUDBOQG.js → chunk-VMJVAJ6W.js} +9 -6
- package/{chunk-LA7JYAKF.js → chunk-VSYTM22R.js} +3 -3
- package/{chunk-FIYSMXHY.js → chunk-WWTSEBDF.js} +1 -1
- package/{chunk-E2BESSAW.js → chunk-X4O7FJF5.js} +2 -0
- package/{chunk-GRXSJR2Z.js → chunk-XJPLSAPJ.js} +21 -21
- package/{chunk-HYKGIXNO.js → chunk-XSW4EXQV.js} +85 -21
- package/{chunk-T43K75CK.js → chunk-YKY4OVOX.js} +15 -15
- package/{chunk-5RKUPJYL.js → chunk-ZH3KXFHS.js} +11 -3
- package/chunk-ZOHO6MOF.js +376 -0
- package/{chunk-PXKF5CV4.js → chunk-ZXF6D3I6.js} +10 -8
- package/{cliAgentConfigHelpers-QVSQYTKC.js → cliAgentConfigHelpers-BTRHMPW2.js} +14 -14
- package/{cliEnvHelpers-D6HMC46Z.js → cliEnvHelpers-CNMP3RDX.js} +2 -2
- package/{cliExecutor-4MAX3PZL.js → cliExecutor-K6FDZTQ2.js} +3 -1
- package/{cliLocalAgentRecordReader-SPKAJYME.js → cliLocalAgentRecordReader-M3F76NIP.js} +46 -46
- package/{commandRegistry-TKR6OWXP.js → commandRegistry-ZLWHQVAI.js} +93 -93
- package/{contentThunks-BQWRPCTM.js → contentThunks-4ZX2TO7C.js} +36 -35
- package/{cooldownCommands-FZYQOWI5.js → cooldownCommands-YB5H5BBK.js} +3 -3
- package/{createAgentAutomationAction-GFI6SJZV.js → createAgentAutomationAction-L4CYUZJG.js} +36 -35
- package/{createDialogAction-MMBIHFFU.js → createDialogAction-QTU2R2Q3.js} +37 -37
- package/{createPageAction-EEYUE5FB.js → createPageAction-F3GJTHW2.js} +39 -38
- package/{db-CS4ZJQKV.js → db-M7FU2GNK.js} +9 -6
- package/{dbSlice-X4Z4E4QU.js → dbSlice-XRUZOGSU.js} +13 -13
- package/{deleteFile-QOOP2UK7.js → deleteFile-6URDHYRB.js} +9 -9
- package/{dialogCommands-OXBQ73DD.js → dialogCommands-NRLCOPJR.js} +56 -56
- package/{dialogNotifyCommand-VWS5G4OO.js → dialogNotifyCommand-SHGPCU22.js} +17 -17
- package/{dialogSlice-KGYIABDY.js → dialogSlice-P2S4LXQD.js} +34 -33
- package/{dialogUsageCommand-FEWCN7IA.js → dialogUsageCommand-W2WCSGKF.js} +6 -6
- package/{docCreateCommands-LS32VKY3.js → docCreateCommands-YJRDA3RX.js} +51 -50
- package/{docDeleteCommands-JTYR5RPH.js → docDeleteCommands-A5QIHZNF.js} +53 -52
- package/{docReadCommands-E5LTVKWN.js → docReadCommands-CF2LTMYH.js} +51 -50
- package/{docStore-TVS2FNER.js → docStore-6O7NYL6A.js} +15 -15
- package/{docUpdateCommands-I3J3JDZ2.js → docUpdateCommands-QRKV4ZXE.js} +51 -50
- package/{fetchMessages-Q3INLN5F.js → fetchMessages-TQEUZD7H.js} +3 -3
- package/{getPricing-VNGFM4PN.js → getPricing-LF5C4XSI.js} +6 -6
- package/{handleSendMessageAction-SSON36TJ.js → handleSendMessageAction-7IHLR37A.js} +66 -66
- package/{hostCredentialCreate-WTW4THJF.js → hostCredentialCreate-VNCQUAFT.js} +104 -105
- package/index.js +54 -16
- package/keys-RWF7UCB4.js +1 -1
- package/{localDialogRead-V36DX2Q2.js → localDialogRead-CCOCVGAP.js} +2 -2
- package/{localRuntimeAdapter-MI2JGXSF.js → localRuntimeAdapter-FOWVNMIK.js} +111 -112
- package/{machineCommands-3LROJZDK.js → machineCommands-ZGC3J4JB.js} +115 -116
- package/{machineWsRunDispatch-BUUJRUUB.js → machineWsRunDispatch-KK5U4M3G.js} +102 -103
- package/{memberThunks-CFEPHAND.js → memberThunks-7Y3OYSJQ.js} +17 -17
- package/{memoryCommands-JQMEJO7J.js → memoryCommands-BC6REPQB.js} +6 -6
- package/{overlay-THLKYIWY.js → overlay-BBQZXGYI.js} +5 -3
- package/package.json +1 -1
- package/{projectArchive-3X54XFVN.js → projectArchive-7ZDYBXAX.js} +44 -43
- package/{providerPresetApply-FO36N5TX.js → providerPresetApply-WHAMP2D5.js} +9 -9
- package/{providerRegistry-U2BSFE6K.js → providerRegistry-ZI2KORJ7.js} +9 -9
- package/{read-KA3L2V7O.js → read-TYMBGEXO.js} +9 -9
- package/{readDocTool-AMAZAPAW.js → readDocTool-SKQVHBLO.js} +1 -1
- package/{readlineWorkspace-Z3YUH4SX.js → readlineWorkspace-YHT4SX2C.js} +4391 -4161
- package/{removeDialogAgentAction-JQOJSUM7.js → removeDialogAgentAction-F5QE2O2B.js} +19 -19
- package/{runAgentClientLoop-4FCFLMDJ.js → runAgentClientLoop-H4ED5V3K.js} +70 -71
- package/{runtimeDoctorCommands-CXOCVDPU.js → runtimeDoctorCommands-RRKPBGVO.js} +16 -16
- package/{secretCommands-GGUAWAE7.js → secretCommands-KZWBZIYS.js} +2 -2
- package/{setDialogExtraReferencesAction-YXQTGXIN.js → setDialogExtraReferencesAction-72L27ERM.js} +15 -15
- package/{setPrimaryDialogAgentAction-YNLB66WE.js → setPrimaryDialogAgentAction-GJJDUSGJ.js} +19 -19
- package/{settingThunks-E6N7RSSS.js → settingThunks-ZRGWVGZD.js} +18 -18
- package/{skillDiscovery-B5V23AXP.js → skillDiscovery-I37M5KJC.js} +3 -3
- package/{spaceCommands-DB5DKC2J.js → spaceCommands-MEH3HJBC.js} +53 -52
- package/{store-JRVN62NM.js → store-Z53ICFL3.js} +3 -1
- package/{streamAgentChatTurn-FCBGMD4D.js → streamAgentChatTurn-ZXPOXU33.js} +91 -92
- package/{switchDialogAgentAction-LAHLUECU.js → switchDialogAgentAction-IIJBPND3.js} +16 -16
- package/{tableCommands-VNSXHAMG.js → tableCommands-FTAOCBTX.js} +12 -12
- package/{tools-6JD36D6K.js → tools-2MRWA2PP.js} +59 -60
- package/tuiRestart-2IL37YIB.js +41 -0
- package/{tuiSummaryLlmCaller-UHZIPGAX.js → tuiSummaryLlmCaller-W2QN4VAC.js} +21 -21
- package/{updateCommands-KZ54HCU5.js → updateCommands-CPATDG6J.js} +8 -6
- package/{updateDialogTitleAction-RV3EUEN3.js → updateDialogTitleAction-RZ3KZSGQ.js} +36 -35
- package/{usageCommand-KFVV6UL3.js → usageCommand-2BF74MKF.js} +2 -2
- package/{usageRebuildCommand-HHFSNK46.js → usageRebuildCommand-UHB55BQM.js} +3 -3
- package/{windowsSelfUpdate-KERHIAB4.js → windowsSelfUpdate-ZFD6J5HF.js} +2 -2
- package/chunk-BJF2MHJ3.js +0 -118
- package/chunk-KEPOVMF4.js +0 -91
- package/chunk-PMDVQBGA.js +0 -100
- package/chunk-WACI5I6V.js +0 -147
- package/{accountResolver-EK2S4PWF.js → accountResolver-QETKNC7T.js} +4 -4
- package/{chunk-AGP3YSEC.js → chunk-4N6G2CKP.js} +3 -3
- package/{chunk-VXL2FZTP.js → chunk-HXER7YJF.js} +3 -3
- package/{chunk-BLVSFYQ3.js → chunk-LISC7BD4.js} +3 -3
- package/{chunk-SSGTV4FC.js → chunk-USGHJSGO.js} +5 -5
- package/{chunk-IC2I373Q.js → chunk-VS276URX.js} +3 -3
- package/{chunk-AETZ7AD6.js → chunk-W6RFEDN4.js} +3 -3
- package/{offlineMarxistsAgentCommand-AGA2X5E4.js → offlineMarxistsAgentCommand-XVXUE6G5.js} +5 -5
- package/{workloadLifecycle-O2I3NZ2Q.js → workloadLifecycle-HFJIN5IZ.js} +8 -8
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
chooseMemoryOwners,
|
|
3
|
-
loadMemoryCandidatesFromDb
|
|
4
|
-
} from "./chunk-BJF2MHJ3.js";
|
|
5
1
|
import {
|
|
6
2
|
addContentToSpace
|
|
7
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GYS5FUYR.js";
|
|
8
4
|
import {
|
|
9
5
|
prepareAndPersistMessage,
|
|
10
6
|
uiAskChoiceFunc,
|
|
11
7
|
uiAskChoiceFunctionSchema
|
|
12
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-R3NEQZ53.js";
|
|
13
9
|
import {
|
|
14
10
|
require_format
|
|
15
11
|
} from "./chunk-BUDVRYES.js";
|
|
@@ -22,10 +18,10 @@ import {
|
|
|
22
18
|
removeCachedEntity,
|
|
23
19
|
upsertSSREntity,
|
|
24
20
|
write
|
|
25
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-CMMI3DAT.js";
|
|
26
22
|
import {
|
|
27
23
|
isDevelopment
|
|
28
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-4N6G2CKP.js";
|
|
29
25
|
import {
|
|
30
26
|
selectIdentityUserId
|
|
31
27
|
} from "./chunk-PXYBUFDB.js";
|
|
@@ -33,18 +29,23 @@ import {
|
|
|
33
29
|
extractCustomId
|
|
34
30
|
} from "./chunk-M2EJHDJP.js";
|
|
35
31
|
import {
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
createMemoryKey,
|
|
33
|
+
memoryOwnerRange,
|
|
34
|
+
memorySubjectKindRange
|
|
35
|
+
} from "./chunk-SYTHYBMI.js";
|
|
38
36
|
import {
|
|
39
37
|
createDialogKey,
|
|
40
38
|
dialogMessageRange
|
|
41
39
|
} from "./chunk-OJKUU3LP.js";
|
|
40
|
+
import {
|
|
41
|
+
asOptionalPositiveFiniteNumber
|
|
42
|
+
} from "./chunk-U6VC4MU4.js";
|
|
42
43
|
import {
|
|
43
44
|
asTrimmedString
|
|
44
45
|
} from "./chunk-3EUW3WEO.js";
|
|
45
46
|
import {
|
|
46
|
-
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
isRecord
|
|
48
|
+
} from "./chunk-KUG52IAP.js";
|
|
48
49
|
import {
|
|
49
50
|
asOptionalTrimmedString
|
|
50
51
|
} from "./chunk-G3SUCT4W.js";
|
|
@@ -261,6 +262,113 @@ var mergeGreetingWithRelationshipRecap = (input) => {
|
|
|
261
262
|
\u5982\u679C\u4F60\u8FD8\u60F3\u63A5\u7740\u90A3\u4E2A\u70B9\u7EE7\u7EED\uFF0C\u6211\u4EEC\u53EF\u4EE5\u4ECE\u90A3\u91CC\u5F80\u4E0B\u8D70\uFF1B\u5982\u679C\u60F3\u6362\u4E2A\u65B9\u5411\u4E5F\u53EF\u4EE5\u3002`;
|
|
262
263
|
};
|
|
263
264
|
|
|
265
|
+
// packages/ai/memory/queryShared.ts
|
|
266
|
+
var chooseMemoryOwners = (input) => {
|
|
267
|
+
const owners = [];
|
|
268
|
+
if (input.userId) {
|
|
269
|
+
owners.push({ ownerType: "user", ownerId: input.userId });
|
|
270
|
+
}
|
|
271
|
+
if (input.spaceId) {
|
|
272
|
+
owners.push({ ownerType: "space", ownerId: input.spaceId });
|
|
273
|
+
}
|
|
274
|
+
return owners;
|
|
275
|
+
};
|
|
276
|
+
var loadOwnerItemsFromDb = async (db, owner, limit) => {
|
|
277
|
+
const range = memoryOwnerRange(owner.ownerType, owner.ownerId);
|
|
278
|
+
const refs = [];
|
|
279
|
+
for await (const [, value] of db.iterator({
|
|
280
|
+
gte: range.start,
|
|
281
|
+
lte: range.end,
|
|
282
|
+
reverse: true
|
|
283
|
+
})) {
|
|
284
|
+
refs.push(value ?? {});
|
|
285
|
+
if (refs.length >= limit) break;
|
|
286
|
+
}
|
|
287
|
+
const items = await Promise.all(
|
|
288
|
+
refs.map(
|
|
289
|
+
(ref) => typeof ref?.memoryId === "string" ? db.get(createMemoryKey(owner.ownerType, owner.ownerId, ref.memoryId)).catch(() => null) : Promise.resolve(null)
|
|
290
|
+
)
|
|
291
|
+
);
|
|
292
|
+
return items.filter((item) => !!item);
|
|
293
|
+
};
|
|
294
|
+
var loadSubjectKindItemsFromDb = async (db, subject, kind, limit) => {
|
|
295
|
+
const range = memorySubjectKindRange(subject.subjectType, subject.subjectId, kind);
|
|
296
|
+
const refs = [];
|
|
297
|
+
for await (const [, value] of db.iterator({
|
|
298
|
+
gte: range.start,
|
|
299
|
+
lte: range.end,
|
|
300
|
+
reverse: true
|
|
301
|
+
})) {
|
|
302
|
+
refs.push(value ?? {});
|
|
303
|
+
if (refs.length >= limit) break;
|
|
304
|
+
}
|
|
305
|
+
const items = await Promise.all(
|
|
306
|
+
refs.map(
|
|
307
|
+
(ref) => typeof ref?.memoryKey === "string" ? db.get(ref.memoryKey).catch(() => null) : Promise.resolve(null)
|
|
308
|
+
)
|
|
309
|
+
);
|
|
310
|
+
return items.filter((item) => !!item);
|
|
311
|
+
};
|
|
312
|
+
var loadMemoryCandidatesFromDb = async (db, input) => {
|
|
313
|
+
const kinds = input.kinds ?? ["episodic", "semantic", "procedural"];
|
|
314
|
+
const ownerLimit = input.ownerLimit ?? 12;
|
|
315
|
+
const ownerFallback = input.ownerFallback ?? "onSubjectMiss";
|
|
316
|
+
const reserve = Math.max(0, input.corroboratedProceduralReserve ?? 0);
|
|
317
|
+
const ownerKeySet = new Set(
|
|
318
|
+
input.owners.filter((owner) => owner.ownerId).map((owner) => `${owner.ownerType}:${owner.ownerId}`)
|
|
319
|
+
);
|
|
320
|
+
const subjects = input.subjects.filter(
|
|
321
|
+
(subject) => !!subject.subjectId
|
|
322
|
+
);
|
|
323
|
+
const subjectResults = subjects.length > 0 ? await Promise.all(
|
|
324
|
+
subjects.flatMap(
|
|
325
|
+
(subject) => kinds.map(
|
|
326
|
+
(kind) => loadSubjectKindItemsFromDb(db, subject, kind, ownerLimit)
|
|
327
|
+
)
|
|
328
|
+
)
|
|
329
|
+
) : [];
|
|
330
|
+
const subjectHitCount = subjectResults.reduce((sum, items) => sum + items.length, 0);
|
|
331
|
+
const shouldLoadOwnerFallback = ownerFallback !== "never" && (subjects.length === 0 || subjectHitCount === 0 || ownerFallback === "always");
|
|
332
|
+
const results = shouldLoadOwnerFallback ? await Promise.all(
|
|
333
|
+
[
|
|
334
|
+
...subjectResults,
|
|
335
|
+
...input.owners.map((owner) => loadOwnerItemsFromDb(db, owner, ownerLimit))
|
|
336
|
+
]
|
|
337
|
+
) : subjectResults;
|
|
338
|
+
if (reserve > 0 && kinds.includes("procedural")) {
|
|
339
|
+
const probeLimit = ownerLimit * 2;
|
|
340
|
+
const reserveResults = await Promise.all(
|
|
341
|
+
subjects.map(
|
|
342
|
+
(subject) => loadSubjectKindItemsFromDb(db, subject, "procedural", probeLimit)
|
|
343
|
+
)
|
|
344
|
+
);
|
|
345
|
+
const corroborated = reserveResults.flat().filter((item) => item && item.recurrenceEvidence).sort((a, b) => b.createdAt.localeCompare(a.createdAt)).slice(0, reserve);
|
|
346
|
+
for (const item of corroborated) {
|
|
347
|
+
results.push([item]);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
const kindSet = new Set(kinds);
|
|
351
|
+
const seen = /* @__PURE__ */ new Set();
|
|
352
|
+
const merged = [];
|
|
353
|
+
for (const items of results) {
|
|
354
|
+
for (const item of items) {
|
|
355
|
+
if (seen.has(item.id)) continue;
|
|
356
|
+
if (!kindSet.has(item.kind)) continue;
|
|
357
|
+
if (ownerKeySet.size > 0 && !ownerKeySet.has(`${item.ownerType}:${item.ownerId}`)) {
|
|
358
|
+
continue;
|
|
359
|
+
}
|
|
360
|
+
if (!shouldLoadOwnerFallback && subjects.length > 0 && !subjects.some(
|
|
361
|
+
(subject) => subject.subjectType === item.subjectType && subject.subjectId === item.subjectId
|
|
362
|
+
)) {
|
|
363
|
+
continue;
|
|
364
|
+
}
|
|
365
|
+
seen.add(item.id);
|
|
366
|
+
merged.push(item);
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
return merged;
|
|
370
|
+
};
|
|
371
|
+
|
|
264
372
|
// packages/ai/memory/understandingGreeting.ts
|
|
265
373
|
var UNDERSTANDING_TAG = "understanding-memory";
|
|
266
374
|
var facetPriority = {
|
|
@@ -746,6 +854,9 @@ var createDialogAction = async (args, thunkApi) => {
|
|
|
746
854
|
export {
|
|
747
855
|
resolveAgentMemoryPolicy,
|
|
748
856
|
buildMemorySubjectsForAgent,
|
|
857
|
+
chooseMemoryOwners,
|
|
858
|
+
loadOwnerItemsFromDb,
|
|
859
|
+
loadMemoryCandidatesFromDb,
|
|
749
860
|
isLocalOwnerDialogAgents,
|
|
750
861
|
createDialogAction
|
|
751
862
|
};
|
|
@@ -4,20 +4,20 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
getApproxPricePerImage
|
|
6
6
|
} from "./chunk-4JH2UMJR.js";
|
|
7
|
+
import {
|
|
8
|
+
asOptionalPositiveFiniteNumber
|
|
9
|
+
} from "./chunk-U6VC4MU4.js";
|
|
7
10
|
import {
|
|
8
11
|
getModelConfig
|
|
9
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-CD3RU7XL.js";
|
|
13
|
+
import {
|
|
14
|
+
asOptionalFiniteNumber
|
|
15
|
+
} from "./chunk-WWC7I6TA.js";
|
|
10
16
|
import {
|
|
11
17
|
isPlatformHostedImageModel,
|
|
12
18
|
isPlatformManagedProvider,
|
|
13
19
|
resolvePlatformEffectiveModel
|
|
14
20
|
} from "./chunk-OBSEKCVK.js";
|
|
15
|
-
import {
|
|
16
|
-
asOptionalPositiveFiniteNumber
|
|
17
|
-
} from "./chunk-U6VC4MU4.js";
|
|
18
|
-
import {
|
|
19
|
-
asOptionalFiniteNumber
|
|
20
|
-
} from "./chunk-WWC7I6TA.js";
|
|
21
21
|
|
|
22
22
|
// packages/ai/llm/getPricing.ts
|
|
23
23
|
var MAX_OUTPUT_TOKENS = 8192;
|