nolo-cli 0.107.0-alpha.4 → 0.107.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 (211) hide show
  1. package/README.md +1 -1
  2. package/{_executeModel-UDCSOTD2.js → _executeModel-M573MKVE.js} +78 -70
  3. package/action-GVA5ARSJ.js +20 -0
  4. package/{addContentAction-MB2HHMDZ.js → addContentAction-M2WOWZCL.js} +13 -12
  5. package/{addDialogAgentAction-MCEABSBA.js → addDialogAgentAction-QMAQ5Z6N.js} +19 -20
  6. package/{agentDeleteCommand-OWYHN6D6.js → agentDeleteCommand-ZFHYRHBS.js} +118 -43
  7. package/{agentEmailCommands-AU5I4M4W.js → agentEmailCommands-X6AVPIVQ.js} +100 -90
  8. package/agentListCommands-PAD2CI2I.js +741 -0
  9. package/{agentMachineCommands-YMNME2L6.js → agentMachineCommands-UPH6RJCC.js} +50 -46
  10. package/{agentProviderCommands-GNPTL5XR.js → agentProviderCommands-CMVTBY5X.js} +97 -2
  11. package/{agentPullCommand-O5MPVJ5E.js → agentPullCommand-B4T2DJ5H.js} +1 -1
  12. package/agentRecordCommands-UMACPRAF.js +138 -0
  13. package/agentRunCommand-H6KKHHMU.js +167 -0
  14. package/{agentRunControl-AVJR4JW4.js → agentRunControl-3HWA2LLQ.js} +2 -2
  15. package/{agentRuntimeLocal-KCMC2TBD.js → agentRuntimeLocal-N4YGKL7M.js} +44 -40
  16. package/{agentSlice-R7PR6KYM.js → agentSlice-2LPP43XH.js} +15 -14
  17. package/{appDeleteCommands-JEPA3EWE.js → appDeleteCommands-7DAF33AM.js} +46 -42
  18. package/{appDeployCommands-UTB76XFM.js → appDeployCommands-ZPZSMFGZ.js} +46 -42
  19. package/{appDeployStatusCommands-LGHF2SBD.js → appDeployStatusCommands-FWBDSSS5.js} +46 -42
  20. package/{appGetCommands-PX2BFHOB.js → appGetCommands-SZZOHGEP.js} +46 -42
  21. package/{appListCommands-BSMPTWKC.js → appListCommands-FPMUBDPM.js} +46 -42
  22. package/{authCommand-YW42YZA4.js → authCommand-VL3G26NQ.js} +119 -25
  23. package/{authCommands-RGOGCPP6.js → authCommands-5RTUDYZW.js} +7 -5
  24. package/{builtinSkillRegistry-FUAVTRVZ.js → builtinSkillRegistry-ZK4K67Y5.js} +11 -9
  25. package/{chromeCommands-FZYAU75D.js → chromeCommands-AU5ZJXBG.js} +289 -37
  26. package/{chromeOpsCommands-62P2Q2YB.js → chromeOpsCommands-ZYTCMNHG.js} +156 -22
  27. package/{chunk-JEDZAO7L.js → chunk-2SYTUTLI.js} +257 -37
  28. package/{chunk-HVURBGF3.js → chunk-2U3NHADM.js} +6 -6
  29. package/{chunk-QTGQ2LTL.js → chunk-3DQY5IFB.js} +6 -10
  30. package/{chunk-XT35TTFG.js → chunk-3IXAHOJS.js} +19 -21
  31. package/{chunk-UVA7OYO3.js → chunk-3W67RV75.js} +29 -9
  32. package/chunk-4LCOCOR5.js +50 -0
  33. package/{chunk-JPGCXHNM.js → chunk-4LKMZ3RR.js} +1 -1
  34. package/{chunk-2GRGFCF6.js → chunk-4VJAC32I.js} +2 -1
  35. package/{chunk-6D6VBVEW.js → chunk-4W24JM32.js} +80 -14
  36. package/{chunk-MC4XLIJ7.js → chunk-523DITKR.js} +1 -1
  37. package/{chunk-E4MARS3Q.js → chunk-5GVBDNTO.js} +1 -1
  38. package/{chunk-C3M4465B.js → chunk-5HYJ3DSZ.js} +404 -659
  39. package/chunk-5MMAK75Q.js +15 -0
  40. package/{chunk-7S4YWN7P.js → chunk-5UUIGN6I.js} +4 -4
  41. package/{chunk-42V6BK2E.js → chunk-62IL3KQV.js} +4 -34
  42. package/{chunk-4MK3I7Y4.js → chunk-6MAW4XOF.js} +5 -5
  43. package/{chunk-3UZPUAES.js → chunk-74PPKIY2.js} +1 -1
  44. package/chunk-76HO2DP6.js +15 -0
  45. package/{chunk-ASIFZ2WY.js → chunk-7BBP7ZX3.js} +66 -54
  46. package/{chunk-VLTIYV3X.js → chunk-7I25CBT5.js} +34 -8
  47. package/{chunk-IBOZNTG2.js → chunk-7X5XZ34C.js} +23 -28
  48. package/chunk-AGIM7IMJ.js +147 -0
  49. package/{chunk-5UTFL4QJ.js → chunk-APO5TOXO.js} +1 -1
  50. package/{chunk-EEGDMATE.js → chunk-AZOVPTL6.js} +91 -81
  51. package/{chunk-6OZ36FXI.js → chunk-BIPGGSJS.js} +22 -4
  52. package/{chunk-EYAQT56M.js → chunk-BNQMNUKZ.js} +9 -6
  53. package/{chunk-62CATUYY.js → chunk-CBUMFIFE.js} +834 -962
  54. package/{chunk-OIVSQH2O.js → chunk-CDEEFJXN.js} +308 -11
  55. package/chunk-CHOZJMJS.js +78 -0
  56. package/{chunk-ETI2NYVF.js → chunk-CIP3AAMT.js} +4 -4
  57. package/{chunk-GBRG75BQ.js → chunk-D2MDMY2M.js} +1 -0
  58. package/{chunk-W7HLWAQ7.js → chunk-DE45KZNH.js} +118 -90
  59. package/{chunk-Q554LLSI.js → chunk-DMXLXZKL.js} +1 -1
  60. package/{chunk-3VNWWVKB.js → chunk-E3YWHWCR.js} +50 -18
  61. package/{chunk-HKNXJGEC.js → chunk-ECFHBYUW.js} +85 -50
  62. package/{chunk-ACTMNVHM.js → chunk-EHSYSKXV.js} +1 -1
  63. package/{chunk-WV42OMV7.js → chunk-ELUDRSRD.js} +8 -8
  64. package/{chunk-ABQYVJBJ.js → chunk-EV235ILT.js} +5 -5
  65. package/{chunk-TRV2MIDW.js → chunk-EXAJ6DCR.js} +1 -0
  66. package/{chunk-BFDFRLLQ.js → chunk-EZ4VZHAG.js} +5 -5
  67. package/{chunk-GO3Z72MT.js → chunk-FHLMQIU7.js} +65 -95
  68. package/{chunk-2F7RJC6L.js → chunk-FOXQ7BAB.js} +1 -1
  69. package/{chunk-SH43IESU.js → chunk-GGC55Q32.js} +199 -29
  70. package/chunk-GMZLP5DV.js +82 -0
  71. package/{chunk-FDTR4QJ6.js → chunk-H6A6X4EK.js} +32 -1
  72. package/{chunk-DVINR3PL.js → chunk-HDLLCBRF.js} +1 -1
  73. package/{chunk-QOKAKDPE.js → chunk-HIM3FCLF.js} +0 -1
  74. package/{chunk-ONXOABJR.js → chunk-HNGRBWYF.js} +3 -0
  75. package/{chunk-BNGW5ASC.js → chunk-I2RGRVQ7.js} +22 -2
  76. package/{chunk-O6OSWFZQ.js → chunk-IHPDK6UD.js} +6 -0
  77. package/{chunk-QDSINZM3.js → chunk-IXH3HKY2.js} +1 -22
  78. package/{chunk-GQBOR3G6.js → chunk-JBKHQOYK.js} +8 -4
  79. package/{chunk-XD2MJFUG.js → chunk-JEFXP73H.js} +1 -1
  80. package/{chunk-PBA4UJBK.js → chunk-JIXGJTBU.js} +4 -4
  81. package/{chunk-AEOE4Z6Q.js → chunk-K6L5PNXK.js} +39 -15
  82. package/{chunk-Z77CRGTW.js → chunk-KA5O5KQL.js} +1 -1
  83. package/{chunk-GPCZ7UXG.js → chunk-KD6D6BLA.js} +1 -1
  84. package/{chunk-4CR5I7BD.js → chunk-KFWDYYSS.js} +47 -67
  85. package/{chunk-UZGQNTVW.js → chunk-KHKTDMYG.js} +8 -6
  86. package/{chunk-JDPFV2JV.js → chunk-KWUKOQM2.js} +20 -11
  87. package/{chunk-MRIHM22T.js → chunk-LBFL6RZG.js} +58 -9
  88. package/{chunk-LS2ZANRJ.js → chunk-LOCNXNOU.js} +1 -1
  89. package/{chunk-DHDMC6FO.js → chunk-LUBFABMJ.js} +15 -14
  90. package/{chunk-NA35QHCF.js → chunk-LVBFKW65.js} +1 -1
  91. package/chunk-LWLNLZC5.js +265 -0
  92. package/chunk-N4NGJDT6.js +929 -0
  93. package/{chunk-BFU6C242.js → chunk-NMFV26UG.js} +1 -1
  94. package/{chunk-FZGV4FGK.js → chunk-NUHHBEJC.js} +378 -187
  95. package/chunk-NWENLDMM.js +42 -0
  96. package/chunk-O7SVKKLY.js +875 -0
  97. package/chunk-OCZKATRC.js +129 -0
  98. package/{chunk-6Z7MY3V7.js → chunk-OEJLGVBL.js} +5 -5
  99. package/{chunk-VMFTFOWF.js → chunk-OKGVNZTL.js} +35 -8
  100. package/{chunk-GEPUP7OO.js → chunk-OR2UWD6X.js} +3 -3
  101. package/{chunk-KQHGZWSV.js → chunk-OXME3PEE.js} +1 -1
  102. package/{chunk-J4MOO56S.js → chunk-PNXHPLRU.js} +10 -2
  103. package/{chunk-3BMYXEUW.js → chunk-R5AJODNI.js} +1 -1
  104. package/{chunk-P5EVSOPA.js → chunk-R6EBQEQE.js} +22 -29
  105. package/chunk-RQ6CTX2E.js +164 -0
  106. package/{chunk-MS7TSPZR.js → chunk-RU36ZYSG.js} +19 -17
  107. package/{chunk-ALXHV7NK.js → chunk-RWXLPUKI.js} +40 -4
  108. package/{chunk-KQ4ONNQD.js → chunk-RXA3HAVW.js} +190 -8
  109. package/{chunk-IIVGDG4I.js → chunk-SJKULPGX.js} +13 -7
  110. package/{chunk-Q67DOFOO.js → chunk-SZC4REES.js} +212 -105
  111. package/{chunk-JRQFUXY7.js → chunk-TBAXFWOS.js} +99 -22
  112. package/{chunk-PQFHGD77.js → chunk-TBM2RS3U.js} +161 -14
  113. package/{chunk-NOF3HDSN.js → chunk-TFOIJFCM.js} +11 -9
  114. package/{chunk-BYMV6QZG.js → chunk-TNIX77YM.js} +4 -0
  115. package/chunk-TY3TIUJK.js +89 -0
  116. package/{chunk-I3TQJXQ7.js → chunk-U3C3IA32.js} +9 -2
  117. package/{chunk-YYLHWIW6.js → chunk-UKZX3NHN.js} +1 -1
  118. package/chunk-UM7TA3K4.js +1008 -0
  119. package/{chunk-6YTOJY35.js → chunk-VBG7GWWR.js} +253 -8
  120. package/{chunk-GL3EHUR4.js → chunk-VHGYUYQ3.js} +69 -47
  121. package/chunk-VIWDGTDA.js +8 -0
  122. package/chunk-VJVNU77E.js +83 -0
  123. package/chunk-VM6IE2GN.js +8004 -0
  124. package/{chunk-UKWGR5SS.js → chunk-VY6VFGKR.js} +194 -1144
  125. package/chunk-VZLO4XJD.js +17 -0
  126. package/chunk-W32HPLTL.js +13692 -0
  127. package/{chunk-AHAHBQMU.js → chunk-WDLSZMTA.js} +2 -2
  128. package/{chunk-53HEEOTT.js → chunk-WF5X57VW.js} +83 -16
  129. package/{chunk-VRTTFDBM.js → chunk-WPHY3VPF.js} +35 -22
  130. package/{chunk-3L2WKC3W.js → chunk-XPWGOTBQ.js} +8 -1
  131. package/chunk-YV25TM3R.js +780 -0
  132. package/chunk-ZRAU6T47.js +56 -0
  133. package/{chunk-IBOOZVVD.js → chunk-ZTKZZY2A.js} +851 -279
  134. package/commandRegistry-ASW6IVZ3.js +833 -0
  135. package/{contentThunks-IV2T3EJC.js → contentThunks-4XNVOIR7.js} +39 -36
  136. package/{cooldownCommands-REAWYVTY.js → cooldownCommands-ZLEPIB4A.js} +2 -2
  137. package/{createAgentAutomationAction-JCOIEYY4.js → createAgentAutomationAction-NHHTCJMC.js} +40 -37
  138. package/createDialogAction-XEBTHDB3.js +70 -0
  139. package/{createPageAction-D2VOOLP3.js → createPageAction-VR3WW2AQ.js} +47 -43
  140. package/{chunk-FG3HKPQP.js → cursorProvider-YGGNMVWX.js} +2751 -10185
  141. package/{dbSlice-A6C6H32X.js → dbSlice-TG4MZ5EB.js} +12 -11
  142. package/{deleteFile-YG6QMJLU.js → deleteFile-KESP65GC.js} +7 -6
  143. package/{dialogCommands-H7FPUYUQ.js → dialogCommands-FJWQG3MX.js} +50 -47
  144. package/{dialogSlice-6JZOOTDS.js → dialogSlice-GVRDGCRG.js} +57 -37
  145. package/{dist-VODFSGNG.js → dist-NJC2W7I4.js} +61 -54
  146. package/{docCreateCommands-WRG2JLGM.js → docCreateCommands-AZSK4NAG.js} +48 -44
  147. package/{docDeleteCommands-SHWJIBJS.js → docDeleteCommands-DDJMSMFZ.js} +49 -45
  148. package/{docReadCommands-WJN3WT6O.js → docReadCommands-5F5Q6EBZ.js} +47 -43
  149. package/{docStore-HUPQ2FSS.js → docStore-SUZUUWDI.js} +17 -13
  150. package/{docUpdateCommands-IE32IL6O.js → docUpdateCommands-XPNPVZOC.js} +48 -44
  151. package/{fetchMessages-EIU7UFFK.js → fetchMessages-3PXAHKCR.js} +5 -5
  152. package/{getPricing-LUSEABA6.js → getPricing-DOBBZLOK.js} +4 -4
  153. package/{handleSendMessageAction-DFPMQ7YM.js → handleSendMessageAction-VC6VTFKS.js} +109 -42
  154. package/index.js +87 -884
  155. package/{lib-FRRS27KN.js → lib-PU2G2MSO.js} +523 -191
  156. package/{localDialogRead-BTFJ4V2I.js → localDialogRead-UYCKO7YZ.js} +2 -2
  157. package/{localRuntimeAuthority-6IR6BBXE.js → localRuntimeAuthority-TU6OBC76.js} +9 -6
  158. package/{localRuntimeDb-SYQGUF4U.js → localRuntimeDb-VKWVOPPI.js} +1 -1
  159. package/{machineCommands-M2T2I5NF.js → machineCommands-M634V2L3.js} +98 -89
  160. package/machineWsRunDispatch-Z3HUSTFI.js +154 -0
  161. package/{memberThunks-P2ECUJ56.js → memberThunks-5S5D3N4U.js} +20 -18
  162. package/{models-T3SG6MJ5.js → models-PQU25T6Q.js} +2 -2
  163. package/oauthTokenStore-ITEB663N.js +23 -0
  164. package/package.json +1 -1
  165. package/processSpawn-SOAV3FEV.js +11 -0
  166. package/profileConfig-ZGOFORWV.js +43 -0
  167. package/{providerPresetApply-FG6NZ57W.js → providerPresetApply-HAQWVAQX.js} +7 -7
  168. package/{providerRegistry-757OWH3O.js → providerRegistry-5FGWB3X5.js} +11 -7
  169. package/{read-COE3ZYR6.js → read-LSYFLSIM.js} +8 -7
  170. package/{readDocTool-5USN4A6V.js → readDocTool-XWRXV3DR.js} +5 -3
  171. package/{readlineWorkspace-XQRDGWRZ.js → readlineWorkspace-J3YD3DNW.js} +2596 -2032
  172. package/{removeDialogAgentAction-J6X5QMTA.js → removeDialogAgentAction-4TEFC3VL.js} +22 -26
  173. package/{runAgentClientLoop-5ZA62FBA.js → runAgentClientLoop-APSMCLAF.js} +79 -72
  174. package/{runtimeDoctorCommands-X6WDBEQX.js → runtimeDoctorCommands-PIVSBZRZ.js} +4 -4
  175. package/runtimeModeArgs-2Y7BALTO.js +31 -0
  176. package/{setDialogExtraReferencesAction-WX5VTY6O.js → setDialogExtraReferencesAction-LSEN44OY.js} +16 -14
  177. package/{setPrimaryDialogAgentAction-FN22THHT.js → setPrimaryDialogAgentAction-SR366X5A.js} +23 -27
  178. package/{chunk-GP5LKBUZ.js → settingThunks-CTVPPGIN.js} +226 -940
  179. package/{skillDiscovery-CYUCJMAG.js → skillDiscovery-ZBU76COE.js} +3 -3
  180. package/{slateUtils-RIZES3PV.js → slateUtils-NGV2NMKM.js} +1 -1
  181. package/{spaceCommands-5GLCWZPO.js → spaceCommands-3UK63WPE.js} +51 -47
  182. package/{streamAgentChatTurn-6UZJMYRB.js → streamAgentChatTurn-DNY2PSRW.js} +215 -115
  183. package/{switchDialogAgentAction-LVTEV3FR.js → switchDialogAgentAction-M6NAFOOU.js} +19 -20
  184. package/{tableCommands-O6NWHFKV.js → tableCommands-6U4BMLRR.js} +10 -10
  185. package/{toolApiClient-QVJ6HDNN.js → toolApiClient-AD7CXTA4.js} +4 -3
  186. package/tools-X5UWATZK.js +117 -0
  187. package/{tuiSummaryLlmCaller-OHHFTHMG.js → tuiSummaryLlmCaller-DEH7ZEM6.js} +25 -23
  188. package/{updateCommands-2M74UL7P.js → updateCommands-4EHDLF5J.js} +3 -3
  189. package/{updateDialogTitleAction-QTKNIURB.js → updateDialogTitleAction-YSY5BF5A.js} +84 -45
  190. package/action-P4TNFGAD.js +0 -31
  191. package/agentListCommands-B2V4YAC4.js +0 -410
  192. package/agentRecordCommands-G4KK4R7H.js +0 -128
  193. package/agentRunCommand-UTZJA23G.js +0 -156
  194. package/browser-image-compression-MFDTD7K6.js +0 -1763
  195. package/chatQueueReduxAdapter-2P6NFX64.js +0 -186
  196. package/chunk-CQ3WA2NE.js +0 -299
  197. package/chunk-M76ECQRD.js +0 -13658
  198. package/chunk-MEYIRKDN.js +0 -8967
  199. package/chunk-PUOC4YRO.js +0 -394
  200. package/chunk-Q5FJJ6XI.js +0 -103
  201. package/chunk-S7Z2HMCN.js +0 -25
  202. package/chunk-T75QD6AB.js +0 -20923
  203. package/chunk-Y5GCAMGP.js +0 -9
  204. package/chunk-YPREESF4.js +0 -225
  205. package/createDialogAction-NGG7YVNU.js +0 -65
  206. package/machineWsRunDispatch-ISBKOOD7.js +0 -144
  207. package/settingSlice-P4ZW7K5X.js +0 -204
  208. package/syncMapping-N6RGXGBW.js +0 -437
  209. package/tools-KMGFWO43.js +0 -110
  210. package/{chunk-X7HHHIOZ.js → chunk-Y6ROFCZO.js} +0 -0
  211. package/{db-WK5MDZVN.js → db-VQSAOWAO.js} +1 -1
