@vellumai/assistant 0.4.29 → 0.4.30

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 (174) hide show
  1. package/ARCHITECTURE.md +39 -37
  2. package/README.md +5 -6
  3. package/docs/runbook-trusted-contacts.md +79 -43
  4. package/package.json +1 -1
  5. package/scripts/ipc/check-swift-decoder-drift.ts +2 -3
  6. package/scripts/test.sh +1 -1
  7. package/src/__tests__/__snapshots__/ipc-snapshot.test.ts.snap +4 -37
  8. package/src/__tests__/actor-token-service.test.ts +4 -3
  9. package/src/__tests__/app-executors.test.ts +7 -17
  10. package/src/__tests__/assistant-feature-flags-integration.test.ts +18 -10
  11. package/src/__tests__/browser-skill-endstate.test.ts +10 -1
  12. package/src/__tests__/bundled-skill-retrieval-guard.test.ts +1 -0
  13. package/src/__tests__/channel-approval-routes.test.ts +44 -44
  14. package/src/__tests__/channel-approval.test.ts +8 -0
  15. package/src/__tests__/channel-approvals.test.ts +39 -1
  16. package/src/__tests__/channel-guardian.test.ts +15 -5
  17. package/src/__tests__/channel-reply-delivery.test.ts +31 -0
  18. package/src/__tests__/commit-message-enrichment-service.test.ts +4 -0
  19. package/src/__tests__/dynamic-skill-workflow-prompt.test.ts +9 -0
  20. package/src/__tests__/gateway-only-guard.test.ts +1 -0
  21. package/src/__tests__/gemini-image-service.test.ts +2 -2
  22. package/src/__tests__/guardian-grant-minting.test.ts +6 -6
  23. package/src/__tests__/guardian-routing-invariants.test.ts +34 -11
  24. package/src/__tests__/guardian-verify-setup-skill-regression.test.ts +4 -6
  25. package/src/__tests__/inbound-invite-redemption.test.ts +1 -1
  26. package/src/__tests__/integrations-cli.test.ts +3 -27
  27. package/src/__tests__/intent-routing.test.ts +3 -0
  28. package/src/__tests__/invite-redemption-service.test.ts +1 -1
  29. package/src/__tests__/{ingress-routes-http.test.ts → invite-routes-http.test.ts} +40 -320
  30. package/src/__tests__/ipc-snapshot.test.ts +4 -31
  31. package/src/__tests__/nl-approval-parser.test.ts +305 -0
  32. package/src/__tests__/oauth-provider-profiles.test.ts +34 -0
  33. package/src/__tests__/provider-error-scenarios.test.ts +68 -0
  34. package/src/__tests__/relay-server.test.ts +1 -1
  35. package/src/__tests__/retry-after-extraction.test.ts +111 -0
  36. package/src/__tests__/script-proxy-profile-template-fallback.test.ts +127 -0
  37. package/src/__tests__/session-media-retry.test.ts +147 -0
  38. package/src/__tests__/skill-feature-flags-integration.test.ts +9 -5
  39. package/src/__tests__/skill-feature-flags.test.ts +18 -12
  40. package/src/__tests__/skill-load-feature-flag.test.ts +4 -3
  41. package/src/__tests__/slack-block-formatting.test.ts +100 -0
  42. package/src/__tests__/slack-inbound-verification.test.ts +346 -0
  43. package/src/__tests__/slack-reaction-approvals.test.ts +77 -0
  44. package/src/__tests__/slack-skill.test.ts +3 -2
  45. package/src/__tests__/starter-task-flow.test.ts +0 -1
  46. package/src/__tests__/trusted-contact-verification.test.ts +3 -1
  47. package/src/__tests__/voice-invite-redemption.test.ts +1 -1
  48. package/src/amazon/client.ts +7 -24
  49. package/src/calls/relay-server.ts +39 -11
  50. package/src/channels/config.ts +1 -1
  51. package/src/cli/integrations.ts +10 -66
  52. package/src/config/bundled-skills/app-builder/SKILL.md +193 -1500
  53. package/src/config/bundled-skills/app-builder/TOOLS.json +70 -18
  54. package/src/config/bundled-skills/browser/TOOLS.json +59 -2
  55. package/src/config/bundled-skills/chatgpt-import/TOOLS.json +4 -0
  56. package/src/config/bundled-skills/computer-use/TOOLS.json +50 -2
  57. package/src/config/bundled-skills/contacts/SKILL.md +42 -35
  58. package/src/config/bundled-skills/contacts/TOOLS.json +22 -2
  59. package/src/config/bundled-skills/contacts/tools/contact-merge.ts +38 -58
  60. package/src/config/bundled-skills/contacts/tools/contact-search.ts +11 -31
  61. package/src/config/bundled-skills/contacts/tools/contact-upsert.ts +19 -37
  62. package/src/config/bundled-skills/document/TOOLS.json +8 -0
  63. package/src/config/bundled-skills/email-setup/SKILL.md +10 -7
  64. package/src/config/bundled-skills/followups/TOOLS.json +12 -0
  65. package/src/config/bundled-skills/google-calendar/TOOLS.json +124 -26
  66. package/src/config/bundled-skills/guardian-verify-setup/SKILL.md +54 -21
  67. package/src/config/bundled-skills/image-studio/TOOLS.json +12 -2
  68. package/src/config/bundled-skills/image-studio/tools/media-generate-image.ts +14 -8
  69. package/src/config/bundled-skills/knowledge-graph/TOOLS.json +13 -3
  70. package/src/config/bundled-skills/media-processing/SKILL.md +1 -1
  71. package/src/config/bundled-skills/media-processing/TOOLS.json +28 -0
  72. package/src/config/bundled-skills/media-processing/tools/generate-clip.ts +26 -6
  73. package/src/config/bundled-skills/messaging/TOOLS.json +228 -182
  74. package/src/config/bundled-skills/notifications/SKILL.md +3 -2
  75. package/src/config/bundled-skills/notifications/TOOLS.json +7 -13
  76. package/src/config/bundled-skills/phone-calls/TOOLS.json +13 -1
  77. package/src/config/bundled-skills/playbooks/TOOLS.json +16 -0
  78. package/src/config/bundled-skills/reminder/TOOLS.json +15 -2
  79. package/src/config/bundled-skills/schedule/SKILL.md +33 -15
  80. package/src/config/bundled-skills/schedule/TOOLS.json +17 -1
  81. package/src/config/bundled-skills/slack/SKILL.md +30 -1
  82. package/src/config/bundled-skills/slack/TOOLS.json +89 -2
  83. package/src/config/bundled-skills/slack/tools/slack-channel-permissions.ts +146 -0
  84. package/src/config/bundled-skills/slack/tools/slack-scan-digest.ts +120 -0
  85. package/src/config/bundled-skills/slack-app-setup/SKILL.md +200 -0
  86. package/src/config/bundled-skills/subagent/TOOLS.json +22 -2
  87. package/src/config/bundled-skills/tasks/TOOLS.json +86 -14
  88. package/src/config/bundled-skills/transcribe/TOOLS.json +4 -0
  89. package/src/config/bundled-skills/watcher/TOOLS.json +20 -0
  90. package/src/config/bundled-skills/weather/TOOLS.json +4 -0
  91. package/src/config/bundled-tool-registry.ts +2 -0
  92. package/src/config/channel-permission-profiles.ts +155 -0
  93. package/src/config/env.ts +4 -1
  94. package/src/contacts/contact-store.ts +195 -4
  95. package/src/contacts/types.ts +26 -0
  96. package/src/daemon/assistant-attachments.ts +23 -3
  97. package/src/daemon/guardian-verification-intent.ts +7 -4
  98. package/src/daemon/handlers/apps.ts +1 -2
  99. package/src/daemon/handlers/config-inbox.ts +16 -134
  100. package/src/daemon/handlers/guardian-actions.ts +20 -87
  101. package/src/daemon/handlers/sessions.ts +0 -1
  102. package/src/daemon/ipc-contract/apps.ts +0 -1
  103. package/src/daemon/ipc-contract/inbox.ts +7 -66
  104. package/src/daemon/ipc-contract/sessions.ts +1 -0
  105. package/src/daemon/ipc-contract/surfaces.ts +0 -1
  106. package/src/daemon/ipc-contract-inventory.json +2 -4
  107. package/src/daemon/lifecycle.ts +14 -2
  108. package/src/daemon/session-agent-loop-handlers.ts +9 -0
  109. package/src/daemon/session-agent-loop.ts +1 -0
  110. package/src/daemon/session-attachments.ts +5 -1
  111. package/src/daemon/session-error.ts +18 -0
  112. package/src/daemon/session-lifecycle.ts +4 -5
  113. package/src/daemon/session-media-retry.ts +15 -1
  114. package/src/daemon/session-surfaces.ts +0 -1
  115. package/src/daemon/session-tool-setup.ts +7 -4
  116. package/src/events/domain-events.ts +2 -1
  117. package/src/home-base/prebuilt/seed.ts +0 -1
  118. package/src/influencer/client.ts +7 -24
  119. package/src/media/gemini-image-service.ts +48 -3
  120. package/src/memory/app-store.ts +0 -4
  121. package/src/memory/conversation-attention-store.ts +3 -1
  122. package/src/memory/db-init.ts +4 -0
  123. package/src/memory/migrations/133-assistant-contact-metadata.ts +21 -0
  124. package/src/memory/migrations/index.ts +1 -0
  125. package/src/memory/schema.ts +12 -0
  126. package/src/memory/slack-thread-store.ts +187 -0
  127. package/src/messaging/providers/slack/client.ts +84 -26
  128. package/src/messaging/providers/slack/types.ts +4 -0
  129. package/src/notifications/adapters/slack.ts +90 -0
  130. package/src/notifications/destination-resolver.ts +42 -1
  131. package/src/notifications/emit-signal.ts +17 -1
  132. package/src/oauth/provider-profiles.ts +22 -0
  133. package/src/providers/anthropic/client.ts +3 -0
  134. package/src/providers/openai/client.ts +3 -0
  135. package/src/providers/retry.ts +9 -1
  136. package/src/runtime/actor-trust-resolver.ts +8 -0
  137. package/src/runtime/auth/require-bound-guardian.ts +44 -0
  138. package/src/runtime/auth/route-policy.ts +4 -8
  139. package/src/runtime/channel-approval-types.ts +18 -0
  140. package/src/runtime/channel-approvals.ts +8 -0
  141. package/src/runtime/channel-invite-transport.ts +1 -1
  142. package/src/runtime/channel-reply-delivery.ts +62 -3
  143. package/src/runtime/gateway-client.ts +36 -2
  144. package/src/runtime/gateway-internal-client.ts +86 -0
  145. package/src/runtime/guardian-action-service.ts +127 -0
  146. package/src/runtime/guardian-verification-templates.ts +16 -1
  147. package/src/runtime/http-server.ts +20 -49
  148. package/src/runtime/invite-redemption-service.ts +1 -1
  149. package/src/runtime/{ingress-service.ts → invite-service.ts} +5 -157
  150. package/src/runtime/nl-approval-parser.ts +138 -0
  151. package/src/runtime/routes/approval-routes.ts +1 -40
  152. package/src/runtime/routes/channel-route-shared.ts +35 -1
  153. package/src/runtime/routes/contact-routes.ts +196 -28
  154. package/src/runtime/routes/guardian-action-routes.ts +19 -111
  155. package/src/runtime/routes/guardian-approval-interception.ts +76 -0
  156. package/src/runtime/routes/inbound-message-handler.ts +40 -12
  157. package/src/runtime/routes/inbound-stages/acl-enforcement.ts +222 -0
  158. package/src/runtime/routes/inbound-stages/background-dispatch.ts +108 -0
  159. package/src/runtime/routes/{ingress-routes.ts → invite-routes.ts} +10 -110
  160. package/src/runtime/slack-block-formatting.ts +176 -0
  161. package/src/schedule/scheduler.ts +11 -2
  162. package/src/tools/apps/executors.ts +16 -15
  163. package/src/tools/calls/call-end.ts +1 -1
  164. package/src/tools/computer-use/definitions.ts +16 -0
  165. package/src/tools/credentials/vault.ts +86 -2
  166. package/src/tools/network/script-proxy/session-manager.ts +28 -3
  167. package/src/tools/permission-checker.ts +18 -0
  168. package/src/tools/terminal/shell.ts +15 -5
  169. package/src/tools/tool-approval-handler.ts +48 -4
  170. package/src/tools/types.ts +38 -1
  171. package/src/util/errors.ts +5 -1
  172. package/src/util/retry.ts +21 -0
  173. package/src/watcher/providers/slack.ts +33 -3
  174. /package/src/memory/{ingress-invite-store.ts → invite-store.ts} +0 -0
