nolo-cli 0.92.0-alpha.1 → 0.92.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/README.md +1 -1
  2. package/{_executeModel-SKXPDRHT.js → _executeModel-SCZL7EYW.js} +63 -61
  3. package/{action-5DATYWOM.js → action-3ZOODRBC.js} +11 -11
  4. package/{addContentAction-5OLTVWIE.js → addContentAction-IJHG2ZV7.js} +9 -9
  5. package/{addDialogAgentAction-BRGMORV4.js → addDialogAgentAction-IGFS2UBX.js} +11 -11
  6. package/{agentDeleteCommand-KIJCEDIQ.js → agentDeleteCommand-CTZYXUBY.js} +45 -43
  7. package/{agentEmailCommands-KVJQBG6I.js → agentEmailCommands-M4RKRMV5.js} +84 -79
  8. package/{agentGrantCommands-YW6PQAQ2.js → agentGrantCommands-M3XFO6EN.js} +2 -2
  9. package/{agentListCommands-S2WK34WE.js → agentListCommands-QWBMMYNO.js} +74 -81
  10. package/{agentMachineCommands-ESEVMWBG.js → agentMachineCommands-CFGNRGKC.js} +39 -37
  11. package/{agentProviderCommands-I26OTLEQ.js → agentProviderCommands-TWB6E5WD.js} +1 -1
  12. package/{agentPullCommand-GLOOXJ2E.js → agentPullCommand-HF4A42D4.js} +3 -3
  13. package/agentRecordCommands-ZTUVMJOZ.js +131 -0
  14. package/{agentRunCommand-PQ2D3MTU.js → agentRunCommand-NARA7GSD.js} +82 -76
  15. package/{agentRunControl-XLGD3UZ5.js → agentRunControl-AVJR4JW4.js} +2 -2
  16. package/{agentRuntimeLocal-ZLZCZO3C.js → agentRuntimeLocal-OKYH7XBH.js} +40 -34
  17. package/{agentSlice-JF7MQKXG.js → agentSlice-L6BEWT2Q.js} +11 -11
  18. package/{appDeleteCommands-KHSC6H42.js → appDeleteCommands-2D2R56YU.js} +39 -37
  19. package/{appDeployCommands-KCCU76AG.js → appDeployCommands-R5PAA5YI.js} +39 -37
  20. package/{appDeployStatusCommands-UBGX7463.js → appDeployStatusCommands-VHTBTS3W.js} +39 -37
  21. package/{appGetCommands-CGVGNM5J.js → appGetCommands-G35QG2QG.js} +39 -37
  22. package/{appListCommands-JUVQUOGH.js → appListCommands-YQ2PKESX.js} +39 -37
  23. package/{authCommand-ETL233F2.js → authCommand-W6I6GD3F.js} +115 -23
  24. package/{authCommands-RGOGCPP6.js → authCommands-GBIFZWD3.js} +5 -5
  25. package/{builtinSkillRegistry-PJU2R6ST.js → builtinSkillRegistry-XG6RUDWO.js} +9 -8
  26. package/{chatQueueReduxAdapter-NIJ6XFDN.js → chatQueueReduxAdapter-OINFB5SN.js} +29 -29
  27. package/{chromeCommands-FZYAU75D.js → chromeCommands-K27J4OVZ.js} +124 -28
  28. package/{chromeOpsCommands-62P2Q2YB.js → chromeOpsCommands-IXRLN57H.js} +4 -3
  29. package/{chunk-UYJKSCJ4.js → chunk-27ONFIEY.js} +22 -4
  30. package/{chunk-2HBFQM4C.js → chunk-2QX2MTNK.js} +25 -6
  31. package/{chunk-JEDZAO7L.js → chunk-2SYTUTLI.js} +257 -37
  32. package/{chunk-QTV7ZYBE.js → chunk-3BXNTXYI.js} +310 -136
  33. package/{chunk-6R425QS6.js → chunk-3IYMTWYZ.js} +22 -22
  34. package/{chunk-NTW5GWDM.js → chunk-3VNWWVKB.js} +2 -0
  35. package/{chunk-PNBZBDRM.js → chunk-4DPP773Q.js} +2 -2
  36. package/chunk-5J3PYNUP.js +255 -0
  37. package/{chunk-JPGCXHNM.js → chunk-5OA5HMTL.js} +1 -1
  38. package/{chunk-CDS4FQMP.js → chunk-5RUECWE2.js} +165 -15
  39. package/{chunk-DWUCB2A3.js → chunk-62IL3KQV.js} +4 -34
  40. package/{chunk-ZIK2FIX4.js → chunk-66MWFK6R.js} +9 -9
  41. package/{chunk-6YTOJY35.js → chunk-6D2JFXLY.js} +35 -0
  42. package/{chunk-3BMYXEUW.js → chunk-6O4IK4V2.js} +1 -1
  43. package/{chunk-NNJ4EAEH.js → chunk-6PPDYAMH.js} +7517 -1091
  44. package/{chunk-I2MX6JST.js → chunk-7KVZ5LDQ.js} +2 -2
  45. package/{chunk-Q554LLSI.js → chunk-AUDNYVRC.js} +1 -1
  46. package/{chunk-UKWGR5SS.js → chunk-AUXHZ2M5.js} +186 -397
  47. package/{chunk-TLPTMSX3.js → chunk-AVKLJP6J.js} +94 -94
  48. package/{chunk-5NHGLCPL.js → chunk-AZRHIN5B.js} +1 -1
  49. package/{chunk-5LRIZC2W.js → chunk-B7ANJQWZ.js} +2 -2
  50. package/{chunk-3QC3NGWZ.js → chunk-BDHW7EBD.js} +4 -4
  51. package/{chunk-HNUNYXYB.js → chunk-BJUDYFV5.js} +10 -2
  52. package/chunk-BMQ2MJUK.js +153 -0
  53. package/{chunk-3JIXYIXV.js → chunk-BNGW5ASC.js} +12 -2
  54. package/{chunk-2D6QK26I.js → chunk-BPCPBG2O.js} +16 -16
  55. package/{chunk-SATOEEL6.js → chunk-BTSYHR7J.js} +4 -4
  56. package/{chunk-4B3TDK3S.js → chunk-CCOXTK3I.js} +30 -7
  57. package/{chunk-LS2ZANRJ.js → chunk-CTUQJVQM.js} +1 -1
  58. package/{chunk-43WRG6QQ.js → chunk-CUBJUVQS.js} +13 -13
  59. package/chunk-CYSYR67N.js +93 -0
  60. package/{chunk-PIOIPOSY.js → chunk-D76D3RTR.js} +2 -2
  61. package/{chunk-HQCSU3DI.js → chunk-DCLMZ5TX.js} +4 -4
  62. package/{chunk-UT5NALV3.js → chunk-EFZKILX6.js} +4 -4
  63. package/{chunk-2L3O7RDP.js → chunk-EMBK4B7D.js} +9 -4
  64. package/{chunk-HVURBGF3.js → chunk-ESRMFY7G.js} +2 -2
  65. package/{chunk-ABQYVJBJ.js → chunk-ETZWFV6M.js} +1 -1
  66. package/{chunk-TRV2MIDW.js → chunk-EXAJ6DCR.js} +1 -0
  67. package/{chunk-RAYTIPJ5.js → chunk-F64B2W3R.js} +110 -34
  68. package/{chunk-S6SP3GWJ.js → chunk-FIZ5TAVE.js} +1 -1
  69. package/{chunk-MOH3ETXO.js → chunk-GA77XY7N.js} +542 -447
  70. package/{chunk-2WHQZTB7.js → chunk-GMVELWJG.js} +3 -3
  71. package/chunk-GMZLP5DV.js +82 -0
  72. package/{chunk-CJCJF5XB.js → chunk-H6A6X4EK.js} +36 -3
  73. package/{chunk-ONXOABJR.js → chunk-HNGRBWYF.js} +3 -0
  74. package/{chunk-46TSVHGZ.js → chunk-HNRASX3X.js} +8 -8
  75. package/{chunk-CPH3W5A7.js → chunk-I3TQJXQ7.js} +94 -3
  76. package/{chunk-TZB6Y4OD.js → chunk-IBQ6NJI4.js} +34 -20
  77. package/{chunk-IP2RNQU3.js → chunk-LNPYTNMG.js} +9 -5
  78. package/{chunk-TLO2X5C6.js → chunk-LNUOUGIY.js} +1 -1
  79. package/{chunk-GII32WZW.js → chunk-M2EJHDJP.js} +3 -0
  80. package/{chunk-G3V74DVM.js → chunk-MV26343G.js} +75 -18
  81. package/{chunk-7S4YWN7P.js → chunk-MX574M24.js} +1 -1
  82. package/{chunk-U7HSBX3I.js → chunk-O26PCYLS.js} +80 -13
  83. package/chunk-OCZKATRC.js +129 -0
  84. package/{chunk-YNI45YOE.js → chunk-P4U2QMT5.js} +65 -37
  85. package/chunk-P6GMCCAT.js +870 -0
  86. package/{chunk-YQPWX5EE.js → chunk-PEXU23PJ.js} +23 -76
  87. package/{chunk-7GDFU22A.js → chunk-PHINMJJZ.js} +983 -226
  88. package/{chunk-YC2MP5NP.js → chunk-Q3SKC2TQ.js} +7 -7
  89. package/{chunk-NU2SOATM.js → chunk-Q7JFHTQT.js} +3 -3
  90. package/{chunk-YNNVVLMV.js → chunk-QALRKMHF.js} +11 -10
  91. package/{chunk-T67757YH.js → chunk-QDSINZM3.js} +1 -1
  92. package/{chunk-TUEPUNFO.js → chunk-QJLEMM2V.js} +1 -1
  93. package/{chunk-FEAPBZQW.js → chunk-QL32RJFG.js} +98 -22
  94. package/{chunk-EONDQISD.js → chunk-QMQBSKUP.js} +886 -154
  95. package/{chunk-BJ7HBUL2.js → chunk-QZYL5UNG.js} +1003 -1041
  96. package/{chunk-YDEMAQEY.js → chunk-R4SQ3LGW.js} +1 -1
  97. package/{chunk-TSD5BVVP.js → chunk-RESDFLXS.js} +13 -13
  98. package/{chunk-ZKYHTHNE.js → chunk-S5XGT6GB.js} +5 -3
  99. package/{chunk-SAFZABH7.js → chunk-SV5IJK6K.js} +1 -1
  100. package/{chunk-W6MEYAGX.js → chunk-TC6TTNZW.js} +45 -45
  101. package/{chunk-BYMV6QZG.js → chunk-TNIX77YM.js} +4 -0
  102. package/{chunk-S46FYEWL.js → chunk-U7ZDIW37.js} +1 -1
  103. package/chunk-UNYJU5L6.js +780 -0
  104. package/{chunk-VUHXTHIK.js → chunk-V2AB7ULS.js} +5 -5
  105. package/{chunk-QFMFJZLO.js → chunk-V7E4PXQD.js} +1 -1
  106. package/chunk-VJVNU77E.js +83 -0
  107. package/{chunk-6D6VBVEW.js → chunk-VPFEPRME.js} +9 -9
  108. package/{chunk-EKXNV6EM.js → chunk-X5VY2LEV.js} +2 -2
  109. package/{chunk-O6OSWFZQ.js → chunk-XUWRURDF.js} +6 -0
  110. package/{chunk-Q67DOFOO.js → chunk-Y3PMXGLH.js} +2 -0
  111. package/{chunk-IMCXPAQV.js → chunk-YFIUVDQY.js} +6 -83
  112. package/{chunk-FZGV4FGK.js → chunk-YRRASA5Q.js} +268 -143
  113. package/{chunk-SH43IESU.js → chunk-YUNJN43V.js} +44 -9
  114. package/{chunk-2F7RJC6L.js → chunk-ZOVKKMF6.js} +1 -1
  115. package/commandRegistry-T4PY3XBY.js +833 -0
  116. package/{contentThunks-N7MGBLZJ.js → contentThunks-7SBK3Y7B.js} +29 -29
  117. package/{cooldownCommands-BSCH2W7P.js → cooldownCommands-ZLEPIB4A.js} +2 -2
  118. package/{createAgentAutomationAction-DNOR2HPB.js → createAgentAutomationAction-NPD23L7Y.js} +29 -29
  119. package/{createDialogAction-Y5CTGDHJ.js → createDialogAction-2JVPW2WV.js} +33 -32
  120. package/{createPageAction-HIQCWUNG.js → createPageAction-UUIPRGHK.js} +35 -35
  121. package/{dbSlice-NP52Y5TF.js → dbSlice-HFPIJT5P.js} +8 -8
  122. package/{deleteFile-YG6QMJLU.js → deleteFile-UEAD5A5Z.js} +3 -3
  123. package/{dialogCommands-RDCQ2IFS.js → dialogCommands-7JXIBGPD.js} +42 -40
  124. package/{dialogSlice-CCADNU4F.js → dialogSlice-Q2QUTMHK.js} +35 -29
  125. package/{dist-VODFSGNG.js → dist-NJC2W7I4.js} +61 -54
  126. package/{docCreateCommands-7BQO7QFJ.js → docCreateCommands-2JDSCRGB.js} +41 -39
  127. package/{docDeleteCommands-AXWDDTVX.js → docDeleteCommands-Y4XRBWKE.js} +41 -39
  128. package/{docReadCommands-NMDWZKZW.js → docReadCommands-35FY3PYU.js} +40 -38
  129. package/{docStore-RSIMI5PS.js → docStore-FWQIXF33.js} +9 -9
  130. package/{docUpdateCommands-KFIRA6WM.js → docUpdateCommands-MT7YKSP7.js} +41 -39
  131. package/{fetchMessages-EIU7UFFK.js → fetchMessages-67MEFPZR.js} +2 -2
  132. package/{getPricing-SLZYHJXY.js → getPricing-NMMFT3YI.js} +3 -3
  133. package/{handleSendMessageAction-ZIABBL3A.js → handleSendMessageAction-W33QLNXQ.js} +85 -82
  134. package/index.js +87 -884
  135. package/{localDialogRead-BTFJ4V2I.js → localDialogRead-EBRS242U.js} +2 -2
  136. package/{localRuntimeAuthority-6IR6BBXE.js → localRuntimeAuthority-5W6IJRAD.js} +6 -6
  137. package/{localRuntimeDb-SYQGUF4U.js → localRuntimeDb-3LRMNLCM.js} +1 -1
  138. package/{machineCommands-H6TGKZYD.js → machineCommands-HLEUUEKS.js} +77 -72
  139. package/{machineWsRunDispatch-YU4MGUB5.js → machineWsRunDispatch-DWBXW7XY.js} +75 -70
  140. package/{memberThunks-XJFHFZ5M.js → memberThunks-SKFZ37VS.js} +9 -9
  141. package/{models-WYXEJZAX.js → models-ZPU5EDF4.js} +2 -2
  142. package/oauthTokenStore-ITEB663N.js +23 -0
  143. package/{offlineMarxistsAgentCommand-JEWCIAWM.js → offlineMarxistsAgentCommand-HGXZV4XJ.js} +1 -1
  144. package/package.json +1 -1
  145. package/pdf-U6KSUEZZ.js +26435 -0
  146. package/processSpawn-SOAV3FEV.js +11 -0
  147. package/profileConfig-ZGOFORWV.js +43 -0
  148. package/{providerPresetApply-RWISXOW7.js → providerPresetApply-XTEXOH7X.js} +7 -7
  149. package/{providerRegistry-5KY7YV6K.js → providerRegistry-ADYDSLKR.js} +7 -7
  150. package/{read-KFAALANF.js → read-IEJLLUXY.js} +5 -5
  151. package/{readDocTool-XNMCT64I.js → readDocTool-4SPYCP2Y.js} +5 -3
  152. package/{readlineWorkspace-JTU5LTZI.js → readlineWorkspace-32ILQXZJ.js} +2398 -2019
  153. package/{removeDialogAgentAction-X3IS7JNU.js → removeDialogAgentAction-LILXTOQY.js} +14 -14
  154. package/{runAgentClientLoop-5TPQBYB6.js → runAgentClientLoop-MSCR5Y3E.js} +57 -56
  155. package/{runtimeDoctorCommands-X6WDBEQX.js → runtimeDoctorCommands-3USD722U.js} +3 -3
  156. package/runtimeModeArgs-2Y7BALTO.js +31 -0
  157. package/{setDialogExtraReferencesAction-QTV3ZJNH.js → setDialogExtraReferencesAction-LVNHLNT5.js} +10 -10
  158. package/{setPrimaryDialogAgentAction-EUUISNQ2.js → setPrimaryDialogAgentAction-DCKO5NTW.js} +14 -14
  159. package/{settingSlice-UMATY3PD.js → settingSlice-CNE75ISY.js} +10 -10
  160. package/{spaceCommands-PR6QHSEG.js → spaceCommands-UYWX63IP.js} +41 -39
  161. package/{streamAgentChatTurn-TXMNTXML.js → streamAgentChatTurn-73OAEDOJ.js} +146 -85
  162. package/{switchDialogAgentAction-HWFDQNY5.js → switchDialogAgentAction-JSYUQ5CG.js} +11 -11
  163. package/{tableCommands-O6NWHFKV.js → tableCommands-G7RV3RU3.js} +4 -4
  164. package/{toolApiClient-7PSIFQPJ.js → toolApiClient-INIQCPGY.js} +3 -3
  165. package/{tools-GEVUKUVY.js → tools-6IUC3EFI.js} +51 -50
  166. package/{tuiSummaryLlmCaller-PKZYGY3B.js → tuiSummaryLlmCaller-RVWN63CP.js} +16 -15
  167. package/{updateCommands-2M74UL7P.js → updateCommands-4EHDLF5J.js} +3 -3
  168. package/{updateDialogTitleAction-MFR3UGL5.js → updateDialogTitleAction-KCAY2OZF.js} +32 -32
  169. package/agentRecordCommands-TTYG2GYM.js +0 -126
  170. package/chunk-DMFLXNFM.js +0 -79
  171. package/chunk-Q5FJJ6XI.js +0 -103
  172. package/chunk-S7Z2HMCN.js +0 -25
  173. package/{chunk-VMFTFOWF.js → chunk-3AH7LNUB.js} +7 -7
  174. package/{chunk-X7HHHIOZ.js → chunk-Y6ROFCZO.js} +0 -0
  175. package/{db-WK5MDZVN.js → db-VQSAOWAO.js} +1 -1
