nolo-cli 0.212.0-alpha.1 → 0.222.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (263) hide show
  1. package/README.md +3 -2
  2. package/{_executeModel-KE6MBNUJ.js → _executeModel-4GGQQHOB.js} +111 -82
  3. package/{accountResolver-4LKIHEKL.js → accountResolver-EK2S4PWF.js} +6 -6
  4. package/{action-DF5UYSJF.js → action-CK64LS6S.js} +12 -11
  5. package/{addContentAction-N2YC5IL3.js → addContentAction-GDHDOF4U.js} +18 -17
  6. package/{addDialogAgentAction-3NKVQCEC.js → addDialogAgentAction-CAKRU3ZT.js} +21 -20
  7. package/{agentDeleteCommand-NWK7VU4N.js → agentDeleteCommand-BPV2XZL7.js} +128 -119
  8. package/{agentEmailCommands-UZ4DHEX2.js → agentEmailCommands-EJOS75YL.js} +132 -124
  9. package/{agentFavoriteCommands-EDK743YA.js → agentFavoriteCommands-2LKGKSUD.js} +7 -8
  10. package/{agentGrantCommands-RQWK2TEV.js → agentGrantCommands-QQV4N4JW.js} +5 -5
  11. package/{agentListCommands-HE7L2A6L.js → agentListCommands-HIZODBF3.js} +196 -124
  12. package/{agentMachineCommands-6TE4MBMP.js → agentMachineCommands-ZMQ2CY7Y.js} +62 -53
  13. package/{agentProviderCommands-Q5O33MED.js → agentProviderCommands-WKJOAWBP.js} +5 -5
  14. package/{agentPullCommand-6EM3URVK.js → agentPullCommand-XN6ZPBUW.js} +7 -7
  15. package/agentRecordCommands-OMXVDLDX.js +176 -0
  16. package/agentRunCommand-CB34YWMV.js +206 -0
  17. package/{agentRunControl-OI3LOENH.js → agentRunControl-JNONH3RP.js} +30 -15
  18. package/{agentRuntimeLocal-HL526DNQ.js → agentRuntimeLocal-QZPFWMLG.js} +52 -45
  19. package/{agentSlice-TMYP2UEA.js → agentSlice-RD2CDU7T.js} +20 -19
  20. package/{appDeleteCommands-ZERW4AXY.js → appDeleteCommands-QCCFDIEQ.js} +61 -52
  21. package/{appDeployCommands-DUWSMYHL.js → appDeployCommands-V2T7TNMQ.js} +61 -52
  22. package/{appDeployStatusCommands-N2KIE4BF.js → appDeployStatusCommands-6PGH7ZCG.js} +61 -52
  23. package/{appGetCommands-YVR4NPVY.js → appGetCommands-3L7WWJA6.js} +61 -52
  24. package/{appListCommands-JS6HOHZS.js → appListCommands-ENJCK4PO.js} +61 -52
  25. package/{authCommand-FE2C3ZUM.js → authCommand-6V47SYGK.js} +29 -28
  26. package/{authCommands-HV3EAU3V.js → authCommands-GAJ3NIXO.js} +14 -13
  27. package/{builtinSkillRegistry-3YOIGEF6.js → builtinSkillRegistry-2ECA42FC.js} +11 -13
  28. package/{chromeCommands-REEAH4SX.js → chromeCommands-G5UDKVSV.js} +3 -3
  29. package/{chromeOpsCommands-HEN5AX2J.js → chromeOpsCommands-YKX2QX3A.js} +20 -10
  30. package/{chunk-DM6UMOEL.js → chunk-27PCUMJI.js} +2 -2
  31. package/chunk-2CI3ZFWD.js +97 -0
  32. package/{chunk-HIRC32DV.js → chunk-2GJKRKI6.js} +543 -29
  33. package/{chunk-SM3NSZJV.js → chunk-2UCBGYO4.js} +20 -1
  34. package/{chunk-PYRUW7XN.js → chunk-2VUZSVAS.js} +136 -54
  35. package/chunk-2YGBI2XB.js +30 -0
  36. package/chunk-2ZKFCIJJ.js +13 -0
  37. package/{chunk-CJRONOYL.js → chunk-34J5K2YA.js} +19 -75
  38. package/{chunk-LOEO7LRC.js → chunk-3IK6ILVW.js} +4 -1
  39. package/{chunk-CTPXME7U.js → chunk-3LMUPOHG.js} +29 -6
  40. package/chunk-44X52WOJ.js +1621 -0
  41. package/{chunk-6VLJ6YA7.js → chunk-4DESLZTK.js} +9 -9
  42. package/{chunk-MYOH447Z.js → chunk-4JVNURX4.js} +1 -1
  43. package/chunk-5CHGAKRT.js +364 -0
  44. package/{chunk-YDH3FDFQ.js → chunk-5FUN7EG4.js} +1 -1
  45. package/{chunk-LKDF3ATR.js → chunk-5RKUPJYL.js} +1 -1
  46. package/{chunk-ZC3CMUKU.js → chunk-6OVNSQHN.js} +84 -2
  47. package/{chunk-IF45XG7K.js → chunk-6WU5572L.js} +40 -24
  48. package/{chunk-OHNELDTO.js → chunk-7EEZJ6BS.js} +11 -152
  49. package/{chunk-Y6ORVLSS.js → chunk-7ET2U67U.js} +1 -1
  50. package/{chunk-G7MLNNEX.js → chunk-7JLY4WYF.js} +5 -5
  51. package/{chunk-P5L7CXOC.js → chunk-7Z6EW7AH.js} +3 -2
  52. package/{chunk-IIQ6JGRI.js → chunk-AD5EWDFD.js} +2 -2
  53. package/{chunk-WXYLV624.js → chunk-AIHYNKGV.js} +4 -4
  54. package/{chunk-HPFCI4SK.js → chunk-AK5O76CC.js} +3 -3
  55. package/{chunk-Y63ZSOR6.js → chunk-AL3TYDIF.js} +1 -1
  56. package/{chunk-PJNFNEJE.js → chunk-AMEOV5VZ.js} +59 -13
  57. package/chunk-AN74ON4G.js +675 -0
  58. package/{chunk-HRMJUN5J.js → chunk-AQZ6BMRK.js} +1 -1
  59. package/{chunk-CQ46IRNN.js → chunk-B4GOW4MT.js} +445 -201
  60. package/{chunk-4KB6WQUL.js → chunk-BGP2EDFG.js} +1 -1
  61. package/{chunk-NBTY7YJF.js → chunk-BR3GT6MR.js} +1 -0
  62. package/{chunk-7RFNTILS.js → chunk-BUDVRYES.js} +2 -2
  63. package/{chunk-D2MDMY2M.js → chunk-BV3FLP2L.js} +47 -1
  64. package/{chunk-25JZEIXN.js → chunk-C4VAR65S.js} +92 -150
  65. package/{chunk-AVTVGMDY.js → chunk-C4WTX5TU.js} +2 -2
  66. package/{chunk-ZL5RAEEB.js → chunk-CIRB724Q.js} +1 -1
  67. package/{chunk-F6UUQOG6.js → chunk-CKT6QUE2.js} +4 -4
  68. package/{chunk-M6RL5JCD.js → chunk-CMZ3Z5PT.js} +14 -14
  69. package/{secretCommands-4QS3HCA2.js → chunk-D726I5AZ.js} +191 -16
  70. package/{chunk-INSBKSBB.js → chunk-DNKTQ3IN.js} +4 -4
  71. package/chunk-DVQH4BTR.js +1137 -0
  72. package/{chunk-SOHTHFV2.js → chunk-DWX2HEVC.js} +91 -132
  73. package/{chunk-NOMIGOST.js → chunk-EIAI3PPH.js} +116 -124
  74. package/chunk-EUCFKKDM.js +247 -0
  75. package/chunk-EWQ3HGNZ.js +90 -0
  76. package/{chunk-RPQXPZZF.js → chunk-F3GRJO4Z.js} +908 -13
  77. package/{chunk-GSQNH63I.js → chunk-FIYSMXHY.js} +3 -19
  78. package/{chunk-KSTEXKL6.js → chunk-FJ23FZXF.js} +76 -31
  79. package/{chunk-INN4LTAJ.js → chunk-FJK526XH.js} +2 -2
  80. package/chunk-FS2XP5D7.js +142 -0
  81. package/{chunk-QT6PKHYJ.js → chunk-FYF2TONJ.js} +5 -5
  82. package/{chunk-OXME3PEE.js → chunk-GBWGPTA7.js} +2 -1
  83. package/{chunk-RU4SD66C.js → chunk-GYVCJABP.js} +30 -254
  84. package/{chunk-YUXQAVRD.js → chunk-HOCHUZQ7.js} +257 -90
  85. package/{chunk-Y2WUYX4I.js → chunk-HXER7YJF.js} +4 -4
  86. package/chunk-HYIETXA6.js +99 -0
  87. package/{chunk-H2TJUNCH.js → chunk-I4EADJ4P.js} +6 -6
  88. package/{chunk-TCZHTTUU.js → chunk-I7WBYGBP.js} +8 -8
  89. package/{chunk-5RYBGBQH.js → chunk-IILMY4W4.js} +14 -9
  90. package/chunk-JA3ICVJY.js +271 -0
  91. package/{chunk-ZRSNONOB.js → chunk-JWXITTQB.js} +8 -3
  92. package/{chunk-JNKSDZFS.js → chunk-KEN3N2TN.js} +310 -66
  93. package/{chunk-LEC5ALIN.js → chunk-KEPOVMF4.js} +1 -1
  94. package/{chunk-UHJGXRJ4.js → chunk-KQSYAIZR.js} +3 -3
  95. package/{chunk-4VJAC32I.js → chunk-L5I543VB.js} +3 -2
  96. package/chunk-LKA64WH4.js +227 -0
  97. package/{chunk-6OQUPIQF.js → chunk-LVL6GFCM.js} +4 -4
  98. package/{chunk-UTV2AYEG.js → chunk-MAIITKBT.js} +2 -2
  99. package/chunk-MBG66ZBH.js +226 -0
  100. package/{chunk-YUA6OAH5.js → chunk-MDLS23JK.js} +2 -2
  101. package/{chunk-VL5KOY2C.js → chunk-MK2Q7ZJD.js} +67 -5
  102. package/{chunk-B7NJ3T4A.js → chunk-MS4NZNKI.js} +10 -10
  103. package/{chunk-3AKFVZ2I.js → chunk-MYHNBEXD.js} +3 -3
  104. package/{chunk-VZKUKCA6.js → chunk-MZLE5HQ3.js} +3673 -241
  105. package/{chunk-AZMYUSVF.js → chunk-N5Z2V73W.js} +1 -1
  106. package/chunk-NIZ2BXFD.js +526 -0
  107. package/{chunk-YPD3VJZW.js → chunk-NWP2OYOX.js} +20 -20
  108. package/{chunk-3FOQHGHN.js → chunk-O6J3OTOP.js} +4 -4
  109. package/{chunk-3RQVYR4B.js → chunk-OB6DVWPF.js} +197 -65
  110. package/{chunk-YWSEPJ7C.js → chunk-OBWT45ZU.js} +3 -3
  111. package/{chunk-5AQR3DGV.js → chunk-ODJ7BVSI.js} +80 -11
  112. package/{chunk-XJWWBO34.js → chunk-OJKUU3LP.js} +5 -7
  113. package/{chunk-GNDJKC4B.js → chunk-ON37YXGX.js} +29 -29
  114. package/{chunk-D5RCRX4A.js → chunk-P5ZJRTCH.js} +9415 -5169
  115. package/{chunk-6XIE5ZGI.js → chunk-PDCV7P5W.js} +1 -1
  116. package/{chunk-EZFQ6XRV.js → chunk-PJCIP64Z.js} +861 -59
  117. package/{chunk-GPO7FCEZ.js → chunk-PJVKMGPZ.js} +1222 -1719
  118. package/{chunk-CKAHAVMK.js → chunk-PPJYZRSQ.js} +40 -26
  119. package/chunk-QHEN7NZ7.js +46 -0
  120. package/{chunk-4KH4J3G5.js → chunk-QNWG52I4.js} +19 -7
  121. package/{chunk-YGILMZ7N.js → chunk-QVBXJNZ2.js} +1 -1
  122. package/chunk-RDH5CQ4T.js +1382 -0
  123. package/{chunk-C6KNNXWU.js → chunk-RGQ4UUWZ.js} +25 -2
  124. package/{chunk-OWYYDMGJ.js → chunk-S2NTVGA2.js} +4 -2
  125. package/{chunk-KC4XDTT3.js → chunk-SOF4OWDM.js} +6 -4
  126. package/{chunk-IAPCBNEE.js → chunk-SQYIK6HO.js} +1 -1
  127. package/{chunk-22CIEBYO.js → chunk-SVT62ULE.js} +50 -48
  128. package/{chunk-KIM6CLW5.js → chunk-SY3C4SQ7.js} +42 -15
  129. package/{chunk-JY5NGFFH.js → chunk-SYTHYBMI.js} +5 -5
  130. package/{chunk-6NSSLV67.js → chunk-T6DXNI6Z.js} +52 -50
  131. package/chunk-TLE77UJ5.js +230 -0
  132. package/{chunk-4VNS5WPM.js → chunk-U67V476Y.js} +1 -8
  133. package/{chunk-F7CI2ZC5.js → chunk-UAIHKQIA.js} +2 -1
  134. package/{chunk-MMNYUVLW.js → chunk-UB3D4TRQ.js} +11 -77
  135. package/{chunk-WPORQFYN.js → chunk-UVLYNWIE.js} +2 -2
  136. package/{chunk-YOIW77S2.js → chunk-UYOICCYG.js} +29 -19
  137. package/{chunk-4I7ERB7F.js → chunk-VREDDN25.js} +1 -1
  138. package/{chunk-JIT6FSXJ.js → chunk-WAE3GFCJ.js} +3 -3
  139. package/{chunk-IJXYFTV7.js → chunk-WI67URFP.js} +20 -20
  140. package/{chunk-7OCO4TDT.js → chunk-WJVYAO6P.js} +1 -1
  141. package/{chunk-T43B7LB2.js → chunk-WKGQSYTB.js} +1 -1
  142. package/{chunk-YJMRHHGY.js → chunk-WUUH4LWZ.js} +60 -30
  143. package/{chunk-PDGKOTO7.js → chunk-X7UF53VA.js} +33 -22
  144. package/{chunk-TY3TIUJK.js → chunk-XI2BWJM5.js} +65 -0
  145. package/{chunk-OOF4UPC5.js → chunk-XWVCYUUU.js} +16 -159
  146. package/{chunk-J5JTMQIA.js → chunk-YFLVRVYK.js} +1 -1
  147. package/{chunk-EYLGAEB4.js → chunk-YGMBIXCF.js} +132 -0
  148. package/chunk-YL3EFYL3.js +199 -0
  149. package/{chunk-MMA3LZ3W.js → chunk-YNIYE47Z.js} +1 -1
  150. package/{chunk-W4S457LU.js → chunk-YU4ZPWVF.js} +41 -5
  151. package/{chunk-NJR3WKVP.js → chunk-YWWDC3O7.js} +281 -159
  152. package/chunk-YZMNK53S.js +68 -0
  153. package/{chunk-FHU44LN3.js → chunk-Z2PITYZN.js} +2179 -552
  154. package/{chunk-FY7F4Q6X.js → chunk-Z4PCXPUE.js} +2 -2
  155. package/{cliAgentConfigHelpers-WJBZQTLW.js → cliAgentConfigHelpers-TKYL43MT.js} +15 -16
  156. package/{cliAuthorityBrokerClient-PM3U6Q6J.js → cliAuthorityBrokerClient-XHH7MH2P.js} +1 -1
  157. package/{cliAuthorityStoreDriver-TKLXNNTG.js → cliAuthorityStoreDriver-6FE3BJNB.js} +1 -1
  158. package/{cliEnvHelpers-BVYTMUPJ.js → cliEnvHelpers-VPSJ4XWC.js} +3 -3
  159. package/{cliExecutor-BWBF2MTI.js → cliExecutor-4MAX3PZL.js} +2 -2
  160. package/cliLocalAgentRecordReader-MHHD4T7R.js +90 -0
  161. package/{commandRegistry-VVMTPFAX.js → commandRegistry-5DA5UP7S.js} +106 -98
  162. package/{contentThunks-N52O67MI.js → contentThunks-5GUQ7FWJ.js} +47 -43
  163. package/{cooldownCommands-YXLWOXWR.js → cooldownCommands-X7P5M2V5.js} +5 -4
  164. package/{createAgentAutomationAction-ZC57YRSV.js → createAgentAutomationAction-UCLTHQRI.js} +51 -49
  165. package/{createDialogAction-VQW5WDYX.js → createDialogAction-UPN774AF.js} +46 -48
  166. package/{createPageAction-M5VDA7SC.js → createPageAction-JRQ2TA4O.js} +50 -48
  167. package/{cursorProvider-YGGNMVWX.js → cursorProvider-2RACMEMF.js} +1 -1
  168. package/{db-HUCI5R4G.js → db-CS4ZJQKV.js} +1 -1
  169. package/{dbSlice-HP7G4LX3.js → dbSlice-WNON7TOL.js} +17 -16
  170. package/{deleteFile-7VQGLK2V.js → deleteFile-Q3YDB4ML.js} +9 -9
  171. package/{desktopFolderProjects-SFY5EZS3.js → desktopFolderProjects-4POAMVJN.js} +2 -2
  172. package/{dialogCommands-JHMR2N2Y.js → dialogCommands-VRI7VCXH.js} +64 -57
  173. package/dialogNotifyCommand-6TMCX4D2.js +36 -0
  174. package/{dialogSlice-GRSVGDTF.js → dialogSlice-LFNVUSAN.js} +42 -40
  175. package/{dialogUsageCommand-7KCPYGHG.js → dialogUsageCommand-HTVPR2CX.js} +11 -10
  176. package/{docCreateCommands-F2K3UPSQ.js → docCreateCommands-AMPXMOX3.js} +61 -54
  177. package/{docDeleteCommands-XGXB5RFT.js → docDeleteCommands-I5WFAEHP.js} +63 -57
  178. package/{docReadCommands-7HWZZV6J.js → docReadCommands-X53ELNIE.js} +61 -54
  179. package/{docStore-KNZK6Y2G.js → docStore-2VAWVLWH.js} +21 -20
  180. package/{docUpdateCommands-OZZ7NQII.js → docUpdateCommands-6QPNDC7M.js} +64 -57
  181. package/{fetchMessages-M3QU7ZCQ.js → fetchMessages-TQEUZD7H.js} +8 -7
  182. package/{getPricing-2MNMXEVG.js → getPricing-MB2GBXOK.js} +6 -6
  183. package/{handleSendMessageAction-SHIH74GJ.js → handleSendMessageAction-AAJOHXOB.js} +193 -301
  184. package/{hostCredentialCreate-X64WK4JD.js → hostCredentialCreate-GLMJ22M6.js} +123 -114
  185. package/index.js +29 -29
  186. package/{keys-BEGDOTRL.js → keys-RWF7UCB4.js} +5 -4
  187. package/legacyMigration-TF4SYJCZ.js +19 -0
  188. package/{lib-5KKIBFIT.js → lib-OT5OTXRU.js} +7087 -6664
  189. package/{localDialogRead-XRLAH4CZ.js → localDialogRead-SVTPA5GY.js} +3 -3
  190. package/{localFirstLog-DHNOY2NA.js → localFirstLog-OIETGK66.js} +1 -1
  191. package/localRecall-2J6QPOK2.js +15 -0
  192. package/{localRuntimeAdapter-A7K3ABA6.js → localRuntimeAdapter-BMP57P42.js} +119 -110
  193. package/{localRuntimeAuthority-OYH4AE4G.js → localRuntimeAuthority-IBJAT62G.js} +1 -1
  194. package/{localRuntimeDb-VBIMCWUC.js → localRuntimeDb-N7KHDXS2.js} +2 -2
  195. package/{machineCommands-DE3MR7CJ.js → machineCommands-3MLIAK5Q.js} +128 -119
  196. package/{machineInfo-UKPTZO5Y.js → machineInfo-LWHTEBHJ.js} +1 -1
  197. package/machineWsRunDispatch-FKIGROQF.js +191 -0
  198. package/{memberThunks-7WJAY5V6.js → memberThunks-ZGLZ36PK.js} +29 -28
  199. package/{memoryCommands-ASCE5STX.js → memoryCommands-5WC3T66U.js} +4 -4
  200. package/models-ULVWLSQ6.js +9 -0
  201. package/{oauthTokenStore-OEERZFUC.js → oauthTokenStore-RUYNYALS.js} +1 -1
  202. package/{offlineMarxistsAgentCommand-2QTHJCHV.js → offlineMarxistsAgentCommand-4IC3Y4C6.js} +4 -4
  203. package/overlay-THLKYIWY.js +11 -0
  204. package/package.json +2 -2
  205. package/{pdf-U6KSUEZZ.js → pdf-KE3QI2V7.js} +1 -1
  206. package/{processSpawn-ZU5QFM43.js → processSpawn-6GEO77KV.js} +1 -1
  207. package/{profileConfig-KN3N2BLF.js → profileConfig-KOWK4HOG.js} +1 -1
  208. package/{projectArchive-GGL5HLMD.js → projectArchive-HK63GMF4.js} +52 -50
  209. package/{providerPresetApply-YXGV6NXB.js → providerPresetApply-OIFQ73LH.js} +19 -12
  210. package/{providerRegistry-S6UL6UNA.js → providerRegistry-KZ3SDZ3D.js} +10 -10
  211. package/{read-4VZQODSN.js → read-MRQHJMJ2.js} +10 -10
  212. package/{readDocTool-AVD32RUJ.js → readDocTool-4BGTXTXA.js} +2 -2
  213. package/{readlineWorkspace-XKYKNL2I.js → readlineWorkspace-AKAHSCNY.js} +6505 -4634
  214. package/{removeDialogAgentAction-FKL4BYMR.js → removeDialogAgentAction-B6H7DXFM.js} +23 -22
  215. package/{runAgentClientLoop-V7E2WBVM.js → runAgentClientLoop-UVAWGEON.js} +81 -79
  216. package/{runtimeDoctorCommands-QAI3MBKQ.js → runtimeDoctorCommands-FW6XKDUG.js} +12 -12
  217. package/{runtimeModeArgs-2Y7BALTO.js → runtimeModeArgs-X7DL7PUN.js} +1 -1
  218. package/secretCommands-LJXOOYA7.js +24 -0
  219. package/{setDialogExtraReferencesAction-TLIOLWWI.js → setDialogExtraReferencesAction-EVCY3TRW.js} +22 -21
  220. package/{setPrimaryDialogAgentAction-2OLWRFYR.js → setPrimaryDialogAgentAction-KPFVPHCJ.js} +23 -22
  221. package/{settingThunks-UGBPCNYF.js → settingThunks-ENOAK2WV.js} +97 -88
  222. package/{skillDiscovery-XKHROSH2.js → skillDiscovery-B5V23AXP.js} +4 -4
  223. package/{skillSummaryMarker-42HKSXYY.js → skillSummaryMarker-62UW7HI7.js} +1 -1
  224. package/{slateToRenderMarkdown-Y5IYN73U.js → slateToRenderMarkdown-R3X74MCX.js} +1 -1
  225. package/{slateUtils-NGV2NMKM.js → slateUtils-ESQAJ6RN.js} +1 -1
  226. package/{spaceCommands-4KSLKVNF.js → spaceCommands-DTTNAS2L.js} +61 -53
  227. package/store-JRVN62NM.js +46 -0
  228. package/{streamAgentChatTurn-7FR7X2NU.js → streamAgentChatTurn-R5UY25VB.js} +875 -618
  229. package/{switchDialogAgentAction-UZSAG2N5.js → switchDialogAgentAction-SZ44XDRY.js} +21 -20
  230. package/{tableCommands-MP6VFSVT.js → tableCommands-HITDSLHS.js} +10 -10
  231. package/tombstones-FQQMEDOW.js +32 -0
  232. package/{toolApiClient-HGNO53TC.js → toolApiClient-OGQEBQVX.js} +4 -4
  233. package/{tools-ZLKCC25W.js → tools-HWFG6GMJ.js} +75 -74
  234. package/tuiSummaryLlmCaller-HQQZAMYF.js +44 -0
  235. package/{updateCommands-4744PL3P.js → updateCommands-RJVCRSBP.js} +10 -8
  236. package/{updateDialogTitleAction-U53ZT7PJ.js → updateDialogTitleAction-KNPOAMVS.js} +48 -46
  237. package/{usageCommand-F4IPVMIZ.js → usageCommand-FWZCB7AM.js} +11 -10
  238. package/{usageRebuildCommand-HAW2AD5N.js → usageRebuildCommand-SP2BLNJU.js} +12 -11
  239. package/userDataMerge-HT2ZVHBJ.js +13 -0
  240. package/{windowsSelfUpdate-XSQVF2GK.js → windowsSelfUpdate-KERHIAB4.js} +3 -3
  241. package/{workloadLifecycle-4BEQHMSD.js → workloadLifecycle-DYNEYHV5.js} +7 -6
  242. package/agentRecordCommands-L3QQ7HZ4.js +0 -167
  243. package/agentRunCommand-2IFGQHCO.js +0 -196
  244. package/chunk-3CGG2PAL.js +0 -594
  245. package/chunk-5XBUWM6I.js +0 -89
  246. package/chunk-BFM34N54.js +0 -842
  247. package/chunk-CJEIOP3E.js +0 -0
  248. package/chunk-CZM5YTZ7.js +0 -977
  249. package/chunk-EYUBHHFB.js +0 -636
  250. package/chunk-JTDORD5P.js +0 -415
  251. package/chunk-NRFKLKRU.js +0 -339
  252. package/chunk-VPAZOH2D.js +0 -115
  253. package/chunk-WJZOQR2J.js +0 -151
  254. package/chunk-ZCWRMUWT.js +0 -89
  255. package/dist-M676ULYG.js +0 -7314
  256. package/machineWsRunDispatch-R26P5V36.js +0 -182
  257. package/models-PJBE6JDV.js +0 -9
  258. package/tuiSummaryLlmCaller-WC54MVGP.js +0 -160
  259. package/{chunk-WACI5I6V.js → chunk-2THCNKE4.js} +3 -3
  260. package/{chunk-2QHFH3DR.js → chunk-47ITIXO7.js} +6 -6
  261. package/{chunk-GOO6G4PY.js → chunk-CKG3PRZ7.js} +0 -0
  262. package/{chunk-OQHIVPG4.js → chunk-SNBZZPYH.js} +3 -3
  263. package/{chunk-AETZ7AD6.js → chunk-W6RFEDN4.js} +3 -3