@@ -12,6 +12,10 @@
12
12
  "platform": {
13
13
  "type": "string",
14
14
  "description": "Platform to test (e.g. \"slack\", \"gmail\"). Auto-detected if only one is connected."
15
+ },
16
+ "reason": {
17
+ "type": "string",
18
+ "description": "Brief non-technical explanation of why this tool is being called"
15
19
  }
16
20
  }
17
21
  },
@@ -34,18 +38,17 @@
34
38
  "type": "array",
35
39
  "items": {
36
40
  "type": "string",
37
- "enum": [
38
- "channel",
39
- "dm",
40
- "group",
41
- "inbox"
42
- ]
41
+ "enum": ["channel", "dm", "group", "inbox"]
43
42
  },
44
43
  "description": "Filter by conversation type"
45
44
  },
46
45
  "limit": {
47
46
  "type": "number",
48
47
  "description": "Maximum number of conversations to return (default 200)"
48
+ },
49
+ "reason": {
50
+ "type": "string",
51
+ "description": "Brief non-technical explanation of why this tool is being called"
49
52
  }
50
53
  }
51
54
  },
@@ -75,11 +78,13 @@
75
78
  "limit": {
76
79
  "type": "number",
77
80
  "description": "Maximum number of messages to return (default 50)"
81
+ },
82
+ "reason": {
83
+ "type": "string",
84
+ "description": "Brief non-technical explanation of why this tool is being called"
78
85
  }
