@ductape/mcp 0.1.10 → 0.1.12

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
@@ -65,6 +65,26 @@ There are THREE categories of operations. Use the right tool for each:
65
65
  cloud connections, and secrets. Environments, app actions, auths, features, quotas,
66
66
  fallbacks, jobs, and healthchecks are configured in the Workbench UI.
67
67
 
68
+ ⚠ MULTI-ENV REQUIREMENT — applies to ALL product assets (storage, database, cache,
69
+ messageBroker, graph, vector, and any other resource with an envs array):
70
+ The envs array MUST contain one entry for EVERY environment defined on the product.
71
+ import-persist and provision-persist enforce this with a preflight check: if the
72
+ generated draft does not cover all product environments the operation fails immediately
73
+ with error code MISSING_ENV_COVERAGE and a message listing exactly which envs are absent.
74
+ No creation or mutation is attempted. You cannot scope an asset to a subset of environments.
75
+
76
+ BEFORE constructing any resource file or initiating import/provision:
77
+ 1. Run: ductape_cli("products environments list <product_tag> --json")
78
+ 2. Note every slug returned (e.g. dev, snd, prd).
79
+ 3. Collect connection details or confirmation for EACH slug from the user.
80
+ Do not proceed until you have details for every env.
81
+
82
+ Sharing one resource across multiple envs is allowed but must be confirmed per env:
83
+ - Ask the user explicitly: "Should <env> use the same <resource> as <other_env>?"
84
+ - Never assume shared configuration without confirmation.
85
+ - For cloud-linked envs, set config.cloud to the connection tag for that env and
86
+ omit raw credentials; the cloud connection must exist for that env too.
87
+
68
88
  2. RUNTIME OPERATIONS (run, dispatch, execute, start, send, produce, query, insert, update, delete…)
69
89
  The "input" field shape is product- and operation-specific — it is NOT derivable from Joi validators.
70
90
  It is defined by how the product's action/feature/session/quota/etc. was configured in Ductape.
@@ -1133,6 +1153,11 @@ async function main() {
1133
1153
  ' ALWAYS call ductape_schema(module="product") first to get the exact field shape before\n' +
1134
1154
  ' constructing a file. Storage envs[].config is conditional on envs[].type (aws/gcp/azure)\n' +
1135
1155
  ' and returned as oneOf — pick the variant matching the type.\n' +
1156
+ ' REQUIRED: before building any resource file, run\n' +
1157
+ ' ductape_cli("products environments list <product_tag> --json")\n' +
1158
+ ' and include an envs entry for EVERY environment returned. Omitting any env causes a\n' +
1159
+ ' validation error. If the user has not supplied connection details for every env, ask\n' +
1160
+ ' them explicitly. Confirm per-env before reusing the same resource across environments.\n' +
1136
1161
  ' - Three distinct storage registration flows — choose the right one:\n' +
1137
1162
  ' 1. Manual credentials (bucket already exists, you supply keys directly):\n' +
1138
1163
  ' resources storage create -f storage.json\n' +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ductape/mcp",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
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
@@ -76,6 +76,26 @@ There are THREE categories of operations. Use the right tool for each:
76
76
  cloud connections, and secrets. Environments, app actions, auths, features, quotas,
77
77
  fallbacks, jobs, and healthchecks are configured in the Workbench UI.
78
78
 
79
+ ⚠ MULTI-ENV REQUIREMENT — applies to ALL product assets (storage, database, cache,
80
+ messageBroker, graph, vector, and any other resource with an envs array):
81
+ The envs array MUST contain one entry for EVERY environment defined on the product.
82
+ import-persist and provision-persist enforce this with a preflight check: if the
83
+ generated draft does not cover all product environments the operation fails immediately
84
+ with error code MISSING_ENV_COVERAGE and a message listing exactly which envs are absent.
85
+ No creation or mutation is attempted. You cannot scope an asset to a subset of environments.
86
+
87
+ BEFORE constructing any resource file or initiating import/provision:
88
+ 1. Run: ductape_cli("products environments list <product_tag> --json")
89
+ 2. Note every slug returned (e.g. dev, snd, prd).
90
+ 3. Collect connection details or confirmation for EACH slug from the user.
91
+ Do not proceed until you have details for every env.
92
+
93
+ Sharing one resource across multiple envs is allowed but must be confirmed per env:
94
+ - Ask the user explicitly: "Should <env> use the same <resource> as <other_env>?"
95
+ - Never assume shared configuration without confirmation.
96
+ - For cloud-linked envs, set config.cloud to the connection tag for that env and
97
+ omit raw credentials; the cloud connection must exist for that env too.
98
+
79
99
  2. RUNTIME OPERATIONS (run, dispatch, execute, start, send, produce, query, insert, update, delete…)
80
100
  The "input" field shape is product- and operation-specific — it is NOT derivable from Joi validators.
81
101
  It is defined by how the product's action/feature/session/quota/etc. was configured in Ductape.
@@ -1227,6 +1247,11 @@ async function main() {
1227
1247
  ' ALWAYS call ductape_schema(module="product") first to get the exact field shape before\n' +
1228
1248
  ' constructing a file. Storage envs[].config is conditional on envs[].type (aws/gcp/azure)\n' +
1229
1249
  ' and returned as oneOf — pick the variant matching the type.\n' +
1250
+ ' REQUIRED: before building any resource file, run\n' +
1251
+ ' ductape_cli("products environments list <product_tag> --json")\n' +
1252
+ ' and include an envs entry for EVERY environment returned. Omitting any env causes a\n' +
1253
+ ' validation error. If the user has not supplied connection details for every env, ask\n' +
1254
+ ' them explicitly. Confirm per-env before reusing the same resource across environments.\n' +
1230
1255
  ' - Three distinct storage registration flows — choose the right one:\n' +
1231
1256
  ' 1. Manual credentials (bucket already exists, you supply keys directly):\n' +
1232
1257
  ' resources storage create -f storage.json\n' +