@@ -3,29 +3,11 @@ import {
3
3
  } from "./chunk-KFHREHUQ.js";
4
4
  import {
5
5
  buildAgentDiscoveryResult,
6
+ deriveCredentialGroup,
6
7
  resolveDiscoveryScope,
7
8
  resolvePaginationArgs,
8
9
  toDiscoverySafeAgentSummary
9
- } from "./chunk-CJRONOYL.js";
10
- import {
11
- getUserDataItemTimestamp,
12
- mergeAndDedupUserData
13
- } from "./chunk-OXME3PEE.js";
14
- import {
15
- addMemberSpace,
16
- applyFetchSpaceFulfilled,
17
- fetchAuthoritativeRemoteSpace,
18
- getAllMemberSpaces,
19
- removeMemberSpace,
20
- selectSpaceRemoteAuth,
21
- setMembershipLoaded,
22
- setMembershipLoading,
23
- setMembershipRejected,
24
- updateMemberSpaceName
25
- } from "./chunk-OHNELDTO.js";
26
- import {
27
- markdownToSlate
28
- } from "./chunk-KSTEXKL6.js";
10
+ } from "./chunk-34J5K2YA.js";
29
11
  import {
30
12
  ToolResultError,
31
13
  clipMultilineText,
@@ -38,7 +20,7 @@ import {
38
20
  toolRunUpdated,
39
21
  uiCardFallback,
40
22
  waitForAbortableDelay
41
- } from "./chunk-GNDJKC4B.js";
23
+ } from "./chunk-ON37YXGX.js";
42
24
  import {
43
25
  isGatewayHttpStatus
44
26
  } from "./chunk-NF64D32W.js";
@@ -52,10 +34,24 @@ import {
52
34
  import {
53
35
  AGENT_UPDATE_FIELD_NAMES,
54
36
  normalizeAgentUpdateFieldList
55
- } from "./chunk-MMNYUVLW.js";
37
+ } from "./chunk-UB3D4TRQ.js";
38
+ import {
39
+ markdownToSlate
40
+ } from "./chunk-FJ23FZXF.js";
41
+ import {
42
+ extractMentionsFromSlate
43
+ } from "./chunk-AGIM7IMJ.js";
44
+ import {
45
+ slateToRenderMarkdown
46
+ } from "./chunk-63W5N6P3.js";
56
47
  import {
57
48
  createDocState
58
- } from "./chunk-5RYBGBQH.js";
49
+ } from "./chunk-IILMY4W4.js";
50
+ import {
51
+ applyFetchSpaceFulfilled,
52
+ fetchAuthoritativeRemoteSpace,
53
+ selectSpaceRemoteAuth
54
+ } from "./chunk-7EEZJ6BS.js";
59
55
  import {
60
56
  ToolApiError,
61
57
  buildToolRequestHeaders,
@@ -63,23 +59,20 @@ import {
63
59
  getRequestConfig,
64
60
  getToolBaseUrl,
65
61
  getToolRequestContext
66
- } from "./chunk-MYOH447Z.js";
62
+ } from "./chunk-4JVNURX4.js";
67
63
  import {
68
64
  readDocFunc,
69
65
  readDocFunctionSchema,
70
66
  readPageFunc,
71
67
  readPageFunctionSchema,
72
68
  resolvePageReadMarkdown
73
- } from "./chunk-IAPCBNEE.js";
74
- import {
75
- extractMentionsFromSlate
76
- } from "./chunk-AGIM7IMJ.js";
69
+ } from "./chunk-SQYIK6HO.js";
77
70
  import {
78
- slateToRenderMarkdown
79
- } from "./chunk-63W5N6P3.js";
71
+ shareResourceAction
72
+ } from "./chunk-AK5O76CC.js";
80
73
  import {
81
74
  createDialogAction
82
- } from "./chunk-OOF4UPC5.js";
75
+ } from "./chunk-XWVCYUUU.js";
83
76
  import {
84
77
  DEFAULT_COLLAPSED_CATEGORIES,
85
78
  addContentToSpace,
@@ -96,7 +89,7 @@ import {
96
89
  updateContentCategory,
97
90
  updateContentTitle,
98
91
  writeStoredCollapsedCategories
99
- } from "./chunk-NJR3WKVP.js";
92
+ } from "./chunk-YWWDC3O7.js";
100
93
  import {
101
94
  buildDatabaseFileContentUrl,
102
95
  deleteDialog,
@@ -109,52 +102,56 @@ import {
109
102
  selectMsgById,
110
103
  uiAskChoiceFunc,
111
104
  uiAskChoiceFunctionSchema
112
- } from "./chunk-VZKUKCA6.js";
105
+ } from "./chunk-MZLE5HQ3.js";
113
106
  import {
114
107
  createAgent,
115
108
  deleteServerSyncedCredential,
116
109
  runLlm,
117
110
  streamAgentChatTurn,
118
111
  updateAgent
119
- } from "./chunk-YPD3VJZW.js";
112
+ } from "./chunk-NWP2OYOX.js";
120
113
  import {
114
+ addMemberSpace,
115
+ getAllMemberSpaces,
121
116
  getCurrentSpaceId,
122
117
  getCurrentSpaceIdRaw,
123
118
  getCurrentSpaceRaw,
124
119
  getViewMode,
120
+ removeMemberSpace,
125
121
  setCurrentSpace,
126
122
  setCurrentSpaceBoth,
123
+ setMembershipLoaded,
124
+ setMembershipLoading,
125
+ setMembershipRejected,
127
126
  setViewMode,
128
- updateCurrentSpaceIfMatch
129
- } from "./chunk-5XBUWM6I.js";
127
+ updateCurrentSpaceIfMatch,
128
+ updateMemberSpaceName
129
+ } from "./chunk-MBG66ZBH.js";
130
130
  import {
131
131
  buildMediaToolConfirmation,
132
132
  normalizeMediaConfirmExecutionRevision
133
133
  } from "./chunk-QYPE3TS3.js";