79
86
  },
80
- "required": [
81
- "conversation_id"
82
- ]
87
+ "required": ["conversation_id"]
83
88
  },
84
89
  "executor": "tools/messaging-read.ts",
85
90
  "execution_target": "host"
@@ -103,11 +108,13 @@
103
108
  "max_results": {
104
109
  "type": "number",
105
110
  "description": "Maximum number of results to return (default 20)"
111
+ },
112
+ "reason": {
113
+ "type": "string",
114
+ "description": "Brief non-technical explanation of why this tool is being called"
106
115
  }
107
116
  },
108
- "required": [
109
- "query"
110
- ]
117
+ "required": ["query"]
111
118
  },
112
119
  "executor": "tools/messaging-search.ts",
113
120
  "execution_target": "host"
@@ -143,13 +150,13 @@
143
150
  "confidence": {
144
151
  "type": "number",
145
152
  "description": "Confidence score (0-1) for this action"
153
+ },
154
+ "reason": {
155
+ "type": "string",
156
+ "description": "Brief non-technical explanation of why this tool is being called"
146
157
  }
147
158
  },
148
- "required": [
149
- "conversation_id",
150
- "text",
151
- "confidence"
152
- ]
159
+ "required": ["conversation_id", "text", "confidence"]
153
160
  },
