nolo-cli 0.225.0-alpha.1 → 0.225.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (245) hide show
  1. package/{_executeModel-L5VHAXSU.js → _executeModel-UCWDB72C.js} +79 -73
  2. package/{action-CK64LS6S.js → action-24MZYW2B.js} +11 -8
  3. package/{addContentAction-EQXMFNPR.js → addContentAction-HEMCSSHT.js} +14 -13
  4. package/{addDialogAgentAction-RSDZDASD.js → addDialogAgentAction-SQYDOXHA.js} +15 -14
  5. package/{agentDeleteCommand-4WC7INCX.js → agentDeleteCommand-P7O3ACNJ.js} +131 -124
  6. package/{agentEmailCommands-3XFR6WY7.js → agentEmailCommands-A5BRSYWK.js} +134 -123
  7. package/{agentFavoriteCommands-2LKGKSUD.js → agentFavoriteCommands-7LOP3HUD.js} +5 -5
  8. package/{agentGrantCommands-QQV4N4JW.js → agentGrantCommands-L6O2HVJI.js} +5 -5
  9. package/{agentListCommands-BBCP5XYW.js → agentListCommands-LDRCOOMO.js} +112 -496
  10. package/{agentMachineCommands-YZDCOLQL.js → agentMachineCommands-AYL53KJV.js} +65 -58
  11. package/{agentProviderCommands-7BSJH7TO.js → agentProviderCommands-N5EA3ED2.js} +6 -6
  12. package/{agentPullCommand-XN6ZPBUW.js → agentPullCommand-QQQZSC6S.js} +6 -6
  13. package/agentRecordCommands-FICBZ57C.js +188 -0
  14. package/{agentRunCommand-NHYBV4G5.js → agentRunCommand-CTXQGDUM.js} +135 -120
  15. package/{agentRunControl-7A2FOXIJ.js → agentRunControl-CO6BASZF.js} +20 -14
  16. package/{agentRuntimeLocal-GSTYFEX4.js → agentRuntimeLocal-5YN4D5WT.js} +48 -41
  17. package/{agentSlice-O6IGTM3Y.js → agentSlice-DJ5D4DU4.js} +18 -17
  18. package/{appDeleteCommands-L7HL4AWF.js → appDeleteCommands-B4E7N7M2.js} +58 -51
  19. package/{appDeployCommands-SGSUNFZR.js → appDeployCommands-E4DTXRRM.js} +58 -51
  20. package/{appDeployStatusCommands-AAA3XD54.js → appDeployStatusCommands-FCNHYHZM.js} +58 -51
  21. package/{appGetCommands-LN72GAOA.js → appGetCommands-4DXSQHUZ.js} +58 -51
  22. package/{appListCommands-IJQQ3VND.js → appListCommands-2NN5E4F6.js} +58 -51
  23. package/{authCommand-7JXW54U4.js → authCommand-47DR6GZT.js} +33 -28
  24. package/{authCommands-YDNAIDEY.js → authCommands-ZZ3L5IFM.js} +16 -11
  25. package/{builtinSkillRegistry-PXH7EGQB.js → builtinSkillRegistry-AYWYQVA4.js} +5 -5
  26. package/{chromeOpsCommands-YKX2QX3A.js → chromeOpsCommands-VZWAY2KR.js} +6 -6
  27. package/{chunk-YDBMZ7FV.js → chunk-24GVXSWK.js} +3 -3
  28. package/{chunk-JCK3EFZS.js → chunk-25OCZXSX.js} +63 -32
  29. package/{chunk-P2ZLUIW2.js → chunk-2BSLGODA.js} +350 -25
  30. package/chunk-2SXN7LAY.js +15 -0
  31. package/{chunk-N5PQJKCY.js → chunk-2XMKW2OY.js} +13 -12
  32. package/{chunk-XI2BWJM5.js → chunk-324FWHUA.js} +20 -3
  33. package/{chunk-UKS7D2NL.js → chunk-3NFWMSTA.js} +111 -26
  34. package/{chunk-TZEP5J4A.js → chunk-3V6JT6WN.js} +2935 -1412
  35. package/{chunk-SBVTHMEG.js → chunk-4FE3IWRE.js} +1 -1
  36. package/{chunk-4JVNURX4.js → chunk-4YFC3DWW.js} +68 -16
  37. package/chunk-4ZCTKB27.js +31 -0
  38. package/chunk-53W5BXLN.js +340 -0
  39. package/{chunk-JWXITTQB.js → chunk-5HUO7SEX.js} +9 -107
  40. package/{chunk-VFBVA3U2.js → chunk-5TJE4QCL.js} +131 -40
  41. package/{chunk-YXMBJ7UH.js → chunk-6BGJHJRN.js} +21 -21
  42. package/chunk-6D25V6CB.js +133 -0
  43. package/chunk-6RSNVJGO.js +279 -0
  44. package/{chunk-IZIN2UNJ.js → chunk-6X3CS6NJ.js} +203 -24
  45. package/{chunk-XZGQ6ZCV.js → chunk-6XBOPKUH.js} +27 -90
  46. package/{chunk-YGMBIXCF.js → chunk-6XRPBZRS.js} +4 -2
  47. package/{chunk-62HXNQVV.js → chunk-776CXKMX.js} +1 -1
  48. package/chunk-7NIBQ4HY.js +138 -0
  49. package/{chunk-7Z6EW7AH.js → chunk-7OTNBI77.js} +13 -6
  50. package/{chunk-HOK3ILHA.js → chunk-7Q7MKJZN.js} +590 -330
  51. package/{chunk-KZU52OJ5.js → chunk-7U2TFUWW.js} +6 -6
  52. package/{chunk-IUD7YR3B.js → chunk-B72AFRR2.js} +15 -15
  53. package/{chunk-4HFTBHBF.js → chunk-BDERPCJW.js} +8 -8
  54. package/chunk-BEM6LPD2.js +734 -0
  55. package/chunk-BIDSIRTS.js +307 -0
  56. package/{chunk-6J4TTPS2.js → chunk-BIJTI5SX.js} +5 -5
  57. package/chunk-BWW6WRX6.js +1438 -0
  58. package/{chunk-AGP3YSEC.js → chunk-C3GOEQJF.js} +46 -1
  59. package/chunk-C5A54QS7.js +108 -0
  60. package/{chunk-MOMR7NMG.js → chunk-C646JEUV.js} +2 -2
  61. package/{chunk-YI5CDUJD.js → chunk-CT6GT2BG.js} +9 -9
  62. package/{chunk-PVZY6P3S.js → chunk-CZLSTOVM.js} +2 -2
  63. package/{chunk-LJSNEV7M.js → chunk-DGUUOHBF.js} +8 -8
  64. package/{chunk-C4WTX5TU.js → chunk-DIBQXNGW.js} +2 -2
  65. package/{chunk-YFLVRVYK.js → chunk-DLT2DN4M.js} +1 -1
  66. package/{chunk-K44HIUBX.js → chunk-DLTMAXLF.js} +13 -13
  67. package/chunk-DVYAFH2Q.js +103 -0
  68. package/{chunk-SOG7OEXX.js → chunk-DWWUVRB5.js} +1 -1
  69. package/{chunk-KFHREHUQ.js → chunk-DXWGFL2Z.js} +89 -1
  70. package/{chunk-GNHMRBYZ.js → chunk-EBKHA63G.js} +106 -14
  71. package/{chunk-KC4SCKXO.js → chunk-EIFSCI4C.js} +990 -1370
  72. package/{chunk-F3YK7KIU.js → chunk-EW37CXCQ.js} +4 -4
  73. package/{chunk-M3JEW6N6.js → chunk-F26GAEH3.js} +10 -0
  74. package/{chunk-2VUZSVAS.js → chunk-F3FQPVHE.js} +57 -20
  75. package/{chunk-ZRAARRA3.js → chunk-FCAMGBLY.js} +1399 -2978
  76. package/{chunk-AK5O76CC.js → chunk-FPMPWNVQ.js} +3 -3
  77. package/{chunk-WQEMD4Z4.js → chunk-FSIEHQNH.js} +420 -120
  78. package/{chunk-FNDSBM4J.js → chunk-FXX6VFMV.js} +571 -348
  79. package/{chunk-7XS4W5KP.js → chunk-G6OPRPXH.js} +128 -149
  80. package/{chunk-PMDVQBGA.js → chunk-GAHJLSDO.js} +14 -7
  81. package/{chunk-2TIQO6TC.js → chunk-GCVFX6ZL.js} +206 -308
  82. package/{chunk-P25E3CKY.js → chunk-H6CHPU6M.js} +4 -4
  83. package/chunk-HNWZJI4N.js +33394 -0
  84. package/{chunk-S2NTVGA2.js → chunk-I2OYPD3Y.js} +1 -1
  85. package/{chunk-KNIIRXHF.js → chunk-IPRPYKBP.js} +46 -8
  86. package/{chunk-C4VAR65S.js → chunk-IUXBKS5L.js} +200 -120
  87. package/{chunk-JVRQ6YVK.js → chunk-JBWXPACD.js} +1 -1
  88. package/{chunk-Z6USB65D.js → chunk-KGIIZXPL.js} +347 -14
  89. package/chunk-KK3FCYZM.js +647 -0
  90. package/{chunk-GBZ4YKEO.js → chunk-KOIDLCAQ.js} +8 -8
  91. package/{chunk-2ZKFCIJJ.js → chunk-LCQJH7KN.js} +1 -1
  92. package/{chunk-N5Z2V73W.js → chunk-LELADM5Q.js} +1 -1
  93. package/{chunk-4NA3YTBC.js → chunk-LMFMV5UC.js} +8 -8
  94. package/{chunk-XN23AUVU.js → chunk-LMZRXDWG.js} +8 -5
  95. package/{chunk-EWPDMS4N.js → chunk-LN4ZVSO7.js} +30 -15
  96. package/{chunk-GOAPXKQU.js → chunk-LT3DMEIB.js} +4 -4
  97. package/{chunk-GGKNJ42M.js → chunk-LYDEFPQP.js} +18 -108
  98. package/{chunk-FTQWYWUI.js → chunk-MDVP5TLI.js} +1 -1
  99. package/{chunk-EOWLBDY6.js → chunk-MM73SP4K.js} +1 -1
  100. package/chunk-MVOZ22RZ.js +26 -0
  101. package/{chunk-3QFLXA24.js → chunk-N6EN3HK3.js} +3 -3
  102. package/{chunk-D726I5AZ.js → chunk-NBB2EBQD.js} +2 -2
  103. package/{chunk-DISQCYPE.js → chunk-NL7J2J5Z.js} +6 -6
  104. package/{chunk-JM5C4EUA.js → chunk-NQQL2DKF.js} +6 -6
  105. package/{chunk-LS2MGTUS.js → chunk-NWWQY2J5.js} +15 -15
  106. package/{chunk-TXGQ4O5S.js → chunk-OATIWAKN.js} +20 -174
  107. package/{chunk-KYH7XW3K.js → chunk-OJRTTERA.js} +77 -2
  108. package/{chunk-VV7TXWOC.js → chunk-OYHJ4TW7.js} +6 -6
  109. package/{chunk-EUCFKKDM.js → chunk-PVFYPUIM.js} +40 -10
  110. package/{chunk-2VA6TU4I.js → chunk-QES2NCVM.js} +17 -14
  111. package/{chunk-WG2LFJYB.js → chunk-QGMIUVBT.js} +39 -30
  112. package/{chunk-HOCHUZQ7.js → chunk-QJTZ76CP.js} +24 -6
  113. package/{chunk-MK2Q7ZJD.js → chunk-R7XWZDOH.js} +58 -24
  114. package/{chunk-5FUN7EG4.js → chunk-RD3QLZQV.js} +83 -47
  115. package/{chunk-AMEOV5VZ.js → chunk-S25VJYXV.js} +41 -35
  116. package/chunk-SR4FE5VD.js +9 -0
  117. package/{chunk-4WVJLODK.js → chunk-T23G6PXQ.js} +8 -3
  118. package/{chunk-GVGOEMNV.js → chunk-T444ENEC.js} +3 -3
  119. package/{chunk-67BE44IS.js → chunk-TE2XH4KH.js} +1 -1
  120. package/{chunk-5RKUPJYL.js → chunk-TFGGNRT6.js} +11 -3
  121. package/{chunk-ZH6MUQEO.js → chunk-TTEBPPUV.js} +1 -1
  122. package/{chunk-QVBXJNZ2.js → chunk-TUSTONB3.js} +1 -1
  123. package/{chunk-AVHRSJUH.js → chunk-TXFYIWAW.js} +32 -25
  124. package/{chunk-KOXKKHFE.js → chunk-TXQVH72L.js} +9 -4
  125. package/{chunk-OBSEKCVK.js → chunk-U4VSBDO5.js} +88 -0
  126. package/{chunk-PPJYZRSQ.js → chunk-U5LOKQ2R.js} +30 -14
  127. package/{chunk-KDAGMRDA.js → chunk-UAHUJ4HH.js} +100 -32
  128. package/{chunk-BGGHA5DV.js → chunk-UAOFSUG7.js} +1 -1
  129. package/{chunk-CKT6QUE2.js → chunk-UHW6SCVK.js} +1 -1
  130. package/chunk-UKSKCDBG.js +62 -0
  131. package/{chunk-KEN3N2TN.js → chunk-VMJVAJ6W.js} +13 -10
  132. package/{chunk-SOF4OWDM.js → chunk-VS276URX.js} +0 -2
  133. package/chunk-WDWZPASX.js +29 -0
  134. package/chunk-WFGNWWJI.js +326 -0
  135. package/{chunk-UYOICCYG.js → chunk-WHO3LYDW.js} +64 -89
  136. package/{chunk-UJKTI5PG.js → chunk-WRKMXMU7.js} +2 -1
  137. package/{chunk-FIYSMXHY.js → chunk-WWTSEBDF.js} +1 -1
  138. package/{chunk-QLFCTYRH.js → chunk-X37RQEA3.js} +17 -10
  139. package/{chunk-E2BESSAW.js → chunk-X4O7FJF5.js} +2 -0
  140. package/chunk-X7IA2B7R.js +166 -0
  141. package/{chunk-GIABSSWQ.js → chunk-XAFOLWLU.js} +4 -4
  142. package/{chunk-45LZIYXB.js → chunk-XNEDFWT4.js} +2 -2
  143. package/{chunk-EOJZGQAE.js → chunk-Y5RN44VH.js} +103 -100
  144. package/{chunk-OB6DVWPF.js → chunk-YFRJAE3R.js} +319 -95
  145. package/{chunk-L5I543VB.js → chunk-YGDYYFRX.js} +20 -24
  146. package/{chunk-3KNEE64G.js → chunk-YMCSR7PA.js} +14 -14
  147. package/chunk-YUZ2DAIH.js +34 -0
  148. package/chunk-Z6YTCDU4.js +24 -0
  149. package/{chunk-XQBIZRGW.js → chunk-ZBQ5UGYY.js} +3 -3
  150. package/{chunk-VREDDN25.js → chunk-ZQUCJBS4.js} +14 -9
  151. package/{chunk-UEKXWO7A.js → chunk-ZT3DYK5T.js} +15 -4
  152. package/{chunk-LM2PS3YS.js → chunk-ZTLTDUV6.js} +24 -11
  153. package/{chunk-KN3HEZIQ.js → chunk-ZVOL2MAJ.js} +1 -1
  154. package/{cliAgentConfigHelpers-KICKKNYQ.js → cliAgentConfigHelpers-RFR7ZCSK.js} +12 -12
  155. package/{cliAuthorityBrokerClient-XHH7MH2P.js → cliAuthorityBrokerClient-SFPC3WVK.js} +1 -1
  156. package/{cliEnvHelpers-VPSJ4XWC.js → cliEnvHelpers-CNMP3RDX.js} +1 -1
  157. package/{cliExecutor-4MAX3PZL.js → cliExecutor-K6FDZTQ2.js} +3 -1
  158. package/{cliLocalAgentRecordReader-6FXGFBI3.js → cliLocalAgentRecordReader-AJ4UKHKT.js} +51 -45
  159. package/{commandRegistry-HJDPQSQ4.js → commandRegistry-IHWZVV4G.js} +98 -94
  160. package/{contentThunks-I6OR5ENG.js → contentThunks-YQRCBDKF.js} +38 -35
  161. package/{cooldownCommands-X7P5M2V5.js → cooldownCommands-W67DE765.js} +4 -4
  162. package/{createAgentAutomationAction-7BCCTWO5.js → createAgentAutomationAction-ERSDNR4R.js} +38 -35
  163. package/{createDialogAction-CU27KSCJ.js → createDialogAction-QXC7JZPE.js} +39 -37
  164. package/{createPageAction-CWRTEYVA.js → createPageAction-RLZ7776F.js} +40 -37
  165. package/{db-CS4ZJQKV.js → db-6NRZLEW2.js} +10 -7
  166. package/{dbSlice-ZJPDIFER.js → dbSlice-7M2ESEUO.js} +13 -12
  167. package/{deleteFile-Q3YDB4ML.js → deleteFile-WO6WSSNK.js} +10 -7
  168. package/{dialogCommands-OPTRZWTE.js → dialogCommands-UIRO4QNN.js} +62 -56
  169. package/dialogMessageRecord-OAV77LT7.js +7 -0
  170. package/{dialogNotifyCommand-77B57PL6.js → dialogNotifyCommand-VDUFYBZV.js} +14 -14
  171. package/{dialogSlice-XODSLDHY.js → dialogSlice-A4U3C76D.js} +36 -33
  172. package/{dialogUsageCommand-HTVPR2CX.js → dialogUsageCommand-SEC6UZWM.js} +3 -3
  173. package/{docCreateCommands-36WS33BK.js → docCreateCommands-MHPYTJWR.js} +56 -49
  174. package/{docDeleteCommands-C4CS4XLF.js → docDeleteCommands-VYULMBAQ.js} +58 -51
  175. package/{docReadCommands-QZMSFMPN.js → docReadCommands-FV3GGZ7V.js} +56 -49
  176. package/{docStore-TVN4SNVE.js → docStore-AWWI72FA.js} +15 -14
  177. package/{docUpdateCommands-BYI64HVV.js → docUpdateCommands-JNS3HX7F.js} +56 -49
  178. package/fetchMessages-TQEUZD7H.js +2 -2
  179. package/{getPricing-VNGFM4PN.js → getPricing-U5AR7ZHS.js} +5 -5
  180. package/{handleSendMessageAction-NSEMVHWX.js → handleSendMessageAction-WDJOUDNV.js} +68 -63
  181. package/{hostCredentialCreate-WBZY7DZB.js → hostCredentialCreate-H3FF2SAO.js} +123 -111
  182. package/index.js +56 -18
  183. package/keys-RWF7UCB4.js +2 -2
  184. package/{lib-OT5OTXRU.js → lib-62SWPXNF.js} +3 -7
  185. package/{localDialogRead-SVTPA5GY.js → localDialogRead-3T2KMCRC.js} +1 -1
  186. package/{localRuntimeAdapter-OAIWERFA.js → localRuntimeAdapter-JAQQXZJP.js} +126 -113
  187. package/{localRuntimeAuthority-IBJAT62G.js → localRuntimeAuthority-7DKIT7UH.js} +4 -2
  188. package/{localRuntimeDb-N7KHDXS2.js → localRuntimeDb-5WZ4RJJO.js} +1 -1
  189. package/{machineCommands-OI37ZUQ4.js → machineCommands-WYOFNB5I.js} +146 -120
  190. package/{machineWsRunDispatch-73HKPV6D.js → machineWsRunDispatch-Y7UIAZNM.js} +118 -107
  191. package/markdownToSlate-KIYM7B3P.js +8 -0
  192. package/mcpLocalAuthorizeCommand-SCYEFLRK.js +106 -0
  193. package/{memberThunks-JRYNONYV.js → memberThunks-DIITWU4M.js} +22 -17
  194. package/{memoryCommands-5WC3T66U.js → memoryCommands-BC6REPQB.js} +4 -4
  195. package/{models-H5NNZRLH.js → models-CINY5UZR.js} +2 -2
  196. package/{overlay-THLKYIWY.js → overlay-JA3SPVUS.js} +7 -3
  197. package/package.json +1 -1
  198. package/{projectArchive-GVEARCOG.js → projectArchive-IZJXBW5N.js} +43 -40
  199. package/{providerPresetApply-J3WMRPD2.js → providerPresetApply-2QWXPJXZ.js} +6 -6
  200. package/{providerRegistry-KJGB5XWS.js → providerRegistry-W4LCKK6V.js} +6 -6
  201. package/{read-Q7GOHGNP.js → read-OBLJNMA2.js} +9 -8
  202. package/{readDocTool-Z5OQ6422.js → readDocTool-QQZ4DAER.js} +1 -1
  203. package/{readlineWorkspace-5DWUGNSU.js → readlineWorkspace-WF3SWZGR.js} +7055 -5248
  204. package/rememberExplicit-CPAPONSI.js +15 -0
  205. package/{removeDialogAgentAction-U3F2MNAY.js → removeDialogAgentAction-HC3SOY3G.js} +17 -16
  206. package/{runAgentClientLoop-RDXIPF34.js → runAgentClientLoop-Z7V6TA3O.js} +97 -72
  207. package/{runtimeDoctorCommands-UXKXYBW6.js → runtimeDoctorCommands-KX6YLPWV.js} +17 -17
  208. package/{secretCommands-LJXOOYA7.js → secretCommands-STRAX275.js} +4 -4
  209. package/{setDialogExtraReferencesAction-G3WSJ7EM.js → setDialogExtraReferencesAction-DDZUQPY6.js} +16 -15
  210. package/{setPrimaryDialogAgentAction-6FHAHZBB.js → setPrimaryDialogAgentAction-EB67OMAJ.js} +17 -16
  211. package/{settingThunks-AXTBX3Q5.js → settingThunks-TN6GFASU.js} +181 -62
  212. package/{skillDiscovery-B5V23AXP.js → skillDiscovery-MDDKPTW3.js} +4 -3
  213. package/{spaceCommands-GUKMDRWN.js → spaceCommands-HBYQUVJI.js} +61 -54
  214. package/{store-JRVN62NM.js → store-Z53ICFL3.js} +3 -1
  215. package/{streamAgentChatTurn-XEYQZPDJ.js → streamAgentChatTurn-CM7QQXOS.js} +178 -173
  216. package/{switchDialogAgentAction-UOFIAGPL.js → switchDialogAgentAction-XY5TKQQE.js} +15 -14
  217. package/{tableCommands-HITDSLHS.js → tableCommands-MXFL3JIT.js} +13 -10
  218. package/{toolApiClient-OGQEBQVX.js → toolApiClient-53YMJ2G6.js} +8 -6
  219. package/{tools-6DFTHCFX.js → tools-AT6H73LD.js} +66 -62
  220. package/tuiRestart-272SAYSK.js +41 -0
  221. package/{tuiSummaryLlmCaller-7WLUKNP2.js → tuiSummaryLlmCaller-K2OVRVHG.js} +20 -19
  222. package/{updateCommands-RJVCRSBP.js → updateCommands-O3BOVVVN.js} +8 -6
  223. package/{updateDialogTitleAction-AMSBV2H7.js → updateDialogTitleAction-PGY4UPLH.js} +38 -35
  224. package/{usageCommand-YPJ2ZI2F.js → usageCommand-SCF3ROV2.js} +4 -4
  225. package/{usageRebuildCommand-FERQO74C.js → usageRebuildCommand-K5WPIBA5.js} +5 -5
  226. package/webapi-24RZDIIQ.js +2488 -0
  227. package/{windowsSelfUpdate-KERHIAB4.js → windowsSelfUpdate-WJDUZLEO.js} +2 -2
  228. package/workContext-Y3ADAPZU.js +14 -0
  229. package/workContextAccess-UZHDLBUR.js +11 -0
  230. package/workContextWriteNotice-YCSSMHN4.js +7 -0
  231. package/agentRecordCommands-KLYKI4Z7.js +0 -177
  232. package/chunk-2THCNKE4.js +0 -147
  233. package/chunk-2WZXXAQD.js +0 -57
  234. package/chunk-5ZMIIR23.js +0 -265
  235. package/chunk-652XYZGP.js +0 -352
  236. package/chunk-BJF2MHJ3.js +0 -118
  237. package/chunk-KEPOVMF4.js +0 -91
  238. package/chunk-QZI44GWV.js +0 -776
  239. package/{accountResolver-EK2S4PWF.js → accountResolver-QETKNC7T.js} +3 -3
  240. package/{chunk-BLVSFYQ3.js → chunk-LISC7BD4.js} +3 -3
  241. package/{chunk-SNBZZPYH.js → chunk-OQHIVPG4.js} +3 -3
  242. package/{chunk-47ITIXO7.js → chunk-USGHJSGO.js} +3 -3
  243. package/{chunk-FJ23FZXF.js → chunk-VIYVRPMJ.js} +0 -0
  244. package/{offlineMarxistsAgentCommand-4IC3Y4C6.js → offlineMarxistsAgentCommand-XVXUE6G5.js} +3 -3
  245. package/{workloadLifecycle-O2I3NZ2Q.js → workloadLifecycle-HFJIN5IZ.js} +8 -8
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolvePlatformAuthToken
3
- } from "./chunk-4NA3YTBC.js";
3
+ } from "./chunk-LMFMV5UC.js";
4
4
 
