nolo-cli 0.226.0-alpha.2 → 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.
Files changed (198) hide show
  1. package/{_executeModel-IKZGZZXW.js → _executeModel-WZKT6XEU.js} +74 -75
  2. package/{action-CK64LS6S.js → action-GDZDXPMB.js} +7 -7
  3. package/{addContentAction-EQXMFNPR.js → addContentAction-7RO4AMRI.js} +12 -12
  4. package/{addDialogAgentAction-RSDZDASD.js → addDialogAgentAction-EVYBGTXB.js} +14 -14
  5. package/{agentDeleteCommand-IZY3VF5F.js → agentDeleteCommand-PZWRHNXY.js} +114 -116
  6. package/{agentEmailCommands-YWL567CL.js → agentEmailCommands-QTKMEICX.js} +115 -117
  7. package/{agentFavoriteCommands-2LKGKSUD.js → agentFavoriteCommands-7LOP3HUD.js} +5 -5
  8. package/{agentGrantCommands-QQV4N4JW.js → agentGrantCommands-L6O2HVJI.js} +5 -5
  9. package/{agentListCommands-YBNOQ5T3.js → agentListCommands-GUGMORTK.js} +84 -70
  10. package/{agentMachineCommands-AXJ4A772.js → agentMachineCommands-7QGICJLM.js} +56 -55
  11. package/{agentProviderCommands-7BSJH7TO.js → agentProviderCommands-STI3DQ6A.js} +6 -6
  12. package/{agentPullCommand-XN6ZPBUW.js → agentPullCommand-KHV4EELF.js} +5 -5
  13. package/{agentRecordCommands-WUUC2CX7.js → agentRecordCommands-SLLADS5C.js} +102 -104
  14. package/{agentRunCommand-W6MDKVLJ.js → agentRunCommand-OFQLOF5Y.js} +113 -114
  15. package/{agentRunControl-DFEEOFC7.js → agentRunControl-MBG4U6SL.js} +20 -14
  16. package/{agentRuntimeLocal-GSTYFEX4.js → agentRuntimeLocal-TU4LA353.js} +39 -39
  17. package/{agentSlice-5F5U5X2U.js → agentSlice-L4SBGWTB.js} +16 -16
  18. package/{appDeleteCommands-L7HL4AWF.js → appDeleteCommands-JWP3XPUA.js} +50 -49
  19. package/{appDeployCommands-SGSUNFZR.js → appDeployCommands-6E4TQCWI.js} +50 -49
  20. package/{appDeployStatusCommands-AAA3XD54.js → appDeployStatusCommands-ALU4SADG.js} +50 -49
  21. package/{appGetCommands-LN72GAOA.js → appGetCommands-JEY4L6L4.js} +50 -49
  22. package/{appListCommands-IJQQ3VND.js → appListCommands-PCAVHU7M.js} +50 -49
  23. package/{authCommand-7JXW54U4.js → authCommand-CGRIIOOV.js} +26 -27
  24. package/{authCommands-YDNAIDEY.js → authCommands-55OGQGCR.js} +9 -10
  25. package/{builtinSkillRegistry-PXH7EGQB.js → builtinSkillRegistry-BAE2LDXF.js} +4 -4
  26. package/{chromeOpsCommands-YKX2QX3A.js → chromeOpsCommands-WAA45NCS.js} +6 -6
  27. package/{chunk-OB6DVWPF.js → chunk-262R3XNN.js} +16 -2
  28. package/{chunk-N5PQJKCY.js → chunk-2MCB7CD7.js} +13 -12
  29. package/{chunk-VFBVA3U2.js → chunk-2NPD3FTX.js} +3 -3
  30. package/{chunk-SBVTHMEG.js → chunk-2X7WFDT6.js} +1 -1
  31. package/{chunk-XI2BWJM5.js → chunk-324FWHUA.js} +20 -3
  32. package/{chunk-JWXITTQB.js → chunk-3P54D2E4.js} +1 -1
  33. package/{chunk-ZH6MUQEO.js → chunk-3U44JB3O.js} +1 -1
  34. package/{chunk-EUCFKKDM.js → chunk-4I2MXV5Q.js} +38 -10
  35. package/{chunk-C4WTX5TU.js → chunk-4ZGPHFLE.js} +2 -2
  36. package/{chunk-MOMR7NMG.js → chunk-547ENH5T.js} +1 -1
  37. package/chunk-5ZUOVCKT.js +32 -0
  38. package/{chunk-KOXKKHFE.js → chunk-6QHKRARD.js} +2 -2
  39. package/{chunk-YGMBIXCF.js → chunk-6XRPBZRS.js} +4 -2
  40. package/{chunk-EWPDMS4N.js → chunk-7JGMNKKG.js} +18 -14
  41. package/{chunk-2TIQO6TC.js → chunk-AGYPUBFW.js} +31 -205
  42. package/{chunk-UYOICCYG.js → chunk-ALAES342.js} +59 -88
  43. package/{chunk-VREDDN25.js → chunk-ATEKLSLR.js} +1 -1
  44. package/{chunk-GBZ4YKEO.js → chunk-AUAJTAFM.js} +8 -8
  45. package/chunk-BIDSIRTS.js +307 -0
  46. package/chunk-BIWI5M4E.js +62 -0
  47. package/{chunk-L5I543VB.js → chunk-BNMPUQW6.js} +1 -1
  48. package/{chunk-BGGHA5DV.js → chunk-BP5ZJ6B4.js} +1 -1
  49. package/{chunk-3QFLXA24.js → chunk-CBUZ6DKA.js} +3 -3
  50. package/{chunk-KYH7XW3K.js → chunk-CD3RU7XL.js} +16 -1
  51. package/{chunk-AVHRSJUH.js → chunk-CMMI3DAT.js} +13 -13
  52. package/{chunk-XN23AUVU.js → chunk-CYWNWA77.js} +5 -5
  53. package/{chunk-2VA6TU4I.js → chunk-D6YNCNM6.js} +17 -14
  54. package/{chunk-GOAPXKQU.js → chunk-DBUR22G5.js} +5 -5
  55. package/{chunk-QTMIHVLE.js → chunk-DDC6P6EH.js} +22 -19
  56. package/{chunk-PVZY6P3S.js → chunk-DEA37IUY.js} +2 -2
  57. package/{chunk-QLFCTYRH.js → chunk-DGYCDA6W.js} +3 -3
  58. package/{chunk-KNIIRXHF.js → chunk-DUUDXSLX.js} +21 -7
  59. package/{chunk-KFHREHUQ.js → chunk-DXWGFL2Z.js} +89 -1
  60. package/{chunk-JM5C4EUA.js → chunk-EEOOBRA7.js} +5 -5
  61. package/{chunk-KN3HEZIQ.js → chunk-EVGU5P4U.js} +1 -1
  62. package/{chunk-GBUDWITV.js → chunk-EXJK7TQO.js} +1837 -1112
  63. package/{chunk-YDBMZ7FV.js → chunk-F6Z6ZCUV.js} +2 -2
  64. package/{chunk-EOWLBDY6.js → chunk-FJSNBZXR.js} +1 -1
  65. package/{chunk-GNHMRBYZ.js → chunk-G7IUT2V3.js} +4 -3
  66. package/{chunk-4AMQZTE7.js → chunk-GACR7H6T.js} +14 -14
  67. package/{chunk-NEKH3XDV.js → chunk-GOCSSER3.js} +3 -3
  68. package/{chunk-3KNEE64G.js → chunk-GPOV42YM.js} +14 -14
  69. package/{chunk-UEKXWO7A.js → chunk-GUXZK7SE.js} +2 -2
  70. package/{chunk-JHRQXQ4A.js → chunk-GYS5FUYR.js} +19 -19
  71. package/{chunk-6O5YP6FX.js → chunk-H6L2NFHY.js} +6 -6
  72. package/{chunk-45LZIYXB.js → chunk-HBRDSQ3M.js} +1 -1
  73. package/{chunk-KZU52OJ5.js → chunk-HHFGE2WF.js} +6 -6
  74. package/{chunk-VV7TXWOC.js → chunk-HSSBDZLD.js} +3 -3
  75. package/{chunk-GIABSSWQ.js → chunk-HYLRQDEE.js} +4 -4
  76. package/{chunk-EFX3Q5SM.js → chunk-IAAIUH64.js} +15 -15
  77. package/{chunk-UJKTI5PG.js → chunk-ILHQ2AXT.js} +0 -1
  78. package/{chunk-EJU6WCDH.js → chunk-IXG6YXQM.js} +146 -114
  79. package/{chunk-KC4SCKXO.js → chunk-JUSHVFNF.js} +238 -185
  80. package/{chunk-BLSNUIZD.js → chunk-K67C2JUC.js} +10 -10
  81. package/{chunk-IZIN2UNJ.js → chunk-L32W3PRP.js} +46 -16
  82. package/{chunk-67BE44IS.js → chunk-M4SFKP5L.js} +1 -1
  83. package/{chunk-L4NFXFFF.js → chunk-MDZWUD3R.js} +18 -18
  84. package/{chunk-QZI44GWV.js → chunk-NHY322ZU.js} +150 -9
  85. package/{chunk-DISQCYPE.js → chunk-OBIC6EG7.js} +6 -6
  86. package/{chunk-AZQZ5XPM.js → chunk-OG6MQOQG.js} +96 -28
  87. package/{chunk-VQUWV3YR.js → chunk-OOJNQK6V.js} +1 -1
  88. package/{chunk-F7DU25CE.js → chunk-OWKNSIXL.js} +149 -54
  89. package/{chunk-RRVQ446B.js → chunk-OYU2MA5S.js} +25 -25
  90. package/{chunk-CKT6QUE2.js → chunk-Q3IVPFVO.js} +1 -1
  91. package/{chunk-FTQWYWUI.js → chunk-QBZCGP34.js} +1 -1
  92. package/{chunk-2ZKFCIJJ.js → chunk-QCB42576.js} +1 -1
  93. package/{chunk-HOCHUZQ7.js → chunk-QJTZ76CP.js} +24 -6
  94. package/{chunk-LM2PS3YS.js → chunk-QRGDJA4B.js} +9 -9
  95. package/{chunk-SOG7OEXX.js → chunk-QYB23WUH.js} +1 -1
  96. package/{chunk-W772FYAQ.js → chunk-R3NEQZ53.js} +285 -92
  97. package/{chunk-2VUZSVAS.js → chunk-R6Z5S5GA.js} +7 -7
  98. package/{chunk-MK2Q7ZJD.js → chunk-R7XWZDOH.js} +58 -24
  99. package/{chunk-GGKNJ42M.js → chunk-RBPUNSG5.js} +2 -2
  100. package/{chunk-GVGOEMNV.js → chunk-RG2DGNL6.js} +3 -3
  101. package/{chunk-4NA3YTBC.js → chunk-RTHFJZ6M.js} +7 -7
  102. package/{chunk-C4VAR65S.js → chunk-RYOLWYBK.js} +120 -116
  103. package/{chunk-D726I5AZ.js → chunk-S6FDXXZV.js} +2 -2
  104. package/{chunk-JVRQ6YVK.js → chunk-S6K5F3KP.js} +1 -1
  105. package/{chunk-HHL7WG65.js → chunk-SMJEXX2S.js} +122 -11
  106. package/{chunk-LJSNEV7M.js → chunk-SRCCSTIM.js} +7 -7
  107. package/{chunk-WSJMT3FA.js → chunk-STJ6LSQE.js} +746 -2519
  108. package/{chunk-6J4TTPS2.js → chunk-TGNIKIHR.js} +5 -5
  109. package/{chunk-AK5O76CC.js → chunk-TI2EPRHE.js} +2 -2
  110. package/{chunk-4HFTBHBF.js → chunk-TSPMLCWI.js} +6 -6
  111. package/{chunk-QVBXJNZ2.js → chunk-TUSTONB3.js} +1 -1
  112. package/{chunk-2COEG5ZV.js → chunk-UE2EVEYS.js} +2 -2
  113. package/{chunk-E5EIYI34.js → chunk-UWAIJOF2.js} +19 -19
  114. package/{chunk-KEN3N2TN.js → chunk-VMJVAJ6W.js} +13 -10
  115. package/{chunk-SOF4OWDM.js → chunk-VS276URX.js} +0 -2
  116. package/{chunk-BYH3HMUP.js → chunk-VSYTM22R.js} +3 -3
  117. package/{chunk-FIYSMXHY.js → chunk-WWTSEBDF.js} +1 -1
  118. package/{chunk-E2BESSAW.js → chunk-X4O7FJF5.js} +2 -0
  119. package/{chunk-T3T57NVP.js → chunk-XJPLSAPJ.js} +11 -11
  120. package/{chunk-UKS7D2NL.js → chunk-XSW4EXQV.js} +82 -18
  121. package/{chunk-TXGQ4O5S.js → chunk-YKY4OVOX.js} +11 -11
  122. package/{chunk-5RKUPJYL.js → chunk-ZH3KXFHS.js} +11 -3
  123. package/chunk-ZOHO6MOF.js +376 -0
  124. package/{chunk-OLMJR6UM.js → chunk-ZXF6D3I6.js} +9 -7
  125. package/{cliAgentConfigHelpers-KICKKNYQ.js → cliAgentConfigHelpers-BTRHMPW2.js} +12 -12
  126. package/{cliEnvHelpers-VPSJ4XWC.js → cliEnvHelpers-CNMP3RDX.js} +1 -1
  127. package/{cliExecutor-4MAX3PZL.js → cliExecutor-K6FDZTQ2.js} +3 -1
  128. package/{cliLocalAgentRecordReader-6FXGFBI3.js → cliLocalAgentRecordReader-M3F76NIP.js} +45 -45
  129. package/{commandRegistry-6EQXVODF.js → commandRegistry-ZLWHQVAI.js} +93 -93
  130. package/{contentThunks-ANUP57QV.js → contentThunks-4ZX2TO7C.js} +36 -35
  131. package/{cooldownCommands-X7P5M2V5.js → cooldownCommands-YB5H5BBK.js} +4 -4
  132. package/{createAgentAutomationAction-XMUWUDKQ.js → createAgentAutomationAction-L4CYUZJG.js} +36 -35
  133. package/{createDialogAction-43QJIQDH.js → createDialogAction-QTU2R2Q3.js} +37 -37
  134. package/{createPageAction-SJO7UC3J.js → createPageAction-F3GJTHW2.js} +37 -36
  135. package/{db-CS4ZJQKV.js → db-M7FU2GNK.js} +9 -6
  136. package/{dbSlice-ZJPDIFER.js → dbSlice-XRUZOGSU.js} +11 -11
  137. package/{deleteFile-Q3YDB4ML.js → deleteFile-6URDHYRB.js} +7 -7
  138. package/{dialogCommands-V5IYEOQP.js → dialogCommands-NRLCOPJR.js} +52 -52
  139. package/{dialogNotifyCommand-77B57PL6.js → dialogNotifyCommand-SHGPCU22.js} +13 -13
  140. package/{dialogSlice-FQ6WOKWJ.js → dialogSlice-P2S4LXQD.js} +34 -33
  141. package/{dialogUsageCommand-HTVPR2CX.js → dialogUsageCommand-W2WCSGKF.js} +1 -1
  142. package/{docCreateCommands-36WS33BK.js → docCreateCommands-YJRDA3RX.js} +48 -47
  143. package/{docDeleteCommands-C4CS4XLF.js → docDeleteCommands-A5QIHZNF.js} +50 -49
  144. package/{docReadCommands-QZMSFMPN.js → docReadCommands-CF2LTMYH.js} +48 -47
  145. package/{docStore-BZ2O7WLF.js → docStore-6O7NYL6A.js} +12 -12
  146. package/{docUpdateCommands-BYI64HVV.js → docUpdateCommands-QRKV4ZXE.js} +48 -47
  147. package/fetchMessages-TQEUZD7H.js +1 -1
  148. package/{getPricing-VNGFM4PN.js → getPricing-LF5C4XSI.js} +5 -5
  149. package/{handleSendMessageAction-I5J7QR7K.js → handleSendMessageAction-7IHLR37A.js} +65 -65
  150. package/{hostCredentialCreate-AVPMK7EQ.js → hostCredentialCreate-VNCQUAFT.js} +102 -104
  151. package/index.js +56 -18
  152. package/keys-RWF7UCB4.js +1 -1
  153. package/{localDialogRead-SVTPA5GY.js → localDialogRead-CCOCVGAP.js} +1 -1
  154. package/{localRuntimeAdapter-S56R76HN.js → localRuntimeAdapter-FOWVNMIK.js} +109 -111
  155. package/{machineCommands-77NFB2AE.js → machineCommands-ZGC3J4JB.js} +111 -113
  156. package/{machineWsRunDispatch-5XWFUJ53.js → machineWsRunDispatch-KK5U4M3G.js} +100 -102
  157. package/{memberThunks-JRYNONYV.js → memberThunks-7Y3OYSJQ.js} +15 -15
  158. package/{memoryCommands-5WC3T66U.js → memoryCommands-BC6REPQB.js} +4 -4
  159. package/{overlay-THLKYIWY.js → overlay-BBQZXGYI.js} +5 -3
  160. package/package.json +1 -1
  161. package/{projectArchive-GNOSYH6F.js → projectArchive-7ZDYBXAX.js} +42 -41
  162. package/{providerPresetApply-J3WMRPD2.js → providerPresetApply-WHAMP2D5.js} +6 -6
  163. package/{providerRegistry-KJGB5XWS.js → providerRegistry-ZI2KORJ7.js} +6 -6
  164. package/{read-Q7GOHGNP.js → read-TYMBGEXO.js} +8 -8
  165. package/{readDocTool-Z5OQ6422.js → readDocTool-SKQVHBLO.js} +1 -1
  166. package/{readlineWorkspace-2PONGBUP.js → readlineWorkspace-YHT4SX2C.js} +4794 -5229
  167. package/{removeDialogAgentAction-U3F2MNAY.js → removeDialogAgentAction-F5QE2O2B.js} +16 -16
  168. package/{runAgentClientLoop-WEXFFHVS.js → runAgentClientLoop-H4ED5V3K.js} +71 -68
  169. package/{runtimeDoctorCommands-UXKXYBW6.js → runtimeDoctorCommands-RRKPBGVO.js} +14 -14
  170. package/{secretCommands-LJXOOYA7.js → secretCommands-KZWBZIYS.js} +4 -4
  171. package/{setDialogExtraReferencesAction-G3WSJ7EM.js → setDialogExtraReferencesAction-72L27ERM.js} +13 -13
  172. package/{setPrimaryDialogAgentAction-6FHAHZBB.js → setPrimaryDialogAgentAction-GJJDUSGJ.js} +16 -16
  173. package/{settingThunks-AXTBX3Q5.js → settingThunks-ZRGWVGZD.js} +15 -15
  174. package/{skillDiscovery-B5V23AXP.js → skillDiscovery-I37M5KJC.js} +3 -3
  175. package/{spaceCommands-GUKMDRWN.js → spaceCommands-MEH3HJBC.js} +53 -52
  176. package/{store-JRVN62NM.js → store-Z53ICFL3.js} +3 -1
  177. package/{streamAgentChatTurn-D2WFS5MF.js → streamAgentChatTurn-ZXPOXU33.js} +89 -129
  178. package/{switchDialogAgentAction-UOFIAGPL.js → switchDialogAgentAction-IIJBPND3.js} +14 -14
  179. package/{tableCommands-HITDSLHS.js → tableCommands-FTAOCBTX.js} +11 -11
  180. package/{tools-YKE6PQHT.js → tools-2MRWA2PP.js} +58 -59
  181. package/tuiRestart-2IL37YIB.js +41 -0
  182. package/{tuiSummaryLlmCaller-7WLUKNP2.js → tuiSummaryLlmCaller-W2QN4VAC.js} +18 -18
  183. package/{updateCommands-RJVCRSBP.js → updateCommands-CPATDG6J.js} +8 -6
  184. package/{updateDialogTitleAction-D5NCA4FC.js → updateDialogTitleAction-RZ3KZSGQ.js} +36 -35
  185. package/{usageCommand-YPJ2ZI2F.js → usageCommand-2BF74MKF.js} +2 -2
  186. package/{usageRebuildCommand-FERQO74C.js → usageRebuildCommand-UHB55BQM.js} +3 -3
  187. package/{windowsSelfUpdate-KERHIAB4.js → windowsSelfUpdate-ZFD6J5HF.js} +2 -2
  188. package/chunk-2THCNKE4.js +0 -147
  189. package/chunk-BJF2MHJ3.js +0 -118
  190. package/chunk-KEPOVMF4.js +0 -91
  191. package/chunk-PMDVQBGA.js +0 -100
  192. package/{accountResolver-EK2S4PWF.js → accountResolver-QETKNC7T.js} +3 -3
  193. package/{chunk-AGP3YSEC.js → chunk-4N6G2CKP.js} +3 -3
  194. package/{chunk-BLVSFYQ3.js → chunk-LISC7BD4.js} +3 -3
  195. package/{chunk-SNBZZPYH.js → chunk-OQHIVPG4.js} +3 -3
  196. package/{chunk-47ITIXO7.js → chunk-USGHJSGO.js} +3 -3
  197. package/{offlineMarxistsAgentCommand-4IC3Y4C6.js → offlineMarxistsAgentCommand-XVXUE6G5.js} +3 -3
  198. package/{workloadLifecycle-O2I3NZ2Q.js → workloadLifecycle-HFJIN5IZ.js} +8 -8