154
161
  "executor": "tools/messaging-send.ts",
155
162
  "execution_target": "host"
@@ -181,14 +188,13 @@
181
188
  "confidence": {
182
189
  "type": "number",
183
190
  "description": "Confidence score (0-1) for this action"
191
+ },
192
+ "reason": {
193
+ "type": "string",
194
+ "description": "Brief non-technical explanation of why this tool is being called"
184
195
  }
185
196
  },
186
- "required": [
187
- "conversation_id",
188
- "thread_id",
189
- "text",
190
- "confidence"
191
- ]
197
+ "required": ["conversation_id", "thread_id", "text", "confidence"]
192
198
  },
193
199
  "executor": "tools/messaging-reply.ts",
194
200
  "execution_target": "host"
@@ -212,11 +218,13 @@
212
218
  "message_id": {
213
219
  "type": "string",
214
220
  "description": "Specific message ID to mark as read (optional)"
221
+ },
222
+ "reason": {
223
+ "type": "string",
224
+ "description": "Brief non-technical explanation of why this tool is being called"
215
225
  }
216
226
  },
217
- "required": [
218
- "conversation_id"
219
- ]
227
+ "required": ["conversation_id"]
220
228
  },
221
229
  "executor": "tools/messaging-mark-read.ts",
222
230
  "execution_target": "host"
@@ -232,6 +240,10 @@
232
240
  "platform": {
233
241
  "type": "string",
234
242
  "description": "Platform (e.g. \"slack\", \"gmail\"). Auto-detected if only one is connected."
243
+ },
244
+ "reason": {
245
+ "type": "string",
246
+ "description": "Brief non-technical explanation of why this tool is being called"
235
247
  }
236
248
  }
237
249
  },
@@ -257,6 +269,10 @@
257
269
  "query_filter": {
258
270
  "type": "string",
259
271
  "description": "Optional search filter (e.g. 'to:alice@example.com' for Gmail, 'from:@me' for Slack)"
272
+ },
273
+ "reason": {
274
+ "type": "string",
275
+ "description": "Brief non-technical explanation of why this tool is being called"
260
276
  }
261
277
  }
262
278
  },
@@ -273,11 +289,7 @@
273
289
  "properties": {
274
290
  "action": {
275
291
  "type": "string",
276
- "enum": [
277
- "create",
278
- "list",
279
- "delete"
280
- ],
292
+ "enum": ["create", "list", "delete"],
281
293
  "description": "Draft operation"
282
294
  },
283
295
  "platform": {
@@ -303,11 +315,13 @@
303
315
  "draft_id": {
304
316
  "type": "string",
305
317
  "description": "Draft ID (for delete)"
318
+ },
319
+ "reason": {
320
+ "type": "string",
321
+ "description": "Brief non-technical explanation of why this tool is being called"
306
322
  }
307
323
  },
308
- "required": [
309
- "action"
310
- ]
324
+ "required": ["action"]
311
325
  },
312
326
  "executor": "tools/messaging-draft.ts",
313
327
  "execution_target": "host"
@@ -327,12 +341,13 @@
327
341
  "confidence": {
328
342
  "type": "number",
329
343
  "description": "Confidence score (0-1) for this action"
344
+ },
345
+ "reason": {
346
+ "type": "string",
347
+ "description": "Brief non-technical explanation of why this tool is being called"
330
348
  }
331
349
  },
332
- "required": [
333
- "message_id",
334
- "confidence"
335
- ]
350
+ "required": ["message_id", "confidence"]
336
351
  },
337
352
  "executor": "tools/gmail-archive.ts",
338
353
  "execution_target": "host"
@@ -361,16 +376,18 @@
361
376
  "items": {
362
377
  "type": "string"
363
378
  },
364
- "description": "Gmail message IDs to archive (fallback prefer scan_id + sender_ids)"
379
+ "description": "Gmail message IDs to archive (fallback \u2014 prefer scan_id + sender_ids)"
365
380
  },
366
381
  "confidence": {
367
382
  "type": "number",
368
383
  "description": "Confidence score (0-1) for this action"
384
+ },
385
+ "reason": {
386
+ "type": "string",
387
+ "description": "Brief non-technical explanation of why this tool is being called"
369
388
  }
370
389
  },
371
- "required": [
372
- "confidence"
373
- ]
390
+ "required": ["confidence"]
374
391
  },
375
392
  "executor": "tools/gmail-batch-archive.ts",
376
393
  "execution_target": "host"
@@ -390,12 +407,13 @@
390
407
  "confidence": {
391
408
  "type": "number",
392
409
  "description": "Confidence score (0-1) for this action"
410
+ },
411
+ "reason": {
412
+ "type": "string",
413
+ "description": "Brief non-technical explanation of why this tool is being called"
393
414
  }
394
415
  },
395
- "required": [
396
- "query",
397
- "confidence"
398
- ]
416
+ "required": ["query", "confidence"]
399
417
  },
400
418
  "executor": "tools/gmail-archive-by-query.ts",
401
419
  "execution_target": "host"