134
- import {
135
- UNCATEGORIZED_ID,
136
- addContentAction,
137
- checkSpaceMembership
138
- } from "./chunk-VPAZOH2D.js";
139
- import {
140
- createSpaceKey,
141
- normalizeSpaceId
142
- } from "./chunk-UAD2WT54.js";
143
134
  import {
144
135
  getActiveDialogKey,
145
136
  selectCurrentDialogKey,
146
137
  selectPendingRawDataByPageKey
147
- } from "./chunk-OWYYDMGJ.js";
138
+ } from "./chunk-S2NTVGA2.js";
148
139
  import {
149
140
  require_react
150
- } from "./chunk-YDH3FDFQ.js";
151
- import {
152
- shareResourceAction
153
- } from "./chunk-HPFCI4SK.js";
141
+ } from "./chunk-5FUN7EG4.js";
154
142
  import {
155
143
  selectCurrentServer,
156
144
  selectSyncServers
157
- } from "./chunk-4I7ERB7F.js";
145
+ } from "./chunk-VREDDN25.js";
146
+ import {
147
+ UNCATEGORIZED_ID,
148
+ addContentAction,
149
+ checkSpaceMembership
150
+ } from "./chunk-JA3ICVJY.js";
151
+ import {
152
+ createSpaceKey,
153
+ normalizeSpaceId
154
+ } from "./chunk-UAD2WT54.js";
158
155
  import {
159
156
  patch,
160
157
  read,
@@ -166,10 +163,14 @@ import {
166
163
  selectEntities,
167
164
  toTimestampMs,
168
165
  write
169
- } from "./chunk-BFM34N54.js";
166
+ } from "./chunk-44X52WOJ.js";
167
+ import {
168
+ getUserDataItemTimestamp,
169
+ mergeAndDedupUserData
170
+ } from "./chunk-GBWGPTA7.js";
170
171
  import {
171
172
  readAction
172
- } from "./chunk-JIT6FSXJ.js";
173
+ } from "./chunk-WAE3GFCJ.js";
173
174
  import {
174
175
  DEVICE_LOCAL_OWNER_ID,
175
176
  getRuntimeServerContext,
@@ -179,11 +180,11 @@ import {
179
180
  resolveEffectiveSpaceActorId,
180
181
  resolveRecordOwnerUserId,
181
182
  selectRuntimeSnapshot
182
- } from "./chunk-PYRUW7XN.js";
183
+ } from "./chunk-2VUZSVAS.js";
183
184
  import {
184
185
  createAsyncThunk,
185
186
  noloWriteRequest
186
- } from "./chunk-P5L7CXOC.js";
187
+ } from "./chunk-7Z6EW7AH.js";
187
188
  import {
188
189
  selectIdentityToken,
189
190
  selectIdentityUserBalance,
@@ -192,21 +193,13 @@ import {
192
193
  import {
193
194
  buildTombstoneRecord,
194
195
  isTombstoneRecord
195
- } from "./chunk-D2MDMY2M.js";
196
- import {
197
- CAPABILITY_PACKS
198
- } from "./chunk-EYUBHHFB.js";
199
- import {
200
- buildSkillDocMarkdown,
201
- normalizeSkillModalities,
202
- normalizeStringArray,
203
- parseExternalSkillMarkdown,
204
- parseSkillDocProtocol,
205
- resolvePageSkillMetadata
206
- } from "./chunk-AETZ7AD6.js";
196
+ } from "./chunk-BV3FLP2L.js";
207
197
  import {
198
+ AGENT_THREAD_ACTIVE_STATUSES,
199
+ AGENT_THREAD_TERMINAL_STATUSES,
208
200
  CLI_NOLO_WORKSPACE_TOOL_NAMES,
209
201
  DEFAULT_READ_DIALOG_MAX_RESPONSE_CHARS,
202
+ assertDispatchSelectionAdmission,
210
203
  buildAgentRuntimeAgentLookupKeys,
211
204
  buildDialogReadEnvelope,
212
205
  buildNoloSubjectRefQueryTarget,
@@ -217,27 +210,26 @@ import {
217
210
  getNoloDialogIdFromKey,
218
211
  normalizeNoloExcludeDialogIds,
219
212
  normalizeNoloSpaceInput,
220
- resolveDispatchedSubtaskBudget,
221
213
  resolveNoloDialogInput,
222
214
  verifyNoloDialogSubjectRefQuery
223
- } from "./chunk-25JZEIXN.js";
215
+ } from "./chunk-C4VAR65S.js";
224
216
  import {
225
217
  mergeAvailabilityDeadline,
226
218
  resolveCredentialKeyWithFallback
227
- } from "./chunk-YUXQAVRD.js";
219
+ } from "./chunk-HOCHUZQ7.js";
228
220
  import {
229
221
  redactAgentRecordForWorkspaceTool,
230
222
  resolveReadOnlyToolConstraints
231
- } from "./chunk-KC4XDTT3.js";
223
+ } from "./chunk-SOF4OWDM.js";
232
224
  import {
233
225
  clipCompactText
234
226
  } from "./chunk-5MMAK75Q.js";
235
- import {
236
- createFileCredentialBroker
237
- } from "./chunk-OQHIVPG4.js";
238
227
  import {
239
228
  asRecordOrEmpty
240
229
  } from "./chunk-KX6YBIHG.js";
230
+ import {
231
+ createFileCredentialBroker
232
+ } from "./chunk-SNBZZPYH.js";
241
233
  import {
242
234
  compactWhitespace
243
235
  } from "./chunk-DWLEOOGR.js";
@@ -245,19 +237,53 @@ import {
245
237
  isAbortError
246
238
  } from "./chunk-7DPNBQSV.js";
247
239
  import {
248
- canonicalizeToolName,
249
- canonicalizeToolNames
250
- } from "./chunk-ZCWRMUWT.js";
240
+ CAPABILITY_PACKS
241
+ } from "./chunk-PJCIP64Z.js";
251
242
  import {
252
243
  CHROME_CONNECTOR_ACCEPTED_TOOL_NAMES,
244
+ canonicalizeToolName,
245
+ canonicalizeToolNames,
253
246
  chromeConnectorToolSchemas,
254
247
  chromeConnectorUnavailableFunc,
255
248
  getChromeConnectorToolBehavior,
256
249
  getChromeConnectorToolDefaultConsent
257
- } from "./chunk-ZC3CMUKU.js";
250
+ } from "./chunk-6OVNSQHN.js";
251
+ import {
252
+ buildSkillDocMarkdown,
253
+ normalizeSkillModalities,
254
+ normalizeStringArray,
255
+ parseExternalSkillMarkdown,
256
+ parseSkillDocProtocol,
257
+ resolvePageSkillMetadata
258
+ } from "./chunk-W6RFEDN4.js";
258
259
  import {
259
260
  extractCustomId
260
261
  } from "./chunk-M2EJHDJP.js";
262
+ import {
263
+ SEPARATOR,
264
+ TYPE_STORAGE_PREFIXES,
265
+ createAgentKey,
266
+ fileKey,
267
+ isAgentKey,
268
+ isAppKey,
269
+ isFileKey,
270
+ isPageKey,
271
+ isTableMetaKey,
272
+ isTaskKey,
273
+ metaKey,
274
+ rowKey,
275
+ splitKey,
276
+ toTrimmedString
277
+ } from "./chunk-SYTHYBMI.js";
278
+ import {
279
+ dialogMessageRange,
280
+ isDialogKey,
281
+ ulid
282
+ } from "./chunk-OJKUU3LP.js";
283
+ import {
284
+ asNonEmptyStringArray,
285
+ asTrimmedNonEmptyStringArray
286
+ } from "./chunk-I42VC5KR.js";
261
287
  import {
262
288
  RUN_TITLE_MAX,
263
289
  TASK_PREVIEW_MAX,
@@ -270,68 +296,44 @@ import {
270
296
  formatStatusRunCard,
271
297
  formatStopRunCard,
272
298
  normalizeRunTitle,
299
+ resolveAgentRunName,
273
300
  resolveRunLabel
274
- } from "./chunk-PJNFNEJE.js";
301
+ } from "./chunk-AMEOV5VZ.js";
302
+ import {
303
+ toErrorMessage
304
+ } from "./chunk-HNMXYYJR.js";
305
+ import {
306
+ asTrimmedString
307
+ } from "./chunk-3EUW3WEO.js";
275
308
  import {
276
309
  DEFAULT_MODEL,
277
310
  clampReasoningEffort,
278
311
  resolveModelReasoningCapabilityWithCache
279
- } from "./chunk-SM3NSZJV.js";
280
- import {
281
- toErrorMessage
282
- } from "./chunk-HNMXYYJR.js";
312
+ } from "./chunk-2UCBGYO4.js";
283
313
  import {
284
314
  isRecord
285
315
  } from "./chunk-KUG52IAP.js";
286
316
  import {
287
317
  asTrimmedLowercaseString
288
318
  } from "./chunk-QSJ3HFEF.js";
319
+ import {
320
+ asOptionalFiniteNumber
321
+ } from "./chunk-WWC7I6TA.js";
289
322
  import {
290
323
  API_ENDPOINTS
291
324
  } from "./chunk-LCBAMY2M.js";
325
+ import {
326
+ asOptionalTrimmedString
327
+ } from "./chunk-G3SUCT4W.js";
292
328
  import {
293
329
  DEFAULT_LOCAL_API_ORIGIN
294
330
  } from "./chunk-4SN6J65J.js";
295
331
  import {
296
332
  normalizeServerOrigin
297
333
  } from "./chunk-CF7PE763.js";
298
- import {
299
- SEPARATOR,
300
- TYPE_STORAGE_PREFIXES,
301
- createAgentKey,
302
- fileKey,
303
- isAgentKey,
304
- isAppKey,
305
- isFileKey,
306
- isPageKey,
307
- isTableMetaKey,
308
- isTaskKey,
309
- metaKey,
310
- rowKey,
311
- splitKey,
312
- toTrimmedString
313
- } from "./chunk-JY5NGFFH.js";
314
- import {
315
- dialogMessageRange,
316
- isDialogKey,
317
- ulid
318
- } from "./chunk-XJWWBO34.js";
319
- import {
320
- asNonEmptyStringArray,
321
- asTrimmedNonEmptyStringArray
322
- } from "./chunk-I42VC5KR.js";
323
- import {
324
- asOptionalFiniteNumber
325
- } from "./chunk-WWC7I6TA.js";
326
- import {
327
- asTrimmedString
328
- } from "./chunk-3EUW3WEO.js";
329
- import {
330
- asOptionalTrimmedString
331
- } from "./chunk-G3SUCT4W.js";
332
334
  import {
333
335
  __toESM
334
- } from "./chunk-4VNS5WPM.js";
336
+ } from "./chunk-U67V476Y.js";
335
337
 
336
338
  // packages/ai/tools/agentAutomationSchemas.ts