package/chunk-BJF2MHJ3.js DELETED
@@ -1,118 +0,0 @@
1
- import {
2
- createMemoryKey,
3
- memoryOwnerRange,
4
- memorySubjectKindRange
5
- } from "./chunk-SYTHYBMI.js";
6
-
7
- // packages/ai/memory/queryShared.ts
8
- var chooseMemoryOwners = (input) => {
9
- const owners = [];
10
- if (input.userId) {
11
- owners.push({ ownerType: "user", ownerId: input.userId });
12
- }
13
- if (input.spaceId) {
14
- owners.push({ ownerType: "space", ownerId: input.spaceId });
15
- }
16
- return owners;
17
- };
18
- var loadOwnerItemsFromDb = async (db, owner, limit) => {
19
- const range = memoryOwnerRange(owner.ownerType, owner.ownerId);
20
- const refs = [];
21
- for await (const [, value] of db.iterator({
22
- gte: range.start,
23
- lte: range.end,
24
- reverse: true
25
- })) {
26
- refs.push(value ?? {});
27
- if (refs.length >= limit) break;
28
- }
29
- const items = await Promise.all(
30
- refs.map(
31
- (ref) => typeof ref?.memoryId === "string" ? db.get(createMemoryKey(owner.ownerType, owner.ownerId, ref.memoryId)).catch(() => null) : Promise.resolve(null)
32
- )
33
- );
34
- return items.filter((item) => !!item);
35
- };
36
- var loadSubjectKindItemsFromDb = async (db, subject, kind, limit) => {
37
- const range = memorySubjectKindRange(subject.subjectType, subject.subjectId, kind);
38
- const refs = [];
39
- for await (const [, value] of db.iterator({
40
- gte: range.start,
41
- lte: range.end,
42
- reverse: true
43
- })) {
44
- refs.push(value ?? {});
45
- if (refs.length >= limit) break;
46
- }
47
- const items = await Promise.all(
48
- refs.map(
49
- (ref) => typeof ref?.memoryKey === "string" ? db.get(ref.memoryKey).catch(() => null) : Promise.resolve(null)
50
- )
51
- );
52
- return items.filter((item) => !!item);
53
- };
54
- var loadMemoryCandidatesFromDb = async (db, input) => {
55
- const kinds = input.kinds ?? ["episodic", "semantic", "procedural"];
56
- const ownerLimit = input.ownerLimit ?? 12;
57
- const ownerFallback = input.ownerFallback ?? "onSubjectMiss";
58
- const reserve = Math.max(0, input.corroboratedProceduralReserve ?? 0);
59
- const ownerKeySet = new Set(
60
- input.owners.filter((owner) => owner.ownerId).map((owner) => `${owner.ownerType}:${owner.ownerId}`)
61
- );
62
- const subjects = input.subjects.filter(
63
- (subject) => !!subject.subjectId
64
- );
65
- const subjectResults = subjects.length > 0 ? await Promise.all(
66
- subjects.flatMap(
67
- (subject) => kinds.map(
68
- (kind) => loadSubjectKindItemsFromDb(db, subject, kind, ownerLimit)
69
- )
70
- )
71
- ) : [];
72
- const subjectHitCount = subjectResults.reduce((sum, items) => sum + items.length, 0);
73
- const shouldLoadOwnerFallback = ownerFallback !== "never" && (subjects.length === 0 || subjectHitCount === 0 || ownerFallback === "always");
74
- const results = shouldLoadOwnerFallback ? await Promise.all(
75
- [
76
- ...subjectResults,
77
- ...input.owners.map((owner) => loadOwnerItemsFromDb(db, owner, ownerLimit))
78
- ]
79
- ) : subjectResults;
80
- if (reserve > 0 && kinds.includes("procedural")) {
81
- const probeLimit = ownerLimit * 2;
82
- const reserveResults = await Promise.all(
83
- subjects.map(
84
- (subject) => loadSubjectKindItemsFromDb(db, subject, "procedural", probeLimit)
85
- )
86
- );
87
- const corroborated = reserveResults.flat().filter((item) => item && item.recurrenceEvidence).sort((a, b) => b.createdAt.localeCompare(a.createdAt)).slice(0, reserve);
88
- for (const item of corroborated) {
89
- results.push([item]);
90
- }
91
- }
92
- const kindSet = new Set(kinds);
93
- const seen = /* @__PURE__ */ new Set();
94
- const merged = [];
95
- for (const items of results) {
96
- for (const item of items) {
97
- if (seen.has(item.id)) continue;
98
- if (!kindSet.has(item.kind)) continue;
99
- if (ownerKeySet.size > 0 && !ownerKeySet.has(`${item.ownerType}:${item.ownerId}`)) {
100
- continue;
101
- }
102
- if (!shouldLoadOwnerFallback && subjects.length > 0 && !subjects.some(
103
- (subject) => subject.subjectType === item.subjectType && subject.subjectId === item.subjectId
104
- )) {
105
- continue;
106
- }
107
- seen.add(item.id);
108
- merged.push(item);
109
- }
110
- }
111
- return merged;
112
- };
113
-
114
- export {
115
- chooseMemoryOwners,
116
- loadOwnerItemsFromDb,
117
- loadMemoryCandidatesFromDb
118
- };
package/chunk-KEPOVMF4.js DELETED
@@ -1,91 +0,0 @@
1
- import {
2
- dialogMessageKey
3
- } from "./chunk-OJKUU3LP.js";
4
- import {
5
- asOptionalFiniteNumber
6
- } from "./chunk-WWC7I6TA.js";
7
- import {
8
- asOptionalTrimmedString
9
- } from "./chunk-G3SUCT4W.js";
10
-
11
- // packages/core/chat/dialogAttachmentCleanup.ts
12
- var FILE_CONTENT_RE = /(?:https?:\/\/[^/"'\s]+)?\/api\/v1\/db\/file\/content\/([^?#"'\s)]+)/g;
13
- function extractFileContentIds(value) {
14
- const ids = /* @__PURE__ */ new Set();
15
- const visit = (input) => {
16
- if (typeof input === "string") {
17
- for (const match of input.matchAll(FILE_CONTENT_RE)) {
18
- const fileId = decodeURIComponent(match[1] ?? "").trim();
19
- if (fileId) ids.add(fileId);
20
- }
21
- return;
22
- }
23
- if (Array.isArray(input)) {
24
- for (const item of input) visit(item);
25
- return;
26
- }
27
- if (input && typeof input === "object") {
28
- for (const item of Object.values(input)) visit(item);
29
- }
30
- };
31
- visit(value);
32
- return [...ids];
33
- }
34
- function messageDbKey(dialogId, message) {
35
- const dbKey = asOptionalTrimmedString(message.dbKey);
36
- if (dbKey) return dbKey;
37
- const id = asOptionalTrimmedString(message.id);
38
- if (id) return dialogMessageKey(dialogId, id);
39
- return null;
40
- }
41
- function asText(value) {
42
- return asOptionalTrimmedString(value) ?? null;
43
- }
44
- function buildDialogAttachmentPlan(args) {
45
- const messageKeys = new Set(
46
- args.messages.map((message) => messageDbKey(args.dialogId, message)).filter((key) => Boolean(key))
47
- );
48
- const referencedFileIds = [
49
- ...new Set(args.messages.flatMap((message) => extractFileContentIds(message)))
50
- ];
51
- const candidates = referencedFileIds.map((fileId) => {
52
- const metadata = args.metadataByFileId[fileId];
53
- const ownerType = asText(metadata?.ownerType);
54
- const ownerId = asText(metadata?.ownerId);
55
- const ownerDbKey = asText(metadata?.ownerDbKey);
56
- const fileDbKey = asText(metadata?.dbKey);
57
- const source = asText(metadata?.source);
58
- const ownedByDialog = ownerType === "dialog" && ownerId === args.dialogId;
59
- const ownedByMessage = Boolean(ownerDbKey && messageKeys.has(ownerDbKey));
60
- const userOwnedReferenced = args.includeUserOwnedReferenced === true && Boolean(args.ownerId) && ownerType === "user" && ownerId === args.ownerId;
61
- const canDelete = Boolean(fileDbKey && (ownedByDialog || ownedByMessage || userOwnedReferenced));
62
- return {
63
- fileId,
64
- fileDbKey,
65
- size: asOptionalFiniteNumber(metadata?.size) ?? null,
66
- ownerType,
67
- ownerId,
68
- ownerDbKey,
69
- source,
70
- status: canDelete ? "delete" : "retain",
71
- reason: canDelete ? ownedByMessage ? "ownerDbKey matches a message in this dialog" : userOwnedReferenced ? "user-owned file is referenced by this dialog and explicit referenced-attachment deletion is enabled" : "ownerType/ownerId matches this dialog" : fileDbKey ? "file ownership is not exclusive to this dialog" : "file metadata not found"
72
- };
73
- });
74
- const deleteCandidates = candidates.filter((candidate) => candidate.status === "delete");
75
- const retainedCandidates = candidates.filter((candidate) => candidate.status === "retain");
76
- return {
77
- dialogId: args.dialogId,
78
- messageCount: args.messages.length,
79
- referencedFileIds,
80
- candidates,
81
- deleteCandidates,
82
- retainedCandidates,
83
- bytesToDelete: deleteCandidates.reduce((sum, candidate) => sum + (candidate.size ?? 0), 0),
84
- metadataReadFailures: args.metadataReadFailures ?? []
85
- };
86
- }
87
-
88
- export {
89
- extractFileContentIds,
90
- buildDialogAttachmentPlan
91
- };
package/chunk-PMDVQBGA.js DELETED
@@ -1,100 +0,0 @@
1
- import {
2
- loadMemoryVNextCatalog
3
- } from "./chunk-XI2BWJM5.js";
4
- import {
5
- recallMemoryVNextLocal
6
- } from "./chunk-4D4QD7FT.js";
7
- import {
8
- DEFAULT_MEMORY_OVERLAY_TOKEN_BUDGET,
9
- buildMemoryOverlay
10
- } from "./chunk-EUCFKKDM.js";
11
- import {
12
- createMemoryKey
13
- } from "./chunk-SYTHYBMI.js";
14
-
15
- // packages/ai/memory/storeShared.ts
16
- var retrievalCountOf = (item) => item.activationCount ?? 0;
17
- var touchMemoryItemsInDb = async (db, items, now = (/* @__PURE__ */ new Date()).toISOString()) => {
18
- if (items.length === 0) return;
19
- const batch = db.batch();
20
- for (const item of items) {
21
- batch.put(createMemoryKey(item.ownerType, item.ownerId, item.id), {
22
- ...item,
23
- // retrieval bookkeeping on legacy storage names — see doc comment above
24
- lastActivatedAt: now,
25
- activationCount: retrievalCountOf(item) + 1
26
- });
27
- }
28
- await batch.write();
29
- };
30
-
31
- // packages/ai/memory/remember.ts
32
- var RESIDENT_MAX_CONTENT_CHARS = 240;
33
-
34
- // packages/ai/memory/vnext/pureVNextRuntime.ts
35
- function deriveStateResident(state, ownerType) {
36
- if (ownerType !== "user") return false;
37
- if (state.text.trim().length > RESIDENT_MAX_CONTENT_CHARS) return false;
38
- return state.facet === "preference" || state.facet === "style";
39
- }
40
- var buildSynthesizedStateItem = (state, entity, ownerType, ownerId) => ({
41
- id: `vnext-state-${state.id}`,
42
- ownerType,
43
- ownerId,
44
- visibility: "private",
45
- subjectType: "user",
46
- subjectId: ownerId,
47
- kind: "semantic",
48
- content: state.text.trim(),
49
- createdAt: state.createdAt,
50
- lastActivatedAt: state.createdAt,
51
- activationCount: 1,
52
- importance: 0.9,
53
- confidence: 0.9,
54
- resident: deriveStateResident(state, ownerType)
55
- });
56
- async function resolvePureVNextRuntime(input) {
57
- const { db, owners, userInput } = input;
58
- if (owners.length === 0 || !userInput.trim()) {
59
- return { selectedItems: [], promptBlock: null, recalledStateCount: 0 };
60
- }
61
- const ownerIds = owners.map((o) => `${o.ownerType}:${encodeURIComponent(o.ownerId)}`);
62
- const catalogs = await Promise.all(
63
- ownerIds.map((ownerId) => loadMemoryVNextCatalog(db, ownerId))
64
- );
65
- const selectedItems = [];
66
- const seenStateKeys = /* @__PURE__ */ new Set();
67
- for (let i = 0; i < owners.length; i++) {
68
- const owner = owners[i];
69
- const catalog = catalogs[i];
70
- const currentStates = catalog.states.filter((s) => !s.retiredAt && s.text.trim());
71
- const hits = recallMemoryVNextLocal({
72
- query: userInput,
73
- entities: catalog.entities,
74
- states: currentStates
75
- });
76
- const entityById = new Map(catalog.entities.map((e) => [e.id, e]));
77
- for (const hit of hits) {
78
- const stateKey = `${hit.state.ownerId}\0${hit.state.id}`;
79
- if (seenStateKeys.has(stateKey)) continue;
80
- seenStateKeys.add(stateKey);
81
- selectedItems.push(
82
- buildSynthesizedStateItem(hit.state, entityById.get(hit.state.entityId), owner.ownerType, owner.ownerId)
83
- );
84
- }
85
- }
86
- const promptBlock = selectedItems.length === 0 ? null : buildMemoryOverlay(selectedItems, {
87
- maxTokens: input.maxTokens ?? DEFAULT_MEMORY_OVERLAY_TOKEN_BUDGET
88
- });
89
- return {
90
- selectedItems,
91
- promptBlock,
92
- recalledStateCount: selectedItems.length
93
- };
94
- }
95
-
96
- export {
97
- touchMemoryItemsInDb,
98
- deriveStateResident,
99
- resolvePureVNextRuntime
100
- };
@@ -1,11 +1,11 @@
1
- import {
2
- createChromeConnectorClientResolver
3
- } from "./chunk-UAIHKQIA.js";
4
1
  import {
5
2
  FileDockerQuotaKvStore,
6
3
  defaultRunSbx,
7
4
  resolveMaxActiveSandboxesFromEnv
8
5
  } from "./chunk-GPLUFN2E.js";
6
+ import {
7
+ createChromeConnectorClientResolver
8
+ } from "./chunk-UAIHKQIA.js";
9
9
  import "./chunk-AL3TYDIF.js";
10
10
  import "./chunk-R5GO3YZP.js";
11
11
  import "./chunk-HNMXYYJR.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  createClientLogger
3
3
  } from "./chunk-QQ56R7KS.js";
4
- import {
5
- isLevelNotFoundError
6
- } from "./chunk-OW765XBU.js";
7
4
  import {
8
5
  isAbortError
9
6
  } from "./chunk-7DPNBQSV.js";
7
+ import {
8
+ isLevelNotFoundError
9
+ } from "./chunk-OW765XBU.js";
10
10
  import {
11
11
  API_ENDPOINTS,
12
12
  NOLO_CLUSTER_SERVERS,
@@ -1,9 +1,9 @@
1
- import {
2
- parsePositiveFiniteNumberOrFallback
3
- } from "./chunk-Y5GCAMGP.js";
4
1
  import {
5
2
  isGatewayHttpStatus
6
3
  } from "./chunk-NF64D32W.js";
4
+ import {
5
+ parsePositiveFiniteNumberOrFallback
6
+ } from "./chunk-Y5GCAMGP.js";
7
7
  import {
8
8
  CORE_DRAIN_REASON,
9
9
  parseRetryAfterHeaderMs
@@ -1,11 +1,11 @@
1
- import {
2
- asTrimmedString
3
- } from "./chunk-3EUW3WEO.js";
4
1
  import {
5
2
  getCredentialsDir,
6
3
  getLegacyCredentialPath,
7
4
  migrateLegacyCredentialFile
8
5
  } from "./chunk-G7Y4GXTY.js";
6
+ import {
7
+ asTrimmedString
8
+ } from "./chunk-3EUW3WEO.js";
9
9
 
10
10
  // packages/agent-runtime/fileCredentialBroker.ts
11
11
  import {
@@ -2,15 +2,15 @@ import {
2
2
  asNonEmptyStringArray,
3
3
  asTrimmedNonEmptyStringArray
4
4
  } from "./chunk-I42VC5KR.js";
5
+ import {
6
+ asOptionalPositiveFiniteNumber
7
+ } from "./chunk-U6VC4MU4.js";
5
8
  import {
6
9
  asTrimmedString
7
10
  } from "./chunk-3EUW3WEO.js";
8
11
  import {
9
12
  isRecord
10
13
  } from "./chunk-KUG52IAP.js";
11
- import {
12
- asOptionalPositiveFiniteNumber
13
- } from "./chunk-U6VC4MU4.js";
14
14
  import {
15
15
  asOptionalTrimmedString
16
16
  } from "./chunk-G3SUCT4W.js";
@@ -2,12 +2,12 @@ import {
2
2
  ownedAgentKey,
3
3
  publicAgentKey
4
4
  } from "./chunk-M2EJHDJP.js";
5
- import {
6
- toErrorMessage
7
- } from "./chunk-HNMXYYJR.js";
8
5
  import {
9
6
  DEFAULT_NOLO_SERVER_URL
10
7
  } from "./chunk-OLZBQWZU.js";
8
+ import {
9
+ toErrorMessage
10
+ } from "./chunk-HNMXYYJR.js";
11
11
  import {
12
12
  asOptionalTrimmedString
13
13
  } from "./chunk-G3SUCT4W.js";
@@ -1,11 +1,3 @@
1
- import {
2
- Database
3
- } from "./chunk-IT3ZZRJE.js";
4
- import {
5
- buildPrimaryExecutionTicket,
6
- createDockerToolChannel,
7
- dockerExecutionToolNames
8
- } from "./chunk-HGDKT2D6.js";
9
1
  import {
10
2
  DOCKER_SANDBOX_BACKEND_ID,
11
3
  confirmDockerSandboxStopped,
@@ -13,6 +5,14 @@ import {
13
5
  defaultRunSbx,
14
6
  resolveMaxActiveSandboxesFromEnv
15
7
  } from "./chunk-GPLUFN2E.js";
8
+ import {
9
+ buildPrimaryExecutionTicket,
10
+ createDockerToolChannel,
11
+ dockerExecutionToolNames
12
+ } from "./chunk-HGDKT2D6.js";
13
+ import {
14
+ Database
15
+ } from "./chunk-IT3ZZRJE.js";
16
16
  import "./chunk-PWTNI4N7.js";
17
17
  import "./chunk-R5GO3YZP.js";
18
18
  import "./chunk-U67V476Y.js";