nolo-cli 0.264.0-alpha.2 → 0.266.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (538) hide show
  1. package/{chunk-LXP53WGF.js → chunk-05wkntba.js} +44 -40
  2. package/{chunk-XFYFMTOM.js → chunk-08ts2q1n.js} +9 -11
  3. package/{chromeCommands-MVEEIY4R.js → chunk-0a3m1n6h.js} +182 -238
  4. package/chunk-0gfvc7g8.js +13 -0
  5. package/{chunk-CF7PE763.js → chunk-0h0sncy4.js} +3 -4
  6. package/{chunk-3UH7SS4W.js → chunk-0nsxwrge.js} +232 -241
  7. package/chunk-0ra8cne4.js +11 -0
  8. package/{chunk-MRACVEPZ.js → chunk-0sgwk7am.js} +1 -3
  9. package/{chunk-PEXGRTTQ.js → chunk-0tsfn0dk.js} +44 -45
  10. package/{chunk-WOAZVUSN.js → chunk-0y8cbwzy.js} +26 -30
  11. package/chunk-12gz55kk.js +6 -0
  12. package/{chunk-GLKOYSRU.js → chunk-186gshgw.js} +3 -6
  13. package/chunk-19w4ss38.js +44 -0
  14. package/{chunk-RF576RYE.js → chunk-1cakzp6r.js} +23 -23
  15. package/chunk-1fbfwbzp.js +27 -0
  16. package/{chunk-4IVMDQBA.js → chunk-1fv9k8zt.js} +103 -68
  17. package/{chunk-Q5FJJ6XI.js → chunk-1js4cdzp.js} +11 -19
  18. package/{chunk-YECCIUYU.js → chunk-1nhx0er5.js} +63 -63
  19. package/chunk-1p152b7g.js +12 -0
  20. package/{chunk-HXEO5DNV.js → chunk-1ynbq3yr.js} +322 -353
  21. package/{chunk-6UBGXX2W.js → chunk-1zrg4h5n.js} +3 -4
  22. package/{chunk-Y5GCAMGP.js → chunk-2g6zsfq8.js} +1 -3
  23. package/chunk-2hekb0eh.js +17 -0
  24. package/chunk-2pj6qzq5.js +12 -0
  25. package/chunk-2tvd4jyp.js +226 -0
  26. package/chunk-2ygg7azv.js +846 -0
  27. package/chunk-33405wtv.js +50 -0
  28. package/chunk-34axejtd.js +30 -0
  29. package/{tableCommands-FCPDULSU.js → chunk-3700dvt3.js} +224 -276
  30. package/{pdf-KE3QI2V7.js → chunk-3j08t1nm.js} +12505 -10133
  31. package/chunk-3j9gq18v.js +111 -0
  32. package/{chunk-LYPJYBE5.js → chunk-3qfpcdkm.js} +486 -505
  33. package/{settingThunks-PNC7ZISV.js → chunk-3r2x7h64.js} +189 -272
  34. package/{agentGrantCommands-2VLLXGIU.js → chunk-3tbj5fxt.js} +61 -56
  35. package/chunk-40whhjj5.js +168 -0
  36. package/chunk-4301919y.js +7 -0
  37. package/chunk-43adz39e.js +77 -0
  38. package/{chunk-5ZUL4CUO.js → chunk-49v3zc4g.js} +1 -3
  39. package/chunk-4dd7mxkb.js +72 -0
  40. package/{chunk-BKP325XS.js → chunk-4hapfzpq.js} +66 -62
  41. package/chunk-4mm7dz0m.js +95 -0
  42. package/chunk-4pqxempz.js +440 -0
  43. package/chunk-4x9zf5pv.js +10 -0
  44. package/{chunk-CA7LGAHV.js → chunk-511q8qzv.js} +66 -57
  45. package/{chunk-U7OULUMF.js → chunk-53v9g0np.js} +49 -64
  46. package/chunk-572mg6q5.js +19 -0
  47. package/{chunk-QAW6BEWQ.js → chunk-57eyhmwr.js} +17173 -16165
  48. package/chunk-5hsr0zjm.js +156 -0
  49. package/chunk-5k883yyd.js +20 -0
  50. package/chunk-5m0wsee4.js +639 -0
  51. package/{memberThunks-NEZRAW5K.js → chunk-5r1sq2gt.js} +299 -373
  52. package/chunk-648rq4np.js +255 -0
  53. package/{chunk-IYRZKHA6.js → chunk-666yjw5c.js} +63 -86
  54. package/{chunk-4O22PGNQ.js → chunk-6cdcbmtp.js} +19 -19
  55. package/chunk-6dbyqcf7.js +59 -0
  56. package/{agentProviderCommands-2W3VXDLV.js → chunk-6e8mgp1x.js} +82 -105
  57. package/chunk-6n0pw7sx.js +44 -0
  58. package/chunk-6q1b7381.js +361 -0
  59. package/chunk-6sj756ry.js +23 -0
  60. package/{chunk-4UNN45DS.js → chunk-6t7a7zck.js} +14785 -14454
  61. package/chunk-6yarwtxh.js +776 -0
  62. package/chunk-708h542p.js +18 -0
  63. package/chunk-76f076t8.js +266 -0
  64. package/chunk-782rrrwv.js +523 -0
  65. package/{workloadLifecycle-P2SJVV3S.js → chunk-7gk330wp.js} +77 -84
  66. package/{chunk-EZKIRVLJ.js → chunk-7ks60vxy.js} +146 -128
  67. package/{chunk-FI4DPLR7.js → chunk-7mrqbxe8.js} +342 -228
  68. package/chunk-7sztayrd.js +169 -0
  69. package/chunk-7vgt2mxz.js +15 -0
  70. package/{localFirstLog-OIETGK66.js → chunk-7z8y4k6y.js} +0 -2
  71. package/{chunk-KDDXC2IH.js → chunk-82htft2m.js} +49 -11
  72. package/{updateDialogTitleAction-XOSLNRT3.js → chunk-88vrtxxg.js} +65 -137
  73. package/{chunk-LS5KAVFQ.js → chunk-8dtjbp79.js} +293 -229
  74. package/chunk-8fajbkaz.js +50 -0
  75. package/chunk-8m1ebxpw.js +65 -0
  76. package/{accountResolver-JYG5L7YP.js → chunk-8mgfeg0w.js} +37 -30
  77. package/{chunk-LPXBBC32.js → chunk-8myksy35.js} +156 -160
  78. package/{chunk-BMQ2MJUK.js → chunk-8nrj7dc7.js} +75 -66
  79. package/{commandRegistry-ENNFT77C.js → chunk-8t8x64ec.js} +228 -286
  80. package/chunk-8yj4pq79.js +458 -0
  81. package/{chunk-5MKPNTJP.js → chunk-8z6pepcx.js} +43 -48
  82. package/{chunk-UYQILGDR.js → chunk-90egc9vb.js} +122 -102
  83. package/{chunk-EODBQPRM.js → chunk-91q5dc5r.js} +10 -14
  84. package/{chunk-U6VC4MU4.js → chunk-96jtrqk1.js} +2 -4
  85. package/{chunk-H57T64RA.js → chunk-996j61av.js} +28 -31
  86. package/{chunk-Q6FKWH66.js → chunk-9cxgb9jy.js} +137 -243
  87. package/{chunk-2ZBPWX7N.js → chunk-9q1gbmet.js} +62 -104
  88. package/chunk-9qtjh73q.js +344 -0
  89. package/{chunk-SR57FDTX.js → chunk-9raka469.js} +72 -155
  90. package/{chunk-V6K5U4YE.js → chunk-9vh4v046.js} +32 -41
  91. package/{chunk-AGIM7IMJ.js → chunk-9yr1fy7j.js} +14 -49
  92. package/{chunk-FGFJUFPS.js → chunk-a16x0wt6.js} +11 -18
  93. package/chunk-a5b2rvzs.js +131 -0
  94. package/{chunk-7DPNBQSV.js → chunk-a7bz6nc3.js} +3 -4
  95. package/chunk-ac85azv9.js +29 -0
  96. package/{chunk-VXL2FZTP.js → chunk-ahhbkad4.js} +16 -20
  97. package/{chunk-37DGW762.js → chunk-anhksj2j.js} +16 -29
  98. package/{cliAuthorityBrokerServer-27C5YBYP.js → chunk-atvmx76t.js} +180 -186
  99. package/{chunk-E6A5NHDH.js → chunk-av2mzeqz.js} +16 -17
  100. package/chunk-avbwrb0z.js +614 -0
  101. package/chunk-avr6rqe5.js +544 -0
  102. package/{workContextQueryProjection-CACY5VFE.js → chunk-axx60d5a.js} +7 -7
  103. package/{chunk-EWQ3HGNZ.js → chunk-b00vzjkb.js} +30 -23
  104. package/chunk-b0m6ezxr.js +132 -0
  105. package/chunk-bbd5mgdt.js +47 -0
  106. package/chunk-bcecft0r.js +28 -0
  107. package/chunk-beyr4pyp.js +33 -0
  108. package/{chunk-BR3GT6MR.js → chunk-bge0cagn.js} +7 -18
  109. package/{offlineMarxistsAgentCommand-MFURGWHL.js → chunk-bh53zg3t.js} +33 -43
  110. package/chunk-bmx1cw89.js +37 -0
  111. package/chunk-br2195h4.js +22 -0
  112. package/chunk-bsqkwveq.js +56 -0
  113. package/{chunk-QAU6KM2U.js → chunk-c09s2z1m.js} +139 -98
  114. package/chunk-c235kypv.js +24636 -0
  115. package/{chunk-2JMYAH5O.js → chunk-c30j6pyh.js} +213 -256
  116. package/chunk-c3v6r6sq.js +29 -0
  117. package/{chunk-PDSXYHNI.js → chunk-c5z7qspt.js} +1177 -1196
  118. package/{chunk-GWB6AGME.js → chunk-c6jvz0mp.js} +34 -50
  119. package/{chunk-PRJ473FK.js → chunk-cd6h9qqs.js} +14 -12
  120. package/chunk-cdt0amyy.js +37 -0
  121. package/{chunk-2AJLG6PY.js → chunk-cfh6tfc3.js} +73 -86
  122. package/{chunk-WIVVNJUS.js → chunk-ch4ck1yz.js} +38 -68
  123. package/chunk-chtvrtp5.js +55 -0
  124. package/{chunk-EYLGAEB4.js → chunk-ckvz7abv.js} +170 -165
  125. package/{chunk-YZMNK53S.js → chunk-csf18m5w.js} +32 -25
  126. package/{chunk-C36L6ZID.js → chunk-cwnvf8dt.js} +2 -10
  127. package/chunk-cy7thb6n.js +19877 -0
  128. package/{dialogPortabilityCommands-YQJNB2KL.js → chunk-d61q9nah.js} +439 -487
  129. package/chunk-d6xdy0gp.js +142 -0
  130. package/{chunk-EBH4RFJ6.js → chunk-dh69vqbd.js} +6390 -6496
  131. package/{chunk-KJ4J2XQB.js → chunk-dj4ggbc6.js} +17 -19
  132. package/{chunk-LISC7BD4.js → chunk-djrrhbk3.js} +29 -37
  133. package/chunk-drqzzzvr.js +822 -0
  134. package/chunk-e1n7edjk.js +33 -0
  135. package/chunk-e3atr4hk.js +59 -0
  136. package/chunk-e9bn2aav.js +13 -0
  137. package/chunk-ed396rfq.js +87 -0
  138. package/chunk-eha8ggh6.js +10 -0
  139. package/{chunk-MALPQFGT.js → chunk-ek122zzt.js} +893 -948
  140. package/chunk-epnmvek4.js +22 -0
  141. package/{chunk-S25VJYXV.js → chunk-eqzvk3xm.js} +69 -80
  142. package/chunk-ex34n71b.js +2874 -0
  143. package/{chunk-56OAS5RZ.js → chunk-f3ad6q4h.js} +7 -11
  144. package/{chunk-3PVYUPXK.js → chunk-f8jepva1.js} +6 -7
  145. package/{chunk-GH34JXNV.js → chunk-f9yvy9t9.js} +114 -92
  146. package/chunk-fbdz4f0j.js +90 -0
  147. package/{chunk-J44TXB4J.js → chunk-fcsc2day.js} +216 -164
  148. package/chunk-fevdhnbh.js +19 -0
  149. package/chunk-fkrgqq8w.js +3300 -0
  150. package/{chunk-TSBJVMNW.js → chunk-fs3bvh2p.js} +42 -57
  151. package/chunk-fvwzyhah.js +134 -0
  152. package/chunk-g0mpxdp9.js +101 -0
  153. package/{chunk-LTQ6ECCF.js → chunk-g35f20d1.js} +450 -414
  154. package/{chunk-3L2WKC3W.js → chunk-g5fhtjqg.js} +13 -16
  155. package/{chunk-DBEOW57U.js → chunk-gcq01td7.js} +270 -227
  156. package/{chunk-ADMRXWXJ.js → chunk-ge97b11r.js} +121 -42
  157. package/chunk-ghjtgbkw.js +180 -0
  158. package/chunk-gkra36c1.js +16 -0
  159. package/chunk-gmz86t60.js +1000 -0
  160. package/{localDialogRead-GWGWSL5K.js → chunk-gszpesze.js} +5 -12
  161. package/chunk-gvsfec9m.js +16536 -0
  162. package/{chunk-QSJ3HFEF.js → chunk-h1hzmqph.js} +1 -3
  163. package/chunk-h30dg154.js +17 -0
  164. package/chunk-h3hkb7cw.js +241 -0
  165. package/chunk-h40py996.js +28 -0
  166. package/{chunk-47T3QP4V.js → chunk-h60gnewh.js} +112 -116
  167. package/{agentPullCommand-XEGOUYQT.js → chunk-hkwsv9xf.js} +33 -45
  168. package/chunk-hnyg0gwj.js +28 -0
  169. package/{chunk-KSV6T4AH.js → chunk-hqqqph5w.js} +12 -4
  170. package/{chunk-YQJEXXDK.js → chunk-hrngs1wy.js} +157 -246
  171. package/{chunk-LRLLWD4P.js → chunk-htf69s94.js} +14 -12
  172. package/chunk-j0yxesh3.js +83 -0
  173. package/{chunk-VF4K2QE6.js → chunk-j22t9g05.js} +3 -6
  174. package/{chunk-3R4AYHJR.js → chunk-j4a8m2zn.js} +5 -34
  175. package/chunk-j9p4jnwg.js +27 -0
  176. package/{chunk-R72QWIFO.js → chunk-jdycmfsm.js} +9 -9
  177. package/chunk-jdyvrne0.js +52 -0
  178. package/{spacePruneCommand-YKIEUIDQ.js → chunk-je0b66qf.js} +44 -62
  179. package/{chunk-HNMXYYJR.js → chunk-jec44fkj.js} +3 -4
  180. package/{chunk-526GLZJE.js → chunk-jf1ex00r.js} +107 -73
  181. package/chunk-jgqdec9b.js +31 -0
  182. package/{chunk-56GBUMO5.js → chunk-jkw9n4h5.js} +16 -25
  183. package/{chunk-7422ZLGL.js → chunk-jmnzdwjt.js} +867 -965
  184. package/chunk-jqq57s0a.js +58 -0
  185. package/{chunk-OKUSDVRS.js → chunk-jtkn5aj6.js} +27 -38
  186. package/chunk-jwvzn9r0.js +316 -0
  187. package/chunk-k1re0fc7.js +107 -0
  188. package/chunk-k2ep3rb2.js +103 -0
  189. package/{chunk-JEXVIMYZ.js → chunk-k6ycb24w.js} +5 -8
  190. package/{chunk-RI7SXDJW.js → chunk-kawvydbk.js} +383 -195
  191. package/chunk-kf2ghpzh.js +10 -0
  192. package/{chunk-S6FAHQDH.js → chunk-kgah9e46.js} +28 -59
  193. package/{chunk-T3MWVUBE.js → chunk-kjjepkvc.js} +71 -82
  194. package/chunk-kn4dgg4j.js +4113 -0
  195. package/{chunk-2LFYMWM3.js → chunk-kn5p91n8.js} +43 -53
  196. package/{chunk-MVOZ22RZ.js → chunk-kntqrbwc.js} +8 -12
  197. package/{chunk-I6YIA2TY.js → chunk-kq3vr7mx.js} +25 -20
  198. package/chunk-kz1x1d8n.js +15 -0
  199. package/{mcpLocalAuthorizeCommand-IKOFKY5U.js → chunk-m22e7tt2.js} +53 -71
  200. package/{chunk-ZNFJWEN4.js → chunk-m32rwr4d.js} +11 -8
  201. package/chunk-m39e9m18.js +93 -0
  202. package/{chunk-4D4QD7FT.js → chunk-m5518371.js} +64 -56
  203. package/{chunk-LHTXSC2E.js → chunk-mb5hnfyp.js} +9 -11
  204. package/chunk-mexet11v.js +11 -0
  205. package/chunk-mg2hgfgh.js +185 -0
  206. package/chunk-mmdhm4kx.js +10317 -0
  207. package/chunk-mz002yz8.js +2821 -0
  208. package/chunk-mzadqnyq.js +56 -0
  209. package/{chunk-VIDPVFP3.js → chunk-n3r1ebdm.js} +5 -6
  210. package/chunk-n438qea7.js +33 -0
  211. package/chunk-n5ffnhnb.js +93 -0
  212. package/chunk-nbvd87fy.js +9 -0
  213. package/{chunk-E36V7MPY.js → chunk-ndej7jc9.js} +53 -43
  214. package/{chunk-B767MA64.js → chunk-nen6rwe4.js} +62 -22
  215. package/chunk-nf06tr3v.js +16 -0
  216. package/chunk-ng8z355q.js +16 -0
  217. package/{chunk-4MEKE5D3.js → chunk-nhtxfv8k.js} +78 -63
  218. package/{runAgentClientLoop-2SFASHDS.js → chunk-nj62jscj.js} +132 -214
  219. package/{chunk-GBWGPTA7.js → chunk-nkryrkyp.js} +16 -19
  220. package/chunk-nmesxem8.js +197 -0
  221. package/{chunk-YR4J7RFS.js → chunk-nmq0qwbn.js} +117 -164
  222. package/chunk-nph8brvw.js +7 -0
  223. package/chunk-nr8fees9.js +10 -0
  224. package/{chunk-DFI7MVCQ.js → chunk-nvewvf7h.js} +1441 -1427
  225. package/{chunk-G7Y4GXTY.js → chunk-nyamhphs.js} +70 -79
  226. package/chunk-nz1c8tcg.js +111 -0
  227. package/{chunk-GPLUFN2E.js → chunk-nzc5yffh.js} +176 -217
  228. package/{chunk-G3SUCT4W.js → chunk-p1vg4bx8.js} +2 -4
  229. package/chunk-p3k3abe8.js +202 -0
  230. package/chunk-p4zy30q5.js +8 -0
  231. package/{chunk-ZJACPM5O.js → chunk-p6se1rx0.js} +102 -102
  232. package/chunk-p9dpshev.js +6968 -0
  233. package/chunk-pa42wxr0.js +116 -0
  234. package/{chunk-TA5QI4MM.js → chunk-paxthgqp.js} +56 -107
  235. package/{readlineWorkspace-ZH5FGDMI.js → chunk-pb35s8d9.js} +5395 -5786
  236. package/{chunk-XT6C2QZW.js → chunk-pbebzbcq.js} +8 -8
  237. package/chunk-pbx7e1mb.js +11 -0
  238. package/chunk-pe5czfn9.js +8 -0
  239. package/chunk-pextk1j4.js +62 -0
  240. package/chunk-pf5rywc6.js +575 -0
  241. package/chunk-pjfhd3fz.js +136 -0
  242. package/{chunk-ZCMAKAZM.js → chunk-pkhqb0fs.js} +118 -59
  243. package/chunk-pm5xb9jh.js +26 -0
  244. package/{chunk-Y3KGWZKF.js → chunk-ppdmmdkx.js} +110 -97
  245. package/chunk-pqp6y2hs.js +9 -0
  246. package/{chunk-QHEN7NZ7.js → chunk-ptz8fm2n.js} +12 -17
  247. package/{chunk-EUHMI5KG.js → chunk-pwqnvbt7.js} +65 -46
  248. package/chunk-pzr31nz7.js +12 -0
  249. package/{chunk-WWC7I6TA.js → chunk-q3cx89sw.js} +2 -4
  250. package/chunk-q5pe7be3.js +78 -0
  251. package/{chunk-ZHWTBHT3.js → chunk-q6zqbxp2.js} +418 -409
  252. package/chunk-q7r0e1p3.js +15 -0
  253. package/chunk-q8t2fecd.js +6 -0
  254. package/{chunk-2QAZCYOM.js → chunk-q94zx4d0.js} +721 -753
  255. package/{runtimeDoctorCommands-52MBG5JN.js → chunk-qarz1az1.js} +65 -85
  256. package/{chunk-4INJGWE3.js → chunk-qdcvr25b.js} +72 -53
  257. package/{streamAgentChatTurn-KOUWITHH.js → chunk-qxs27wfg.js} +1079 -1475
  258. package/{chunk-GIXWVN2W.js → chunk-r06ycjjr.js} +50 -47
  259. package/{chunk-63W5N6P3.js → chunk-r20jw5hb.js} +57 -38
  260. package/{chunk-I5BYFTYK.js → chunk-r7sfwdka.js} +1201 -1142
  261. package/{chunk-UMADT6B2.js → chunk-r9sp1yyb.js} +6 -8
  262. package/{handleSendMessageAction-FHGUFT2X.js → chunk-rbd2vgb3.js} +627 -757
  263. package/chunk-rc37js46.js +12 -0
  264. package/{chunk-5YI447UL.js → chunk-rmngk6r3.js} +67 -76
  265. package/chunk-rnhbnbrq.js +15 -0
  266. package/{chunk-WRHVVIGI.js → chunk-rsfnmrt5.js} +111 -131
  267. package/{chunk-YFSM2366.js → chunk-rvvn2rhj.js} +28 -22
  268. package/{chunk-4Y6CZ2N4.js → chunk-s0fpz7ht.js} +37 -33
  269. package/{chunk-VI4SWTUO.js → chunk-s1cqzb2r.js} +77 -65
  270. package/{chunk-6QDYSCPW.js → chunk-s8q81tda.js} +73 -65
  271. package/chunk-s9hy639e.js +6 -0
  272. package/{chunk-R5GO3YZP.js → chunk-s9vbwme8.js} +115 -106
  273. package/chunk-sger1m1b.js +20 -0
  274. package/chunk-spe6crvk.js +60 -0
  275. package/chunk-spwsrvh9.js +70 -0
  276. package/chunk-sr05zpk7.js +573 -0
  277. package/{chunk-M2EJHDJP.js → chunk-srncrd3f.js} +1 -12
  278. package/{chunk-QXHFIX7W.js → chunk-sry80bpx.js} +71 -53
  279. package/{chunk-PSCNXBYA.js → chunk-t6q69p83.js} +3 -4
  280. package/{chunk-UAD2WT54.js → chunk-t714r4q0.js} +9 -28
  281. package/chunk-t7vbraqe.js +42 -0
  282. package/{chunk-CVMMWN6P.js → chunk-td7653rr.js} +10 -20
  283. package/{chunk-3BQDF4QB.js → chunk-tmytcetz.js} +17 -21
  284. package/{chunk-AMWMV56B.js → chunk-tta4prwg.js} +16 -15
  285. package/chunk-tvh8azgq.js +4829 -0
  286. package/{chunk-ID4G2MAR.js → chunk-v08kbfm8.js} +10 -11
  287. package/{chunk-OKPOQGQJ.js → chunk-v1x702q8.js} +801 -852
  288. package/{chunk-KHCLMKZZ.js → chunk-v39fea91.js} +576 -247
  289. package/{chunk-OW765XBU.js → chunk-vejtd8p2.js} +3 -4
  290. package/chunk-vep7zkha.js +368 -0
  291. package/chunk-vfwn1k7n.js +142 -0
  292. package/chunk-vg68vxhx.js +20 -0
  293. package/chunk-vgcqgnsm.js +31 -0
  294. package/{chunk-NF64D32W.js → chunk-vnzyjdea.js} +1 -3
  295. package/{chunk-ZCLSM5AK.js → chunk-vqgtw1px.js} +800 -717
  296. package/chunk-vv1gr5xz.js +76 -0
  297. package/{spaceCommands-Z2CTQD6G.js → chunk-w1qeadpq.js} +176 -242
  298. package/chunk-w468ez1p.js +13 -0
  299. package/chunk-w49s0t79.js +14 -0
  300. package/{mcpLocalManageCommands-KUDZQRM4.js → chunk-w58zhfbn.js} +91 -93
  301. package/chunk-w5b74aq6.js +11 -0
  302. package/chunk-w7y41qyw.js +117 -0
  303. package/chunk-w820gg1w.js +4165 -0
  304. package/{chunk-DBJAJ4UD.js → chunk-wdsmaqmt.js} +399 -453
  305. package/{chunk-3EUW3WEO.js → chunk-wfvvnmmj.js} +1 -3
  306. package/{chunk-QY4NZCDA.js → chunk-wkr04bhk.js} +432 -651
  307. package/{chunk-KUG52IAP.js → chunk-ws402twv.js} +1 -3
  308. package/chunk-wzwh311q.js +164 -0
  309. package/{runtimeModeArgs-X7DL7PUN.js → chunk-x5vtgvwn.js} +6 -5
  310. package/{agentMachineCommands-COJD2KPZ.js → chunk-x8h2csmq.js} +152 -195
  311. package/{chunk-BAZCS5XG.js → chunk-x9zfjnrc.js} +59 -47
  312. package/{chunk-WTIJKWCI.js → chunk-xcarc2rf.js} +50 -56
  313. package/chunk-xf33gz0a.js +8 -0
  314. package/{chunk-PVFYPUIM.js → chunk-y7b3gwx1.js} +78 -71
  315. package/{memoryCommands-SVLAVFCV.js → chunk-y7sphmnh.js} +119 -95
  316. package/{agentListCommands-436FHOIT.js → chunk-ycvaafhc.js} +260 -374
  317. package/chunk-yd7zprb0.js +9 -0
  318. package/chunk-yfz3d27k.js +40 -0
  319. package/{chunk-MKR6KDD3.js → chunk-ykv9g3m4.js} +141 -125
  320. package/chunk-ystjgb9e.js +544 -0
  321. package/chunk-yysxn7ep.js +12 -0
  322. package/{chunk-AL3TYDIF.js → chunk-z17eyawk.js} +18 -16
  323. package/{machineCommands-RVB5OG2X.js → chunk-z17q416p.js} +442 -563
  324. package/chunk-z1n98pcf.js +12 -0
  325. package/{dialogTraceCommand-HWXGIGZX.js → chunk-z566jx5r.js} +292 -397
  326. package/chunk-zjxd6942.js +6 -0
  327. package/{versionChangeNotice-RFABJGJE.js → chunk-zk11x9y5.js} +7 -9
  328. package/{chunk-TEFD5E2D.js → chunk-zt73yc33.js} +48 -51
  329. package/chunk-zvs2fra1.js +5 -0
  330. package/{chunk-SVFFKLMR.js → chunk-zwee84rh.js} +117 -141
  331. package/chunk-zxgfqv72.js +8 -0
  332. package/index.js +53 -69
  333. package/package.json +4 -4
  334. package/_executeModel-YQNZNR2Y.js +0 -341
  335. package/action-UK3HXGXF.js +0 -30
  336. package/addContentAction-CAKFVBDM.js +0 -38
  337. package/addDialogAgentAction-KLJ2YWWM.js +0 -77
  338. package/agentDeleteCommand-S5FVPYKT.js +0 -523
  339. package/agentEmailCommands-ZEFMGVKM.js +0 -742
  340. package/agentRecordCommands-JZ35AC5A.js +0 -211
  341. package/agentRun-UIO43TUG.js +0 -251
  342. package/agentRunCommand-ATLKKD6O.js +0 -249
  343. package/agentRunControl-U2MV74WR.js +0 -211
  344. package/agentRuntimeLocal-P4MMGIR6.js +0 -189
  345. package/agentSlice-HHNKNNYM.js +0 -52
  346. package/appConfigCommands-W4JQHMOJ.js +0 -417
  347. package/appDeleteCommands-IXR47IAV.js +0 -183
  348. package/appDeployCommands-LB6DHDF4.js +0 -232
  349. package/appDeployStatusCommands-UQ6MJL6D.js +0 -204
  350. package/appGetCommands-M5JCTDDQ.js +0 -185
  351. package/appListCommands-TE3ZHE3I.js +0 -186
  352. package/appMigrateCommands-FOXH6R4B.js +0 -230
  353. package/appSourceCommands-3ACYB6I7.js +0 -279
  354. package/authCommand-I5OBJP5S.js +0 -66
  355. package/authCommands-I6KCGOCN.js +0 -54
  356. package/builtinSkillRegistry-MIXYSZUU.js +0 -35
  357. package/chromeOpsCommands-IZRCYDSW.js +0 -579
  358. package/chunk-24BICQPB.js +0 -25
  359. package/chunk-2E4BYAUE.js +0 -69
  360. package/chunk-2O72G3U2.js +0 -17157
  361. package/chunk-2OROOEOQ.js +0 -229
  362. package/chunk-2R6M34JP.js +0 -27225
  363. package/chunk-2SXN7LAY.js +0 -15
  364. package/chunk-35JIFLIG.js +0 -30
  365. package/chunk-3VXVE2LF.js +0 -12
  366. package/chunk-4DBTBNTX.js +0 -477
  367. package/chunk-4JH2UMJR.js +0 -40
  368. package/chunk-4RUQ2PFX.js +0 -432
  369. package/chunk-4SN6J65J.js +0 -38
  370. package/chunk-5MMAK75Q.js +0 -15
  371. package/chunk-6NYQHXMV.js +0 -1737
  372. package/chunk-6R4IY46J.js +0 -14
  373. package/chunk-7E6YXSFZ.js +0 -441
  374. package/chunk-7K4J76JQ.js +0 -917
  375. package/chunk-7LR2IFUH.js +0 -100
  376. package/chunk-AETZ7AD6.js +0 -274
  377. package/chunk-ATNTHIZI.js +0 -13
  378. package/chunk-BPB3T5EU.js +0 -791
  379. package/chunk-BV3FLP2L.js +0 -133
  380. package/chunk-BVYHE6QD.js +0 -110
  381. package/chunk-BWJLEN6X.js +0 -1388
  382. package/chunk-CHOZJMJS.js +0 -78
  383. package/chunk-D2LTQAGN.js +0 -464
  384. package/chunk-DALXH7BG.js +0 -3392
  385. package/chunk-DBCWXGOC.js +0 -15210
  386. package/chunk-DLXL4NSL.js +0 -1179
  387. package/chunk-DSBRIUX5.js +0 -23
  388. package/chunk-DWLEOOGR.js +0 -8
  389. package/chunk-E2KZNP6C.js +0 -13
  390. package/chunk-E5JV4DCB.js +0 -272
  391. package/chunk-EUGTFFO6.js +0 -42
  392. package/chunk-FBNVJ2TO.js +0 -294
  393. package/chunk-FGXG6OLW.js +0 -34
  394. package/chunk-G22P2J7O.js +0 -1775
  395. package/chunk-HEVRQGGH.js +0 -106
  396. package/chunk-HHXF57CL.js +0 -180
  397. package/chunk-HI5RS2O4.js +0 -2109
  398. package/chunk-HJTI7RZV.js +0 -94
  399. package/chunk-HRWRIPTB.js +0 -531
  400. package/chunk-HYCVEESH.js +0 -2824
  401. package/chunk-I42VC5KR.js +0 -15
  402. package/chunk-IB5AR52X.js +0 -15
  403. package/chunk-IIRJ4P4I.js +0 -24
  404. package/chunk-IT3ZZRJE.js +0 -12
  405. package/chunk-IV6VUVLJ.js +0 -88
  406. package/chunk-J42X32PV.js +0 -472
  407. package/chunk-JDMWYVUF.js +0 -449
  408. package/chunk-JKVOKKMQ.js +0 -53
  409. package/chunk-JRTNUU5Z.js +0 -54
  410. package/chunk-K7HLFORE.js +0 -226
  411. package/chunk-KGBASAB5.js +0 -74
  412. package/chunk-KGKTN2NX.js +0 -25
  413. package/chunk-KX6YBIHG.js +0 -8
  414. package/chunk-KYHNSSL2.js +0 -62
  415. package/chunk-KZO2MTVM.js +0 -140
  416. package/chunk-LKZPX6YH.js +0 -0
  417. package/chunk-LLP2NDED.js +0 -201
  418. package/chunk-LOFRSJX2.js +0 -47
  419. package/chunk-M75RM77T.js +0 -3970
  420. package/chunk-MDAYRIP7.js +0 -1889
  421. package/chunk-MI6HRMCK.js +0 -25
  422. package/chunk-MTNQNLSE.js +0 -1029
  423. package/chunk-NH4PUEWK.js +0 -762
  424. package/chunk-NHLLXINQ.js +0 -8
  425. package/chunk-NTUNHTJV.js +0 -40
  426. package/chunk-OJKUU3LP.js +0 -67
  427. package/chunk-OQH3TAB7.js +0 -299
  428. package/chunk-P62DHV4F.js +0 -443
  429. package/chunk-PHIERFHT.js +0 -574
  430. package/chunk-PKDFU6MY.js +0 -102
  431. package/chunk-PL5RKESU.js +0 -40
  432. package/chunk-PSJJBBWV.js +0 -42
  433. package/chunk-QKM55LP2.js +0 -739
  434. package/chunk-QQ56R7KS.js +0 -88
  435. package/chunk-QYPE3TS3.js +0 -43
  436. package/chunk-REAE2SZK.js +0 -62
  437. package/chunk-RGQ4UUWZ.js +0 -208
  438. package/chunk-RIRFHJTW.js +0 -353
  439. package/chunk-RYMLMTPZ.js +0 -547
  440. package/chunk-SSGTV4FC.js +0 -303
  441. package/chunk-SVKWZ3EG.js +0 -607
  442. package/chunk-T7KODHYS.js +0 -317
  443. package/chunk-TGVVE5BA.js +0 -3085
  444. package/chunk-TKLBBR7P.js +0 -779
  445. package/chunk-TZXPT53C.js +0 -8
  446. package/chunk-U67V476Y.js +0 -35
  447. package/chunk-UEILX4EV.js +0 -15
  448. package/chunk-VIWDGTDA.js +0 -8
  449. package/chunk-VXUQWCEZ.js +0 -138
  450. package/chunk-W5GKF5ZW.js +0 -32
  451. package/chunk-WDWZPASX.js +0 -29
  452. package/chunk-WX266G2C.js +0 -9594
  453. package/chunk-YCITCYSJ.js +0 -356
  454. package/chunk-Z3KTXWWB.js +0 -76
  455. package/chunk-ZC3CMUKU.js +0 -322
  456. package/chunk-ZSZBHRLP.js +0 -1710
  457. package/chunk-ZV7ZY46L.js +0 -1343
  458. package/cliAgentConfigHelpers-WB2S7PDO.js +0 -47
  459. package/cliAuthorityBrokerClient-3SKOA7OZ.js +0 -23
  460. package/cliAuthorityBrokerProcess-BMBVXPKU.js +0 -24
  461. package/cliAuthorityStoreDriver-6FE3BJNB.js +0 -20
  462. package/cliEnvHelpers-7V5ZWUJA.js +0 -34
  463. package/cliExecutor-N3445G2Z.js +0 -45
  464. package/cliLocalAgentRecordReader-QKKRK53P.js +0 -113
  465. package/cloudAutomationCommands-S52NKCLL.js +0 -310
  466. package/contentThunks-ERA42OXW.js +0 -100
  467. package/cooldownCommands-ZFDAL4MR.js +0 -79
  468. package/createAgentAutomationAction-DMD2VDPI.js +0 -173
  469. package/createDialogAction-3SPOJQAK.js +0 -87
  470. package/createPageAction-AVXUMZVT.js +0 -91
  471. package/cursorProvider-2RACMEMF.js +0 -6123
  472. package/db-LTHLW7QA.js +0 -178
  473. package/dbSlice-WNUHTF4C.js +0 -76
  474. package/deleteDbKey-KV6MYBAI.js +0 -87
  475. package/desktopFolderProjects-4POAMVJN.js +0 -45
  476. package/dialogCommands-4MOLJW4G.js +0 -165
  477. package/dialogMessageRecord-2HJTEXQX.js +0 -7
  478. package/dialogNotifyCommand-YL2GFKLO.js +0 -45
  479. package/dialogSlice-Q7H2YVNO.js +0 -200
  480. package/dialogUsageCommand-IO2BQKL2.js +0 -31
  481. package/docCreateCommands-OYLRBK2M.js +0 -255
  482. package/docDeleteCommands-3NF6QPJU.js +0 -226
  483. package/docReadCommands-CBAERJAP.js +0 -184
  484. package/docStore-GWPFDV6Y.js +0 -89
  485. package/docUpdateCommands-BAMCGX6F.js +0 -326
  486. package/ebookDownloaderAgentCommand-NOIZ6U7Y.js +0 -675
  487. package/fetchMessages-P7FSCSXV.js +0 -19
  488. package/getPricing-KNXVEIUI.js +0 -40
  489. package/hostCredentialCreate-2VEYBXJV.js +0 -402
  490. package/i18n-SAK6DDY4.js +0 -51
  491. package/keys-FXEGMKSG.js +0 -183
  492. package/legacyMigration-TF4SYJCZ.js +0 -19
  493. package/levelAuthorityStore-L5SVDM5O.js +0 -10
  494. package/localAutomationCommands-XSK7SM7I.js +0 -199
  495. package/localAutomationRuntime-5WBO7HGQ.js +0 -61
  496. package/localRecall-BDYKXB46.js +0 -17
  497. package/localRuntimeAdapter-Y6H6XRIH.js +0 -310
  498. package/localRuntimeAuthority-Q5C2KWGF.js +0 -45
  499. package/localRuntimeDb-MM3DINZM.js +0 -12
  500. package/machineInfo-HNPJHQFU.js +0 -14
  501. package/machineWsRunDispatch-Y5SJGCEE.js +0 -228
  502. package/models-TOXYINNM.js +0 -10
  503. package/oauthTokenStore-RUYNYALS.js +0 -24
  504. package/overlay-JA3SPVUS.js +0 -15
  505. package/parityCommands-5OCBPVES.js +0 -613
  506. package/processSpawn-6GEO77KV.js +0 -11
  507. package/profileConfig-KOWK4HOG.js +0 -49
  508. package/projectArchive-WE3VVPZ2.js +0 -132
  509. package/providerPresetApply-YCVSP2WX.js +0 -235
  510. package/providerRegistry-26PAUYH2.js +0 -24
  511. package/read-D4WYJQJQ.js +0 -32
  512. package/readDocTool-3S3OQFOH.js +0 -22
  513. package/rememberExplicit-ZPI6KK5M.js +0 -16
  514. package/remove-AHRMUDMH.js +0 -32
  515. package/removeDialogAgentAction-AALRBFSA.js +0 -81
  516. package/secretCommands-2PSS3QNZ.js +0 -24
  517. package/setDialogExtraReferencesAction-SLHQ3GYL.js +0 -39
  518. package/setPrimaryDialogAgentAction-XKCSGJ7M.js +0 -96
  519. package/skillDiscovery-IUEZZG2B.js +0 -29
  520. package/skillSummaryMarker-62UW7HI7.js +0 -9
  521. package/slateToRenderMarkdown-R3X74MCX.js +0 -7
  522. package/slateUtils-ESQAJ6RN.js +0 -19
  523. package/store-WSAVTR32.js +0 -50
  524. package/switchDialogAgentAction-YJIWQGIR.js +0 -70
  525. package/tombstones-FQQMEDOW.js +0 -32
  526. package/toolApiClient-FVXTIIEN.js +0 -42
  527. package/tools-WN4AVSNS.js +0 -147
  528. package/tuiRestart-LU2BDLAW.js +0 -50
  529. package/tuiSummaryLlmCaller-Z2ZVBIGN.js +0 -53
  530. package/updateCommands-4QP7WJLA.js +0 -63
  531. package/usageCommand-AZX7D3LB.js +0 -31
  532. package/usageRebuildCommand-XV5QQCHK.js +0 -623
  533. package/userDataMerge-HT2ZVHBJ.js +0 -13
  534. package/windowsSelfUpdate-5OFKSW6Y.js +0 -14
  535. package/workContext-ZAW6VXT7.js +0 -18
  536. package/workContextAccess-VU5I4LKZ.js +0 -11
  537. package/workContextWriteNotice-YCSSMHN4.js +0 -7
  538. /package/{chunk-BYXBJQAS.js → chunk-0bcc25vg.js} +0 -0