@@ -1,46 +1,40 @@
1
- import {
2
- fetchWithTransientRetry
3
- } from "./chunk-5UTFL4QJ.js";
4
1
  import {
5
2
  isGatewayHttpStatus
6
3
  } from "./chunk-NF64D32W.js";
4
+ import {
5
+ assembleAgentDiscoveryResult,
6
+ resolveDiscoveryScope
7
+ } from "./chunk-TBM2RS3U.js";
8
+ import {
9
+ fetchWithTransientRetry
10
+ } from "./chunk-APO5TOXO.js";
7
11
  import {
8
12
  CORE_DRAIN_REASON,
9
13
  DRAIN_EXHAUSTED_USER_MESSAGE,
10
14
  isDrainExhaustedResponse,
11
15
  normalizeNonNegativeMs,
12
16
  parseRetryAfterHeaderMs
13
- } from "./chunk-3L2WKC3W.js";
14
- import {
15
- TASK_PREVIEW_MAX,
16
- buildDelegatedTaskContent,
17
- calculateDelegatedPayloadMetrics,
18
- formatListRunsCard,
19
- formatNotFoundRunCard,
20
- formatStartRunCard,
21
- formatStatusRunCard,
22
- formatStopRunCard,
23
- resolveRunLabel
24
- } from "./chunk-3VNWWVKB.js";
25
- import {
26
- omitNullishAgentSummaryFields,
27
- sortSafeAgentSummaries,
28
- summarizeCredentialGroups,
29
- toCompactAgentSummary,
30
- toSafeAgentSummary,
31
- toUnavailableAgentSummary
32
- } from "./chunk-PQFHGD77.js";
17
+ } from "./chunk-XPWGOTBQ.js";
33
18
  import {
34
19
  getUserDataItemTimestamp,
35
20
  mergeAndDedupUserData
36
- } from "./chunk-KQHGZWSV.js";
21
+ } from "./chunk-OXME3PEE.js";
22
+ import {
23
+ AGENT_UPDATE_FIELD_NAMES,
24
+ DEFAULT_AUTO_APPROVED_SELF_UPDATE_FIELDS,
25
+ DEFAULT_USER_PREFERENCE_PROFILE,
26
+ normalizeAgentUpdateFieldList,
27
+ normalizePolicyLevelSetting,
28
+ normalizeSystemBuiltinSkills,
29
+ normalizeTonePresetSetting
30
+ } from "./chunk-RQ6CTX2E.js";
37
31
  import {
38
32
  readDocFunc,
39
33
  readDocFunctionSchema,
40
34
  readPageFunc,
41
35
  readPageFunctionSchema,
42
- slateToSimplifiedMarkdown
43
- } from "./chunk-J4MOO56S.js";
36
+ resolvePageReadMarkdown
37
+ } from "./chunk-PNXHPLRU.js";
44
38
  import {
45
39
  addMemberSpace,
46
40
  fetchAuthoritativeRemoteSpace,
@@ -52,7 +46,7 @@ import {
52
46
  setMembershipRejected,
53
47
  setSpaceInitialized,
54
48
  updateMemberSpaceName
55
- } from "./chunk-6Z7MY3V7.js";
49
+ } from "./chunk-OEJLGVBL.js";
56
50
  import {
57
51
  ToolApiError,
58
52
  buildToolRequestHeaders,
@@ -60,19 +54,19 @@ import {
60
54
  getRequestConfig,
61
55
  getToolBaseUrl,
62
56
  getToolRequestContext
63
- } from "./chunk-VLTIYV3X.js";
57
+ } from "./chunk-7I25CBT5.js";
64
58
  import {
65
59
  setDialogExtraReferencesAction
66
- } from "./chunk-QTGQ2LTL.js";
60
+ } from "./chunk-3DQY5IFB.js";
67
61
  import {
68
62
  waitForAbortableDelay
69
63
  } from "./chunk-N4G4PKQ6.js";
70
64
  import {
71
65
  markdownToSlate
72
- } from "./chunk-FZGV4FGK.js";
66
+ } from "./chunk-NUHHBEJC.js";
73
67
  import {
74
68
  extractMentionsFromSlate
75
- } from "./chunk-MEYIRKDN.js";
69
+ } from "./chunk-AGIM7IMJ.js";
76
70
  import {
77
71
  slateToRenderMarkdown
78
72
  } from "./chunk-63W5N6P3.js";
@@ -81,10 +75,22 @@ import {
81
75
  } from "./chunk-VF4K2QE6.js";
82
76
  import {
83
77
  createDocState
84
- } from "./chunk-JDPFV2JV.js";
78
+ } from "./chunk-KWUKOQM2.js";
85
79
  import {
86
80
  createDialogAction
87
- } from "./chunk-IBOZNTG2.js";
81
+ } from "./chunk-7X5XZ34C.js";
82
+ import {
83
+ TASK_PREVIEW_MAX,
84
+ buildDelegatedTaskContent,
85
+ calculateDelegatedPayloadMetrics,
86
+ formatAgentListCard,
87
+ formatListRunsCard,
88
+ formatNotFoundRunCard,
89
+ formatStartRunCard,
90
+ formatStatusRunCard,
91
+ formatStopRunCard,
92
+ resolveRunLabel
93
+ } from "./chunk-E3YWHWCR.js";
88
94
  import {
89
95
  DEFAULT_COLLAPSED_CATEGORIES,
90
96
  addContentToSpace,
@@ -102,7 +108,7 @@ import {
102
108
  updateContentCategory,
103
109
  updateContentTitle,
104
110
  writeStoredCollapsedCategories
105
- } from "./chunk-4CR5I7BD.js";
111
+ } from "./chunk-KFWDYYSS.js";
106
112
  import {
107
113
  getCurrentSpaceId,
108
114
  getCurrentSpaceIdRaw,
@@ -115,28 +121,28 @@ import {
115
121
  } from "./chunk-ZJ7UHBJS.js";
116
122
  import {
117
123
  deleteDialog,
118
- i18n_default,
119
124
  normalizeAppRouteId,
120
125
  resolveDialogRuntimeAgentKey,
126
+ runtime_default,
121
127
  selectAllMsgs,
122
128
  selectCurrentDialogConfig,
123
129
  selectCurrentDialogId,
124
130
  selectMsgById,
125
131
  uiAskChoiceFunc,
126
132
  uiAskChoiceFunctionSchema
127
- } from "./chunk-T75QD6AB.js";
133
+ } from "./chunk-W32HPLTL.js";
128
134
  import {
129
135
  createAgent,
130
136
  deleteServerSyncedCredential,
131
137
  runLlm,
132
138
  streamAgentChatTurn,
133
139
  updateAgent
134
- } from "./chunk-NOF3HDSN.js";
140
+ } from "./chunk-TFOIJFCM.js";
135
141
  import {
136
142
  getActiveDialogKey,
137
143
  selectCurrentDialogKey,
138
144
  selectPendingRawDataByPageKey
139
- } from "./chunk-6YTOJY35.js";
145
+ } from "./chunk-VBG7GWWR.js";
140
146
  import {
141
147
  require_react
142
148
  } from "./chunk-YDH3FDFQ.js";
@@ -145,10 +151,13 @@ import {
145
151
  resolveBuiltinCapability,
146
152
  resolveBuiltinSkillByName,
147
153
  resolveBuiltinSkillEntry
148
- } from "./chunk-JRQFUXY7.js";
154
+ } from "./chunk-TBAXFWOS.js";
149
155
  import {
150
156
  CAPABILITY_PACKS
151
- } from "./chunk-DHDMC6FO.js";
157
+ } from "./chunk-LUBFABMJ.js";
158
+ import {
159
+ DEFAULT_SYSTEM_AGENT_CAPABILITIES
160
+ } from "./chunk-IXH3HKY2.js";
152
161
  import {
153
162
  buildSkillDocMarkdown,
154
163
  normalizeSkillModalities,
@@ -156,7 +165,7 @@ import {
156
165
  parseExternalSkillMarkdown,
157
166
  parseSkillDocProtocol,
158
167
  resolvePageSkillMetadata
159
- } from "./chunk-Q554LLSI.js";
168
+ } from "./chunk-DMXLXZKL.js";
160
169
  import {
161
170
  DEFAULT_READ_DIALOG_MAX_RESPONSE_CHARS,
162
171
  NOLO_WORKSPACE_TOOL_NAMES,
@@ -173,39 +182,19 @@ import {
173
182
  redactAgentRecordForWorkspaceTool,
174
183
  resolveNoloDialogInput,
175
184
  verifyNoloDialogSubjectRefQuery
176
- } from "./chunk-IIVGDG4I.js";
177
- import {
178
- isAgentUnavailableNow
179
- } from "./chunk-FDTR4QJ6.js";
185
+ } from "./chunk-SJKULPGX.js";
180
186
  import {
181
187
  buildDatabaseFileContentUrl
182
- } from "./chunk-P5EVSOPA.js";
188
+ } from "./chunk-R6EBQEQE.js";
183
189
  import {
184
- DEFAULT_MODEL
185
- } from "./chunk-OIVSQH2O.js";
190
+ clipCompactText
191
+ } from "./chunk-5MMAK75Q.js";
186
192
  import {
187
193
  compactWhitespace
188
194
  } from "./chunk-DWLEOOGR.js";
189
195
  import {
190
196
  createFileCredentialBroker
191
- } from "./chunk-HVURBGF3.js";
192
- import {
193
- toErrorMessage
194
- } from "./chunk-HNMXYYJR.js";
195
- import {
196
- canonicalizeToolName,
197
- canonicalizeToolNames
198
- } from "./chunk-O6OSWFZQ.js";
199
- import {
200
- shareResourceAction
201
- } from "./chunk-PBA4UJBK.js";
202
- import {
203
- AGENT_UPDATE_FIELD_NAMES,
204
- normalizeAgentUpdateFieldList,
205
- selectAutoApproveSelfUpdateFields,
206
- selectCurrentServer,
207
- selectSyncServers
208
- } from "./chunk-GP5LKBUZ.js";
197
+ } from "./chunk-2U3NHADM.js";
209
198
  import {
210
199
  asRecordOrEmpty
211
200
  } from "./chunk-KX6YBIHG.js";