@@ -1,9 +1,13 @@
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-5RUECWE2.js";
8
+ import {
9
+ fetchWithTransientRetry
10
+ } from "./chunk-5UTFL4QJ.js";
7
11
  import {
8
12
  CORE_DRAIN_REASON,
9
13
  DRAIN_EXHAUSTED_USER_MESSAGE,
@@ -11,6 +15,13 @@ import {
11
15
  normalizeNonNegativeMs,
12
16
  parseRetryAfterHeaderMs
13
17
  } from "./chunk-3L2WKC3W.js";
18
+ import {
19
+ getUserDataItemTimestamp,
20
+ mergeAndDedupUserData
21
+ } from "./chunk-KQHGZWSV.js";
22
+ import {
23
+ waitForAbortableDelay
24
+ } from "./chunk-N4G4PKQ6.js";
14
25
  import {
15
26
  TASK_PREVIEW_MAX,
16
27
  buildDelegatedTaskContent,
@@ -21,26 +32,10 @@ import {
21
32
  formatStatusRunCard,
22
33
  formatStopRunCard,
23
34
  resolveRunLabel
24
- } from "./chunk-NTW5GWDM.js";
25
- import {
26
- omitNullishAgentSummaryFields,
27
- sortSafeAgentSummaries,
28
- summarizeCredentialGroups,
29
- toCompactAgentSummary,
30
- toSafeAgentSummary,
31
- toUnavailableAgentSummary
32
- } from "./chunk-CDS4FQMP.js";
35
+ } from "./chunk-3VNWWVKB.js";
33
36
  import {
34
- getUserDataItemTimestamp,
35
- mergeAndDedupUserData
36
- } from "./chunk-KQHGZWSV.js";
37
- import {
38
- readDocFunc,
39
- readDocFunctionSchema,
40
- readPageFunc,
41
- readPageFunctionSchema,
42
- slateToSimplifiedMarkdown
43
- } from "./chunk-HNUNYXYB.js";
37
+ createDialogAction
38
+ } from "./chunk-66MWFK6R.js";
44
39
  import {
45
40
  addMemberSpace,
46
41
  fetchAuthoritativeRemoteSpace,
@@ -52,27 +47,10 @@ import {
52
47
  setMembershipRejected,
53
48
  setSpaceInitialized,
54
49
  updateMemberSpaceName
55
- } from "./chunk-46TSVHGZ.js";
56
- import {
57
- ToolApiError,
58
- buildToolRequestHeaders,
59
- callToolApi,
60
- getRequestConfig,
61
- getToolBaseUrl,
62
- getToolRequestContext
63
- } from "./chunk-HQCSU3DI.js";
64
- import {
65
- setDialogExtraReferencesAction
66
- } from "./chunk-SATOEEL6.js";
67
- import {
68
- waitForAbortableDelay
69
- } from "./chunk-N4G4PKQ6.js";
50
+ } from "./chunk-HNRASX3X.js";
70
51
  import {
71
52
  markdownToSlate
72
- } from "./chunk-FZGV4FGK.js";
73
- import {
74
- extractMentionsFromSlate
75
- } from "./chunk-MEYIRKDN.js";
53
+ } from "./chunk-YRRASA5Q.js";
76
54
  import {
77
55
  slateToRenderMarkdown
78
56
  } from "./chunk-63W5N6P3.js";
@@ -81,10 +59,28 @@ import {
81
59
  } from "./chunk-VF4K2QE6.js";
82
60
  import {
83
61
  createDocState
84
- } from "./chunk-NU2SOATM.js";
62
+ } from "./chunk-Q7JFHTQT.js";
85
63
  import {
86
- createDialogAction
87
- } from "./chunk-ZIK2FIX4.js";
64
+ setDialogExtraReferencesAction
65
+ } from "./chunk-BTSYHR7J.js";
66
+ import {
67
+ ToolApiError,
68
+ buildToolRequestHeaders,
69
+ callToolApi,
70
+ getRequestConfig,
71
+ getToolBaseUrl,
72
+ getToolRequestContext
73
+ } from "./chunk-DCLMZ5TX.js";
74
+ import {
75
+ readDocFunc,
76
+ readDocFunctionSchema,
77
+ readPageFunc,
78
+ readPageFunctionSchema,
79
+ resolvePageReadMarkdown
80
+ } from "./chunk-BJUDYFV5.js";
81
+ import {
82
+ extractMentionsFromSlate
83
+ } from "./chunk-MEYIRKDN.js";
88
84
  import {
89
85
  DEFAULT_COLLAPSED_CATEGORIES,
90
86
  addContentToSpace,
@@ -102,7 +98,7 @@ import {
102
98
  updateContentCategory,
103
99
  updateContentTitle,
104
100
  writeStoredCollapsedCategories
105
- } from "./chunk-2D6QK26I.js";
101
+ } from "./chunk-BPCPBG2O.js";
106
102
  import {
107
103
  getCurrentSpaceId,
108
104
  getCurrentSpaceIdRaw,
@@ -124,31 +120,34 @@ import {
124
120
  selectMsgById,
125
121
  uiAskChoiceFunc,
126
122
  uiAskChoiceFunctionSchema
127
- } from "./chunk-NNJ4EAEH.js";
123
+ } from "./chunk-6PPDYAMH.js";
128
124
  import {
129
125
  createAgent,
130
126
  deleteServerSyncedCredential,
131
127
  runLlm,
132
128
  streamAgentChatTurn,
133
129
  updateAgent
134
- } from "./chunk-YC2MP5NP.js";
130
+ } from "./chunk-Q3SKC2TQ.js";
135
131
  import {
136
132
  getActiveDialogKey,
137
133
  selectCurrentDialogKey,
138
134
  selectPendingRawDataByPageKey
139
- } from "./chunk-6YTOJY35.js";
135
+ } from "./chunk-6D2JFXLY.js";
140
136
  import {
141
137
  require_react
142
138
  } from "./chunk-YDH3FDFQ.js";
