nolo-cli 0.83.0 → 0.84.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 (106) hide show
  1. package/{_executeModel-LUNEV235.js → _executeModel-BPUR2QYH.js} +29 -28
  2. package/{action-YVYQEAAV.js → action-P4TNFGAD.js} +3 -3
  3. package/{addContentAction-O7R66HEX.js → addContentAction-MB2HHMDZ.js} +2 -2
  4. package/{addDialogAgentAction-74OA7KYP.js → addDialogAgentAction-S2NRBCWW.js} +2 -2
  5. package/{agentDeleteCommand-2YAHAZFJ.js → agentDeleteCommand-MNAA6MIG.js} +15 -14
  6. package/{agentEmailCommands-G6A7IRPQ.js → agentEmailCommands-SK34WJKU.js} +37 -36
  7. package/{agentListCommands-KMS675GZ.js → agentListCommands-I26MKI4T.js} +31 -19
  8. package/{agentMachineCommands-W2SMNSQ3.js → agentMachineCommands-M6QDR6P3.js} +15 -14
  9. package/{agentProviderCommands-GNPTL5XR.js → agentProviderCommands-X3UNW77C.js} +1 -1
  10. package/{agentRecordCommands-D7BRMFNI.js → agentRecordCommands-HTHLO2MM.js} +36 -35
  11. package/{agentRunCommand-VL6MMEUB.js → agentRunCommand-IAIRCMTH.js} +38 -36
  12. package/{agentRuntimeLocal-VXZSDIGT.js → agentRuntimeLocal-3WTYYIT2.js} +16 -11
  13. package/{agentSlice-5YJHUO47.js → agentSlice-TVP3HINW.js} +2 -2
  14. package/{appDeleteCommands-32MHLR4L.js → appDeleteCommands-SB5TNLKY.js} +16 -15
  15. package/{appDeployCommands-WCQOUSOB.js → appDeployCommands-2IPKZINV.js} +16 -15
  16. package/{appDeployStatusCommands-6QKB7DYN.js → appDeployStatusCommands-K63TFUID.js} +16 -15
  17. package/{appGetCommands-SFAPP5PB.js → appGetCommands-VU2SLNEH.js} +16 -15
  18. package/{appListCommands-EKUBDRUO.js → appListCommands-S3T4DJ36.js} +16 -15
  19. package/{authCommand-F4EFRRX6.js → authCommand-HGP2XTKC.js} +100 -8
  20. package/{builtinSkillRegistry-FUAVTRVZ.js → builtinSkillRegistry-Q2VVY3SC.js} +2 -2
  21. package/{chatQueueReduxAdapter-PQMRR2PK.js → chatQueueReduxAdapter-TWIYKVIZ.js} +9 -9
  22. package/{chunk-Z77CRGTW.js → chunk-3AMA42ZI.js} +1 -1
  23. package/{chunk-5FBTLSFG.js → chunk-3BGIKIPF.js} +317 -153
  24. package/{chunk-ORYWEJO4.js → chunk-3IUWIAHP.js} +3 -3
  25. package/{chunk-Q2XN3EOZ.js → chunk-3VUWPRFW.js} +17 -7
  26. package/{chunk-GEPUP7OO.js → chunk-3YIAR5UI.js} +1 -1
  27. package/{chunk-5H7KJX7J.js → chunk-4MK3I7Y4.js} +1 -1
  28. package/{chunk-6VFARHZW.js → chunk-52Q2IW2X.js} +783 -999
  29. package/{chunk-6Q33GUCC.js → chunk-5MEYHVIB.js} +1 -1
  30. package/{chunk-6YTOJY35.js → chunk-6D2JFXLY.js} +35 -0
  31. package/{chunk-FZGV4FGK.js → chunk-6GFOD3TK.js} +260 -140
  32. package/{chunk-HJUYAD4A.js → chunk-6Z7MY3V7.js} +1 -1
  33. package/{chunk-V4MJDUSR.js → chunk-AHAHBQMU.js} +1 -1
  34. package/{chunk-TOP2VXOR.js → chunk-BFDFRLLQ.js} +2 -2
  35. package/chunk-BMQ2MJUK.js +153 -0
  36. package/{chunk-RG6JBBX5.js → chunk-CWQINZEA.js} +119 -3
  37. package/{chunk-BTI7PJDX.js → chunk-DD6XE56O.js} +12 -65
  38. package/{chunk-ETI2NYVF.js → chunk-FKNWP6SG.js} +1 -1
  39. package/{chunk-SSDAAEC2.js → chunk-FP76KI2Y.js} +280 -40
  40. package/chunk-FV3JEYR3.js +870 -0
  41. package/{chunk-DHDMC6FO.js → chunk-GIVFXPWK.js} +2 -0
  42. package/chunk-GMZLP5DV.js +82 -0
  43. package/{chunk-UZGQNTVW.js → chunk-GNCCNNZD.js} +3 -1
  44. package/{chunk-AFUORTY4.js → chunk-GP5LKBUZ.js} +1 -1
  45. package/{chunk-ZCYXJSTU.js → chunk-H4AHY5BU.js} +4 -81
  46. package/{chunk-OEVAY4J6.js → chunk-HAFJ3NDE.js} +2 -2
  47. package/{chunk-IIVGDG4I.js → chunk-HCT7U36O.js} +3 -0
  48. package/{chunk-4OEFYTWL.js → chunk-HKNXJGEC.js} +1 -1
  49. package/{chunk-VLTIYV3X.js → chunk-HYJFRTLW.js} +1 -1
  50. package/{chunk-NA35QHCF.js → chunk-K36IXSCQ.js} +1 -1
  51. package/{chunk-DRGSDQBL.js → chunk-KAUSRTO6.js} +2 -2
  52. package/{chunk-GPCZ7UXG.js → chunk-LJ5VW2UJ.js} +1 -1
  53. package/{chunk-YFE4A4O7.js → chunk-LMREEBWT.js} +120 -37
  54. package/{chunk-JRQFUXY7.js → chunk-LVIFM7VW.js} +1 -1
  55. package/{chunk-RFCKMYDK.js → chunk-MZYBSTMH.js} +4 -4
  56. package/chunk-OCZKATRC.js +129 -0
  57. package/{chunk-DNCEALKX.js → chunk-P5EVSOPA.js} +2 -2
  58. package/{chunk-BP4XNZRM.js → chunk-PBA4UJBK.js} +1 -1
  59. package/{chunk-G2O6V3HJ.js → chunk-PMAIQX7A.js} +3 -3
  60. package/{chunk-AEOE4Z6Q.js → chunk-QSHEEA5N.js} +2 -2
  61. package/{chunk-KQ4ONNQD.js → chunk-QU7KDSZX.js} +1 -1
  62. package/{chunk-45C5ER5U.js → chunk-RPJUFEGR.js} +4 -4
  63. package/{chunk-X6DN5HBD.js → chunk-U4OKDZFH.js} +3 -3
  64. package/{chunk-4S5QUMJP.js → chunk-UDVH2P4A.js} +4 -4
  65. package/{chunk-UKZDAFYT.js → chunk-UEVXFHQB.js} +2 -2
  66. package/{chunk-H62HCIUP.js → chunk-VRTTFDBM.js} +2 -1
  67. package/{chunk-6IG4XSS6.js → chunk-WP5UXDA5.js} +71 -4
  68. package/{chunk-3DII57IT.js → chunk-XD2MJFUG.js} +1 -1
  69. package/{chunk-QVKRR2SS.js → chunk-XP3VVAPG.js} +878 -175
  70. package/{chunk-L5UXH3B2.js → chunk-Z2PV6O2T.js} +18 -2
  71. package/{chunk-53HEEOTT.js → chunk-Z5625XML.js} +1 -1
  72. package/{contentThunks-GJV22WVZ.js → contentThunks-JYWI7G7I.js} +10 -10
  73. package/{createAgentAutomationAction-6V25TZEO.js → createAgentAutomationAction-Z4SUJ54Y.js} +10 -10
  74. package/{createDialogAction-SX36BGSX.js → createDialogAction-RCHFLVJ2.js} +12 -12
  75. package/{createPageAction-IR4BGJSI.js → createPageAction-YK2253XQ.js} +11 -11
  76. package/{dbSlice-XVWBAGYN.js → dbSlice-A6C6H32X.js} +1 -1
  77. package/{dialogCommands-5J56DFWN.js → dialogCommands-X4UOZQWX.js} +16 -15
  78. package/{dialogSlice-UNX2FAPZ.js → dialogSlice-IVTWLCE2.js} +15 -9
  79. package/{docCreateCommands-KYI2DC2U.js → docCreateCommands-VD6TGHG4.js} +15 -14
  80. package/{docDeleteCommands-67REUSRY.js → docDeleteCommands-OT3R2G4W.js} +16 -15
  81. package/{docReadCommands-HOSVSBDJ.js → docReadCommands-2G7BIXSH.js} +15 -14
  82. package/{docStore-JWVG5NDO.js → docStore-UENKCCDX.js} +2 -2
  83. package/{docUpdateCommands-EMGCSMXY.js → docUpdateCommands-45MVJKZA.js} +15 -14
  84. package/{handleSendMessageAction-B75UOJKF.js → handleSendMessageAction-LM2J4HC3.js} +50 -58
  85. package/index.js +51 -51
  86. package/{machineCommands-GFPTOY6L.js → machineCommands-6N6MQIE6.js} +38 -37
  87. package/{machineWsRunDispatch-46PSZ3DJ.js → machineWsRunDispatch-7MFKVQCR.js} +35 -34
  88. package/{memberThunks-QGFLFVCI.js → memberThunks-P2ECUJ56.js} +2 -2
  89. package/package.json +1 -1
  90. package/pdf-U6KSUEZZ.js +26435 -0
  91. package/{providerPresetApply-FG6NZ57W.js → providerPresetApply-XI3WUPTI.js} +2 -2
  92. package/{providerRegistry-757OWH3O.js → providerRegistry-KEPWWGXD.js} +2 -2
  93. package/{readlineWorkspace-UFSWHFKD.js → readlineWorkspace-JWBON5CX.js} +184 -63
  94. package/{removeDialogAgentAction-IX3MN2ZO.js → removeDialogAgentAction-W66BJ7CF.js} +4 -4
  95. package/{runAgentClientLoop-25LJ4XGV.js → runAgentClientLoop-TA4SSPHE.js} +26 -26
  96. package/{setDialogExtraReferencesAction-X4HCPNZL.js → setDialogExtraReferencesAction-2ALKG3WA.js} +3 -3
  97. package/{setPrimaryDialogAgentAction-4GMIQLOD.js → setPrimaryDialogAgentAction-TQZB55F6.js} +4 -4
  98. package/{settingSlice-ZQZVUPKK.js → settingSlice-P4ZW7K5X.js} +2 -2
  99. package/{spaceCommands-NKJVJCQQ.js → spaceCommands-6NSAXB7D.js} +15 -14
  100. package/{streamAgentChatTurn-A46QFV4O.js → streamAgentChatTurn-X5ENGUIS.js} +94 -34
  101. package/{switchDialogAgentAction-N52LRPA3.js → switchDialogAgentAction-3KI72HHS.js} +2 -2
  102. package/{toolApiClient-QVJ6HDNN.js → toolApiClient-G3M73RTB.js} +2 -2
  103. package/{tools-TTDGRNY6.js → tools-XRQR7ZZR.js} +23 -23
  104. package/{tuiSummaryLlmCaller-WFRWERGK.js → tuiSummaryLlmCaller-UFGFOIIW.js} +5 -4
  105. package/{updateDialogTitleAction-QJPZGF52.js → updateDialogTitleAction-ESUUD3GT.js} +10 -10
  106. package/chunk-Q5FJJ6XI.js +0 -103
