nolo-cli 0.227.0-alpha.1 → 0.228.0-alpha.2

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 (199) hide show
  1. package/{_executeModel-JKQGZ3HU.js → _executeModel-VYCHHZVT.js} +78 -77
  2. package/{action-CK64LS6S.js → action-GDZDXPMB.js} +9 -9
  3. package/{addContentAction-CARFID6E.js → addContentAction-7RO4AMRI.js} +14 -14
  4. package/{addDialogAgentAction-APLZLFW5.js → addDialogAgentAction-EVYBGTXB.js} +16 -16
  5. package/{agentDeleteCommand-NVR2V2HH.js → agentDeleteCommand-QWQKT54A.js} +116 -115
  6. package/{agentEmailCommands-UCVOWD3S.js → agentEmailCommands-EISMBIRE.js} +119 -118
  7. package/{agentFavoriteCommands-4PDOP3GW.js → agentFavoriteCommands-7LOP3HUD.js} +6 -6
  8. package/{agentGrantCommands-FLCEXLUH.js → agentGrantCommands-L6O2HVJI.js} +7 -7
  9. package/{agentListCommands-C65UESYM.js → agentListCommands-4WLG32IW.js} +79 -470
  10. package/{agentMachineCommands-V3DGEJU4.js → agentMachineCommands-DC6NKWTU.js} +59 -57
  11. package/{agentProviderCommands-7QBFRFRK.js → agentProviderCommands-STI3DQ6A.js} +7 -7
  12. package/{agentPullCommand-E6JBGBVG.js → agentPullCommand-KHV4EELF.js} +6 -6
  13. package/{agentRecordCommands-6RCJS2EY.js → agentRecordCommands-IZYUVHME.js} +107 -106
  14. package/{agentRunCommand-P3GRKXKS.js → agentRunCommand-QM7ETUTX.js} +113 -112
  15. package/{agentRunControl-SNZZ5XP4.js → agentRunControl-MBG4U6SL.js} +23 -17
  16. package/{agentRuntimeLocal-GOX2DIY7.js → agentRuntimeLocal-HOXKWCYO.js} +46 -45
  17. package/{agentSlice-N7H2FRJA.js → agentSlice-UG76KEBH.js} +17 -17
  18. package/{appDeleteCommands-LZDN26FU.js → appDeleteCommands-WWCC6WA5.js} +54 -52
  19. package/{appDeployCommands-6IO6TTZH.js → appDeployCommands-AU4IUN33.js} +54 -52
  20. package/{appDeployStatusCommands-FG3LX24J.js → appDeployStatusCommands-STUW7WXL.js} +54 -52
  21. package/{appGetCommands-NAKVDVD4.js → appGetCommands-BGTLIQ4K.js} +54 -52
  22. package/{appListCommands-KL56RN73.js → appListCommands-CUCPRUXW.js} +54 -52
  23. package/{authCommand-AUN5MXV2.js → authCommand-OZ2KTP4Z.js} +30 -31
  24. package/{authCommands-D2IPS6ES.js → authCommands-55OGQGCR.js} +12 -13
  25. package/{builtinSkillRegistry-UQGLKRYP.js → builtinSkillRegistry-BAE2LDXF.js} +4 -4
  26. package/{chromeOpsCommands-UJWN5HWH.js → chromeOpsCommands-WAA45NCS.js} +8 -8
  27. package/{chunk-OB6DVWPF.js → chunk-262R3XNN.js} +16 -2
  28. package/{chunk-UN7HIYMH.js → chunk-2X7WFDT6.js} +1 -1
  29. package/{chunk-XI2BWJM5.js → chunk-324FWHUA.js} +20 -3
  30. package/{chunk-CVERLOJM.js → chunk-3QIYD3VM.js} +639 -513
  31. package/{chunk-RU6DULV4.js → chunk-3U44JB3O.js} +1 -1
  32. package/{chunk-IAJJYHIB.js → chunk-3VZLEKV2.js} +7 -7
  33. package/{chunk-JWXITTQB.js → chunk-42OKN2LI.js} +1 -1
  34. package/{chunk-UAPNPNSG.js → chunk-45CAVC35.js} +1072 -859
  35. package/{chunk-EUCFKKDM.js → chunk-4I2MXV5Q.js} +38 -10
  36. package/{chunk-SW6OD4KE.js → chunk-4QYJPWHH.js} +123 -12
  37. package/{chunk-PLPLH2XZ.js → chunk-4ZGPHFLE.js} +2 -2
  38. package/{chunk-NO3VBWTL.js → chunk-547ENH5T.js} +1 -1
  39. package/{chunk-CKT6QUE2.js → chunk-5YMA6DDZ.js} +1 -1
  40. package/chunk-5ZUOVCKT.js +32 -0
  41. package/{chunk-XZODOEKU.js → chunk-6QHKRARD.js} +2 -2
  42. package/{chunk-YGMBIXCF.js → chunk-6XRPBZRS.js} +4 -2
  43. package/{chunk-PVAWNHP5.js → chunk-7BCG67EI.js} +295 -102
  44. package/{chunk-VZW34YUL.js → chunk-7FEP5USX.js} +8 -5
  45. package/{chunk-VPAZ6BEN.js → chunk-7JGMNKKG.js} +18 -14
  46. package/{chunk-5HL4KC4A.js → chunk-ALAES342.js} +57 -86
  47. package/{chunk-VREDDN25.js → chunk-ATEKLSLR.js} +1 -1
  48. package/chunk-BIDSIRTS.js +307 -0
  49. package/chunk-BIWI5M4E.js +62 -0
  50. package/{chunk-UCFPVYP7.js → chunk-BP5ZJ6B4.js} +1 -1
  51. package/{chunk-2G3YSVO6.js → chunk-CBUZ6DKA.js} +3 -3
  52. package/{chunk-KYH7XW3K.js → chunk-CD3RU7XL.js} +16 -1
  53. package/{chunk-SFTTXGPM.js → chunk-CMMI3DAT.js} +16 -16
  54. package/{chunk-VIHDJ3FK.js → chunk-CNMY2XM6.js} +14 -14
  55. package/{chunk-UVUVQVZ6.js → chunk-DBUR22G5.js} +2 -2
  56. package/{chunk-G6HJUMST.js → chunk-DEA37IUY.js} +2 -2
  57. package/{chunk-5RKRXQ2H.js → chunk-DGYCDA6W.js} +2 -2
  58. package/{chunk-FKEZOMIF.js → chunk-DLXMMTGM.js} +523 -202
  59. package/{chunk-3HTP4WZQ.js → chunk-DUUDXSLX.js} +21 -7
  60. package/{chunk-KFHREHUQ.js → chunk-DXWGFL2Z.js} +89 -1
  61. package/{chunk-TOKPHZ55.js → chunk-EEOOBRA7.js} +5 -5
  62. package/{chunk-ZI5SZ3MV.js → chunk-EGHP7KOY.js} +20 -20
  63. package/{chunk-OXA5GWHU.js → chunk-F6Z6ZCUV.js} +2 -2
  64. package/{chunk-X2KRQP7V.js → chunk-FJSNBZXR.js} +1 -1
  65. package/{chunk-3VFYQH3I.js → chunk-FPBJM2BW.js} +17 -39
  66. package/{chunk-KRRE4A7D.js → chunk-G7IUT2V3.js} +3 -2
  67. package/{chunk-LXTC53TN.js → chunk-GAYNXB6T.js} +184 -153
  68. package/{chunk-45LZIYXB.js → chunk-HBRDSQ3M.js} +1 -1
  69. package/{chunk-GRXSJR2Z.js → chunk-HF7BLF3F.js} +21 -21
  70. package/{chunk-T5N6NHAT.js → chunk-HHFGE2WF.js} +3 -3
  71. package/{chunk-IX2BXN2K.js → chunk-HSSBDZLD.js} +3 -3
  72. package/{chunk-TINJKQSO.js → chunk-HXB4VDGK.js} +20 -20
  73. package/{chunk-MWHOH4RJ.js → chunk-HYLRQDEE.js} +4 -4
  74. package/{chunk-L5I543VB.js → chunk-JQZRSXS5.js} +23 -23
  75. package/{chunk-T2BEPTAG.js → chunk-L32W3PRP.js} +47 -17
  76. package/{chunk-LA7JYAKF.js → chunk-LYD6C7OU.js} +3 -3
  77. package/{chunk-PHOSZT3E.js → chunk-M3OZRQNH.js} +1 -1
  78. package/{chunk-M3Y4IBIR.js → chunk-M4SFKP5L.js} +4 -4
  79. package/{chunk-7Z3WUZ4Q.js → chunk-MJI3UAXN.js} +52 -28
  80. package/{chunk-YOT437BH.js → chunk-MNEZUL5S.js} +137 -118
  81. package/{chunk-GOLPOTG5.js → chunk-MZG5CETE.js} +3 -3
  82. package/{chunk-KJAAPGBE.js → chunk-OBIC6EG7.js} +6 -6
  83. package/{chunk-CLCXHIBS.js → chunk-OJ45MEEI.js} +1 -1
  84. package/{chunk-AXYH4734.js → chunk-OOJNQK6V.js} +13 -13
  85. package/{chunk-2SKTCNWO.js → chunk-OTKSESZR.js} +2 -2
  86. package/{chunk-XIEYGCN6.js → chunk-OWKNSIXL.js} +149 -48
  87. package/{chunk-6XIE5ZGI.js → chunk-PDCV7P5W.js} +1 -1
  88. package/{chunk-HOCHUZQ7.js → chunk-QJTZ76CP.js} +24 -6
  89. package/{chunk-YQETUZ5V.js → chunk-QRGDJA4B.js} +11 -11
  90. package/{chunk-ULAQPRHX.js → chunk-QYB23WUH.js} +1 -1
  91. package/{chunk-CSW7IPVD.js → chunk-R6Z5S5GA.js} +11 -11
  92. package/{chunk-MK2Q7ZJD.js → chunk-R7XWZDOH.js} +58 -24
  93. package/{chunk-GUVXQSFZ.js → chunk-RBPUNSG5.js} +1 -1
  94. package/{chunk-GOQ6ZVTN.js → chunk-RG2DGNL6.js} +3 -3
  95. package/{chunk-F5AY2UZL.js → chunk-RRDRQOEC.js} +515 -9
  96. package/{chunk-6EDAMVG6.js → chunk-RTHFJZ6M.js} +10 -10
  97. package/{chunk-WJP4TH6U.js → chunk-S6FDXXZV.js} +1 -1
  98. package/{chunk-LJSNEV7M.js → chunk-SRCCSTIM.js} +7 -7
  99. package/{chunk-KMRKZNGT.js → chunk-TCZ2VJZQ.js} +13 -12
  100. package/{chunk-AK5O76CC.js → chunk-TI2EPRHE.js} +2 -2
  101. package/{chunk-5LQDHFBN.js → chunk-TQEKUOTI.js} +14 -11
  102. package/{chunk-SRG5CNLC.js → chunk-TSPMLCWI.js} +6 -6
  103. package/{chunk-YGILMZ7N.js → chunk-TUSTONB3.js} +1 -1
  104. package/{chunk-YPPKC6FL.js → chunk-U2HBB7RS.js} +17 -17
  105. package/{chunk-HVUDBOQG.js → chunk-VMJVAJ6W.js} +9 -6
  106. package/{chunk-CQVGR3MX.js → chunk-VQ5N5GSV.js} +8 -8
  107. package/{chunk-ABGULE7H.js → chunk-WCFFRBL5.js} +12 -12
  108. package/{chunk-NAOO4PVX.js → chunk-WFDNADFX.js} +16 -16
  109. package/chunk-WFGNWWJI.js +326 -0
  110. package/{chunk-FIYSMXHY.js → chunk-WWTSEBDF.js} +1 -1
  111. package/{chunk-JHF6VLVL.js → chunk-X3E6EHJW.js} +32 -31
  112. package/{chunk-E2BESSAW.js → chunk-X4O7FJF5.js} +2 -0
  113. package/{chunk-C2B7M567.js → chunk-XAG3FWBE.js} +15 -4
  114. package/{chunk-4OKTPFNX.js → chunk-XFXFPUO7.js} +105 -37
  115. package/{chunk-HYKGIXNO.js → chunk-XSW4EXQV.js} +85 -21
  116. package/{chunk-ZADGPNTV.js → chunk-XTJKU3Z4.js} +29 -29
  117. package/{chunk-T43K75CK.js → chunk-YKY4OVOX.js} +15 -15
  118. package/{chunk-ZYA2YDB6.js → chunk-YVFH2MFB.js} +16 -16
  119. package/{chunk-L42CBKBZ.js → chunk-ZEVQHCLM.js} +3 -3
  120. package/{chunk-5RKUPJYL.js → chunk-ZH3KXFHS.js} +11 -3
  121. package/chunk-ZOHO6MOF.js +376 -0
  122. package/{chunk-PXKF5CV4.js → chunk-ZXF6D3I6.js} +10 -8
  123. package/{cliAgentConfigHelpers-QVSQYTKC.js → cliAgentConfigHelpers-BTRHMPW2.js} +14 -14
  124. package/{cliEnvHelpers-D6HMC46Z.js → cliEnvHelpers-CNMP3RDX.js} +2 -2
  125. package/{cliExecutor-4MAX3PZL.js → cliExecutor-K6FDZTQ2.js} +3 -1
  126. package/{cliLocalAgentRecordReader-SPKAJYME.js → cliLocalAgentRecordReader-H3HYQRRR.js} +48 -47
  127. package/{commandRegistry-TKR6OWXP.js → commandRegistry-FVYPE2IN.js} +93 -93
  128. package/{contentThunks-BQWRPCTM.js → contentThunks-GNFPG32S.js} +36 -35
  129. package/{cooldownCommands-FZYQOWI5.js → cooldownCommands-YB5H5BBK.js} +3 -3
  130. package/{createAgentAutomationAction-GFI6SJZV.js → createAgentAutomationAction-PB4QIFQ4.js} +36 -35
  131. package/{createDialogAction-MMBIHFFU.js → createDialogAction-EVTOPY7A.js} +37 -37
  132. package/{createPageAction-EEYUE5FB.js → createPageAction-2UYF2IDZ.js} +39 -38
  133. package/{db-CS4ZJQKV.js → db-M7FU2GNK.js} +9 -6
  134. package/{dbSlice-X4Z4E4QU.js → dbSlice-XRUZOGSU.js} +13 -13
  135. package/{deleteFile-QOOP2UK7.js → deleteFile-6URDHYRB.js} +9 -9
  136. package/{dialogCommands-OXBQ73DD.js → dialogCommands-6SZD4TYP.js} +58 -57
  137. package/{dialogNotifyCommand-VWS5G4OO.js → dialogNotifyCommand-SHGPCU22.js} +17 -17
  138. package/{dialogSlice-KGYIABDY.js → dialogSlice-5EQ2A6LY.js} +34 -33
  139. package/{dialogUsageCommand-FEWCN7IA.js → dialogUsageCommand-W2WCSGKF.js} +6 -6
  140. package/{docCreateCommands-LS32VKY3.js → docCreateCommands-25E6PGN3.js} +53 -51
  141. package/{docDeleteCommands-JTYR5RPH.js → docDeleteCommands-F7ZVGEHW.js} +55 -53
  142. package/{docReadCommands-E5LTVKWN.js → docReadCommands-JY2E5XEN.js} +53 -51
  143. package/{docStore-TVS2FNER.js → docStore-OKKIKLT3.js} +15 -15
  144. package/{docUpdateCommands-I3J3JDZ2.js → docUpdateCommands-OZ4CUSIQ.js} +53 -51
  145. package/{fetchMessages-Q3INLN5F.js → fetchMessages-TQEUZD7H.js} +3 -3
  146. package/{getPricing-VNGFM4PN.js → getPricing-LF5C4XSI.js} +6 -6
  147. package/{handleSendMessageAction-SSON36TJ.js → handleSendMessageAction-LNT7SZND.js} +68 -67
  148. package/{hostCredentialCreate-WTW4THJF.js → hostCredentialCreate-XUU2CSHI.js} +107 -106
  149. package/index.js +54 -16
  150. package/keys-RWF7UCB4.js +1 -1
  151. package/{localDialogRead-V36DX2Q2.js → localDialogRead-CCOCVGAP.js} +2 -2
  152. package/{localRuntimeAdapter-MI2JGXSF.js → localRuntimeAdapter-IBSTMSX7.js} +114 -113
  153. package/{machineCommands-3LROJZDK.js → machineCommands-HSQHDHOT.js} +135 -119
  154. package/{machineWsRunDispatch-BUUJRUUB.js → machineWsRunDispatch-L6H7J66T.js} +105 -104
  155. package/{memberThunks-CFEPHAND.js → memberThunks-7Y3OYSJQ.js} +17 -17
  156. package/{memoryCommands-JQMEJO7J.js → memoryCommands-BC6REPQB.js} +6 -6
  157. package/{overlay-THLKYIWY.js → overlay-BBQZXGYI.js} +5 -3
  158. package/package.json +1 -1
  159. package/{projectArchive-3X54XFVN.js → projectArchive-FQO654Z3.js} +44 -43
  160. package/{providerPresetApply-FO36N5TX.js → providerPresetApply-WHAMP2D5.js} +9 -9
  161. package/{providerRegistry-U2BSFE6K.js → providerRegistry-ZI2KORJ7.js} +9 -9
  162. package/{read-KA3L2V7O.js → read-TYMBGEXO.js} +9 -9
  163. package/{readDocTool-AMAZAPAW.js → readDocTool-SKQVHBLO.js} +1 -1
  164. package/{readlineWorkspace-Z3YUH4SX.js → readlineWorkspace-7U272DSA.js} +4398 -4165
  165. package/{removeDialogAgentAction-JQOJSUM7.js → removeDialogAgentAction-F5QE2O2B.js} +19 -19
  166. package/{runAgentClientLoop-4FCFLMDJ.js → runAgentClientLoop-AF4JQIJ7.js} +72 -71
  167. package/{runtimeDoctorCommands-CXOCVDPU.js → runtimeDoctorCommands-RRKPBGVO.js} +16 -16
  168. package/{secretCommands-GGUAWAE7.js → secretCommands-KZWBZIYS.js} +2 -2
  169. package/{setDialogExtraReferencesAction-YXQTGXIN.js → setDialogExtraReferencesAction-72L27ERM.js} +15 -15
  170. package/{setPrimaryDialogAgentAction-YNLB66WE.js → setPrimaryDialogAgentAction-GJJDUSGJ.js} +19 -19
  171. package/{settingThunks-E6N7RSSS.js → settingThunks-ZRGWVGZD.js} +18 -18
  172. package/{skillDiscovery-B5V23AXP.js → skillDiscovery-BHHPCUHZ.js} +3 -3
  173. package/{spaceCommands-DB5DKC2J.js → spaceCommands-5VNWMDBE.js} +55 -53
  174. package/{store-JRVN62NM.js → store-Z53ICFL3.js} +3 -1
  175. package/{streamAgentChatTurn-FCBGMD4D.js → streamAgentChatTurn-YSPEFY4K.js} +97 -95
  176. package/{switchDialogAgentAction-LAHLUECU.js → switchDialogAgentAction-IIJBPND3.js} +16 -16
  177. package/{tableCommands-VNSXHAMG.js → tableCommands-FTAOCBTX.js} +12 -12
  178. package/{tools-6JD36D6K.js → tools-M35PTIFB.js} +61 -60
  179. package/tuiRestart-2IL37YIB.js +41 -0
  180. package/{tuiSummaryLlmCaller-UHZIPGAX.js → tuiSummaryLlmCaller-W2QN4VAC.js} +21 -21
  181. package/{updateCommands-KZ54HCU5.js → updateCommands-CPATDG6J.js} +8 -6
  182. package/{updateDialogTitleAction-RV3EUEN3.js → updateDialogTitleAction-IMIRJRQQ.js} +36 -35
  183. package/{usageCommand-KFVV6UL3.js → usageCommand-2BF74MKF.js} +2 -2
  184. package/{usageRebuildCommand-HHFSNK46.js → usageRebuildCommand-UHB55BQM.js} +3 -3
  185. package/{windowsSelfUpdate-KERHIAB4.js → windowsSelfUpdate-ZFD6J5HF.js} +2 -2
  186. package/chunk-2WZXXAQD.js +0 -57
  187. package/chunk-BJF2MHJ3.js +0 -118
  188. package/chunk-KEPOVMF4.js +0 -91
  189. package/chunk-PMDVQBGA.js +0 -100
  190. package/chunk-WACI5I6V.js +0 -147
  191. package/{accountResolver-EK2S4PWF.js → accountResolver-QETKNC7T.js} +4 -4
  192. package/{chunk-AGP3YSEC.js → chunk-4N6G2CKP.js} +3 -3
  193. package/{chunk-VXL2FZTP.js → chunk-HXER7YJF.js} +3 -3
  194. package/{chunk-BLVSFYQ3.js → chunk-LISC7BD4.js} +3 -3
  195. package/{chunk-SSGTV4FC.js → chunk-USGHJSGO.js} +5 -5
  196. package/{chunk-IC2I373Q.js → chunk-VS276URX.js} +3 -3
  197. package/{chunk-AETZ7AD6.js → chunk-W6RFEDN4.js} +3 -3
  198. package/{offlineMarxistsAgentCommand-AGA2X5E4.js → offlineMarxistsAgentCommand-XVXUE6G5.js} +5 -5
  199. 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
