@bpmnkit/cli 0.0.24 → 0.0.26

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.
@@ -1,3 +1,5 @@
1
+ import { spawn } from "node:child_process";
2
+ import { fileURLToPath } from "node:url";
1
3
  import { startServer } from "@bpmnkit/proxy";
2
4
  const startCmd = {
3
5
  name: "start",
@@ -18,16 +20,42 @@ const startCmd = {
18
20
  const port = ctx.flags.port ?? 3033;
19
21
  ctx.output.info(`Starting BPMN Kit proxy server on port ${port}...`);
20
22
  startServer(port);
21
- // Keep the CLI alive until the user presses Ctrl+C
22
23
  await new Promise((resolve) => {
23
24
  process.once("SIGINT", resolve);
24
25
  process.once("SIGTERM", resolve);
25
26
  });
26
27
  },
27
28
  };
29
+ const mcpCmd = {
30
+ name: "mcp",
31
+ description: "Start the BPMNKit AIKit MCP server (stdio transport for Claude Code)",
32
+ examples: [
33
+ {
34
+ description: "Start MCP server (used by Claude Code plugin)",
35
+ command: "casen proxy mcp",
36
+ },
37
+ ],
38
+ async run(_ctx) {
39
+ const aitKitMcpUrl = import.meta.resolve("@bpmnkit/proxy/dist/aikit-mcp.js");
40
+ const aitKitMcpPath = fileURLToPath(aitKitMcpUrl);
41
+ await new Promise((resolve, reject) => {
42
+ const child = spawn(process.execPath, [aitKitMcpPath], {
43
+ stdio: "inherit",
44
+ env: process.env,
45
+ });
46
+ child.on("error", reject);
47
+ child.on("close", (code) => {
48
+ if (code === 0 || code === null)
49
+ resolve();
50
+ else
51
+ reject(new Error(`aikit-mcp exited with code ${code}`));
52
+ });
53
+ });
54
+ },
55
+ };
28
56
  export const proxyGroup = {
29
57
  name: "proxy",
30
58
  description: "Start the local AI bridge and Camunda API proxy server",
31
- commands: [startCmd],
59
+ commands: [startCmd, mcpCmd],
32
60
  };
33
61
  //# sourceMappingURL=proxy.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bpmnkit/cli",
3
- "version": "0.0.24",
3
+ "version": "0.0.26",
4
4
  "description": "Command-line interface for Camunda 8 — deploy, manage, and monitor processes from the terminal",
5
5
  "type": "module",
6
6
  "bin": {
@@ -20,9 +20,9 @@
20
20
  "@bpmnkit/ascii": "0.0.21",
21
21
  "@bpmnkit/connector-gen": "0.0.12",
22
22
  "@bpmnkit/core": "0.0.21",
23
- "@bpmnkit/engine": "0.1.20",
23
+ "@bpmnkit/engine": "0.1.21",
24
24
  "@bpmnkit/profiles": "0.0.15",
25
- "@bpmnkit/proxy": "0.0.22"
25
+ "@bpmnkit/proxy": "0.0.24"
26
26
  },
27
27
  "publishConfig": {
28
28
  "access": "public"
@@ -0,0 +1,85 @@
1
+ ---
2
+ description: Design a BPMN process — flow, forms, and decision tables. No workers, no deployment.
3
+ ---
4
+
5
+ You are designing a BPMN process using BPMNKit AIKit tools. Work through these steps in order.
6
+
7
+ ## Request
8
+
9
+ $ARGUMENTS
10
+
11
+ ---
12
+
13
+ ## Step 1 — Check for a domain pattern
14
+
15
+ Call `mcp__bpmnkit-aikit__pattern_list` to see available domain patterns.
16
+ If any pattern keywords match the request, call `mcp__bpmnkit-aikit__pattern_get` to load the full pattern as context.
17
+
18
+ ---
19
+
20
+ ## Step 2 — Create the BPMN
21
+
22
+ Spawn a subagent with this task:
23
+
24
+ > Using `mcp__bpmnkit-aikit__bpmn_create`, generate a BPMN process for: **$ARGUMENTS**
25
+ >
26
+ > If a pattern was loaded in Step 1, pass its readme and worker specs as context in the description parameter.
27
+ >
28
+ > Return the file path of the generated BPMN.
29
+
30
+ ---
31
+
32
+ ## Step 3 — Generate forms
33
+
34
+ Spawn a subagent with this task:
35
+
36
+ > Call `mcp__bpmnkit-aikit__form_create` with the BPMN path from Step 2.
37
+ >
38
+ > Return: list of `{ taskId, formId, path }` for each form created, or an empty list if no user tasks with formId were found.
39
+
40
+ ---
41
+
42
+ ## Step 4 — Generate DMN tables
43
+
44
+ Spawn a subagent with this task:
45
+
46
+ > Call `mcp__bpmnkit-aikit__dmn_create` with the BPMN path from Step 2.
47
+ >
48
+ > Return: list of `{ taskId, decisionId, path }` for each DMN file created, or an empty list if no business rule tasks with decisionId were found.
49
+
50
+ ---
51
+
52
+ ## Step 5 — Validate
53
+
54
+ Spawn a subagent with this task:
55
+
56
+ > Call `mcp__bpmnkit-aikit__bpmn_validate` on the BPMN file from Step 2.
57
+ >
58
+ > Return: `{ errors: [...], warnings: [...] }`
59
+
60
+ ---
61
+
62
+ ## Step 6 — Present design summary
63
+
64
+ Collect all results and present:
65
+
66
+ ```
67
+ BPMN: <path>
68
+ Pattern: <id or "none">
69
+
70
+ Forms (<count>):
71
+ <formId> → <path>
72
+ (or "none" if empty)
73
+
74
+ DMN tables (<count>):
75
+ <decisionId> → <path>
76
+ (or "none" if empty)
77
+
78
+ Validation:
79
+ Errors: <count> — <list if any>
80
+ Warnings: <count> — <list if any>
81
+ ```
82
+
83
+ Then say: **"Use `/implement` to add workers, or `/deploy` when ready."**
84
+
85
+ Do NOT offer to deploy.