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
@@ -40,6 +40,13 @@ var KIND_PRIORITY = {
40
40
  procedural: 1,
41
41
  episodic: 2
42
42
  };
43
+ var emptyMemoryInjectionObservation = () => ({
44
+ vnextInjectedLines: 0,
45
+ legacyUncoveredInjectedLines: 0,
46
+ unattributedInjectedLines: 0,
47
+ totalInjectedLines: 0,
48
+ empty: true
49
+ });
43
50
  var FACET_DISPLAY = {
44
51
  unfinished: { label: "\u8FD8\u6CA1\u5B9A\u4E0B", strip: "\u8FD8\u6CA1\u51B3\u5B9A" },
45
52
  tension: { label: "\u5728\u6743\u8861", strip: "\u5728\u6743\u8861" },
@@ -100,7 +107,7 @@ var truncateLineToTokens = (lineText, budgetTokens) => {
100
107
  if (cut <= 2) return null;
101
108
  return `${lineText.slice(0, cut).trimEnd()}${TRUNCATED_SUFFIX}`;
102
109
  };
103
- var fitLinesToBudget = (allLines, remainingBudget) => {
110
+ var fitLinesToBudget = (allLines, remainingBudget, onKept) => {
104
111
  let usedTokens = 0;
105
112
  const keptByKind = {};
106
113
  let truncatedCount = 0;
@@ -118,6 +125,7 @@ var fitLinesToBudget = (allLines, remainingBudget) => {
118
125
  if (candidate.lineTokens <= remaining) {
119
126
  usedTokens += candidate.lineTokens;
120
127
  pushLine(candidate.kind, candidate.lineText);
128
+ onKept(candidate);
121
129
  continue;
122
130
  }
123
131
  const truncated = truncateLineToTokens(candidate.lineText, remaining);
@@ -127,6 +135,7 @@ var fitLinesToBudget = (allLines, remainingBudget) => {
127
135
  }
128
136
  usedTokens += estimateTokens(truncated);
129
137
  pushLine(candidate.kind, truncated);
138
+ onKept(candidate);
130
139
  truncatedCount += 1;
131
140
  }
132
141
  return { keptByKind, truncatedCount, droppedCount };
@@ -141,7 +150,7 @@ var EMPTY_RESIDENT_FIT = {
141
150
  truncatedCount: 0,
142
151
  droppedCount: 0
143
152
  };
144
- var fitResidentLines = (lines, remainingBudget) => {
153
+ var fitResidentLines = (lines, remainingBudget, onKept) => {
145
154
  let usedTokens = 0;
146
155
  const keptLines = [];
147
156
  let truncatedCount = 0;
@@ -155,6 +164,7 @@ var fitResidentLines = (lines, remainingBudget) => {
155
164
  if (candidate.lineTokens <= remaining) {
156
165
  usedTokens += candidate.lineTokens;
157
166
  keptLines.push(candidate.lineText);
167
+ onKept(candidate);
158
168
  continue;
159
169
  }
160
170
  const truncated = truncateLineToTokens(candidate.lineText, remaining);
@@ -164,6 +174,7 @@ var fitResidentLines = (lines, remainingBudget) => {
164
174
  }
165
175
  usedTokens += estimateTokens(truncated);
166
176
  keptLines.push(truncated);
177
+ onKept(candidate);
167
178
  truncatedCount += 1;
168
179
  }
169
180
  return { keptLines, truncatedCount, droppedCount };
@@ -186,7 +197,22 @@ var buildBudgetFooter = (fit, residentFit) => {
186
197
  return [`\uFF08${notices.join("\u3001")}\uFF1B\u9700\u8981\u5B8C\u6574\u5185\u5BB9\u6216\u66F4\u591A\u76F8\u5173\u8BB0\u5FC6\u65F6\u7528 queryMemory \u68C0\u7D22\uFF09`];
187
198
  };
188
199
  var buildMemoryOverlay = (items, options) => {
189
- if (items.length === 0) return null;
200
+ const injection = emptyMemoryInjectionObservation();
201
+ const onKept = (line) => {
202
+ injection.totalInjectedLines++;
203
+ injection.empty = false;
204
+ if (line.source === "vnext") injection.vnextInjectedLines++;
205
+ else if (line.source === "legacy-uncovered") injection.legacyUncoveredInjectedLines++;
206
+ else injection.unattributedInjectedLines++;
207
+ };
208
+ const finish = (prompt) => {
209
+ try {
210
+ options?.injectionEmit?.(injection);
211
+ } catch {
212
+ }
213
+ return prompt;
214
+ };
215
+ if (items.length === 0) return finish(null);
190
216
  const maxTokens = options?.maxTokens ?? DEFAULT_MEMORY_OVERLAY_TOKEN_BUDGET;
191
217
  const perKindLimit = options?.perKindLimit ?? 3;
192
218
  const residentMaxTokens = options?.residentMaxTokens ?? RESIDENT_MEMORY_OVERLAY_TOKEN_BUDGET;
@@ -195,9 +221,10 @@ var buildMemoryOverlay = (items, options) => {
195
221
  const residentFit = residentItems.length === 0 ? EMPTY_RESIDENT_FIT : fitResidentLines(
196
222
  residentItems.map((item) => {
197
223
  const lineText = `- ${isInferredMemory(item) ? "\uFF08\u63A8\u65AD\uFF09" : ""}${normalizeDisplayContent(item)}`;
198
- return { kind: item.kind, lineText, lineTokens: estimateTokens(lineText) };
224
+ return { kind: item.kind, lineText, lineTokens: estimateTokens(lineText), source: options?.sources?.get(item) };
199
225
  }),
200
- residentMaxTokens - estimateTokens(RESIDENT_SECTION_HEADER)
226
+ residentMaxTokens - estimateTokens(RESIDENT_SECTION_HEADER),
227
+ onKept
201
228
  );
202
229
  const byKind = {
203
230
  episodic: [],
@@ -214,10 +241,10 @@ var buildMemoryOverlay = (items, options) => {
214
241
  const allLines = Object.entries(byKind).filter(([, list]) => list.length > 0).flatMap(
215
242
  ([kind, list]) => pickWithinKind(list, perKindLimit).map((item) => {
216
243
  const lineText = `- ${isInferredMemory(item) ? "\uFF08\u63A8\u65AD\uFF09" : ""}${normalizeDisplayContent(item)}`;
217
- return { kind, lineText, lineTokens: estimateTokens(lineText) };
244
+ return { kind, lineText, lineTokens: estimateTokens(lineText), source: options?.sources?.get(item) };
218
245
  })
219
246
  ).sort((a, b) => (KIND_PRIORITY[a.kind] ?? 99) - (KIND_PRIORITY[b.kind] ?? 99));
220
- retrievalFit = fitLinesToBudget(allLines, remainingBudget);
247
+ retrievalFit = fitLinesToBudget(allLines, remainingBudget, onKept);
221
248
  const kindOrder = ["semantic", "procedural", "episodic"];
222
249
  retrievalSections = kindOrder.filter(
223
250
  (kind) => retrievalFit.keptByKind[kind] && retrievalFit.keptByKind[kind].length > 0
@@ -230,17 +257,18 @@ var buildMemoryOverlay = (items, options) => {
230
257
  ...retrievalSections
231
258
  ];
232
259
  if (sections.length === 0) {
233
- return OVERLAY_HEADER_LINES.join("\n");
260
+ return finish(OVERLAY_HEADER_LINES.join("\n"));
234
261
  }
235
- return [
262
+ return finish([
236
263
  ...OVERLAY_HEADER_LINES,
237
264
  ...sections,
238
265
  ...buildBudgetFooter(retrievalFit, residentFit)
239
- ].join("\n");
266
+ ].join("\n"));
240
267
  };
241
268
 
242
269
  export {
243
270
  EXPLICIT_REMEMBER_PREFIX_REGEX,
271
+ emptyMemoryInjectionObservation,
244
272
  DEFAULT_MEMORY_OVERLAY_TOKEN_BUDGET,
245
273
  RESIDENT_MEMORY_OVERLAY_TOKEN_BUDGET,
246
274
  buildMemoryOverlay
@@ -1,15 +1,11 @@
1
- import {
2
- chooseMemoryOwners,
3
- loadMemoryCandidatesFromDb
4
- } from "./chunk-BJF2MHJ3.js";
5
1
  import {
6
2
  addContentToSpace
7
- } from "./chunk-TINJKQSO.js";
3
+ } from "./chunk-HXB4VDGK.js";
8
4
  import {
9
5
  prepareAndPersistMessage,
10
6
  uiAskChoiceFunc,
11
7
  uiAskChoiceFunctionSchema
12
- } from "./chunk-PVAWNHP5.js";
8
+ } from "./chunk-7BCG67EI.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-SFTTXGPM.js";
21
+ } from "./chunk-CMMI3DAT.js";
26
22
  import {
27
23
  isDevelopment
28
- } from "./chunk-AGP3YSEC.js";
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
- isRecord
37
- } from "./chunk-KUG52IAP.js";
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
- asOptionalPositiveFiniteNumber
47
- } from "./chunk-U6VC4MU4.js";
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
  };
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  getRuntimeServerContext,
3
3
  scheduleDeleteReplication
4
- } from "./chunk-CSW7IPVD.js";
4
+ } from "./chunk-R6Z5S5GA.js";
5
5
  import {
6
6
  fetchFromClientDb
7
- } from "./chunk-AGP3YSEC.js";
7
+ } from "./chunk-4N6G2CKP.js";
8
8
  import {
9
9
  selectIdentityToken
10
10
  } from "./chunk-PXYBUFDB.js";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-UAD2WT54.js";
7
7
  import {
8
8
  toTimestampMs
9
- } from "./chunk-SFTTXGPM.js";
9
+ } from "./chunk-CMMI3DAT.js";
10
10
  import {
11
11
  __toESM
12
12
  } from "./chunk-U67V476Y.js";
