@ductape/mcp 0.1.56 → 0.1.57

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.
package/dist/index.js CHANGED
@@ -499,6 +499,8 @@ ALL params are passed as a JSON array in positional order matching the SDK signa
499
499
  notifications.push.send [{ product, env, notification, input: { ... }, session?, cache? }] ← CALL ductape_generate_payload FIRST (operation_family="notification", method="push.send")
500
500
  notifications.sms.send [{ product, env, notification, input: { ... }, session?, cache? }] ← CALL ductape_generate_payload FIRST (operation_family="notification", method="sms.send")
501
501
  notifications.callback.send [{ product, env, notification, input: { ... }, session?, cache? }] ← CALL ductape_generate_payload FIRST (operation_family="notification", method="callback.send")
502
+ notifications.slack.send [{ product, env, notification, input: { text?, blocks?, channel? }, session?, cache? }]
503
+ notifications.discord.send [{ product, env, notification, input: { content?, embeds? }, session?, cache? }]
502
504
  notifications.dispatch [{ product, env, notification, event, input, retries?, session?, cache?, schedule?: { cron?, every?, start_at? } }] ← CALL ductape_generate_payload FIRST (operation_family="notification", method="dispatch") — requires redisUrl in ductape initialization
503
505
  notifications.getMessages [{ product_tag?, env?, notification_tag?, status?, type?, start_date?, end_date?, page?, limit? }]
504
506
 