139
+ import {
140
+ shareResourceAction
141
+ } from "./chunk-GMVELWJG.js";
143
142
  import {
144
143
  listBuiltinSkills,
145
144
  resolveBuiltinCapability,
146
145
  resolveBuiltinSkillByName,
147
146
  resolveBuiltinSkillEntry
148
- } from "./chunk-VUHXTHIK.js";
147
+ } from "./chunk-V2AB7ULS.js";
149
148
  import {
150
149
  CAPABILITY_PACKS
151
- } from "./chunk-2L3O7RDP.js";
150
+ } from "./chunk-EMBK4B7D.js";
152
151
  import {
153
152
  buildSkillDocMarkdown,
154
153
  normalizeSkillModalities,
@@ -156,7 +155,7 @@ import {
156
155
  parseExternalSkillMarkdown,
157
156
  parseSkillDocProtocol,
158
157
  resolvePageSkillMetadata
159
- } from "./chunk-Q554LLSI.js";
158
+ } from "./chunk-AUDNYVRC.js";
160
159
  import {
161
160
  DEFAULT_READ_DIALOG_MAX_RESPONSE_CHARS,
162
161
  NOLO_WORKSPACE_TOOL_NAMES,
@@ -173,62 +172,67 @@ import {
173
172
  redactAgentRecordForWorkspaceTool,
174
173
  resolveNoloDialogInput,
175
174
  verifyNoloDialogSubjectRefQuery
176
- } from "./chunk-IP2RNQU3.js";
175
+ } from "./chunk-LNPYTNMG.js";
177
176
  import {
178
- isAgentUnavailableNow
179
- } from "./chunk-CJCJF5XB.js";
177
+ buildDatabaseFileContentUrl,
178
+ clipCompactText
179
+ } from "./chunk-F64B2W3R.js";
180
180
  import {
181
- buildDatabaseFileContentUrl
182
- } from "./chunk-RAYTIPJ5.js";
183
- import {
184
- DEFAULT_MODEL
185
- } from "./chunk-QTV7ZYBE.js";
181
+ createFileCredentialBroker
182
+ } from "./chunk-ESRMFY7G.js";
186
183
  import {
187
184
  compactWhitespace
188
185
  } from "./chunk-DWLEOOGR.js";
189
- import {
190
- createFileCredentialBroker
191
- } from "./chunk-HVURBGF3.js";
192
186
  import {
193
187
  toErrorMessage
194
188
  } from "./chunk-HNMXYYJR.js";
189
+ import {
190
+ DEFAULT_MODEL,
191
+ clampReasoningEffort,
192
+ resolveModelReasoningCapabilityWithCache
193
+ } from "./chunk-3BXNTXYI.js";
194
+ import {
195
+ UNCATEGORIZED_ID,
196
+ addContentAction,
197
+ checkSpaceMembership
198
+ } from "./chunk-B7ANJQWZ.js";
199
+ import {
200
+ createSpaceKey,
201
+ normalizeSpaceId
202
+ } from "./chunk-UAD2WT54.js";
195
203
  import {
196
204
  canonicalizeToolName,
197
205
  canonicalizeToolNames
198
- } from "./chunk-O6OSWFZQ.js";
206
+ } from "./chunk-XUWRURDF.js";
199
207
  import {
200
- shareResourceAction
201
- } from "./chunk-2WHQZTB7.js";
208
+ CHROME_CONNECTOR_ACCEPTED_TOOL_NAMES,
209
+ chromeConnectorToolSchemas,
210
+ chromeConnectorUnavailableFunc,
211
+ getChromeConnectorToolBehavior,
212
+ getChromeConnectorToolDefaultConsent
213
+ } from "./chunk-5J3PYNUP.js";
202
214
  import {
203
215
  AGENT_UPDATE_FIELD_NAMES,
204
216
  normalizeAgentUpdateFieldList,
205
217
  selectAutoApproveSelfUpdateFields,
206
218
  selectCurrentServer,
207
219
  selectSyncServers
208
- } from "./chunk-6R425QS6.js";
220
+ } from "./chunk-3IYMTWYZ.js";
209
221
  import {
210
222
  asRecordOrEmpty
211
223
  } from "./chunk-KX6YBIHG.js";
212
- import {
213
- UNCATEGORIZED_ID,
214
- addContentAction,
215
- checkSpaceMembership
216
- } from "./chunk-5LRIZC2W.js";
217
- import {
218
- createSpaceKey,
219
- normalizeSpaceId
220
- } from "./chunk-UAD2WT54.js";
221
224
  import {
222
225
  patch,
223
226
  read,
224
227
  readAndWait,
225
228
  readAndWaitAction,
229
+ readFileContentAction,
226
230
  remove,
227
231
  selectById,
228
232
  selectEntities,
229
233
  toTimestampMs,
230
234
  write
231
- } from "./chunk-YNNVVLMV.js";
235
+ } from "./chunk-QALRKMHF.js";
232
236
  import {
233
237
  SEPARATOR,
234
238
  TYPE_STORAGE_PREFIXES,
@@ -249,7 +253,7 @@ import {
249
253
  splitKey,
250
254
  toTrimmedString,
251
255
  ulid
252
- } from "./chunk-VMFTFOWF.js";
256
+ } from "./chunk-3AH7LNUB.js";
253
257
  import {
254
258
  asOptionalFiniteNumber
255
259
  } from "./chunk-WWC7I6TA.js";
@@ -258,10 +262,7 @@ import {
258
262
  } from "./chunk-QSJ3HFEF.js";
259
263
  import {
260
264
  readAction
261
- } from "./chunk-UT5NALV3.js";
262
- import {
263
- extractCustomId
264
- } from "./chunk-GII32WZW.js";
265
+ } from "./chunk-EFZKILX6.js";
265
266
  import {
266
267
  DEVICE_LOCAL_OWNER_ID,
267
268
  createAsyncThunk,
@@ -273,7 +274,7 @@ import {
273
274
  resolveEffectiveSpaceActorId,
274
275
  resolveRecordOwnerUserId,
275
276
  selectRuntimeSnapshot
276
- } from "./chunk-UKWGR5SS.js";
277
+ } from "./chunk-AUXHZ2M5.js";
277
278
  import {
278
279
  isAbortError
279
280
  } from "./chunk-QOKAKDPE.js";