@@ -429,12 +447,13 @@
429
447
  "confidence": {
430
448
  "type": "number",
431
449
  "description": "Confidence score (0-1) for this action"
450
+ },
451
+ "reason": {
452
+ "type": "string",
453
+ "description": "Brief non-technical explanation of why this tool is being called"
432
454
  }
433
455
  },
434
- "required": [
435
- "message_id",
436
- "confidence"
437
- ]
456
+ "required": ["message_id", "confidence"]
438
457
  },
439
458
  "executor": "tools/gmail-label.ts",
440
459
  "execution_target": "host"
@@ -471,12 +490,13 @@
471
490
  "confidence": {
472
491
  "type": "number",
473
492
  "description": "Confidence score (0-1) for this action"
493
+ },
494
+ "reason": {
495
+ "type": "string",
496
+ "description": "Brief non-technical explanation of why this tool is being called"
474
497
  }
475
498
  },
476
- "required": [
477
- "message_ids",
478
- "confidence"
479
- ]
499
+ "required": ["message_ids", "confidence"]
480
500
  },
481
501
  "executor": "tools/gmail-batch-label.ts",
482
502
  "execution_target": "host"
@@ -496,12 +516,13 @@
496
516
  "confidence": {
497
517
  "type": "number",
498
518
  "description": "Confidence score (0-1) for this action"
519
+ },
520
+ "reason": {
521
+ "type": "string",
522
+ "description": "Brief non-technical explanation of why this tool is being called"
499
523
  }
500
524
  },
501
- "required": [
502
- "message_id",
503
- "confidence"
504
- ]
525
+ "required": ["message_id", "confidence"]
505
526
  },
506
527
  "executor": "tools/gmail-trash.ts",
507
528
  "execution_target": "host"
@@ -521,12 +542,13 @@
521
542
  "confidence": {
522
543
  "type": "number",
523
544
  "description": "Confidence score (0-1) for this action"
545
+ },
546
+ "reason": {
547
+ "type": "string",
548
+ "description": "Brief non-technical explanation of why this tool is being called"
524
549
  }
525
550
  },
526
- "required": [
527
- "message_id",
528
- "confidence"
529
- ]
551
+ "required": ["message_id", "confidence"]
530
552
  },
531
553
  "executor": "tools/gmail-unsubscribe.ts",
532
554
  "execution_target": "host"
@@ -562,13 +584,13 @@
562
584
  "bcc": {
563
585
  "type": "string",
564
586
  "description": "BCC recipients (comma-separated email addresses)"
587
+ },
588
+ "reason": {
589
+ "type": "string",
590
+ "description": "Brief non-technical explanation of why this tool is being called"
565
591
  }
566
592
  },
567
- "required": [
568
- "to",
569
- "subject",
570
- "body"
571
- ]
593
+ "required": ["to", "subject", "body"]
572
594
  },
573
595
  "executor": "tools/gmail-draft.ts",
574
596
  "execution_target": "host"
@@ -588,12 +610,13 @@
588
610
  "confidence": {
589
611
  "type": "number",
590
612
  "description": "Confidence score (0-1) for this action"
613
+ },
614
+ "reason": {
615
+ "type": "string",
616
+ "description": "Brief non-technical explanation of why this tool is being called"
591
617
  }
592
618
  },
593
- "required": [
594
- "draft_id",
595
- "confidence"
596
- ]
619
+ "required": ["draft_id", "confidence"]
597
620
  },
598
621
  "executor": "tools/gmail-send-draft.ts",
599
622
  "execution_target": "host"
@@ -609,11 +632,13 @@
609
632
  "message_id": {
610
633
  "type": "string",
611
634
  "description": "Gmail message ID to list attachments for"
635
+ },
636
+ "reason": {
637
+ "type": "string",
638
+ "description": "Brief non-technical explanation of why this tool is being called"
612
639
  }
613
640
  },
614
- "required": [
615
- "message_id"
616
- ]
641
+ "required": ["message_id"]
617
642
  },
618
643
  "executor": "tools/gmail-list-attachments.ts",
619
644
  "execution_target": "host"
@@ -637,13 +662,13 @@
637
662
  "filename": {
638
663
  "type": "string",
639
664
  "description": "Filename to save as"
665
+ },
666
+ "reason": {
667
+ "type": "string",
668
+ "description": "Brief non-technical explanation of why this tool is being called"
640
669
  }
641
670
  },
642
- "required": [
643
- "message_id",
644
- "attachment_id",
645
- "filename"
646
- ]
671
+ "required": ["message_id", "attachment_id", "filename"]
647
672
  },
648
673
  "executor": "tools/gmail-download-attachment.ts",
649
674
  "execution_target": "host"
@@ -686,15 +711,13 @@
686
711
  "confidence": {
687
712
  "type": "number",
688
713
  "description": "Confidence score (0-1) for this action"
714
+ },
715
+ "reason": {
716
+ "type": "string",
717
+ "description": "Brief non-technical explanation of why this tool is being called"
689
718
  }
690
719
  },
691
- "required": [
692
- "to",
693
- "subject",
694
- "body",
695
- "attachment_paths",
696
- "confidence"
697
- ]
720
+ "required": ["to", "subject", "body", "attachment_paths", "confidence"]
698
721
  },
699
722
  "executor": "tools/gmail-send-with-attachments.ts",
700
723
  "execution_target": "host"