@@ -213,7 +202,7 @@ import {
213
202
  UNCATEGORIZED_ID,
214
203
  addContentAction,
215
204
  checkSpaceMembership
216
- } from "./chunk-AHAHBQMU.js";
205
+ } from "./chunk-WDLSZMTA.js";
217
206
  import {
218
207
  createSpaceKey,
219
208
  normalizeSpaceId
@@ -229,7 +218,59 @@ import {
229
218
  selectEntities,
230
219
  toTimestampMs,
231
220
  write
232
- } from "./chunk-VRTTFDBM.js";
221
+ } from "./chunk-WPHY3VPF.js";
222
+ import {
223
+ canonicalizeToolName,
224
+ canonicalizeToolNames
225
+ } from "./chunk-IHPDK6UD.js";
226
+ import {
227
+ CHROME_CONNECTOR_ACCEPTED_TOOL_NAMES,
228
+ chromeConnectorToolSchemas,
229
+ chromeConnectorUnavailableFunc,
230
+ getChromeConnectorToolBehavior,
231
+ getChromeConnectorToolDefaultConsent
232
+ } from "./chunk-LWLNLZC5.js";
233
+ import {
234
+ DEFAULT_MODEL,
235
+ clampReasoningEffort,
236
+ resolveModelReasoningCapabilityWithCache
237
+ } from "./chunk-CDEEFJXN.js";
238
+ import {
239
+ toErrorMessage
240
+ } from "./chunk-HNMXYYJR.js";
241
+ import {
242
+ asTrimmedLowercaseString
243
+ } from "./chunk-QSJ3HFEF.js";
244
+ import {
245
+ readAction
246
+ } from "./chunk-ELUDRSRD.js";
247
+ import {
248
+ DEVICE_LOCAL_OWNER_ID,
249
+ getRuntimeServerContext,
250
+ isDeviceLocalOwnerId,
251
+ isDeviceLocalSpaceBody,
252
+ isDeviceLocalSpaceMembership,
253
+ resolveEffectiveSpaceActorId,
254
+ resolveRecordOwnerUserId,
255
+ selectRuntimeSnapshot
256
+ } from "./chunk-O7SVKKLY.js";
257
+ import {
258
+ buildTombstoneRecord,
259
+ isTombstoneRecord
260
+ } from "./chunk-D2MDMY2M.js";
261
+ import {
262
+ extractCustomId
263
+ } from "./chunk-M2EJHDJP.js";
264
+ import {
265
+ isRecord
266
+ } from "./chunk-KUG52IAP.js";
267
+ import {
268
+ shareResourceAction
269
+ } from "./chunk-JIXGJTBU.js";
270
+ import {
271
+ selectCurrentServer,
272
+ selectSyncServers
273
+ } from "./chunk-NWENLDMM.js";
233
274
  import {
234
275
  SEPARATOR,
235
276
  TYPE_STORAGE_PREFIXES,
@@ -250,46 +291,23 @@ import {
250
291
  splitKey,
251
292
  toTrimmedString,
252
293
  ulid
253
- } from "./chunk-VMFTFOWF.js";
294
+ } from "./chunk-OKGVNZTL.js";
254
295
  import {
255
296
  asOptionalFiniteNumber
256
297
  } from "./chunk-WWC7I6TA.js";
257
298
  import {
258
- asTrimmedLowercaseString
259
- } from "./chunk-QSJ3HFEF.js";
260
- import {
261
- readAction
262
- } from "./chunk-WV42OMV7.js";
263
- import {
264
- extractCustomId
265
- } from "./chunk-M2EJHDJP.js";
266
- import {
267
- DEVICE_LOCAL_OWNER_ID,
268
299
  createAsyncThunk,
269
- getRuntimeServerContext,
270
- isDeviceLocalOwnerId,
271
- isDeviceLocalSpaceBody,
272
- isDeviceLocalSpaceMembership,
273
- noloWriteRequest,
274
- resolveEffectiveSpaceActorId,
275
- resolveRecordOwnerUserId,
276
- selectRuntimeSnapshot
277
- } from "./chunk-UKWGR5SS.js";
300
+ createSelector,
301
+ noloWriteRequest
302
+ } from "./chunk-VY6VFGKR.js";
278
303
  import {
279
304
  isAbortError
280
- } from "./chunk-QOKAKDPE.js";
305
+ } from "./chunk-HIM3FCLF.js";
281
306
  import {
282
307
  selectIdentityToken,
283
308
  selectIdentityUserBalance,
284
309
  selectIdentityUserId
285
310
  } from "./chunk-SEJ5OS6F.js";
286
- import {
287
- buildTombstoneRecord,
288
- isTombstoneRecord
289
- } from "./chunk-GBRG75BQ.js";
290
- import {
291
- isRecord
292
- } from "./chunk-KUG52IAP.js";
293
311
  import {
294
312
  asTrimmedString
295
313
  } from "./chunk-3EUW3WEO.js";
@@ -331,9 +349,13 @@ var agentAutomationTriggerSchema = {
331
349
  },