5
5
  // packages/cli/client/localRuntimeHelpers.ts
6
6
  var REMOTE_DIALOG_SYNC_TIMEOUT_MS = 1e4;
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-QYPE3TS3.js";
4
4
  import {
5
5
  getActiveDialogKey
6
- } from "./chunk-S2NTVGA2.js";
6
+ } from "./chunk-I2OYPD3Y.js";
7
7
  import {
8
8
  selectIdentityToken
9
9
  } from "./chunk-PXYBUFDB.js";
@@ -11,8 +11,8 @@ import {
11
11
  compactWhitespace
12
12
  } from "./chunk-DWLEOOGR.js";
13
13
  import {
14
- extractCustomId
15
- } from "./chunk-M2EJHDJP.js";
14
+ splitDialogKeyIdentity
15
+ } from "./chunk-YZMNK53S.js";
16
16
  import {
17
17
  isRecord
18
18
  } from "./chunk-KUG52IAP.js";
@@ -42,6 +42,54 @@ var selectCurrentTokenFromState = (state) => {
42
42
  return typeof token === "string" ? token : null;
43
43
  };
44
44
  var selectCurrentDialogKeyFromState = (_state) => getActiveDialogKey();
45
+ var CONTROL_OR_WHITESPACE_RE = /[\u0000-\u001f\u007f\s]/;
46
+ var hasSuppliedDialogValue = (value) => value != null && (typeof value !== "string" || value.trim().length > 0);
47
+ var normalizeToolDialogId = (value) => {
48
+ if (typeof value !== "string") return null;
49
+ if (/[\u0000-\u001f\u007f]/.test(value)) return null;
50
+ const trimmed = value.trim();
51
+ if (!trimmed || CONTROL_OR_WHITESPACE_RE.test(trimmed)) return null;
52
+ if (trimmed.includes("-msg-")) return null;
53
+ if (trimmed.startsWith("dialog-")) {
54
+ const identity = splitDialogKeyIdentity(trimmed);
55
+ const parsedId = identity?.dialogId?.trim();
56
+ if (!parsedId || CONTROL_OR_WHITESPACE_RE.test(parsedId) || parsedId.includes("-msg-")) {
57
+ return null;
58
+ }
59
+ return parsedId;
60
+ }
61
+ return trimmed;
62
+ };
63
+ var resolveToolDialogId = (thunkApi, options = {}) => {
64
+ if (hasSuppliedDialogValue(options?.dialogId)) {
65
+ return normalizeToolDialogId(options.dialogId);
66
+ }
67
+ if (hasSuppliedDialogValue(options?.dialogKey)) {
68
+ return normalizeToolDialogId(options.dialogKey);
69
+ }
70
+ if (hasSuppliedDialogValue(thunkApi?.extra?.dialogId)) {
71
+ return normalizeToolDialogId(thunkApi.extra.dialogId);
72
+ }
73
+ if (hasSuppliedDialogValue(thunkApi?.extra?.dialogKey)) {
74
+ return normalizeToolDialogId(thunkApi.extra.dialogKey);
75
+ }
76
+ if (hasSuppliedDialogValue(thunkApi?.dialogId)) {
77
+ return normalizeToolDialogId(thunkApi.dialogId);
78
+ }
79
+ if (hasSuppliedDialogValue(thunkApi?.dialogKey)) {
80
+ return normalizeToolDialogId(thunkApi.dialogKey);
81
+ }
82
+ let state;
83
+ try {
84
+ state = typeof thunkApi?.getState === "function" ? thunkApi.getState() : void 0;
85
+ } catch {
86
+ state = void 0;
87
+ }
88
+ if (hasSuppliedDialogValue(state?.dialog?.currentDialogKey)) {
89
+ return normalizeToolDialogId(state.dialog.currentDialogKey);
90
+ }
91
+ return normalizeToolDialogId(selectCurrentDialogKeyFromState(state));
92
+ };
45
93
  var resolveToolBaseUrl = (currentServer) => {
46
94
  const _window = globalThis.window;
47
95
  if (!_window) return (currentServer || "").replace(/\/+$/, "");
@@ -102,18 +150,6 @@ var getToolRequestContext = (thunkApi) => {
102
150
  baseUrl
103
151
  };
104
152
  };