@@ -722,13 +745,13 @@
722
745
  "confidence": {
723
746
  "type": "number",
724
747
  "description": "Confidence score (0-1) for this action"
748
+ },
749
+ "reason": {
750
+ "type": "string",
751
+ "description": "Brief non-technical explanation of why this tool is being called"
725
752
  }
726
753
  },
727
- "required": [
728
- "message_id",
729
- "to",
730
- "confidence"
731
- ]
754
+ "required": ["message_id", "to", "confidence"]
732
755
  },
733
756
  "executor": "tools/gmail-forward.ts",
734
757
  "execution_target": "host"
@@ -744,11 +767,13 @@
744
767
  "thread_id": {
745
768
  "type": "string",
746
769
  "description": "Gmail thread ID to summarize"
770
+ },
771
+ "reason": {
772
+ "type": "string",
773
+ "description": "Brief non-technical explanation of why this tool is being called"
747
774
  }
748
775
  },
749
- "required": [
750
- "thread_id"
751
- ]
776
+ "required": ["thread_id"]
752
777
  },
753
778
  "executor": "tools/gmail-summarize-thread.ts",
754
779
  "execution_target": "host"
@@ -763,11 +788,7 @@
763
788
  "properties": {
764
789
  "action": {
765
790
  "type": "string",
766
- "enum": [
767
- "track",
768
- "list",
769
- "untrack"
770
- ],
791
+ "enum": ["track", "list", "untrack"],
771
792
  "description": "Follow-up action"
772
793
  },
773
794
  "message_id": {
@@ -777,12 +798,13 @@
777
798
  "confidence": {
778
799
  "type": "number",
779
800
  "description": "Confidence score (0-1) for this action"
801
+ },
802
+ "reason": {
803
+ "type": "string",
804
+ "description": "Brief non-technical explanation of why this tool is being called"
780
805
  }
781
806
  },
782
- "required": [
783
- "action",
784
- "confidence"
785
- ]
807
+ "required": ["action", "confidence"]
786
808
  },
787
809
  "executor": "tools/gmail-follow-up.ts",
788
810
  "execution_target": "host"
@@ -810,11 +832,13 @@
810
832
  "confidence": {
811
833
  "type": "number",
812
834
  "description": "Confidence score (0-1) for this action"
835
+ },
836
+ "reason": {
837
+ "type": "string",
838
+ "description": "Brief non-technical explanation of why this tool is being called"
813
839
  }
814
840
  },
815
- "required": [
816
- "confidence"
817
- ]
841
+ "required": ["confidence"]
818
842
  },
819
843
  "executor": "tools/gmail-triage.ts",
820
844
  "execution_target": "host"
@@ -829,11 +853,7 @@
829
853
  "properties": {
830
854
  "action": {
831
855
  "type": "string",
832
- "enum": [
833
- "list",
834
- "create",
835
- "delete"
836
- ],
856
+ "enum": ["list", "create", "delete"],
837
857
  "description": "Filter action"
838
858
  },
839
859
  "from": {
@@ -881,12 +901,13 @@
881
901
  "confidence": {
882
902
  "type": "number",
883
903
  "description": "Confidence score (0-1) for this action"
904
+ },
905
+ "reason": {
906
+ "type": "string",
907
+ "description": "Brief non-technical explanation of why this tool is being called"
884
908
  }
885
909
  },
886
- "required": [
887
- "action",
888
- "confidence"
889
- ]
910
+ "required": ["action", "confidence"]
890
911
  },
891
912
  "executor": "tools/gmail-filters.ts",
892
913
  "execution_target": "host"
@@ -901,11 +922,7 @@
901
922
  "properties": {
902
923
  "action": {
903
924
  "type": "string",
904
- "enum": [
905
- "get",
906
- "enable",
907
- "disable"
908
- ],
925
+ "enum": ["get", "enable", "disable"],
909
926
  "description": "Vacation action"
910
927
  },
911
928
  "message": {
@@ -935,12 +952,13 @@
935
952
  "confidence": {
936
953
  "type": "number",
937
954
  "description": "Confidence score (0-1) for this action"
955
+ },
956
+ "reason": {
957
+ "type": "string",
958
+ "description": "Brief non-technical explanation of why this tool is being called"
938
959
  }
939
960
  },
940
- "required": [
941
- "action",
942
- "confidence"
943
- ]
961
+ "required": ["action", "confidence"]
944
962
  },
945
963
  "executor": "tools/gmail-vacation.ts",
946
964
  "execution_target": "host"
@@ -967,7 +985,11 @@
967
985
  },
968
986
  "page_token": {
969
987
  "type": "string",
970
- "description": "Resume token from a previous scan (rarely needed scans now cover up to 10,000 messages in a single call)"
988
+ "description": "Resume token from a previous scan (rarely needed \u2014 scans now cover up to 10,000 messages in a single call)"
989
+ },
990
+ "reason": {
991
+ "type": "string",
992
+ "description": "Brief non-technical explanation of why this tool is being called"
971
993
  }
972
994
  }
973
995
  },
@@ -1000,7 +1022,11 @@
1000
1022
  },