- };
package/chunk-WACI5I6V.js DELETED
@@ -1,147 +0,0 @@
1
- import {
2
- DEFAULT_NOLO_SERVER_URL
3
- } from "./chunk-OLZBQWZU.js";
4
- import {
5
- NOLO_CLUSTER_SERVERS
6
- } from "./chunk-LCBAMY2M.js";
7
- import {
8
- DEFAULT_LOCAL_API_ORIGIN
9
- } from "./chunk-4SN6J65J.js";
10
- import {
11
- normalizeServerOrigin
12
- } from "./chunk-CF7PE763.js";
13
- import {
14
- asOptionalTrimmedString
15
- } from "./chunk-G3SUCT4W.js";
16
-
17
- // packages/cli/cliEnvHelpers.ts
18
- import { dirname, extname, join } from "node:path";
19
- import { fileURLToPath } from "node:url";
20
- function resolveServerUrlFromEnv(env) {
21
- return normalizeServerOrigin(
22
- env.NOLO_SERVER || env.BASE_URL || DEFAULT_NOLO_SERVER_URL
23
- );
24
- }
25
- function isCliArgs(value) {
26
- return Array.isArray(value);
27
- }
28
- function buildServerCandidates(values) {
29
- return [...new Set(
30
- values.filter((value) => typeof value === "string" && value.trim().length > 0).map((value) => normalizeServerOrigin(value))
31
- )];
32
- }
33
- function resolveServerUrl(input, env) {
34
- if (isCliArgs(input)) {
35
- const explicit = readOption(input, "--server-url") || readOption(input, "--server");
36
- return normalizeServerOrigin(explicit) || resolveServerUrlFromEnv(env ?? {});
37
- }
38
- return resolveServerUrlFromEnv(input);
39
- }
40
- function resolveServerCandidates(input, envOrPreferred, preferred) {
41
- if (isCliArgs(input)) {
42
- const env2 = envOrPreferred ?? {};
43
- const explicitServer = resolveServerUrl(input, env2);
44
- return buildServerCandidates([
45
- explicitServer,
46
- preferred?.trim(),
47
- env2.NOLO_SERVER,
48
- env2.BASE_URL,
49
- env2.NOLO_SERVER_URL,
50
- DEFAULT_NOLO_SERVER_URL,
51
- ...NOLO_CLUSTER_SERVERS
52
- ]);
53
- }
54
- const env = input;
55
- return buildServerCandidates([
56
- asOptionalTrimmedString(envOrPreferred),
57
- env.NOLO_SERVER,
58
- env.BASE_URL,
59
- env.NOLO_SERVER_URL,
60
- DEFAULT_NOLO_SERVER_URL,
61
- ...NOLO_CLUSTER_SERVERS
62
- ]);
63
- }
64
- function resolveDeleteServerCandidatesFromEnv(env, ...preferredValues) {
65
- return buildServerCandidates([
66
- ...preferredValues,
67
- env.NOLO_SERVER,
68
- env.BASE_URL,
69
- env.NOLO_SERVER_URL,
70
- env.READ_DIALOG_BASE,
71
- DEFAULT_NOLO_SERVER_URL,
72
- ...NOLO_CLUSTER_SERVERS,
73
- DEFAULT_LOCAL_API_ORIGIN
74
- ]);
75
- }
76
- function resolveDeleteServerCandidates(input, envOrPreferred, preferred) {
77
- if (isCliArgs(input)) {
78
- const env2 = envOrPreferred ?? {};
79
- const explicitServer = resolveServerUrl(input, env2);
80
- return resolveDeleteServerCandidatesFromEnv(env2, explicitServer, preferred?.trim());
81
- }
82
- const env = input;
83
- return resolveDeleteServerCandidatesFromEnv(
84
- env,
85
- asOptionalTrimmedString(envOrPreferred)
86
- );
87
- }
88
- function resolveAuthTokenFromEnv(env, extraEnvKeys = []) {
89
- for (const key of ["AUTH_TOKEN", "AUTH", "NOLO_MACHINE_API_KEY", ...extraEnvKeys]) {
90
- const value = env[key];
91
- if (typeof value === "string" && value.trim()) return value;
92
- }
93
- return "";
94
- }
95
- function resolveAuthToken(input, envOrExtraEnvKeys, extraEnvKeys = []) {
96
- if (isCliArgs(input)) {
97
- const env = envOrExtraEnvKeys ?? {};
98
- return readOption(input, "--token") || readOption(input, "--machine-key") || resolveAuthTokenFromEnv(env, extraEnvKeys);
99
- }
100
- return resolveAuthTokenFromEnv(input, envOrExtraEnvKeys ?? []);
101
- }
102
- function parseUserIdFromAuthToken(token) {
103
- const parts = token.trim().split(".").filter(Boolean);
104
- const payloadCandidates = parts.length >= 3 ? [parts[1], parts[0]] : [parts[0]];
105
- for (const payload of payloadCandidates) {
106
- if (!payload) continue;
107
- try {
108
- const parsed = JSON.parse(Buffer.from(payload, "base64").toString("utf8"));
109
- if (typeof parsed?.userId === "string") return parsed.userId;
110
- } catch {
111
- }
112
- }
113
- return "";
114
- }
115
- function readOption(args, flag) {
116
- const index = args.indexOf(flag);
117
- return index >= 0 ? args[index + 1] : void 0;
118
- }
119
- function isCompiledBinary() {
120
- try {
121
- const url = import.meta.url;
122
- return url.startsWith("file:///$bunfs/root/") || url.startsWith("/$bunfs/root/");
123
- } catch {
124
- return false;
125
- }
126
- }
127
- function resolveCliEntrypointPath(fromModuleUrl = import.meta.url) {
128
- if (isCompiledBinary()) {
129
- return process.execPath;
130
- }
131
- const sourcePath = fileURLToPath(fromModuleUrl);
132
- const ext = extname(sourcePath) || ".ts";
133
- return join(dirname(sourcePath), `index${ext}`);
134
- }
135
-
136
- export {
137
- resolveServerUrlFromEnv,
138
- resolveServerUrl,
139
- resolveServerCandidates,
140
- resolveDeleteServerCandidates,
141
- resolveAuthTokenFromEnv,
142
- resolveAuthToken,
143
- parseUserIdFromAuthToken,
144
- readOption,
145
- isCompiledBinary,
146
- resolveCliEntrypointPath
147
- };
@@ -1,15 +1,15 @@
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
+ import "./chunk-R5GO3YZP.js";
10
11
  import "./chunk-HNMXYYJR.js";
