@kadoa/mcp 0.4.4-rc.2 → 0.5.2

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 +14 -12
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -47481,9 +47481,9 @@ var import_debug, __require2, ChangeDifferenceType, KadoaErrorCode, _KadoaSdkExc
47481
47481
  }
47482
47482
  validateFieldName(name) {
47483
47483
  if (!_SchemaBuilder2.FIELD_NAME_PATTERN.test(name)) {
47484
- throw new KadoaSdkException(`Field name "${name}" must be alphanumeric only (no underscores or special characters)`, {
47484
+ throw new KadoaSdkException(`Field name "${name}" must start with a letter and contain only letters, digits, and underscores`, {
47485
47485
  code: "VALIDATION_ERROR",
47486
- details: { name, pattern: "^[A-Za-z0-9]+$" }
47486
+ details: { name, pattern: "^[A-Za-z][A-Za-z0-9_]*$" }
47487
47487
  });
47488
47488
  }
47489
47489
  const lowerName = name.toLowerCase();
@@ -48325,7 +48325,7 @@ var import_debug, __require2, ChangeDifferenceType, KadoaErrorCode, _KadoaSdkExc
48325
48325
  }));
48326
48326
  return channels;
48327
48327
  }
48328
- }, PUBLIC_API_URI, WSS_API_URI, REALTIME_API_URI, SDK_VERSION = "0.29.0", SDK_NAME = "kadoa-node-sdk", SDK_LANGUAGE = "node", debug6, isDrainControlMessage = (message) => message.type === "control.draining", isRealtimeEvent = (message) => message.type !== "heartbeat" && message.type !== "control.draining", _Realtime = class _Realtime2 {
48328
+ }, PUBLIC_API_URI, WSS_API_URI, REALTIME_API_URI, SDK_VERSION = "0.29.1", SDK_NAME = "kadoa-node-sdk", SDK_LANGUAGE = "node", debug6, isDrainControlMessage = (message) => message.type === "control.draining", isRealtimeEvent = (message) => message.type !== "heartbeat" && message.type !== "control.draining", _Realtime = class _Realtime2 {
48329
48329
  constructor(config2) {
48330
48330
  this.drainingSockets = /* @__PURE__ */ new Set;
48331
48331
  this.lastHeartbeat = Date.now();
@@ -49954,7 +49954,7 @@ This is the main page content.`
49954
49954
  example: "https://example.com/page"
49955
49955
  }
49956
49956
  };
49957
- _SchemaBuilder.FIELD_NAME_PATTERN = /^[A-Za-z0-9]+$/;
49957
+ _SchemaBuilder.FIELD_NAME_PATTERN = /^[A-Za-z][A-Za-z0-9_]*$/;
49958
49958
  _SchemaBuilder.TYPES_REQUIRING_EXAMPLE = [
49959
49959
  "STRING",
49960
49960
  "IMAGE",
@@ -50260,6 +50260,8 @@ function deriveStatusLabel(workflow) {
50260
50260
  return "Scheduled";
50261
50261
  case "RUNNING":
50262
50262
  return "Running";
50263
+ case "VALIDATING":
50264
+ return "Validating";
50263
50265
  case "FAILED":
50264
50266
  return "Failed";
50265
50267
  case "PAUSED":
@@ -50771,7 +50773,7 @@ function registerTools(server, ctx) {
50771
50773
  });
50772
50774
  }));
50773
50775
  server.registerTool("fetch_data", {
50774
- description: "Get extracted data from a workflow. Data is only available after the workflow run has completed (displayState is no longer RUNNING). Do NOT poll or sleep-wait for completion.",
50776
+ description: "Get extracted data from a workflow. Data is only available after the workflow run has completed (status is no longer 'Running' or 'Validating'). Do NOT poll or sleep-wait for completion.",
50775
50777
  inputSchema: {
50776
50778
  workflowId: exports_external.string().describe("The workflow ID"),
50777
50779
  limit: exports_external.preprocess(coerceNumber(), exports_external.number()).optional().describe("Maximum number of records to return"),
@@ -50873,9 +50875,9 @@ function registerTools(server, ctx) {
50873
50875
  server.registerTool("approve_workflow", {
50874
50876
  description: "Approve and activate a workflow that is in PREVIEW, PAUSED, or ERROR state. Transitions the workflow to ACTIVE so it can be run.",
50875
50877
  inputSchema: {
50876
- workflowId: exports_external.string().describe("The workflow ID to approve/activate")
50878
+ workflowId: exports_external.string().min(1).describe("The workflow ID to approve/activate")
50877
50879
  },
50878
- annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true }
50880
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false }
50879
50881
  }, withErrorHandling("approve_workflow", async (args) => {
50880
50882
  await ctx.client.workflow.resume(args.workflowId);
50881
50883
  return jsonResult({
@@ -50885,11 +50887,11 @@ function registerTools(server, ctx) {
50885
50887
  });
50886
50888
  }));
50887
50889
  server.registerTool("pause_workflow", {
50888
- description: "Pause an ACTIVE workflow so it stops running on its schedule. Use approve_workflow to resume it later.",
50890
+ description: "Pause an ACTIVE workflow so it stops running on its schedule. Requires the workflow to be in ACTIVE state — pausing a workflow that is currently running, already paused, or in PREVIEW will return an error. Use approve_workflow to resume a paused workflow.",
50889
50891
  inputSchema: {
50890
- workflowId: exports_external.string().describe("The workflow ID to pause")
50892
+ workflowId: exports_external.string().min(1).describe("The workflow ID to pause")
50891
50893
  },
50892
- annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true }
50894
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false }
50893
50895
  }, withErrorHandling("pause_workflow", async (args) => {
50894
50896
  await ctx.client.workflow.pause(args.workflowId);
50895
50897
  return jsonResult({
@@ -51498,7 +51500,7 @@ var package_default;
51498
51500
  var init_package = __esm(() => {
51499
51501
  package_default = {
51500
51502
  name: "@kadoa/mcp",
51501
- version: "0.4.4-rc.2",
51503
+ version: "0.5.2",
51502
51504
  description: "Kadoa MCP Server — manage workflows from Claude Desktop, Cursor, and other MCP clients",
51503
51505
  type: "module",
51504
51506
  main: "dist/index.js",
@@ -51522,7 +51524,7 @@ var init_package = __esm(() => {
51522
51524
  prepublishOnly: "bun run check-types && bun run test:unit && bun run build"
51523
51525
  },
51524
51526
  dependencies: {
51525
- "@kadoa/node-sdk": "^0.29.0",
51527
+ "@kadoa/node-sdk": "^0.29.1",
51526
51528
  "@modelcontextprotocol/sdk": "^1.26.0",
51527
51529
  express: "^5.2.1",
51528
51530
  ioredis: "^5.6.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kadoa/mcp",
3
- "version": "0.4.4-rc.2",
3
+ "version": "0.5.2",
4
4
  "description": "Kadoa MCP Server — manage workflows from Claude Desktop, Cursor, and other MCP clients",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -24,7 +24,7 @@
24
24
  "prepublishOnly": "bun run check-types && bun run test:unit && bun run build"
25
25
  },
26
26
  "dependencies": {
27
- "@kadoa/node-sdk": "^0.29.0",
27
+ "@kadoa/node-sdk": "^0.29.1",
28
28
  "@modelcontextprotocol/sdk": "^1.26.0",
29
29
  "express": "^5.2.1",
30
30
  "ioredis": "^5.6.1",