@ductape/mcp 0.1.18 → 0.1.19

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
@@ -297,9 +297,10 @@ ALL params are passed as a JSON array in positional order matching the SDK signa
297
297
  description?: string, sample?: object, idempotent?: boolean,
298
298
  queueUrls?: [{ env_slug: string, url: string }] // SQS only: per-env queue URL per topic
299
299
  }]
300
+ ← OPTIONAL for most providers: creating a producer automatically creates the topic if it does not exist.
301
+ ← Only required explicitly for SQS (must supply queueUrls per env) or when you want to set sample/idempotent upfront.
302
+ ← For Pub/Sub, Kafka, RabbitMQ, Redis, NATS: skip this — let producer creation handle it.
300
303
  ← A broker can have unlimited topics. Add one per logical event type.
301
- ← For SQS: each topic needs queueUrls mapping env slug → the SQS queue URL for that topic+env.
302
- ← For Pub/Sub and Service Bus: topic name resolves from the tag or broker env config; no queueUrls needed.
303
304
  messageBrokers.topics.update [product_tag, topic_tag, data: { name?: string, description?: string,
304
305
  sample?: object, idempotent?: boolean, queueUrls?: [{ env_slug: string, url: string }] }]
305
306
  messageBrokers.topics.fetch [product_tag, topic_tag]
@@ -2034,8 +2035,17 @@ Import (register an EXISTING cloud resource):
2034
2035
  redis: { host: "...", port: 6379, password?: "..." }
2035
2036
  nats: { servers: ["nats://host:4222"], token?: "...", user?: "...", pass?: "...", tls?: true }
2036
2037
 
2037
- ━━━ STEP 2: ADD TOPIC DEFINITIONS (all broker types — add as many as needed) ━━━
2038
+ ━━━ STEP 2: ADD TOPIC DEFINITIONS ━━━
2038
2039
 
2040
+ For most providers (GCP Pub/Sub, Kafka, RabbitMQ, Redis, NATS, Azure Service Bus):
2041
+ SKIP this step. Topics are auto-created when you create a producer (step 3).
2042
+ You do NOT need to call messageBrokers.topics.create before creating a producer.
2043
+
2044
+ Only call topics.create explicitly when:
2045
+ - Using AWS SQS (must supply queueUrls per env — auto-creation cannot know the queue URL)
2046
+ - You want to pre-set sample data or idempotency config on the topic
2047
+
2048
+ If you do need it (SQS or explicit config):
2039
2049
  ductape_execute("messageBrokers.topics.create", [product_tag, {
2040
2050
  tag: "player-joined",
2041
2051
  name: "Player Joined",
@@ -2050,11 +2060,6 @@ Import (register an EXISTING cloud resource):
2050
2060
  ]
2051
2061
  }])
2052
2062
 
2053
- For GCP Pub/Sub and Azure Service Bus, the SDK resolves the topic name from the topic tag (or
2054
- config.topicName on the env config). No extra per-topic URL mapping is needed beyond the tag.
2055
- For SQS, every topic definition needs queueUrls to point to the specific per-env queue.
2056
- Repeat this call for each logical event type — there is no limit on number of topics.
2057
-
2058
2063
  List topics on a broker:
2059
2064
  ductape_execute("messageBrokers.topics.list", [product_tag, "broker-tag"])
2060
2065
 
@@ -2485,7 +2490,7 @@ async function main() {
2485
2490
  ' GCP Pub/Sub service identifier is "pubsub". AWS SQS is "sqs". Azure Service Bus is "servicebus".\n' +
2486
2491
  ' Message brokers are import-only (no provision-persist). Import flow is the same as storage.\n' +
2487
2492
  ' type field = "messageBrokers" (not "messagebrokers" or "events").\n' +
2488
- ' After importing, create topics via: ductape_execute("messageBrokers.topics.create", [product_tag, data])\n' +
2493
+ ' After importing, create producers — topics are auto-created with the producer (except SQS, which needs explicit topics.create with queueUrls first).\n' +
2489
2494
  ' - Listing workspaces, products, secrets\n' +
2490
2495
  ' - Linking a project folder: "link --product <tag> --env <slug>"\n' +
2491
2496
  ' - Syncing sessions/notifications/events: "apply" or "apply sessions" etc.\n' +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ductape/mcp",
3
- "version": "0.1.18",
3
+ "version": "0.1.19",
4
4
  "description": "MCP server that exposes Ductape SDK operations via the backend proxy",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/src/index.ts CHANGED
@@ -308,9 +308,10 @@ ALL params are passed as a JSON array in positional order matching the SDK signa
308
308
  description?: string, sample?: object, idempotent?: boolean,
309
309
  queueUrls?: [{ env_slug: string, url: string }] // SQS only: per-env queue URL per topic
310
310
  }]