@@ -998,7 +1000,7 @@ const ALLOWED_SNIPPET_METHODS = {
998
1000
  graph: ['dispatch', 'find', 'insert', 'update', 'delete', 'query', 'execute'],
999
1001
  vector: ['query', 'find', 'findSimilar', 'upsert', 'insert', 'delete', 'dispatch'],
1000
1002
  storage: ['dispatch', 'upload', 'download', 'remove', 'listFiles', 'getSignedUrl', 'stats'],
1001
- notification: ['dispatch', 'send', 'email.send', 'push.send', 'sms.send', 'callback.send'],
1003
+ notification: ['dispatch', 'send', 'email.send', 'push.send', 'sms.send', 'callback.send', 'slack.send', 'discord.send'],
1002
1004
  messaging: ['dispatch', 'send', 'publish', 'produce', 'consume'],
1003
1005
  broker: ['dispatch', 'send', 'publish', 'produce', 'consume'],
1004
1006
  quota: ['run', 'dispatch', 'check', 'consume'],
@@ -2168,7 +2170,19 @@ DUCTAPE NOTIFICATIONS
2168
2170
 
2169
2171
  Notifications send messages across multiple channels: email, SMS, push, or HTTP callback.
2170
2172
 
2171
- Create a notification through declarative apply or Workbench (administrative), using:
2173
+ ADMINISTRATION CLI (never ductape_execute)
2174
+ ductape_cli("resources notifications create -f notification.json")
2175
+ ductape_cli("resources notifications get --tag <notification-tag> --json")
2176
+ ductape_cli("resources notifications list --json")
2177
+ ductape_cli("resources notifications update --tag <notification-tag> -f patch.json")
2178
+ ductape_cli("resources notifications delete --tag <notification-tag>")
2179
+ ductape_cli("notifications messages create -f message.json")
2180
+ ductape_cli("notifications messages list --notification <notification-tag> --json")
2181
+ ductape_cli("notifications messages get --tag <notification:message> --json")
2182
+ ductape_cli("notifications messages update --tag <notification:message> -f patch.json")
2183
+ Declarative alternative: ductape/notifications.json then ductape_cli("apply notifications").
2184
+
2185
+ Notification definition:
2172
2186
  {
2173
2187
  tag: "welcome-email",
2174
2188
  name: "Welcome Email",
@@ -2189,6 +2203,8 @@ Send at runtime (one channel at a time):
2189
2203
  notifications.push.send [{ product, env, notification, input: { device_tokens, title?, body?, data? } }]
2190
2204
  notifications.sms.send [{ product, env, notification, input: { recipients, body? } }]
2191
2205
  notifications.callback.send [{ product, env, notification, input: { query?, headers?, params?, body? } }]
2206
+ notifications.slack.send [{ product, env, notification, input: { text?, blocks?, channel? } }]
2207
+ notifications.discord.send [{ product, env, notification, input: { content?, embeds? } }]
2192
2208
 
2193
2209
  Multi-channel send (all channels in parallel):
2194
2210
  notifications.send [{ product, env, event: "notif_tag:message_tag", input: { ... } }]
@@ -2210,7 +2226,24 @@ Supported providers:
2210
2226
  Push: firebase | expo
2211
2227
  Callback: any HTTP endpoint
2212
2228
 
2213
- Channel configuration (envs per notification) is done in the Workbench UI, not via CLI.
2229
+ Each notification env may configure push_notifications, emails, sms, callbacks, slack, and discord.
2230
+ Email providers: smtp, sendgrid, mailgun, postmark, brevo.
2231
+ SMS providers: twilio, nexmo/vonage, plivo.
2232
+
2233
+ FIREBASE THROUGH A GCP CLOUD CONNECTION
2234
+ Complete and validate a GCP cloud connection with a service account authorized for Firebase
2235
+ Cloud Messaging. Then configure the notification env without copying service-account JSON:
2236
+ {
2237
+ "slug": "snd",
2238
+ "push_notifications": {
2239
+ "type": "firebase",
2240
+ "cloud": "gcp-connection-tag",
2241
+ "authMode": "cloud_connection",
2242
+ "databaseUrl": "https://<project>.firebaseio.com"
2243
+ }
2244
+ }
2245
+ The SDK requests current GCP credentials from the cloud connection at send time. Never put the
2246
+ service-account private key in the notification file. Expo does not use a GCP cloud connection.
2214
2247
  Notification tag and message tag are ALWAYS passed together as "notification_tag:message_tag".
2215
2248
  `.trim(),
2216
2249
  resilience: `
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ductape/mcp",
3
- "version": "0.1.56",
3
+ "version": "0.1.57",
4
4
  "description": "MCP server that exposes Ductape SDK operations via the backend proxy",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -50,6 +50,9 @@ const safetyChecks = [
50
50
  ['CLI 401 triggers login-required state', /authentication expired or was revoked \(HTTP 401\)[\s\S]*ductape login/],
51
51
  ['CLI distinguishes endpoint 401 from expired login', /session and active workspace are authenticated[\s\S]*Do not ask the user to log in again/],
52
52
  ['CLI auth guidance does not request secrets', /Never ask the user to paste their password/],
53
+ ['notification CLI administration documented', /resources notifications create[\s\S]*notifications messages create/],
54
+ ['Firebase GCP cloud connection documented', /FIREBASE THROUGH A GCP CLOUD CONNECTION[\s\S]*authMode.*cloud_connection/],
55
+ ['Slack and Discord sends documented', /notifications\.slack\.send[\s\S]*notifications\.discord\.send/],
53
56
  ];
54
57
 
55
58
  for (const [name, pattern] of safetyChecks) {
package/src/index.ts CHANGED
@@ -510,6 +510,8 @@ ALL params are passed as a JSON array in positional order matching the SDK signa
510
510
  notifications.push.send [{ product, env, notification, input: { ... }, session?, cache? }] ← CALL ductape_generate_payload FIRST (operation_family="notification", method="push.send")
511
511
  notifications.sms.send [{ product, env, notification, input: { ... }, session?, cache? }] ← CALL ductape_generate_payload FIRST (operation_family="notification", method="sms.send")
512
512
  notifications.callback.send [{ product, env, notification, input: { ... }, session?, cache? }] ← CALL ductape_generate_payload FIRST (operation_family="notification", method="callback.send")
513
+ notifications.slack.send [{ product, env, notification, input: { text?, blocks?, channel? }, session?, cache? }]
514
+ notifications.discord.send [{ product, env, notification, input: { content?, embeds? }, session?, cache? }]
513
515
  notifications.dispatch [{ product, env, notification, event, input, retries?, session?, cache?, schedule?: { cron?, every?, start_at? } }] ← CALL ductape_generate_payload FIRST (operation_family="notification", method="dispatch") — requires redisUrl in ductape initialization
514
516
  notifications.getMessages [{ product_tag?, env?, notification_tag?, status?, type?, start_date?, end_date?, page?, limit? }]
515
517
 
@@ -1037,7 +1039,7 @@ const ALLOWED_SNIPPET_METHODS: Record<string, string[]> = {
1037
1039
  graph: ['dispatch', 'find', 'insert', 'update', 'delete', 'query', 'execute'],
1038
1040
  vector: ['query', 'find', 'findSimilar', 'upsert', 'insert', 'delete', 'dispatch'],
1039
1041
  storage: ['dispatch', 'upload', 'download', 'remove', 'listFiles', 'getSignedUrl', 'stats'],
1040
- notification: ['dispatch', 'send', 'email.send', 'push.send', 'sms.send', 'callback.send'],
1042
+ notification: ['dispatch', 'send', 'email.send', 'push.send', 'sms.send', 'callback.send', 'slack.send', 'discord.send'],
1041
1043
  messaging: ['dispatch', 'send', 'publish', 'produce', 'consume'],
1042
1044
  broker: ['dispatch', 'send', 'publish', 'produce', 'consume'],
1043
1045
  quota: ['run', 'dispatch', 'check', 'consume'],
@@ -2251,7 +2253,19 @@ DUCTAPE NOTIFICATIONS
2251
2253
 
2252
2254
  Notifications send messages across multiple channels: email, SMS, push, or HTTP callback.
2253
2255
 
2254
- Create a notification through declarative apply or Workbench (administrative), using:
2256
+ ADMINISTRATION CLI (never ductape_execute)
2257
+ ductape_cli("resources notifications create -f notification.json")
2258
+ ductape_cli("resources notifications get --tag <notification-tag> --json")
2259
+ ductape_cli("resources notifications list --json")
2260
+ ductape_cli("resources notifications update --tag <notification-tag> -f patch.json")
2261
+ ductape_cli("resources notifications delete --tag <notification-tag>")
2262
+ ductape_cli("notifications messages create -f message.json")
2263
+ ductape_cli("notifications messages list --notification <notification-tag> --json")
2264
+ ductape_cli("notifications messages get --tag <notification:message> --json")
2265
+ ductape_cli("notifications messages update --tag <notification:message> -f patch.json")
2266
+ Declarative alternative: ductape/notifications.json then ductape_cli("apply notifications").
2267
+
2268
+ Notification definition:
2255
2269
  {
2256
2270
  tag: "welcome-email",
2257
2271
  name: "Welcome Email",
@@ -2272,6 +2286,8 @@ Send at runtime (one channel at a time):
2272
2286
  notifications.push.send [{ product, env, notification, input: { device_tokens, title?, body?, data? } }]
2273
2287
  notifications.sms.send [{ product, env, notification, input: { recipients, body? } }]
2274
2288
  notifications.callback.send [{ product, env, notification, input: { query?, headers?, params?, body? } }]
2289
+ notifications.slack.send [{ product, env, notification, input: { text?, blocks?, channel? } }]
2290
+ notifications.discord.send [{ product, env, notification, input: { content?, embeds? } }]
2275
2291
 
2276
2292
  Multi-channel send (all channels in parallel):
2277
2293
  notifications.send [{ product, env, event: "notif_tag:message_tag", input: { ... } }]
@@ -2293,7 +2309,24 @@ Supported providers:
2293
2309
  Push: firebase | expo
2294
2310
  Callback: any HTTP endpoint
2295
2311
 
2296
- Channel configuration (envs per notification) is done in the Workbench UI, not via CLI.
2312
+ Each notification env may configure push_notifications, emails, sms, callbacks, slack, and discord.
2313
+ Email providers: smtp, sendgrid, mailgun, postmark, brevo.
2314
+ SMS providers: twilio, nexmo/vonage, plivo.
2315
+
2316
+ FIREBASE THROUGH A GCP CLOUD CONNECTION
2317
+ Complete and validate a GCP cloud connection with a service account authorized for Firebase
2318
+ Cloud Messaging. Then configure the notification env without copying service-account JSON:
2319
+ {
2320
+ "slug": "snd",
2321
+ "push_notifications": {
2322
+ "type": "firebase",
2323
+ "cloud": "gcp-connection-tag",
2324
+ "authMode": "cloud_connection",
2325
+ "databaseUrl": "https://<project>.firebaseio.com"
2326
+ }
2327
+ }
2328
+ The SDK requests current GCP credentials from the cloud connection at send time. Never put the
2329
+ service-account private key in the notification file. Expo does not use a GCP cloud connection.
2297
2330
  Notification tag and message tag are ALWAYS passed together as "notification_tag:message_tag".
2298
2331
  `.trim(),
2299
2332