1001
1023
  "page_token": {
1002
1024
  "type": "string",
1003
- "description": "Resume token from a previous scan (rarely needed scans now cover up to 5,000 messages in a single call)"
1025
+ "description": "Resume token from a previous scan (rarely needed \u2014 scans now cover up to 5,000 messages in a single call)"
1026
+ },
1027
+ "reason": {
1028
+ "type": "string",
1029
+ "description": "Brief non-technical explanation of why this tool is being called"
1004
1030
  }
1005
1031
  }
1006
1032
  },
@@ -1026,12 +1052,13 @@
1026
1052
  "confidence": {
1027
1053
  "type": "number",
1028
1054
  "description": "Confidence score (0-1) for this action"
1055
+ },
1056
+ "reason": {
1057
+ "type": "string",
1058
+ "description": "Brief non-technical explanation of why this tool is being called"
1029
1059
  }
1030
1060
  },
1031
- "required": [
1032
- "query",
1033
- "confidence"
1034
- ]
1061
+ "required": ["query", "confidence"]
1035
1062
  },
1036
1063
  "executor": "tools/messaging-archive-by-sender.ts",
1037
1064
  "execution_target": "host"
@@ -1062,7 +1089,11 @@
1062
1089
  },
1063
1090
  "page_token": {
1064
1091
  "type": "string",
1065
- "description": "Resume token from a previous scan (rarely needed scans now cover up to 5,000 messages in a single call)"
1092
+ "description": "Resume token from a previous scan (rarely needed \u2014 scans now cover up to 5,000 messages in a single call)"
1093
+ },
1094
+ "reason": {
1095
+ "type": "string",
1096
+ "description": "Brief non-technical explanation of why this tool is being called"
1066
1097
  }
1067
1098
  }
1068
1099
  },
@@ -1079,10 +1110,7 @@
1079
1110
  "properties": {
1080
1111
  "action": {
1081
1112
  "type": "string",
1082
- "enum": [
1083
- "list",
1084
- "search"
1085
- ],
1113
+ "enum": ["list", "search"],
1086
1114
  "description": "Contacts action"
1087
1115
  },
1088
1116
  "query": {
@@ -1096,11 +1124,13 @@
1096
1124
  "page_token": {
1097
1125
  "type": "string",
1098
1126
  "description": "Pagination token (for list)"
1127
+ },
1128
+ "reason": {
1129
+ "type": "string",
1130
+ "description": "Brief non-technical explanation of why this tool is being called"
1099
1131
  }
1100
1132
  },
1101
- "required": [
1102
- "action"
1103
- ]
1133
+ "required": ["action"]
1104
1134
  },
1105
1135
  "executor": "tools/google-contacts.ts",
1106
1136
  "execution_target": "host"
@@ -1147,9 +1177,7 @@
1147
1177
  "description": "Whether to require user approval before sending (default false)"
1148
1178
  }
1149
1179
  },
1150
- "required": [
1151
- "body_prompt"
1152
- ]
1180
+ "required": ["body_prompt"]
1153
1181
  },
1154
1182
  "description": "Ordered list of sequence steps"
1155
1183
  },
@@ -1160,13 +1188,13 @@
1160
1188
  "exit_on_reply": {
1161
1189
  "type": "boolean",
1162
1190
  "description": "Whether to stop the sequence when the contact replies (default true)"
1191
+ },
1192
+ "reason": {
1193
+ "type": "string",
1194
+ "description": "Brief non-technical explanation of why this tool is being called"
1163
1195
  }
1164
1196
  },
1165
- "required": [
1166
- "name",
1167
- "channel",
1168
- "steps"
1169
- ]
1197
+ "required": ["name", "channel", "steps"]
1170
1198
  },
1171
1199
  "executor": "tools/sequence-create.ts",
1172
1200
  "execution_target": "host"
@@ -1181,12 +1209,12 @@
1181
1209
  "properties": {
1182
1210
  "status": {
1183
1211
  "type": "string",
1184
- "enum": [
1185
- "active",
1186
- "paused",
1187
- "archived"
1188
- ],
1212
+ "enum": ["active", "paused", "archived"],
1189
1213
  "description": "Filter by sequence status"
1214
+ },
1215
+ "reason": {
1216
+ "type": "string",
1217
+ "description": "Brief non-technical explanation of why this tool is being called"
1190
1218
  }
1191
1219
  }
1192
1220
  },
@@ -1204,11 +1232,13 @@
1204
1232
  "id": {
1205
1233
  "type": "string",
1206
1234
  "description": "Sequence ID"
1235
+ },
1236
+ "reason": {
1237
+ "type": "string",
1238
+ "description": "Brief non-technical explanation of why this tool is being called"
1207
1239
  }
1208
1240
  },
1209
- "required": [
1210
- "id"
1211
- ]
1241
+ "required": ["id"]
1212
1242
  },
1213
1243
  "executor": "tools/sequence-get.ts",
1214
1244
  "execution_target": "host"
@@ -1235,11 +1265,7 @@
1235
1265
  },
1236
1266
  "status": {
1237
1267
  "type": "string",
1238
- "enum": [
1239
- "active",
1240
- "paused",
1241
- "archived"
1242
- ],
1268
+ "enum": ["active", "paused", "archived"],
1243
1269
  "description": "New status"
1244
1270
  },