11
12
  import "./chunk-KUG52IAP.js";
12
- import "./chunk-R5GO3YZP.js";
13
13
  import "./chunk-U67V476Y.js";
14
14
 
15
15
  // packages/agent-runtime/docker/accountResolver.ts
@@ -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,12 +1,12 @@
1
1
  import {
2
2
  isTombstoneRecord
3
3
  } from "./chunk-BV3FLP2L.js";
4
- import {
5
- isRecord
6
- } from "./chunk-KUG52IAP.js";
7
4
  import {
8
5
  dialogMessageRange
9
6
  } from "./chunk-OJKUU3LP.js";
7
+ import {
8
+ isRecord
9
+ } from "./chunk-KUG52IAP.js";
10
10
 
11
11
  // packages/chat/messages/fetchMessages.ts
12
12
  function isUnboundedMessageLimit(limit) {
@@ -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,16 +1,16 @@
1
- import {
2
- isRecord
3
- } from "./chunk-KUG52IAP.js";
4
1
  import {
5
2
  asNonEmptyStringArray,
6
3
  asTrimmedNonEmptyStringArray
7
4
  } from "./chunk-I42VC5KR.js";
5
+ import {
6
+ asOptionalPositiveFiniteNumber
7
+ } from "./chunk-U6VC4MU4.js";
8
8
  import {
9
9
  asTrimmedString
10
10
  } from "./chunk-3EUW3WEO.js";
11
11
  import {
12
- asOptionalPositiveFiniteNumber
13
- } from "./chunk-U6VC4MU4.js";
12
+ isRecord
13
+ } from "./chunk-KUG52IAP.js";
14
14
  import {
15
15
  asOptionalTrimmedString
16
16
  } from "./chunk-G3SUCT4W.js";