@@ -23,13 +23,10 @@ import {
23
23
  resolveRunLabel
24
24
  } from "./chunk-3VNWWVKB.js";
25
25
  import {
26
- omitNullishAgentSummaryFields,
27
- sortSafeAgentSummaries,
28
- summarizeCredentialGroups,
29
- toCompactAgentSummary,
30
- toSafeAgentSummary,
31
- toUnavailableAgentSummary
32
- } from "./chunk-RG6JBBX5.js";
26
+ buildAgentDiscoveryResult,
27
+ resolveDiscoveryScope,
28
+ toSafeAgentSummary
29
+ } from "./chunk-CWQINZEA.js";
33
30
  import {
34
31
  getUserDataItemTimestamp,
35
32
  mergeAndDedupUserData
@@ -52,7 +49,7 @@ import {
52
49
  setMembershipRejected,
53
50
  setSpaceInitialized,
54
51
  updateMemberSpaceName
55
- } from "./chunk-HJUYAD4A.js";
52
+ } from "./chunk-6Z7MY3V7.js";
56
53
  import {
57
54
  ToolApiError,
58
55
  buildToolRequestHeaders,
@@ -60,16 +57,16 @@ import {
60
57
  getRequestConfig,
61
58
  getToolBaseUrl,
62
59
  getToolRequestContext
63
- } from "./chunk-VLTIYV3X.js";
60
+ } from "./chunk-HYJFRTLW.js";
64
61
  import {
65
62
  setDialogExtraReferencesAction
66
- } from "./chunk-UKZDAFYT.js";
63
+ } from "./chunk-UEVXFHQB.js";
67
64
  import {
68
65
  waitForAbortableDelay
69
66
  } from "./chunk-N4G4PKQ6.js";