311
+ ← OPTIONAL for most providers: creating a producer automatically creates the topic if it does not exist.
312
+ ← Only required explicitly for SQS (must supply queueUrls per env) or when you want to set sample/idempotent upfront.
313
+ ← For Pub/Sub, Kafka, RabbitMQ, Redis, NATS: skip this — let producer creation handle it.
311
314
  ← A broker can have unlimited topics. Add one per logical event type.
312
- ← For SQS: each topic needs queueUrls mapping env slug → the SQS queue URL for that topic+env.
313
- ← For Pub/Sub and Service Bus: topic name resolves from the tag or broker env config; no queueUrls needed.
314
315
  messageBrokers.topics.update [product_tag, topic_tag, data: { name?: string, description?: string,
315
316
  sample?: object, idempotent?: boolean, queueUrls?: [{ env_slug: string, url: string }] }]
316
317
  messageBrokers.topics.fetch [product_tag, topic_tag]
@@ -2103,8 +2104,17 @@ Import (register an EXISTING cloud resource):
2103
2104
  redis: { host: "...", port: 6379, password?: "..." }
2104
2105
  nats: { servers: ["nats://host:4222"], token?: "...", user?: "...", pass?: "...", tls?: true }
2105
2106
 
2106
- ━━━ STEP 2: ADD TOPIC DEFINITIONS (all broker types — add as many as needed) ━━━
2107
+ ━━━ STEP 2: ADD TOPIC DEFINITIONS ━━━
2107
2108
 
2109
+ For most providers (GCP Pub/Sub, Kafka, RabbitMQ, Redis, NATS, Azure Service Bus):
2110
+ SKIP this step. Topics are auto-created when you create a producer (step 3).
2111
+ You do NOT need to call messageBrokers.topics.create before creating a producer.
2112
+
2113
+ Only call topics.create explicitly when:
2114
+ - Using AWS SQS (must supply queueUrls per env — auto-creation cannot know the queue URL)
2115
+ - You want to pre-set sample data or idempotency config on the topic
2116
+
2117
+ If you do need it (SQS or explicit config):
2108
2118
  ductape_execute("messageBrokers.topics.create", [product_tag, {
2109
2119
  tag: "player-joined",
2110
2120
  name: "Player Joined",
@@ -2119,11 +2129,6 @@ Import (register an EXISTING cloud resource):
2119
2129
  ]
2120
2130
  }])
2121
2131
 
2122
- For GCP Pub/Sub and Azure Service Bus, the SDK resolves the topic name from the topic tag (or
2123
- config.topicName on the env config). No extra per-topic URL mapping is needed beyond the tag.
2124
- For SQS, every topic definition needs queueUrls to point to the specific per-env queue.
2125
- Repeat this call for each logical event type — there is no limit on number of topics.
2126
-
2127
2132
  List topics on a broker:
2128
2133
  ductape_execute("messageBrokers.topics.list", [product_tag, "broker-tag"])
2129
2134
 
@@ -2611,7 +2616,7 @@ async function main() {
2611
2616
  ' GCP Pub/Sub service identifier is "pubsub". AWS SQS is "sqs". Azure Service Bus is "servicebus".\n' +
2612
2617
  ' Message brokers are import-only (no provision-persist). Import flow is the same as storage.\n' +
2613
2618
  ' type field = "messageBrokers" (not "messagebrokers" or "events").\n' +
2614
- ' After importing, create topics via: ductape_execute("messageBrokers.topics.create", [product_tag, data])\n' +
2619
+ ' After importing, create producers — topics are auto-created with the producer (except SQS, which needs explicit topics.create with queueUrls first).\n' +
2615
2620
  ' - Listing workspaces, products, secrets\n' +
2616
2621
  ' - Linking a project folder: "link --product <tag> --env <slug>"\n' +
2617
2622
  ' - Syncing sessions/notifications/events: "apply" or "apply sessions" etc.\n' +