@@ -4,12 +4,12 @@ import {
4
4
  import {
5
5
  isOwnedAgentKey
6
6
  } from "./chunk-M2EJHDJP.js";
7
- import {
8
- isRecord
9
- } from "./chunk-KUG52IAP.js";
10
7
  import {
11
8
  asTrimmedNonEmptyStringArray
12
9
  } from "./chunk-I42VC5KR.js";
10
+ import {
11
+ isRecord
12
+ } from "./chunk-KUG52IAP.js";
13
13
 
14
14
  // packages/agent-runtime/runtimeToolSurface.ts
15
15
  var DEFAULT_PRIVATE_NOLO_WORKSPACE_TOOLS = [
@@ -1,10 +1,10 @@
1
+ import {
2
+ asTrimmedNonEmptyStringArray
3
+ } from "./chunk-I42VC5KR.js";
1
4
  import {
2
5
  dump,
3
6
  load
4
7
  } from "./chunk-KHCLMKZZ.js";
5
- import {
6
- asTrimmedNonEmptyStringArray
7
- } from "./chunk-I42VC5KR.js";
8
8
  import {
9
9
  asOptionalTrimmedString
10
10
  } from "./chunk-G3SUCT4W.js";
@@ -1,6 +1,3 @@
1
- import {
2
- toErrorMessage
3
- } from "./chunk-HNMXYYJR.js";
4
1
  import {
5
2
  ownedAgentKey,
6
3
  publicAgentKey
@@ -9,11 +6,14 @@ import {
9
6
  DEFAULT_NOLO_SERVER_URL
10
7
  } from "./chunk-OLZBQWZU.js";
11
8
  import {
12
- normalizeServerOrigin
13
- } from "./chunk-CF7PE763.js";
9
+ toErrorMessage
10
+ } from "./chunk-HNMXYYJR.js";
14
11
  import {
15
12
  asOptionalTrimmedString
16
13
  } from "./chunk-G3SUCT4W.js";
14
+ import {
15
+ normalizeServerOrigin
16
+ } from "./chunk-CF7PE763.js";
17
17
  import "./chunk-U67V476Y.js";
18
18
 
19
19
  // packages/cli/offlineMarxistsAgentCommand.ts
@@ -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";