105
- var maybeAttachDialogId = (thunkApi, body) => {
106
- if (!isRecord(body)) return body;
107
- if ("dialogId" in body) return body;
108
- const state = thunkApi.getState();
109
- const currentDialogKey = selectCurrentDialogKeyFromState(state);
110
- const dialogId = currentDialogKey ? extractCustomId(currentDialogKey) : null;
111
- if (!dialogId) return body;
112
- return {
113
- ...body,
114
- dialogId
115
- };
116
- };
117
153
  var ToolApiError = class extends Error {
118
154
  status;
119
155
  code;
@@ -149,11 +185,26 @@ var buildToolRequestHeaders = (thunkApi, options = {}) => {
149
185
  if (agentKey && typeof agentKey === "string" && agentKey.trim()) {
150
186
  headers["X-Nolo-Agent-Key"] = agentKey.trim();
151
187
  }
188
+ const dialogId = resolveToolDialogId(thunkApi, options);
189
+ if (dialogId) {
190
+ headers["X-Nolo-Dialog-Id"] = dialogId;
191
+ }
152
192
  if (typeof window !== "undefined" && window.__NOLO_DESKTOP__) {
153
193
  headers["X-Nolo-Desktop-Tool"] = "1";
154
194
  }
155
195
  return headers;
156
196
  };
197
+ var buildToolRequestBody = (thunkApi, body, options) => {
198
+ if (!options.injectDialogId) return body;
199
+ if (!isRecord(body)) return body;
200
+ if ("dialogId" in body) return body;
201
+ const dialogId = resolveToolDialogId(thunkApi, options);
202
+ if (!dialogId) return body;
203
+ return {
204
+ ...body,
205
+ dialogId
206
+ };
207
+ };
157
208
  var buildResponsePreview = (text) => compactWhitespace(text).slice(0, 240);
158
209
  var looksLikeHtmlResponse = (text, contentType) => {
159
210
  if (contentType?.toLowerCase().includes("text/html")) return true;
@@ -171,7 +222,7 @@ async function callToolApi(thunkApi, path, body, options = {}) {
171
222
  method,
172
223
  headers,
173
224
  ...options.signal ? { signal: options.signal } : {},
174
- ...method === "GET" ? {} : { body: JSON.stringify(maybeAttachDialogId(thunkApi, body)) }
225
+ ...method === "GET" ? {} : { body: JSON.stringify(buildToolRequestBody(thunkApi, body, options)) }
175
226
  });
176
227
  const contentType = response.headers.get("content-type");
177
228
  const responseText = await response.text();
@@ -226,6 +277,7 @@ async function callToolApi(thunkApi, path, body, options = {}) {
226
277
  }
227
278
 
228
279
  export {
280
+ resolveToolDialogId,
229
281
  resolveToolBaseUrl,
230
282
  resolveToolApiBaseUrl,
231
283
  getRequestConfig,
@@ -0,0 +1,31 @@
1
+ // packages/agent-runtime/dialogMessageRecord.ts
2
+ function dialogMessageRecordToAgentRuntimeMessage(record) {
3
+ if (!record || typeof record !== "object") return null;
4
+ if (record.role !== "user" && record.role !== "assistant" && record.role !== "tool") return null;
5
+ return {
6
+ ...typeof record.id === "string" ? { id: record.id } : {},
7
+ role: record.role,
8
+ ...Number.isFinite(record.metadata?.cliHistoryOrder) ? { cliHistoryOrder: record.metadata.cliHistoryOrder } : {},
9
+ content: record.content ?? "",
10
+ ...record.contextReference !== void 0 ? { context_reference: record.contextReference } : {},
11
+ ...typeof record.reasoning_content === "string" ? { reasoning_content: record.reasoning_content } : {},
12
+ ...typeof record.toolCallId === "string" ? { tool_call_id: record.toolCallId } : {},
13
+ ...Array.isArray(record.tool_calls) ? { tool_calls: record.tool_calls } : {},
14
+ ...record.toolPayload !== void 0 ? { toolPayload: record.toolPayload } : {},
15
+ ...typeof record.toolName === "string" ? { toolName: record.toolName } : {},
16
+ // 写侧(dialogWritePlan)把 tool_result_metadata 以 `metadata` 字段落库;
17
+ // 回读必须还原,否则跨 turn 投影丢失 metadata 后缀,同一 tool 消息的字节
18
+ // 在 turn 边界漂移 → provider 前缀缓存断裂(stable projection 契约,
19
+ // 见 docs/plans/2026-09-05-tool-output-cache-stability.md)。
20
+ ...record.metadata && typeof record.metadata === "object" ? { tool_result_metadata: record.metadata } : {},
21
+ ...(() => {
22
+ const raw = record.createdAt;
23
+ const ms = typeof raw === "number" ? raw : typeof raw === "string" ? Date.parse(raw) : NaN;
24
+ return Number.isFinite(ms) ? { createdAt: ms } : {};
25
+ })()
26
+ };
27
+ }
28
+
29
+ export {
30
+ dialogMessageRecordToAgentRuntimeMessage
31
+ };
@@ -0,0 +1,340 @@
1
+ import {
2
+ applyMemoryInterpreterMutation
3
+ } from "./chunk-6RSNVJGO.js";
4
+ import {
5
+ getMemoryEntityVNext,
6
+ getMemoryEvidenceVNextStrict,
7
+ getMemoryStateVNext,
8
+ listMemoryStatesForEntityVNext
9
+ } from "./chunk-324FWHUA.js";
10
+ import {
11
+ normalizeTopicKey
12
+ } from "./chunk-MVOZ22RZ.js";
13
+ import {
14
+ sha256Hex
15
+ } from "./chunk-SR4FE5VD.js";
16
+
17
+ // packages/ai/memory/vnext/rememberExplicit.ts
18
+ async function rememberExplicitVNext(db, item) {
19
+ const ownerId = `${item.ownerType}:${encodeURIComponent(item.ownerId)}`;
20
+ const topicKey = normalizeTopicKey(item.topicKey);
21
+ if (!topicKey) {
22
+ const digest = sha256Hex(
23
+ JSON.stringify([
24
+ ownerId,
25
+ item.subjectType,
26
+ item.subjectId,
27
+ item.kind,
28
+ item.content
29
+ ])
30
+ );
31
+ const entityId2 = `explicit-${digest}`;
32
+ const stateId = `explicit-${digest}`;
33
+ let saved2;
34
+ await applyMemoryInterpreterMutation(db, ownerId, async () => {
35
+ const existing = await getMemoryStateVNext(db, ownerId, stateId);
36
+ if (existing?.retiredAt)
37
+ throw new Error("Explicit memory conflicts with a retired state");
38
+ const entity = await getMemoryEntityVNext(db, ownerId, entityId2);
39
+ const createdAt = existing?.createdAt ?? item.createdAt;
40
+ const oldValue = existing?.value && typeof existing.value === "object" ? existing.value : {};
41
+ const confidence = Math.max(
42
+ Number(oldValue.confidence) || 0,
43
+ item.confidence ?? 0
44
+ );
45
+ const resident = oldValue.resident === true || item.resident === true;
46
+ const evidenceId = `explicit-${digest}-${sha256Hex(
47
+ JSON.stringify([
48
+ item.confidence,
49
+ item.sourceDialogId ?? null,
50
+ item.provenance ?? null
51
+ ])
52
+ ).slice(0, 24)}`;
53
+ const evidence = await getMemoryEvidenceVNextStrict(
54
+ db,
55
+ ownerId,
56
+ evidenceId
57
+ );
58
+ saved2 = {
59
+ ...item,
60
+ id: `vnext-state-${stateId}`,
61
+ createdAt,
62
+ confidence,
63
+ ...resident ? { resident: true } : {}
64
+ };
65
+ return {
66
+ action: existing ? "update" : "create",
67
+ reason: "Explicit memory save",
68
+ entities: entity ? [] : [
69
+ {
70
+ id: entityId2,
71
+ ownerId,
72
+ type: "concept",
73
+ name: item.content,
74
+ createdAt,
75
+ updatedAt: createdAt
76
+ }
77
+ ],
78
+ evidence: evidence ? [] : [
79
+ {
80
+ id: evidenceId,
81
+ ownerId,
82
+ text: item.content,
83
+ confidence: item.confidence,
84
+ ...item.provenance ? { provenance: item.provenance } : {},
85
+ sourceRef: item.sourceDialogId ? `dialog:${item.sourceDialogId}` : `explicit:${digest}`,
86
+ createdAt
87
+ }
88
+ ],
89
+ states: [
90
+ {
91
+ id: stateId,
92
+ ownerId,
93
+ entityId: entityId2,
94
+ facet: "explicit-memory",
95
+ text: item.content,
96
+ value: {
97
+ ...oldValue,
98
+ kind: item.kind,
99
+ subjectType: item.subjectType,
100
+ subjectId: item.subjectId,
101
+ confidence,
102
+ resident,
103
+ visibility: item.visibility,
104
+ tags: item.tags,
105
+ importance: item.importance,
106
+ patternKey: item.patternKey,
107
+ recurrenceEvidence: item.recurrenceEvidence,
108
+ provenance: item.provenance,
109
+ sourceKind: item.sourceKind,
110
+ sourceDialogId: item.sourceDialogId
111
+ },
112
+ evidenceIds: [
113
+ .../* @__PURE__ */ new Set([...existing?.evidenceIds ?? [], evidenceId])
114
+ ],
115
+ createdAt,
116
+ updatedAt: item.createdAt
117
+ }
118
+ ]
119
+ };
120
+ });
121
+ return saved2;
122
+ }
123
+ const topicDigest = sha256Hex(
124
+ JSON.stringify([
125
+ ownerId,
126
+ item.subjectType,
127
+ item.subjectId,
128
+ item.kind,
129
+ topicKey
130
+ ])
131
+ );
132
+ const entityId = `explicit-topic-${topicDigest}`;
133
+ const contentDigest = sha256Hex(
134
+ JSON.stringify([
135
+ ownerId,
136
+ item.subjectType,
137
+ item.subjectId,
138
+ item.kind,
139
+ item.content
140
+ ])
141
+ );
142
+ let saved;
143
+ await applyMemoryInterpreterMutation(db, ownerId, async () => {
144
+ const entity = await getMemoryEntityVNext(db, ownerId, entityId);
145
+ const entityStates = (await listMemoryStatesForEntityVNext(db, ownerId, entityId)).filter((state) => state.facet === "explicit-memory");
146
+ const activeStates = entityStates.filter((state) => !state.retiredAt);
147
+ const matchingCurrent = activeStates.find(
148
+ (state) => state.text === item.content
149
+ );
150
+ if (matchingCurrent) {
151
+ const stateId2 = matchingCurrent.id;
152
+ const createdAt2 = matchingCurrent.createdAt;
153
+ const oldValue = matchingCurrent.value && typeof matchingCurrent.value === "object" ? matchingCurrent.value : {};
154
+ const confidence2 = Math.max(
155
+ Number(oldValue.confidence) || 0,
156
+ item.confidence ?? 0
157
+ );
158
+ const resident2 = oldValue.resident === true || item.resident === true;
159
+ const existingSupersedes = Array.isArray(oldValue.supersedesStateIds) ? oldValue.supersedesStateIds.map(String) : void 0;
160
+ const evidenceId2 = `${stateId2}-${sha256Hex(
161
+ JSON.stringify([
162
+ item.confidence,
163
+ item.sourceDialogId ?? null,
164
+ item.provenance ?? null
165
+ ])
166
+ ).slice(0, 24)}`;
167
+ const evidence2 = await getMemoryEvidenceVNextStrict(
168
+ db,
169
+ ownerId,
170
+ evidenceId2
171
+ );
172
+ saved = {
173
+ ...item,
174
+ topicKey,
175
+ ...existingSupersedes?.length ? { supersedesStateIds: existingSupersedes } : {},
176
+ id: `vnext-state-${stateId2}`,
177
+ createdAt: createdAt2,
178
+ confidence: confidence2,
179
+ ...resident2 ? { resident: true } : {}
180
+ };
181
+ return {
182
+ action: "update",
183
+ reason: "Explicit memory save (topicKey idempotent update)",
184
+ entities: entity ? [] : [
185
+ {
186
+ id: entityId,
187
+ ownerId,
188
+ type: "concept",
189
+ subtype: "explicit-topic",
190
+ name: topicKey,
191
+ createdAt: createdAt2,
192
+ updatedAt: createdAt2
193
+ }
194
+ ],
195
+ evidence: evidence2 ? [] : [
196
+ {
197
+ id: evidenceId2,
198
+ ownerId,
199
+ text: item.content,
200
+ confidence: item.confidence,
201
+ ...item.provenance ? { provenance: item.provenance } : {},
202
+ sourceRef: item.sourceDialogId ? `dialog:${item.sourceDialogId}` : `explicit:${topicDigest}`,
203
+ createdAt: item.createdAt
204
+ }
205
+ ],
206
+ states: [
207
+ {
208
+ id: stateId2,
209
+ ownerId,
210
+ entityId,
211
+ facet: "explicit-memory",
212
+ text: item.content,
213
+ value: {
214
+ ...oldValue,
215
+ kind: item.kind,
216
+ subjectType: item.subjectType,
217
+ subjectId: item.subjectId,
218
+ confidence: confidence2,
219
+ resident: resident2,
220
+ visibility: item.visibility,
221
+ tags: item.tags,
222
+ importance: item.importance,
223
+ patternKey: item.patternKey,
224
+ recurrenceEvidence: item.recurrenceEvidence,
225
+ provenance: item.provenance,
226
+ sourceKind: item.sourceKind,
227
+ sourceDialogId: item.sourceDialogId,
228
+ topicKey,
229
+ ...existingSupersedes?.length ? { supersedesStateIds: existingSupersedes } : {}
230
+ },
231
+ evidenceIds: [
232
+ .../* @__PURE__ */ new Set([...matchingCurrent.evidenceIds, evidenceId2])
233
+ ],
234
+ createdAt: createdAt2,
235
+ updatedAt: item.createdAt
236
+ }
237
+ ]
238
+ };
239
+ }
240
+ const supersededIds = activeStates.map((state) => state.id);
241
+ const isSupersede = supersededIds.length > 0;
242
+ const version = entityStates.length + 1;
243
+ const stateId = `explicit-topic-${topicDigest.slice(0, 24)}-v${version}-${contentDigest.slice(0, 16)}`;
244
+ const createdAt = item.createdAt;
245
+ const confidence = item.confidence ?? 0;
246
+ const resident = item.resident === true;
247
+ const evidenceId = `${stateId}-${sha256Hex(
248
+ JSON.stringify([
249
+ item.confidence,
250
+ item.sourceDialogId ?? null,
251
+ item.provenance ?? null
252
+ ])
253
+ ).slice(0, 24)}`;
254
+ const evidence = await getMemoryEvidenceVNextStrict(
255
+ db,
256
+ ownerId,
257
+ evidenceId
258
+ );
259
+ const relations = supersededIds.map(
260
+ (oldId, idx) => ({
261
+ id: `rel-supersedes-${stateId}-${idx}`,
262
+ ownerId,
263
+ from: stateId,
264
+ type: "supersedes",
265
+ to: oldId,
266
+ createdAt
267
+ })
268
+ );
269
+ saved = {
270
+ ...item,
271
+ topicKey,
272
+ ...isSupersede ? { supersedesStateIds: supersededIds } : {},
273
+ id: `vnext-state-${stateId}`,
274
+ createdAt,
275
+ confidence,
276
+ ...resident ? { resident: true } : {}
277
+ };
278
+ return {
279
+ action: isSupersede ? "supersede" : "create",
280
+ reason: isSupersede ? "Explicit memory topicKey supersede" : "Explicit memory save (topicKey)",
281
+ entities: entity ? [] : [
282
+ {
283
+ id: entityId,
284
+ ownerId,
285
+ type: "concept",
286
+ subtype: "explicit-topic",
287
+ name: topicKey,
288
+ createdAt,
289
+ updatedAt: createdAt
290
+ }
291
+ ],
292
+ evidence: evidence ? [] : [
293
+ {
294
+ id: evidenceId,
295
+ ownerId,
296
+ text: item.content,
297
+ confidence: item.confidence,
298
+ ...item.provenance ? { provenance: item.provenance } : {},
299
+ sourceRef: item.sourceDialogId ? `dialog:${item.sourceDialogId}` : `explicit:${topicDigest}`,
300
+ createdAt
301
+ }
302
+ ],
303
+ states: [
304
+ {
305
+ id: stateId,
306
+ ownerId,
307
+ entityId,
308
+ facet: "explicit-memory",
309
+ text: item.content,
310
+ value: {
311
+ kind: item.kind,
312
+ subjectType: item.subjectType,
313
+ subjectId: item.subjectId,
314
+ confidence,
315
+ resident,
316
+ visibility: item.visibility,
317
+ tags: item.tags,
318
+ importance: item.importance,
319
+ patternKey: item.patternKey,
320
+ recurrenceEvidence: item.recurrenceEvidence,
321
+ provenance: item.provenance,
322
+ sourceKind: item.sourceKind,
323
+ sourceDialogId: item.sourceDialogId,
324
+ topicKey,
325
+ ...isSupersede ? { supersedesStateIds: supersededIds } : {}
326
+ },
327
+ evidenceIds: [evidenceId],
328
+ createdAt,
329
+ updatedAt: item.createdAt
330
+ }
331
+ ],
332
+ ...isSupersede ? { supersededStateIds: supersededIds, relations } : {}
333
+ };
334
+ });
335
+ return saved;
336
+ }
337
+
338
+ export {
339
+ rememberExplicitVNext
340
+ };
@@ -1,7 +1,9 @@
1
1
  import {
2
- MEMORY_USE_GUIDANCE,
2
+ MEMORY_USE_GUIDANCE
3
+ } from "./chunk-YGDYYFRX.js";
4
+ import {
3
5
  wrapHistoricalSummaryWithReplayGuard
4
- } from "./chunk-L5I543VB.js";
6
+ } from "./chunk-2SXN7LAY.js";
5
7
 
6
8
  // packages/agent-runtime/skillCatalog.ts
7
9
  var SKILL_CATALOG_PRIORITY = Object.freeze([
@@ -190,79 +192,8 @@ function resolveSkillCatalogSync(sources, query = {}, budget = DEFAULT_SKILL_CAT
190
192
  }
191
193
 
192
194
  // packages/agent-runtime/turnContext.ts
193
- var DEFAULT_RECENT_CONTENT_LIMIT = 10;
194
195
  var asTrimmed = (value) => typeof value === "string" ? value.trim() : "";
195
- var asFiniteNumber = (value) => typeof value === "number" && Number.isFinite(value) ? value : 0;
196
- var spaceRecordKey = (spaceId) => spaceId.startsWith("space-") ? spaceId : `space-${spaceId}`;
197
196
  var makeLayer = (id, content, cacheScope = "turn") => ({ id, owner: "runtime", cacheScope, content });
198
- var renderSpaceStructure = (spaceRecord, recentLimit) => {
199
- const categories = spaceRecord.categories ?? {};
200
- const validCategories = Object.entries(categories).filter((entry) => entry[1] !== null).sort(
201
- (a, b) => asFiniteNumber(a[1].order) - asFiniteNumber(b[1].order)
202
- );
203
- const categoryNameById = /* @__PURE__ */ new Map();
204
- let struct = "Directory Structure (Categories):\n";
205
- if (validCategories.length === 0) struct += "(No categories defined)\n";
206
- validCategories.forEach(([id, category]) => {
207
- const name = asTrimmed(category.name) || id;
208
- categoryNameById.set(id, name);
209
- struct += `- ${name} (ID: ${id})
210
- `;
211
- });
212
- const contents = spaceRecord.contents ?? {};
213
- const recentContents = recentLimit > 0 ? Object.values(contents).filter((content) => content !== null).sort(
214
- (a, b) => asFiniteNumber(b.updatedAt) - asFiniteNumber(a.updatedAt)
215
- ).slice(0, recentLimit) : [];
216
- if (recentContents.length > 0) {
217
- struct += `
218
- Recent Contents (Top ${recentLimit}):
219
- `;
220
- recentContents.forEach((content) => {
221
- const categoryId = asTrimmed(content.categoryId);
222
- const categoryName = categoryId ? categoryNameById.get(categoryId) || "Unknown" : "Uncategorized";
223
- struct += `- [${asTrimmed(content.type) || "content"}] ${asTrimmed(content.title)} (Category: ${categoryName}, dbKey: ${asTrimmed(content.contentKey)})
224
- `;
225
- });
226
- }
227
- return struct;
228
- };
229
- var buildSpaceContextLayer = async (args) => {
230
- const spaceId = asTrimmed(args.spaceId);
231
- if (!spaceId) return null;
232
- const recentLimit = args.recentContentLimit ?? DEFAULT_RECENT_CONTENT_LIMIT;
233
- let spaceRecord = null;
234
- let readError = null;
235
- try {
236
- spaceRecord = await args.source.readRecord(spaceRecordKey(spaceId));
237
- } catch (error) {
238
- readError = error instanceof Error ? error.message : String(error);
239
- }
240
- if (!spaceRecord) {
241
- return makeLayer(
242
- "space-context",
243
- [
244
- "--- \u5F53\u524D\u7A7A\u95F4\uFF08Space\uFF09---",
245
- `\u672C\u5BF9\u8BDD\u8BB0\u5F55\u58F0\u660E\u5C5E\u4E8E Space ${spaceId}\uFF0C\u4F46\u5F53\u524D\u65E0\u6CD5\u8BFB\u53D6\u8BE5 Space \u7684\u6570\u636E${readError ? `\uFF08${readError}\uFF09` : "\uFF08\u8BB0\u5F55\u4E0D\u5B58\u5728\u6216\u4E0D\u53EF\u8FBE\uFF09"}\u3002`,
246
- "\u5982\u88AB\u95EE\u53CA\uFF0C\u8BF7\u5982\u5B9E\u8BF4\u660E\u300C\u5BF9\u8BDD\u5C5E\u4E8E\u8BE5 Space \u4F46\u6682\u65F6\u8BFB\u4E0D\u5230\u7A7A\u95F4\u8BE6\u60C5\u300D\uFF0C\u4E0D\u8981\u58F0\u79F0\u5BF9\u8BDD\u4E0D\u5C5E\u4E8E\u4EFB\u4F55\u7A7A\u95F4\u3002"
247
- ].join("\n")
248
- );
249
- }
250
- const name = asTrimmed(spaceRecord.name);
251
- const description = asTrimmed(spaceRecord.description);
252
- const structure = renderSpaceStructure(spaceRecord, recentLimit);
253
- return makeLayer(
254
- "space-context",
255
- [
256
- "--- \u5F53\u524D\u7A7A\u95F4\uFF08Space\uFF09---",
257
- "\u672C\u5BF9\u8BDD\u5C5E\u4E8E\u4EE5\u4E0B Space\uFF1A",
258
- `Space Title: ${name || spaceId}`,
259
- `Space ID: ${spaceId}`,
260
- `Description: ${description || "N/A"}`,
261
- "",
262
- structure.trimEnd()
263
- ].join("\n")
264
- );
265
- };
266
197
  var buildSkillDiscoveryCatalogLayer = (catalog) => {
267
198
  if (catalog.entries.length === 0) return null;
268
199
  const sources = catalog.entries.map((entry) => entry.source).filter((source, index, all) => all.indexOf(source) === index);
@@ -311,37 +242,6 @@ var buildAgentsMdLayer = (content, fileName = "AGENTS.md") => {
311
242
  "session"
312
243
  );
313
244
  };
314
- var buildLinkedSpacesSection = async (args) => {
315
- const ids = (args.linkedSpaceIds ?? []).filter(
316
- (id) => typeof id === "string" && id.trim() !== ""
317
- );
318
- if (ids.length === 0) return null;
319
- const lines = [];
320
- for (const rawId of ids) {
321
- const spaceId = asTrimmed(rawId);
322
- let spaceData = null;
323
- try {
324
- spaceData = await args.source.readRecord(spaceRecordKey(spaceId));
325
- } catch {
326
- spaceData = null;
327
- }
328
- if (spaceData) {
329
- const name = asTrimmed(spaceData.name) || spaceId;
330
- const desc = asTrimmed(spaceData.description);
331
- lines.push(`- ${name} (ID: ${spaceId})${desc ? `: ${desc}` : ""}`);
332
- } else {
333
- lines.push(`- [\u65E0\u6CD5\u8BBF\u95EE] ${spaceId}`);
334
- }
335
- }
336
- if (lines.length === 0) return null;
337
- return [
338
- "--- \u5173\u8054\u7A7A\u95F4 (Linked Spaces) ---",
339
- "\u4EE5\u4E0B\u662F Agent \u53EF\u8BBF\u95EE\u7684\u5176\u4ED6\u5DE5\u4F5C\u7A7A\u95F4\uFF08\u7C97\u7565\u4E0A\u4E0B\u6587\uFF09\uFF1A",
340
- lines.join("\n"),
341
- "",
342
- "\u63D0\u793A\uFF1A\u5982\u9700\u67E5\u8BE2\u8FD9\u4E9B\u7A7A\u95F4\u7684\u8BE6\u7EC6\u5185\u5BB9\uFF0C\u53EF\u4F7F\u7528 read \u5DE5\u5177\u914D\u5408\u5BF9\u5E94\u7684 dbKey\u3002"
343
- ].join("\n");
344
- };
345
245
  var renderTurnContextBlocksWithScope = (layers) => layers.filter((layer) => Boolean(layer?.content?.trim())).map((layer) => ({
346
246
  content: layer.content.trim(),
347
247
  cacheScope: layer.cacheScope
@@ -358,6 +258,9 @@ var buildDialogSummaryLayer = (args) => {
358
258
  return makeLayer("dialog-summary", `--- \u5386\u53F2\u5BF9\u8BDD\u6458\u8981 ---
359
259
  ${historical}`);
360
260
  };
261
+ var hasMemoryTools = (toolNames) => Array.isArray(toolNames) ? toolNames.some(
262
+ (name) => typeof name === "string" && /memory/i.test(name)
263
+ ) : false;
361
264
  var buildMemoryOverlayLayer = (args) => {
362
265
  const promptBlock = asTrimmed(args.promptBlock);
363
266
  if (!promptBlock) return null;
@@ -365,7 +268,7 @@ var buildMemoryOverlayLayer = (args) => {
365
268
  };
366
269
  var buildMemoryUseGuidanceLayer = (args) => {
367
270
  const promptBlock = asTrimmed(args.promptBlock);
368
- if (!promptBlock) return null;
271
+ if (!promptBlock && args.hasMemoryTools !== true) return null;
369
272
  return makeLayer(
370
273
  "memory-use-guidance",
371
274
  MEMORY_USE_GUIDANCE,
@@ -379,14 +282,13 @@ export {
379
282
  mapDiscoveredSkillsToCatalogEntries,
380
283
  resolveSkillCatalog,
381
284
  resolveSkillCatalogSync,
382
- buildSpaceContextLayer,
383
285
  buildSkillDiscoveryCatalogLayer,
384
286
  buildAgentsMdLayerHeader,
385
287
  buildAgentsMdLayer,
386
- buildLinkedSpacesSection,
387
288
  renderTurnContextBlocksWithScope,
388
289
  partitionScopedBlocks,
389
290
  buildDialogSummaryLayer,
291
+ hasMemoryTools,
390
292
  buildMemoryOverlayLayer,
391
293
  buildMemoryUseGuidanceLayer
392
294
  };