@@ -5,7 +5,7 @@ import {
5
5
  mapDiscoveredSkillsToCatalogEntries,
6
6
  resolveSkillCatalog,
7
7
  resolveSkillCatalogSync
8
- } from "./chunk-JWXITTQB.js";
8
+ } from "./chunk-42OKN2LI.js";
9
9
  import {
10
10
  load
11
11
  } from "./chunk-KHCLMKZZ.js";
@@ -0,0 +1,32 @@
1
+ import {
2
+ resolveModelReasoningCapability
3
+ } from "./chunk-CD3RU7XL.js";
4
+
5
+ // packages/ai/agent/defaultReasoningEffort.ts
6
+ var defaults = {
7
+ "gpt-6.1-sol": "medium",
8
+ "gpt-6.1-terra": "medium",
9
+ "gpt-6-luna": "medium",
10
+ "gpt-6-astra": "high",
11
+ "claude-opus-5-5": "medium",
12
+ "claude-sonnet-5-5": "high",
13
+ "deepseek-flash": "high",
14
+ "deepseek-v4-flash": "high",
15
+ "deepseek-v4.1-flash": "high"
16
+ };
17
+ var deepseekChannels = /* @__PURE__ */ new Set(["opendesign", "ollama-cloud", "lithosai"]);
18
+ var providers = /* @__PURE__ */ new Set(["nolo", "openai", "openrouter", "anthropic", "deepseek", "commandcode", "opencode-go", "stepfun"]);
19
+ function resolveDefaultReasoningEffort(input) {
20
+ const provider = (input.provider ?? "").toLowerCase();
21
+ const model = (input.model ?? "").toLowerCase().split("/").pop() ?? "";
22
+ const isDeepseekFlash = ["deepseek-flash", "deepseek-v4-flash", "deepseek-v4.1-flash"].includes(model);
23
+ const effort = providers.has(provider) || deepseekChannels.has(provider) && isDeepseekFlash ? defaults[model] : void 0;
24
+ if (!effort) return input.fallback;
25
+ if (provider === "nolo" && model.startsWith("claude-") && input.model?.startsWith("anthropic/")) return effort;
26
+ if (provider === "anthropic" && model.startsWith("claude-")) return effort;
27
+ return resolveModelReasoningCapability(provider, input.model).efforts.includes(effort) ? effort : input.fallback;
28
+ }
29
+
30
+ export {
31
+ resolveDefaultReasoningEffort
32
+ };
@@ -2,7 +2,7 @@ import {
2
2
  getCurrentSpaceIdRaw,
3
3
  setCurrentSpaceBoth,
4
4
  setSpaceInitialized
5
- } from "./chunk-NO3VBWTL.js";
5
+ } from "./chunk-547ENH5T.js";
6
6
  import {
7
7
  createSpaceKey,
8
8
  normalizeSpaceId
@@ -10,7 +10,7 @@ import {
10
10
  import {
11
11
  fetchFromServer,
12
12
  getAllServers
13
- } from "./chunk-AGP3YSEC.js";
13
+ } from "./chunk-4N6G2CKP.js";
14
14
  import {
15
15
  selectIdentityToken,
16
16
  selectIdentityUserId
@@ -8,7 +8,9 @@ var KNOWN_SYNC_FAILURE_CODES = /* @__PURE__ */ new Set([
8
8
  "owner_oauth_unavailable",
9
9
  "invalid_grant",
10
10
  "auth_no_token",
11
- "token_expired"
11
+ "token_expired",
12
+ "user_batch_authority_controlled",
13
+ "tombstone_conflict"
12
14
  ]);
13
15
  var SYNC_FAILURE_CODE_RE = /"(?:code|error|reason)"\s*:\s*"([A-Za-z0-9_.:-]{1,48})"/;
14
16
  function classifyDialogSyncFailure(error) {
@@ -122,7 +124,7 @@ async function runCliCommandWithSyncDrain(command, options) {
122
124
  }
123
125
  const complete = await drain(scope);
124
126
  if (commandThrew) throw commandError;
125
- options.exit(code === 0 && !complete ? 1 : code);
127
+ await options.exit(code === 0 && !complete ? 1 : code);
126
128
  });
127
129
  }
128
130