@@ -1,86 +1,76 @@
1
1
  import {
2
- addContentToSpace
3
- } from "./chunk-TGVVE5BA.js";
2
+ isDevelopment,
3
+ selectIdentityUserId,
4
+ emitUserDataUpdated,
5
+ read2,
6
+ readAndWait2,
7
+ write2,
8
+ upsertSSREntity2,
9
+ removeCachedEntity2,
10
+ prepareAndPersistMessage,
11
+ addContentToSpace2
12
+ } from "./chunk-c235kypv.js";
4
13
  import {
5
- prepareAndPersistMessage
6
- } from "./chunk-DBCWXGOC.js";
14
+ createDialogKey2,
15
+ dialogMessageRange2
16
+ } from "./chunk-mzadqnyq.js";
17
+ import {
18
+ createMemoryKey2,
19
+ memoryOwnerRange2,
20
+ memorySubjectKindRange2
21
+ } from "./chunk-6yarwtxh.js";
7
22
  import {
8
23
  formatLocalDate,
9
24
  formatLocalIso
10
- } from "./chunk-PL5RKESU.js";
11
- import {
12
- read,
13
- readAndWait,
14
- removeCachedEntity,
15
- upsertSSREntity,
16
- write
17
- } from "./chunk-6NYQHXMV.js";
18
- import {
19
- emitUserDataUpdated
20
- } from "./chunk-T7KODHYS.js";
21
- import {
22
- selectIdentityUserId
23
- } from "./chunk-HI5RS2O4.js";
24
- import {
25
- isDevelopment
26
- } from "./chunk-K7HLFORE.js";
25
+ } from "./chunk-82htft2m.js";
27
26
  import {
28
27
  extractCustomId
29
- } from "./chunk-M2EJHDJP.js";
28
+ } from "./chunk-srncrd3f.js";
30
29
  import {
31
30
  isRecord
32
- } from "./chunk-KUG52IAP.js";
33
- import {
34
- createMemoryKey,
35
- memoryOwnerRange,
36
- memorySubjectKindRange
37
- } from "./chunk-DLXL4NSL.js";
31
+ } from "./chunk-ws402twv.js";
38
32
  import {
39
- createDialogKey,
40
- dialogMessageRange
41
- } from "./chunk-OJKUU3LP.js";
33
+ asOptionalPositiveFiniteNumber
34
+ } from "./chunk-96jtrqk1.js";
42
35
  import {
43
36
  asTrimmedString
44
- } from "./chunk-3EUW3WEO.js";
45
- import {
46
- asOptionalPositiveFiniteNumber
47
- } from "./chunk-U6VC4MU4.js";
37
+ } from "./chunk-wfvvnmmj.js";
48
38
  import {
49
39
  asOptionalTrimmedString
50
- } from "./chunk-G3SUCT4W.js";
40
+ } from "./chunk-p1vg4bx8.js";
51
41
 