70
67
  import {
71
68
  markdownToSlate
72
- } from "./chunk-FZGV4FGK.js";
69
+ } from "./chunk-6GFOD3TK.js";
73
70
  import {
74
71
  extractMentionsFromSlate
75
72
  } from "./chunk-MEYIRKDN.js";
@@ -81,10 +78,10 @@ import {
81
78
  } from "./chunk-VF4K2QE6.js";
82
79
  import {
83
80
  createDocState
84
- } from "./chunk-G2O6V3HJ.js";
81
+ } from "./chunk-PMAIQX7A.js";
85
82
  import {
86
83
  createDialogAction
87
- } from "./chunk-RFCKMYDK.js";
84
+ } from "./chunk-MZYBSTMH.js";
88
85
  import {
89
86
  DEFAULT_COLLAPSED_CATEGORIES,
90
87
  addContentToSpace,
@@ -102,7 +99,7 @@ import {
102
99
  updateContentCategory,
103
100
  updateContentTitle,
104
101
  writeStoredCollapsedCategories
105
- } from "./chunk-ORYWEJO4.js";
102
+ } from "./chunk-3IUWIAHP.js";
106
103
  import {
107
104
  getCurrentSpaceId,
108
105
  getCurrentSpaceIdRaw,
@@ -124,19 +121,19 @@ import {
124
121
  selectMsgById,
125
122
  uiAskChoiceFunc,
126
123
  uiAskChoiceFunctionSchema
127
- } from "./chunk-QVKRR2SS.js";
124
+ } from "./chunk-XP3VVAPG.js";
128
125
  import {
129
126
  createAgent,
130
127
  deleteServerSyncedCredential,
131
128
  runLlm,
132
129
  streamAgentChatTurn,
133
130
  updateAgent
134
- } from "./chunk-4S5QUMJP.js";
131
+ } from "./chunk-UDVH2P4A.js";
135
132
  import {
136
133
  getActiveDialogKey,
137
134
  selectCurrentDialogKey,
138
135
  selectPendingRawDataByPageKey
139
- } from "./chunk-6YTOJY35.js";
136
+ } from "./chunk-6D2JFXLY.js";
140
137
  import {
141
138
  require_react
142
139
  } from "./chunk-YDH3FDFQ.js";
@@ -145,10 +142,10 @@ import {
145
142
  resolveBuiltinCapability,
146
143
  resolveBuiltinSkillByName,
147
144
  resolveBuiltinSkillEntry
148
- } from "./chunk-JRQFUXY7.js";
145
+ } from "./chunk-LVIFM7VW.js";
149
146
  import {
150
147
  CAPABILITY_PACKS
151
- } from "./chunk-DHDMC6FO.js";
148
+ } from "./chunk-GIVFXPWK.js";
152
149
  import {
153
150
  buildSkillDocMarkdown,
154
151
  normalizeSkillModalities,
@@ -173,13 +170,10 @@ import {
173
170
  redactAgentRecordForWorkspaceTool,
174
171
  resolveNoloDialogInput,
175
172
  verifyNoloDialogSubjectRefQuery
176
- } from "./chunk-IIVGDG4I.js";
177
- import {
178
- isAgentUnavailableNow
179
- } from "./chunk-FDTR4QJ6.js";
173
+ } from "./chunk-HCT7U36O.js";
180
174
  import {
181
175
  buildDatabaseFileContentUrl
182
- } from "./chunk-DNCEALKX.js";
176
+ } from "./chunk-P5EVSOPA.js";
183
177
  import {
184
178
  DEFAULT_MODEL
185
179
  } from "./chunk-OIVSQH2O.js";
