@ductape/mcp 0.2.20 → 0.2.21

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 (2) hide show
  1. package/dist/index.js +25 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -876,7 +876,8 @@ ALL params are passed as a JSON array in positional order matching the SDK signa
876
876
  // ctx.input – typed runtime input; always compiles to $Input{} operators
877
877
  // ctx.sampleInput – compile-time sample for loop/branch discovery only
878
878
  // ctx.step(tag, fn, rollback?, opts?) – define a durable step
879
- // ctx.api.run({ app, event, input }) – call an app action
879
+ // ctx.api.run({ app, action, input }) – call an app action (NOT 'event' -- that field name
880
+ // only applies to ctx.database/ctx.notification/ctx.storage below, never ctx.api/ctx.action)
880
881
  // ctx.database.query/insert/update/delete({ database, event, ... })
881
882
  // ctx.graph.execute({ graph, action, input })
882
883
  // ctx.notification.send/email/push/sms({ notification, event, ... })
@@ -2501,7 +2502,8 @@ Import an existing resource and register it on the product:
2501
2502
  File is a JSON ARRAY — one entry per env, same product + component tag across all entries.
2502
2503
  Each entry: { cloud, service, type, product, component, env, resource, region?, dbName? }
2503
2504
  Supported service identifiers: s3, gcs, blob, rds, postgresql, cloudsql, sqs, pubsub,
2504
- servicebus, neptune, cosmos-gremlin, opensearch, azure-search, atlas-cluster, aura-instance
2505
+ servicebus, neptune, cosmos-gremlin, opensearch, azure-search, atlas-cluster, aura-instance,
2506
+ vertex-vector-search, spanner-graph, dynamodb, keyspaces, mysql
2505
2507
 
2506
2508
  Provision a brand-new resource and register it:
2507
2509
  ductape_cli("cloud resources provision-persist-all -f all-envs.json --json")
@@ -2509,6 +2511,20 @@ Provision a brand-new resource and register it:
2509
2511
  List available tiers first: ductape_cli("cloud tiers --provider aws --type database --db-type postgresql --json")
2510
2512
  NEVER infer region, tier, or cost — always list and confirm with the user first.
2511
2513
  Atlas and Neo4j Aura are IMPORT-ONLY — provision is not supported for these providers.
2514
+ Per-provider provisionable services: aws → s3, sqs, rds, neptune, opensearch, dynamodb, keyspaces.
2515
+ gcp → gcs, cloudsql, pubsub, spanner-graph, vertex-vector-search.
2516
+ azure → blob, servicebus, postgresql, mysql, cosmos-gremlin, azure-search.
2517
+
2518
+ vertex-vector-search (GCP): additional per-entry params: dimensions (default 1536), metric
2519
+ ("cosine"|"euclidean"|"dotproduct", default cosine), algorithm ("tree-ah"|"brute-force",
2520
+ default tree-ah), deployIndex (default true — set false to create the Index and Index
2521
+ Endpoint without deploying, avoiding ongoing compute cost until you deploy manually),
2522
+ machineType (default "e2-standard-2"), minReplicaCount/maxReplicaCount (default 1).
2523
+ Provisioning creates the Index Endpoint, the actual Index (STREAM_UPDATE method, required
2524
+ for runtime vector.upsert/upsertOne), and deploys the Index to the Endpoint — all three are
2525
+ needed for the result to be queryable. A DEPLOYED index runs dedicated compute continuously
2526
+ (real ongoing cost, not free-tier) — always confirm machine type/replica count with the user
2527
+ before provisioning, the same as any other tier/cost decision.
2512
2528
 
2513
2529
  VPC connector (private networking):
2514
2530
  ductape_cli("cloud connections vpc update <tag> --vpc-id vpc-xxx --subnet-ids subnet-1,subnet-2")
@@ -2680,7 +2696,7 @@ CONNECT A DISCOVERED APP THROUGH MCP:
2680
2696
  obtain user approval when the user has not already requested the connection.
2681
2697
 
2682
2698
  ONLY after all five steps can any code call:
2683
- ctx.api.run({ app: '<app_tag>', event: '<action_tag>', input: { ... } }) ← in a feature handler
2699
+ ctx.api.run({ app: '<app_tag>', action: '<action_tag>', input: { ... } }) ← in a feature handler
2684
2700
  actions.run([{ product, env, app: '<app_tag>', action: '<action_tag>', input }]) ← at runtime
2685
2701
 
2686
2702
  ctx.api (alias for ctx.action) is NOT a generic HTTP call. It ONLY invokes a pre-registered
@@ -2745,8 +2761,11 @@ Run an action at runtime:
2745
2761
  ductape_execute("actions.dispatch", [{ product, env, app, action, input, schedule? }])
2746
2762
 
2747
2763
  In a Ductape feature handler, call the registered action through:
2748
- await ctx.api.run({ app: "<app_tag>", event: "<action_tag>", input: { ... } })
2764
+ await ctx.api.run({ app: "<app_tag>", action: "<action_tag>", input: { ... } })
2749
2765
  ctx.api is the supported feature-context surface (also described as ctx.action in older code).
2766
+ NEVER use 'event' as the field name here -- that is only correct for ctx.database/ctx.notification/
2767
+ ctx.storage steps. ctx.api.run's real field is 'action'; passing 'event' instead silently produces
2768
+ an unset step and fails feature compilation with "did not record a portable operation".
2750
2769
  There is no ctx.apps, ctx.integrations, or generic external-HTTP feature surface.
2751
2770
 
2752
2771
  PAYSTACK CONFIGURATION:
@@ -3657,8 +3676,8 @@ STEP 8 — SET rollbacks for reversible steps
3657
3676
  ctx.api.run requires a pre-registered Ductape App — 'stripe' below is the tag of a registered App:
3658
3677
  const charge = await ctx.step(
3659
3678
  'charge',
3660
- async () => ctx.api.run({ app: 'stripe', event: 'create-charge', input: { amount: ctx.input.amount } }),
3661
- async (result) => ctx.api.run({ app: 'stripe', event: 'refund', input: { chargeId: result.id } })
3679
+ async () => ctx.api.run({ app: 'stripe', action: 'create-charge', input: { amount: ctx.input.amount } }),
3680
+ async (result) => ctx.api.run({ app: 'stripe', action: 'refund', input: { chargeId: result.id } })
3662
3681
  );
3663
3682
 
3664
3683
  Code-first ctx step types currently record: function | action | database | graph | vector | session |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ductape/mcp",
3
- "version": "0.2.20",
3
+ "version": "0.2.21",
4
4
  "description": "MCP server that exposes Ductape SDK operations via the backend proxy",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",