332
350
  {
333
351
  type: "object",
334
- description: "Inbound email trigger. Cheap code-side filters are evaluated before starting an Agent run. When both are present they use AND semantics.",
352
+ description: "Inbound email trigger. Cheap code-side filters are evaluated before starting an Agent run. Set acceptAll=true to fire on every inbound email. Otherwise provide at least one of fromContains, subjectContains, fromContainsAny, or subjectContainsAny \u2014 within a single field, *Any arrays are OR'd; across fields they are AND'd.",
335
353
  properties: {
336
354
  type: { type: "string", enum: ["email"] },
355
+ acceptAll: {
356
+ type: "boolean",
357
+ description: "When true the automation fires on every inbound email for the bound agent mailbox \u2014 no content filtering."
358
+ },
337
359
  fromContains: {
338
360
  type: "string",
339
361
  description: "Case-insensitive substring match against sender email address."
@@ -341,12 +363,27 @@ var agentAutomationTriggerSchema = {
341
363
  subjectContains: {
342
364
  type: "string",
343
365
  description: "Case-insensitive substring match against email subject."
366
+ },
367
+ fromContainsAny: {
368
+ type: "array",
369
+ description: "OR'd substring match against sender email \u2014 matches if ANY listed needle appears in the From header.",
370
+ items: { type: "string" },
371
+ minItems: 1
372
+ },
373
+ subjectContainsAny: {
374
+ type: "array",
375
+ description: "OR'd substring match against email subject \u2014 matches if ANY listed needle appears in the Subject.",
376
+ items: { type: "string" },
377
+ minItems: 1
344
378
  }
345
379
  },
346
380
  required: ["type"],
347
381
  anyOf: [
382
+ { required: ["acceptAll"] },
348
383
  { required: ["fromContains"] },
349
- { required: ["subjectContains"] }
384
+ { required: ["subjectContains"] },
385
+ { required: ["fromContainsAny"] },
386
+ { required: ["subjectContainsAny"] }
350
387
  ],
351
388
  additionalProperties: false
352
389
  }
@@ -477,7 +514,7 @@ var queryUserGrowthReportFunctionSchema = {
477
514
  };
478
515
  var createAgentAutomationFunctionSchema = {
479
516
  name: "createAgentAutomation",
480
- description: "\u521B\u5EFA\u957F\u671F agent automation\u3002\u652F\u6301 cron \u5B9A\u65F6\u89E6\u53D1\uFF0C\u4EE5\u53CA\u6309\u53D1\u4EF6\u4EBA/\u4E3B\u9898\u9884\u8FC7\u6EE4\u7684\u65B0\u90AE\u4EF6\u4E8B\u4EF6\u89E6\u53D1\u3002email \u89E6\u53D1\u53EA\u5728\u4EE3\u7801\u8FC7\u6EE4\u547D\u4E2D\u540E\u542F\u52A8\u540E\u53F0 Agent run\u3002",
517
+ description: "\u521B\u5EFA\u957F\u671F agent automation\u3002\u652F\u6301 cron \u5B9A\u65F6\u89E6\u53D1\uFF0C\u4EE5\u53CA\u65B0\u90AE\u4EF6\u4E8B\u4EF6\u89E6\u53D1\uFF08\u53EF\u8BBE acceptAll \u63A5\u6536\u5168\u90E8\u90AE\u4EF6\uFF0C\u6216\u6309\u53D1\u4EF6\u4EBA/\u4E3B\u9898\u8FC7\u6EE4\uFF1B*Any \u6570\u7EC4\u5B57\u6BB5\u5185\u90E8 OR\u3001\u5B57\u6BB5\u4E4B\u95F4 AND\uFF09\u3002email \u89E6\u53D1\u53EA\u5728\u4EE3\u7801\u8FC7\u6EE4\u547D\u4E2D\u540E\u542F\u52A8\u540E\u53F0 Agent run\u3002",
481
518
  parameters: {
482
519
  type: "object",
483
520
  properties: {
@@ -521,6 +558,57 @@ var createAgentAutomationFunctionSchema = {
521
558
  required: ["instruction", "trigger"]
522
559
  }
523
560
  };
561
+ var updateAgentAutomationFunctionSchema = {
562
+ name: "updateAgentAutomation",
563
+ description: "\u90E8\u5206\u66F4\u65B0\u4E00\u4E2A agent automation\u3002\u53EA\u5141\u8BB8 owner user\uFF08automation \u521B\u5EFA\u8005\uFF09\u4E14 owner agent\uFF08automation \u7684 ownerAgentKey\uFF09\u8C03\u7528\u3002\u53EF\u66F4\u65B0\u5B57\u6BB5\uFF1Atitle\u3001instruction\u3001status\uFF08active/paused\uFF09\u3001trigger\uFF08email trigger \u4F1A\u88AB\u91CD\u65B0\u5F52\u4E00\u5316\uFF09\u3001spaceId\u3001subjectRefs\u3002\u4E0D\u53EF\u66F4\u65B0\uFF1Aid\u3001dbKey\u3001ownerAgentKey\u3001createdBy\u3001createdAt\u3001runStatus\u3002",
564
+ parameters: {
565
+ type: "object",
566
+ properties: {
567
+ automationKey: {
568
+ type: "string",
569
+ description: "automation \u7684 dbKey\uFF08agent-automation-{userId}-{id}\uFF09\u3002"
570
+ },
571
+ title: { type: "string", description: "\u65B0\u6807\u9898\u3002" },
572
+ instruction: { type: "string", description: "\u65B0 instruction\u3002" },
573
+ status: {
574
+ type: "string",
575
+ enum: ["active", "paused"],
576
+ description: "automation \u72B6\u6001\u3002paused \u65F6 dispatcher \u4E0D\u518D\u89E6\u53D1 run\u3002"
577
+ },
578
+ trigger: agentAutomationTriggerSchema,
579
+ spaceId: { type: "string", description: "\u65B0\u7684 spaceId\uFF1B\u4F20\u7A7A\u5B57\u7B26\u4E32\u6E05\u9664\u3002" },
580
+ subjectRefs: {
581
+ type: "array",
582
+ description: "\u65B0\u7684 subjectRefs\uFF1B\u4F20\u7A7A\u6570\u7EC4\u6E05\u9664\u3002",
583
+ items: {
584
+ type: "object",
585
+ properties: {
586
+ kind: { type: "string" },
587
+ id: { type: "string" },
588
+ role: { type: "string" }
589
+ },
590
+ required: ["kind", "id"],
591
+ additionalProperties: true
592
+ }
593
+ }
594
+ },
595
+ required: ["automationKey"]
596
+ }
597
+ };
598
+ var deleteAgentAutomationFunctionSchema = {
599
+ name: "deleteAgentAutomation",
600
+ description: "\u5220\u9664\u4E00\u4E2A agent automation\uFF08\u542B owner index\uFF09\u3002\u53EA\u5141\u8BB8 owner user\uFF08automation \u521B\u5EFA\u8005\uFF09\u4E14 owner agent \u8C03\u7528\u3002\u91CD\u590D\u5220\u9664\u5DF2\u4E0D\u5B58\u5728\u7684 automation \u8FD4\u56DE deleted:false, reason:not_found \u2014\u2014 \u662F\u5E42\u7B49 no-op\u3002",
601
+ parameters: {
602
+ type: "object",
603
+ properties: {
604
+ automationKey: {
605
+ type: "string",
606
+ description: "automation \u7684 dbKey\uFF08agent-automation-{userId}-{id}\uFF09\u3002"
607
+ }
608
+ },
609
+ required: ["automationKey"]
610
+ }
611
+ };
524
612
  var notifyUserFunctionSchema = {
525
613
  name: "notifyUser",
526
614
  description: "\u53D1\u9001\u4E00\u6761\u7AD9\u5185\u901A\u77E5\u7ED9\u5F53\u524D\u7528\u6237\u3002\u7B2C\u4E00\u7248\u53EA\u652F\u6301\u7AD9\u5185\u901A\u77E5\uFF0C\u540E\u7EED\u53EF\u6269\u5C55\u90AE\u4EF6\u3001\u684C\u9762\u7AEF\u3001\u7F51\u9875\u548C\u79FB\u52A8\u7AEF\u901A\u77E5\u3002",
@@ -562,6 +650,8 @@ var serverOnlyResult = (toolName) => ({
562
650
  var queryModelUsageFunc = async () => serverOnlyResult("queryModelUsage");
563
651
  var queryUserGrowthReportFunc = async () => serverOnlyResult("queryUserGrowthReport");
564
652
  var createAgentAutomationFunc = async () => serverOnlyResult("createAgentAutomation");
653
+ var updateAgentAutomationFunc = async () => serverOnlyResult("updateAgentAutomation");
654
+ var deleteAgentAutomationFunc = async () => serverOnlyResult("deleteAgentAutomation");
565
655
  var notifyUserFunc = async () => serverOnlyResult("notifyUser");
566
656
 
567
657
  // packages/ai/tools/toolResultError.ts
@@ -735,6 +825,22 @@ var buildPatch = (args) => {
735
825
  if (reasoning_effort !== void 0) patch2.reasoning_effort = reasoning_effort;
736
826
  return patch2;
737
827
  };
828
+ var calibrateReasoningEffortInPatch = (patch2, previousAgent) => {
829
+ if (patch2.reasoning_effort === void 0) return void 0;
830
+ const provider = patch2.provider ?? previousAgent.provider ?? void 0;
831
+ const model = patch2.model ?? previousAgent.model ?? void 0;
832
+ const cap = resolveModelReasoningCapabilityWithCache(provider, model);
833
+ if (!cap.found) return void 0;
834
+ const requested = String(patch2.reasoning_effort);
835
+ const calibrated = clampReasoningEffort(requested, provider ?? null, model ?? null);
836
+ if (!calibrated) {
837
+ delete patch2.reasoning_effort;
838
+ return `\u26A0\uFE0F \u6A21\u578B ${model ?? "\u5F53\u524D\u6A21\u578B"} \u4E0D\u652F\u6301\u63A8\u7406\u5F3A\u5EA6\u8BBE\u7F6E\uFF0C\u5DF2\u5FFD\u7565 reasoning_effort=${requested}\u3002`;
839
+ }
840
+ patch2.reasoning_effort = calibrated;
841
+ if (calibrated === requested) return void 0;
842
+ return `\u2139\uFE0F reasoning_effort \u5DF2\u6309 ${model ?? "\u5F53\u524D\u6A21\u578B"} \u7684\u771F\u5B9E\u6863\u4F4D\u4ECE "${requested}" \u5438\u9644\u4E3A "${calibrated}"\u3002`;
843
+ };
738
844
  var AGENT_UPDATE_FIELD_NAME_SET = new Set(AGENT_UPDATE_FIELD_NAMES);
739
845
  var listRequestedFields = (args) => Object.keys(args).filter(
740
846
  (key) => key !== "agentId" && key !== "__confirmedSelfEvolution" && AGENT_UPDATE_FIELD_NAME_SET.has(key) && args[key] !== void 0
@@ -936,7 +1042,7 @@ var HOSTED_EXEC_RUNTIME_TOOL_POLICY = {
936
1042
  workspace: { mode: "lease" }
937
1043
  };
938
1044
  var findModelConfig = async (modelName, provider) => {
939
- const { ALL_MODELS } = await import("./models-T3SG6MJ5.js");
1045
+ const { ALL_MODELS } = await import("./models-PQU25T6Q.js");
940
1046
  const name = toTrimmedString(modelName);
941
1047
  const prov = toTrimmedString(provider ?? "");
942
1048
  if (!name) return null;
@@ -961,21 +1067,21 @@ var findModelConfig = async (modelName, provider) => {
961
1067
  };
962
1068
  var createAgentToolFunctionSchema = {
963
1069
  name: "createAgent",
964
- description: i18n_default.t("tools.createAgent.description"),
1070
+ description: runtime_default.t("tools.createAgent.description"),
965
1071
  parameters: {
966
1072
  type: "object",
967
1073
  properties: {
968
1074
  name: {
969
1075
  type: "string",
970
- description: i18n_default.t("tools.createAgent.params.name")
1076
+ description: runtime_default.t("tools.createAgent.params.name")
971
1077
  },
972
1078
  model: {
973
1079
  type: "string",
974
- description: i18n_default.t("tools.createAgent.params.model")
1080
+ description: runtime_default.t("tools.createAgent.params.model")
975
1081
  },
976
1082
  provider: {
977
1083
  type: "string",
978
- description: i18n_default.t("tools.createAgent.params.provider")
1084
+ description: runtime_default.t("tools.createAgent.params.provider")
979
1085
  },
980
1086
  apiSource: {
981
1087
  type: "string",
@@ -984,36 +1090,36 @@ var createAgentToolFunctionSchema = {
984
1090
  },
985
1091
  prompt: {
986
1092
  type: "string",
987
- description: i18n_default.t("tools.createAgent.params.prompt")
1093
+ description: runtime_default.t("tools.createAgent.params.prompt")
988
1094
  },
989
1095
  introduction: {
990
1096
  type: "string",
991
- description: i18n_default.t("tools.createAgent.params.introduction")
1097
+ description: runtime_default.t("tools.createAgent.params.introduction")
992
1098
  },
993
1099
  greeting: {
994
- description: i18n_default.t("tools.createAgent.params.greeting.desc"),
1100
+ description: runtime_default.t("tools.createAgent.params.greeting.desc"),
995
1101
  anyOf: [
996
1102
  {
997
1103
  type: "string",
998
- description: i18n_default.t(
1104
+ description: runtime_default.t(
999
1105
  "tools.createAgent.params.greeting.stringDesc"
1000
1106
  )
1001
1107
  },
1002
1108
  {
1003
1109
  type: "object",
1004
- description: i18n_default.t(
1110
+ description: runtime_default.t(
1005
1111
  "tools.createAgent.params.greeting.objectDesc"
1006
1112
  ),
1007
1113
  properties: {
1008
1114
  text: {
1009
1115
  type: "string",
1010
- description: i18n_default.t(
1116
+ description: runtime_default.t(
1011
1117
  "tools.createAgent.params.greeting.texts.text"
1012
1118
  )
1013
1119
  },
1014
1120
  menu: {
1015
1121
  type: "array",
1016
- description: i18n_default.t(
1122
+ description: runtime_default.t(
1017
1123
  "tools.createAgent.params.greeting.menu.desc"
1018
1124
  ),
1019
1125
  items: {
@@ -1021,19 +1127,19 @@ var createAgentToolFunctionSchema = {
1021
1127
  properties: {
1022
1128
  id: {
1023
1129
  type: "string",
1024
- description: i18n_default.t(
1130
+ description: runtime_default.t(
1025
1131
  "tools.createAgent.params.greeting.menu.id"
1026
1132
  )
1027
1133
  },
1028
1134
  label: {
1029
1135
  type: "string",
1030
- description: i18n_default.t(
1136
+ description: runtime_default.t(
1031
1137
  "tools.createAgent.params.greeting.menu.label"
1032
1138
  )
1033
1139
  },
1034
1140
  userMessage: {
1035
1141
  type: "string",
1036
- description: i18n_default.t(
1142
+ description: runtime_default.t(
1037
1143
  "tools.createAgent.params.greeting.menu.userMessage"
1038
1144
  )
1039
1145
  }
@@ -1047,21 +1153,21 @@ var createAgentToolFunctionSchema = {
1047
1153
  },
1048
1154
  isPublic: {
1049
1155
  type: "boolean",
1050
- description: i18n_default.t("tools.createAgent.params.isPublic")
1156
+ description: runtime_default.t("tools.createAgent.params.isPublic")
1051
1157
  },
1052
1158
  allowFork: {
1053
1159
  type: "boolean",
1054
- description: i18n_default.t("tools.createAgent.params.allowFork")
1160
+ description: runtime_default.t("tools.createAgent.params.allowFork")
1055
1161
  },
1056
1162
  tags: {
1057
1163
  type: "array",
1058
1164
  items: { type: "string" },
1059
- description: i18n_default.t("tools.createAgent.params.tags")
1165
+ description: runtime_default.t("tools.createAgent.params.tags")
1060
1166
  },
1061
1167
  tools: {
1062
1168
  type: "array",
1063
1169
  items: { type: "string" },
1064
- description: i18n_default.t("tools.createAgent.params.tools")
1170
+ description: runtime_default.t("tools.createAgent.params.tools")
1065
1171
  },
1066
1172
  disabledTools: {
1067
1173
  type: "array",
@@ -1079,26 +1185,26 @@ var createAgentToolFunctionSchema = {
1079
1185
  },
1080
1186
  references: {
1081
1187
  type: "array",
1082
- description: i18n_default.t("tools.createAgent.params.references.desc"),
1188
+ description: runtime_default.t("tools.createAgent.params.references.desc"),
1083
1189
  items: {
1084
1190
  type: "object",
1085
1191
  properties: {
1086
1192
  dbKey: {
1087
1193
  type: "string",
1088
- description: i18n_default.t(
1194
+ description: runtime_default.t(
1089
1195
  "tools.createAgent.params.references.dbKey"
1090
1196
  )
1091
1197
  },
1092
1198
  title: {
1093
1199
  type: "string",
1094
- description: i18n_default.t(
1200
+ description: runtime_default.t(
1095
1201
  "tools.createAgent.params.references.title"
1096
1202
  )
1097
1203
  },
1098
1204
  type: {
1099
1205
  type: "string",
1100
1206
  enum: ["knowledge", "instruction", "page"],
1101
- description: i18n_default.t(
1207
+ description: runtime_default.t(
1102
1208
  "tools.createAgent.params.references.type"
1103
1209
  )
1104
1210
  }
@@ -1109,36 +1215,36 @@ var createAgentToolFunctionSchema = {
1109
1215
  linkedSpaces: {
1110
1216
  type: "array",
1111
1217
  items: { type: "string" },
1112
- description: i18n_default.t("tools.createAgent.params.linkedSpaces")
1218
+ description: runtime_default.t("tools.createAgent.params.linkedSpaces")
1113
1219
  },
1114
1220
  temperature: {
1115
1221
  type: "number",
1116
- description: i18n_default.t("tools.createAgent.params.temperature")
1222
+ description: runtime_default.t("tools.createAgent.params.temperature")
1117
1223
  },
1118
1224
  top_p: {
1119
1225
  type: "number",
1120
- description: i18n_default.t("tools.createAgent.params.top_p")
1226
+ description: runtime_default.t("tools.createAgent.params.top_p")
1121
1227
  },
1122
1228
  frequency_penalty: {
1123
1229
  type: "number",
1124
- description: i18n_default.t(
1230
+ description: runtime_default.t(
1125
1231
  "tools.createAgent.params.frequency_penalty"
1126
1232
  )
1127
1233
  },
1128
1234
  presence_penalty: {
1129
1235
  type: "number",
1130
- description: i18n_default.t(
1236
+ description: runtime_default.t(
1131
1237
  "tools.createAgent.params.presence_penalty"
1132
1238
  )
1133
1239
  },
1134
1240
  max_tokens: {
1135
1241
  type: "number",
1136
- description: i18n_default.t("tools.createAgent.params.max_tokens")
1242
+ description: runtime_default.t("tools.createAgent.params.max_tokens")
1137
1243
  },
1138
1244
  reasoning_effort: {
1139
1245
  type: "string",
1140
1246
  enum: ["low", "medium", "high"],
1141
- description: i18n_default.t(
1247
+ description: runtime_default.t(
1142
1248
  "tools.createAgent.params.reasoning_effort"
1143
1249
  )
1144
1250
  }
@@ -1181,7 +1287,7 @@ var buildPlatformFormDataFromArgs = async (args) => {
1181
1287
  const trimmedModel = toTrimmedString(model);
1182
1288
  const trimmedProvider = toTrimmedString(provider);
1183
1289
  const modelConfig = await findModelConfig(trimmedModel, trimmedProvider);
1184
- const { getModelPricing } = await import("./getPricing-LUSEABA6.js");
1290
+ const { getModelPricing } = await import("./getPricing-DOBBZLOK.js");
1185
1291
  const normalizedTools = tools ?? [];
1186
1292
  const resolvedRuntimeToolPolicy = runtimeToolPolicy ?? (normalizedTools.includes("execShell") ? HOSTED_EXEC_RUNTIME_TOOL_POLICY : void 0);
1187
1293
  const formData = {
@@ -1317,6 +1423,7 @@ ${availableList}`
1317
1423
  formData = await buildPlatformFormDataFromArgs(args);
1318
1424
  formData.linkedSpaces = resolvedLinkedSpaces;
1319
1425
  }
1426
+ const effortNote = calibrateReasoningEffortInPatch(formData, formData);
1320
1427
  const expectedProviderConfig = getForkedAgentProviderExpectation(formData);
1321
1428
  try {
1322
1429
  const agent = await thunkApi.dispatch(
@@ -1362,6 +1469,9 @@ ${availableList}`
1362
1469
  if (typeof currentBalance === "number") {
1363
1470
  lines.push(`- \u5F53\u524D\u4F59\u989D: ${currentBalance}`);
1364
1471
  }
1472
+ if (effortNote) {
1473
+ lines.push(effortNote);
1474
+ }
1365
1475
  return {
1366
1476
  rawData: agent,
1367
1477
  displayData: lines.join("\n")
@@ -1404,6 +1514,7 @@ async function updateAgentToolFunc(args, thunkApi) {
1404
1514
  }
1405
1515
  const agentId = extractAgentId(dbKey);
1406
1516
  const formData = buildPatch(args);
1517
+ const effortNote = calibrateReasoningEffortInPatch(formData, previousAgent);
1407
1518
  const requestedFields = listRequestedFields(args);
1408
1519
  assertAgentUpdateConfirmation({
1409
1520
  scope: "generic",
@@ -1426,7 +1537,8 @@ async function updateAgentToolFunc(args, thunkApi) {
1426
1537
  );
1427
1538
  return {
1428
1539
  rawData: rawDataWithUpdateInfo,
1429
- displayData: formatUpdatedAgentOutput(agent)
1540
+ displayData: formatUpdatedAgentOutput(agent) + (effortNote ? `
1541
+ ${effortNote}` : "")
1430
1542
  };
1431
1543
  }
1432
1544
 
@@ -3284,7 +3396,7 @@ async function readFunc(args, thunkApi, context) {
3284
3396
  }
3285
3397
  if (dbKey.startsWith("PAGE-") || result.type === "page" /* DOC */) {
3286
3398
  const pageData = result;
3287
- const markdownContent = slateToSimplifiedMarkdown(pageData.slateData || []);
3399
+ const markdownContent = resolvePageReadMarkdown(pageData);
3288
3400
  return {
3289
3401
  rawData: {
3290
3402
  ...pageData,
@@ -3422,92 +3534,6 @@ async function listUserSpacesFunc(args, thunkApi, context) {
3422
3534
  }
3423
3535
  }
3424
3536
 
3425
- // packages/ai/agent/agentDiscovery.ts
3426
- function isPreferredAgent(agent) {
3427
- return agent.isFavorite === true || agent.isOwned === true || agent.isOAuth === true || agent.billingSource === "user_subscription" || agent.billingSource === "user_api" || agent.billingSource === "local";
3428
- }
3429
- function isPublicDiscoveryAgent(agent) {
3430
- return agent.isPublic === true && !isPreferredAgent(agent);
3431
- }
3432
- function resolveDiscoveryScope(args) {
3433
- const rawScope = typeof args?.scope === "string" ? args.scope.trim().toLowerCase() : void 0;
3434
- const hasScope = rawScope !== void 0 && rawScope !== "";
3435
- const hasPublicOnly = typeof args?.publicOnly === "boolean";
3436
- const publicOnly = args?.publicOnly === true;
3437
- if (hasScope) {
3438
- if (rawScope !== "preferred" && rawScope !== "public" && rawScope !== "all") {
3439
- throw new Error(`Invalid scope '${args?.scope}': must be 'preferred', 'public', or 'all'.`);
3440
- }
3441
- const scope = rawScope;
3442
- if (hasPublicOnly) {
3443
- if (publicOnly && scope !== "public") {
3444
- throw new Error(
3445
- `Conflicting arguments: scope='${args?.scope}' conflicts with publicOnly=true.`
3446
- );
3447
- }
3448
- if (!publicOnly && scope === "public") {
3449
- throw new Error(
3450
- `Conflicting arguments: scope='${args?.scope}' conflicts with publicOnly=false.`
3451
- );
3452
- }
3453
- }
3454
- return scope;
3455
- }
3456
- if (hasPublicOnly && publicOnly) {
3457
- return "public";
3458
- }
3459
- return "preferred";
3460
- }
3461
- function agentIdentityKeys(agent) {
3462
- return [agent.agentKey, agent.publicKey, agent.id].filter(
3463
- (key) => typeof key === "string" && key.length > 0
3464
- );
3465
- }
3466
- function deduplicateAgentSummaries(agents) {
3467
- const byIdentity = /* @__PURE__ */ new Map();
3468
- for (const agent of agents) {
3469
- const keys = agentIdentityKeys(agent);
3470
- const existing = keys.map((key) => byIdentity.get(key)).find(Boolean);
3471
- if (!existing) {
3472
- for (const key of keys) byIdentity.set(key, agent);
3473
- continue;
3474
- }
3475
- const winner = isPreferredAgent(agent) && !isPreferredAgent(existing) ? agent : existing;
3476
- for (const key of /* @__PURE__ */ new Set([...agentIdentityKeys(existing), ...keys])) byIdentity.set(key, winner);
3477
- }
3478
- return [...new Set(byIdentity.values())];
3479
- }
3480
- function filterAgentsByScope(agents, scope) {
3481
- const unique = deduplicateAgentSummaries(agents);
3482
- if (scope === "preferred") return unique.filter((agent) => isPreferredAgent(agent));
3483
- if (scope === "public") return unique.filter((agent) => isPublicDiscoveryAgent(agent));
3484
- return unique.filter((agent) => isPreferredAgent(agent) || agent.isPublic === true);
3485
- }
3486
- function buildAgentDiscoveryResult(options) {
3487
- const scope = resolveDiscoveryScope({
3488
- scope: options.scope,
3489
- publicOnly: options.publicOnly
3490
- });
3491
- const now = options.now ?? Date.now();
3492
- let scopedAgents = filterAgentsByScope(options.agents, scope);
3493
- const unavailableList = scopedAgents.filter((a) => isAgentUnavailableNow(a, now));
3494
- const unavailableCount = unavailableList.length;
3495
- const unavailableAgents = sortSafeAgentSummaries(unavailableList).map(toUnavailableAgentSummary);
3496
- const credentialGroups = summarizeCredentialGroups(scopedAgents, now);
3497
- if (options.showUnavailable !== true) {
3498
- scopedAgents = scopedAgents.filter((a) => !isAgentUnavailableNow(a, now));
3499
- }
3500
- const sortedAgents = sortSafeAgentSummaries(scopedAgents);
3501
- const projectedAgents = options.verbose === true ? sortedAgents.map(omitNullishAgentSummaryFields) : sortedAgents.map(toCompactAgentSummary);
3502
- return {
3503
- total: projectedAgents.length,
3504
- unavailableCount,
3505
- unavailableAgents,
3506
- credentialGroups,
3507
- agents: projectedAgents
3508
- };
3509
- }
3510
-
3511
3537
  // packages/ai/agent/publicAgentDiscovery.ts
3512
3538
  async function fetchPublicAgentsForDiscovery(args) {
3513
3539
  const fetchImpl = args.fetchImpl ?? fetch;
@@ -3866,6 +3892,8 @@ async function readDialogFunc(args, thunkApi) {
3866
3892
  // 对全量消息做 materialize + 整体 stringify。
3867
3893
  body: JSON.stringify({
3868
3894
  dialogId: resolved.dialogId,
3895
+ // 同作用域已解析出的记录 key:不传则服务端退化为 `dialog-*` 全命名空间扫描。
3896
+ dialogKey: resolved.dbKey,
3869
3897
  limit,
3870
3898
  maxChars: DEFAULT_READ_DIALOG_MAX_RESPONSE_CHARS
3871
3899
  })
@@ -3970,7 +3998,7 @@ async function deleteDialogsFunc(args, thunkApi) {
3970
3998
  const deletedDialogIds = [];
3971
3999
  const deletedDialogKeys = [];
3972
4000
  const failures = [];
3973
- const { deleteDialog: deleteDialog2 } = await import("./dialogSlice-6JZOOTDS.js");
4001
+ const { deleteDialog: deleteDialog2 } = await import("./dialogSlice-GVRDGCRG.js");
3974
4002
  for (const target of targets) {
3975
4003
  try {
3976
4004
  await thunkApi.dispatch(deleteDialog2(target.dbKey)).unwrap();
@@ -4034,24 +4062,6 @@ async function fetchUserFavoriteAgentMap(thunkApi) {
4034
4062
  return {};
4035
4063
  }
4036
4064
  }
4037
- function formatAgentListCard(agents, maxDisplay = 8) {
4038
- const total = agents.length;
4039
- const lines = [`Agents (${total})`];
4040
- const visible = agents.slice(0, maxDisplay);
4041
- for (const agent of visible) {
4042
- const star = agent.isFavorite ? "\u2605" : " ";
4043
- const own = agent.isOwned ? "\u25CE" : " ";
4044
- const name = agent.name || "(unnamed)";
4045
- const model = agent.model || "\u2014";
4046
- const source = agent.apiSource || agent.provider || agent.cliProvider || "\u2014";
4047
- const key = agent.agentKey || "(agentKey unavailable)";
4048
- lines.push(`${star}${own} ${name} ${model} ${source} ${key}`);
4049
- }
4050
- if (total > maxDisplay) {
4051
- lines.push(`\u2026 +${total - maxDisplay} more`);
4052
- }
4053
- return lines.join("\n");
4054
- }
4055
4065
  var listAgentsFunctionSchema = {
4056
4066
  name: "listAgents",
4057
4067
  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.",
@@ -4066,6 +4076,10 @@ var listAgentsFunctionSchema = {
4066
4076
  },
4067
4077
  publicOnly: { type: "boolean", description: "Deprecated compatibility alias for scope='public'." },
4068
4078
  showUnavailable: { type: "boolean", description: "Include agents currently rate-limited (429). Default false." },
4079
+ query: {
4080
+ type: "string",
4081
+ description: "Optional case-insensitive search substring matching agent name, model, provider, handle, or agentKey. Use to locate specific candidates like 'opus', 'devin', or 'claude'."
4082
+ },
4069
4083
  verbose: { type: "boolean", description: "Return the full safe-summary field set (prices, introduction, modelAbility, timestamps) for troubleshooting. Default false returns the compact agent-selection projection." }
4070
4084
  }
4071
4085
  }
@@ -4108,16 +4122,15 @@ async function listAgentsFunc(args, thunkApi) {
4108
4122
  }
4109
4123
  }
4110
4124
  const userId = runtime?.currentUserId ?? void 0;
4111
- const agents = [...Array.from(recordsMap.values()), ...publicRecords].map(
4112
- (record) => toSafeAgentSummary(record, {
4125
+ const discovery = assembleAgentDiscoveryResult({
4126
+ records: [...Array.from(recordsMap.values()), ...publicRecords],
4127
+ summaryOptions: (record) => ({
4113
4128
  favoritesMap,
4114
4129
  userId,
4115
4130
  publicRecordExists: publicRecords.includes(record) ? true : void 0
4116
- })
4117
- );
4118
- const discovery = buildAgentDiscoveryResult({
4119
- agents,
4131
+ }),
4120
4132
  scope: args?.scope,
4133
+ query: args?.query,
4121
4134
  publicOnly: args?.publicOnly,
4122
4135
  showUnavailable: args?.showUnavailable,
4123
4136
  verbose: args?.verbose
@@ -4148,6 +4161,30 @@ var readAgentFunctionSchema = {
4148
4161
  required: ["agent"]
4149
4162
  }
4150
4163
  };
4164
+ function formatReadAgentCard(agentKey, record) {
4165
+ if (!isRecord(record)) {
4166
+ return jsonPreview({ agentKey, record });
4167
+ }
4168
+ const name = asTrimmedString(record.name) || "(\u672A\u547D\u540D Agent)";
4169
+ const model = asTrimmedString(record.model) || "\u2014";
4170
+ const provider = asTrimmedString(record.provider) || asTrimmedString(record.apiSource) || "\u2014";
4171
+ const apiSource = asTrimmedString(record.apiSource) || "\u2014";
4172
+ const isPublic = record.isPublic === true ? "\u516C\u5F00" : "\u79C1\u6709";
4173
+ const tools = Array.isArray(record.tools) && record.tools.length > 0 ? record.tools.map((t) => String(t)).join(", ") : "\u65E0\u81EA\u5B9A\u4E49\u5DE5\u5177 (\u9ED8\u8BA4\u57FA\u7840\u5DE5\u4F5C\u533A\u80FD\u529B)";
4174
+ const lines = [
4175
+ `\u{1F916} Agent: ${name} (${agentKey})`,
4176
+ `\u2022 \u6A21\u578B: ${model} (${provider})`,
4177
+ `\u2022 \u6765\u6E90: ${apiSource} \xB7 ${isPublic}`,
4178
+ `\u2022 \u5DE5\u5177: ${tools}`
4179
+ ];
4180
+ if (typeof record.customProviderUrl === "string" && record.customProviderUrl.trim()) {
4181
+ lines.push(`\u2022 \u7AEF\u70B9: ${record.customProviderUrl.trim()}`);
4182
+ }
4183
+ if (typeof record.prompt === "string" && record.prompt.trim()) {
4184
+ lines.push(`\u2022 \u63D0\u793A\u8BCD: ${clipCompactText(record.prompt.trim(), 200)}`);
4185
+ }
4186
+ return lines.join("\n");
4187
+ }
4151
4188
  async function readAgentFunc(args, thunkApi) {
4152
4189
  const runtime = getRuntime2(thunkApi);
4153
4190
  const userId = runtime?.currentUserId;
@@ -4159,16 +4196,14 @@ async function readAgentFunc(args, thunkApi) {
4159
4196
  for (const candidate of candidates) {
4160
4197
  const record = await readBestRecord(thunkApi, candidate, true);
4161
4198
  if (record) {
4199
+ const redacted = redactAgentRecordForWorkspaceTool(record);
4162
4200
  return {
4163
4201
  rawData: {
4164
4202
  success: true,
4165
4203
  agentKey: candidate,
4166
- record: redactAgentRecordForWorkspaceTool(record)
4204
+ record: redacted
4167
4205
  },
4168
- displayData: jsonPreview({
4169
- agentKey: candidate,
4170
- record: redactAgentRecordForWorkspaceTool(record)
4171
- })
4206
+ displayData: formatReadAgentCard(candidate, redacted)
4172
4207
  };
4173
4208
  }
4174
4209
  }
@@ -4279,7 +4314,7 @@ var readSkillDocFunctionSchema = {
4279
4314
  }
4280
4315
  };
4281
4316
  async function readSkillDocFunc(args, thunkApi) {
4282
- const { buildReadDocResult } = await import("./readDocTool-5USN4A6V.js");
4317
+ const { buildReadDocResult } = await import("./readDocTool-XWRXV3DR.js");
4283
4318
  const id = args?.id ?? args?.doc ?? args?.docKey ?? args?.pageKey;
4284
4319
  if (typeof id !== "string" || !id.trim()) {
4285
4320
  throw new Error("readSkillDoc requires id or doc.");
@@ -4545,18 +4580,7 @@ var addSpaceAction = async (input, thunkAPI) => {
4545
4580
  };
4546
4581
 
4547
4582
  // packages/app/favorite/favoriteStore.ts
4548
- var import_react3 = __toESM(require_react());
4549
-
4550
- // packages/app/store.ts
4551
- var import_react2 = __toESM(require_react());
4552
-
4553
- // packages/app/sessionSnapshot.ts
4554
4583
  var import_react = __toESM(require_react());
4555
-
4556
- // packages/identity/useIdentity.local.ts
4557
- var LOCAL_USER_ID = (typeof process !== "undefined" ? process.env?.NOLO_LOCAL_USER_ID : void 0) || (typeof process !== "undefined" ? process.env?.NOLO_USER_ID : void 0) || "local";
4558
-
4559
- // packages/app/favorite/favoriteStore.ts
4560
4584
  var createInitialState = () => ({
4561
4585
  agentIds: [],
4562
4586
  contentIds: [],
@@ -5082,7 +5106,7 @@ var fetchSpaceAction = async (input, thunkAPI) => {
5082
5106
  const spaceKey = createSpaceKey.space(spaceId);
5083
5107
  const readSpace = async (dbKey) => {
5084
5108
  try {
5085
- const { read: read2, readAndWait: readAndWait2 } = await import("./dbSlice-A6C6H32X.js");
5109
+ const { read: read2, readAndWait: readAndWait2 } = await import("./dbSlice-TG4MZ5EB.js");
5086
5110
  if (fresh) {
5087
5111
  return await dispatch(readAndWait2(dbKey)).unwrap();
5088
5112
  }
@@ -9345,214 +9369,6 @@ ${preview}`
9345
9369
  };
9346
9370
  }
9347
9371
 
9348
- // packages/ai/tools/chromeConnectorTools.ts
9349
- var CHROME_CONNECTOR_TOOL_NAMES = [
9350
- "chrome_list_tabs",
9351
- "chrome_open_tab",
9352
- "chrome_close_tab",
9353
- "chrome_read_page",
9354
- "chrome_click",
9355
- "chrome_type",
9356
- "chrome_press",
9357
- "chrome_scroll",
9358
- "chrome_screenshot",
9359
- "chrome_read_console",
9360
- "chrome_read_network"
9361
- ];
9362
- var CHROME_CONNECTOR_READ_TOOL_NAMES = [
9363
- "chrome_list_tabs",
9364
- "chrome_read_page",
9365
- "chrome_screenshot",
9366
- "chrome_read_console",
9367
- "chrome_read_network"
9368
- ];
9369
- var getChromeConnectorToolBehavior = (name) => CHROME_CONNECTOR_READ_TOOL_NAMES.includes(name) ? "data" : "action";
9370
- var getChromeConnectorToolDefaultConsent = (name) => CHROME_CONNECTOR_READ_TOOL_NAMES.includes(name) ? "auto" : "ask";
9371
- function baseSchema(name, description, properties, required = []) {
9372
- return {
9373
- name,
9374
- description,
9375
- parameters: {
9376
- type: "object",
9377
- properties,
9378
- required
9379
- }
9380
- };
9381
- }
9382
- var tabId = {
9383
- type: "string",
9384
- description: "Chrome tab id returned by chrome_list_tabs or chrome_open_tab."
9385
- };
9386
- var elementRef = {
9387
- type: "string",
9388
- description: "Revision-scoped ref like 1a2b3c4d-e2, copied verbatim from chrome_read_page; preferred over selector when available."
9389
- };
9390
- var selector = {
9391
- type: "string",
9392
- description: "CSS selector for the visible page element to operate on; fallback when no elementRef is available."
9393
- };
9394
- var chromeListTabsFunctionSchema = baseSchema(
9395
- "chrome_list_tabs",
9396
- "List controllable Chrome tabs from the user's Chrome profile through the Nolo desktop Chrome connector.",
9397
- {}
9398
- );
9399
- var chromeOpenTabFunctionSchema = baseSchema(
9400
- "chrome_open_tab",
9401
- "Open a URL in the user's Chrome browser through the Nolo desktop Chrome connector.",
9402
- {
9403
- url: {
9404
- type: "string",
9405
- description: "HTTP or HTTPS URL to open in Chrome."
9406
- },
9407
- active: {
9408
- type: "boolean",
9409
- description: "Whether to focus the new Chrome tab. Defaults to true."
9410
- }
9411
- },
9412
- ["url"]
9413
- );
9414
- var chromeCloseTabFunctionSchema = baseSchema(
9415
- "chrome_close_tab",
9416
- "Close a Chrome tab through the Nolo desktop Chrome connector. Prefer closing the tabs your own run opened with chrome_open_tab, and ask the user before closing a tab they are using. Pinned tabs are refused (TAB_PINNED); unknown tab ids fail (TAB_NOT_FOUND).",
9417
- {
9418
- tabId
9419
- },
9420
- ["tabId"]
9421
- );
9422
- var chromeReadPageFunctionSchema = baseSchema(
9423
- "chrome_read_page",
9424
- "Read a compact view of a Chrome tab: visible text (hard cap 6000 chars) plus short-lived elementRefs (hard cap 35) and a pageRevision. Reuse those refs for chrome_click and chrome_type instead of guessing selectors; use region to focus a big page. Does not read cookies or profile databases.",
9425
- {
9426
- tabId,
9427
- region: {
9428
- type: "string",
9429
- description: "Optional CSS selector limiting the read to part of the page."
9430
- },
9431
- maxChars: {
9432
- type: "number",
9433
- description: "Optional text character budget; the connector clamps it to a hard maximum."
9434
- },
9435
- detail: {
9436
- type: "string",
9437
- enum: ["compact", "full"],
9438
- description: "compact (default) returns budgeted text; full raises the budget and adds capped HTML."
9439
- }
9440
- },
9441
- ["tabId"]
9442
- );
9443
- var chromeClickFunctionSchema = baseSchema(
9444
- "chrome_click",
9445
- "Click a visible element in a Chrome tab by elementRef from chrome_read_page, or by CSS selector. Controls whose name indicates an irreversible external action (payment, send, delete, publish, permission change) are refused with SENSITIVE_ACTION_REQUIRES_CONFIRMATION: this desktop runtime has no approval channel, so name the control and ask the user to activate it themselves.",
9446
- {
9447
- tabId,
9448
- elementRef,
9449
- selector
9450
- },
9451
- ["tabId"]
9452
- );
9453
- var chromeTypeFunctionSchema = baseSchema(
9454
- "chrome_type",
9455
- "Type text into a Chrome page element identified by elementRef from chrome_read_page or by CSS selector. Typing into a control whose name indicates an irreversible external action is refused with SENSITIVE_ACTION_REQUIRES_CONFIRMATION, same as clicking it.",
9456
- {
9457
- tabId,
9458
- elementRef,
9459
- selector,
9460
- text: {
9461
- type: "string",
9462
- description: "Text to type into the selected element."
9463
- },
9464
- clearFirst: {
9465
- type: "boolean",
9466
- description: "Whether to clear the field before typing. Defaults to true."
9467
- }
9468
- },
9469
- ["tabId", "text"]
9470
- );
9471
- var chromePressFunctionSchema = baseSchema(
9472
- "chrome_press",
9473
- "Send a keyboard key or shortcut to a Chrome tab. Enter-like keys are refused with SENSITIVE_ACTION_REQUIRES_CONFIRMATION when the focused control is an irreversible action.",
9474
- {
9475
- tabId,
9476
- key: {
9477
- type: "string",
9478
- description: "Key or shortcut, for example Enter, Escape, ArrowDown, or Meta+L."
9479
- }
9480
- },
9481
- ["tabId", "key"]
9482
- );
9483
- var chromeScrollFunctionSchema = baseSchema(
9484
- "chrome_scroll",
9485
- "Scroll a Chrome tab by pixel deltas.",
9486
- {
9487
- tabId,
9488
- deltaX: {
9489
- type: "number",
9490
- description: "Horizontal scroll delta in pixels."
9491
- },
9492
- deltaY: {
9493
- type: "number",
9494
- description: "Vertical scroll delta in pixels."
9495
- }
9496
- },
9497
- ["tabId"]
9498
- );
9499
- var chromeScreenshotFunctionSchema = baseSchema(
9500
- "chrome_screenshot",
9501
- "Capture a screenshot from a Chrome tab through the Nolo desktop Chrome connector.",
9502
- {
9503
- tabId,
9504
- fullPage: {
9505
- type: "boolean",
9506
- description: "Whether to capture the full page. Defaults to false."
9507
- }
9508
- },
9509
- ["tabId"]
9510
- );
9511
- var chromeReadConsoleFunctionSchema = baseSchema(
9512
- "chrome_read_console",
9513
- "Read recent console messages from a Chrome tab using debugger-backed connector state.",
9514
- {
9515
- tabId,
9516
- limit: {
9517
- type: "number",
9518
- description: "Maximum number of recent console messages to return."
9519
- }
9520
- },
9521
- ["tabId"]
9522
- );
9523
- var chromeReadNetworkFunctionSchema = baseSchema(
9524
- "chrome_read_network",
9525
- "Read a deduplicated recent network summary from a Chrome tab using debugger-backed connector state. Static assets are filtered unless includeAssets is set.",
9526
- {
9527
- tabId,
9528
- limit: {
9529
- type: "number",
9530
- description: "Maximum number of recent network entries to return."
9531
- },
9532
- includeAssets: {
9533
- type: "boolean",
9534
- description: "Include images, CSS, fonts and other static assets. Defaults to false."
9535
- }
9536
- },
9537
- ["tabId"]
9538
- );
9539
- var chromeConnectorToolSchemas = [
9540
- chromeListTabsFunctionSchema,
9541
- chromeOpenTabFunctionSchema,
9542
- chromeCloseTabFunctionSchema,
9543
- chromeReadPageFunctionSchema,
9544
- chromeClickFunctionSchema,
9545
- chromeTypeFunctionSchema,
9546
- chromePressFunctionSchema,
9547
- chromeScrollFunctionSchema,
9548
- chromeScreenshotFunctionSchema,
9549
- chromeReadConsoleFunctionSchema,
9550
- chromeReadNetworkFunctionSchema
9551
- ];
9552
- async function chromeConnectorUnavailableFunc() {
9553
- throw new Error("Chrome connector tools are only executable in the Nolo desktop local runtime.");
9554
- }
9555
-
9556
9372
  // packages/ai/tools/exaSearchTool.ts
9557
9373
  var exaSearchSchema = {
9558
9374
  name: "exa_search",
@@ -9846,74 +9662,16 @@ var olmOcrFunc = async (input, thunkApi) => {
9846
9662
  };
9847
9663
  };
9848
9664
 
9849
- // packages/ai/tools/whisperTool.ts
9850
- var SHARED_PARAMS = {
9851
- type: "object",
9852
- properties: {
9853
- audioUrl: {
9854
- type: "string",
9855
- description: "\u97F3\u9891\u6765\u6E90\uFF1A\u5185\u90E8\u6587\u4EF6 ID (file-... \u6216 ULID)\u3001\u516C\u5F00 http/https URL\uFF0C\u6216 base64 data URI\uFF08data:audio/...;base64,...\uFF09\u3002\u652F\u6301 mp3\u3001wav\u3001m4a\u3001ogg\u3001flac \u7B49\u5E38\u89C1\u683C\u5F0F\u3002"
9856
- },
9857
- language: {
9858
- type: "string",
9859
- description: "\u53EF\u9009\uFF0C\u6307\u5B9A\u97F3\u9891\u8BED\u8A00\u4EE5\u63D0\u5347\u7CBE\u5EA6\uFF08\u5982 'zh'\u3001'en'\u3001'ja'\uFF09\u3002\u4E0D\u6307\u5B9A\u5219\u81EA\u52A8\u68C0\u6D4B\u3002"
9860
- }
9861
- },
9862
- required: ["audioUrl"]
9863
- };
9864
- var whisperTurboSchema = {
9865
- name: "whisper_turbo",
9866
- description: "\u4F7F\u7528 openai/whisper-large-v3-turbo \u5BF9\u97F3\u9891\u8FDB\u884C\u8BED\u97F3\u8F6C\u6587\u5B57\uFF08ASR\uFF09\u3002\u901F\u5EA6\u5FEB\u3001\u4EF7\u683C\u4F4E\uFF08$0.0002/min\uFF09\uFF0C\u9002\u5408\u5927\u591A\u6570\u573A\u666F\u7684\u5B9E\u65F6\u6216\u6279\u91CF\u8F6C\u5F55\u3002",
9867
- parameters: SHARED_PARAMS
9868
- };
9869
- var whisperTurboFunc = async (input, thunkApi) => {
9870
- const { audioUrl, language } = input;
9871
- const data = await callToolApi(
9872
- thunkApi,
9873
- "/api/whisper-turbo",
9874
- { audioUrl, language },
9875
- { withAuth: true }
9876
- );
9877
- return {
9878
- summary: "Transcription completed",
9879
- text: data.text || "",
9880
- language: data.language,
9881
- duration: data.duration,
9882
- rawData: data
9883
- };
9884
- };
9885
- var whisperV3Schema = {
9886
- name: "whisper_v3",
9887
- description: "\u4F7F\u7528 openai/whisper-large-v3 \u5BF9\u97F3\u9891\u8FDB\u884C\u9AD8\u7CBE\u5EA6\u8BED\u97F3\u8F6C\u6587\u5B57\uFF08ASR\uFF09\u3002\u7CBE\u5EA6\u66F4\u9AD8\uFF08\u5C24\u5176\u591A\u8BED\u8A00/\u4E2D\u6587\uFF09\uFF0C\u4EF7\u683C\u7A0D\u9AD8\uFF08$0.00045/min\uFF09\uFF0C\u9002\u5408\u5BF9\u51C6\u786E\u7387\u8981\u6C42\u4E25\u683C\u7684\u573A\u666F\u3002",
9888
- parameters: SHARED_PARAMS
9889
- };
9890
- var whisperV3Func = async (input, thunkApi) => {
9891
- const { audioUrl, language } = input;
9892
- const data = await callToolApi(
9893
- thunkApi,
9894
- "/api/whisper-v3",
9895
- { audioUrl, language },
9896
- { withAuth: true }
9897
- );
9898
- return {
9899
- summary: "Transcription completed",
9900
- text: data.text || "",
9901
- language: data.language,
9902
- duration: data.duration,
9903
- rawData: data
9904
- };
9905
- };
9906
-
9907
9665
  // packages/ai/tools/transcribeVideoTool.ts
9908
9666
  var transcribeVideoSchema = {
9909
9667
  name: "transcribeVideo",
9910
- description: "\u5C06\u89C6\u9891\u94FE\u63A5\u8F6C\u5199\u4E3A\u5E26\u6807\u70B9\u7684\u6587\u672C\u4E0E SRT \u5B57\u5E55\u3002\u652F\u6301 B \u7AD9\u5206 P/\u5408\u96C6\uFF08\u9ED8\u8BA4\u5904\u7406\u5168\u90E8\uFF0C\u4E5F\u53EF\u6307\u5B9A p\uFF09\u3001YouTube \u7B49 yt-dlp \u5E73\u53F0\uFF1B\u6296\u97F3\u9700\u5728\u684C\u9762\u7AEF\u6D4F\u89C8\u5668\u4F7F\u7528\u3002\u4E0B\u8F7D\u540E\u4E0D\u8F6C\u7801\uFF0C\u4FDD\u7559\u539F\u59CB\u97F3\u8F68\u8D28\u91CF\u3002",
9668
+ description: "\u5C06\u89C6\u9891\u94FE\u63A5\u8F6C\u5199\u4E3A\u5E26\u6807\u70B9\u7684\u6587\u672C\u4E0E SRT \u5B57\u5E55\u3002\u652F\u6301 B \u7AD9\u5206 P/\u5408\u96C6\uFF08\u9ED8\u8BA4\u5904\u7406\u5168\u90E8\uFF0C\u4E5F\u53EF\u6307\u5B9A p\uFF09\u3001YouTube \u7B49 yt-dlp \u5E73\u53F0\uFF0C\u4EE5\u53CA\u6296\u97F3\uFF08\u652F\u6301 v.douyin.com \u77ED\u94FE\u3001douyin.com \u89C6\u9891\u9875\u94FE\u63A5\uFF0C\u6216\u76F4\u63A5\u4F20\u6574\u6BB5\u6296\u97F3\u5206\u4EAB\u6587\u6848\uFF0C\u4F1A\u81EA\u52A8\u63D0\u53D6\u5176\u4E2D\u94FE\u63A5\uFF1B\u65E0\u9700\u767B\u5F55\u6216\u6D4F\u89C8\u5668\uFF09\u3002\u4E0B\u8F7D\u540E\u4E0D\u8F6C\u7801\uFF0C\u4FDD\u7559\u539F\u59CB\u97F3\u8F68\u8D28\u91CF\u3002",
9911
9669
  parameters: {
9912
9670
  type: "object",
9913
9671
  properties: {
9914
9672
  url: {
9915
9673
  type: "string",
9916
- description: "\u89C6\u9891\u94FE\u63A5\uFF08B \u7AD9 / YouTube \u7B49\uFF09\u3002\u5206 P \u5408\u96C6\u7F3A\u7701\u4F1A\u5904\u7406\u5168\u90E8\uFF0C\u7ED3\u679C\u91CC\u4F1A\u5217\u51FA processedParts\u3002"
9674
+ description: "\u89C6\u9891\u94FE\u63A5\uFF08B \u7AD9 / YouTube / \u6296\u97F3\u7B49\uFF09\uFF0C\u4E5F\u53EF\u76F4\u63A5\u4F20\u542B\u94FE\u63A5\u7684\u5206\u4EAB\u6587\u6848\u3002\u5206 P \u5408\u96C6\u7F3A\u7701\u4F1A\u5904\u7406\u5168\u90E8\uFF0C\u7ED3\u679C\u91CC\u4F1A\u5217\u51FA processedParts\u3002"
9917
9675
  },
9918
9676
  p: {
9919
9677
  description: "\u53EF\u9009\uFF0C1-based \u5206 P \u9009\u62E9\u3002\u4F20\u5355\u4E2A\u6570\u5B57\u6216\u6570\u5B57\u6570\u7EC4\uFF1B\u7F3A\u7701=\u5168\u90E8\u5904\u7406\uFF08\u7EDD\u4E0D\u9759\u9ED8\u53EA\u6293\u7B2C\u4E00\u4E2A\uFF09\u3002",
@@ -10260,7 +10018,7 @@ var cloudflareCrawlStatusFunctionSchema = {
10260
10018
  async function cloudflareCrawlStatusFunc(args, thunkApi) {
10261
10019
  const { jobId, limit, status, cursor } = args;
10262
10020
  if (!jobId) throw new Error("\u5FC5\u987B\u63D0\u4F9B jobId");
10263
- const { getToolRequestContext: getToolRequestContext2 } = await import("./toolApiClient-QVJ6HDNN.js");
10021
+ const { getToolRequestContext: getToolRequestContext2 } = await import("./toolApiClient-AD7CXTA4.js");
10264
10022
  const { baseUrl, token } = getToolRequestContext2(thunkApi);
10265
10023
  const params = new URLSearchParams();
10266
10024
  if (limit !== void 0) params.set("limit", String(limit));
@@ -11038,7 +10796,7 @@ var selectUserIdFromState = (state2) => {
11038
10796
  var selectCurrentServerFromState = (state2) => typeof state2?.settings?.currentServer === "string" ? state2.settings.currentServer : null;
11039
10797
  async function addImageContentToSpace(input) {
11040
10798
  const injectedAddContentAction = input.thunkApi?.extra?.addContentAction;
11041
- const addContentAction2 = typeof injectedAddContentAction === "function" ? injectedAddContentAction : (await import("./addContentAction-MB2HHMDZ.js")).addContentAction;
10799
+ const addContentAction2 = typeof injectedAddContentAction === "function" ? injectedAddContentAction : (await import("./addContentAction-M2WOWZCL.js")).addContentAction;
11042
10800
  await addContentAction2(
11043
10801
  {
11044
10802
  spaceId: input.spaceId,
@@ -11926,6 +11684,7 @@ var deleteMemoryFunctionSchema = {
11926
11684
  };
11927
11685
 
11928
11686
  // packages/ai/tools/deleteMemoryTool.ts
11687
+ var VNEXT_STATE_ID_PREFIX = "vnext-state-";
11929
11688
  async function deleteMemoryFunc(args, thunkApi) {
11930
11689
  const reason = String(args.reason ?? "").trim();
11931
11690
  if (!reason && !args.ids?.length && !args.contentKeyword && !args.tags?.length) {
@@ -11962,11 +11721,15 @@ async function deleteMemoryFunc(args, thunkApi) {
11962
11721
  displayData: "\u672A\u627E\u5230\u5339\u914D\u7684\u8BB0\u5FC6\uFF0C\u65E0\u9700\u5220\u9664\u3002"
11963
11722
  };
11964
11723
  }
11724
+ const retiredCount2 = result.retiredIds?.length ?? (result.preview ?? []).filter(
11725
+ (item) => item.id.startsWith(VNEXT_STATE_ID_PREFIX)
11726
+ ).length;
11727
+ const physicalCount2 = Math.max(0, matched - retiredCount2);
11965
11728
  const previewList = (result.preview ?? []).map((item, idx) => `${idx + 1}. [${item.kind}] ${item.content}`).join("\n");
11966
11729
  return {
11967
11730
  rawData: result,
11968
11731
  displayData: [
11969
- `\u3010\u5F85\u7528\u6237\u786E\u8BA4\u3011\u5339\u914D\u5230 ${matched} \u6761\u7B26\u5408\u6761\u4EF6\u7684\u8BB0\u5FC6\uFF0C\u5373\u5C06\u7269\u7406\u5220\u9664\u3002`,
11732
+ `\u3010\u5F85\u7528\u6237\u786E\u8BA4\u3011\u5339\u914D\u5230 ${matched} \u6761\u7B26\u5408\u6761\u4EF6\u7684\u8BB0\u5FC6\uFF1A\u7269\u7406\u5220\u9664 ${physicalCount2} \u6761\uFF0C\u9000\u5F79 ${retiredCount2} \u6761\uFF08\u9000\u5F79\u4EC5\u8868\u793A\u505C\u6B62\u53EC\u56DE\uFF0C\u8BB0\u5F55\u672C\u8EAB\u4FDD\u7559\uFF09\u3002`,
11970
11733
  previewList ? `\u9884\u89C8\u524D ${result.preview?.length} \u6761\uFF1A
11971
11734
  ${previewList}` : "",
11972
11735
  `\u8FD9\u662F\u4E0D\u53EF\u9006\u64CD\u4F5C\u3002\u8BF7\u5411\u7528\u6237\u5C55\u793A\u4E0A\u8FF0\u9884\u89C8\u5E76\u83B7\u5F97\u660E\u786E\u786E\u8BA4\u3002\u786E\u8BA4\u540E\uFF0C\u8BF7\u4F20\u5165 confirmed: true${result.deletionToken ? ` \u4E0E deletionToken: "${result.deletionToken}"` : ""} \u518D\u6B21\u8C03\u7528\u672C\u5DE5\u5177\u3002`
@@ -11974,9 +11737,11 @@ ${previewList}` : "",
11974
11737
  };
11975
11738
  }
11976
11739
  const count = result.deletedCount ?? 0;
11740
+ const retiredCount = result.retiredIds?.length ?? 0;
11741
+ const physicalCount = Math.max(0, count - retiredCount);
11977
11742
  return {
11978
11743
  rawData: result,
11979
- displayData: `\u5DF2\u5728\u7528\u6237\u6743\u9650\u8303\u56F4\u5185\u786E\u8BA4\u5E76\u7269\u7406\u5220\u9664 ${count} \u6761\u8BB0\u5FC6\u3002`
11744
+ displayData: `\u5DF2\u5728\u7528\u6237\u6743\u9650\u8303\u56F4\u5185\u786E\u8BA4\u5E76\u6267\u884C\uFF1A\u7269\u7406\u5220\u9664 ${physicalCount} \u6761\u8BB0\u5FC6\uFF0C\u9000\u5F79 ${retiredCount} \u6761\uFF08\u8BB0\u5F55\u4FDD\u7559\u3001\u4E0D\u518D\u53EC\u56DE\uFF09\u3002`
11980
11745
  };
11981
11746
  }
11982
11747
 
@@ -12646,6 +12411,34 @@ async function createSkillAgentToolFunc(args, thunkApi) {
12646
12411
  return createAgentToolFunc(buildCreateSkillAgentArgs(args), thunkApi);
12647
12412
  }
12648
12413
 
12414
+ // packages/app/settings/fieldSelectors.ts
12415
+ var selectMaxExecutionTime = (state2) => state2.settings.maxExecutionTime;
12416
+ var selectGlobalPrompt = (state2) => state2.settings.globalPrompt;
12417
+ var selectUserTonePreset = (state2) => normalizeTonePresetSetting(state2.settings.userTonePreset);
12418
+ var selectKnowledgeCaptureLevel = (state2) => normalizePolicyLevelSetting(
12419
+ state2.settings.knowledgeCaptureLevel,
12420
+ DEFAULT_USER_PREFERENCE_PROFILE.knowledgeCaptureLevel
12421
+ );
12422
+ var selectSpaceContextLevel = (state2) => state2.settings.enableReadCurrentSpace === false ? 1 : normalizePolicyLevelSetting(
12423
+ state2.settings.spaceContextLevel,
12424
+ DEFAULT_USER_PREFERENCE_PROFILE.spaceContextLevel
12425
+ );
12426
+ var selectAutoApproveSelfUpdateFields = createSelector(
12427
+ [(state2) => state2.settings.autoApproveSelfUpdateFields],
12428
+ (fields) => normalizeAgentUpdateFieldList(
12429
+ fields,
12430
+ DEFAULT_AUTO_APPROVED_SELF_UPDATE_FIELDS
12431
+ )
12432
+ );
12433
+ var selectAiRecentContentLimit = (state2) => state2.settings.aiRecentContentLimit ?? 50;
12434
+ var selectSystemBuiltinSkills = createSelector(
12435
+ [(state2) => state2.settings.systemBuiltinSkills],
12436
+ (systemBuiltinSkills) => normalizeSystemBuiltinSkills(
12437
+ systemBuiltinSkills,
12438
+ DEFAULT_SYSTEM_AGENT_CAPABILITIES
12439
+ )
12440
+ );
12441
+
12649
12442
  // packages/chat/messages/messageAgent.ts
12650
12443
  function resolveMessageAgentKey(message) {
12651
12444
  if (!message) return void 0;
@@ -12692,11 +12485,13 @@ async function updateSelfToolFunc(args, thunkApi, runtime) {
12692
12485
  autoApprovedFields
12693
12486
  });
12694
12487
  const previousAgentForUpdate = buildUpdateThunkPreviousAgent(previousAgent, userId);
12488
+ const formData = buildPatch(args);
12489
+ const effortNote = calibrateReasoningEffortInPatch(formData, previousAgent);
12695
12490
  const agent = await thunkApi.dispatch(
12696
12491
  updateAgent({
12697
12492
  userId,
12698
12493
  agentId: extractAgentId(currentAgentKey),
12699
- formData: buildPatch(args),
12494
+ formData,
12700
12495
  previousAgent: previousAgentForUpdate
12701
12496
  })
12702
12497
  ).unwrap().catch((e) => {
@@ -12708,7 +12503,8 @@ async function updateSelfToolFunc(args, thunkApi, runtime) {
12708
12503
  previousAgentForUpdate,
12709
12504
  requestedFields
12710
12505
  ),
12711
- displayData: formatUpdatedAgentOutput(agent)
12506
+ displayData: formatUpdatedAgentOutput(agent) + (effortNote ? `
12507
+ ${effortNote}` : "")
12712
12508
  };
12713
12509
  }
12714
12510
 
@@ -13197,11 +12993,14 @@ function checkCredentialFanout(args) {
13197
12993
  };
13198
12994
  }
13199
12995
  if (candidateGroup === entryGroup) {
12996
+ if (args.allowCredentialConcurrency === true) {
12997
+ continue;
12998
+ }
13200
12999
  return {
13201
13000
  allowed: false,
13202
13001
  reason: "credential_group_conflict",
13203
13002
  conflict: entry,
13204
- message: `\u62D2\u7EDD\u5E76\u53D1\u6D3E\u53D1\uFF1A\u5019\u9009 agent ${describeEntry(args.candidate)} \u4E0E\u5DF2\u6D3B\u8DC3 run ${describeEntry(entry)} \u540C\u5C5E credentialGroup "${candidateGroup}"\uFF0C\u540C\u4E00\u51ED\u8BC1\u4E0A\u7981\u6B62\u5E76\u53D1\u6247\u51FA\u3002\u8BF7\u4E32\u884C\u6D3E\u53D1\u6216\u6539\u7528\u5176\u4ED6 credentialGroup \u7684 agent\u3002`
13003
+ message: `\u62D2\u7EDD\u5E76\u53D1\u6D3E\u53D1\uFF1A\u5019\u9009 agent ${describeEntry(args.candidate)} \u4E0E\u5DF2\u6D3B\u8DC3 run ${describeEntry(entry)} \u540C\u5C5E credentialGroup "${candidateGroup}"\uFF0C\u540C\u4E00\u51ED\u8BC1\u4E0A\u7981\u6B62\u5E76\u53D1\u6247\u51FA\u3002\u8BF7\u4E32\u884C\u6D3E\u53D1\u3001\u6362\u7528\u5176\u4ED6 credentialGroup \u7684 agent\uFF0C\u6216\u4F20 allowCredentialConcurrency: true \u5141\u8BB8\u5E76\u53D1\u3002`
13205
13004
  };
13206
13005
  }
13207
13006
  }
@@ -13262,6 +13061,11 @@ function buildStartAgentRunFunctionSchema(opts) {
13262
13061
  description: "\u53EF\u9009\u3002\u663E\u5F0F\u786E\u8BA4\u300C\u51ED\u8BC1\u5F52\u5C5E\u672A\u77E5\u300D\u7684\u5E76\u53D1\u98CE\u9669\u540E\u5F3A\u5236\u653E\u884C\uFF08\u7B49\u540C\u4E8E CLI \u7684 --force-unknown-credential\uFF09\u3002\u4EC5\u5728\u5DF2\u81EA\u884C\u786E\u8BA4\u4E24\u4FA7\u4E0D\u5171\u7528\u4E0A\u6E38\u51ED\u8BC1\u65F6\u4F7F\u7528\uFF1B\u9ED8\u8BA4 false\uFF0C\u672A\u77E5\u51ED\u8BC1\u5E76\u53D1\u4E00\u5F8B\u62D2\u7EDD\u3002",
13263
13062
  default: false
13264
13063
  },
13064
+ allowCredentialConcurrency: {
13065
+ type: "boolean",
13066
+ description: "\u53EF\u9009\u3002\u663E\u5F0F\u5141\u8BB8\u540C\u4E00\u51ED\u8BC1\u7EC4\u5E76\u53D1\u6D3E\u53D1\u3002\u9ED8\u8BA4 false\u3002\u5728\u7528\u6237\u6388\u6743\u540C\u4E00\u51ED\u636E\u591A\u4EFB\u52A1\u5E76\u53D1\u6216\u786E\u8BA4\u4E0A\u6E38\u652F\u6301\u5E76\u53D1\u65F6\u4F7F\u7528\u3002",
13067
+ default: false
13068
+ },
13265
13069
  trackTodo: {
13266
13070
  type: "boolean",
13267
13071
  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'
@@ -13308,7 +13112,8 @@ async function startAgentRunFunc(args, thunkApi, _context) {
13308
13112
  const verdict = checkCredentialFanout({
13309
13113
  active,
13310
13114
  candidate: { agentKey, credentialGroup: args.credentialGroup },
13311
- allowUnknownCredential: args.allowUnknownCredential === true
13115
+ allowUnknownCredential: args.allowUnknownCredential === true,
13116
+ allowCredentialConcurrency: args.allowCredentialConcurrency === true
13312
13117
  });
13313
13118
  if (!verdict.allowed) throw new Error(verdict.message);
13314
13119
  }
@@ -13780,75 +13585,6 @@ async function handleWait(thunkApi, opts, contextOpts) {
13780
13585
  }
13781
13586
  }
13782
13587
 
13783
- // packages/ai/tools/agent/setTodoListTool.ts
13784
- var setTodoListFunctionSchema = {
13785
- name: "setTodoList",
13786
- description: "\u8BBE\u7F6E/\u6574\u4F53\u66F4\u65B0\u5F53\u524D\u5BF9\u8BDD\u7684\u4EFB\u52A1\u5217\u8868\uFF08Kimi \u5F0F Todo \u5217\u8868\uFF09\u3002\u7528\u4E8E\u591A\u6B65\u9AA4\u4EFB\u52A1\u8FDB\u5EA6\u8FFD\u8E2A\u4E0E\u5C55\u793A\u3002",
13787
- parameters: {
13788
- type: "object",
13789
- properties: {
13790
- todos: {
13791
- type: "array",
13792
- description: "\u5B8C\u6574\u7684 Todo \u4EFB\u52A1\u5217\u8868\uFF08\u6574\u4F53\u66FF\u6362\uFF09",
13793
- items: {
13794
- type: "object",
13795
- properties: {
13796
- title: {
13797
- type: "string",
13798
- description: "\u4EFB\u52A1\u63CF\u8FF0/\u6807\u9898"
13799
- },
13800
- status: {
13801
- type: "string",
13802
- enum: ["pending", "in_progress", "done"],
13803
- description: "\u4EFB\u52A1\u72B6\u6001\uFF1Apending(\u5F85\u5904\u7406), in_progress(\u8FDB\u884C\u4E2D), done(\u5DF2\u5B8C\u6210)"
13804
- }
13805
- },
13806
- required: ["title", "status"]
13807
- }
13808
- }
13809
- },
13810
- required: ["todos"]
13811
- }
13812
- };
13813
- function formatTodoListDisplayData(todos) {
13814
- if (!todos || todos.length === 0) {
13815
- return "\u{1F4CB} Todo \u5217\u8868\u5DF2\u6E05\u7A7A";
13816
- }
13817
- const statusIcons = {
13818
- pending: "\u23F3",
13819
- in_progress: "\u{1F504}",
13820
- done: "\u2705"
13821
- };
13822
- const statusLabels = {
13823
- pending: "\u5F85\u5904\u7406",
13824
- in_progress: "\u8FDB\u884C\u4E2D",
13825
- done: "\u5DF2\u5B8C\u6210"
13826
- };
13827
- const doneCount = todos.filter((t) => t.status === "done").length;
13828
- const lines = [
13829
- `\u{1F4CB} Todo \u5217\u8868 (${doneCount}/${todos.length})`,
13830
- ...todos.map(
13831
- (t) => `\u2022 ${statusIcons[t.status] ?? "\u2022"} [${statusLabels[t.status] ?? t.status}] ${t.title}`
13832
- )
13833
- ];
13834
- return lines.join("\n");
13835
- }
13836
- async function setTodoListFunc(args) {
13837
- const todos = Array.isArray(args?.todos) ? args.todos : [];
13838
- const sanitizedTodos = todos.map((item) => {
13839
- const title = typeof item?.title === "string" ? item.title.trim() : "Untitled Task";
13840
- let status = "pending";
13841
- if (item?.status === "in_progress") status = "in_progress";
13842
- else if (item?.status === "done") status = "done";
13843
- return { title, status };
13844
- });
13845
- const displayData = formatTodoListDisplayData(sanitizedTodos);
13846
- return {
13847
- rawData: { todos: sanitizedTodos },
13848
- displayData
13849
- };
13850
- }
13851
-
13852
13588
  // packages/ai/tools/agent/agentTools.ts
13853
13589
  var agentToolDefinitions = [
13854
13590
  {
@@ -13996,21 +13732,6 @@ var agentToolDefinitions = [
13996
13732
  riskLevel: "medium",
13997
13733
  costLevel: "low",
13998
13734
  defaultConsent: "auto"
13999
- },
14000
- {
14001
- id: "setTodoList",
14002
- schema: setTodoListFunctionSchema,
14003
- executor: setTodoListFunc,
14004
- description: {
14005
- name: "setTodoList",
14006
- description: "\u8BBE\u7F6E/\u6574\u4F53\u66F4\u65B0\u5F53\u524D\u5BF9\u8BDD\u7684\u4EFB\u52A1\u5217\u8868\uFF08Kimi \u5F0F Todo \u5217\u8868\uFF09\u3002\u7528\u4E8E\u591A\u6B65\u9AA4\u4EFB\u52A1\u8FDB\u5EA6\u8FFD\u8E2A\u4E0E\u5C55\u793A\u3002",
14007
- category: "\u8BA1\u5212\u4E0E\u7F16\u6392"
14008
- },
14009
- behavior: "data",
14010
- uiGroup: "agent",
14011
- riskLevel: "low",
14012
- costLevel: "low",
14013
- defaultConsent: "auto"
14014
13735
  }
14015
13736
  ];
14016
13737
 
@@ -14935,7 +14656,7 @@ ${resultStr}
14935
14656
  }
14936
14657
 
14937
14658
  // packages/ai/tools/toolRunStore.ts
14938
- var import_react4 = __toESM(require_react());
14659
+ var import_react2 = __toESM(require_react());
14939
14660
  var createToolRunId = () => `toolrun_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 8)}`;
14940
14661
  var runsById = /* @__PURE__ */ new Map();
14941
14662
  var listeners2 = /* @__PURE__ */ new Set();
@@ -15044,7 +14765,7 @@ var executeToolRun = createAsyncThunk(
15044
14765
  if (!executionInput) {
15045
14766
  throw new Error(`ToolRun ${id} has no input to execute with.`);
15046
14767
  }
15047
- const { findToolExecutor: findToolExecutor2 } = await import("./tools-KMGFWO43.js");
14768
+ const { findToolExecutor: findToolExecutor2 } = await import("./tools-X5UWATZK.js");
15048
14769
  const { executor } = findToolExecutor2(run.toolName);
15049
14770
  toolRunStarted({
15050
14771
  id: run.id,
@@ -15068,7 +14789,7 @@ var executeToolRun = createAsyncThunk(
15068
14789
  const latestState = thunkApi.getState();
15069
14790
  const userId = selectIdentityUserId(latestState);
15070
14791
  if (userId) {
15071
- const { fetchUserSpaceMemberships } = await import("./memberThunks-P2ECUJ56.js");
14792
+ const { fetchUserSpaceMemberships } = await import("./memberThunks-5S5D3N4U.js");
15072
14793
  await thunkApi.dispatch(fetchUserSpaceMemberships(userId));
15073
14794
  }
15074
14795
  }
@@ -17368,7 +17089,11 @@ async function fetchDialogMessagesFromServer(args) {
17368
17089
  Authorization: `Bearer ${args.token}`,
17369
17090
  "Content-Type": "application/json"
17370
17091
  },
17371
- body: JSON.stringify({ dialogId: args.dialogId, limit: args.limit })
17092
+ body: JSON.stringify({
17093
+ dialogId: args.dialogId,
17094
+ ...args.dialogKey ? { dialogKey: args.dialogKey } : {},
17095
+ limit: args.limit
17096
+ })
17372
17097
  });
17373
17098
  if (!response.ok) return [];
17374
17099
  const newestFirst = await response.json();
@@ -17378,7 +17103,7 @@ async function fetchDialogMessagesFromServer(args) {
17378
17103
  dbKey: message.dbKey
17379
17104
  }));
17380
17105
  }
17381
- async function collectBestAvailableDialogMessages(db, dialogId, thunkApi, scanLimit) {
17106
+ async function collectBestAvailableDialogMessages(db, dialogId, thunkApi, scanLimit, dialogKey) {
17382
17107
  const localMessages = await collectDialogMessages(db, dialogId);
17383
17108
  const state2 = thunkApi?.getState?.();
17384
17109
  const runtime = state2 ? selectRuntimeSnapshot(state2) : null;
@@ -17394,6 +17119,7 @@ async function collectBestAvailableDialogMessages(db, dialogId, thunkApi, scanLi
17394
17119
  serverBase: base,
17395
17120
  token: runtime?.currentToken,
17396
17121
  dialogId,
17122
+ ...dialogKey ? { dialogKey } : {},
17397
17123
  limit: scanLimit
17398
17124
  }).catch(() => [])
17399
17125
  )
@@ -17469,7 +17195,13 @@ async function searchDialogMessagesFunc(args, _thunkApi, context) {
17469
17195
  1,
17470
17196
  SERVER_SCAN_LIMIT
17471
17197
  );
17472
- const messages = await collectBestAvailableDialogMessages(db, dialogId, _thunkApi, scanLimit);
17198
+ const messages = await collectBestAvailableDialogMessages(
17199
+ db,
17200
+ dialogId,
17201
+ _thunkApi,
17202
+ scanLimit,
17203
+ dialogKey
17204
+ );
17473
17205
  const limit = clampDialogSearchNumber(args.limit, 5, 1, MAX_LIMIT);
17474
17206
  const contextMessages = clampDialogSearchNumber(args.contextMessages, 1, 0, MAX_CONTEXT_MESSAGES);
17475
17207
  const results = buildDialogMessageSearchResults({
@@ -17551,7 +17283,7 @@ async function updateDocFunc(args, thunkApi) {
17551
17283
  updated_at: (/* @__PURE__ */ new Date()).toISOString()
17552
17284
  };
17553
17285
  await dispatch(write({ data: updatedPageData, customKey: id })).unwrap();
17554
- const { getDocState, applyExternalDocUpdate } = await import("./docStore-HUPQ2FSS.js");
17286
+ const { getDocState, applyExternalDocUpdate } = await import("./docStore-SUZUUWDI.js");
17555
17287
  if (getDocState().pageKey === id) {
17556
17288
  applyExternalDocUpdate({
17557
17289
  slateData: finalSlateData,
@@ -17576,7 +17308,7 @@ async function updateDocFunc(args, thunkApi) {
17576
17308
  // packages/ai/tools/updateUserPreferenceProfileTool.ts
17577
17309
  async function dispatchSetSettings(thunkApi, changes) {
17578
17310
  const injectedSetSettings = thunkApi?.extra?.setSettings;
17579
- const setSettings = typeof injectedSetSettings === "function" ? injectedSetSettings : (await import("./settingSlice-P4ZW7K5X.js")).setSettings;
17311
+ const setSettings = typeof injectedSetSettings === "function" ? injectedSetSettings : (await import("./settingThunks-CTVPPGIN.js")).setSettings;
17580
17312
  await thunkApi.dispatch(setSettings(changes)).unwrap();
17581
17313
  }
17582
17314
  var updateUserPreferenceProfileFunctionSchema = {
@@ -17945,7 +17677,7 @@ async function runZiweiChart(input) {
17945
17677
  const gender = normalizeGender(input.gender);
17946
17678
  const fixLeap = input.fixLeap !== false;
17947
17679
  const isLeapMonth = input.isLeapMonth === true;
17948
- const { astro } = await import("./lib-FRRS27KN.js");
17680
+ const { astro } = await import("./lib-PU2G2MSO.js");
17949
17681
  const rawChart = calendarType === "lunar" ? astro.byLunar(dateStr, timeIndex, gender, isLeapMonth, fixLeap, language) : astro.bySolar(dateStr, timeIndex, gender, fixLeap, language);
17950
17682
  const palaces = rawChart.palaces.map((palace) => ({
17951
17683
  index: palace.index,
@@ -18299,6 +18031,38 @@ var baseToolDefinitions = [
18299
18031
  costLevel: "low",
18300
18032
  defaultConsent: "ask"
18301
18033
  },
18034
+ {
18035
+ id: "updateAgentAutomation",
18036
+ schema: updateAgentAutomationFunctionSchema,
18037
+ executor: updateAgentAutomationFunc,
18038
+ description: {
18039
+ name: "updateAgentAutomation",
18040
+ description: "\u66F4\u65B0\u4E00\u4E2A agent automation \u7684\u6807\u9898\u3001instruction\u3001trigger\u3001status \u7B49\u5B57\u6BB5\u3002",
18041
+ category: "\u8BA1\u5212\u4E0E\u7F16\u6392"
18042
+ },
18043
+ behavior: "action",
18044
+ uiGroup: "general",
18045
+ capability: "general",
18046
+ riskLevel: "medium",
18047
+ costLevel: "low",
18048
+ defaultConsent: "ask"
18049
+ },
18050
+ {
18051
+ id: "deleteAgentAutomation",
18052
+ schema: deleteAgentAutomationFunctionSchema,
18053
+ executor: deleteAgentAutomationFunc,
18054
+ description: {
18055
+ name: "deleteAgentAutomation",
18056
+ description: "\u5220\u9664\u4E00\u4E2A agent automation \u53CA\u5176 owner index\u3002",
18057
+ category: "\u8BA1\u5212\u4E0E\u7F16\u6392"
18058
+ },
18059
+ behavior: "action",
18060
+ uiGroup: "general",
18061
+ capability: "general",
18062
+ riskLevel: "high",
18063
+ costLevel: "low",
18064
+ defaultConsent: "ask"
18065
+ },
18302
18066
  {
18303
18067
  id: "notifyUser",
18304
18068
  schema: notifyUserFunctionSchema,
@@ -19342,7 +19106,7 @@ var baseToolDefinitions = [
19342
19106
  },
19343
19107
  behavior: getChromeConnectorToolBehavior(name),
19344
19108
  capability: "browser_automation",
19345
- riskLevel: name === "chrome_click" || name === "chrome_type" ? "medium" : "low",
19109
+ riskLevel: name === "browser_click_element" || name === "browser_type" ? "medium" : "low",
19346
19110
  costLevel: "low",
19347
19111
  defaultConsent: getChromeConnectorToolDefaultConsent(name),
19348
19112
  cancelable: true
@@ -19392,28 +19156,6 @@ var baseToolDefinitions = [
19392
19156
  },
19393
19157
  behavior: "data"
19394
19158
  },
19395
- {
19396
- id: "whisperTurbo",
19397
- schema: whisperTurboSchema,
19398
- executor: whisperTurboFunc,
19399
- description: {
19400
- name: "whisper_turbo",
19401
- description: "\u4F7F\u7528 whisper-large-v3-turbo \u5FEB\u901F\u8F6C\u5F55\u97F3\u9891\u4E3A\u6587\u5B57\uFF0C\u652F\u6301\u591A\u8BED\u8A00\uFF0C\u901F\u5EA6\u5FEB\u4EF7\u683C\u4F4E\u3002",
19402
- category: "\u97F3\u9891\u4E0E\u5A92\u4F53"
19403
- },
19404
- behavior: "data"
19405
- },
19406
- {
19407
- id: "whisperV3",
19408
- schema: whisperV3Schema,
19409
- executor: whisperV3Func,
19410
- description: {
19411
- name: "whisper_v3",
19412
- description: "\u4F7F\u7528 whisper-large-v3 \u9AD8\u7CBE\u5EA6\u8F6C\u5F55\u97F3\u9891\uFF0C\u4E2D\u6587/\u591A\u8BED\u8A00\u51C6\u786E\u7387\u66F4\u9AD8\uFF0C\u9002\u5408\u5BF9\u8D28\u91CF\u8981\u6C42\u4E25\u683C\u7684\u573A\u666F\u3002",
19413
- category: "\u97F3\u9891\u4E0E\u5A92\u4F53"
19414
- },
19415
- behavior: "data"
19416
- },
19417
19159
  {
19418
19160
  id: "transcribeVideo",
19419
19161
  schema: transcribeVideoSchema,
@@ -19776,7 +19518,7 @@ var toolDefinitions = [
19776
19518
  ];
19777
19519
  var ALL_TOOL_FUNCTION_NAMES = toolDefinitions.map((tool) => tool.schema?.name).filter((name) => Boolean(name));
19778
19520
  var AGENT_AVAILABLE_TOOL_NAMES = ALL_TOOL_FUNCTION_NAMES.filter(
19779
- (name) => name !== "toolquery" && !name.startsWith("browser_") && name !== "exa_search"
19521
+ (name) => name !== "toolquery" && (!name.startsWith("browser_") || CHROME_CONNECTOR_ACCEPTED_TOOL_NAMES.includes(name)) && name !== "exa_search"
19780
19522
  );
19781
19523
  var patchAgentToolSchemas = () => {
19782
19524
  try {
@@ -19836,8 +19578,6 @@ var findToolExecutor = (rawName) => {
19836
19578
  };
19837
19579
 
19838
19580
  export {
19839
- resolveAgentRequiredPackIds,
19840
- resolveAgentRecommendedSkillNames,
19841
19581
  clipMultilineText,
19842
19582
  fetchAndSerializeTable,
19843
19583
  getToolResultErrorData,
@@ -19848,12 +19588,18 @@ export {
19848
19588
  toolRunFailed,
19849
19589
  getAllToolRuns,
19850
19590
  createSSEParser,
19851
- formatAgentListCard,
19591
+ selectMaxExecutionTime,
19592
+ selectGlobalPrompt,
19593
+ selectUserTonePreset,
19594
+ selectKnowledgeCaptureLevel,
19595
+ selectSpaceContextLevel,
19596
+ selectAiRecentContentLimit,
19597
+ resolveAgentRequiredPackIds,
19598
+ resolveAgentRecommendedSkillNames,
19852
19599
  readXPostFunctionSchema,
19853
19600
  readXPostFunc,
19854
19601
  readXhsProfileFunctionSchema,
19855
19602
  readXhsProfileFunc,
19856
- CHROME_CONNECTOR_TOOL_NAMES,
19857
19603
  rememberMemoryFunctionSchema,
19858
19604
  deleteMemoryFunctionSchema,
19859
19605
  queryMemoryFunctionSchema,
@@ -19861,7 +19607,6 @@ export {
19861
19607
  buildStartAgentRunFunctionSchema,
19862
19608
  CONTROL_AGENT_RUN_ACTIONS,
19863
19609
  buildControlAgentRunFunctionSchema,
19864
- setTodoListFunc,
19865
19610
  TOOL_GROUP_META,
19866
19611
  toolQueryFunctionSchema,
19867
19612
  toolQueryFunc,