@@ -198,14 +192,14 @@ import {
198
192
  } from "./chunk-O6OSWFZQ.js";
199
193
  import {
200
194
  shareResourceAction
201
- } from "./chunk-BP4XNZRM.js";
195
+ } from "./chunk-PBA4UJBK.js";
202
196
  import {
203
197
  AGENT_UPDATE_FIELD_NAMES,
204
198
  normalizeAgentUpdateFieldList,
205
199
  selectAutoApproveSelfUpdateFields,
206
200
  selectCurrentServer,
207
201
  selectSyncServers
208
- } from "./chunk-AFUORTY4.js";
202
+ } from "./chunk-GP5LKBUZ.js";
209
203
  import {
210
204
  asRecordOrEmpty
211
205
  } from "./chunk-KX6YBIHG.js";
@@ -213,7 +207,7 @@ import {
213
207
  UNCATEGORIZED_ID,
214
208
  addContentAction,
215
209
  checkSpaceMembership
216
- } from "./chunk-V4MJDUSR.js";
210
+ } from "./chunk-AHAHBQMU.js";
217
211
  import {
218
212
  createSpaceKey,
219
213
  normalizeSpaceId
@@ -223,12 +217,13 @@ import {
223
217
  read,
224
218
  readAndWait,
225
219
  readAndWaitAction,
220
+ readFileContentAction,
226
221
  remove,
227
222
  selectById,
228
223
  selectEntities,
229
224
  toTimestampMs,
230
225
  write
231
- } from "./chunk-H62HCIUP.js";
226
+ } from "./chunk-VRTTFDBM.js";
232
227
  import {
233
228
  SEPARATOR,
234
229
  TYPE_STORAGE_PREFIXES,
@@ -308,6 +303,69 @@ import {
308
303
  __toESM
309
304
  } from "./chunk-4VNS5WPM.js";
310
305
 
306
+ // packages/ai/tools/agentAutomationSchemas.ts
307
+ var agentAutomationTriggerSchema = {
308
+ oneOf: [
309
+ {
310
+ type: "object",
311
+ description: "Cron trigger.",
312
+ properties: {
313
+ type: { type: "string", enum: ["cron"] },
314
+ expression: {
315
+ type: "string",
316
+ description: "Cron expression, e.g. 0 9 * * *."
317
+ },
318
+ timezone: {
319
+ type: "string",
320
+ description: "Optional timezone, e.g. Asia/Shanghai."
321
+ }
322
+ },
323
+ required: ["type", "expression"],
324
+ additionalProperties: false
325
+ },
326
+ {
327
+ type: "object",
328
+ 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.",
329
+ properties: {
330
+ type: { type: "string", enum: ["email"] },
331
+ acceptAll: {
332
+ type: "boolean",
333
+ description: "When true the automation fires on every inbound email for the bound agent mailbox \u2014 no content filtering."
334
+ },
335
+ fromContains: {
336
+ type: "string",
337
+ description: "Case-insensitive substring match against sender email address."
338
+ },
339
+ subjectContains: {
340
+ type: "string",
341
+ description: "Case-insensitive substring match against email subject."
342
+ },
343
+ fromContainsAny: {
344
+ type: "array",
345
+ description: "OR'd substring match against sender email \u2014 matches if ANY listed needle appears in the From header.",
346
+ items: { type: "string" },
347
+ minItems: 1
348
+ },
349
+ subjectContainsAny: {
350
+ type: "array",
351
+ description: "OR'd substring match against email subject \u2014 matches if ANY listed needle appears in the Subject.",
352
+ items: { type: "string" },
353
+ minItems: 1
354
+ }
355
+ },
356
+ required: ["type"],
357
+ anyOf: [
358
+ { required: ["acceptAll"] },
359
+ { required: ["fromContains"] },
360
+ { required: ["subjectContains"] },
361
+ { required: ["fromContainsAny"] },
362
+ { required: ["subjectContainsAny"] }
363
+ ],
364
+ additionalProperties: false
365
+ }
366
+ ]
367
+ };
368
+
311
369
  // packages/ai/tools/modelUsageTools.ts
312
370
  var queryModelUsageFunctionSchema = {
313
371
  name: "queryModelUsage",
@@ -432,7 +490,7 @@ var queryUserGrowthReportFunctionSchema = {
432
490
  };
433
491
  var createAgentAutomationFunctionSchema = {
434
492
  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",
493
+ 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
494
  parameters: {
437
495
  type: "object",
438
496
  properties: {
@@ -442,29 +500,9 @@ var createAgentAutomationFunctionSchema = {
442
500
  },
443
501
  instruction: {
444
502
  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
503
+ 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
504
  },
505
+ trigger: agentAutomationTriggerSchema,
468
506
  ownerAgentKey: {
469
507
  type: "string",
470
508
  description: "\u6267\u884C\u8BE5 automation \u7684 agentKey\u3002\u9ED8\u8BA4\u4F7F\u7528\u5F53\u524D agent\u3002"
@@ -489,13 +527,64 @@ var createAgentAutomationFunctionSchema = {
489
527
  },
490
528
  runOnceNow: {
491
529
  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",
530
+ 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
531
  default: false
494
532
  }
495
533
  },
496
534
  required: ["instruction", "trigger"]
497
535
  }
498
536
  };
537
+ var updateAgentAutomationFunctionSchema = {
538
+ name: "updateAgentAutomation",
539
+ 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",
540
+ parameters: {
541
+ type: "object",
542
+ properties: {
543
+ automationKey: {
544
+ type: "string",
545
+ description: "automation \u7684 dbKey\uFF08agent-automation-{userId}-{id}\uFF09\u3002"
546
+ },
547
+ title: { type: "string", description: "\u65B0\u6807\u9898\u3002" },
548
+ instruction: { type: "string", description: "\u65B0 instruction\u3002" },
549
+ status: {
550
+ type: "string",
551
+ enum: ["active", "paused"],
552
+ description: "automation \u72B6\u6001\u3002paused \u65F6 dispatcher \u4E0D\u518D\u89E6\u53D1 run\u3002"
553
+ },
554
+ trigger: agentAutomationTriggerSchema,
555
+ spaceId: { type: "string", description: "\u65B0\u7684 spaceId\uFF1B\u4F20\u7A7A\u5B57\u7B26\u4E32\u6E05\u9664\u3002" },
556
+ subjectRefs: {
557
+ type: "array",
558
+ description: "\u65B0\u7684 subjectRefs\uFF1B\u4F20\u7A7A\u6570\u7EC4\u6E05\u9664\u3002",
559
+ items: {
560
+ type: "object",
561
+ properties: {
562
+ kind: { type: "string" },
563
+ id: { type: "string" },
564
+ role: { type: "string" }
565
+ },
566
+ required: ["kind", "id"],
567
+ additionalProperties: true
568
+ }
569
+ }
570
+ },
571
+ required: ["automationKey"]
572
+ }
573
+ };
574
+ var deleteAgentAutomationFunctionSchema = {
575
+ name: "deleteAgentAutomation",
576
+ 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",
577
+ parameters: {
578
+ type: "object",
579
+ properties: {
580
+ automationKey: {
581
+ type: "string",
582
+ description: "automation \u7684 dbKey\uFF08agent-automation-{userId}-{id}\uFF09\u3002"
583
+ }
584
+ },
585
+ required: ["automationKey"]
586
+ }
587
+ };
499
588
  var notifyUserFunctionSchema = {
500
589
  name: "notifyUser",
501
590
  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 +626,8 @@ var serverOnlyResult = (toolName) => ({
537
626
  var queryModelUsageFunc = async () => serverOnlyResult("queryModelUsage");
538
627
  var queryUserGrowthReportFunc = async () => serverOnlyResult("queryUserGrowthReport");
539
628
  var createAgentAutomationFunc = async () => serverOnlyResult("createAgentAutomation");
629
+ var updateAgentAutomationFunc = async () => serverOnlyResult("updateAgentAutomation");
630
+ var deleteAgentAutomationFunc = async () => serverOnlyResult("deleteAgentAutomation");
540
631
  var notifyUserFunc = async () => serverOnlyResult("notifyUser");
541
632
 
542
633
  // packages/ai/tools/toolResultError.ts
@@ -3397,92 +3488,6 @@ async function listUserSpacesFunc(args, thunkApi, context) {
3397
3488
  }
3398
3489
  }
3399
3490
 
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
3491
  // packages/ai/agent/publicAgentDiscovery.ts
3487
3492
  async function fetchPublicAgentsForDiscovery(args) {
3488
3493
  const fetchImpl = args.fetchImpl ?? fetch;
@@ -3945,7 +3950,7 @@ async function deleteDialogsFunc(args, thunkApi) {
3945
3950
  const deletedDialogIds = [];
3946
3951
  const deletedDialogKeys = [];
3947
3952
  const failures = [];
3948
- const { deleteDialog: deleteDialog2 } = await import("./dialogSlice-UNX2FAPZ.js");
3953
+ const { deleteDialog: deleteDialog2 } = await import("./dialogSlice-IVTWLCE2.js");
3949
3954
  for (const target of targets) {
3950
3955
  try {
3951
3956
  await thunkApi.dispatch(deleteDialog2(target.dbKey)).unwrap();
@@ -4041,6 +4046,10 @@ var listAgentsFunctionSchema = {
4041
4046
  },
4042
4047
  publicOnly: { type: "boolean", description: "Deprecated compatibility alias for scope='public'." },
4043
4048
  showUnavailable: { type: "boolean", description: "Include agents currently rate-limited (429). Default false." },
4049
+ query: {
4050
+ type: "string",
4051
+ description: "Optional case-insensitive search substring matching agent name, model, provider, handle, or agentKey. Use to locate specific candidates like 'opus', 'devin', or 'claude'."
4052
+ },
4044
4053
  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
4054
  }
4046
4055
  }
@@ -4093,6 +4102,7 @@ async function listAgentsFunc(args, thunkApi) {
4093
4102
  const discovery = buildAgentDiscoveryResult({
4094
4103
  agents,
4095
4104
  scope: args?.scope,
4105
+ query: args?.query,
4096
4106
  publicOnly: args?.publicOnly,
4097
4107
  showUnavailable: args?.showUnavailable,
4098
4108
  verbose: args?.verbose
@@ -5057,7 +5067,7 @@ var fetchSpaceAction = async (input, thunkAPI) => {
5057
5067
  const spaceKey = createSpaceKey.space(spaceId);
5058
5068
  const readSpace = async (dbKey) => {
5059
5069
  try {
5060
- const { read: read2, readAndWait: readAndWait2 } = await import("./dbSlice-XVWBAGYN.js");
5070
+ const { read: read2, readAndWait: readAndWait2 } = await import("./dbSlice-A6C6H32X.js");
5061
5071
  if (fresh) {
5062
5072
  return await dispatch(readAndWait2(dbKey)).unwrap();
5063
5073
  }
@@ -5698,6 +5708,23 @@ var sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
5698
5708
  var normalizeContains = (value) => asTrimmedLowercaseString(value);
5699
5709
  var participantList = (emails) => Array.isArray(emails) ? asTrimmedNonEmptyStringArray(emails).map((email) => ({ email })) : [];
5700
5710
  var emailText = (email) => [email?.subject, email?.from?.email, email?.from?.name, email?.text, email?.html].filter((value) => typeof value === "string").join("\n");
5711
+ var emailAttachments = (email) => Array.isArray(email?.attachments) ? email.attachments : [];
5712
+ var attachmentPreview = (attachment) => {
5713
+ const name = asOptionalTrimmedString(attachment?.filename) ?? "attachment";
5714
+ const contentType = asOptionalTrimmedString(attachment?.contentType) ?? "application/octet-stream";
5715
+ const fileId = asOptionalTrimmedString(attachment?.fileId) ?? "unknown-file";
5716
+ const size = Number.isFinite(Number(attachment?.size)) ? ` | ${Number(attachment.size)} bytes` : "";
5717
+ return `- ${name} | ${contentType}${size} | fileId: ${fileId}`;
5718
+ };
5719
+ var attachmentListPreview = (email) => {
5720
+ const attachments = emailAttachments(email);
5721
+ if (attachments.length === 0) return "";
5722
+ return [
5723
+ `\u9644\u4EF6\uFF08${attachments.length}\uFF09\uFF1A`,
5724
+ ...attachments.map(attachmentPreview),
5725
+ "\u8BFB\u53D6\u9644\u4EF6\uFF1A\u518D\u6B21\u8C03\u7528 email_read\uFF0C\u4F20\u5165\u5F53\u524D dbKey \u548C attachmentFileId\u3002"
5726
+ ].join("\n");
5727
+ };
5701
5728
  var matchesWaitFilters = (email, args) => {
5702
5729
  const subjectContains = normalizeContains(args.subjectContains);
5703
5730
  const fromContains = normalizeContains(args.fromContains);
@@ -5723,6 +5750,58 @@ var stripHtml = (html) => typeof html === "string" ? compactWhitespace(
5723
5750
  html.replace(/<a\b[^>]*href=["']([^"']+)["'][^>]*>/gi, " $1 ").replace(/<[^>]+>/g, " ")
5724
5751
  ) : "";
5725
5752
  var cleanUrl = (url) => url.replace(/[),.;\]}>]+$/g, "");
5753
+ var extractPdfText = async (blob) => {
5754
+ const pdfjsLib = await import("./pdf-U6KSUEZZ.js");
5755
+ if (typeof window !== "undefined" && pdfjsLib.GlobalWorkerOptions && !pdfjsLib.GlobalWorkerOptions.workerSrc) {
5756
+ pdfjsLib.GlobalWorkerOptions.workerSrc = "/public/assets/pdf.worker.mjs";
5757
+ }
5758
+ const data = await blob.arrayBuffer();
5759
+ const pdf = await pdfjsLib.getDocument({ data }).promise;
5760
+ const pages = [];
5761
+ for (let pageNumber = 1; pageNumber <= pdf.numPages; pageNumber += 1) {
5762
+ const page = await pdf.getPage(pageNumber);
5763
+ const textContent = await page.getTextContent();
5764
+ const text = textContent.items.map((item) => typeof item?.str === "string" ? item.str : "").filter(Boolean).join(" ").trim();
5765
+ if (text) pages.push(`--- page ${pageNumber} ---
5766
+ ${text}`);
5767
+ }
5768
+ return pages.join("\n\n").trim();
5769
+ };
5770
+ var readEmailAttachment = async (email, fileId, maxChars, thunkApi) => {
5771
+ const attachment = emailAttachments(email).find(
5772
+ (item) => asOptionalTrimmedString(item?.fileId) === fileId
5773
+ );
5774
+ if (!attachment) {
5775
+ throw new Error(`\u9644\u4EF6 ${fileId} \u4E0D\u5C5E\u4E8E\u90AE\u4EF6 ${email?.dbKey || "unknown"}`);
5776
+ }
5777
+ const result = await readFileContentAction({ fileId }, thunkApi);
5778
+ const blob = result.blob;
5779
+ const contentType = (asOptionalTrimmedString(attachment?.contentType) || asOptionalTrimmedString(blob.type) || "application/octet-stream").toLowerCase();
5780
+ const filename = asOptionalTrimmedString(attachment?.filename) ?? fileId;
5781
+ let content;
5782
+ if (contentType === "application/pdf" || filename.toLowerCase().endsWith(".pdf")) {
5783
+ content = await extractPdfText(blob);
5784
+ if (!content) {
5785
+ throw new Error(
5786
+ `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`
5787
+ );
5788
+ }
5789
+ } else if (contentType.startsWith("text/") || contentType.includes("json") || contentType.includes("csv") || contentType.includes("xml") || /\.(txt|md|csv|json|xml|html?|log)$/i.test(filename)) {
5790
+ content = await blob.text();
5791
+ } else {
5792
+ throw new Error(
5793
+ `\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`
5794
+ );
5795
+ }
5796
+ const truncated = content.length > maxChars;
5797
+ return {
5798
+ attachment,
5799
+ content: truncated ? content.slice(0, maxChars) : content,
5800
+ totalChars: content.length,
5801
+ truncated,
5802
+ source: result.source
5803
+ };
5804
+ };
5726
5805
  var extractEmailVerificationArtifacts = ({
5727
5806
  text,
5728
5807
  html
@@ -5790,13 +5869,25 @@ var emailSearchFunctionSchema = {
5790
5869
  };
5791
5870
  var emailReadFunctionSchema = {
5792
5871
  name: "email_read",
5793
- description: "\u8BFB\u53D6\u4E00\u5C01\u90AE\u4EF6\u7684\u5B8C\u6574\u5185\u5BB9\u3002\u9700\u8981 email:read \u6743\u9650\u3002",
5872
+ description: [
5873
+ "\u8BFB\u53D6\u4E00\u5C01\u90AE\u4EF6\u7684\u5B8C\u6574\u5185\u5BB9\u3002\u9700\u8981 email:read \u6743\u9650\u3002",
5874
+ "\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",
5875
+ "PDF \u4F18\u5148\u76F4\u63A5\u63D0\u53D6\u6587\u5B57\u5C42\uFF1B\u626B\u63CF\u7248 PDF \u4F1A\u63D0\u793A\u6539\u7528 OCR\u3002"
5876
+ ].join("\n"),
5794
5877
  parameters: {
5795
5878
  type: "object",
5796
5879
  properties: {
5797
5880
  dbKey: {
5798
5881
  type: "string",
5799
5882
  description: "\u90AE\u4EF6\u8BB0\u5F55\u7684 dbKey\uFF0C\u4F8B\u5982 email-userId-emailId\u3002"
5883
+ },
5884
+ attachmentFileId: {
5885
+ type: "string",
5886
+ description: "\u53EF\u9009\u3002\u5F53\u524D\u90AE\u4EF6 attachments[] \u4E2D\u7684 fileId\uFF1B\u63D0\u4F9B\u540E\u8BFB\u53D6\u8BE5\u9644\u4EF6\u6587\u672C\u3002"
5887
+ },
5888
+ maxChars: {
5889
+ type: "number",
5890
+ 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
5891
  }
5801
5892
  },
5802
5893
  required: ["dbKey"]
@@ -6075,15 +6166,47 @@ ${artifacts.verificationLinks.slice(1).join("\n")}` : ""
6075
6166
  };
6076
6167
  }
6077
6168
  async function emailReadFunc(args, thunkApi) {
6078
- const email = await callToolApi(thunkApi, "/rpc/getEmail", args, {
6169
+ const email = await callToolApi(thunkApi, "/rpc/getEmail", { dbKey: args.dbKey }, {
6079
6170
  withAuth: true
6080
6171
  });
6172
+ const attachmentFileId = asOptionalTrimmedString(args.attachmentFileId);
6173
+ if (attachmentFileId) {
6174
+ const maxChars = clampInteger(args.maxChars, 12e3, 1e3, 5e4);
6175
+ const attachmentResult = await readEmailAttachment(
6176
+ email,
6177
+ attachmentFileId,
6178
+ maxChars,
6179
+ thunkApi
6180
+ );
6181
+ const filename = asOptionalTrimmedString(attachmentResult.attachment?.filename) ?? attachmentFileId;
6182
+ return {
6183
+ rawData: {
6184
+ emailDbKey: email?.dbKey,
6185
+ attachment: attachmentResult.attachment,
6186
+ content: attachmentResult.content,
6187
+ totalChars: attachmentResult.totalChars,
6188
+ truncated: attachmentResult.truncated,
6189
+ source: attachmentResult.source
6190
+ },
6191
+ displayData: [
6192
+ `\u9644\u4EF6\uFF1A${filename} | fileId: ${attachmentFileId}`,
6193
+ 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}`,
6194
+ "",
6195
+ attachmentResult.content
6196
+ ].join("\n")
6197
+ };
6198
+ }
6081
6199
  const body = asOptionalTrimmedString(email?.text) ?? asOptionalTrimmedString(email?.html) ?? "";
6200
+ const attachments = attachmentListPreview(email);
6082
6201
  return {
6083
6202
  rawData: email,
6084
- displayData: `${emailPreview(email)}
6085
-
6086
- ${body.slice(0, 4e3)}`
6203
+ displayData: [
6204
+ emailPreview(email),
6205
+ "",
6206
+ body.slice(0, 4e3),
6207
+ attachments ? `
6208
+ ${attachments}` : ""
6209
+ ].filter(Boolean).join("\n")
6087
6210
  };
6088
6211
  }
6089
6212
  async function emailUpdateTagsFunc(args, thunkApi) {
@@ -10122,7 +10245,7 @@ var cloudflareCrawlStatusFunctionSchema = {
10122
10245
  async function cloudflareCrawlStatusFunc(args, thunkApi) {
10123
10246
  const { jobId, limit, status, cursor } = args;
10124
10247
  if (!jobId) throw new Error("\u5FC5\u987B\u63D0\u4F9B jobId");
10125
- const { getToolRequestContext: getToolRequestContext2 } = await import("./toolApiClient-QVJ6HDNN.js");
10248
+ const { getToolRequestContext: getToolRequestContext2 } = await import("./toolApiClient-G3M73RTB.js");
10126
10249
  const { baseUrl, token } = getToolRequestContext2(thunkApi);
10127
10250
  const params = new URLSearchParams();
10128
10251
  if (limit !== void 0) params.set("limit", String(limit));
@@ -10900,7 +11023,7 @@ var selectUserIdFromState = (state2) => {
10900
11023
  var selectCurrentServerFromState = (state2) => typeof state2?.settings?.currentServer === "string" ? state2.settings.currentServer : null;
10901
11024
  async function addImageContentToSpace(input) {
10902
11025
  const injectedAddContentAction = input.thunkApi?.extra?.addContentAction;
10903
- const addContentAction2 = typeof injectedAddContentAction === "function" ? injectedAddContentAction : (await import("./addContentAction-O7R66HEX.js")).addContentAction;
11026
+ const addContentAction2 = typeof injectedAddContentAction === "function" ? injectedAddContentAction : (await import("./addContentAction-MB2HHMDZ.js")).addContentAction;
10904
11027
  await addContentAction2(
10905
11028
  {
10906
11029
  spaceId: input.spaceId,
@@ -13059,11 +13182,14 @@ function checkCredentialFanout(args) {
13059
13182
  };
13060
13183
  }
13061
13184
  if (candidateGroup === entryGroup) {
13185
+ if (args.allowCredentialConcurrency === true) {
13186
+ continue;
13187
+ }
13062
13188
  return {
13063
13189
  allowed: false,
13064
13190
  reason: "credential_group_conflict",
13065
13191
  conflict: entry,
13066
- 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`
13192
+ 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`
13067
13193
  };
13068
13194
  }
13069
13195
  }
@@ -13124,6 +13250,11 @@ function buildStartAgentRunFunctionSchema(opts) {
13124
13250
  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",
13125
13251
  default: false
13126
13252
  },
13253
+ allowCredentialConcurrency: {
13254
+ type: "boolean",
13255
+ 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",
13256
+ default: false
13257
+ },
13127
13258
  trackTodo: {
13128
13259
  type: "boolean",
13129
13260
  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'
@@ -13170,7 +13301,8 @@ async function startAgentRunFunc(args, thunkApi, _context) {
13170
13301
  const verdict = checkCredentialFanout({
13171
13302
  active,
13172
13303
  candidate: { agentKey, credentialGroup: args.credentialGroup },
13173
- allowUnknownCredential: args.allowUnknownCredential === true
13304
+ allowUnknownCredential: args.allowUnknownCredential === true,
13305
+ allowCredentialConcurrency: args.allowCredentialConcurrency === true
13174
13306
  });
13175
13307
  if (!verdict.allowed) throw new Error(verdict.message);
13176
13308
  }
@@ -14906,7 +15038,7 @@ var executeToolRun = createAsyncThunk(
14906
15038
  if (!executionInput) {
14907
15039
  throw new Error(`ToolRun ${id} has no input to execute with.`);
14908
15040
  }
14909
- const { findToolExecutor: findToolExecutor2 } = await import("./tools-TTDGRNY6.js");
15041
+ const { findToolExecutor: findToolExecutor2 } = await import("./tools-XRQR7ZZR.js");
14910
15042
  const { executor } = findToolExecutor2(run.toolName);
14911
15043
  toolRunStarted({
14912
15044
  id: run.id,
@@ -14930,7 +15062,7 @@ var executeToolRun = createAsyncThunk(
14930
15062
  const latestState = thunkApi.getState();
14931
15063
  const userId = selectIdentityUserId(latestState);
14932
15064
  if (userId) {
14933
- const { fetchUserSpaceMemberships } = await import("./memberThunks-QGFLFVCI.js");
15065
+ const { fetchUserSpaceMemberships } = await import("./memberThunks-P2ECUJ56.js");
14934
15066
  await thunkApi.dispatch(fetchUserSpaceMemberships(userId));
14935
15067
  }
14936
15068
  }
@@ -17413,7 +17545,7 @@ async function updateDocFunc(args, thunkApi) {
17413
17545
  updated_at: (/* @__PURE__ */ new Date()).toISOString()
17414
17546
  };
17415
17547
  await dispatch(write({ data: updatedPageData, customKey: id })).unwrap();
17416
- const { getDocState, applyExternalDocUpdate } = await import("./docStore-JWVG5NDO.js");
17548
+ const { getDocState, applyExternalDocUpdate } = await import("./docStore-UENKCCDX.js");
17417
17549
  if (getDocState().pageKey === id) {
17418
17550
  applyExternalDocUpdate({
17419
17551
  slateData: finalSlateData,
@@ -17438,7 +17570,7 @@ async function updateDocFunc(args, thunkApi) {
17438
17570
  // packages/ai/tools/updateUserPreferenceProfileTool.ts
17439
17571
  async function dispatchSetSettings(thunkApi, changes) {
17440
17572
  const injectedSetSettings = thunkApi?.extra?.setSettings;
17441
- const setSettings = typeof injectedSetSettings === "function" ? injectedSetSettings : (await import("./settingSlice-ZQZVUPKK.js")).setSettings;
17573
+ const setSettings = typeof injectedSetSettings === "function" ? injectedSetSettings : (await import("./settingSlice-P4ZW7K5X.js")).setSettings;
17442
17574
  await thunkApi.dispatch(setSettings(changes)).unwrap();
17443
17575
  }
17444
17576
  var updateUserPreferenceProfileFunctionSchema = {
@@ -18161,6 +18293,38 @@ var baseToolDefinitions = [
18161
18293
  costLevel: "low",
18162
18294
  defaultConsent: "ask"
18163
18295
  },
18296
+ {
18297
+ id: "updateAgentAutomation",
18298
+ schema: updateAgentAutomationFunctionSchema,
18299
+ executor: updateAgentAutomationFunc,
18300
+ description: {
18301
+ name: "updateAgentAutomation",
18302
+ description: "\u66F4\u65B0\u4E00\u4E2A agent automation \u7684\u6807\u9898\u3001instruction\u3001trigger\u3001status \u7B49\u5B57\u6BB5\u3002",
18303
+ category: "\u8BA1\u5212\u4E0E\u7F16\u6392"
18304
+ },
18305
+ behavior: "action",
18306
+ uiGroup: "general",
18307
+ capability: "general",
18308
+ riskLevel: "medium",
18309
+ costLevel: "low",
18310
+ defaultConsent: "ask"
18311
+ },
18312
+ {
18313
+ id: "deleteAgentAutomation",
18314
+ schema: deleteAgentAutomationFunctionSchema,
18315
+ executor: deleteAgentAutomationFunc,
18316
+ description: {
18317
+ name: "deleteAgentAutomation",
18318
+ description: "\u5220\u9664\u4E00\u4E2A agent automation \u53CA\u5176 owner index\u3002",
18319
+ category: "\u8BA1\u5212\u4E0E\u7F16\u6392"
18320
+ },
18321
+ behavior: "action",
18322
+ uiGroup: "general",
18323
+ capability: "general",
18324
+ riskLevel: "high",
18325
+ costLevel: "low",
18326
+ defaultConsent: "ask"
18327
+ },
18164
18328
  {
18165
18329
  id: "notifyUser",
18166
18330
  schema: notifyUserFunctionSchema,