337
339
  var agentAutomationTriggerSchema = {
@@ -1021,7 +1023,7 @@ var HOSTED_EXEC_RUNTIME_TOOL_POLICY = {
1021
1023
  workspace: { mode: "lease" }
1022
1024
  };
1023
1025
  var findModelConfig = async (modelName, provider) => {
1024
- const { ALL_MODELS } = await import("./models-PJBE6JDV.js");
1026
+ const { ALL_MODELS } = await import("./models-ULVWLSQ6.js");
1025
1027
  const name = toTrimmedString(modelName);
1026
1028
  const prov = toTrimmedString(provider ?? "");
1027
1029
  if (!name) return null;
@@ -1266,7 +1268,7 @@ var buildPlatformFormDataFromArgs = async (args) => {
1266
1268
  const trimmedModel = toTrimmedString(model);
1267
1269
  const trimmedProvider = toTrimmedString(provider);
1268
1270
  const modelConfig = await findModelConfig(trimmedModel, trimmedProvider);
1269
- const { getModelPricing } = await import("./getPricing-2MNMXEVG.js");
1271
+ const { getModelPricing } = await import("./getPricing-MB2GBXOK.js");
1270
1272
  const normalizedTools = tools ?? [];
1271
1273
  const resolvedRuntimeToolPolicy = runtimeToolPolicy ?? (normalizedTools.includes("execShell") ? HOSTED_EXEC_RUNTIME_TOOL_POLICY : void 0);
1272
1274
  const formData = {
@@ -3537,8 +3539,10 @@ var getRuntime = (thunkApi) => {
3537
3539
  const snapshot = selectRuntimeSnapshot(state2);
3538
3540
  return {
3539
3541
  ...snapshot,
3540
- currentUserId: snapshot?.currentUserId ?? state2.currentUserId ?? state2.userId ?? state2.auth?.userId ?? state2.auth?.currentUser?.userId,
3541
- currentToken: snapshot?.currentToken ?? state2.currentToken ?? state2.auth?.currentToken,
3542
+ currentUserId: snapshot?.currentUserId ?? state2.currentUserId ?? state2.userId ?? // 不再直接摸 state.auth.*:identity 迁移后 auth 切片是历史字段,
3543
+ // 选中逻辑归 identity(各 edition 自己决定来源),此处只当最后兜底。
3544
+ selectIdentityUserId(state2),
3545
+ currentToken: snapshot?.currentToken ?? state2.currentToken ?? selectIdentityToken(state2),
3542
3546
  currentServer: snapshot?.currentServer ?? state2.currentServer ?? state2.settings?.currentServer
3543
3547
  };
3544
3548
  };
@@ -3900,7 +3904,7 @@ async function deleteDialogsFunc(args, thunkApi) {
3900
3904
  const deletedDialogIds = [];
3901
3905
  const deletedDialogKeys = [];
3902
3906
  const failures = [];
3903
- const { deleteDialog: deleteDialog2 } = await import("./dialogSlice-GRSVGDTF.js");
3907
+ const { deleteDialog: deleteDialog2 } = await import("./dialogSlice-LFNVUSAN.js");
3904
3908
  for (const target of targets) {
3905
3909
  try {
3906
3910
  await thunkApi.dispatch(deleteDialog2(target.dbKey)).unwrap();
@@ -3966,18 +3970,18 @@ async function fetchUserFavoriteAgentMap(thunkApi) {
3966
3970
  }
3967
3971
  var listAgentsFunctionSchema = {
3968
3972
  name: "listAgents",
3969
- description: "List Nolo agents available for delegation as safe summaries. By default (scope='preferred'), returns the user's preferred agents (favorites, self-owned, OAuth subscriptions, custom API, and local agents). Note: favorited public agents stay in preferred and may still consume platform credits - check each agent's billingSource before dispatching. If no suitable preferred candidate is found or the user explicitly asks to explore public/shared agents, call with scope='public' (public agents may consume platform credits). scope='all' returns the deduplicated union for troubleshooting/management. listAgents does not automatically fallback to public agents. The payload returns `credentialGroups` summarizing independent credential capacities (credentialGroup, credentialKind, agentCount, and availableAt recovery timestamps). Orchestration discipline: Never fan out parallel runs on one credential; fan out only across distinct credentialGroups. A channel verdict is valid for the current dispatch attempt only; always re-read availability before dispatching, and never reuse a failure verdict from an earlier attempt. On config_unresolved-class errors, retry once before degrading. Reserve the strongest private channels for review; execution should use cheap channels. The `agents` array carries a compact agent-selection projection per agent: runnable `agentKey` (agent-<userId>-<id> owned, agent-pub-<id> public), name, model, provider, apiSource, billingSource ('user_subscription' | 'owner_subscription' | 'user_api' | 'platform_credits' | 'local'), tools, isFavorite, isOAuth, isOwned, isPublic, credentialGroup, credentialKind. Copy `agentKey` verbatim into startAgentRun. Rate-limited agents (429, nextAvailableAt in the future) are hidden by default; unavailableCount and unavailableAgents carry their nextAvailableAt recovery timestamps; pass `showUnavailable: true` to include them. Set `verbose: true` for full safe summary details.",
3973
+ description: "List Nolo agents available for delegation as safe summaries. By default (scope='all') returns the deduplicated union of the user's own/favorite agents and public/shared agents. scope='public' returns only public/shared agents. Public agents may consume platform credits - check each agent's billingSource before dispatching. The payload returns `credentialGroups` summarizing independent credential capacities (credentialGroup, credentialKind, agentCount, and availableAt recovery timestamps). Orchestration discipline: Never fan out parallel runs on one credential; fan out only across distinct credentialGroups. A channel verdict is valid for the current dispatch attempt only; always re-read availability before dispatching, and never reuse a failure verdict from an earlier attempt. On config_unresolved-class errors, retry once before degrading. Reserve the strongest private channels for review; execution should use cheap channels. The `agents` array carries a compact agent-selection projection per agent: runnable `agentKey` (agent-<userId>-<id> owned, agent-pub-<id> public), name, model, provider, apiSource, billingSource ('user_subscription' | 'owner_subscription' | 'user_api' | 'platform_credits' | 'local'), tools, isFavorite, isOAuth, isOwned, isPublic, credentialGroup, credentialKind. Copy `agentKey` verbatim into startAgentRun. All agents are listed, including rate-limited (429) ones: cooldown agents carry `availabilityStatus` / `availabilityReason` / `nextAvailableAt` as reference info, not a dispatch gate (quota is informational; requests are still sent and upstream results are reported as-is). `unavailableCount` reports how many agents are currently rate-limited. `showUnavailable` is deprecated and has no effect (kept for compatibility). Set `verbose: true` for full safe summary details.",
3970
3974
  parameters: {
3971
3975
  type: "object",
3972
3976
  properties: {
3973
3977
  limit: { type: "integer", description: "Maximum agents to return. Default 100, max 500." },
3974
3978
  scope: {
3975
3979
  type: "string",
3976
- enum: ["preferred", "public", "all"],
3977
- description: "Discovery scope. 'preferred' (default): user's favorites, owned, OAuth, custom API, and local agents. 'public': shared/marketplace agents not in preferred (may use platform credits). 'all': deduplicated union for inspection."
3980
+ enum: ["all", "public"],
3981
+ description: "Discovery scope. 'all' (default): deduplicated union of the user's own/favorite agents and public/shared agents. 'public': only shared/marketplace agents (may use platform credits)."
3978
3982
  },
3979
3983
  publicOnly: { type: "boolean", description: "Deprecated compatibility alias for scope='public'." },
3980
- showUnavailable: { type: "boolean", description: "Include agents currently rate-limited (429). Default false." },
3984
+ showUnavailable: { type: "boolean", description: "Deprecated no-op: rate-limited agents are always included now (reference info, not a gate). Kept for compatibility." },
3981
3985
  query: {
3982
3986
  type: "string",
3983
3987
  description: "Optional case-insensitive search substring matching agent name, model, provider, handle, or agentKey. Use to locate specific candidates like 'opus', 'devin', or 'claude'."
@@ -3989,6 +3993,19 @@ var listAgentsFunctionSchema = {
3989
3993
  }
3990
3994
  };
3991
3995
  async function listAgentsFunc(args, thunkApi) {
3996
+ const runtime = getRuntime(thunkApi);
3997
+ if (!runtime?.currentUserId || !runtime?.currentToken) {
3998
+ return {
3999
+ rawData: {
4000
+ success: true,
4001
+ total: 0,
4002
+ unavailableCount: 0,
4003
+ agents: [],
4004
+ credentialGroups: []
4005
+ },
4006
+ displayData: formatAgentListCard([])
4007
+ };
4008
+ }
3992
4009
  const pagination = resolvePaginationArgs({ limit: args?.limit, offset: args?.offset });
3993
4010
  const hasQuery = Boolean(args?.query && typeof args?.query === "string" && args?.query.trim());
3994
4011
  const upstreamFetchLimit = hasQuery ? Number.POSITIVE_INFINITY : Math.max(500, (pagination.offset ?? 0) + (pagination.limit ?? 100));
@@ -3998,7 +4015,6 @@ async function listAgentsFunc(args, thunkApi) {
3998
4015
  Number.isFinite(upstreamFetchLimit) ? upstreamFetchLimit : 500
3999
4016
  );
4000
4017
  const favoritesMap = await fetchUserFavoriteAgentMap(thunkApi);
4001
- const runtime = getRuntime(thunkApi);
4002
4018
  const scope = resolveDiscoveryScope({ scope: args?.scope, publicOnly: args?.publicOnly });
4003
4019
  let publicRecords = [];
4004
4020
  let upstreamTruncated = false;
@@ -4087,6 +4103,7 @@ async function listAgentsFunc(args, thunkApi) {
4087
4103
  scope: args?.scope,
4088
4104
  query: args?.query,
4089
4105
  publicOnly: args?.publicOnly,
4106
+ // showUnavailable 已无过滤语义(保留兼容入参,见 BuildAgentDiscoveryResultOptions)。
4090
4107
  showUnavailable: args?.showUnavailable,
4091
4108
  verbose: args?.verbose,
4092
4109
  compact: args?.compact,
@@ -4105,9 +4122,10 @@ async function listAgentsFunc(args, thunkApi) {
4105
4122
  ...discovery.truncated ? { truncated: true } : {},
4106
4123
  unavailableCount: discovery.unavailableCount,
4107
4124
  // 顺序即序列化顺序:agents 在前(派发必需),大块说明字段在后。
4125
+ // 限流 agent 已合入 agents(带 availabilityStatus / nextAvailableAt
4126
+ // 参考标注),不再单列 unavailableAgents,避免两套真相。
4108
4127
  agents: discovery.agents,
4109
- credentialGroups: discovery.credentialGroups,
4110
- unavailableAgents: discovery.unavailableAgents
4128
+ credentialGroups: discovery.credentialGroups
4111
4129
  },
4112
4130
  displayData: formatAgentListCard(discovery.agents)
4113
4131
  };
@@ -4279,7 +4297,7 @@ var readSkillDocFunctionSchema = {
4279
4297
  }
4280
4298
  };
4281
4299
  async function readSkillDocFunc(args, thunkApi) {
4282
- const { buildReadDocResult } = await import("./readDocTool-AVD32RUJ.js");
4300
+ const { buildReadDocResult } = await import("./readDocTool-4BGTXTXA.js");
4283
4301
  const id = args?.id ?? args?.doc ?? args?.docKey ?? args?.pageKey;
4284
4302
  if (typeof id !== "string" || !id.trim()) {
4285
4303
  throw new Error("readSkillDoc requires id or doc.");
@@ -4541,6 +4559,20 @@ var addSpaceAction = async (input, thunkAPI) => {
4541
4559
  return spaceMemberData;
4542
4560
  };
4543
4561
 
4562
+ // packages/app/hooks/deleteOwnershipGuard.ts
4563
+ function resolveDeleteOwnershipGuard(input) {
4564
+ const actor = typeof input.actorUserId === "string" ? input.actorUserId.trim() : "";
4565
+ const owner = typeof input.ownerId === "string" ? input.ownerId.trim() : "";
4566
+ const recordLoaded = input.recordLoaded !== false;
4567
+ if (!actor) return "unknown";
4568
+ if (owner) {
4569
+ if (owner === actor || owner === DEVICE_LOCAL_OWNER_ID) return "allow";
4570
+ return "deny";
4571
+ }
4572
+ if (isDeviceLocalOwnerId(actor) && recordLoaded) return "allow";
4573
+ return "unknown";
4574
+ }
4575
+
4544
4576
  // packages/app/favorite/favoriteStore.ts
4545
4577
  var import_react = __toESM(require_react());
4546
4578
  var createInitialState = () => ({
@@ -4794,7 +4826,7 @@ var normalizeDeleteError = (error) => {
4794
4826
  }
4795
4827
  return new Error(getDeleteErrorMessage(error));
4796
4828
  };
4797
- var deleteDbKey = (input, spaceId) => async (dispatch, getState) => {
4829
+ var deleteDbKey = (input, spaceId, options) => async (dispatch, getState) => {
4798
4830
  try {
4799
4831
  const {
4800
4832
  contentKey,
@@ -4802,6 +4834,30 @@ var deleteDbKey = (input, spaceId) => async (dispatch, getState) => {
4802
4834
  inputSpaceId,
4803
4835
  includeAttachments
4804
4836
  } = resolveDeleteInput(input);
4837
+ if (options?.requireOwnership) {
4838
+ const state2 = getState();
4839
+ let ownedRecord = selectById(state2, contentKey);
4840
+ if (!ownedRecord) {
4841
+ try {
4842
+ ownedRecord = await dispatch(
4843
+ read({ dbKey: contentKey, preferredServerOrigin })
4844
+ ).unwrap();
4845
+ } catch {
4846
+ ownedRecord = null;
4847
+ }
4848
+ }
4849
+ const verdict = resolveDeleteOwnershipGuard({
4850
+ ownerId: ownedRecord?.userId ?? ownedRecord?.ownerId,
4851
+ actorUserId: selectIdentityUserId(state2),
4852
+ recordLoaded: Boolean(ownedRecord)
4853
+ });
4854
+ if (verdict === "deny") {
4855
+ throw new Error("\u65E0\u6743\u5220\u9664\u4ED6\u4EBA\u5185\u5BB9");
4856
+ }
4857
+ if (verdict !== "allow") {
4858
+ throw new Error("\u65E0\u6CD5\u9A8C\u8BC1\u5185\u5BB9\u6240\u6709\u6743\uFF0C\u672A\u5220\u9664\uFF08\u53EF\u7A0D\u540E\u91CD\u8BD5\uFF09");
4859
+ }
4860
+ }
4805
4861
  const effectiveSpaceId = typeof spaceId === "string" && spaceId.trim().length > 0 ? spaceId : inputSpaceId ?? null;
4806
4862
  await performDirectDelete(
4807
4863
  dispatch,
@@ -5092,7 +5148,7 @@ var fetchSpaceAction = async (input, thunkAPI) => {
5092
5148
  const spaceKey = createSpaceKey.space(spaceId);
5093
5149
  const readSpace = async (dbKey) => {
5094
5150
  try {
5095
- const { read: read2, readAndWait: readAndWait2 } = await import("./dbSlice-HP7G4LX3.js");
5151
+ const { read: read2, readAndWait: readAndWait2 } = await import("./dbSlice-WNON7TOL.js");
5096
5152
  const readPromise = fresh ? dispatch(readAndWait2(dbKey)).unwrap() : dispatch(read2({ dbKey })).unwrap();
5097
5153
  return await withTimeout(readPromise);
5098
5154
  } catch {
@@ -5785,7 +5841,7 @@ var stripHtml = (html) => typeof html === "string" ? compactWhitespace(
5785
5841
  ) : "";
5786
5842
  var cleanUrl = (url) => url.replace(/[),.;\]}>]+$/g, "");
5787
5843
  var extractPdfText = async (blob) => {
5788
- const pdfjsLib = await import("./pdf-U6KSUEZZ.js");
5844
+ const pdfjsLib = await import("./pdf-KE3QI2V7.js");
5789
5845
  if (typeof window !== "undefined" && pdfjsLib.GlobalWorkerOptions && !pdfjsLib.GlobalWorkerOptions.workerSrc) {
5790
5846
  pdfjsLib.GlobalWorkerOptions.workerSrc = "/public/assets/pdf.worker.mjs";
5791
5847
  }
@@ -10962,7 +11018,7 @@ var cloudflareCrawlStatusFunctionSchema = {
10962
11018
  async function cloudflareCrawlStatusFunc(args, thunkApi) {
10963
11019
  const { jobId, limit, status, cursor } = args;
10964
11020
  if (!jobId) throw new Error("\u5FC5\u987B\u63D0\u4F9B jobId");
10965
- const { getToolRequestContext: getToolRequestContext2 } = await import("./toolApiClient-HGNO53TC.js");
11021
+ const { getToolRequestContext: getToolRequestContext2 } = await import("./toolApiClient-OGQEBQVX.js");
10966
11022
  const { baseUrl, token } = getToolRequestContext2(thunkApi);
10967
11023
  const params = new URLSearchParams();
10968
11024
  if (limit !== void 0) params.set("limit", String(limit));
@@ -11740,7 +11796,7 @@ var selectUserIdFromState = (state2) => {
11740
11796
  var selectCurrentServerFromState = (state2) => typeof state2?.settings?.currentServer === "string" ? state2.settings.currentServer : null;
11741
11797
  async function addImageContentToSpace(input) {
11742
11798
  const injectedAddContentAction = input.thunkApi?.extra?.addContentAction;
11743
- const addContentAction2 = typeof injectedAddContentAction === "function" ? injectedAddContentAction : (await import("./addContentAction-N2YC5IL3.js")).addContentAction;
11799
+ const addContentAction2 = typeof injectedAddContentAction === "function" ? injectedAddContentAction : (await import("./addContentAction-GDHDOF4U.js")).addContentAction;
11744
11800
  await addContentAction2(
11745
11801
  {
11746
11802
  spaceId: input.spaceId,
@@ -12361,6 +12417,81 @@ var chatgptWebImageGenerateFunc = async (args, thunkApi) => {
12361
12417
  };
12362
12418
  };
12363
12419
 
12420
+ // packages/ai/tools/secretRequestTool.ts
12421
+ var randomGateId = () => {
12422
+ const webCrypto = globalThis.crypto;
12423
+ if (typeof webCrypto?.randomUUID === "function") return webCrypto.randomUUID();
12424
+ return `${Math.random().toString(36).slice(2, 10)}-${Date.now().toString(36)}`;
12425
+ };
12426
+ var SECRET_REQUEST_NAME_PATTERN = /^[A-Z_][A-Z0-9_]*$/;
12427
+ var secretRequestFunctionSchema = {
12428
+ name: "secret-request",
12429
+ description: "\u5411\u7528\u6237\u8BF7\u6C42\u4E00\u4E2A\u5177\u540D\u51ED\u636E\uFF08\u5982 API key\uFF09\u3002\u7528\u6237\u4F1A\u5728\u5BBF\u4E3B\u9762\u677F\u4E2D\u8F93\u5165\uFF0C\u51ED\u636E\u660E\u6587\u7531\u5BBF\u4E3B\u5199\u5165\u672C\u673A secret store\uFF0C\u4EFB\u4F55\u503C\u90FD\u4E0D\u4F1A\u56DE\u5230\u5BF9\u8BDD\u4E2D\uFF1B\u5DE5\u5177\u7ED3\u679C\u53EA\u544A\u77E5\u662F\u5426\u5DF2\u4FDD\u5B58\u3002\u8C03\u7528\u65F6\u53EA\u4F20\u51ED\u636E\u540D\uFF08\u5927\u5199+\u4E0B\u5212\u7EBF\uFF09\u4E0E\u53EF\u9009\u8BF4\u660E\uFF0C\u7EDD\u4E0D\u4F20\u4EFB\u4F55\u51ED\u636E\u503C\u3002\u7ED3\u679C\u8FD4\u56DE\u540E\uFF0C\u7528 `nolo secret run --with <name> -- <cmd>` \u5728\u53D7\u63A7\u901A\u9053\u6D88\u8D39\u3002",
12430
+ parameters: {
12431
+ type: "object",
12432
+ properties: {
12433
+ name: {
12434
+ type: "string",
12435
+ description: "\u51ED\u636E\u540D\u79F0\uFF0C\u5FC5\u987B\u5339\u914D ^[A-Z_][A-Z0-9_]*$\uFF08\u5982 OPENAI_KEY\uFF09\u3002\u8FD9\u662F\u7528\u6237\u5728\u9762\u677F\u91CC\u770B\u5230\u7684\u6761\u76EE\u540D\u3002"
12436
+ },
12437
+ prompt: {
12438
+ type: "string",
12439
+ description: "\u9762\u677F\u4E0A\u5411\u7528\u6237\u5C55\u793A\u7684\u4E00\u53E5\u8BDD\u8BF4\u660E\uFF08\u53EF\u9009\uFF09\u3002"
12440
+ },
12441
+ purpose: {
12442
+ type: "string",
12443
+ description: "\u4E3A\u4EC0\u4E48\u9700\u8981\u8FD9\u4E2A\u51ED\u636E\u7684\u7B80\u77ED\u8BF4\u660E\uFF08\u53EF\u9009\uFF09\uFF0C\u5199\u8FDB\u9762\u677F\u6B63\u6587\u3002"
12444
+ }
12445
+ },
12446
+ required: ["name"]
12447
+ }
12448
+ };
12449
+ var NAME_ERROR = "secret-request\uFF1Aname \u5FC5\u987B\u5339\u914D ^[A-Z_][A-Z0-9_]*$\uFF08\u5927\u5199\u5B57\u6BCD/\u4E0B\u5212\u7EBF\u5F00\u5934\uFF0C\u4EC5\u542B\u5927\u5199\u5B57\u6BCD\u3001\u6570\u5B57\u4E0E\u4E0B\u5212\u7EBF\uFF09\u3002";
12450
+ function validateSecretRequestName(name) {
12451
+ if (typeof name !== "string" || name.length === 0) return NAME_ERROR;
12452
+ if (!SECRET_REQUEST_NAME_PATTERN.test(name)) return NAME_ERROR;
12453
+ return null;
12454
+ }
12455
+ function buildSecretRequestToolResult(args) {
12456
+ const payload = {
12457
+ action: "secret_request",
12458
+ name: args.name,
12459
+ masked: true,
12460
+ ...args.prompt?.trim() ? { prompt: args.prompt.trim() } : {}
12461
+ };
12462
+ const purpose = args.purpose?.trim();
12463
+ const fallbackContent = [
12464
+ `\u9700\u8981\u7528\u6237\u5411\u672C\u673A secret store \u63D0\u4F9B\u51ED\u636E "${args.name}"\uFF08\u660E\u6587\u4E0D\u4F1A\u51FA\u73B0\u5728\u5BF9\u8BDD\u91CC\uFF09\u3002`,
12465
+ ...purpose ? [`\u7528\u9014\uFF1A${purpose}`] : [],
12466
+ "\u4F1A\u81EA\u52A8\u5F39\u51FA\u8F93\u5165\u9762\u677F\u8BA9\u7528\u6237\u586B\u5199\uFF0C\u4E0D\u8981\u5F15\u5BFC\u7528\u6237\u53BB\u7EC8\u7AEF\u6267\u884C\u547D\u4EE4\u3002",
12467
+ "\u51ED\u636E\u4FDD\u5B58\u540E\uFF0C\u7528 nolo secret run --with " + args.name + " -- <cmd> \u5728\u53D7\u63A7\u901A\u9053\u6D88\u8D39\uFF0C\u4E0D\u8981\u5411\u7528\u6237\u7D22\u8981\u660E\u6587\u3002"
12468
+ ].join("\n");
12469
+ return {
12470
+ content: fallbackContent,
12471
+ metadata: {
12472
+ actionGate: {
12473
+ id: `gate-${randomGateId().slice(0, 8)}-secret-request-${args.name}`,
12474
+ kind: "input",
12475
+ title: `\u9700\u8981\u51ED\u636E ${args.name}`,
12476
+ body: purpose?.trim() || "\u8BF7\u5728\u8F93\u5165\u6846\u4E2D\u586B\u5199\u8BE5\u51ED\u636E\uFF0C\u5185\u5BB9\u4EC5\u4FDD\u5B58\u5728\u672C\u673A secret store\u3002",
12477
+ payload
12478
+ },
12479
+ reason: "secret-request-pending-host-input"
12480
+ }
12481
+ };
12482
+ }
12483
+ async function secretRequestFunc(args, _thunkApi) {
12484
+ const nameError = validateSecretRequestName(args?.name);
12485
+ if (nameError) {
12486
+ throw new Error(nameError);
12487
+ }
12488
+ return buildSecretRequestToolResult({
12489
+ name: args.name,
12490
+ ...args.prompt !== void 0 ? { prompt: args.prompt } : {},
12491
+ ...args.purpose !== void 0 ? { purpose: args.purpose } : {}
12492
+ });
12493
+ }
12494
+
12364
12495
  // packages/ai/tools/uiCardTool.ts
12365
12496
  var showInteractionFunctionSchema = {
12366
12497
  name: "show_interaction",
@@ -13496,6 +13627,15 @@ function normalizeContinueDialogId(value) {
13496
13627
  }
13497
13628
  return value.trim();
13498
13629
  }
13630
+ function resolveRunContextFacts(record, effectiveAgentKey) {
13631
+ const previous = typeof record?.primaryAgentKey === "string" ? record.primaryAgentKey.trim() : "";
13632
+ const agentChanged = !!record && !!previous && previous !== effectiveAgentKey;
13633
+ return {
13634
+ contextMode: record ? "continued" : "new",
13635
+ agentChanged,
13636
+ ...agentChanged ? { contextNote: "\u7EED\u8DD1\u5DF2\u5207\u6362 Agent\uFF0C\u6A21\u578B\u63D0\u793A\u8BCD\u7F13\u5B58\u53EF\u80FD\u5931\u6548\u3002" } : {}
13637
+ };
13638
+ }
13499
13639
 
13500
13640
  // packages/ai/tools/agent/agentRunCwd.ts
13501
13641
  function isAbsoluteRunCwd(raw) {
@@ -13678,10 +13818,10 @@ var runAgentBackground = createAsyncThunk("agent/runBackground", async (args, {
13678
13818
  idempotencyKey,
13679
13819
  ...parentDialogId ? { parentDialogId } : {},
13680
13820
  ...runtimeKey ? { runtimeKey } : {},
13681
- ...args.subtaskBudgetLimits ? { subtaskBudgetLimits: args.subtaskBudgetLimits } : {},
13682
13821
  ...ephemeral ? { ephemeral: true } : {},
13683
13822
  ...runKind ? { runKind } : {},
13684
13823
  runtimeContext: {
13824
+ ...args.selectionCheck ? { selectionCheck: args.selectionCheck } : {},
13685
13825
  ...args.runTitle ? { runTitle: args.runTitle } : {},
13686
13826
  surface: "web",
13687
13827
  host: "browser",
@@ -13741,8 +13881,9 @@ var runAgentBackground = createAsyncThunk("agent/runBackground", async (args, {
13741
13881
  serverBase: routedServerBase
13742
13882
  } = runResponse;
13743
13883
  onStatusChange?.("pending");
13884
+ const contextFacts = runResponse.contextMode ? { contextMode: runResponse.contextMode, agentChanged: runResponse.agentChanged === true, ...runResponse.contextNote ? { contextNote: runResponse.contextNote } : {} } : {};
13744
13885
  if (args.waitForCompletion === false) {
13745
- return { dialogId, status: runResponse.status };
13886
+ return { dialogId, status: runResponse.status, ...contextFacts, ...runResponse.selectionCheck ? { selectionCheck: runResponse.selectionCheck } : {} };
13746
13887
  }
13747
13888
  let lastError;
13748
13889
  let maxSseRetries = MAX_SSE_RETRIES;
@@ -13750,7 +13891,7 @@ var runAgentBackground = createAsyncThunk("agent/runBackground", async (args, {
13750
13891
  const eventServer = normalizeServerOrigin(routedServerBase) || currentServer;
13751
13892
  for (let attempt = 0; attempt <= maxSseRetries; attempt++) {
13752
13893
  try {
13753
- return await listenToDialogEvents(
13894
+ const completed = await listenToDialogEvents(
13754
13895
  dialogId,
13755
13896
  eventServer,
13756
13897
  authHeader,
@@ -13760,6 +13901,7 @@ var runAgentBackground = createAsyncThunk("agent/runBackground", async (args, {
13760
13901
  onFailed,
13761
13902
  cursor
13762
13903
  );
13904
+ return { ...completed, ...contextFacts, ...runResponse.selectionCheck ? { selectionCheck: runResponse.selectionCheck } : {} };
13763
13905
  } catch (e) {
13764
13906
  if (isAbortError(e)) throw e;
13765
13907
  if (!e?.retryable || attempt >= maxSseRetries) throw e;
@@ -14145,15 +14287,29 @@ function checkCredentialFanout(args) {
14145
14287
  }
14146
14288
 
14147
14289
  // packages/ai/tools/agent/startAgentRunTool.ts
14148
- var BATCH_FANOUT_ENTRY_TTL_MS = 30 * 60 * 1e3;
14149
14290
  var batchFanoutRegistry = /* @__PURE__ */ new Map();
14150
- function pruneBatchFanoutRegistry(nowMs) {
14151
- for (const [batchId, entries] of batchFanoutRegistry) {
14152
- const alive = entries.filter(
14153
- (e) => nowMs - e.startedAtMs < BATCH_FANOUT_ENTRY_TTL_MS
14154
- );
14155
- if (alive.length === 0) batchFanoutRegistry.delete(batchId);
14156
- else batchFanoutRegistry.set(batchId, alive);
14291
+ async function refreshBatchFanout(entries, thunkApi) {
14292
+ const snapshot = entries.filter((entry) => entry.runId);
14293
+ if (!snapshot.length) return;
14294
+ const response = await callToolApi(
14295
+ thunkApi,
14296
+ "/api/agent/runs/control",
14297
+ { action: "list", limit: 1e4 },
14298
+ { withAuth: true }
14299
+ );
14300
+ const data = response?.data ?? response;
14301
+ if (!Array.isArray(data?.runs) || data.hasMore === true) {
14302
+ throw new Error("batch admission: live list unavailable or incomplete; retry after recovery");
14303
+ }
14304
+ for (const entry of snapshot) {
14305
+ const run = data.runs.find((run2) => run2.runId === entry.runId);
14306
+ if (!run || !AGENT_THREAD_ACTIVE_STATUSES.includes(run.status) && !AGENT_THREAD_TERMINAL_STATUSES.includes(run.status)) {
14307
+ throw new Error(`batch admission: unknown live status for ${entry.runId}; retry after recovery`);
14308
+ }
14309
+ if (AGENT_THREAD_TERMINAL_STATUSES.includes(run.status)) {
14310
+ const index = entries.indexOf(entry);
14311
+ if (index >= 0) entries.splice(index, 1);
14312
+ }
14157
14313
  }
14158
14314
  }
14159
14315
  function buildStartAgentRunFunctionSchema(opts) {
@@ -14165,6 +14321,9 @@ function buildStartAgentRunFunctionSchema(opts) {
14165
14321
  parameters: {
14166
14322
  type: "object",
14167
14323
  properties: {
14324
+ dimension: { type: "string", enum: ["general", "design_frontend", "writing"], default: "general", description: "\u4EFB\u52A1\u9886\u57DF\u4F18\u5148\u4E8E\u6863\u4F4D\uFF1B\u4EC5\u4F9B\u9009\u4EBA\u53C2\u8003\uFF0C\u4E0D\u6539\u53D8\u51C6\u5165\u3002" },
14325
+ difficulty: { type: "string", description: "easy / normal / complex / extreme\uFF1B\u9ED8\u8BA4 normal\u3002\u58F0\u660E\u672C\u6B21\u4EFB\u52A1\u7684\u96BE\u5EA6\u6863\u4F4D\uFF1B\u5DF2\u77E5\u8DE8\u6863\uFF08\u6240\u9009 Agent \u7684\u6A21\u578B\u6863\u4F4D\u4E0E\u672C\u6863\u4F4D\u4E0D\u4E00\u81F4\uFF09\u4E14\u672A\u7ED9\u51FA selectionReason \u65F6\u62D2\u7EDD\u542F\u52A8\uFF0C\u540C\u6863\u6216\u6863\u4F4D\u672A\u77E5\u4E0D\u62E6\u3002\u4E0D\u81EA\u52A8\u6362\u4EBA\u3001\u4E0D\u53D6\u6D88\u5DF2\u542F\u52A8\u7684 run\u3002", default: "normal" },
14326
+ selectionReason: { type: "string", description: "\u53EF\u9009\u3002\u8DE8\u6863\u9009\u62E9\u7406\u7531\uFF08\u81EA\u7531\u6587\u672C\uFF09\uFF1A\u6240\u9009 Agent \u7684\u6A21\u578B\u6863\u4F4D\u4E0E difficulty \u4E0D\u4E00\u81F4\u65F6\u5FC5\u987B\u7ED9\u51FA\uFF08\u5982\u9886\u57DF\u4F18\u52BF\u3001\u7528\u6237\u660E\u786E\u6307\u5B9A\uFF09\u3002\u53EA\u6821\u9A8C\u7406\u7531\u662F\u5426\u5B58\u5728\uFF0C\u4E0D\u4EE3\u8868\u5DF2\u6838\u5B9E\u7406\u7531\u771F\u5B9E\u6027\u3001\u7528\u6237\u6388\u6743\u6216\u989D\u5EA6/\u8D39\u7528\u6743\u9650\u3002" },
14168
14327
  agentKey: {
14169
14328
  type: "string",
14170
14329
  description: "\u8981\u542F\u52A8\u7684 Agent \u7684\u53EF\u8FD0\u884C dbKey\uFF0C\u5FC5\u987B\u662F listAgents \u8FD4\u56DE\u7684 agentKey \u5B57\u6BB5\uFF08owned: agent-<userId>-<id>\uFF1Bpublic: agent-pub-<id>\uFF09\u6216 readAgent \u8FD4\u56DE\u7684 agentKey\u3002\u53EA\u63A5\u53D7\u7CBE\u786E dbKey\uFF0C\u4E0D\u63A5\u53D7 name/handle/bare id\u3002\u53EF\u9009\uFF1B\u7701\u7565\u6216\u4F20 'self' \u65F6\u81EA\u52A8\u4F7F\u7528\u5F53\u524D AgentKey\uFF08\u6D3E\u53D1\u81EA\u8EAB\u6267\u884C\u7EC6\u5206\u5B50\u4EFB\u52A1\uFF09\u3002"
@@ -14178,7 +14337,7 @@ function buildStartAgentRunFunctionSchema(opts) {
14178
14337
  },
14179
14338
  agentName: {
14180
14339
  type: "string",
14181
- description: "\u53EF\u9009\u3002\u7531 listAgents/readAgent \u5F97\u5230\u7684\u53EF\u8BFB Agent \u540D\u79F0\uFF0C\u7528\u4E8E TUI \u8FD0\u884C\u5361\u7247\u5C55\u793A\u3002"
14340
+ description: "\u53EF\u9009\u3002\u8986\u76D6\u8FD0\u884C\u5361\u7247\u7684 Agent \u5C55\u793A\u540D\uFF1B\u7701\u7565\u65F6\u6309 agentKey \u81EA\u52A8\u8BFB\u53D6\u914D\u7F6E\u4E2D\u7684 name\u3002"
14182
14341
  },
14183
14342
  title: {
14184
14343
  type: "string",
@@ -14193,9 +14352,11 @@ function buildStartAgentRunFunctionSchema(opts) {
14193
14352
  // review findings 与子任务产出都必须可回读——把选项藏起来比写一条
14194
14353
  // 「不要用它」的克制指令更可靠(2026-09-14 owner 反馈)。CLI `--ephemeral`
14195
14354
  // 与 server 透传保持不动,探活/烟测仍走 CLI 侧。
14355
+ // Returns previousRun evidence when available and difficultyRecheckRequired.
14356
+ // Evidence never inherits a tier or bypasses selection_reason_required.
14196
14357
  continueDialogId: {
14197
14358
  type: "string",
14198
- description: "\u53EF\u9009\u3002\u7EED\u8DD1\u5F53\u524D\u7528\u6237\u5DF2\u6709\u7684 dialog\uFF08\u4E0D\u5B58\u5728\u6216\u4E0D\u5C5E\u4E8E\u5F53\u524D\u7528\u6237\u65F6\u663E\u5F0F\u62A5\u9519\uFF0C\u4E0D\u65B0\u5EFA\uFF09\u3002\u9002\u7528\u4E8E\u540C\u4E00\u5B50\u4EFB\u52A1\u7684\u5B9A\u5411\u95ED\u5408\uFF0C\u6838\u9A8C\u4E0A\u4E00\u8F6E finding \u662F\u5426\u4FEE\u597D\uFF1B\u7981\u7528\u4E8E\u8BC4\u5BA1\u7C7B\u4EFB\u52A1\u7684\u72EC\u7ACB\u5224\u65AD\uFF0C\u7EED\u8DD1\u4F1A\u5E26\u5165\u4E4B\u524D\u7684\u7ED3\u8BBA\u3001\u7834\u574F\u72EC\u7ACB\u6027\u30022026-10-19 review \u673A\u5236\u7EA6\u5B9A\uFF1Afull \u5BA1\u67E5\u7528\u65B0 dialog\uFF08\u4E0D\u4F20\u672C\u53C2\u6570\uFF09\uFF0Cclosure \u7528\u7EED\u8DD1\u3002\u7EED\u8DD1\u65F6\u5FC5\u987B\u663E\u5F0F\u4F20\u8BE5\u5BF9\u8BDD\u539F\u672C\u7684 agentKey\uFF08\u5BF9\u8BDD\u7684 primaryAgentKey\uFF09\uFF1A\u7701\u7565 agentKey \u4E0D\u4F1A\u6CBF\u7528\u539F agent\uFF0C\u800C\u662F\u56DE\u843D\u5230\u5F53\u524D\u7F16\u6392\u8005\u81EA\u5DF1\uFF0C\u7B49\u4E8E\u6362\u6A21\u578B\u5E76\u628A\u8FD9\u4EFD\u5BF9\u8BDD\u7684 prompt \u7F13\u5B58\u5168\u90E8\u4F5C\u5E9F\uFF1B\u786E\u9700\u6362\u6A21\u578B\uFF08\u539F agent \u4E0D\u53EF\u7528/\u914D\u989D\u8017\u5C3D\uFF09\u624D\u4F20\u65B0 key\uFF0C\u5E76\u5728 task \u91CC\u8BF4\u660E\u7406\u7531\u3002"
14359
+ description: "\u53EF\u9009\u3002\u7EED\u8DD1\u5F53\u524D\u7528\u6237\u5DF2\u6709\u7684 dialog\uFF08\u4E0D\u5B58\u5728\u6216\u4E0D\u5C5E\u4E8E\u5F53\u524D\u7528\u6237\u65F6\u663E\u5F0F\u62A5\u9519\uFF0C\u4E0D\u65B0\u5EFA\uFF09\u3002\u9002\u7528\u4E8E\u540C\u4E00\u5B50\u4EFB\u52A1\u7684\u5B9A\u5411\u95ED\u5408\uFF0C\u6838\u9A8C\u4E0A\u4E00\u8F6E finding \u662F\u5426\u4FEE\u597D\uFF1B\u7981\u7528\u4E8E\u8BC4\u5BA1\u7C7B\u4EFB\u52A1\u7684\u72EC\u7ACB\u5224\u65AD\uFF0C\u7EED\u8DD1\u4F1A\u5E26\u5165\u4E4B\u524D\u7684\u7ED3\u8BBA\u3001\u7834\u574F\u72EC\u7ACB\u6027\u30022026-10-19 review \u673A\u5236\u7EA6\u5B9A\uFF1Afull \u5BA1\u67E5\u7528\u65B0 dialog\uFF08\u4E0D\u4F20\u672C\u53C2\u6570\uFF09\uFF0Cclosure \u7528\u7EED\u8DD1\u3002\u7EED\u8DD1\u65F6\u5FC5\u987B\u663E\u5F0F\u4F20\u8BE5\u5BF9\u8BDD\u539F\u672C\u7684 agentKey\uFF08\u5BF9\u8BDD\u7684 primaryAgentKey\uFF09\uFF1A\u7701\u7565 agentKey \u4E0D\u4F1A\u6CBF\u7528\u539F agent\uFF0C\u800C\u662F\u56DE\u843D\u5230\u5F53\u524D\u7F16\u6392\u8005\u81EA\u5DF1\uFF0C\u7B49\u4E8E\u6362\u6A21\u578B\u5E76\u628A\u8FD9\u4EFD\u5BF9\u8BDD\u7684 prompt \u7F13\u5B58\u5168\u90E8\u4F5C\u5E9F\uFF1B\u786E\u9700\u6362\u6A21\u578B\uFF08\u539F agent \u4E0D\u53EF\u7528/\u914D\u989D\u8017\u5C3D\uFF09\u624D\u4F20\u65B0 key\uFF0C\u5E76\u5728 task \u91CC\u8BF4\u660E\u7406\u7531\u3002\u53EA\u6709\u7EED\u8DD1\u624D\u5E26\u6B64\u524D\u5BF9\u8BDD\u5386\u53F2\uFF1A\u65B0\u5EFA run\uFF08\u4E0D\u4F20\u672C\u53C2\u6570\uFF09\u6CA1\u6709\u4EFB\u4F55\u6B64\u524D\u5BF9\u8BDD\u5386\u53F2\uFF0C\u540C\u4E00 agentKey \u4E5F\u4E0D\u7B49\u4E8E\u540C\u4E00\u4E0A\u4E0B\u6587\u3002\u7EED\u8DD1\u4F9D\u8D56\u672C\u5730 dialog \u5386\u53F2\uFF1B\u5386\u53F2\u4E0D\u53EF\u7528\u65F6\u8BE5 run \u4F1A\u76F4\u63A5\u5931\u8D25\uFF08\u62A5 Strict continuation history load failed\uFF09\u800C\u4E0D\u4F1A\u9000\u5316\u4E3A\u65B0\u5EFA dialog\u2014\u2014\u6B64\u65F6\u82E5\u6539\u4EE5\u65B0 dialog \u91CD\u6D3E\uFF0C\u7B49\u4E8E\u4E00\u4E2A\u6CA1\u6709\u6B64\u524D\u5386\u53F2\u7684\u65B0\u4EFB\u52A1\uFF0C\u5FC5\u987B\u5728 task \u91CC\u8865\u9F50\u539F finding\u3001\u5FC5\u8981\u4E0A\u4E0B\u6587\u4E0E\u6838\u9A8C\u6807\u51C6\uFF1B\u786E\u5B9E\u4F9D\u8D56\u539F\u5BF9\u8BDD\u5386\u53F2\u65F6\u5E94\u5148\u6062\u590D\u5386\u53F2\uFF0C\u4E0D\u8981\u5047\u88C5\u4ECD\u5728\u7EED\u8DD1\u3002"
14199
14360
  },
14200
14361
  batchId: {
14201
14362
  type: "string",
@@ -14203,7 +14364,7 @@ function buildStartAgentRunFunctionSchema(opts) {
14203
14364
  },
14204
14365
  credentialGroup: {
14205
14366
  type: "string",
14206
- description: "\u53EF\u9009\u3002\u7167\u6284 listAgents \u8FD4\u56DE\u7684 credentialGroup \u5B57\u6BB5\uFF0C\u7528\u4E8E\u540C\u6279\u6B21\u5E76\u53D1\u6247\u51FA\u7684\u51ED\u8BC1\u9694\u79BB\u6821\u9A8C\u3002\u7F3A\u7701/\u7A7A\u503C\u89C6\u4E3A\u300C\u672A\u77E5\u300D\uFF08\u4E0D\u662F\u300C\u72EC\u7ACB\u300D\uFF09\uFF1A\u4E0E\u540C batch \u5185\u4EFB\u4F55\u5176\u4ED6 run \u5E76\u53D1\u90FD\u4F1A\u88AB\u62D2\u7EDD\u3002"
14367
+ description: "\u53EF\u9009\u3002\u517C\u5BB9 listAgents \u8FD4\u56DE\u7684 credentialGroup \u63D0\u793A\uFF1B\u4E0D\u4F5C\u4E3A\u6743\u5A01\u51ED\u636E\u8EAB\u4EFD\u3002Web \u5B88\u536B\u4ECE\u5E94\u7528\u914D\u7F6E\u4E2D\u7684\u51ED\u636E reference \u89E3\u6790\uFF0C\u65E0\u6CD5\u89E3\u6790\u5219\u4E3A\u672A\u77E5\uFF08\u4E0D\u662F\u72EC\u7ACB\uFF09\uFF1B\u670D\u52A1\u7AEF\u4ECD\u6267\u884C\u6700\u7EC8\u51C6\u5165\u6821\u9A8C\u3002"
14207
14368
  },
14208
14369
  allowUnknownCredential: {
14209
14370
  type: "boolean",
@@ -14224,14 +14385,6 @@ function buildStartAgentRunFunctionSchema(opts) {
14224
14385
  type: "boolean",
14225
14386
  description: '\u53EF\u9009\u3002\u4E3A true \u65F6\u672C\u6B21 run \u4F1A\u88AB\u8BB0\u5F55\u8FDB runtime todo\uFF08~/.nolo/todos.json\uFF09\u3002\u4F20\u4E86 batchId \u65F6\u9ED8\u8BA4\u5373\u8BB0\u5F55\uFF08\u6BCF\u6279\u5BF9\u5E94\u4E00\u9879 todo\uFF09\u3002todo \u72B6\u6001\u7531\u5173\u8054 run \u72B6\u6001 + review \u7ED3\u8BBA\u63A8\u5BFC\uFF0C\u7528 controlAgentRun(action:"todo") \u67E5\u8BE2\u3002'
14226
14387
  },
14227
- maxToolCalls: {
14228
- type: "number",
14229
- description: "\u53EF\u9009\u3002\u8FD9\u6B21\u5B50\u4EFB\u52A1\u7684\u5DE5\u5177\u8C03\u7528\u6388\u6743\u989D\u5EA6\uFF08\u786C\u4E0A\u9650\uFF09\u3002\u4E0D\u4F20\u5219\u7528 runtime \u9ED8\u8BA4 200\u3002\u5230\u9650\u5373\u505C\u6B62\u542F\u52A8\u65B0\u7684\u5DE5\u5177\u4E0E\u6A21\u578B\u8C03\u7528\u3001\u6709\u754C\u6536\u5C3E\uFF0C\u8FD4\u56DE\u4E2D\u95F4\u7ED3\u8BBA\u5E76\u6807\u8BB0 budget-exhausted\uFF08\u4E0D\u7B97 provider \u9519\u8BEF\uFF09\u3002\u5E94\u6309\u4EFB\u52A1\u610F\u56FE\u6536\u7D27\uFF1A\u6539\u4E00\u4E2A\u5E38\u91CF\u7ED9 10~20\uFF0C\u5355\u6587\u4EF6\u4FEE\u590D\u7ED9 40\uFF0C\u5BA1\u67E5\u7ED9 60\u3002\u6CE8\u610F\u9ED8\u8BA4 200 \u53EA\u7528\u6765\u515C\u65E0\u754C\u635F\u5931\uFF0C\u4E0D\u662F\u5931\u63A7\u8BC6\u522B\u2014\u2014\u8DD1\u5230\u4E0A\u9650\u4E0D\u4EE3\u8868\u4EFB\u52A1\u6B63\u5E38\u3002"
14230
- },
14231
- maxWallClockMs: {
14232
- type: "number",
14233
- description: "\u53EF\u9009\u3002\u8FD9\u6B21\u5B50\u4EFB\u52A1\u7684\u5899\u949F\u786C\u4E0A\u9650\uFF08\u6BEB\u79D2\uFF09\u3002\u4E0D\u4F20\u5219\u7528 runtime \u9ED8\u8BA4 3600000\uFF0860 \u5206\u949F\uFF09\u3002\u4E0E maxToolCalls \u4EFB\u4E00\u5148\u5230\u5373\u7EC8\u6B62\u3002\u4F5C\u7528\u662F\u515C\u4F4F\u300C\u5355\u6B21\u8C03\u7528\u91CC\u5957\u5FAA\u73AF\u300D\u8FD9\u7C7B\u5DE5\u5177\u8BA1\u6570\u6D4B\u4E0D\u51FA\u8017\u65F6\u7684\u573A\u666F\uFF0C\u4F8B\u5982\u4E00\u6761 shell \u91CC `for i in 1 2 3` \u53CD\u590D\u8DD1\u540C\u4E00\u5957\u6D4B\u8BD5\uFF0C\u8C03\u7528\u6570\u53EA\u6709 1 \u4F46\u8017\u65F6\u5F88\u957F\u3002"
14234
- },
14235
14388
  ...supportsWait ? {
14236
14389
  wait: {
14237
14390
  type: "boolean",
@@ -14264,7 +14417,7 @@ function buildStartAgentRunFunctionSchema(opts) {
14264
14417
  instaboxAllowPaid: { type: "boolean", description: "\u663E\u5F0F\u5141\u8BB8\u4ED8\u8D39\u5EFA\u673A\uFF1B\u9ED8\u8BA4 false\uFF0C\u4FDD\u7559\u514D\u8D39\u989D\u5EA6\u95E8\u7981\u3002" },
14265
14418
  allowHostWrites: {
14266
14419
  type: "boolean",
14267
- description: "\u53EF\u9009\u3002\u4EC5\u5F53 runtimeKey='local' \u65F6\u9700\u8981\u663E\u5F0F\u58F0\u660E\uFF1A\u8868\u793A\u8C03\u7528\u65B9\u540C\u610F\u5B50 run \u76F4\u63A5\u5728**\u5BBF\u4E3B\u6587\u4EF6\u7CFB\u7EDF**\u4E0A\u8BFB\u5199\u4EE3\u7801\uFF08\u65E0\u9694\u79BB\uFF09\u3002runtimeKey='local' \u4F46\u672A\u58F0\u660E\u65F6\u4F1A\u88AB\u663E\u5F0F\u62D2\u7EDD\uFF08\u4E0D\u56DE\u843D\u5BBF\u4E3B\u3001\u4E5F\u4E0D\u6084\u6084\u6539\u6210 docker\uFF09\u3002\u7701\u7565 runtimeKey \u65F6\u65E0\u6548\u3002\u6CE8\u610F**\u7701\u7565 key \u65F6\u7684\u9ED8\u8BA4\u4F4D\u7F6E\u6709\u4F8B\u5916**\uFF1A\u5199\u578B\u6D3E\u53D1\u9ED8\u8BA4\u8FDB\u672C\u673A docker \u6C99\u76D2\uFF1B\u53EA\u8BFB\u6D3E\u53D1\uFF08readOnly=true\uFF09\u4ECD\u5728\u5BBF\u4E3B\u6267\u884C\uFF08\u5B83\u79FB\u9664\u4E86\u4E13\u7528\u5199\u5DE5\u5177\uFF0C\u8D77\u6C99\u76D2\u662F\u6D6A\u8D39\uFF1B\u4F46 shell \u4ECD\u53EF\u5199\u6587\u4EF6\uFF0C\u8FD9\u4E0D\u662F\u6587\u4EF6\u7CFB\u7EDF\u53EA\u8BFB\u9694\u79BB\uFF09\u3002"
14420
+ description: "\u53EF\u9009\u3002\u4EC5\u5F53 runtimeKey='local' \u65F6\u9700\u8981\u663E\u5F0F\u58F0\u660E\uFF1A\u8868\u793A\u8C03\u7528\u65B9\u540C\u610F\u5B50 run \u76F4\u63A5\u5728**\u5BBF\u4E3B\u6587\u4EF6\u7CFB\u7EDF**\u4E0A\u8BFB\u5199\u4EE3\u7801\uFF08\u65E0\u9694\u79BB\uFF09\u3002runtimeKey='local' \u4F46\u672A\u58F0\u660E\u65F6\u4F1A\u88AB\u663E\u5F0F\u62D2\u7EDD\uFF08\u4E0D\u56DE\u843D\u5BBF\u4E3B\u3001\u4E5F\u4E0D\u6084\u6084\u6539\u6210 docker\uFF09\u3002\u7701\u7565 runtimeKey \u65F6\u65E0\u6548\u3002\u6CE8\u610F**\u7701\u7565 key \u65F6\u7684\u9ED8\u8BA4\u4F4D\u7F6E\u6709\u4F8B\u5916**\uFF1A\u5199\u578B\u6D3E\u53D1\u9ED8\u8BA4\u8FDB\u672C\u673A docker \u6C99\u76D2\uFF1B\u53EA\u8BFB\u6D3E\u53D1\uFF08readOnly=true\uFF09\u5F53\u524D\u5B9E\u73B0\u4ECD\u7559\u5728\u5BBF\u4E3B\u6267\u884C\uFF08\u5B83\u79FB\u9664\u7684\u662F nolo \u4FA7\u4E13\u7528\u5199\u5DE5\u5177\uFF1Bshell \u4E0E\u5916\u90E8 CLI \u901A\u9053\u4ECD\u53EF\u5199\u6587\u4EF6\uFF0C\u8FD9\u4E0D\u662F\u6587\u4EF6\u7CFB\u7EDF\u53EA\u8BFB\u9694\u79BB\uFF09\u3002"
14268
14421
  }
14269
14422
  },
14270
14423
  required: ["task", "title"]
@@ -14325,23 +14478,7 @@ async function startAgentRunFunc(args, thunkApi, _context) {
14325
14478
  );
14326
14479
  }
14327
14480
  const effectiveAllowCredentialConcurrency = args.allowCredentialConcurrency ?? true;
14328
- if (explicitBatchId) {
14329
- const nowMs = Date.now();
14330
- pruneBatchFanoutRegistry(nowMs);
14331
- const active = batchFanoutRegistry.get(explicitBatchId) ?? [];
14332
- const verdict = checkCredentialFanout({
14333
- active,
14334
- candidate: { agentKey: effectiveAgentKey, credentialGroup: args.credentialGroup },
14335
- allowUnknownCredential: args.allowUnknownCredential === true,
14336
- allowCredentialConcurrency: effectiveAllowCredentialConcurrency
14337
- });
14338
- if (!verdict.allowed) throw new Error(verdict.message);
14339
- }
14340
14481
  const content = buildDelegatedTaskContent(task, input);
14341
- const dispatchedSubtaskBudget = resolveDispatchedSubtaskBudget({
14342
- ...typeof args.maxToolCalls === "number" ? { maxToolCalls: args.maxToolCalls } : {},
14343
- ...typeof args.maxWallClockMs === "number" ? { maxWallClockMs: args.maxWallClockMs } : {}
14344
- });
14345
14482
  const payloadMetrics = calculateDelegatedPayloadMetrics(task, input, content);
14346
14483
  const activeDialogKey = getActiveDialogKey();
14347
14484
  const explicitParentDialogId = typeof args.parentDialogId === "string" && args.parentDialogId.trim() ? args.parentDialogId.includes("-") ? extractCustomId(args.parentDialogId) : args.parentDialogId.trim() : void 0;
@@ -14355,7 +14492,44 @@ async function startAgentRunFunc(args, thunkApi, _context) {
14355
14492
  throw new Error(HOST_EXECUTOR_UNAVAILABLE_MESSAGE);
14356
14493
  }
14357
14494
  }
14495
+ const state2 = thunkApi.getState();
14496
+ const config = state2?.db ? selectById(state2, effectiveAgentKey) : void 0;
14497
+ const credentialGroup = deriveCredentialGroup(config?.apiKeyRef ?? config?.credentialRef)?.credentialGroup;
14498
+ let selectionCheck = assertDispatchSelectionAdmission({
14499
+ dimension: args.dimension,
14500
+ difficulty: args.difficulty,
14501
+ model: config?.model,
14502
+ selectionReason: args.selectionReason
14503
+ });
14504
+ let entries;
14505
+ let reservation;
14506
+ if (explicitBatchId) {
14507
+ entries = batchFanoutRegistry.get(explicitBatchId);
14508
+ if (!entries) {
14509
+ entries = [];
14510
+ batchFanoutRegistry.set(explicitBatchId, entries);
14511
+ }
14512
+ const verdict = checkCredentialFanout({
14513
+ active: entries,
14514
+ candidate: { agentKey: effectiveAgentKey, credentialGroup },
14515
+ allowUnknownCredential: args.allowUnknownCredential === true,
14516
+ allowCredentialConcurrency: effectiveAllowCredentialConcurrency
14517
+ });
14518
+ if (!verdict.allowed && entries.some((entry) => !entry.runId)) throw new Error(verdict.message);
14519
+ reservation = { agentKey: effectiveAgentKey, credentialGroup };
14520
+ entries.push(reservation);
14521
+ }
14358
14522
  try {
14523
+ if (entries && reservation) {
14524
+ await refreshBatchFanout(entries, thunkApi);
14525
+ const verdict = checkCredentialFanout({
14526
+ active: entries.filter((entry) => entry !== reservation),
14527
+ candidate: reservation,
14528
+ allowUnknownCredential: args.allowUnknownCredential === true,
14529
+ allowCredentialConcurrency: effectiveAllowCredentialConcurrency
14530
+ });
14531
+ if (!verdict.allowed) throw new Error(verdict.message);
14532
+ }
14359
14533
  const bgResult = runtimeKey === "local" ? await hostAgentRunDispatcher({
14360
14534
  agentKey: effectiveAgentKey,
14361
14535
  userInput: content,
@@ -14363,9 +14537,8 @@ async function startAgentRunFunc(args, thunkApi, _context) {
14363
14537
  waitForCompletion: wait === true,
14364
14538
  runKind: "subtask",
14365
14539
  runTitle: title,
14540
+ selectionCheck,
14366
14541
  runtimeKey: "local",
14367
- // 已解析的硬预算(子 run 只消费,不再自行读 env)。
14368
- subtaskBudgetLimits: dispatchedSubtaskBudget.limits,
14369
14542
  allowHostWrites: true,
14370
14543
  ...args.readOnly === true ? { readOnly: true } : {},
14371
14544
  ...parentDialogId ? { parentDialogId } : {}
@@ -14380,36 +14553,42 @@ async function startAgentRunFunc(args, thunkApi, _context) {
14380
14553
  waitForCompletion: wait === true,
14381
14554
  runKind: "subtask",
14382
14555
  runTitle: title,
14383
- // 已解析的硬预算(子 run 只消费,不再自行读 env)。
14384
- subtaskBudgetLimits: dispatchedSubtaskBudget.limits,
14556
+ selectionCheck,
14385
14557
  ...args.readOnly === true ? { readOnly: true } : {},
14386
14558
  ...parentDialogId ? { parentDialogId } : {},
14387
14559
  ...runtimeKey ? { runtimeKey } : {}
14388
14560
  })
14389
14561
  ).unwrap();
14562
+ selectionCheck = bgResult.selectionCheck ?? selectionCheck;
14563
+ const contextFacts = bgResult.contextMode ? { contextMode: bgResult.contextMode, agentChanged: bgResult.agentChanged === true, ...bgResult.contextNote ? { contextNote: bgResult.contextNote } : {} } : {};
14564
+ const continuationEvidence = continueDialogId ? {
14565
+ difficultyRecheckRequired: true,
14566
+ ...bgResult.previousRun ? { previousRun: bgResult.previousRun } : {}
14567
+ } : {};
14390
14568
  if (wait === true) {
14391
14569
  const fullContent = bgResult.content ?? "";
14392
14570
  return {
14393
14571
  rawData: resultMode === "summary" ? summarizeChildContent(fullContent) : fullContent,
14394
14572
  displayData: `\u2705 startAgentRun \u540C\u6B65\u5B8C\u6210\uFF0CdialogId: ${bgResult.dialogId}${resultMode === "summary" ? "\uFF08summary\uFF09" : ""}`,
14395
14573
  metadata: {
14396
- payloadMetrics
14574
+ payloadMetrics,
14575
+ selectionCheck,
14576
+ ...contextFacts,
14577
+ ...continuationEvidence
14397
14578
  }
14398
14579
  };
14399
14580
  }
14400
14581
  const runId = bgResult.dialogId;
14401
- if (explicitBatchId) {
14402
- const entries = batchFanoutRegistry.get(explicitBatchId) ?? [];
14403
- entries.push({
14404
- runId,
14405
- agentKey: effectiveAgentKey,
14406
- ...typeof args.credentialGroup === "string" && args.credentialGroup.trim() ? { credentialGroup: args.credentialGroup.trim() } : {},
14407
- startedAtMs: Date.now()
14408
- });
14409
- batchFanoutRegistry.set(explicitBatchId, entries);
14582
+ if (reservation) {
14583
+ if (typeof runId !== "string" || !runId) throw new Error("batch admission: creation returned no runId");
14584
+ reservation.runId = runId;
14410
14585
  }
14411
14586
  const status = bgResult.status ?? "pending";
14412
- const resolvedName = agentName?.trim() || bgResult.agentName || bgResult.name;
14587
+ const resolvedName = await resolveAgentRunName(
14588
+ effectiveAgentKey,
14589
+ [agentName, bgResult.agentName, bgResult.name],
14590
+ async (dbKey) => dispatch(read({ dbKey })).unwrap()
14591
+ );
14413
14592
  const identity = { agentName: resolvedName, agentKey: effectiveAgentKey, runId };
14414
14593
  const taskPreview = task.replace(/\s+/g, " ").trim().slice(0, TASK_PREVIEW_MAX);
14415
14594
  return {
@@ -14417,6 +14596,8 @@ async function startAgentRunFunc(args, thunkApi, _context) {
14417
14596
  runId,
14418
14597
  status,
14419
14598
  agentKey,
14599
+ ...contextFacts,
14600
+ ...continuationEvidence,
14420
14601
  // batchId is always returned — minted above when the caller didn't
14421
14602
  // supply one — so controlAgentRun(list, batchId=...) works on every
14422
14603
  // host. On the server path the id lives in the tool return; on the
@@ -14425,7 +14606,8 @@ async function startAgentRunFunc(args, thunkApi, _context) {
14425
14606
  ...resolvedName ? { agentName: resolvedName } : {},
14426
14607
  ...taskPreview ? { taskPreview } : {},
14427
14608
  ...title ? { title } : {},
14428
- payloadMetrics
14609
+ payloadMetrics,
14610
+ selectionCheck
14429
14611
  },
14430
14612
  displayData: formatStartRunCard(resolveRunLabel(identity), status, {
14431
14613
  task: taskPreview,
@@ -14438,6 +14620,11 @@ async function startAgentRunFunc(args, thunkApi, _context) {
14438
14620
  };
14439
14621
  } catch (e) {
14440
14622
  throw new Error(`startAgentRun \u542F\u52A8 Agent [${agentKey}] \u5931\u8D25: ${toErrorMessage(e)}`);
14623
+ } finally {
14624
+ if (entries && reservation && !reservation.runId) {
14625
+ const index = entries.indexOf(reservation);
14626
+ if (index >= 0) entries.splice(index, 1);
14627
+ }
14441
14628
  }
14442
14629
  }
14443
14630
  var SUMMARY_HEAD_CHARS = 1500;
@@ -14462,6 +14649,7 @@ var CONTROL_AGENT_RUN_ACTIONS = [
14462
14649
  "append"
14463
14650
  ];
14464
14651
  var ACTION_DESCRIPTIONS = {
14652
+ recoverPreparedWriter: "recoverPreparedWriter=\u4EC5\u672C\u5730\uFF1A\u663E\u5F0F\u64A4\u9500\u540C\u4E00 attemptId \u7684 fenced-launch-v1 prepared writer \u5E76\u91CA\u653E claim\uFF1Bgranted\u3001legacy\u3001unknown \u6216 attempt \u4E0D\u5339\u914D\u5747\u62D2\u7EDD\uFF1B\u4E0D\u7EC8\u6B62\u8FDB\u7A0B\u3001\u4E0D\u63D0\u4F9B force",
14465
14653
  list: "list=\u5217\u51FA run\uFF08\u7701\u7565 runId\uFF09",
14466
14654
  status: "status=\u67E5\u5355\u6761 run \u72B6\u6001 + \u53EF\u9009\u65E5\u5FD7\uFF1B\u7EC8\u6001 run \u7684\u5B8C\u6574\u7ED3\u8BBA\u5728\u8FD4\u56DE\u7684 resultFile\uFF08\u7528 readFile \u8BFB\u539F\u6587\uFF1BlastAssistantText \u53EA\u662F 2000 \u5B57\u6458\u8981\uFF0C\u4E0D\u5B58\u5728\u65F6\u8BFB resultFile\uFF09\uFF1BresultFile \u7F3A\u5931\u53EF\u80FD\u662F run \u88AB\u7528\u6237\u4E2D\u65AD\uFF0C\u6309\u300C\u65E0\u7ED3\u8BBA\u300D\u5904\u7406\uFF0C\u4E0D\u636E\u6B64\u5224\u5DE5\u5177\u6545\u969C",
14467
14655
  stop: "stop=\u53D6\u6D88 run",
@@ -14492,9 +14680,13 @@ function buildControlAgentRunFunctionSchema(opts) {
14492
14680
  type: "string",
14493
14681
  description: "\u76EE\u6807 run \u7684 ID\uFF08startAgentRun \u8FD4\u56DE\u7684 runId\uFF09\u3002action=list \u65F6\u7701\u7565\u3002"
14494
14682
  },
14683
+ ...actions.includes("recoverPreparedWriter") ? { attemptId: {
14684
+ type: "string",
14685
+ description: "recoverPreparedWriter \u5FC5\u586B\uFF1Astatus \u8FD4\u56DE\u7684 writerLaunch.attemptId\uFF1B\u5FC5\u987B\u4E0E\u76EE\u6807 prepared attempt \u5B8C\u5168\u76F8\u540C\u3002\u73AF\u5883\u53D8\u91CF\u4EC5 locator\uFF0C\u4E0D\u6388\u4E88\u6062\u590D\u6743\u9650\u3002"
14686
+ } } : {},
14495
14687
  dialogKey: {
14496
14688
  type: "string",
14497
- description: "\u53EF\u9009\u3002action=append \u65F6\u76EE\u6807 dialog \u7684 dbKey\uFF08\u5982 dialog-user-xxx\uFF09\u3002\u7F3A\u7701\u65F6\u7531 runId \u63A8\u5BFC\u3002"
14689
+ description: "\u53EF\u9009\u3002action=append \u65F6\u76EE\u6807 dialog \u7684 dbKey\uFF08\u5982 dialog-user-xxx\uFF09\u3002\u7ED9\u4E86 runId \u65F6\u7531 runId \u63A8\u5BFC\uFF1B\u672C\u5730 CLI \u5BBF\u4E3B\u4E0A\u53EA\u7ED9 dialogKey = \u5411\u540C\u7528\u6237\u6D3B\u7740\u7684\u666E\u901A CLI dialog \u6295\u9012\u4E00\u6761\u901A\u77E5\uFF08\u8FDB\u5B83\u73B0\u6709\u961F\u5217\u6392\u961F\uFF0C\u4E0D\u542F\u52A8 run/\u6A21\u578B\uFF0C\u7B49\u5F85\u786E\u8BA4\u6216 stop \u65F6\u53EA defer\uFF1B\u76EE\u6807\u79BB\u7EBF\u6216\u65E0\u63A5\u6536\u5668\u65F6\u660E\u786E\u8FD4\u56DE unsupported/offline\uFF0C\u4E0D\u9759\u9ED8\u843D\u5E93\uFF09\u3002"
14498
14690
  },
14499
14691
  userInput: {
14500
14692
  type: "string",
@@ -14503,7 +14695,7 @@ function buildControlAgentRunFunctionSchema(opts) {
14503
14695
  mode: {
14504
14696
  type: "string",
14505
14697
  enum: ["enqueue", "continue"],
14506
- description: "\u53EF\u9009\u3002action=append \u65F6\u7684\u8FFD\u52A0\u6A21\u5F0F\uFF1Aenqueue=\u52A0\u5165\u961F\u5217\u4F9B\u4E0B\u4E00\u8F6E\u6D88\u8D39\uFF1Bcontinue=\u7EC8\u6001\u7EED\u8DD1\u3002\u7F3A\u7701\u65F6\u81EA\u52A8\u6839\u636E run \u72B6\u6001\u9002\u914D\u3002"
14698
+ description: "\u53EF\u9009\u3002action=append \u65F6\u7684\u8FFD\u52A0\u6A21\u5F0F\uFF1Aenqueue=\u52A0\u5165\u961F\u5217\u4F9B\u4E0B\u4E00\u8F6E\u6D88\u8D39\uFF1Bcontinue=\u7EC8\u6001\u7EED\u8DD1\uFF08\u9700\u8981 runId\uFF1B\u672C\u5730 CLI \u5BBF\u4E3B\u4E0A\u53EA\u7ED9 dialogKey \u65F6\u4EC5\u652F\u6301 enqueue\uFF09\u3002\u7F3A\u7701\u65F6\u81EA\u52A8\u6839\u636E run \u72B6\u6001\u9002\u914D\u3002"
14507
14699
  },
14508
14700
  ...hasWait ? {
14509
14701
  timeoutMs: {
@@ -18110,6 +18302,32 @@ var deriveAppIdFromRouteKey = (appKey, userId) => {
18110
18302
  return legacyAppId || void 0;
18111
18303
  };
18112
18304
 
18305
+ // packages/core/appHttpUrl.ts
18306
+ var HTTP_PROTOCOLS = /* @__PURE__ */ new Set(["http:", "https:"]);
18307
+ var normalizeAbsoluteUrl = (value) => {
18308
+ if (typeof value !== "string") return void 0;
18309
+ const trimmed2 = value.trim();
18310
+ if (!trimmed2) return void 0;
18311
+ return trimmed2;
18312
+ };
18313
+ var parseHttpUrl = (value) => {
18314
+ const normalized = normalizeAbsoluteUrl(value);
18315
+ if (!normalized) return void 0;
18316
+ let parsed;
18317
+ try {
18318
+ parsed = new URL(normalized);
18319
+ } catch {
18320
+ return void 0;
18321
+ }
18322
+ if (!HTTP_PROTOCOLS.has(parsed.protocol)) return void 0;
18323
+ return parsed;
18324
+ };
18325
+ var normalizeAppHttpUrl = (value) => {
18326
+ const normalized = normalizeAbsoluteUrl(value);
18327
+ if (!normalized || !parseHttpUrl(normalized)) return void 0;
18328
+ return normalized;
18329
+ };
18330
+
18113
18331
  // packages/app/types/appSummary.ts
18114
18332
  var toIsoString = (value) => {
18115
18333
  const timestamp = toTimestampMs(value);
@@ -18130,18 +18348,25 @@ function toAppSummary(record, fallbackServerOrigin) {
18130
18348
  if (!appKey) return null;
18131
18349
  const appId = explicitAppId ?? deriveAppIdFromRouteKey(appKey, record.userId);
18132
18350
  const name = typeof record.name === "string" && record.name.trim().length > 0 ? record.name : appId ?? appKey;
18351
+ const versionServerOrigin = typeof record.versionServerOrigin === "string" && record.versionServerOrigin.trim().length > 0 ? record.versionServerOrigin.trim() : void 0;
18352
+ const hostServerOrigin = typeof record.serverOrigin === "string" && record.serverOrigin.trim().length > 0 ? record.serverOrigin.trim() : fallbackServerOrigin;
18353
+ const recordedUrl = normalizeAppHttpUrl(record.url);
18133
18354
  return {
18134
18355
  name,
18135
- url: buildAppUrl(record.serverOrigin ?? fallbackServerOrigin, appId),
18356
+ url: recordedUrl ?? buildAppUrl(versionServerOrigin ?? hostServerOrigin, appId),
18136
18357
  appId,
18137
18358
  appKey,
18138
- serverOrigin: typeof record.serverOrigin === "string" && record.serverOrigin.trim().length > 0 ? record.serverOrigin : fallbackServerOrigin,
18359
+ serverOrigin: hostServerOrigin,
18360
+ versionServerOrigin,
18139
18361
  spaceId: typeof record.spaceId === "string" && record.spaceId.trim().length > 0 ? record.spaceId : null,
18140
18362
  customUrl: typeof record.customUrl === "string" && record.customUrl.trim().length > 0 ? record.customUrl : void 0,
18141
18363
  modifiedOn: toIsoString(record.updatedAt ?? record.createdAt),
18142
18364
  visibility: record.visibility ?? "private",
18143
18365
  deployMode: record.deployMode ?? "platform",
18144
- icon: record.icon ?? null
18366
+ icon: record.icon ?? null,
18367
+ // 记录里的真实 owner(服务端记录字段,不是客户端推测)。卡片上的
18368
+ // 「发布到社区」用它门控:非 owner 不渲染,避免假按钮(review 假按钮)。
18369
+ ownerUserId: typeof record.userId === "string" && record.userId.trim().length > 0 ? record.userId.trim() : void 0
18145
18370
  };
18146
18371
  }
18147
18372
 
@@ -18177,6 +18402,11 @@ var toTimestamp = (value) => typeof value === "number" ? value : Date.parse(valu
18177
18402
  var normalizeSpaceId2 = (spaceId) => {
18178
18403
  return asOptionalTrimmedString(spaceId) ?? null;
18179
18404
  };
18405
+ var normalizeTrimmedOrUndefined = (value) => {
18406
+ if (typeof value !== "string") return void 0;
18407
+ const trimmed2 = value.trim();
18408
+ return trimmed2.length > 0 ? trimmed2 : void 0;
18409
+ };
18180
18410
  var resolveRecordTimestamp = (record) => record.updatedAt ?? record.updated_at ?? record.createdAt ?? record.created ?? 0;
18181
18411
  function pinnedFirst(a, b) {
18182
18412
  return Number(Boolean(b.pinned)) - Number(Boolean(a.pinned));
@@ -18229,6 +18459,7 @@ function buildMyContentItemsFromUserData(records, currentServer = "", spaceNameB
18229
18459
  originalName: typeof record.originalName === "string" && record.originalName.trim().length > 0 ? record.originalName : void 0,
18230
18460
  contentKey,
18231
18461
  ...record.type === "dialog" ? { status: dialogSummaryStatus(record.status), unreadAt: dialogSummaryUnreadAt(record.unreadAt) } : {},
18462
+ ...contentType === "dialog" && typeof record.userId === "string" && record.userId.trim() && contentKey.startsWith(`dialog-${record.userId.trim()}-`) && contentKey.length > `dialog-${record.userId.trim()}-`.length ? { userId: record.userId.trim(), dialogId: contentKey.slice(`dialog-${record.userId.trim()}-`.length) } : {},
18232
18463
  pinned: Boolean(record.pinned),
18233
18464
  createdAt: record.createdAt ?? record.created ?? 0,
18234
18465
  updatedAt: timestamp,
@@ -18237,8 +18468,10 @@ function buildMyContentItemsFromUserData(records, currentServer = "", spaceNameB
18237
18468
  spaceId,
18238
18469
  spaceName,
18239
18470
  serverOrigin: typeof record.serverOrigin === "string" && record.serverOrigin.trim().length > 0 ? record.serverOrigin : void 0,
18240
- cybots: record.cybots,
18241
- primaryAgentKey: record.primaryAgentKey || record.primaryCybotKey || record.runtimeBinding?.agentKey || (Array.isArray(record.cybots) && record.cybots.length > 0 ? record.cybots[0] : void 0)
18471
+ cybots: Array.isArray(record.cybots) ? record.cybots.filter((entry) => typeof entry === "string" && entry.trim().length > 0) : void 0,
18472
+ primaryAgentKey: record.primaryAgentKey || record.primaryCybotKey || record.runtimeBinding?.agentKey || (Array.isArray(record.cybots) && record.cybots.length > 0 ? record.cybots[0] : void 0),
18473
+ parentDialogId: normalizeTrimmedOrUndefined(record.parentDialogId),
18474
+ rootDialogId: normalizeTrimmedOrUndefined(record.rootDialogId)
18242
18475
  }
18243
18476
  ];
18244
18477
  });
@@ -18701,7 +18934,7 @@ async function updateDocFunc(args, thunkApi) {
18701
18934
  updated_at: (/* @__PURE__ */ new Date()).toISOString()
18702
18935
  };
18703
18936
  await dispatch(write({ data: updatedPageData, customKey: id })).unwrap();
18704
- const { getDocState, applyExternalDocUpdate } = await import("./docStore-KNZK6Y2G.js");
18937
+ const { getDocState, applyExternalDocUpdate } = await import("./docStore-2VAWVLWH.js");
18705
18938
  if (getDocState().pageKey === id) {
18706
18939
  applyExternalDocUpdate({
18707
18940
  slateData: finalSlateData,
@@ -18726,7 +18959,7 @@ async function updateDocFunc(args, thunkApi) {
18726
18959
  // packages/ai/tools/updateUserPreferenceProfileTool.ts
18727
18960
  async function dispatchSetSettings(thunkApi, changes) {
18728
18961
  const injectedSetSettings = thunkApi?.extra?.setSettings;
18729
- const setSettings = typeof injectedSetSettings === "function" ? injectedSetSettings : (await import("./settingThunks-UGBPCNYF.js")).setSettings;
18962
+ const setSettings = typeof injectedSetSettings === "function" ? injectedSetSettings : (await import("./settingThunks-ENOAK2WV.js")).setSettings;
18730
18963
  await thunkApi.dispatch(setSettings(changes)).unwrap();
18731
18964
  }
18732
18965
  var updateUserPreferenceProfileFunctionSchema = {
@@ -19095,7 +19328,7 @@ async function runZiweiChart(input) {
19095
19328
  const gender = normalizeGender(input.gender);
19096
19329
  const fixLeap = input.fixLeap !== false;
19097
19330
  const isLeapMonth = input.isLeapMonth === true;
19098
- const { astro } = await import("./lib-5KKIBFIT.js");
19331
+ const { astro } = await import("./lib-OT5OTXRU.js");
19099
19332
  const rawChart = calendarType === "lunar" ? astro.byLunar(dateStr, timeIndex, gender, isLeapMonth, fixLeap, language) : astro.bySolar(dateStr, timeIndex, gender, fixLeap, language);
19100
19333
  const palaces = rawChart.palaces.map((palace) => ({
19101
19334
  index: palace.index,
@@ -19318,6 +19551,16 @@ async function toolQueryFunc(args) {
19318
19551
  return { rawData, displayData };
19319
19552
  }
19320
19553
  var baseToolDefinitions = [
19554
+ {
19555
+ id: "secretRequest",
19556
+ schema: secretRequestFunctionSchema,
19557
+ executor: secretRequestFunc,
19558
+ description: {
19559
+ name: "secret-request",
19560
+ description: "\u5411\u7528\u6237\u8BF7\u6C42\u5177\u540D\u51ED\u636E\uFF0C\u5BBF\u4E3B\u9762\u677F\u8F93\u5165\u540E\u5199\u5165\u672C\u673A secret store\uFF1B\u503C\u4E0D\u8FDB\u5BF9\u8BDD\u3002",
19561
+ category: "interaction"
19562
+ }
19563
+ },
19321
19564
  {
19322
19565
  id: "uiAskChoice",
19323
19566
  schema: uiAskChoiceFunctionSchema,
@@ -21110,6 +21353,7 @@ export {
21110
21353
  deleteMemoryFunctionSchema,
21111
21354
  queryMemoryFunctionSchema,
21112
21355
  normalizeContinueDialogId,
21356
+ resolveRunContextFacts,
21113
21357
  resolveStartAgentRunCwd,
21114
21358
  isDockerRuntimeKey,
21115
21359
  resolveCliLocalRuntimeKeyCapability,