52
42
  // packages/ai/tools/uiAskChoiceTool.ts
53
43
  var uiAskChoiceFunctionSchema = {
54
44
  name: "ask_user",
55
- description: "\u8BA9\u7528\u6237\u5728\u4E00\u7EC4\u9009\u9879\u4E4B\u95F4\u505A\u9009\u62E9\uFF08\u5355\u9009\u6216\u591A\u9009\uFF09\u7684\u901A\u7528\u201C\u51FA\u9009\u9879\u201D\u5DE5\u5177\uFF08\u9700\u6C42\u6A21\u7CCA\u3001\u5206\u652F\u51B3\u7B56\u3001\u95EE\u5377\u7B49\uFF09\u3002\u672C\u5DE5\u5177\u7528\u4E8E\u7EAF\u63D0\u95EE\u3001\u7B49\u5F85\u7528\u6237\u56DE\u7B54\u7684\u573A\u666F\uFF08blocking:false \u65F6\u4E0D\u6682\u505C\u7B49\u5F85\uFF09\uFF1B\u82E5\u9700\u8981\u540C\u65F6\u5C55\u793A\u7ED3\u6784\u5316\u5BF9\u6BD4/\u6307\u6807\u5E76\u8BA9\u7528\u6237\u5728\u540C\u4E00\u5757\u91CC\u9009\u62E9\uFF0C\u8D70 show_interaction\u3002\u8C03\u7528\u524D\u987B\u5148\u5728\u666E\u901A\u56DE\u590D\u6587\u672C\u91CC\u89E3\u91CA\u80CC\u666F\u4E0E\u6743\u8861\uFF08\u5148\u89E3\u91CA\uFF0C\u518D\u8C03\u7528\uFF09\u3002\u591A\u95EE\u9898\u4F20 questions\uFF0C\u5355\u95EE\u9898\u4F20 question+choices\u3002\u754C\u9762\u9ED8\u8BA4\u63D0\u4F9B\u201C\u5176\u4ED6\u201D\u81EA\u7531\u8F93\u5165\u884C\uFF08allowOther:false \u53EF\u5173\uFF09\uFF0C\u7528\u6237\u8F93\u5165\u968F\u7B54\u6848\u56DE\u4F20\uFF1B\u4E0D\u8981\u81EA\u5EFA\u201C\u5176\u4ED6/\u81EA\u5DF1\u5199\u201D\u4E4B\u7C7B\u7684\u9009\u9879\u2014\u2014\u70B9\u666E\u901A\u9009\u9879\u53EA\u56DE\u4F20\u8BE5\u9009\u9879\u6587\u6848\uFF0C\u7528\u6237\u65E0\u5904\u586B\u5199\u3002",
45
+ description: "让用户在一组选项之间做选择(单选或多选)的通用“出选项”工具(需求模糊、分支决策、问卷等)。本工具用于纯提问、等待用户回答的场景(blocking:false 时不暂停等待);若需要同时展示结构化对比/指标并让用户在同一块里选择,走 show_interaction。调用前须先在普通回复文本里解释背景与权衡(先解释,再调用)。多问题传 questions,单问题传 question+choices。界面默认提供“其他”自由输入行(allowOther:false 可关),用户输入随答案回传;不要自建“其他/自己写”之类的选项——点普通选项只回传该选项文案,用户无处填写。",
56
46
  parameters: {
57
47
  type: "object",
58
48
  properties: {
59
49
  question: {
60
50
  type: "string",
61
- description: "\u5C55\u793A\u7ED9\u7528\u6237\u7684\u95EE\u9898\u6587\u6848\uFF08\u5355\u95EE\u9898\u6A21\u5F0F\uFF09\u3002\u4E0E questions \u4E8C\u9009\u4E00\u3002"
51
+ description: "展示给用户的问题文案(单问题模式)。与 questions 二选一。"
62
52
  },
63
53
  choices: {
64
54
  type: "array",
65
- description: "\u5907\u9009\u9879\u5217\u8868\uFF0C\u6E32\u67D3\u4E3A\u6309\u94AE\u4F9B\u7528\u6237\u70B9\u51FB\u3002",
55
+ description: "备选项列表,渲染为按钮供用户点击。",
66
56
  items: {
67
57
  type: "object",
68
58
  properties: {
69
59
  id: {
70
60
  type: "string",
71
- description: "\u9009\u9879\u6807\u8BC6\u3002"
61
+ description: "选项标识。"
72
62
  },
73
63
  label: {
74
64
  type: "string",
75
- description: "\u6309\u94AE\u6587\u5B57\uFF0C\u5982\u201C\u751F\u6210\u672C\u5468\u5468\u62A5\u201D\u3002"
65
+ description: "按钮文字,如“生成本周周报”。"
76
66
  },
77
67
  detail: {
78
68
  type: "string",
79
- description: "\u7B80\u77ED\u8865\u5145\uFF08\u5EFA\u8BAE\u4E00\u53E5\u8BDD\uFF09\uFF0C\u957F\u89E3\u91CA\u5199\u8FDB\u8C03\u7528\u524D\u7684\u56DE\u590D\u6587\u672C\u3002"
69
+ description: "简短补充(建议一句话),长解释写进调用前的回复文本。"
80
70
  },
81
71
  userMessage: {
82
72
  type: "string",
83
- description: "\u70B9\u51FB\u540E\u4F5C\u4E3A\u4E0B\u4E00\u6761 user \u6D88\u606F\u53D1\u9001\u7684\u6587\u6848\uFF08\u7559\u7A7A\u9ED8\u8BA4\u7528 label\uFF09\u3002"
73
+ description: "点击后作为下一条 user 消息发送的文案(留空默认用 label)。"
84
74
  }
85
75
  },
86
76
  required: ["id", "label"]
@@ -88,25 +78,25 @@ var uiAskChoiceFunctionSchema = {
88
78
  },
89
79
  questions: {
90
80
  type: "array",
91
- description: "\u591A\u95EE\u9898\u6A21\u5F0F\uFF08\u591A tab \u6E32\u67D3\uFF0C\u4E0E question+choices \u4E8C\u9009\u4E00\uFF09\u3002",
81
+ description: "多问题模式(多 tab 渲染,与 question+choices 二选一)。",
92
82
  items: {
93
83
  type: "object",
94
84
  properties: {
95
85
  id: {
96
86
  type: "string",
97
- description: "\u95EE\u9898\u6807\u8BC6\u3002"
87
+ description: "问题标识。"
98
88
  },
99
89
  header: {
100
90
  type: "string",
101
- description: "\u591A\u95EE\u9898 tab \u680F\u663E\u793A\u7684\u77ED\u6807\u7B7E\uFF08\u226412 \u5B57\u7B26\uFF0C\u5982\u201C\u683C\u5F0F/\u8BED\u8A00/\u8303\u56F4\u201D\uFF09\uFF0C\u7F3A\u7701\u7528 Qn\u3002"
91
+ description: "多问题 tab 栏显示的短标签(≤12 字符,如“格式/语言/范围”),缺省用 Qn。"
102
92
  },
103
93
  question: {
104
94
  type: "string",
105
- description: "\u95EE\u9898\u6587\u6848\u3002"
95
+ description: "问题文案。"
106
96
  },
107
97
  choices: {
108
98
  type: "array",
109
- description: "\u8BE5\u95EE\u9898\u7684\u5907\u9009\u9879\u3002",
99
+ description: "该问题的备选项。",
110
100
  items: {
111
101
  type: "object",
112
102
  properties: {
@@ -114,7 +104,7 @@ var uiAskChoiceFunctionSchema = {
114
104
  label: { type: "string" },
115
105
  detail: {
116
106
  type: "string",
117
- description: "\u7B80\u77ED\u8865\u5145\uFF08\u5EFA\u8BAE\u4E00\u53E5\u8BDD\uFF09\uFF0C\u957F\u89E3\u91CA\u5199\u8FDB\u8C03\u7528\u524D\u7684\u56DE\u590D\u6587\u672C\u3002"
107
+ description: "简短补充(建议一句话),长解释写进调用前的回复文本。"
118
108
  },
119
109
  userMessage: { type: "string" }
120
110
  },
@@ -123,15 +113,15 @@ var uiAskChoiceFunctionSchema = {
123
113
  },
124
114
  multiSelect: {
125
115
  type: "boolean",
126
- description: "\u5141\u8BB8\u591A\u9009\uFF0C\u9ED8\u8BA4 false\u3002"
116
+ description: "允许多选,默认 false。"
127
117
  },
128
118
  allowOther: {
129
119
  type: "boolean",
130
- description: "\u663E\u793A\u201C\u5176\u4ED6\u201D\u81EA\u7531\u8F93\u5165\u884C\uFF0C\u9ED8\u8BA4 true\u3002"
120
+ description: "显示“其他”自由输入行,默认 true。"
131
121
  },
132
122
  required: {
133
123
  type: "boolean",
134
- description: "\u662F\u5426\u5FC5\u987B\u56DE\u7B54\u624D\u80FD\u63D0\u4EA4\uFF0C\u9ED8\u8BA4 true\u3002"
124
+ description: "是否必须回答才能提交,默认 true。"
135
125
  }
136
126
  },
137
127
  required: ["id", "question", "choices"]
@@ -139,94 +129,98 @@ var uiAskChoiceFunctionSchema = {
139
129
  },
140
130
  blocking: {
141
131
  type: "boolean",
142
- description: "\u662F\u5426\u7B49\u5F85\u7528\u6237\u9009\u62E9\u540E\u518D\u7EE7\u7EED\u6D41\u7A0B\uFF0C\u9ED8\u8BA4 true\u3002"
132
+ description: "是否等待用户选择后再继续流程,默认 true。"
143
133
  }
144
134
  },
145
135
  required: []
146
136
  }
147
137
  };
148
138
  function validateChoiceList(choices, scopeLabel) {
149
- const seenChoiceIds = /* @__PURE__ */ new Set();
150
- for (let index = 0; index < choices.length; index += 1) {
139
+ const seenChoiceIds = new Set;
140
+ for (let index = 0;index < choices.length; index += 1) {
151
141
  const entry = choices[index];
152
142
  if (!entry || typeof entry !== "object" || Array.isArray(entry)) {
153
- return `${scopeLabel}.choices[${index}] \u5FC5\u987B\u662F\u5BF9\u8C61\u3002`;
143
+ return `${scopeLabel}.choices[${index}] 必须是对象。`;
154
144
  }
155
145
  const choice = entry;
156
146
  if (typeof choice.label !== "string" || !choice.label.trim()) {
157
- return `${scopeLabel}.choices[${index}].label \u5FC5\u987B\u662F\u975E\u7A7A\u5B57\u7B26\u4E32\u3002`;
147
+ return `${scopeLabel}.choices[${index}].label 必须是非空字符串。`;
158
148
  }
159
- if (choice.id !== void 0 && typeof choice.id !== "string") {
160
- return `${scopeLabel}.choices[${index}].id \u5FC5\u987B\u662F\u5B57\u7B26\u4E32\u3002`;
149
+ if (choice.id !== undefined && typeof choice.id !== "string") {
150
+ return `${scopeLabel}.choices[${index}].id 必须是字符串。`;
161
151
  }
162
152
  const choiceId = typeof choice.id === "string" ? choice.id.trim() : "";
163
153
  if (choiceId && seenChoiceIds.has(choiceId)) {
164
- return `${scopeLabel} \u5185\u7684\u9009\u9879 id "${choiceId}" \u91CD\u590D\u3002`;
154
+ return `${scopeLabel} 内的选项 id "${choiceId}" 重复。`;
165
155
  }
166
- if (choiceId) seenChoiceIds.add(choiceId);
156
+ if (choiceId)
157
+ seenChoiceIds.add(choiceId);
167
158
  }
168
159
  return null;
169
160
  }
170
161
  function validateAskChoiceInput(raw) {
171
162
  if (!raw || typeof raw !== "object" || Array.isArray(raw)) {
172
- return "ask_user \u9700\u8981\u4E00\u4E2A\u5BF9\u8C61\u53C2\u6570\u3002";
163
+ return "ask_user 需要一个对象参数。";
173
164
  }
174
165
  const args = raw;
175
- if (args.blocking !== void 0 && typeof args.blocking !== "boolean") {
176
- return "ask_user \u7684 blocking \u5FC5\u987B\u662F\u5E03\u5C14\u503C\u3002";
166
+ if (args.blocking !== undefined && typeof args.blocking !== "boolean") {
167
+ return "ask_user 的 blocking 必须是布尔值。";
177
168
  }
178
169
  const rawQuestions = args.questions;
179
- if (rawQuestions !== void 0 && !Array.isArray(rawQuestions)) {
180
- return "ask_user \u7684 questions \u5FC5\u987B\u662F\u6570\u7EC4\u3002";
170
+ if (rawQuestions !== undefined && !Array.isArray(rawQuestions)) {
171
+ return "ask_user 的 questions 必须是数组。";
181
172
  }
182
173
  const questions = rawQuestions;
183
174
  if (questions && questions.length > 0) {
184
- const seenQuestionIds = /* @__PURE__ */ new Set();
185
- for (let index = 0; index < questions.length; index += 1) {
175
+ const seenQuestionIds = new Set;
176
+ for (let index = 0;index < questions.length; index += 1) {
186
177
  const entry = questions[index];
187
178
  if (!entry || typeof entry !== "object" || Array.isArray(entry)) {
188
- return `questions[${index}] \u5FC5\u987B\u662F\u5BF9\u8C61\u3002`;
179
+ return `questions[${index}] 必须是对象。`;
189
180
  }
190
181
  const question = entry;
191
- if (question.id !== void 0 && typeof question.id !== "string") {
192
- return `questions[${index}].id \u5FC5\u987B\u662F\u5B57\u7B26\u4E32\u3002`;
182
+ if (question.id !== undefined && typeof question.id !== "string") {
183
+ return `questions[${index}].id 必须是字符串。`;
193
184
  }
194
185
  const questionId = typeof question.id === "string" ? question.id.trim() : "";
195
186
  if (questionId && seenQuestionIds.has(questionId)) {
196
- return `\u95EE\u9898 id "${questionId}" \u91CD\u590D\u3002`;
187
+ return `问题 id "${questionId}" 重复。`;
197
188
  }
198
- if (questionId) seenQuestionIds.add(questionId);
189
+ if (questionId)
190
+ seenQuestionIds.add(questionId);
199
191
  if (typeof question.question !== "string" || !question.question.trim()) {
200
- return `questions[${index}].question \u5FC5\u987B\u662F\u975E\u7A7A\u5B57\u7B26\u4E32\u3002`;
192
+ return `questions[${index}].question 必须是非空字符串。`;
201
193
  }
202
194
  for (const flag of ["multiSelect", "allowOther", "required"]) {
203
- if (question[flag] !== void 0 && typeof question[flag] !== "boolean") {
204
- return `questions[${index}].${flag} \u5FC5\u987B\u662F\u5E03\u5C14\u503C\u3002`;
195
+ if (question[flag] !== undefined && typeof question[flag] !== "boolean") {
196
+ return `questions[${index}].${flag} 必须是布尔值。`;
205
197
  }
206
198
  }
207
199
  const choices = question.choices;
208
200
  if (!Array.isArray(choices)) {
209
- return `questions[${index}].choices \u5FC5\u987B\u662F\u6570\u7EC4\u3002`;
201
+ return `questions[${index}].choices 必须是数组。`;
210
202
  }
211
203
  const choiceError = validateChoiceList(choices, `questions[${index}]`);
212
- if (choiceError) return choiceError;
204
+ if (choiceError)
205
+ return choiceError;
213
206
  if (choices.length === 0 && question.allowOther === false) {
214
- return `questions[${index}] \u6CA1\u6709\u4EFB\u4F55\u9009\u9879\u4E14 allowOther \u4E3A false\uFF0C\u7528\u6237\u65E0\u6CD5\u4F5C\u7B54\u3002`;
207
+ return `questions[${index}] 没有任何选项且 allowOther 为 false,用户无法作答。`;
215
208
  }
216
209
  }
217
210
  return null;
218
211
  }
219
212
  if (typeof args.question !== "string" || !args.question.trim()) {
220
- return "ask_user \u9700\u8981 question\uFF08\u975E\u7A7A\u5B57\u7B26\u4E32\uFF09\u4E0E choices\u3002";
213
+ return "ask_user 需要 question(非空字符串)与 choices。";
221
214
  }
222
215
  if (!Array.isArray(args.choices) || args.choices.length === 0) {
223
- return "ask_user \u9700\u8981 question\uFF08\u975E\u7A7A\u5B57\u7B26\u4E32\uFF09\u4E0E choices\u3002";
216
+ return "ask_user 需要 question(非空字符串)与 choices。";
224
217
  }
225
218
  return validateChoiceList(args.choices, "ask_user");
226
219
  }
227
220
  async function uiAskChoiceFunc(args, _thunkApi) {
228
221
  const invalid = validateAskChoiceInput(args);
229
- if (invalid) throw new Error(invalid);
222
+ if (invalid)
223
+ throw new Error(invalid);
230
224
  const blocking = args?.blocking !== false;
231
225
  if (Array.isArray(args?.questions) && args.questions.length > 0) {
232
226
  const firstQ = args.questions[0];
@@ -244,7 +238,7 @@ async function uiAskChoiceFunc(args, _thunkApi) {
244
238
  const question = String(args?.question ?? "").trim();
245
239
  const choices = Array.isArray(args?.choices) ? args.choices : [];
246
240
  if (!question || choices.length === 0) {
247
- throw new Error("ask_user \u9700\u8981 question+choices \u6216 questions\u3002");
241
+ throw new Error("ask_user 需要 question+choices 或 questions。");
248
242
  }
249
243
  return {
250
244
  rawData: {
@@ -264,8 +258,10 @@ function parseUiAskChoiceContent(rawContent) {
264
258
  return null;
265
259
  }
266
260
  })() : rawContent;
267
- if (!parsed || typeof parsed !== "object") return null;
268
- if (parsed.type !== "ask_user") return null;
261
+ if (!parsed || typeof parsed !== "object")
262
+ return null;
263
+ if (parsed.type !== "ask_user")
264
+ return null;
269
265
  return parsed;
270
266
  }
271
267
 
@@ -306,67 +302,71 @@ function buildMemorySubjectsForAgent(input) {
306
302
 
307
303
  // packages/ai/memory/recentRelationshipRecap.ts
308
304
  var MIN_RECAP_LENGTH = 12;
309
- var MIN_RECAP_GAP_MS = 30 * 60 * 1e3;
305
+ var MIN_RECAP_GAP_MS = 30 * 60 * 1000;
310
306
  var shouldUseRecentRelationshipRecap = (input) => {
311
- if (!input.userId || !input.agentKey) return false;
307
+ if (!input.userId || !input.agentKey)
308
+ return false;
312
309
  if (!resolveAgentMemoryPolicy({ agentKey: input.agentKey }).allowDynamicGreetingMemory) {
313
310
  return false;
314
311
  }
315
- if ((input.agentsCount ?? 0) !== 1) return false;
316
- if (input.inheritFromDialogKey) return false;
317
- if (input.skipGreeting) return false;
318
- if (input.triggerType && input.triggerType !== "user") return false;
312
+ if ((input.agentsCount ?? 0) !== 1)
313
+ return false;
314
+ if (input.inheritFromDialogKey)
315
+ return false;
316
+ if (input.skipGreeting)
317
+ return false;
318
+ if (input.triggerType && input.triggerType !== "user")
319
+ return false;
319
320
  return true;
320
321
  };
321
322
  var CONTINUATION_CUE_PATTERNS = [
322
- "\u8FD8\u6CA1",
323
- "\u8FD8\u5728",
324
- "\u7EE7\u7EED",
325
- "\u63A5\u7740",
326
- "\u4E0B\u4E00\u6B65",
327
- "\u540E\u9762",
328
- "\u4E4B\u540E",
329
- "\u6253\u7B97",
330
- "\u51C6\u5907",
331
- "\u60F3",
332
- "\u7EA0\u7ED3",
333
- "\u5361\u4F4F",
334
- "\u6CA1\u60F3\u597D",
335
- "\u4E0D\u786E\u5B9A",
336
- "\u5982\u4F55",
337
- "\u600E\u4E48",
323
+ "还没",
324
+ "还在",
325
+ "继续",
326
+ "接着",
327
+ "下一步",
328
+ "后面",
329
+ "之后",
330
+ "打算",
331
+ "准备",
332
+ "想",
333
+ "纠结",
334
+ "卡住",
335
+ "没想好",
336
+ "不确定",
337
+ "如何",
338
+ "怎么",
338
339
  "?",
339
- "\uFF1F"
340
+ "?"
340
341
  ];
341
- var clip = (text, max = 140) => text.length <= max ? text : `${text.slice(0, max - 1).trimEnd()}\u2026`;
342
+ var clip = (text, max = 140) => text.length <= max ? text : `${text.slice(0, max - 1).trimEnd()}…`;
342
343
  var normalizeText = (value) => asTrimmedString(value);
343
344
  var contentToText = (content) => {
344
- if (typeof content === "string") return content.trim();
345
+ if (typeof content === "string")
346
+ return content.trim();
345
347
  if (Array.isArray(content)) {
346
- return content.map(
347
- (part) => part && typeof part === "object" && "text" in part ? normalizeText(part.text) : ""
348
- ).filter(Boolean).join("\n").trim();
348
+ return content.map((part) => part && typeof part === "object" && ("text" in part) ? normalizeText(part.text) : "").filter(Boolean).join(`
349
+ `).trim();
349
350
  }
350
351
  return "";
351
352
  };
352
353
  var toTimestamp = (record) => {
353
- return asOptionalPositiveFiniteNumber(
354
- Date.parse(normalizeText(record.updatedAt))
355
- ) ?? asOptionalPositiveFiniteNumber(
356
- Date.parse(normalizeText(record.createdAt))
357
- ) ?? 0;
354
+ return asOptionalPositiveFiniteNumber(Date.parse(normalizeText(record.updatedAt))) ?? asOptionalPositiveFiniteNumber(Date.parse(normalizeText(record.createdAt))) ?? 0;
358
355
  };
359
356
  var chooseRecapText = (record) => {
360
357
  const summary = normalizeText(record.summary);
361
- if (isMeaningfulRecapText(summary)) return clip(summary, 160);
358
+ if (isMeaningfulRecapText(summary))
359
+ return clip(summary, 160);
362
360
  const title = normalizeText(record.title);
363
- if (isMeaningfulRecapText(title)) return clip(title, 80);
361
+ if (isMeaningfulRecapText(title))
362
+ return clip(title, 80);
364
363
  return "";
365
364
  };
366
365
  var loadLastAssistantMessageText = async (db, dialogKey) => {
367
366
  const dialogId = extractCustomId(dialogKey);
368
- if (!dialogId) return "";
369
- const range = dialogMessageRange(dialogId);
367
+ if (!dialogId)
368
+ return "";
369
+ const range = dialogMessageRange2(dialogId);
370
370
  let iterator = db.iterator({
371
371
  gte: range.start,
372
372
  lte: range.end,
@@ -378,26 +378,34 @@ var loadLastAssistantMessageText = async (db, dialogKey) => {
378
378
  for await (const [, value] of iterator) {
379
379
  const message = value ?? {};
380
380
  const role = normalizeText(message.role ?? message.authorRole);
381
- if (role !== "assistant") continue;
381
+ if (role !== "assistant")
382
+ continue;
382
383
  const text = contentToText(message.content);
383
- if (isMeaningfulRecapText(text)) return clip(text, 160);
384
+ if (isMeaningfulRecapText(text))
385
+ return clip(text, 160);
384
386
  }
385
387
  return "";
386
388
  };
387
389
  var isLikelyTimestampTitle = (text) => /^\d{1,2}-\d{1,2}\s+\d{1,2}:\d{2}$/.test(text);
388
390
  var isMeaningfulRecapText = (text) => {
389
391
  const normalized = normalizeText(text);
390
- if (!normalized) return false;
391
- if (normalized.length < MIN_RECAP_LENGTH) return false;
392
- if (isLikelyTimestampTitle(normalized)) return false;
393
- if (/^(继续|新对话|测试|test|hello|hi)$/i.test(normalized)) return false;
392
+ if (!normalized)
393
+ return false;
394
+ if (normalized.length < MIN_RECAP_LENGTH)
395
+ return false;
396
+ if (isLikelyTimestampTitle(normalized))
397
+ return false;
398
+ if (/^(继续|新对话|测试|test|hello|hi)$/i.test(normalized))
399
+ return false;
394
400
  return true;
395
401
  };
396
402
  var resolveRecentRelationshipRecap = async (input) => {
397
403
  const { db, userId, agentKey, currentSpaceId, limit = 40 } = input;
398
- if (!db) return { recap: null, reason: "no-db" };
399
- if (!userId || !agentKey) return { recap: null, reason: "missing-input" };
400
- const range = createDialogKey.rangeOfUser(userId);
404
+ if (!db)
405
+ return { recap: null, reason: "no-db" };
406
+ if (!userId || !agentKey)
407
+ return { recap: null, reason: "missing-input" };
408
+ const range = createDialogKey2.rangeOfUser(userId);
401
409
  const matches = [];
402
410
  let scanned = 0;
403
411
  let iterator = db.iterator({
@@ -412,17 +420,21 @@ var resolveRecentRelationshipRecap = async (input) => {
412
420
  scanned += 1;
413
421
  const record = value ?? {};
414
422
  if (!Array.isArray(record.cybots) || !record.cybots.includes(agentKey)) {
415
- if (scanned >= limit && matches.length > 0) break;
423
+ if (scanned >= limit && matches.length > 0)
424
+ break;
416
425
  continue;
417
426
  }
418
427
  matches.push(record);
419
- if (matches.length >= limit) break;
428
+ if (matches.length >= limit)
429
+ break;
420
430
  }
421
- if (matches.length === 0) return { recap: null, reason: "no-match" };
431
+ if (matches.length === 0)
432
+ return { recap: null, reason: "no-match" };
422
433
  const sorted = [...matches].sort((a, b) => {
423
434
  const aSameSpace = currentSpaceId && a.spaceId === currentSpaceId ? 1 : 0;
424
435
  const bSameSpace = currentSpaceId && b.spaceId === currentSpaceId ? 1 : 0;
425
- if (aSameSpace !== bSameSpace) return bSameSpace - aSameSpace;
436
+ if (aSameSpace !== bSameSpace)
437
+ return bSameSpace - aSameSpace;
426
438
  return toTimestamp(b) - toTimestamp(a);
427
439
  });
428
440
  let sawTooRecent = false;
@@ -444,34 +456,37 @@ var resolveRecentRelationshipRecap = async (input) => {
444
456
  return {
445
457
  recap,
446
458
  reason: "selected",
447
- sourceDialogKey: normalizeText(record.dbKey) || void 0,
448
- sourceUpdatedAt: normalizeText(record.updatedAt) || void 0
459
+ sourceDialogKey: normalizeText(record.dbKey) || undefined,
460
+ sourceUpdatedAt: normalizeText(record.updatedAt) || undefined
449
461
  };
450
462
  }
451
463
  sawLowQuality = true;
452
464
  }
453
- if (sawTooRecent) return { recap: null, reason: "too-recent" };
454
- if (sawLowQuality) return { recap: null, reason: "low-quality" };
465
+ if (sawTooRecent)
466
+ return { recap: null, reason: "too-recent" };
467
+ if (sawLowQuality)
468
+ return { recap: null, reason: "low-quality" };
455
469
  return { recap: null, reason: "no-match" };
456
470
  };
457
471
  var mergeGreetingWithRelationshipRecap = (input) => {
458
472
  const greetingText = normalizeText(input.greetingText);
459
473
  const recentRecap = normalizeText(input.recentRecap);
460
- if (!greetingText && !recentRecap) return null;
461
- if (!recentRecap) return greetingText || null;
462
- const continuationLike = CONTINUATION_CUE_PATTERNS.some(
463
- (pattern) => recentRecap.includes(pattern)
464
- );
465
- if (!continuationLike) return greetingText || null;
474
+ if (!greetingText && !recentRecap)
475
+ return null;
476
+ if (!recentRecap)
477
+ return greetingText || null;
478
+ const continuationLike = CONTINUATION_CUE_PATTERNS.some((pattern) => recentRecap.includes(pattern));
479
+ if (!continuationLike)
480
+ return greetingText || null;
466
481
  if (!greetingText) {
467
- return `\u6211\u8BB0\u5F97\u4F60\u4E0A\u6B21\u5728\u804A\uFF1A${recentRecap}
482
+ return `我记得你上次在聊:${recentRecap}
468
483
 
469
- \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`;
484
+ 如果你还想接着那个点继续,我们可以从那里往下走;如果想换个方向也可以。`;
470
485
  }
471
486
  return `${greetingText}
472
487
 
473
- \u6211\u8BB0\u5F97\u4F60\u4E0A\u6B21\u5728\u804A\uFF1A${recentRecap}
474
- \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`;
488
+ 我记得你上次在聊:${recentRecap}
489
+ 如果你还想接着那个点继续,我们可以从那里往下走;如果想换个方向也可以。`;
475
490
  };
476
491
 
477
492
  // packages/ai/memory/queryShared.ts
@@ -486,7 +501,7 @@ var chooseMemoryOwners = (input) => {
486
501
  return owners;
487
502
  };
488
503
  var loadOwnerItemsFromDb = async (db, owner, limit) => {
489
- const range = memoryOwnerRange(owner.ownerType, owner.ownerId);
504
+ const range = memoryOwnerRange2(owner.ownerType, owner.ownerId);
490
505
  const refs = [];
491
506
  for await (const [, value] of db.iterator({
492
507
  gte: range.start,
@@ -494,17 +509,14 @@ var loadOwnerItemsFromDb = async (db, owner, limit) => {
494
509
  reverse: true
495
510
  })) {
496
511
  refs.push(value ?? {});
497
- if (refs.length >= limit) break;
512
+ if (refs.length >= limit)
513
+ break;
498
514
  }
499
- const items = await Promise.all(
500
- refs.map(
501
- (ref) => typeof ref?.memoryId === "string" ? db.get(createMemoryKey(owner.ownerType, owner.ownerId, ref.memoryId)).catch(() => null) : Promise.resolve(null)
502
- )
503
- );
515
+ const items = await Promise.all(refs.map((ref) => typeof ref?.memoryId === "string" ? db.get(createMemoryKey2(owner.ownerType, owner.ownerId, ref.memoryId)).catch(() => null) : Promise.resolve(null)));
504
516
  return items.filter((item) => !!item);
505
517
  };
506
518
  var loadSubjectKindItemsFromDb = async (db, subject, kind, limit) => {
507
- const range = memorySubjectKindRange(subject.subjectType, subject.subjectId, kind);
519
+ const range = memorySubjectKindRange2(subject.subjectType, subject.subjectId, kind);
508
520
  const refs = [];
509
521
  for await (const [, value] of db.iterator({
510
522
  gte: range.start,
@@ -512,13 +524,10 @@ var loadSubjectKindItemsFromDb = async (db, subject, kind, limit) => {
512
524
  reverse: true
513
525
  })) {
514
526
  refs.push(value ?? {});
515
- if (refs.length >= limit) break;
527
+ if (refs.length >= limit)
528
+ break;
516
529
  }
517
- const items = await Promise.all(
518
- refs.map(
519
- (ref) => typeof ref?.memoryKey === "string" ? db.get(ref.memoryKey).catch(() => null) : Promise.resolve(null)
520
- )
521
- );
530
+ const items = await Promise.all(refs.map((ref) => typeof ref?.memoryKey === "string" ? db.get(ref.memoryKey).catch(() => null) : Promise.resolve(null)));
522
531
  return items.filter((item) => !!item);
523
532
  };
524
533
  var loadMemoryCandidatesFromDb = async (db, input) => {
@@ -526,52 +535,36 @@ var loadMemoryCandidatesFromDb = async (db, input) => {
526
535
  const ownerLimit = input.ownerLimit ?? 12;
527
536
  const ownerFallback = input.ownerFallback ?? "onSubjectMiss";
528
537
  const reserve = Math.max(0, input.corroboratedProceduralReserve ?? 0);
529
- const ownerKeySet = new Set(
530
- input.owners.filter((owner) => owner.ownerId).map((owner) => `${owner.ownerType}:${owner.ownerId}`)
531
- );
532
- const subjects = input.subjects.filter(
533
- (subject) => !!subject.subjectId
534
- );
535
- const subjectResults = subjects.length > 0 ? await Promise.all(
536
- subjects.flatMap(
537
- (subject) => kinds.map(
538
- (kind) => loadSubjectKindItemsFromDb(db, subject, kind, ownerLimit)
539
- )
540
- )
541
- ) : [];
538
+ const ownerKeySet = new Set(input.owners.filter((owner) => owner.ownerId).map((owner) => `${owner.ownerType}:${owner.ownerId}`));
539
+ const subjects = input.subjects.filter((subject) => !!subject.subjectId);
540
+ const subjectResults = subjects.length > 0 ? await Promise.all(subjects.flatMap((subject) => kinds.map((kind) => loadSubjectKindItemsFromDb(db, subject, kind, ownerLimit)))) : [];
542
541
  const subjectHitCount = subjectResults.reduce((sum, items) => sum + items.length, 0);
543
542
  const shouldLoadOwnerFallback = ownerFallback !== "never" && (subjects.length === 0 || subjectHitCount === 0 || ownerFallback === "always");
544
- const results = shouldLoadOwnerFallback ? await Promise.all(
545
- [
546
- ...subjectResults,
547
- ...input.owners.map((owner) => loadOwnerItemsFromDb(db, owner, ownerLimit))
548
- ]
549
- ) : subjectResults;
543
+ const results = shouldLoadOwnerFallback ? await Promise.all([
544
+ ...subjectResults,
545
+ ...input.owners.map((owner) => loadOwnerItemsFromDb(db, owner, ownerLimit))
546
+ ]) : subjectResults;
550
547
  if (reserve > 0 && kinds.includes("procedural")) {
551
548
  const probeLimit = ownerLimit * 2;
552
- const reserveResults = await Promise.all(
553
- subjects.map(
554
- (subject) => loadSubjectKindItemsFromDb(db, subject, "procedural", probeLimit)
555
- )
556
- );
549
+ const reserveResults = await Promise.all(subjects.map((subject) => loadSubjectKindItemsFromDb(db, subject, "procedural", probeLimit)));
557
550
  const corroborated = reserveResults.flat().filter((item) => item && item.recurrenceEvidence).sort((a, b) => b.createdAt.localeCompare(a.createdAt)).slice(0, reserve);
558
551
  for (const item of corroborated) {
559
552
  results.push([item]);
560
553
  }
561
554
  }
562
555
  const kindSet = new Set(kinds);
563
- const seen = /* @__PURE__ */ new Set();
556
+ const seen = new Set;
564
557
  const merged = [];
565
558
  for (const items of results) {
566
559
  for (const item of items) {
567
- if (seen.has(item.id)) continue;
568
- if (!kindSet.has(item.kind)) continue;
560
+ if (seen.has(item.id))
561
+ continue;
562
+ if (!kindSet.has(item.kind))
563
+ continue;
569
564
  if (ownerKeySet.size > 0 && !ownerKeySet.has(`${item.ownerType}:${item.ownerId}`)) {
570
565
  continue;
571
566
  }
572
- if (!shouldLoadOwnerFallback && subjects.length > 0 && !subjects.some(
573
- (subject) => subject.subjectType === item.subjectType && subject.subjectId === item.subjectId
574
- )) {
567
+ if (!shouldLoadOwnerFallback && subjects.length > 0 && !subjects.some((subject) => subject.subjectType === item.subjectType && subject.subjectId === item.subjectId)) {
575
568
  continue;
576
569
  }
577
570
  seen.add(item.id);
@@ -607,7 +600,8 @@ var isUnderstandingItem = (item) => Array.isArray(item.tags) && item.tags.includ
607
600
  var GREETING_MIN_CONFIDENCE = 0.75;
608
601
  var isGreetingEligible = (item) => item.kind === "semantic" && (item.confidence ?? 0) >= GREETING_MIN_CONFIDENCE;
609
602
  var sortByKindAndTime = (left, right) => {
610
- if (left.kind !== right.kind) return left.kind === "semantic" ? -1 : 1;
603
+ if (left.kind !== right.kind)
604
+ return left.kind === "semantic" ? -1 : 1;
611
605
  return toTimestamp2(right) - toTimestamp2(left);
612
606
  };
613
607
  var sameNormalizedContent = (left, right) => normalizeText2(left).toLowerCase() === normalizeText2(right).toLowerCase();
@@ -615,8 +609,10 @@ var pickAnchorItems = (items) => {
615
609
  const ranked = [...items].filter((item) => item.facet ? anchorFacetPriority[item.facet] > 0 : false).sort((left, right) => {
616
610
  const leftFacet = left.facet ? anchorFacetPriority[left.facet] ?? 0 : 0;
617
611
  const rightFacet = right.facet ? anchorFacetPriority[right.facet] ?? 0 : 0;
618
- if (leftFacet !== rightFacet) return rightFacet - leftFacet;
619
- if (left.kind !== right.kind) return left.kind === "semantic" ? -1 : 1;
612
+ if (leftFacet !== rightFacet)
613
+ return rightFacet - leftFacet;
614
+ if (left.kind !== right.kind)
615
+ return left.kind === "semantic" ? -1 : 1;
620
616
  if (left.content.length !== right.content.length) {
621
617
  return left.content.length - right.content.length;
622
618
  }
@@ -624,20 +620,20 @@ var pickAnchorItems = (items) => {
624
620
  });
625
621
  const selected = [];
626
622
  for (const item of ranked) {
627
- if (selected.some(
628
- (existing) => sameNormalizedContent(existing.content, item.content) || existing.facet && item.facet && existing.facet === item.facet
629
- )) {
623
+ if (selected.some((existing) => sameNormalizedContent(existing.content, item.content) || existing.facet && item.facet && existing.facet === item.facet)) {
630
624
  continue;
631
625
  }
632
626
  selected.push(item);
633
- if (selected.length >= 2) break;
627
+ if (selected.length >= 2)
628
+ break;
634
629
  }
635
630
  return selected;
636
631
  };
637
632
  var pickFollowUpItem = (items) => [...items].filter((item) => item.facet === "unfinished" || item.facet === "tension").sort((left, right) => {
638
633
  const leftFacet = left.facet ? facetPriority[left.facet] ?? 0 : 0;
639
634
  const rightFacet = right.facet ? facetPriority[right.facet] ?? 0 : 0;
640
- if (leftFacet !== rightFacet) return rightFacet - leftFacet;
635
+ if (leftFacet !== rightFacet)
636
+ return rightFacet - leftFacet;
641
637
  return sortByKindAndTime(left, right);
642
638
  })[0] ?? null;
643
639
  var resolveUnderstandingGreetingMemory = async (input) => {
@@ -653,21 +649,17 @@ var resolveUnderstandingGreetingMemory = async (input) => {
653
649
  subjects: [{ subjectType: "agent", subjectId: input.agentKey }],
654
650
  kinds: ["semantic", "episodic"],
655
651
  ownerLimit: 40,
656
- // Greeting memory must stay agent-scoped: a brand-new agent has zero
657
- // subject hits, and the owner fallback would surface user-level memories
658
- // from other agents/spaces as this agent's "memory".
659
652
  ownerFallback: "never"
660
653
  });
661
- const understandingItems = items.filter(
662
- (item2) => isUnderstandingItem(item2) && isGreetingEligible(item2)
663
- );
654
+ const understandingItems = items.filter((item) => isUnderstandingItem(item) && isGreetingEligible(item));
664
655
  if (understandingItems.length === 0) {
665
656
  return { item: null, anchorItems: [], followUpItem: null };
666
657
  }
667
658
  const ranked = [...understandingItems].sort((left, right) => {
668
659
  const leftFacet = left.facet ? facetPriority[left.facet] ?? 0 : 0;
669
660
  const rightFacet = right.facet ? facetPriority[right.facet] ?? 0 : 0;
670
- if (leftFacet !== rightFacet) return rightFacet - leftFacet;
661
+ if (leftFacet !== rightFacet)
662
+ return rightFacet - leftFacet;
671
663
  return sortByKindAndTime(left, right);
672
664
  });
673
665
  const anchorItems = pickAnchorItems(understandingItems);
@@ -683,104 +675,110 @@ var renderLeadClause = (item) => {
683
675
  const content = normalizeText2(item.content);
684
676
  switch (item.facet) {
685
677
  case "unfinished":
686
- return `\u6211\u8BB0\u5F97\u4F60\u4E0A\u6B21\u8FD8\u6CA1\u5B9A\u4E0B\u6765\uFF1A${stripPrefix(content, "\u8FD8\u6CA1\u51B3\u5B9A")}`;
678
+ return `我记得你上次还没定下来:${stripPrefix(content, "还没决定")}`;
687
679
  case "tension":
688
- return `\u6211\u8BB0\u5F97\u4F60\u4E0A\u6B21\u8FD8\u5728\u6743\u8861${stripPrefix(content, "\u5728\u6743\u8861")}`;
680
+ return `我记得你上次还在权衡${stripPrefix(content, "在权衡")}`;
689
681
  case "style":
690
682
  case "preference":
691
- return `\u6211\u8BB0\u5F97\u4F60\u4E0A\u6B21${content}`;
683
+ return `我记得你上次${content}`;
692
684
  case "goal":
693
- return `\u6211\u8BB0\u5F97\u4F60\u4E0A\u6B21\u60F3\u63A8\u8FDB\u7684\u662F${content}`;
685
+ return `我记得你上次想推进的是${content}`;
694
686
  default:
695
- return `\u6211\u8BB0\u5F97\u4F60\u4E0A\u6B21\u63D0\u8FC7${content}`;
687
+ return `我记得你上次提过${content}`;
696
688
  }
697
689
  };
698
690
  var renderAnchorFragment = (item) => {
699
691
  const content = normalizeText2(item.content);
700
692
  switch (item.facet) {
701
693
  case "preference":
702
- if (content.startsWith("\u66F4\u5728\u610F")) {
703
- return `\u66F4\u5728\u610F\u7684\u662F${stripPrefix(content, "\u66F4\u5728\u610F")}`;
694
+ if (content.startsWith("更在意")) {
695
+ return `更在意的是${stripPrefix(content, "更在意")}`;
704
696
  }
705
- if (content.startsWith("\u66F4\u5173\u5FC3")) {
706
- return `\u66F4\u5173\u5FC3\u7684\u662F${stripPrefix(content, "\u66F4\u5173\u5FC3")}`;
697
+ if (content.startsWith("更关心")) {
698
+ return `更关心的是${stripPrefix(content, "更关心")}`;
707
699
  }
708
- if (content.startsWith("\u66F4\u6015")) {
709
- return `\u66F4\u6015${stripPrefix(content, "\u66F4\u6015")}`;
700
+ if (content.startsWith("更怕")) {
701
+ return `更怕${stripPrefix(content, "更怕")}`;
710
702
  }
711
- if (content.startsWith("\u4E0D\u60F3")) {
712
- return `\u4E0D\u60F3${stripPrefix(content, "\u4E0D\u60F3")}`;
703
+ if (content.startsWith("不想")) {
704
+ return `不想${stripPrefix(content, "不想")}`;
713
705
  }
714
- if (content.startsWith("\u4E0D\u5E0C\u671B")) {
715
- return `\u4E0D\u5E0C\u671B${stripPrefix(content, "\u4E0D\u5E0C\u671B")}`;
706
+ if (content.startsWith("不希望")) {
707
+ return `不希望${stripPrefix(content, "不希望")}`;
716
708
  }
717
709
  return content;
718
710
  case "style":
719
- if (content.startsWith("\u4E0D\u559C\u6B22")) {
720
- return `\u4E0D\u592A\u559C\u6B22${stripPrefix(content, "\u4E0D\u559C\u6B22")}`;
711
+ if (content.startsWith("不喜欢")) {
712
+ return `不太喜欢${stripPrefix(content, "不喜欢")}`;
721
713
  }
722
- if (content.startsWith("\u66F4\u559C\u6B22")) {
723
- return `\u66F4\u559C\u6B22${stripPrefix(content, "\u66F4\u559C\u6B22")}`;
714
+ if (content.startsWith("更喜欢")) {
715
+ return `更喜欢${stripPrefix(content, "更喜欢")}`;
724
716
  }
725
717
  return content;
726
718
  case "goal":
727
- if (content.startsWith("\u60F3\u5148")) {
728
- return `\u60F3\u5148${stripPrefix(content, "\u60F3\u5148")}`;
719
+ if (content.startsWith("想先")) {
720
+ return `想先${stripPrefix(content, "想先")}`;
729
721
  }
730
- return `\u60F3\u63A8\u8FDB\u7684\u662F${content}`;
722
+ return `想推进的是${content}`;
731
723
  default:
732
724
  return content;
733
725
  }
734
726
  };
735
727
  var renderAnchorSentence = (items) => {
736
- if (items.length === 0) return null;
728
+ if (items.length === 0)
729
+ return null;
737
730
  const fragments = items.map(renderAnchorFragment).map((fragment) => fragment.trim()).filter(Boolean);
738
- if (fragments.length === 0) return null;
731
+ if (fragments.length === 0)
732
+ return null;
739
733
  if (fragments.length === 1) {
740
- return `\u6211\u8BB0\u5F97\u4F60\u4E0A\u6B21${fragments[0]}\u3002`;
734
+ return `我记得你上次${fragments[0]}。`;
741
735
  }
742
- return `\u6211\u8BB0\u5F97\u4F60\u4E0A\u6B21${fragments[0]}\uFF0C\u4E5F${fragments[1]}\u3002`;
736
+ return `我记得你上次${fragments[0]},也${fragments[1]}。`;
743
737
  };
744
738
  var splitTradeoff = (value) => {
745
739
  const normalized = normalizeText2(value).replace(/^在权衡/u, "").replace(/^还没决定/u, "").replace(/^还不确定/u, "").replace(/^还没想好/u, "").trim();
746
- if (!normalized.includes("\u8FD8\u662F")) return null;
740
+ if (!normalized.includes("还是"))
741
+ return null;
747
742
  const [left, right] = normalized.split(/\s*还是/u, 2);
748
743
  const normalizedLeft = normalizeText2((left ?? "").replace(/[,,::]+$/u, "").trim());
749
744
  const normalizedRight = normalizeText2((right ?? "").trim());
750
- if (!normalizedLeft || !normalizedRight) return null;
745
+ if (!normalizedLeft || !normalizedRight)
746
+ return null;
751
747
  return [normalizedLeft, normalizedRight];
752
748
  };
753
749
  var renderFollowUpLine = (item) => {
754
750
  if (!item) {
755
- return "\u5982\u679C\u4F60\u60F3\uFF0C\u6211\u4EEC\u53EF\u4EE5\u63A5\u7740\u4E0A\u6B21\u90A3\u4E2A\u70B9\uFF1B\u5982\u679C\u4ECA\u5929\u662F\u65B0\u95EE\u9898\uFF0C\u4E5F\u76F4\u63A5\u8BF4\u3002";
751
+ return "如果你想,我们可以接着上次那个点;如果今天是新问题,也直接说。";
756
752
  }
757
753
  const tradeoff = splitTradeoff(item.content);
758
754
  if (tradeoff) {
759
- return `\u5982\u679C\u4F60\u613F\u610F\uFF0C\u6211\u4EEC\u53EF\u4EE5\u63A5\u7740\u770B\uFF1A${tradeoff[0]}\uFF0C\u8FD8\u662F${tradeoff[1]}\u3002\u5982\u679C\u4ECA\u5929\u662F\u65B0\u95EE\u9898\uFF0C\u4E5F\u76F4\u63A5\u8BF4\u3002`;
755
+ return `如果你愿意,我们可以接着看:${tradeoff[0]},还是${tradeoff[1]}。如果今天是新问题,也直接说。`;
760
756
  }
761
757
  const content = normalizeText2(item.content);
762
758
  switch (item.facet) {
763
759
  case "unfinished":
764
- return `\u5982\u679C\u4F60\u613F\u610F\uFF0C\u6211\u4EEC\u53EF\u4EE5\u63A5\u7740\u628A${stripPrefix(content, "\u8FD8\u6CA1\u51B3\u5B9A")}\u5B9A\u4E0B\u6765\uFF1B\u5982\u679C\u4ECA\u5929\u662F\u65B0\u95EE\u9898\uFF0C\u4E5F\u76F4\u63A5\u8BF4\u3002`;
760
+ return `如果你愿意,我们可以接着把${stripPrefix(content, "还没决定")}定下来;如果今天是新问题,也直接说。`;
765
761
  case "tension":
766
- return `\u5982\u679C\u4F60\u613F\u610F\uFF0C\u6211\u4EEC\u53EF\u4EE5\u63A5\u7740\u770B${stripPrefix(content, "\u5728\u6743\u8861")}\uFF1B\u5982\u679C\u4ECA\u5929\u662F\u65B0\u95EE\u9898\uFF0C\u4E5F\u76F4\u63A5\u8BF4\u3002`;
762
+ return `如果你愿意,我们可以接着看${stripPrefix(content, "在权衡")};如果今天是新问题,也直接说。`;
767
763
  case "goal":
768
- return `\u5982\u679C\u4F60\u613F\u610F\uFF0C\u6211\u4EEC\u53EF\u4EE5\u7EE7\u7EED\u63A8\u8FDB${stripPrefix(content, "\u60F3\u5148")}\uFF1B\u5982\u679C\u4ECA\u5929\u662F\u65B0\u95EE\u9898\uFF0C\u4E5F\u76F4\u63A5\u8BF4\u3002`;
764
+ return `如果你愿意,我们可以继续推进${stripPrefix(content, "想先")};如果今天是新问题,也直接说。`;
769
765
  default:
770
- return "\u5982\u679C\u4F60\u60F3\uFF0C\u6211\u4EEC\u53EF\u4EE5\u63A5\u7740\u4E0A\u6B21\u90A3\u4E2A\u70B9\uFF1B\u5982\u679C\u4ECA\u5929\u662F\u65B0\u95EE\u9898\uFF0C\u4E5F\u76F4\u63A5\u8BF4\u3002";
766
+ return "如果你想,我们可以接着上次那个点;如果今天是新问题,也直接说。";
771
767
  }
772
768
  };
773
769
  var mergeGreetingWithUnderstandingMemory = (input) => {
774
770
  const greetingText = asTrimmedString(input.greetingText);
775
771
  const resolution = input.resolution ?? null;
776
772
  const item = input.item ?? resolution?.item ?? null;
777
- if (!greetingText && !item) return null;
778
- if (!item) return greetingText || null;
773
+ if (!greetingText && !item)
774
+ return null;
775
+ if (!item)
776
+ return greetingText || null;
779
777
  const anchorItems = resolution?.anchorItems ?? [];
780
778
  const followUpItem = resolution?.followUpItem ?? item;
781
- const leadLine = renderAnchorSentence(anchorItems) ?? `${renderLeadClause(item)}\u3002`;
779
+ const leadLine = renderAnchorSentence(anchorItems) ?? `${renderLeadClause(item)}。`;
782
780
  const suffix = renderFollowUpLine(followUpItem);
783
- const memoryBlock = `\u6B22\u8FCE\u56DE\u6765\u3002${leadLine}
781
+ const memoryBlock = `欢迎回来。${leadLine}
784
782
  ${suffix}`;
785
783
  if (!greetingText) {
786
784
  return memoryBlock;
@@ -793,11 +791,14 @@ ${memoryBlock}`;
793
791
  // packages/chat/dialog/actions/createDialogAction.ts
794
792
  var LOCAL_OWNER_DIALOG_PREFIXES = ["agent-local-"];
795
793
  var isLocalOwnerDialogAgents = (cybots) => {
796
- if (!Array.isArray(cybots)) return false;
794
+ if (!Array.isArray(cybots))
795
+ return false;
797
796
  for (const agentKey of cybots) {
798
- if (typeof agentKey !== "string") continue;
797
+ if (typeof agentKey !== "string")
798
+ continue;
799
799
  for (const prefix of LOCAL_OWNER_DIALOG_PREFIXES) {
800
- if (agentKey.startsWith(prefix)) return true;
800
+ if (agentKey.startsWith(prefix))
801
+ return true;
801
802
  }
802
803
  }
803
804
  return false;
@@ -805,7 +806,7 @@ var isLocalOwnerDialogAgents = (cybots) => {
805
806
  var notifyUserDataUpdated = () => {
806
807
  emitUserDataUpdated();
807
808
  };
808
- var createDialogAction = async (args, thunkApi) => {
809
+ var createDialogAction2 = async (args, thunkApi) => {
809
810
  const {
810
811
  cybots: requestedCybots = [],
811
812
  agentMode: requestedAgentMode,
@@ -830,23 +831,21 @@ var createDialogAction = async (args, thunkApi) => {
830
831
  const isDeviceLocalDialog = isLocalOwnerDialogAgents(cybots);
831
832
  const userId = isDeviceLocalDialog ? "local" : currentUserId && currentUserId.trim().length > 0 ? currentUserId : "local";
832
833
  try {
833
- const { localFirstLog } = await import("./localFirstLog-OIETGK66.js");
834
+ const { localFirstLog } = await import("./chunk-7z8y4k6y.js");
834
835
  localFirstLog("dialog.create", {
835
836
  owner: userId,
836
837
  agentKey: typeof agentKey === "string" ? agentKey : "",
837
838
  isDeviceLocal: isDeviceLocalDialog,
838
839
  hasSpace: Boolean(args.spaceId)
839
840
  });
840
- } catch {
841
- }
841
+ } catch {}
842
842
  const readAgentConfig = async () => {
843
- if (!agentKey) return null;
844
- const existing = await dispatch(
845
- readAndWait({
846
- dbKey: agentKey,
847
- preferredServerOrigin
848
- })
849
- ).unwrap().catch(() => null);
843
+ if (!agentKey)
844
+ return null;
845
+ const existing = await dispatch(readAndWait2({
846
+ dbKey: agentKey,
847
+ preferredServerOrigin
848
+ })).unwrap().catch(() => null);
850
849
  return existing;
851
850
  };
852
851
  const canSkipAgentConfigRead = agentMode === "auto" || !!skipAgentConfigRead && !!args.skipGreeting && !!titleOverride;
@@ -873,9 +872,8 @@ var createDialogAction = async (args, thunkApi) => {
873
872
  userId,
874
873
  agentKey,
875
874
  currentSpaceId: explicitSpaceId
876
- }).catch(() => ({ recap: null, reason: "no-db", sourceDialogKey: void 0 })) : null;
877
- if (typeof window !== "undefined" && recentRelationshipRecapResolution && // 浏览器端没有 process:走 app/utils/env 的安全读法。
878
- isDevelopment) {
875
+ }).catch(() => ({ recap: null, reason: "no-db", sourceDialogKey: undefined })) : null;
876
+ if (typeof window !== "undefined" && recentRelationshipRecapResolution && isDevelopment) {
879
877
  console.debug("[dialog] recent relationship recap", {
880
878
  agentKey,
881
879
  userId,
@@ -884,29 +882,25 @@ var createDialogAction = async (args, thunkApi) => {
884
882
  preview: recentRelationshipRecapResolution.recap ?? null
885
883
  });
886
884
  }
887
- const time = formatLocalDate(/* @__PURE__ */ new Date(), "MM-dd HH:mm");
888
- const title = titleOverride || (agentMode === "auto" ? "\u65B0\u5BF9\u8BDD" : agentConfig?.name || "Agent") + " " + time;
885
+ const time = formatLocalDate(new Date, "MM-dd HH:mm");
886
+ const title = titleOverride || (agentMode === "auto" ? "新对话" : agentConfig?.name || "Agent") + " " + time;
889
887
  const spaceId = explicitSpaceId;
890
- const dialogPath = createDialogKey(userId);
888
+ const dialogPath = createDialogKey2(userId);
891
889
  const dialogId = extractCustomId(dialogPath);
892
890
  let referenceKeys;
893
891
  let inheritedFromDialogKey;
894
892
  let inheritedFromDialogTitle;
895
893
  if (inheritFromDialogKey) {
896
894
  inheritedFromDialogKey = inheritFromDialogKey;
897
- const sourceDialog = await dispatch(
898
- read({
899
- dbKey: inheritFromDialogKey
900
- })
901
- ).unwrap();
895
+ const sourceDialog = await dispatch(read2({
896
+ dbKey: inheritFromDialogKey
897
+ })).unwrap();
902
898
  if (isRecord(sourceDialog)) {
903
899
  const sourceDbKey = sourceDialog.dbKey;
904
900
  if (typeof sourceDbKey === "string" && sourceDbKey.trim().length > 0) {
905
901
  inheritedFromDialogKey = sourceDbKey;
906
902
  }
907
- const sourceTitle = asOptionalTrimmedString(
908
- sourceDialog.title
909
- );
903
+ const sourceTitle = asOptionalTrimmedString(sourceDialog.title);
910
904
  if (sourceTitle) {
911
905
  inheritedFromDialogTitle = sourceTitle;
912
906
  }
@@ -920,7 +914,7 @@ var createDialogAction = async (args, thunkApi) => {
920
914
  ...args.runtimeBinding,
921
915
  runtimeAnchorDialogId: args.runtimeBinding.runtimeAnchorDialogId || dialogId,
922
916
  agentKey: args.runtimeBinding.agentKey || agentKey || ""
923
- } : void 0;
917
+ } : undefined;
924
918
  const dialogData = {
925
919
  id: dialogId,
926
920
  dbKey: dialogPath,
@@ -931,7 +925,7 @@ var createDialogAction = async (args, thunkApi) => {
931
925
  ...agentMode === "auto" && autoRoute ? { autoRoute } : {},
932
926
  title,
933
927
  type: "dialog" /* DIALOG */,
934
- createdAt: formatLocalIso(/* @__PURE__ */ new Date()),
928
+ createdAt: formatLocalIso(new Date),
935
929
  ...spaceId && { spaceId },
936
930
  category,
937
931
  referenceKeys,
@@ -957,42 +951,36 @@ var createDialogAction = async (args, thunkApi) => {
957
951
  dbKey: dialogPath,
958
952
  userId
959
953
  };
960
- dispatch(upsertSSREntity(optimisticDialogData));
954
+ dispatch(upsertSSREntity2(optimisticDialogData));
961
955
  notifyUserDataUpdated();
962
- void dispatch(
963
- write({
964
- data: { ...dialogData, userId },
965
- customKey: dialogPath,
966
- userId
967
- })
968
- ).unwrap().catch((error) => {
956
+ dispatch(write2({
957
+ data: { ...dialogData, userId },
958
+ customKey: dialogPath,
959
+ userId
960
+ })).unwrap().catch((error) => {
969
961
  console.error("[createDialogAction] optimistic dialog write failed", {
970
962
  dialogPath,
971
963
  error
972
964
  });
973
- dispatch(removeCachedEntity(dialogPath));
965
+ dispatch(removeCachedEntity2(dialogPath));
974
966
  notifyUserDataUpdated();
975
967
  });
976
968
  return optimisticDialogData;
977
969
  }
978
- const result = await dispatch(
979
- write({
980
- data: { ...dialogData, userId },
981
- customKey: dialogPath,
982
- userId
983
- })
984
- ).unwrap();
970
+ const result = await dispatch(write2({
971
+ data: { ...dialogData, userId },
972
+ customKey: dialogPath,
973
+ userId
974
+ })).unwrap();
985
975
  if (spaceId) {
986
- await dispatch(
987
- addContentToSpace({
988
- spaceId,
989
- contentKey: dialogPath,
990
- type: "dialog" /* DIALOG */,
991
- title,
992
- categoryId: category,
993
- ...triggerType && { triggerType }
994
- })
995
- );
976
+ await dispatch(addContentToSpace2({
977
+ spaceId,
978
+ contentKey: dialogPath,
979
+ type: "dialog" /* DIALOG */,
980
+ title,
981
+ categoryId: category,
982
+ ...triggerType && { triggerType }
983
+ }));
996
984
  }
997
985
  notifyUserDataUpdated();
998
986
  const rawGreeting = agentConfig?.greeting;
@@ -1011,66 +999,47 @@ var createDialogAction = async (args, thunkApi) => {
1011
999
  };
1012
1000
  const hasMenu = Array.isArray(effectiveCfg.menu) && effectiveCfg.menu.length > 0;
1013
1001
  if (hasMenu) {
1014
- const question = asOptionalTrimmedString(effectiveCfg.text) ?? "\u63A5\u4E0B\u6765\u4F60\u66F4\u5E0C\u671B\u6211\u5E2E\u4F60\u505A\u54EA\u4EF6\u4E8B\uFF1F";
1002
+ const question = asOptionalTrimmedString(effectiveCfg.text) ?? "接下来你更希望我帮你做哪件事?";
1015
1003
  const choices = effectiveCfg.menu.map((item, idx) => ({
1016
1004
  id: item.id || `choice_${idx + 1}`,
1017
1005
  label: item.label,
1018
1006
  userMessage: item.userMessage ?? item.label
1019
1007
  }));
1020
- const toolResult = await uiAskChoiceFunc(
1021
- {
1022
- question,
1023
- choices,
1024
- blocking: true
1008
+ const toolResult = await uiAskChoiceFunc({
1009
+ question,
1010
+ choices,
1011
+ blocking: true
1012
+ }, thunkApi);
1013
+ await dispatch(prepareAndPersistMessage({
1014
+ message: {
1015
+ role: "tool",
1016
+ toolName: uiAskChoiceFunctionSchema.name,
1017
+ cybotKey: agentKey,
1018
+ content: toolResult.rawData,
1019
+ displayData: toolResult.displayData
1025
1020
  },
1026
- thunkApi
1027
- );
1028
- await dispatch(
1029
- prepareAndPersistMessage({
1030
- message: {
1031
- role: "tool",
1032
- toolName: uiAskChoiceFunctionSchema.name,
1033
- cybotKey: agentKey,
1034
- content: toolResult.rawData,
1035
- displayData: toolResult.displayData
1036
- },
1037
- dialogConfig: {
1038
- id: dialogId,
1039
- dbKey: dialogPath,
1040
- userId
1041
- }
1042
- })
1043
- );
1021
+ dialogConfig: {
1022
+ id: dialogId,
1023
+ dbKey: dialogPath,
1024
+ userId
1025
+ }
1026
+ }));
1044
1027
  } else if (effectiveCfg.text) {
1045
- await dispatch(
1046
- prepareAndPersistMessage({
1047
- message: {
1048
- content: effectiveCfg.text,
1049
- role: "assistant",
1050
- cybotKey: agentKey
1051
- },
1052
- dialogConfig: {
1053
- id: dialogId,
1054
- dbKey: dialogPath,
1055
- userId
1056
- }
1057
- })
1058
- );
1028
+ await dispatch(prepareAndPersistMessage({
1029
+ message: {
1030
+ content: effectiveCfg.text,
1031
+ role: "assistant",
1032
+ cybotKey: agentKey
1033
+ },
1034
+ dialogConfig: {
1035
+ id: dialogId,
1036
+ dbKey: dialogPath,
1037
+ userId
1038
+ }
1039
+ }));
1059
1040
  }
1060
1041
  }
1061
1042
  return result;
1062
1043
  };
1063
1044
 
1064
- export {
1065
- uiAskChoiceFunctionSchema,
1066
- validateAskChoiceInput,
1067
- uiAskChoiceFunc,
1068
- parseUiAskChoiceContent,
1069
- resolveAgentMemoryPolicy,
1070
- buildMemorySubjectsForAgent,
1071
- chooseMemoryOwners,
1072
- loadOwnerItemsFromDb,
1073
- loadMemoryCandidatesFromDb,
1074
- isLocalOwnerDialogAgents,
1075
- createDialogAction
1076
- };
1045
+ export { uiAskChoiceFunctionSchema, validateAskChoiceInput, uiAskChoiceFunc, parseUiAskChoiceContent, resolveAgentMemoryPolicy, buildMemorySubjectsForAgent, chooseMemoryOwners, loadOwnerItemsFromDb, loadMemoryCandidatesFromDb, createDialogAction2 };