@@ -289,6 +290,9 @@ import {
289
290
  import {
290
291
  isRecord
291
292
  } from "./chunk-KUG52IAP.js";
293
+ import {
294
+ extractCustomId
295
+ } from "./chunk-M2EJHDJP.js";
292
296
  import {
293
297
  asTrimmedString
294
298
  } from "./chunk-3EUW3WEO.js";
@@ -308,6 +312,69 @@ import {
308
312
  __toESM
309
313
  } from "./chunk-4VNS5WPM.js";
310
314
 
315
+ // packages/ai/tools/agentAutomationSchemas.ts
316
+ var agentAutomationTriggerSchema = {
317
+ oneOf: [
318
+ {
319
+ type: "object",
320
+ description: "Cron trigger.",
321
+ properties: {
322
+ type: { type: "string", enum: ["cron"] },
323
+ expression: {
324
+ type: "string",
325
+ description: "Cron expression, e.g. 0 9 * * *."
326
+ },
327
+ timezone: {
328
+ type: "string",
329
+ description: "Optional timezone, e.g. Asia/Shanghai."
330
+ }
331
+ },
332
+ required: ["type", "expression"],
333
+ additionalProperties: false
334
+ },
335
+ {
336
+ type: "object",
337
+ 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.",
338
+ properties: {
339
+ type: { type: "string", enum: ["email"] },
340
+ acceptAll: {
341
+ type: "boolean",
342
+ description: "When true the automation fires on every inbound email for the bound agent mailbox \u2014 no content filtering."
343
+ },
344
+ fromContains: {
345
+ type: "string",
346
+ description: "Case-insensitive substring match against sender email address."
347
+ },
348
+ subjectContains: {
349
+ type: "string",
350
+ description: "Case-insensitive substring match against email subject."
351
+ },
352
+ fromContainsAny: {
353
+ type: "array",
354
+ description: "OR'd substring match against sender email \u2014 matches if ANY listed needle appears in the From header.",
355
+ items: { type: "string" },
356
+ minItems: 1
357
+ },
358
+ subjectContainsAny: {
359
+ type: "array",
360
+ description: "OR'd substring match against email subject \u2014 matches if ANY listed needle appears in the Subject.",
361
+ items: { type: "string" },
362
+ minItems: 1
363
+ }
364
+ },
365
+ required: ["type"],
366
+ anyOf: [
367
+ { required: ["acceptAll"] },
368
+ { required: ["fromContains"] },
369
+ { required: ["subjectContains"] },
370
+ { required: ["fromContainsAny"] },
371
+ { required: ["subjectContainsAny"] }
372
+ ],
373
+ additionalProperties: false
374
+ }
375
+ ]
376
+ };
377
+
311
378
  // packages/ai/tools/modelUsageTools.ts
312
379
  var queryModelUsageFunctionSchema = {
313
380
  name: "queryModelUsage",
@@ -432,7 +499,7 @@ var queryUserGrowthReportFunctionSchema = {
432
499
  };
433
500
  var createAgentAutomationFunctionSchema = {
434
501
  name: "createAgentAutomation",
435
- description: "\u521B\u5EFA\u4E00\u4E2A\u957F\u671F agent automation \u89C4\u5219\u3002\u9002\u5408\u8BA9 agent \u6309 cron \u5B9A\u65F6\u68C0\u67E5\u7528\u91CF\u3001\u751F\u6210\u62A5\u544A\u6216\u6267\u884C\u63D0\u9192\uFF1B\u53EF\u9009\u62E9\u521B\u5EFA\u540E\u7ACB\u523B\u8BD5\u8FD0\u884C\u4E00\u6B21\u3002",
502
+ 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",
436
503
  parameters: {
437
504
  type: "object",
438
505
  properties: {
@@ -442,29 +509,9 @@ var createAgentAutomationFunctionSchema = {
442
509
  },
443
510
  instruction: {
444
511
  type: "string",
445
- description: "automation \u6BCF\u6B21\u6267\u884C\u65F6\u4EA4\u7ED9 agent \u7684\u5B8C\u6574\u4EFB\u52A1\u63CF\u8FF0\uFF0C\u5E94\u5305\u542B\u68C0\u67E5\u6761\u4EF6\u548C\u901A\u77E5\u65B9\u5F0F\u3002"
446
- },
447
- trigger: {
448
- type: "object",
449
- description: "\u89E6\u53D1\u89C4\u5219\u3002v0 \u53EA\u652F\u6301 cron\u3002",
450
- properties: {
451
- type: {
452
- type: "string",
453
- enum: ["cron"],
454
- description: "\u89E6\u53D1\u7C7B\u578B\u3002v0 \u53EA\u652F\u6301 cron\u3002"
455
- },
456
- expression: {
457
- type: "string",
458
- description: "cron \u8868\u8FBE\u5F0F\uFF0C\u4F8B\u5982\u6BCF\u5929 09:00 \u6267\u884C\u4E3A 0 9 * * *\u3002"
459
- },
460
- timezone: {
461
- type: "string",
462
- description: "\u53EF\u9009\u65F6\u533A\uFF0C\u4F8B\u5982 Asia/Shanghai\u3002"
463
- }
464
- },
465
- required: ["type", "expression"],
466
- additionalProperties: false
512
+ description: "automation \u6BCF\u6B21\u6267\u884C\u65F6\u4EA4\u7ED9 agent \u7684\u5B8C\u6574\u4EFB\u52A1\u63CF\u8FF0\uFF0C\u5E94\u5305\u542B\u5904\u7406\u76EE\u6807\u548C\u5FC5\u8981\u7684\u901A\u77E5\u65B9\u5F0F\u3002"
467
513
  },
514
+ trigger: agentAutomationTriggerSchema,
468
515
  ownerAgentKey: {
469
516
  type: "string",
470
517
  description: "\u6267\u884C\u8BE5 automation \u7684 agentKey\u3002\u9ED8\u8BA4\u4F7F\u7528\u5F53\u524D agent\u3002"
@@ -489,13 +536,64 @@ var createAgentAutomationFunctionSchema = {
489
536
  },
490
537
  runOnceNow: {
491
538
  type: "boolean",
492
- description: "\u521B\u5EFA\u540E\u662F\u5426\u7ACB\u5373\u6267\u884C\u4E00\u6B21\uFF0C\u7528\u6765\u9A8C\u8BC1 automation \u4F1A\u4EA7\u751F\u4EC0\u4E48\u7ED3\u679C\u3002",
539
+ description: "cron \u521B\u5EFA\u540E\u53EF\u7ACB\u5373\u8BD5\u8FD0\u884C\uFF1Bemail trigger \u4E0D\u652F\u6301\uFF0C\u56E0\u4E3A\u521B\u5EFA\u65F6\u6CA1\u6709\u89E6\u53D1\u90AE\u4EF6\u4E0A\u4E0B\u6587\u3002",
493
540
  default: false
494
541
  }
495
542
  },
496
543
  required: ["instruction", "trigger"]
497
544
  }
498
545
  };
546
+ var updateAgentAutomationFunctionSchema = {
547
+ name: "updateAgentAutomation",
548
+ 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",
549
+ parameters: {
550
+ type: "object",
551
+ properties: {
552
+ automationKey: {
553
+ type: "string",
554
+ description: "automation \u7684 dbKey\uFF08agent-automation-{userId}-{id}\uFF09\u3002"
555
+ },
556
+ title: { type: "string", description: "\u65B0\u6807\u9898\u3002" },
557
+ instruction: { type: "string", description: "\u65B0 instruction\u3002" },
558
+ status: {
559
+ type: "string",
560
+ enum: ["active", "paused"],
561
+ description: "automation \u72B6\u6001\u3002paused \u65F6 dispatcher \u4E0D\u518D\u89E6\u53D1 run\u3002"
562
+ },
563
+ trigger: agentAutomationTriggerSchema,
564
+ spaceId: { type: "string", description: "\u65B0\u7684 spaceId\uFF1B\u4F20\u7A7A\u5B57\u7B26\u4E32\u6E05\u9664\u3002" },
565
+ subjectRefs: {
566
+ type: "array",
567
+ description: "\u65B0\u7684 subjectRefs\uFF1B\u4F20\u7A7A\u6570\u7EC4\u6E05\u9664\u3002",
568
+ items: {
569
+ type: "object",
570
+ properties: {
571
+ kind: { type: "string" },
572
+ id: { type: "string" },
573
+ role: { type: "string" }
574
+ },
575
+ required: ["kind", "id"],
576
+ additionalProperties: true
577
+ }
578
+ }
579
+ },
580
+ required: ["automationKey"]
581
+ }
582
+ };
583
+ var deleteAgentAutomationFunctionSchema = {
584
+ name: "deleteAgentAutomation",
585
+ 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",
586
+ parameters: {
587
+ type: "object",
588
+ properties: {
589
+ automationKey: {
590
+ type: "string",
591
+ description: "automation \u7684 dbKey\uFF08agent-automation-{userId}-{id}\uFF09\u3002"
592
+ }
593
+ },
594
+ required: ["automationKey"]
595
+ }
596
+ };
499
597
  var notifyUserFunctionSchema = {
500
598
  name: "notifyUser",
501
599
  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",
@@ -537,6 +635,8 @@ var serverOnlyResult = (toolName) => ({
537
635
  var queryModelUsageFunc = async () => serverOnlyResult("queryModelUsage");
538
636
  var queryUserGrowthReportFunc = async () => serverOnlyResult("queryUserGrowthReport");
539
637
  var createAgentAutomationFunc = async () => serverOnlyResult("createAgentAutomation");
638
+ var updateAgentAutomationFunc = async () => serverOnlyResult("updateAgentAutomation");
639
+ var deleteAgentAutomationFunc = async () => serverOnlyResult("deleteAgentAutomation");
540
640
  var notifyUserFunc = async () => serverOnlyResult("notifyUser");
541
641
 
542
642
  // packages/ai/tools/toolResultError.ts
@@ -710,6 +810,22 @@ var buildPatch = (args) => {
710
810
  if (reasoning_effort !== void 0) patch2.reasoning_effort = reasoning_effort;
711
811
  return patch2;
712
812
  };
813
+ var calibrateReasoningEffortInPatch = (patch2, previousAgent) => {
814
+ if (patch2.reasoning_effort === void 0) return void 0;
815
+ const provider = patch2.provider ?? previousAgent.provider ?? void 0;
816
+ const model = patch2.model ?? previousAgent.model ?? void 0;
817
+ const cap = resolveModelReasoningCapabilityWithCache(provider, model);
818
+ if (!cap.found) return void 0;
819
+ const requested = String(patch2.reasoning_effort);
820
+ const calibrated = clampReasoningEffort(requested, provider ?? null, model ?? null);
821
+ if (!calibrated) {
822
+ delete patch2.reasoning_effort;
823
+ 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`;
824
+ }
825
+ patch2.reasoning_effort = calibrated;
826
+ if (calibrated === requested) return void 0;
827
+ return `\u2139\uFE0F reasoning_effort \u5DF2\u6309 ${model ?? "\u5F53\u524D\u6A21\u578B"} \u7684\u771F\u5B9E\u6863\u4F4D\u4ECE "${requested}" \u5438\u9644\u4E3A "${calibrated}"\u3002`;
828
+ };
713
829
  var AGENT_UPDATE_FIELD_NAME_SET = new Set(AGENT_UPDATE_FIELD_NAMES);
714
830
  var listRequestedFields = (args) => Object.keys(args).filter(
715
831
  (key) => key !== "agentId" && key !== "__confirmedSelfEvolution" && AGENT_UPDATE_FIELD_NAME_SET.has(key) && args[key] !== void 0
@@ -911,7 +1027,7 @@ var HOSTED_EXEC_RUNTIME_TOOL_POLICY = {
911
1027
  workspace: { mode: "lease" }
912
1028
  };
913
1029
  var findModelConfig = async (modelName, provider) => {
914
- const { ALL_MODELS } = await import("./models-WYXEJZAX.js");
1030
+ const { ALL_MODELS } = await import("./models-ZPU5EDF4.js");
915
1031
  const name = toTrimmedString(modelName);
916
1032
  const prov = toTrimmedString(provider ?? "");
917
1033
  if (!name) return null;
@@ -1156,7 +1272,7 @@ var buildPlatformFormDataFromArgs = async (args) => {
1156
1272
  const trimmedModel = toTrimmedString(model);
1157
1273
  const trimmedProvider = toTrimmedString(provider);
1158
1274
  const modelConfig = await findModelConfig(trimmedModel, trimmedProvider);
1159
- const { getModelPricing } = await import("./getPricing-SLZYHJXY.js");
1275
+ const { getModelPricing } = await import("./getPricing-NMMFT3YI.js");
1160
1276
  const normalizedTools = tools ?? [];
1161
1277
  const resolvedRuntimeToolPolicy = runtimeToolPolicy ?? (normalizedTools.includes("execShell") ? HOSTED_EXEC_RUNTIME_TOOL_POLICY : void 0);
1162
1278
  const formData = {
@@ -1292,6 +1408,7 @@ ${availableList}`
1292
1408
  formData = await buildPlatformFormDataFromArgs(args);
1293
1409
  formData.linkedSpaces = resolvedLinkedSpaces;
1294
1410
  }
1411
+ const effortNote = calibrateReasoningEffortInPatch(formData, formData);
1295
1412
  const expectedProviderConfig = getForkedAgentProviderExpectation(formData);
1296
1413
  try {
1297
1414
  const agent = await thunkApi.dispatch(
@@ -1337,6 +1454,9 @@ ${availableList}`
1337
1454
  if (typeof currentBalance === "number") {
1338
1455
  lines.push(`- \u5F53\u524D\u4F59\u989D: ${currentBalance}`);
1339
1456
  }
1457
+ if (effortNote) {
1458
+ lines.push(effortNote);
1459
+ }
1340
1460
  return {
1341
1461
  rawData: agent,
1342
1462
  displayData: lines.join("\n")
@@ -1379,6 +1499,7 @@ async function updateAgentToolFunc(args, thunkApi) {
1379
1499
  }
1380
1500
  const agentId = extractAgentId(dbKey);
1381
1501
  const formData = buildPatch(args);
1502
+ const effortNote = calibrateReasoningEffortInPatch(formData, previousAgent);
1382
1503
  const requestedFields = listRequestedFields(args);
1383
1504
  assertAgentUpdateConfirmation({
1384
1505
  scope: "generic",
@@ -1401,7 +1522,8 @@ async function updateAgentToolFunc(args, thunkApi) {
1401
1522
  );
1402
1523
  return {
1403
1524
  rawData: rawDataWithUpdateInfo,
1404
- displayData: formatUpdatedAgentOutput(agent)
1525
+ displayData: formatUpdatedAgentOutput(agent) + (effortNote ? `
1526
+ ${effortNote}` : "")
1405
1527
  };
1406
1528
  }
1407
1529
 
@@ -3259,7 +3381,7 @@ async function readFunc(args, thunkApi, context) {
3259
3381
  }
3260
3382
  if (dbKey.startsWith("PAGE-") || result.type === "page" /* DOC */) {
3261
3383
  const pageData = result;
3262
- const markdownContent = slateToSimplifiedMarkdown(pageData.slateData || []);
3384
+ const markdownContent = resolvePageReadMarkdown(pageData);
3263
3385
  return {
3264
3386
  rawData: {
3265
3387
  ...pageData,
@@ -3397,92 +3519,6 @@ async function listUserSpacesFunc(args, thunkApi, context) {
3397
3519
  }
3398
3520
  }
3399
3521
 
3400
- // packages/ai/agent/agentDiscovery.ts
3401
- function isPreferredAgent(agent) {
3402
- return agent.isFavorite === true || agent.isOwned === true || agent.isOAuth === true || agent.billingSource === "user_subscription" || agent.billingSource === "user_api" || agent.billingSource === "local";
3403
- }
3404
- function isPublicDiscoveryAgent(agent) {
3405
- return agent.isPublic === true && !isPreferredAgent(agent);
3406
- }
3407
- function resolveDiscoveryScope(args) {
3408
- const rawScope = typeof args?.scope === "string" ? args.scope.trim().toLowerCase() : void 0;
3409
- const hasScope = rawScope !== void 0 && rawScope !== "";
3410
- const hasPublicOnly = typeof args?.publicOnly === "boolean";
3411
- const publicOnly = args?.publicOnly === true;
3412
- if (hasScope) {
3413
- if (rawScope !== "preferred" && rawScope !== "public" && rawScope !== "all") {
3414
- throw new Error(`Invalid scope '${args?.scope}': must be 'preferred', 'public', or 'all'.`);
3415
- }
3416
- const scope = rawScope;
3417
- if (hasPublicOnly) {
3418
- if (publicOnly && scope !== "public") {
3419
- throw new Error(
3420
- `Conflicting arguments: scope='${args?.scope}' conflicts with publicOnly=true.`
3421
- );
3422
- }
3423
- if (!publicOnly && scope === "public") {
3424
- throw new Error(
3425
- `Conflicting arguments: scope='${args?.scope}' conflicts with publicOnly=false.`
3426
- );
3427
- }
3428
- }
3429
- return scope;
3430
- }
3431
- if (hasPublicOnly && publicOnly) {
3432
- return "public";
3433
- }
3434
- return "preferred";
3435
- }
3436
- function agentIdentityKeys(agent) {
3437
- return [agent.agentKey, agent.publicKey, agent.id].filter(
3438
- (key) => typeof key === "string" && key.length > 0
3439
- );
3440
- }
3441
- function deduplicateAgentSummaries(agents) {
3442
- const byIdentity = /* @__PURE__ */ new Map();
3443
- for (const agent of agents) {
3444
- const keys = agentIdentityKeys(agent);
3445
- const existing = keys.map((key) => byIdentity.get(key)).find(Boolean);
3446
- if (!existing) {
3447
- for (const key of keys) byIdentity.set(key, agent);
3448
- continue;
3449
- }
3450
- const winner = isPreferredAgent(agent) && !isPreferredAgent(existing) ? agent : existing;
3451
- for (const key of /* @__PURE__ */ new Set([...agentIdentityKeys(existing), ...keys])) byIdentity.set(key, winner);
3452
- }
3453
- return [...new Set(byIdentity.values())];
3454
- }
3455
- function filterAgentsByScope(agents, scope) {
3456
- const unique = deduplicateAgentSummaries(agents);
3457
- if (scope === "preferred") return unique.filter((agent) => isPreferredAgent(agent));
3458
- if (scope === "public") return unique.filter((agent) => isPublicDiscoveryAgent(agent));
3459
- return unique.filter((agent) => isPreferredAgent(agent) || agent.isPublic === true);
3460
- }
3461
- function buildAgentDiscoveryResult(options) {
3462
- const scope = resolveDiscoveryScope({
3463
- scope: options.scope,
3464
- publicOnly: options.publicOnly
3465
- });
3466
- const now = options.now ?? Date.now();
3467
- let scopedAgents = filterAgentsByScope(options.agents, scope);
3468
- const unavailableList = scopedAgents.filter((a) => isAgentUnavailableNow(a, now));
3469
- const unavailableCount = unavailableList.length;
3470
- const unavailableAgents = sortSafeAgentSummaries(unavailableList).map(toUnavailableAgentSummary);
3471
- const credentialGroups = summarizeCredentialGroups(scopedAgents, now);
3472
- if (options.showUnavailable !== true) {
3473
- scopedAgents = scopedAgents.filter((a) => !isAgentUnavailableNow(a, now));
3474
- }
3475
- const sortedAgents = sortSafeAgentSummaries(scopedAgents);
3476
- const projectedAgents = options.verbose === true ? sortedAgents.map(omitNullishAgentSummaryFields) : sortedAgents.map(toCompactAgentSummary);
3477
- return {
3478
- total: projectedAgents.length,
3479
- unavailableCount,
3480
- unavailableAgents,
3481
- credentialGroups,
3482
- agents: projectedAgents
3483
- };
3484
- }
3485
-
3486
3522
  // packages/ai/agent/publicAgentDiscovery.ts
3487
3523
  async function fetchPublicAgentsForDiscovery(args) {
3488
3524
  const fetchImpl = args.fetchImpl ?? fetch;
@@ -3945,7 +3981,7 @@ async function deleteDialogsFunc(args, thunkApi) {
3945
3981
  const deletedDialogIds = [];
3946
3982
  const deletedDialogKeys = [];
3947
3983
  const failures = [];
3948
- const { deleteDialog: deleteDialog2 } = await import("./dialogSlice-CCADNU4F.js");
3984
+ const { deleteDialog: deleteDialog2 } = await import("./dialogSlice-Q2QUTMHK.js");
3949
3985
  for (const target of targets) {
3950
3986
  try {
3951
3987
  await thunkApi.dispatch(deleteDialog2(target.dbKey)).unwrap();
@@ -4041,6 +4077,10 @@ var listAgentsFunctionSchema = {
4041
4077
  },
4042
4078
  publicOnly: { type: "boolean", description: "Deprecated compatibility alias for scope='public'." },
4043
4079
  showUnavailable: { type: "boolean", description: "Include agents currently rate-limited (429). Default false." },
4080
+ query: {
4081
+ type: "string",
4082
+ description: "Optional case-insensitive search substring matching agent name, model, provider, handle, or agentKey. Use to locate specific candidates like 'opus', 'devin', or 'claude'."
4083
+ },
4044
4084
  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." }
4045
4085
  }
4046
4086
  }
@@ -4083,16 +4123,15 @@ async function listAgentsFunc(args, thunkApi) {
4083
4123
  }
4084
4124
  }
4085
4125
  const userId = runtime?.currentUserId ?? void 0;
4086
- const agents = [...Array.from(recordsMap.values()), ...publicRecords].map(
4087
- (record) => toSafeAgentSummary(record, {
4126
+ const discovery = assembleAgentDiscoveryResult({
4127
+ records: [...Array.from(recordsMap.values()), ...publicRecords],
4128
+ summaryOptions: (record) => ({
4088
4129
  favoritesMap,
4089
4130
  userId,
4090
4131
  publicRecordExists: publicRecords.includes(record) ? true : void 0
4091
- })
4092
- );
4093
- const discovery = buildAgentDiscoveryResult({
4094
- agents,
4132
+ }),
4095
4133
  scope: args?.scope,
4134
+ query: args?.query,
4096
4135
  publicOnly: args?.publicOnly,
4097
4136
  showUnavailable: args?.showUnavailable,
4098
4137
  verbose: args?.verbose
@@ -4123,6 +4162,30 @@ var readAgentFunctionSchema = {
4123
4162
  required: ["agent"]
4124
4163
  }
4125
4164
  };
4165
+ function formatReadAgentCard(agentKey, record) {
4166
+ if (!isRecord(record)) {
4167
+ return jsonPreview({ agentKey, record });
4168
+ }
4169
+ const name = asTrimmedString(record.name) || "(\u672A\u547D\u540D Agent)";
4170
+ const model = asTrimmedString(record.model) || "\u2014";
4171
+ const provider = asTrimmedString(record.provider) || asTrimmedString(record.apiSource) || "\u2014";
4172
+ const apiSource = asTrimmedString(record.apiSource) || "\u2014";
4173
+ const isPublic = record.isPublic === true ? "\u516C\u5F00" : "\u79C1\u6709";
4174
+ 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)";
4175
+ const lines = [
4176
+ `\u{1F916} Agent: ${name} (${agentKey})`,
4177
+ `\u2022 \u6A21\u578B: ${model} (${provider})`,
4178
+ `\u2022 \u6765\u6E90: ${apiSource} \xB7 ${isPublic}`,
4179
+ `\u2022 \u5DE5\u5177: ${tools}`
4180
+ ];
4181
+ if (typeof record.customProviderUrl === "string" && record.customProviderUrl.trim()) {
4182
+ lines.push(`\u2022 \u7AEF\u70B9: ${record.customProviderUrl.trim()}`);
4183
+ }
4184
+ if (typeof record.prompt === "string" && record.prompt.trim()) {
4185
+ lines.push(`\u2022 \u63D0\u793A\u8BCD: ${clipCompactText(record.prompt.trim(), 200)}`);
4186
+ }
4187
+ return lines.join("\n");
4188
+ }
4126
4189
  async function readAgentFunc(args, thunkApi) {
4127
4190
  const runtime = getRuntime2(thunkApi);
4128
4191
  const userId = runtime?.currentUserId;
@@ -4134,16 +4197,14 @@ async function readAgentFunc(args, thunkApi) {
4134
4197
  for (const candidate of candidates) {
4135
4198
  const record = await readBestRecord(thunkApi, candidate, true);
4136
4199
  if (record) {
4200
+ const redacted = redactAgentRecordForWorkspaceTool(record);
4137
4201
  return {
4138
4202
  rawData: {
4139
4203
  success: true,
4140
4204
  agentKey: candidate,
4141
- record: redactAgentRecordForWorkspaceTool(record)
4205
+ record: redacted
4142
4206
  },
4143
- displayData: jsonPreview({
4144
- agentKey: candidate,
4145
- record: redactAgentRecordForWorkspaceTool(record)
4146
- })
4207
+ displayData: formatReadAgentCard(candidate, redacted)
4147
4208
  };
4148
4209
  }
4149
4210
  }
@@ -4254,7 +4315,7 @@ var readSkillDocFunctionSchema = {
4254
4315
  }
4255
4316
  };
4256
4317
  async function readSkillDocFunc(args, thunkApi) {
4257
- const { buildReadDocResult } = await import("./readDocTool-XNMCT64I.js");
4318
+ const { buildReadDocResult } = await import("./readDocTool-4SPYCP2Y.js");
4258
4319
  const id = args?.id ?? args?.doc ?? args?.docKey ?? args?.pageKey;
4259
4320
  if (typeof id !== "string" || !id.trim()) {
4260
4321
  throw new Error("readSkillDoc requires id or doc.");
@@ -5057,7 +5118,7 @@ var fetchSpaceAction = async (input, thunkAPI) => {
5057
5118
  const spaceKey = createSpaceKey.space(spaceId);
5058
5119
  const readSpace = async (dbKey) => {
5059
5120
  try {
5060
- const { read: read2, readAndWait: readAndWait2 } = await import("./dbSlice-NP52Y5TF.js");
5121
+ const { read: read2, readAndWait: readAndWait2 } = await import("./dbSlice-HFPIJT5P.js");
5061
5122
  if (fresh) {
5062
5123
  return await dispatch(readAndWait2(dbKey)).unwrap();
5063
5124
  }
@@ -5698,6 +5759,23 @@ var sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
5698
5759
  var normalizeContains = (value) => asTrimmedLowercaseString(value);
5699
5760
  var participantList = (emails) => Array.isArray(emails) ? asTrimmedNonEmptyStringArray(emails).map((email) => ({ email })) : [];
5700
5761
  var emailText = (email) => [email?.subject, email?.from?.email, email?.from?.name, email?.text, email?.html].filter((value) => typeof value === "string").join("\n");
5762
+ var emailAttachments = (email) => Array.isArray(email?.attachments) ? email.attachments : [];
5763
+ var attachmentPreview = (attachment) => {
5764
+ const name = asOptionalTrimmedString(attachment?.filename) ?? "attachment";
5765
+ const contentType = asOptionalTrimmedString(attachment?.contentType) ?? "application/octet-stream";
5766
+ const fileId = asOptionalTrimmedString(attachment?.fileId) ?? "unknown-file";
5767
+ const size = Number.isFinite(Number(attachment?.size)) ? ` | ${Number(attachment.size)} bytes` : "";
5768
+ return `- ${name} | ${contentType}${size} | fileId: ${fileId}`;
5769
+ };
5770
+ var attachmentListPreview = (email) => {
5771
+ const attachments = emailAttachments(email);
5772
+ if (attachments.length === 0) return "";
5773
+ return [
5774
+ `\u9644\u4EF6\uFF08${attachments.length}\uFF09\uFF1A`,
5775
+ ...attachments.map(attachmentPreview),
5776
+ "\u8BFB\u53D6\u9644\u4EF6\uFF1A\u518D\u6B21\u8C03\u7528 email_read\uFF0C\u4F20\u5165\u5F53\u524D dbKey \u548C attachmentFileId\u3002"
5777
+ ].join("\n");
5778
+ };
5701
5779
  var matchesWaitFilters = (email, args) => {
5702
5780
  const subjectContains = normalizeContains(args.subjectContains);
5703
5781
  const fromContains = normalizeContains(args.fromContains);
@@ -5723,6 +5801,58 @@ var stripHtml = (html) => typeof html === "string" ? compactWhitespace(
5723
5801
  html.replace(/<a\b[^>]*href=["']([^"']+)["'][^>]*>/gi, " $1 ").replace(/<[^>]+>/g, " ")
5724
5802
  ) : "";
5725
5803
  var cleanUrl = (url) => url.replace(/[),.;\]}>]+$/g, "");
5804
+ var extractPdfText = async (blob) => {
5805
+ const pdfjsLib = await import("./pdf-U6KSUEZZ.js");
5806
+ if (typeof window !== "undefined" && pdfjsLib.GlobalWorkerOptions && !pdfjsLib.GlobalWorkerOptions.workerSrc) {
5807
+ pdfjsLib.GlobalWorkerOptions.workerSrc = "/public/assets/pdf.worker.mjs";
5808
+ }
5809
+ const data = await blob.arrayBuffer();
5810
+ const pdf = await pdfjsLib.getDocument({ data }).promise;
5811
+ const pages = [];
5812
+ for (let pageNumber = 1; pageNumber <= pdf.numPages; pageNumber += 1) {
5813
+ const page = await pdf.getPage(pageNumber);
5814
+ const textContent = await page.getTextContent();
5815
+ const text = textContent.items.map((item) => typeof item?.str === "string" ? item.str : "").filter(Boolean).join(" ").trim();
5816
+ if (text) pages.push(`--- page ${pageNumber} ---
5817
+ ${text}`);
5818
+ }
5819
+ return pages.join("\n\n").trim();
5820
+ };
5821
+ var readEmailAttachment = async (email, fileId, maxChars, thunkApi) => {
5822
+ const attachment = emailAttachments(email).find(
5823
+ (item) => asOptionalTrimmedString(item?.fileId) === fileId
5824
+ );
5825
+ if (!attachment) {
5826
+ throw new Error(`\u9644\u4EF6 ${fileId} \u4E0D\u5C5E\u4E8E\u90AE\u4EF6 ${email?.dbKey || "unknown"}`);
5827
+ }
5828
+ const result = await readFileContentAction({ fileId }, thunkApi);
5829
+ const blob = result.blob;
5830
+ const contentType = (asOptionalTrimmedString(attachment?.contentType) || asOptionalTrimmedString(blob.type) || "application/octet-stream").toLowerCase();
5831
+ const filename = asOptionalTrimmedString(attachment?.filename) ?? fileId;
5832
+ let content;
5833
+ if (contentType === "application/pdf" || filename.toLowerCase().endsWith(".pdf")) {
5834
+ content = await extractPdfText(blob);
5835
+ if (!content) {
5836
+ throw new Error(
5837
+ `PDF \u9644\u4EF6 ${filename} \u6CA1\u6709\u53EF\u63D0\u53D6\u7684\u6587\u5B57\u5C42\uFF0C\u53EF\u80FD\u662F\u626B\u63CF\u7248\uFF1B\u8BF7\u6539\u7528 OCR \u80FD\u529B\u5904\u7406\u8BE5 fileId\u3002`
5838
+ );
5839
+ }
5840
+ } else if (contentType.startsWith("text/") || contentType.includes("json") || contentType.includes("csv") || contentType.includes("xml") || /\.(txt|md|csv|json|xml|html?|log)$/i.test(filename)) {
5841
+ content = await blob.text();
5842
+ } else {
5843
+ throw new Error(
5844
+ `\u9644\u4EF6 ${filename} (${contentType}) \u6682\u4E0D\u652F\u6301\u76F4\u63A5\u8F6C\u6587\u672C\uFF1BfileId=${fileId} \u4ECD\u53EF\u4EA4\u7ED9\u5BF9\u5E94\u7684\u6587\u4EF6/\u5A92\u4F53\u5904\u7406\u80FD\u529B\u3002`
5845
+ );
5846
+ }
5847
+ const truncated = content.length > maxChars;
5848
+ return {
5849
+ attachment,
5850
+ content: truncated ? content.slice(0, maxChars) : content,
5851
+ totalChars: content.length,
5852
+ truncated,
5853
+ source: result.source
5854
+ };
5855
+ };
5726
5856
  var extractEmailVerificationArtifacts = ({
5727
5857
  text,
5728
5858
  html
@@ -5790,13 +5920,25 @@ var emailSearchFunctionSchema = {
5790
5920
  };
5791
5921
  var emailReadFunctionSchema = {
5792
5922
  name: "email_read",
5793
- description: "\u8BFB\u53D6\u4E00\u5C01\u90AE\u4EF6\u7684\u5B8C\u6574\u5185\u5BB9\u3002\u9700\u8981 email:read \u6743\u9650\u3002",
5923
+ description: [
5924
+ "\u8BFB\u53D6\u4E00\u5C01\u90AE\u4EF6\u7684\u5B8C\u6574\u5185\u5BB9\u3002\u9700\u8981 email:read \u6743\u9650\u3002",
5925
+ "\u90AE\u4EF6\u6709\u9644\u4EF6\u65F6\u4F1A\u5217\u51FA\u9644\u4EF6 fileId\u3002\u8981\u8BFB\u53D6 PDF/\u6587\u672C/CSV/JSON \u9644\u4EF6\uFF0C\u518D\u4F20 attachmentFileId\uFF1B\u5DE5\u5177\u4F1A\u5148\u6821\u9A8C\u8BE5\u6587\u4EF6\u786E\u5B9E\u5C5E\u4E8E\u8FD9\u5C01\u90AE\u4EF6\u3002",
5926
+ "PDF \u4F18\u5148\u76F4\u63A5\u63D0\u53D6\u6587\u5B57\u5C42\uFF1B\u626B\u63CF\u7248 PDF \u4F1A\u63D0\u793A\u6539\u7528 OCR\u3002"
5927
+ ].join("\n"),
5794
5928
  parameters: {
5795
5929
  type: "object",
5796
5930
  properties: {
5797
5931
  dbKey: {
5798
5932
  type: "string",
5799
5933
  description: "\u90AE\u4EF6\u8BB0\u5F55\u7684 dbKey\uFF0C\u4F8B\u5982 email-userId-emailId\u3002"
5934
+ },
5935
+ attachmentFileId: {
5936
+ type: "string",
5937
+ description: "\u53EF\u9009\u3002\u5F53\u524D\u90AE\u4EF6 attachments[] \u4E2D\u7684 fileId\uFF1B\u63D0\u4F9B\u540E\u8BFB\u53D6\u8BE5\u9644\u4EF6\u6587\u672C\u3002"
5938
+ },
5939
+ maxChars: {
5940
+ type: "number",
5941
+ description: "\u8BFB\u53D6\u9644\u4EF6\u65F6\u6700\u591A\u8FD4\u56DE\u591A\u5C11\u5B57\u7B26\uFF0C\u9ED8\u8BA4 12000\uFF0C\u8303\u56F4 1000-50000\u3002"
5800
5942
  }
5801
5943
  },
5802
5944
  required: ["dbKey"]
@@ -6075,15 +6217,47 @@ ${artifacts.verificationLinks.slice(1).join("\n")}` : ""
6075
6217
  };
6076
6218
  }
6077
6219
  async function emailReadFunc(args, thunkApi) {
6078
- const email = await callToolApi(thunkApi, "/rpc/getEmail", args, {
6220
+ const email = await callToolApi(thunkApi, "/rpc/getEmail", { dbKey: args.dbKey }, {
6079
6221
  withAuth: true
6080
6222
  });
6223
+ const attachmentFileId = asOptionalTrimmedString(args.attachmentFileId);
6224
+ if (attachmentFileId) {
6225
+ const maxChars = clampInteger(args.maxChars, 12e3, 1e3, 5e4);
6226
+ const attachmentResult = await readEmailAttachment(
6227
+ email,
6228
+ attachmentFileId,
6229
+ maxChars,
6230
+ thunkApi
6231
+ );
6232
+ const filename = asOptionalTrimmedString(attachmentResult.attachment?.filename) ?? attachmentFileId;
6233
+ return {
6234
+ rawData: {
6235
+ emailDbKey: email?.dbKey,
6236
+ attachment: attachmentResult.attachment,
6237
+ content: attachmentResult.content,
6238
+ totalChars: attachmentResult.totalChars,
6239
+ truncated: attachmentResult.truncated,
6240
+ source: attachmentResult.source
6241
+ },
6242
+ displayData: [
6243
+ `\u9644\u4EF6\uFF1A${filename} | fileId: ${attachmentFileId}`,
6244
+ attachmentResult.truncated ? `\u5185\u5BB9\u5DF2\u622A\u65AD\uFF1A\u8FD4\u56DE ${attachmentResult.content.length}/${attachmentResult.totalChars} \u5B57\u7B26\u3002` : `\u5185\u5BB9\u5B57\u7B26\u6570\uFF1A${attachmentResult.totalChars}`,
6245
+ "",
6246
+ attachmentResult.content
6247
+ ].join("\n")
6248
+ };
6249
+ }
6081
6250
  const body = asOptionalTrimmedString(email?.text) ?? asOptionalTrimmedString(email?.html) ?? "";
6251
+ const attachments = attachmentListPreview(email);
6082
6252
  return {
6083
6253
  rawData: email,
6084
- displayData: `${emailPreview(email)}
6085
-
6086
- ${body.slice(0, 4e3)}`
6254
+ displayData: [
6255
+ emailPreview(email),
6256
+ "",
6257
+ body.slice(0, 4e3),
6258
+ attachments ? `
6259
+ ${attachments}` : ""
6260
+ ].filter(Boolean).join("\n")
6087
6261
  };
6088
6262
  }
6089
6263
  async function emailUpdateTagsFunc(args, thunkApi) {
@@ -9207,214 +9381,6 @@ ${preview}`
9207
9381
  };
9208
9382
  }
9209
9383
 
9210
- // packages/ai/tools/chromeConnectorTools.ts
9211
- var CHROME_CONNECTOR_TOOL_NAMES = [
9212
- "chrome_list_tabs",
9213
- "chrome_open_tab",
9214
- "chrome_close_tab",
9215
- "chrome_read_page",
9216
- "chrome_click",
9217
- "chrome_type",
9218
- "chrome_press",
9219
- "chrome_scroll",
9220
- "chrome_screenshot",
9221
- "chrome_read_console",
9222
- "chrome_read_network"
9223
- ];
9224
- var CHROME_CONNECTOR_READ_TOOL_NAMES = [
9225
- "chrome_list_tabs",
9226
- "chrome_read_page",
9227
- "chrome_screenshot",
9228
- "chrome_read_console",
9229
- "chrome_read_network"
9230
- ];
9231
- var getChromeConnectorToolBehavior = (name) => CHROME_CONNECTOR_READ_TOOL_NAMES.includes(name) ? "data" : "action";
9232
- var getChromeConnectorToolDefaultConsent = (name) => CHROME_CONNECTOR_READ_TOOL_NAMES.includes(name) ? "auto" : "ask";
9233
- function baseSchema(name, description, properties, required = []) {
9234
- return {
9235
- name,
9236
- description,
9237
- parameters: {
9238
- type: "object",
9239
- properties,
9240
- required
9241
- }
9242
- };
9243
- }
9244
- var tabId = {
9245
- type: "string",
9246
- description: "Chrome tab id returned by chrome_list_tabs or chrome_open_tab."
9247
- };
9248
- var elementRef = {
9249
- type: "string",
9250
- description: "Revision-scoped ref like 1a2b3c4d-e2, copied verbatim from chrome_read_page; preferred over selector when available."
9251
- };
9252
- var selector = {
9253
- type: "string",
9254
- description: "CSS selector for the visible page element to operate on; fallback when no elementRef is available."
9255
- };
9256
- var chromeListTabsFunctionSchema = baseSchema(
9257
- "chrome_list_tabs",
9258
- "List controllable Chrome tabs from the user's Chrome profile through the Nolo desktop Chrome connector.",
9259
- {}
9260
- );
9261
- var chromeOpenTabFunctionSchema = baseSchema(
9262
- "chrome_open_tab",
9263
- "Open a URL in the user's Chrome browser through the Nolo desktop Chrome connector.",
9264
- {
9265
- url: {
9266
- type: "string",
9267
- description: "HTTP or HTTPS URL to open in Chrome."
9268
- },
9269
- active: {
9270
- type: "boolean",
9271
- description: "Whether to focus the new Chrome tab. Defaults to true."
9272
- }
9273
- },
9274
- ["url"]
9275
- );
9276
- var chromeCloseTabFunctionSchema = baseSchema(
9277
- "chrome_close_tab",
9278
- "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).",
9279
- {
9280
- tabId
9281
- },
9282
- ["tabId"]
9283
- );
9284
- var chromeReadPageFunctionSchema = baseSchema(
9285
- "chrome_read_page",
9286
- "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.",
9287
- {
9288
- tabId,
9289
- region: {
9290
- type: "string",
9291
- description: "Optional CSS selector limiting the read to part of the page."
9292
- },
9293
- maxChars: {
9294
- type: "number",
9295
- description: "Optional text character budget; the connector clamps it to a hard maximum."
9296
- },
9297
- detail: {
9298
- type: "string",
9299
- enum: ["compact", "full"],
9300
- description: "compact (default) returns budgeted text; full raises the budget and adds capped HTML."
9301
- }
9302
- },
9303
- ["tabId"]
9304
- );
9305
- var chromeClickFunctionSchema = baseSchema(
9306
- "chrome_click",
9307
- "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.",
9308
- {
9309
- tabId,
9310
- elementRef,
9311
- selector
9312
- },
9313
- ["tabId"]
9314
- );
9315
- var chromeTypeFunctionSchema = baseSchema(
9316
- "chrome_type",
9317
- "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.",
9318
- {
9319
- tabId,
9320
- elementRef,
9321
- selector,
9322
- text: {
9323
- type: "string",
9324
- description: "Text to type into the selected element."
9325
- },
9326
- clearFirst: {
9327
- type: "boolean",
9328
- description: "Whether to clear the field before typing. Defaults to true."
9329
- }
9330
- },
9331
- ["tabId", "text"]
9332
- );
9333
- var chromePressFunctionSchema = baseSchema(
9334
- "chrome_press",
9335
- "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.",
9336
- {
9337
- tabId,
9338
- key: {
9339
- type: "string",
9340
- description: "Key or shortcut, for example Enter, Escape, ArrowDown, or Meta+L."
9341
- }
9342
- },
9343
- ["tabId", "key"]
9344
- );
9345
- var chromeScrollFunctionSchema = baseSchema(
9346
- "chrome_scroll",
9347
- "Scroll a Chrome tab by pixel deltas.",
9348
- {
9349
- tabId,
9350
- deltaX: {
9351
- type: "number",
9352
- description: "Horizontal scroll delta in pixels."
9353
- },
9354
- deltaY: {
9355
- type: "number",
9356
- description: "Vertical scroll delta in pixels."
9357
- }
9358
- },
9359
- ["tabId"]
9360
- );
9361
- var chromeScreenshotFunctionSchema = baseSchema(
9362
- "chrome_screenshot",
9363
- "Capture a screenshot from a Chrome tab through the Nolo desktop Chrome connector.",
9364
- {
9365
- tabId,
9366
- fullPage: {
9367
- type: "boolean",
9368
- description: "Whether to capture the full page. Defaults to false."
9369
- }
9370
- },
9371
- ["tabId"]
9372
- );
9373
- var chromeReadConsoleFunctionSchema = baseSchema(
9374
- "chrome_read_console",
9375
- "Read recent console messages from a Chrome tab using debugger-backed connector state.",
9376
- {
9377
- tabId,
9378
- limit: {
9379
- type: "number",
9380
- description: "Maximum number of recent console messages to return."
9381
- }
9382
- },
9383
- ["tabId"]
9384
- );
9385
- var chromeReadNetworkFunctionSchema = baseSchema(
9386
- "chrome_read_network",
9387
- "Read a deduplicated recent network summary from a Chrome tab using debugger-backed connector state. Static assets are filtered unless includeAssets is set.",
9388
- {
9389
- tabId,
9390
- limit: {
9391
- type: "number",
9392
- description: "Maximum number of recent network entries to return."
9393
- },
9394
- includeAssets: {
9395
- type: "boolean",
9396
- description: "Include images, CSS, fonts and other static assets. Defaults to false."
9397
- }
9398
- },
9399
- ["tabId"]
9400
- );
9401
- var chromeConnectorToolSchemas = [
9402
- chromeListTabsFunctionSchema,
9403
- chromeOpenTabFunctionSchema,
9404
- chromeCloseTabFunctionSchema,
9405
- chromeReadPageFunctionSchema,
9406
- chromeClickFunctionSchema,
9407
- chromeTypeFunctionSchema,
9408
- chromePressFunctionSchema,
9409
- chromeScrollFunctionSchema,
9410
- chromeScreenshotFunctionSchema,
9411
- chromeReadConsoleFunctionSchema,
9412
- chromeReadNetworkFunctionSchema
9413
- ];
9414
- async function chromeConnectorUnavailableFunc() {
9415
- throw new Error("Chrome connector tools are only executable in the Nolo desktop local runtime.");
9416
- }
9417
-
9418
9384
  // packages/ai/tools/exaSearchTool.ts
9419
9385
  var exaSearchSchema = {
9420
9386
  name: "exa_search",
@@ -10122,7 +10088,7 @@ var cloudflareCrawlStatusFunctionSchema = {
10122
10088
  async function cloudflareCrawlStatusFunc(args, thunkApi) {
10123
10089
  const { jobId, limit, status, cursor } = args;
10124
10090
  if (!jobId) throw new Error("\u5FC5\u987B\u63D0\u4F9B jobId");
10125
- const { getToolRequestContext: getToolRequestContext2 } = await import("./toolApiClient-7PSIFQPJ.js");
10091
+ const { getToolRequestContext: getToolRequestContext2 } = await import("./toolApiClient-INIQCPGY.js");
10126
10092
  const { baseUrl, token } = getToolRequestContext2(thunkApi);
10127
10093
  const params = new URLSearchParams();
10128
10094
  if (limit !== void 0) params.set("limit", String(limit));
@@ -10900,7 +10866,7 @@ var selectUserIdFromState = (state2) => {
10900
10866
  var selectCurrentServerFromState = (state2) => typeof state2?.settings?.currentServer === "string" ? state2.settings.currentServer : null;
10901
10867
  async function addImageContentToSpace(input) {
10902
10868
  const injectedAddContentAction = input.thunkApi?.extra?.addContentAction;
10903
- const addContentAction2 = typeof injectedAddContentAction === "function" ? injectedAddContentAction : (await import("./addContentAction-5OLTVWIE.js")).addContentAction;
10869
+ const addContentAction2 = typeof injectedAddContentAction === "function" ? injectedAddContentAction : (await import("./addContentAction-IJHG2ZV7.js")).addContentAction;
10904
10870
  await addContentAction2(
10905
10871
  {
10906
10872
  spaceId: input.spaceId,
@@ -12554,11 +12520,13 @@ async function updateSelfToolFunc(args, thunkApi, runtime) {
12554
12520
  autoApprovedFields
12555
12521
  });
12556
12522
  const previousAgentForUpdate = buildUpdateThunkPreviousAgent(previousAgent, userId);
12523
+ const formData = buildPatch(args);
12524
+ const effortNote = calibrateReasoningEffortInPatch(formData, previousAgent);
12557
12525
  const agent = await thunkApi.dispatch(
12558
12526
  updateAgent({
12559
12527
  userId,
12560
12528
  agentId: extractAgentId(currentAgentKey),
12561
- formData: buildPatch(args),
12529
+ formData,
12562
12530
  previousAgent: previousAgentForUpdate
12563
12531
  })
12564
12532
  ).unwrap().catch((e) => {
@@ -12570,7 +12538,8 @@ async function updateSelfToolFunc(args, thunkApi, runtime) {
12570
12538
  previousAgentForUpdate,
12571
12539
  requestedFields
12572
12540
  ),
12573
- displayData: formatUpdatedAgentOutput(agent)
12541
+ displayData: formatUpdatedAgentOutput(agent) + (effortNote ? `
12542
+ ${effortNote}` : "")
12574
12543
  };
12575
12544
  }
12576
12545
 
@@ -13027,7 +12996,64 @@ var runAgentBackground = createAsyncThunk("agent/runBackground", async (args, {
13027
12996
  throw lastError ?? new Error("\u4E8B\u4EF6\u6D41\u91CD\u8FDE\u5931\u8D25");
13028
12997
  });
13029
12998
 
12999
+ // packages/ai/tools/agent/credentialFanoutGuard.ts
13000
+ var UNKNOWN_CREDENTIAL_GROUP = "unknown";
13001
+ function normalizeCredentialGroupValue(group) {
13002
+ if (typeof group !== "string") return UNKNOWN_CREDENTIAL_GROUP;
13003
+ const trimmed2 = group.trim();
13004
+ if (!trimmed2) return UNKNOWN_CREDENTIAL_GROUP;
13005
+ if (trimmed2.toLowerCase() === UNKNOWN_CREDENTIAL_GROUP) {
13006
+ return UNKNOWN_CREDENTIAL_GROUP;
13007
+ }
13008
+ return trimmed2;
13009
+ }
13010
+ var describeEntry = (entry) => entry.agentKey ?? entry.runId ?? "(unknown run)";
13011
+ function checkCredentialFanout(args) {
13012
+ const candidateGroup = normalizeCredentialGroupValue(
13013
+ args.candidate.credentialGroup
13014
+ );
13015
+ for (const entry of args.active) {
13016
+ if (entry.runId && args.candidate.runId && entry.runId === args.candidate.runId) {
13017
+ continue;
13018
+ }
13019
+ const entryGroup = normalizeCredentialGroupValue(entry.credentialGroup);
13020
+ if (candidateGroup === UNKNOWN_CREDENTIAL_GROUP || entryGroup === UNKNOWN_CREDENTIAL_GROUP) {
13021
+ if (args.allowUnknownCredential === true) continue;
13022
+ const side = candidateGroup === UNKNOWN_CREDENTIAL_GROUP ? "candidate" : "active";
13023
+ return {
13024
+ allowed: false,
13025
+ reason: "unknown_credential_group",
13026
+ conflict: entry,
13027
+ message: `\u62D2\u7EDD\u5E76\u53D1\u6D3E\u53D1\uFF1A${side === "candidate" ? `\u5019\u9009 agent ${describeEntry(args.candidate)} \u7684 credentialGroup \u672A\u77E5` : `\u5DF2\u6D3B\u8DC3 run ${describeEntry(entry)} \u7684 credentialGroup \u672A\u77E5`}\uFF0C\u65E0\u6CD5\u8BC1\u660E\u5B83\u4E0E\u540C\u6279\u5E76\u53D1 run \u4E0D\u5171\u7528\u4E0A\u6E38\u51ED\u8BC1\u3002\u8BF7\u6539\u4E3A\u4E32\u884C\u6D3E\u53D1\u3001\u6362\u7528 credentialGroup \u660E\u786E\u7684 agent\uFF0C\u6216\u5728\u786E\u8BA4\u98CE\u9669\u540E\u663E\u5F0F\u4F20 allowUnknownCredential: true \u5F3A\u5236\u653E\u884C\u3002`
13028
+ };
13029
+ }
13030
+ if (candidateGroup === entryGroup) {
13031
+ if (args.allowCredentialConcurrency === true) {
13032
+ continue;
13033
+ }
13034
+ return {
13035
+ allowed: false,
13036
+ reason: "credential_group_conflict",
13037
+ conflict: entry,
13038
+ 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`
13039
+ };
13040
+ }
13041
+ }
13042
+ return { allowed: true };
13043
+ }
13044
+
13030
13045
  // packages/ai/tools/agent/startAgentRunTool.ts
13046
+ var BATCH_FANOUT_ENTRY_TTL_MS = 30 * 60 * 1e3;
13047
+ var batchFanoutRegistry = /* @__PURE__ */ new Map();
13048
+ function pruneBatchFanoutRegistry(nowMs) {
13049
+ for (const [batchId, entries] of batchFanoutRegistry) {
13050
+ const alive = entries.filter(
13051
+ (e) => nowMs - e.startedAtMs < BATCH_FANOUT_ENTRY_TTL_MS
13052
+ );
13053
+ if (alive.length === 0) batchFanoutRegistry.delete(batchId);
13054
+ else batchFanoutRegistry.set(batchId, alive);
13055
+ }
13056
+ }
13031
13057
  function buildStartAgentRunFunctionSchema(opts) {
13032
13058
  const supportsWait = opts?.supportsWait !== false;
13033
13059
  const wakeEnabled = opts?.wakeEnabled === true;
@@ -13059,7 +13085,21 @@ function buildStartAgentRunFunctionSchema(opts) {
13059
13085
  // 与 server 透传保持不动,探活/烟测仍走 CLI 侧。
13060
13086
  batchId: {
13061
13087
  type: "string",
13062
- description: "\u53EF\u9009\u3002\u6279\u6B21 id\uFF0C\u7528\u4E8E\u628A\u591A\u4E2A\u5E76\u884C run \u5F52\u4E3A\u4E00\u7EC4\uFF0C\u4FBF\u4E8E\u540E\u7EED controlAgentRun(list, batchId=...) \u6309\u6279\u67E5\u8BE2\u3002\u672A\u4F20\u65F6\u81EA\u52A8\u751F\u6210\u4E00\u4E2A\u5E76\u5728\u8FD4\u56DE\u503C\u4E2D\u5E26\u56DE\uFF0C\u8C03\u7528\u65B9\u65E0\u9700\u5148\u521B\u5EFA\u3002"
13088
+ description: "\u53EF\u9009\u3002\u6279\u6B21 id\uFF0C\u7528\u4E8E\u628A\u591A\u4E2A\u5E76\u884C run \u5F52\u4E3A\u4E00\u7EC4\uFF0C\u4FBF\u4E8E\u540E\u7EED controlAgentRun(list, batchId=...) \u6309\u6279\u67E5\u8BE2\u3002\u672A\u4F20\u65F6\u81EA\u52A8\u751F\u6210\u4E00\u4E2A\u5E76\u5728\u8FD4\u56DE\u503C\u4E2D\u5E26\u56DE\uFF0C\u8C03\u7528\u65B9\u65E0\u9700\u5148\u521B\u5EFA\u3002\u540C\u4E00 batchId \u5185\u7684\u5E76\u53D1\u6D3E\u53D1\u4F1A\u505A\u51ED\u8BC1\u7EC4\u9694\u79BB\u68C0\u67E5\uFF1AcredentialGroup \u76F8\u540C\u6216\u672A\u77E5\u7684\u5E76\u53D1 run \u4F1A\u88AB\u62D2\u7EDD\u3002"
13089
+ },
13090
+ credentialGroup: {
13091
+ type: "string",
13092
+ description: "\u53EF\u9009\u3002\u7167\u6284 listAgents \u8FD4\u56DE\u7684 credentialGroup \u5B57\u6BB5\uFF0C\u7528\u4E8E\u540C\u6279\u6B21\u5E76\u53D1\u6247\u51FA\u7684\u51ED\u8BC1\u9694\u79BB\u6821\u9A8C\u3002\u7F3A\u7701/\u7A7A\u503C\u89C6\u4E3A\u300C\u672A\u77E5\u300D\uFF08\u4E0D\u662F\u300C\u72EC\u7ACB\u300D\uFF09\uFF1A\u4E0E\u540C batch \u5185\u4EFB\u4F55\u5176\u4ED6 run \u5E76\u53D1\u90FD\u4F1A\u88AB\u62D2\u7EDD\u3002"
13093
+ },
13094
+ allowUnknownCredential: {
13095
+ type: "boolean",
13096
+ 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",
13097
+ default: false
13098
+ },
13099
+ allowCredentialConcurrency: {
13100
+ type: "boolean",
13101
+ 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",
13102
+ default: false
13063
13103
  },
13064
13104
  trackTodo: {
13065
13105
  type: "boolean",
@@ -13092,13 +13132,26 @@ async function startAgentRunFunc(args, thunkApi, _context) {
13092
13132
  const { agentKey, task, input, agentName, batchId, wait } = args;
13093
13133
  const resultMode = args.resultMode ?? "full";
13094
13134
  const { dispatch } = thunkApi;
13095
- const effectiveBatchId = typeof batchId === "string" && batchId.trim() ? batchId.trim() : `batch-${(/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-")}-${Math.random().toString(36).slice(2, 8)}`;
13135
+ const explicitBatchId = typeof batchId === "string" && batchId.trim() ? batchId.trim() : void 0;
13136
+ const effectiveBatchId = explicitBatchId ?? `batch-${(/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-")}-${Math.random().toString(36).slice(2, 8)}`;
13096
13137
  if (!agentKey) {
13097
13138
  throw new Error("startAgentRun: \u7F3A\u5C11 agentKey \u53C2\u6570\u3002");
13098
13139
  }
13099
13140
  if (!task || typeof task !== "string") {
13100
13141
  throw new Error("startAgentRun: \u7F3A\u5C11\u6709\u6548\u7684 task \u6587\u672C\u63CF\u8FF0\u3002");
13101
13142
  }
13143
+ if (explicitBatchId) {
13144
+ const nowMs = Date.now();
13145
+ pruneBatchFanoutRegistry(nowMs);
13146
+ const active = batchFanoutRegistry.get(explicitBatchId) ?? [];
13147
+ const verdict = checkCredentialFanout({
13148
+ active,
13149
+ candidate: { agentKey, credentialGroup: args.credentialGroup },
13150
+ allowUnknownCredential: args.allowUnknownCredential === true,
13151
+ allowCredentialConcurrency: args.allowCredentialConcurrency === true
13152
+ });
13153
+ if (!verdict.allowed) throw new Error(verdict.message);
13154
+ }
13102
13155
  const content = buildDelegatedTaskContent(task, input);
13103
13156
  const payloadMetrics = calculateDelegatedPayloadMetrics(task, input, content);
13104
13157
  const activeDialogKey = getActiveDialogKey();
@@ -13128,6 +13181,16 @@ async function startAgentRunFunc(args, thunkApi, _context) {
13128
13181
  };
13129
13182
  }
13130
13183
  const runId = bgResult.dialogId;
13184
+ if (explicitBatchId) {
13185
+ const entries = batchFanoutRegistry.get(explicitBatchId) ?? [];
13186
+ entries.push({
13187
+ runId,
13188
+ agentKey,
13189
+ ...typeof args.credentialGroup === "string" && args.credentialGroup.trim() ? { credentialGroup: args.credentialGroup.trim() } : {},
13190
+ startedAtMs: Date.now()
13191
+ });
13192
+ batchFanoutRegistry.set(explicitBatchId, entries);
13193
+ }
13131
13194
  const status = bgResult.status ?? "pending";
13132
13195
  const resolvedName = agentName?.trim() || bgResult.agentName || bgResult.name;
13133
13196
  const identity = { agentName: resolvedName, agentKey, runId };
@@ -14821,7 +14884,7 @@ var executeToolRun = createAsyncThunk(
14821
14884
  if (!executionInput) {
14822
14885
  throw new Error(`ToolRun ${id} has no input to execute with.`);
14823
14886
  }
14824
- const { findToolExecutor: findToolExecutor2 } = await import("./tools-GEVUKUVY.js");
14887
+ const { findToolExecutor: findToolExecutor2 } = await import("./tools-6IUC3EFI.js");
14825
14888
  const { executor } = findToolExecutor2(run.toolName);
14826
14889
  toolRunStarted({
14827
14890
  id: run.id,
@@ -14845,7 +14908,7 @@ var executeToolRun = createAsyncThunk(
14845
14908
  const latestState = thunkApi.getState();
14846
14909
  const userId = selectIdentityUserId(latestState);
14847
14910
  if (userId) {
14848
- const { fetchUserSpaceMemberships } = await import("./memberThunks-XJFHFZ5M.js");
14911
+ const { fetchUserSpaceMemberships } = await import("./memberThunks-SKFZ37VS.js");
14849
14912
  await thunkApi.dispatch(fetchUserSpaceMemberships(userId));
14850
14913
  }
14851
14914
  }
@@ -17328,7 +17391,7 @@ async function updateDocFunc(args, thunkApi) {
17328
17391
  updated_at: (/* @__PURE__ */ new Date()).toISOString()
17329
17392
  };
17330
17393
  await dispatch(write({ data: updatedPageData, customKey: id })).unwrap();
17331
- const { getDocState, applyExternalDocUpdate } = await import("./docStore-RSIMI5PS.js");
17394
+ const { getDocState, applyExternalDocUpdate } = await import("./docStore-FWQIXF33.js");
17332
17395
  if (getDocState().pageKey === id) {
17333
17396
  applyExternalDocUpdate({
17334
17397
  slateData: finalSlateData,
@@ -17353,7 +17416,7 @@ async function updateDocFunc(args, thunkApi) {
17353
17416
  // packages/ai/tools/updateUserPreferenceProfileTool.ts
17354
17417
  async function dispatchSetSettings(thunkApi, changes) {
17355
17418
  const injectedSetSettings = thunkApi?.extra?.setSettings;
17356
- const setSettings = typeof injectedSetSettings === "function" ? injectedSetSettings : (await import("./settingSlice-UMATY3PD.js")).setSettings;
17419
+ const setSettings = typeof injectedSetSettings === "function" ? injectedSetSettings : (await import("./settingSlice-CNE75ISY.js")).setSettings;
17357
17420
  await thunkApi.dispatch(setSettings(changes)).unwrap();
17358
17421
  }
17359
17422
  var updateUserPreferenceProfileFunctionSchema = {
@@ -18076,6 +18139,38 @@ var baseToolDefinitions = [
18076
18139
  costLevel: "low",
18077
18140
  defaultConsent: "ask"
18078
18141
  },
18142
+ {
18143
+ id: "updateAgentAutomation",
18144
+ schema: updateAgentAutomationFunctionSchema,
18145
+ executor: updateAgentAutomationFunc,
18146
+ description: {
18147
+ name: "updateAgentAutomation",
18148
+ description: "\u66F4\u65B0\u4E00\u4E2A agent automation \u7684\u6807\u9898\u3001instruction\u3001trigger\u3001status \u7B49\u5B57\u6BB5\u3002",
18149
+ category: "\u8BA1\u5212\u4E0E\u7F16\u6392"
18150
+ },
18151
+ behavior: "action",
18152
+ uiGroup: "general",
18153
+ capability: "general",
18154
+ riskLevel: "medium",
18155
+ costLevel: "low",
18156
+ defaultConsent: "ask"
18157
+ },
18158
+ {
18159
+ id: "deleteAgentAutomation",
18160
+ schema: deleteAgentAutomationFunctionSchema,
18161
+ executor: deleteAgentAutomationFunc,
18162
+ description: {
18163
+ name: "deleteAgentAutomation",
18164
+ description: "\u5220\u9664\u4E00\u4E2A agent automation \u53CA\u5176 owner index\u3002",
18165
+ category: "\u8BA1\u5212\u4E0E\u7F16\u6392"
18166
+ },
18167
+ behavior: "action",
18168
+ uiGroup: "general",
18169
+ capability: "general",
18170
+ riskLevel: "high",
18171
+ costLevel: "low",
18172
+ defaultConsent: "ask"
18173
+ },
18079
18174
  {
18080
18175
  id: "notifyUser",
18081
18176
  schema: notifyUserFunctionSchema,
@@ -19119,7 +19214,7 @@ var baseToolDefinitions = [
19119
19214
  },
19120
19215
  behavior: getChromeConnectorToolBehavior(name),
19121
19216
  capability: "browser_automation",
19122
- riskLevel: name === "chrome_click" || name === "chrome_type" ? "medium" : "low",
19217
+ riskLevel: name === "browser_click_element" || name === "browser_type" ? "medium" : "low",
19123
19218
  costLevel: "low",
19124
19219
  defaultConsent: getChromeConnectorToolDefaultConsent(name),
19125
19220
  cancelable: true
@@ -19553,7 +19648,7 @@ var toolDefinitions = [
19553
19648
  ];
19554
19649
  var ALL_TOOL_FUNCTION_NAMES = toolDefinitions.map((tool) => tool.schema?.name).filter((name) => Boolean(name));
19555
19650
  var AGENT_AVAILABLE_TOOL_NAMES = ALL_TOOL_FUNCTION_NAMES.filter(
19556
- (name) => name !== "toolquery" && !name.startsWith("browser_") && name !== "exa_search"
19651
+ (name) => name !== "toolquery" && (!name.startsWith("browser_") || CHROME_CONNECTOR_ACCEPTED_TOOL_NAMES.includes(name)) && name !== "exa_search"
19557
19652
  );
19558
19653
  var patchAgentToolSchemas = () => {
19559
19654
  try {
@@ -19613,31 +19708,30 @@ var findToolExecutor = (rawName) => {
19613
19708
  };
19614
19709
 
19615
19710
  export {
19616
- resolveAgentRequiredPackIds,
19617
- resolveAgentRecommendedSkillNames,
19618
19711
  clipMultilineText,
19619
19712
  fetchAndSerializeTable,
19620
19713
  getToolResultErrorData,
19621
- createToolRunId,
19622
- toolRunStarted,
19623
- toolRunSetPending,
19624
- toolRunSucceeded,
19625
- toolRunFailed,
19626
- getAllToolRuns,
19627
- createSSEParser,
19628
- formatAgentListCard,
19714
+ resolveAgentRequiredPackIds,
19715
+ resolveAgentRecommendedSkillNames,
19629
19716
  readXPostFunctionSchema,
19630
19717
  readXPostFunc,
19631
19718
  readXhsProfileFunctionSchema,
19632
19719
  readXhsProfileFunc,
19633
- CHROME_CONNECTOR_TOOL_NAMES,
19634
19720
  rememberMemoryFunctionSchema,
19635
19721
  deleteMemoryFunctionSchema,
19636
19722
  queryMemoryFunctionSchema,
19723
+ createSSEParser,
19724
+ checkCredentialFanout,
19637
19725
  buildStartAgentRunFunctionSchema,
19638
19726
  CONTROL_AGENT_RUN_ACTIONS,
19639
19727
  buildControlAgentRunFunctionSchema,
19640
19728
  setTodoListFunc,
19729
+ createToolRunId,
19730
+ toolRunStarted,
19731
+ toolRunSetPending,
19732
+ toolRunSucceeded,
19733
+ toolRunFailed,
19734
+ getAllToolRuns,
19641
19735
  TOOL_GROUP_META,
19642
19736
  toolQueryFunctionSchema,
19643
19737
  toolQueryFunc,
@@ -19646,5 +19740,6 @@ export {
19646
19740
  toolExecutors,
19647
19741
  toolDescriptions,
19648
19742
  toolDefinitionsByName,
19649
- findToolExecutor
19743
+ findToolExecutor,
19744
+ formatAgentListCard
19650
19745
  };