1245
1271
  "exit_on_reply": {
@@ -1272,16 +1298,16 @@
1272
1298
  "description": "Whether to require user approval before sending"
1273
1299
  }
1274
1300
  },
1275
- "required": [
1276
- "body_prompt"
1277
- ]
1301
+ "required": ["body_prompt"]
1278
1302
  },
1279
1303
  "description": "Replacement steps (replaces all existing steps)"
1304
+ },
1305
+ "reason": {
1306
+ "type": "string",
1307
+ "description": "Brief non-technical explanation of why this tool is being called"
1280
1308
  }
1281
1309
  },
1282
- "required": [
1283
- "id"
1284
- ]
1310
+ "required": ["id"]
1285
1311
  },
1286
1312
  "executor": "tools/sequence-update.ts",
1287
1313
  "execution_target": "host"
@@ -1297,11 +1323,13 @@
1297
1323
  "id": {
1298
1324
  "type": "string",
1299
1325
  "description": "Sequence ID to delete"
1326
+ },
1327
+ "reason": {
1328
+ "type": "string",
1329
+ "description": "Brief non-technical explanation of why this tool is being called"
1300
1330
  }
1301
1331
  },
1302
- "required": [
1303
- "id"
1304
- ]
1332
+ "required": ["id"]
1305
1333
  },
1306
1334
  "executor": "tools/sequence-delete.ts",
1307
1335
  "execution_target": "host"
@@ -1335,12 +1363,13 @@
1335
1363
  "context": {
1336
1364
  "type": "object",
1337
1365
  "description": "Optional context object with personalization variables for the enrolled contacts"
1366
+ },
1367
+ "reason": {
1368
+ "type": "string",
1369
+ "description": "Brief non-technical explanation of why this tool is being called"
1338
1370
  }
1339
1371
  },
1340
- "required": [
1341
- "sequence_id",
1342
- "emails"
1343
- ]
1372
+ "required": ["sequence_id", "emails"]
1344
1373
  },
1345
1374
  "executor": "tools/sequence-enroll.ts",
1346
1375
  "execution_target": "host"
@@ -1368,6 +1397,10 @@
1368
1397
  "failed"
1369
1398
  ],
1370
1399
  "description": "Filter by enrollment status"
1400
+ },
1401
+ "reason": {
1402
+ "type": "string",
1403
+ "description": "Brief non-technical explanation of why this tool is being called"
1371
1404
  }
1372
1405
  }
1373
1406
  },
@@ -1389,6 +1422,10 @@
1389
1422
  "enrollment_id": {
1390
1423
  "type": "string",
1391
1424
  "description": "Specific enrollment ID to cancel (alternative to pausing whole sequence)"
1425
+ },
1426
+ "reason": {
1427
+ "type": "string",
1428
+ "description": "Brief non-technical explanation of why this tool is being called"
1392
1429
  }
1393
1430
  }
1394
1431
  },
@@ -1406,11 +1443,13 @@
1406
1443
  "sequence_id": {
1407
1444
  "type": "string",
1408
1445
  "description": "Sequence ID to resume"
1446
+ },
1447
+ "reason": {
1448
+ "type": "string",
1449
+ "description": "Brief non-technical explanation of why this tool is being called"
1409
1450
  }
1410
1451
  },
1411
- "required": [
1412
- "sequence_id"
1413
- ]
1452
+ "required": ["sequence_id"]
1414
1453
  },
1415
1454
  "executor": "tools/sequence-resume.ts",
1416
1455
  "execution_target": "host"
@@ -1426,11 +1465,13 @@
1426
1465
  "enrollment_id": {
1427
1466
  "type": "string",
1428
1467
  "description": "Enrollment ID to cancel"
1468
+ },
1469
+ "reason": {
1470
+ "type": "string",
1471
+ "description": "Brief non-technical explanation of why this tool is being called"
1429
1472
  }
1430
1473
  },
1431
- "required": [
1432
- "enrollment_id"
1433
- ]
1474
+ "required": ["enrollment_id"]
1434
1475
  },
1435
1476
  "executor": "tools/sequence-cancel.ts",
1436
1477
  "execution_target": "host"
@@ -1454,12 +1495,13 @@
1454
1495
  "auto_enroll": {
1455
1496
  "type": "boolean",
1456
1497
  "description": "Set to true to enroll contacts (default false = preview mode)"
1498
+ },
1499
+ "reason": {
1500
+ "type": "string",
1501
+ "description": "Brief non-technical explanation of why this tool is being called"
1457
1502
  }
1458
1503
  },
1459
- "required": [
1460
- "file_path",
1461
- "sequence_id"
1462
- ]
1504
+ "required": ["file_path", "sequence_id"]
1463
1505
  },
1464
1506
  "executor": "tools/sequence-import.ts",
1465
1507
  "execution_target": "host"
@@ -1475,6 +1517,10 @@
1475
1517
  "sequence_id": {
1476
1518
  "type": "string",
1477
1519
  "description": "Optional sequence ID for detailed step funnel view"
1520
+ },
1521
+ "reason": {
1522
+ "type": "string",
1523
+ "description": "Brief non-technical explanation of why this tool is being called"
1478
1524
  }
1479
1525
  }
1480
1526
  },